@bootmap/wpep-cli 1.1.3 → 1.1.4
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 +1 -1
- package/src/commands/deploy.js +2 -4
package/package.json
CHANGED
package/src/commands/deploy.js
CHANGED
|
@@ -5,9 +5,7 @@ import chalk from 'chalk';
|
|
|
5
5
|
import ora from 'ora';
|
|
6
6
|
import { execSync } from 'child_process';
|
|
7
7
|
import inquirer from 'inquirer';
|
|
8
|
-
import {
|
|
9
|
-
const require = createRequire(import.meta.url);
|
|
10
|
-
const archiver = require('archiver');
|
|
8
|
+
import { ZipArchive } from 'archiver';
|
|
11
9
|
|
|
12
10
|
function getFiles(dir, files = []) {
|
|
13
11
|
if (!fs.existsSync(dir)) return files;
|
|
@@ -202,7 +200,7 @@ export default async function deployCommand(options) {
|
|
|
202
200
|
|
|
203
201
|
const zipPath = path.join(process.cwd(), 'wpep-deploy.zip');
|
|
204
202
|
const outputZip = fs.createWriteStream(zipPath);
|
|
205
|
-
const archive =
|
|
203
|
+
const archive = new ZipArchive({ zlib: { level: 9 } });
|
|
206
204
|
|
|
207
205
|
const zipPromise = new Promise((resolve, reject) => {
|
|
208
206
|
outputZip.on('close', resolve);
|