From 6143023502c5319d0278a264ee3a1dfd4ce68a88 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 8 Jun 2018 15:01:00 +0100 Subject: [PATCH] Integrate etcher-sdk --- Makefile | 5 + lib/gui/app/app.js | 30 +- lib/gui/app/models/store.js | 5 +- lib/gui/app/modules/drive-scanner.js | 29 +- lib/gui/app/pages/main/controllers/flash.js | 2 +- lib/gui/modules/child-writer.js | 167 ++- lib/sdk/writer/block-write-stream.js | 2 +- lib/shared/permissions.js | 1 + npm-shrinkwrap.json | 1241 ++++++++++------- package.json | 3 +- ...on-forks-of-modules-that-use-pre-gyp.patch | 29 + ...ma-native-index-static-addon-require.patch | 15 - webpack.config.js | 2 +- 13 files changed, 967 insertions(+), 564 deletions(-) create mode 100644 patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch delete mode 100644 patches/lzma-native-index-static-addon-require.patch diff --git a/Makefile b/Makefile index c9cb8c80..254fb3ef 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,11 @@ electron-develop: | $(BUILD_TEMPORARY_DIRECTORY) -s $(PLATFORM) \ -n $(BUILD_TEMPORARY_DIRECTORY)/npm \ -a $(S3_BUCKET) + # patch from https://github.com/mapbox/node-pre-gyp/pull/279/files , required for lzma-native in electron child processes + # we only apply the patch if it hasn't been applied + if ! [ -f node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/versioning.js.orig ]; \ + then patch --backup --force --strip=1 --ignore-whitespace < patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch; \ + fi; electron-test: $(RESIN_SCRIPTS)/electron/test.sh \ diff --git a/lib/gui/app/app.js b/lib/gui/app/app.js index f39bb935..de70ade6 100644 --- a/lib/gui/app/app.js +++ b/lib/gui/app/app.js @@ -230,7 +230,8 @@ app.run(() => { }) app.run(($timeout) => { - driveScanner.on('devices', (drives) => { + function updateDrives() { + const drives = Array.from(driveScanner.drives) const BLACKLISTED_DRIVES = settings.has('driveBlacklist') ? settings.get('driveBlacklist').split(',') : [] @@ -240,18 +241,23 @@ app.run(($timeout) => { // available drives list has changed, and incorrectly // keeps asking the user to "Connect a drive". $timeout(() => { - if (BLACKLISTED_DRIVES.length) { - const allowedDrives = drives.filter((drive) => { - return !(BLACKLISTED_DRIVES.includes(drive.devicePath) || - BLACKLISTED_DRIVES.includes(drive.device) || - BLACKLISTED_DRIVES.includes(drive.raw)) - }) - availableDrives.setDrives(allowedDrives) - } else { - availableDrives.setDrives(drives) - } + const allowedDrives = drives + .filter((drive) => { + return !( + BLACKLISTED_DRIVES.includes(drive.devicePath) || + BLACKLISTED_DRIVES.includes(drive.device) || + BLACKLISTED_DRIVES.includes(drive.raw) + ) + }) + .map((drive) => { + // TODO: we should be able to use the SourceDestination `drive` directly + return drive.drive + }) + availableDrives.setDrives(allowedDrives) }) - }) + } + driveScanner.on('attach', updateDrives) + driveScanner.on('detach', updateDrives) driveScanner.on('error', (error) => { // Stop the drive scanning loop in case of errors, diff --git a/lib/gui/app/models/store.js b/lib/gui/app/models/store.js index 2c7123b5..f005f263 100644 --- a/lib/gui/app/models/store.js +++ b/lib/gui/app/models/store.js @@ -46,7 +46,7 @@ const verifyNoNilFields = (object, fields, name) => { return _.isNil(_.get(object, field)) }) if (nilFields.length) { - throw new Error(`Missing ${name} fields: ${nilFields.join(', ')}`) + throw new Error(`Missing ${name} fields: ${nilFields.join(', ')} ${JSON.stringify(object, null, 4)}`) } } @@ -165,7 +165,8 @@ const storeReducer = (state = DEFAULT_STATE, action) => { const drives = action.data - if (!_.isArray(drives) || !_.every(drives, _.isPlainObject)) { + //if (!_.isArray(drives) || !_.every(drives, _.isPlainObject)) { + if (!_.isArray(drives)) { throw errors.createError({ title: `Invalid drives: ${drives}` }) diff --git a/lib/gui/app/modules/drive-scanner.js b/lib/gui/app/modules/drive-scanner.js index 01fa9757..26110c4f 100644 --- a/lib/gui/app/modules/drive-scanner.js +++ b/lib/gui/app/modules/drive-scanner.js @@ -16,16 +16,27 @@ 'use strict' -const settings = require('../models/settings') -const SDK = require('../../../sdk') +const sdk = require('etcher-sdk') +const process = require('process') -const scanner = SDK.createScanner({ - blockdevice: { - get includeSystemDrives () { - return settings.get('unsafeMode') && !settings.get('disableUnsafeMode') - } - }, - usbboot: {} +const settings = require('../models/settings') +const permissions = require('../../../shared/permissions') + +function includeSystemDrives() { + return settings.get('unsafeMode') && !settings.get('disableUnsafeMode') +} + +const adapters = [ + new sdk.scanner.adapters.BlockDeviceAdapter(includeSystemDrives) +] + +permissions.isElevated() +.then((isElevated) => { + if ((process.platform !== 'linux') || isElevated) { + adapters.push(new sdk.scanner.adapters.UsbbootDeviceAdapter()) + } }) +const scanner = new sdk.scanner.Scanner(adapters) + module.exports = scanner diff --git a/lib/gui/app/pages/main/controllers/flash.js b/lib/gui/app/pages/main/controllers/flash.js index 991e14ee..5503fb6b 100644 --- a/lib/gui/app/pages/main/controllers/flash.js +++ b/lib/gui/app/pages/main/controllers/flash.js @@ -149,7 +149,7 @@ module.exports = function ( // otherwise Windows throws EPERM driveScanner.stop() - return imageWriter.flash(image.path, devices) + return imageWriter.flash(image.path, drives) }).then(() => { if (!flashState.wasLastFlashCancelled()) { const flashResults = flashState.getFlashResults() diff --git a/lib/gui/modules/child-writer.js b/lib/gui/modules/child-writer.js index db28aa25..c358d729 100644 --- a/lib/gui/modules/child-writer.js +++ b/lib/gui/modules/child-writer.js @@ -16,11 +16,15 @@ 'use strict' +const Bluebird = require('bluebird') const _ = require('lodash') const ipc = require('node-ipc') +const sdk = require('etcher-sdk') const EXIT_CODES = require('../../shared/exit-codes') const errors = require('../../shared/errors') const ImageWriter = require('../../sdk/writer') +const BlockWriteStream = require('../../sdk/writer/block-write-stream') +const BlockReadStream = require('../../sdk/writer/block-read-stream') ipc.config.id = process.env.IPC_CLIENT_ID ipc.config.socketRoot = process.env.IPC_SOCKET_ROOT @@ -85,6 +89,124 @@ const handleError = (error) => { terminate(EXIT_CODES.GENERAL_ERROR) } +function runVerifier(verifier, onFail) { + return new Promise((resolve, reject) => { + verifier.on('error', onFail); + verifier.on('finish', resolve); + verifier.run(); + }); +} + +function pipeRegularSourceToDestination(source, destination, verify, onProgress, onFail) { + let checksum + let sourceMetadata + let step = 'flashing' + let lastPosition = 0 + const errors = new Map() // destination -> error map + const state = { + active: destination.destinations.length, + flashing: destination.destinations.length, + verifying: 0, + failed: 0, + successful: 0 + } + function updateState() { + state.failed = errors.size + state.active = destination.destinations.length - state.failed + if (step === 'flashing') { + state.flashing = state.active + state.verifying = 0 + } else if (step === 'verifying') { + state.flashing = 0 + state.verifying = state.active + } else if (step === 'finished') { + state.successful = state.active + } + } + function onProgress2(progressEvent) { + lastPosition = progressEvent.position + progressEvent.percentage = progressEvent.position / sourceMetadata.size * 100 + // NOTE: We need to guard against this becoming Infinity, + // because that value isn't transmitted properly over IPC and becomes `null` + progressEvent.eta = progressEvent.speed ? (sourceMetadata.size - progressEvent.position) / progressEvent.speed : 0 + progressEvent.totalSpeed = progressEvent.speed * state.active + Object.assign(progressEvent, state) + onProgress(progressEvent) + } + return Promise.all([ source.createReadStream(), destination.createWriteStream(), source.getMetadata() ]) + .then(([ sourceStream, destinationStream, metadata ]) => { + destinationStream.on('fail', (error) => { + errors.set(error.destination, error.error) + updateState() + onFail({ device: error.destination.drive, error: error.error }) // TODO: device should be error.destination + onProgress2({ eta: 0, speed: 0, position: lastPosition }) // TODO: this is not needed if a success / error screen is shown + }) + sourceMetadata = metadata + return new Promise((resolve, reject) => { + let done = false + sourceStream.on('error', reject) + destinationStream.on('progress', onProgress2) + if (verify) { + const hasher = sdk.sourceDestination.createHasher() + hasher.on('checksum', (cs) => { + checksum = cs + if (done) { + resolve() + } + }) + sourceStream.pipe(hasher) + } + destinationStream.on('done', () => { + done = true; + if (!verify || (checksum !== undefined)) { + resolve() + } + }) + sourceStream.pipe(destinationStream) + }) + }) + .then(() => { + if (verify) { + step = 'verifying' + updateState() + const verifier = destination.createVerifier(checksum, sourceMetadata.size) + verifier.on('progress', onProgress2) + return runVerifier(verifier, onFail) + } + }) + .then(() => { + step = 'finished' + updateState() + onProgress2({ speed: 0, position: sourceMetadata.size }) + }) + .then(() => { + const result = { + bytesWritten: lastPosition, + devices: { + failed: state.failed, + successful: state.active + }, + errors: [] + } + if (verify && (checksum !== undefined)) { + result.checksum = { xxhash: checksum } + } + for (const [ destination, error ] of errors) { + error.device = destination.drive.device + result.errors.push(error) + } + return result + }) +} + +function sourceDestinationDisposer(sourceDestination) { + return Bluebird.resolve(sourceDestination.open()) + .return(sourceDestination) + .disposer(() => { + return Bluebird.resolve(sourceDestination.close()).catchReturn() + }) +} + ipc.connectTo(IPC_SERVER_ID, () => { process.once('uncaughtException', handleError) @@ -114,15 +236,6 @@ ipc.connectTo(IPC_SERVER_ID, () => { let writer = null ipc.of[IPC_SERVER_ID].on('write', (options) => { - const destinations = [].concat(options.destinations) - - log(`Image: ${options.imagePath}`) - log(`Devices: ${destinations.join(', ')}`) - log(`Umount on success: ${options.unmountOnSuccess}`) - log(`Validate on success: ${options.validateWriteOnSuccess}`) - - let exitCode = EXIT_CODES.SUCCESS - /** * @summary Progress handler * @param {Object} state - progress state @@ -133,6 +246,8 @@ ipc.connectTo(IPC_SERVER_ID, () => { ipc.of[IPC_SERVER_ID].emit('state', state) } + let exitCode = EXIT_CODES.SUCCESS + /** * @summary Finish handler * @param {Object} results - Flash results @@ -184,19 +299,41 @@ ipc.connectTo(IPC_SERVER_ID, () => { }) } - writer = new ImageWriter({ + writer = new ImageWriter({ // TODO: remove verify: options.validateWriteOnSuccess, unmountOnSuccess: options.unmountOnSuccess, checksumAlgorithms: options.checksumAlgorithms || [] }) - writer.on('error', onError) - writer.on('fail', onFail) - writer.on('progress', onProgress) - writer.on('finish', onFinish) writer.on('abort', onAbort) - writer.write(options.imagePath, destinations) + const destinations = _.map(options.destinations, 'drive.device') + const dests = options.destinations.map((destination) => { + return new sdk.sourceDestination.BlockDevice(destination) + }) + Bluebird.using( + sourceDestinationDisposer(new sdk.sourceDestination.File(options.imagePath, sdk.sourceDestination.File.OpenFlags.Read)), + sourceDestinationDisposer(new sdk.sourceDestination.MultiDestination(dests)), + (source, destination) => { + return source.getInnerSource() + .then((innerSource) => { + return Bluebird.using(sourceDestinationDisposer(innerSource), (innerSource) => { + return pipeRegularSourceToDestination(innerSource, destination, options.validateWriteOnSuccess, onProgress, onFail) + }) + }) + } + ) + .then((results) => { + onFinish(results) + }) + .catch((error) => { + onError(error) + }) + + log(`Image: ${options.imagePath}`) + log(`Devices: ${destinations.join(', ')}`) + log(`Umount on success: ${options.unmountOnSuccess}`) + log(`Validate on success: ${options.validateWriteOnSuccess}`) }) ipc.of[IPC_SERVER_ID].on('cancel', () => { diff --git a/lib/sdk/writer/block-write-stream.js b/lib/sdk/writer/block-write-stream.js index 597be99a..c1544918 100644 --- a/lib/sdk/writer/block-write-stream.js +++ b/lib/sdk/writer/block-write-stream.js @@ -23,7 +23,7 @@ const debug = require('debug')('etcher:writer:block-write-stream') const errors = require('./error-types') const CHUNK_SIZE = 64 * 1024 -const UPDATE_INTERVAL_MS = 500 +const UPDATE_INTERVAL_MS = 1000 / 60 /** * @summary I/O retry base timeout, in milliseconds diff --git a/lib/shared/permissions.js b/lib/shared/permissions.js index 8799e985..c31533aa 100644 --- a/lib/shared/permissions.js +++ b/lib/shared/permissions.js @@ -219,6 +219,7 @@ exports.elevateCommand = (command, options) => { // for now, we should make sure we double check if the error messages // have changed every time we upgrade `sudo-prompt`. }).catch((error) => { + console.log('error', error.cause) return _.includes(error.message, 'is not in the sudoers file') }, () => { throw errors.createUserError({ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e3719ca4..0f76677c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -34,6 +34,10 @@ "version": "1.6.51", "resolved": "https://registry.npmjs.org/@types/angular/-/angular-1.6.51.tgz" }, + "@types/bluebird": { + "version": "3.5.20", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.20.tgz" + }, "@types/chart.js": { "version": "2.7.41", "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.7.41.tgz" @@ -50,6 +54,14 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.0.tgz" }, + "@types/debug": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz" + }, + "@types/file-type": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@types/file-type/-/file-type-5.2.1.tgz" + }, "@types/grid-styled": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@types/grid-styled/-/grid-styled-3.2.2.tgz" @@ -254,10 +266,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz" - }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -652,6 +660,32 @@ "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.15.3.tgz", "dev": true }, + "aws-sdk": { + "version": "2.260.1", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.260.1.tgz", + "dependencies": { + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz" + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" + } + } + }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" @@ -660,6 +694,16 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz" }, + "axios": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + } + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -1186,8 +1230,7 @@ }, "binary": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz" }, "binary-extensions": { "version": "1.12.0", @@ -1400,8 +1443,7 @@ }, "buffers": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz" }, "builder-util": { "version": "3.0.13", @@ -1555,8 +1597,7 @@ }, "chainsaw": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz" }, "chalk": { "version": "1.1.3", @@ -1991,6 +2032,10 @@ "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.9.1.tgz", "dev": true }, + "cyclic-32": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclic-32/-/cyclic-32-1.0.1.tgz" + }, "d": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz" @@ -3013,6 +3058,80 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" }, + "etcher-sdk": { + "version": "0.0.1", + "resolved": "git://github.com/resin-io-modules/etcher-sdk.git#b12e63b49c4a01305a2809b504859a3940927399", + "dependencies": { + "@types/lodash": { + "version": "4.14.110", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.110.tgz" + }, + "@types/node": { + "version": "6.0.113", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.113.tgz" + }, + "apple-data-compression": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/apple-data-compression/-/apple-data-compression-0.4.0.tgz" + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz" + }, + "blockmap": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/blockmap/-/blockmap-3.4.3.tgz" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz" + }, + "file-type": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + }, + "udif": { + "version": "0.15.6", + "resolved": "https://registry.npmjs.org/udif/-/udif-0.15.6.tgz" + }, + "unbzip2-stream": { + "version": "1.2.5", + "resolved": "git://github.com/resin-io-modules/unbzip2-stream.git#942fc218013c14adab01cf693b0500cf6ac83193" + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz" + } + } + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -3024,8 +3143,7 @@ }, "events": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz" }, "evp_bytestokey": { "version": "1.0.3", @@ -3059,6 +3177,40 @@ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", "dev": true }, + "ext2fs": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ext2fs/-/ext2fs-1.0.7.tgz", + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz" + }, + "node-abi": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.3.tgz" + }, + "prebuild-install": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz" + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz" + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" @@ -3120,6 +3272,10 @@ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", "dev": true }, + "fatfs": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/fatfs/-/fatfs-0.10.6.tgz" + }, "fbjs": { "version": "0.8.17", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz" @@ -3128,6 +3284,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz" }, + "fifolock": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fifolock/-/fifolock-1.0.0.tgz" + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz" @@ -3169,6 +3329,20 @@ } } }, + "file-disk": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/file-disk/-/file-disk-4.1.3.tgz", + "dependencies": { + "blockmap": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/blockmap/-/blockmap-3.4.3.tgz" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz" + } + } + }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -3274,6 +3448,10 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/flexboxgrid/-/flexboxgrid-6.3.0.tgz" }, + "follow-redirects": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz" + }, "for-in": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", @@ -4252,6 +4430,15 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz" + }, + "jodid25519": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "optional": true + }, "js-base64": { "version": "2.4.9", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", @@ -4555,496 +4742,480 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz" }, "lzma-native": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/lzma-native/-/lzma-native-1.5.2.tgz", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/lzma-native/-/lzma-native-3.0.8.tgz", "dependencies": { - "node-pre-gyp": { - "version": "0.6.29", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.29.tgz", + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz" + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz" + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "optional": true + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" - }, - "ansi-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, - "aproba": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz" - }, - "are-we-there-yet": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz" - }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" - }, - "aws4": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz" - }, - "balanced-match": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz" - }, - "bl": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - } - } - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" - }, - "brace-expansion": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz" - }, - "buffer-shims": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" - }, - "code-point-at": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz" - }, - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" - }, - "dashdash": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - } - } - }, - "debug": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" - }, - "deep-extend": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "optional": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - }, - "extend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" - }, - "extsprintf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" - }, - "form-data": { - "version": "1.0.0-rc4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - }, - "fstream": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" - }, - "fstream-ignore": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz" - }, - "gauge": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz" - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" - }, - "getpass": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - } - } - }, - "glob": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz" - }, - "graceful-fs": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz" - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz" - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" - }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" - }, - "inflight": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" - }, - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - }, - "is-my-json-valid": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz" - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - }, - "jodid25519": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", - "optional": true - }, - "jsbn": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", - "optional": true - }, - "json-schema": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - }, - "jsonpointer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" - }, - "jsprim": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz" - }, - "mime-db": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" - }, - "mime-types": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" - }, - "minimatch": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz" - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" - }, - "ms": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "node-uuid": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" - }, - "npmlog": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" - }, - "number-is-nan": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" - }, - "object-assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" - }, - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" - }, - "path-is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "qs": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.1.0.tgz" - }, - "rc": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" - } - } - }, - "readable-stream": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" - }, - "request": { - "version": "2.72.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.72.0.tgz" - }, - "rimraf": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz" - }, - "semver": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.2.0.tgz" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - }, - "signal-exit": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz" - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" - }, - "sshpk": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.8.3.tgz", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - } - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "string-width": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" - }, - "tar-pack": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz" - }, - "tough-cookie": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz" - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" - }, - "tweetnacl": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "verror": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" - }, - "wide-align": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" } } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + }, + "deep-extend": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "optional": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz" + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz" + }, + "node-pre-gyp": { + "version": "0.6.39", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz" + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz" + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz" + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" + }, + "rc": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz" + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + }, + "sshpk": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" + }, + "tar-pack": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz" + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "wide-align": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" } } }, @@ -5595,6 +5766,20 @@ } } }, + "node-raspberrypi-usbboot": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/node-raspberrypi-usbboot/-/node-raspberrypi-usbboot-0.0.5.tgz", + "dependencies": { + "@types/node": { + "version": "6.0.113", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.113.tgz" + }, + "usb": { + "version": "1.4.0", + "resolved": "git://github.com/tessel/node-usb.git#dad0076389201c732cac2290b81ef22b1fcb883c" + } + } + }, "node-sass": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.7.2.tgz", @@ -5798,6 +5983,10 @@ "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz" }, + "outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz" + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" @@ -5902,6 +6091,24 @@ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", "dev": true }, + "partitioninfo": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/partitioninfo/-/partitioninfo-4.0.1.tgz", + "dependencies": { + "chs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/chs/-/chs-0.2.1.tgz" + }, + "gpt": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gpt/-/gpt-2.0.0.tgz" + }, + "mbr": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/mbr/-/mbr-0.4.4.tgz" + } + } + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -6304,8 +6511,7 @@ }, "querystring": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" }, "querystring-es3": { "version": "0.2.1", @@ -6860,6 +7066,10 @@ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", "dev": true }, + "replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz" + }, "repo-utils": { "version": "0.3.7", "resolved": "https://registry.npmjs.org/repo-utils/-/repo-utils-0.3.7.tgz", @@ -7024,6 +7234,16 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/resin-device-status/-/resin-device-status-1.1.1.tgz" }, + "resin-image-fs": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/resin-image-fs/-/resin-image-fs-5.0.4.tgz", + "dependencies": { + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz" + } + } + }, "resin-semver": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/resin-semver/-/resin-semver-1.4.0.tgz", @@ -7750,6 +7970,10 @@ "resolved": "https://registry.npmjs.org/striptags/-/striptags-2.2.1.tgz", "dev": true }, + "struct-fu": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/struct-fu/-/struct-fu-1.2.1.tgz" + }, "styled-components": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-3.2.3.tgz", @@ -8120,8 +8344,7 @@ }, "traverse": { "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "dev": true + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz" }, "trim-newlines": { "version": "1.0.0", @@ -8169,6 +8392,10 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "dev": true }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz" + }, "ua-parser-js": { "version": "0.7.19", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz" @@ -8317,6 +8544,10 @@ "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", "dev": true }, + "unzip-stream": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.0.tgz" + }, "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", @@ -8421,10 +8652,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz" - }, "uuid": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" @@ -8931,9 +9158,9 @@ "version": "0.1.27", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz" }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" + "xok": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xok/-/xok-1.0.0.tgz" }, "xregexp": { "version": "2.0.0", diff --git a/package.json b/package.json index b24395a5..5179e15c 100644 --- a/package.json +++ b/package.json @@ -63,13 +63,14 @@ "debug": "3.1.0", "drivelist": "6.4.6", "electron-is-running-in-asar": "1.0.0", + "etcher-sdk": "github:resin-io-modules/etcher-sdk#b12e63b49c4a01305a2809b504859a3940927399", "file-type": "4.1.0", "flexboxgrid": "6.3.0", "gpt": "1.0.0", "immutable": "3.8.1", "inactivity-timer": "1.0.0", "lodash": "4.17.10", - "lzma-native": "1.5.2", + "lzma-native": "3.0.8", "mbr": "1.1.2", "mime-types": "2.1.15", "mountutils": "1.3.16", diff --git a/patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch b/patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch new file mode 100644 index 00000000..9a46e2be --- /dev/null +++ b/patches/allow-electron-forks-of-modules-that-use-pre-gyp.patch @@ -0,0 +1,29 @@ +--- a/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/versioning.js ++++ b/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/versioning.js +@@ -70,7 +70,14 @@ function get_runtime_abi(runtime, target_version) { + if (runtime === 'node-webkit') { + return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']); + } else if (runtime === 'electron') { +- return get_electron_abi(runtime, target_version || process.versions.electron); ++ var electron_version = target_version || process.versions.electron; ++ if (!electron_version) { ++ // TODO PR something to electron to pass in the version number for forks ++ // https://github.com/electron/electron/issues/9058 ++ try { electron_version = require('electron/package.json').version; } ++ catch (_) {} ++ } ++ return get_electron_abi(runtime, electron_version); + } else { + if (runtime != 'node') { + throw new Error("Unknown Runtime: '" + runtime + "'"); +@@ -245,7 +252,8 @@ function get_process_runtime(versions) { + var runtime = 'node'; + if (versions['node-webkit']) { + runtime = 'node-webkit'; +- } else if (versions.electron) { ++ } else if (versions.electron || process.env.ELECTRON_RUN_AS_NODE) { ++ // Running in electron or a childProcess.fork of electron + runtime = 'electron'; + } + return runtime; + diff --git a/patches/lzma-native-index-static-addon-require.patch b/patches/lzma-native-index-static-addon-require.patch deleted file mode 100644 index 6e50640b..00000000 --- a/patches/lzma-native-index-static-addon-require.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- b/node_modules/lzma-native/index.js 2018-01-23 14:37:50.000000000 -0400 -+++ a/node_modules/lzma-native/index.js 2018-01-23 14:37:00.000000000 -0400 -@@ -7,11 +7,8 @@ var extend = require('util-extend'); - var assert = require('assert'); - var fs = require('fs'); - --// node-pre-gyp magic --var nodePreGyp = require('node-pre-gyp'); - var path = require('path'); --var binding_path = nodePreGyp.find(path.resolve(path.join(__dirname,'./package.json'))); --var native = require(binding_path); -+var native = require(path.join(__dirname, 'binding', 'lzma_native.node')); - - extend(exports, native); - diff --git a/webpack.config.js b/webpack.config.js index 255f565b..9aadeecc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -124,7 +124,7 @@ const etcherConfig = _.assign({ // on the tree (for testing purposes) or inside a generated // bundle (for production purposes), by translating // relative require paths within the bundle. - if (/\/(sdk|shared)/i.test(request) || /package\.json$/.test(request)) { + if (/\/(etcher-sdk|sdk|shared)/i.test(request) || /package\.json$/.test(request)) { const output = path.join(__dirname, 'generated') const dirname = path.join(context, request) const relative = path.relative(output, dirname)