@catladder/cli 0.0.0-next-95928577 → 0.0.0-next-e7541a00

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1033) hide show
  1. package/README.md +23 -5
  2. package/babel-inline.json +11 -0
  3. package/bin/catenv +0 -1
  4. package/bin/catladder +0 -1
  5. package/dist/bundles/catenv/index.js +46486 -34668
  6. package/dist/bundles/cli/index.js +215193 -196746
  7. package/dist/cli/src/adapters/baseContext.d.ts +22 -0
  8. package/dist/cli/src/adapters/baseContext.js +40 -0
  9. package/dist/cli/src/adapters/baseContext.js.map +1 -0
  10. package/dist/cli/src/adapters/programmatic.d.ts +26 -0
  11. package/dist/cli/src/adapters/programmatic.js +67 -0
  12. package/dist/cli/src/adapters/programmatic.js.map +1 -0
  13. package/dist/cli/src/adapters/terminal.d.ts +28 -0
  14. package/dist/cli/src/adapters/terminal.js +205 -0
  15. package/dist/cli/src/adapters/terminal.js.map +1 -0
  16. package/dist/cli/src/apps/catenv/catenv.d.ts +6 -2
  17. package/dist/cli/src/apps/catenv/catenv.js +17 -15
  18. package/dist/cli/src/apps/catenv/catenv.js.map +1 -1
  19. package/dist/cli/src/apps/catenv/printVariables.d.ts +2 -2
  20. package/dist/cli/src/apps/catenv/printVariables.js +34 -38
  21. package/dist/cli/src/apps/catenv/printVariables.js.map +1 -1
  22. package/dist/cli/src/apps/catenv/types.d.ts +3 -3
  23. package/dist/cli/src/apps/catenv/types.js +4 -2
  24. package/dist/cli/src/apps/catenv/utils.d.ts +12 -5
  25. package/dist/cli/src/apps/catenv/utils.js +26 -20
  26. package/dist/cli/src/apps/catenv/utils.js.map +1 -1
  27. package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -0
  28. package/dist/cli/src/apps/catenv/verboseBanner.js +26 -0
  29. package/dist/cli/src/apps/catenv/verboseBanner.js.map +1 -0
  30. package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +2 -2
  31. package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +26 -24
  32. package/dist/cli/src/apps/catenv/writeDotEnvFiles.js.map +1 -1
  33. package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +2 -2
  34. package/dist/cli/src/apps/catenv/writeEnvDTs.js +32 -34
  35. package/dist/cli/src/apps/catenv/writeEnvDTs.js.map +1 -1
  36. package/dist/cli/src/apps/cli/commands/mongodb/utils/index.d.ts +6 -6
  37. package/dist/cli/src/apps/cli/commands/mongodb/utils/index.js +56 -52
  38. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +2 -5
  39. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +98 -128
  40. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js.map +1 -1
  41. package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +2 -2
  42. package/dist/cli/src/apps/cli/commands/project/setup/index.js +26 -36
  43. package/dist/cli/src/apps/cli/commands/project/setup/index.js.map +1 -1
  44. package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +2 -0
  45. package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +19 -0
  46. package/dist/cli/src/apps/cli/commands/project/setup/logSection.js.map +1 -0
  47. package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +2 -2
  48. package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js +41 -38
  49. package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js.map +1 -1
  50. package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.d.ts +2 -0
  51. package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js +164 -0
  52. package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js.map +1 -0
  53. package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +2 -2
  54. package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +42 -47
  55. package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
  56. package/dist/cli/src/apps/cli/commands/project/setup/setupContext.d.ts +2 -2
  57. package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +10 -12
  58. package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js.map +1 -1
  59. package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +2 -2
  60. package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +70 -69
  61. package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
  62. package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.d.ts +2 -2
  63. package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js +15 -7
  64. package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js.map +1 -1
  65. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +2 -1
  66. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +25 -12
  67. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js.map +1 -1
  68. package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.d.ts +9 -1
  69. package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +35 -28
  70. package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js.map +1 -1
  71. package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.d.ts +1 -1
  72. package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +35 -30
  73. package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +2 -1
  74. package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +17 -15
  75. package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js.map +1 -1
  76. package/dist/cli/src/catenv.d.ts +1 -1
  77. package/dist/cli/src/catenv.js +34 -12
  78. package/dist/cli/src/catenv.js.map +1 -1
  79. package/dist/cli/src/cli.d.ts +1 -1
  80. package/dist/cli/src/cli.js +223 -6
  81. package/dist/cli/src/cli.js.map +1 -1
  82. package/dist/cli/src/commands/availability.d.ts +5 -0
  83. package/dist/cli/src/commands/availability.js +26 -0
  84. package/dist/cli/src/commands/availability.js.map +1 -0
  85. package/dist/cli/src/commands/cloudSQL/commandRestoreDb.d.ts +46 -0
  86. package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +111 -0
  87. package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js.map +1 -0
  88. package/dist/cli/src/commands/fun/commandDadjoke.d.ts +1 -0
  89. package/dist/cli/src/commands/fun/commandDadjoke.js +30 -0
  90. package/dist/cli/src/commands/fun/commandDadjoke.js.map +1 -0
  91. package/dist/cli/src/commands/fun/commandStarwars.d.ts +1 -0
  92. package/dist/cli/src/commands/fun/commandStarwars.js +19 -0
  93. package/dist/cli/src/commands/fun/commandStarwars.js.map +1 -0
  94. package/dist/cli/src/commands/general/commandKubeCurrentContext.d.ts +1 -0
  95. package/dist/cli/src/commands/general/commandKubeCurrentContext.js +17 -0
  96. package/dist/cli/src/commands/general/commandKubeCurrentContext.js.map +1 -0
  97. package/dist/cli/src/commands/general/commandKubeGetShell.d.ts +12 -0
  98. package/dist/cli/src/commands/general/commandKubeGetShell.js +36 -0
  99. package/dist/cli/src/commands/general/commandKubeGetShell.js.map +1 -0
  100. package/dist/cli/src/commands/general/commandKubeListNamespaces.d.ts +1 -0
  101. package/dist/cli/src/commands/general/commandKubeListNamespaces.js +20 -0
  102. package/dist/cli/src/commands/general/commandKubeListNamespaces.js.map +1 -0
  103. package/dist/cli/src/commands/general/commandKubeListPods.d.ts +7 -0
  104. package/dist/cli/src/commands/general/commandKubeListPods.js +26 -0
  105. package/dist/cli/src/commands/general/commandKubeListPods.js.map +1 -0
  106. package/dist/cli/src/commands/general/commandKubeListSecrets.d.ts +7 -0
  107. package/dist/cli/src/commands/general/commandKubeListSecrets.js +26 -0
  108. package/dist/cli/src/commands/general/commandKubeListSecrets.js.map +1 -0
  109. package/dist/cli/src/commands/general/commandKubePortForward.d.ts +20 -0
  110. package/dist/cli/src/commands/general/commandKubePortForward.js +46 -0
  111. package/dist/cli/src/commands/general/commandKubePortForward.js.map +1 -0
  112. package/dist/cli/src/commands/general/commandKubeStopPortforward.d.ts +7 -0
  113. package/dist/cli/src/commands/general/commandKubeStopPortforward.js +24 -0
  114. package/dist/cli/src/commands/general/commandKubeStopPortforward.js.map +1 -0
  115. package/dist/cli/src/commands/index.d.ts +38 -0
  116. package/dist/cli/src/commands/index.js +285 -0
  117. package/dist/cli/src/commands/index.js.map +1 -0
  118. package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.d.ts +16 -0
  119. package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +91 -0
  120. package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js.map +1 -0
  121. package/dist/cli/src/commands/mongodb/commandMongoGetShell.d.ts +16 -0
  122. package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +38 -0
  123. package/dist/cli/src/commands/mongodb/commandMongoGetShell.js.map +1 -0
  124. package/dist/cli/src/commands/mongodb/commandMongoPortForward.d.ts +21 -0
  125. package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +67 -0
  126. package/dist/cli/src/commands/mongodb/commandMongoPortForward.js.map +1 -0
  127. package/dist/cli/src/commands/project/commandCloudSqlProxy.d.ts +13 -0
  128. package/dist/cli/src/commands/project/commandCloudSqlProxy.js +129 -0
  129. package/dist/cli/src/commands/project/commandCloudSqlProxy.js.map +1 -0
  130. package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +9 -0
  131. package/dist/cli/src/commands/project/commandConfigSecrets.js +36 -0
  132. package/dist/cli/src/commands/project/commandConfigSecrets.js.map +1 -0
  133. package/dist/cli/src/commands/project/commandEnvVars.d.ts +8 -0
  134. package/dist/cli/src/commands/project/commandEnvVars.js +32 -0
  135. package/dist/cli/src/commands/project/commandEnvVars.js.map +1 -0
  136. package/dist/cli/src/commands/project/commandGetMyTotalWorktime.d.ts +1 -0
  137. package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +19 -0
  138. package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js.map +1 -0
  139. package/dist/cli/src/commands/project/commandGitlabCi.d.ts +14 -0
  140. package/dist/cli/src/commands/project/commandGitlabCi.js +109 -0
  141. package/dist/cli/src/commands/project/commandGitlabCi.js.map +1 -0
  142. package/dist/cli/src/commands/project/commandOpenEnv.d.ts +8 -0
  143. package/dist/cli/src/commands/project/commandOpenEnv.js +40 -0
  144. package/dist/cli/src/commands/project/commandOpenEnv.js.map +1 -0
  145. package/dist/cli/src/commands/project/commandOpenGit.d.ts +1 -0
  146. package/dist/cli/src/commands/project/commandOpenGit.js +17 -0
  147. package/dist/cli/src/commands/project/commandOpenGit.js.map +1 -0
  148. package/dist/cli/src/commands/project/commandOpenLogs.d.ts +8 -0
  149. package/dist/cli/src/commands/project/commandOpenLogs.js +47 -0
  150. package/dist/cli/src/commands/project/commandOpenLogs.js.map +1 -0
  151. package/dist/cli/src/commands/project/commandPortForward.d.ts +25 -0
  152. package/dist/cli/src/commands/project/commandPortForward.js +97 -0
  153. package/dist/cli/src/commands/project/commandPortForward.js.map +1 -0
  154. package/dist/cli/src/commands/project/commandProjectRestoreDb.d.ts +19 -0
  155. package/dist/cli/src/commands/project/commandProjectRestoreDb.js +161 -0
  156. package/dist/cli/src/commands/project/commandProjectRestoreDb.js.map +1 -0
  157. package/dist/cli/src/commands/project/commandRenewToken.d.ts +1 -0
  158. package/dist/cli/src/commands/project/commandRenewToken.js +17 -0
  159. package/dist/cli/src/commands/project/commandRenewToken.js.map +1 -0
  160. package/dist/cli/src/commands/project/commandSecretsClearBackups.d.ts +7 -0
  161. package/dist/cli/src/commands/project/commandSecretsClearBackups.js +24 -0
  162. package/dist/cli/src/commands/project/commandSecretsClearBackups.js.map +1 -0
  163. package/dist/cli/src/commands/project/commandSecurityEvaluate.d.ts +1 -0
  164. package/dist/cli/src/commands/project/commandSecurityEvaluate.js +26 -0
  165. package/dist/cli/src/commands/project/commandSecurityEvaluate.js.map +1 -0
  166. package/dist/cli/src/commands/project/commandSetup.d.ts +8 -0
  167. package/dist/cli/src/commands/project/commandSetup.js +25 -0
  168. package/dist/cli/src/commands/project/commandSetup.js.map +1 -0
  169. package/dist/cli/src/commands/project/k8s/commandDeletePods.d.ts +13 -0
  170. package/dist/cli/src/commands/project/k8s/commandDeletePods.js +51 -0
  171. package/dist/cli/src/commands/project/k8s/commandDeletePods.js.map +1 -0
  172. package/dist/cli/src/commands/project/k8s/commandDeleteProject.d.ts +8 -0
  173. package/dist/cli/src/commands/project/k8s/commandDeleteProject.js +43 -0
  174. package/dist/cli/src/commands/project/k8s/commandDeleteProject.js.map +1 -0
  175. package/dist/cli/src/commands/project/k8s/commandGetShell.d.ts +13 -0
  176. package/dist/cli/src/commands/project/k8s/commandGetShell.js +43 -0
  177. package/dist/cli/src/commands/project/k8s/commandGetShell.js.map +1 -0
  178. package/dist/cli/src/commands/project/k8s/commandListPods.d.ts +8 -0
  179. package/dist/cli/src/commands/project/k8s/commandListPods.js +33 -0
  180. package/dist/cli/src/commands/project/k8s/commandListPods.js.map +1 -0
  181. package/dist/cli/src/commands/project/k8s/commandNamespace.d.ts +8 -0
  182. package/dist/cli/src/commands/project/k8s/commandNamespace.js +28 -0
  183. package/dist/cli/src/commands/project/k8s/commandNamespace.js.map +1 -0
  184. package/dist/cli/src/commands/project/k8s/commandPauseProject.d.ts +8 -0
  185. package/dist/cli/src/commands/project/k8s/commandPauseProject.js +43 -0
  186. package/dist/cli/src/commands/project/k8s/commandPauseProject.js.map +1 -0
  187. package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.d.ts +25 -0
  188. package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js +97 -0
  189. package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js.map +1 -0
  190. package/dist/cli/src/commands/security/commandSecurityAuditCiJob.d.ts +27 -0
  191. package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +83 -0
  192. package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js.map +1 -0
  193. package/dist/cli/src/commands/security/commandSecurityAuditCreate.d.ts +22 -0
  194. package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +60 -0
  195. package/dist/cli/src/commands/security/commandSecurityAuditCreate.js.map +1 -0
  196. package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.d.ts +7 -0
  197. package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +35 -0
  198. package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js.map +1 -0
  199. package/dist/cli/src/completion.d.ts +24 -0
  200. package/dist/cli/src/completion.js +240 -0
  201. package/dist/cli/src/completion.js.map +1 -0
  202. package/dist/cli/src/config/getProjectConfig.d.ts +12 -8
  203. package/dist/cli/src/config/getProjectConfig.js +89 -90
  204. package/dist/cli/src/config/getProjectConfig.js.map +1 -1
  205. package/dist/cli/src/config/parseChoice.d.ts +3 -3
  206. package/dist/cli/src/config/parseChoice.js +11 -6
  207. package/dist/cli/src/core/defineCommand.d.ts +27 -0
  208. package/dist/cli/src/core/defineCommand.js +35 -0
  209. package/dist/cli/src/core/defineCommand.js.map +1 -0
  210. package/dist/cli/src/core/index.d.ts +5 -0
  211. package/dist/cli/src/core/index.js +52 -0
  212. package/dist/cli/src/core/index.js.map +1 -0
  213. package/dist/cli/src/core/registry.d.ts +5 -0
  214. package/dist/cli/src/core/registry.js +26 -0
  215. package/dist/cli/src/core/registry.js.map +1 -0
  216. package/dist/cli/src/core/runner.d.ts +19 -0
  217. package/dist/cli/src/core/runner.js +29 -0
  218. package/dist/cli/src/core/runner.js.map +1 -0
  219. package/dist/cli/src/core/types.d.ts +107 -0
  220. package/dist/cli/src/core/types.js +16 -0
  221. package/dist/cli/src/core/types.js.map +1 -0
  222. package/dist/cli/src/gcloud/artifactsRegistry.d.ts +3 -3
  223. package/dist/cli/src/gcloud/artifactsRegistry.js +12 -11
  224. package/dist/cli/src/gcloud/cloudRun/getCloudRunDomainSuffix.d.ts +1 -1
  225. package/dist/cli/src/gcloud/cloudRun/getCloudRunDomainSuffix.js +23 -22
  226. package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +2 -2
  227. package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +19 -12
  228. package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js.map +1 -1
  229. package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
  230. package/dist/cli/src/gcloud/cloudSql/copyDb.js +42 -26
  231. package/dist/cli/src/gcloud/cloudSql/copyDb.js.map +1 -1
  232. package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +9 -0
  233. package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +24 -0
  234. package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js.map +1 -0
  235. package/dist/cli/src/gcloud/cloudSql/startProxy.d.ts +4 -4
  236. package/dist/cli/src/gcloud/cloudSql/startProxy.js +55 -39
  237. package/dist/cli/src/gcloud/enableServices.d.ts +2 -2
  238. package/dist/cli/src/gcloud/enableServices.js +8 -6
  239. package/dist/cli/src/gcloud/openDashboard.d.ts +2 -2
  240. package/dist/cli/src/gcloud/openDashboard.js +17 -13
  241. package/dist/cli/src/gcloud/openDashboard.js.map +1 -1
  242. package/dist/cli/src/gcloud/serviceAccounts.d.ts +8 -8
  243. package/dist/cli/src/gcloud/serviceAccounts.js +64 -58
  244. package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
  245. package/dist/cli/src/git/getGetMainBranch.d.ts +1 -0
  246. package/dist/cli/src/git/getGetMainBranch.js +14 -0
  247. package/dist/cli/src/git/getGetMainBranch.js.map +1 -0
  248. package/dist/cli/src/git/gitConfig.d.ts +14 -0
  249. package/dist/cli/src/git/gitConfig.js +22 -0
  250. package/dist/cli/src/git/gitConfig.js.map +1 -0
  251. package/dist/cli/src/git/gitProjectInformation.d.ts +16 -0
  252. package/dist/cli/src/git/gitProjectInformation.js +48 -0
  253. package/dist/cli/src/git/gitProjectInformation.js.map +1 -0
  254. package/dist/cli/src/git/index.d.ts +3 -0
  255. package/dist/cli/src/git/index.js +27 -0
  256. package/dist/cli/src/git/index.js.map +1 -0
  257. package/dist/cli/src/index.d.ts +1 -1
  258. package/dist/cli/src/index.js +4 -2
  259. package/dist/cli/src/k8sApi/index.d.ts +1 -1
  260. package/dist/cli/src/k8sApi/index.js +14 -12
  261. package/dist/cli/src/kubernetes/index.d.ts +1 -1
  262. package/dist/cli/src/kubernetes/index.js +24 -17
  263. package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +3 -3
  264. package/dist/cli/src/kubernetes/openKubernetesDashboards.js +35 -33
  265. package/dist/cli/src/kubernetes/openKubernetesDashboards.js.map +1 -1
  266. package/dist/cli/src/kubernetes/portForward.d.ts +1 -1
  267. package/dist/cli/src/kubernetes/portForward.js +7 -5
  268. package/dist/cli/src/packageInfos.d.ts +1 -1
  269. package/dist/cli/src/packageInfos.js +5 -4
  270. package/dist/cli/src/packageInfos.js.map +1 -1
  271. package/dist/cli/src/security/auditDocument.d.ts +19 -0
  272. package/dist/cli/src/security/auditDocument.js +98 -0
  273. package/dist/cli/src/security/auditDocument.js.map +1 -0
  274. package/dist/cli/src/security/createSecurityAuditMergeRequest.d.ts +14 -0
  275. package/dist/cli/src/security/createSecurityAuditMergeRequest.js +52 -0
  276. package/dist/cli/src/security/createSecurityAuditMergeRequest.js.map +1 -0
  277. package/dist/cli/src/{apps/catci/commands/security → security}/evaluateSecurityAudit.d.ts +5 -3
  278. package/dist/cli/src/security/evaluateSecurityAudit.js +32 -0
  279. package/dist/cli/src/security/evaluateSecurityAudit.js.map +1 -0
  280. package/dist/cli/src/types/types.d.ts +13 -13
  281. package/dist/cli/src/types/types.js +4 -2
  282. package/dist/cli/src/utils/boxWithAscii.d.ts +1 -1
  283. package/dist/cli/src/utils/boxWithAscii.js +12 -10
  284. package/dist/cli/src/utils/cluster.d.ts +1 -1
  285. package/dist/cli/src/utils/cluster.js +8 -6
  286. package/dist/cli/src/utils/editAsFile.d.ts +1 -1
  287. package/dist/cli/src/utils/editAsFile.js +25 -17
  288. package/dist/cli/src/utils/files.d.ts +1 -1
  289. package/dist/cli/src/utils/files.js +16 -16
  290. package/dist/cli/src/utils/files.js.map +1 -1
  291. package/dist/cli/src/utils/getEditor.d.ts +2 -2
  292. package/dist/cli/src/utils/getEditor.js +20 -14
  293. package/dist/cli/src/utils/gitlab.d.ts +18 -18
  294. package/dist/cli/src/utils/gitlab.js +189 -170
  295. package/dist/cli/src/utils/gitlab.js.map +1 -1
  296. package/dist/cli/src/utils/log.d.ts +65 -1
  297. package/dist/cli/src/utils/log.js +67 -11
  298. package/dist/cli/src/utils/log.js.map +1 -1
  299. package/dist/cli/src/utils/portForwards.d.ts +5 -5
  300. package/dist/cli/src/utils/portForwards.js +32 -31
  301. package/dist/cli/src/utils/{preferences/index.d.ts → preferences.d.ts} +2 -1
  302. package/dist/cli/src/utils/preferences.js +65 -0
  303. package/dist/cli/src/utils/preferences.js.map +1 -0
  304. package/dist/cli/src/utils/projects/index.d.ts +1 -1
  305. package/dist/cli/src/utils/projects/index.js +24 -21
  306. package/dist/cli/src/utils/promise.d.ts +1 -1
  307. package/dist/cli/src/utils/promise.js +8 -6
  308. package/dist/cli/src/utils/shell.d.ts +1 -1
  309. package/dist/cli/src/utils/shell.js +20 -19
  310. package/dist/pipeline/src/backends/gitlab/GitlabBackend.d.ts +14 -0
  311. package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +170 -0
  312. package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -0
  313. package/dist/pipeline/src/backends/gitlab/cache.d.ts +9 -0
  314. package/dist/pipeline/src/backends/gitlab/cache.js +38 -0
  315. package/dist/pipeline/src/backends/gitlab/cache.js.map +1 -0
  316. package/dist/pipeline/src/backends/gitlab/ciVariables.d.ts +6 -0
  317. package/dist/pipeline/src/backends/gitlab/ciVariables.js +17 -0
  318. package/dist/pipeline/src/backends/gitlab/ciVariables.js.map +1 -0
  319. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.d.ts +13 -0
  320. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js +244 -0
  321. package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js.map +1 -0
  322. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +9 -0
  323. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js +71 -0
  324. package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -0
  325. package/dist/pipeline/src/{pipeline → backends/gitlab}/getPipelineStages.d.ts +2 -2
  326. package/dist/pipeline/src/backends/gitlab/getPipelineStages.js +19 -0
  327. package/dist/pipeline/src/backends/gitlab/getPipelineStages.js.map +1 -0
  328. package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +36 -0
  329. package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +43 -0
  330. package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js.map +1 -0
  331. package/dist/pipeline/src/backends/gitlab/index.d.ts +2 -0
  332. package/dist/pipeline/src/backends/gitlab/index.js +26 -0
  333. package/dist/pipeline/src/backends/gitlab/index.js.map +1 -0
  334. package/dist/pipeline/src/{pipeline → backends}/gitlab/sortGitLabJobDefProps.d.ts +1 -1
  335. package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.js +20 -0
  336. package/dist/pipeline/src/{pipeline → backends}/gitlab/sortGitLabJobDefProps.js.map +1 -1
  337. package/dist/pipeline/src/backends/index.d.ts +5 -0
  338. package/dist/pipeline/src/backends/index.js +39 -0
  339. package/dist/pipeline/src/backends/index.js.map +1 -0
  340. package/dist/pipeline/src/backends/types.d.ts +30 -0
  341. package/dist/pipeline/src/backends/types.js +5 -0
  342. package/dist/pipeline/src/backends/types.js.map +1 -0
  343. package/dist/pipeline/src/bash/BashExpression.d.ts +18 -18
  344. package/dist/pipeline/src/bash/BashExpression.js +44 -45
  345. package/dist/pipeline/src/bash/bashEscape.d.ts +10 -3
  346. package/dist/pipeline/src/bash/bashEscape.js +68 -72
  347. package/dist/pipeline/src/bash/bashEscape.js.map +1 -1
  348. package/dist/pipeline/src/bash/bashExpressionPerPipelineType.d.ts +3 -5
  349. package/dist/pipeline/src/bash/bashExpressionPerPipelineType.js +7 -6
  350. package/dist/pipeline/src/bash/bashYaml.d.ts +1 -1
  351. package/dist/pipeline/src/bash/bashYaml.js +41 -46
  352. package/dist/pipeline/src/bash/ciVariables.d.ts +16 -0
  353. package/dist/pipeline/src/bash/ciVariables.js +23 -0
  354. package/dist/pipeline/src/bash/ciVariables.js.map +1 -0
  355. package/dist/pipeline/src/bash/getInjectVarsScript.d.ts +1 -1
  356. package/dist/pipeline/src/bash/getInjectVarsScript.js +12 -15
  357. package/dist/pipeline/src/bash/getInjectVarsScript.js.map +1 -1
  358. package/dist/pipeline/src/bash/index.d.ts +1 -1
  359. package/dist/pipeline/src/bash/index.js +23 -16
  360. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +1 -1
  361. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +47 -40
  362. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
  363. package/dist/pipeline/src/build/base/constants.d.ts +4 -4
  364. package/dist/pipeline/src/build/base/constants.js +8 -6
  365. package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +5 -2
  366. package/dist/pipeline/src/build/base/createAppBuildJob.js +52 -46
  367. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  368. package/dist/pipeline/src/build/base/createArtifactsConfig.d.ts +1 -1
  369. package/dist/pipeline/src/build/base/createArtifactsConfig.js +16 -25
  370. package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -3
  371. package/dist/pipeline/src/build/base/createBuildJobDefinition.js +16 -22
  372. package/dist/pipeline/src/build/base/createBuildJobDefinition.js.map +1 -1
  373. package/dist/pipeline/src/build/base/index.d.ts +7 -8
  374. package/dist/pipeline/src/build/base/index.js +17 -39
  375. package/dist/pipeline/src/build/base/index.js.map +1 -1
  376. package/dist/pipeline/src/build/base/writeBuildInfo.d.ts +1 -1
  377. package/dist/pipeline/src/build/base/writeBuildInfo.js +7 -7
  378. package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -1
  379. package/dist/pipeline/src/build/base/writeDotEnv.js +20 -22
  380. package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
  381. package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -4
  382. package/dist/pipeline/src/build/cache/createJobCache.js +47 -55
  383. package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
  384. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
  385. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +16 -21
  386. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -1
  387. package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +1 -1
  388. package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +14 -12
  389. package/dist/pipeline/src/build/custom/buildJob.d.ts +2 -2
  390. package/dist/pipeline/src/build/custom/buildJob.js +16 -16
  391. package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
  392. package/dist/pipeline/src/build/custom/index.d.ts +2 -2
  393. package/dist/pipeline/src/build/custom/index.js +7 -5
  394. package/dist/pipeline/src/build/custom/index.js.map +1 -1
  395. package/dist/pipeline/src/build/custom/testJob.d.ts +5 -5
  396. package/dist/pipeline/src/build/custom/testJob.js +69 -60
  397. package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
  398. package/dist/pipeline/src/build/docker.d.ts +57 -49
  399. package/dist/pipeline/src/build/docker.js +132 -128
  400. package/dist/pipeline/src/build/docker.js.map +1 -1
  401. package/dist/pipeline/src/build/index.d.ts +14 -18
  402. package/dist/pipeline/src/build/index.js +80 -73
  403. package/dist/pipeline/src/build/index.js.map +1 -1
  404. package/dist/pipeline/src/build/node/buildJob.d.ts +6 -4
  405. package/dist/pipeline/src/build/node/buildJob.js +35 -37
  406. package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
  407. package/dist/pipeline/src/build/node/cache.d.ts +3 -3
  408. package/dist/pipeline/src/build/node/cache.js +41 -48
  409. package/dist/pipeline/src/build/node/cache.js.map +1 -1
  410. package/dist/pipeline/src/build/node/constants.d.ts +4 -4
  411. package/dist/pipeline/src/build/node/constants.js +8 -6
  412. package/dist/pipeline/src/build/node/index.d.ts +4 -4
  413. package/dist/pipeline/src/build/node/index.js +13 -9
  414. package/dist/pipeline/src/build/node/index.js.map +1 -1
  415. package/dist/pipeline/src/build/node/meteor.d.ts +2 -2
  416. package/dist/pipeline/src/build/node/meteor.js +53 -45
  417. package/dist/pipeline/src/build/node/meteor.js.map +1 -1
  418. package/dist/pipeline/src/build/node/testJob.d.ts +2 -2
  419. package/dist/pipeline/src/build/node/testJob.js +72 -82
  420. package/dist/pipeline/src/build/node/testJob.js.map +1 -1
  421. package/dist/pipeline/src/build/node/yarn.d.ts +5 -4
  422. package/dist/pipeline/src/build/node/yarn.js +37 -39
  423. package/dist/pipeline/src/build/node/yarn.js.map +1 -1
  424. package/dist/pipeline/src/build/rails/build.d.ts +2 -2
  425. package/dist/pipeline/src/build/rails/build.js +37 -44
  426. package/dist/pipeline/src/build/rails/build.js.map +1 -1
  427. package/dist/pipeline/src/build/rails/index.d.ts +2 -2
  428. package/dist/pipeline/src/build/rails/index.js +8 -6
  429. package/dist/pipeline/src/build/rails/index.js.map +1 -1
  430. package/dist/pipeline/src/build/rails/{test.d.ts → testJob.d.ts} +2 -2
  431. package/dist/pipeline/src/build/rails/testJob.js +78 -0
  432. package/dist/pipeline/src/build/rails/testJob.js.map +1 -0
  433. package/dist/pipeline/src/build/types.d.ts +296 -259
  434. package/dist/pipeline/src/build/types.js +10 -10
  435. package/dist/pipeline/src/build/types.js.map +1 -1
  436. package/dist/pipeline/src/catenv/index.d.ts +7 -0
  437. package/dist/pipeline/src/catenv/index.js +14 -0
  438. package/dist/pipeline/src/catenv/index.js.map +1 -0
  439. package/dist/pipeline/src/config/configruedEnvs.d.ts +1 -1
  440. package/dist/pipeline/src/config/configruedEnvs.js +18 -23
  441. package/dist/pipeline/src/config/index.d.ts +1 -1
  442. package/dist/pipeline/src/config/index.js +23 -16
  443. package/dist/pipeline/src/config/readConfig.d.ts +4 -4
  444. package/dist/pipeline/src/config/readConfig.js +44 -27
  445. package/dist/pipeline/src/config/readConfig.js.map +1 -1
  446. package/dist/pipeline/src/constants.d.ts +1 -1
  447. package/dist/pipeline/src/constants.js +6 -5
  448. package/dist/pipeline/src/context/createAllComponentsContext.d.ts +8 -4
  449. package/dist/pipeline/src/context/createAllComponentsContext.js +22 -16
  450. package/dist/pipeline/src/context/createComponentContext.d.ts +6 -6
  451. package/dist/pipeline/src/context/createComponentContext.js +88 -86
  452. package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
  453. package/dist/pipeline/src/context/createWorkspaceContext.d.ts +15 -8
  454. package/dist/pipeline/src/context/createWorkspaceContext.js +38 -29
  455. package/dist/pipeline/src/context/createWorkspaceContext.js.map +1 -1
  456. package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +2 -2
  457. package/dist/pipeline/src/context/getBuildInfoVariables.js +22 -21
  458. package/dist/pipeline/src/context/getEnvConfig.d.ts +1 -1
  459. package/dist/pipeline/src/context/getEnvConfig.js +30 -14
  460. package/dist/pipeline/src/context/getEnvConfig.js.map +1 -1
  461. package/dist/pipeline/src/context/getEnvType.d.ts +2 -2
  462. package/dist/pipeline/src/context/getEnvType.js +10 -9
  463. package/dist/pipeline/src/context/getEnvironment.d.ts +1 -1
  464. package/dist/pipeline/src/context/getEnvironment.js +20 -16
  465. package/dist/pipeline/src/context/getEnvironmentContext.d.ts +6 -1
  466. package/dist/pipeline/src/context/getEnvironmentContext.js +35 -28
  467. package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +11 -11
  468. package/dist/pipeline/src/context/getEnvironmentVariables.js +102 -101
  469. package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
  470. package/dist/pipeline/src/context/getLabels.d.ts +7 -7
  471. package/dist/pipeline/src/context/getLabels.js +26 -23
  472. package/dist/pipeline/src/context/getLabels.js.map +1 -1
  473. package/dist/pipeline/src/context/getReviewSlug.d.ts +1 -1
  474. package/dist/pipeline/src/context/getReviewSlug.js +12 -10
  475. package/dist/pipeline/src/context/index.d.ts +1 -1
  476. package/dist/pipeline/src/context/index.js +23 -16
  477. package/dist/pipeline/src/context/transformJobOnlyVars.d.ts +3 -3
  478. package/dist/pipeline/src/context/transformJobOnlyVars.js +21 -21
  479. package/dist/pipeline/src/context/utils/envVars.d.ts +3 -3
  480. package/dist/pipeline/src/context/utils/envVars.js +13 -13
  481. package/dist/pipeline/src/context/utils/envVars.js.map +1 -1
  482. package/dist/pipeline/src/defaults/index.d.ts +1 -1
  483. package/dist/pipeline/src/defaults/index.js +6 -5
  484. package/dist/pipeline/src/defaults/index.js.map +1 -1
  485. package/dist/pipeline/src/deploy/base/deploy.d.ts +4 -2
  486. package/dist/pipeline/src/deploy/base/deploy.js +87 -96
  487. package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
  488. package/dist/pipeline/src/deploy/base/index.d.ts +4 -4
  489. package/dist/pipeline/src/deploy/base/index.js +6 -10
  490. package/dist/pipeline/src/deploy/base/index.js.map +1 -1
  491. package/dist/pipeline/src/deploy/base/rollback.d.ts +4 -2
  492. package/dist/pipeline/src/deploy/base/rollback.js +34 -28
  493. package/dist/pipeline/src/deploy/base/rollback.js.map +1 -1
  494. package/dist/pipeline/src/deploy/base/stop.d.ts +4 -2
  495. package/dist/pipeline/src/deploy/base/stop.js +35 -34
  496. package/dist/pipeline/src/deploy/base/stop.js.map +1 -1
  497. package/dist/pipeline/src/deploy/base/variables.d.ts +4 -4
  498. package/dist/pipeline/src/deploy/base/variables.js +8 -6
  499. package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
  500. package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +55 -67
  501. package/dist/pipeline/src/deploy/cloudRun/cleanup.d.ts +1 -1
  502. package/dist/pipeline/src/deploy/cloudRun/cleanup.js +17 -14
  503. package/dist/pipeline/src/deploy/cloudRun/cleanup.js.map +1 -1
  504. package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.d.ts +1 -1
  505. package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +44 -41
  506. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +5 -3
  507. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +63 -143
  508. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
  509. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
  510. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +66 -52
  511. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
  512. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +4 -0
  513. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +52 -0
  514. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js.map +1 -0
  515. package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +7 -7
  516. package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js +33 -38
  517. package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.d.ts +1 -1
  518. package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.js +5 -3
  519. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +3 -0
  520. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +71 -0
  521. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js.map +1 -0
  522. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +3 -0
  523. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +133 -0
  524. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js.map +1 -0
  525. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
  526. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +14 -30
  527. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js.map +1 -1
  528. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
  529. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +12 -20
  530. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js.map +1 -1
  531. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +5 -0
  532. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +48 -0
  533. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js.map +1 -0
  534. package/dist/pipeline/src/deploy/cloudRun/createJobs/index.d.ts +1 -1
  535. package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +36 -37
  536. package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
  537. package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js +19 -13
  538. package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js.map +1 -1
  539. package/dist/pipeline/src/deploy/cloudRun/index.d.ts +1 -1
  540. package/dist/pipeline/src/deploy/cloudRun/index.js +75 -68
  541. package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
  542. package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +10 -0
  543. package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +17 -0
  544. package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js.map +1 -0
  545. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
  546. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +14 -18
  547. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js.map +1 -1
  548. package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +21 -2
  549. package/dist/pipeline/src/deploy/cloudRun/utils/database.js +61 -45
  550. package/dist/pipeline/src/deploy/cloudRun/utils/database.js.map +1 -1
  551. package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +1 -1
  552. package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +6 -6
  553. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +2 -0
  554. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +10 -0
  555. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js.map +1 -0
  556. package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +4 -0
  557. package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +8 -4
  558. package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js.map +1 -1
  559. package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +5 -1
  560. package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +11 -3
  561. package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js.map +1 -1
  562. package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.d.ts +1 -1
  563. package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +6 -4
  564. package/dist/pipeline/src/deploy/cloudSql/utils.d.ts +1 -1
  565. package/dist/pipeline/src/deploy/cloudSql/utils.js +7 -9
  566. package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
  567. package/dist/pipeline/src/deploy/custom/deployJob.js +30 -39
  568. package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
  569. package/dist/pipeline/src/deploy/custom/index.d.ts +1 -1
  570. package/dist/pipeline/src/deploy/custom/index.js +9 -7
  571. package/dist/pipeline/src/deploy/dockerTag/deployJob.d.ts +1 -1
  572. package/dist/pipeline/src/deploy/dockerTag/deployJob.js +18 -22
  573. package/dist/pipeline/src/deploy/dockerTag/index.d.ts +1 -1
  574. package/dist/pipeline/src/deploy/dockerTag/index.js +9 -7
  575. package/dist/pipeline/src/deploy/index.d.ts +6 -8
  576. package/dist/pipeline/src/deploy/index.js +27 -20
  577. package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +5 -3
  578. package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js +25 -19
  579. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +7 -7
  580. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +36 -35
  581. package/dist/pipeline/src/deploy/kubernetes/deployJob.d.ts +1 -1
  582. package/dist/pipeline/src/deploy/kubernetes/deployJob.js +46 -67
  583. package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
  584. package/dist/pipeline/src/deploy/kubernetes/index.d.ts +1 -1
  585. package/dist/pipeline/src/deploy/kubernetes/index.js +54 -45
  586. package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
  587. package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +35 -34
  588. package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +86 -85
  589. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +71 -62
  590. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
  591. package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -24
  592. package/dist/pipeline/src/deploy/kubernetes/mongodb.js +89 -90
  593. package/dist/pipeline/src/deploy/kubernetes/mongodb.js.map +1 -1
  594. package/dist/pipeline/src/deploy/types/base.d.ts +27 -27
  595. package/dist/pipeline/src/deploy/types/base.js +4 -2
  596. package/dist/pipeline/src/deploy/types/custom.d.ts +25 -25
  597. package/dist/pipeline/src/deploy/types/custom.js +4 -2
  598. package/dist/pipeline/src/deploy/types/dockerTag.d.ts +10 -10
  599. package/dist/pipeline/src/deploy/types/dockerTag.js +4 -2
  600. package/dist/pipeline/src/deploy/types/executeBase.d.ts +24 -0
  601. package/dist/pipeline/src/deploy/types/executeBase.js +5 -0
  602. package/dist/pipeline/src/deploy/types/executeBase.js.map +1 -0
  603. package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +467 -208
  604. package/dist/pipeline/src/deploy/types/googleCloudRun.js +20 -2
  605. package/dist/pipeline/src/deploy/types/googleCloudRun.js.map +1 -1
  606. package/dist/pipeline/src/deploy/types/index.d.ts +9 -8
  607. package/dist/pipeline/src/deploy/types/index.js +29 -17
  608. package/dist/pipeline/src/deploy/types/index.js.map +1 -1
  609. package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -254
  610. package/dist/pipeline/src/deploy/types/kubernetes.js +4 -2
  611. package/dist/pipeline/src/deploy/utils.d.ts +1 -1
  612. package/dist/pipeline/src/deploy/utils.js +23 -21
  613. package/dist/pipeline/src/globalScriptFunctions/index.d.ts +6 -6
  614. package/dist/pipeline/src/globalScriptFunctions/index.js +21 -19
  615. package/dist/pipeline/src/index.d.ts +3 -0
  616. package/dist/pipeline/src/index.js +25 -15
  617. package/dist/pipeline/src/index.js.map +1 -1
  618. package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +23 -0
  619. package/dist/pipeline/src/pipeline/agent/createAgentContext.js +49 -0
  620. package/dist/pipeline/src/pipeline/agent/createAgentContext.js.map +1 -0
  621. package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +5 -0
  622. package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +33 -0
  623. package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js.map +1 -0
  624. package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +5 -0
  625. package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +43 -0
  626. package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js.map +1 -0
  627. package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +4 -0
  628. package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +12 -0
  629. package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js.map +1 -0
  630. package/dist/pipeline/src/pipeline/agent/prompts.d.ts +6 -0
  631. package/dist/pipeline/src/pipeline/agent/prompts.js +286 -0
  632. package/dist/pipeline/src/pipeline/agent/prompts.js.map +1 -0
  633. package/dist/pipeline/src/pipeline/agent/shared.d.ts +11 -0
  634. package/dist/pipeline/src/pipeline/agent/shared.js +46 -0
  635. package/dist/pipeline/src/pipeline/agent/shared.js.map +1 -0
  636. package/dist/pipeline/src/pipeline/agent/utils.d.ts +3 -0
  637. package/dist/pipeline/src/pipeline/agent/utils.js +16 -0
  638. package/dist/pipeline/src/pipeline/agent/utils.js.map +1 -0
  639. package/dist/pipeline/src/pipeline/createAllJobs.d.ts +18 -10
  640. package/dist/pipeline/src/pipeline/createAllJobs.js +59 -37
  641. package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
  642. package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +2 -2
  643. package/dist/pipeline/src/pipeline/createJobsForComponent.js +28 -25
  644. package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
  645. package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
  646. package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +8 -6
  647. package/dist/pipeline/src/pipeline/createJobsForWorkspace.js.map +1 -1
  648. package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +8 -40
  649. package/dist/pipeline/src/pipeline/generatePipelineFiles.js +35 -50
  650. package/dist/pipeline/src/pipeline/generatePipelineFiles.js.map +1 -1
  651. package/dist/pipeline/src/pipeline/index.d.ts +1 -2
  652. package/dist/pipeline/src/pipeline/index.js +23 -17
  653. package/dist/pipeline/src/pipeline/index.js.map +1 -1
  654. package/dist/pipeline/src/pipeline/packageManager.d.ts +2 -1
  655. package/dist/pipeline/src/pipeline/packageManager.js +51 -58
  656. package/dist/pipeline/src/pipeline/packageManager.js.map +1 -1
  657. package/dist/pipeline/src/pipeline/resolveRequirements.d.ts +10 -0
  658. package/dist/pipeline/src/pipeline/resolveRequirements.js +98 -0
  659. package/dist/pipeline/src/pipeline/resolveRequirements.js.map +1 -0
  660. package/dist/pipeline/src/rules/index.d.ts +6 -4
  661. package/dist/pipeline/src/rules/index.js +26 -51
  662. package/dist/pipeline/src/rules/index.js.map +1 -1
  663. package/dist/pipeline/src/runner/index.d.ts +2 -2
  664. package/dist/pipeline/src/runner/index.js +6 -4
  665. package/dist/pipeline/src/runner/index.js.map +1 -1
  666. package/dist/pipeline/src/types/agent.d.ts +16 -0
  667. package/dist/pipeline/src/types/agent.js +5 -0
  668. package/dist/pipeline/src/types/agent.js.map +1 -0
  669. package/dist/pipeline/src/types/config.d.ts +161 -142
  670. package/dist/pipeline/src/types/config.js +24 -28
  671. package/dist/pipeline/src/types/config.js.map +1 -1
  672. package/dist/pipeline/src/types/context.d.ts +110 -108
  673. package/dist/pipeline/src/types/context.js +9 -7
  674. package/dist/pipeline/src/types/context.js.map +1 -1
  675. package/dist/pipeline/src/types/environmentContext.d.ts +25 -25
  676. package/dist/pipeline/src/types/environmentContext.js +4 -2
  677. package/dist/pipeline/src/types/gitlab-ci-yml.d.ts +497 -497
  678. package/dist/pipeline/src/types/gitlab-ci-yml.js +4 -2
  679. package/dist/pipeline/src/types/gitlab-types.d.ts +16 -13
  680. package/dist/pipeline/src/types/gitlab-types.js +4 -2
  681. package/dist/pipeline/src/types/hooks.d.ts +35 -0
  682. package/dist/pipeline/src/types/hooks.js +5 -0
  683. package/dist/pipeline/src/types/hooks.js.map +1 -0
  684. package/dist/pipeline/src/types/index.d.ts +2 -0
  685. package/dist/pipeline/src/types/index.js +24 -15
  686. package/dist/pipeline/src/types/index.js.map +1 -1
  687. package/dist/pipeline/src/types/jobDefinition.d.ts +7 -7
  688. package/dist/pipeline/src/types/jobDefinition.js +4 -2
  689. package/dist/pipeline/src/types/jobs.d.ts +200 -93
  690. package/dist/pipeline/src/types/jobs.js +28 -12
  691. package/dist/pipeline/src/types/jobs.js.map +1 -1
  692. package/dist/pipeline/src/types/pipeline.d.ts +1 -2
  693. package/dist/pipeline/src/types/pipeline.js +4 -2
  694. package/dist/pipeline/src/types/release.d.ts +7 -0
  695. package/dist/pipeline/src/types/release.js +5 -0
  696. package/dist/pipeline/src/types/release.js.map +1 -0
  697. package/dist/pipeline/src/types/utils.d.ts +1 -3
  698. package/dist/pipeline/src/types/utils.js +4 -2
  699. package/dist/pipeline/src/utils/gitlab.d.ts +2 -2
  700. package/dist/pipeline/src/utils/gitlab.js +12 -15
  701. package/dist/pipeline/src/utils/index.d.ts +1 -1
  702. package/dist/pipeline/src/utils/index.js +13 -10
  703. package/dist/pipeline/src/utils/index.js.map +1 -1
  704. package/dist/pipeline/src/utils/jsonParse.d.ts +1 -1
  705. package/dist/pipeline/src/utils/jsonParse.js +11 -10
  706. package/dist/pipeline/src/utils/measureTime.d.ts +6 -0
  707. package/dist/pipeline/src/utils/measureTime.js +47 -0
  708. package/dist/pipeline/src/utils/measureTime.js.map +1 -0
  709. package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -1
  710. package/dist/pipeline/src/utils/removeUndefined.js +6 -4
  711. package/dist/pipeline/src/utils/writeFiles.d.ts +16 -6
  712. package/dist/pipeline/src/utils/writeFiles.js +55 -34
  713. package/dist/pipeline/src/utils/writeFiles.js.map +1 -1
  714. package/dist/pipeline/src/variables/VariableValue.d.ts +1 -1
  715. package/dist/pipeline/src/variables/VariableValue.js +4 -2
  716. package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +12 -12
  717. package/dist/pipeline/src/variables/VariableValueContainingReferences.js +45 -51
  718. package/dist/pipeline/src/variables/resolveAllReferences.d.ts +1 -1
  719. package/dist/pipeline/src/variables/resolveAllReferences.js +17 -18
  720. package/dist/pipeline/src/variables/resolveAllReferencesOnce.d.ts +2 -2
  721. package/dist/pipeline/src/variables/resolveAllReferencesOnce.js +14 -17
  722. package/dist/pipeline/src/variables/resolveReferencesOnce.d.ts +3 -3
  723. package/dist/pipeline/src/variables/resolveReferencesOnce.js +17 -16
  724. package/dist/tsconfig.tsbuildinfo +1 -1
  725. package/package.json +26 -21
  726. package/scripts/bundle +2 -4
  727. package/src/adapters/baseContext.ts +68 -0
  728. package/src/adapters/programmatic.ts +88 -0
  729. package/src/adapters/terminal.ts +207 -0
  730. package/src/apps/catenv/catenv.ts +21 -7
  731. package/src/apps/catenv/printVariables.ts +10 -12
  732. package/src/apps/catenv/utils.ts +12 -3
  733. package/src/apps/catenv/verboseBanner.ts +33 -0
  734. package/src/apps/catenv/writeDotEnvFiles.ts +21 -8
  735. package/src/apps/catenv/writeEnvDTs.ts +15 -6
  736. package/src/apps/cli/commands/project/commandConfigSecrets.ts +9 -34
  737. package/src/apps/cli/commands/project/setup/index.ts +18 -21
  738. package/src/apps/cli/commands/project/setup/logSection.ts +22 -0
  739. package/src/apps/cli/commands/project/setup/setupAccessTokens.ts +7 -7
  740. package/src/apps/cli/commands/project/setup/setupAgents.ts +323 -0
  741. package/src/apps/cli/commands/project/setup/setupCloudRun.ts +2 -2
  742. package/src/apps/cli/commands/project/setup/setupContext.ts +16 -24
  743. package/src/apps/cli/commands/project/setup/setupKubernetes.ts +2 -2
  744. package/src/apps/cli/commands/project/setup/setupTopic.ts +2 -2
  745. package/src/apps/cli/commands/project/utils/autocompletions.ts +9 -0
  746. package/src/apps/cli/commands/project/utils/ensureCluster.ts +19 -12
  747. package/src/apps/cli/utils/getGoogleAuthUserNumber.ts +5 -4
  748. package/src/catenv.ts +37 -13
  749. package/src/cli.ts +243 -2
  750. package/src/commands/availability.ts +22 -0
  751. package/src/commands/cloudSQL/commandRestoreDb.ts +105 -0
  752. package/src/commands/fun/commandDadjoke.ts +18 -0
  753. package/src/commands/fun/commandStarwars.ts +14 -0
  754. package/src/commands/general/commandKubeCurrentContext.ts +12 -0
  755. package/src/commands/general/commandKubeGetShell.ts +32 -0
  756. package/src/commands/general/commandKubeListNamespaces.ts +15 -0
  757. package/src/commands/general/commandKubeListPods.ts +21 -0
  758. package/src/commands/general/commandKubeListSecrets.ts +21 -0
  759. package/src/commands/general/commandKubePortForward.ts +35 -0
  760. package/src/commands/general/commandKubeStopPortforward.ts +15 -0
  761. package/src/commands/index.ts +51 -0
  762. package/src/commands/mongodb/commandMongoDestroyMember.ts +135 -0
  763. package/src/commands/mongodb/commandMongoGetShell.ts +38 -0
  764. package/src/commands/mongodb/commandMongoPortForward.ts +58 -0
  765. package/src/commands/project/commandCloudSqlProxy.ts +191 -0
  766. package/src/commands/project/commandConfigSecrets.ts +31 -0
  767. package/src/commands/project/commandEnvVars.ts +24 -0
  768. package/src/commands/project/commandGetMyTotalWorktime.ts +14 -0
  769. package/src/commands/project/commandGitlabCi.ts +122 -0
  770. package/src/commands/project/commandOpenEnv.ts +27 -0
  771. package/src/commands/project/commandOpenGit.ts +12 -0
  772. package/src/commands/project/commandOpenLogs.ts +46 -0
  773. package/src/commands/project/commandPortForward.ts +76 -0
  774. package/src/commands/project/commandProjectRestoreDb.ts +203 -0
  775. package/src/commands/project/commandRenewToken.ts +12 -0
  776. package/src/commands/project/commandSecretsClearBackups.ts +19 -0
  777. package/src/commands/project/commandSecurityEvaluate.ts +22 -0
  778. package/src/commands/project/commandSetup.ts +21 -0
  779. package/src/commands/project/k8s/commandDeletePods.ts +55 -0
  780. package/src/commands/project/k8s/commandDeleteProject.ts +35 -0
  781. package/src/commands/project/k8s/commandGetShell.ts +41 -0
  782. package/src/commands/project/k8s/commandListPods.ts +32 -0
  783. package/src/commands/project/k8s/commandNamespace.ts +23 -0
  784. package/src/commands/project/k8s/commandPauseProject.ts +35 -0
  785. package/src/commands/project/k8s/commandTriggerCronjob.ts +101 -0
  786. package/src/commands/security/commandSecurityAuditCiJob.ts +91 -0
  787. package/src/commands/security/commandSecurityAuditCreate.ts +58 -0
  788. package/src/commands/security/commandSecurityAuditEvaluate.ts +30 -0
  789. package/src/completion.ts +272 -0
  790. package/src/config/getProjectConfig.ts +34 -27
  791. package/src/core/defineCommand.ts +32 -0
  792. package/src/core/index.ts +23 -0
  793. package/src/core/registry.ts +22 -0
  794. package/src/core/runner.ts +31 -0
  795. package/src/core/types.ts +145 -0
  796. package/src/gcloud/cloudRun/openCloudRunDashboards.ts +2 -2
  797. package/src/gcloud/cloudSql/copyDb.ts +19 -13
  798. package/src/gcloud/cloudSql/parseConnectionString.ts +28 -0
  799. package/src/gcloud/openDashboard.ts +3 -3
  800. package/src/gcloud/serviceAccounts.ts +3 -3
  801. package/src/git/getGetMainBranch.ts +5 -0
  802. package/src/git/gitConfig.ts +32 -0
  803. package/src/git/gitProjectInformation.ts +40 -0
  804. package/src/git/index.ts +3 -0
  805. package/src/kubernetes/openKubernetesDashboards.ts +3 -3
  806. package/src/packageInfos.ts +0 -1
  807. package/src/utils/files.ts +2 -3
  808. package/src/utils/gitlab.ts +60 -71
  809. package/src/utils/log.ts +108 -8
  810. package/src/utils/preferences.ts +60 -0
  811. package/bin/catci +0 -3
  812. package/bin/catci-dev +0 -3
  813. package/dist/bundles/catci/index.js +0 -71761
  814. package/dist/cli/src/apps/catci/catci.d.ts +0 -1
  815. package/dist/cli/src/apps/catci/catci.js +0 -30
  816. package/dist/cli/src/apps/catci/catci.js.map +0 -1
  817. package/dist/cli/src/apps/catci/commands/security/auditDocument.d.ts +0 -19
  818. package/dist/cli/src/apps/catci/commands/security/auditDocument.js +0 -109
  819. package/dist/cli/src/apps/catci/commands/security/auditDocument.js.map +0 -1
  820. package/dist/cli/src/apps/catci/commands/security/commands.d.ts +0 -2
  821. package/dist/cli/src/apps/catci/commands/security/commands.js +0 -110
  822. package/dist/cli/src/apps/catci/commands/security/commands.js.map +0 -1
  823. package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.d.ts +0 -9
  824. package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js +0 -52
  825. package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js.map +0 -1
  826. package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.js +0 -28
  827. package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.js.map +0 -1
  828. package/dist/cli/src/apps/cli/cli.d.ts +0 -2
  829. package/dist/cli/src/apps/cli/cli.js +0 -39
  830. package/dist/cli/src/apps/cli/cli.js.map +0 -1
  831. package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.d.ts +0 -3
  832. package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.js +0 -111
  833. package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.js.map +0 -1
  834. package/dist/cli/src/apps/cli/commands/cloudSQL/index.d.ts +0 -3
  835. package/dist/cli/src/apps/cli/commands/cloudSQL/index.js +0 -10
  836. package/dist/cli/src/apps/cli/commands/cloudSQL/index.js.map +0 -1
  837. package/dist/cli/src/apps/cli/commands/general/index.d.ts +0 -4
  838. package/dist/cli/src/apps/cli/commands/general/index.js +0 -78
  839. package/dist/cli/src/apps/cli/commands/general/index.js.map +0 -1
  840. package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.d.ts +0 -3
  841. package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.js +0 -11
  842. package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.js.map +0 -1
  843. package/dist/cli/src/apps/cli/commands/general/portForward.d.ts +0 -3
  844. package/dist/cli/src/apps/cli/commands/general/portForward.js +0 -40
  845. package/dist/cli/src/apps/cli/commands/general/portForward.js.map +0 -1
  846. package/dist/cli/src/apps/cli/commands/mongodb/index.d.ts +0 -3
  847. package/dist/cli/src/apps/cli/commands/mongodb/index.js +0 -14
  848. package/dist/cli/src/apps/cli/commands/mongodb/index.js.map +0 -1
  849. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +0 -3
  850. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.js +0 -94
  851. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.js.map +0 -1
  852. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +0 -3
  853. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.js +0 -36
  854. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.js.map +0 -1
  855. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +0 -3
  856. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.js +0 -57
  857. package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.js.map +0 -1
  858. package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.d.ts +0 -3
  859. package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js +0 -126
  860. package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js.map +0 -1
  861. package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.d.ts +0 -3
  862. package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +0 -88
  863. package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js.map +0 -1
  864. package/dist/cli/src/apps/cli/commands/project/commandDeletePods.d.ts +0 -3
  865. package/dist/cli/src/apps/cli/commands/project/commandDeletePods.js +0 -47
  866. package/dist/cli/src/apps/cli/commands/project/commandDeletePods.js.map +0 -1
  867. package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.d.ts +0 -3
  868. package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.js +0 -28
  869. package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.js.map +0 -1
  870. package/dist/cli/src/apps/cli/commands/project/commandEnvVars.d.ts +0 -3
  871. package/dist/cli/src/apps/cli/commands/project/commandEnvVars.js +0 -13
  872. package/dist/cli/src/apps/cli/commands/project/commandEnvVars.js.map +0 -1
  873. package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +0 -3
  874. package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.js +0 -11
  875. package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +0 -1
  876. package/dist/cli/src/apps/cli/commands/project/commandGetShell.d.ts +0 -3
  877. package/dist/cli/src/apps/cli/commands/project/commandGetShell.js +0 -34
  878. package/dist/cli/src/apps/cli/commands/project/commandGetShell.js.map +0 -1
  879. package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.d.ts +0 -3
  880. package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.js +0 -86
  881. package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.js.map +0 -1
  882. package/dist/cli/src/apps/cli/commands/project/commandListPods.d.ts +0 -3
  883. package/dist/cli/src/apps/cli/commands/project/commandListPods.js +0 -19
  884. package/dist/cli/src/apps/cli/commands/project/commandListPods.js.map +0 -1
  885. package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.d.ts +0 -7
  886. package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.js +0 -46
  887. package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.js.map +0 -1
  888. package/dist/cli/src/apps/cli/commands/project/commandNamespace.d.ts +0 -3
  889. package/dist/cli/src/apps/cli/commands/project/commandNamespace.js +0 -11
  890. package/dist/cli/src/apps/cli/commands/project/commandNamespace.js.map +0 -1
  891. package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.d.ts +0 -3
  892. package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js +0 -22
  893. package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js.map +0 -1
  894. package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.d.ts +0 -3
  895. package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js +0 -22
  896. package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js.map +0 -1
  897. package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.d.ts +0 -3
  898. package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.js +0 -20
  899. package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.js.map +0 -1
  900. package/dist/cli/src/apps/cli/commands/project/commandOpenGit.d.ts +0 -3
  901. package/dist/cli/src/apps/cli/commands/project/commandOpenGit.js +0 -9
  902. package/dist/cli/src/apps/cli/commands/project/commandOpenGit.js.map +0 -1
  903. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafana.d.ts +0 -3
  904. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafana.js +0 -22
  905. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafana.js.map +0 -1
  906. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.d.ts +0 -3
  907. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.js +0 -35
  908. package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.js.map +0 -1
  909. package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.d.ts +0 -3
  910. package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.js +0 -14
  911. package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.js.map +0 -1
  912. package/dist/cli/src/apps/cli/commands/project/commandPauseProject.d.ts +0 -3
  913. package/dist/cli/src/apps/cli/commands/project/commandPauseProject.js +0 -28
  914. package/dist/cli/src/apps/cli/commands/project/commandPauseProject.js.map +0 -1
  915. package/dist/cli/src/apps/cli/commands/project/commandPortForward.d.ts +0 -3
  916. package/dist/cli/src/apps/cli/commands/project/commandPortForward.js +0 -80
  917. package/dist/cli/src/apps/cli/commands/project/commandPortForward.js.map +0 -1
  918. package/dist/cli/src/apps/cli/commands/project/commandRenewToken.d.ts +0 -3
  919. package/dist/cli/src/apps/cli/commands/project/commandRenewToken.js +0 -9
  920. package/dist/cli/src/apps/cli/commands/project/commandRenewToken.js.map +0 -1
  921. package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.d.ts +0 -5
  922. package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.js +0 -24
  923. package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.js.map +0 -1
  924. package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.d.ts +0 -3
  925. package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.js +0 -19
  926. package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.js.map +0 -1
  927. package/dist/cli/src/apps/cli/commands/project/commandSetup.d.ts +0 -3
  928. package/dist/cli/src/apps/cli/commands/project/commandSetup.js +0 -9
  929. package/dist/cli/src/apps/cli/commands/project/commandSetup.js.map +0 -1
  930. package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.d.ts +0 -3
  931. package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.js +0 -56
  932. package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.js.map +0 -1
  933. package/dist/cli/src/apps/cli/commands/project/index.d.ts +0 -3
  934. package/dist/cli/src/apps/cli/commands/project/index.js +0 -54
  935. package/dist/cli/src/apps/cli/commands/project/index.js.map +0 -1
  936. package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.d.ts +0 -2
  937. package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.js +0 -14
  938. package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.js.map +0 -1
  939. package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +0 -3
  940. package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.js +0 -35
  941. package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.js.map +0 -1
  942. package/dist/cli/src/apps/cli/verify/index.d.ts +0 -2
  943. package/dist/cli/src/apps/cli/verify/index.js +0 -15
  944. package/dist/cli/src/apps/cli/verify/index.js.map +0 -1
  945. package/dist/cli/src/catci.d.ts +0 -1
  946. package/dist/cli/src/catci.js +0 -5
  947. package/dist/cli/src/catci.js.map +0 -1
  948. package/dist/cli/src/config/constants.d.ts +0 -2
  949. package/dist/cli/src/config/constants.js +0 -6
  950. package/dist/cli/src/config/constants.js.map +0 -1
  951. package/dist/cli/src/utils/preferences/index.js +0 -38
  952. package/dist/cli/src/utils/preferences/index.js.map +0 -1
  953. package/dist/pipeline/src/build/rails/test.js +0 -88
  954. package/dist/pipeline/src/build/rails/test.js.map +0 -1
  955. package/dist/pipeline/src/build/sbom.d.ts +0 -5
  956. package/dist/pipeline/src/build/sbom.js +0 -42
  957. package/dist/pipeline/src/build/sbom.js.map +0 -1
  958. package/dist/pipeline/src/deploy/sbom.d.ts +0 -4
  959. package/dist/pipeline/src/deploy/sbom.js +0 -28
  960. package/dist/pipeline/src/deploy/sbom.js.map +0 -1
  961. package/dist/pipeline/src/pipeline/createChildPipeline.d.ts +0 -3
  962. package/dist/pipeline/src/pipeline/createChildPipeline.js +0 -30
  963. package/dist/pipeline/src/pipeline/createChildPipeline.js.map +0 -1
  964. package/dist/pipeline/src/pipeline/createMainPipeline.d.ts +0 -3
  965. package/dist/pipeline/src/pipeline/createMainPipeline.js +0 -76
  966. package/dist/pipeline/src/pipeline/createMainPipeline.js.map +0 -1
  967. package/dist/pipeline/src/pipeline/getPipelineStages.js +0 -21
  968. package/dist/pipeline/src/pipeline/getPipelineStages.js.map +0 -1
  969. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.d.ts +0 -11
  970. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +0 -262
  971. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +0 -1
  972. package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.d.ts +0 -4
  973. package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js +0 -25
  974. package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js.map +0 -1
  975. package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.d.ts +0 -1
  976. package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js +0 -32
  977. package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js.map +0 -1
  978. package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.d.ts +0 -35
  979. package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js +0 -27
  980. package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js.map +0 -1
  981. package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.js +0 -50
  982. package/dist/pipeline/src/pipeline/yarn/yarnUtils.d.ts +0 -5
  983. package/dist/pipeline/src/pipeline/yarn/yarnUtils.js +0 -51
  984. package/dist/pipeline/src/pipeline/yarn/yarnUtils.js.map +0 -1
  985. package/src/apps/catci/catci.ts +0 -26
  986. package/src/apps/catci/commands/security/commands.ts +0 -161
  987. package/src/apps/cli/cli.ts +0 -43
  988. package/src/apps/cli/commands/cloudSQL/commandRestoreDb.ts +0 -136
  989. package/src/apps/cli/commands/cloudSQL/index.ts +0 -7
  990. package/src/apps/cli/commands/general/index.ts +0 -90
  991. package/src/apps/cli/commands/general/namespaceAutoCompletion.ts +0 -7
  992. package/src/apps/cli/commands/general/portForward.ts +0 -48
  993. package/src/apps/cli/commands/mongodb/index.ts +0 -10
  994. package/src/apps/cli/commands/mongodb/projectMongoDestroyMember.ts +0 -132
  995. package/src/apps/cli/commands/mongodb/projectMongoGetShell.ts +0 -42
  996. package/src/apps/cli/commands/mongodb/projectMongoPortForward.ts +0 -64
  997. package/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.ts +0 -181
  998. package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +0 -130
  999. package/src/apps/cli/commands/project/commandDeletePods.ts +0 -48
  1000. package/src/apps/cli/commands/project/commandDeleteProject.ts +0 -33
  1001. package/src/apps/cli/commands/project/commandEnvVars.ts +0 -18
  1002. package/src/apps/cli/commands/project/commandGetMyTotalWorktime.ts +0 -14
  1003. package/src/apps/cli/commands/project/commandGetShell.ts +0 -36
  1004. package/src/apps/cli/commands/project/commandGitlabCi.ts +0 -115
  1005. package/src/apps/cli/commands/project/commandListPods.ts +0 -20
  1006. package/src/apps/cli/commands/project/commandMigrateHelm3.ts +0 -63
  1007. package/src/apps/cli/commands/project/commandNamespace.ts +0 -14
  1008. package/src/apps/cli/commands/project/commandOpenCostDashboard.ts +0 -32
  1009. package/src/apps/cli/commands/project/commandOpenDashboard.ts +0 -28
  1010. package/src/apps/cli/commands/project/commandOpenEnv.ts +0 -22
  1011. package/src/apps/cli/commands/project/commandOpenGit.ts +0 -12
  1012. package/src/apps/cli/commands/project/commandOpenGrafana.ts +0 -31
  1013. package/src/apps/cli/commands/project/commandOpenGrafanaPod.ts +0 -43
  1014. package/src/apps/cli/commands/project/commandOpenLogs.ts +0 -21
  1015. package/src/apps/cli/commands/project/commandPauseProject.ts +0 -33
  1016. package/src/apps/cli/commands/project/commandPortForward.ts +0 -91
  1017. package/src/apps/cli/commands/project/commandRenewToken.ts +0 -12
  1018. package/src/apps/cli/commands/project/commandSecretsClearBackups.ts +0 -26
  1019. package/src/apps/cli/commands/project/commandSecurityEvaluate.ts +0 -26
  1020. package/src/apps/cli/commands/project/commandSetup.ts +0 -12
  1021. package/src/apps/cli/commands/project/commandTriggerCronjob.ts +0 -62
  1022. package/src/apps/cli/commands/project/index.ts +0 -61
  1023. package/src/apps/cli/commands/project/utils/showProjectBanner.ts +0 -11
  1024. package/src/apps/cli/commands/theStuffThatReallyMatters/index.ts +0 -32
  1025. package/src/apps/cli/verify/index.ts +0 -14
  1026. package/src/catci.ts +0 -3
  1027. package/src/config/constants.ts +0 -2
  1028. package/src/utils/preferences/index.ts +0 -34
  1029. /package/dist/cli/src/{apps/catci/commands/security → security}/topics.json +0 -0
  1030. /package/src/{apps/catci/commands/security → security}/auditDocument.ts +0 -0
  1031. /package/src/{apps/catci/commands/security → security}/createSecurityAuditMergeRequest.ts +0 -0
  1032. /package/src/{apps/catci/commands/security → security}/evaluateSecurityAudit.ts +0 -0
  1033. /package/src/{apps/catci/commands/security → security}/topics.json +0 -0
