@shellui/cli 0.0.4 → 0.0.6
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/package.json +2 -2
- package/src/utils/package-path.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shellui/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "ShellUI CLI - Command-line tool for ShellUI",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.21.0",
|
|
31
31
|
"vite": "7.3.1",
|
|
32
32
|
"workbox-build": "^7.1.0",
|
|
33
|
-
"@shellui/core": "0.0.
|
|
33
|
+
"@shellui/core": "0.0.6"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
@@ -17,10 +17,18 @@ export function resolvePackagePath(packageName) {
|
|
|
17
17
|
const packageJsonPath = require.resolve(`${packageName}/package.json`);
|
|
18
18
|
return path.dirname(packageJsonPath);
|
|
19
19
|
} catch (e) {
|
|
20
|
-
// Fallback: assume workspace structure
|
|
20
|
+
// Fallback: assume workspace structure or pnpm symlinked node_modules
|
|
21
21
|
// Go up from cli/src/utils/package-path.js -> cli/src/utils -> cli/src -> cli -> packages -> packageName
|
|
22
22
|
const packagesDir = path.resolve(__dirname, '../../../');
|
|
23
|
-
|
|
23
|
+
const resolved = path.join(packagesDir, packageName.replace('@shellui/', ''));
|
|
24
|
+
// Resolve symlinks to get the canonical path — pnpm uses symlinks that
|
|
25
|
+
// point to different .pnpm/ directories; Vite resolves real paths so we
|
|
26
|
+
// need to be consistent to avoid mismatched root vs input paths.
|
|
27
|
+
try {
|
|
28
|
+
return fs.realpathSync(resolved);
|
|
29
|
+
} catch {
|
|
30
|
+
return resolved;
|
|
31
|
+
}
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
|