@shellui/cli 0.0.14 → 0.0.15
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 +5 -5
- package/src/utils/vite.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shellui/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
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.15"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
@@ -18,7 +18,7 @@ export function resolvePackagePath(packageName) {
|
|
|
18
18
|
// This works for both workspace packages (via pnpm workspace) and npm-installed packages
|
|
19
19
|
const packageJsonPath = require.resolve(`${packageName}/package.json`);
|
|
20
20
|
const resolved = path.dirname(packageJsonPath);
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
// Resolve symlinks to get the canonical path — pnpm uses symlinks that
|
|
23
23
|
// point to different .pnpm/ directories; Vite resolves real paths so we
|
|
24
24
|
// need to be consistent to avoid mismatched root vs input paths.
|
|
@@ -32,7 +32,7 @@ export function resolvePackagePath(packageName) {
|
|
|
32
32
|
// Go up from cli/src/utils/package-path.js -> cli/src/utils -> cli/src -> cli -> packages -> packageName
|
|
33
33
|
const packagesDir = path.resolve(__dirname, '../../../');
|
|
34
34
|
const resolved = path.join(packagesDir, packageName.replace('@shellui/', ''));
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
// Only use this fallback if the path exists (workspace mode)
|
|
37
37
|
if (fs.existsSync(resolved)) {
|
|
38
38
|
try {
|
|
@@ -41,12 +41,12 @@ export function resolvePackagePath(packageName) {
|
|
|
41
41
|
return resolved;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
// If we get here, the package wasn't found
|
|
46
46
|
throw new Error(
|
|
47
47
|
`Package "${packageName}" not found. ` +
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
`Make sure it's installed (npm/pnpm install) or available in the workspace. ` +
|
|
49
|
+
`Original error: ${e.message}`,
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
}
|
package/src/utils/vite.js
CHANGED
|
@@ -12,24 +12,24 @@ import { resolvePackagePath, resolveSdkEntry } from './index.js';
|
|
|
12
12
|
export function getCoreSrcPath() {
|
|
13
13
|
const corePackagePath = resolvePackagePath('@shellui/core');
|
|
14
14
|
const srcPath = path.join(corePackagePath, 'src');
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
// Verify src directory exists (should always exist since it's in package.json files)
|
|
17
17
|
if (!fs.existsSync(srcPath)) {
|
|
18
18
|
throw new Error(
|
|
19
19
|
`Core package src directory not found at ${srcPath}. ` +
|
|
20
|
-
|
|
20
|
+
`Make sure @shellui/core is properly installed and includes the src directory.`,
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
// Verify index.html exists (required for dev server)
|
|
25
25
|
const indexHtmlPath = path.join(srcPath, 'index.html');
|
|
26
26
|
if (!fs.existsSync(indexHtmlPath)) {
|
|
27
27
|
throw new Error(
|
|
28
28
|
`Core package index.html not found at ${indexHtmlPath}. ` +
|
|
29
|
-
|
|
29
|
+
`Make sure @shellui/core is properly installed.`,
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
return srcPath;
|
|
34
34
|
}
|
|
35
35
|
|