@catladder/cli 0.0.0-main-842b2cfa → 0.0.0-main-50277fbb

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.
@@ -586,13 +586,17 @@ exports.makeSecurityAuditOverview = makeSecurityAuditOverview;
586
586
  /***/ }),
587
587
 
588
588
  /***/ 1628:
589
- /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
589
+ /***/ ((__unused_webpack_module, exports) => {
590
590
 
591
591
  "use strict";
592
592
 
593
+ // we can't import the package.json directly, because the bundling process will inline it
594
+ // but the version is only set during deployement, when its already bundled
595
+ // instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
596
+ // this will point to the root package.json
593
597
  exports.__esModule = true;
594
598
  // eslint-disable-next-line @typescript-eslint/no-var-requires
595
- var ownPkg = __nccwpck_require__(4147);
599
+ var ownPkg = require(require.main.path + "/../package.json");
596
600
  exports["default"] = ownPkg;
597
601
  //# sourceMappingURL=packageInfos.js.map
598
602
 
@@ -71255,14 +71259,6 @@ exports.toString = toString;
71255
71259
  "use strict";
71256
71260
  module.exports = JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":"[Logging guide](https://www.notion.so/panterch/Long-story-logging-022722bb878f4724ae5b49e17667b630?pvs=4#9e5a36b7158a4953b73ec6a345bd8989), [Tracing guide](https://www.notion.so/panterch/Long-story-tracing-d8a9ec1ac2ff4fa78cefa8991233224e?pvs=4#535121b5bf9741fbaf8654b4b64d879d)"},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]');
71257
71261
 
71258
- /***/ }),
71259
-
71260
- /***/ 4147:
71261
- /***/ ((module) => {
71262
-
71263
- "use strict";
71264
- module.exports = JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"dependencies":{"ts-node":"^10.9.1"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","ts-results-es":"^4.1.0-alpha.1","typescript":"^4.5.4","vorpal":"^1.12.0"}}');
71265
-
71266
71262
  /***/ })
71267
71263
 
71268
71264
  /******/ });
@@ -40918,7 +40918,7 @@ exports.readConfigSync = readConfigSync;
40918
40918
 
40919
40919
  exports.__esModule = true;
40920
40920
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
40921
- exports.PIPELINE_IMAGE_TAG = "main-842b2cfa" || 0;
40921
+ exports.PIPELINE_IMAGE_TAG = "main-50277fbb" || 0;
40922
40922
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
40923
40923
 
40924
40924
  /***/ }),
@@ -45363,77 +45363,27 @@ var __generator = this && this.__generator || function (thisArg, body) {
45363
45363
  };
45364
45364
  }
45365
45365
  };
45366
- var __read = this && this.__read || function (o, n) {
45367
- var m = typeof Symbol === "function" && o[Symbol.iterator];
45368
- if (!m) return o;
45369
- var i = m.call(o),
45370
- r,
45371
- ar = [],
45372
- e;
45373
- try {
45374
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45375
- } catch (error) {
45376
- e = {
45377
- error: error
45378
- };
45379
- } finally {
45380
- try {
45381
- if (r && !r.done && (m = i["return"])) m.call(i);
45382
- } finally {
45383
- if (e) throw e.error;
45384
- }
45385
- }
45386
- return ar;
45387
- };
45388
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
45389
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
45390
- if (ar || !(i in from)) {
45391
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45392
- ar[i] = from[i];
45393
- }
45394
- }
45395
- return to.concat(ar || Array.prototype.slice.call(from));
45396
- };
45397
45366
  exports.__esModule = true;
45398
45367
  exports.createChildPipeline = void 0;
45399
- var config_1 = __nccwpck_require__(3138);
45400
- var rules_1 = __nccwpck_require__(2020);
45401
- var runner_1 = __nccwpck_require__(5071);
45402
- var jobs_1 = __nccwpck_require__(2339);
45403
45368
  var createAllJobs_1 = __nccwpck_require__(7052);
45369
+ var getPipelineStages_1 = __nccwpck_require__(5812);
45404
45370
  var createGitlabJobs_1 = __nccwpck_require__(3920);
45371
+ var createGitlabPipeline_1 = __nccwpck_require__(9800);
45405
45372
  var createChildPipeline = function (type, trigger, config) {
45406
45373
  return __awaiter(void 0, void 0, void 0, function () {
45407
- var jobs, allEnvs, stages, pipeline;
45408
- var _a;
45409
- return __generator(this, function (_b) {
45410
- switch (_b.label) {
45374
+ var jobs, stages, gitlabJobs;
45375
+ return __generator(this, function (_a) {
45376
+ switch (_a.label) {
45411
45377
  case 0:
45412
45378
  return [4 /*yield*/, (0, createAllJobs_1.createAllJobs)(config, trigger)];
45413
45379
  case 1:
45414
- jobs = _b.sent();
45415
- allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
45416
- stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) {
45417
- return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [baseStage], false), __read(allEnvs.map(function (e) {
45418
- return "".concat(baseStage, " ").concat(e);
45419
- })), false);
45420
- }, []);
45380
+ jobs = _a.sent();
45381
+ stages = (0, getPipelineStages_1.getPipelineStages)(config);
45421
45382
  if (!(type === "gitlab")) return [3 /*break*/, 3];
45422
- _a = {
45423
- image: (0, runner_1.getRunnerImage)("jobs-default"),
45424
- variables: {
45425
- FF_USE_FASTZIP: "true",
45426
- GIT_DEPTH: 1
45427
- },
45428
- workflow: {
45429
- rules: rules_1.RULES_ALWAYS
45430
- },
45431
- stages: stages
45432
- };
45433
45383
  return [4 /*yield*/, (0, createGitlabJobs_1.createGitlabJobs)(jobs)];
45434
45384
  case 2:
45435
- pipeline = (_a.jobs = _b.sent(), _a);
45436
- return [2 /*return*/, pipeline];
45385
+ gitlabJobs = _a.sent();
45386
+ return [2 /*return*/, (0, createGitlabPipeline_1.createGitlabPipelineFromStagesAndJobs)(stages, gitlabJobs)];
45437
45387
  case 3:
45438
45388
  throw new Error("".concat(type, " is not supported"));
45439
45389
  }
@@ -45672,6 +45622,66 @@ exports.createJobsForComponent = createJobsForComponent;
45672
45622
 
45673
45623
  /***/ }),
45674
45624
 
45625
+ /***/ 5812:
45626
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45627
+
45628
+ "use strict";
45629
+
45630
+
45631
+ var __read = this && this.__read || function (o, n) {
45632
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
45633
+ if (!m) return o;
45634
+ var i = m.call(o),
45635
+ r,
45636
+ ar = [],
45637
+ e;
45638
+ try {
45639
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45640
+ } catch (error) {
45641
+ e = {
45642
+ error: error
45643
+ };
45644
+ } finally {
45645
+ try {
45646
+ if (r && !r.done && (m = i["return"])) m.call(i);
45647
+ } finally {
45648
+ if (e) throw e.error;
45649
+ }
45650
+ }
45651
+ return ar;
45652
+ };
45653
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
45654
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
45655
+ if (ar || !(i in from)) {
45656
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45657
+ ar[i] = from[i];
45658
+ }
45659
+ }
45660
+ return to.concat(ar || Array.prototype.slice.call(from));
45661
+ };
45662
+ exports.__esModule = true;
45663
+ exports.getPipelineStages = void 0;
45664
+ var config_1 = __nccwpck_require__(3138);
45665
+ var jobs_1 = __nccwpck_require__(2339);
45666
+ /**
45667
+ *
45668
+ while technically not required, we group different envs in its own stage
45669
+ each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
45670
+ this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
45671
+ */
45672
+ function getPipelineStages(config) {
45673
+ var allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
45674
+ var stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) {
45675
+ return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [baseStage], false), __read(allEnvs.map(function (e) {
45676
+ return "".concat(baseStage, " ").concat(e);
45677
+ })), false);
45678
+ }, []);
45679
+ return stages;
45680
+ }
45681
+ exports.getPipelineStages = getPipelineStages;
45682
+
45683
+ /***/ }),
45684
+
45675
45685
  /***/ 3920:
45676
45686
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45677
45687
 
@@ -45954,6 +45964,34 @@ exports.createGitlabJobs = createGitlabJobs;
45954
45964
 
45955
45965
  /***/ }),
45956
45966
 
