@catladder/cli 0.0.0-main-bdf1fe37 → 0.0.0-main-34f06a85
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 +73 -67
- package/dist/bundles/cli/index.js +73 -67
- package/dist/pipeline/src/pipeline/createAllJobs.js +70 -16
- 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
|
@@ -7428,6 +7428,17 @@ exports["default"] = ownPkg;
|
|
|
7428
7428
|
|
|
7429
7429
|
"use strict";
|
|
7430
7430
|
|
|
7431
|
+
var __assign = (this && this.__assign) || function () {
|
|
7432
|
+
__assign = Object.assign || function(t) {
|
|
7433
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7434
|
+
s = arguments[i];
|
|
7435
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7436
|
+
t[p] = s[p];
|
|
7437
|
+
}
|
|
7438
|
+
return t;
|
|
7439
|
+
};
|
|
7440
|
+
return __assign.apply(this, arguments);
|
|
7441
|
+
};
|
|
7431
7442
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7432
7443
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7433
7444
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7464,11 +7475,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
7464
7475
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7465
7476
|
}
|
|
7466
7477
|
};
|
|
7478
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
7479
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
7480
|
+
if (!m) return o;
|
|
7481
|
+
var i = m.call(o), r, ar = [], e;
|
|
7482
|
+
try {
|
|
7483
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7484
|
+
}
|
|
7485
|
+
catch (error) { e = { error: error }; }
|
|
7486
|
+
finally {
|
|
7487
|
+
try {
|
|
7488
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
7489
|
+
}
|
|
7490
|
+
finally { if (e) throw e.error; }
|
|
7491
|
+
}
|
|
7492
|
+
return ar;
|
|
7493
|
+
};
|
|
7467
7494
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7468
7495
|
exports.createAllJobs = void 0;
|
|
7469
7496
|
var config_1 = __nccwpck_require__(3352);
|
|
7497
|
+
var context_1 = __nccwpck_require__(5875);
|
|
7470
7498
|
var createJobsForComponent_1 = __nccwpck_require__(2321);
|
|
7471
|
-
var
|
|
7499
|
+
var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
7472
7500
|
var _c, _d;
|
|
7473
7501
|
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
7474
7502
|
return __generator(this, function (_e) {
|
|
@@ -7484,21 +7512,19 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
7484
7512
|
_a = [componentName];
|
|
7485
7513
|
_c = (_b = Object).fromEntries;
|
|
7486
7514
|
return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7487
|
-
var
|
|
7488
|
-
return __generator(this, function (
|
|
7489
|
-
switch (
|
|
7490
|
-
case 0:
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
_b.sent()
|
|
7501
|
-
])];
|
|
7515
|
+
var context;
|
|
7516
|
+
return __generator(this, function (_a) {
|
|
7517
|
+
switch (_a.label) {
|
|
7518
|
+
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
|
|
7519
|
+
config: config,
|
|
7520
|
+
componentName: componentName,
|
|
7521
|
+
env: env,
|
|
7522
|
+
trigger: trigger,
|
|
7523
|
+
pipelineType: pipelineType,
|
|
7524
|
+
})];
|
|
7525
|
+
case 1:
|
|
7526
|
+
context = _a.sent();
|
|
7527
|
+
return [2 /*return*/, [env, context]];
|
|
7502
7528
|
}
|
|
7503
7529
|
});
|
|
7504
7530
|
}); }))];
|
|
@@ -7512,6 +7538,34 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
7512
7538
|
}
|
|
7513
7539
|
});
|
|
7514
7540
|
}); };
|
|
7541
|
+
var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
7542
|
+
var allComponentContext;
|
|
7543
|
+
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
7544
|
+
return __generator(this, function (_c) {
|
|
7545
|
+
switch (_c.label) {
|
|
7546
|
+
case 0: return [4 /*yield*/, createAllComponentContext({
|
|
7547
|
+
config: config,
|
|
7548
|
+
trigger: trigger,
|
|
7549
|
+
pipelineType: pipelineType,
|
|
7550
|
+
})];
|
|
7551
|
+
case 1:
|
|
7552
|
+
allComponentContext = _c.sent();
|
|
7553
|
+
return [2 /*return*/, Object.fromEntries(Object.entries(allComponentContext).map(function (_a) {
|
|
7554
|
+
var _b = __read(_a, 2), componentName = _b[0], envs = _b[1];
|
|
7555
|
+
return [
|
|
7556
|
+
componentName,
|
|
7557
|
+
Object.fromEntries(Object.entries(envs).map(function (_a) {
|
|
7558
|
+
var _b = __read(_a, 2), env = _b[0], context = _b[1];
|
|
7559
|
+
return [
|
|
7560
|
+
env,
|
|
7561
|
+
(0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); }),
|
|
7562
|
+
];
|
|
7563
|
+
})),
|
|
7564
|
+
];
|
|
7565
|
+
}))];
|
|
7566
|
+
}
|
|
7567
|
+
});
|
|
7568
|
+
}); };
|
|
7515
7569
|
exports.createAllJobs = createAllJobs;
|
|
7516
7570
|
//# sourceMappingURL=createAllJobs.js.map
|
|
7517
7571
|
|
|
@@ -7616,42 +7670,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
7616
7670
|
};
|
|
7617
7671
|
return __assign.apply(this, arguments);
|
|
7618
7672
|
};
|
|
7619
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7620
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7621
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7622
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7623
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7624
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7625
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7626
|
-
});
|
|
7627
|
-
};
|
|
7628
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
7629
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7630
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7631
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7632
|
-
function step(op) {
|
|
7633
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
7634
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
7635
|
-
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;
|
|
7636
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7637
|
-
switch (op[0]) {
|
|
7638
|
-
case 0: case 1: t = op; break;
|
|
7639
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
7640
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7641
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7642
|
-
default:
|
|
7643
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7644
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7645
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7646
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7647
|
-
if (t[2]) _.ops.pop();
|
|
7648
|
-
_.trys.pop(); continue;
|
|
7649
|
-
}
|
|
7650
|
-
op = body.call(thisArg, _);
|
|
7651
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7652
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7653
|
-
}
|
|
7654
|
-
};
|
|
7655
7673
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
7656
7674
|
var t = {};
|
|
7657
7675
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -7689,9 +7707,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7689
7707
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
7690
7708
|
};
|
|
7691
7709
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7692
|
-
exports.
|
|
7710
|
+
exports.createJobsForComponentContext = void 0;
|
|
7693
7711
|
var build_1 = __nccwpck_require__(7862);
|
|
7694
|
-
var context_1 = __nccwpck_require__(5875);
|
|
7695
7712
|
var deploy_1 = __nccwpck_require__(8483);
|
|
7696
7713
|
var injectDefaultVarsInCustomJobs = function (context, jobs) {
|
|
7697
7714
|
return jobs.map(function (_a) {
|
|
@@ -7707,7 +7724,7 @@ var getCustomJobs = function (context) {
|
|
|
7707
7724
|
var rawJobs = context.customJobs;
|
|
7708
7725
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
7709
7726
|
};
|
|
7710
|
-
var
|
|
7727
|
+
var createJobsForComponentContext = function (context) {
|
|
7711
7728
|
var _a, _b;
|
|
7712
7729
|
var buildJobs = build_1.BUILD_TYPES[context.build.config.type].jobs(context);
|
|
7713
7730
|
var deployJobs = ((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config)
|
|
@@ -7716,18 +7733,7 @@ var createRawJobs = function (context) {
|
|
|
7716
7733
|
var customJobs = getCustomJobs(context);
|
|
7717
7734
|
return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
|
|
7718
7735
|
};
|
|
7719
|
-
|
|
7720
|
-
var context;
|
|
7721
|
-
return __generator(this, function (_a) {
|
|
7722
|
-
switch (_a.label) {
|
|
7723
|
-
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)(contextContext)];
|
|
7724
|
-
case 1:
|
|
7725
|
-
context = _a.sent();
|
|
7726
|
-
return [2 /*return*/, createRawJobs(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); })];
|
|
7727
|
-
}
|
|
7728
|
-
});
|
|
7729
|
-
}); };
|
|
7730
|
-
exports.createJobsForComponent = createJobsForComponent;
|
|
7736
|
+
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
7731
7737
|
//# sourceMappingURL=createJobsForComponent.js.map
|
|
7732
7738
|
|
|
7733
7739
|
/***/ }),
|
|
@@ -14872,6 +14872,17 @@ exports["default"] = ownPkg;
|
|
|
14872
14872
|
|
|
14873
14873
|
"use strict";
|
|
14874
14874
|
|
|
14875
|
+
var __assign = (this && this.__assign) || function () {
|
|
14876
|
+
__assign = Object.assign || function(t) {
|
|
14877
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14878
|
+
s = arguments[i];
|
|
14879
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14880
|
+
t[p] = s[p];
|
|
14881
|
+
}
|
|
14882
|
+
return t;
|
|
14883
|
+
};
|
|
14884
|
+
return __assign.apply(this, arguments);
|
|
14885
|
+
};
|
|
14875
14886
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14876
14887
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14877
14888
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14908,11 +14919,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14908
14919
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
14909
14920
|
}
|
|
14910
14921
|
};
|
|
14922
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14923
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14924
|
+
if (!m) return o;
|
|
14925
|
+
var i = m.call(o), r, ar = [], e;
|
|
14926
|
+
try {
|
|
14927
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
14928
|
+
}
|
|
14929
|
+
catch (error) { e = { error: error }; }
|
|
14930
|
+
finally {
|
|
14931
|
+
try {
|
|
14932
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
14933
|
+
}
|
|
14934
|
+
finally { if (e) throw e.error; }
|
|
14935
|
+
}
|
|
14936
|
+
return ar;
|
|
14937
|
+
};
|
|
14911
14938
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14912
14939
|
exports.createAllJobs = void 0;
|
|
14913
14940
|
var config_1 = __nccwpck_require__(13352);
|
|
14941
|
+
var context_1 = __nccwpck_require__(5875);
|
|
14914
14942
|
var createJobsForComponent_1 = __nccwpck_require__(92321);
|
|
14915
|
-
var
|
|
14943
|
+
var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
14916
14944
|
var _c, _d;
|
|
14917
14945
|
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
14918
14946
|
return __generator(this, function (_e) {
|
|
@@ -14928,21 +14956,19 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
14928
14956
|
_a = [componentName];
|
|
14929
14957
|
_c = (_b = Object).fromEntries;
|
|
14930
14958
|
return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14931
|
-
var
|
|
14932
|
-
return __generator(this, function (
|
|
14933
|
-
switch (
|
|
14934
|
-
case 0:
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
_b.sent()
|
|
14945
|
-
])];
|
|
14959
|
+
var context;
|
|
14960
|
+
return __generator(this, function (_a) {
|
|
14961
|
+
switch (_a.label) {
|
|
14962
|
+
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
|
|
14963
|
+
config: config,
|
|
14964
|
+
componentName: componentName,
|
|
14965
|
+
env: env,
|
|
14966
|
+
trigger: trigger,
|
|
14967
|
+
pipelineType: pipelineType,
|
|
14968
|
+
})];
|
|
14969
|
+
case 1:
|
|
14970
|
+
context = _a.sent();
|
|
14971
|
+
return [2 /*return*/, [env, context]];
|
|
14946
14972
|
}
|
|
14947
14973
|
});
|
|
14948
14974
|
}); }))];
|
|
@@ -14956,6 +14982,34 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
14956
14982
|
}
|
|
14957
14983
|
});
|
|
14958
14984
|
}); };
|
|
14985
|
+
var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
14986
|
+
var allComponentContext;
|
|
14987
|
+
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
14988
|
+
return __generator(this, function (_c) {
|
|
14989
|
+
switch (_c.label) {
|
|
14990
|
+
case 0: return [4 /*yield*/, createAllComponentContext({
|
|
14991
|
+
config: config,
|
|
14992
|
+
trigger: trigger,
|
|
14993
|
+
pipelineType: pipelineType,
|
|
14994
|
+
})];
|
|
14995
|
+
case 1:
|
|
14996
|
+
allComponentContext = _c.sent();
|
|
14997
|
+
return [2 /*return*/, Object.fromEntries(Object.entries(allComponentContext).map(function (_a) {
|
|
14998
|
+
var _b = __read(_a, 2), componentName = _b[0], envs = _b[1];
|
|
14999
|
+
return [
|
|
15000
|
+
componentName,
|
|
15001
|
+
Object.fromEntries(Object.entries(envs).map(function (_a) {
|
|
15002
|
+
var _b = __read(_a, 2), env = _b[0], context = _b[1];
|
|
15003
|
+
return [
|
|
15004
|
+
env,
|
|
15005
|
+
(0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); }),
|
|
15006
|
+
];
|
|
15007
|
+
})),
|
|
15008
|
+
];
|
|
15009
|
+
}))];
|
|
15010
|
+
}
|
|
15011
|
+
});
|
|
15012
|
+
}); };
|
|
14959
15013
|
exports.createAllJobs = createAllJobs;
|
|
14960
15014
|
//# sourceMappingURL=createAllJobs.js.map
|
|
14961
15015
|
|
|
@@ -15060,42 +15114,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
15060
15114
|
};
|
|
15061
15115
|
return __assign.apply(this, arguments);
|
|
15062
15116
|
};
|
|
15063
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15064
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15065
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15066
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15067
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15068
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
15069
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15070
|
-
});
|
|
15071
|
-
};
|
|
15072
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15073
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15074
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15075
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15076
|
-
function step(op) {
|
|
15077
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
15078
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
15079
|
-
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;
|
|
15080
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
15081
|
-
switch (op[0]) {
|
|
15082
|
-
case 0: case 1: t = op; break;
|
|
15083
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
15084
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15085
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
15086
|
-
default:
|
|
15087
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
15088
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
15089
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
15090
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
15091
|
-
if (t[2]) _.ops.pop();
|
|
15092
|
-
_.trys.pop(); continue;
|
|
15093
|
-
}
|
|
15094
|
-
op = body.call(thisArg, _);
|
|
15095
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
15096
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
15097
|
-
}
|
|
15098
|
-
};
|
|
15099
15117
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
15100
15118
|
var t = {};
|
|
15101
15119
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -15133,9 +15151,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
15133
15151
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
15134
15152
|
};
|
|
15135
15153
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15136
|
-
exports.
|
|
15154
|
+
exports.createJobsForComponentContext = void 0;
|
|
15137
15155
|
var build_1 = __nccwpck_require__(67862);
|
|
15138
|
-
var context_1 = __nccwpck_require__(5875);
|
|
15139
15156
|
var deploy_1 = __nccwpck_require__(68483);
|
|
15140
15157
|
var injectDefaultVarsInCustomJobs = function (context, jobs) {
|
|
15141
15158
|
return jobs.map(function (_a) {
|
|
@@ -15151,7 +15168,7 @@ var getCustomJobs = function (context) {
|
|
|
15151
15168
|
var rawJobs = context.customJobs;
|
|
15152
15169
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
15153
15170
|
};
|
|
15154
|
-
var
|
|
15171
|
+
var createJobsForComponentContext = function (context) {
|
|
15155
15172
|
var _a, _b;
|
|
15156
15173
|
var buildJobs = build_1.BUILD_TYPES[context.build.config.type].jobs(context);
|
|
15157
15174
|
var deployJobs = ((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config)
|
|
@@ -15160,18 +15177,7 @@ var createRawJobs = function (context) {
|
|
|
15160
15177
|
var customJobs = getCustomJobs(context);
|
|
15161
15178
|
return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
|
|
15162
15179
|
};
|
|
15163
|
-
|
|
15164
|
-
var context;
|
|
15165
|
-
return __generator(this, function (_a) {
|
|
15166
|
-
switch (_a.label) {
|
|
15167
|
-
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)(contextContext)];
|
|
15168
|
-
case 1:
|
|
15169
|
-
context = _a.sent();
|
|
15170
|
-
return [2 /*return*/, createRawJobs(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); })];
|
|
15171
|
-
}
|
|
15172
|
-
});
|
|
15173
|
-
}); };
|
|
15174
|
-
exports.createJobsForComponent = createJobsForComponent;
|
|
15180
|
+
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
15175
15181
|
//# sourceMappingURL=createJobsForComponent.js.map
|
|
15176
15182
|
|
|
15177
15183
|
/***/ }),
|
|
@@ -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) {
|
|
@@ -35,11 +46,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
47
|
}
|
|
37
48
|
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
38
65
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
66
|
exports.createAllJobs = void 0;
|
|
40
67
|
var config_1 = require("../config");
|
|
68
|
+
var context_1 = require("../context");
|
|
41
69
|
var createJobsForComponent_1 = require("./createJobsForComponent");
|
|
42
|
-
var
|
|
70
|
+
var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
43
71
|
var _c, _d;
|
|
44
72
|
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
45
73
|
return __generator(this, function (_e) {
|
|
@@ -55,21 +83,19 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
55
83
|
_a = [componentName];
|
|
56
84
|
_c = (_b = Object).fromEntries;
|
|
57
85
|
return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var
|
|
59
|
-
return __generator(this, function (
|
|
60
|
-
switch (
|
|
61
|
-
case 0:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_b.sent()
|
|
72
|
-
])];
|
|
86
|
+
var context;
|
|
87
|
+
return __generator(this, function (_a) {
|
|
88
|
+
switch (_a.label) {
|
|
89
|
+
case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
|
|
90
|
+
config: config,
|
|
91
|
+
componentName: componentName,
|
|
92
|
+
env: env,
|
|
93
|
+
trigger: trigger,
|
|
94
|
+
pipelineType: pipelineType,
|
|
95
|
+
})];
|
|
96
|
+
case 1:
|
|
97
|
+
context = _a.sent();
|
|
98
|
+
return [2 /*return*/, [env, context]];
|
|
73
99
|
}
|
|
74
100
|
});
|
|
75
101
|
}); }))];
|
|
@@ -83,5 +109,33 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
|
|
|
83
109
|
}
|
|
84
110
|
});
|
|
85
111
|
}); };
|
|
112
|
+
var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
113
|
+
var allComponentContext;
|
|
114
|
+
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
115
|
+
return __generator(this, function (_c) {
|
|
116
|
+
switch (_c.label) {
|
|
117
|
+
case 0: return [4 /*yield*/, createAllComponentContext({
|
|
118
|
+
config: config,
|
|
119
|
+
trigger: trigger,
|
|
120
|
+
pipelineType: pipelineType,
|
|
121
|
+
})];
|
|
122
|
+
case 1:
|
|
123
|
+
allComponentContext = _c.sent();
|
|
124
|
+
return [2 /*return*/, Object.fromEntries(Object.entries(allComponentContext).map(function (_a) {
|
|
125
|
+
var _b = __read(_a, 2), componentName = _b[0], envs = _b[1];
|
|
126
|
+
return [
|
|
127
|
+
componentName,
|
|
128
|
+
Object.fromEntries(Object.entries(envs).map(function (_a) {
|
|
129
|
+
var _b = __read(_a, 2), env = _b[0], context = _b[1];
|
|
130
|
+
return [
|
|
131
|
+
env,
|
|
132
|
+
(0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); }),
|
|
133
|
+
];
|
|
134
|
+
})),
|
|
135
|
+
];
|
|
136
|
+
}))];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}); };
|
|
86
140
|
exports.createAllJobs = createAllJobs;
|
|
87
141
|
//# sourceMappingURL=createAllJobs.js.map
|
|
@@ -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;AAoBzE,IAAM,yBAAyB,GAAG,iEAAO,EAIxB;;QAHf,MAAM,YAAA,EACN,OAAO,aAAA,EACP,YAAY,kBAAA;;;;gBAEL,KAAA,CAAA,KAAA,MAAM,CAAA,CAAC,WAAW,CAAA;gBACvB,qBAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAO,aAAa;;;;;oCAC/C,IAAI,GAAG,IAAA,4BAAmB,EAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;0CAE/D,aAAa;oCACb,KAAA,CAAA,KAAA,MAAM,CAAA,CAAC,WAAW,CAAA;oCAChB,qBAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,GAAG,CAAC,UAAO,GAAG;;;;4DACD,qBAAM,IAAA,gCAAsB,EAAC;4DAC3C,MAAM,QAAA;4DACN,aAAa,eAAA;4DACb,GAAG,KAAA;4DACH,OAAO,SAAA;4DACP,YAAY,cAAA;yDACb,CAAC,EAAA;;wDANI,OAAO,GAAG,SAMd;wDAEF,sBAAO,CAAC,GAAG,EAAE,OAAO,CAAC,EAAC;;;6CACvB,CAAC,CACH,EAAA;wCAfL;wCAEE,cACE,SAYC,EACF;wCACD;;;yBACH,CAAC,CACH,EAAA;oBAvBH,sBAAO,cACL,SAsBC,EACF,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,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,UAAC,EAAqB;4BAArB,KAAA,aAAqB,EAApB,aAAa,QAAA,EAAE,IAAI,QAAA;wBAAM,OAAA;4BACjE,aAAa;4BACb,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAC,EAAc;oCAAd,KAAA,aAAc,EAAb,GAAG,QAAA,EAAE,OAAO,QAAA;gCAAM,OAAA;oCAC3C,GAAG;oCACH,IAAA,sDAA6B,EAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,uBAC/C,GAAG,KACN,OAAO,SAAA,IACP,EAHkD,CAGlD,CAAC;iCACJ;4BAN4C,CAM5C,CAAC,CACH;yBACF;oBAXkE,CAWlE,CAAC,CACH,EAAC;;;KACH,CAAC;AAzBW,QAAA,aAAa,iBAyBxB"}
|
|
@@ -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,CAAC;AANH,CAMG,CAAC;AACN,IAAM,aAAa,GAAG,UAAC,OAAyB;IAC9C,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,6BAA6B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC;AACK,IAAM,6BAA6B,GAAG,UAC3C,OAAyB;;IAEzB,IAAM,SAAS,GAAG,mBAAW,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvE,IAAM,UAAU,GAAG,CAAA,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM;QACvC,CAAC,CAAC,qBAAY,CAAC,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACzD,CAAC,CAAC,EAAE,CAAC;IAEP,IAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,4DAAW,SAAS,kBAAK,UAAU,kBAAK,UAAU,UAAE;AACtD,CAAC,CAAC;AAVW,QAAA,6BAA6B,iCAUxC"}
|