@catladder/cli 0.0.0-main-ab1c788d → 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.
@@ -2282,7 +2282,7 @@ var createAppBuildJob = function (context, _a) {
2282
2282
  cache: [],
2283
2283
  variables: __assign(__assign(__assign(__assign({}, (variables !== null && variables !== void 0 ? variables : {})), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), ((_b = context.build.config.extraVars) !== null && _b !== void 0 ? _b : {})),
2284
2284
  runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
2285
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((context.componentConfig.dotEnv === true // don't build when set to `local`
2285
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
2286
2286
  ? (0, writeDotEnv_1.writeDotEnv)(context)
2287
2287
  : [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context.build)), false), [
2288
2288
  "cd ".concat(context.build.dir)
@@ -2470,7 +2470,7 @@ var __read = (this && this.__read) || function (o, n) {
2470
2470
  return ar;
2471
2471
  };
2472
2472
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2473
- exports.writeDotEnv = void 0;
2473
+ exports.componentContextNeedsBuildTimeDotEnv = exports.writeDotEnv = void 0;
2474
2474
  var lodash_1 = __nccwpck_require__(3255);
2475
2475
  /**
2476
2476
  * writes a .env file in the components folder
@@ -2496,6 +2496,10 @@ var writeDotEnv = function (context) {
2496
2496
  ];
2497
2497
  };
2498
2498
  exports.writeDotEnv = writeDotEnv;
2499
+ var componentContextNeedsBuildTimeDotEnv = function (context) {
2500
+ return context.componentConfig.dotEnv === true; // don't build when set to `local`
2501
+ };
2502
+ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDotEnv;
2499
2503
  //# sourceMappingURL=writeDotEnv.js.map
2500
2504
 
2501
2505
  /***/ }),
@@ -7424,6 +7428,17 @@ exports["default"] = ownPkg;
7424
7428
 
7425
7429
  "use strict";
7426
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
+ };
7427
7442
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7428
7443
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7429
7444
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -7460,11 +7475,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
7460
7475
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7461
7476
  }
7462
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
+ };
7463
7494
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7464
7495
  exports.createAllJobs = void 0;
7465
7496
  var config_1 = __nccwpck_require__(3352);
7497
+ var context_1 = __nccwpck_require__(5875);
7466
7498
  var createJobsForComponent_1 = __nccwpck_require__(2321);
7467
- var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
7499
+ var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
7468
7500
  var _c, _d;
7469
7501
  var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
7470
7502
  return __generator(this, function (_e) {
@@ -7480,21 +7512,19 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
7480
7512
  _a = [componentName];
7481
7513
  _c = (_b = Object).fromEntries;
7482
7514
  return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
7483
- var _a;
7484
- return __generator(this, function (_b) {
7485
- switch (_b.label) {
7486
- case 0:
7487
- _a = [env];
7488
- return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)({
7489
- config: config,
7490
- componentName: componentName,
7491
- env: env,
7492
- trigger: trigger,
7493
- pipelineType: pipelineType,
7494
- })];
7495
- case 1: return [2 /*return*/, _a.concat([
7496
- _b.sent()
7497
- ])];
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]];
7498
7528
  }
7499
7529
  });
7500
7530
  }); }))];
@@ -7508,6 +7538,34 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
7508
7538
  }
7509
7539
  });
7510
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
+ }); };
7511
7569
  exports.createAllJobs = createAllJobs;
7512
7570
  //# sourceMappingURL=createAllJobs.js.map
7513
7571
 
@@ -7612,42 +7670,6 @@ var __assign = (this && this.__assign) || function () {
7612
7670
  };
7613
7671
  return __assign.apply(this, arguments);
7614
7672
  };
7615
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7616
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7617
- return new (P || (P = Promise))(function (resolve, reject) {
7618
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7619
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7620
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7621
- step((generator = generator.apply(thisArg, _arguments || [])).next());
7622
- });
7623
- };
7624
- var __generator = (this && this.__generator) || function (thisArg, body) {
7625
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7626
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7627
- function verb(n) { return function (v) { return step([n, v]); }; }
7628
- function step(op) {
7629
- if (f) throw new TypeError("Generator is already executing.");
7630
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
7631
- 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;
7632
- if (y = 0, t) op = [op[0] & 2, t.value];
7633
- switch (op[0]) {
7634
- case 0: case 1: t = op; break;
7635
- case 4: _.label++; return { value: op[1], done: false };
7636
- case 5: _.label++; y = op[1]; op = [0]; continue;
7637
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
7638
- default:
7639
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7640
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7641
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7642
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7643
- if (t[2]) _.ops.pop();
7644
- _.trys.pop(); continue;
7645
- }
7646
- op = body.call(thisArg, _);
7647
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7648
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7649
- }
7650
- };
7651
7673
  var __rest = (this && this.__rest) || function (s, e) {
7652
7674
  var t = {};
7653
7675
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -7685,9 +7707,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
7685
7707
  return to.concat(ar || Array.prototype.slice.call(from));
7686
7708
  };