45967
+ /***/ 9800:
45968
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
45969
+
45970
+ "use strict";
45971
+
45972
+
45973
+ exports.__esModule = true;
45974
+ exports.createGitlabPipelineFromStagesAndJobs = void 0;
45975
+ var rules_1 = __nccwpck_require__(2020);
45976
+ var runner_1 = __nccwpck_require__(5071);
45977
+ function createGitlabPipelineFromStagesAndJobs(stages, gitlabJobs) {
45978
+ return {
45979
+ image: (0, runner_1.getRunnerImage)("jobs-default"),
45980
+ variables: {
45981
+ FF_USE_FASTZIP: "true",
45982
+ GIT_DEPTH: 1
45983
+ },
45984
+ workflow: {
45985
+ rules: rules_1.RULES_ALWAYS
45986
+ },
45987
+ stages: stages,
45988
+ jobs: gitlabJobs
45989
+ };
45990
+ }
45991
+ exports.createGitlabPipelineFromStagesAndJobs = createGitlabPipelineFromStagesAndJobs;
45992
+
45993
+ /***/ }),
45994
+
45957
45995
  /***/ 4011:
45958
45996
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45959
45997
 
@@ -8047,13 +8047,17 @@ exports.startKubePortForward = startKubePortForward;
8047
8047
  /***/ }),
8048
8048
 
8049
8049
  /***/ 71628:
8050
- /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8050
+ /***/ ((__unused_webpack_module, exports) => {
8051
8051
 
8052
8052
  "use strict";
8053
8053
 
8054
+ // we can't import the package.json directly, because the bundling process will inline it
8055
+ // but the version is only set during deployement, when its already bundled
8056
+ // instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
8057
+ // this will point to the root package.json
8054
8058
  exports.__esModule = true;
8055
8059
  // eslint-disable-next-line @typescript-eslint/no-var-requires
8056
- var ownPkg = __nccwpck_require__(4147);
8060
+ var ownPkg = require(require.main.path + "/../package.json");
8057
8061
  exports["default"] = ownPkg;
8058
8062
  //# sourceMappingURL=packageInfos.js.map
8059
8063
 
@@ -355852,7 +355856,7 @@ exports.readConfigSync = readConfigSync;
355852
355856
 
355853
355857
  exports.__esModule = true;
355854
355858
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
355855
- exports.PIPELINE_IMAGE_TAG = "main-842b2cfa" || 0;
355859
+ exports.PIPELINE_IMAGE_TAG = "main-50277fbb" || 0;
355856
355860
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
355857
355861
 
355858
355862
  /***/ }),
@@ -360297,77 +360301,27 @@ var __generator = this && this.__generator || function (thisArg, body) {
360297
360301
  };
360298
360302
  }
360299
360303
  };
360300
- var __read = this && this.__read || function (o, n) {
360301
- var m = typeof Symbol === "function" && o[Symbol.iterator];
360302
- if (!m) return o;
360303
- var i = m.call(o),
360304
- r,
360305
- ar = [],
360306
- e;
360307
- try {
360308
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
360309
- } catch (error) {
360310
- e = {
360311
- error: error
360312
- };
360313
- } finally {
360314
- try {
360315
- if (r && !r.done && (m = i["return"])) m.call(i);
360316
- } finally {
360317
- if (e) throw e.error;
360318
- }
360319
- }
360320
- return ar;
360321
- };
360322
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
360323
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
360324
- if (ar || !(i in from)) {
360325
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
360326
- ar[i] = from[i];
360327
- }
360328
- }
360329
- return to.concat(ar || Array.prototype.slice.call(from));
360330
- };
360331
360304
  exports.__esModule = true;
360332
360305
  exports.createChildPipeline = void 0;
360333
- var config_1 = __nccwpck_require__(33138);
360334
- var rules_1 = __nccwpck_require__(42020);
360335
- var runner_1 = __nccwpck_require__(55071);
360336
- var jobs_1 = __nccwpck_require__(62339);
360337
360306
  var createAllJobs_1 = __nccwpck_require__(17052);
360307
+ var getPipelineStages_1 = __nccwpck_require__(45812);
360338
360308
  var createGitlabJobs_1 = __nccwpck_require__(63920);
