@catladder/cli 1.149.3 → 1.150.0
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 +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +8 -0
- package/dist/pipeline/src/pipeline/createAllJobs.js +61 -38
- package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +3 -3
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -51
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
59
59
|
var fullServiceName = serviceName.concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
60
60
|
var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
|
|
61
61
|
// command as empty string resets it to default (uses the image's entrypoint)
|
|
62
|
-
command: commandArray ? '"' + commandArray.join(",") + '"' : '""' }, commonDeployArgs), { labels: (0, common_1.makeLabelString)(__assign(__assign({}, (0, getLabels_1.getLabels)(context)), { "cloud-run-service-name": fullServiceName })), "env-vars-file": constants_1.ENV_VARS_FILENAME, "min-instances": (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _b !== void 0 ? _b : 0, "max-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _c !== void 0 ? _c : 100, "cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true, cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu, memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory, "allow-unauthenticated": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _d !== void 0 ? _d : true, ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all", "cpu-boost": true, "execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment })], __read((0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service")), false));
|
|
62
|
+
command: commandArray ? '"' + commandArray.join(",") + '"' : '""' }, commonDeployArgs), { labels: (0, common_1.makeLabelString)(__assign(__assign({}, (0, getLabels_1.getLabels)(context)), { "cloud-run-service-name": fullServiceName })), "env-vars-file": constants_1.ENV_VARS_FILENAME, "min-instances": (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _b !== void 0 ? _b : 0, "max-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _c !== void 0 ? _c : 100, "cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true, cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu, memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory, timeout: customConfig === null || customConfig === void 0 ? void 0 : customConfig.timeout, "allow-unauthenticated": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _d !== void 0 ? _d : true, ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all", "cpu-boost": true, "execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment })], __read((0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service")), false));
|
|
63
63
|
// volumes require beta
|
|
64
64
|
var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
|
|
65
65
|
return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudRunServices.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAuD;AAIvD,8DAA6D;AAC7D,0DAAyD;AACzD,mCAKkB;AAClB,yCAAgD;AAChD,qCAA+C;AAExC,IAAM,sBAAsB,GAAG,UACpC,OAAyB,EACzB,OAAuD,EACvD,UAAmB;;IAEnB,IAAM,gBAAgB,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;IAEtD,IAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,IAAM,YAAY,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5D,IAAM,OAAO,GACX,OAAO,KAAK,IAAI;QACd,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;QACvD,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAM,YAAY,GAAG,OAAO;QAC1B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YACtB,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACtB,CAAC,CAAC,SAAS,CAAC;IACd,IAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC,CAAC;IAC7D,IAAM,UAAU,GAAG,mCAAgB;YAE/B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E,OAAO,UAAG,IAAA,qBAAY,EACpB,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAClC,qBAAW,eAAe,cAAI,UAAU,CAAE,CAAC;AAC9C,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cloudRunServices.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAuD;AAIvD,8DAA6D;AAC7D,0DAAyD;AACzD,mCAKkB;AAClB,yCAAgD;AAChD,qCAA+C;AAExC,IAAM,sBAAsB,GAAG,UACpC,OAAyB,EACzB,OAAuD,EACvD,UAAmB;;IAEnB,IAAM,gBAAgB,GAAG,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;IAEtD,IAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,IAAM,YAAY,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5D,IAAM,OAAO,GACX,OAAO,KAAK,IAAI;QACd,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;QACvD,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAM,YAAY,GAAG,OAAO;QAC1B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YACtB,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACtB,CAAC,CAAC,SAAS,CAAC;IACd,IAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC,CAAC;IAC7D,IAAM,UAAU,GAAG,mCAAgB;YAE/B,6EAA6E;YAC7E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E,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzE,OAAO,UAAG,IAAA,qBAAY,EACpB,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAClC,qBAAW,eAAe,cAAI,UAAU,CAAE,CAAC;AAC9C,CAAC,CAAC;AAnDW,QAAA,sBAAsB,0BAmDjC;AAEK,IAAM,sBAAsB,GAAG,UACpC,OAAyB,EACzB,aAAsB;IAEtB,IAAM,UAAU,GAAG,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;IAElD,IAAM,gBAAgB,GAAG,IAAA,mCAAgB,EAAC,UAAU,CAAC,CAAC;IAEtD,IAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,IAAM,eAAe,GAAG,aAAa;QACnC,CAAC,CAAC,UAAG,WAAW,cAAI,aAAa,CAAE;QACnC,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO;QACL,UAAG,IAAA,qBAAY,GAAE,8BAAoB,eAAe,cAAI,gBAAgB,CAAE;KAC3E,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,sBAAsB,0BAiBjC"}
|
|
@@ -89,6 +89,14 @@ export type DeployConfigCloudRunService = {
|
|
|
89
89
|
* memory limit. Defaults to 512MB
|
|
90
90
|
*/
|
|
91
91
|
memory?: Memory;
|
|
92
|
+
/**
|
|
93
|
+
* timeout of the service, defaults to 5 minutes.
|
|
94
|
+
*
|
|
95
|
+
* you can specify something like 10m30s. if its just a number, it will be interpreted as seconds
|
|
96
|
+
*
|
|
97
|
+
* max supported is 60min
|
|
98
|
+
*/
|
|
99
|
+
timeout?: string;
|
|
92
100
|
/**
|
|
93
101
|
*
|
|
94
102
|
* set the execution environment.
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,48 +49,60 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
50
|
exports.createAllJobs = void 0;
|
|
40
51
|
var config_1 = require("../config");
|
|
52
|
+
var context_1 = require("../context");
|
|
41
53
|
var createJobsForComponent_1 = require("./createJobsForComponent");
|
|
42
|
-
var
|
|
43
|
-
var _c, _d;
|
|
54
|
+
var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
44
55
|
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
45
|
-
return __generator(this, function (
|
|
46
|
-
switch (
|
|
47
|
-
case 0:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
return __generator(this, function (
|
|
52
|
-
switch (
|
|
53
|
-
case 0:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
trigger: trigger,
|
|
68
|
-
pipelineType: pipelineType,
|
|
69
|
-
})];
|
|
70
|
-
case 1: return [2 /*return*/, _a.concat([
|
|
71
|
-
_b.sent()
|
|
72
|
-
])];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}); }))];
|
|
76
|
-
case 1: return [2 /*return*/, _a.concat([
|
|
77
|
-
_c.apply(_b, [_d.sent()])
|
|
78
|
-
])];
|
|
56
|
+
return __generator(this, function (_c) {
|
|
57
|
+
switch (_c.label) {
|
|
58
|
+
case 0: return [4 /*yield*/, Promise.all(Object.keys(config.components).flatMap(function (componentName) {
|
|
59
|
+
var envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
|
|
60
|
+
return envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
|
|
61
|
+
var context;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
|
|
65
|
+
config: config,
|
|
66
|
+
componentName: componentName,
|
|
67
|
+
env: env,
|
|
68
|
+
trigger: trigger,
|
|
69
|
+
pipelineType: pipelineType,
|
|
70
|
+
})];
|
|
71
|
+
case 1:
|
|
72
|
+
context = _a.sent();
|
|
73
|
+
return [2 /*return*/, {
|
|
74
|
+
env: env,
|
|
75
|
+
componentName: componentName,
|
|
76
|
+
context: context,
|
|
77
|
+
}];
|
|
79
78
|
}
|
|
80
79
|
});
|
|
81
|
-
}); })
|
|
82
|
-
|
|
80
|
+
}); });
|
|
81
|
+
}))];
|
|
82
|
+
case 1: return [2 /*return*/, _c.sent()];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}); };
|
|
86
|
+
var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
87
|
+
var allComponentContext;
|
|
88
|
+
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
89
|
+
return __generator(this, function (_c) {
|
|
90
|
+
switch (_c.label) {
|
|
91
|
+
case 0: return [4 /*yield*/, createAllComponentContext({
|
|
92
|
+
config: config,
|
|
93
|
+
trigger: trigger,
|
|
94
|
+
pipelineType: pipelineType,
|
|
95
|
+
})];
|
|
96
|
+
case 1:
|
|
97
|
+
allComponentContext = _c.sent();
|
|
98
|
+
return [2 /*return*/, allComponentContext.reduce(function (acc, _a) {
|
|
99
|
+
var componentName = _a.componentName, env = _a.env, context = _a.context;
|
|
100
|
+
if (!acc[componentName]) {
|
|
101
|
+
acc[componentName] = {};
|
|
102
|
+
}
|
|
103
|
+
acc[componentName][env] = (0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); });
|
|
104
|
+
return acc;
|
|
105
|
+
}, {})];
|
|
83
106
|
}
|
|
84
107
|
});
|
|
85
108
|
}); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAllJobs.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createAllJobs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createAllJobs.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createAllJobs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAgD;AAChD,sCAAoD;AAQpD,mEAAyE;AAczE,IAAM,yBAAyB,GAAG,iEAAO,EAIxB;QAHf,MAAM,YAAA,EACN,OAAO,aAAA,EACP,YAAY,kBAAA;;;oBAQL,qBAAM,OAAO,CAAC,GAAG,CACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,aAAa;oBACnD,IAAM,IAAI,GAAG,IAAA,4BAAmB,EAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;oBACjE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAO,GAAG;;;;wCACR,qBAAM,IAAA,gCAAsB,EAAC;wCAC3C,MAAM,QAAA;wCACN,aAAa,eAAA;wCACb,GAAG,KAAA;wCACH,OAAO,SAAA;wCACP,YAAY,cAAA;qCACb,CAAC,EAAA;;oCANI,OAAO,GAAG,SAMd;oCAEF,sBAAO;4CACL,GAAG,KAAA;4CACH,aAAa,eAAA;4CACb,OAAO,SAAA;yCACR,EAAC;;;yBACH,CAAC,CAAC;gBACL,CAAC,CAAC,CACH,EAAA;oBAnBD,sBAAO,SAmBN,EAAC;;;KACH,CAAC;AAEK,IAAM,aAAa,GAAG,iEAAO,EAInB;;QAHf,MAAM,YAAA,EACN,OAAO,aAAA,EACP,YAAY,kBAAA;;;oBAEgB,qBAAM,yBAAyB,CAAC;oBAC1D,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,cAAA;iBACb,CAAC,EAAA;;gBAJI,mBAAmB,GAAG,SAI1B;gBAEF,sBAAO,mBAAmB,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,EAA+B;4BAA7B,aAAa,mBAAA,EAAE,GAAG,SAAA,EAAE,OAAO,aAAA;wBACnE,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;4BACxB,GAAG,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC;wBAC1B,CAAC;wBACD,GAAG,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,GAAG,IAAA,sDAA6B,EAAC,OAAO,CAAC,CAAC,GAAG,CAClE,UAAC,GAAG,IAAK,OAAA,uBACJ,GAAG,KACN,OAAO,SAAA,IACP,EAHO,CAGP,CACH,CAAC;wBAEF,OAAO,GAAG,CAAC;oBACb,CAAC,EAAE,EAAsB,CAAC,EAAC;;;KAC5B,CAAC;AAxBW,QAAA,aAAa,iBAwBxB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export declare const
|
|
1
|
+
import type { ComponentContext } from "../types/context";
|
|
2
|
+
import type { CatladderJob } from "../types/jobs";
|
|
3
|
+
export declare const createJobsForComponentContext: (context: ComponentContext) => CatladderJob[];
|
|
@@ -10,42 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
14
|
var t = {};
|
|
51
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -83,9 +47,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
83
47
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
84
48
|
};
|
|
85
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
86
|
-
exports.
|
|
50
|
+
exports.createJobsForComponentContext = void 0;
|
|
87
51
|
var build_1 = require("../build");
|
|
88
|
-
var context_1 = require("../context");
|
|
89
52
|
var deploy_1 = require("../deploy");
|
|
90
53
|
var injectDefaultVarsInCustomJobs = function (context, jobs) {
|
|
91
54
|
return jobs.map(function (_a) {
|
|
@@ -101,7 +64,7 @@ var getCustomJobs = function (context) {
|
|
|
101
64
|
var rawJobs = context.customJobs;
|
|
102
65
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
103
66
|
};
|
|
104
|
-
var
|
|
67
|
+
var createJobsForComponentContext = function (context) {
|
|
105
68
|
var _a, _b;
|
|
106
69
|
var buildJobs = build_1.BUILD_TYPES[context.build.config.type].jobs(context);
|
|
107
70
|
var deployJobs = ((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config)
|
|
@@ -110,16 +73,5 @@ var createRawJobs = function (context) {
|
|
|
110
73
|
var customJobs = getCustomJobs(context);
|
|
111
74
|
return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
|
|
112
75
|
};
|
|
113
|
-
|
|
114
|
-
var context;
|
|
115
|
-
return __generator(this, function (_a) {
|
|
116
|
-
switch (_a.label) {
|
|
117
|
-
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)(contextContext)];
|
|
118
|
-
case 1:
|
|
119
|
-
context = _a.sent();
|
|
120
|
-
return [2 /*return*/, createRawJobs(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); })];
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
}); };
|
|
124
|
-
exports.createJobsForComponent = createJobsForComponent;
|
|
76
|
+
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
125
77
|
//# sourceMappingURL=createJobsForComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createJobsForComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createJobsForComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAuC;AACvC,oCAAyC;AAIzC,IAAM,6BAA6B,GAAG,UACpC,OAAyB,EACzB,IAAoB;IAEpB,OAAA,IAAI,CAAC,GAAG,CAAC,UAAC,EAAqB;;QAAnB,IAAA,SAAS,eAAA,EAAK,GAAG,cAAnB,aAAqB,CAAF;QAAO,OAAA,YAClC,SAAS,wBACJ,CAAC,MAAA,OAAO,CAAC,WAAW,CAAC,OAAO,mCAAI,EAAE,CAAC,GACnC,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,KAEnB,GAAG,EACN,CAAA;KAAA,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