feat: prepare Zhinian desktop client for pilot release
This commit is contained in:
@@ -23,6 +23,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ROOT = path.resolve(__dirname, '..');
|
||||
const OUTPUT_ROOT = path.join(ROOT, 'build', 'openclaw-plugins');
|
||||
const NODE_MODULES = path.join(ROOT, 'node_modules');
|
||||
const STATIC_PLUGIN_ROOT = path.join(ROOT, 'resources', 'openclaw-plugins');
|
||||
|
||||
// On Windows, pnpm virtual store paths can exceed MAX_PATH (260 chars).
|
||||
// Adding \\?\ prefix bypasses the limit for Win32 fs calls.
|
||||
@@ -241,4 +242,17 @@ for (const plugin of PLUGINS) {
|
||||
bundleOnePlugin(plugin);
|
||||
}
|
||||
|
||||
if (fs.existsSync(STATIC_PLUGIN_ROOT)) {
|
||||
for (const entry of fs.readdirSync(STATIC_PLUGIN_ROOT, { withFileTypes: true })) {
|
||||
if (!entry.isDirectory()) continue;
|
||||
const sourceDir = path.join(STATIC_PLUGIN_ROOT, entry.name);
|
||||
const outputDir = path.join(OUTPUT_ROOT, entry.name);
|
||||
const manifestPath = path.join(sourceDir, 'openclaw.plugin.json');
|
||||
if (!fs.existsSync(manifestPath)) continue;
|
||||
echo`📦 Copying static plugin ${entry.name} -> ${outputDir}`;
|
||||
fs.rmSync(outputDir, { recursive: true, force: true });
|
||||
fs.cpSync(sourceDir, outputDir, { recursive: true, dereference: true });
|
||||
}
|
||||
}
|
||||
|
||||
echo`✅ Plugin mirrors ready: ${OUTPUT_ROOT}`;
|
||||
|
||||
Reference in New Issue
Block a user