@ttoss/read-config-file 2.0.11 → 2.0.13
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/dist/esm/index.js +15 -10
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
4
|
+
value,
|
|
5
|
+
configurable: true
|
|
6
|
+
});
|
|
2
7
|
var __require = /* @__PURE__ */(x => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
8
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
9
|
}) : x)(function (x) {
|
|
@@ -10,7 +15,7 @@ var __require = /* @__PURE__ */(x => typeof require !== "undefined" ? require :
|
|
|
10
15
|
import * as esbuild from "esbuild";
|
|
11
16
|
import importSync from "import-sync";
|
|
12
17
|
import path from "path";
|
|
13
|
-
var loadConfig = entryPoint => {
|
|
18
|
+
var loadConfig = /* @__PURE__ */__name(entryPoint => {
|
|
14
19
|
const lastEntryPointName = entryPoint.split("/").pop();
|
|
15
20
|
const filename = lastEntryPointName?.split(".")[0];
|
|
16
21
|
const outfile = path.resolve(process.cwd(), "out", filename + ".js");
|
|
@@ -18,10 +23,10 @@ var loadConfig = entryPoint => {
|
|
|
18
23
|
bundle: true,
|
|
19
24
|
entryPoints: [entryPoint],
|
|
20
25
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
* ttoss packages cannot be market as external because it'd break the CI.
|
|
27
|
+
* On CI, ttoss packages point to the TS main file, not the compiled
|
|
28
|
+
* ones. See more details here https://github.com/ttoss/ttoss/issues/541.
|
|
29
|
+
*/
|
|
25
30
|
external: [],
|
|
26
31
|
format: "cjs",
|
|
27
32
|
outfile,
|
|
@@ -40,12 +45,12 @@ var loadConfig = entryPoint => {
|
|
|
40
45
|
console.error("Failed importing build config file: ", filename);
|
|
41
46
|
throw error;
|
|
42
47
|
}
|
|
43
|
-
};
|
|
48
|
+
}, "loadConfig");
|
|
44
49
|
|
|
45
50
|
// src/index.ts
|
|
46
51
|
import fs from "fs";
|
|
47
52
|
import yaml from "js-yaml";
|
|
48
|
-
var readConfigFileSync = ({
|
|
53
|
+
var readConfigFileSync = /* @__PURE__ */__name(({
|
|
49
54
|
configFilePath,
|
|
50
55
|
options
|
|
51
56
|
}) => {
|
|
@@ -69,8 +74,8 @@ var readConfigFileSync = ({
|
|
|
69
74
|
return result;
|
|
70
75
|
}
|
|
71
76
|
throw new Error("Unsupported config file extension: " + extension);
|
|
72
|
-
};
|
|
73
|
-
var readConfigFile = async ({
|
|
77
|
+
}, "readConfigFileSync");
|
|
78
|
+
var readConfigFile = /* @__PURE__ */__name(async ({
|
|
74
79
|
configFilePath,
|
|
75
80
|
options
|
|
76
81
|
}) => {
|
|
@@ -87,5 +92,5 @@ var readConfigFile = async ({
|
|
|
87
92
|
configFilePath,
|
|
88
93
|
options
|
|
89
94
|
});
|
|
90
|
-
};
|
|
95
|
+
}, "readConfigFile");
|
|
91
96
|
export { readConfigFile, readConfigFileSync };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/read-config-file",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "Read a configuration file",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"esbuild": "^0.25.
|
|
26
|
+
"esbuild": "^0.25.8",
|
|
27
27
|
"import-sync": "^2.2.2",
|
|
28
28
|
"js-yaml": "^4.1.0"
|
|
29
29
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/react": "^19.1.8",
|
|
34
34
|
"jest": "^30.0.4",
|
|
35
35
|
"tsup": "^8.5.0",
|
|
36
|
-
"@ttoss/config": "^1.35.
|
|
36
|
+
"@ttoss/config": "^1.35.7",
|
|
37
37
|
"@ttoss/read-config-file-test": "^1.0.1"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|