@catladder/cli 0.0.0-main-34f06a85 → 0.0.0-main-259d7c70

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.
@@ -7475,66 +7475,40 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
7475
7475
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7476
7476
  }
7477
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
- };
7494
7478
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7495
7479
  exports.createAllJobs = void 0;
7496
7480
  var config_1 = __nccwpck_require__(3352);
7497
7481
  var context_1 = __nccwpck_require__(5875);
7498
7482
  var createJobsForComponent_1 = __nccwpck_require__(2321);
7499
7483
  var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
7500
- var _c, _d;
7501
7484
  var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
7502
- return __generator(this, function (_e) {
7503
- switch (_e.label) {
7504
- case 0:
7505
- _d = (_c = Object).fromEntries;
7506
- return [4 /*yield*/, Promise.all(Object.keys(config.components).map(function (componentName) { return __awaiter(void 0, void 0, void 0, function () {
7507
- var envs, _a, _b, _c;
7508
- return __generator(this, function (_d) {
7509
- switch (_d.label) {
7510
- case 0:
7511
- envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
7512
- _a = [componentName];
7513
- _c = (_b = Object).fromEntries;
7514
- return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
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]];
7528
- }
7529
- });
7530
- }); }))];
7531
- case 1: return [2 /*return*/, _a.concat([
7532
- _c.apply(_b, [_d.sent()])
7533
- ])];
7485
+ return __generator(this, function (_c) {
7486
+ switch (_c.label) {
7487
+ case 0: return [4 /*yield*/, Promise.all(Object.keys(config.components).flatMap(function (componentName) {
7488
+ var envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
7489
+ return envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
7490
+ var context;
7491
+ return __generator(this, function (_a) {
7492
+ switch (_a.label) {
7493
+ case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
7494
+ config: config,
7495
+ componentName: componentName,
7496
+ env: env,
7497
+ trigger: trigger,
7498
+ pipelineType: pipelineType,
7499
+ })];
7500
+ case 1:
7501
+ context = _a.sent();
7502
+ return [2 /*return*/, {
7503
+ env: env,
7504
+ componentName: componentName,
7505
+ context: context,
7506
+ }];
7534
7507
  }
7535
7508
  });
7536
- }); }))];
7537
- case 1: return [2 /*return*/, _d.apply(_c, [_e.sent()])];
7509
+ }); });
7510
+ }))];
7511
+ case 1: return [2 /*return*/, _c.sent()];
7538
7512
  }
7539
7513
  });
7540
7514
  }); };
@@ -7550,19 +7524,14 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
7550
7524
  })];
7551
7525
  case 1:
7552
7526
  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
- }))];
7527
+ return [2 /*return*/, allComponentContext.reduce(function (acc, _a) {
7528
+ var componentName = _a.componentName, env = _a.env, context = _a.context;
7529
+ if (!acc[componentName]) {
7530
+ acc[componentName] = {};
7531
+ }
7532
+ acc[componentName][env] = (0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); });
7533
+ return acc;
7534
+ }, {})];
7566
7535
  }
7567
7536
  });
7568
7537
  }); };
@@ -14919,66 +14919,40 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14919
14919
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
14920
14920
  }
14921
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
- };
14938
14922
  Object.defineProperty(exports, "__esModule", ({ value: true }));
14939
14923
  exports.createAllJobs = void 0;
14940
14924
  var config_1 = __nccwpck_require__(13352);
14941
14925
  var context_1 = __nccwpck_require__(5875);
14942
14926
  var createJobsForComponent_1 = __nccwpck_require__(92321);
14943
14927
  var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
14944
- var _c, _d;
14945
14928
  var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
