mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-04-21 17:47:22 +00:00
chore: replace zip-local by adm-zip in extensions
fixes https://github.com/containers/podman-desktop/issues/4938 Signed-off-by: Florent Benoit <fbenoit@redhat.com>
This commit is contained in:
parent
48ef66f43b
commit
b37c896cf2
16 changed files with 64 additions and 48 deletions
|
|
@ -160,11 +160,10 @@
|
|||
"shell-path": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.3",
|
||||
"adm-zip": "^0.5.10",
|
||||
"@podman-desktop/api": "^0.0.1",
|
||||
"mkdirp": "^3.0.1",
|
||||
"vite": "^4.5.0",
|
||||
"vitest": "^0.34.6",
|
||||
"zip-local": "^0.3.5"
|
||||
"vitest": "^0.34.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,9 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@
|
|||
"@podman-desktop/api": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"mkdirp": "^3.0.1",
|
||||
"zip-local": "^0.3.5"
|
||||
"adm-zip": "^0.5.10",
|
||||
"mkdirp": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,9 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -108,11 +108,10 @@
|
|||
"yaml": "^2.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"adm-zip": "^0.5.10",
|
||||
"mkdirp": "^3.0.1",
|
||||
"tmp-promise": "^3.0.3",
|
||||
"vite": "^4.5.0",
|
||||
"vitest": "^0.34.6",
|
||||
"zip-local": "^0.3.5"
|
||||
"vitest": "^0.34.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,8 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,10 +42,9 @@
|
|||
"js-yaml": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"adm-zip": "^0.5.10",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"mkdirp": "^3.0.1",
|
||||
"vitest": "^0.34.6",
|
||||
"zip-local": "^0.3.5"
|
||||
"vitest": "^0.34.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,9 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
"@podman-desktop/api": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"byline": "^5.0.0",
|
||||
"copyfiles": "^2.4.1",
|
||||
"mkdirp": "^2.1.3",
|
||||
"vitest": "^0.34.6",
|
||||
"zip-local": "^0.3.5"
|
||||
"vitest": "^0.34.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const package = require('../package.json');
|
||||
const { mkdirp } = require('mkdirp');
|
||||
|
|
@ -58,6 +58,8 @@ byline(fileStream)
|
|||
throw new Error('Error copying files', error);
|
||||
}
|
||||
console.log(`Zipping files to ${destFile}`);
|
||||
zipper.sync.zip(zipDirectory).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(zipDirectory);
|
||||
zip.writeZip(destFile);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@
|
|||
"@podman-desktop/api": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"mkdirp": "^3.0.1",
|
||||
"zip-local": "^0.3.5"
|
||||
"adm-zip": "^0.5.10",
|
||||
"mkdirp": "^3.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,9 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -287,13 +287,12 @@
|
|||
"compare-versions": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"adm-zip": "^0.5.10",
|
||||
"hasha": "^5.2.2",
|
||||
"mkdirp": "^3.0.1",
|
||||
"nock": "^13.3.8",
|
||||
"octokit": "^3.1.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"vitest": "^0.34.6",
|
||||
"zip-local": "^0.3.5"
|
||||
"vitest": "^0.34.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,12 +35,14 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
const zip = zipper.sync.zip(path.resolve(__dirname, '../'));
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
// delete assets from cdix file
|
||||
zip.lowLevel().remove('assets');
|
||||
zip.compress().save(destFile);
|
||||
zip.deleteFile('assets/');
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@
|
|||
"@podman-desktop/api": "^0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"7zip-min": "^1.4.4",
|
||||
"adm-zip": "^0.5.10",
|
||||
"mkdirp": "^3.0.1",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"zip-local": "^0.3.5"
|
||||
"rollup-plugin-copy": "^3.5.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
***********************************************************************/
|
||||
|
||||
const zipper = require('zip-local');
|
||||
const AdmZip = require('adm-zip');
|
||||
const path = require('path');
|
||||
const packageJson = require('../package.json');
|
||||
const fs = require('fs');
|
||||
|
|
@ -35,9 +35,12 @@ if (fs.existsSync(builtinDirectory)) {
|
|||
fs.rmSync(builtinDirectory, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
zipper.sync.zip(path.resolve(__dirname, '../')).compress().save(destFile);
|
||||
const zip = new AdmZip();
|
||||
zip.addLocalFolder(path.resolve(__dirname, '../'));
|
||||
zip.writeZip(destFile);
|
||||
|
||||
// create unzipped built-in
|
||||
mkdirp(unzippedDirectory).then(() => {
|
||||
zipper.sync.unzip(destFile).save(unzippedDirectory);
|
||||
const unzip = new AdmZip(destFile);
|
||||
unzip.extractAllTo(unzippedDirectory);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue