@catladder/pipeline 1.169.0 → 1.170.1
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/bash/BashExpression.d.ts +1 -0
- package/dist/bash/BashExpression.js +3 -0
- package/dist/bash/replaceAsync.d.ts +1 -1
- package/dist/bash/replaceAsync.js +2 -2
- package/dist/bundles/catladder-gitlab/index.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +2 -0
- package/dist/deploy/types/googleCloudRun.d.ts +7 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +1346 -0
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +4 -4
- package/examples/__snapshots__/multiline-var.test.ts.snap +2934 -1020
- package/examples/__snapshots__/referencing-other-vars.test.ts.snap +4535 -0
- package/examples/cloud-run-service-custom-vpc-connector.test.ts +11 -0
- package/examples/cloud-run-service-custom-vpc-connector.ts +30 -0
- package/examples/cloud-run-service-custom-vpc.ts +2 -1
- package/examples/multiline-var.ts +57 -15
- package/examples/referencing-other-vars.test.ts +11 -0
- package/examples/referencing-other-vars.ts +83 -0
- package/package.json +1 -1
- package/src/bash/BashExpression.ts +10 -0
- package/src/bash/replaceAsync.ts +8 -9
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +2 -0
- package/src/deploy/types/googleCloudRun.ts +10 -2
|
@@ -8,6 +8,7 @@ export declare class BashExpression {
|
|
|
8
8
|
constructor(value: string | BashExpression);
|
|
9
9
|
toJSON(): string;
|
|
10
10
|
toString(): string;
|
|
11
|
+
replace(searchValue: any, replacer: (substring: string, ...args: any[]) => string): BashExpression;
|
|
11
12
|
/**
|
|
12
13
|
*
|
|
13
14
|
* @returns a bash expression to lowercase the string
|
|
@@ -50,6 +50,9 @@ var BashExpression = /** @class */function () {
|
|
|
50
50
|
BashExpression.prototype.toString = function () {
|
|
51
51
|
return this.value.toString();
|
|
52
52
|
};
|
|
53
|
+
BashExpression.prototype.replace = function (searchValue, replacer) {
|
|
54
|
+
return new BashExpression(this.value.toString().replace(searchValue, replacer));
|
|
55
|
+
};
|
|
53
56
|
/**
|
|
54
57
|
*
|
|
55
58
|
* @returns a bash expression to lowercase the string
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BashExpression } from "./BashExpression";
|
|
2
|
-
export default function replaceAsync(string: string | BashExpression, searchValue: any, replacer: (substring: string, ...args: any[]) => Promise<string | BashExpression>): Promise<
|
|
2
|
+
export default function replaceAsync(string: string | BashExpression, searchValue: any, replacer: (substring: string, ...args: any[]) => Promise<string | BashExpression>): Promise<any>;
|
|
@@ -132,7 +132,7 @@ function replaceAsync(string, searchValue, replacer) {
|
|
|
132
132
|
case 1:
|
|
133
133
|
_a.trys.push([1, 3,, 4]);
|
|
134
134
|
values_1 = [];
|
|
135
|
-
String.prototype.replace.call(string.
|
|
135
|
+
String.prototype.replace.call(string instanceof BashExpression_1.BashExpression ? string : (0, BashExpression_1.bashEscape)(string), searchValue, function () {
|
|
136
136
|
var args = [];
|
|
137
137
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
138
138
|
args[_i] = arguments[_i];
|
|
@@ -148,7 +148,7 @@ function replaceAsync(string, searchValue, replacer) {
|
|
|
148
148
|
containsBashExpression = resolvedValues_1.some(function (value) {
|
|
149
149
|
return value instanceof BashExpression_1.BashExpression;
|
|
150
150
|
});
|
|
151
|
-
result =
|
|
151
|
+
result = (string instanceof BashExpression_1.BashExpression ? string : (0, BashExpression_1.bashEscape)(string)).replace(searchValue, function () {
|
|
152
152
|
var _a, _b;
|
|
153
153
|
return (_b = (_a = resolvedValues_1.shift()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : "";
|
|
154
154
|
});
|