@catladder/cli 0.0.0-next-e9e5af68 → 0.0.0-next-aea5d3ad

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.
Files changed (643) hide show
  1. package/dist/bundles/catenv/index.js +6990 -6861
  2. package/dist/bundles/cli/index.js +10416 -10828
  3. package/dist/bundles/skills/catladder-pipelines/SKILL.md +6 -6
  4. package/dist/cli/src/adapters/baseContext.d.ts +18 -18
  5. package/dist/cli/src/adapters/baseContext.js +34 -34
  6. package/dist/cli/src/adapters/nonInteractive.d.ts +2 -2
  7. package/dist/cli/src/adapters/nonInteractive.js +20 -22
  8. package/dist/cli/src/adapters/programmatic.d.ts +12 -12
  9. package/dist/cli/src/adapters/programmatic.js +46 -51
  10. package/dist/cli/src/adapters/terminal.d.ts +15 -15
  11. package/dist/cli/src/adapters/terminal.js +154 -176
  12. package/dist/cli/src/adapters/vaultManagerAccess.d.ts +1 -1
  13. package/dist/cli/src/adapters/vaultManagerAccess.js +11 -16
  14. package/dist/cli/src/apps/catenv/catenv.d.ts +4 -4
  15. package/dist/cli/src/apps/catenv/catenv.js +20 -20
  16. package/dist/cli/src/apps/catenv/printVariables.d.ts +1 -1
  17. package/dist/cli/src/apps/catenv/printVariables.js +30 -33
  18. package/dist/cli/src/apps/catenv/types.d.ts +4 -4
  19. package/dist/cli/src/apps/catenv/types.js +2 -4
  20. package/dist/cli/src/apps/catenv/utils.d.ts +6 -9
  21. package/dist/cli/src/apps/catenv/utils.js +21 -25
  22. package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -1
  23. package/dist/cli/src/apps/catenv/verboseBanner.js +24 -20
  24. package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +1 -1
  25. package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +22 -25
  26. package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +1 -1
  27. package/dist/cli/src/apps/catenv/writeEnvDTs.js +32 -31
  28. package/dist/cli/src/apps/cli/commands/mongodb/utils/index.d.ts +6 -6
  29. package/dist/cli/src/apps/cli/commands/mongodb/utils/index.js +52 -56
  30. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +1 -1
  31. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +165 -151
  32. package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.d.ts +13 -13
  33. package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.js +50 -62
  34. package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.d.ts +9 -9
  35. package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.js +43 -44
  36. package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.d.ts +1 -1
  37. package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.js +75 -93
  38. package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.d.ts +1 -1
  39. package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.js +86 -78
  40. package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.d.ts +1 -1
  41. package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.js +58 -57
  42. package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.d.ts +1 -1
  43. package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.js +25 -30
  44. package/dist/cli/src/apps/cli/commands/project/doctor/index.d.ts +1 -1
  45. package/dist/cli/src/apps/cli/commands/project/doctor/index.js +24 -25
  46. package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.d.ts +1 -1
  47. package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.js +34 -45
  48. package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +1 -1
  49. package/dist/cli/src/apps/cli/commands/project/setup/index.js +31 -27
  50. package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +1 -1
  51. package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +13 -15
  52. package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +1 -1
  53. package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js +34 -43
  54. package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.d.ts +1 -1
  55. package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js +130 -137
  56. package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +3 -3
  57. package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +49 -46
  58. package/dist/cli/src/apps/cli/commands/project/setup/setupContext.d.ts +1 -1
  59. package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +13 -15
  60. package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +1 -1
  61. package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +69 -70
  62. package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.d.ts +1 -1
  63. package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js +7 -15
  64. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +1 -1
  65. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +16 -21
  66. package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.d.ts +1 -1
  67. package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +22 -26
  68. package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.d.ts +1 -1
  69. package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +30 -35
  70. package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -1
  71. package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +15 -17
  72. package/dist/cli/src/catci.d.ts +1 -1
  73. package/dist/cli/src/catci.js +63 -65
  74. package/dist/cli/src/catenv.d.ts +1 -1
  75. package/dist/cli/src/catenv.js +44 -31
  76. package/dist/cli/src/cli.d.ts +1 -1
  77. package/dist/cli/src/cli.js +185 -170
  78. package/dist/cli/src/commands/availability.d.ts +1 -1
  79. package/dist/cli/src/commands/availability.js +13 -16
  80. package/dist/cli/src/commands/cloudSQL/commandRestoreDb.d.ts +45 -45
  81. package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +92 -103
  82. package/dist/cli/src/commands/fun/commandDadjoke.d.ts +1 -1
  83. package/dist/cli/src/commands/fun/commandDadjoke.js +18 -24
  84. package/dist/cli/src/commands/fun/commandStarwars.d.ts +1 -1
  85. package/dist/cli/src/commands/fun/commandStarwars.js +12 -14
  86. package/dist/cli/src/commands/general/commandKubeCurrentContext.d.ts +1 -1
  87. package/dist/cli/src/commands/general/commandKubeCurrentContext.js +10 -12
  88. package/dist/cli/src/commands/general/commandKubeGetShell.d.ts +11 -11
  89. package/dist/cli/src/commands/general/commandKubeGetShell.js +26 -28
  90. package/dist/cli/src/commands/general/commandKubeListNamespaces.d.ts +1 -1
  91. package/dist/cli/src/commands/general/commandKubeListNamespaces.js +13 -15
  92. package/dist/cli/src/commands/general/commandKubeListPods.d.ts +6 -6
  93. package/dist/cli/src/commands/general/commandKubeListPods.js +19 -21
  94. package/dist/cli/src/commands/general/commandKubeListSecrets.d.ts +6 -6
  95. package/dist/cli/src/commands/general/commandKubeListSecrets.js +19 -21
  96. package/dist/cli/src/commands/general/commandKubePortForward.d.ts +19 -19
  97. package/dist/cli/src/commands/general/commandKubePortForward.js +29 -37
  98. package/dist/cli/src/commands/general/commandKubeStopPortforward.d.ts +6 -6
  99. package/dist/cli/src/commands/general/commandKubeStopPortforward.js +13 -19
  100. package/dist/cli/src/commands/index.d.ts +1 -1
  101. package/dist/cli/src/commands/index.js +43 -250
  102. package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.d.ts +15 -15
  103. package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +76 -73
  104. package/dist/cli/src/commands/mongodb/commandMongoGetShell.d.ts +15 -15
  105. package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +26 -28
  106. package/dist/cli/src/commands/mongodb/commandMongoPortForward.d.ts +20 -20
  107. package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +45 -52
  108. package/dist/cli/src/commands/project/commandCloudSqlProxy.d.ts +12 -12
  109. package/dist/cli/src/commands/project/commandCloudSqlProxy.js +107 -110
  110. package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +8 -8
  111. package/dist/cli/src/commands/project/commandConfigSecrets.js +24 -26
  112. package/dist/cli/src/commands/project/commandDoctor.d.ts +7 -7
  113. package/dist/cli/src/commands/project/commandDoctor.js +18 -20
  114. package/dist/cli/src/commands/project/commandEnvVars.d.ts +7 -7
  115. package/dist/cli/src/commands/project/commandEnvVars.js +21 -26
  116. package/dist/cli/src/commands/project/commandGetMyTotalWorktime.d.ts +1 -1
  117. package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +12 -14
  118. package/dist/cli/src/commands/project/commandGitlabCi.d.ts +11 -11
  119. package/dist/cli/src/commands/project/commandGitlabCi.js +82 -91
  120. package/dist/cli/src/commands/project/commandOpenEnv.d.ts +7 -7
  121. package/dist/cli/src/commands/project/commandOpenEnv.js +24 -31
  122. package/dist/cli/src/commands/project/commandOpenGit.d.ts +1 -1
  123. package/dist/cli/src/commands/project/commandOpenGit.js +10 -12
  124. package/dist/cli/src/commands/project/commandOpenLogs.d.ts +7 -7
  125. package/dist/cli/src/commands/project/commandOpenLogs.js +34 -37
  126. package/dist/cli/src/commands/project/commandPortForward.d.ts +24 -24
  127. package/dist/cli/src/commands/project/commandPortForward.js +59 -78
  128. package/dist/cli/src/commands/project/commandProjectRestoreDb.d.ts +18 -18
  129. package/dist/cli/src/commands/project/commandProjectRestoreDb.js +156 -147
  130. package/dist/cli/src/commands/project/commandRenewToken.d.ts +1 -1
  131. package/dist/cli/src/commands/project/commandRenewToken.js +10 -12
  132. package/dist/cli/src/commands/project/commandSecretsClearBackups.d.ts +6 -6
  133. package/dist/cli/src/commands/project/commandSecretsClearBackups.js +17 -19
  134. package/dist/cli/src/commands/project/commandSecretsSyncGithub.d.ts +22 -22
  135. package/dist/cli/src/commands/project/commandSecretsSyncGithub.js +136 -144
  136. package/dist/cli/src/commands/project/commandSecurityEvaluate.d.ts +1 -1
  137. package/dist/cli/src/commands/project/commandSecurityEvaluate.js +17 -20
  138. package/dist/cli/src/commands/project/commandSetup.d.ts +7 -7
  139. package/dist/cli/src/commands/project/commandSetup.js +18 -20
  140. package/dist/cli/src/commands/project/k8s/commandDeletePods.d.ts +12 -12
  141. package/dist/cli/src/commands/project/k8s/commandDeletePods.js +38 -40
  142. package/dist/cli/src/commands/project/k8s/commandDeleteProject.d.ts +7 -7
  143. package/dist/cli/src/commands/project/k8s/commandDeleteProject.js +28 -35
  144. package/dist/cli/src/commands/project/k8s/commandGetShell.d.ts +12 -12
  145. package/dist/cli/src/commands/project/k8s/commandGetShell.js +31 -31
  146. package/dist/cli/src/commands/project/k8s/commandListPods.d.ts +7 -7
  147. package/dist/cli/src/commands/project/k8s/commandListPods.js +21 -23
  148. package/dist/cli/src/commands/project/k8s/commandNamespace.d.ts +7 -7
  149. package/dist/cli/src/commands/project/k8s/commandNamespace.js +19 -21
  150. package/dist/cli/src/commands/project/k8s/commandPauseProject.d.ts +7 -7
  151. package/dist/cli/src/commands/project/k8s/commandPauseProject.js +28 -35
  152. package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.d.ts +22 -22
  153. package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js +67 -76
  154. package/dist/cli/src/commands/security/commandSecurityAuditCiJob.d.ts +26 -26
  155. package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +62 -73
  156. package/dist/cli/src/commands/security/commandSecurityAuditCreate.d.ts +21 -21
  157. package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +47 -51
  158. package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.d.ts +6 -6
  159. package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +22 -29
  160. package/dist/cli/src/completion.d.ts +1 -1
  161. package/dist/cli/src/completion.js +130 -129
  162. package/dist/cli/src/config/getProjectConfig.d.ts +6 -8
  163. package/dist/cli/src/config/getProjectConfig.js +92 -94
  164. package/dist/cli/src/config/parseChoice.d.ts +3 -3
  165. package/dist/cli/src/config/parseChoice.js +6 -11
  166. package/dist/cli/src/core/defineCommand.d.ts +1 -1
  167. package/dist/cli/src/core/defineCommand.js +4 -6
  168. package/dist/cli/src/core/index.d.ts +3 -3
  169. package/dist/cli/src/core/index.js +9 -46
  170. package/dist/cli/src/core/registry.d.ts +1 -1
  171. package/dist/cli/src/core/registry.js +10 -12
  172. package/dist/cli/src/core/runner.d.ts +3 -3
  173. package/dist/cli/src/core/runner.js +8 -10
  174. package/dist/cli/src/core/types.d.ts +70 -70
  175. package/dist/cli/src/core/types.js +14 -15
  176. package/dist/cli/src/gcloud/artifactsRegistry.d.ts +3 -3
  177. package/dist/cli/src/gcloud/artifactsRegistry.js +11 -12
  178. package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +1 -1
  179. package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +12 -19
  180. package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
  181. package/dist/cli/src/gcloud/cloudSql/copyDb.js +20 -31
  182. package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +1 -1
  183. package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +10 -12
  184. package/dist/cli/src/gcloud/cloudSql/startProxy.d.ts +4 -4
  185. package/dist/cli/src/gcloud/cloudSql/startProxy.js +39 -55
  186. package/dist/cli/src/gcloud/enableServices.d.ts +2 -2
  187. package/dist/cli/src/gcloud/enableServices.js +6 -8
  188. package/dist/cli/src/gcloud/getProjectNumber.d.ts +1 -1
  189. package/dist/cli/src/gcloud/getProjectNumber.js +10 -12
  190. package/dist/cli/src/gcloud/openDashboard.d.ts +1 -1
  191. package/dist/cli/src/gcloud/openDashboard.js +13 -17
  192. package/dist/cli/src/gcloud/serviceAccountNames.d.ts +11 -11
  193. package/dist/cli/src/gcloud/serviceAccountNames.js +27 -34
  194. package/dist/cli/src/gcloud/serviceAccounts.d.ts +6 -6
  195. package/dist/cli/src/gcloud/serviceAccounts.js +37 -46
  196. package/dist/cli/src/git/getGetMainBranch.d.ts +1 -1
  197. package/dist/cli/src/git/getGetMainBranch.js +5 -9
  198. package/dist/cli/src/git/gitConfig.d.ts +6 -11
  199. package/dist/cli/src/git/gitConfig.js +11 -17
  200. package/dist/cli/src/git/gitProjectInformation.d.ts +6 -6
  201. package/dist/cli/src/git/gitProjectInformation.js +20 -30
  202. package/dist/cli/src/git/index.d.ts +1 -1
  203. package/dist/cli/src/git/index.js +16 -23
  204. package/dist/cli/src/index.d.ts +1 -1
  205. package/dist/cli/src/index.js +2 -4
  206. package/dist/cli/src/k8sApi/index.d.ts +1 -1
  207. package/dist/cli/src/k8sApi/index.js +12 -14
  208. package/dist/cli/src/kubernetes/index.d.ts +1 -1
  209. package/dist/cli/src/kubernetes/index.js +17 -24
  210. package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +1 -1
  211. package/dist/cli/src/kubernetes/openKubernetesDashboards.js +33 -35
  212. package/dist/cli/src/kubernetes/portForward.d.ts +1 -1
  213. package/dist/cli/src/kubernetes/portForward.js +5 -7
  214. package/dist/cli/src/packageInfos.d.ts +1 -1
  215. package/dist/cli/src/packageInfos.js +3 -5
  216. package/dist/cli/src/release/changesets.d.ts +4 -4
  217. package/dist/cli/src/release/changesets.js +68 -60
  218. package/dist/cli/src/release/changesetsReleaseJob.d.ts +1 -1
  219. package/dist/cli/src/release/changesetsReleaseJob.js +99 -99
  220. package/dist/cli/src/scripts/generateCliSkillReference.d.ts +1 -1
  221. package/dist/cli/src/scripts/generateCliSkillReference.js +85 -62
  222. package/dist/cli/src/security/auditDocument.d.ts +16 -16
  223. package/dist/cli/src/security/auditDocument.js +65 -54
  224. package/dist/cli/src/security/createSecurityAuditMergeRequest.d.ts +6 -11
  225. package/dist/cli/src/security/createSecurityAuditMergeRequest.js +43 -43
  226. package/dist/cli/src/security/evaluateSecurityAudit.d.ts +3 -5
  227. package/dist/cli/src/security/evaluateSecurityAudit.js +12 -16
  228. package/dist/cli/src/store/updateCatladderStore.d.ts +4 -4
  229. package/dist/cli/src/store/updateCatladderStore.js +12 -16
  230. package/dist/cli/src/types/types.d.ts +13 -13
  231. package/dist/cli/src/types/types.js +2 -4
  232. package/dist/cli/src/utils/boxWithAscii.d.ts +1 -1
  233. package/dist/cli/src/utils/boxWithAscii.js +10 -12
  234. package/dist/cli/src/utils/cluster.d.ts +1 -1
  235. package/dist/cli/src/utils/cluster.js +6 -8
  236. package/dist/cli/src/utils/concurrency.d.ts +1 -1
  237. package/dist/cli/src/utils/concurrency.js +13 -17
  238. package/dist/cli/src/utils/editAsFile.d.ts +1 -1
  239. package/dist/cli/src/utils/editAsFile.js +17 -25
  240. package/dist/cli/src/utils/files.d.ts +1 -1
  241. package/dist/cli/src/utils/files.js +12 -15
  242. package/dist/cli/src/utils/getEditor.d.ts +2 -2
  243. package/dist/cli/src/utils/getEditor.js +14 -20
  244. package/dist/cli/src/utils/github.d.ts +1 -1
  245. package/dist/cli/src/utils/github.js +60 -47
  246. package/dist/cli/src/utils/gitlab.d.ts +9 -9
  247. package/dist/cli/src/utils/gitlab.js +173 -189
  248. package/dist/cli/src/utils/log.d.ts +2 -2
  249. package/dist/cli/src/utils/log.js +16 -18
  250. package/dist/cli/src/utils/portForwards.d.ts +5 -5
  251. package/dist/cli/src/utils/portForwards.js +31 -32
  252. package/dist/cli/src/utils/preferences.d.ts +1 -1
  253. package/dist/cli/src/utils/preferences.js +36 -43
  254. package/dist/cli/src/utils/projects/index.d.ts +1 -1
  255. package/dist/cli/src/utils/projects/index.js +21 -24
  256. package/dist/cli/src/utils/promise.d.ts +1 -1
  257. package/dist/cli/src/utils/promise.js +6 -8
  258. package/dist/cli/src/utils/shell.d.ts +1 -1
  259. package/dist/cli/src/utils/shell.js +19 -20
  260. package/dist/cli/src/vault/BitwardenVault.d.ts +20 -20
  261. package/dist/cli/src/vault/BitwardenVault.js +98 -84
  262. package/dist/cli/src/vault/GitlabVault.d.ts +4 -4
  263. package/dist/cli/src/vault/GitlabVault.js +13 -15
  264. package/dist/cli/src/vault/VaultManager.d.ts +32 -32
  265. package/dist/cli/src/vault/VaultManager.js +104 -98
  266. package/dist/cli/src/vault/bw.d.ts +3 -5
  267. package/dist/cli/src/vault/bw.js +54 -61
  268. package/dist/cli/src/vault/cache.d.ts +9 -9
  269. package/dist/cli/src/vault/cache.js +27 -33
  270. package/dist/cli/src/vault/index.d.ts +1 -1
  271. package/dist/cli/src/vault/index.js +18 -40
  272. package/dist/cli/src/vault/types.d.ts +16 -16
  273. package/dist/cli/src/vault/types.js +2 -4
  274. package/dist/pipeline/src/agentSkills/generateAgentSkills.d.ts +1 -1
  275. package/dist/pipeline/src/agentSkills/generateAgentSkills.js +47 -43
  276. package/dist/pipeline/src/agentSkills/index.d.ts +1 -1
  277. package/dist/pipeline/src/agentSkills/index.js +16 -23
  278. package/dist/pipeline/src/agentSkills/shippedSkills.d.ts +8 -8
  279. package/dist/pipeline/src/agentSkills/shippedSkills.js +38 -35
  280. package/dist/pipeline/src/agentSkills/types.d.ts +8 -8
  281. package/dist/pipeline/src/agentSkills/types.js +13 -14
  282. package/dist/pipeline/src/backends/github/GithubBackend.d.ts +9 -9
  283. package/dist/pipeline/src/backends/github/GithubBackend.js +253 -276
  284. package/dist/pipeline/src/backends/github/GithubBackend.js.map +1 -1
  285. package/dist/pipeline/src/backends/github/ciVariables.d.ts +1 -1
  286. package/dist/pipeline/src/backends/github/ciVariables.js +15 -17
  287. package/dist/pipeline/src/backends/github/createGithubJobs.d.ts +3 -3
  288. package/dist/pipeline/src/backends/github/createGithubJobs.js +316 -264
  289. package/dist/pipeline/src/backends/github/githubReleaseJobs.d.ts +3 -3
  290. package/dist/pipeline/src/backends/github/githubReleaseJobs.js +64 -71
  291. package/dist/pipeline/src/backends/github/index.d.ts +1 -1
  292. package/dist/pipeline/src/backends/github/index.js +16 -23
  293. package/dist/pipeline/src/backends/github/scriptFiles.d.ts +8 -8
  294. package/dist/pipeline/src/backends/github/scriptFiles.js +27 -29
  295. package/dist/pipeline/src/backends/github/scriptFunctions.d.ts +1 -1
  296. package/dist/pipeline/src/backends/github/scriptFunctions.js +10 -10
  297. package/dist/pipeline/src/backends/gitlab/GitlabBackend.d.ts +13 -13
  298. package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +163 -178
  299. package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
  300. package/dist/pipeline/src/backends/gitlab/cache.d.ts +5 -5
  301. package/dist/pipeline/src/backends/gitlab/cache.js +24 -26
  302. package/dist/pipeline/src/backends/gitlab/ciVariables.d.ts +1 -1
  303. package/dist/pipeline/src/backends/gitlab/ciVariables.js +9 -11
  304. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.d.ts +4 -4
  305. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js +277 -289
  306. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js.map +1 -1
  307. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +2 -7
  308. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js +66 -65
  309. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -1
  310. package/dist/pipeline/src/backends/gitlab/getPipelineStages.d.ts +1 -1
  311. package/dist/pipeline/src/backends/gitlab/getPipelineStages.js +10 -8
  312. package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +34 -34
  313. package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +55 -45
  314. package/dist/pipeline/src/backends/gitlab/index.d.ts +1 -1
  315. package/dist/pipeline/src/backends/gitlab/index.js +16 -23
  316. package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.d.ts +1 -1
  317. package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.js +40 -10
  318. package/dist/pipeline/src/backends/index.d.ts +1 -1
  319. package/dist/pipeline/src/backends/index.js +41 -56
  320. package/dist/pipeline/src/backends/types.d.ts +19 -19
  321. package/dist/pipeline/src/backends/types.js +2 -4
  322. package/dist/pipeline/src/bash/BashExpression.d.ts +18 -18
  323. package/dist/pipeline/src/bash/BashExpression.js +45 -44
  324. package/dist/pipeline/src/bash/bashEscape.d.ts +4 -6
  325. package/dist/pipeline/src/bash/bashEscape.js +77 -67
  326. package/dist/pipeline/src/bash/bashExpressionPerPipelineType.d.ts +5 -3
  327. package/dist/pipeline/src/bash/bashExpressionPerPipelineType.js +6 -7
  328. package/dist/pipeline/src/bash/bashYaml.d.ts +1 -1
  329. package/dist/pipeline/src/bash/bashYaml.js +46 -41
  330. package/dist/pipeline/src/bash/ciVariables.d.ts +2 -2
  331. package/dist/pipeline/src/bash/ciVariables.js +10 -12
  332. package/dist/pipeline/src/bash/getInjectVarsScript.d.ts +1 -1
  333. package/dist/pipeline/src/bash/getInjectVarsScript.js +14 -11
  334. package/dist/pipeline/src/bash/index.d.ts +1 -1
  335. package/dist/pipeline/src/bash/index.js +16 -23
  336. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +1 -1
  337. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +49 -41
  338. package/dist/pipeline/src/build/base/constants.d.ts +4 -4
  339. package/dist/pipeline/src/build/base/constants.js +6 -8
  340. package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +3 -3
  341. package/dist/pipeline/src/build/base/createAppBuildJob.js +53 -47
  342. package/dist/pipeline/src/build/base/createArtifactsConfig.d.ts +1 -1
  343. package/dist/pipeline/src/build/base/createArtifactsConfig.js +25 -16
  344. package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -3
  345. package/dist/pipeline/src/build/base/createBuildJobDefinition.js +22 -16
  346. package/dist/pipeline/src/build/base/index.d.ts +4 -4
  347. package/dist/pipeline/src/build/base/index.js +34 -15
  348. package/dist/pipeline/src/build/base/writeBuildInfo.d.ts +1 -1
  349. package/dist/pipeline/src/build/base/writeBuildInfo.js +7 -7
  350. package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -1
  351. package/dist/pipeline/src/build/base/writeDotEnv.js +21 -19
  352. package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -1
  353. package/dist/pipeline/src/build/cache/createJobCache.js +55 -58
  354. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
  355. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +23 -16
  356. package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +1 -1
  357. package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +12 -14
  358. package/dist/pipeline/src/build/custom/buildJob.d.ts +1 -1
  359. package/dist/pipeline/src/build/custom/buildJob.js +16 -16
  360. package/dist/pipeline/src/build/custom/index.d.ts +1 -1
  361. package/dist/pipeline/src/build/custom/index.js +8 -7
  362. package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
  363. package/dist/pipeline/src/build/custom/testJob.js +71 -67
  364. package/dist/pipeline/src/build/docker.d.ts +45 -51
  365. package/dist/pipeline/src/build/docker.js +139 -116
  366. package/dist/pipeline/src/build/index.d.ts +17 -13
  367. package/dist/pipeline/src/build/index.js +73 -80
  368. package/dist/pipeline/src/build/node/buildJob.d.ts +1 -1
  369. package/dist/pipeline/src/build/node/buildJob.js +45 -35
  370. package/dist/pipeline/src/build/node/cache.d.ts +1 -1
  371. package/dist/pipeline/src/build/node/cache.js +79 -52
  372. package/dist/pipeline/src/build/node/constants.d.ts +4 -4
  373. package/dist/pipeline/src/build/node/constants.js +6 -8
  374. package/dist/pipeline/src/build/node/index.d.ts +1 -1
  375. package/dist/pipeline/src/build/node/index.js +17 -13
  376. package/dist/pipeline/src/build/node/meteor.d.ts +1 -1
  377. package/dist/pipeline/src/build/node/meteor.js +59 -40
  378. package/dist/pipeline/src/build/node/testJob.d.ts +1 -1
  379. package/dist/pipeline/src/build/node/testJob.js +100 -75
  380. package/dist/pipeline/src/build/node/yarn.d.ts +2 -2
  381. package/dist/pipeline/src/build/node/yarn.js +51 -33
  382. package/dist/pipeline/src/build/rails/build.d.ts +1 -1
  383. package/dist/pipeline/src/build/rails/build.js +44 -37
  384. package/dist/pipeline/src/build/rails/index.d.ts +1 -1
  385. package/dist/pipeline/src/build/rails/index.js +8 -7
  386. package/dist/pipeline/src/build/rails/testJob.d.ts +1 -1
  387. package/dist/pipeline/src/build/rails/testJob.js +101 -71
  388. package/dist/pipeline/src/build/types.d.ts +324 -324
  389. package/dist/pipeline/src/build/types.js +10 -10
  390. package/dist/pipeline/src/catci/shippedCatci.d.ts +3 -3
  391. package/dist/pipeline/src/catci/shippedCatci.js +22 -21
  392. package/dist/pipeline/src/catenv/index.d.ts +3 -3
  393. package/dist/pipeline/src/catenv/index.js +8 -10
  394. package/dist/pipeline/src/config/configruedEnvs.d.ts +1 -1
  395. package/dist/pipeline/src/config/configruedEnvs.js +23 -18
  396. package/dist/pipeline/src/config/index.d.ts +1 -1
  397. package/dist/pipeline/src/config/index.js +16 -23
  398. package/dist/pipeline/src/config/readConfig.d.ts +4 -4
  399. package/dist/pipeline/src/config/readConfig.js +37 -42
  400. package/dist/pipeline/src/context/createAllComponentsContext.d.ts +4 -8
  401. package/dist/pipeline/src/context/createAllComponentsContext.js +16 -22
  402. package/dist/pipeline/src/context/createComponentContext.d.ts +6 -6
  403. package/dist/pipeline/src/context/createComponentContext.js +96 -87
  404. package/dist/pipeline/src/context/createWorkspaceContext.d.ts +8 -15
  405. package/dist/pipeline/src/context/createWorkspaceContext.js +28 -37
  406. package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +2 -2
  407. package/dist/pipeline/src/context/getBuildInfoVariables.js +21 -22
  408. package/dist/pipeline/src/context/getEnvConfig.d.ts +1 -1
  409. package/dist/pipeline/src/context/getEnvConfig.js +28 -29
  410. package/dist/pipeline/src/context/getEnvType.d.ts +2 -2
  411. package/dist/pipeline/src/context/getEnvType.js +9 -10
  412. package/dist/pipeline/src/context/getEnvironment.d.ts +1 -1
  413. package/dist/pipeline/src/context/getEnvironment.js +16 -20
  414. package/dist/pipeline/src/context/getEnvironmentContext.d.ts +1 -6
  415. package/dist/pipeline/src/context/getEnvironmentContext.js +28 -35
  416. package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +19 -19
  417. package/dist/pipeline/src/context/getEnvironmentVariables.js +95 -102
  418. package/dist/pipeline/src/context/getLabels.d.ts +7 -7
  419. package/dist/pipeline/src/context/getLabels.js +25 -26
  420. package/dist/pipeline/src/context/getReviewSlug.d.ts +1 -1
  421. package/dist/pipeline/src/context/getReviewSlug.js +12 -14
  422. package/dist/pipeline/src/context/index.d.ts +1 -1
  423. package/dist/pipeline/src/context/index.js +16 -23
  424. package/dist/pipeline/src/context/transformJobOnlyVars.d.ts +3 -3
  425. package/dist/pipeline/src/context/transformJobOnlyVars.js +21 -21
  426. package/dist/pipeline/src/context/utils/envVars.d.ts +3 -3
  427. package/dist/pipeline/src/context/utils/envVars.js +20 -26
  428. package/dist/pipeline/src/customImages/hash.d.ts +7 -7
  429. package/dist/pipeline/src/customImages/hash.js +53 -59
  430. package/dist/pipeline/src/customImages/jobImagesPlan.d.ts +44 -46
  431. package/dist/pipeline/src/customImages/jobImagesPlan.js +131 -145
  432. package/dist/pipeline/src/customImages/jobImagesPlan.js.map +1 -1
  433. package/dist/pipeline/src/customImages/shippedImages.d.ts +1 -10
  434. package/dist/pipeline/src/customImages/shippedImages.js +28 -38
  435. package/dist/pipeline/src/customImages/shippedImages.js.map +1 -1
  436. package/dist/pipeline/src/defaults/index.d.ts +1 -1
  437. package/dist/pipeline/src/defaults/index.js +4 -6
  438. package/dist/pipeline/src/deploy/base/deploy.d.ts +2 -2
  439. package/dist/pipeline/src/deploy/base/deploy.js +113 -92
  440. package/dist/pipeline/src/deploy/base/index.d.ts +4 -4
  441. package/dist/pipeline/src/deploy/base/index.js +10 -6
  442. package/dist/pipeline/src/deploy/base/rollback.d.ts +2 -2
  443. package/dist/pipeline/src/deploy/base/rollback.js +27 -31
  444. package/dist/pipeline/src/deploy/base/stop.d.ts +2 -2
  445. package/dist/pipeline/src/deploy/base/stop.js +26 -31
  446. package/dist/pipeline/src/deploy/base/variables.d.ts +4 -4
  447. package/dist/pipeline/src/deploy/base/variables.js +6 -8
  448. package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
  449. package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +67 -55
  450. package/dist/pipeline/src/deploy/cloudRun/cleanup.d.ts +1 -1
  451. package/dist/pipeline/src/deploy/cloudRun/cleanup.js +17 -16
  452. package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.d.ts +1 -1
  453. package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +41 -44
  454. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +4 -4
  455. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +63 -58
  456. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
  457. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +73 -63
  458. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +1 -1
  459. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +38 -38
  460. package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +7 -7
  461. package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js +37 -35
  462. package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.d.ts +1 -1
  463. package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.js +3 -5
  464. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +1 -1
  465. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +67 -57
  466. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +1 -1
  467. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +139 -130
  468. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
  469. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +29 -10
  470. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
  471. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +23 -9
  472. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +3 -3
  473. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +39 -36
  474. package/dist/pipeline/src/deploy/cloudRun/createJobs/index.d.ts +1 -1
  475. package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +37 -36
  476. package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
  477. package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js +13 -19
  478. package/dist/pipeline/src/deploy/cloudRun/index.d.ts +1 -1
  479. package/dist/pipeline/src/deploy/cloudRun/index.js +100 -91
  480. package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +5 -9
  481. package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +7 -13
  482. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
  483. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +17 -13
  484. package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +5 -5
  485. package/dist/pipeline/src/deploy/cloudRun/utils/database.js +82 -49
  486. package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +1 -1
  487. package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +6 -6
  488. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +1 -1
  489. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +9 -7
  490. package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
  491. package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +5 -7
  492. package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +1 -1
  493. package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +3 -5
  494. package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.d.ts +1 -1
  495. package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +4 -6
  496. package/dist/pipeline/src/deploy/cloudSql/utils.d.ts +1 -1
  497. package/dist/pipeline/src/deploy/cloudSql/utils.js +9 -7
  498. package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
  499. package/dist/pipeline/src/deploy/custom/deployJob.js +34 -30
  500. package/dist/pipeline/src/deploy/custom/index.d.ts +1 -1
  501. package/dist/pipeline/src/deploy/custom/index.js +7 -9
  502. package/dist/pipeline/src/deploy/dockerTag/deployJob.d.ts +1 -1
  503. package/dist/pipeline/src/deploy/dockerTag/deployJob.js +22 -18
  504. package/dist/pipeline/src/deploy/dockerTag/index.d.ts +1 -1
  505. package/dist/pipeline/src/deploy/dockerTag/index.js +7 -9
  506. package/dist/pipeline/src/deploy/index.d.ts +13 -11
  507. package/dist/pipeline/src/deploy/index.js +20 -27
  508. package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +3 -5
  509. package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js +19 -25
  510. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +7 -7
  511. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +35 -36
  512. package/dist/pipeline/src/deploy/kubernetes/deployJob.d.ts +1 -1
  513. package/dist/pipeline/src/deploy/kubernetes/deployJob.js +61 -46
  514. package/dist/pipeline/src/deploy/kubernetes/index.d.ts +1 -1
  515. package/dist/pipeline/src/deploy/kubernetes/index.js +45 -54
  516. package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
  517. package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +34 -35
  518. package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +84 -84
  519. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +63 -70
  520. package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -28
  521. package/dist/pipeline/src/deploy/kubernetes/mongodb.js +93 -88
  522. package/dist/pipeline/src/deploy/types/base.d.ts +27 -27
  523. package/dist/pipeline/src/deploy/types/base.js +2 -4
  524. package/dist/pipeline/src/deploy/types/custom.d.ts +25 -25
  525. package/dist/pipeline/src/deploy/types/custom.js +2 -4
  526. package/dist/pipeline/src/deploy/types/dockerTag.d.ts +10 -10
  527. package/dist/pipeline/src/deploy/types/dockerTag.js +2 -4
  528. package/dist/pipeline/src/deploy/types/executeBase.d.ts +15 -15
  529. package/dist/pipeline/src/deploy/types/executeBase.js +2 -4
  530. package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +439 -439
  531. package/dist/pipeline/src/deploy/types/googleCloudRun.js +14 -16
  532. package/dist/pipeline/src/deploy/types/index.d.ts +6 -6
  533. package/dist/pipeline/src/deploy/types/index.js +21 -27
  534. package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -255
  535. package/dist/pipeline/src/deploy/types/kubernetes.js +2 -4
  536. package/dist/pipeline/src/deploy/utils.d.ts +1 -1
  537. package/dist/pipeline/src/deploy/utils.js +21 -23
  538. package/dist/pipeline/src/globalScriptFunctions/index.d.ts +6 -6
  539. package/dist/pipeline/src/globalScriptFunctions/index.js +19 -21
  540. package/dist/pipeline/src/index.d.ts +1 -1
  541. package/dist/pipeline/src/index.js +16 -23
  542. package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +19 -19
  543. package/dist/pipeline/src/pipeline/agent/createAgentContext.js +37 -41
  544. package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +2 -2
  545. package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +27 -26
  546. package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +2 -2
  547. package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +43 -35
  548. package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +1 -1
  549. package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +5 -7
  550. package/dist/pipeline/src/pipeline/agent/prompts.d.ts +2 -2
  551. package/dist/pipeline/src/pipeline/agent/prompts.js +14 -32
  552. package/dist/pipeline/src/pipeline/agent/shared.d.ts +4 -6
  553. package/dist/pipeline/src/pipeline/agent/shared.js +34 -36
  554. package/dist/pipeline/src/pipeline/agent/utils.d.ts +1 -1
  555. package/dist/pipeline/src/pipeline/agent/utils.js +9 -11
  556. package/dist/pipeline/src/pipeline/createAllJobs.d.ts +13 -17
  557. package/dist/pipeline/src/pipeline/createAllJobs.js +44 -56
  558. package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
  559. package/dist/pipeline/src/pipeline/createJobsForComponent.js +30 -27
  560. package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
  561. package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +6 -8
  562. package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +1 -1
  563. package/dist/pipeline/src/pipeline/generatePipelineFiles.js +35 -45
  564. package/dist/pipeline/src/pipeline/index.d.ts +1 -1
  565. package/dist/pipeline/src/pipeline/index.js +16 -23
  566. package/dist/pipeline/src/pipeline/packageManager.d.ts +1 -1
  567. package/dist/pipeline/src/pipeline/packageManager.js +59 -47
  568. package/dist/pipeline/src/pipeline/resolveRequirements.d.ts +1 -1
  569. package/dist/pipeline/src/pipeline/resolveRequirements.js +63 -66
  570. package/dist/pipeline/src/release/index.d.ts +11 -11
  571. package/dist/pipeline/src/release/index.js +12 -17
  572. package/dist/pipeline/src/rules/index.d.ts +1 -1
  573. package/dist/pipeline/src/rules/index.js +15 -15
  574. package/dist/pipeline/src/runner/index.d.ts +5 -10
  575. package/dist/pipeline/src/runner/index.js +9 -14
  576. package/dist/pipeline/src/runner/index.js.map +1 -1
  577. package/dist/pipeline/src/store/index.d.ts +5 -5
  578. package/dist/pipeline/src/store/index.js +31 -31
  579. package/dist/pipeline/src/types/agent.d.ts +15 -15
  580. package/dist/pipeline/src/types/agent.js +2 -4
  581. package/dist/pipeline/src/types/config.d.ts +244 -248
  582. package/dist/pipeline/src/types/config.js +28 -24
  583. package/dist/pipeline/src/types/context.d.ts +104 -104
  584. package/dist/pipeline/src/types/context.js +7 -9
  585. package/dist/pipeline/src/types/environmentContext.d.ts +25 -25
  586. package/dist/pipeline/src/types/environmentContext.js +2 -4
  587. package/dist/pipeline/src/types/github-types.d.ts +41 -41
  588. package/dist/pipeline/src/types/github-types.js +2 -4
  589. package/dist/pipeline/src/types/gitlab-ci-yml.d.ts +497 -497
  590. package/dist/pipeline/src/types/gitlab-ci-yml.js +2 -4
  591. package/dist/pipeline/src/types/gitlab-types.d.ts +15 -15
  592. package/dist/pipeline/src/types/gitlab-types.js +2 -4
  593. package/dist/pipeline/src/types/hooks.d.ts +26 -26
  594. package/dist/pipeline/src/types/hooks.js +2 -4
  595. package/dist/pipeline/src/types/index.d.ts +1 -1
  596. package/dist/pipeline/src/types/index.js +16 -23
  597. package/dist/pipeline/src/types/jobDefinition.d.ts +3 -3
  598. package/dist/pipeline/src/types/jobDefinition.js +2 -4
  599. package/dist/pipeline/src/types/jobs.d.ts +172 -171
  600. package/dist/pipeline/src/types/jobs.js +28 -15
  601. package/dist/pipeline/src/types/pipeline.d.ts +1 -1
  602. package/dist/pipeline/src/types/pipeline.js +2 -4
  603. package/dist/pipeline/src/types/release.d.ts +11 -11
  604. package/dist/pipeline/src/types/release.js +2 -4
  605. package/dist/pipeline/src/types/utils.d.ts +3 -1
  606. package/dist/pipeline/src/types/utils.js +2 -4
  607. package/dist/pipeline/src/utils/gitlab.d.ts +7 -7
  608. package/dist/pipeline/src/utils/gitlab.js +15 -12
  609. package/dist/pipeline/src/utils/index.d.ts +1 -1
  610. package/dist/pipeline/src/utils/index.js +9 -12
  611. package/dist/pipeline/src/utils/jsonParse.d.ts +1 -1
  612. package/dist/pipeline/src/utils/jsonParse.js +10 -11
  613. package/dist/pipeline/src/utils/measureTime.d.ts +4 -4
  614. package/dist/pipeline/src/utils/measureTime.js +34 -39
  615. package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -1
  616. package/dist/pipeline/src/utils/removeUndefined.js +4 -6
  617. package/dist/pipeline/src/utils/writeFiles.d.ts +16 -16
  618. package/dist/pipeline/src/utils/writeFiles.js +67 -61
  619. package/dist/pipeline/src/variables/VariableValue.d.ts +1 -1
  620. package/dist/pipeline/src/variables/VariableValue.js +2 -4
  621. package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +12 -12
  622. package/dist/pipeline/src/variables/VariableValueContainingReferences.js +51 -45
  623. package/dist/pipeline/src/variables/resolveAllReferences.d.ts +1 -1
  624. package/dist/pipeline/src/variables/resolveAllReferences.js +18 -17
  625. package/dist/pipeline/src/variables/resolveAllReferencesOnce.d.ts +2 -2
  626. package/dist/pipeline/src/variables/resolveAllReferencesOnce.js +17 -14
  627. package/dist/pipeline/src/variables/resolveReferencesOnce.d.ts +3 -3
  628. package/dist/pipeline/src/variables/resolveReferencesOnce.js +16 -17
  629. package/dist/pipeline/src/verify/createVerifyJobs.d.ts +1 -1
  630. package/dist/pipeline/src/verify/createVerifyJobs.js +62 -55
  631. package/dist/pipeline/src/verify/index.d.ts +1 -1
  632. package/dist/pipeline/src/verify/index.js +16 -23
  633. package/dist/pipeline/src/verify/types.d.ts +11 -11
  634. package/dist/pipeline/src/verify/types.js +2 -4
  635. package/dist/skills/catladder-pipelines/SKILL.md +6 -6
  636. package/dist/tsconfig.tsbuildinfo +1 -1
  637. package/package.json +2 -7
  638. package/babel-inline.json +0 -11
  639. package/dist/bundles/runner-images/semantic-release-central.Dockerfile +0 -36
  640. package/dist/pipeline/src/constants.d.ts +0 -2
  641. package/dist/pipeline/src/constants.js +0 -8
  642. package/dist/pipeline/src/constants.js.map +0 -1
  643. package/dist/runner-images/semantic-release-central.Dockerfile +0 -36
