@catladder/cli 0.0.0-main-41c9216f → 0.0.0-main-79e53392

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.
@@ -768,7 +768,9 @@ var reloadConfigAndObserve = function () { return __awaiter(void 0, void 0, void
768
768
  if (!gitRoot) {
769
769
  return [2 /*return*/];
770
770
  }
771
- result = (0, pipeline_1.readConfigSync)(gitRoot);
771
+ return [4 /*yield*/, (0, pipeline_1.readConfig)(gitRoot)];
772
+ case 2:
773
+ result = _a.sent();
772
774
  if (!result) {
773
775
  // can't do anything, there is no config
774
776
  return [2 /*return*/];
@@ -4065,55 +4067,118 @@ __exportStar(__nccwpck_require__(501), exports);
4065
4067
  /***/ }),
4066
4068
 
4067
4069
  /***/ 501:
4068
- /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4070
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
4069
4071
 
4070
4072
  "use strict";
4071
4073
 
4074
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4075
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4076
+ return new (P || (P = Promise))(function (resolve, reject) {
4077
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
4078
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
4079
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
4080
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
4081
+ });
4082
+ };
4083
+ var __generator = (this && this.__generator) || function (thisArg, body) {
4084
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
4085
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
4086
+ function verb(n) { return function (v) { return step([n, v]); }; }
4087
+ function step(op) {
4088
+ if (f) throw new TypeError("Generator is already executing.");
4089
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
4090
+ 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;
4091
+ if (y = 0, t) op = [op[0] & 2, t.value];
4092
+ switch (op[0]) {
4093
+ case 0: case 1: t = op; break;
4094
+ case 4: _.label++; return { value: op[1], done: false };
4095
+ case 5: _.label++; y = op[1]; op = [0]; continue;
4096
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
4097
+ default:
4098
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
4099
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
4100
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
4101
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
4102
+ if (t[2]) _.ops.pop();
4103
+ _.trys.pop(); continue;
4104
+ }
4105
+ op = body.call(thisArg, _);
4106
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
4107
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
4108
+ }
4109
+ };
4110
+ var __read = (this && this.__read) || function (o, n) {
4111
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4112
+ if (!m) return o;
4113
+ var i = m.call(o), r, ar = [], e;
4114
+ try {
4115
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4116
+ }
4117
+ catch (error) { e = { error: error }; }
4118
+ finally {
4119
+ try {
4120
+ if (r && !r.done && (m = i["return"])) m.call(i);
4121
+ }
4122
+ finally { if (e) throw e.error; }
4123
+ }
4124
+ return ar;
4125
+ };
4126
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
4127
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4128
+ if (ar || !(i in from)) {
4129
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
4130
+ ar[i] = from[i];
4131
+ }
4132
+ }
4133
+ return to.concat(ar || Array.prototype.slice.call(from));
4134
+ };
4072
4135
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4073
- exports.readConfigSync = void 0;
4136
+ exports.readConfig = void 0;
4074
4137
  var fs_1 = __nccwpck_require__(7147);
4075
- var ts_node_1 = __nccwpck_require__(5476);
4138
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
4139
+ var tsx = __nccwpck_require__(8186);
4076
4140
  var yaml_1 = __nccwpck_require__(8033);
4077
4141
  // allows us to load ts files
4078
4142
  var fullPath = function (directory, ext) {
4079
4143
  return directory + "/catladder." + ext;
4080
4144
  };
