@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.
- package/dist/bundles/catenv/index.js +230 -121
- package/dist/bundles/cli/index.js +226 -117
- package/dist/pipeline/src/bash/BashExpression.d.ts +3 -1
- package/dist/pipeline/src/bash/BashExpression.js +10 -3
- package/dist/pipeline/src/bash/BashExpression.js.map +1 -1
- package/dist/pipeline/src/bash/bashYaml.js +25 -2
- package/dist/pipeline/src/bash/bashYaml.js.map +1 -1
- package/dist/pipeline/src/build/cache/createJobCache.js +5 -1
- package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
- package/dist/pipeline/src/build/docker.js +1 -1
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.js +20 -10
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/resolveReferences.d.ts +0 -3
- package/dist/pipeline/src/context/resolveReferences.js +1 -53
- package/dist/pipeline/src/context/resolveReferences.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +2 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +2 -2
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +2 -2
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +2 -2
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +1 -1
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +7 -2
- package/dist/pipeline/src/types/context.d.ts +2 -1
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/variables/VariableValue.d.ts +3 -0
- package/dist/pipeline/src/variables/VariableValue.js +3 -0
- package/dist/pipeline/src/variables/VariableValue.js.map +1 -0
- package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +25 -0
- package/dist/pipeline/src/variables/VariableValueContainingReferences.js +62 -0
- package/dist/pipeline/src/variables/VariableValueContainingReferences.js.map +1 -0
- package/dist/pipeline/src/variables/replaceAllReferences.d.ts +3 -0
- package/dist/pipeline/src/variables/replaceAllReferences.js +25 -0
- package/dist/pipeline/src/variables/replaceAllReferences.js.map +1 -0
- package/dist/pipeline/src/variables/replaceAllReferencesOnce.d.ts +5 -0
- package/dist/pipeline/src/variables/replaceAllReferencesOnce.js +23 -0
- package/dist/pipeline/src/variables/replaceAllReferencesOnce.js.map +1 -0
- package/dist/pipeline/src/variables/replaceReferencesOnce.d.ts +8 -0
- package/dist/pipeline/src/variables/replaceReferencesOnce.js +21 -0
- package/dist/pipeline/src/variables/replaceReferencesOnce.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/pipeline/src/bash/replaceAsync.d.ts +0 -2
- package/dist/pipeline/src/bash/replaceAsync.js +0 -37
- package/dist/pipeline/src/bash/replaceAsync.js.map +0 -1
package/package.json
CHANGED
|
@@ -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;QACxC,MAAM,MAAM,GAA4C,EAAE,CAAC;QAC3D,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAC3B,MAAM,CAAC,QAAQ,EAAE,EACjB,WAAW,EACX,UAA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