@@ -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.getCreateScheduleScript = exports.getDeleteSchedulesScript = void 0;
7
4
  const bash_1 = require("../../../../bash");
8
5
  const utils_1 = require("../../../../utils");
@@ -11,138 +8,150 @@ const createArgsString_1 = require("../../utils/createArgsString");
11
8
  const jobName_1 = require("../../utils/jobName");
12
9
  const cloudRunJobs_1 = require("../cloudRunJobs");
13
10
  const common_1 = require("../common");
14
- const getDeleteSchedulesScript = context => {
15
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
16
- const schedules = getSchedules(context);
17
- const argsString = (0, createArgsString_1.createArgsString)({
18
- project: deployConfig.projectId,
19
- location: deployConfig.region
20
- });
21
- return schedules.map(({
22
- fullName
23
- }) => {
24
- return [`${(0, common_1.gcloudSchedulerCmd)()} jobs delete ${fullName} ${argsString}`];
25
- }).flat();
11
+ const getDeleteSchedulesScript = (context) => {
12
+ const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
13
+ const schedules = getSchedules(context);
14
+ const argsString = (0, createArgsString_1.createArgsString)({
15
+ project: deployConfig.projectId,
16
+ location: deployConfig.region,
17
+ });
18
+ return schedules
19
+ .map(({ fullName }) => {
20
+ return [`${(0, common_1.gcloudSchedulerCmd)()} jobs delete ${fullName} ${argsString}`];
21
+ })
22
+ .flat();
26
23
  };
27
24
  exports.getDeleteSchedulesScript = getDeleteSchedulesScript;
28
- const getCreateScheduleScript = context => {
29
- const schedules = getSchedules(context);
30
- const {
31
- region: location,
32
- projectId: project
33
- } = (0, common_1.getCloudRunDeployConfig)(context);
34
- return schedules.map(({
35
- fullName,
36
- config
37
- }, jobIndex) => {
38
- var _a;
39
- // `headers` is pulled out of the shared args because the flag name differs
40
- // between create (`--headers`) and update (`--update-headers`).
41
- const {
42
- uri,
43
- headers,
44
- ...args
45
- } = getSchedulerArgs(config, context);
46
- const argsString = (0, createArgsString_1.createArgsString)({
47
- project,
48
- location,
49
- uri: `"$current_job_uri"`,
50
- ...args,
51
- schedule: `"${config.schedule}"`,
52
- "max-retry-attempts": (_a = config.maxRetryAttempts) !== null && _a !== void 0 ? _a : 0
25
+ const getCreateScheduleScript = (context) => {
26
+ const schedules = getSchedules(context);
27
+ const { region: location, projectId: project } = (0, common_1.getCloudRunDeployConfig)(context);
28
+ return schedules.map(({ fullName, config }, jobIndex) => {
29
+ var _a;
30
+ // `headers` is pulled out of the shared args because the flag name differs
31
+ // between create (`--headers`) and update (`--update-headers`).
32
+ const { uri, headers, ...args } = getSchedulerArgs(config, context);
33
+ const argsString = (0, createArgsString_1.createArgsString)({
34
+ project,
35
+ location,
36
+ uri: `"$current_job_uri"`,
37
+ ...args,
38
+ schedule: `"${config.schedule}"`,
39
+ "max-retry-attempts": (_a = config.maxRetryAttempts) !== null && _a !== void 0 ? _a : 0,
40
+ });
41
+ const headersValue = headers ? `"${(0, bash_1.bashEscape)(headers)}"` : undefined;
42
+ const createHeadersArg = headersValue ? ` --headers=${headersValue}` : "";
43
+ const updateHeadersArg = headersValue
44
+ ? ` --update-headers=${headersValue}`
45
+ : "";
46
+ return [
47
+ jobIndex === 0
48
+ ? `exist_scheduler_names="$(\n ${(0, common_1.gcloudSchedulerCmd)()} jobs list --filter='httpTarget.uri ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --location='${location}' --project='${project}'\n)"`
49
+ : null,
50
+ `current_job_uri="${uri}"`,
51
+ `current_scheduler_name="${fullName}"`,
52
+ `if echo "$exist_scheduler_names" | grep -Fx "$current_scheduler_name" >/dev/null; then`,
53
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs update http "$current_scheduler_name" ${argsString}${updateHeadersArg}`,
54
+ `else`,
55
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs create http "$current_scheduler_name" ${argsString}${createHeadersArg}`,
56
+ `fi`,
57
+ ]
58
+ .filter(utils_1.notNil)
59
+ .join("\n");
53
60
  });
54
- const headersValue = headers ? `"${(0, bash_1.bashEscape)(headers)}"` : undefined;
55
- const createHeadersArg = headersValue ? ` --headers=${headersValue}` : "";
56
- const updateHeadersArg = headersValue ? ` --update-headers=${headersValue}` : "";
57
- return [jobIndex === 0 ? `exist_scheduler_names="$(\n ${(0, common_1.gcloudSchedulerCmd)()} jobs list --filter='httpTarget.uri ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --location='${location}' --project='${project}'\n)"` : null, `current_job_uri="${uri}"`, `current_scheduler_name="${fullName}"`, `if echo "$exist_scheduler_names" | grep -Fx "$current_scheduler_name" >/dev/null; then`, ` ${(0, common_1.gcloudSchedulerCmd)()} jobs update http "$current_scheduler_name" ${argsString}${updateHeadersArg}`, `else`, ` ${(0, common_1.gcloudSchedulerCmd)()} jobs create http "$current_scheduler_name" ${argsString}${createHeadersArg}`, `fi`].filter(utils_1.notNil).join("\n");
58
- });
59
61
  };
60
62
  exports.getCreateScheduleScript = getCreateScheduleScript;
61
63
  const getSchedulerArgs = (scheduler, context) => {
62
- var _a, _b;
63
- if (scheduler.type === "job") {
64
- const {
65
- projectId,
66
- region
67
- } = (0, common_1.getCloudRunDeployConfig)(context);
68
- const body = scheduler.args !== undefined ? {
69
- overrides: {
70
- containerOverrides: [((_a = scheduler.args) === null || _a === void 0 ? void 0 : _a.length) > 0 ? {
71
- args: scheduler.args
72
- } : {
73
- args: [],
74
- clearArgs: true // not sure why this is neeeded, but it is
75
- }]
76
- }
77
- } : null;
78
- return {
79
- uri: (0, cloudRunExecutionUrl_1.getCloudRunJobExecuteUrl)(scheduler.job, {
80
- appFullName: context.environment.fullName,
81
- projectId,
82
- region
83
- }),
84
- "message-body": body ? '"' + (0, bash_1.bashEscape)(JSON.stringify(body)) + '"' : undefined,
85
- "http-method": "POST",
86
- "oauth-service-account-email": `"${(0, common_1.getComputeServiceAccountEmail)(context)}"`
87
- };
88
- }
89
- if (scheduler.type === "http") {
90
- // default the Content-Type to application/json when a body is sent and the
91
- // user didn't set one explicitly. Otherwise Cloud Scheduler falls back to
92
- // application/octet-stream, which is rarely what's intended.
93
- const hasContentType = Object.keys((_b = scheduler.headers) !== null && _b !== void 0 ? _b : {}).some(k => k.toLowerCase() === "content-type");
94
- const headers = scheduler.body && !hasContentType ? {
95
- "Content-Type": "application/json",
96
- ...scheduler.headers
97
- } : scheduler.headers;
98
- return {
99
- uri: scheduler.url,
100
- "message-body": scheduler.body ? '"' + (0, bash_1.bashEscape)(scheduler.body) + '"' : undefined,
101
- "http-method": scheduler.method,
102
- headers: headers ? Object.entries(headers).map(([k, v]) => `${k}=${v}`).join(",") : undefined,
103
- "oidc-service-account-email": `"${(0, common_1.getComputeServiceAccountEmail)(context)}"`
104
- };
105
- }
106
- throw new Error(`Unknown scheduler type: ${scheduler.type}`);
64
+ var _a, _b;
65
+ if (scheduler.type === "job") {
66
+ const { projectId, region } = (0, common_1.getCloudRunDeployConfig)(context);
67
+ const body = scheduler.args !== undefined
68
+ ? {
69
+ overrides: {
70
+ containerOverrides: [
71
+ ((_a = scheduler.args) === null || _a === void 0 ? void 0 : _a.length) > 0
72
+ ? {
73
+ args: scheduler.args,
74
+ }
75
+ : {
76
+ args: [],
77
+ clearArgs: true, // not sure why this is neeeded, but it is
78
+ },
79
+ ],
80
+ },
81
+ }
82
+ : null;
83
+ return {
84
+ uri: (0, cloudRunExecutionUrl_1.getCloudRunJobExecuteUrl)(scheduler.job, {
85
+ appFullName: context.environment.fullName,
86
+ projectId,
87
+ region,
88
+ }),
89
+ "message-body": body
90
+ ? '"' + (0, bash_1.bashEscape)(JSON.stringify(body)) + '"'
91
+ : undefined,
92
+ "http-method": "POST",
93
+ "oauth-service-account-email": `"${(0, common_1.getComputeServiceAccountEmail)(context)}"`,
94
+ };
95
+ }
96
+ if (scheduler.type === "http") {
97
+ // default the Content-Type to application/json when a body is sent and the
98
+ // user didn't set one explicitly. Otherwise Cloud Scheduler falls back to
99
+ // application/octet-stream, which is rarely what's intended.
100
+ const hasContentType = Object.keys((_b = scheduler.headers) !== null && _b !== void 0 ? _b : {}).some((k) => k.toLowerCase() === "content-type");
101
+ const headers = scheduler.body && !hasContentType
102
+ ? { "Content-Type": "application/json", ...scheduler.headers }
103
+ : scheduler.headers;
104
+ return {
105
+ uri: scheduler.url,
106
+ "message-body": scheduler.body
107
+ ? '"' + (0, bash_1.bashEscape)(scheduler.body) + '"'
108
+ : undefined,
109
+ "http-method": scheduler.method,
110
+ headers: headers
111
+ ? Object.entries(headers)
112
+ .map(([k, v]) => `${k}=${v}`)
113
+ .join(",")
114
+ : undefined,
115
+ "oidc-service-account-email": `"${(0, common_1.getComputeServiceAccountEmail)(context)}"`,
116
+ };
117
+ }
118
+ throw new Error(`Unknown scheduler type: ${scheduler.type}`);
107
119
  };
108
- const getSchedules = context => {
109
- const legacyScheduleJobs = getLegacyJobSchedules(context);
110
- const schedules = getScheduledExecutes(context);
111
- return Object.entries({
112
- ...legacyScheduleJobs,
113
- ...schedules
114
- }).map(([name, config]) => ({
115
- name,
116
- fullName: (0, jobName_1.getFullSchedulerName)(context, name),
117
- config
118
- }));
120
+ const getSchedules = (context) => {
121
+ const legacyScheduleJobs = getLegacyJobSchedules(context);
122
+ const schedules = getScheduledExecutes(context);
123
+ return Object.entries({ ...legacyScheduleJobs, ...schedules }).map(([name, config]) => ({
124
+ name,
125
+ fullName: (0, jobName_1.getFullSchedulerName)(context, name),
126
+ config,
127
+ }));
119
128
  };
120
- const getLegacyJobSchedules = context => {
121
- const jobsWithNames = (0, cloudRunJobs_1.getCloudRunJobsWithNames)(context);
122
- return Object.fromEntries(jobsWithNames.filter(entry => entry.job.when === "schedule").map(({
123
- job: {
124
- maxRetryAttempts,
125
- schedule
126
- },
127
- jobName
128
- }) => {
129
- const schedulerName = jobName.concat("-scheduler");
130
- return [schedulerName, {
131
- type: "job",
132
- job: jobName,
133
- maxRetryAttempts,
134
- schedule,
135
- when: "schedule"
136
- }];
137
- }));
129
+ const getLegacyJobSchedules = (context) => {
130
+ const jobsWithNames = (0, cloudRunJobs_1.getCloudRunJobsWithNames)(context);
131
+ return Object.fromEntries(jobsWithNames
132
+ .filter((entry) => entry.job.when === "schedule")
133
+ .map(({ job: { maxRetryAttempts, schedule }, jobName }) => {
134
+ const schedulerName = jobName.concat("-scheduler");
135
+ return [
136
+ schedulerName,
137
+ {
138
+ type: "job",
139
+ job: jobName,
140
+ maxRetryAttempts,
141
+ schedule,
142
+ when: "schedule",
143
+ },
144
+ ];
145
+ }));
138
146
  };
139
- const getScheduledExecutes = context => {
140
- var _a;
141
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
142
- return Object.fromEntries(Object.entries((_a = deployConfig.execute) !== null && _a !== void 0 ? _a : {}).flatMap(([key, value]) => {
143
- if (!value || value.when !== "schedule") {
144
- return [];
145
- }
146
- return [[key, value]];
147
- }));
148
- };
147
+ const getScheduledExecutes = (context) => {
148
+ var _a;
149
+ const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
150
+ return Object.fromEntries(Object.entries((_a = deployConfig.execute) !== null && _a !== void 0 ? _a : {}).flatMap(([key, value]) => {
151
+ if (!value || value.when !== "schedule") {
152
+ return [];
153
+ }
154
+ return [[key, value]];
155
+ }));
156
+ };
157
+ //# sourceMappingURL=schedules.js.map
@@ -1,2 +1,2 @@
1
1
  import type { ComponentContext } from "../../../types/context";
2
- export declare function getCloudRunDeployScripts(context: ComponentContext): string[];
2
+ export declare function getCloudRunDeployScripts(context: ComponentContext): string[];
@@ -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.getCloudRunDeployScripts = void 0;
7
4
  const lodash_es_1 = require("lodash-es");
8
5
  const gitlab_1 = require("../../../utils/gitlab");
@@ -19,10 +16,32 @@ const common_1 = require("./common");
19
16
  const constants_1 = require("./constants");
20
17
  const schedules_1 = require("./execute/schedules");
21
18
  function getCloudRunDeployScripts(context) {
22
- var _a, _b;
23
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
24
- const allEnvVars = (0, lodash_es_1.omit)(context.environment.envVars, __1.GCLOUD_DEPLOY_CREDENTIALS_KEY);
25
- return [...(0, gitlab_1.collapseableSection)("prepare", "Prepare...")([...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)]), ...(0, gitlab_1.collapseableSection)("writeenvvars", "Write env vars to file")((0, bashYaml_1.writeBashYamlToFileScript)(allEnvVars, constants_1.ENV_VARS_FILENAME)), ...(0, gitlab_1.collapseableSection)("deploy", "Deploy to cloud run")([...(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
26
- : []), ...(0, schedules_1.getCreateScheduleScript)(context), ...(0, cloudRunJobs_1.getJobCreateScripts)(context), ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "preDeploy"), ...(deployConfig.service !== false ? [(0, cloudRunServices_1.getServiceDeployScript)(context, deployConfig.service)] : []), ...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {}).filter(([_, service]) => service !== false && service !== null).map(([name, service]) => (0, cloudRunServices_1.getServiceDeployScript)(context, service, "-" + name)), ...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {}).filter(([_, workerPool]) => workerPool !== false && workerPool !== null).map(([name, workerPool]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeployScript)(context, workerPool, name)), ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postDeploy")]), ...(0, gitlab_1.collapseableSection)("cleanup", "Cleanup")((0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "postDeploy"))];
19
+ var _a, _b;
20
+ const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
21
+ const allEnvVars = (0, lodash_es_1.omit)(context.environment.envVars, __1.GCLOUD_DEPLOY_CREDENTIALS_KEY);
22
+ return [
23
+ ...(0, gitlab_1.collapseableSection)("prepare", "Prepare...")([...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)]),
24
+ ...(0, gitlab_1.collapseableSection)("writeenvvars", "Write env vars to file")((0, bashYaml_1.writeBashYamlToFileScript)(allEnvVars, constants_1.ENV_VARS_FILENAME)),
25
+ ...(0, gitlab_1.collapseableSection)("deploy", "Deploy to cloud run")([
26
+ ...(deployConfig.cloudSql
27
+ ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
28
+ : []),
29
+ ...(0, schedules_1.getCreateScheduleScript)(context),
30
+ ...(0, cloudRunJobs_1.getJobCreateScripts)(context),
31
+ ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "preDeploy"),
32
+ ...(deployConfig.service !== false
33
+ ? [(0, cloudRunServices_1.getServiceDeployScript)(context, deployConfig.service)]
34
+ : []),
35
+ ...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
36
+ .filter(([_, service]) => service !== false && service !== null)
37
+ .map(([name, service]) => (0, cloudRunServices_1.getServiceDeployScript)(context, service, "-" + name)),
38
+ ...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
39
+ .filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
40
+ .map(([name, workerPool]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeployScript)(context, workerPool, name)),
41
+ ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postDeploy"),
42
+ ]),
43
+ ...(0, gitlab_1.collapseableSection)("cleanup", "Cleanup")((0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "postDeploy")),
44
+ ];
27
45
  }
28
- exports.getCloudRunDeployScripts = getCloudRunDeployScripts;
46
+ exports.getCloudRunDeployScripts = getCloudRunDeployScripts;
47
+ //# sourceMappingURL=getCloudRunDeployScripts.js.map
@@ -1,2 +1,2 @@
1
1
  import type { ComponentContext } from "../../../types/context";
2
- export declare function getCloudRunStopScripts(context: ComponentContext): string[];
2
+ export declare function getCloudRunStopScripts(context: ComponentContext): string[];
@@ -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.getCloudRunStopScripts = void 0;
7
4
  const cleanup_1 = require("../cleanup");
8
5
  const database_1 = require("../utils/database");
@@ -14,9 +11,26 @@ const cloudRunServices_1 = require("./cloudRunServices");
14
11
  const cloudRunWorkerPools_1 = require("./cloudRunWorkerPools");
15
12
  const common_1 = require("./common");
16
13
  function getCloudRunStopScripts(context) {
17
- var _a, _b;
18
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
19
- return [...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context), ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "preStop"), ...(deployConfig.service !== false ? (0, cloudRunServices_1.getServiceDeleteScript)(context) : []), ...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {}).filter(([_, service]) => service !== false && service !== null).flatMap(([name]) => (0, cloudRunServices_1.getServiceDeleteScript)(context, name)), ...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {}).filter(([_, workerPool]) => workerPool !== false && workerPool !== null).flatMap(([name]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeleteScript)(context, name)), ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postStop"), ...(0, schedules_1.getDeleteSchedulesScript)(context), ...(0, cloudRunJobs_1.getDeleteJobsScripts)(context), ...(deployConfig.cloudSql && deployConfig.cloudSql.deleteDatabaseOnStop ? (0, database_1.getDatabaseDeleteScript)(context, deployConfig) : []), ...(0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "onStop") // we cleanup inactive images both on deploy and stop
20
- ];
14
+ var _a, _b;
15
+ const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
16
+ return [
17
+ ...(0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context),
18
+ ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "preStop"),
19
+ ...(deployConfig.service !== false ? (0, cloudRunServices_1.getServiceDeleteScript)(context) : []),
20
+ ...Object.entries((_a = deployConfig.additionalServices) !== null && _a !== void 0 ? _a : {})
21
+ .filter(([_, service]) => service !== false && service !== null)
22
+ .flatMap(([name]) => (0, cloudRunServices_1.getServiceDeleteScript)(context, name)),
23
+ ...Object.entries((_b = deployConfig.workerPools) !== null && _b !== void 0 ? _b : {})
24
+ .filter(([_, workerPool]) => workerPool !== false && workerPool !== null)
25
+ .flatMap(([name]) => (0, cloudRunWorkerPools_1.getWorkerPoolDeleteScript)(context, name)),
26
+ ...(0, onDeploy_1.getOnDeployExecuteScript)(context, "postStop"),
27
+ ...(0, schedules_1.getDeleteSchedulesScript)(context),
28
+ ...(0, cloudRunJobs_1.getDeleteJobsScripts)(context),
29
+ ...(deployConfig.cloudSql && deployConfig.cloudSql.deleteDatabaseOnStop
30
+ ? (0, database_1.getDatabaseDeleteScript)(context, deployConfig)
31
+ : []),
32
+ ...(0, cleanup_1.getRemoveOldRevisionsAndImagesCommand)(context, "onStop"), // we cleanup inactive images both on deploy and stop
33
+ ];
21
34
  }