14946
- return __generator(this, function (_e) {
14947
- switch (_e.label) {
14948
- case 0:
14949
- _d = (_c = Object).fromEntries;
14950
- return [4 /*yield*/, Promise.all(Object.keys(config.components).map(function (componentName) { return __awaiter(void 0, void 0, void 0, function () {
14951
- var envs, _a, _b, _c;
14952
- return __generator(this, function (_d) {
14953
- switch (_d.label) {
14954
- case 0:
14955
- envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
14956
- _a = [componentName];
14957
- _c = (_b = Object).fromEntries;
14958
- return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
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]];
14972
- }
14973
- });
14974
- }); }))];
14975
- case 1: return [2 /*return*/, _a.concat([
14976
- _c.apply(_b, [_d.sent()])
14977
- ])];
14929
+ return __generator(this, function (_c) {
14930
+ switch (_c.label) {
14931
+ case 0: return [4 /*yield*/, Promise.all(Object.keys(config.components).flatMap(function (componentName) {
14932
+ var envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
14933
+ return envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
14934
+ var context;
14935
+ return __generator(this, function (_a) {
14936
+ switch (_a.label) {
14937
+ case 0: return [4 /*yield*/, (0, context_1.createComponentContext)({
14938
+ config: config,
14939
+ componentName: componentName,
14940
+ env: env,
14941
+ trigger: trigger,
14942
+ pipelineType: pipelineType,
14943
+ })];
14944
+ case 1:
14945
+ context = _a.sent();
14946
+ return [2 /*return*/, {
14947
+ env: env,
14948
+ componentName: componentName,
14949
+ context: context,
14950
+ }];
14978
14951
  }
14979
14952
  });
14980
- }); }))];
14981
- case 1: return [2 /*return*/, _d.apply(_c, [_e.sent()])];
14953
+ }); });
14954
+ }))];
14955
+ case 1: return [2 /*return*/, _c.sent()];
14982
14956
  }
14983
14957
  });
14984
14958
  }); };
@@ -14994,19 +14968,14 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
14994
14968
  })];
14995
14969
  case 1:
14996
14970
  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
- }))];
14971
+ return [2 /*return*/, allComponentContext.reduce(function (acc, _a) {
14972
+ var componentName = _a.componentName, env = _a.env, context = _a.context;
14973
+ if (!acc[componentName]) {
14974
+ acc[componentName] = {};
14975
+ }
14976
+ acc[componentName][env] = (0, createJobsForComponent_1.createJobsForComponentContext)(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); });
14977
+ return acc;
14978
+ }, {})];
15010
14979
  }
15011
14980
  });
15012
14981
  }); };
@@ -46,66 +46,40 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
47
  }
48
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
- };
65
49
  Object.defineProperty(exports, "__esModule", { value: true });
66
50
  exports.createAllJobs = void 0;
67
51
  var config_1 = require("../config");
68
52
  var context_1 = require("../context");
69
53
  var createJobsForComponent_1 = require("./createJobsForComponent");
70
54
  var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
71
- var _c, _d;
72
55
  var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
73
- return __generator(this, function (_e) {
74
- switch (_e.label) {
75
- case 0:
76
- _d = (_c = Object).fromEntries;
77
- return [4 /*yield*/, Promise.all(Object.keys(config.components).map(function (componentName) { return __awaiter(void 0, void 0, void 0, function () {
78
- var envs, _a, _b, _c;
79
- return __generator(this, function (_d) {
80
- switch (_d.label) {
81
- case 0:
82
- envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
83
- _a = [componentName];
84
- _c = (_b = Object).fromEntries;
85
- return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
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]];
99
- }
100
- });
101
- }); }))];
102
- case 1: return [2 /*return*/, _a.concat([
103
- _c.apply(_b, [_d.sent()])
104
- ])];
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
+ }];
105
78
  }
106
79
  });
107
- }); }))];
108
- case 1: return [2 /*return*/, _d.apply(_c, [_e.sent()])];
80
+ }); });
81
+ }))];
82
+ case 1: return [2 /*return*/, _c.sent()];
109
83
  }
110
84
  });
111
85
  }); };
@@ -121,19 +95,14 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
121
95
  })];
122
96
  case 1:
123
97
  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
- }))];
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
+ }, {})];
137
106
  }
138
107
  });
139
108
  }); };
@@ -1 +1 @@
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,kBAA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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
+ {"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,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