@catladder/cli 0.0.0-main-ed835115 → 0.0.0-main-8a770211
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/catci/index.js +116 -230
- package/dist/bundles/catenv/index.js +32 -21
- package/dist/bundles/cli/index.js +148 -251
- package/dist/pipeline/src/build/rails/index.js +2 -2
- package/dist/pipeline/src/build/rails/index.js.map +1 -1
- package/dist/pipeline/src/build/rails/{test.js → testJob.js} +1 -1
- package/dist/pipeline/src/build/rails/testJob.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +28 -17
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js.map +1 -1
- package/dist/pipeline/src/deploy/types/executeBase.d.ts +24 -0
- package/dist/pipeline/src/deploy/types/executeBase.js +3 -0
- package/dist/pipeline/src/deploy/types/executeBase.js.map +1 -0
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +5 -4
- package/dist/pipeline/src/deploy/types/googleCloudRun.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/pipeline/src/build/rails/test.js.map +0 -1
- /package/dist/pipeline/src/build/rails/{test.d.ts → testJob.d.ts} +0 -0
|
@@ -8286,6 +8286,120 @@ exports.UserStarredMetricsDashboard = UserStarredMetricsDashboard;
|
|
|
8286
8286
|
exports.Users = Users;
|
|
8287
8287
|
|
|
8288
8288
|
|
|
8289
|
+
/***/ }),
|
|
8290
|
+
|
|
8291
|
+
/***/ 6575:
|
|
8292
|
+
/***/ ((module) => {
|
|
8293
|
+
|
|
8294
|
+
"use strict";
|
|
8295
|
+
|
|
8296
|
+
var ESC = '\u001b[';
|
|
8297
|
+
var x = module.exports;
|
|
8298
|
+
|
|
8299
|
+
x.cursorTo = function (x, y) {
|
|
8300
|
+
if (arguments.length === 0) {
|
|
8301
|
+
return ESC + 'H';
|
|
8302
|
+
}
|
|
8303
|
+
|
|
8304
|
+
if (arguments.length === 1) {
|
|
8305
|
+
return ESC + (x + 1) + 'G';
|
|
8306
|
+
}
|
|
8307
|
+
|
|
8308
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
8309
|
+
};
|
|
8310
|
+
|
|
8311
|
+
x.cursorMove = function (x, y) {
|
|
8312
|
+
var ret = '';
|
|
8313
|
+
|
|
8314
|
+
if (x < 0) {
|
|
8315
|
+
ret += ESC + (-x) + 'D';
|
|
8316
|
+
} else if (x > 0) {
|
|
8317
|
+
ret += ESC + x + 'C';
|
|
8318
|
+
}
|
|
8319
|
+
|
|
8320
|
+
if (y < 0) {
|
|
8321
|
+
ret += ESC + (-y) + 'A';
|
|
8322
|
+
} else if (y > 0) {
|
|
8323
|
+
ret += ESC + y + 'B';
|
|
8324
|
+
}
|
|
8325
|
+
|
|
8326
|
+
return ret;
|
|
8327
|
+
};
|
|
8328
|
+
|
|
8329
|
+
x.cursorUp = function (count) {
|
|
8330
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
8331
|
+
};
|
|
8332
|
+
|
|
8333
|
+
x.cursorDown = function (count) {
|
|
8334
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
8335
|
+
};
|
|
8336
|
+
|
|
8337
|
+
x.cursorForward = function (count) {
|
|
8338
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
8339
|
+
};
|
|
8340
|
+
|
|
8341
|
+
x.cursorBackward = function (count) {
|
|
8342
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
8343
|
+
};
|
|
8344
|
+
|
|
8345
|
+
x.cursorLeft = ESC + '1000D';
|
|
8346
|
+
x.cursorSavePosition = ESC + 's';
|
|
8347
|
+
x.cursorRestorePosition = ESC + 'u';
|
|
8348
|
+
x.cursorGetPosition = ESC + '6n';
|
|
8349
|
+
x.cursorNextLine = ESC + 'E';
|
|
8350
|
+
x.cursorPrevLine = ESC + 'F';
|
|
8351
|
+
x.cursorHide = ESC + '?25l';
|
|
8352
|
+
x.cursorShow = ESC + '?25h';
|
|
8353
|
+
|
|
8354
|
+
x.eraseLines = function (count) {
|
|
8355
|
+
var clear = '';
|
|
8356
|
+
|
|
8357
|
+
for (var i = 0; i < count; i++) {
|
|
8358
|
+
clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : '');
|
|
8359
|
+
}
|
|
8360
|
+
|
|
8361
|
+
return clear;
|
|
8362
|
+
};
|
|
8363
|
+
|
|
8364
|
+
x.eraseEndLine = ESC + 'K';
|
|
8365
|
+
x.eraseStartLine = ESC + '1K';
|
|
8366
|
+
x.eraseLine = ESC + '2K';
|
|
8367
|
+
x.eraseDown = ESC + 'J';
|
|
8368
|
+
x.eraseUp = ESC + '1J';
|
|
8369
|
+
x.eraseScreen = ESC + '2J';
|
|
8370
|
+
x.scrollUp = ESC + 'S';
|
|
8371
|
+
x.scrollDown = ESC + 'T';
|
|
8372
|
+
|
|
8373
|
+
x.clearScreen = '\u001bc';
|
|
8374
|
+
x.beep = '\u0007';
|
|
8375
|
+
|
|
8376
|
+
x.image = function (buf, opts) {
|
|
8377
|
+
opts = opts || {};
|
|
8378
|
+
|
|
8379
|
+
var ret = '\u001b]1337;File=inline=1';
|
|
8380
|
+
|
|
8381
|
+
if (opts.width) {
|
|
8382
|
+
ret += ';width=' + opts.width;
|
|
8383
|
+
}
|
|
8384
|
+
|
|
8385
|
+
if (opts.height) {
|
|
8386
|
+
ret += ';height=' + opts.height;
|
|
8387
|
+
}
|
|
8388
|
+
|
|
8389
|
+
if (opts.preserveAspectRatio === false) {
|
|
8390
|
+
ret += ';preserveAspectRatio=0';
|
|
8391
|
+
}
|
|
8392
|
+
|
|
8393
|
+
return ret + ':' + buf.toString('base64') + '\u0007';
|
|
8394
|
+
};
|
|
8395
|
+
|
|
8396
|
+
x.iTerm = {};
|
|
8397
|
+
|
|
8398
|
+
x.iTerm.setCwd = function (cwd) {
|
|
8399
|
+
return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
|
|
8400
|
+
};
|
|
8401
|
+
|
|
8402
|
+
|
|
8289
8403
|
/***/ }),
|
|
8290
8404
|
|
|
8291
8405
|
/***/ 5067:
|
|
@@ -22747,7 +22861,7 @@ Paginator.prototype.paginate = function (output, active) {
|
|
|
22747
22861
|
|
|
22748
22862
|
"use strict";
|
|
22749
22863
|
|
|
22750
|
-
var ansiEscapes = __nccwpck_require__(
|
|
22864
|
+
var ansiEscapes = __nccwpck_require__(6575);
|
|
22751
22865
|
|
|
22752
22866
|
/**
|
|
22753
22867
|
* Move cursor left by `x`
|
|
@@ -22975,120 +23089,6 @@ exports.fetchAsyncQuestionProperty = function (question, prop, answers) {
|
|
|
22975
23089
|
};
|
|
22976
23090
|
|
|
22977
23091
|
|
|
22978
|
-
/***/ }),
|
|
22979
|
-
|
|
22980
|
-
/***/ 4497:
|
|
22981
|
-
/***/ ((module) => {
|
|
22982
|
-
|
|
22983
|
-
"use strict";
|
|
22984
|
-
|
|
22985
|
-
var ESC = '\u001b[';
|
|
22986
|
-
var x = module.exports;
|
|
22987
|
-
|
|
22988
|
-
x.cursorTo = function (x, y) {
|
|
22989
|
-
if (arguments.length === 0) {
|
|
22990
|
-
return ESC + 'H';
|
|
22991
|
-
}
|
|
22992
|
-
|
|
22993
|
-
if (arguments.length === 1) {
|
|
22994
|
-
return ESC + (x + 1) + 'G';
|
|
22995
|
-
}
|
|
22996
|
-
|
|
22997
|
-
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
22998
|
-
};
|
|
22999
|
-
|
|
23000
|
-
x.cursorMove = function (x, y) {
|
|
23001
|
-
var ret = '';
|
|
23002
|
-
|
|
23003
|
-
if (x < 0) {
|
|
23004
|
-
ret += ESC + (-x) + 'D';
|
|
23005
|
-
} else if (x > 0) {
|
|
23006
|
-
ret += ESC + x + 'C';
|
|
23007
|
-
}
|
|
23008
|
-
|
|
23009
|
-
if (y < 0) {
|
|
23010
|
-
ret += ESC + (-y) + 'A';
|
|
23011
|
-
} else if (y > 0) {
|
|
23012
|
-
ret += ESC + y + 'B';
|
|
23013
|
-
}
|
|
23014
|
-
|
|
23015
|
-
return ret;
|
|
23016
|
-
};
|
|
23017
|
-
|
|
23018
|
-
x.cursorUp = function (count) {
|
|
23019
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
23020
|
-
};
|
|
23021
|
-
|
|
23022
|
-
x.cursorDown = function (count) {
|
|
23023
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
23024
|
-
};
|
|
23025
|
-
|
|
23026
|
-
x.cursorForward = function (count) {
|
|
23027
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
23028
|
-
};
|
|
23029
|
-
|
|
23030
|
-
x.cursorBackward = function (count) {
|
|
23031
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
23032
|
-
};
|
|
23033
|
-
|
|
23034
|
-
x.cursorLeft = ESC + '1000D';
|
|
23035
|
-
x.cursorSavePosition = ESC + 's';
|
|
23036
|
-
x.cursorRestorePosition = ESC + 'u';
|
|
23037
|
-
x.cursorGetPosition = ESC + '6n';
|
|
23038
|
-
x.cursorNextLine = ESC + 'E';
|
|
23039
|
-
x.cursorPrevLine = ESC + 'F';
|
|
23040
|
-
x.cursorHide = ESC + '?25l';
|
|
23041
|
-
x.cursorShow = ESC + '?25h';
|
|
23042
|
-
|
|
23043
|
-
x.eraseLines = function (count) {
|
|
23044
|
-
var clear = '';
|
|
23045
|
-
|
|
23046
|
-
for (var i = 0; i < count; i++) {
|
|
23047
|
-
clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : '');
|
|
23048
|
-
}
|
|
23049
|
-
|
|
23050
|
-
return clear;
|
|
23051
|
-
};
|
|
23052
|
-
|
|
23053
|
-
x.eraseEndLine = ESC + 'K';
|
|
23054
|
-
x.eraseStartLine = ESC + '1K';
|
|
23055
|
-
x.eraseLine = ESC + '2K';
|
|
23056
|
-
x.eraseDown = ESC + 'J';
|
|
23057
|
-
x.eraseUp = ESC + '1J';
|
|
23058
|
-
x.eraseScreen = ESC + '2J';
|
|
23059
|
-
x.scrollUp = ESC + 'S';
|
|
23060
|
-
x.scrollDown = ESC + 'T';
|
|
23061
|
-
|
|
23062
|
-
x.clearScreen = '\u001bc';
|
|
23063
|
-
x.beep = '\u0007';
|
|
23064
|
-
|
|
23065
|
-
x.image = function (buf, opts) {
|
|
23066
|
-
opts = opts || {};
|
|
23067
|
-
|
|
23068
|
-
var ret = '\u001b]1337;File=inline=1';
|
|
23069
|
-
|
|
23070
|
-
if (opts.width) {
|
|
23071
|
-
ret += ';width=' + opts.width;
|
|
23072
|
-
}
|
|
23073
|
-
|
|
23074
|
-
if (opts.height) {
|
|
23075
|
-
ret += ';height=' + opts.height;
|
|
23076
|
-
}
|
|
23077
|
-
|
|
23078
|
-
if (opts.preserveAspectRatio === false) {
|
|
23079
|
-
ret += ';preserveAspectRatio=0';
|
|
23080
|
-
}
|
|
23081
|
-
|
|
23082
|
-
return ret + ':' + buf.toString('base64') + '\u0007';
|
|
23083
|
-
};
|
|
23084
|
-
|
|
23085
|
-
x.iTerm = {};
|
|
23086
|
-
|
|
23087
|
-
x.iTerm.setCwd = function (cwd) {
|
|
23088
|
-
return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
|
|
23089
|
-
};
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
23092
|
/***/ }),
|
|
23093
23093
|
|
|
23094
23094
|
/***/ 6695:
|
|
@@ -69626,120 +69626,6 @@ Object.defineProperty(vorpal, 'activeCommand', {
|
|
|
69626
69626
|
}
|
|
69627
69627
|
});
|
|
69628
69628
|
|
|
69629
|
-
/***/ }),
|
|
69630
|
-
|
|
69631
|
-
/***/ 7374:
|
|
69632
|
-
/***/ ((module) => {
|
|
69633
|
-
|
|
69634
|
-
"use strict";
|
|
69635
|
-
|
|
69636
|
-
var ESC = '\u001b[';
|
|
69637
|
-
var x = module.exports;
|
|
69638
|
-
|
|
69639
|
-
x.cursorTo = function (x, y) {
|
|
69640
|
-
if (arguments.length === 0) {
|
|
69641
|
-
return ESC + 'H';
|
|
69642
|
-
}
|
|
69643
|
-
|
|
69644
|
-
if (arguments.length === 1) {
|
|
69645
|
-
return ESC + (x + 1) + 'G';
|
|
69646
|
-
}
|
|
69647
|
-
|
|
69648
|
-
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
69649
|
-
};
|
|
69650
|
-
|
|
69651
|
-
x.cursorMove = function (x, y) {
|
|
69652
|
-
var ret = '';
|
|
69653
|
-
|
|
69654
|
-
if (x < 0) {
|
|
69655
|
-
ret += ESC + (-x) + 'D';
|
|
69656
|
-
} else if (x > 0) {
|
|
69657
|
-
ret += ESC + x + 'C';
|
|
69658
|
-
}
|
|
69659
|
-
|
|
69660
|
-
if (y < 0) {
|
|
69661
|
-
ret += ESC + (-y) + 'A';
|
|
69662
|
-
} else if (y > 0) {
|
|
69663
|
-
ret += ESC + y + 'B';
|
|
69664
|
-
}
|
|
69665
|
-
|
|
69666
|
-
return ret;
|
|
69667
|
-
};
|
|
69668
|
-
|
|
69669
|
-
x.cursorUp = function (count) {
|
|
69670
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
69671
|
-
};
|
|
69672
|
-
|
|
69673
|
-
x.cursorDown = function (count) {
|
|
69674
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
69675
|
-
};
|
|
69676
|
-
|
|
69677
|
-
x.cursorForward = function (count) {
|
|
69678
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
69679
|
-
};
|
|
69680
|
-
|
|
69681
|
-
x.cursorBackward = function (count) {
|
|
69682
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
69683
|
-
};
|
|
69684
|
-
|
|
69685
|
-
x.cursorLeft = ESC + '1000D';
|
|
69686
|
-
x.cursorSavePosition = ESC + 's';
|
|
69687
|
-
x.cursorRestorePosition = ESC + 'u';
|
|
69688
|
-
x.cursorGetPosition = ESC + '6n';
|
|
69689
|
-
x.cursorNextLine = ESC + 'E';
|
|
69690
|
-
x.cursorPrevLine = ESC + 'F';
|
|
69691
|
-
x.cursorHide = ESC + '?25l';
|
|
69692
|
-
x.cursorShow = ESC + '?25h';
|
|
69693
|
-
|
|
69694
|
-
x.eraseLines = function (count) {
|
|
69695
|
-
var clear = '';
|
|
69696
|
-
|
|
69697
|
-
for (var i = 0; i < count; i++) {
|
|
69698
|
-
clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : '');
|
|
69699
|
-
}
|
|
69700
|
-
|
|
69701
|
-
return clear;
|
|
69702
|
-
};
|
|
69703
|
-
|
|
69704
|
-
x.eraseEndLine = ESC + 'K';
|
|
69705
|
-
x.eraseStartLine = ESC + '1K';
|
|
69706
|
-
x.eraseLine = ESC + '2K';
|
|
69707
|
-
x.eraseDown = ESC + 'J';
|
|
69708
|
-
x.eraseUp = ESC + '1J';
|
|
69709
|
-
x.eraseScreen = ESC + '2J';
|
|
69710
|
-
x.scrollUp = ESC + 'S';
|
|
69711
|
-
x.scrollDown = ESC + 'T';
|
|
69712
|
-
|
|
69713
|
-
x.clearScreen = '\u001bc';
|
|
69714
|
-
x.beep = '\u0007';
|
|
69715
|
-
|
|
69716
|
-
x.image = function (buf, opts) {
|
|
69717
|
-
opts = opts || {};
|
|
69718
|
-
|
|
69719
|
-
var ret = '\u001b]1337;File=inline=1';
|
|
69720
|
-
|
|
69721
|
-
if (opts.width) {
|
|
69722
|
-
ret += ';width=' + opts.width;
|
|
69723
|
-
}
|
|
69724
|
-
|
|
69725
|
-
if (opts.height) {
|
|
69726
|
-
ret += ';height=' + opts.height;
|
|
69727
|
-
}
|
|
69728
|
-
|
|
69729
|
-
if (opts.preserveAspectRatio === false) {
|
|
69730
|
-
ret += ';preserveAspectRatio=0';
|
|
69731
|
-
}
|
|
69732
|
-
|
|
69733
|
-
return ret + ':' + buf.toString('base64') + '\u0007';
|
|
69734
|
-
};
|
|
69735
|
-
|
|
69736
|
-
x.iTerm = {};
|
|
69737
|
-
|
|
69738
|
-
x.iTerm.setCwd = function (cwd) {
|
|
69739
|
-
return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
|
|
69740
|
-
};
|
|
69741
|
-
|
|
69742
|
-
|
|
69743
69629
|
/***/ }),
|
|
69744
69630
|
|
|
69745
69631
|
/***/ 1982:
|
|
@@ -70018,7 +69904,7 @@ module.exports = function (x) {
|
|
|
70018
69904
|
|
|
70019
69905
|
"use strict";
|
|
70020
69906
|
|
|
70021
|
-
var ansiEscapes = __nccwpck_require__(
|
|
69907
|
+
var ansiEscapes = __nccwpck_require__(6575);
|
|
70022
69908
|
var cliCursor = __nccwpck_require__(2701);
|
|
70023
69909
|
|
|
70024
69910
|
function main(stream) {
|
|
@@ -2520,16 +2520,16 @@ exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
|
2520
2520
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2521
2521
|
exports.createRailsJobs = void 0;
|
|
2522
2522
|
const build_1 = __nccwpck_require__(7261);
|
|
2523
|
-
const
|
|
2523
|
+
const testJob_1 = __nccwpck_require__(5771);
|
|
2524
2524
|
const createRailsJobs = (context) => {
|
|
2525
|
-
return [...(0,
|
|
2525
|
+
return [...(0, testJob_1.createRailsTestJobs)(context), ...(0, build_1.createRailsBuildJobs)(context)];
|
|
2526
2526
|
};
|
|
2527
2527
|
exports.createRailsJobs = createRailsJobs;
|
|
2528
2528
|
//# sourceMappingURL=index.js.map
|
|
2529
2529
|
|
|
2530
2530
|
/***/ }),
|
|
2531
2531
|
|
|
2532
|
-
/***/
|
|
2532
|
+
/***/ 5771:
|
|
2533
2533
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2534
2534
|
|
|
2535
2535
|
"use strict";
|
|
@@ -2636,7 +2636,7 @@ const createRailsTestJobs = (context) => {
|
|
|
2636
2636
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
2637
2637
|
};
|
|
2638
2638
|
exports.createRailsTestJobs = createRailsTestJobs;
|
|
2639
|
-
//# sourceMappingURL=
|
|
2639
|
+
//# sourceMappingURL=testJob.js.map
|
|
2640
2640
|
|
|
2641
2641
|
/***/ }),
|
|
2642
2642
|
|
|
@@ -4214,6 +4214,7 @@ exports.ENV_VARS_FILENAME = "____envvars.yaml";
|
|
|
4214
4214
|
|
|
4215
4215
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4216
4216
|
exports.getOnDeployExecuteScript = void 0;
|
|
4217
|
+
const utils_1 = __nccwpck_require__(2497);
|
|
4217
4218
|
const createArgsString_1 = __nccwpck_require__(9598);
|
|
4218
4219
|
const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
|
|
4219
4220
|
const jobName_1 = __nccwpck_require__(9626);
|
|
@@ -4223,7 +4224,7 @@ const getOnDeployExecuteScript = (context, when) => {
|
|
|
4223
4224
|
const executes = getExecutes(context);
|
|
4224
4225
|
return executes
|
|
4225
4226
|
.filter(({ config }) => config.when === when)
|
|
4226
|
-
.
|
|
4227
|
+
.flatMap((execute) => {
|
|
4227
4228
|
return getJobRunScriptForExecute(context, execute);
|
|
4228
4229
|
});
|
|
4229
4230
|
};
|
|
@@ -4234,7 +4235,8 @@ const getExecutes = (context) => {
|
|
|
4234
4235
|
return [
|
|
4235
4236
|
...getLegacyExecutes(context),
|
|
4236
4237
|
...Object.entries((_a = deployConfig.execute) !== null && _a !== void 0 ? _a : {}).flatMap(([key, value]) => {
|
|
4237
|
-
|
|
4238
|
+
// remove all schedule executes
|
|
4239
|
+
if (!value) {
|
|
4238
4240
|
return [];
|
|
4239
4241
|
}
|
|
4240
4242
|
return [
|
|
@@ -4272,21 +4274,30 @@ const getLegacyExecutes = (context) => {
|
|
|
4272
4274
|
};
|
|
4273
4275
|
const getJobRunScriptForExecute = (context, { jobName, config }) => {
|
|
4274
4276
|
var _a;
|
|
4275
|
-
const
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4277
|
+
const type = config.type;
|
|
4278
|
+
if (type === "script") {
|
|
4279
|
+
return (0, utils_1.ensureArray)(config.script);
|
|
4280
|
+
}
|
|
4281
|
+
else if (type === "job") {
|
|
4282
|
+
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
4283
|
+
// always wait for completion for preStop and postStop jobs
|
|
4284
|
+
// since stop will delete the jobs afterwards, so they will fail
|
|
4285
|
+
const waitForCompletion = ["preStop", "postStop"].includes(config.when)
|
|
4286
|
+
? true // always
|
|
4287
|
+
: "waitForCompletion" in config
|
|
4288
|
+
? ((_a = config.waitForCompletion) !== null && _a !== void 0 ? _a : false) // depends on config
|
|
4289
|
+
: false;
|
|
4290
|
+
const argString = (0, createArgsString_1.createArgsString)({
|
|
4291
|
+
...commonArgs,
|
|
4292
|
+
wait: waitForCompletion === true ? true : undefined,
|
|
4293
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(config.args),
|
|
4294
|
+
});
|
|
4295
|
+
const fullJobName = (0, jobName_1.getFullJobName)(context, jobName);
|
|
4296
|
+
return [
|
|
4297
|
+
`${(0, common_1.gcloudRunCmd)()} jobs execute ${fullJobName.toString()} ${argString}`,
|
|
4298
|
+
];
|
|
4299
|
+
}
|
|
4300
|
+
throw new Error(`unsupported execute type: ${type}`);
|
|
4290
4301
|
};
|
|
4291
4302
|
//# sourceMappingURL=onDeploy.js.map
|
|
4292
4303
|
|