update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
23
electron/node_modules/@electron-internal/extract-zip/index.js
generated
vendored
Normal file
23
electron/node_modules/@electron-internal/extract-zip/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import path from 'node:path';
|
||||
import { extract as nativeExtract } from './binding.js';
|
||||
|
||||
/**
|
||||
* Extract a zip archive to a directory.
|
||||
*
|
||||
* await extract(source, { dir: '/abs/path' })
|
||||
*
|
||||
* @param {string} zipPath
|
||||
* @param {import('./index.js').ExtractOptions} opts
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function extract(zipPath, opts) {
|
||||
if (!opts || typeof opts.dir !== 'string') {
|
||||
throw new TypeError('extract: opts.dir is required');
|
||||
}
|
||||
if (!path.isAbsolute(opts.dir)) {
|
||||
throw new TypeError('extract: opts.dir must be an absolute path');
|
||||
}
|
||||
return nativeExtract(zipPath, opts);
|
||||
}
|
||||
|
||||
export default extract;
|
||||
Loading…
Add table
Add a link
Reference in a new issue