@@ -1,17 +1,19 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.collapseableSection = exports.repeatOnFailure = exports.sanitizeForBashVariable = exports.allowFailureInScripts = void 0;
4
7
  const globalScriptFunctions_1 = require("../globalScriptFunctions");
5
- const allowFailureInScripts = (script) => [
6
- "set +e", // disable fail job on error
7
- ...script,
8
- "set -e", // reenable
8
+ const allowFailureInScripts = script => ["set +e",
9
+ // disable fail job on error
10
+ ...script, "set -e" // reenable
9
11
  ];
10
12
  exports.allowFailureInScripts = allowFailureInScripts;
11
- const sanitizeForBashVariable = (name) => name.replace(/-/g, "_");
13
+ const sanitizeForBashVariable = name => name.replace(/-/g, "_");
12
14
  exports.sanitizeForBashVariable = sanitizeForBashVariable;
13
15
  const repeatOnFailure = (command, options) => {
14
- return `
16
+ return `
15
17
  until ${command}
16
18
  do
17
19
  echo "Trying again."
@@ -27,12 +29,7 @@ const start = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collaps
27
29
  const end = (0, globalScriptFunctions_1.registerGlobalScriptFunction)("collapseable_section_end", `local section_title="\${1}"
28
30
  echo -e "section_end:\`date +%s\`:\${section_title}\\r\\e[0K"
29
31
  `);
30
- const collapseableSection = (name, header) => (commands) => {
31
- return [
32
- start.invoke(`"${name}"`, `"${header}"`),
33
- ...commands,
34
- end.invoke(`"${name}"`),
35
- ];
32
+ const collapseableSection = (name, header) => commands => {
33
+ return [start.invoke(`"${name}"`, `"${header}"`), ...commands, end.invoke(`"${name}"`)];
36
34
  };
37
- exports.collapseableSection = collapseableSection;
38
- //# sourceMappingURL=gitlab.js.map
35
+ exports.collapseableSection = collapseableSection;
@@ -1,4 +1,4 @@
1
1
  export declare function notNil<TValue>(value: TValue | null | undefined): value is TValue;
2
2
  export declare const ensureArrayOrNull: <T>(s: undefined | T | T[]) => T[] | null;
3
3
  export declare const ensureArray: <T>(s: undefined | T | T[]) => T[];
4
- export declare const mergeWithMergingArrays: <A, B>(obj1: A, obj2: B) => A & B;
4
+ export declare const mergeWithMergingArrays: <A, B>(obj1: A, obj2: B) => A & B;
@@ -1,20 +1,23 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.mergeWithMergingArrays = exports.ensureArray = exports.ensureArrayOrNull = exports.notNil = void 0;
4
- const lodash_1 = require("lodash");
7
+ const lodash_es_1 = require("lodash-es");
5
8
  function notNil(value) {
6
- return value !== null && value !== undefined;
9
+ return value !== null && value !== undefined;
7
10
  }
8
11
  exports.notNil = notNil;
9
- const ensureArrayOrNull = (s) => (0, lodash_1.isNil)(s) ? null : Array.isArray(s) ? s : [s];
12
+ const ensureArrayOrNull = s => (0, lodash_es_1.isNil)(s) ? null : Array.isArray(s) ? s : [s];
10
13
  exports.ensureArrayOrNull = ensureArrayOrNull;
11
- const ensureArray = (s) => { var _a; return (_a = (0, exports.ensureArrayOrNull)(s)) !== null && _a !== void 0 ? _a : []; };
14
+ const ensureArray = s => {
15
+ var _a;
16
+ return (_a = (0, exports.ensureArrayOrNull)(s)) !== null && _a !== void 0 ? _a : [];
17
+ };
12
18
  exports.ensureArray = ensureArray;
13
19
  // see https://github.com/lodash/lodash/issues/5384
14
20
  const mergeWithMergingArrays = (obj1, obj2) => {
15
- return (0, lodash_1.mergeWith)({}, obj1, obj2, (prop1, prop2) => Array.isArray(prop1) && Array.isArray(prop2)
16
- ? [...prop1, ...prop2]
17
- : undefined);
21
+ return (0, lodash_es_1.mergeWith)({}, obj1, obj2, (prop1, prop2) => Array.isArray(prop1) && Array.isArray(prop2) ? [...prop1, ...prop2] : undefined);
18
22
  };
19
- exports.mergeWithMergingArrays = mergeWithMergingArrays;
20
- //# sourceMappingURL=index.js.map
23
+ exports.mergeWithMergingArrays = mergeWithMergingArrays;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,mCAA0C;AAE1C,SAAgB,MAAM,CACpB,KAAgC;IAEhC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAJD,wBAIC;AAEM,MAAM,iBAAiB,GAAG,CAAI,CAAsB,EAAc,EAAE,CACzE,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AADlC,QAAA,iBAAiB,qBACiB;AAExC,MAAM,WAAW,GAAG,CAAI,CAAsB,EAAO,EAAE,WAC5D,OAAA,MAAA,IAAA,yBAAiB,EAAC,CAAC,CAAC,mCAAI,EAAE,CAAA,EAAA,CAAC;AADhB,QAAA,WAAW,eACK;AAE7B,mDAAmD;AAC5C,MAAM,sBAAsB,GAAG,CAAO,IAAO,EAAE,IAAO,EAAS,EAAE;IACtE,OAAO,IAAA,kBAAS,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAChD,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC1C,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC,SAAS,CACd,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/index.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAE7C,SAAgB,MAAM,CACpB,KAAgC;IAEhC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAJD,wBAIC;AAEM,MAAM,iBAAiB,GAAG,CAAI,CAAsB,EAAc,EAAE,CACzE,IAAA,iBAAK,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AADlC,QAAA,iBAAiB,qBACiB;AAExC,MAAM,WAAW,GAAG,CAAI,CAAsB,EAAO,EAAE,WAC5D,OAAA,MAAA,IAAA,yBAAiB,EAAC,CAAC,CAAC,mCAAI,EAAE,CAAA,EAAA,CAAC;AADhB,QAAA,WAAW,eACK;AAE7B,mDAAmD;AAC5C,MAAM,sBAAsB,GAAG,CAAO,IAAO,EAAE,IAAO,EAAS,EAAE;IACtE,OAAO,IAAA,qBAAS,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAChD,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC1C,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC,SAAS,CACd,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
@@ -1 +1 @@
1
- export declare const jsonParseOrThrow: (str: string) => any;
1
+ export declare const jsonParseOrThrow: (str: string) => any;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.jsonParseOrThrow = void 0;
4
- const jsonParseOrThrow = (str) => {
5
- try {
6
- return JSON.parse(str);
7
- }
8
- catch (e) {
9
- throw new Error(`could not parse json: ${str}`);
10
- }
7
+ const jsonParseOrThrow = str => {
8
+ try {
9
+ return JSON.parse(str);
10
+ } catch (e) {
11
+ throw new Error(`could not parse json: ${str}`);
12
+ }
11
13
  };
12
- exports.jsonParseOrThrow = jsonParseOrThrow;
13
- //# sourceMappingURL=jsonParse.js.map
14
+ exports.jsonParseOrThrow = jsonParseOrThrow;
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ export declare const measureTime: (logLevel: string, label: string, meta: Record<string, any>) => {
3
+ done: () => void;
4
+ [Symbol.dispose]: () => void;
5
+ addMeta: (meta: Record<string, any>) => void;
6
+ };
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var __importDefault = this && this.__importDefault || function (mod) {
4
+ return mod && mod.__esModule ? mod : {
5
+ "default": mod
6
+ };
7
+ };
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ exports.measureTime = void 0;
12
+ const crypto_1 = __importDefault(require("crypto"));
13
+ const measureTime = (logLevel, label, meta) => {
14
+ const shortId = crypto_1.default.randomUUID().slice(0, 8);
15
+ const start = performance.now();
16
+ let logMeta = {
17
+ ...meta
18
+ };
19
+ const addMeta = meta => {
20
+ logMeta = {
21
+ ...logMeta,
22
+ ...meta
23
+ };
24
+ };
25
+ console.log(logLevel, `[${shortId}] [START] ${label} `, {
26
+ shortId,
27
+ ...logMeta
28
+ });
29
+ let disposed = false;
30
+ const done = () => {
31
+ if (disposed) return;
32
+ disposed = true;
33
+ const durationMs = Math.round(performance.now() - start);
34
+ const durationS = `${durationMs / 1000}s`;
35
+ console.log(logLevel, `[${shortId}] [END] ${label} | ${durationS}`, {
36
+ shortId,
37
+ durationS,
38
+ ...logMeta
39
+ });
40
+ };
41
+ return {
42
+ done,
43
+ [Symbol.dispose]: done,
44
+ addMeta
45
+ };
46
+ };
47
+ exports.measureTime = measureTime;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measureTime.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/measureTime.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AACrB,MAAM,WAAW,GAAG,CACzB,QAAgB,EAChB,KAAa,EACb,IAAyB,EACzB,EAAE;IACF,MAAM,OAAO,GAAG,gBAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAEhC,IAAI,OAAO,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;IAC1B,MAAM,OAAO,GAAG,CAAC,IAAyB,EAAE,EAAE;QAC5C,OAAO,GAAG;YACR,GAAG,OAAO;YACV,GAAG,IAAI;SACR,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,OAAO,aAAa,KAAK,GAAG,EAAE;QACtD,OAAO;QACP,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,IAAI,QAAQ;YAAE,OAAO;QACrB,QAAQ,GAAG,IAAI,CAAC;QAEhB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,GAAG,UAAU,GAAG,IAAI,GAAG,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,OAAO,WAAW,KAAK,MAAM,SAAS,EAAE,EAAE;YAClE,OAAO;YACP,SAAS;YACT,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACL,IAAI;QACJ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI;QACtB,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,WAAW,eAyCtB"}
@@ -1 +1 @@
1
- export declare const removeUndefined: <T extends object>(obj: T) => T;
1
+ export declare const removeUndefined: <T extends object>(obj: T) => T;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.removeUndefined = void 0;
4
- const removeUndefined = (obj) => Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
5
- exports.removeUndefined = removeUndefined;
6
- //# sourceMappingURL=removeUndefined.js.map
7
+ const removeUndefined = obj => Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
8
+ exports.removeUndefined = removeUndefined;
@@ -1,9 +1,19 @@
1
1
  import { stringify } from "yaml";
2
- export declare const getAutoGeneratedHeader: (commentChar: string) => string;
3
- export declare const writeGeneratedFile: (path: string, content: string, { commentChar, }: {
4
- commentChar: string;
5
- }) => Promise<void>;
2
+ import type { Config } from "../types";
3
+ import type { BaseHookContext } from "../types/hooks";
4
+ type WriteFileOptions = {
5
+ commentChar: string;
6
+ };
6
7
  type StringifyOptions = Exclude<Parameters<typeof stringify>[2], null | undefined | string | number>;
7
8
  export declare const yamlStringifyOptions: StringifyOptions;
8
- export declare const writeYamlfile: (path: string, data: any) => Promise<void>;
9
- export {};
9
+ export declare class FileWriter {
10
+ private readonly config;
11
+ static create(config: Config): FileWriter;
12
+ constructor(config: Config);
13
+ protected writeTheFile(path: string, content: string): Promise<void>;
14
+ protected getBaseHookContext(path: string): Promise<BaseHookContext>;
15
+ writeGeneratedFile(path: string, content: string, options: WriteFileOptions): Promise<void>;
16
+ writeYamlfile(path: string, data: any): Promise<void>;
17
+ protected getAutoGeneratedHeader(commentChar: string): string;
18
+ }
19
+ export {};
@@ -1,40 +1,61 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.writeYamlfile = exports.yamlStringifyOptions = exports.writeGeneratedFile = exports.getAutoGeneratedHeader = void 0;
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FileWriter = exports.yamlStringifyOptions = void 0;
4
7
  const promises_1 = require("fs/promises");
5
8
  const yaml_1 = require("yaml");
6
- const getAutoGeneratedHeader = (commentChar) => {
7
- return [
8
- "-------------------------------------------------",
9
- `🐱 🔨 This file is generated by catladder`,
10
- `🚨 Do not edit this file manually 🚨`,
11
- "-------------------------------------------------",
12
- ]
13
- .map((line) => `${commentChar} ${line}`)
14
- .join("\n")
15
- .concat("\n");
16
- };
17
- exports.getAutoGeneratedHeader = getAutoGeneratedHeader;
18
- const writeGeneratedFile = async (path, content, { commentChar, }) => {
19
- await (0, promises_1.writeFile)(path,
20
- // need to spread out the jobs, forgot why
21
- [(0, exports.getAutoGeneratedHeader)(commentChar), content].join("\n"), {
22
- encoding: "utf-8",
23
- });
24
- };
25
- exports.writeGeneratedFile = writeGeneratedFile;
26
9
  exports.yamlStringifyOptions = {
27
- // prevents colapsing long command statements into multiple lines
28
- lineWidth: 0,
29
- // represent multi line commands as single line json strings
30
- doubleQuotedAsJSON: true,
31
- // Better readability when bash commands most often use double quotes
32
- singleQuote: true,
10
+ // prevents colapsing long command statements into multiple lines
11
+ lineWidth: 0,
12
+ // represent multi line commands as single line json strings
13
+ doubleQuotedAsJSON: true,
14
+ // Better readability when bash commands most often use double quotes
15
+ singleQuote: true
33
16
  };
34
- const writeYamlfile = async (path, data) => {
35
- await (0, exports.writeGeneratedFile)(path, (0, yaml_1.stringify)(data, exports.yamlStringifyOptions), {
36
- commentChar: "#",
17
+ class FileWriter {
18
+ static create(config) {
19
+ return new FileWriter(config);
20
+ }
21
+ constructor(config) {
22
+ this.config = config;
23
+ this.config = config;
24
+ }
25
+ async writeTheFile(path, content) {
26
+ var _a, _b;
27
+ const transformedContent = await ((_b = (_a = this.config.hooks) === null || _a === void 0 ? void 0 : _a.transformFileBeforeWrite) === null || _b === void 0 ? void 0 : _b.call(_a, {
28
+ ...(await this.getBaseHookContext(path)),
29
+ content
30
+ }));
31
+ await (0, promises_1.writeFile)(path, transformedContent !== null && transformedContent !== void 0 ? transformedContent : content, {
32
+ encoding: "utf-8"
37
33
  });
38
- };
39
- exports.writeYamlfile = writeYamlfile;
40
- //# sourceMappingURL=writeFiles.js.map
34
+ }
35
+ async getBaseHookContext(path) {
36
+ var _a, _b;
37
+ const filename = (_a = path.split("/").pop()) !== null && _a !== void 0 ? _a : "";
38
+ return {
39
+ filename,
40
+ path,
41
+ extension: (_b = path.split(".").pop()) !== null && _b !== void 0 ? _b : ""
42
+ };
43
+ }
44
+ async writeGeneratedFile(path, content, options) {
45
+ await this.writeTheFile(path, [this.getAutoGeneratedHeader(options.commentChar), content].join("\n"));
46
+ }
47
+ async writeYamlfile(path, data) {
48
+ var _a, _b;
49
+ const dataTransformed = await ((_b = (_a = this.config.hooks) === null || _a === void 0 ? void 0 : _a.transformYamlBeforeWrite) === null || _b === void 0 ? void 0 : _b.call(_a, {
50
+ ...(await this.getBaseHookContext(path)),
51
+ data
52
+ }));
53
+ return this.writeGeneratedFile(path, (0, yaml_1.stringify)(dataTransformed !== null && dataTransformed !== void 0 ? dataTransformed : data, exports.yamlStringifyOptions), {
54
+ commentChar: "#"
55
+ });
56
+ }
57
+ getAutoGeneratedHeader(commentChar) {
58
+ return ["-------------------------------------------------", `🐱 🔨 This file is generated by catladder`, `🚨 Do not edit this file manually 🚨`, "-------------------------------------------------"].map(line => `${commentChar} ${line}`).join("\n").concat("\n");
59
+ }
60
+ }
61
+ exports.FileWriter = FileWriter;
@@ -1 +1 @@
1
- {"version":3,"file":"writeFiles.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/writeFiles.ts"],"names":[],"mappings":";;;AAAA,0CAAwC;AACxC,+BAAiC;AAE1B,MAAM,sBAAsB,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC5D,OAAO;QACL,mDAAmD;QACnD,2CAA2C;QAC3C,sCAAsC;QACtC,mDAAmD;KACpD;SACE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC;SACvC,IAAI,CAAC,IAAI,CAAC;SACV,MAAM,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AAVW,QAAA,sBAAsB,0BAUjC;AAEK,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAAY,EACZ,OAAe,EACf,EACE,WAAW,GAGZ,EACD,EAAE;IACF,MAAM,IAAA,oBAAS,EACb,IAAI;IACJ,0CAA0C;IAC1C,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACzD;QACE,QAAQ,EAAE,OAAO;KAClB,CACF,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,kBAAkB,sBAiB7B;AAMW,QAAA,oBAAoB,GAAqB;IACpD,iEAAiE;IACjE,SAAS,EAAE,CAAC;IACZ,4DAA4D;IAC5D,kBAAkB,EAAE,IAAI;IACxB,qEAAqE;IACrE,WAAW,EAAE,IAAI;CAClB,CAAC;AAEK,MAAM,aAAa,GAAG,KAAK,EAAE,IAAY,EAAE,IAAS,EAAE,EAAE;IAC7D,MAAM,IAAA,0BAAkB,EAAC,IAAI,EAAE,IAAA,gBAAS,EAAC,IAAI,EAAE,4BAAoB,CAAC,EAAE;QACpE,WAAW,EAAE,GAAG;KACjB,CAAC,CAAC;AACL,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
1
+ {"version":3,"file":"writeFiles.js","sourceRoot":"","sources":["../../../../../pipeline/src/utils/writeFiles.ts"],"names":[],"mappings":";;;AAAA,0CAAwC;AACxC,+BAAiC;AAYpB,QAAA,oBAAoB,GAAqB;IACpD,iEAAiE;IACjE,SAAS,EAAE,CAAC;IACZ,4DAA4D;IAC5D,kBAAkB,EAAE,IAAI;IACxB,qEAAqE;IACrE,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,MAAa,UAAU;IACd,MAAM,CAAC,MAAM,CAAC,MAAc;QACjC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAES,KAAK,CAAC,YAAY,CAAC,IAAY,EAAE,OAAe;;QACxD,MAAM,kBAAkB,GACtB,MAAM,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,KAAK,0CAAE,wBAAwB,mDAAG;YAClD,GAAG,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACxC,OAAO;SACR,CAAC,CAAA,CAAC;QACL,MAAM,IAAA,oBAAS,EAAC,IAAI,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,OAAO,EAAE;YACnD,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAAC,kBAAkB,CAAC,IAAY;;QAC7C,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,EAAE,CAAC;QAC7C,OAAO;YACL,QAAQ;YACR,IAAI;YACJ,SAAS,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,EAAE;SACvC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC7B,IAAY,EACZ,OAAe,EACf,OAAyB;QAEzB,MAAM,IAAI,CAAC,YAAY,CACrB,IAAI,EACJ,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACvE,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,IAAS;;QAChD,MAAM,eAAe,GAAG,MAAM,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,KAAK,0CAAE,wBAAwB,mDACvE;YACE,GAAG,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI;SACL,CACF,CAAA,CAAC;QACF,OAAO,IAAI,CAAC,kBAAkB,CAC5B,IAAI,EACJ,IAAA,gBAAS,EAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,EAAE,4BAAoB,CAAC,EACxD;YACE,WAAW,EAAE,GAAG;SACjB,CACF,CAAC;IACJ,CAAC;IAES,sBAAsB,CAAC,WAAmB;QAClD,OAAO;YACL,mDAAmD;YACnD,2CAA2C;YAC3C,sCAAsC;YACtC,mDAAmD;SACpD;aACE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC;aACvC,IAAI,CAAC,IAAI,CAAC;aACV,MAAM,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;CACF;AAnED,gCAmEC"}
@@ -1,3 +1,3 @@
1
1
  import type { BashExpression } from "../bash/BashExpression";
2
2
  import type { VariableValueContainingReferences } from "./VariableValueContainingReferences";
3
- export type VariableValue = VariableValueContainingReferences | BashExpression | string;
3
+ export type VariableValue = VariableValueContainingReferences | BashExpression | string;
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=VariableValue.js.map
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,24 +1,24 @@
1
1
  import { BashExpression } from "../bash/BashExpression";
2
2
  import type { EscapeOptions } from "../bash/bashEscape";
3
3
  export declare class UnresolvableReference {
4
- reference: VariableReference;
5
- constructor(reference: VariableReference);
6
- toString(): string;
4
+ reference: VariableReference;
5
+ constructor(reference: VariableReference);
6
+ toString(): string;
7
7
  }
8
8
  export declare class VariableReference {
9
- componentName: string;
10
- variableName: string;
11
- constructor(componentName: string, variableName: string);
12
- toString(): string;
9
+ componentName: string;
10
+ variableName: string;
11
+ constructor(componentName: string, variableName: string);
12
+ toString(): string;
13
13
  }
14
14
  type VariableValuePart = string | BashExpression | VariableReference | UnresolvableReference;
15
15
  type MaybeArray<T> = T | T[];
16
16
  export declare class VariableValueContainingReferences {
17
- parts: VariableValuePart[];
18
- constructor(parts: MaybeArray<VariableValuePart | VariableValueContainingReferences>);
19
- toString(options?: EscapeOptions): string;
17
+ parts: VariableValuePart[];
18
+ constructor(parts: MaybeArray<VariableValuePart | VariableValueContainingReferences>);
19
+ toString(options?: EscapeOptions): string;
20
20
  }
21
21
  export declare const createVariableValueContainingReferencesFromString: (value: string, options: {
22
- componentName: string;
22
+ componentName: string;
23
23
  }) => VariableValueContainingReferences;
24
- export {};
24
+ export {};
@@ -1,69 +1,63 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.createVariableValueContainingReferencesFromString = exports.VariableValueContainingReferences = exports.VariableReference = exports.UnresolvableReference = void 0;
4
7
  const BashExpression_1 = require("../bash/BashExpression");
5
8
  const bashEscape_1 = require("../bash/bashEscape");
6
9
  class UnresolvableReference {
7
- constructor(reference) {
8
- this.reference = reference;
9
- }
10
- toString() {
11
- return `Unresolvable reference: ${this.reference.toString()}`;
12
- }
10
+ constructor(reference) {
11
+ this.reference = reference;
12
+ }
13
+ toString() {
14
+ return `Unresolvable reference: ${this.reference.toString()}`;
15
+ }
13
16
  }
14
17
  exports.UnresolvableReference = UnresolvableReference;
15
18
  class VariableReference {
16
- constructor(componentName, variableName) {
17
- this.componentName = componentName;
18
- this.variableName = variableName;
19
- }
20
- toString() {
21
- return `\${${this.componentName}:${this.variableName}}`;
22
- }
19
+ constructor(componentName, variableName) {
20
+ this.componentName = componentName;
21
+ this.variableName = variableName;
22
+ }
23
+ toString() {
24
+ return `\${${this.componentName}:${this.variableName}}`;
25
+ }
23
26
  }
24
27
  exports.VariableReference = VariableReference;
25
28
  class VariableValueContainingReferences {
26
- constructor(parts) {
27
- this.parts = (Array.isArray(parts) ? parts : [parts]).flatMap((part) => part instanceof VariableValueContainingReferences
28
- ? part.parts
29
- : part === ""
30
- ? []
31
- : [part]);
32
- }
33
- toString(options = {
34
- quotes: false,
35
- }) {
36
- return this.parts
37
- .map((part) => {
38
- if (typeof part === "string") {
39
- return (0, bashEscape_1.escapeString)(part, options);
40
- }
41
- else if (part instanceof BashExpression_1.BashExpression) {
42
- return (0, bashEscape_1.escapeBashExpression)(part, options);
43
- }
44
- else {
45
- return part.toString();
46
- }
47
- })
48
- .join("");
49
- }
29
+ constructor(parts) {
30
+ this.parts = (Array.isArray(parts) ? parts : [parts]).flatMap(part => part instanceof VariableValueContainingReferences ? part.parts : part === "" ? [] : [part]);
31
+ }
32
+ toString(options = {
33
+ quotes: false
34
+ }) {
35
+ return this.parts.map(part => {
36
+ if (typeof part === "string") {
37
+ return (0, bashEscape_1.escapeString)(part, options);
38
+ } else if (part instanceof BashExpression_1.BashExpression) {
39
+ return (0, bashEscape_1.escapeBashExpression)(part, options);
40
+ } else {
41
+ return part.toString();
42
+ }
43
+ }).join("");
44
+ }
50
45
  }
51
46
  exports.VariableValueContainingReferences = VariableValueContainingReferences;
52
47
  // regex to resolve references in catladder variables
53
48
  // those expressions have the pattern ${componentName:variableName}
54
49
  const REGEX = /\$\{(([^:}]+):)?([^}]+)}/gm;
55
50
  const createVariableValueContainingReferencesFromString = (value, options) => {
56
- const parts = [];
57
- let match;
58
- let lastIndex = 0;
59
- while ((match = REGEX.exec(value)) !== null) {
60
- const [fullMatch, _, otherComponentName, variableName] = match;
61
- parts.push(value.slice(lastIndex, match.index));
62
- parts.push(new VariableReference(otherComponentName || options.componentName, variableName));
63
- lastIndex = REGEX.lastIndex;
64
- }
65
- parts.push(value.slice(lastIndex));
66
- return new VariableValueContainingReferences(parts);
51
+ const parts = [];
52
+ let match;
53
+ let lastIndex = 0;
54
+ while ((match = REGEX.exec(value)) !== null) {
55
+ const [fullMatch, _, otherComponentName, variableName] = match;
56
+ parts.push(value.slice(lastIndex, match.index));
57
+ parts.push(new VariableReference(otherComponentName || options.componentName, variableName));
58
+ lastIndex = REGEX.lastIndex;
59
+ }
60
+ parts.push(value.slice(lastIndex));
61
+ return new VariableValueContainingReferences(parts);
67
62
  };
68
- exports.createVariableValueContainingReferencesFromString = createVariableValueContainingReferencesFromString;
69
- //# sourceMappingURL=VariableValueContainingReferences.js.map
63
+ exports.createVariableValueContainingReferencesFromString = createVariableValueContainingReferencesFromString;
@@ -1,3 +1,3 @@
1
1
  import type { VariableValue } from "./VariableValue";
2
2
  import type { VariableValueContainingReferences } from "./VariableValueContainingReferences";
3
- export declare const resolveAllReferences: (values: Record<string, VariableValueContainingReferences>, getEnvVars: (componentName: string) => Promise<Record<string, VariableValue | null | undefined>>) => Promise<Record<string, VariableValueContainingReferences>>;
3
+ export declare const resolveAllReferences: (values: Record<string, VariableValueContainingReferences>, getEnvVars: (componentName: string) => Promise<Record<string, VariableValue | null | undefined>>) => Promise<Record<string, VariableValueContainingReferences>>;
@@ -1,25 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.resolveAllReferences = void 0;
4
7
  const VariableValueContainingReferences_1 = require("./VariableValueContainingReferences");
5
8
  const resolveAllReferencesOnce_1 = require("./resolveAllReferencesOnce");
6
9
  const resolveAllReferences = async (values, getEnvVars) => {
7
- // replace until there aren't any references left
8
- let result = values;
9
- let i = 0;
10
- while (Object.values(result).some((value) => value.parts.some((part) => part instanceof VariableValueContainingReferences_1.VariableReference))) {
11
- const replaced = await (0, resolveAllReferencesOnce_1.resolveAllReferencesOnce)(result, getEnvVars);
12
- result = replaced;
13
- i++;
14
- if (i > 1000) {
15
- const unresolved = Object.entries(result).filter(([key, value]) => value.parts.some((part) => part instanceof VariableValueContainingReferences_1.VariableReference));
16
- throw new Error("Infinite loop detected in these variables: " +
17
- unresolved
18
- .map(([key, value]) => `${key} (last reference: ${value.parts.find((part) => part instanceof VariableValueContainingReferences_1.VariableReference)})`)
19
- .join(", "));
20
- }
10
+ // replace until there aren't any references left
11
+ let result = values;
12
+ let i = 0;
13
+ while (Object.values(result).some(value => value.parts.some(part => part instanceof VariableValueContainingReferences_1.VariableReference))) {
14
+ const replaced = await (0, resolveAllReferencesOnce_1.resolveAllReferencesOnce)(result, getEnvVars);
15
+ result = replaced;
16
+ i++;
17
+ if (i > 1000) {
18
+ const unresolved = Object.entries(result).filter(([key, value]) => value.parts.some(part => part instanceof VariableValueContainingReferences_1.VariableReference));
19
+ throw new Error("Infinite loop detected in these variables: " + unresolved.map(([key, value]) => `${key} (last reference: ${value.parts.find(part => part instanceof VariableValueContainingReferences_1.VariableReference)})`).join(", "));
21
20
  }
22
- return result;
21
+ }
22
+ return result;
23
23
  };
24
- exports.resolveAllReferences = resolveAllReferences;
25
- //# sourceMappingURL=resolveAllReferences.js.map
24
+ exports.resolveAllReferences = resolveAllReferences;
@@ -1,5 +1,5 @@
1
1
  import type { VariableValue } from "./VariableValue";
2
2
  import type { VariableValueContainingReferences } from "./VariableValueContainingReferences";
3
3
  export declare const resolveAllReferencesOnce: (values: Record<string, VariableValueContainingReferences>, getEnvVars: (componentName: string) => Promise<Record<string, VariableValue | undefined | null>>) => Promise<{
4
- [k: string]: VariableValueContainingReferences;
5
- }>;
4
+ [k: string]: VariableValueContainingReferences;
5
+ }>;
@@ -1,23 +1,20 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.resolveAllReferencesOnce = void 0;
4
7
  const VariableValueContainingReferences_1 = require("./VariableValueContainingReferences");
5
8
  const resolveReferencesOnce_1 = require("./resolveReferencesOnce");
6
9
  const resolveAllReferencesOnce = async (values, getEnvVars) => {
7
- const allReferences = Object.values(values).flatMap((value) => value === null || value === void 0 ? void 0 : value.parts.filter((part) => part instanceof VariableValueContainingReferences_1.VariableReference));
8
- const allComponentsUnique = Array.from(new Set(allReferences.map((reference) => reference.componentName)));
9
- const allEnvVarsInComponents = Object.fromEntries(await Promise.all(allComponentsUnique.map(async (componentName) => [
10
- componentName,
11
- await getEnvVars(componentName),
12
- ])));
13
- return Object.fromEntries(Object.entries(values).map(([key, value]) => [
14
- key,
15
- value !== null && value !== undefined
16
- ? (0, resolveReferencesOnce_1.resolveReferencesOnce)(value, ({ componentName, variableName }) => {
17
- return allEnvVarsInComponents[componentName][variableName];
18
- })
19
- : value,
20
- ]));
10
+ const allReferences = Object.values(values).flatMap(value => value === null || value === void 0 ? void 0 : value.parts.filter(part => part instanceof VariableValueContainingReferences_1.VariableReference));
11
+ const allComponentsUnique = Array.from(new Set(allReferences.map(reference => reference.componentName)));
12
+ const allEnvVarsInComponents = Object.fromEntries(await Promise.all(allComponentsUnique.map(async componentName => [componentName, await getEnvVars(componentName)])));
13
+ return Object.fromEntries(Object.entries(values).map(([key, value]) => [key, value !== null && value !== undefined ? (0, resolveReferencesOnce_1.resolveReferencesOnce)(value, ({
14
+ componentName,
15
+ variableName
16
+ }) => {
17
+ return allEnvVarsInComponents[componentName][variableName];
18
+ }) : value]));
21
19
  };
22
- exports.resolveAllReferencesOnce = resolveAllReferencesOnce;
23
- //# sourceMappingURL=resolveAllReferencesOnce.js.map
20
+ exports.resolveAllReferencesOnce = resolveAllReferencesOnce;
@@ -1,8 +1,8 @@
1
1
  import type { VariableValue } from "./VariableValue";
2
2
  import { VariableValueContainingReferences } from "./VariableValueContainingReferences";
3
3
  type Resolver = (args: {
4
- componentName: string;
5
- variableName: string;
4
+ componentName: string;
5
+ variableName: string;
6
6
  }) => VariableValue | null | undefined;
7
7
  export declare const resolveReferencesOnce: (value: VariableValueContainingReferences, resolver: Resolver) => VariableValueContainingReferences;
8
- export {};
8
+ export {};