4081
- function requireUncached(module) {
4082
- delete require.cache[require.resolve(module)];
4083
- return require(module);
4084
- }
4085
- var readConfigSync = function (directory) {
4086
- if (directory === void 0) { directory = process.cwd(); }
4087
- (0, ts_node_1.register)({
4088
- cwd: directory,
4089
- transpileOnly: true,
4090
- compilerOptions: {
4091
- module: "commonjs",
4092
- },
4093
- });
4094
- var found = ["ts", "js", "yml", "yaml"].find(function (extension) {
4095
- return (0, fs_1.existsSync)(fullPath(directory, extension));
4096
- });
4097
- if (found) {
4098
- var filePath = fullPath(directory, found);
4099
- if (found === "ts" || found === "js") {
4100
- return {
4101
- path: filePath,
4102
- ext: found,
4103
- config: requireUncached(filePath).default,
4104
- };
4105
- }
4106
- else {
4107
- return {
4108
- path: filePath,
4109
- ext: found,
4110
- config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
4111
- };
4112
- }
4145
+ var readConfig = function () {
4146
+ var args_1 = [];
4147
+ for (var _i = 0; _i < arguments.length; _i++) {
4148
+ args_1[_i] = arguments[_i];
4113
4149
  }
4114
- return null;
4150
+ return __awaiter(void 0, __spreadArray([], __read(args_1), false), void 0, function (directory) {
4151
+ var found, filePath, result, config;
4152
+ if (directory === void 0) { directory = process.cwd(); }
4153
+ return __generator(this, function (_a) {
4154
+ switch (_a.label) {
4155
+ case 0:
4156
+ found = ["ts", "js", "yml", "yaml"].find(function (extension) {
4157
+ return (0, fs_1.existsSync)(fullPath(directory, extension));
4158
+ });
4159
+ if (!found) return [3 /*break*/, 3];
4160
+ filePath = fullPath(directory, found);
4161
+ if (!(found === "ts" || found === "js")) return [3 /*break*/, 2];
4162
+ return [4 /*yield*/, tsx.require(filePath, directory)];
4163
+ case 1:
4164
+ result = _a.sent();
4165
+ config = result.default.default || result.default;
4166
+ return [2 /*return*/, {
4167
+ path: filePath,
4168
+ ext: found,
4169
+ config: config,
4170
+ }];
4171
+ case 2: return [2 /*return*/, {
4172
+ path: filePath,
4173
+ ext: found,
4174
+ config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
4175
+ }];
4176
+ case 3: return [2 /*return*/, null];
4177
+ }
4178
+ });
4179
+ });
4115
4180
  };
4116
- exports.readConfigSync = readConfigSync;
4181
+ exports.readConfig = readConfig;
4117
4182
  //# sourceMappingURL=readConfig.js.map
4118
4183
 
4119
4184
  /***/ }),
@@ -7870,15 +7935,20 @@ __exportStar(__nccwpck_require__(2228), exports);
7870
7935
 
7871
7936
  "use strict";
7872
7937
 
7938
+ var _a;
7939
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7873
7940
  // we can't import the package.json directly, because the bundling process will inline it
7874
7941
  // but the version is only set during deployement, when its already bundled
7875
7942
  // instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
7876
7943
  // this will point to the root package.json
7877
- var _a;
7878
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7879
- var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
7880
- // eslint-disable-next-line @typescript-eslint/no-var-requires
7881
- var ownPkg = require(path);
7944
+ var ownPkg = { version: "0.0.0" };
7945
+ try {
7946
+ var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
7947
+ ownPkg = require(path);
7948
+ }
7949
+ catch (e) {
7950
+ // ignore, currently in the gitlab-includes, this doesn't work
7951
+ }
7882
7952
  exports["default"] = ownPkg;
7883
7953
  //# sourceMappingURL=packageInfos.js.map
7884
7954
 
@@ -43393,11 +43463,11 @@ module.exports = require("string_decoder");
43393
43463
 
43394
43464
  /***/ }),
43395
43465
 
43396
- /***/ 5476:
43466
+ /***/ 8186:
43397
43467
  /***/ ((module) => {
43398
43468
 
43399
43469
  "use strict";
43400
- module.exports = require("ts-node");
43470
+ module.exports = require("tsx/cjs/api");
43401
43471
 
43402
43472
  /***/ }),
43403
43473
 
