Skip to content

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

fix: add Windows compatibility for zip extraction and file copy

Viet Tran2e7acbf50f8e
diff --git a/cli/package.json b/cli/package.json
index e46b953..a215540 100644
--- a/cli/package.json
+++ b/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "uipro-cli",
- "version": "1.0.2",
+ "version": "1.0.3",
"description": "CLI to install UI/UX Pro Max skill for AI coding assistants",
"type": "module",
"bin": {
diff --git a/cli/src/index.ts b/cli/src/index.ts
index fd51499..b5c225d 100644
--- a/cli/src/index.ts
+++ b/cli/src/index.ts
@@ -12,7 +12,7 @@ const program = new Command();
program
.name('uipro')
.description('CLI to install UI/UX Pro Max skill for AI coding assistants')
- .version('1.0.2');
+ .version('1.0.3');
program
.command('init')
diff --git a/cli/src/utils/extract.ts b/cli/src/utils/extract.ts
index 8554ce6..038a73c 100644
--- a/cli/src/utils/extract.ts
+++ b/cli/src/utils/extract.ts
@@ -9,7 +9,12 @@ const execAsync = promisify(exec);
export async function extractZip(zipPath: string, destDir: string): Promise<void> {
try {
- await execAsync(`unzip -o "${zipPath}" -d "${destDir}"`);
+ const isWindows = process.platform === 'win32';
+ if (isWindows) {
+ await execAsync(`powershell -Command "Expand-Archive -Path '${zipPath}' -DestinationPath '${destDir}' -Force"`);
+ } else {
+ await execAsync(`unzip -o "${zipPath}" -d "${destDir}"`);
+ }
} catch (error) {
throw new Error(`Failed to extract zip: ${error}`);
}
@@ -58,7 +63,11 @@ export async function copyFolders(
} catch {
// Try shell fallback for older Node versions
try {
- await execAsync(`cp -r "${sourcePath}/." "${targetPath}"`);
+ if (process.platform === 'win32') {
+ await execAsync(`xcopy "${sourcePath}" "${targetPath}" /E /I /Y`);
+ } else {
+ await execAsync(`cp -r "${sourcePath}/." "${targetPath}"`);
+ }
copiedFolders.push(folder);
} catch {
// Skip if copy fails