mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-25 07:47:18 +00:00
commit
8ef3add183
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"node-cli": {
|
"node-cli": {
|
||||||
"node": "6.14.4",
|
"node": "6.14.4",
|
||||||
|
"npm_version": "6.7.0",
|
||||||
"main": "lib/cli/etcher.js",
|
"main": "lib/cli/etcher.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"linux": [
|
"linux": [
|
||||||
@ -10,6 +11,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron": {
|
"electron": {
|
||||||
|
"npm_version": "6.7.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"linux": [
|
"linux": [
|
||||||
"libudev-dev",
|
"libudev-dev",
|
||||||
|
1
Makefile
1
Makefile
@ -181,6 +181,7 @@ webpack:
|
|||||||
.PHONY: $(TARGETS)
|
.PHONY: $(TARGETS)
|
||||||
|
|
||||||
sass:
|
sass:
|
||||||
|
npm rebuild node-sass
|
||||||
node-sass lib/gui/app/scss/main.scss > lib/gui/css/main.css
|
node-sass lib/gui/app/scss/main.scss > lib/gui/css/main.css
|
||||||
|
|
||||||
lint-js:
|
lint-js:
|
||||||
|
@ -21,7 +21,7 @@ Developing
|
|||||||
- [Python 2.7](https://www.python.org)
|
- [Python 2.7](https://www.python.org)
|
||||||
- [jq](https://stedolan.github.io/jq/)
|
- [jq](https://stedolan.github.io/jq/)
|
||||||
- [curl](https://curl.haxx.se/)
|
- [curl](https://curl.haxx.se/)
|
||||||
- [npm](https://www.npmjs.com/) (version 3.10)
|
- [npm](https://www.npmjs.com/) (version 6.7)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
1161
lib/gui/css/main.css
1161
lib/gui/css/main.css
File diff suppressed because it is too large
Load Diff
11486
npm-shrinkwrap.json
generated
11486
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
166
package.json
166
package.json
@ -21,110 +21,98 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "make lint test sanity-checks",
|
"test": "make lint test sanity-checks",
|
||||||
"start": "electron lib/start.js",
|
"start": "electron lib/start.js",
|
||||||
"postshrinkwrap": "node ./scripts/clean-shrinkwrap.js",
|
|
||||||
"configure": "node-gyp configure",
|
"configure": "node-gyp configure",
|
||||||
"build": "node-gyp build",
|
"build": "node-gyp build",
|
||||||
"install": "node-gyp rebuild",
|
"install": "node-gyp rebuild",
|
||||||
"webpack": "webpack",
|
"webpack": "webpack",
|
||||||
"watch": "webpack --watch",
|
"watch": "webpack --watch",
|
||||||
"concourse-build-electron": "make webpack",
|
"concourse-build-electron": "make webpack",
|
||||||
"concourse-test": "npm test",
|
"concourse-test": "npx npm@6.7.0 test",
|
||||||
"concourse-test-electron": "npm test",
|
"concourse-test-electron": "npx npm@6.7.0 test",
|
||||||
"concourse-test-node-cli": "make webpack lint-js lint-cpp lint-spell test-cli"
|
"concourse-test-node-cli": "make webpack lint-js lint-cpp lint-spell test-cli"
|
||||||
},
|
},
|
||||||
"author": "Balena Inc. <hello@etcher.io>",
|
"author": "Balena Inc. <hello@etcher.io>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"platformSpecificDependencies": [
|
|
||||||
"7zip-bin-mac",
|
|
||||||
"7zip-bin-win",
|
|
||||||
"7zip-bin-linux",
|
|
||||||
"fsevents",
|
|
||||||
"napi-build-utils",
|
|
||||||
"winusb-driver-generator"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free-webfonts": "^1.0.9",
|
"@fortawesome/fontawesome-free-webfonts": "^1.0.9",
|
||||||
"@types/react": "16.3.14",
|
"angular": "1.7.6",
|
||||||
"@types/react-dom": "16.0.5",
|
"angular-if-state": "^1.0.0",
|
||||||
"angular": "1.6.3",
|
"angular-moment": "^1.0.1",
|
||||||
"angular-if-state": "1.0.0",
|
"angular-seconds-to-date": "^1.0.0",
|
||||||
"angular-moment": "1.0.1",
|
"angular-ui-bootstrap": "^2.5.0",
|
||||||
"angular-seconds-to-date": "1.0.0",
|
"angular-ui-router": "^0.4.2",
|
||||||
"angular-ui-bootstrap": "2.5.0",
|
"bindings": "^1.3.0",
|
||||||
"angular-ui-router": "0.4.2",
|
"bluebird": "^3.5.3",
|
||||||
"bindings": "1.3.0",
|
"bootstrap-sass": "^3.3.6",
|
||||||
"bluebird": "3.5.3",
|
"chalk": "^1.1.3",
|
||||||
"bootstrap-sass": "3.3.6",
|
"color": "^2.0.1",
|
||||||
"chalk": "1.1.3",
|
"command-join": "^2.0.0",
|
||||||
"color": "2.0.1",
|
"debug": "^3.1.0",
|
||||||
"command-join": "2.0.0",
|
"drivelist": "^6.4.2",
|
||||||
"debug": "3.1.0",
|
"electron-is-running-in-asar": "^1.0.0",
|
||||||
"drivelist": "6.4.6",
|
"etcher-sdk": "^1.0.3",
|
||||||
"electron-is-running-in-asar": "1.0.0",
|
"flexboxgrid": "^6.3.0",
|
||||||
"etcher-sdk": "^1.0.2",
|
"immutable": "^3.8.1",
|
||||||
"flexboxgrid": "6.3.0",
|
"inactivity-timer": "^1.0.0",
|
||||||
"immutable": "3.8.1",
|
"lodash": "^4.17.10",
|
||||||
"inactivity-timer": "1.0.0",
|
"mime-types": "^2.1.18",
|
||||||
"lodash": "4.17.10",
|
"nan": "^2.9.2",
|
||||||
"mime-types": "2.1.18",
|
"node-ipc": "^9.1.1",
|
||||||
"nan": "2.9.2",
|
"path-is-inside": "^1.0.2",
|
||||||
"node-ipc": "9.1.1",
|
"pretty-bytes": "^1.0.4",
|
||||||
"path-is-inside": "1.0.2",
|
"prop-types": "^15.5.9",
|
||||||
"pretty-bytes": "1.0.4",
|
"react": "^16.3.2",
|
||||||
"prop-types": "15.5.9",
|
"react-dom": "^16.3.2",
|
||||||
"react": "16.3.2",
|
"react2angular": "^4.0.2",
|
||||||
"react-dom": "16.3.2",
|
"redux": "^3.5.2",
|
||||||
"react2angular": "4.0.2",
|
|
||||||
"redux": "3.5.2",
|
|
||||||
"rendition": "4.41.1",
|
"rendition": "4.41.1",
|
||||||
"request": "2.81.0",
|
"request": "^2.81.0",
|
||||||
"resin-cli-form": "1.4.1",
|
"resin-cli-form": "^1.4.1",
|
||||||
"resin-cli-visuals": "1.4.1",
|
"resin-cli-visuals": "^1.4.1",
|
||||||
"resin-corvus": "2.0.0",
|
"resin-corvus": "^2.0.1",
|
||||||
"roboto-fontface": "0.9.0",
|
"roboto-fontface": "^0.9.0",
|
||||||
"semver": "5.1.1",
|
"semver": "^5.1.1",
|
||||||
"styled-components": "3.2.3",
|
"styled-components": "^3.2.3",
|
||||||
"styled-system": "^3.1.11",
|
"styled-system": "^3.1.11",
|
||||||
"sudo-prompt": "8.2.3",
|
"sudo-prompt": "^8.2.3",
|
||||||
"uuid": "3.0.1",
|
"uuid": "^3.0.1",
|
||||||
"xml2js": "0.4.17",
|
"xml2js": "^0.4.17",
|
||||||
"yargs": "11.0.0"
|
"yargs": "^11.0.0"
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"winusb-driver-generator": "1.2.4"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.2.0",
|
"@babel/core": "^7.2.0",
|
||||||
"@babel/plugin-proposal-function-bind": "7.2.0",
|
"@babel/plugin-proposal-function-bind": "^7.2.0",
|
||||||
"@babel/preset-env": "7.2.0",
|
"@babel/preset-env": "^7.2.0",
|
||||||
"@babel/preset-react": "7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"angular-mocks": "1.6.3",
|
"acorn": "^6.0.5",
|
||||||
"babel-loader": "8.0.4",
|
"angular-mocks": "1.7.6",
|
||||||
"electron": "1.7.13",
|
"babel-loader": "^8.0.4",
|
||||||
"electron-builder": "19.40.0",
|
"electron": "1.8.8",
|
||||||
"electron-mocha": "6.0.1",
|
"electron-builder": "^19.40.0",
|
||||||
"eslint": "4.17.0",
|
"electron-mocha": "^6.0.1",
|
||||||
"eslint-config-standard": "10.2.1",
|
"eslint": "^4.17.0",
|
||||||
"eslint-plugin-import": "2.9.0",
|
"eslint-config-standard": "^10.2.1",
|
||||||
"eslint-plugin-jsdoc": "3.5.0",
|
"eslint-plugin-import": "^2.9.0",
|
||||||
"eslint-plugin-lodash": "2.6.1",
|
"eslint-plugin-jsdoc": "^3.5.0",
|
||||||
"eslint-plugin-node": "6.0.1",
|
"eslint-plugin-lodash": "^2.6.1",
|
||||||
"eslint-plugin-promise": "3.6.0",
|
"eslint-plugin-node": "^6.0.1",
|
||||||
"eslint-plugin-react": "7.11.1",
|
"eslint-plugin-promise": "^3.6.0",
|
||||||
"eslint-plugin-standard": "3.0.1",
|
"eslint-plugin-react": "^7.11.1",
|
||||||
"html-angular-validate": "0.2.3",
|
"eslint-plugin-standard": "^3.0.1",
|
||||||
"html-loader": "0.5.1",
|
"html-angular-validate": "^0.2.3",
|
||||||
"mocha": "5.0.1",
|
"html-loader": "^0.5.1",
|
||||||
"mochainon": "2.0.0",
|
"mocha": "^5.0.1",
|
||||||
"nock": "9.2.3",
|
"mochainon": "^2.0.0",
|
||||||
"node-gyp": "3.8.0",
|
"nock": "^9.2.3",
|
||||||
"node-sass": "4.7.2",
|
"node-gyp": "^3.5.0",
|
||||||
"pkg": "4.3.0",
|
"node-sass": "^4.7.2",
|
||||||
"sass-lint": "1.12.1",
|
"pkg": "^4.3.0",
|
||||||
"simple-progress-webpack-plugin": "1.1.2",
|
"sass-lint": "^1.12.1",
|
||||||
"spectron": "3.7.3",
|
"simple-progress-webpack-plugin": "^1.1.2",
|
||||||
"webpack": "4.27.0",
|
"spectron": "^3.7.3",
|
||||||
"webpack-cli": "3.1.2",
|
"versionist": "^4.0.1",
|
||||||
"webpack-node-externals": "1.7.2"
|
"webpack": "^4.27.0",
|
||||||
|
"webpack-cli": "^3.1.2",
|
||||||
|
"webpack-node-externals": "^1.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
+ // TODO PR something to electron to pass in the version number for forks
|
+ // TODO PR something to electron to pass in the version number for forks
|
||||||
+ // https://github.com/electron/electron/issues/9058
|
+ // https://github.com/electron/electron/issues/9058
|
||||||
+ try { electron_version = require('electron/package.json').version; }
|
+ try { electron_version = require('electron/package.json').version; }
|
||||||
+ catch (_) { electron_version = '1.7.13'; }
|
+ catch (_) { electron_version = '1.8.8'; }
|
||||||
+ }
|
+ }
|
||||||
+ return get_electron_abi(runtime, electron_version);
|
+ return get_electron_abi(runtime, electron_version);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
/**
|
|
||||||
* This script is in charge of generating the `shrinkwrap` file.
|
|
||||||
*
|
|
||||||
* `npm shrinkwrap` has a bug where it will add optional dependencies
|
|
||||||
* to `npm-shrinkwrap.json`, therefore causing errors if these optional
|
|
||||||
* dependendencies are platform dependent and you then try to build
|
|
||||||
* the project in another platform.
|
|
||||||
*
|
|
||||||
* As a workaround, we keep a list of platform dependent dependencies in
|
|
||||||
* the `platformSpecificDependencies` property of `package.json`,
|
|
||||||
* and manually remove them from `npm-shrinkwrap.json` if they exist.
|
|
||||||
*
|
|
||||||
* See: https://github.com/npm/npm/issues/2679
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* eslint-disable lodash/prefer-lodash-method */
|
|
||||||
/* eslint-disable no-magic-numbers */
|
|
||||||
/* eslint-disable no-undefined */
|
|
||||||
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
const JSON_INDENT = 2
|
|
||||||
const SHRINKWRAP_FILENAME = path.join(__dirname, '..', 'npm-shrinkwrap.json')
|
|
||||||
|
|
||||||
const packageInfo = require('../package.json')
|
|
||||||
const shrinkwrap = require('../npm-shrinkwrap.json')
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @summary Traverse a shrinkwrap tree and call
|
|
||||||
* a given function on each dependency
|
|
||||||
* @param {Object} tree - shrinkwrap
|
|
||||||
* @param {Function} onNode - callback({Object} parent, {String} parentName, {String} name, {Object} info)
|
|
||||||
* @param {String} [parentName] - name of dependent (used internally)
|
|
||||||
* @example
|
|
||||||
* traverseDeps(shrinkwrap, (parent, parentName, name, info) => {
|
|
||||||
* // ...
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
const traverseDeps = (tree, onNode, parentName) => {
|
|
||||||
if (!tree.dependencies) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const keys = Object.keys(tree.dependencies)
|
|
||||||
|
|
||||||
let name = null
|
|
||||||
|
|
||||||
for (let index = 0; index < keys.length; index += 1) {
|
|
||||||
name = keys[index]
|
|
||||||
|
|
||||||
// Check for this dependency to still exist,
|
|
||||||
// as a node might have been removed just before this iteration
|
|
||||||
if (tree.dependencies[name]) {
|
|
||||||
onNode(tree, parentName || tree.name, name, tree.dependencies[name])
|
|
||||||
|
|
||||||
// Check that the walking function didn't remove the dependency;
|
|
||||||
// if so, skip it and continue with the next one
|
|
||||||
if (tree.dependencies[name] && tree.dependencies[name].dependencies) {
|
|
||||||
traverseDeps(tree.dependencies[name], onNode, name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Cleaning shrinkwrap...')
|
|
||||||
|
|
||||||
// Walk the generated shrinkwrap tree & apply modifications if necessary
|
|
||||||
traverseDeps(shrinkwrap, (parent, parentName, name, info) => {
|
|
||||||
// If this dependency depends on a "blacklisted" optional
|
|
||||||
// dependency; remove it from the shrinkwrap
|
|
||||||
if (packageInfo.platformSpecificDependencies.includes(name)) {
|
|
||||||
console.log(' - Removing "%s" from "%s"', name, parentName)
|
|
||||||
parent.dependencies[name] = undefined
|
|
||||||
Reflect.deleteProperty(parent.dependencies, name)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure the `resolved` field contains a HTTPS registry URL,
|
|
||||||
// as some versions of npm apparently fall back to HTTP on some platforms
|
|
||||||
// under some circumstances
|
|
||||||
if (/^http:\/\//.test(info.resolved)) {
|
|
||||||
info.resolved = info.resolved.replace(/^http/, 'https')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete `from` fields to avoid different diffs on different platforms
|
|
||||||
// NOTE: Only do this if it's a npm package version range,
|
|
||||||
// as direct installs from github or git need this field
|
|
||||||
// to resolve properly during shrinkwrapping
|
|
||||||
const isScoped = /^@/.test(name)
|
|
||||||
const fromNpm = !/^[a-z0-9-]+\//i.test(info.from)
|
|
||||||
if (isScoped || fromNpm) {
|
|
||||||
info.from = undefined
|
|
||||||
Reflect.deleteProperty(info, 'from')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Generate the new shrinkwrap JSON
|
|
||||||
const shrinkwrapJson = `${JSON.stringify(shrinkwrap, null, JSON_INDENT)}\n`
|
|
||||||
|
|
||||||
// Write back the modified npm-shrinkwrap.json
|
|
||||||
fs.writeFile(SHRINKWRAP_FILENAME, shrinkwrapJson, (error) => {
|
|
||||||
if (error) {
|
|
||||||
console.log(`[ERROR] Couldn't write shrinkwrap file: ${error.stack}`)
|
|
||||||
process.exit(1)
|
|
||||||
} else {
|
|
||||||
console.log(`[OK] Wrote shrinkwrap file to ${path.relative(__dirname, SHRINKWRAP_FILENAME)}`)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log('')
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 1ef259620d0b51cb7865104c949c8fb682bfa742
|
Subproject commit 6d5286d243783e0a2f454948f6214c9c1f7577c6
|
@ -85,7 +85,7 @@ describe('Browser: SVGIcon', function () {
|
|||||||
const compiledDoc = compiledSVGParser.parseFromString(compiledContents, 'image/svg+xml')
|
const compiledDoc = compiledSVGParser.parseFromString(compiledContents, 'image/svg+xml')
|
||||||
|
|
||||||
m.chai.expect(compiledDoc.outerHTML).to.equal(originalDoc.outerHTML)
|
m.chai.expect(compiledDoc.outerHTML).to.equal(originalDoc.outerHTML)
|
||||||
})
|
}).timeout(10000)
|
||||||
|
|
||||||
it('should accept an SVG in the contents attribute', function () {
|
it('should accept an SVG in the contents attribute', function () {
|
||||||
const iconContents = '<svg><rect x="10" y="10" height="100" width="100" style="stroke:red;fill:blue;"/></svg>'
|
const iconContents = '<svg><rect x="10" y="10" height="100" width="100" style="stroke:red;fill:blue;"/></svg>'
|
||||||
|
@ -29,7 +29,7 @@ if (!entrypoint) {
|
|||||||
|
|
||||||
describe('Spectron', function () {
|
describe('Spectron', function () {
|
||||||
// Mainly for CI jobs
|
// Mainly for CI jobs
|
||||||
this.timeout(20000)
|
this.timeout(40000)
|
||||||
|
|
||||||
let app = null
|
let app = null
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user