22
- exports.getCloudRunStopScripts = getCloudRunStopScripts;
35
+ exports.getCloudRunStopScripts = getCloudRunStopScripts;
36
+ //# sourceMappingURL=getCloudRunStopScripts.js.map
@@ -1,5 +1,5 @@
1
1
  import { type DeployConfigCloudRunService } from "../../types";
2
2
  export declare function healthCheckCliArgs(healthCheck: DeployConfigCloudRunService["healthCheck"]): {
3
- "startup-probe": string;
4
- "liveness-probe": string;
5
- };
3
+ "startup-probe": string;
4
+ "liveness-probe": string;
5
+ };
@@ -1,48 +1,51 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.healthCheckCliArgs = void 0;
7
4
  const types_1 = require("../../types");
8
5
  const PORT = 8080;
9
6
  function healthCheckCliArgs(healthCheck) {
10
- const shouldNotSetHealthCheck = healthCheck === undefined;
11
- if (shouldNotSetHealthCheck) {
12
- return undefined;
13
- }
14
- const shouldUseDefaultProbe = healthCheck === true;
15
- if (shouldUseDefaultProbe) {
7
+ const shouldNotSetHealthCheck = healthCheck === undefined;
8
+ if (shouldNotSetHealthCheck) {
9
+ return undefined;
10
+ }
11
+ const shouldUseDefaultProbe = healthCheck === true;
12
+ if (shouldUseDefaultProbe) {
13
+ return {
14
+ "startup-probe": toArgValue(probeToKeyValuePairs(types_1.defaultStartupProbe)),
15
+ "liveness-probe": toArgValue(probeToKeyValuePairs(types_1.defaultLivenessProbe)),
16
+ };
17
+ }
16
18
  return {
17
- "startup-probe": toArgValue(probeToKeyValuePairs(types_1.defaultStartupProbe)),
18
- "liveness-probe": toArgValue(probeToKeyValuePairs(types_1.defaultLivenessProbe))
19
+ "startup-probe": toArgValue(probeToKeyValuePairs(healthCheck.startupProbe)),
20
+ "liveness-probe": healthCheck.livenessProbe
21
+ ? toArgValue(probeToKeyValuePairs(healthCheck.livenessProbe))
22
+ : "", // NOTE: empty string ("") removes liveness probe
19
23
  };
20
- }
21
- return {
22
- "startup-probe": toArgValue(probeToKeyValuePairs(healthCheck.startupProbe)),
23
- "liveness-probe": healthCheck.livenessProbe ? toArgValue(probeToKeyValuePairs(healthCheck.livenessProbe)) : "" // NOTE: empty string ("") removes liveness probe
24
- };
25
24
  }
