golar 0.0.2 → 0.0.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 +13 -5
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -10,11 +10,19 @@ const plugins = /* @__PURE__ */ new Map();
|
|
|
10
10
|
const filename = import.meta.filename.replaceAll("\\", "/");
|
|
11
11
|
await Promise.all(filename.matchAll(/\/node_modules\//g).map(async (nodeModulesMatch) => {
|
|
12
12
|
const nodeModulesPath = filename.slice(0, nodeModulesMatch.index + nodeModulesMatch[0].length);
|
|
13
|
-
for (const
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
for (const orgName of await fs.readdir(nodeModulesPath)) {
|
|
14
|
+
if (!orgName.startsWith("@")) continue;
|
|
15
|
+
for (const packageName of await fs.readdir(path.join(nodeModulesPath, orgName))) {
|
|
16
|
+
if ((orgName !== "@golar" || ![
|
|
17
|
+
"astro",
|
|
18
|
+
"svelte",
|
|
19
|
+
"vue"
|
|
20
|
+
].includes(packageName)) && !/^golar-plugin(-.+)?$/.exec(packageName)) continue;
|
|
21
|
+
const packagePath = path.join(nodeModulesPath, orgName, packageName);
|
|
22
|
+
const packageJson = JSON.parse(await fs.readFile(path.join(packagePath, "package.json"), "utf8"));
|
|
23
|
+
if (typeof packageJson.bin !== "string") continue;
|
|
24
|
+
plugins.set(packageName, path.join(packagePath, packageJson.bin));
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
}));
|
|
20
28
|
const exePath = fileURLToPath(import.meta.resolve(`@golar/${process.platform}-${process.arch}/golar${process.platform === "win32" ? ".exe" : ""}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "golar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/bin.js",
|
|
6
6
|
"files": [
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@golar/win32-x64": "0.0.
|
|
26
|
-
"@golar/
|
|
27
|
-
"@golar/
|
|
28
|
-
"@golar/darwin-
|
|
29
|
-
"@golar/
|
|
30
|
-
"@golar/
|
|
25
|
+
"@golar/win32-x64": "0.0.3",
|
|
26
|
+
"@golar/win32-arm64": "0.0.3",
|
|
27
|
+
"@golar/linux-x64": "0.0.3",
|
|
28
|
+
"@golar/darwin-x64": "0.0.3",
|
|
29
|
+
"@golar/linux-arm64": "0.0.3",
|
|
30
|
+
"@golar/darwin-arm64": "0.0.3"
|
|
31
31
|
}
|
|
32
32
|
}
|