@catladder/cli 0.0.0-refactor-cache-1b2d6c36 → 0.0.0-refactor-resolve-references-862e93ac

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 (48) hide show
  1. package/dist/bundles/catenv/index.js +230 -121
  2. package/dist/bundles/cli/index.js +226 -117
  3. package/dist/pipeline/src/bash/BashExpression.d.ts +3 -1
  4. package/dist/pipeline/src/bash/BashExpression.js +10 -3
  5. package/dist/pipeline/src/bash/BashExpression.js.map +1 -1
  6. package/dist/pipeline/src/bash/bashYaml.js +25 -2
  7. package/dist/pipeline/src/bash/bashYaml.js.map +1 -1
  8. package/dist/pipeline/src/build/cache/createJobCache.js +5 -1
  9. package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
  10. package/dist/pipeline/src/build/docker.js +1 -1
  11. package/dist/pipeline/src/build/docker.js.map +1 -1
  12. package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
  13. package/dist/pipeline/src/context/getEnvironmentVariables.js +20 -10
  14. package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
  15. package/dist/pipeline/src/context/resolveReferences.d.ts +0 -3
  16. package/dist/pipeline/src/context/resolveReferences.js +1 -53
  17. package/dist/pipeline/src/context/resolveReferences.js.map +1 -1
  18. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +2 -0
  19. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
  20. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +2 -2
  21. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
  22. package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
  23. package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +2 -2
  24. package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +2 -2
  25. package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +1 -1
  26. package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +7 -2
  27. package/dist/pipeline/src/types/context.d.ts +2 -1
  28. package/dist/pipeline/src/types/context.js.map +1 -1
  29. package/dist/pipeline/src/variables/VariableValue.d.ts +3 -0
  30. package/dist/pipeline/src/variables/VariableValue.js +3 -0
  31. package/dist/pipeline/src/variables/VariableValue.js.map +1 -0
  32. package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +25 -0
  33. package/dist/pipeline/src/variables/VariableValueContainingReferences.js +62 -0
  34. package/dist/pipeline/src/variables/VariableValueContainingReferences.js.map +1 -0
  35. package/dist/pipeline/src/variables/replaceAllReferences.d.ts +3 -0
  36. package/dist/pipeline/src/variables/replaceAllReferences.js +25 -0
  37. package/dist/pipeline/src/variables/replaceAllReferences.js.map +1 -0
  38. package/dist/pipeline/src/variables/replaceAllReferencesOnce.d.ts +5 -0
  39. package/dist/pipeline/src/variables/replaceAllReferencesOnce.js +23 -0
  40. package/dist/pipeline/src/variables/replaceAllReferencesOnce.js.map +1 -0
  41. package/dist/pipeline/src/variables/replaceReferencesOnce.d.ts +8 -0
  42. package/dist/pipeline/src/variables/replaceReferencesOnce.js +21 -0
  43. package/dist/pipeline/src/variables/replaceReferencesOnce.js.map +1 -0
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +1 -1
  46. package/dist/pipeline/src/bash/replaceAsync.d.ts +0 -2
  47. package/dist/pipeline/src/bash/replaceAsync.js +0 -37
  48. package/dist/pipeline/src/bash/replaceAsync.js.map +0 -1
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "0.0.0-refactor-cache-1b2d6c36",
56
+ "version": "0.0.0-refactor-resolve-references-862e93ac",
57
57
  "scripts": {
58
58
  "lint": "eslint \"src/**/*.ts\"",
59
59
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -1,2 +0,0 @@
1
- import { BashExpression } from "./BashExpression";
2
- export default function replaceAsync(string: string | BashExpression, searchValue: any, replacer: (substring: string, ...args: any[]) => Promise<string | BashExpression>): Promise<any>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const BashExpression_1 = require("./BashExpression");
4
- // from https://github.com/dsblv/string-replace-async/blob/main/index.js
5
- // and adjusted a bit
6
- async function replaceAsync(string, searchValue, replacer) {
7
- const wasBashExpression = string instanceof BashExpression_1.BashExpression;
8
- try {
9
- // 1. Run fake pass of `replace`, collect values from `replacer` calls
10
- // 2. Resolve them with `Promise.all`
11
- // 3. Run `replace` with resolved values
12
- const values = [];
13
- String.prototype.replace.call(string.toString(), searchValue, function (...args) {
14
- // eslint-disable-next-line prefer-spread
15
- const result = replacer.apply(undefined, args);
16
- values.push(result);
17
- return "";
18
- });
19
- const resolvedValues = await Promise.all(values);
20
- const containsBashExpression = resolvedValues.some((value) => value instanceof BashExpression_1.BashExpression);
21
- const result = String.prototype.replace.call(string.toString(), searchValue, function () {
22
- var _a, _b;
23
- return (_b = (_a = resolvedValues.shift()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : "";
24
- });
25
- if (wasBashExpression || containsBashExpression) {
26
- return new BashExpression_1.BashExpression(result);
27
- }
28
- else {
29
- return result;
30
- }
31
- }
32
- catch (error) {
33
- return Promise.reject(error);
34
- }
35
- }
36
- exports.default = replaceAsync;
37
- //# sourceMappingURL=replaceAsync.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replaceAsync.js","sourceRoot":"","sources":["../../../../../pipeline/src/bash/replaceAsync.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAElD,wEAAwE;AACxE,qBAAqB;AACN,KAAK,UAAU,YAAY,CACxC,MAA+B,EAC/B,WAAgB,EAChB,QAGqC;IAErC,MAAM,iBAAiB,GAAG,MAAM,YAAY,+BAAc,CAAC;IAC3D,IAAI,CAAC;QACH,sEAAsE;QACtE,qCAAqC;QACrC,wCAAwC;QAC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