@@ -6515,7 +6515,9 @@ var reloadConfigAndObserve = function () { return __awaiter(void 0, void 0, void
6515
6515
  if (!gitRoot) {
6516
6516
  return [2 /*return*/];
6517
6517
  }
6518
- result = (0, pipeline_1.readConfigSync)(gitRoot);
6518
+ return [4 /*yield*/, (0, pipeline_1.readConfig)(gitRoot)];
6519
+ case 2:
6520
+ result = _a.sent();
6519
6521
  if (!result) {
6520
6522
  // can't do anything, there is no config
6521
6523
  return [2 /*return*/];
@@ -11546,55 +11548,118 @@ __exportStar(__nccwpck_require__(501), exports);
11546
11548
  /***/ }),
11547
11549
 
11548
11550
  /***/ 501:
11549
- /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
11551
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
11550
11552
 
11551
11553
  "use strict";
11552
11554
 
11555
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11556
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11557
+ return new (P || (P = Promise))(function (resolve, reject) {
11558
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11559
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11560
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11561
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11562
+ });
11563
+ };
11564
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11565
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
11566
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
11567
+ function verb(n) { return function (v) { return step([n, v]); }; }
11568
+ function step(op) {
11569
+ if (f) throw new TypeError("Generator is already executing.");
11570
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
11571
+ 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;
11572
+ if (y = 0, t) op = [op[0] & 2, t.value];
11573
+ switch (op[0]) {
11574
+ case 0: case 1: t = op; break;
11575
+ case 4: _.label++; return { value: op[1], done: false };
11576
+ case 5: _.label++; y = op[1]; op = [0]; continue;
11577
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
11578
+ default:
11579
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
11580
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
11581
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
11582
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
11583
+ if (t[2]) _.ops.pop();
11584
+ _.trys.pop(); continue;
11585
+ }
11586
+ op = body.call(thisArg, _);
11587
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
11588
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
11589
+ }
11590
+ };
11591
+ var __read = (this && this.__read) || function (o, n) {
11592
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
11593
+ if (!m) return o;
11594
+ var i = m.call(o), r, ar = [], e;
11595
+ try {
11596
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
11597
+ }
11598
+ catch (error) { e = { error: error }; }
11599
+ finally {
11600
+ try {
11601
+ if (r && !r.done && (m = i["return"])) m.call(i);
11602
+ }
11603
+ finally { if (e) throw e.error; }
11604
+ }
11605
+ return ar;
11606
+ };
11607
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
11608
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
11609
+ if (ar || !(i in from)) {
11610
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
11611
+ ar[i] = from[i];
11612
+ }
11613
+ }
11614
+ return to.concat(ar || Array.prototype.slice.call(from));
11615
+ };
11553
11616
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11554
- exports.readConfigSync = void 0;
11617
+ exports.readConfig = void 0;
11555
11618
  var fs_1 = __nccwpck_require__(57147);
11556
- var ts_node_1 = __nccwpck_require__(35476);
11619
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
11620
+ var tsx = __nccwpck_require__(39578);
11557
11621
  var yaml_1 = __nccwpck_require__(68033);
11558
11622
  // allows us to load ts files
11559
11623
  var fullPath = function (directory, ext) {
11560
11624
  return directory + "/catladder." + ext;
11561
11625
  };
