mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 08:36:25 +03:00
Fix Windows skill bundle extraction (#198)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
"css-select": "^5.2.2",
|
||||
"css-tree": "^3.2.1",
|
||||
"domutils": "^3.2.2",
|
||||
"extract-zip": "^2.0.1",
|
||||
"htmlparser2": "^10.0.0",
|
||||
"marked": "^16.4.2",
|
||||
},
|
||||
|
||||
@@ -15,6 +15,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { get } from 'node:https';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { tmpdir, homedir } from 'node:os';
|
||||
import extract from 'extract-zip';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const API_BASE = 'https://impeccable.style';
|
||||
@@ -116,7 +117,7 @@ async function downloadAndExtractBundle() {
|
||||
const tmpDir = join(tmpdir(), `impeccable-update-${Date.now()}`);
|
||||
await downloadFile(`${API_BASE}/api/download/bundle/universal`, tmpZip);
|
||||
mkdirSync(tmpDir, { recursive: true });
|
||||
execSync(`unzip -qo "${tmpZip}" -d "${tmpDir}"`, { encoding: 'utf8' });
|
||||
await extract(tmpZip, { dir: tmpDir });
|
||||
rmSync(tmpZip, { force: true });
|
||||
return tmpDir;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
"css-select": "^5.2.2",
|
||||
"css-tree": "^3.2.1",
|
||||
"domutils": "^3.2.2",
|
||||
"extract-zip": "^2.0.1",
|
||||
"htmlparser2": "^10.0.0",
|
||||
"marked": "^16.4.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user