@catladder/cli 0.0.0-main-e965db8c → 0.0.0-main-4f40fed0
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.
- package/bin/catenv +1 -1
- package/bin/catladder +1 -1
- package/dist/bundles/catenv/index.js +596 -156
- package/dist/bundles/cli/index.js +715 -428
- package/dist/pipeline/src/config/readConfig.js +7 -10
- package/dist/pipeline/src/config/readConfig.js.map +1 -1
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/bundle +2 -2
|
@@ -5,23 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.readConfig = void 0;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
|
-
|
|
9
|
-
const tsx = require("tsx/cjs/api");
|
|
8
|
+
const jiti_1 = require("jiti");
|
|
10
9
|
const yaml_1 = require("yaml");
|
|
11
|
-
// allows us to load ts files
|
|
12
10
|
const fullPath = (directory, ext) => directory + "/catladder." + ext;
|
|
13
11
|
const readConfigInternal = async (directory = process.cwd()) => {
|
|
14
12
|
const found = ["ts", "js", "yml", "yaml"].find(extension => (0, fs_1.existsSync)(fullPath(directory, extension)));
|
|
15
13
|
if (found) {
|
|
16
14
|
const filePath = fullPath(directory, found);
|
|
17
15
|
if (found === "ts" || found === "js") {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const config = result.default
|
|
16
|
+
const jiti = (0, jiti_1.createJiti)(directory);
|
|
17
|
+
const result = await jiti.import(filePath);
|
|
18
|
+
const config = result.default || result;
|
|
21
19
|
return {
|
|
22
20
|
path: filePath,
|
|
23
21
|
ext: found,
|
|
24
|
-
config
|
|
22
|
+
config: config
|
|
25
23
|
};
|
|
26
24
|
} else {
|
|
27
25
|
return {
|
|
@@ -43,9 +41,8 @@ const readConfig = async (directory = process.cwd()) => {
|
|
|
43
41
|
console.error(`
|
|
44
42
|
This may happen due to various reasons:
|
|
45
43
|
- Syntax errors in your catladder.ts file
|
|
46
|
-
-
|
|
47
|
-
If your project uses newer TypeScript/JavaScript syntax, you may need to update catladder
|
|
48
|
-
to get a newer version of tsx that supports it.
|
|
44
|
+
- The TypeScript loader (jiti) used by catladder needs to understand the syntax in your project.
|
|
45
|
+
If your project uses newer TypeScript/JavaScript syntax, you may need to update catladder.
|
|
49
46
|
- Missing or incorrect dependencies in your project
|
|
50
47
|
- TypeScript configuration issues in your tsconfig.json
|
|
51
48
|
`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readConfig.js","sourceRoot":"","sources":["../../../../../pipeline/src/config/readConfig.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;
|
|
1
|
+
{"version":3,"file":"readConfig.js","sourceRoot":"","sources":["../../../../../pipeline/src/config/readConfig.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAAkC;AAElC,+BAA6B;AAG7B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,GAAW,EAAE,EAAE,CAClD,SAAS,GAAG,aAAa,GAAG,GAAG,CAAC;AAElC,MAAM,kBAAkB,GAAG,KAAK,EAC9B,YAAoB,OAAO,CAAC,GAAG,EAAE,EAC8B,EAAE;IACjE,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3D,IAAA,eAAU,EAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAC3C,CAAC;IAEF,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACrC,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC,SAAS,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAE3C,MAAM,MAAM,GAAI,MAAc,CAAC,OAAO,IAAI,MAAM,CAAC;YACjD,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,MAAgB;aACzB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,IAAA,YAAK,EAAC,IAAA,iBAAY,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAW;aACvE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEK,MAAM,UAAU,GAAG,KAAK,EAC7B,YAAoB,OAAO,CAAC,GAAG,EAAE,EAC8B,EAAE;IACjE,IAAI,CAAC;QACH,OAAO,MAAM,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO,CAAC,KAAK,CAAC;;;;;;;CAOjB,CAAC,CAAC;QACC,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB"}
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "main-4f40fed0" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|