360309
+ var createGitlabPipeline_1 = __nccwpck_require__(59800);
360339
360310
  var createChildPipeline = function (type, trigger, config) {
360340
360311
  return __awaiter(void 0, void 0, void 0, function () {
360341
- var jobs, allEnvs, stages, pipeline;
360342
- var _a;
360343
- return __generator(this, function (_b) {
360344
- switch (_b.label) {
360312
+ var jobs, stages, gitlabJobs;
360313
+ return __generator(this, function (_a) {
360314
+ switch (_a.label) {
360345
360315
  case 0:
360346
360316
  return [4 /*yield*/, (0, createAllJobs_1.createAllJobs)(config, trigger)];
360347
360317
  case 1:
360348
- jobs = _b.sent();
360349
- allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
360350
- stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) {
360351
- return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [baseStage], false), __read(allEnvs.map(function (e) {
360352
- return "".concat(baseStage, " ").concat(e);
360353
- })), false);
360354
- }, []);
360318
+ jobs = _a.sent();
360319
+ stages = (0, getPipelineStages_1.getPipelineStages)(config);
360355
360320
  if (!(type === "gitlab")) return [3 /*break*/, 3];
360356
- _a = {
360357
- image: (0, runner_1.getRunnerImage)("jobs-default"),
360358
- variables: {
360359
- FF_USE_FASTZIP: "true",
360360
- GIT_DEPTH: 1
360361
- },
360362
- workflow: {
360363
- rules: rules_1.RULES_ALWAYS
360364
- },
360365
- stages: stages
360366
- };
360367
360321
  return [4 /*yield*/, (0, createGitlabJobs_1.createGitlabJobs)(jobs)];
360368
360322
  case 2:
360369
- pipeline = (_a.jobs = _b.sent(), _a);
360370
- return [2 /*return*/, pipeline];
360323
+ gitlabJobs = _a.sent();
360324
+ return [2 /*return*/, (0, createGitlabPipeline_1.createGitlabPipelineFromStagesAndJobs)(stages, gitlabJobs)];
360371
360325
  case 3:
360372
360326
  throw new Error("".concat(type, " is not supported"));
360373
360327
  }
@@ -360606,6 +360560,66 @@ exports.createJobsForComponent = createJobsForComponent;
360606
360560
 
360607
360561
  /***/ }),
360608
360562
 
360563
+ /***/ 45812:
360564
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
360565
+
360566
+ "use strict";
360567
+
360568
+
360569
+ var __read = this && this.__read || function (o, n) {
360570
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
360571
+ if (!m) return o;
360572
+ var i = m.call(o),
360573
+ r,
360574
+ ar = [],
360575
+ e;
360576
+ try {
360577
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
360578
+ } catch (error) {
360579
+ e = {
360580
+ error: error
360581
+ };
360582
+ } finally {
360583
+ try {
360584
+ if (r && !r.done && (m = i["return"])) m.call(i);
360585
+ } finally {
360586
+ if (e) throw e.error;
360587
+ }
360588
+ }
360589
+ return ar;
360590
+ };
360591
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
360592
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
360593
+ if (ar || !(i in from)) {
360594
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
360595
+ ar[i] = from[i];
360596
+ }
360597
+ }
360598
+ return to.concat(ar || Array.prototype.slice.call(from));
360599
+ };
360600
+ exports.__esModule = true;
360601
+ exports.getPipelineStages = void 0;
360602
+ var config_1 = __nccwpck_require__(33138);
360603
+ var jobs_1 = __nccwpck_require__(62339);
360604
+ /**
360605
+ *
360606
+ while technically not required, we group different envs in its own stage
360607
+ each job from `createJobs` that is defined as `envMode: "stagePerEnv"` will have `deploy dev`, etc. instead of just `deploy`
360608
+ this is just so that it looks nicer in gitlab and makes running mutliple manual tasks more easy to use
360609
+ */
360610
+ function getPipelineStages(config) {
360611
+ var allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
360612
+ var stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) {
360613
+ return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [baseStage], false), __read(allEnvs.map(function (e) {
360614
+ return "".concat(baseStage, " ").concat(e);
360615
+ })), false);
360616
+ }, []);
360617
+ return stages;
360618
+ }
360619
+ exports.getPipelineStages = getPipelineStages;
360620
+
360621
+ /***/ }),
360622
+
360609
360623
  /***/ 63920:
360610
360624
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
360611
360625
 
