@42ailab/42plugin 0.2.17 → 0.2.18
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/42plugin +7 -5
- package/package.json +6 -6
package/bin/42plugin
CHANGED
|
@@ -84,13 +84,15 @@ function findBinary(autoInstall = false) {
|
|
|
84
84
|
const binaryName = process.platform === 'win32' ? '42plugin.exe' : '42plugin';
|
|
85
85
|
|
|
86
86
|
// 尝试多个可能的路径
|
|
87
|
+
// __dirname = .../node_modules/@42ailab/42plugin/bin
|
|
88
|
+
// packageName = @42ailab/42plugin-darwin-arm64 (包含 scope,需要从 node_modules 开始)
|
|
87
89
|
const possiblePaths = [
|
|
88
|
-
// 1.
|
|
89
|
-
join(__dirname, '..', '..', packageName, 'bin', binaryName),
|
|
90
|
-
// 2.
|
|
90
|
+
// 1. bun/npm 全局安装路径: 回退到 node_modules 再拼接 packageName
|
|
91
|
+
join(__dirname, '..', '..', '..', packageName, 'bin', binaryName),
|
|
92
|
+
// 2. npm 嵌套 node_modules 路径
|
|
91
93
|
join(__dirname, '..', 'node_modules', packageName, 'bin', binaryName),
|
|
92
|
-
// 3. pnpm
|
|
93
|
-
join(__dirname, '..', '..', '.pnpm', 'node_modules', packageName, 'bin', binaryName),
|
|
94
|
+
// 3. pnpm 路径
|
|
95
|
+
join(__dirname, '..', '..', '..', '.pnpm', 'node_modules', packageName, 'bin', binaryName),
|
|
94
96
|
];
|
|
95
97
|
|
|
96
98
|
for (const binPath of possiblePaths) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@42ailab/42plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "42plugin CLI - AI 插件管理工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"node": ">=18.0.0"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@42ailab/42plugin-darwin-arm64": "0.2.
|
|
36
|
-
"@42ailab/42plugin-darwin-x64": "0.2.
|
|
37
|
-
"@42ailab/42plugin-linux-arm64": "0.2.
|
|
38
|
-
"@42ailab/42plugin-linux-x64": "0.2.
|
|
39
|
-
"@42ailab/42plugin-win32-x64": "0.2.
|
|
35
|
+
"@42ailab/42plugin-darwin-arm64": "0.2.18",
|
|
36
|
+
"@42ailab/42plugin-darwin-x64": "0.2.18",
|
|
37
|
+
"@42ailab/42plugin-linux-arm64": "0.2.18",
|
|
38
|
+
"@42ailab/42plugin-linux-x64": "0.2.18",
|
|
39
|
+
"@42ailab/42plugin-win32-x64": "0.2.18"
|
|
40
40
|
}
|
|
41
41
|
}
|