11562
- function requireUncached(module) {
11563
- delete require.cache[require.resolve(module)];
11564
- return require(module);
11565
- }
11566
- var readConfigSync = function (directory) {
11567
- if (directory === void 0) { directory = process.cwd(); }
11568
- (0, ts_node_1.register)({
11569
- cwd: directory,
11570
- transpileOnly: true,
11571
- compilerOptions: {
11572
- module: "commonjs",
11573
- },
11574
- });
11575
- var found = ["ts", "js", "yml", "yaml"].find(function (extension) {
11576
- return (0, fs_1.existsSync)(fullPath(directory, extension));
11577
- });
11578
- if (found) {
11579
- var filePath = fullPath(directory, found);
11580
- if (found === "ts" || found === "js") {
11581
- return {
11582
- path: filePath,
11583
- ext: found,
11584
- config: requireUncached(filePath).default,
11585
- };
11586
- }
11587
- else {
11588
- return {
11589
- path: filePath,
11590
- ext: found,
11591
- config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
11592
- };
11593
- }
11626
+ var readConfig = function () {
11627
+ var args_1 = [];
11628
+ for (var _i = 0; _i < arguments.length; _i++) {
11629
+ args_1[_i] = arguments[_i];
11594
11630
  }
11595
- return null;
11631
+ return __awaiter(void 0, __spreadArray([], __read(args_1), false), void 0, function (directory) {
11632
+ var found, filePath, result, config;
11633
+ if (directory === void 0) { directory = process.cwd(); }
11634
+ return __generator(this, function (_a) {
11635
+ switch (_a.label) {
11636
+ case 0:
11637
+ found = ["ts", "js", "yml", "yaml"].find(function (extension) {
11638
+ return (0, fs_1.existsSync)(fullPath(directory, extension));
11639
+ });
11640
+ if (!found) return [3 /*break*/, 3];
11641
+ filePath = fullPath(directory, found);
11642
+ if (!(found === "ts" || found === "js")) return [3 /*break*/, 2];
11643
+ return [4 /*yield*/, tsx.require(filePath, directory)];
11644
+ case 1:
11645
+ result = _a.sent();
11646
+ config = result.default.default || result.default;
11647
+ return [2 /*return*/, {
11648
+ path: filePath,
11649
+ ext: found,
11650
+ config: config,
11651
+ }];
11652
+ case 2: return [2 /*return*/, {
11653
+ path: filePath,
11654
+ ext: found,
11655
+ config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
11656
+ }];
11657
+ case 3: return [2 /*return*/, null];
11658
+ }
11659
+ });
11660
+ });
11596
11661
  };
11597
- exports.readConfigSync = readConfigSync;
11662
+ exports.readConfig = readConfig;
11598
11663
  //# sourceMappingURL=readConfig.js.map
11599
11664
 
11600
11665
  /***/ }),
@@ -15351,15 +15416,20 @@ __exportStar(__nccwpck_require__(92228), exports);
15351
15416
 
15352
15417
  "use strict";
15353
15418
 
15419
+ var _a;
15420
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
15354
15421
  // we can't import the package.json directly, because the bundling process will inline it
15355
15422
  // but the version is only set during deployement, when its already bundled
15356
15423
  // instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
15357
15424
  // this will point to the root package.json
15358
- var _a;
15359
- Object.defineProperty(exports, "__esModule", ({ value: true }));
15360
- var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
15361
- // eslint-disable-next-line @typescript-eslint/no-var-requires
15362
- var ownPkg = require(path);
15425
+ var ownPkg = { version: "0.0.0" };
15426
+ try {
15427
+ var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
15428
+ ownPkg = require(path);
15429
+ }
15430
+ catch (e) {
15431
+ // ignore, currently in the gitlab-includes, this doesn't work
15432
+ }
15363
15433
  exports["default"] = ownPkg;
15364
15434
  //# sourceMappingURL=packageInfos.js.map
15365
15435
 
@@ -285463,11 +285533,11 @@ module.exports = require("tls");
285463
285533
 
285464
285534
  /***/ }),
285465
285535
 
285466
- /***/ 35476:
285536
+ /***/ 39578:
285467
285537
  /***/ ((module) => {
285468
285538
 
285469
285539
  "use strict";
285470
- module.exports = require("ts-node");
285540
+ module.exports = require("tsx/cjs/api");
285471
285541
 
285472
285542
  /***/ }),
285473
285543
 