26
25
  exports.healthCheckCliArgs = healthCheckCliArgs;
27
26
  function probeToKeyValuePairs(probe) {
28
- const sharedArgs = Object.entries({
29
- initialDelaySeconds: probe.initialDelaySeconds,
30
- timeoutSeconds: probe.timeoutSeconds,
31
- periodSeconds: probe.periodSeconds,
32
- failureThreshold: probe.failureThreshold
33
- });
34
- switch (probe.type) {
35
- case "tcp":
36
- return [...sharedArgs, ["tcpSocket.port", PORT]];
37
- case "http1":
38
- return [...sharedArgs, ["httpGet.port", PORT], ["httpGet.path", probe.path]
39
- // NOTE: headers are not supported by "gcloud beta" at the moment
40
- ];
41
- default:
42
- probe;
43
- return [];
44
- }
27
+ const sharedArgs = Object.entries({
28
+ initialDelaySeconds: probe.initialDelaySeconds,
29
+ timeoutSeconds: probe.timeoutSeconds,
30
+ periodSeconds: probe.periodSeconds,
31
+ failureThreshold: probe.failureThreshold,
32
+ });
33
+ switch (probe.type) {
34
+ case "tcp":
35
+ return [...sharedArgs, ["tcpSocket.port", PORT]];
36
+ case "http1":
37
+ return [
38
+ ...sharedArgs,
39
+ ["httpGet.port", PORT],
40
+ ["httpGet.path", probe.path],
41
+ // NOTE: headers are not supported by "gcloud beta" at the moment
42
+ ];
43
+ default:
44
+ probe;
45
+ return [];
46
+ }
45
47
  }
