fix(js): update Electron build configuration and dependencies (#411)
This commit is contained in:
@@ -221,7 +221,7 @@ function bundlePlugin(nodeModulesRoot, npmName, destDir) {
|
||||
}
|
||||
|
||||
let realPluginPath;
|
||||
try { realPluginPath = realpathSync(normWin(pkgPath)); } catch { realPluginPath = pkgPath; }
|
||||
try { realPluginPath = realpathSync(pkgPath); } catch { realPluginPath = pkgPath; }
|
||||
|
||||
// Copy plugin package itself
|
||||
if (existsSync(normWin(destDir))) rmSync(normWin(destDir), { recursive: true, force: true });
|
||||
@@ -258,7 +258,7 @@ function bundlePlugin(nodeModulesRoot, npmName, destDir) {
|
||||
if (name === skipPkg) continue;
|
||||
if (SKIP_PACKAGES.has(name) || SKIP_SCOPES.some(s => name.startsWith(s))) continue;
|
||||
let rp;
|
||||
try { rp = realpathSync(normWin(fullPath)); } catch { continue; }
|
||||
try { rp = realpathSync(fullPath); } catch { continue; }
|
||||
if (collected.has(rp)) continue;
|
||||
collected.set(rp, name);
|
||||
const depVirtualNM = getVirtualStoreNodeModules(rp);
|
||||
|
||||
@@ -86,7 +86,7 @@ function bundleOnePlugin({ npmName, pluginId }) {
|
||||
throw new Error(`Missing dependency "${npmName}". Run pnpm install first.`);
|
||||
}
|
||||
|
||||
const realPluginPath = fs.realpathSync(normWin(pkgPath));
|
||||
const realPluginPath = fs.realpathSync(pkgPath);
|
||||
const outputDir = path.join(OUTPUT_ROOT, pluginId);
|
||||
|
||||
echo`📦 Bundling plugin ${npmName} -> ${outputDir}`;
|
||||
@@ -126,7 +126,7 @@ function bundleOnePlugin({ npmName, pluginId }) {
|
||||
|
||||
let realPath;
|
||||
try {
|
||||
realPath = fs.realpathSync(normWin(fullPath));
|
||||
realPath = fs.realpathSync(fullPath);
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ if (!fs.existsSync(openclawLink)) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const openclawReal = fs.realpathSync(normWin(openclawLink));
|
||||
const openclawReal = fs.realpathSync(openclawLink);
|
||||
echo` openclaw resolved: ${openclawReal}`;
|
||||
|
||||
// 2. Clean and create output directory
|
||||
@@ -152,7 +152,7 @@ while (queue.length > 0) {
|
||||
|
||||
let realPath;
|
||||
try {
|
||||
realPath = fs.realpathSync(normWin(fullPath));
|
||||
realPath = fs.realpathSync(fullPath);
|
||||
} catch {
|
||||
continue; // broken symlink, skip
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user