7687
7709
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7688
- exports.createJobsForComponent = void 0;
7710
+ exports.createJobsForComponentContext = void 0;
7689
7711
  var build_1 = __nccwpck_require__(7862);
7690
- var context_1 = __nccwpck_require__(5875);
7691
7712
  var deploy_1 = __nccwpck_require__(8483);
7692
7713
  var injectDefaultVarsInCustomJobs = function (context, jobs) {
7693
7714
  return jobs.map(function (_a) {
@@ -7703,7 +7724,7 @@ var getCustomJobs = function (context) {
7703
7724
  var rawJobs = context.customJobs;
7704
7725
  return injectDefaultVarsInCustomJobs(context, rawJobs);
7705
7726
  };
7706
- var createRawJobs = function (context) {
7727
+ var createJobsForComponentContext = function (context) {
7707
7728
  var _a, _b;
7708
7729
  var buildJobs = build_1.BUILD_TYPES[context.build.config.type].jobs(context);
7709
7730
  var deployJobs = ((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config)
@@ -7712,18 +7733,7 @@ var createRawJobs = function (context) {
7712
7733
  var customJobs = getCustomJobs(context);
7713
7734
  return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
7714
7735
  };
7715
- var createJobsForComponent = function (contextContext) { return __awaiter(void 0, void 0, void 0, function () {
7716
- var context;
7717
- return __generator(this, function (_a) {
7718
- switch (_a.label) {
7719
- case 0: return [4 /*yield*/, (0, context_1.createComponentContext)(contextContext)];
7720
- case 1:
7721
- context = _a.sent();
7722
- return [2 /*return*/, createRawJobs(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); })];
7723
- }
7724
- });
7725
- }); };
7726
- exports.createJobsForComponent = createJobsForComponent;
7736
+ exports.createJobsForComponentContext = createJobsForComponentContext;
7727
7737
  //# sourceMappingURL=createJobsForComponent.js.map
7728
7738
 
7729
7739
  /***/ }),
@@ -9726,7 +9726,7 @@ var createAppBuildJob = function (context, _a) {
9726
9726
  cache: [],
9727
9727
  variables: __assign(__assign(__assign(__assign({}, (variables !== null && variables !== void 0 ? variables : {})), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), ((_b = context.build.config.extraVars) !== null && _b !== void 0 ? _b : {})),
9728
9728
  runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
9729
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((context.componentConfig.dotEnv === true // don't build when set to `local`
9729
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
9730
9730
  ? (0, writeDotEnv_1.writeDotEnv)(context)
9731
9731
  : [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context.build)), false), [
9732
9732
  "cd ".concat(context.build.dir)
@@ -9914,7 +9914,7 @@ var __read = (this && this.__read) || function (o, n) {
9914
9914
  return ar;
9915
9915
  };
9916
9916
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9917
- exports.writeDotEnv = void 0;
9917
+ exports.componentContextNeedsBuildTimeDotEnv = exports.writeDotEnv = void 0;
9918
9918
  var lodash_1 = __nccwpck_require__(23255);
9919
9919
  /**
9920
9920
  * writes a .env file in the components folder
@@ -9940,6 +9940,10 @@ var writeDotEnv = function (context) {
9940
9940
  ];
9941
9941
  };
9942
9942
  exports.writeDotEnv = writeDotEnv;
9943
+ var componentContextNeedsBuildTimeDotEnv = function (context) {
9944
+ return context.componentConfig.dotEnv === true; // don't build when set to `local`
9945
+ };
9946
+ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDotEnv;
9943
9947
  //# sourceMappingURL=writeDotEnv.js.map
9944
9948
 
9945
9949
  /***/ }),
@@ -14868,6 +14872,17 @@ exports["default"] = ownPkg;
14868
14872
 
14869
14873
  "use strict";
14870
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
+ };
14871
14886
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14872
14887
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14873
14888
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -14904,11 +14919,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14904
14919
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
14905
14920
  }
14906
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
+ };
14907
14938
  Object.defineProperty(exports, "__esModule", ({ value: true }));
14908
14939
  exports.createAllJobs = void 0;
14909
14940
  var config_1 = __nccwpck_require__(13352);