46
48
  function toArgValue(keyValues) {
47
- return keyValues.map(([key, value]) => `${key}=${value}`).join(",");
48
- }
49
+ return keyValues.map(([key, value]) => `${key}=${value}`).join(",");
50
+ }
51
+ //# sourceMappingURL=healthCheck.js.map
@@ -1,3 +1,3 @@
1
1
  import type { ComponentContext } from "../../../types/context";
2
2
  import type { CatladderJob } from "../../../types/jobs";
3
- export declare const createGoogleCloudRunDeployJobs: (context: ComponentContext) => CatladderJob[];
3
+ export declare const createGoogleCloudRunDeployJobs: (context: ComponentContext) => CatladderJob[];
@@ -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.createGoogleCloudRunDeployJobs = void 0;
7
4
  const gitlab_1 = require("../../../utils/gitlab");
8
5
  const base_1 = require("../../base");
@@ -10,37 +7,41 @@ const types_1 = require("../../types");
10
7
  const constants_1 = require("./constants");
11
8
  const getCloudRunDeployScripts_1 = require("./getCloudRunDeployScripts");
12
9
  const getCloudRunStopScripts_1 = require("./getCloudRunStopScripts");
13
- const createGoogleCloudRunDeployJobs = context => {
14
- var _a;
15
- const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
16
- if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
17
- // should not happen
18
- throw new Error("deploy config is wrong");
19
- }
20
- const deployScripts = (0, getCloudRunDeployScripts_1.getCloudRunDeployScripts)(context);
21
- const stopScripts = (0, getCloudRunStopScripts_1.getCloudRunStopScripts)(context);
22
- return (0, base_1.createDeployementJobs)(context, {
23
- deploy: {
24
- variables: {
25
- CLOUDSDK_CORE_DISABLE_PROMPTS: "1"
26
- },
27
- ...(deployConfig.debug ? {
28
- artifacts: {
29
- paths: [constants_1.ENV_VARS_FILENAME // debug
30
- ],
31
- when: "always"
32
- }
33
- } : {}),
34
- image: constants_1.CLOUD_SDK_IMAGE,
35
- script: deployScripts
36
- },
37
- stop: {
38
- image: constants_1.CLOUD_SDK_IMAGE,
39
- variables: {
40
- CLOUDSDK_CORE_DISABLE_PROMPTS: "1"
41
- },
42
- script: (0, gitlab_1.allowFailureInScripts)(stopScripts)
10
+ const createGoogleCloudRunDeployJobs = (context) => {
11
+ var _a;
12
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
13
+ if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
14
+ // should not happen
15
+ throw new Error("deploy config is wrong");
43
16
  }
44
- });
17
+ const deployScripts = (0, getCloudRunDeployScripts_1.getCloudRunDeployScripts)(context);
18
+ const stopScripts = (0, getCloudRunStopScripts_1.getCloudRunStopScripts)(context);
19
+ return (0, base_1.createDeployementJobs)(context, {
20
+ deploy: {
21
+ variables: {
22
+ CLOUDSDK_CORE_DISABLE_PROMPTS: "1",
23
+ },
24
+ ...(deployConfig.debug
25
+ ? {
26
+ artifacts: {
27
+ paths: [
28
+ constants_1.ENV_VARS_FILENAME, // debug
29
+ ],
30
+ when: "always",
31
+ },
32
+ }
33
+ : {}),
34
+ image: constants_1.CLOUD_SDK_IMAGE,
35
+ script: deployScripts,
36
+ },
37
+ stop: {
38
+ image: constants_1.CLOUD_SDK_IMAGE,
39
+ variables: {
40
+ CLOUDSDK_CORE_DISABLE_PROMPTS: "1",
41
+ },
42
+ script: (0, gitlab_1.allowFailureInScripts)(stopScripts),
43
+ },
44
+ });
45
45
  };
