@catladder/cli 0.0.0-main-34f06a85 → 0.0.0-main-d9bfb4f5

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.
@@ -5669,7 +5669,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
5669
5669
  var fullServiceName = serviceName.concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
5670
5670
  var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
5671
5671
  // command as empty string resets it to default (uses the image's entrypoint)
5672
- 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));
5672
+ 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));
5673
5673
  // volumes require beta
5674
5674
  var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
5675
5675
  return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
@@ -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
  }); };
@@ -13113,7 +13113,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
13113
13113
  var fullServiceName = serviceName.concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
13114
13114
  var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
13115
13115
  // command as empty string resets it to default (uses the image's entrypoint)
13116
- 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));
13116
+ 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));
13117
13117
  // volumes require beta
13118
13118
  var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
13119
13119
  return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
@@ -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
  }); };
@@ -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,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G,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.
@@ -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,kBAAA;;;;gBAEL,KAAA,CAAA,KAAA,MAAM,CAAA,CAAC,WA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c;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,EAAA;oBAnBD,sBAAO,SAmBN,EAAC;;;KACH,CAAC;AAE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