@@ -82,7 +82,9 @@ var reloadConfigAndObserve = function () { return __awaiter(void 0, void 0, void
82
82
  if (!gitRoot) {
83
83
  return [2 /*return*/];
84
84
  }
85
- result = (0, pipeline_1.readConfigSync)(gitRoot);
85
+ return [4 /*yield*/, (0, pipeline_1.readConfig)(gitRoot)];
86
+ case 2:
87
+ result = _a.sent();
86
88
  if (!result) {
87
89
  // can't do anything, there is no config
88
90
  return [2 /*return*/];
@@ -1 +1 @@
1
- {"version":3,"file":"getProjectConfig.js","sourceRoot":"","sources":["../../../../src/config/getProjectConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAM6B;AAG7B,0CAA6E;AAE7E,8CAA+C;AAE/C,yBAA2B;AAE3B,6CAA4C;A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
  import type { Config } from "../types";
2
- export declare const readConfigSync: (directory?: string) => {
2
+ export declare const readConfig: (directory?: string) => Promise<{
3
3
  config: Config;
4
4
  path: string;
5
5
  ext: string;
6
- } | null;
6
+ } | null>;
@@ -1,47 +1,110 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ 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;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __read = (this && this.__read) || function (o, n) {
39
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
40
+ if (!m) return o;
41
+ var i = m.call(o), r, ar = [], e;
42
+ try {
43
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
44
+ }
45
+ catch (error) { e = { error: error }; }
46
+ finally {
47
+ try {
48
+ if (r && !r.done && (m = i["return"])) m.call(i);
49
+ }
50
+ finally { if (e) throw e.error; }
51
+ }
52
+ return ar;
53
+ };
54
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
56
+ if (ar || !(i in from)) {
57
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
58
+ ar[i] = from[i];
59
+ }
60
+ }
61
+ return to.concat(ar || Array.prototype.slice.call(from));
62
+ };
2
63
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readConfigSync = void 0;
64
+ exports.readConfig = void 0;
4
65
  var fs_1 = require("fs");
5
- var ts_node_1 = require("ts-node");
66
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
67
+ var tsx = require("tsx/cjs/api");
6
68
  var yaml_1 = require("yaml");
7
69
  // allows us to load ts files
8
70
  var fullPath = function (directory, ext) {
9
71
  return directory + "/catladder." + ext;
10
72
  };
11
- function requireUncached(module) {
12
- delete require.cache[require.resolve(module)];
13
- return require(module);
14
- }
15
- var readConfigSync = function (directory) {
16
- if (directory === void 0) { directory = process.cwd(); }
17
- (0, ts_node_1.register)({
18
- cwd: directory,
19
- transpileOnly: true,
20
- compilerOptions: {
21
- module: "commonjs",
22
- },
23
- });
24
- var found = ["ts", "js", "yml", "yaml"].find(function (extension) {
25
- return (0, fs_1.existsSync)(fullPath(directory, extension));
26
- });
27
- if (found) {
28
- var filePath = fullPath(directory, found);
29
- if (found === "ts" || found === "js") {
30
- return {
31
- path: filePath,
32
- ext: found,
33
- config: requireUncached(filePath).default,
34
- };
35
- }
36
- else {
37
- return {
38
- path: filePath,
39
- ext: found,
40
- config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
41
- };
42
- }
73
+ var readConfig = function () {
74
+ var args_1 = [];
75
+ for (var _i = 0; _i < arguments.length; _i++) {
76
+ args_1[_i] = arguments[_i];
43
77
  }
44
- return null;
78
+ return __awaiter(void 0, __spreadArray([], __read(args_1), false), void 0, function (directory) {
79
+ var found, filePath, result, config;
80
+ if (directory === void 0) { directory = process.cwd(); }
81
+ return __generator(this, function (_a) {
82
+ switch (_a.label) {
83
+ case 0:
84
+ found = ["ts", "js", "yml", "yaml"].find(function (extension) {
85
+ return (0, fs_1.existsSync)(fullPath(directory, extension));
86
+ });
87
+ if (!found) return [3 /*break*/, 3];
88
+ filePath = fullPath(directory, found);
89
+ if (!(found === "ts" || found === "js")) return [3 /*break*/, 2];
90
+ return [4 /*yield*/, tsx.require(filePath, directory)];
91
+ case 1:
92
+ result = _a.sent();
93
+ config = result.default.default || result.default;
94
+ return [2 /*return*/, {
95
+ path: filePath,
96
+ ext: found,
97
+ config: config,
98
+ }];
99
+ case 2: return [2 /*return*/, {
100
+ path: filePath,
101
+ ext: found,
102
+ config: (0, yaml_1.parse)((0, fs_1.readFileSync)(filePath, { encoding: "utf-8" })),
103
+ }];
104
+ case 3: return [2 /*return*/, null];
105
+ }
106
+ });
107
+ });
45
108
  };
46
- exports.readConfigSync = readConfigSync;
109
+ exports.readConfig = readConfig;
47
110
  //# sourceMappingURL=readConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"readConfig.js","sourceRoot":"","sources":["../../../../../pipeline/src/config/readConfig.ts"],"names":[],"mappings":";;;AAAA,yBAA8C;AAC9C,mCAAmC;AACnC,6BAA6B;AAG7B,6BAA6B;AAE7B,IAAM,QAAQ,GAAG,UAAC,SAAiB,EAAE,GAAW;IAC9C,OAAA,SAAS,GAAG,aAAa,GAAG,GAAG;AAA/B,CAA+B,CAAC;AAElC,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC;AAEM,IAAM,cAAc,GAAG,UAC5B,SAAiC;IAAjC,0BAAA,EAAA,YAAoB,OAAO,CAAC,GAAG,EAAE;IAEjC,IAAA,kBAAQ,EAAC;QACP,GAAG,EAAE,SAAS;QACd,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE;YACf,MAAM,EAAE,UAAU;SACnB;KACF,CAAC,CAAC;IAEH,IAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,UAAC,SAAS;QACvD,OAAA,IAAA,eAAU,EAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAA1C,CAA0C,CAC3C,CAAC;IACF,IAAI,KAAK,EAAE,CAAC;QACV,IAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACrC,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,OAAO;aAC1C,CAAC;QACJ,CAAC;aAAM,CA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GAAG,SAAsC;oBAG/C,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC;oBACxD,sBAAO;4BACL,IAAI,EAAE,QAAQ;4BACd,GAAG,EAAE,KAAK;4BACV,MAAM,QAAA;yBACP,EAAC;wBAEF,sBAAO;wBACL,IAAI,EAAE,QAAQ;wBACd,GAAG,EAAE,KAAK;wBACV,MAAM,EAAE,IAAA,YAAK,EAAC,IAAA,iBAAY,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAW;qBACvE,EAAC;wBAGN,sBAAO,IAAI,EAAC;;;;CACb,CAAC;AA5BW,QAAA,UAAU,cA4BrB"}
@@ -1,2 +1,4 @@
1
- declare const ownPkg: any;
1
+ declare let ownPkg: {
2
+ version: string;
3
+ };
2
4
  export default ownPkg;
@@ -1,12 +1,17 @@
1
1
  "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
2
4
  // we can't import the package.json directly, because the bundling process will inline it
3
5
  // but the version is only set during deployement, when its already bundled
4
6
  // 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
7
  // this will point to the root package.json
6
- var _a;
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
9
- // eslint-disable-next-line @typescript-eslint/no-var-requires
10
- var ownPkg = require(path);
8
+ var ownPkg = { version: "0.0.0" };
9
+ try {
10
+ var path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
11
+ ownPkg = require(path);
12
+ }
13
+ catch (e) {
14
+ // ignore, currently in the gitlab-includes, this doesn't work
15
+ }
11
16
  exports.default = ownPkg;
12
17
  //# sourceMappingURL=packageInfos.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageInfos.js","sourceRoot":"","sources":["../../../../pipeline/src/packageInfos.ts"],"names":[],"mappings":";AAAA,yFAAyF;AACzF,2EAA2E;AAC3E,qHAAqH;AACrH,2CAA2C;;;AAE3C,IAAM,IAAI,GAAG,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,IAAI,IAAG,kBAAkB,CAAC;AACrD,8DAA8D;AAC9D,IAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE7B,kBAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"packageInfos.js","sourceRoot":"","sources":["../../../../pipeline/src/packageInfos.ts"],"names":[],"mappings":";;;AAAA,yFAAyF;AACzF,2EAA2E;AAC3E,qHAAqH;AACrH,2CAA2C;AAC3C,IAAI,MAAM,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAClC,IAAI,CAAC;IACH,IAAM,IAAI,GAAG,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,IAAI,IAAG,kBAAkB,CAAC;IAErD,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,8DAA8D;AAChE,CAAC;AAED,kBAAe,MAAM,CAAC"}