@@ -360888,6 +360902,34 @@ exports.createGitlabJobs = createGitlabJobs;
360888
360902
 
360889
360903
  /***/ }),
360890
360904
 
360905
+ /***/ 59800:
360906
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
360907
+
360908
+ "use strict";
360909
+
360910
+
360911
+ exports.__esModule = true;
360912
+ exports.createGitlabPipelineFromStagesAndJobs = void 0;
360913
+ var rules_1 = __nccwpck_require__(42020);
360914
+ var runner_1 = __nccwpck_require__(55071);
360915
+ function createGitlabPipelineFromStagesAndJobs(stages, gitlabJobs) {
360916
+ return {
360917
+ image: (0, runner_1.getRunnerImage)("jobs-default"),
360918
+ variables: {
360919
+ FF_USE_FASTZIP: "true",
360920
+ GIT_DEPTH: 1
360921
+ },
360922
+ workflow: {
360923
+ rules: rules_1.RULES_ALWAYS
360924
+ },
360925
+ stages: stages,
360926
+ jobs: gitlabJobs
360927
+ };
360928
+ }
360929
+ exports.createGitlabPipelineFromStagesAndJobs = createGitlabPipelineFromStagesAndJobs;
360930
+
360931
+ /***/ }),
360932
+
360891
360933
  /***/ 34011:
360892
360934
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
360893
360935
 
@@ -364863,14 +364905,6 @@ module.exports = JSON.parse('[{"description":"No API keys or secrets are stored
364863
364905
 
364864
364906
  /***/ }),
364865
364907
 
364866
- /***/ 4147:
364867
- /***/ ((module) => {
364868
-
364869
- "use strict";
364870
- module.exports = JSON.parse('{"name":"@catladder/cli","description":"Panter cli tool for Kubernetes","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","repository":{"type":"git","url":"git+https://git.panter.ch/catladder/catladder.git","directory":"cli"},"keywords":["GitLab","cloud","cli","gitlab-ci","ci/cd","pipeline","deployment","devops","automation","typescript"],"contributors":[{"name":"Marco Wettstein","email":"maw@panter.ch"},{"name":"Michael Leu","email":"leu@panter.ch"},{"name":"Luboš Matejčík","email":"lma@panter.ch"},{"name":"Kaspar Vollenweider","email":"vok@panter.ch"},{"name":"Silvan Adrian","email":"sia@panter.ch"},{"name":"Stefan Bakocs","email":"stb@panter.ch"},{"name":"Lukas Brezina","email":"brl@panter.ch"}],"license":"MIT","version":"0.0.0","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catci":"./bin/catci","catenv":"./bin/catenv","catladder":"./bin/catladder"},"engines":{"node":">=12.0.0"},"dependencies":{"ts-node":"^10.9.1"},"devDependencies":{"@catladder/pipeline":"0.0.0","@gitbeaker/rest":"^39.28.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","connection-string-parser":"^1.0.4","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","ts-results-es":"^4.1.0-alpha.1","typescript":"^4.5.4","vorpal":"^1.12.0"}}');
364871
-
364872
- /***/ }),
364873
-
364874
364908
  /***/ 3633:
364875
364909
  /***/ ((module) => {
364876
364910
 
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ // we can't import the package.json directly, because the bundling process will inline it
3
+ // but the version is only set during deployement, when its already bundled
4
+ // instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
5
+ // this will point to the root package.json
2
6
  exports.__esModule = true;
3
7
  // eslint-disable-next-line @typescript-eslint/no-var-requires
4
- var ownPkg = require("../package.json");
8
+ var ownPkg = require(require.main.path + "/../package.json");
5
9
  exports["default"] = ownPkg;
6
10
  //# sourceMappingURL=packageInfos.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageInfos.js","sourceRoot":"","sources":["../src/packageInfos.ts"],"names":[],"mappings":";;AAAA,8DAA8D;AAC9D,IAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE1C,qBAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"packageInfos.js","sourceRoot":"","sources":["../src/packageInfos.ts"],"names":[],"mappings":";AAAA,yFAAyF;AACzF,2EAA2E;AAC3E,qHAAqH;AACrH,2CAA2C;;AAE3C,8DAA8D;AAC9D,IAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC,CAAC;AAE/D,qBAAe,MAAM,CAAC"}