46
- exports.createGoogleCloudRunDeployJobs = createGoogleCloudRunDeployJobs;
46
+ exports.createGoogleCloudRunDeployJobs = createGoogleCloudRunDeployJobs;
47
+ //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
1
  import type { DeployConfigCloudRunVolumes } from "../../types";
2
2
  import type { keyValuesArg } from "../utils/createArgsString";
3
- export declare const createVolumeConfig: (volumes: DeployConfigCloudRunVolumes | undefined, type: "service" | "job" | "worker-pool") => keyValuesArg[];
3
+ export declare const createVolumeConfig: (volumes: DeployConfigCloudRunVolumes | undefined, type: "service" | "job" | "worker-pool") => keyValuesArg[];
@@ -1,23 +1,17 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.createVolumeConfig = void 0;
7
4
  const createVolumeConfig = (volumes, type) => {
8
- if (!volumes) {
9
- return [];
10
- }
11
- return [...Object.entries(volumes).map(([volumeName, {
12
- type,
13
- bucket,
14
- mountPath,
15
- readonly
16
- }]) => ({
17
- "add-volume": `name=${volumeName},type=${type},bucket=${bucket}${readonly ? ",readonly=true" : ""}`,
18
- "add-volume-mount": `volume=${volumeName},mount-path=${mountPath}`
19
- })), type === "service" ? {
20
- "execution-environment": "gen2"
21
- } : {}];
5
+ if (!volumes) {
6
+ return [];
7
+ }
8
+ return [
9
+ ...Object.entries(volumes).map(([volumeName, { type, bucket, mountPath, readonly }]) => ({
10
+ "add-volume": `name=${volumeName},type=${type},bucket=${bucket}${readonly ? ",readonly=true" : ""}`,
11
+ "add-volume-mount": `volume=${volumeName},mount-path=${mountPath}`,
12
+ })),
13
+ type === "service" ? { "execution-environment": "gen2" } : {},
14
+ ];
22
15
  };
23
- exports.createVolumeConfig = createVolumeConfig;
16
+ exports.createVolumeConfig = createVolumeConfig;
17
+ //# sourceMappingURL=volumes.js.map
@@ -1,3 +1,3 @@
1
1
  import type { DeployConfigCloudRun, DeployTypeDefinition } from "..";
2
2
  export declare const GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
3
- export declare const GCLOUD_RUN_DEPLOY_TYPE: DeployTypeDefinition<DeployConfigCloudRun>;
3
+ export declare const GCLOUD_RUN_DEPLOY_TYPE: DeployTypeDefinition<DeployConfigCloudRun>;