mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +00:00
Update etcher-sdk to 5.1.2
Change-type: patch
This commit is contained in:
parent
e58cfd89c5
commit
ef3b8915d8
51
npm-shrinkwrap.json
generated
51
npm-shrinkwrap.json
generated
@ -1360,6 +1360,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@balena/node-crc-utils": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@balena/node-crc-utils/-/node-crc-utils-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-u86QDMtkpHLlvehs3Z+yHklXRhDPL5XGCO3BCSuaD61gKzrNDUIj03cz8T/PBPPUJqn7DfWkf9sKP9VwlvxKuw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@balena/udif": {
|
"@balena/udif": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@balena/udif/-/udif-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@balena/udif/-/udif-1.1.0.tgz",
|
||||||
@ -7351,9 +7357,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"etcher-sdk": {
|
"etcher-sdk": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-5.1.2.tgz",
|
||||||
"integrity": "sha512-N23KjuPbE3D1NX0qc+JSxdcWCALP1LAF3AJThZcbHjvQIHVSNf7PvaWfykZ8HmWSxIjiIK8V1Alimf8CYrk2+g==",
|
"integrity": "sha512-N08WjvgG4NMF91hkh0vYmSurMptA/ee1ddEIFanY5OHp4GluFJ8+wy/564CDn7NeuLq90yLmdWuL1sXOzoPzMw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@balena/udif": "^1.1.0",
|
"@balena/udif": "^1.1.0",
|
||||||
@ -7368,7 +7374,7 @@
|
|||||||
"drivelist": "^9.1.0",
|
"drivelist": "^9.1.0",
|
||||||
"file-disk": "^8.0.0",
|
"file-disk": "^8.0.0",
|
||||||
"file-type": "^8.0.0",
|
"file-type": "^8.0.0",
|
||||||
"gzip-stream": "^1.1.0",
|
"gzip-stream": "^1.1.1",
|
||||||
"lzma-native": "^6.0.0",
|
"lzma-native": "^6.0.0",
|
||||||
"mountutils": "^1.3.18",
|
"mountutils": "^1.3.18",
|
||||||
"node-raspberrypi-usbboot": "^0.2.9",
|
"node-raspberrypi-usbboot": "^0.2.9",
|
||||||
@ -7380,7 +7386,7 @@
|
|||||||
"unzip-stream": "^0.3.0",
|
"unzip-stream": "^0.3.0",
|
||||||
"xxhash": "^0.3.0",
|
"xxhash": "^0.3.0",
|
||||||
"yauzl": "^2.9.2",
|
"yauzl": "^2.9.2",
|
||||||
"zip-part-stream": "^1.0.1"
|
"zip-part-stream": "^1.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
@ -8507,14 +8513,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"gzip-stream": {
|
"gzip-stream": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/gzip-stream/-/gzip-stream-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/gzip-stream/-/gzip-stream-1.1.1.tgz",
|
||||||
"integrity": "sha512-NsYAyiXQB2cBoy6qWRt0l8RHhafych/e1wlFpD8DA5pAD7aOvRH+PEHnznfp8ALvXVuJ1LNvwqoCRXcZGzs2xg==",
|
"integrity": "sha512-V4FlTwvLpd5ZPcIjUODt/NrP+yhX6pKNzKYahrcSo6WLeLz5Rvlta00DZ3D13YL7QeOC3D7IYPUGKeuN3x9cEg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@balena/node-crc-utils": "^2.0.0",
|
||||||
"combined-stream": "^1.0.8",
|
"combined-stream": "^1.0.8",
|
||||||
"crc32-stream": "^4.0.0",
|
"crc32-stream": "^4.0.0"
|
||||||
"resin-crc-utils": "^1.0.3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"har-schema": {
|
"har-schema": {
|
||||||
@ -11507,9 +11513,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-abi": {
|
"node-abi": {
|
||||||
"version": "2.18.0",
|
"version": "2.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.1.tgz",
|
||||||
"integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==",
|
"integrity": "sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"semver": "^5.4.1"
|
"semver": "^5.4.1"
|
||||||
@ -13716,15 +13722,6 @@
|
|||||||
"raven-js": "^3.19.1"
|
"raven-js": "^3.19.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"resin-crc-utils": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/resin-crc-utils/-/resin-crc-utils-1.0.3.tgz",
|
|
||||||
"integrity": "sha512-G5uLoRyZmurm6Lub0p7fPrkc5BzmTIpsXuTlIr6yII1QD4xDyM+Nx5nhn8uqbz1rpHBIvImwhVc3nnioKHc0sw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"nan": "^2.14.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"resize-observer": {
|
"resize-observer": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/resize-observer/-/resize-observer-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/resize-observer/-/resize-observer-1.0.0.tgz",
|
||||||
@ -17471,14 +17468,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"zip-part-stream": {
|
"zip-part-stream": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/zip-part-stream/-/zip-part-stream-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/zip-part-stream/-/zip-part-stream-1.0.2.tgz",
|
||||||
"integrity": "sha512-WNgc3+GaH0x+G4HotQbDNAfnRQdnn3HFnQOAUN5EVioXlD4zFH42smklvU5LG7VpCbkil1uDSm20rc/6L5J8ZA==",
|
"integrity": "sha512-2dxIug2ydhnpv1YGRuU7muTpxx4+hoLaQoVwfysaRzWF1GV2s5BDqlTuiQQda/vdfMtKYIamSJffps+0n4QJsw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@balena/node-crc-utils": "^2.0.0",
|
||||||
"combined-stream": "^1.0.8",
|
"combined-stream": "^1.0.8",
|
||||||
"crc32-stream": "^4.0.0",
|
"crc32-stream": "^4.0.0"
|
||||||
"resin-crc-utils": "^1.0.3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zip-stream": {
|
"zip-stream": {
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
"electron-notarize": "^1.0.0",
|
"electron-notarize": "^1.0.0",
|
||||||
"electron-rebuild": "^2.3.2",
|
"electron-rebuild": "^2.3.2",
|
||||||
"electron-updater": "^4.3.5",
|
"electron-updater": "^4.3.5",
|
||||||
"etcher-sdk": "^5.1.1",
|
"etcher-sdk": "^5.1.2",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"immutable": "^3.8.1",
|
"immutable": "^3.8.1",
|
||||||
|
@ -108,6 +108,23 @@ function replace(test: RegExp, ...replacements: ReplacementRule[]) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fetchWasm(...where: string[]) {
|
||||||
|
const whereStr = where.map((x) => `'${x}'`).join(', ');
|
||||||
|
return outdent`
|
||||||
|
const Path = require('path');
|
||||||
|
let electron;
|
||||||
|
try {
|
||||||
|
// This doesn't exist in the child-writer
|
||||||
|
electron = require('electron');
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
function appPath() {
|
||||||
|
return Path.isAbsolute(__dirname) ? __dirname : Path.join(electron.remote.app.getAppPath(), 'generated');
|
||||||
|
}
|
||||||
|
scriptDirectory = Path.join(appPath(), 'modules', ${whereStr}, '/');
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
const commonConfig = {
|
const commonConfig = {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
optimization: {
|
optimization: {
|
||||||
@ -232,19 +249,12 @@ const commonConfig = {
|
|||||||
// We use __dirname in the child-writer and electron.remote.app.getAppPath() in the renderer
|
// We use __dirname in the child-writer and electron.remote.app.getAppPath() in the renderer
|
||||||
replace(/node_modules\/ext2fs\/lib\/libext2fs\.js$/, {
|
replace(/node_modules\/ext2fs\/lib\/libext2fs\.js$/, {
|
||||||
search: 'scriptDirectory=__dirname+"/"',
|
search: 'scriptDirectory=__dirname+"/"',
|
||||||
replace: outdent`
|
replace: fetchWasm('ext2fs', 'lib'),
|
||||||
const Path = require('path');
|
}),
|
||||||
let electron;
|
// Same for node-crc-utils
|
||||||
try {
|
replace(/node_modules\/@balena\/node-crc-utils\/crc32\.js$/, {
|
||||||
// This doesn't exist in the child-writer
|
search: 'scriptDirectory=__dirname+"/"',
|
||||||
electron = require('electron');
|
replace: fetchWasm('@balena', 'node-crc-utils'),
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
function appPath() {
|
|
||||||
return Path.isAbsolute(__dirname) ? __dirname : Path.join(electron.remote.app.getAppPath(), 'generated');
|
|
||||||
}
|
|
||||||
scriptDirectory = Path.join(appPath(), 'modules', 'ext2fs', 'lib', '/');
|
|
||||||
`,
|
|
||||||
}),
|
}),
|
||||||
// Copy native modules to generated folder
|
// Copy native modules to generated folder
|
||||||
{
|
{
|
||||||
@ -299,6 +309,10 @@ const guiConfigCopyPatterns = [
|
|||||||
from: 'node_modules/ext2fs/lib/libext2fs.wasm',
|
from: 'node_modules/ext2fs/lib/libext2fs.wasm',
|
||||||
to: 'modules/ext2fs/lib/libext2fs.wasm',
|
to: 'modules/ext2fs/lib/libext2fs.wasm',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
from: 'node_modules/@balena/node-crc-utils/crc32.wasm',
|
||||||
|
to: 'modules/@balena/node-crc-utils/crc32.wasm',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user