14941
+ var context_1 = __nccwpck_require__(5875);
14910
14942
  var createJobsForComponent_1 = __nccwpck_require__(92321);
14911
- var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
14943
+ var createAllComponentContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
14912
14944
  var _c, _d;
14913
14945
  var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
14914
14946
  return __generator(this, function (_e) {
@@ -14924,21 +14956,19 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
14924
14956
  _a = [componentName];
14925
14957
  _c = (_b = Object).fromEntries;
14926
14958
  return [4 /*yield*/, Promise.all(envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
14927
- var _a;
14928
- return __generator(this, function (_b) {
14929
- switch (_b.label) {
14930
- case 0:
14931
- _a = [env];
14932
- return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)({
14933
- config: config,
14934
- componentName: componentName,
14935
- env: env,
14936
- trigger: trigger,
14937
- pipelineType: pipelineType,
14938
- })];
14939
- case 1: return [2 /*return*/, _a.concat([
14940
- _b.sent()
14941
- ])];
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]];
14942
14972
  }
14943
14973
  });
14944
14974
  }); }))];
@@ -14952,6 +14982,34 @@ var createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, funct
14952
14982
  }
14953
14983
  });
14954
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
+ }); };
14955
15013
  exports.createAllJobs = createAllJobs;
14956
15014
  //# sourceMappingURL=createAllJobs.js.map
14957
15015
 
@@ -15056,42 +15114,6 @@ var __assign = (this && this.__assign) || function () {
15056
15114
  };
15057
15115
  return __assign.apply(this, arguments);
15058
15116
  };
15059
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15060
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15061
- return new (P || (P = Promise))(function (resolve, reject) {
15062
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15063
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15064
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
15065
- step((generator = generator.apply(thisArg, _arguments || [])).next());
15066
- });
15067
- };
15068
- var __generator = (this && this.__generator) || function (thisArg, body) {
15069
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15070
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
15071
- function verb(n) { return function (v) { return step([n, v]); }; }
15072
- function step(op) {
15073
- if (f) throw new TypeError("Generator is already executing.");
15074
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
15075
- 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;
15076
- if (y = 0, t) op = [op[0] & 2, t.value];
15077
- switch (op[0]) {
15078
- case 0: case 1: t = op; break;
15079
- case 4: _.label++; return { value: op[1], done: false };
15080
- case 5: _.label++; y = op[1]; op = [0]; continue;
15081
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
15082
- default:
15083
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
15084
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
15085
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
15086
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
15087
- if (t[2]) _.ops.pop();
15088
- _.trys.pop(); continue;
15089
- }
15090
- op = body.call(thisArg, _);
15091
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
15092
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
15093
- }
15094
- };
15095
15117
  var __rest = (this && this.__rest) || function (s, e) {
15096
15118
  var t = {};
15097
15119
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -15129,9 +15151,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
15129
15151
  return to.concat(ar || Array.prototype.slice.call(from));
15130
15152
  };
15131
15153
  Object.defineProperty(exports, "__esModule", ({ value: true }));
15132
- exports.createJobsForComponent = void 0;
15154
+ exports.createJobsForComponentContext = void 0;
15133
15155
  var build_1 = __nccwpck_require__(67862);
15134
- var context_1 = __nccwpck_require__(5875);
15135
15156
  var deploy_1 = __nccwpck_require__(68483);
15136
15157
  var injectDefaultVarsInCustomJobs = function (context, jobs) {
15137
15158
  return jobs.map(function (_a) {
@@ -15147,7 +15168,7 @@ var getCustomJobs = function (context) {
15147
15168
  var rawJobs = context.customJobs;
15148
15169
  return injectDefaultVarsInCustomJobs(context, rawJobs);
15149
15170
  };
15150
- var createRawJobs = function (context) {
15171
+ var createJobsForComponentContext = function (context) {
15151
15172
  var _a, _b;
15152
15173
  var buildJobs = build_1.BUILD_TYPES[context.build.config.type].jobs(context);
15153
15174
  var deployJobs = ((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config)
@@ -15156,18 +15177,7 @@ var createRawJobs = function (context) {
15156
15177
  var customJobs = getCustomJobs(context);
15157
15178
  return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
15158
15179
  };
15159
- var createJobsForComponent = function (contextContext) { return __awaiter(void 0, void 0, void 0, function () {
15160
- var context;
15161
- return __generator(this, function (_a) {
15162
- switch (_a.label) {
15163
- case 0: return [4 /*yield*/, (0, context_1.createComponentContext)(contextContext)];
15164
- case 1:
15165
- context = _a.sent();
15166
- return [2 /*return*/, createRawJobs(context).map(function (job) { return (__assign(__assign({}, job), { context: context })); })];
15167
- }
15168
- });
15169
- }); };
15170
- exports.createJobsForComponent = createJobsForComponent;
15180
+ exports.createJobsForComponentContext = createJobsForComponentContext;
15171
15181
  //# sourceMappingURL=createJobsForComponent.js.map
15172
15182
 
15173
15183
  /***/ }),
@@ -68,7 +68,7 @@ var createAppBuildJob = function (context, _a) {
68
68
  cache: [],
69
69
  variables: __assign(__assign(__assign(__assign({}, (variables !== null && variables !== void 0 ? variables : {})), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), ((_b = context.build.config.extraVars) !== null && _b !== void 0 ? _b : {})),
70
70
  runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
71
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((context.componentConfig.dotEnv === true // don't build when set to `local`
71
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
72
72
  ? (0, writeDotEnv_1.writeDotEnv)(context)
73
73
  : [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context.build)), false), [
74
74
  "cd ".concat(context.build.dir)
@@ -1 +1 @@
1
- {"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,IAAA,mBAAW,EAAC,MAAM,CAAC,mCAAI,EAAE,CAAC,SAC/B;QACD,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YACrD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,0CAAE,KAAK,0CAAE,GAAG,CAAC,UAAC,CAAC;oBACzD,OAAA,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBAA1B,CAA0B,CAC3B;aACF;SACF;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,iBAAiB,qBA4C5B"}
1
+ {"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/B,6BAA4B;AAE5B,2BAAuC;AAEvC,qCAA0C;AAC1C,qCAAiD;AACjD,yCAGqB;AACrB,mDAAkD;AAClD,6CAGuB;AAGhB,IAAM,iBAAiB,GAAG,UAC/B,OAAyB,EACzB,EAAqE;;IAAnE,IAAA,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAK,GAAG,cAA5C,0CAA8C,CAAF;IAE5C,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,SAAS,0CACJ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,GACjB,OAAO,CAAC,WAAW,CAAC,OAAO,GAC3B,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,GAC7C,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC,CAC1C;QACD,eAAe,iCACV,2CAA+B,GAC/B,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,GACvB,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC,CAChD;QAED,MAAM,mFACD,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;YAC/C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC,kBACJ,IAAA,+BAAc,EAAC,OAAO,CAAC,kBACvB,IAAA,wBAAiB,EAAC,OAAO,CAAC,KAAK,CAAC;YACnC,aAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAE;0BACtB,CAAC,MAAA,IAAA,mBAAW,EAAC,MAAM,CAAC,mCAAI,EAAE,CAAC,SAC/B;QACD,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YACrD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,0CAAE,KAAK,0CAAE,GAAG,CAAC,UAAC,CAAC;oBACzD,OAAA,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBAA1B,CAA0B,CAC3B;aACF;SACF;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,iBAAiB,qBA4C5B"}
@@ -5,3 +5,4 @@ import type { ComponentContext } from "../../types";
5
5
  * @returns
6
6
  */
7
7
  export declare const writeDotEnv: (context: ComponentContext) => string[];
8
+ export declare const componentContextNeedsBuildTimeDotEnv: (context: ComponentContext) => boolean;
@@ -16,7 +16,7 @@ var __read = (this && this.__read) || function (o, n) {
16
16
  return ar;
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.writeDotEnv = void 0;
19
+ exports.componentContextNeedsBuildTimeDotEnv = exports.writeDotEnv = void 0;
20
20
  var lodash_1 = require("lodash");
21
21
  /**
22
22
  * writes a .env file in the components folder
@@ -42,4 +42,8 @@ var writeDotEnv = function (context) {
42
42
  ];
43
43
  };
44
44
  exports.writeDotEnv = writeDotEnv;
45
+ var componentContextNeedsBuildTimeDotEnv = function (context) {
46
+ return context.componentConfig.dotEnv === true; // don't build when set to `local`
47
+ };
48
+ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDotEnv;
45
49
  //# sourceMappingURL=writeDotEnv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeDotEnv.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/writeDotEnv.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAG/B;;;;GAIG;AACI,IAAM,WAAW,GAAG,UAAC,OAAyB;IACnD,IAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAE5C,wCAAwC;IACxC,IAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QAC5C,uCAAuC;SACtC,MAAM,CAAC,UAAC,EAAS;YAAT,KAAA,aAAS,EAAN,KAAK,QAAA;QAAM,OAAA,CAAC,IAAA,cAAK,EAAC,KAAK,CAAC;IAAb,CAAa,CAAC;SACpC,GAAG,CACF,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,OAAA,UAAG,GAAG,cAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAE;IAArD,CAAqD,CACxE;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,sBAAe,OAAO,CAAC,KAAK,CAAC,GAAG,oBAClC,cAAc,UACZ;KACD,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,WAAW,eAiBtB"}
1
+ {"version":3,"file":"writeDotEnv.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/writeDotEnv.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAG/B;;;;GAIG;AACI,IAAM,WAAW,GAAG,UAAC,OAAyB;IACnD,IAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAE5C,wCAAwC;IACxC,IAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QAC5C,uCAAuC;SACtC,MAAM,CAAC,UAAC,EAAS;YAAT,KAAA,aAAS,EAAN,KAAK,QAAA;QAAM,OAAA,CAAC,IAAA,cAAK,EAAC,KAAK,CAAC;IAAb,CAAa,CAAC;SACpC,GAAG,CACF,UAAC,EAAY;YAAZ,KAAA,aAAY,EAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,OAAA,UAAG,GAAG,cAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAE;IAArD,CAAqD,CACxE;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,sBAAe,OAAO,CAAC,KAAK,CAAC,GAAG,oBAClC,cAAc,UACZ;KACD,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,WAAW,eAiBtB;AAEK,IAAM,oCAAoC,GAAG,UAClD,OAAyB;IAEzB,OAAO,OAAO,CAAC,eAAe,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,kCAAkC;AACpF,CAAC,CAAC;AAJW,QAAA,oCAAoC,wCAI/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"createComponentContext.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e,WAAzB,EAAE,GAAG,GAAK,eAAe,IAApB,CAAqB;gBACrD,OAAO,GAAyC;oBACpD,UAAU,EAAE,GAAG,CAAC,MAAM;oBACtB,eAAe,iBAAA;oBAEf,KAAK,EAAE;wBACL,GAAG,EAAE,GAAG;wBACR,kBAAkB,EAAE,kBAAkB;wBACtC,MAAM,EAAE,KAAK;qBACd;oBACD,MAAM,EAAE,MAAM;wBACZ,CAAC,CAAC;4BACE,MAAM,EAAE,MAAM;yBACf;wBACH,CAAC,CAAC,IAAI;oBACR,aAAa,EAAE,GAAG,CAAC,aAAa;oBAChC,WAAW,aAAA;oBACX,kBAAkB,EAAE,kBAAkB;oBACtC,YAAY,EAAE,GAAG,CAAC,YAAY;oBAC9B,OAAO,EAAE,GAAG,CAAC,OAAO;iBACrB,CAAC;gBACI,kBAAkB,GAAG,IAAA,mBAAU,EAAC,UAAU,CAAC;oBAC/C,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;oBACrB,CAAC,CAAC,UAAU,CAAC;gBACf,4CACK,OAAO,KACV,UAAU,EAAE,kBAAkB,KAC9B;;;KACH,CAAC;AAtEW,QAAA,sBAAsB,0BAsEjC;AAEF;;GAEG;AACU,QAAA,aAAa,GAAG,8BAAsB,CAAC"}
1
+ {"version":3,"file":"createComponentContext.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/createComponentContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAoC;AACpC,kCAAuC;AAEvC,oCAAyC;AAMzC,kCAAkD;AAClD,mDAAkD;AAClD,iEAAgE;AAChE,6DAAmE;AAU5D,IAAM,sBAAsB,GAAG,UACpC,GAAkC;;;;;gBAElC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;oBAC5C,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;gBACJ,CAAC;gBAE0B,qBAAM,IA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AG,CAAC,YAAY;oBAC9B,OAAO,EAAE,GAAG,CAAC,OAAO;iBACrB,CAAC;gBACI,kBAAkB,GAAG,IAAA,mBAAU,EAAC,UAAU,CAAC;oBAC/C,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;oBACrB,CAAC,CAAC,UAAU,CAAC;gBACf,4CACK,OAAO,KACV,UAAU,EAAE,kBAAkB,KAC9B;;;KACH,CAAC;AApEW,QAAA,sBAAsB,0BAoEjC;AAEF;;GAEG;AACU,QAAA,aAAa,GAAG,8BAAsB,CAAC"}
@@ -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 createAllJobs = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
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 _a;
59
- return __generator(this, function (_b) {
60
- switch (_b.label) {
61
- case 0:
62
- _a = [env];
63
- return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)({
64
- config: config,
65
- componentName: componentName,
66
- env: env,
67
- trigger: trigger,
68
- pipelineType: pipelineType,
69
- })];
70
- case 1: return [2 /*return*/, _a.concat([
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