golar 0.1.1 → 0.1.3
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/bin.js +11 -3
- package/dist/packages/golar/package.js +1 -1
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -14,7 +14,7 @@ import fs from "node:fs";
|
|
|
14
14
|
//#region src/bin.ts
|
|
15
15
|
const argv = process.argv.slice(2);
|
|
16
16
|
const cwd = process.cwd();
|
|
17
|
-
|
|
17
|
+
let configPath = path.join(cwd, "golar.config.ts");
|
|
18
18
|
if (argv[0] === "--help") {
|
|
19
19
|
console.log(`
|
|
20
20
|
Usage: golar [command]
|
|
@@ -34,11 +34,19 @@ Options:
|
|
|
34
34
|
console.log(`Golar version ${version}`);
|
|
35
35
|
process.exit(0);
|
|
36
36
|
}
|
|
37
|
-
if (!fs.existsSync(configPath)) {
|
|
37
|
+
if (!fs.existsSync(configPath)) try {
|
|
38
|
+
configPath = await Promise.any([
|
|
39
|
+
"golar.config.mts",
|
|
40
|
+
"golar.config.mjs",
|
|
41
|
+
"golar.config.cts",
|
|
42
|
+
"golar.config.cjs",
|
|
43
|
+
"golar.config.js"
|
|
44
|
+
].map((p) => fs.promises.stat(p).then(() => path.join(cwd, p))));
|
|
45
|
+
} catch {
|
|
38
46
|
console.log(`${styleText("red", "Error:")} ./golar.config.ts not found`);
|
|
39
47
|
process.exit(1);
|
|
40
48
|
}
|
|
41
|
-
console.log(`${styleText("dim", "Using config from")}
|
|
49
|
+
console.log(`${styleText("dim", "Using config from")} ./${path.basename(configPath)}${styleText("dim", "...")}`);
|
|
42
50
|
const config = await loadConfig(configPath);
|
|
43
51
|
const hasJsCodegenPlugins = globalState.codegenPlugins.values().some((v) => v instanceof JsCodegenPlugin);
|
|
44
52
|
const selfExtname = path.extname(import.meta.filename);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "golar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/bin.js",
|
|
6
6
|
"exports": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@golar/util": "0.1.
|
|
29
|
+
"@golar/util": "0.1.3"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@golar/linux-x64": "0.1.
|
|
33
|
-
"@golar/linux-arm64": "0.1.
|
|
34
|
-
"@golar/
|
|
35
|
-
"@golar/darwin-
|
|
36
|
-
"@golar/
|
|
32
|
+
"@golar/linux-x64": "0.1.3",
|
|
33
|
+
"@golar/linux-arm64": "0.1.3",
|
|
34
|
+
"@golar/darwin-x64": "0.1.3",
|
|
35
|
+
"@golar/darwin-arm64": "0.1.3",
|
|
36
|
+
"@golar/win32-x64": "0.1.3"
|
|
37
37
|
}
|
|
38
38
|
}
|