Compare commits

...

3053 Commits

Author SHA1 Message Date
flowzone-app[bot]
85b1e3c2c2
v2.1.0 2025-02-27 16:16:59 +00:00
Matthew Yarmolinsky
e5d1b4ce23
Merge pull request #4406 from balena-io/add-analytics-alert
Add informational notice about how to disable analytics collection
2025-02-27 11:16:08 -05:00
myarmolinsky
aac092fd4d Add informational notice about how to disable analytics collection
Change-type: minor
2025-02-20 09:51:30 -05:00
flowzone-app[bot]
ff852c029e
v2.0.0 2025-02-20 14:27:03 +00:00
flowzone-app[bot]
4759bc7686
Merge pull request #4407 from balena-io/build-ubuntu22-macos13
major: build on ubuntu 22 and macos 13
2025-02-20 14:26:06 +00:00
Edwin Joassart
039a022353 major: build on ubuntu 22 and macos 13 2025-02-20 09:12:20 +01:00
flowzone-app[bot]
4375b960c2
v1.19.25 2024-10-10 10:03:36 +00:00
flowzone-app[bot]
ee5505d596
Merge pull request #4335 from balena-io/bump-etcher-sdk
patch: bump etcher-sdk to 9.1.2
2024-10-10 10:02:28 +00:00
Edwin Joassart
c726b51dca patch: bump etcher-sdk to 9.1.2 2024-10-09 17:42:19 +02:00
flowzone-app[bot]
676eaf82e7
v1.19.24 2024-10-09 14:22:59 +00:00
flowzone-app[bot]
87fb4df9eb
Merge pull request #4333 from balena-io/rglidden/rpm-fix-etcher-util
patch: etcher-util is corrupted in RPM package
2024-10-09 14:21:45 +00:00
Richard Glidden
e43ee788ec patch: etcher-util is corrupted in RPM package
rpmbuild strips executables by default when generating an rpm packge.
This was causing the JavaScript code bundled in the etcher-util file
to be removed, causing "Pkg: Error reading from file." whenever
etcher-util was called.

This in turn caused balena-etcher to generate the error message
`Error: (0, h.requestMetadata) is not a function` when attempting
to write an SD card.

This fixes the issue for RPM builds by replacing the `strip` command
with `true` so that rpmbuild no longer strips the executables and
the embeded code stays intact.

See: https://github.com/balena-io/etcher/issues/4150

Signed-off-by: Richard Glidden <richard@glidden.org>
2024-10-09 15:54:16 +02:00
flowzone-app[bot]
3dc17c89b4
v1.19.23 2024-10-09 13:52:59 +00:00
flowzone-app[bot]
5774dded7b
Merge pull request #4334 from balena-io/marcaurele/remove-gconf2
patch: remove gconf2 libgconf-2-4 deps
2024-10-09 13:52:04 +00:00
Edwin Joassart
9f408241f9
remove gcconf2 deps from docs 2024-10-09 13:55:44 +02:00
Marc-Aurèle Brothier
2ed779ef37 patch: remove gconf2 libgconf-2-4 deps
Closes #4096
2024-10-09 10:50:35 +02:00
flowzone-app[bot]
5fd6376f45
v1.19.22 2024-07-18 18:13:00 +00:00
flowzone-app[bot]
818dcd3b13
Merge pull request #4279 from balena-io/klutchell-patch-1
Replace deprecated Flowzone inputs
2024-07-18 18:12:06 +00:00
Kyle Harding
52d396aa7e
Replace deprecated Flowzone inputs
Change-type: patch
2024-07-17 09:37:12 -04:00
flowzone-app[bot]
c748c2a9c0
v1.19.21 2024-05-30 15:00:39 +00:00
Edwin Joassart
a5dac57b09
Merge pull request #4238 from balena-io/fix-win-2
patch: fix missing windows dependency
2024-05-30 16:59:45 +02:00
Edwin Joassart
8dad81ae34
patch: fix missing windows dependency 2024-05-30 16:28:56 +02:00
Edwin Joassart
d28719daf2
patch: fix missing windows dependency 2024-05-30 14:56:07 +02:00
Edwin Joassart
98db4df0dc patch: fix missing windows dependency 2024-05-30 14:35:02 +02:00
flowzone-app[bot]
52144f4a6e
v1.19.20 2024-05-30 10:17:34 +00:00
flowzone-app[bot]
39b02f2168
Merge pull request #4237 from balena-io/fix-win
patch: fix missing windows dependency
2024-05-30 10:16:39 +00:00
Edwin Joassart
c4d3f8db87 patch: fix missing windows dependency 2024-05-30 11:44:50 +02:00
flowzone-app[bot]
6d796df017
v1.19.19 2024-05-28 12:10:03 +00:00
flowzone-app[bot]
326a3c740f
Merge pull request #4233 from balena-io/sentry
patch: add sentry debug flag
2024-05-28 12:07:54 +00:00
Edwin Joassart
8223130e8d patch: add sentry debug flag 2024-05-28 12:22:34 +02:00
flowzone-app[bot]
3245439744
v1.19.18 2024-05-22 13:28:07 +00:00
flowzone-app[bot]
74854f1720
Merge pull request #4228 from balena-io/aethernet-patch-2
patch: fix sentry DSN
2024-05-22 13:27:17 +00:00
Edwin Joassart
4ffda6e208 patch: fix Sentry DSN for main process 2024-05-22 15:02:04 +02:00
flowzone-app[bot]
62ac0b98b9
v1.19.17 2024-05-09 06:33:47 +00:00
flowzone-app[bot]
ae70c20779
Merge pull request #4221 from balena-io/fix-analytics-imports
patch: fix injection of analytics key at build time
2024-05-09 06:33:00 +00:00
JOASSART Edwin
e94767aca7 patch: fix injection of analytics key at build time 2024-05-08 23:06:34 +02:00
flowzone-app[bot]
6a648e9215
v1.19.16 2024-04-26 14:33:23 +00:00
flowzone-app[bot]
fa8220d5ba
Merge pull request #4212 from balena-io/fix-race
patch: hold request for metadata while waiting for flasher
2024-04-26 14:32:11 +00:00
Edwin Joassart
2dfa795129 patch: hold request for metadata while waiting for flasher 2024-04-26 15:53:59 +02:00
flowzone-app[bot]
73afb2fc55
v1.19.15 2024-04-26 13:27:17 +00:00
flowzone-app[bot]
c5a8bfc0dc
Merge pull request #4211 from balena-io/fix-url-loading
patch: bump etcher-sdk to 9.0.11 to fix url loading using http/2
2024-04-26 13:24:43 +00:00
Edwin Joassart
cb03fb8375 patch: bump etcher-sdk to 9.0.11 to fix url loading using http/2 2024-04-26 14:51:16 +02:00
flowzone-app[bot]
c756b10a38
v1.19.14 2024-04-25 21:11:39 +00:00
flowzone-app[bot]
ebeacc9be9
Merge pull request #4210 from balena-io/bump-pretty-bytes
patch: pretty-bytes to 6.1.1
2024-04-25 21:10:38 +00:00
JOASSART Edwin
fa642270f7 patch: pretty-bytes to 6.1.1 2024-04-25 21:22:58 +02:00
flowzone-app[bot]
0cc7440573
v1.19.13 2024-04-25 19:02:27 +00:00
flowzone-app[bot]
bf5c00a839
Merge pull request #4209 from balena-io/fix-win-install
patch: fix windows squirrel install
2024-04-25 19:01:38 +00:00
Edwin Joassart
bc3340960a patch: use etcher icon as loading for windows installer 2024-04-25 19:24:01 +02:00
Edwin Joassart
d498248a0f patch: fix windows squirrel install 2024-04-25 19:24:01 +02:00
flowzone-app[bot]
2e8e0d77bc
v1.19.12 2024-04-25 16:47:45 +00:00
flowzone-app[bot]
8389537bf4
Merge pull request #4208 from balena-io/bump3
Bump (most) dependencies to latest
2024-04-25 16:46:54 +00:00
Edwin Joassart
afd659f9e5 patch: bump minors & patch 2024-04-25 17:13:27 +02:00
Edwin Joassart
ffdeccf7ef patch: bump @electron-forge/* to 7.4.0 2024-04-25 16:47:18 +02:00
Edwin Joassart
37ac323e10 patch: bump electron to 30.0.1 & @electron/remote to 2.1.2 2024-04-25 16:47:18 +02:00
Edwin Joassart
7c8f3c35d3 patch: npm upgrade 2024-04-25 16:47:18 +02:00
Edwin Joassart
4aa4140d65 patch: bump @balena/lint to 8.0.2 and fix formating 2024-04-25 16:47:18 +02:00
Edwin Joassart
0642611079 patch: fix pretty-bytes imports 2024-04-25 16:47:18 +02:00
Edwin Joassart
2f4a12a48f patch: bump etcher-sdk to 9.0.9 2024-04-25 15:06:05 +02:00
flowzone-app[bot]
70f0fb677c
v1.19.11 2024-04-25 13:00:18 +00:00
flowzone-app[bot]
58c82b33ec
Merge pull request #4207 from balena-io/switch-test-runner-to-wdio
patch: setup wdio and port most tests
2024-04-25 12:59:17 +00:00
Edwin Joassart
a661d102bc patch: setup wdio and port (most) tests 2024-04-25 14:24:36 +02:00
flowzone-app[bot]
b132352464
v1.19.10 2024-04-23 10:28:03 +00:00
flowzone-app[bot]
0a243caf35
Merge pull request #4185 from balena-io/reverse-control-flow
Patch: switch from node-ipc to ws
2024-04-23 10:27:14 +00:00
Edwin Joassart
ccc31bb9aa patch: remove node-ipc and tests 2024-04-23 11:44:10 +02:00
Edwin Joassart
b3e33824ed patch: switch api; use ws; integrate sudo-prompt
- switch api roles flow
- use websocket instead of node-ipc
- integrate; modernize; simplify and deprecate sudo-prompt
2024-04-23 11:44:10 +02:00
Edwin Joassart
6582260355 patch: refactor api to use a single topic 2024-04-22 13:20:39 +02:00
Edwin Joassart
b1d2bdaa06 patch: set require node engine to 20 2024-04-22 13:20:39 +02:00
flowzone-app[bot]
5ad8d5a72a
v1.19.9 2024-04-22 10:20:13 +00:00
flowzone-app[bot]
ad1c4c7175
Merge pull request #4202 from balena-io/prevent-electron-rebuild
patch: prevent rebuild of native modules by @electron/rebuild
2024-04-22 10:19:21 +00:00
Edwin Joassart
003abfb88f patch: prevent rebuild of native deps by @electron/rebuild 2024-04-22 11:40:04 +02:00
flowzone-app[bot]
dc5c68a6a1
v1.19.8 2024-04-22 09:37:44 +00:00
flowzone-app[bot]
d76adfb081
Merge pull request #4166 from balena-io/aethernet/switch-yao-pkg
patch: replace deprecated pkg with yao-pkg and bump etcher-util to node20
2024-04-22 09:36:43 +00:00
Edwin Joassart
c696c389c9 patch: replace deprecated pkg with yao-pkg and bump etcher-util node v to 20.10 2024-04-22 09:54:56 +03:00
flowzone-app[bot]
96f00aa024
v1.19.7 2024-04-22 06:52:22 +00:00
flowzone-app[bot]
59356c5bd1
Merge pull request #4194 from balena-io/balena-lint/prettier
patch: configure prettier in the project to use balena-lint config
2024-04-22 06:51:31 +00:00
Edwin Joassart
1a9a3d2cdc patch: fix formating 2024-04-19 18:10:27 +02:00
Edwin Joassart
faeaa58ec5 patch: configure prettier in the project to use balena-lint configuration 2024-04-19 18:10:27 +02:00
flowzone-app[bot]
3957273f40
v1.19.6 2024-04-19 15:59:31 +00:00
flowzone-app[bot]
a02a233177
Merge pull request #4193 from balena-io/fix-windows-signature
patch: fix windows signature
2024-04-19 15:58:46 +00:00
Edwin Joassart
f629e6d53b patch: fix win signature process 2024-04-19 17:24:34 +02:00
flowzone-app[bot]
37618ce2fd
v1.19.5 2024-02-14 19:51:20 +00:00
flowzone-app[bot]
14c3e28642
Merge pull request #4176 from balena-io/kyle/custom-runs-on
Replace deprecated flowzone input tests_run_on
2024-02-14 19:50:18 +00:00
Kyle Harding
bec0e50741
Replace deprecated flowzone input tests_run_on
The `custom_runs_on` array supports multiple runner labels
in nested arrays.

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2024-02-14 14:23:00 -05:00
flowzone-app[bot]
9ea7a25323
v1.19.4 2024-01-26 17:29:30 +00:00
flowzone-app[bot]
e71d432675
Merge pull request #4167 from balena-io/aethernet/fix-screensaver-error
Aethernet/fix screensaver error
2024-01-26 17:28:37 +00:00
Edwin Joassart
196fd8ae24 patch: remove screensaver error when not on etcher-pro 2024-01-26 18:06:22 +01:00
Edwin Joassart
5d43699242 patch: fix typo in IPC server id 2024-01-26 17:35:35 +01:00
flowzone-app[bot]
3626ffc7ef
v1.19.3 2023-12-22 16:13:06 +00:00
dfunckt
cb8e57bfbe
Merge pull request #4145 from balena-io/aethernet/upgrade-deps
Update dependencies
2023-12-22 18:11:50 +02:00
Akis Kesoglou
4a7fb996e4 Simplify test script
Interestingly, even before this commit and despite using `xvfb` a bunch of errors are printed during Linux tests, but they seem to run successfully to completion:

[5300:1222/133804.075080:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[5323:1222/133804.332045:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[5333:1222/133804.352286:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
2023-12-22 15:42:01 +02:00
Edwin Joassart
0f2b4dbc10 Update dependencies
- upgrade pretty_bytes to 6.1.1
- upgrade electron-remote to 2.1.0
- upgrade semver to 7.5.4 + @types/semver to 7.5.6
- upgrade chai to 4.3.11 + @types/chai to 4.3.10
- upgrade mocha to 10.2.0 + @types/mocha to 10.0.6
- upgrade sinon to 17.0.1 + @types/sinon to 17.0.2
- remove useless @types
- upgrade @svgr/webpack to 8.1.0
- upgrade @sentry/electron to 4.15.1
- upgrade tslib to 2.6.2
- upgrade immutable to 4.3.4
- upgrade redux to 4.2.1
- upgrade ts-node to 10.9.2 & ts-loader to 9.5.1
- remove mini-css-extract-plugin
- upgrade husky to 8.0.3
- upgrade uuid to 9.0.1
- upgrade lint-staged to 15.2.1
- upgrade @types/node to 18.11.9
- upgrade @fortawesome/fontawesome-free to 6.5.1
- upgrade i18next to 23.7.8 & react-i18next to 11.18.6
- bump react, react-dom + related @types to 17.0.2 and rendition to 35.1.0
- fix getuid for ts
- fix @types/react being in wrong deps
- upgrade @types/tmp to 0.2.6
- upgrade typescript to 5.3.3
- upgrade @types/mime-types to 2.1.4
- remove d3 from deps
- upgrade electron-updater to 6.1.7
- upgrade rendition to 35.1.2
- upgrade node-ipc to 9.2.3
- upgrade @types/node-ipc to 9.2.3
- upgrade electron to 27.1.3
- upgrade @electron-forge/* to 7.2.0
- upgrade @reforged/marker-appimage to 3.3.2
- upgrade style-loader to 3.3.3
- upgrade balena-lint to 7.2.4
- run CI with node 18.19
- add xxhash-addon to sidecar assets

Change-type: patch
2023-12-22 15:20:28 +02:00
flowzone-app[bot]
70304b492d
v1.19.2 2023-12-22 12:57:38 +00:00
dfunckt
8eacab2c4b
Merge pull request #4146 from Rotzbua/fix_typo
fix: typos
2023-12-22 14:56:47 +02:00
Rotzbua
aaac133670
fix: typos
Change-type: patch
2023-12-22 09:27:40 +01:00
flowzone-app[bot]
d1b5a2aea1
v1.19.1 2023-12-22 08:12:38 +00:00
dfunckt
fffe5e278f
Merge pull request #4091 from vedantmgoyal2009/patch-1
patch: update winget-releaser v2
2023-12-22 10:11:52 +02:00
Vedant
ea184eb635 patch: update winget-releaser v2 2023-12-22 13:09:00 +05:30
flowzone-app[bot]
5bb8ba857a
v1.19.0 2023-12-21 16:42:01 +00:00
dfunckt
6e4db830e9
Merge pull request #4132 from balena-io/switch-to-electron-forge
Modernize build pipeline
2023-12-21 18:41:10 +02:00
Akis Kesoglou
a0dd6c5401 Update docs 2023-12-21 18:19:33 +02:00
Akis Kesoglou
01a96bb6de Use native ARM runner for Apple Silicon builds
Change-type: minor
2023-12-21 18:17:33 +02:00
Akis Kesoglou
2e3a75e685 Calculate and upload build artifact sha256 checksums
Change-type: minor
2023-12-21 18:15:42 +02:00
Akis Kesoglou
da4f3ca28e Bundle etcher-util with main app 2023-12-21 14:38:47 +02:00
Akis Kesoglou
a22d2468fd Run on CI 2023-12-21 14:38:47 +02:00
Akis Kesoglou
559f2b4d68 Define packaging targets 2023-12-21 13:33:57 +02:00
Akis Kesoglou
bd33c5b092 Migrate build pipeline to Electron Forge
Change-type: minor
2023-12-21 13:33:25 +02:00
flowzone-app[bot]
2cdf65b244
v1.18.14 2023-12-20 16:23:04 +00:00
Kyle Harding
8645273fef
Merge pull request #4149 from balena-io/kyle/upload-artifact-v4
Update actions/upload-artifact to v4
2023-12-20 11:22:07 -05:00
Kyle Harding
ecb24dad25
Remove repo config from flowzone.yml
This functionality is being deprecated in Flowzone.

See: https://github.com/product-os/flowzone/pull/833

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
2023-12-20 11:02:10 -05:00
Kyle Harding
a970f55b55
Update actions/upload-artifact to v4
Also ensure we are generating unique artifact names on upload.

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
See: https://github.com/product-os/flowzone/pull/827
2023-12-19 13:57:25 -05:00
flowzone-app[bot]
e969735955
v1.18.13 2023-10-16 13:32:31 +00:00
flowzone-app[bot]
45bb29a393
Merge pull request #4102 from balena-io/aethernet/childwriter-standalone
patch: compile child-writer.ts as a standalone cli
2023-10-16 13:31:21 +00:00
Edwin Joassart
f38bca290f patch: upgrade to electron 25 2023-10-16 14:49:06 +02:00
Edwin Joassart
fb8ed5b529 patch: refactor scanner, loader and flasher out of gui + upgrade to electron 25 2023-10-16 14:49:06 +02:00
flowzone-app[bot]
09e13e9b43
v1.18.12 2023-07-19 10:24:26 +00:00
Edwin Joassart
13e1e8e504
Merge pull request #4060 from jcapona/master
patch: update instructions for installing deb file
2023-07-19 12:23:20 +02:00
Jorge Capona
acab03ad77 Update instructions for installing deb file
Change-type: patch
2023-07-14 15:27:38 -05:00
flowzone-app[bot]
0a6c15f702
v1.18.11 2023-07-13 14:31:44 +00:00
dfunckt
589ce9c28e
Merge pull request #4075 from leadpogrommer/fix_focus_stealing
Prevent stealing window focus from auth dialog
2023-07-13 17:30:44 +03:00
leadpogrommer
f716c74ef7 fix: prevent stealing window focus from auth dialog
Change-type: patch
2023-07-12 22:06:04 +07:00
flowzone-app[bot]
2d7a6220cd
v1.18.10 2023-07-12 11:22:02 +00:00
dfunckt
e0b26d455c
Merge pull request #3765 from jsoref/spelling
Spelling
2023-07-12 14:21:07 +03:00
Josh Soref
06d246e3fd spelling: validates
Change-type: patch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2023-07-12 13:40:47 +03:00
Josh Soref
67b26a5b69 spelling: undefined
Change-type: patch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2023-07-12 13:40:47 +03:00
Josh Soref
b4b9db7ffa spelling: except if
Change-type: patch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2023-07-12 13:40:47 +03:00
flowzone-app[bot]
cc037d23c4
v1.18.9 2023-07-12 09:07:22 +00:00
dfunckt
9c9c036956
Merge pull request #4086 from balena-io/fix-opening-links-in-safe-webview
Fix opening links from within SafeWebView
2023-07-12 12:06:25 +03:00
Akis Kesoglou
7fdbc439f7 Fix Publish action on Windows 2023-07-12 11:34:22 +03:00
Akis Kesoglou
9410669294 Fix lint issues 2023-07-06 21:50:29 +03:00
Akis Kesoglou
497bb0e2cb Fix opening links from within SafeWebView
Change-type: patch
2023-07-06 21:41:59 +03:00
balenaCI
a42be8ee74
v1.18.8 2023-04-26 09:57:47 +00:00
flowzone-app[bot]
16b50d2a71
Merge pull request #4056 from balena-io/update-support
Patch: Fix support link
2023-04-26 09:57:05 +00:00
Oliver Plummer
882b385c88 Patch: Fix Support link 2023-04-26 11:25:55 +02:00
balenaCI
059a36659e
v1.18.7 2023-04-25 15:25:37 +00:00
flowzone-app[bot]
cd9cf09422
Merge pull request #4055 from balena-io/update-docs
Update docs
2023-04-25 15:24:48 +00:00
Edwin Joassart
02a4067118 patch: update docs to remove cloudsmith install instructions for linux 2023-04-25 16:55:30 +02:00
balenaCI
6fae328f1f
v1.18.6 2023-03-21 13:24:20 +00:00
Lizzie Epton
81b0eed4d4
Merge pull request #4036 from balena-io/add-flash-with-etcher-to-docs
add-flash-with-etcher-to-docs
2023-03-21 13:23:29 +00:00
Lizzie Epton
b786c8bc10
Update docs/FAQ.md
Co-authored-by: Chris Crocker-White <chriscw@balena.io>
2023-03-21 12:49:04 +00:00
Lizzie Epton
856b426dc9
add-flash-with-etcher-to-docs
Change-type: patch
2023-03-21 10:17:14 +00:00
balenaCI
197a8f9c57
v1.18.5 2023-03-09 11:30:37 +00:00
Edwin Joassart
bc4ee48c1b
Merge pull request #4025 from balena-io/aethernet-apt-update
patch: add apt-get update in flowzone preinstall
2023-03-09 12:29:40 +01:00
Edwin Joassart
0d9ac71088
patch: add apt-get update in flowzone preinstall
libudev package has changed and cannot be installed if we not update apt cache
2023-03-09 10:51:34 +01:00
balenaCI
a0fc9bbd68
v1.18.4 2023-03-02 17:31:34 +00:00
Edwin Joassart
7e0519df9a
Merge pull request #4019 from balena-io/fix-accept-encoding-gzip
patch: bump etcher-sdk to 8.3.1
2023-03-02 18:30:30 +01:00
JOASSART Edwin
bf0360e7f4 patch: bump etcher-sdk to 8.3.1 2023-03-02 10:14:22 +01:00
balenaCI
62bae7c52e
v1.18.3 2023-02-22 12:12:41 +00:00
Balena CI
802f5b2980
Merge pull request #4005 from balena-io/etcher-efp-ref-in-doc
Add reference to etcher-efp in publishing.md
2023-02-22 14:11:57 +02:00
Lizzie Epton
496f131c4b
fix-typo
Change-type: patch
2023-02-22 11:42:12 +00:00
Lizzie Epton
f582b0215c edits-to-info-about-efp
Change-type: patch
2023-02-22 11:31:21 +00:00
Edwin Joassart
4c3c4babea Add reference to etcher-efp in publishing.md
Add reference to etcher-efp in publishing.md

Change-type: patch
2023-02-22 11:31:21 +00:00
balenaCI
6ec0550b4c
v1.18.2 2023-02-21 13:17:11 +00:00
mcraa
4e9039c244
Merge pull request #4009 from balena-io/migrate-docs
Docs to Docusaurus
2023-02-21 13:16:15 +00:00
mcraa
e479b95d72 patch: organize docs 2023-02-21 13:39:28 +01:00
mcraa
926ff2b754 patch: actualized develop guide 2023-02-21 12:59:44 +01:00
mcraa
394b64319d patch: updated commit message guide 2023-02-21 12:58:13 +01:00
Lizzie Epton
96fa53b6ee
add-item-from-FAQs
Change-type: patch
2023-02-20 11:07:03 +00:00
mcraa
9b54e2af0b patch: removed gt characters from contributing guide 2023-02-15 15:59:46 +01:00
mcraa
b01cf3c2e1 patch: added docosaurus site name 2023-02-15 15:59:46 +01:00
balenaCI
46307d85d8
v1.18.1 2023-02-15 14:54:47 +00:00
mcraa
772df8f5e7
Merge pull request #4012 from balena-io/electron-remote-rpiboot
patch: use @electron/remote for locating rpiboot files
2023-02-15 14:53:53 +00:00
mcraa
04fa3dcd8c patch: use @electron/remote for locating rpiboot files 2023-02-15 15:01:07 +01:00
balenaCI
6538864de4
v1.18.0 2023-02-14 18:07:07 +00:00
dfunckt
480adc3426
Merge pull request #4011 from balena-io/update-electron-19
Drop Spectron and update to Electron 19
2023-02-14 20:06:09 +02:00
Akis Kesoglou
c11db0a279 Update to Electron 19
Change-type: minor
2023-02-14 18:35:01 +02:00
Akis Kesoglou
6f7570d265 Remove Spectron and related (low-value) tests
Spectron is long deprecated and abandoned and the browser tests are so rudimentary that it’s no longer worth having them around. We will introduce a proper browser-based test suite in the short term — it’s a project in progress.

Change-type: minor
2023-02-14 18:34:56 +02:00
balenaCI
ae976894a3
v1.17.0 2023-02-14 16:18:57 +00:00
dfunckt
cd00f78c05
Merge pull request #4010 from balena-io/update-electron-17
Update to Electron 17 and Node 16
2023-02-14 18:17:55 +02:00
Akis Kesoglou
3c1dd6ce29 Update to Electron 17 and Node 16
This is the latest Electron version officially supported by Spectron.

Change-type: minor
2023-02-14 17:46:49 +02:00
balenaCI
5099c6ff21
v1.16.0 2023-02-14 12:40:43 +00:00
dfunckt
c63c98b80a
Merge pull request #4003 from balena-io/update-electron
Update to Electron 14
2023-02-14 14:39:56 +02:00
builder555
6834dae281 this is no longer necessary, and breaks with new electron 2023-02-14 13:42:30 +02:00
Akis Kesoglou
df7854111a Update to Electron 14
Change-type: minor
2023-02-14 13:42:29 +02:00
balenaCI
c0404597c0
v1.15.6 2023-02-13 11:23:14 +00:00
mcraa
64eafdc6f0
Merge pull request #4004 from l10n-tw/master
patch: app: i18n: Translation: Update zh-TW strings
2023-02-13 11:22:27 +00:00
Edward Wu
b51418814f
patch: app: i18n: Translation: Update zh-TW strings
* Improve translate.
* Sync layout with English strings ts file.

Signed-off-by: Edward Wu <bluehome.wu@gmail.com>
2023-02-12 09:31:06 +08:00
balenaCI
748f9d9147
v1.15.5 2023-02-03 14:25:21 +00:00
Edwin Joassart
5c8c4ea412
Merge pull request #4006 from balena-io/aethernet/restore-update
revert auto-update feature
2023-02-03 15:24:32 +01:00
JOASSART Edwin
e6d33eda2b revert auto-update feature
Change-type: patch
2023-02-03 11:31:56 +01:00
balenaCI
324102bc73
v1.15.4 2023-02-02 18:26:47 +00:00
Balena CI
e6182ff807
Merge pull request #4000 from balena-io/switch-to-electron-remote
Switch to `@electron/remote`
2023-02-02 20:26:02 +02:00
Akis Kesoglou
7ee174edce Switch to @electron/remote
Electron 12 deprecated `electron.remote` and the functionality was removed in Electron 14, but became available as a separate `@electron/remote` module. This commit makes the transition to the external module as an intermediary step to enable updating to a newer Electron version.

Change-type: patch
2023-02-02 19:50:04 +02:00
balenaCI
cbb4810260
v1.15.3 2023-02-02 17:23:19 +00:00
Balena CI
c3257216c2
Merge pull request #4001 from balena-io/aethernet/standalone-efp
move EFP & success-banner to efp.balena.io
2023-02-02 19:22:27 +02:00
Edwin Joassart
a140faaebe move EFP & success-banner to efp.balena.io
Change-type: patch
2023-02-02 14:06:29 +01:00
balenaCI
79200d1f79
v1.15.2 2023-02-02 13:05:03 +00:00
Balena CI
10e2da2c00
Merge pull request #4002 from balena-io/aethernet/remove-getconfig
Remove configuration remote update
2023-02-02 15:04:10 +02:00
Edwin Joassart
85a49a221f Remove configuration remote update
Change-type: patch
2023-02-01 15:09:04 +01:00
balenaCI
1bc64bbaf8
v1.15.1 2023-02-01 12:18:57 +00:00
dfunckt
180bd29afa
Merge pull request #3995 from balena-io/fix-build
Fix build
2023-02-01 14:17:33 +02:00
Akis Kesoglou
48ddafd120 Remove redundant resinci-deploy build step
Change-type: patch
2023-02-01 12:50:00 +02:00
Akis Kesoglou
851219f835 Lazily import Electron from child-writer process
No idea how this *used* to work, but it doesn’t since 887ec428 and this is fixing it properly.

Change-type: patch
2023-02-01 11:44:39 +02:00
balenaCI
286c74b41b
v1.15.0 2023-01-27 11:36:34 +00:00
dfunckt
8a0711e2a6
Merge pull request #3987 from balena-io/support-node-18
Add support for Node 18
2023-01-27 13:35:09 +02:00
Akis Kesoglou
887ec42847 Add support for Node 18
The Electron version we’re currently using is on Node 14 but this is a step forward to upgrading to a newer Electron and Node version.

Updates etcher-sdk and switches the redundant aws4-axios dependency to just axios.

Also changed bundler to stop trying to bundle wasm files — they must be included inline with JS code as data — and removed some now redundant code.

The crucial changes that enable support are:

1. The update to etcher-sdk@8 where some dependency fixes and updates took place
2. The downgrade and pinning of "electron-rebuild" to v3.2.3 until we’re able to update to Electron >= 14.2. The patch we need to avoid is https://github.com/electron/rebuild/pull/907. Also see: https://github.com/nodejs/node-gyp/issues/2673 and https://github.com/electron/rebuild/issues/913
3. A rule in webpack.config to ignore `aws-crt` which is a dependency of (ultimately) `aws4-axios` which is used by etcher-sdk and does a runtime check to its availability. We’re not currently using the “assume role” functionality (AFAIU) of aws4-axios and we don’t care that it’s not found, so force webpack to ignore the import. See https://github.com/aws/aws-sdk-js-v3/issues/3025

Change-type: minor
2023-01-27 12:12:11 +02:00
balenaCI
62c3c35526
v1.14.3 2023-01-19 12:21:04 +00:00
Balena CI
1a368f55fa
Merge pull request #3982 from balena-io/i18n-sudo-en-fallback
patch: fixed mac sudo on other languages
2023-01-19 14:19:34 +02:00
Peter Makra
19d1e093fc patch: fixed mac sudo on other languages 2023-01-19 11:56:44 +01:00
balenaCI
407138c999
v1.14.2 2023-01-17 14:37:43 +00:00
Balena CI
b5536bfc7f
Merge pull request #3980 from balena-io/update-sdk-for-cm4v5
patch: update etcher-sdk for cm4v5
2023-01-17 16:36:07 +02:00
Peter Makra
72af77860b patch: revert to lockfile v1 2023-01-17 14:57:15 +01:00
builder555
8e63be2efe patch: update etcher-sdk for cm4v5
Change-type: patch
2023-01-16 16:34:02 -05:00
balenaCI
5f014e163e
v1.14.1 2023-01-16 13:22:38 +00:00
Balena CI
bd88e5a1ca
Merge pull request #3978 from balena-io/aethernet/fix-screensaver
fix disabled-screensaver unhandled exception outside balena-electron env
2023-01-16 15:21:13 +02:00
Edwin Joassart
5bd4e06cb9 send exeption to console even when error reporting is off 2023-01-16 13:24:12 +01:00
Edwin Joassart
46c406e8c1 fix disabled-screensaver unhandled exception outside balena-electron env
Change-type: patch
2023-01-16 12:48:56 +01:00
balenaCI
615e035a5d
v1.14.0 2023-01-16 11:23:56 +00:00
Balena CI
7616c41564
Merge pull request #3891 from balena-io/removes-corvus
Removes corvus in favor of sentry and analytics client
2023-01-16 13:22:29 +02:00
balenaCI
d5ba1ea5e1
v1.13.4 2023-01-12 15:10:51 +00:00
Balena CI
54d3636a22
Merge pull request #3890 from balena-io/wolvi-lataniere/adding-serial-number-etcher-pro
Adding EtcherPro device serial number to the Settings modal
2023-01-12 17:09:11 +02:00
Aurelien VALADE
45f6ee667d Cleaning-up EtcherPro specific code 2023-01-12 14:52:08 +01:00
Aurelien VALADE
d25eda9a7d Adding EtcherPro device serial number to the Settings modal
Change-type: patch
2023-01-12 12:12:10 +01:00
Otávio Jacobi
86d43a536f Anonymizes all paths before sending
Change-type: patch
2023-01-12 11:11:52 +00:00
Edwin Joassart
6c417e35a1 patch: Sentry fix path 2023-01-12 11:11:52 +00:00
Otávio Jacobi
2b728d3c52 Remove personal path on etcher
Change-type: minor
2023-01-12 11:11:52 +00:00
Edwin Joassart
f3f7ecb852 Unifying sentry reports in a single project
Change-type: patch
2023-01-12 11:11:52 +00:00
Otávio Jacobi
41fca03c98 Removes corvus in favor of sentry and analytics client
Change-type: patch
Signed-off-by: Otavio Jacobi
2023-01-12 11:11:52 +00:00
Otávio Jacobi
10caf8f1b6 Removes corvus in favor of sentry and analytics client
Change-type: patch
Signed-off-by: Otavio Jacobi
2023-01-12 11:11:52 +00:00
balenaCI
7420283249
v1.13.3 2023-01-11 14:30:46 +00:00
Balena CI
453952440f
Merge pull request #3971 from balena-io/mcraa/win-cm4
patch: progress cm4 to second stage
2023-01-11 16:28:49 +02:00
Peter Makra
2475d576c7 patch: progress cm4 to second stage 2023-01-11 13:36:11 +01:00
balenaCI
8cd6da1260
v1.13.2 2023-01-02 20:55:59 +00:00
Balena CI
82dd4fc1d1
Merge pull request #3964 from balena-io/fix-winget-releaser
patch: fixed winget parameter name
2023-01-02 15:54:20 -05:00
mcraa
33fe4b2c1a
patch: fixed winget parameter name 2023-01-02 21:17:55 +01:00
balenaCI
b1c1188107
v1.13.1 2023-01-02 17:26:57 +00:00
Balena CI
63b45aefae
Merge pull request #3959 from balena-io/update-copyright
patch: update copyright in electron-builder
2023-01-02 12:25:24 -05:00
Peter Makra
f79cb0fac5 patch: updated sdk to fix bz2 issue 2023-01-02 17:44:42 +01:00
JOASSART Edwin
ec42892c7c patch: update copyright in electron-builder 2023-01-02 12:45:42 +01:00
balenaCI
371716fe6a
v1.13.0 2022-12-28 16:48:14 +00:00
Balena CI
d5fb6bec15
Merge pull request #3945 from balena-io/update-sdk-for-cm4
Patch: update etcher-sdk version to fix CM4 issues
2022-12-28 11:46:52 -05:00
Peter Makra
c5e7bf26d7 bump electron deps 2022-12-23 21:32:30 +01:00
Peter Makra
e3072ac416 minor: electron version bump 2022-12-23 21:32:30 +01:00
Peter Makra
dfaf06e4cf sdk version bump 2022-12-23 21:32:29 +01:00
Peter Makra
6e24d25576 fixed ext2fs regex 2022-12-23 21:32:29 +01:00
Peter Makra
b59b171e43 patch: handle ext2fs with webpack 2022-12-23 21:32:29 +01:00
Peter Makra
28726584c2 prerelease etcher-compat etcher-sdk 2022-12-23 21:32:29 +01:00
Peter Makra
00b151311a alignerd webpack to ext2fs 2022-12-23 21:32:28 +01:00
builder555
36c813714b Patch: update etcher-sdk version to fix CM4 issues
Change-type: patch
2022-12-23 21:32:28 +01:00
balenaCI
2ae6764dd9
v1.12.7 2022-12-20 19:35:13 +00:00
Balena CI
debefc9652
Merge pull request #3954 from balena-io/renovate/i18next-21.x
Update dependency i18next to 21.10.0
2022-12-20 14:33:35 -05:00
Renovate Bot
b068b847c7 Update dependency i18next to 21.10.0
Update i18next to 21.10.0

Update i18next from 21.8.14 to 21.10.0

Change-type: patch
2022-12-20 18:56:45 +00:00
balenaCI
6c410c07ce
v1.12.6 2022-12-20 18:00:05 +00:00
Balena CI
c01206c1f3
Merge pull request #3953 from balena-io/renovate/react-i18next-11.x
Update dependency react-i18next to 11.18.6
2022-12-20 12:58:30 -05:00
Renovate Bot
2e85fb45de Update dependency react-i18next to 11.18.6
Update react-i18next to 11.18.6

Update react-i18next from 11.18.1 to 11.18.6

Change-type: patch
2022-12-20 17:02:05 +00:00
balenaCI
67513e384d
v1.12.5 2022-12-20 12:27:35 +00:00
Balena CI
828dafa493
Merge pull request #3950 from balena-io/easier-text-settings
Patch: made trim setting more readable
2022-12-20 07:26:13 -05:00
builder555
5c5a761222
Patch: made trim setting more readable
Change-type: patch
2022-12-20 06:52:06 -05:00
balenaCI
fab10e5fc5
v1.12.4 2022-12-19 19:42:01 +00:00
Balena CI
797345fc1c
Merge pull request #3780 from balena-io/actions
patch: introducing github actions (WinGet)
2022-12-19 14:40:29 -05:00
Anton Belodedenko
a0388a43c3 Update winget.yml 2022-12-19 11:05:16 -08:00
mcraa
f5b0a3023b Update winget.yml 2022-12-19 11:05:16 -08:00
mcraa
dc1d7bd1fd fixed version of action to v1 2022-12-19 11:05:16 -08:00
Vedant
9d674321b6 Update winget.yml 2022-12-19 11:05:16 -08:00
Begula
f9c8378d6a patch: publish to winget with gh action 2022-12-19 11:05:16 -08:00
balenaCI
65da751a52
v1.12.3 2022-12-19 09:51:53 +00:00
Balena CI
72142be0de
Merge pull request #3948 from balena-io/fix-i18n-settings
Patch: replaced plain text with i18n in settings
2022-12-19 04:50:25 -05:00
builder555
11cea7c926
Patch: replaced plain text with i18n in settings
Change-type: patch
2022-12-16 14:42:28 -05:00
balenaCI
8d46ee4c22
v1.12.2 2022-12-16 16:59:05 +00:00
Balena CI
d63c09e2c2
Merge pull request #3944 from balena-io/renovate/webpack-dev-server-4.x
Update dependency webpack-dev-server to 4.11.1
2022-12-16 11:56:45 -05:00
Renovate Bot
c9e9d7d109 Update dependency webpack-dev-server to 4.11.1
Update webpack-dev-server to 4.11.1

Update webpack-dev-server from 4.5.0 to 4.11.1

Change-type: patch
2022-12-16 15:57:46 +00:00
balenaCI
2412d20eb4
v1.12.1 2022-12-16 15:02:36 +00:00
Balena CI
7f90d23a12
Merge pull request #3947 from balena-io/expose-trim-setting
Patch: expose trim ext{2,3,4} setting
2022-12-16 09:59:32 -05:00
builder555
b9a82be29b Patch: expose trim ext{2,3,4} setting
Change-type: patch
2022-12-16 09:24:49 -05:00
balenaCI
638673ba5e
v1.12.0 2022-12-14 16:17:32 +00:00
Balena CI
898fe4f216
Merge pull request #3936 from balena-io/i18n-conflict-resolve
I18n conflict resolve
2022-12-14 11:15:48 -05:00
Peter Makra
7e805662d1 check if modal children is aray 2022-12-14 15:48:48 +01:00
Peter Makra
baf59c73ac populated lockfile 2022-12-14 12:24:40 +01:00
mcraa
38ad9c97c6
added i18next to devDependencies 2022-12-14 12:03:30 +01:00
ab77
8fc574f059 i18n support and Chinese translation
Change-type: minor
2022-12-12 18:36:32 -08:00
r-q
78b0f00e88 chore: bind some translations
according to a suggestion of @lurch
2022-12-12 18:36:32 -08:00
r-q
0f10f2d483 fix: suit i18n with mocha and optimize translation
- use `import * as i18next from 'i18next';` instead of `import i18next from 'i18next';` and add an specific env to bypass mocha test
- optimized several translations
2022-12-12 18:36:32 -08:00
r-q
eb5f5bbb9e fix: optimize translations
more direct string-concatenation, thanks to @lurch
2022-12-12 18:36:32 -08:00
r-q
67d26ff790 minor: optimize i18n
Optimized several translations.
This commit itself is only a patch, but as a pull request must have at least one commit with a change-type.

Change-Type: minor
2022-12-12 18:36:32 -08:00
r-q
17f2008d88 refactor: split translations to files
- split translations from i18n.ts to several .ts files in lib/gui/app/i18n
- make a README for new language changes
- add zh-TW instead of only zh-CN
2022-12-12 18:36:32 -08:00
r-q
db1bf7e488 feat: make i18n and add Chinese support
- make i18n using i18next
- add Chinese (Simplified) support
2022-12-12 18:36:32 -08:00
balenaCI
4b786b8a9f
v1.11.10 2022-12-13 02:27:43 +00:00
Balena CI
fdfa0d3258
Merge pull request #3943 from balena-io/renovate/webpack-cli-4.x
Update dependency webpack-cli to 4.10.0
2022-12-12 21:26:03 -05:00
Renovate Bot
757aa77d89 Update dependency webpack-cli to 4.10.0
Update webpack-cli to 4.10.0

Update webpack-cli from 4.2.0 to 4.10.0

Change-type: patch
2022-12-13 01:18:03 +00:00
balenaCI
d70ea06565
v1.11.9 2022-12-12 23:58:11 +00:00
Balena CI
f2ebd10053
Merge pull request #3941 from balena-io/renovate/webpack-5.x
Update dependency webpack to 5.75.0
2022-12-12 18:56:06 -05:00
Renovate Bot
cd67b442c9 Update dependency webpack to 5.75.0
Update webpack to 5.75.0

Update webpack from 5.11.0 to 5.75.0

Change-type: patch
2022-12-12 22:55:21 +00:00
balenaCI
852c83c4fb
v1.11.8 2022-12-12 21:55:30 +00:00
Balena CI
e3b2ee3b83
Merge pull request #3940 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.28
2022-12-12 16:54:15 -05:00
Renovate Bot
927a026b86 Update dependency awscli to 1.27.28
Update awscli to 1.27.28

Update awscli from 1.27.27 to 1.27.28

Change-type: patch
2022-12-12 20:57:48 +00:00
balenaCI
c851e1d54f
v1.11.7 2022-12-12 19:57:33 +00:00
Balena CI
e6fdca171f
Merge pull request #3939 from balena-io/renovate/uuid-8.x
Update dependency uuid to 8.3.2
2022-12-12 14:56:00 -05:00
Renovate Bot
c9cfb87733 Update dependency uuid to 8.3.2
Update uuid to 8.3.2

Update uuid from 8.1.0 to 8.3.2

Change-type: patch
2022-12-12 18:56:41 +00:00
balenaCI
b0b7c53294
v1.11.6 2022-12-12 17:59:45 +00:00
Balena CI
e8dc6579fe
Merge pull request #3933 from balena-io/renovate/tslib-2.x
Update dependency tslib to 2.4.1
2022-12-12 12:57:52 -05:00
Renovate Bot
f0747abe3f Update dependency tslib to 2.4.1
Update tslib to 2.4.1

Update tslib from 2.0.0 to 2.4.1

Change-type: patch
2022-12-12 16:59:52 +00:00
Balena CI
32fab87340
Merge pull request #3935 from balena-io/aethernet-buildUbuntu20
Patch: run linux build on ubuntu-20.04
2022-12-12 11:10:38 -05:00
Edwin Joassart
adcd8e0325
Patch: run linux build on ubuntu-20.04
as [`18.04` has been removed](https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/)

We cannot use `latest` as the glibc version will cause issue with older ubuntu version.
2022-12-12 12:09:01 +01:00
balenaCI
7b5808eb2b
v1.11.5 2022-12-10 12:28:20 +00:00
Balena CI
a8f7422cf5
Merge pull request #3932 from balena-io/renovate/ts-loader-8.x
Update dependency ts-loader to 8.4.0
2022-12-10 07:26:55 -05:00
Renovate Bot
5ae9a26361 Update dependency ts-loader to 8.4.0
Update ts-loader to 8.4.0

Update ts-loader from 8.0.12 to 8.4.0

Change-type: patch
2022-12-10 11:57:20 +00:00
balenaCI
cf1fdb8c5f
v1.11.4 2022-12-10 10:57:12 +00:00
Balena CI
bf7ebde100
Merge pull request #3930 from balena-io/renovate/styled-components-5.x
Update dependency styled-components to 5.3.6
2022-12-10 05:55:52 -05:00
Renovate Bot
88c5fa5035 Update dependency styled-components to 5.3.6
Update styled-components to 5.3.6

Update styled-components from 5.1.0 to 5.3.6

Change-type: patch
2022-12-10 09:57:26 +00:00
balenaCI
887b0dd538
v1.11.3 2022-12-10 08:54:54 +00:00
Balena CI
364d1db56a
Merge pull request #3931 from balena-io/renovate/terser-webpack-plugin-5.x
Update dependency terser-webpack-plugin to 5.3.6
2022-12-10 03:53:34 -05:00
Renovate Bot
c431222909 Update dependency terser-webpack-plugin to 5.3.6
Update terser-webpack-plugin to 5.3.6

Update terser-webpack-plugin from 5.2.5 to 5.3.6

Change-type: patch
2022-12-10 07:54:55 +00:00
balenaCI
55a0f68b97
v1.11.2 2022-12-10 07:32:27 +00:00
Balena CI
af2563dfc2
Merge pull request #3929 from balena-io/renovate/string-replace-loader-3.x
Update dependency string-replace-loader to 3.1.0
2022-12-10 02:31:00 -05:00
Renovate Bot
33f8851083 Update dependency string-replace-loader to 3.1.0
Update string-replace-loader to 3.1.0

Update string-replace-loader from 3.0.1 to 3.1.0

Change-type: patch
2022-12-10 06:58:36 +00:00
balenaCI
fe1f19b9fa
v1.11.1 2022-12-10 06:19:32 +00:00
Balena CI
871cf3ec0a
Merge pull request #3928 from balena-io/renovate/sinon-9.x
Update dependency sinon to 9.2.4
2022-12-10 01:17:59 -05:00
Renovate Bot
686a5837b6 Update dependency sinon to 9.2.4
Update sinon to 9.2.4

Update sinon from 9.0.2 to 9.2.4

Change-type: patch
2022-12-10 04:58:08 +00:00
balenaCI
23f2dd5ce5
v1.11.0 2022-12-10 04:27:20 +00:00
Balena CI
d5d39b395b
Merge pull request #3927 from balena-io/renovate/shyaml-0.x
Update dependency shyaml to 0.6.2
2022-12-09 23:25:51 -05:00
Renovate Bot
2acad790d3 Update dependency shyaml to 0.6.2
Update shyaml to 0.6.2

Update shyaml from 0.5.0 to 0.6.2

Change-type: minor
2022-12-10 03:56:23 +00:00
balenaCI
30133306d6
v1.10.29 2022-12-10 03:05:04 +00:00
Balena CI
04a62f2ad8
Merge pull request #3925 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.27
2022-12-09 22:03:25 -05:00
Renovate Bot
17858a7d72 Update dependency awscli to 1.27.27
Update awscli to 1.27.27

Update awscli from 1.27.26 to 1.27.27

Change-type: patch
2022-12-10 02:19:49 +00:00
balenaCI
620307568f
v1.10.28 2022-12-10 02:10:44 +00:00
Balena CI
a349c5d9ac
Merge pull request #3926 from balena-io/renovate/rendition-19.x
Update dependency rendition to 19.3.2
2022-12-09 21:08:52 -05:00
Renovate Bot
0d740ad12d Update dependency rendition to 19.3.2
Update rendition to 19.3.2

Update rendition from 19.2.0 to 19.3.2

Change-type: patch
2022-12-09 23:58:04 +00:00
balenaCI
85a3f28869
v1.10.27 2022-12-09 20:59:25 +00:00
Balena CI
dbd5397405
Merge pull request #3924 from balena-io/renovate/redux-4.x
Update dependency redux to 4.2.0
2022-12-09 15:57:56 -05:00
Renovate Bot
85c183b9ef Update dependency redux to 4.2.0
Update redux to 4.2.0

Update redux from 4.0.5 to 4.2.0

Change-type: patch
2022-12-09 19:58:31 +00:00
balenaCI
0d0af1d1dd
v1.10.26 2022-12-09 18:58:23 +00:00
Balena CI
ad423fc187
Merge pull request #3923 from balena-io/renovate/pretty-bytes-5.x
Update dependency pretty-bytes to 5.6.0
2022-12-09 13:56:50 -05:00
Renovate Bot
d8b2a7a236 Update dependency pretty-bytes to 5.6.0
Update pretty-bytes to 5.6.0

Update pretty-bytes from 5.3.0 to 5.6.0

Change-type: patch
2022-12-09 18:00:18 +00:00
balenaCI
13ec8cbe98
v1.10.25 2022-12-09 17:01:54 +00:00
Balena CI
a7cae23612
Merge pull request #3922 from balena-io/renovate/pnp-webpack-plugin-1.x
Update dependency pnp-webpack-plugin to 1.7.0
2022-12-09 12:00:09 -05:00
Renovate Bot
86bb093f3d Update dependency pnp-webpack-plugin to 1.7.0
Update pnp-webpack-plugin to 1.7.0

Update pnp-webpack-plugin from 1.6.4 to 1.7.0

Change-type: patch
2022-12-09 16:01:26 +00:00
balenaCI
997e1eb2f2
v1.10.24 2022-12-09 14:59:56 +00:00
Balena CI
34cc8b8933
Merge pull request #3921 from balena-io/renovate/node-ipc-9.x
Update dependency node-ipc to 9.2.1
2022-12-09 09:58:26 -05:00
Renovate Bot
f26b074811 Update dependency node-ipc to 9.2.1
Update node-ipc to 9.2.1

Update node-ipc from 9.1.1 to 9.2.1

Change-type: patch
2022-12-09 13:56:52 +00:00
balenaCI
adaa07b4b0
v1.10.23 2022-12-09 13:05:54 +00:00
Balena CI
96f4569342
Merge pull request #3919 from balena-io/renovate/mocha-8.x
Update dependency mocha to 8.4.0
2022-12-09 08:04:01 -05:00
Renovate Bot
be190c6c80 Update dependency mocha to 8.4.0
Update mocha to 8.4.0

Update mocha from 8.0.1 to 8.4.0

Change-type: patch
2022-12-09 11:59:55 +00:00
balenaCI
809617a82d
v1.10.22 2022-12-09 10:57:45 +00:00
Balena CI
df02732002
Merge pull request #3918 from balena-io/renovate/mini-css-extract-plugin-1.x
Update dependency mini-css-extract-plugin to 1.6.2
2022-12-09 05:56:17 -05:00
Renovate Bot
d35f3c3049 Update dependency mini-css-extract-plugin to 1.6.2
Update mini-css-extract-plugin to 1.6.2

Update mini-css-extract-plugin from 1.3.3 to 1.6.2

Change-type: patch
2022-12-09 09:59:39 +00:00
balenaCI
8b047e3b14
v1.10.21 2022-12-09 08:58:01 +00:00
Balena CI
fa41d21e27
Merge pull request #3917 from balena-io/renovate/lint-staged-10.x
Update dependency lint-staged to 10.5.4
2022-12-09 03:56:44 -05:00
Renovate Bot
54e6c5e2c1 Update dependency lint-staged to 10.5.4
Update lint-staged to 10.5.4

Update lint-staged from 10.2.2 to 10.5.4

Change-type: patch
2022-12-09 07:57:13 +00:00
balenaCI
43fc3dd7eb
v1.10.20 2022-12-09 06:59:32 +00:00
Balena CI
12a1340c8e
Merge pull request #3916 from balena-io/renovate/husky-4.x
Update dependency husky to 4.3.8
2022-12-09 01:58:11 -05:00
Renovate Bot
cf8b5790a1 Update dependency husky to 4.3.8
Update husky to 4.3.8

Update husky from 4.2.5 to 4.3.8

Change-type: patch
2022-12-09 05:56:33 +00:00
balenaCI
659d85a833
v1.10.19 2022-12-09 04:58:50 +00:00
Balena CI
96c44d31c9
Merge pull request #3915 from balena-io/renovate/esbuild-loader-2.x
Update dependency esbuild-loader to 2.20.0
2022-12-08 23:56:57 -05:00
Renovate Bot
ba812b4f64 Update dependency esbuild-loader to 2.20.0
Update esbuild-loader to 2.20.0

Update esbuild-loader from 2.16.0 to 2.20.0

Change-type: patch
2022-12-09 03:59:40 +00:00
balenaCI
4087258fbd
v1.10.18 2022-12-09 03:07:59 +00:00
Balena CI
955be13129
Merge pull request #3914 from balena-io/renovate/electron-updater-4.x
Update dependency electron-updater to 4.6.5
2022-12-08 22:06:19 -05:00
Renovate Bot
32011c0dea Update dependency electron-updater to 4.6.5
Update electron-updater to 4.6.5

Update electron-updater from 4.3.5 to 4.6.5

Change-type: patch
2022-12-09 02:21:28 +00:00
balenaCI
b68325c71c
v1.10.17 2022-12-09 01:21:27 +00:00
Balena CI
84bce86fce
Merge pull request #3913 from balena-io/renovate/electron-notarize-1.x
Update dependency electron-notarize to 1.2.2
2022-12-08 20:19:51 -05:00
Renovate Bot
d68eab1dda Update dependency electron-notarize to 1.2.2
Update electron-notarize to 1.2.2

Update electron-notarize from 1.0.0 to 1.2.2

Change-type: patch
2022-12-08 23:57:37 +00:00
balenaCI
09cf014d14
v1.10.16 2022-12-08 22:58:43 +00:00
Balena CI
d5bab5805f
Merge pull request #3912 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.26
2022-12-08 17:57:07 -05:00
Renovate Bot
b5ab500a14 Update dependency awscli to 1.27.26
Update awscli to 1.27.26

Update awscli from 1.27.25 to 1.27.26

Change-type: patch
2022-12-08 21:59:13 +00:00
balenaCI
49253d37c9
v1.10.15 2022-12-08 21:37:02 +00:00
Balena CI
97cf3b25ad
Merge pull request #3911 from balena-io/renovate/electron-builder-22.x
Update dependency electron-builder to 22.14.13
2022-12-08 16:35:33 -05:00
Renovate Bot
99862b95a5 Update dependency electron-builder to 22.14.13
Update electron-builder to 22.14.13

Update electron-builder from 22.10.5 to 22.14.13

Change-type: patch
2022-12-08 20:56:08 +00:00
balenaCI
8b765d58e5
v1.10.14 2022-12-08 19:55:07 +00:00
Balena CI
8f566e45b8
Merge pull request #3910 from balena-io/renovate/debug-4.x
Update dependency debug to 4.3.4
2022-12-08 14:53:44 -05:00
Renovate Bot
b8af86e30c Update dependency debug to 4.3.4
Update debug to 4.3.4

Update debug from 4.2.0 to 4.3.4

Change-type: patch
2022-12-08 18:58:28 +00:00
balenaCI
784f193b6d
v1.10.13 2022-12-08 17:57:08 +00:00
Balena CI
3967adb1b5
Merge pull request #3909 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.25
2022-12-08 12:55:28 -05:00
Renovate Bot
0667d1110f Update dependency awscli to 1.27.25
Update awscli to 1.27.25

Update awscli from 1.27.24 to 1.27.25

Change-type: patch
2022-12-08 16:59:48 +00:00
balenaCI
61dd22bdf3
v1.10.12 2022-12-08 15:56:15 +00:00
Anton Belodedenko
24eb8b05b0
Merge pull request #3907 from balena-io/renovate/css-loader-5.x
Update dependency css-loader to 5.2.7
2022-12-08 07:54:36 -08:00
Renovate Bot
6991a4950b Update dependency css-loader to 5.2.7
Update css-loader to 5.2.7

Update css-loader from 5.0.1 to 5.2.7

Change-type: patch
2022-12-07 03:55:56 +00:00
balenaCI
bb169cf674
v1.10.11 2022-12-07 03:22:00 +00:00
Anton Belodedenko
e5d0d2e262
Merge pull request #3906 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.24
2022-12-06 19:20:29 -08:00
Renovate Bot
72b4d4f4fa Update dependency awscli to 1.27.24
Update awscli to 1.27.24

Update awscli from 1.27.5 to 1.27.24

Change-type: patch
2022-12-07 02:27:18 +00:00
balenaCI
9b2f2eb4c3
v1.10.10 2022-12-07 02:19:19 +00:00
Anton Belodedenko
ce52ef95a9
Merge pull request #3905 from balena-io/renovate/node-14.x
Update dependency @types/node to 14.18.34
2022-12-06 18:17:44 -08:00
Renovate Bot
aa3756ad17 Update dependency @types/node to 14.18.34
Update @types/node to 14.18.34

Update @types/node from 14.18.33 to 14.18.34

Change-type: patch
2022-12-07 01:17:15 +00:00
balenaCI
73081e726d
v1.10.9 2022-12-06 23:59:23 +00:00
Anton Belodedenko
d53dc4149b
Merge pull request #3903 from balena-io/ab77/operational
Enable repository configuration
2022-12-06 15:57:58 -08:00
ab77
0d5bb4935f
Enable repository configuration
Change-type: patch
2022-12-06 14:59:31 -08:00
balenaCI
14aeb0060b
v1.10.8 2022-12-05 21:38:43 +00:00
Anton Belodedenko
239726f3ce
Merge pull request #3864 from balena-io/renovate/chai-4.x
Update dependency chai to 4.3.7
2022-12-05 13:37:20 -08:00
Renovate Bot
4ed3002716 Update dependency chai to 4.3.7
Update chai to 4.3.7

Update chai from 4.2.0 to 4.3.7

Change-type: patch
2022-12-05 13:04:10 -08:00
balenaCI
7286fba240
v1.10.7 2022-12-05 19:39:09 +00:00
Anton Belodedenko
895c306fb7
Merge pull request #3868 from balena-io/ab77/operational
Use core workflow for GitHub publish
2022-12-05 11:37:16 -08:00
ab77
f3844d56e2
Use core workflow for GitHub publish
Change-type: patch
2022-12-05 10:51:35 -08:00
balenaCI
540dc3150a
v1.10.6 2022-12-02 14:05:00 +00:00
Edwin Joassart
035c8dfec3
Merge pull request #3897 from balena-io/aethernet-assetv
Dummy update to fix asset version issue
2022-12-02 15:03:34 +01:00
Edwin Joassart
03d6a011db
Dummy update to fix asset version issue
Due to a race between two patch, 1.10.5 assets are labelled 1.10.3.
This dummy PR should fix this.

Change-type: patch
2022-12-02 14:17:31 +01:00
balenaCI
27f64650f9
v1.10.5 2022-12-02 12:41:21 +00:00
Edwin Joassart
ccca009972
Merge pull request #3893 from balena-io/aethernet-fix-ubuntu
Patch: run linux build on ubuntu-18.04
2022-12-02 13:39:56 +01:00
Edwin Joassart
57a6ceff0e Patch: run linux build on ubuntu-18.04
Running on ubuntu-latest means you need a more recent version of glibc which breaks on older ubuntu.

Thanks to @theofficialgman for suggesting the fix.
2022-12-02 13:00:01 +01:00
balenaCI
30c4baa58b
v1.10.4 2022-12-01 23:27:57 +00:00
Anton Belodedenko
a930d77064
Merge pull request #3875 from p-linnane/brew-remove
Remove Homebrew instructions
2022-12-01 15:26:24 -08:00
Patrick Linnane
0d1cfffa5c patch: remove Homebrew instructions in README
Homebrew no longer supports etcher, so removing install instructions.

Change-type: patch
2022-12-01 14:35:59 -08:00
balenaCI
3c7422764c
v1.10.3 2022-12-01 22:31:26 +00:00
Anton Belodedenko
55176b9f8f
Merge pull request #3895 from balena-io/ab77/external-contributors
Allow external contributors
2022-12-01 14:29:59 -08:00
ab77
156b9314b5
Allow external contributors
Change-type: patch
2022-12-01 13:50:27 -08:00
balenaCI
76d22280dc
v1.10.2 2022-11-25 19:22:51 +00:00
bulldozer-balena[bot]
e4251a3862
Merge pull request #3886 from balena-io/aethernet-patch-analytics
Fix missing analytics token
2022-11-25 19:21:35 +00:00
Edwin Joassart
831339bd2c
Fix missing analytics token
Change-type: patch
Signed-off-by: Edwin Joassart edwin.joassart@balena.io
2022-11-25 19:14:58 +01:00
balenaCI
952ea80e15
v1.10.1 2022-11-21 16:50:16 +00:00
bulldozer-balena[bot]
813c497e4b
Merge pull request #3882 from balena-io/wolvi-lataniere/fix-screensaver-methods-calls
Fixing call to electron block screensaver methods invocation
2022-11-21 16:48:50 +00:00
Aurelien VALADE
1b5b647135 Fixing call to electron block screensaver methods invocation
Replacing `send` calls to `invoke` for `enable/disable-screensaver` calls.

Change-type: patch
Signed-off-by: Aurelien VALADE <aurelien.valade@balena.io>
2022-11-21 16:26:15 +01:00
balenaCI
7de99003ca
v1.10.0 2022-11-10 20:54:14 +00:00
bulldozer-balena[bot]
e09bdd734b
Merge pull request #3871 from balena-io/test
testing renovate
2022-11-10 20:52:37 +00:00
builder555
306e087ec6 testing renovate
Change-Type: minor
2022-11-10 15:12:39 -05:00
balenaCI
c6b0178a87
v1.9.0 2022-11-08 21:37:26 +00:00
bulldozer-balena[bot]
4e581ea1ce
Merge pull request #3861 from balena-io/renovate/awscli-1.x
Update dependency awscli to 1.27.5
2022-11-08 21:36:02 +00:00
Renovate Bot
26dc2d19e5 Update dependency awscli to 1.27.5
Update awscli to 1.27.5

Update awscli from 1.11.87 to 1.27.5

Change-type: minor
2022-11-08 20:50:05 +00:00
balenaCI
b99282acfb
v1.8.17 2022-11-08 20:38:29 +00:00
bulldozer-balena[bot]
4e48724d0c
Merge pull request #3860 from balena-io/renovate/react-dom-16.x
Update dependency @types/react-dom to 16.9.17
2022-11-08 20:36:50 +00:00
Renovate Bot
448ce141d5 Update dependency @types/react-dom to 16.9.17
Update @types/react-dom to 16.9.17

Update @types/react-dom from 16.8.4 to 16.9.17

Change-type: patch
2022-11-08 19:50:12 +00:00
balenaCI
695f287190
v1.8.16 2022-11-08 19:39:44 +00:00
bulldozer-balena[bot]
4de3271e15
Merge pull request #3858 from balena-io/renovate/react-16.x
Update dependency @types/react to 16.14.34
2022-11-08 19:38:16 +00:00
Renovate Bot
77b33b127d Update dependency @types/react to 16.14.34
Update @types/react to 16.14.34

Update @types/react from 16.8.5 to 16.14.34

Change-type: patch
2022-11-08 18:37:18 +00:00
balenaCI
9cd13ba381
v1.8.15 2022-11-08 18:21:06 +00:00
bulldozer-balena[bot]
9df23c8a3f
Merge pull request #3859 from balena-io/ab77/operational
CI: generalise artefact handling
2022-11-08 18:19:29 +00:00
ab77
e3618b939e
CI: generalise artefact handling
* on PR syncs, delete draft releases on Linux runners only
* delete draft releases when unmerged PRs are closed

Change-type: patch
2022-11-08 09:41:03 -08:00
balenaCI
6a39f5869a
v1.8.14 2022-11-08 13:57:20 +00:00
bulldozer-balena[bot]
fd472efadc
Merge pull request #3857 from balena-io/renovate/node-14.x
Update dependency @types/node to 14.18.33
2022-11-08 13:56:11 +00:00
Renovate Bot
7e2c2eae63 Update dependency @types/node to 14.18.33
Update @types/node to 14.18.33

Update @types/node from 14.14.41 to 14.18.33

Change-type: patch
2022-11-08 13:01:36 +00:00
balenaCI
5266571ca4
v1.8.13 2022-11-08 12:39:29 +00:00
bulldozer-balena[bot]
797868c474
Merge pull request #3856 from balena-io/renovate/copy-webpack-plugin-6.x
Update dependency @types/copy-webpack-plugin to 6.4.3
2022-11-08 12:38:11 +00:00
Renovate Bot
2c2a5c7c2b Update dependency @types/copy-webpack-plugin to 6.4.3
Update @types/copy-webpack-plugin to 6.4.3

Update @types/copy-webpack-plugin from 6.0.0 to 6.4.3

Change-type: patch
2022-11-08 11:47:28 +00:00
balenaCI
9e536d5337
v1.8.12 2022-11-08 11:33:03 +00:00
bulldozer-balena[bot]
860e680dd9
Merge pull request #3855 from balena-io/renovate/font-awesome
Update dependency @fortawesome/fontawesome-free to 5.15.4
2022-11-08 11:31:46 +00:00
Renovate Bot
7bb52aa170 Update dependency @fortawesome/fontawesome-free to 5.15.4
Update @fortawesome/fontawesome-free to 5.15.4

Update @fortawesome/fontawesome-free from 5.13.1 to 5.15.4

Change-type: patch
2022-11-08 10:50:37 +00:00
balenaCI
1c370f9100
v1.8.11 2022-11-08 10:38:49 +00:00
bulldozer-balena[bot]
ec7c772d0b
Merge pull request #3854 from balena-io/renovate/balena-lint-5.x
Update dependency @balena/lint to 5.4.2
2022-11-08 10:37:18 +00:00
Renovate Bot
cc0285a77d Update dependency @balena/lint to 5.4.2
Update @balena/lint to 5.4.2

Update @balena/lint from 5.3.0 to 5.4.2

Change-type: patch
2022-11-08 09:46:20 +00:00
balenaCI
256d3550d1
v1.8.10 2022-11-08 09:35:05 +00:00
bulldozer-balena[bot]
db3a5f3b0a
Merge pull request #3852 from balena-io/renovate/sys-class-rgb-led-3.x
Update dependency sys-class-rgb-led to 3.0.1
2022-11-08 09:33:38 +00:00
Renovate Bot
0e58edf113 Update dependency sys-class-rgb-led to 3.0.1
Update sys-class-rgb-led to 3.0.1

Update sys-class-rgb-led from 3.0.0 to 3.0.1

Change-type: patch
2022-11-08 08:54:54 +00:00
balenaCI
db136926a9
v1.8.9 2022-11-08 08:40:23 +00:00
bulldozer-balena[bot]
d84e7211be
Merge pull request #3851 from balena-io/renovate/semver-7.x
Update dependency semver to 7.3.8
2022-11-08 08:38:44 +00:00
Renovate Bot
8357cc19d2 Update dependency semver to 7.3.8
Update semver to 7.3.8

Update semver from 7.3.2 to 7.3.8

Change-type: patch
2022-11-08 07:45:37 +00:00
balenaCI
2752b9fa95
v1.8.8 2022-11-08 07:33:39 +00:00
bulldozer-balena[bot]
0214be4953
Merge pull request #3850 from balena-io/renovate/omit-deep-lodash-1.x
Update dependency omit-deep-lodash to 1.1.7
2022-11-08 07:32:29 +00:00
Renovate Bot
a4f944e795 Update dependency omit-deep-lodash to 1.1.7
Update omit-deep-lodash to 1.1.7

Update omit-deep-lodash from 1.1.4 to 1.1.7

Change-type: patch
2022-11-08 06:35:41 +00:00
balenaCI
cd2ebf15fc
v1.8.7 2022-11-08 06:19:14 +00:00
bulldozer-balena[bot]
7a7ea374e9
Merge pull request #3849 from balena-io/renovate/immutable-3.x
Update dependency immutable to 3.8.2
2022-11-08 06:17:03 +00:00
Renovate Bot
330df325f9 Update dependency immutable to 3.8.2
Update immutable to 3.8.2

Update immutable from 3.8.1 to 3.8.2

Change-type: patch
2022-11-08 05:22:49 +00:00
balenaCI
2fc0882b2e
v1.8.6 2022-11-08 05:18:30 +00:00
bulldozer-balena[bot]
4dd779e010
Merge pull request #3847 from balena-io/renovate/electron-rebuild-3.x
Update dependency electron-rebuild to 3.2.9
2022-11-08 05:17:09 +00:00
Renovate Bot
3dc54405fe Update dependency electron-rebuild to 3.2.9
Update electron-rebuild to 3.2.9

Update electron-rebuild from 3.2.5 to 3.2.9

Change-type: patch
2022-11-08 04:39:11 +00:00
balenaCI
3f1aa5bac3
v1.8.5 2022-11-08 04:22:24 +00:00
bulldozer-balena[bot]
8f52fdb900
Merge pull request #3846 from balena-io/renovate/electron-mocha-9.x
Update dependency electron-mocha to 9.3.3
2022-11-08 04:21:09 +00:00
Renovate Bot
1b93891ed8 Update dependency electron-mocha to 9.3.3
Update electron-mocha to 9.3.3

Update electron-mocha from 9.3.2 to 9.3.3

Change-type: patch
2022-11-08 03:23:58 +00:00
balenaCI
33adc8ecf8
v1.8.4 2022-11-08 02:41:38 +00:00
bulldozer-balena[bot]
0455f7ea58
Merge pull request #3845 from balena-io/renovate/webpack-node-externals-2.x
Update dependency @types/webpack-node-externals to 2.5.3
2022-11-08 02:39:47 +00:00
Renovate Bot
ea5a167f4f Update dependency @types/webpack-node-externals to 2.5.3
Update @types/webpack-node-externals to 2.5.3

Update @types/webpack-node-externals from 2.5.0 to 2.5.3

Change-type: patch
2022-11-08 01:45:44 +00:00
balenaCI
8a1c4a4cc8
v1.8.3 2022-11-08 01:36:35 +00:00
bulldozer-balena[bot]
bd8bc81713
Merge pull request #3844 from balena-io/renovate/tmp-0.x
Update dependency @types/tmp to 0.2.3
2022-11-08 01:35:19 +00:00
Renovate Bot
98a5ddf58a Update dependency @types/tmp to 0.2.3
Update @types/tmp to 0.2.3

Update @types/tmp from 0.2.0 to 0.2.3

Change-type: patch
2022-11-08 00:34:31 +00:00
balenaCI
6223dbc541
v1.8.2 2022-11-08 00:19:28 +00:00
bulldozer-balena[bot]
7c56621c57
Merge pull request #3843 from balena-io/ab77/operational
Generate release notes with git
2022-11-08 00:18:08 +00:00
ab77
a61aa8e2be
Generate release notes with git
Change-type: patch
2022-11-07 15:39:26 -08:00
balenaCI
7df4f9615b
v1.8.1 2022-11-07 23:35:28 +00:00
bulldozer-balena[bot]
5742452fdf
Merge pull request #3842 from balena-io/renovate/mime-types-2.x
Update dependency @types/mime-types to 2.1.1
2022-11-07 23:34:08 +00:00
Renovate Bot
fe09f9f862 Update dependency @types/mime-types to 2.1.1
Update @types/mime-types to 2.1.1

Update @types/mime-types from 2.1.0 to 2.1.1

Change-type: patch
2022-11-07 22:36:54 +00:00
balenaCI
3a4687ea0f
v1.8.0 2022-11-07 22:27:05 +00:00
bulldozer-balena[bot]
db6490fb1b
Merge pull request #3840 from balena-io/renovate/scripts-resin-digest
Update scripts/resin digest to 652fdd4
2022-11-07 22:25:48 +00:00
Renovate Bot
1642297101 Update scripts/resin digest to 652fdd4
Update scripts/resin to

Update scripts/resin from  to

Change-type: minor
2022-11-07 21:46:35 +00:00
balenaCI
5ecd223cfc
v1.7.15 2022-11-07 21:36:38 +00:00
bulldozer-balena[bot]
306e40fd7b
Merge pull request #3838 from balena-io/ab77/operational
Build targets individually
2022-11-07 21:34:46 +00:00
ab77
b58249b9c8
Build targets individually
Change-type: patch
2022-11-07 12:57:51 -08:00
balenaCI
b23b4b34d0
v1.7.14 2022-11-07 20:17:55 +00:00
bulldozer-balena[bot]
73bc921713
Merge pull request #3833 from balena-io/renovate/npm-lodash-vulnerability
Update dependency lodash to 4.17.21 [SECURITY]
2022-11-07 20:16:20 +00:00
Renovate Bot
f356e4c303 Update dependency lodash to 4.17.21 [SECURITY]
Update lodash to 4.17.21

Update lodash from 4.17.10 to 4.17.21

Change-type: patch
2022-11-07 19:31:58 +00:00
balenaCI
9888167f2e
v1.7.13 2022-11-07 19:17:08 +00:00
bulldozer-balena[bot]
4561690478
Merge pull request #3837 from balena-io/ab77/operational
Update release notes on finalize
2022-11-07 19:15:38 +00:00
ab77
576113febf
Update release notes on finalize
Change-type: patch
2022-11-07 10:33:38 -08:00
balenaCI
cc139bf750
v1.7.12 2022-11-07 18:32:20 +00:00
bulldozer-balena[bot]
ae91958c06
Merge pull request #3836 from balena-io/ab77/operational
Avoid duplicate releases
2022-11-07 18:30:56 +00:00
ab77
33dea6267f
Avoid duplicate releases
Change-type: patch
2022-11-07 09:47:19 -08:00
balenaCI
c9a8bca96f
v1.7.11 2022-11-07 17:32:27 +00:00
bulldozer-balena[bot]
8af376e608
Merge pull request #3832 from balena-io/ab77/operational
Only run finalize on Linux runners
2022-11-07 17:30:49 +00:00
ab77
9ab307df4f
Only run finalize on Linux runners
Change-type: patch
2022-11-07 08:39:52 -08:00
balenaCI
e8a716f8bb
v1.7.10 2022-11-07 15:59:42 +00:00
bulldozer-balena[bot]
a40e64f6cd
Merge pull request #3819 from balena-io/ab77/operational
Switch to Flowzone
2022-11-07 15:58:11 +00:00
ab77
2e53feb38c
Switch to Flowzone
Change-type: patch
2022-11-07 07:11:18 -08:00
Balena CI
5945ab1f50 v1.7.9 2022-04-22 16:47:29 +03:00
bulldozer-balena[bot]
59d67220d4
Merge pull request #3747 from balena-io/next-release
patch: deb afterinstall and readme updates
2022-04-22 13:45:50 +00:00
mcraa
61610ded84
patch: update allowed extensions to include deb afterinstall in build 2022-04-22 15:08:04 +02:00
Peter Makra
c87a132f40 patch: add update notification 2022-04-22 14:44:36 +02:00
Andrew Scheller
350d4de32b patch: fix usb-device-boot link in README
Change-type: patch
2022-03-31 17:46:08 +02:00
Ken Bannister
f5f9025d6d Fix application directory for Debian postinst script
Change-type: patch
Signed-off-by: Ken Bannister <kb2ma@runbox.com>
2022-03-31 17:45:10 +02:00
Balena CI
549d744d04 v1.7.8 2022-03-18 19:22:12 +02:00
bulldozer-balena[bot]
6194460dc2
Merge pull request #3723 from balena-io/v1.7.8-draft
small ui updates
2022-03-18 17:20:11 +00:00
Peter Makra
8370f638b4 patch: complete suse uninstall readme
Change-Type: patch
2022-03-11 00:40:20 +01:00
Peter Makra
ac34c51125 patch: completed suse instructions
Change-Type: patch
2022-03-11 00:33:29 +01:00
Peter Makra
b241470fe1 patch: order rpm instrictions
Change-Type: patch
2022-03-10 17:00:43 +01:00
Peter Makra
179697040c Merge branch 'v1.7.8-draft' of github.com:balena-io/etcher into v1.7.8-draft 2022-03-10 16:37:01 +01:00
Peter Makra
335766ed12 patch: enabled update notification for version 1.7.8
Change-Type: patch
2022-03-10 16:36:24 +01:00
Peter Makra
4c5d052a71 patch: updated title to balenaEtcher
fixes #3592

Change-Type: patch
2022-03-10 16:35:03 +01:00
Peter Makra
86423342a8 patch: cleanup and organize readme
Change-Type: patch
2022-03-10 16:27:38 +01:00
Peter Makra
d8b41552e3 patch: extend cloudsmith attribution in readme
Change-Type: patch
2022-03-10 16:08:43 +01:00
Logicer
11c65fb392 Update macOS Icon to Big Sur Style
Change-type: patch
2022-03-10 15:55:27 +01:00
Balena CI
bed126506f v1.7.7 2022-02-22 11:25:43 +02:00
bulldozer-balena[bot]
f6aeb52b16
Merge pull request #3711 from balena-io/fix-auto-update
patch: Fix auto update
2022-02-22 09:23:16 +00:00
Peter Makra
a5201942b8 patch: clarified update check 2022-02-22 09:50:34 +01:00
Peter Makra
c1f7164273 patch: autoupdate stagingPercentage check, include default
Change-Type: patch
2022-02-21 21:09:49 +01:00
Balena CI
6774bf784c v1.7.6 2022-02-21 18:00:46 +02:00
bulldozer-balena[bot]
56ec8b4eac
Merge pull request #3699 from balena-io/update-issue-template
patch: add requirements and help to issue template
2022-02-21 15:59:05 +00:00
Peter Makra
35868509af patch: version number notification 2022-02-21 15:21:58 +01:00
Peter Makra
3ab6749f49 Merge branch 'master' into update-issue-template 2022-02-21 14:33:16 +01:00
Balena CI
7a012a92bc v1.7.5 2022-02-21 15:19:52 +02:00
bulldozer-balena[bot]
aba01825a0
Merge pull request #3700 from flec/fix-basic-auth
patch: fix flashing from URL when using basic auth
2022-02-21 13:17:31 +00:00
Peter Makra
907a3308de updated branch with 1.7.4 2022-02-21 13:53:16 +01:00
Peter Makra
4366bb372f patch: fixed typos in template 2022-02-21 13:49:18 +01:00
Marco Füllemann
a6f6cd4a19 patch: fix flashing from URL when using basic auth 2022-02-21 13:36:40 +01:00
Balena CI
03ee428039 v1.7.4 2022-02-21 13:44:44 +02:00
bulldozer-balena[bot]
8d652d064d
Merge pull request #3704 from balena-io/update-electron-12.2.3
patch: updated electron to 12.2.3
2022-02-21 11:42:46 +00:00
Peter Makra
28adc34239 patch: set version update notification 1.7.3 2022-02-17 14:15:46 +01:00
Peter Makra
120e9bf42f Merge branch 'update-electron-12.2.3' of github.com:balena-io/etcher into update-electron-12.2.3 2022-02-17 13:47:02 +01:00
Peter Makra
59f54e194b patch: updated electron to 12.2.3
Change-Type: patch
2022-02-17 13:46:35 +01:00
Peter Makra
c4834e61a7 patch: updated electron to 12.2.3
Change-Type: patch
2022-02-17 13:37:17 +01:00
mcraa
e4d02bc561 patch: add requirements and help to issue template 2022-02-08 08:19:55 +00:00
mcraa
b9e54e39f7
patch: add requirements and help to issue template 2022-02-08 09:19:55 +01:00
Balena CI
f3c32eac65 v1.7.3 2021-12-29 17:09:42 +02:00
bulldozer-balena[bot]
9a303ab344
Merge pull request #3667 from balena-io/fix-message-of.null
patch: fix mesage of null
2021-12-29 15:06:59 +00:00
Peter Makra
9c1b55bebc patch: fix mesage of null
Change-Type: patch
2021-12-29 15:23:21 +01:00
Balena CI
30ae4bbd86 v1.7.2 2021-12-21 20:38:54 +02:00
bulldozer-balena[bot]
c6126a980a
Merge pull request #3661 from balena-io/fix-windows-open-from-web
patch: fixed open from browser on windows
2021-12-21 18:36:22 +00:00
Peter Makra
ef90d048ca patch: fixed open from browser on windows
Change-type: patch
Signed-off-by: Peter Makra <peter@balena.io>
2021-12-21 17:47:10 +01:00
Balena CI
b938132038 v1.7.1 2021-11-29 11:05:10 +02:00
bulldozer-balena[bot]
3cb2e78fe7
Merge pull request #3630 from balena-io/improve-webpack-build
patch: Improve webpack build time
2021-11-29 09:02:29 +00:00
Lorenzo Alberto Maria Ambrosi
ea9875ddf0 patch: Revert back to electron-rebuild
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-22 12:24:26 +01:00
Lorenzo Alberto Maria Ambrosi
65dacd2ff2 patch: Disallow TS in JS
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-16 20:08:11 +01:00
Lorenzo Alberto Maria Ambrosi
a190818827 patch: Remove esInterop TS flag
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-11 14:39:33 +01:00
Lorenzo Alberto Maria Ambrosi
98e33b619b patch: Use @balena/sudo-prompt
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-11 14:39:07 +01:00
Lorenzo Alberto Maria Ambrosi
685ed715ac patch: Update rpiboot guide link
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-11 11:47:11 +01:00
Lorenzo Alberto Maria Ambrosi
3cf3c4b398 patch: Improve webpack build time
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-11 10:45:00 +01:00
Balena CI
1c2ef4b1d4 v1.7.0 2021-11-09 18:09:26 +02:00
bulldozer-balena[bot]
d22fc91585
Merge pull request #3628 from balena-io/device-info-draft
Device info draft
2021-11-09 16:07:20 +00:00
Lorenzo Alberto Maria Ambrosi
0a28af5c35 patch: Add missing @types/react@16.8.5
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-09 14:10:18 +01:00
Lorenzo Alberto Maria Ambrosi
0c1e5b88ef patch: Use npm ci in Makefile
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-11-09 13:53:04 +01:00
Lorenzo Alberto Maria Ambrosi
790201be90 patch: Add draft info boxes for system information
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-27 10:41:56 +02:00
Lorenzo Alberto Maria Ambrosi
d8d379f05e patch: Remove electron-rebuild package
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-21 16:42:46 +02:00
Lorenzo Alberto Maria Ambrosi
b5e9701048 patch: Make electron a dev. dependency
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-21 16:40:37 +02:00
Lorenzo Alberto Maria Ambrosi
292f86d6f5 patch: Remove electron-rebuild package
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-21 16:40:15 +02:00
Lorenzo Alberto Maria Ambrosi
76ca9934c8 patch: Use exact modules versions
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-21 11:24:32 +02:00
Lorenzo Alberto Maria Ambrosi
37b826ee4e patch: Update etcher-sdk from v6.2.5 to v6.3.0
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-13 17:27:32 +02:00
JSReds
1e1bd3c508 Fix write step for Http file process
Change-type: patch
Signed-off-by: Andrea Rosci <andrear@balena.io>
2021-10-13 17:22:57 +02:00
Lorenzo Alberto Maria Ambrosi
00e8f11913 patch: Fix linting errors
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-13 17:21:48 +02:00
Lorenzo Alberto Maria Ambrosi
a3c24a26a0 minor: Refactor dependencies installation to avoid custom scripts
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-10-13 17:16:11 +02:00
Lorenzo Alberto Maria Ambrosi
4232928ad8 patch: Fix LEDs init error
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-09-30 13:05:47 +02:00
Balena CI
b165fb78da v1.6.0 2021-09-24 20:12:18 +03:00
bulldozer-balena[bot]
e9f6c5ead9
Merge pull request #3599 from balena-io/led-color-settings
Led color settings
2021-09-24 17:10:00 +00:00
Marco Füllemann
b2d0c1c9dd add support for basic auth when downloading images from URL
When selecting "Flash from URL" the user can optionally provide a username and password for basic authentication. The authentication input fields are collapsed by default. When the authentication input fields are collapsed after entering values the values are cleared to ensure that the user sees all parameter passed to the server.

Change-Type: minor
Changelog-Entry: Add support for basic auth when downloading images from URL.
2021-09-17 11:16:29 +02:00
Lorenzo Alberto Maria Ambrosi
14d91400a4 patch: Update etcher-sdk from v6.2.1 to v6.2.5
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-09-17 11:11:36 +02:00
David Gaspar
d0114aece7 Update Makefile to Apple M1 info
Expanding host architecture detection.

Change-type: patch
2021-09-07 16:56:10 +02:00
Lorenzo Alberto Maria Ambrosi
dff2df4aab Add LED settings for potentially different hardware
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-09-07 15:20:56 +02:00
Balena CI
13159f93ee v1.5.122 2021-09-02 17:48:21 +03:00
bulldozer-balena[bot]
3ece1fd841
Merge pull request #3590 from balena-io/various-fixes
Various fixes
2021-09-02 14:46:26 +00:00
Lorenzo Alberto Maria Ambrosi
f46963b6b3 Restore image file selection LED-drive pathing
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-09-02 14:16:18 +02:00
Lorenzo Alberto Maria Ambrosi
b97f4e0031 Update scripts submodule
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-08-31 16:40:48 +02:00
Lorenzo Alberto Maria Ambrosi
e2d233d74b Change LEDs colours
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-08-26 20:15:49 +02:00
Lorenzo Alberto Maria Ambrosi
a7ca2e527b Restore windows images warning
Change-type: patch
Changelog-entry: Windows images now show the proper warning again
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-08-26 20:15:48 +02:00
Mohamed Salah
396a053c0a Fix Update and install with DNF instructions
Change-type: patch
2021-08-26 20:15:48 +02:00
JSReds
d1a3f1cb88 Add possibile authorization as a query param
Change-type: patch
Signed-off-by: Andrea Rosci <andrear@balena.io>
2021-08-26 20:15:48 +02:00
Xtraim
9f96558cdd update the windows part
I choose to add this part because, after the clean the usb stick
could stay in a raw state without creating the new partions,
activating and formatting.
Thanks

Change-type: patch
2021-08-20 08:31:49 +02:00
thambu1710
b3bc589d70 Update SUPPORT.md
Change-type: patch
2021-08-20 08:31:45 +02:00
Seth Falco
18d2c28110 replace make webpack with npm run webpack
Change-type: patch
2021-08-20 08:31:38 +02:00
JSReds
b272ef296d Add loader on image select
Change-type: patch
Signed-off-by: Andrea Rosci <andrear@balena.io>
2021-08-20 08:31:27 +02:00
Zane Hitchcox
32ca28a3a9 add pnp-webpack-plugin
Change-type: patch
2021-08-20 08:31:15 +02:00
Lorenzo Alberto Maria Ambrosi
4d5e5a3b0b Remove redundant codespell dependency/tests
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-08-20 08:28:48 +02:00
Balena CI
8b3f37102d v1.5.121 2021-07-14 19:55:16 +03:00
bulldozer-balena[bot]
4b74253631
Merge pull request #3489 from balena-io/direct-select-drive
patch: Select drive on list interaction rather than modal closing
2021-07-14 16:52:42 +00:00
Vipul Gupta
a81b552b95 patch: Delete Codeowners 2021-07-02 13:59:11 +02:00
Lorenzo Alberto Maria Ambrosi
53f53c0f75 Add source maps for devtools
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-05-25 17:28:17 +02:00
Lorenzo Alberto Maria Ambrosi
fdaf5c69d6 Clone submodules when initializing modules
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-05-24 14:52:22 +02:00
Lorenzo Alberto Maria Ambrosi
061afca5d3 patch: Select drive on list interaction rather than modal closing
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-05-24 14:52:22 +02:00
Balena CI
ccb08a48f1 v1.5.120 2021-05-11 19:56:49 +03:00
bulldozer-balena[bot]
a8f3d45b12
Merge pull request #3514 from balena-io/add-cloudsmith-reference
Update README to reference Cloudsmith
2021-05-11 16:49:15 +00:00
Lorenzo Alberto Maria Ambrosi
7e333caaf9 Update README to reference Cloudsmith
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-05-11 17:59:17 +02:00
Balena CI
70229e8684 v1.5.119 2021-05-01 11:45:32 +03:00
bulldozer-balena[bot]
261700389b
Merge pull request #3500 from balena-io/new-deb-rpm-ppa
Update readme for new PPA provider
2021-05-01 08:43:36 +00:00
Lorenzo Alberto Maria Ambrosi
250aed2eb1 Update readme for new PPA provider
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2021-04-30 23:30:08 +02:00
Balena CI
ed1f008fe2 v1.5.118 2021-04-29 11:47:01 +03:00
bulldozer-balena[bot]
e9ce270dab
Merge pull request #3495 from balena-io/etcher-dev-server
Etcher dev server
2021-04-29 08:45:03 +00:00
Zane Hitchcox
1ee110bc95 patch: development environment
Add webpack dev server and hot module reloading to get live changes and reloads without reloading the whole electron app.

This patch also runs the development environment in development mode, which is much, much faster on builds and rebuilds.
2021-04-26 21:17:32 -04:00
Zane Hitchcox
33dd07c675 patch: watch files for electron 2021-04-20 22:30:05 -04:00
Balena CI
39ccbbeeda v1.5.117 2021-04-06 14:44:31 +03:00
bulldozer-balena[bot]
55d2400ac7
Merge pull request #3432 from balena-io/electron-11
Electron 11
2021-04-06 11:42:19 +00:00
Alexis Svinartchouk
0bdea5c54c Rename mac releases (keep old naming)
Change-type: patch
2021-04-02 15:52:33 +02:00
Alexis Svinartchouk
3be372d49f Disable spectron tests on macOS
Change-type: patch
2021-04-01 15:48:39 +02:00
Alexis Svinartchouk
d0c66b2c48 Update electron to v12.0.2
Change-type: patch
2021-04-01 12:13:34 +02:00
Alexis Svinartchouk
65082c4790 Update etcher-sdk from 6.1.1 to 6.2.1
Update etcher-sdk from 6.1.1 to 6.2.1

Change-type: patch
2021-03-29 14:11:44 +02:00
Alexis Svinartchouk
e87ed9beed Fix getAppPath() returning an asar file on macOS
Change-type: patch
2021-03-23 17:53:54 +01:00
Andrew Scheller
bc5563d9c2 Grammar fix
"flash directly" sounds odd

Change-type: patch
2021-03-23 14:32:30 +01:00
vlad doster
ad83ab5dcc (docs) update README.md
- fix spelling
- emphasize notes
- add link
- fix macOS to account for new homebrew API

Change-type: patch
2021-03-23 12:00:40 +01:00
Andrew Scheller
0dc1cf9701 Update copyright year in electron-builder.yml
Change-type: patch
2021-03-23 11:55:43 +01:00
Andrew Scheller
11489c6538 Update copyright year in .resinci.json
Change-type: patch
2021-03-23 11:55:29 +01:00
Dugan Chen
2619d4bc86 Separate the Yum and DNF instructions.
Change-type: patch
2021-03-23 11:55:04 +01:00
Alexis Svinartchouk
3730efd350 Set msvs_version to 2019 when rebuilding
Change-type: patch
2021-03-22 17:23:43 +01:00
Alexis Svinartchouk
6ece32c546 Use moduleIds: 'natural' in webpack config to keep js files in arm64 and x64 mac builds identical
Change-type: patch
2021-03-22 15:38:57 +01:00
Alexis Svinartchouk
fd9996a3cc Update electron-builder to 22.10.5
Change-type: patch
2021-03-22 15:38:57 +01:00
Alexis Svinartchouk
f06cc89152 Update spectron to v13
Change-type: patch
2021-03-22 15:38:57 +01:00
Alexis Svinartchouk
c1d7ab3fa9 Update dependencies, use aws4-axios@2.2.1 to avoid adding more dependiencies
Also filter out dmg-license dependencies from the shrinkwrap file
aws4-axios@2.3.0 brings in react-native, see aws/aws-sdk-js-v3#1797

Change-type: patch
2021-03-22 15:38:57 +01:00
Alexis Svinartchouk
b206483c7c Update scripts to build universal mac dmgs on the ci
Change-type: patch
2021-03-22 15:38:57 +01:00
Alexis Svinartchouk
c3eb8c7b56 Fix beforeBuild.js script to also work on mac
Change-type: patch
2021-03-15 19:26:49 +01:00
Alexis Svinartchouk
0849d4f435 Support building universal dmgs (x64 and arm64) for mac
Change-type: patch
2021-03-15 19:26:49 +01:00
Alexis Svinartchouk
1dba3ae19b Update electron-builder to 22.10.4
Change-type: patch
2021-02-16 15:49:18 +01:00
Alexis Svinartchouk
f33f2e3771 Fix titlebar z-index
Change-type: patch
2021-02-16 15:49:18 +01:00
Alexis Svinartchouk
e56aaed973 Explicitly set contextIsolation to false
Change-type: patch
2021-02-16 15:49:12 +01:00
Alexis Svinartchouk
a4659f038e Update electron from 9.4.1 to 11.2.3
Change-type: patch
2021-02-10 17:51:56 +01:00
Alexis Svinartchouk
cd462818da Update etcher-sdk from 6.1.0 to 6.1.1
Update etcher-sdk from 6.1.0 to 6.1.1

Change-type: patch
2021-02-10 17:50:47 +01:00
Balena CI
37769efbed v1.5.116 2021-02-03 17:56:40 +02:00
bulldozer-balena[bot]
0f70c4bbce
Merge pull request #3414 from balena-io/116
116
2021-02-03 15:54:29 +00:00
Alexis Svinartchouk
48b5e8b9d9 Only cleanup temporary decompressed files in child-writer
Change-type: patch
2021-02-03 14:55:16 +01:00
Alexis Svinartchouk
1f138f0ecc Add .versionbot/CHANGELOG.yml
Change-type: patch
2021-02-03 14:55:16 +01:00
Alexis Svinartchouk
73f67e99ca Stop using node-tmp, use withTmpFile from etcher-sdk instead
Change-type: patch
2021-02-03 14:55:16 +01:00
Alexis Svinartchouk
9114da2445 Update etcher-sdk from 5.2.2 to 6.1.0
Update etcher-sdk from 5.2.2 to 6.1.0

Change-type: patch
2021-02-03 14:55:16 +01:00
Alexis Svinartchouk
554bbcc780 Revert "Change some border colors to have higher contrast"
This reverts commit 8c4edaabba832a5771caea69356e4d565a2c2e13.

Change-type: patch
2021-02-01 19:44:37 +01:00
Alexis Svinartchouk
4db2289cfd Update electron to v9.4.1
Change-type: patch
2021-02-01 19:44:37 +01:00
Alexis Svinartchouk
c15b56bc23 Update etcher-sdk from 5.2.1 to 5.2.2
Update etcher-sdk from 5.2.1 to 5.2.2

Change-type: patch
2021-01-19 18:44:19 +01:00
Balena CI
9f52dda6ae v1.5.115 2021-01-18 14:09:10 +02:00
bulldozer-balena[bot]
fadcefb11a
Merge pull request #3413 from balena-io/115
Update etcher-sdk from 5.1.12 to 5.2.1
2021-01-18 12:07:11 +00:00
Alexis Svinartchouk
361c32913c Update etcher-sdk from 5.1.12 to 5.2.1
Update etcher-sdk from 5.1.12 to 5.2.1

Change-type: patch
2021-01-18 10:46:59 +01:00
Balena CI
5c2042198e v1.5.114 2021-01-15 14:30:49 +02:00
bulldozer-balena[bot]
99df53098c
Merge pull request #3394 from balena-io/114
114
2021-01-15 12:28:31 +00:00
Alexis Svinartchouk
aa563c87bd Remove libappindicator1 debian dependency
Changelog-entry: Remove libappindicator1 debian dependency
Change-type: patch
2021-01-12 15:22:43 +01:00
Alexis Svinartchouk
1188888956 Update etcher-sdk from 5.1.11 to 5.1.12
Update etcher-sdk from 5.1.11 to 5.1.12

Change-type: patch
2021-01-12 15:22:43 +01:00
Alexis Svinartchouk
f9d7991dc8 Update rendition from 18.8.3 to 19.2.0
Update rendition from 18.8.3 to 19.2.0

Change-type: patch
2021-01-12 15:22:42 +01:00
Alexis Svinartchouk
53954e81fd Update dependencies
Change-type: patch
2021-01-12 15:22:42 +01:00
Alexis Svinartchouk
f82996bfd1 Update @balena/lint to 5.3.0
Change-type: patch
2021-01-12 15:22:42 +01:00
Alexis Svinartchouk
b74069eb41 Update webpack to v5
Changelog-entry: Update webpack to v5
Change-type: patch
2021-01-12 15:22:42 +01:00
Alexis Svinartchouk
e8c7591751 Fix typo in webpack.config.ts comment
Change-type: patch
2021-01-12 15:22:42 +01:00
Aaron Shaw
3521b61a81 docs: fix quote marks
Fix quote mark styling

Change-type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
2021-01-12 15:22:42 +01:00
Alexis Svinartchouk
93db90c725 Disable screensaver while flashing (on balena-electron-env)
Change-type: patch
2021-01-12 15:22:42 +01:00
Balena CI
1dc56aed14 v1.5.113 2020-12-17 16:23:23 +02:00
bulldozer-balena[bot]
d814202424
Merge pull request #3377 from balena-io/113
113
2020-12-17 14:20:57 +00:00
Alexis Svinartchouk
c54856a616 Only store the first error for each target
Changelog-entry: Show the first error for each drive (not the last)
Change-type: patch
2020-12-16 12:33:17 +01:00
Alexis Svinartchouk
fc45df270a Fix red leds not showing for failed devices
Change-type: patch
2020-12-14 18:59:40 +01:00
Aaron Shaw
3cde2faed0 docs: add documentation links
add documentation and faq links

Change-Type: patch
Closes: https://github.com/balena-io/etcher/issues/3191
Signed-off-by: Aaron Shaw <aaron@balena.io>
2020-12-14 18:59:40 +01:00
Aaron Shaw
b4b8c89aad docs: update macOS version
Update macOS version as latest version of Electron is 10.10 compatible only (Yosemite)

Change-Type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
2020-12-14 18:59:40 +01:00
Alexis Svinartchouk
36d05724c0 Improve hover message when the drive is too small
Changelog-entry: Improve hover message when the drive is too small
Change-type: patch
2020-12-14 18:59:40 +01:00
Alexis Svinartchouk
b1e4e681d1 Update electron to v9.4.0
Changelog-entry: Update electron to v9.4.0
Change-type: patch
2020-12-14 18:59:40 +01:00
Giovanni Garufi
3987078c11 Update npm to v6.14.8
Change-type: patch
2020-12-11 17:51:50 +01:00
Alexis Svinartchouk
de0010eb72 Update rgb leds colors
Change-type: patch
2020-12-10 17:18:54 +01:00
Alexis Svinartchouk
1f94f44b18 Remove unmountOnSuccess setting
Changelog-entry: Remove unmountOnSuccess setting
Change-type: patch
2020-12-10 15:36:19 +01:00
Alexis Svinartchouk
fe0b45cae6 Only show auto-updates setting on supported targets
Change-type: patch
2020-12-10 15:35:37 +01:00
Alexis Svinartchouk
c32e485f27 Remove dead code in settings modal
Change-type: patch
2020-12-10 14:05:08 +01:00
Alexis Svinartchouk
409b78fc21 Fix effective flashing speed calculation for compressed images
Changelog-entry: Fix effective flashing speed calculation for compressed images
Change-type: patch
2020-12-08 17:14:49 +01:00
bulldozer-balena[bot]
2f08142f5a
Merge pull request #3379 from balena-io/high-contrast-lines
Change some border colors to have higher contrast
2020-12-08 13:54:20 +00:00
Lorenzo Alberto Maria Ambrosi
8c4edaabba Change some border colors to have higher contrast
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-12-08 14:37:24 +01:00
Alexis Svinartchouk
05497ce85c Update etcher-sdk from 5.1.10 to 5.1.11
Update etcher-sdk from 5.1.10 to 5.1.11

Changelog-entry: Update etcher-sdk from 5.1.10 to 5.1.11
Change-type: patch
2020-12-07 19:31:41 +01:00
Alexis Svinartchouk
d3df2fe57e Update sys-class-rgb-led from 2.1.1 to 3.0.0
Update sys-class-rgb-led from 2.1.1 to 3.0.0

Changelog-entry: Update sys-class-rgb-led from 2.1.1 to 3.0.0
Change-type: patch
2020-12-04 14:11:51 +01:00
Balena CI
a0f07082f2 v1.5.112 2020-12-03 17:19:22 +02:00
bulldozer-balena[bot]
b7efa8e1f0
Merge pull request #3362 from balena-io/112
112
2020-12-03 15:17:28 +00:00
Alexis Svinartchouk
3647457bb5 Add rendition and sys-class-rgb-led to repo.yml
Change-type: patch
2020-12-02 20:23:04 +01:00
Alexis Svinartchouk
2e5a39dcd8 Update sys-class-rgb-led from 2.1.0 to 2.1.1
Update sys-class-rgb-led from 2.1.0 to 2.1.1

Changelog-entry: Update sys-class-rgb-led from 2.1.0 to 2.1.1
Change-type: patch
2020-12-02 20:23:04 +01:00
Alexis Svinartchouk
edabacfb3a Fix spectron test to work on Windows in all cases
Change-type: none
2020-12-02 20:23:04 +01:00
Alexis Svinartchouk
f46176fd10 Fix layout when the featured project is not showing
Changelog-entry: Fix layout when the featured project is not showing
Change-type: patch
2020-12-02 20:23:04 +01:00
Alexis Svinartchouk
2158e20380 Improve flashing error handling
Changelog-entry: Improve flashing error handling
Change-type: patch
2020-12-02 20:23:04 +01:00
Alexis Svinartchouk
fa593e33d1 Update repo.yml to enable nested changelogs
Change-type: none
2020-12-02 19:27:48 +01:00
Alexis Svinartchouk
50730bd3df Fix imports in child-writer.ts
Change-type: none
2020-12-02 19:27:48 +01:00
Alexis Svinartchouk
4e68955981 Target commit instead of branch name for sudo-prompt
Change-type: none
2020-12-02 19:27:48 +01:00
Alexis Svinartchouk
3c0084d012 Fix modal content height on Windows
Change-type: patch
2020-12-02 19:27:48 +01:00
Alexis Svinartchouk
8bd11a01ae Update etcher-sdk from 5.1.5 to 5.1.10
Update etcher-sdk from 5.1.5 to 5.1.10

Changelog-entry: Update etcher-sdk from 5.1.5 to 5.1.10
Change-type: patch
2020-12-02 19:27:48 +01:00
Alexis Svinartchouk
da3a22d0f6 Set useContentSize to true so the size is the same on all platforms
Changelog-entry: Set useContentSize to true so the size is the same on all platforms
Change-type: patch
2020-11-24 17:10:17 +01:00
Balena CI
e708212d41 v1.5.111 2020-11-23 19:54:50 +02:00
bulldozer-balena[bot]
a5ceba8435
Merge pull request #3345 from balena-io/111
111
2020-11-23 17:52:38 +00:00
Alexis Svinartchouk
446e8e1253 Update bl
Change-type: patch
2020-11-20 20:10:35 +01:00
Alexis Svinartchouk
c69b2fa053 Warn when the source drive has no partition table
Changelog-entry: Warn when the source drive has no partition table
Change-type: patch
2020-11-20 15:29:03 +01:00
Alexis Svinartchouk
0597c0e908 Update etcher-sdk to 5.1.5
Change-type: patch
2020-11-20 14:49:41 +01:00
Alexis Svinartchouk
af2b6bc8ca Update typescript to 4.1.2
Change-type: patch
2020-11-20 14:45:44 +01:00
Alexis Svinartchouk
a2c7a542df Use a different icon when no source drive is available
Changelog-entry: Use a different icon when no source drive is available
Change-type: patch
2020-11-20 14:45:18 +01:00
Alexis Svinartchouk
e37ae2743f Update etcher-sdk to 5.1.3
Change-type: patch
2020-11-17 11:33:36 +01:00
Alexis Svinartchouk
644d955f08 Prevent opening more than one file selector
Change-type: patch
2020-11-16 16:14:36 +01:00
Alexis Svinartchouk
e7b4f09021 Allow selecting a locked SD card as the source drive
Changelog-entry: Allow selecting a locked SD card as the source drive
Change-type: patch
2020-11-16 14:16:38 +01:00
Alexis Svinartchouk
1e0a6a3129 Removed disableExplicitDriveSelection setting, use autoSelectAllDrives instead
Change-type: patch
2020-11-13 20:23:07 +01:00
Alexis Svinartchouk
ef3b8915d8 Update etcher-sdk to 5.1.2
Change-type: patch
2020-11-13 18:30:26 +01:00
Alexis Svinartchouk
e58cfd89c5 Add successBannerURL setting
Change-type: patch
2020-11-11 13:31:04 +01:00
Alexis Svinartchouk
1c52379ee3 Add drivesOrder setting
Change-type: patch
2020-11-11 13:30:54 +01:00
Alexis Svinartchouk
e2c2b40690 Remove "Validate write on success" setting
Validation is always enabled, press the "skip" button to skip it.

Changelog-entry: Remove "Validate write on success" setting. Validation is always enabled, press the "skip" button to skip it.
Change-type: patch
2020-11-11 13:30:26 +01:00
Alexis Svinartchouk
bddb89e4a1 Update electron to v9.3.3
Changelog-entry: Update electron to v9.3.3
Change-type: patch
2020-11-11 13:30:18 +01:00
Alexis Svinartchouk
560ed91e2e Update etcher-sdk to 5.1.1, use WASM ext2fs module
Changelog-entry: Update etcher-sdk to 5.1.1, use WASM ext2fs module
Change-type: patch
2020-11-11 13:29:44 +01:00
Balena CI
1f8f7ad7f8 v1.5.110 2020-11-05 13:56:29 +02:00
bulldozer-balena[bot]
a2a0f2ef41
Merge pull request #3325 from balena-io/new-success-screen-2
New success screen 2
2020-11-05 11:54:37 +00:00
Lorenzo Alberto Maria Ambrosi
40e5fb2287 Add primary colors to default flow
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-04 14:01:56 +01:00
Lorenzo Alberto Maria Ambrosi
6c49c71b3f Remove console.log in tests
Change-type: patch
Changelog-entry: Remove console.log in tests
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:51 +01:00
Lorenzo Alberto Maria Ambrosi
deb3db0fff Add more typings & refactor code accordingly
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:51 +01:00
Lorenzo Alberto Maria Ambrosi
4872fa3d6e Fix URL not being selected with custom protocol
Change-type: patch
Changelog-entry: Fix URL not being selected with custom protocol
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:51 +01:00
Lorenzo Alberto Maria Ambrosi
640a7409ee Add dash on table when selecting only some rows
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:51 +01:00
Lorenzo Alberto Maria Ambrosi
a7637ad8d4 Fix settings spacing
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:51 +01:00
Lorenzo Alberto Maria Ambrosi
31409c61ca Use drive-selector's table for flash errors table
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:02:46 +01:00
Lorenzo Alberto Maria Ambrosi
e74dc9eb60 Update rendition to v18.8.3
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:01:11 +01:00
Lorenzo Alberto Maria Ambrosi
06997fdf29 Fix zoomFactor in webviews
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:01:11 +01:00
Lorenzo Alberto Maria Ambrosi
611e659626 Add retry button to the errors modal in success screen
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-11-03 15:01:07 +01:00
Lorenzo Alberto Maria Ambrosi
e484ae9837 Cleanup after child-process is terminated
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-10-22 14:08:44 +02:00
Lorenzo Alberto Maria Ambrosi
7e7ca9524e Add skip function to validation
Change-type: patch
Changelog-entry: Add skip function to validation
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-10-22 14:08:44 +02:00
Lorenzo Alberto Maria Ambrosi
db09b7440d Rework success screen
Change-type: patch
Changelog-entry: Rework success screen
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-10-22 14:07:20 +02:00
Balena CI
e9603505d2 v1.5.109 2020-09-14 19:27:56 +03:00
bulldozer-balena[bot]
0f45f6aca1
Merge pull request #3297 from balena-io/use-sudo-prompt-fork
Workaround elevation bug on Windows when the username contains an ampersand
2020-09-14 16:25:48 +00:00
Alexis Svinartchouk
0a28a7794d Update ext2fs to v2.0.5
Change-type: patch
2020-09-14 16:08:44 +02:00
Alexis Svinartchouk
7c2644ec51 Workaround elevation bug on Windows when the username contains an ampersand
Changelog-entry: Workaround elevation bug on Windows when the username contains an ampersand
Change-type: patch
2020-09-11 14:40:19 +02:00
Balena CI
ae62812c61 v1.5.108 2020-09-10 20:33:45 +03:00
bulldozer-balena[bot]
68e24df52b
Merge pull request #3295 from balena-io/fix-launch-when-path-has-special-characters
Fix content not loading when the app path contains special characters
2020-09-10 17:31:35 +00:00
Alexis Svinartchouk
b9076d01af Fix content not loading when the app path contains special characters
Changelog-entry: Fix content not loading when the app path contains special characters
Change-type: patch
2020-09-09 17:06:04 +02:00
Balena CI
78a5339e3e v1.5.107 2020-09-07 12:50:26 +03:00
bulldozer-balena[bot]
b099770cb1
Merge pull request #3273 from balena-io/add-clone-drive
Add clone drive
2020-09-07 09:48:16 +00:00
Lorenzo Alberto Maria Ambrosi
b76366a514 Add more typings & refactor code accordingly
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-04 11:24:10 +02:00
Lorenzo Alberto Maria Ambrosi
eeab351636
Fix tests hanging on array.flatMap
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-02 19:00:07 +02:00
Alexis Svinartchouk
3e45691d0b Re-enable ext partitions trimming on 32 bit Windows
Changelog-entry: Re-enable ext partitions trimming on 32 bit Windows
Change-type: patch
2020-09-02 17:42:52 +02:00
Lorenzo Alberto Maria Ambrosi
f9d79521a1 Fix tests not running
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-02 17:41:33 +02:00
Lorenzo Alberto Maria Ambrosi
14a89b3b8a Remove lodash from selection-state.ts
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-02 17:41:33 +02:00
Lorenzo Alberto Maria Ambrosi
8fa6e618c4 Use pretty-bytes instead of custom function
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-02 17:41:31 +02:00
Lorenzo Alberto Maria Ambrosi
093008dee7 Rework system & large drives handling logic
Change-type: patch
Changelog-entry: Rework system & large drives handling logic
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-09-02 17:41:09 +02:00
Lorenzo Alberto Maria Ambrosi
42838eba09 Override cached window's zoomFactor
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-08-31 15:13:42 +02:00
Lorenzo Alberto Maria Ambrosi
aa72c5d3bb Ignore vscode workspace folder
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-08-31 15:13:42 +02:00
Lorenzo Alberto Maria Ambrosi
bb04098062 Reword macOS Catalina askpass message
Change-type: patch
Changelog-entry: Reword macOS Catalina askpass message
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-08-31 15:13:41 +02:00
Lorenzo Alberto Maria Ambrosi
dda022df37 Add clone-drive workflow
Change-type: patch
Changelog-entry: Add clone-drive workflow
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-08-31 15:13:41 +02:00
Lorenzo Alberto Maria Ambrosi
377dfb8e22 Split drive selector from target selector
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-08-31 15:13:41 +02:00
Balena CI
07befd0bd1 v1.5.106 2020-08-27 19:18:47 +03:00
bulldozer-balena[bot]
2635a410df
Merge pull request #3286 from balena-io/106
106
2020-08-27 16:16:30 +00:00
Alexis Svinartchouk
5e5f82c4b5 Update etcher-sdk to 4.1.29
Changelog-entry: Disable ext partitions trimming on 32 bit windows until it is fixed
Change-type: patch
2020-08-27 15:21:03 +02:00
Alexis Svinartchouk
991cbf6b7f Update etcher-sdk to 4.1.28
Change-type: patch
2020-08-27 12:35:52 +02:00
Alexis Svinartchouk
688d697a99 Update typescript to ^4
Change-type: patch
2020-08-27 12:35:48 +02:00
Alexis Svinartchouk
7894a67719 Fix opening zip files from servers accepting Range headers
Changelog-entry: Fix opening zip files from servers accepting Range headers
Change-type: patch
2020-08-26 18:58:12 +02:00
Balena CI
7a7ea74984 v1.5.105 2020-08-26 14:13:18 +03:00
bulldozer-balena[bot]
12cd8a39c1
Merge pull request #3284 from balena-io/105
105
2020-08-26 11:11:16 +00:00
Alexis Svinartchouk
2c07538f8f Simplify MainPage
Change-type: patch
2020-08-26 00:36:38 +02:00
Alexis Svinartchouk
c9bfd350ed Remove unused FlashStep.props.isWebviewShowing
Change-type: patch
2020-08-26 00:36:38 +02:00
Alexis Svinartchouk
a485d2b4df Remove FeaturedProject class, replace with SafeWebview
Change-type: patch
2020-08-26 00:36:38 +02:00
Alexis Svinartchouk
8ed5ff25a5 Remove unused FeaturedProject.state.show
Change-type: patch
2020-08-26 00:36:38 +02:00
Alexis Svinartchouk
a17a919c37 Remove unused SafeWebvuew.refreshNow property
Change-type: patch
2020-08-26 00:36:33 +02:00
Alexis Svinartchouk
55cafb9268 Update etcher-sdk to 4.1.26
Changelog-entry: Update etcher-sdk to 4.1.26
Change-type: patch
2020-08-26 00:36:32 +02:00
Alexis Svinartchouk
92dfdc6edd URL selector cancel button cancels ongoing url selection
Changelog-entry: URL selector cancel button cancels ongoing url selection
Change-type: patch
2020-08-26 00:36:32 +02:00
Alexis Svinartchouk
fff9452509 Spinner for URL selector modal
Changelog-entry: Spinner for URL selector modal
Change-type: patch
2020-08-26 00:36:32 +02:00
Alexis Svinartchouk
27e560c961 Update rendition to ^18.4.1
Change-type: patch
2020-08-26 00:36:32 +02:00
Alexis Svinartchouk
34489f0d66 Update etcher-sdk to 4.1.25
Change-type: patch
2020-08-26 00:36:32 +02:00
Alexis Svinartchouk
b7f8c8368c Fix settings button not being clickable
Change-type: patch
2020-08-26 00:36:32 +02:00
Balena CI
f383f0be6c v1.5.104 2020-08-21 16:01:18 +03:00
bulldozer-balena[bot]
ff08cb44f9
Merge pull request #3281 from balena-io/104
Fix saving settings, update electron
2020-08-21 12:59:24 +00:00
Alexis Svinartchouk
6cb914e969 Update etcher-sdk to v4.1.24
Chanelog-entry: Update etcher-sdk to v4.1.24
Change-type: patch
2020-08-20 20:54:20 +02:00
Alexis Svinartchouk
a24be20e95 Fix writing config file
Changelog-entry: Fix writing config file
Change-type: patch
2020-08-20 17:27:24 +02:00
Alexis Svinartchouk
08716efbd5 Update rendition to 18.1.0
Change-type: patch
2020-08-20 16:40:19 +02:00
Alexis Svinartchouk
24c8ede746 Remove unused part of Makefile
Change-type: patch
2020-08-20 12:45:59 +02:00
Alexis Svinartchouk
548475996c Remove duplicated styled-system
Change-type: patch
2020-08-20 12:24:09 +02:00
Alexis Svinartchouk
7f9add3f1e Remove no longer used nan
Change-type: patch
2020-08-20 11:53:13 +02:00
Alexis Svinartchouk
6eab47259e Remove no longer used @types/request
Change-type: patch
2020-08-20 11:42:04 +02:00
Alexis Svinartchouk
46663e3a6f Remove no longer used @types/bluebird
Change-type: patch
2020-08-20 11:40:37 +02:00
Alexis Svinartchouk
9797a2152d Update electron to v9.2.1
Changelog-entry: Update electron to v9.2.1
Change-type: patch
2020-08-20 11:37:14 +02:00
Alexis Svinartchouk
a7c3431556 Remove unused error message
Change-type: patch
2020-08-20 11:35:55 +02:00
Balena CI
fef9cd7bec v1.5.103 2020-08-19 14:57:18 +03:00
bulldozer-balena[bot]
b2c4f7a250
Merge pull request #3270 from balena-io/remove-bluebird
Remove bluebird
2020-08-19 11:55:07 +00:00
Alexis Svinartchouk
88ae9fcbd1 Update dependencies
Change-type: patch
2020-08-18 20:02:07 +02:00
Alexis Svinartchouk
bc092114c1 Don't use more than a 8th of the system memory as buffers
Change-type: patch
2020-08-18 17:14:23 +02:00
Alexis Svinartchouk
9f29dc8b76 Update rendition to ^17
Changelog-entry: Update rendition  to ^17
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
5fbaa3a3db Update @balena/udif, don't bundle htmlparser2 into the writer
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
0c59168ceb Change isFocused check to isVisible in tests
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
540fe90609 Fix running tests on Windows
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
1f44f3944f Update electron to 9.2.0
Changelog-entry: Update electron to 9.2.0
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
fbacb8187d Update etcher-sdk to ^4.1.23
Changelog-entry: Update etcher-sdk to ^4.1.23
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
ac2d4ae8f3 Move linting and testing into package.json
Changelog-entry: Move linting and testing into package.json
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
a3322e9fd7 Set module: es2015 in tsconfig.json
Changelog-entry: Set module: es2015 in tsconfig.json
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
281f119456 Replace native elevator with sudo-prompt on windows
Changelog-entry: Replace native elevator with sudo-prompt on windows
Change-type: patch
2020-08-18 14:05:18 +02:00
Alexis Svinartchouk
140f3452ed Don't import WeakMap polyfill in deep-map-keys
Changelog-entry: Don't import WeakMap polyfill in deep-map-keys
Change-type: patch
2020-08-06 16:19:34 +02:00
Alexis Svinartchouk
481be42eb5 Update etcher-sdk to ^4.1.22
Change-type: patch
2020-08-06 16:19:32 +02:00
Alexis Svinartchouk
f2a37079eb Don't use lodash in child-writer.js
Changelog-entry: Don't use lodash in child-writer.js
Change-type: patch
2020-08-06 15:40:42 +02:00
Alexis Svinartchouk
76fa698995 Optimize svgs
Changelog-entry: Optimize svgs
Change-type: patch
2020-08-06 15:40:42 +02:00
Alexis Svinartchouk
f8e21e2338 User regular stream in lzma-native instead of readable-stream
Changelog-entry: User regular stream in lzma-native instead of readable-stream
Change-type: patch
2020-08-06 15:40:42 +02:00
Alexis Svinartchouk
482c29bc2a Update dependencies
Change-type: patch
2020-08-06 15:40:42 +02:00
Alexis Svinartchouk
0bf1ec4958 Remove Bluebird
Changelog-entry: Remove Bluebird
Change-type: patch
2020-08-06 15:40:42 +02:00
Alexis Svinartchouk
3b105d5a6a Update etcher-sdk to ^4.1.20
Change-type: patch
2020-08-06 15:40:39 +02:00
Balena CI
6d9c81da43 v1.5.102 2020-07-27 18:57:16 +03:00
bulldozer-balena[bot]
c2e23855b3
Merge pull request #3247 from balena-io/lighter
Lighter
2020-07-27 15:55:14 +00:00
Alexis Svinartchouk
3f59d35fb6 Update etcher-sdk to ^4.1.19
Changelog-entry: Fix flashing truncated images, fix flashing large dmgs
Change-type: patch
2020-07-27 13:11:27 +02:00
Alexis Svinartchouk
44c74f33d9 Electron 9.1.1
Changelog-entry: Electron 9.1.1
Change-type: patch
2020-07-27 13:11:27 +02:00
Alexis Svinartchouk
512785e0a9 Remove bluebird from main process, reduce lodash usage
Changelog-entry: Remove bluebird from main process, reduce lodash usage
Change-type: patch
2020-07-20 11:11:41 +02:00
Alexis Svinartchouk
963fc574c3 Centralize imports in child-writer
Changelog-entry: Centralize imports in child-writer
Change-type: patch
2020-07-16 18:52:37 +02:00
Alexis Svinartchouk
3218fc2c83 Split main process and child-writer js files
Changelog-entry: Split main process and child-writer js files
Change-type: patch
2020-07-16 18:52:28 +02:00
Alexis Svinartchouk
dc9351713c Stop using request, replace it with already used axios
Changelog-entry: Stop using request, replace it with already used axios
Change-type: patch
2020-07-16 18:52:19 +02:00
Alexis Svinartchouk
e72049d6e8 Remove font awesome unused icons from the generated bundle
Changelog-entry: Remove font awesome unused icons from the generated bundle
Change-type: patch
2020-07-16 18:52:11 +02:00
Alexis Svinartchouk
170126a490 Remove no longer used .sass-lint.yml
Changelog-entry: Remove no longer used .sass-lint.yml
Change-type: patch
2020-07-16 18:52:04 +02:00
Alexis Svinartchouk
7d53d0aadc Use tslib
Changelog-entry: Use tslib
Change-type: patch
2020-07-16 18:51:52 +02:00
Alexis Svinartchouk
5eac622b8c Use strict typescript compiler option
Changelog-entry: Use strict typescript compiler option
Change-type: patch
2020-07-16 18:51:42 +02:00
Alexis Svinartchouk
175e41de8d Update rendition to ^16.1.1
Changelog-entry: Update rendition to ^16.1.1
Change-type: patch
2020-07-16 18:51:12 +02:00
Balena CI
61f4762341 v1.5.101 2020-07-09 19:39:12 +03:00
bulldozer-balena[bot]
7c24d1486f
Merge pull request #3222 from balena-io/efp-restyle
Efp restyle
2020-07-09 16:37:26 +00:00
Lorenzo Alberto Maria Ambrosi
630f6c691c Resize modal to show content appropriately
Change-type: patch
Changelog-entry: Resize modal to show content appropriately
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-07-09 15:09:28 +02:00
Alexis Svinartchouk
5c5273bd6c autoSelectAllDrives setting
Change-type: patch
2020-07-01 18:58:54 +02:00
Alexis Svinartchouk
9bde38df5a Update etcher-sdk to 4.1.17
Change-type: patch
2020-07-01 15:40:37 +02:00
Alexis Svinartchouk
391e4444d4 Deselect the image if the source drive is removed
Change-type: patch
2020-07-01 12:58:36 +02:00
Alexis Svinartchouk
e5ee0f1961 Mount source drive if automountOnFileSelect is set
Change-type: patch
2020-06-29 14:08:44 +02:00
Alexis Svinartchouk
c8737806c0 Remove unused packages
Change-type: patch
2020-06-29 13:05:31 +02:00
Alexis Svinartchouk
953f572b53 Fix modal not showing overflowing elements
Change-type: patch
2020-06-29 12:57:42 +02:00
Alexis Svinartchouk
05d0f7142d Update rendition to 15.2.4
Change-type: patch
2020-06-29 12:57:25 +02:00
Alexis Svinartchouk
ba29d76a00 Update electron to 9.0.5
Change-type: patch
2020-06-29 12:42:28 +02:00
Alexis Svinartchouk
692274691e Remove non relevant comment
Change-type: patch
2020-06-29 12:38:22 +02:00
Lorenzo Alberto Maria Ambrosi
394d3e0bf2
Update etcher-sdk to v4.1.16
Change-type: patch
Changelog-entry: Update etcher-sdk to v4.1.16
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-25 21:40:02 +02:00
Lorenzo Alberto Maria Ambrosi
784dd03ba7 Convert sass to plain css
Change-type: patch
Changelog-entry: Convert sass to plain css
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-25 18:54:04 +02:00
Lorenzo Alberto Maria Ambrosi
8560189a1e Remove unused scss
Change-type: patch
Changelog-entry: Remove unused scss
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-24 19:05:38 +02:00
Lorenzo Alberto Maria Ambrosi
098ca9a9a1
Remove unused warning in settings
Change-type: patch
Changelog-entry: Remove unused warning in settings
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-23 11:46:09 +02:00
Lorenzo Alberto Maria Ambrosi
3ca50a1e2d
Refactor UI without bootstrap & flexboxgrid
Change-type: patch
Changelog-entry: Refactor UI without bootstrap & flexboxgrid
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-23 11:22:33 +02:00
Lorenzo Alberto Maria Ambrosi
00f193541d Restyle modals
Change-type: patch
Changelog-entry: Restyle modals
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-23 09:23:49 +02:00
Lorenzo Alberto Maria Ambrosi
8ce9eac704
Remove bootstrap & flexboxgrid
Change-type: patch
Changelog-entry: Remove bootstrap & flexboxgrid
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-23 09:13:31 +02:00
Lorenzo Alberto Maria Ambrosi
76086a8f91 Rework and move flashing view elements
Change-type: patch
Changelog-entry: Rework and move flashing view elements
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-22 19:19:09 +02:00
Lorenzo Alberto Maria Ambrosi
9b71772e35 Refactor UI grid to use rendition
Change-type: patch
Changelog-entry: Refactor UI grid to use rendition
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-22 19:19:09 +02:00
Balena CI
72e5631167 v1.5.100 2020-06-22 19:57:51 +03:00
bulldozer-balena[bot]
339c7d56bd
Merge pull request #3203 from balena-io/new-target-selector
New target selector
2020-06-22 16:08:47 +00:00
Alexis Svinartchouk
ba16995070 Show system drives last
Change-type: patch
2020-06-22 16:53:44 +02:00
Alexis Svinartchouk
b32c4ee728 Update partitioninfo to 5.3.5
Changelog-entry: Update partitioninfo to 5.3.5
Change-type: patch
2020-06-22 15:07:16 +02:00
Lorenzo Alberto Maria Ambrosi
14e4cbf749 Add icon to plug targets in targets modal
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-19 17:15:26 +02:00
Alexis Svinartchouk
406955ca3e Add .vhd to the list of supported extensions, allow opening any file
Changelog-entry: Add .vhd to the list of supported extensions, allow opening any file
Change-type: patch
2020-06-19 16:54:17 +02:00
Alexis Svinartchouk
5a45f8b122 Update target selector ok button label to show the number of selected devices
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
129e7e20e8 Update mocha to v8.0.1
Changelog-entry: Update mocha to v8.0.1
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
7165a8190b Update electron-notarize to v1.0.0
Changelog-entry: Update electron-notarize to v1.0.0
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
07fde0d73f Don't mutate usbboot drives when updating progress
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
a360370c4e Update electron to v9.0.4
Changelog-entry: Update electron to v9.0.4
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
92cd3d688d Update etcher-sdk to v4.1.15
Changelog-entry: Update etcher-sdk to v4.1.15
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
6554ccf0f8 Sticky header in target selection table
Changelog-entry: Sticky header in target selection table
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
9444f0e1b1 Stricter types in target-selector-modal.tsx
Change-type: patch
2020-06-19 16:29:37 +02:00
Alexis Svinartchouk
d63f5eca0d Update rendition to 15.2.1
Changelog-entry: Update rendition to 15.2.1
2020-06-19 16:29:37 +02:00
Lorenzo Alberto Maria Ambrosi
e39fed1f25 Fix source-selector image height
Change-type: patch
Changelog-entry: Fix source-selector image height
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-17 17:38:37 +02:00
Lorenzo Alberto Maria Ambrosi
2dc359b19c Make TargetSelectorModal a React.Component
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-17 17:38:36 +02:00
Lorenzo Alberto Maria Ambrosi
7aec8a4ae2 Refactor styles
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-12 14:44:32 +02:00
Lorenzo Alberto Maria Ambrosi
af9d3ba9f1 Update rendition to v15.0.0
Change-type: patch
Changelog-entry: Update rendition to v15.0.0
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-12 14:44:32 +02:00
Lorenzo Alberto Maria Ambrosi
b0c71b21b3 Merge unsafe mode with new target selector
Change-type: patch
Changelog-entry: Merge unsafe mode with new target selector
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-12 14:44:31 +02:00
Lorenzo Alberto Maria Ambrosi
71c7fbd3a2 Rework target selector modal
Change-type: patch
Changelog-entry: Rework target selector modal
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-12 14:44:31 +02:00
Lorenzo Alberto Maria Ambrosi
f8cc7c36b4 Add warning color to Flash! button
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-12 14:39:41 +02:00
Balena CI
5d95fcb81f v1.5.99 2020-06-12 15:31:15 +03:00
bulldozer-balena[bot]
d481536a3f
Merge pull request #3210 from balena-io/inline-svgs
Inline svgs
2020-06-12 12:29:11 +00:00
Alexis Svinartchouk
62b42e9254 Update node-raspberrypi-usbboot to 0.2.8
Changelog-entry: Update node-raspberrypi-usbboot to 0.2.8
Change-type: patch
2020-06-11 19:26:20 +02:00
Alexis Svinartchouk
03e3354d50 Update electron to 9.0.3
Changelog-entry: Update electron to 9.0.3
Change-type: patch
2020-06-11 19:22:13 +02:00
Alexis Svinartchouk
f01f1ddd7a Inline all svgs
Changelog-entry: Inline all svgs
Change-type: patch
2020-06-11 19:22:13 +02:00
Balena CI
2cb58bbbf0 v1.5.98 2020-06-10 23:36:06 +03:00
bulldozer-balena[bot]
2aedea3139
Merge pull request #3208 from balena-io/update-etcher-sdk-4.1.13
Update etcher sdk 4.1.13
2020-06-10 20:34:02 +00:00
Alexis Svinartchouk
59e37182be Use between 2 and 256MiB for buffering depending on the number of drives
Changelog-entry: Use between 2 and 256MiB for buffering depending on the number of drives
Change-type: patch
2020-06-10 14:52:04 +02:00
Alexis Svinartchouk
52bdd02a4b Check that argument is an url or a regular file before opening
Changelog-entry: Check that argument is an url or a regular file before opening
Change-type: patch
2020-06-10 14:48:44 +02:00
Alexis Svinartchouk
b1376dfa73 Update etcher-sdk to ^4.1.13
Changelog-entry: Update etcher-sdk to ^4.1.13
Change-type: patch
2020-06-10 12:27:37 +02:00
Balena CI
37ed18c38b v1.5.97 2020-06-08 18:08:27 +03:00
bulldozer-balena[bot]
b7ad7bd729
Merge pull request #3202 from balena-io/add-custom-protocol-2
Add custom protocol 2
2020-06-08 15:05:57 +00:00
Alexis Svinartchouk
b43ec4414e Update @types/terser-webpack-plugini to ^3.0.0
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
f05f9d33f9 Use @types/copy-webpack-plugin
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
fcc9c5e577 Update node-gyp to ^7.0.0
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
3259a8206f Update electron to v9.0.2
Changelog-entry: Update electron to v9.0.2
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
3fa9611971 Don't check child-writer stderr, rely on the exit code instead
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
b749c2d45a Fix flash from url on windows
Changelog-entry: Fix flash from url on windows
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
29e2e9c657 Avoid random access in http sources
Changelog-entry: Avoid random access in http sources
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
f983d88e52 Update etcher-sdk to ^4.1.8
Changelog-entry: Update etcher-sdk to ^4.1.8
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
1449478c5b Read image path from arguments, register etcher://... protocol
Changelog-entry: Read image path from arguments, register `etcher://...` protocol
Change-type: patch
2020-06-08 14:40:56 +02:00
Alexis Svinartchouk
7e7a669116 Simplify spectron tests
Change-type: patch
2020-06-04 17:18:50 +02:00
Alexis Svinartchouk
28f9954661 Update etcher-sdk to ^4.1.6
Changelog-entry: Update etcher-sdk to ^4.1.6
Change-type: patch
2020-06-04 17:18:50 +02:00
Alexis Svinartchouk
b7e82f7694 Fix sudo-prompt promisification
Changelog-entry: Fix sudo-prompt promisification
Change-type: patch
2020-06-04 17:18:50 +02:00
Alexis Svinartchouk
f0bbd1a1cd Fix windows ia32 rebuild
Change-type: patch
2020-06-04 17:18:50 +02:00
Lorenzo Alberto Maria Ambrosi
5f5c66e3f2 Allow skipping notarization when building package
Change-type: patch
Changelog-entry: Allow skipping notarization when building package (dev)
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-06-03 15:07:06 +02:00
Balena CI
2fc8b07e29 v1.5.96 2020-06-03 16:06:42 +03:00
bulldozer-balena[bot]
bdb1690a49
Merge pull request #3195 from balena-io/ui-updates
Ui updates
2020-06-03 13:04:32 +00:00
Alexis Svinartchouk
10b028355f Fix ia32 builds for windows
Changelog-entry: Fix ia32 builds for windows
Change-type: patch
2020-06-03 13:54:25 +02:00
Alexis Svinartchouk
a4366556c0 Remove writing speed from finish screen
Changelog-entry: Remove writing speed from finish screen
Change-type: patch
2020-06-03 13:12:48 +02:00
Alexis Svinartchouk
9c25cc663a Remove unused styles
Change-type: patch
2020-06-03 13:11:59 +02:00
Alexis Svinartchouk
ba21da4f0b Add effective speed in flash results
Changelog-entry: Add effective speed in flash results
Change-type: patch
2020-06-03 13:11:54 +02:00
Alexis Svinartchouk
34349f64d5 Update progress bar style
Changelog-entry: Update progress bar style
Change-type: patch
2020-06-02 12:46:57 +02:00
Alexis Svinartchouk
f5c7dc932a Remove unused css class
Change-type: patch
2020-06-01 14:39:13 +02:00
Alexis Svinartchouk
4880275e7b Simplify FlashAnother button
Change-type: patch
2020-06-01 14:39:13 +02:00
Alexis Svinartchouk
6db0172a50 Remove useless StepSelection component
Change-type: patch
2020-06-01 14:39:13 +02:00
Alexis Svinartchouk
95ff5c98a8 Change font to SourceSansPro and fix hover color
Changelog-entry: Change font to SourceSansPro and fix hover color
Change-type: patch
2020-06-01 14:38:48 +02:00
Alexis Svinartchouk
e9f9f90137 Update rendition to ^14.13.0
Changelog-entry: Update rendition to ^14.13.0
Change-type: patch
2020-06-01 13:39:23 +02:00
Alexis Svinartchouk
0ebfecc60c Make FlashStep a PureComponent
Change-type: patch
2020-06-01 13:39:23 +02:00
Alexis Svinartchouk
afa29a0ed1 Remove unused styles
Changelog-entry: Remove unused styles
Change-type: patch
2020-06-01 13:39:23 +02:00
Balena CI
8d707dc815 v1.5.95 2020-06-01 13:40:43 +03:00
bulldozer-balena[bot]
5b509d147f
Merge pull request #3189 from balena-io/windows-docker-spectron
spectron: Make tests pass on Windows Docker containers
2020-06-01 10:37:36 +00:00
Juan Cruz Viotti
bb6d909949 spectron: Make tests pass on Windows Docker containers
The Spectron test that we have that checks that the browser window is
visible fails when ran inside a Windows Docker container.

In particular, the `isVisible()` function returns `false` when running
in a headless Windows machine.

However, the `isMinimized()` function returns `false`, the `isFocused()`
function returns `true`, and we can fetch the expected browser window
bounds, so we can use all those values in conjunction to reformulate the
test case and avoid `isVisible()`.

The results should be pretty much the same, and the assertions will pass
inside Docker Windows containers.

Changelog-entry: spectron: Make tests pass on Windows Docker containers
Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@balena.io>
2020-05-30 02:16:41 +02:00
Balena CI
8513d63a3e v1.5.94 2020-05-28 00:12:44 +03:00
bulldozer-balena[bot]
d2f3345c7a
Merge pull request #3180 from balena-io/fix-flash-from-url
Fix flash from url
2020-05-27 21:10:42 +00:00
Alexis Svinartchouk
aee3a0a281 Show image name and path in image name modal
Change-type: patch
2020-05-27 17:45:44 +02:00
Alexis Svinartchouk
4752fa6dd2 Stop checking file extensions
Changelog-entry: Stop checking file extensions
Change-type: patch
2020-05-27 17:27:09 +02:00
Alexis Svinartchouk
4e08cf3879 Fix flash from url (broken in 1.5.92)
Changelog-entry: Fix flash from url (broken in 1.5.92)
Change-type: patch
2020-05-27 16:56:08 +02:00
Alexis Svinartchouk
11bda8e76a Remove electron-builder patch now that https://github.com/electron-userland/electron-builder/pull/4993 is merged
Change-type: patch
2020-05-27 15:36:24 +02:00
Alexis Svinartchouk
e33172060f Update etcher-sdk to ^4.1.4
Changelog-entry: Update etcher-sdk to ^4.1.4
Change-type: patch
2020-05-27 15:24:38 +02:00
Balena CI
0dee6a9888 v1.5.93 2020-05-25 20:36:06 +03:00
bulldozer-balena[bot]
3d855dcbfc
Merge pull request #3174 from balena-io/electron9-2
Electron v9.0.0
2020-05-25 17:33:56 +00:00
Alexis Svinartchouk
ed3b7f7971 Patch electron-builder to fix signing on macos
Remove this once
https://github.com/electron-userland/electron-builder/pull/4993 is
merged

Change-type: patch
2020-05-25 18:12:56 +02:00
Alexis Svinartchouk
c0a4fb16e2 Update dependencies
Change-type: patch
2020-05-25 17:36:55 +02:00
Alexis Svinartchouk
688e7fff9c Update electron-builder to v22.6.1
Changelog-entry: Update electron-builder to v22.6.1
Change-type: patch
2020-05-25 16:20:39 +02:00
Alexis Svinartchouk
880e56e563 Strip out comments from generated code
Changelog-entry: Strip out comments from generated code
Change-type: patch
2020-05-25 15:32:05 +02:00
Alexis Svinartchouk
bf26d4ec95 Remove dead code
Change-type: patch
2020-05-25 15:32:05 +02:00
Alexis Svinartchouk
d5df3de1d7 Update electron to v9.0.0
Changelog-entry: Update electron to v9.0.0
Change-type: patch
2020-05-25 15:32:05 +02:00
Balena CI
5d005211d4 v1.5.92 2020-05-25 13:09:42 +03:00
Alexis Svinartchouk
cc08ac9236
Merge pull request #3169 from balena-io/webpack-everything
Webpack everything
2020-05-25 12:07:46 +02:00
Alexis Svinartchouk
09a6a340c9 Use electron.app.getAppPath() instead of reading it from argv in catalina-sudo
Changelog-entry: Use electron.app.getAppPath() instead of reading it from argv in catalina-sudo
Change-type: patch
2020-05-22 19:42:05 +02:00
Alexis Svinartchouk
2692104ccd Disable asar packing on all platforms
Changelog-entry: Disable asar packing on all platforms
Change-type: patch
2020-05-22 19:42:05 +02:00
Alexis Svinartchouk
b1fd539d25 Remove unneeded fortawesome from main.scss
Changelog-entry: Remove unneeded fortawesome from main.scss
Change-type: patch
2020-05-22 19:42:05 +02:00
Alexis Svinartchouk
33d48fe4f7 Remove unneeded font formats
Changelog-entry: Remove unneeded font formats
Change-type: patch
2020-05-22 19:42:05 +02:00
Alexis Svinartchouk
1ebc8e9362 Webpack everything, reduce package size
Changelog-entry: Webpack everything, reduce package size
Change-type: patch
2020-05-22 19:42:05 +02:00
Balena CI
8b5a5241f2 v1.5.91 2020-05-21 17:24:53 +03:00
Alexis Svinartchouk
959b9ffbac
Merge pull request #3166 from balena-io/init-param-issourcedrive
Init param in correct place
2020-05-21 16:22:54 +02:00
Lorenzo Alberto Maria Ambrosi
c9cbe41f9e Init param in correct place
Change-type: patch
Changelog-entry: Minor fix - Init isSourceDrive param in correct place
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-05-21 12:27:33 +02:00
Lorenzo Alberto Maria Ambrosi
d62cbdc391
Merge pull request #3165 from balena-io/pr/3162
Fix undefined image from DriveCompatibilityWarning
2020-05-21 12:05:55 +02:00
Rob Evans
31bd8ce7ae Fix undefined image from DriveCompatibilityWarning
Fixes: #3160
Change-type: patch
Changelog-entry: Fix undefined image from DriveCompatibilityWarning
2020-05-21 10:07:14 +02:00
Balena CI
c25db503e0 v1.5.90 2020-05-20 18:25:35 +03:00
Alexis Svinartchouk
ac51e6aae3
Merge pull request #3158 from balena-io/update-leds-behaviour
Update leds behaviour
2020-05-20 17:23:37 +02:00
Alexis Svinartchouk
72c9d616fd Remove useless comment
Change-type: patch
2020-05-20 14:50:56 +02:00
Alexis Svinartchouk
52f80293a2 Remove dead code
Change-type: patch
2020-05-20 14:50:56 +02:00
Alexis Svinartchouk
a3a9edd41a Make Flash component a class & rename it FlashStep
Change-type: patch
2020-05-20 14:50:56 +02:00
Alexis Svinartchouk
f9cbff1eec ProgressButton is a PureComponent
Change-type: patch
2020-05-20 14:50:56 +02:00
Alexis Svinartchouk
b71482284f Remove commented code
Change-type: patch
2020-05-20 14:50:56 +02:00
Alexis Svinartchouk
d90e3a816e Update leds behaviour
Changelog-entry: Update leds behaviour
Change-type: patch
2020-05-20 14:50:56 +02:00
Balena CI
869d875b5f v1.5.89 2020-05-14 13:20:16 +03:00
Alexis Svinartchouk
fb1a360360
Merge pull request #3149 from balena-io/update-dev-dependencies
Update dev dependencies
2020-05-14 11:53:04 +02:00
Alexis Svinartchouk
943765bd4d Fix drive selector modal padding
Changelog-entry: Fix drive selector modal padding
Change-type: patch
2020-05-13 13:32:40 +02:00
Alexis Svinartchouk
9280113350 Update all dependencies minor versions
Changelog-entry: Update all dependencies minor versions
Change-type: patch
2020-05-13 13:32:40 +02:00
Alexis Svinartchouk
627adb1755 Update @types/node 12.12.24 -> 12.12.39
Changelog-entry: Update @types/node 12.12.24 -> 12.12.39
Change-type: patch
2020-05-13 12:27:53 +02:00
Alexis Svinartchouk
ad421eae11 Update ts-loader 6 -> 7
Changelog-entry: Update ts-loader 6 -> 7
Change-type: patch
2020-05-13 12:25:23 +02:00
Alexis Svinartchouk
b0af9d535a Update sinon 8 -> 9
Changelog-entry: Update sinon 8 -> 9
Change-type: patch
2020-05-13 12:23:49 +02:00
Alexis Svinartchouk
5ab69dfb7f Update node-gyp 3 -> 6
Changelog-entry: Update node-gyp 3 -> 6
Change-type: patch
2020-05-13 12:21:48 +02:00
Alexis Svinartchouk
f1214e6ffd Update lint-staged 9 -> 10
Changelog-entry: Update lint-staged 9 -> 10
Change-type: patch
2020-05-13 12:21:08 +02:00
Alexis Svinartchouk
a09e029216 Update husky 3 -> 4
Changelog-entry: Update husky 3 -> 4
Change-type: patch
2020-05-13 12:18:50 +02:00
Alexis Svinartchouk
8782c70640 Remove no longer used html-loader dev dependency
Changelog-entry: Remove no longer used html-loader dev dependency
Change-type: patch
2020-05-13 12:16:54 +02:00
Alexis Svinartchouk
7099a36bdb Update electron-notarize 0.1.1 -> 0.3.0
Changelog-entry: Update electron-notarize 0.1.1 -> 0.3.0
Change-type: patch
2020-05-13 12:09:02 +02:00
Alexis Svinartchouk
7bd8b0c152 Remove no longer used chalk dev dependency
Changelog-entry: Remove no longer used chalk dev dependency
Change-type: patch
2020-05-13 12:05:05 +02:00
Alexis Svinartchouk
b1cbf54711 Update @types/tmp 0.1.0 -> 0.2.0
Changelog-entry: Update @types/tmp 0.1.0 -> 0.2.0
Change-type: patch
2020-05-13 11:51:01 +02:00
Alexis Svinartchouk
84f003d907 Update @types/sinon 7 -> 9
Changelog-entry: Update @types/sinon 7 -> 9
Change-type: patch
2020-05-13 11:50:10 +02:00
Alexis Svinartchouk
4257e696da Update @types/semver 6 -> 7
Changelog-entry: Update @types/semver 6 -> 7
Change-type: patch
2020-05-13 11:49:14 +02:00
Alexis Svinartchouk
c5c0d46ab8 Update @types/mocha 5 -> 7
Changelog-entry: Update @types/mocha 5 -> 7
Change-type: patch
2020-05-13 11:47:21 +02:00
Balena CI
b397240664 v1.5.88 2020-05-12 20:30:46 +03:00
Alexis Svinartchouk
a31e27ee06
Merge pull request #3148 from balena-io/update-dependencies
Update dependencies
2020-05-12 19:28:11 +02:00
Alexis Svinartchouk
483d7b6e58 Update roboto-fontface 0.9.0 -> 0.10.0
Changelog-entry: Update roboto-fontface 0.9.0 -> 0.10.0
Change-type: patch
2020-05-12 15:50:29 +02:00
Alexis Svinartchouk
bfb6133871 Update rendition 12 -> 14, styled-system and styled-components 4 -> 5
Changelog-entry: Update rendition 12 -> 14, styled-system and styled-components 4 -> 5
Change-type: patch
2020-05-12 15:50:27 +02:00
Alexis Svinartchouk
917ff89d9d Update electron-updater 4.0.6 -> 4.3.1
Changelog-entry: Update electron-updater 4.0.6 -> 4.3.1
Change-type: patch
2020-05-12 14:20:51 +02:00
Alexis Svinartchouk
ef5762864f Update redux 3 -> 4
Changelog-entry: Update redux 3 -> 4
Change-type: patch
2020-05-12 14:18:02 +02:00
Alexis Svinartchouk
50586cdb42 Update debug 3 -> 4
Changelog-entry: Update debug 3 -> 4
Change-type: patch
2020-05-12 14:08:37 +02:00
Alexis Svinartchouk
82a0b8de0c Update semver 5 -> 7
Changelog-entry: Update semver 5 -> 7
Change-type: patch
2020-05-12 14:08:10 +02:00
Alexis Svinartchouk
6db800d6d2 Update tmp 0.1.0 -> 0.2.1
Changelog-entry: Update tmp 0.1.0 -> 0.2.1
Change-type: patch
2020-05-12 14:00:37 +02:00
Alexis Svinartchouk
b23bfc2f6e Update uuid v3 -> v8
Changelog-entry: Update uuid v3 -> v8
Change-type: patch
2020-05-12 13:55:20 +02:00
Balena CI
929279b35a v1.5.87 2020-05-12 14:47:23 +03:00
Alexis Svinartchouk
795e4bad5f
Merge pull request #3145 from balena-io/update-etcher-sdk-to-4.1.0
Update etcher-sdk to ^4.1.3 to fix issues with some bz2 files
2020-05-12 13:45:31 +02:00
Alexis Svinartchouk
6e20b6034e Update etcher-sdk to ^4.1.3 to fix issues with some bz2 files
Changelog-entry: Update etcher-sdk to ^4.1.3 to fix issues with some bz2 files
Change-type: patch
2020-05-11 16:15:19 +02:00
Balena CI
6f34a27bd3 v1.5.86 2020-05-06 18:49:03 +03:00
Alexis Svinartchouk
240a605977
Merge pull request #3144 from balena-io/fix-theme-warnings
Fix theme warnings
2020-05-06 17:46:40 +02:00
Alexis Svinartchouk
4a6a471345 Fix theme warnings
Changelog-entry: Fix theme warnings
Change-type: patch
2020-05-06 16:15:47 +02:00
Balena CI
f1be4f50a3 v1.5.85 2020-05-06 12:35:28 +03:00
Alexis Svinartchouk
8ef32e8081
Merge pull request #3142 from balena-io/update-arch-instructions
Prefer balena-etcher to etcher-bin on Arch Linux
2020-05-06 11:32:52 +02:00
Alexis Svinartchouk
71e02ef833 Prefer balena-etcher to etcher-bin on Arch Linux
Changelog-entry: Prefer balena-etcher to etcher-bin on Arch Linux
Change-type: patch
2020-05-05 19:00:35 +02:00
Balena CI
c70d7e475d v1.5.84 2020-05-05 19:46:08 +03:00
Alexis Svinartchouk
0f31f05e61
Merge pull request #3140 from balena-io/1.5.84
1.5.84
2020-05-05 18:43:36 +02:00
Alexis Svinartchouk
7971a003cc Update copyright years
Change-type: patch
2020-05-04 19:10:09 +02:00
TheRealTachyon
49491b9b8c Update to README.md
Just a simple addition of instructionsfor proper installation on OpenSUSE Linux.

Change-type: patch
2020-05-04 19:06:13 +02:00
Tom
ea11f17954 docs: Including Arch / Manjaro install instructions
Changelog-entry: Including Arch / Manjaro install instructions
Change-type: patch
Signed-off-by: Tom Carrio <tom@carrio.dev>
2020-05-04 19:03:28 +02:00
Rich Morin
ebd37b9e2f Correct two nomenclature errors
PC keyboards have "Alt" keys; Mac keyboards have "Opt" keys.
Although it's possible to use a PC keyboard on a Mac, it's unusual.
In any case, all of the macOS (not "Mac OS" for some years now) documentation refers to the "Opt" key.

Change-type: patch
2020-05-04 19:01:44 +02:00
Alexis Svinartchouk
5de4fe3d23 Don't depend on lsb for the rpm package
Change-type: patch
2020-05-04 17:14:30 +02:00
Alexis Svinartchouk
eb47f1227a Fix libpango dependency name on debian
Change-type: patch
2020-05-04 14:03:51 +02:00
Alexis Svinartchouk
f84cde7d04 Update etcher-sdk to ^4.0.1
Change-type: patch
2020-05-04 13:41:59 +02:00
Alexis Svinartchouk
4d3eb2887c Fix notification icon path
Changelog-entry: Fix notification icon path
Change-type: patch
2020-05-04 13:37:29 +02:00
Balena CI
bc631612df v1.5.83 2020-04-30 15:08:15 +03:00
Alexis Svinartchouk
5d8a211961
Merge pull request #3131 from balena-io/decompress-first
Decompress first
2020-04-30 14:04:52 +02:00
Alexis Svinartchouk
e62add6893 Remove some anys
Change-type: patch
2020-04-30 11:35:31 +02:00
Alexis Svinartchouk
44fc429f64 Factorize duplicated configUrl code
Change-type: patch
2020-04-30 11:35:30 +02:00
Alexis Svinartchouk
ffe281f25d Simplify settings
Change-type: patch
2020-04-30 11:35:29 +02:00
Alexis Svinartchouk
ba39ff433d remove update lock 2020-04-30 11:35:28 +02:00
Alexis Svinartchouk
795b8614ad Send applicationSessionUuid and flashingWorkflowUuid by default in logEvent
Change-type: patch
2020-04-30 11:35:27 +02:00
Alexis Svinartchouk
745a2f1886 Remove no longer used settings and checks
Change-type: patch
2020-04-30 11:35:26 +02:00
Alexis Svinartchouk
9bf58c89d4 Update resin-lint -> @balena/lint
Change-type: patch
2020-04-30 11:35:25 +02:00
Alexis Svinartchouk
ee62b9a4c7 Decompress images before flashing, remove trim setting, trim ext partitions
Changelog-entry: Decompress images before flashing, remove trim setting, trim ext partitions
Change-type: patch
2020-04-30 11:35:23 +02:00
Balena CI
e6125b893d v1.5.82 2020-04-27 19:54:40 +03:00
Alexis Svinartchouk
83ed333fa5
Merge pull request #3071 from balena-io/flash-from-url
Flash from url
2020-04-27 18:51:35 +02:00
Lorenzo Alberto Maria Ambrosi
39ed67d667 Allow http/https only for Flash from URL
Change-type: patch
Changelog-entry: Allow http/https only for Flash from URL
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-24 15:24:22 +02:00
Lorenzo Alberto Maria Ambrosi
ac2e973cb0 Add generic error's message
Change-type: patch
Changelog-entry: Add generic error's message
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-24 12:37:14 +02:00
Lorenzo Alberto Maria Ambrosi
94a0be3b05 Refactor buttons style
Change-type: patch
Changelog-entry: Refactor buttons style
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-24 10:51:52 +02:00
Lorenzo Alberto Maria Ambrosi
124e8af649 Add flash from url workflow
Change-type: patch
Changelog-entry: Add flash from url workflow
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-24 10:51:52 +02:00
Lorenzo Alberto Maria Ambrosi
f07ed68d82
Merge pull request #3127 from balena-io/add-staging-percentage-1.5.81
Add staging percentage for v1.5.81
2020-04-23 19:45:46 +02:00
Lorenzo Alberto Maria Ambrosi
8f39dbf6b1 Add staging percentage for v1.5.81
Change-type: none
Changelog-entry: Add staging percentage for v1.5.81
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-23 19:39:40 +02:00
Lorenzo Alberto Maria Ambrosi
6dde9ee6c4
Merge pull request #3126 from balena-io/trigger-update-1.5.81
Trigger update for v1.5.81
2020-04-23 19:24:40 +02:00
Lorenzo Alberto Maria Ambrosi
dbe6fe442d Trigger update for v1.5.81
Change-type: none
Changelog-entry: Trigger update for v1.5.81
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-04-23 19:10:48 +02:00
Balena CI
1e2ac86ac6 v1.5.81 2020-04-16 19:30:37 +03:00
Alexis Svinartchouk
83c5ba04cd
Merge pull request #3115 from balena-io/directio
Direct IO
2020-04-16 18:28:58 +02:00
Lorenzo Alberto Maria Ambrosi
b3f25c176b Add average speed in flash results
Changelog-entry: Add average speed in flash results
Change-type: patch
2020-04-14 17:25:25 +02:00
Wilson de Farias
52cf6375eb Fixes the Command for macOS drive recovery
Changes the documentation to update the disktutil command which didn't fix my case, cause the boot partition was broken.
This way it rewrites the drive into a FAT32 partition editable in Unix/Windows.

Changelog-entry: docs: Update macOS drive recovery command
Change-type: patch
2020-04-10 12:14:08 +02:00
Alexis Svinartchouk
82a3c37c16 Remove no longer needed ts-ignore comments, fix typos
Change-type: patch
2020-04-08 17:20:41 +02:00
Alexis Svinartchouk
d63df5a156 Update bluebird
Change-type: patch
2020-04-08 17:20:41 +02:00
Alexis Svinartchouk
63ad3739fd Fix FlashResults component
Change-type: patch
2020-04-08 17:20:41 +02:00
Alexis Svinartchouk
7eddb16f2f Update etcher-sdk to use direct IO
Changelog-entry: Update etcher-sdk to use direct IO
Change-type: patch
2020-04-07 18:05:41 +02:00
Balena CI
7c4f4cacc9 v1.5.80 2020-03-24 15:53:43 +02:00
Alexis Svinartchouk
dc6ad72b2d
Merge pull request #3101 from balena-io/updates-1.5.80
Updates
2020-03-24 14:51:51 +01:00
Alexis Svinartchouk
be729c87af Remove useless if
Change-type: patch
2020-03-13 13:58:41 +01:00
Lorenzo Alberto Maria Ambrosi
4ee83d9da4 Use zoomFactor to scale contents in fullscreen mode
Change-type: patch
Changelog-entry: Use zoomFactor to scale contents in fullscreen mode
2020-03-13 13:32:40 +01:00
Anthony Rouneau
8b2f06442a Update README to use port 443 to get keys from keyserver.ubuntu.com
Change-type: patch
2020-03-13 13:32:39 +01:00
Alexis Svinartchouk
21181f011f Update electron to v7.1.14
Changelog-entry: Update electron to v7.1.14
Change-type: patch
2020-03-09 19:35:05 +01:00
Alexis Svinartchouk
b4b099ecb1 Fix sass files path for lint-sass
Changelog-entry: Fix sass files path for lint-sass
Change-type: patch
2020-03-09 19:34:52 +01:00
Balena CI
166b30bb0a v1.5.79 2020-02-20 19:33:28 +02:00
Alexis Svinartchouk
8eeb81f58e
Merge pull request #3077 from balena-io/fix-start-script
Fix start script
2020-02-20 18:31:34 +01:00
Alexis Svinartchouk
0b20a1eeaa Remove "Download the React DevTools for a better development experience" message
Changelog-entry: Remove "Download the React DevTools for a better development experience" message
Change-type: patch
2020-02-20 14:21:55 +01:00
Alois Klink
d8cb8f7815 fix(afterPack): error on launch from deb terminal
When installing balena-etcher via apt on Debian/Ubuntu,
the command `balena-etcher-electron` fails with the error:
line 3: /usr/bin/balena-etcher-electron.bin: No such file or directory

This is because the /usr/bin/balena-etcher-electron is a symlink
to /opt/balenaEtcher/balena-etcher-electron, but the script looks
for balena-etcher-electron.bin in the symlink directory, not the
actual script location directory.

This commit uses `$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")` to
find the real location of the balena-etcher-electron script without
symlink, so that balena-etcher-electron.bin is correctly found.

Change-Type: patch
Changelog-Entry: Fix error when launching from terminal when installed via apt.
Fixes: https://github.com/balena-io/etcher/issues/3074
2020-02-20 13:04:17 +01:00
Balena CI
36f79593cf v1.5.78 2020-02-19 19:29:10 +02:00
Alexis Svinartchouk
1014b25bf5
Merge pull request #3073 from balena-io/update-drivelist-escape
Update drivelist to 8.0.10 to fix parsing lsblk --pairs
2020-02-19 18:27:30 +01:00
Alexis Svinartchouk
55dcfc1a85 Update drivelist to 8.0.10 to fix parsing lsblk --pairs
Changelog-entry: Update drivelist to 8.0.10 to fix parsing lsblk --pairs
Change-type: patch
2020-02-19 11:51:39 +01:00
Balena CI
9b6a628d51 v1.5.77 2020-02-17 22:19:00 +02:00
Alexis Svinartchouk
8b5a42073d
Merge pull request #3072 from balena-io/updates
Updates
2020-02-17 21:15:54 +01:00
Alexis Svinartchouk
7991d40760 Specify flashImageToDrive return type
Change-type: patch
2020-02-17 18:43:01 +01:00
Alexis Svinartchouk
4203296414 Fix error message not being shown on write error
Changelog-entry: Fix error message not being shown on write error
Change-type: patch
2020-02-17 18:39:30 +01:00
Alexis Svinartchouk
93d319275f Fix imports in lib/start.ts
Change-type: patch
2020-02-13 12:04:26 +01:00
Alexis Svinartchouk
94d262263c The RGBLed module has been moved to a separate repository
Changelog-entry: The RGBLed module has been moved to a separate repository
Change-type: patch
2020-02-13 11:15:39 +01:00
Alexis Svinartchouk
ed90f21188 Running make lint will now fix the typescript files
Change-type: patch
2020-02-13 11:14:46 +01:00
Balena CI
80e0231727 v1.5.76 2020-02-06 15:55:10 +02:00
Alexis Svinartchouk
981197583a
Merge pull request #3064 from balena-io/update-etcher-sdk-to-2.0.17
Update etcher-sdk to ^2.0.17
2020-02-06 14:53:14 +01:00
Lorenzo Alberto Maria Ambrosi
6f58344e7b Prefix temp permissions script name
Change-type: patch
Changelog-entry: Prefix temp permissions script name
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-02-05 18:14:14 +01:00
Alexis Svinartchouk
07be844985 Fix image drop zone, remove react-dropzone dependency
Changelog-entry: Fix image drop zone, remove react-dropzone dependency
Change-type: patch
2020-02-05 16:55:44 +01:00
Alexis Svinartchouk
45262583e6 Update etcher-sdk to ^2.0.17
Changelog-entry: Update etcher-sdk to ^2.0.17
Change-type: patch
2020-02-05 15:14:37 +01:00
Balena CI
c113e38531 v1.5.75 2020-02-05 14:37:20 +02:00
Alexis Svinartchouk
8771f311d7
Merge pull request #3062 from balena-io/init-leds-map
Initialize leds object map
2020-02-05 13:35:10 +01:00
Omar López
fdec65e9bd Initialize leds object map
Fixes: #3056 #3057 #3058
Change-type: patch
Changelog-entry: Initialize leds object map
2020-02-05 12:32:42 +01:00
Balena CI
f8b46dc647 v1.5.74 2020-02-05 00:17:12 +02:00
Alexis Svinartchouk
847e47b5db
Merge pull request #3046 from balena-io/etcher-pro-leds
Etcher pro leds
2020-02-04 23:15:39 +01:00
Alexis Svinartchouk
227bad9e99 Keep leds sysfs files open
Change-type: patch
2020-02-04 20:08:58 +01:00
Alexis Svinartchouk
cb8168de41 Etcher pro leds feature
Changelog-entry: Etcher pro leds feature
Change-type: patch
2020-02-04 20:08:57 +01:00
Alexis Svinartchouk
c200a0c7ac Compress deb package with bzip instead of xz
7za fails on ia32 CI with "ERROR: Can't allocate required memory!"

Changelog-entry: Compress deb package with bzip instead of xz
Change-type: patch
2020-02-04 20:08:56 +01:00
Alexis Svinartchouk
81e80572d8 A warning about the selected image does not prevent the selection
This was introduced in 1.5.72

Change-type: patch
2020-02-04 20:08:55 +01:00
Alexis Svinartchouk
2aa6c83714 Update electron to 7.1.11
Changelog-entry: Update electron to 7.1.11
Chanege-type: patch
2020-02-04 20:08:53 +01:00
Alexis Svinartchouk
a22ea0b82b Update scripts submodule to prevent electon-mocha crashes on CI
Change-type: patch
2020-02-04 20:08:51 +01:00
Alexis Svinartchouk
af64579eb2 Update resin-lint to ^3.2.0
Change-type: patch
2020-02-03 20:22:12 +01:00
Alexis Svinartchouk
f2705a611d Update mocha and electron-mocha
Change-type: patch
2020-02-03 20:22:12 +01:00
Alexis Svinartchouk
990dcc9d5a Fix loading driveBlacklist settings
Change-type: patch
2020-01-31 15:44:03 +01:00
Alexis Svinartchouk
c09237f0c3 Sort devices by device path on Linux
Changelog-entry: Sort devices by device path on Linux
Change-type: patch
2020-01-31 13:06:37 +01:00
Alexis Svinartchouk
571a3533fb Load settings before rendering the app
Change-type: patch
2020-01-30 16:59:29 +01:00
Alexis Svinartchouk
6fcd9e1595 Remove settings.getDefaults function
Change-type: patch
2020-01-30 16:59:28 +01:00
Alexis Svinartchouk
9caa42d257 Remove unused settings.assign function
Change-type: patch
2020-01-30 16:59:28 +01:00
Balena CI
18fdbbaabb v1.5.73 2020-01-29 15:56:45 +02:00
Alexis Svinartchouk
7381c1c0cb
Merge pull request #3012 from balena-io/electron7
Electron7
2020-01-29 14:54:18 +01:00
Alexis Svinartchouk
2bdcae7209 Remove unused BUILD_TEMPORARY_DIRECTORY scripts parameter
Change-type: patch
2020-01-28 17:01:18 +01:00
Alexis Svinartchouk
fc694b90b6 Target es2018
Change-type: patch
2020-01-27 16:47:24 +01:00
Alexis Svinartchouk
945cd7ff8e Update electron to v7.1.10
Changelog-entry: Update electron to v7.1.10
Change-type: patch
2020-01-27 16:47:23 +01:00
Balena CI
3b32ca1e60 v1.5.72 2020-01-27 17:39:34 +02:00
Alexis Svinartchouk
98611267d5
Merge pull request #3026 from balena-io/remove-remaining-angular
Remove remaining angular and convert everything to typescript
2020-01-27 16:37:19 +01:00
Alexis Svinartchouk
4d53002e5c Replace use of lodash's assign with destructuring assignment in image-writer
Change-type: patch
2020-01-27 12:35:30 +01:00
Alexis Svinartchouk
f6b7b0d3d2 Fix error reportning when elevating Etcher fails
Change-type: patch
2020-01-27 12:35:29 +01:00
Alexis Svinartchouk
fbbd7ccf49 Remove babel dependency
Change-type: patch
2020-01-27 12:35:28 +01:00
Alexis Svinartchouk
d41ce65a78 Remove eslint dependency
Change-type: patch
2020-01-27 12:35:27 +01:00
Alexis Svinartchouk
c477fd2071 Remove mochainon dependency
Change-type: patch
2020-01-27 12:35:27 +01:00
Alexis Svinartchouk
7fab8395c8 Run ts-lint on typings
Change-type: patch
2020-01-27 12:35:27 +01:00
Alexis Svinartchouk
7d72e0c046 Convert clean-shrinkwrap.js to typescript
Change-type: patch
2020-01-27 12:35:26 +01:00
Alexis Svinartchouk
9ce97be6a4 Convert runner.spec.js to typescript
Change-type: patch
2020-01-27 12:35:26 +01:00
Alexis Svinartchouk
121b69b0c3 Convert available-drives.spec.ts to typescript
Change-type: patch
2020-01-27 12:35:25 +01:00
Alexis Svinartchouk
cb7cc2f276 Convert selection-state.spec.ts to typescript
Change-type: patch
2020-01-27 12:35:25 +01:00
Alexis Svinartchouk
d01849306e Convert errors.spec.js to typescript
Change-type: patch
2020-01-27 12:35:24 +01:00
Alexis Svinartchouk
a4e87982a6 Convert drive-constraints.spec.ts to typescript
Change-type: patch
2020-01-27 12:35:24 +01:00
Alexis Svinartchouk
e1c3c80c0f Convert supported-formats.spec.js to typescript
Change-type: patch
2020-01-27 12:35:23 +01:00
Alexis Svinartchouk
fd6346ed59 Convert utils.spec.js to typescript
Change-type: patch
2020-01-27 12:35:23 +01:00
Alexis Svinartchouk
2e4f7b5a8c Convert permissions.spec.js to typescript
Change-type: patch
2020-01-27 12:35:22 +01:00
Alexis Svinartchouk
d812d4e12e Convert flash-state.spec.js to typescript
Change-type: patch
2020-01-27 12:35:22 +01:00
Alexis Svinartchouk
10b3f09e7e Convert image-writer.spc.js to typescript
Change-type: patch
2020-01-27 12:35:21 +01:00
Alexis Svinartchouk
2d3776844c Convert child-writer.spec.js to typescript
Change-type: patch
2020-01-27 12:35:21 +01:00
Alexis Svinartchouk
914a4574de Convert progress-status.spec.js to typescript
Change-type: patch
2020-01-27 12:35:20 +01:00
Alexis Svinartchouk
2b3c84f21a Convert settings.spec.js to typescript
Change-type: patch
2020-01-27 12:35:20 +01:00
Alexis Svinartchouk
f4eb1af8d0 Convert windows-network-drives.spec.js to typescript
Change-type: patch
2020-01-27 12:35:19 +01:00
Alexis Svinartchouk
c01fc332d2 Convert window-progress.spec.js to typescript
Change-type: patch
2020-01-27 12:35:19 +01:00
Alexis Svinartchouk
b8fdbc3e94 Convert middle-ellipsis.spec.js to typescript
Change-type: patch
2020-01-27 12:35:18 +01:00
Alexis Svinartchouk
3c7c55364b Convert file-extensions.spc.js to typescript
Change-type: patch
2020-01-27 12:35:18 +01:00
Alexis Svinartchouk
bff4355a1a Convert messages.spec.js to typescript
Change-type: patch
2020-01-27 12:35:17 +01:00
Alexis Svinartchouk
9ea57a7df1 Convert units.spc.js to typescript
Change-type: patch
2020-01-27 12:35:17 +01:00
Alexis Svinartchouk
4c4171e7fb Remove no longer used prop-types
Change-type: patch
2020-01-27 12:35:16 +01:00
Alexis Svinartchouk
77ece044ad Replace <React.Fragment> with <>
Change-type: patch
2020-01-27 12:35:16 +01:00
Alexis Svinartchouk
d633b36b23 Remove useless export.
Change-type: patch
2020-01-27 12:35:15 +01:00
Alexis Svinartchouk
2eda6601c0 Remove remaining Promise.then
Change-type: patch
2020-01-27 12:35:15 +01:00
Alexis Svinartchouk
6202393637 Don't run eslint on lib, run ts-lint on webpack.config.ts
Change-type: patch
2020-01-27 12:35:14 +01:00
Alexis Svinartchouk
1b76044242 Convert image-selector.jsx to typescript
Change-type: patch
2020-01-27 12:35:14 +01:00
Alexis Svinartchouk
28648e27cf Convert DriveSelectorModal.jsx to typescript
Change-type: patch
2020-01-27 12:35:14 +01:00
Alexis Svinartchouk
90921a74ea Convert target-selector.jsx to typescript
Also fix showing the drive compatibility warnings

Change-type: patch
2020-01-27 12:35:13 +01:00
Alexis Svinartchouk
950b764ff1 Convert progress-button.jsx to typescript
Change-type: patch
2020-01-27 12:35:13 +01:00
Alexis Svinartchouk
15ba30bf8f Convert save-webview.jsx to typescript
Change-type: patch
2020-01-27 12:35:12 +01:00
Alexis Svinartchouk
c96654d50f Convert reduced-flashing-infos.jsx to typescript
Change-type: patch
2020-01-27 12:35:12 +01:00
Alexis Svinartchouk
b5f175d220 Convert svg-icon.jsx to typescript
Change-type: patch
2020-01-27 12:35:12 +01:00
Alexis Svinartchouk
c535543922 Convert featured-project.jsx to typescript
Change-type: patch
2020-01-27 12:35:11 +01:00
Alexis Svinartchouk
9913030e6f Remove eslint comments from tsx file
Change-type: patch
2020-01-27 12:35:11 +01:00
Alexis Svinartchouk
e7f58fc7fa Convert webpack.config.js to typescript
Change-type: patch
2020-01-27 12:35:10 +01:00
Alexis Svinartchouk
746ee50027 Convert start.js to typescript
Change-type: patch
2020-01-27 12:35:10 +01:00
Alexis Svinartchouk
683c2da224 Convert etcher.js to typescript
Change-type: patch
2020-01-27 12:35:10 +01:00
Alexis Svinartchouk
2671c83337 Use Dictionary type from lodash
Change-type: patch
2020-01-27 12:35:09 +01:00
Alexis Svinartchouk
bd35c89c04 Convert app.js to typescript
Change-type: patch
2020-01-27 12:35:09 +01:00
Alexis Svinartchouk
616baecafb Convert dialog.js to typescript
Changeètype: patch
2020-01-27 12:35:09 +01:00
Alexis Svinartchouk
bfe895c690 Convert image-writer.js to typescript
Change-type: patch
2020-01-27 12:35:08 +01:00
Alexis Svinartchouk
97aff2eb4c Convert child-writer.js to typescript
Change-type: patch
2020-01-21 17:54:17 +01:00
Alexis Svinartchouk
1c46ee2988 Convert flash-state.js to typescript
Change-type: patch
2020-01-21 17:54:15 +01:00
Alexis Svinartchouk
d0d4ee843d Convert selection-state.js to typescript
Change-type: patch
2020-01-21 17:54:14 +01:00
Alexis Svinartchouk
fd127da342 Convert available-drives.js to typescript
Change-type: patch
2020-01-21 17:54:12 +01:00
Alexis Svinartchouk
a8728336ca Convert store.js to typescript
Change-type: patch
2020-01-21 17:54:11 +01:00
Alexis Svinartchouk
c0eb9bd1e9 Convert settings.js to typescript
Change-type: patch
2020-01-21 17:54:10 +01:00
Alexis Svinartchouk
c85896845f Convert drive-constraints.js to typescript
Change-type: patch
2020-01-21 17:54:08 +01:00
Alexis Svinartchouk
efe953d8cd Convert permissions.js to typescript
Change-type: patch
2020-01-21 17:54:07 +01:00
Alexis Svinartchouk
b5593ef5b2 Convert utils.js to typescript
Change-type: patch
2020-01-21 17:54:05 +01:00
Alexis Svinartchouk
d08d2e00ee Convert messages.js to typescript
Change-type: patch
2020-01-21 17:54:04 +01:00
Alexis Svinartchouk
bc8908cca1 Convert units.js to typescript
Change-type: patch
2020-01-21 17:54:02 +01:00
Alexis Svinartchouk
9109f0ccd5 Convert errors.js to typescript
Change-type: patch
2020-01-21 17:54:01 +01:00
Alexis Svinartchouk
30c2ef58cd Convert supported-formats.js to typescript
Change-type: patch
2020-01-21 17:54:00 +01:00
Alexis Svinartchouk
23b295c7c1 Convert file-extensions.js to typescript
Change-type: patch
2020-01-21 17:53:58 +01:00
Alexis Svinartchouk
db24ee4d37 Convert catalina-sudo/sudo.js to typescript
Change-type: patch
2020-01-21 17:53:57 +01:00
Alexis Svinartchouk
e737a1edbd Convert exit-codes.js to typescript
Change-type: patch
2020-01-21 17:53:55 +01:00
Alexis Svinartchouk
109d84302c Remove no longer used storage.js and its tests
Change-type: patch
2020-01-21 17:53:54 +01:00
Alexis Svinartchouk
e50974a86a Convert local-settings.js to typescript
Change-type: patch
2020-01-21 17:53:53 +01:00
Alexis Svinartchouk
ef491e1e96 Remove no longer used lib/gui/app/models/files.js and its tests
Change-type: patch
2020-01-21 17:53:51 +01:00
Alexis Svinartchouk
f366a68159 Convert theme.js to typescript
Change-type: patch
2020-01-21 17:53:50 +01:00
Alexis Svinartchouk
0377faadd6 Convert drive-scanner.js to typescript
Change-type: patch
2020-01-21 17:53:48 +01:00
Alexis Svinartchouk
a5825373e1 Convert analytics.js to typescript
Change-type: patch
2020-01-21 17:53:47 +01:00
Alexis Svinartchouk
fadfadd9e9 Convert exception-reporter.js to typescript
Change-type: patch
2020-01-21 17:53:46 +01:00
Alexis Svinartchouk
596b316d65 Convert update-lock.js to typescript
Change-type: patch
2020-01-21 17:53:44 +01:00
Alexis Svinartchouk
c1e24406d9 Convert notification.js to typescript
Change-type: patch
2020-01-21 17:53:42 +01:00
Alexis Svinartchouk
13dfb090b5 Convert open-external.js to typescript
Change-type: patch
2020-01-21 17:53:41 +01:00
Alexis Svinartchouk
ddd1ff0101 Convert progress-status.js and window-progress.js to typescript
Change-type: patch
2020-01-21 17:53:39 +01:00
Alexis Svinartchouk
b266a72726 Convert window-network-drives.js to typescript
Change-type: patch
2020-01-21 17:53:37 +01:00
Alexis Svinartchouk
255fae3a90 Convert middle-ellipsis.js to typescript
Change-type: patch
2020-01-21 17:53:35 +01:00
Alexis Svinartchouk
b4a60cfee2 Remove unused styled-components.js
Change-type: patch
2020-01-21 17:53:34 +01:00
Alexis Svinartchouk
233a2e6400 Convert menu.js to typescript
Change-type: patch
2020-01-21 17:53:32 +01:00
Alexis Svinartchouk
f31cb49e2a Don't use prop-types in drive selector
Change-type: patch
2020-01-21 17:53:31 +01:00
Alexis Svinartchouk
47fd12e7a4 Remove html-angular-validate
Change-type: patch
2020-01-21 17:53:29 +01:00
Alexis Svinartchouk
d5eb679cf0 Remove remaining angular
Change-type: patch
2020-01-21 17:53:28 +01:00
Alexis Svinartchouk
26d0e46367 Convert angular SafeWebview to typescript
Change-type: patch
2020-01-21 17:53:26 +01:00
Alexis Svinartchouk
146bfaa9de Remove unused StateController.previousName
Change-type: patch
2020-01-21 17:53:25 +01:00
Alexis Svinartchouk
315051c14c Remove useless 'use strict' from a ts file
Change-type: patch
2020-01-21 17:53:23 +01:00
Alexis Svinartchouk
3a7d770f6d Remove no longer used angular flash-another component
Change-type: patch
2020-01-21 17:53:22 +01:00
Alexis Svinartchouk
2cd60af841 Remove no longer used angular flash-results component
Change-type: patch
2020-01-21 17:53:21 +01:00
Alexis Svinartchouk
e2f5775b07 Remove no longer needed angular specific utils.memoize
Change-type: patch
2020-01-21 17:53:19 +01:00
Alexis Svinartchouk
c27be733a9 Remove no longer used angular-ui-bootstrap
Change-type: patch
2020-01-21 17:53:18 +01:00
Alexis Svinartchouk
54fda697ce Remove no longer used .section-footer-main css rules
Change-type: patch
2020-01-21 17:53:16 +01:00
Alexis Svinartchouk
04e0b56dd5 Remove no longer used angular svg-icon component
Changelog-entry: Remove no longer used angular svg-icon component
Change-type: patch
2020-01-21 17:53:15 +01:00
Alexis Svinartchouk
b71824c5e8 Remove no longer used angular-if-state
Change-type: patch
2020-01-21 17:53:13 +01:00
Alexis Svinartchouk
65293ea5e4 Remove no longer used ModalService
Change-type: patch
2020-01-21 17:53:12 +01:00
Alexis Svinartchouk
05c2f5bebd Remove no longer used closestUnit angular filter
Changelog-entry: Remove no longer used closestUnit angular filter
Change-type: patch
2020-01-21 17:53:09 +01:00
Lorenzo Alberto Maria Ambrosi
e8b2255be0
Merge pull request #3035 from balena-io/trigger-update-1.5.71
Trigger update for 1.5.71
2020-01-17 16:36:40 +01:00
Lorenzo Alberto Maria Ambrosi
2c227d3475
Trigger update for 1.5.71
Change-type: none
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-01-17 12:11:01 +01:00
Balena CI
958f7b535a v1.5.71 2020-01-14 18:17:04 +02:00
Lorenzo Alberto Maria Ambrosi
9e34096139
Merge pull request #3024 from balena-io/update-resin-corvus
Update resin-corvus to 2.0.5
2020-01-14 17:15:04 +01:00
Alexis Svinartchouk
12b5536e22 Don't webpack package.json as analytics tokens are interted after webpacking
Change-type: patch
2020-01-14 15:11:44 +01:00
Lorenzo Alberto Maria Ambrosi
171a5b1793 Update scripts submodule
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-01-13 21:50:11 +01:00
Lorenzo Alberto Maria Ambrosi
b4fb82066b Update resin-corvus to 2.0.5
Change-type: patch
Changelog-entry: Update resin-corvus to 2.0.5
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2020-01-13 21:36:54 +01:00
Balena CI
57145436ab v1.5.70 2019-12-13 20:27:43 +02:00
Lorenzo Alberto Maria Ambrosi
cba69ca467
Merge pull request #2987 from balena-io/remove-angular
Remove angular
2019-12-13 19:25:52 +01:00
Alexis Svinartchouk
375fcab788 Remove no longer used HeaderController
Change-type: patch
2019-12-13 12:28:23 +01:00
Lorenzo Alberto Maria Ambrosi
de65c02222 Make header draggable again
Change-type: patch
Changelog-entry: Make header draggable again
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-12 18:25:56 +01:00
Lorenzo Alberto Maria Ambrosi
444b0beaca Refactor drive selector and confirm modal to React
Change-type: patch
Changelog-entry: Refactor drive selector and confirm modal to React
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-12 18:25:56 +01:00
Alexis Svinartchouk
4c931278b8 Remove angular os-open-external directive
Change-type: patch
2019-12-12 18:25:55 +01:00
Alexis Svinartchouk
3bdac794b3 React header
Change-type: patch
2019-12-12 18:25:55 +01:00
Alexis Svinartchouk
67eb593164 Remove manifest-bind
Change-type: patch
2019-12-12 18:25:54 +01:00
Alexis Svinartchouk
fe230e7d30 Rename resin -> balena
Change-type: patch
2019-12-12 18:25:54 +01:00
Alexis Svinartchouk
2f0ce3ee37 Only run prettier on ts and tsx files 2019-12-12 18:25:53 +01:00
Stevche Radevski
992b8a6fb6 Fix layout when flashing
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:25:53 +01:00
Alexis Svinartchouk
84e45caa6c Rework lib/gui/app/styled-components to typescript
Change-type: patch
Changelog-entry: Rework lib/gui/app/styled-components to typescript
2019-12-12 18:25:52 +01:00
Lorenzo Alberto Maria Ambrosi
68d9542816 Convert FlashAnother & FlashResults to typescript
Change-type: patch
Changelog-entry: Convert FlashAnother & FlashResults to typescript
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-12 18:25:52 +01:00
Lorenzo Alberto Maria Ambrosi
c9c9c50d6c Rework finish page with React
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-12-12 18:25:51 +01:00
Stevche Radevski
9f4e0ce920 Add husky and lint-staged to run linting on commit
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:25:51 +01:00
Stevche Radevski
388852d6b7 Move a couple of files to typescript and remove unnecessary $timeout
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:25:51 +01:00
Stevche Radevski
4e1f071951 Change Flash and Driveselector extension to .tsx
This is so the git history is preserved for the file

Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:25:50 +01:00
Stevche Radevski
8e47829905 Move the main controller to React
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:25:43 +01:00
Alexis Svinartchouk
84fe5004a9 Remove broken settings shortcut from menu
Change-type: patch
2019-12-12 18:09:19 +01:00
Alexis Svinartchouk
28b51a9b46 Remove unused imports in main.js
Change-type: patch
2019-12-12 18:09:18 +01:00
Alexis Svinartchouk
07fc7af911 Remove experimental file picker
Change-type: patch
2019-12-12 18:09:18 +01:00
Alexis Svinartchouk
330405ae42 Remove tooltip-modal scss import
Change-type: patch
2019-12-12 18:09:17 +01:00
Lucian
ffb26ba67f Remove unused methods from drive selector component
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-12 18:09:17 +01:00
Lucian
fc597abbc9 Add sourcemap and elevate theme provider
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-12 18:09:16 +01:00
Lucian
177f10f76d Refactor tooltip modal to use react
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-12 18:09:16 +01:00
Lucian
a7a7f83e3e Fix link hover color
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-12 18:09:15 +01:00
Lucian
b6fb44d6a5 Fix bug where images can't be reselected
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-12 18:09:15 +01:00
Alexis Svinartchouk
996c2b55a4 Run make sass
Change-type: patch
2019-12-12 18:09:14 +01:00
Stevche Radevski
21d9d31a27 Use rendition modal for warning and errors when flashing
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-12 18:09:05 +01:00
Lucian
00536cba3a Refactor Warning modal in image selection 2019-12-10 12:35:42 +01:00
Lucian
641dde81e5 Refactor image-selection
Change-type: patch
Changelog-entry: Use React instead of Angular for image selection
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-10 12:35:42 +01:00
Thodoris Greasidis
8177e98014 Refactor the DriveSelector to use async-await
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-12-10 12:35:42 +01:00
Thodoris Greasidis
abfc6be84d Convert the drive selection step to React
Change-type: patch
Changelog-entry: Convert the drive selection step to React
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
2019-12-10 12:35:42 +01:00
Stevche Radevski
1d15d582d9 chore: move flash step to React
Changelog-entry: chore: move flash step to React
Change-type: patch
Signed-off-by: Stevche Radevski <stevche@balena.io>
2019-12-10 12:35:42 +01:00
Lucian
5cd3c5fcc0 Refactor image-selection
Change-type: patch
Changelog-entry: Use React instead of Angular for image selection
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
2019-12-10 12:35:42 +01:00
Balena CI
5e568d7dd8 v1.5.69 2019-12-10 13:35:21 +02:00
Alexis Svinartchouk
c251bce44d
Merge pull request #3007 from balena-io/fix-appimage
Don't add --no-sandbox when ELECTRON_RUN_AS_NODE is 1
Fixes #2996
2019-12-10 12:33:28 +01:00
Alexis Svinartchouk
1408dd48a1 Don't add --no-sandbox when ELECTRON_RUN_AS_NODE true
Changelog-entry: Don't add --no-sandbox when ELECTRON_RUN_AS_NODE true
Change-type: patch
2019-12-10 11:04:01 +01:00
Balena CI
a77734797a v1.5.68 2019-12-09 11:44:03 +02:00
Lorenzo Alberto Maria Ambrosi
a119ae7efa
Merge pull request #3005 from balena-io/add-version-settings
Add version in settings modal
2019-12-09 10:41:53 +01:00
Lorenzo Alberto Maria Ambrosi
7d284a7e18 Add version in settings modal
Change-type: patch
Changelog-entry: Add version in settings modal
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-08 17:25:11 +01:00
Balena CI
4d65bd9f1b v1.5.67 2019-12-06 13:50:04 +02:00
Alexis Svinartchouk
517511e5be
Merge pull request #3000 from balena-io/fix-macos-elevation-in-development
Fix elevation on macos in development
2019-12-06 12:48:17 +01:00
Alexis Svinartchouk
2ef38fe06d Fix elevation on macos in development
Changelog-entry: Fix elevation on macos in development
Change-type: patch
2019-12-06 01:25:24 +01:00
Balena CI
b128d36121 v1.5.66 2019-12-03 18:30:04 +02:00
Alexis Svinartchouk
082025f0b6
Merge pull request #2932 from balena-io/electron6
Electron6
2019-12-03 17:28:09 +01:00
Alexis Svinartchouk
220b7f6d53 Remove usage of deprecated componentWillReceiveProps
Change-type: patch
2019-12-03 15:41:33 +01:00
Alexis Svinartchouk
062723bf15 Fix typing in settings.tsx
Change-type: patch
2019-12-03 15:35:52 +01:00
Alexis Svinartchouk
bcbbb64042 Update dependencies after rebase
Change-type: patch
2019-12-03 15:35:52 +01:00
Alexis Svinartchouk
59230a0f9e Fix windows elevation module import
Change-type: patch
2019-12-03 13:48:47 +01:00
Alexis Svinartchouk
18fb9c9de3 Package dll files (needed for lzma_native on windows)
Change-type: patch
2019-12-03 13:48:47 +01:00
Alexis Svinartchouk
26e827e4dc Update electron to 6.1.4
Change-type: patch
2019-12-03 13:48:47 +01:00
Alexis Svinartchouk
2f828b1d39 Wrapper script for linux to add --no-sandbox when running as root
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
5b22fcc2f5 Remove unused script
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
4f36b00ec3 Simplify webpack config
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
707c20513e Simplify electron-builder files config
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
cddd068887 Update spectron to ^8
Changelog-entry: Update spectron to ^8
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
cf6863b2c6 Update dependencies, get node-usb from npm
Changelog-entry: Update dependencies, get node-usb from npm
Change-type: patch
2019-12-03 13:45:11 +01:00
Alexis Svinartchouk
994d311ed3 Update nan to ^2.14
Changelog-entry: Update nan to ^2.14
Change-type: patch
2019-12-03 13:23:45 +01:00
Alexis Svinartchouk
1098f8cb1e Use the same entrypoint for etcher and the child writer
Changelog-entry: Use the same entrypoint for etcher and the child writer
Change-type: patch
2019-12-03 13:23:45 +01:00
Alexis Svinartchouk
1be1a2b8f7 Require angular-mocks only when needed
Changelog-entry: Require angular-mocks only when needed
Change-type: patch
2019-12-03 13:23:45 +01:00
Alexis Svinartchouk
07a6e40917 Remove no longer needed pkg dev dependency
Changelog-entry: Remove no longer needed pkg dev dependency
Change-type: patch
2019-12-03 13:09:58 +01:00
Alexis Svinartchouk
2c2057b5cb Update mocha, remove nock
Changelog-entry: Update mocha, remove nock
Change-type: patch
2019-12-03 13:09:24 +01:00
Alexis Svinartchouk
caf09e7498 Remove no longer needed xml2js
Changelog-entry: Remove no longer needed xml2js
Change-type: patch
2019-12-03 13:09:24 +01:00
Alexis Svinartchouk
9488468b67 Remove node-pre-gyp patch that is no longer needed with electron 6
Changelog-entry: Remove node-pre-gyp patch that is no longer needed with electron 6
Change-type: patch
2019-12-03 13:09:24 +01:00
Alexis Svinartchouk
d071bf8ade Update electron-mocha to ^8.1.2, remove acorn
Changelog-entry: Update electron-mocha to ^8.1.2, remove acorn
Change-type: patch
2019-12-03 13:09:24 +01:00
Alexis Svinartchouk
1626c01ff4 Update electron to 6.0.10
Change-type: patch
Changelog-entry: Update electron to 6.0.10
2019-12-03 13:09:24 +01:00
Balena CI
3dd6895662 v1.5.65 2019-12-03 12:08:43 +02:00
Lorenzo Alberto Maria Ambrosi
0ab967b7a4
Merge pull request #2965 from balena-io/revamp-settings
Refactor settings page into modal
2019-12-03 11:06:43 +01:00
Lorenzo Alberto Maria Ambrosi
3b07946065 Convert settings modal to typescript
Change-type: patch
Changelog-entry: Convert settings modal to typescript
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-02 16:26:52 +01:00
Lorenzo Alberto Maria Ambrosi
4c0a079d1e Refactor settings page into modal
Change-type: patch
Changelog-entry: Refactor settings page into modal
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-12-02 16:26:52 +01:00
Balena CI
1878b39e21 v1.5.64 2019-11-27 16:11:49 +02:00
Alexis Svinartchouk
7050111bf4
Merge pull request #2973 from balena-io/use-bash
Use bash instead of sh for running the elevated process on Linux and Mac
2019-11-27 15:09:43 +01:00
Alexis Svinartchouk
572f7d826a Use bash instead of sh for running the elevated process on Linux and Mac
Change-type: patch
Changelog-entry: Use bash instead of sh for running the elevated process on Linux and Mac
2019-11-22 15:45:27 +01:00
Balena CI
a155811678 v1.5.63 2019-11-08 15:02:17 +02:00
Dimitrios Lytras
54ccee3c0f
Merge pull request #2964 from balena-io/add-faq
docs: Introduce an FAQ file
2019-11-08 15:00:13 +02:00
Dimitrios Lytras
88b7665b7f docs: Introduce an FAQ file
Much needed file in order to generate the FAQ section for the website using Landr

Changelog-entry: Introduce an FAQ file
Change-type: patch
Signed-off-by: Dimitrios Lytras dnlytras@gmail.com
2019-11-08 13:31:45 +02:00
Balena CI
a66007f8cc v1.5.62 2019-11-06 19:38:02 +02:00
Alexis Svinartchouk
d5f348c039
Merge pull request #2963 from balena-io/update-drivelist
Update drivelist to 8.0.9
2019-11-06 18:35:42 +01:00
Alexis Svinartchouk
c0d1899ad3 Update drivelist to 8.0.9
Changelog-entry: Update drivelist to 8.0.9
Change-type: patch
2019-11-06 17:20:24 +01:00
Balena CI
ea14ef6314 v1.5.61 2019-11-06 04:04:10 +02:00
Alexis Svinartchouk
75e6f1e39a
Merge pull request #2939 from balena-io/update-macos-catalina
Make Etcher work on macOS Catalina
2019-11-06 02:55:46 +01:00
Alexis Svinartchouk
f372fba1fd Don't use electron-is-running-in-asar, fix AppImage builds
Change-type: patch
2019-11-05 18:36:01 +01:00
Alexis Svinartchouk
d494cee0da Don't spell check scripts
Change-type: patch
2019-11-05 18:36:01 +01:00
Alexis Svinartchouk
1b8380c5dc Update scripts repo as electron-builder's build command was renamed electron-builder
Change-type: patch
2019-11-05 18:36:01 +01:00
Alexis Svinartchouk
1ee2eb05eb Update electron-builder to ^22
Change-type: patch
2019-11-05 00:49:15 +01:00
Alexis Svinartchouk
9b82891abb Use sudo instead of sudo-prompt on macOS >= Catalina
Change-type: patch
2019-11-05 00:49:15 +01:00
Alexis Svinartchouk
64a28f891f Don't pack files in an asar archive on macOS
Change-type: patch
2019-11-05 00:49:15 +01:00
Lorenzo Alberto Maria Ambrosi
c4944f31d6 Notarize app on macOS
Change-type: patch
Changelog-entry: Notarize app on macOS
2019-11-04 14:47:56 +01:00
Balena CI
6fd696546c v1.5.60 2019-10-18 14:33:17 +03:00
Alexis Svinartchouk
e957dab993
Merge pull request #2937 from balena-io/ext2fs-1.0.30
ext2fs: upgrade ext2fs to 1.0.30
2019-10-18 13:31:03 +02:00
Matthew McGinn
831e7af9ed ext2fs: upgrade ext2fs to 1.0.30
Changelog-entry: Upgrade ext2fs to 1.0.30
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-10-18 10:45:05 +02:00
Balena CI
8ab779ffb9 v1.5.59 2019-10-14 16:36:42 +03:00
Alexis Svinartchouk
506f9bf0e0
Merge pull request #2931 from balena-io/roman/debugging
Catch console log messages from SafeWebView
2019-10-14 15:34:13 +02:00
Roman Mazur
5151d751a3
Catch console log messages from SafeWebView
This simplifies debugging of the content loaded by Etcher,
including analysis of loaded analytics libraries.

Changelog-entry: Catch console log messages from SafeWebView
Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-10-14 13:46:44 +03:00
Balena CI
bde9a97b17 v1.5.58 2019-10-10 13:09:09 +03:00
Dimitrios Lytras
cede823a33
docs: Remove leftover GH-pages configuration file (#2923)
docs: Remove leftover GH-pages configuration file
2019-10-10 13:06:53 +03:00
Dimitrios Lytras
dda2f6eb70 docs: Remove leftover GH-pages configuration file
Changelog-entry: Remove leftover GH-pages configuration file
Change-type: patch
Signed-off-by: Dimitrios Lytras dnlytras@gmail.com
2019-10-10 12:21:40 +03:00
Balena CI
c54f2e08c2 v1.5.57 2019-09-17 16:25:19 +03:00
Alexis Svinartchouk
2a2e025ef7
Merge pull request #2906 from balena-io/fix-entrypoint
Fix entrypoint when options are passed to electron
2019-09-17 15:23:42 +02:00
Alexis Svinartchouk
93ea4efb33 Fix entrypoint when options are passed to electron
Change-type: patch
Changelog-entry: Fix entrypoint when options are passed to electron
2019-09-17 00:32:32 +02:00
Resin CI
284301a659 v1.5.56 2019-08-20 17:43:38 +03:00
Lorenzo Alberto Maria Ambrosi
8425dd9aa7
Merge pull request #2885 from balena-io/fix-win-download
Fix windows portable download
2019-08-20 16:41:50 +02:00
Lorenzo Alberto Maria Ambrosi
02bd8ed459
Fix windows portable download
Change-type: patch
Changelog-entry: Fix windows portable download
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-08-20 15:41:27 +02:00
Resin CI
25a7cf18cf v1.5.55 2019-08-20 14:23:35 +03:00
Alexis Svinartchouk
003929754d
Merge pull request #2883 from balena-io/update-etcher-sdk
Update etcher-sdk to ^2.0.13
2019-08-20 13:21:42 +02:00
Alexis Svinartchouk
f6c0172257 Update etcher-sdk to ^2.0.13
Change-type: patch
Changelog-entry: Update etcher-sdk to ^2.0.13
2019-08-19 17:25:58 +02:00
Resin CI
75be3a3778 v1.5.54 2019-08-19 14:08:36 +03:00
Lorenzo Alberto Maria Ambrosi
5cfb95e8ea
Merge pull request #2875 from balena-io/fix-auto-updater
Fix auto updater
2019-08-19 13:06:39 +02:00
Lorenzo Alberto Maria Ambrosi
8c2c4e233a Fix auto-updater check for updates
Change-type: patch
Changelog-entry: Fix auto-updater check for updates
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-08-07 18:43:16 +02:00
Resin CI
f4ac4dee60 v1.5.53 2019-08-06 15:45:22 +03:00
Lorenzo Alberto Maria Ambrosi
1b4053d959
Merge pull request #2864 from balena-io/add-typescript-2
Allow typescript files
2019-08-06 14:43:25 +02:00
Lorenzo Alberto Maria Ambrosi
8df5d972fc Allow typescript files
Change-type: patch
Changelog-entry: Allow typescript files
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-08-05 16:31:50 +02:00
Lorenzo Alberto Maria Ambrosi
3a68d84376
Merge pull request #2863 from balena-io/trigger-update-1.5.52
Trigger update for 1.5.52
2019-07-31 13:01:09 +02:00
Lorenzo Alberto Maria Ambrosi
865ea0ddd2 Trigger update for 1.5.52
Change-type: none
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-07-24 10:19:42 +02:00
Resin CI
54dca31d66 v1.5.52 2019-07-23 15:59:09 +03:00
Alexis Svinartchouk
17103570f1
Merge pull request #2862 from balena-io/fix-windows-mapped-network-drives-vmware
Don't use wmic's ProviderName if it's empty
2019-07-23 14:56:47 +02:00
Alexis Svinartchouk
b5d04a2031 Don't use wmic's ProviderName if it's empty
Changelog-entry: Don't use wmic's ProviderName if it's empty
Change-type: patch
2019-07-22 19:40:01 +02:00
Resin CI
86238af380 v1.5.51 2019-06-28 16:04:34 +03:00
Alexis Svinartchouk
d10073a052
Merge pull request #2842 from balena-io/update-sudo-prompt
Update sudo-prompt to ^9.0.0
2019-06-28 15:02:51 +02:00
Alexis Svinartchouk
b99b0d4bf8 Update sudo-prompt to ^9.0.0
Change-type: patch
Changelog-entry: Update sudo-prompt to ^9.0.0
2019-06-28 14:00:49 +02:00
Resin CI
27b5b1bf10 v1.5.50 2019-06-14 16:43:18 +03:00
Alexis Svinartchouk
bab9069dee
Merge pull request #2702 from balena-io/trim
Trim
2019-06-14 15:41:29 +02:00
Alexis Svinartchouk
52a3258814 Option for trimming ext partitions on raw images
Changelog-entry: Option for trimming ext partitions on raw images
Change-type: patch
2019-06-13 20:00:20 +02:00
Alexis Svinartchouk
da548f59d1 Replace promise chains with async/await in child-writer
Change-type: patch
2019-06-13 18:42:41 +02:00
Resin CI
ecc500907c v1.5.49 2019-06-13 19:42:18 +03:00
Alexis Svinartchouk
724dade1f6
Merge pull request #2830 from balena-io/etcher-pro
Make window size configurable
2019-06-13 18:39:30 +02:00
Alexis Svinartchouk
c5dc869c03 Make window size configurable
Change-type: patch
Changelog-entry: Make window size configurable
2019-06-13 17:23:49 +02:00
Resin CI
273f7e4535 v1.5.48 2019-06-13 17:30:09 +03:00
Alexis Svinartchouk
a58e060138
Merge pull request #2829 from balena-io/dont-elevate-when-root
Don't use sudo-prompt when already elevated
2019-06-13 16:26:48 +02:00
Alexis Svinartchouk
ef4d2fcc72 Don't use sudo-prompt when already elevated
Changelog-entry: Don't use sudo-prompt when already elevated
Change-type: patch
2019-06-13 15:22:10 +02:00
Resin CI
330c06d926 v1.5.47 2019-06-12 16:30:52 +03:00
Lorenzo Alberto Maria Ambrosi
be9c36828a
Merge pull request #2795 from balena-io/bump-styled-components-system
Upgrade rendition to v8
2019-06-12 15:28:08 +02:00
Lorenzo Alberto Maria Ambrosi
17f83135c5 Rework drive-selector with react + rendition
Change-type: patch
Changelog-entry: Rework drive-selector with react + rendition
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-06-10 11:43:47 +02:00
Lorenzo Alberto Maria Ambrosi
543ba51d3c Add first rendition theme configs
Change-type: patch
Changelog-entry: Use rendition theme property for step buttons
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-06-10 11:43:47 +02:00
Lorenzo Alberto Maria Ambrosi
33df23fc8c Upgrade styled-system to v4.1.0
Change-type: patch
Changelog-entry: Upgrade styled-system to v4.1.0
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-06-10 11:43:47 +02:00
Lorenzo Alberto Maria Ambrosi
3236d6b934 Upgrade rendition to v8.7.2
Change-type: patch
Changelog-entry: Upgrade rendition to v8.7.2
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-06-10 11:43:47 +02:00
Resin CI
e0e7775367 v1.5.46 2019-06-09 17:09:46 +03:00
Alexis Svinartchouk
198679583c
Merge pull request #2827 from balena-io/update-ext2fs
Update ext2fs to 1.0.29
2019-06-09 16:07:37 +02:00
Alexis Svinartchouk
6dae2a604f Update ext2fs to 1.0.29
Change-type: patch
Changelog-entry: Update ext2fs to 1.0.29
2019-06-09 14:18:17 +02:00
Resin CI
68905c6ae4 v1.5.45 2019-06-04 12:58:44 +03:00
Alexis Svinartchouk
26630c4d64
Merge pull request #2823 from balena-io/trigger-build
Empty commit to trigger build
2019-06-04 11:56:24 +02:00
Alexis Svinartchouk
d382f030f0 Empty commit to trigger build
Change-type: patch
Changelog-entry: Empty commit to trigger build
2019-06-04 10:59:01 +02:00
Resin CI
08fca87b2f v1.5.44 2019-06-03 21:16:49 +03:00
Alexis Svinartchouk
33441a1c5c
Merge pull request #2803 from balena-io/fix-windows-elevation
Fix elevation on windows when the path contains "&" or "'"
2019-06-03 20:14:45 +02:00
Alexis Svinartchouk
6d8346b13a Fix elevation on windows when the path contains "&" or "'"
Change-type: patch
Changelog-entry: Fix elevation on windows when the path contains "&" or "'"
2019-05-29 17:52:01 +02:00
Resin CI
d9b340ca45 v1.5.43 2019-05-28 21:59:10 +03:00
Lorenzo Alberto Maria Ambrosi
ebbc52ee1f
Merge pull request #2806 from balena-io/rollback-update-webpack
Rollback update webpack
2019-05-28 20:57:06 +02:00
Lorenzo Alberto Maria Ambrosi
de5bee29ef Revert "Include sass in webpack configs"
This reverts commit 156c25cea19bc4a382bb7ce672304546ce476d37.

Change-type: patch
Changelog-entry: Revert "Include sass in webpack configs"
2019-05-28 19:34:12 +02:00
Resin CI
25f843ec0b v1.5.42 2019-05-28 17:41:14 +03:00
Lorenzo Alberto Maria Ambrosi
df600a9e14
Merge pull request #2794 from balena-io/update-webpack
Add sass-loader to webpack configs
2019-05-28 16:38:55 +02:00
Lorenzo Alberto Maria Ambrosi
156c25cea1 Include sass in webpack configs
Change-type: patch
Changelog-entry: Include sass in webpack configs
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-05-28 11:08:54 +02:00
Resin CI
f7dd04e3de v1.5.41 2019-05-27 16:59:31 +03:00
Alexis Svinartchouk
3036d86cfa
Merge pull request #2801 from mhajder/patch-1
waffle.io removal and adding a link to the license
2019-05-27 15:57:19 +02:00
Mateusz Hajder
3fccd52884 waffle.io removal and adding a link to the license
Change-type: patch
Changelog-entry: waffle.io removal and adding a link to the license
2019-05-27 14:56:17 +02:00
Resin CI
00640274fc v1.5.40 2019-05-27 13:16:18 +03:00
Lorenzo Alberto Maria Ambrosi
a7e8fb98b3
Merge pull request #2799 from balena-io/combine-ia32-and-x64-2
Combine ia32 and x64 2
2019-05-27 12:14:09 +02:00
Alexis Svinartchouk
bed6643437 Remove some unused files from the packages
Change-type: patch
2019-05-24 11:26:45 +02:00
Alexis Svinartchouk
f815e8511f Build packages that support both ia32 and x64 on windows
Changelog-entry: windows installer and portable version support both ia32 and x64
Change-type: patch
2019-05-21 18:02:06 +02:00
Resin CI
6360fd42e7 v1.5.39 2019-05-14 13:27:35 +03:00
Lorenzo Alberto Maria Ambrosi
62a9656888
Merge pull request #2768 from balena-io/clean-shrinkwrap
Add clean-shrinkwrap script to postshrinkwrap step
2019-05-14 12:25:05 +02:00
Lorenzo Alberto Maria Ambrosi
ffb89c7e5b Update scripts submodule to v1.5.2
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-05-14 09:39:48 +02:00
Lorenzo Alberto Maria Ambrosi
aa52735006 Add clean-shrinkwrap script to postshrinkwrap step
Change-type: patch
Changelog-entry: Add clean-shrinkwrap script to postshrinkwrap step
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-05-14 09:39:48 +02:00
Resin CI
b65526d8ee v1.5.38 2019-05-14 01:47:31 +03:00
Carlo Maria Curinga
ea8e2999ae
Merge pull request #2786 from balena-io/add-mention-to-usbboot-devices
add mention to usbboot devices support
2019-05-14 00:45:00 +02:00
Carlo Maria Curinga
0b5017f992
add mention to usbboot devices support
Change-type: patch
Changelog-entry: Add mention to usbboot compatibility
Signed-off-by: Carlo Maria Curinga carlo@balena.io
2019-05-13 23:38:13 +02:00
Resin CI
8bf1bdaa04 v1.5.37 2019-05-13 20:53:18 +03:00
Lorenzo Alberto Maria Ambrosi
01eb3b1c94
Merge pull request #2783 from balena-io/bump-react
Bump react to v16.8.5
2019-05-13 19:51:00 +02:00
Lorenzo Alberto Maria Ambrosi
3402c9f601
Bump react to v16.8.5
Change-type: patch
Changelog-entry: Bump react dependency to v16.8.5
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-05-13 15:09:23 +02:00
Resin CI
13c3518c5e v1.5.36 2019-05-13 15:35:11 +03:00
Alexis Svinartchouk
821fad27dc
Merge pull request #2782 from balena-io/sdk-2.0.9
Update etcher-sdk to ^2.0.9
2019-05-13 14:32:51 +02:00
Alexis Svinartchouk
50a34e2f4c Update etcher-sdk to ^2.0.9
Changelog-entry: Update etcher-sdk to ^2.0.9
Change-type: patch
2019-05-13 12:51:39 +02:00
Resin CI
2a19b2afbe v1.5.35 2019-05-10 20:29:42 +03:00
Alexis Svinartchouk
dc92d010fb
Merge pull request #2775 from balena-io/electron-3.1.9
Downgrade electron 4.1.5 -> 3.1.9
2019-05-10 19:27:31 +02:00
Alexis Svinartchouk
9cb27a616a Downgrade electron 4.1.5 -> 3.1.9
Changelog-entry: Downgrade electron 4.1.5 -> 3.1.9
Change-type: patch
2019-05-10 14:18:33 +02:00
Resin CI
518a0ca45b v1.5.34 2019-05-10 13:21:12 +03:00
Alexis Svinartchouk
3526a0e3c5
Merge pull request #2774 from balena-io/1.5.34
1.5.34
2019-05-10 12:19:17 +02:00
Alexis Svinartchouk
6386f85258 Use https url for fetching config, avoid redirection
Changelog-entry: Use https url for fetching config, avoid redirection
Change-type: patch
2019-05-09 16:01:36 +02:00
Alexis Svinartchouk
e80106d8f8 Update etcher-sdk to ^2.0.7
Changelog-entry: win32: fix running diskpart when the tmp file path contains spaces
Change-type: patch
2019-05-09 15:58:40 +02:00
Resin CI
1145cbc75c v1.5.33 2019-04-30 22:17:08 +03:00
Alexis Svinartchouk
e669b81072
Merge pull request #2759 from balena-io/fix-gzip-progress
Update etcher-sdk to ^2.0.5
2019-04-30 21:14:26 +02:00
Alexis Svinartchouk
9d78da941b Update etcher-sdk to ^2.0.5
Changelog-entry: Fix gzipped files verification percentage and dmg verification.
Change-type: patch
2019-04-30 18:38:35 +02:00
Resin CI
63d0f5e2c6 v1.5.32 2019-04-30 19:05:05 +03:00
Alexis Svinartchouk
dae047eff1
Merge pull request #2758 from balena-io/makefile-npm-version
Export NPM_VERSION variable in Makefile
2019-04-30 18:03:21 +02:00
Lorenzo Alberto Maria Ambrosi
8a2db8bced Add CODEOWNERS file to repository
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-04-30 16:56:44 +02:00
Lorenzo Alberto Maria Ambrosi
792fab20e6 Export NPM_VERSION variable in Makefile
Change-type: patch
Changelog-entry: Export NPM_VERSION variable in Makefile
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-04-30 16:14:26 +02:00
Resin CI
f40c0f6bd3 v1.5.31 2019-04-30 13:55:10 +03:00
Alexis Svinartchouk
ccf11b9861
Merge pull request #2753 from balena-io/electron-4
Update electron to 4.1.5
2019-04-30 12:52:46 +02:00
Alexis Svinartchouk
1fcde5a17c Update etcher-sdk to ^2.0.3
Changelog-entry: Update etcher-sdk to ^2.0.3
Change-type: patch
2019-04-29 12:52:52 +02:00
Alexis Svinartchouk
88f543dd25 Update electron to 4.1.5
Changelog-entry: Update electron to 4.1.5
Change-type: patch
2019-04-25 16:12:03 +02:00
Resin CI
8b6f3f6022 v1.5.30 2019-04-24 15:00:52 +03:00
Alexis Svinartchouk
294ef8045a
Merge pull request #2749 from balena-io/remove-double-error-message
Remove double error message
2019-04-24 13:58:38 +02:00
Alexis Svinartchouk
1f7e4c886b Don't show a dialog when the write fails.
There is already an error modal and the error detail will be shown in the console.

Changelog-entry: Don't show a dialog when the write fails.
2019-04-22 18:25:26 +02:00
Alexis Svinartchouk
63c047009f Remove useless returns and unused parameter
Change-type: patch
2019-04-22 18:24:50 +02:00
Resin CI
2c5f5004cc v1.5.29 2019-04-22 10:10:53 +03:00
Lorenzo Alberto Maria Ambrosi
2fa5426cf5
Merge pull request #2736 from balena-io/electron-updater-2
Add electron autoupdater
2019-04-22 09:08:08 +02:00
Alexis Svinartchouk
428c777402 Fix npm-shrinkwrap.json
Change-type: patch
2019-04-19 19:56:30 +02:00
Lorenzo Alberto Maria Ambrosi
7e2c62c520
Fix mixpanel events sampling rate
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2019-04-19 17:26:38 +02:00
Giovanni Garufi
3d3b4f4a46 Add electron autoupdater
Change-type: patch
Changelog-entry: Add support for auto-updating feature
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-04-19 17:13:37 +02:00
Resin CI
a543dcf166 v1.5.28 2019-04-19 14:46:55 +03:00
Alexis Svinartchouk
5de54bb6bf
Merge pull request #2741 from balena-io/update-etcher-sdk-2
Update etcher sdk to ^2.0.1
2019-04-19 13:44:52 +02:00
Alexis Svinartchouk
d95401e614 Update electron-builder to ^20.40.2
Changelog-entry: Update electron-builder to ^20.40.2
Change-type: patch
2019-04-18 18:40:59 +02:00
Alexis Svinartchouk
2c835437e9 Update etcher-sdk to ^2.0.1
Changelog-entry: Update etcher-sdk to ^2.0.1
Change-type: patch
2019-04-18 18:40:46 +02:00
Resin CI
498e70ed2b v1.5.27 2019-04-16 17:30:43 +03:00
Alexis Svinartchouk
fce5b500bf
Merge pull request #2734 from balena-io/fix-wmic-tmp-spaces
Fix reading images from network drives on windows when the tmp dir has spaces
2019-04-16 16:28:39 +02:00
Alexis Svinartchouk
11def54adb Fix reading images from network drives on windows when the tmp dir has spaces
Changelog-entry: (Windows): Fix reading images from network drives when the tmp dir has spaces
Change-type: patch
2019-04-16 13:44:25 +02:00
Resin CI
9da9e73f7a v1.5.26 2019-04-12 20:44:41 +03:00
Alexis Svinartchouk
f90cd49a6d
Merge pull request #2729 from balena-io/fix-wmic-output-encoding
Fix reading images from network drives containing non ascii characters
2019-04-12 19:42:13 +02:00
Alexis Svinartchouk
6e72c07190 Fix reading images from network drives containing non ascii characters
Changelog-entry: (Windows): Fix reading images from network drives containing non ascii characters
Change-type: patch
2019-04-12 18:56:12 +02:00
Resin CI
1997e1faeb v1.5.25 2019-04-10 14:27:04 +03:00
Lorenzo Alberto Maria Ambrosi
b33b34bd71
Merge pull request #2698 from balena-io/filter-analytics
New parameter in webview for opt-out analytics
2019-04-10 13:24:57 +02:00
Lorenzo Alberto Maria Ambrosi
6a9b739541 New parameter in webview for opt-out analytics
Change-type: patch
Changelog-entry: New parameter in webview for opt-out analytics
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-04-09 19:10:29 +02:00
Resin CI
6cb0bdd1a4 v1.5.24 2019-04-08 16:28:04 +03:00
Lorenzo Alberto Maria Ambrosi
b73ebb6f92
Merge pull request #2726 from balena-io/analytics-version-weight
Add sample property to Mixpanel events
2019-04-08 15:25:39 +02:00
Lorenzo Alberto Maria Ambrosi
24a83260ca Update building scripts to latest master
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-04-05 20:01:44 +02:00
Lorenzo Alberto Maria Ambrosi
fc1c1b402b Add sample property to Mixpanel events
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-04-05 17:02:04 +02:00
Alexis Svinartchouk
af462b3486
Merge pull request #2725 from balena-io/update-resin-corvus
Update resin-corvus to ^2.0.3
2019-04-03 18:09:20 +02:00
Alexis Svinartchouk
3e236996c8 Update resin-corvus to ^2.0.3
Changelog-entry: Update resin-corvus to ^2.0.3
Change-type: patch
2019-04-03 16:16:06 +02:00
Resin CI
c4e84483df v1.5.23 2019-04-03 13:19:19 +03:00
Giovanni Garufi
e9532f2158
Merge pull request #2720 from balena-io/publish-gh-pages
Set publishMetadata in repo.yml
2019-04-03 03:17:17 -07:00
Giovanni Garufi
15fc8ab2e7 Set publishMetadata in repo.yml
This will cause VB to publish metadata about the repo to its gh-pages
branch on merge

Change-type: patch
Changelog-entry: Configure versionbot to publish repo metadata to github pages
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-04-03 11:22:31 +02:00
Resin CI
b39dbeb25e v1.5.22 2019-04-02 19:54:16 +03:00
Alexis Svinartchouk
e181c21f85
Merge pull request #2724 from balena-io/fix-wmic-not-in-path
Use full path to wmic as some systems don't have it in their PATH
2019-04-02 18:51:38 +02:00
Alexis Svinartchouk
db771bc2cc Use full path to wmic as some systems don't have it in their PATH
Changelog-entry: (Windows): Use full path to wmic as some systems don't have it in their PATH
Change-type: patch
2019-04-02 17:32:49 +02:00
Resin CI
0695cfb3c0 v1.5.21 2019-04-02 17:43:58 +03:00
Alexis Svinartchouk
ff3982efa4
Merge pull request #2721 from balena-io/fix-getMixpanelConfig
Fix error when config.analytics was undefined
2019-04-02 16:42:00 +02:00
Alexis Svinartchouk
40de7f5d54 Fix error when config.analytics was undefined
Changelog-entry: Fix error when config.analytics was undefined
Change-type: patch
2019-04-01 18:16:56 +02:00
Resin CI
18a848696f v1.5.20 2019-04-01 19:04:20 +03:00
Alexis Svinartchouk
58de7375a2
Merge pull request #2717 from balena-io/1.5.20
1.5.20
2019-04-01 18:00:27 +02:00
Alexis Svinartchouk
b61109a269 Fix reading images from network drives on windows
Change-type: patch
2019-04-01 15:40:30 +02:00
Alexis Svinartchouk
164fd8f022 Don't try to flash when no device is selected
Changelog-entry: Don't try to flash when no device is selected
Change-type: patch
2019-03-29 17:24:34 +01:00
Giovanni Garufi
cafaa9ff22 Delete versionist.conf
Versionist will now look at repo.yml and inject the versionist config
corresponding to the type

Change-type: patch
Changelog-Entry: Reformat changelog
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-03-29 17:24:34 +01:00
Alexis Svinartchouk
34c98d1dcd Use async/await in flash.js
Avoid a rare race condition leading to "Error: There is already a flash in progress" messages

Changelog-entry: Avoid "Error: There is already a flash in progress" errors
Change-type: patch
2019-03-29 17:24:34 +01:00
Alexis Svinartchouk
ec015da795 Avoid "Invalid state percentage: null" errors
Change-type: patch
2019-03-29 17:24:34 +01:00
Resin CI
a21a82c64e v1.5.19 2019-03-28 16:49:12 +02:00
Alexis Svinartchouk
1aca669c62
Merge pull request #2714 from balena-io/report-unhandled-rejections
Better reporting of unhandled rejections to sentry
2019-03-28 15:47:02 +01:00
Alexis Svinartchouk
39573ada54 Update resin-corvus to ^2.0.2
Changelog-entry: Update resin-corvus to ^2.0.2
Change-type: patch
2019-03-28 13:47:30 +01:00
Alexis Svinartchouk
bceb7c77d1 Better reporting of unhandled rejections to sentry
Changelog-entry: Better reporting of unhandled rejections to sentry
Change-type: patch
2019-03-27 19:54:28 +01:00
Resin CI
68fa771905 v1.5.18 2019-03-27 01:42:35 +02:00
Lorenzo Alberto Maria Ambrosi
8a85968ec4
Merge pull request #2709 from balena-io/fix-appimage-build
Recreate zipped appImage
2019-03-27 00:40:22 +01:00
Giovanni Garufi
03b1a2dcff Update scripts
Change-type: patch
Changelog-entry: Update build scripts
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-03-26 23:29:17 +01:00
Resin CI
5cb231e427 v1.5.17 2019-03-26 10:48:08 +02:00
Giovanni Garufi
e90f6764f5
Merge pull request #2705 from balena-io/publish-github
Set publish: github in repo.yml
2019-03-26 01:45:28 -07:00
Giovanni Garufi
d078055e40 Set publish: github in repo.yml
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
Changelog-entry: Automatically publish github release from CI
2019-03-25 17:48:21 +01:00
Resin CI
98134eb612 v1.5.16 2019-03-25 18:38:34 +02:00
Giovanni Garufi
b0f2dfc4fb
Merge pull request #2696 from balena-io/test-pipeline
Add repo.yml
2019-03-25 09:31:05 -07:00
Giovanni Garufi
195f07c09f Update scripts
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-03-22 18:23:16 +01:00
Giovanni Garufi
15f87edc96 Update .gitattributes to always use LF for EOL in json files 2019-03-22 12:12:36 +01:00
Giovanni Garufi
52caae8f05 Add repo.yml
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
Changelog-Entry: Add repo.yml for CI
2019-03-22 12:11:02 +01:00
Resin CI
99f7fc99da v1.5.15 2019-03-21 02:21:49 +02:00
Alexis Svinartchouk
89fc98c6f6
Merge pull request #2701 from balena-io/upgrade-etcher-sdk
etcher-sdk: Upgrade to 1.3.11
2019-03-21 01:19:14 +01:00
Juan Cruz Viotti
0c2eb1caab
etcher-sdk: Upgrade to 1.3.11
Change-type: patch
Changelog-entry: Show the correct logo on usbboot devices on Ubuntu
Signed-off-by: Juan Cruz Viotti <juan@balena.io>
2019-03-20 21:18:30 +00:00
Resin CI
303969bdbf v1.5.14 2019-03-20 19:14:54 +02:00
Alexis Svinartchouk
8b7266a435
Merge pull request #2692 from balena-io/1.5.13
1.5.14
2019-03-20 18:09:34 +01:00
Alexis Svinartchouk
fc9282fff7 Remove versionist from dev dependencies
Change-type: patch
2019-03-20 16:13:38 +01:00
Alexis Svinartchouk
33fb79e0de Update etcher-sdk to ^1.3.10
Changelog-entry: Update etcher-sdk to ^1.3.10
Change-type: patch
2019-03-20 16:13:38 +01:00
Resin CI
b4418660df v1.5.13 2019-03-18 20:07:14 +02:00
Giovanni Garufi
3560a22a77
Merge pull request #2694 from balena-io/update-scripts
Update scripts
2019-03-18 19:02:30 +01:00
Giovanni Garufi
818b466687 Update scripts
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
Changelog-Entry: Update build scripts
2019-03-18 17:44:44 +01:00
Resin CI
91d29c1e2c v1.5.12 2019-03-15 19:18:17 +02:00
Alexis Svinartchouk
e06fe72131
Merge pull request #2691 from balena-io/local-node-gyp-electron-builder
Update electron-builder scripts
2019-03-15 18:12:01 +01:00
Alexis Svinartchouk
7d715fdca0 Disable node gyp rebuild while running electron-builder
Change-type: patch
2019-03-15 17:33:19 +01:00
Lorenzo Alberto Maria Ambrosi
3cfa6988ab Update build scripts
Changelog-entry: Update build scripts
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-03-15 17:33:19 +01:00
Resin CI
1c707b2d37 v1.5.11 2019-03-12 20:07:34 +02:00
Alexis Svinartchouk
2ed4c76abf
Merge pull request #2689 from balena-io/1.5.11
1.5.11
2019-03-12 19:00:51 +01:00
David Lozano Jarque
94e91723f4 Update PUBLISHING.md
Fixed broken Hombrew cask link for etcher

Changelog-entry: Fixed broken Hombrew cask link for etcher
Change-type: patch
2019-03-12 17:35:19 +01:00
Alexis Svinartchouk
091bddbad8 Remove no longer used travis and appveyor configs
Changelog-entry: Remove no longer used travis and appveyor configs
Change-type: patch
2019-03-12 17:35:19 +01:00
Resin CI
b3f68c2638 v1.5.10 2019-03-12 18:01:29 +02:00
Alexis Svinartchouk
00c94c8efd
Merge pull request #2688 from balena-io/fix-appimage
Use APPDIR from env in the child writer
2019-03-12 16:29:00 +01:00
Alexis Svinartchouk
66b19677bf Use APPDIR from env in the child writer
Change-type: patch
2019-03-12 13:30:26 +01:00
Alexis Svinartchouk
2d4170e0d7
Merge pull request #2683 from balena-io/fix-makefile
Fix Makefile
2019-03-07 17:54:00 +01:00
Alexis Svinartchouk
7f8f38ddf1 Update resin-scripts
Changelog-entry: Update resin-scripts
Change-type: patch
2019-03-07 16:29:20 +01:00
Alexis Svinartchouk
2e1763f19a Fix Makefile
Change-type: patch
2019-03-07 15:20:07 +01:00
Resin CI
a5f8b3c164 v1.5.9 2019-03-06 18:00:26 +02:00
Alexis Svinartchouk
a802087009
Merge pull request #2677 from balena-io/1.5.9
1.5.9
2019-03-06 16:56:45 +01:00
Alexis Svinartchouk
3b16c06f70 upgrade(scripts): Use master branch of resin-scripts
Change-type: patch
2019-03-05 17:04:06 +01:00
Alexis Svinartchouk
a979ae3ced upgrade(etcher-sdk): Update etcher-sdk to 1.3.0
Changelog-entry: Update etcher-sdk to 1.3.0
Change-type: patch
2019-03-05 17:04:06 +01:00
Resin CI
02e0f40702 v1.5.8 2019-03-01 20:04:48 +01:00
Alexis Svinartchouk
a4d7853bb2
Merge pull request #2675 from balena-io/update-node-ext2fs
upgrade(ext2fs): Update ext2fs to 1.0.27
2019-03-01 20:00:24 +01:00
Alexis Svinartchouk
ac463e0f65 upgrade(ext2fs): Update ext2fs to 1.0.27
Changelog-entry: Update ext2fs to 1.0.27
Change-type: patch
2019-03-01 19:06:13 +01:00
Resin CI
c187aa46b7 v1.5.7 2019-03-01 17:10:08 +01:00
Alexis Svinartchouk
e65fa9dcae
Merge pull request #2674 from balena-io/1.5.7
1.5.7
2019-03-01 17:05:33 +01:00
Robert Vojta
fea230cfab fix(docs): Update macOS contributing info
Changelog-entry: Update docs
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Lorenzo Alberto Maria Ambrosi
90838c99fc Add missing line for supporting flashing CM3+
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
8e96adeda9 Fix copyright year
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
3cdb0f840e Fix electron links
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
b6ad6e0a85 Fix macOS version requirements
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
e73a577452 Fix electron links
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
16e8aa2447 Fix AppImages link
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:50 +01:00
Robert Vojta
1d6958a67e fix(osx installer): Fix blurred background image
Changelog-entry: Fix blurred background image
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:10:05 +01:00
Robert Vojta
136ca282eb fix(gui): Fix disappearing modal window
Changelog-entry: Fix disappearing modal window
Change-type: patch
Signed-off-by: Robert Vojta <robert@balena.io>
2019-03-01 15:09:19 +01:00
Lorenzo Alberto Maria Ambrosi
388fc2f7d9 Remove screenshot
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-03-01 13:49:26 +01:00
Resin CI
72fdb7127a v1.5.6 2019-03-01 12:16:33 +01:00
Alexis Svinartchouk
f67832644f
Merge pull request #2673 from balena-io/babel-target-electron-3
Target electron 3 runtime in babel options
2019-03-01 11:44:46 +01:00
Alexis Svinartchouk
2614f3261c Target electron 3 runtime in babel options
This saves around 40KiB in generated/gui.js

Changelog-entry: Target electron 3 runtime in babel options
Change-type: patch
2019-02-28 15:04:00 +01:00
Resin CI
e84204b49a v1.5.5 2019-02-28 13:13:02 +01:00
Alexis Svinartchouk
86aaa725d5
Merge pull request #2663 from balena-io/1.5-fixes
1.5.x fixes
2019-02-28 13:10:25 +01:00
Alexis Svinartchouk
dd583a176f Don't pass undefined sockets to ipc.server.emit()
Changelog-entry: Don't pass undefined sockets to ipc.server.emit()
Change-type: patch
2019-02-28 11:16:12 +01:00
Alexis Svinartchouk
5299d958f2 Fix error when event.dataTransfer.files is empty
Changelog-entry: Fix error when event.dataTransfer.files is empty
Change-type: patch
2019-02-28 11:16:12 +01:00
Alexis Svinartchouk
f0374cf9d9 Fix error message not showing when an unsupported image is selected
Changelog-entry: Fix error message not showing when an unsupported image is selected
Change-type: patch
2019-02-28 11:16:12 +01:00
Alexis Svinartchouk
6b6a0d7b4f Avoid Invalid percentage exceptions
Changelog-entry: Avoid `Invalid percentage` exceptions
Change-type: patch
2019-02-28 11:16:12 +01:00
Alexis Svinartchouk
4317892421 Update etcher-sdk to 1.1.0
Changelog-entry: Update etcher-sdk to 1.1.0
Change-type: patch
2019-02-28 11:16:12 +01:00
Resin CI
8052b2adfa v1.5.4 2019-02-28 11:03:17 +01:00
Lorenzo Alberto Maria Ambrosi
d44927447a
Merge pull request #2668 from balena-io/add-missing-contributing-step
Add missing step for submodule init & update
2019-02-28 11:01:02 +01:00
Lorenzo Alberto Maria Ambrosi
09e6c6422d Add missing step for submodule init & update
Change-type: patch
Changelog-entry: Add missing step for submodule cloning in README
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-02-27 22:24:47 +01:00
Resin CI
df85ffb254 v1.5.3 2019-02-27 22:11:45 +01:00
Lorenzo Alberto Maria Ambrosi
752ba4405c
Merge pull request #2669 from balena-io/fix-versionist-conf
Fix versionist conf
2019-02-27 22:09:02 +01:00
Lorenzo Alberto Maria Ambrosi
1f3a02b83d
Bump version in npm-shrinkwrap.json
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-02-27 19:48:20 +01:00
Giovanni Garufi
8e372f1e93 Fix changelog 2019-02-27 16:25:10 +01:00
Giovanni Garufi
caeb84f58b Throw error if no commit is annotated with a changelog entry
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
Changelog-entry: Throw error if no commit is annotated with a changelog entry
2019-02-27 16:23:55 +01:00
Resin CI
759722bf7d v1.5.2 2019-02-26 15:21:12 +01:00
Lorenzo Alberto Maria Ambrosi
cefdc95c9b
Merge pull request #2664 from balena-io/enable-edit-version-versionist
Enable versionist editVersion
2019-02-26 15:17:26 +01:00
Lorenzo Alberto Maria Ambrosi
3be7029078
Enable versionist editVersion
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-02-26 13:10:50 +01:00
Resin CI
3f16858a93 v1.5.1 2019-02-25 12:11:04 +01:00
Giovanni Garufi
c61c6deaa8
Merge pull request #2634 from balena-io/versioning
[WIP] Remove lodash use from versionist.conf.js
2019-02-25 11:04:33 +00:00
Giovanni Garufi
90c8483df8 Remove lodash dependency in versionist.conf.js
Changelog-entry: Removed lodash dependency in versionist.conf.js
Change-type: patch
Signed-off-by: Giovanni Garufi <giovanni@balena.io>
2019-02-22 13:30:49 +00:00
Lorenzo Alberto Maria Ambrosi
d70b189cec
Merge pull request #2635 from balena-io/release-v1.5.0
Release v1.5.0
2019-02-21 17:13:26 +01:00
Lorenzo Alberto Maria Ambrosi
41a7fc4de5 Release v1.5.0
Change-type: minor
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-02-20 17:00:31 +01:00
Alexis Svinartchouk
db119d5230 Update npm-shrinkwrap.json to update drivelist
Change-type: patch
2019-02-20 17:00:31 +01:00
Alexis Svinartchouk
c88245954d Wait 100ms before disconnecting if a message is being sent
Change-Type: patch
2019-02-19 14:18:22 +01:00
Alexis Svinartchouk
b1ab3834b6
Merge pull request #2631 from balena-io/dont-use-drivelist-directly
Dont use drivelist directly
2019-02-15 14:16:41 +01:00
Alexis Svinartchouk
34b7c1be81 Update etcher-sdk to ^1.0.7
Change-type: patch
2019-02-14 19:19:19 +01:00
Alexis Svinartchouk
082c77586f Don't use drivelist directly
Use etcher-sdk's drive scanner instead.

Change-Type: patch
2019-02-14 19:19:19 +01:00
Alexis Svinartchouk
3b6fe7b548
Merge pull request #2630 from balena-io/drop-cli
Remove etcher-cli
2019-02-14 19:09:30 +01:00
Alexis Svinartchouk
da072e7621 Remove etcher-cli
Change-type: major
2019-02-14 18:22:40 +01:00
Alexis Svinartchouk
4568404a70
Merge pull request #2616 from balena-io/electron-3.0
Bump electron to v3.1.3
2019-02-14 17:12:39 +01:00
Alexis Svinartchouk
43319853ef Workaround a bug when 2 webviews are loaded at the same time.
In some cases the spectron tests time out in app:start. This should
prevent it.

Change-type: patch
2019-02-14 15:41:03 +01:00
Lorenzo Alberto Maria Ambrosi
ce9f142621 Bump electron to v3.1.3
Change-type: major
Changelog-entry: Upgrade to Electron v3
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-02-12 15:42:05 +01:00
Alexis Svinartchouk
8ef3add183
Merge pull request #2615 from balena-io/npm6-3
Npm6 replaces #2577
2019-02-11 17:15:18 +01:00
Alexis Svinartchouk
ef45696015 Double app:start test timeout
Change-type: patch
2019-02-11 14:46:05 +01:00
Alexis Svinartchouk
a8f8c2cd85 Increase svg icon test timeout
Change-type: patch
2019-02-11 14:08:13 +01:00
Alexis Svinartchouk
6d79a8e23a Rebuild node-sass before using it
It avoids an error for x86 win32 builds on x64 platforms:
`Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x`

Change-type: patch
2019-02-11 12:06:27 +01:00
Alexis Svinartchouk
d65dc6ccac Use npx branch of resin-scripts
Change-type: patch
2019-02-08 15:37:45 +01:00
Alexis Svinartchouk
ccc9076a80 Use npx to force npm version
Change-type: patch
2019-02-01 15:32:06 +01:00
Alexis Svinartchouk
3c007cea34 Specify npm_version in .resinci.json
Change-type: patch
2019-02-01 13:07:13 +01:00
Alexis Svinartchouk
bf29312ecf npm6, electron 1.8.8
Change-type: patch
2019-01-30 16:24:01 +01:00
Alexis Svinartchouk
a53095b29e
Merge pull request #2403 from balena-io/etcher-sdk
refactor: use etcher-sdk
2019-01-29 14:37:05 +01:00
Alexis Svinartchouk
d5c9e6b054 Move patches back to patches folder
Change-type: patch
2019-01-28 14:53:29 +01:00
Alexis Svinartchouk
d4f29bd2af Hardcode electron_version in node-pre-gyp patch
Because it is not available in electron when running with
ELECTRON_RUN_AS_NODE=1

Change-type: patch
2019-01-28 13:07:38 +01:00
Alexis Svinartchouk
a6661ac759 Update node-ext2fs to 1.0.25
Change-type: patch
2019-01-25 18:05:51 +01:00
Alexis Svinartchouk
6aa83819d1 Remove napi-build-utils from npm-shrinkwrap
Change-type: patch
2019-01-24 18:51:30 +01:00
Alexis Svinartchouk
8ff4c8a4a5 Fix npm-shrinkwrap.json and remove versionist
versionist is causing ci issues with the shrinkwrap file on windows.
You'll need to manually install versionist before running `make changelog`

Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
1d77b8dae7 Update node-pre-gyp patch and move it to another folder
To prevent the apply-patches script from doing stuff

Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
3e0062621b Update build scripts for electron-builder unresolved dependencies
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
b20e220910 Update styled-system to 3.1.11 (it was lost in a rebase)
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
0259572ded Update etcher-sdk to ^1.0.2 and update npm-shrinkwrap.json
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
a78866069b Update webpack to 4.27.0 and babel to 7.2.0
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
b8fc83577c Remove asar from devDependencies, update versionist
Change-Type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
c21969ab4e Remove etcher-sdk folder filtering from webpack config
This folder has been removed

Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
e02cfc4529 update(etcher-sdk): Update etcher-sdk and shrinkwrap.json
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
ac07c63631 update(etcher-sdk): Update etcher-sdk and shrinkwrap.json
Also update the node-pre-gyp patch (the directory has changed)

Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
1054bc995b fix(ci): Set node target to 6.14.4
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
3560ab6387 update(package): Update etcher-sdk and npm-shrinkwrap.json
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
e50274b962 Remove no longer used bluebird-retry
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
bb1773a1a1 Remove styled-system from package.json
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
941dc3b1b4 update(package): Update shrinkwrap.json
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
92d08d24ab fix(build): Update resin scripts to build modules from source
Change-type: patch
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
7f6ffe0f73 fix(package): Fix shrinkwrap file
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@balena.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
66457ca0c7 upgrade(package): Update to etcher-sdk@0.1.28
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
3344f1fd88 upgrade(package): Update to etcher-sdk@0.1.27
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
c4b636f80a upgrade(package): Update to etcher-sdk@0.1.26 and fix npm-shrinkwrap
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
0ea0975bd4 upgrade(package): Update to etcher-sdk@0.1.23
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
534f3a7469 fix(gui): Always show the "success" screen
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
f3110ba018 upgrade(package): Update to etcher-sdk@0.1.16
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
e76cc81fe1 upgrade(package): Update to etcher-sdk@0.1.15
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
adcc3343ec fix(gui): Disable compute modules selection during preparation
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
645e114a1f fix(gui): Allow drives to be objects
This fixes an error when plugging usbboot devices.

Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
65d86460cb fix(shared): Fix getDriveImageCompatibilityStatuses() and tests
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
aaccd10c2a fix(gui): Allow undefined eta
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
a237bfd930 upgrade(package): Update to etcher-sdk@0.1.13
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:27 +01:00
Alexis Svinartchouk
73f64d93b1 upgrade(package): Update to etcher-sdk@0.1.9
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
871db09447 fix(tests): Fix gui tests
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
8d79103392 upgrade(package): Update to etcher-sdk@0.1.7
Also update the shrinkwrap file

Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
fd765443e4 fix(image-selection): Only trigger digest loop after setting image
Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
63967d1558 fix(tests): Remove throw if no percentage or eta test
Since 25916200f2864a9b137325f919c0f8ef5d62fa60 we can handle a progress
state with no percentage or eta.
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
6b270885bf feat(driverless) show driverless devices 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
47937d6aaa fix(package): remove diskpart helper, it is in the sdk now 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
7d2ba45620 fix(store): Lowercase extensions before comparing 2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
b270d819a8 fix(store): Restore drive object validity check 2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
c50553fbf6 upgrade(package): Update etcher-sdk git ref 2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
a541c863be fix(test): Sort compressed extensions before comparing 2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
254b482651 upgrade(package): Update mime-types 2.1.15 -> 2.1.18
This update includes a previously missing mapping for gzip
(`application/gzip`), which contributes to fixing gzip compressed
image detection in the new SDK

Change-type: patch
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
d3c2cd4215 fix(test): Sort supported extensions to fix order mismatch
Change-type: patch
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
4f7cc7dd6b fix(lib): Fix MIME type exclusion condition
As `mime.extension()` returns `false`, instead of `null` or `undefined`,
this condition simply needs to check for truthyness.

Change-type: patch
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
21f1f4e503 fix(test): Turn SDK integration tests for the GUI back on
Change-type: patch
2019-01-24 13:21:26 +01:00
Jonas Hermsmeier
47f2336673 fix(lib): Fix use of non-existent dependency
Change-Type: patch
2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
5ae93bf6d0 Update etcher-sdk and load DriverlessDeviceAdapter on windows 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
caf5f10326 lint 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
e68dbcf4ee Remove lib/sdk and its tests 2019-01-24 13:21:26 +01:00
Alexis Svinartchouk
a42e81cf8c Replace imageStream with etcher-sdk in the react file selector 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
98a8588c1b Update etcher-sdk and use it in the cli 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
8630af7646 Remove usage of old sdk in supported-formats 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
268c5302e8 Handle the last fail as an error if all devices failed 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
d07d535993 Show raspberry pi usbboot update progress in devices list 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
a8a75f22b2 Allow flashing from sources for which we don't know the compressed size
* don't show any percentage or eta, show the bytes written instead
2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
6143023502 Integrate etcher-sdk 2019-01-24 13:21:21 +01:00
Alexis Svinartchouk
ca6aa5d4aa
Merge pull request #2611 from balena-io/update-node-gyp
Update node-gyp to 3.8.0
2019-01-24 08:52:52 +01:00
Alexis Svinartchouk
bc028ed41f Add napi-build-utils to platformSpecificDependencies
Change-type: patch
2019-01-23 17:25:42 +01:00
Alexis Svinartchouk
911d3a9188 Update node-gyp to 3.8.0
Change-type: patch
2019-01-23 16:26:26 +01:00
Alexis Svinartchouk
b88e715fc5
Merge pull request #2610 from balena-io/update-winusb
Update winusb-driver-generator to 1.2.4
2019-01-23 13:22:17 +01:00
Alexis Svinartchouk
a4dfa5f281 Update winusb-driver-generator to 1.2.4
Change-type: patch
2019-01-22 18:29:20 +01:00
Lorenzo Alberto Maria Ambrosi
05fc1711b9
Merge pull request #2606 from balena-io/bump-dependencies
Bump dependencies
2019-01-18 19:13:32 +01:00
Lorenzo Alberto Maria Ambrosi
c16fbb5b47 Rename resin-io modules to balena-io
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-18 17:05:06 +01:00
Lorenzo Alberto Maria Ambrosi
7ca3e2b519
Update build scripts for electron-builder unresolved dependencies
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-18 16:51:20 +01:00
Lorenzo Alberto Maria Ambrosi
8c8a0bf8eb Fix linting error for winusb-driver-generator
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-18 14:48:10 +01:00
Lorenzo Alberto Maria Ambrosi
e85251d2e3 Bump drivelist to v6.4.6
Change-type: patch
Changelog-entry: Fix incorrect drives list on Linux
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-17 10:57:46 +01:00
Lorenzo Alberto Maria Ambrosi
73e4827249
Bump mountutils to v1.3.16 for XCode build fix
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-17 10:54:29 +01:00
Lorenzo Alberto Maria Ambrosi
c37270ea08
Switch to fork of xxhash with XCode build fix
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-17 10:52:34 +01:00
Lorenzo Alberto Maria Ambrosi
8cc33b46bb
Make winusb-driver-generator optional (win only)
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-17 10:51:11 +01:00
Lorenzo Alberto Maria Ambrosi
700341f9cc
Fix error with OSX XCode build
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-17 10:49:38 +01:00
Lorenzo Alberto Maria Ambrosi
ca85ad5995
Merge pull request #2460 from balena-io/contribution-file-fix
docs: Add info about required npm version
2019-01-14 19:59:16 +01:00
Lorenzo Alberto Maria Ambrosi
1c8c36a224
Update nodejs req to 6.11 (fixes package build)
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-14 18:36:25 +01:00
Agnieszka Domanska
25b814e796 docs: Add info about required npm version
Npm 3.10 version is required to install dev tools correctly on Linux.

Change-type: patch
Signed-off-by: amdomanska <aga@resin.io>
2019-01-14 17:22:40 +01:00
Lorenzo Alberto Maria Ambrosi
e89566e04a
Merge pull request #2580 from balena-io/progress-button-disabled-prop-is-a-boolean
ProgressBar.disabled prop is a boolean
2019-01-09 14:04:55 +01:00
Alexis Svinartchouk
e946f388c0 ProgressBar.disabled prop is a boolean
Change-type: patch
2019-01-08 12:42:39 +01:00
Lorenzo Alberto Maria Ambrosi
7616e8dab7
Merge pull request #2582 from balena-io/2281-drive-mountpoint-contains-image
Change "Drive Contains Image" label.
2019-01-08 11:53:47 +01:00
Lorenzo Alberto Maria Ambrosi
2dc4fef4d3 Update scripts to build on other Linux distros
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-07 17:01:18 +01:00
Alexis Svinartchouk
f2ca997195 Change "Drive Contains Image" label.
Use "Drive Mountpoint Contains Image" instead as the image may not be on
this drive but on a drive mounted in one of the mountpoins of this
drive.
We still don't want to allow flashing this drive in that situation.

Changelog-entry: Changed “Drive Contains Image” to “Drive Mountpoint Contains Image”
Change-type: patch
2019-01-07 15:35:21 +01:00
Lorenzo Alberto Maria Ambrosi
7445004abf
Merge pull request #2589 from balena-io/fix-offline-success-banner
Restored offline success-banner style
2019-01-07 15:34:23 +01:00
Lorenzo Alberto Maria Ambrosi
9b76abe2ed Restored offline success-banner style
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-07 14:06:05 +01:00
Lorenzo Alberto Maria Ambrosi
a97205c9fc
Merge pull request #2595 from Jacalz/fix-solus-install
Refinements to the README
2019-01-07 09:56:39 +01:00
Jacalz
bf3d069aad Refinements to the README
This started out with the intention to fix a typo in the uninstall 
section of Solus, but developed in to a couple improvements to the 
README.
2019-01-05 16:44:49 +01:00
Lorenzo Alberto Maria Ambrosi
27ea74722c
Merge pull request #2592 from balena-io/fix-readme
Fix readme
2019-01-04 17:38:53 +01:00
Lorenzo Alberto Maria Ambrosi
2525456d8b Update balena-etcher .deb and .rpm install steps
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-04 16:08:10 +01:00
Lorenzo Alberto Maria Ambrosi
9fa32df3a6 Remove travis-ci and appveyor badges
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2019-01-04 15:39:23 +01:00
Lorenzo Alberto Maria Ambrosi
5bdd5da13b
Merge pull request #2587 from balena-io/fix-dmg-assets
New dmg package background assets
2018-12-23 15:54:06 +01:00
Lorenzo Alberto Maria Ambrosi
b8756edd29 New dmg package background assets
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-22 01:41:18 +01:00
Lorenzo Alberto Maria Ambrosi
c93910e858
Merge pull request #2586 from balena-io/release-v1.4.9
v1.4.9
2018-12-21 16:07:29 +01:00
Lorenzo Alberto Maria Ambrosi
ad4226ace7 Invert analytics event probability
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-21 15:12:08 +01:00
Lorenzo Alberto Maria Ambrosi
d71b3fe1bc v1.4.9
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-19 22:10:26 +01:00
Lorenzo Alberto Maria Ambrosi
07858eecac
Merge pull request #2571 from balena-io/restyle-success-screen
Restyle success screen and enlarge UI elements
2018-12-19 19:36:49 +01:00
Lorenzo Alberto Maria Ambrosi
64ec6d0e58
Convert flash results component to React
Change-type: minor
Changelog-entry: Added React component for the Flash Results button
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-19 16:02:38 +01:00
Lorenzo Alberto Maria Ambrosi
cf722427ab Restyle success screen and enlarge UI elements
Change-type: patch
Changelog-entry: Added React component for the Flash Another button
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-19 13:20:02 +01:00
Lorenzo Alberto Maria Ambrosi
1b7ff07efc
Merge pull request #2584 from balena-io/remove-webview-console-messages
Remove forwarding of SafeWebview console messages
2018-12-19 13:09:21 +01:00
Lorenzo Alberto Maria Ambrosi
87533f4417 Remove forwarding of SafeWebview console messages
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-19 12:19:42 +01:00
Lorenzo Alberto Maria Ambrosi
9077c95cdd
Merge pull request #2583 from balena-io/add-mixpanel-configs
Customize Mixpanel configs
2018-12-18 15:13:16 +01:00
Lorenzo Alberto Maria Ambrosi
22acc5ae96 Customize Mixpanel configs
Change-type: minor
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-12-18 11:32:07 +01:00
Lorenzo Alberto Maria Ambrosi
cf596a88ab
Merge pull request #2557 from balena-io/explicit-safe-webview-events
Use explicit names for safe-webview events
2018-11-28 21:11:10 +01:00
Lorenzo Alberto Maria Ambrosi
7354fa3050 Use explicit names for safe-webview events
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-28 15:57:58 +01:00
Lorenzo Alberto Maria Ambrosi
978497b287
Merge pull request #2539 from Jacalz/gitmodule-https
Use https for fetching sub modules
2018-11-28 15:35:33 +01:00
Lorenzo Alberto Maria Ambrosi
a52d745250
Merge branch 'master' into gitmodule-https 2018-11-28 14:14:13 +01:00
Chris Crocker-White
aae71f8105
Merge pull request #2562 from balena-io/chrisys-patch
Update URLs in GUI to balena
2018-11-27 15:51:23 -08:00
Jacob
5419b4b732 Use https for fetching sub modules
This switches over the sub module to using https instead of ssh. It simplifies a lot for people packaging the application and you won't need to have ssh configured correctly.
2018-11-27 18:19:02 +01:00
Chris Crocker-White
caf5a8917c
Merge branch 'master' into chrisys-patch 2018-11-27 08:22:15 -08:00
Lorenzo Alberto Maria Ambrosi
beec00dcb3
Merge pull request #2560 from OSSystems/add-wic-support
Add `.wic` image extension as supported format
2018-11-27 14:31:42 +01:00
Otavio Salvador
7565e809b0 Add .wic image extension as supported format
The `.wic` is a widely used image format in the OpenEmbedded / Yocto
Project ecosystem and is straightforward to be supported.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-11-27 10:01:05 -02:00
Lorenzo Alberto Maria Ambrosi
5c9a646bc1
Merge pull request #2561 from rhwood/patch-1
Update MacOS installation instructions.
2018-11-27 10:26:19 +01:00
Chris Crocker-White
dd8ef288f7 Update URLs in GUI to balena
Change-type: patch
Signed-off-by: Chris Crocker-White <chriscw@balena.io>
2018-11-26 17:38:06 -08:00
Randall Wood
db8d2953cb
Update MacOS installation instructions.
Homebrew/homebrew-cask#55358 changed the name used for installation.
2018-11-26 17:23:38 -08:00
Lorenzo Alberto Maria Ambrosi
b75ca26db2
Merge pull request #2558 from Eate/patch-1
Updated Chocolatey section of Readme
2018-11-26 20:05:54 +01:00
Eate
948a04122a
Updated Chocolatey section
Previously, the section header was a "###" header, and I changed it to a "####" header like all the other install variants so it is the same level header. I also added uninstall instructions like the other sections had.
2018-11-26 08:09:47 -08:00
Lorenzo Alberto Maria Ambrosi
b7c4562b85
Merge pull request #2556 from balena-io/fix-update-notification
fix(GUI): Fix update notification error
2018-11-26 17:08:49 +01:00
Lorenzo Alberto Maria Ambrosi
6d0fea1983
fix(GUI): Fix update notification error
Remove "this" and use "exports" instead

Change-type: patch
Changelog-entry: Fix update notifier error popping up on v1.4.1->1.4.8
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-26 15:53:55 +01:00
Lorenzo Alberto Maria Ambrosi
1a158a919a
Merge pull request #2553 from balena-io/v1.4.8
v1.4.8
2018-11-23 18:52:18 +01:00
Lorenzo Alberto Maria Ambrosi
9a83bd4267 v1.4.8
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-23 17:51:41 +01:00
Lorenzo Alberto Maria Ambrosi
7e3f516b04
Merge pull request #2551 from balena-io/add-potm-webview
feat(GUI): Add featured-project component
2018-11-23 17:44:49 +01:00
Lorenzo Alberto Maria Ambrosi
afd888e14d
fix(GUI): Fix styling issues with buttons
Change-type: patch
Changelog-entry: Moved back the write cancel button
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-23 16:28:06 +01:00
Lorenzo Alberto Maria Ambrosi
76af6e975e Add flashing info while showing webview
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-23 13:19:47 +01:00
Lorenzo Alberto Maria Ambrosi
2017df9ec6 feat(GUI): Add featured-project component
Change-type: patch
Changelog-entry: Added featured-project while flashing
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-22 22:05:11 +01:00
Lorenzo Alberto Maria Ambrosi
aa1e83dc24
Merge pull request #2552 from balena-io/reject-drives-null-size
fix(GUI): Reject drives with null size
2018-11-22 20:50:56 +01:00
Lorenzo Alberto Maria Ambrosi
20996b153d fix(GUI): Reject drives with null size
Change-type: patch
Changelog-entry: Reject drives with null size (fixes pretty-bytes error)
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-22 19:57:45 +01:00
Alexis Svinartchouk
b298e53fc4
Merge pull request #2544 from balena-io/usbboot-limit-transfer-size
Usbboot limit transfer size
2018-11-13 15:49:42 +01:00
Alexis Svinartchouk
7fb382bee0 fix(usbboot): Limit usbboot transfers to 1MiB
Change-type: patch
2018-11-13 14:57:42 +01:00
Alexis Svinartchouk
2158772e3b lint: don't run codespell on svg files
Change-type: patch
2018-11-13 14:55:45 +01:00
Lorenzo Alberto Maria Ambrosi
333298e6c3
Merge pull request #2542 from balena-io/release-1.4.7
v1.4.7
2018-11-12 11:47:34 +01:00
Lorenzo Alberto Maria Ambrosi
6e9deeba5b v1.4.7
Change-type: major
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-11 16:23:13 +01:00
apostolism
15951509a7
Merge pull request #2535 from balena-io/fix-versionist
fix(versionist): Adapt versionist.conf.js to new guidelines
2018-11-09 18:22:02 +02:00
Lorenzo Alberto Maria Ambrosi
dd8b7e42d6 fix(versionist): Adapt versionist.conf.js to new guidelines
Change-type: patch
Changelog-entry: Modify versionist.conf.js to match new internal commit guidelines
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-08 01:40:24 +01:00
Lorenzo Alberto Maria Ambrosi
2655c86be3
Merge pull request #2534 from balena-io/add-balena-icons
Add balena iconset & osx installer background
2018-11-07 18:10:01 +01:00
Lorenzo Alberto Maria Ambrosi
c4c4d347cf Update application name & copyright
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-05 15:58:09 +01:00
Lorenzo Alberto Maria Ambrosi
a3f7239c1b Add balena iconset & osx installer background
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@balena.io>
2018-11-02 12:14:52 +01:00
Lorenzo Alberto Maria Ambrosi
f90c2ad74e
Merge pull request #2477 from balena-io/select-image-button
refactor(GUI): Image Selector Button
2018-11-02 10:54:15 +01:00
amdomanska
2907cd173b refactor(GUI): Convert Select Image button to Rendition
Convert Select Image button to Rendition component

Change-type: minor
Signed-off-by: amdomanska <aga@resin.io>
2018-11-01 19:21:39 +01:00
Lucian Buzzo
779ee8294f
Merge pull request #2494 from balena-io/docs-typo
docs: fix typo in contributing guidelines
2018-11-01 10:37:42 +00:00
Lucian Buzzo
a229c9e10e docs: Fix typo in contributing guidelines
Change-type: patch
Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
2018-11-01 09:51:29 +00:00
Petros Angelatos
3f8d2e4242
Merge pull request #2525 from resin-io/release-1.4.6
v1.4.6
2018-10-29 15:29:23 -07:00
Lorenzo Alberto Maria Ambrosi
c1a8b0c303 v1.4.6
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-28 22:00:27 +01:00
Lorenzo Alberto Maria Ambrosi
8e92c5b844
Merge pull request #2522 from resin-io/fix-progress-button
Put flash cancel button in foreground
2018-10-28 21:53:17 +01:00
Lorenzo Alberto Maria Ambrosi
c366fbde22 Put flash cancel button in foreground
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-28 21:15:30 +01:00
Lorenzo Alberto Maria Ambrosi
890e866ae2
Merge pull request #2513 from resin-io/balena
Add new logos
2018-10-28 21:13:54 +01:00
Lorenzo Alberto Maria Ambrosi
8eb11a8957 Change resin.io to balena.io
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-25 17:32:37 +02:00
Lorenzo Alberto Maria Ambrosi
9cc65a386b Add new logos
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-25 15:57:44 +02:00
Lorenzo Alberto Maria Ambrosi
e4d4af1587
Merge pull request #2475 from resin-io/progressBar
refactor(GUI): convert Progress Button to Rendition
2018-10-24 03:06:25 +02:00
amdomanska
b3aab5116a refactor(GUI): Convert Progress Button to Rendition
Convert progress-button component to Rendition

Change-type: minor
Signed-off-by: amdomanska <aga@resin.io>
2018-10-24 02:07:49 +02:00
Lorenzo Alberto Maria Ambrosi
7227c76538
Merge pull request #2507 from resin-io/react-lint-rules
Enable React lint rules
2018-10-24 01:47:12 +02:00
Lorenzo Alberto Maria Ambrosi
c2c59f4a9e Enable React lint rules
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-23 21:56:02 +02:00
Lorenzo Alberto Maria Ambrosi
eeede318fd
Merge pull request #2488 from resin-io/refactor-build-system
Use Resin CI scripts to build Etcher
2018-10-23 00:02:35 +02:00
Juan Cruz Viotti
3855bb4d56 Use Resin CI scripts to build Etcher
Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-10-22 14:58:15 +02:00
Lorenzo Alberto Maria Ambrosi
89fa682721
Merge pull request #2510 from resin-io/fix-file-selector-constraint-path
Fix incorrect file constraint path
2018-10-17 16:42:46 +02:00
Lorenzo Alberto Maria Ambrosi
cb701a7bbc Change spectron port
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-17 15:50:51 +02:00
Lorenzo Alberto Maria Ambrosi
407325b8ce Fix incorrect file constraint path
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-17 15:20:08 +02:00
Lorenzo Alberto Maria Ambrosi
161debb35a
Merge pull request #2506 from resin-io/fix-64-bit-detection
fix: Fix 64 bit detection on arm
2018-10-12 19:00:13 +02:00
Alexis Svinartchouk
fd5385b127 fix: Fix 64 bit detection on arm
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-12 16:11:13 +02:00
Alexis Svinartchouk
e85e1410aa
Merge pull request #2505 from resin-io/fix-xxhash-digest-read
fix: Provide a Buffer to xxhash.Stream
2018-10-12 16:08:06 +02:00
Alexis Svinartchouk
ac068f353a fix: Provide a Buffer to xxhash.Stream
This fixes the digest being a number instead of a buffer.

Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-12 15:24:00 +02:00
Lorenzo Alberto Maria Ambrosi
fe7c6d0d57
Merge pull request #2503 from resin-io/fix-changelog
fix: Correct 1.4.5 release date & remove checklist
2018-10-11 18:16:08 +02:00
Lorenzo Alberto Maria Ambrosi
abf1e4a8ac fix: Correct 1.4.5 release date & remove checklist
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-10-11 16:15:08 +02:00
Lorenzo Alberto Maria Ambrosi
f9dfb2d0c7
Merge pull request #2441 from resin-io/release-1.4.5
Release v1.4.5
2018-10-11 16:10:54 +02:00
Lorenzo Alberto Maria Ambrosi
da23740f17 v1.4.5
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-10-10 21:29:34 +02:00
Lorenzo Alberto Maria Ambrosi
47f81251d7
Merge pull request #2496 from resin-io/remove-libudev-dependency
Use fork of node-usb to disable libudev
2018-10-09 11:42:17 +02:00
Lorenzo Alberto Maria Ambrosi
7e01eca7f5 Use fork of node-usb to disable libudev
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-10-05 18:43:29 +02:00
Lorenzo Alberto Maria Ambrosi
941b5c9e45
Merge pull request #2495 from resin-io/fix-analytics-in-sdk
Add 'debug' in place of 'logException'
2018-10-04 23:21:35 +02:00
Lorenzo Alberto Maria Ambrosi
207c0d612d Add 'debug' in place of 'logException'
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-10-04 21:20:39 +02:00
Lorenzo Alberto Maria Ambrosi
4035176d88
Merge pull request #2491 from resin-io/warn-if-cant-require-usb
fix(GUI): Warn when requiring usb fails
2018-10-02 17:23:35 +02:00
Alexis Svinartchouk
b9f9968f84 fix(GUI): Warn when requiring usb fails
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-10-02 16:17:58 +02:00
Lorenzo Alberto Maria Ambrosi
7a2dac8d5b
Merge pull request #2443 from resin-io/2442-update-package-repo-info
2442 update package repo info
2018-09-28 08:37:16 +02:00
Lorenzo Alberto Maria Ambrosi
2fb8ad146f Change spectron port to run tests
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-09-27 19:21:54 +02:00
Michael Angelos Simos
2f4a7352d9 makefile: Update etcher deb/rpm publishing
Change-type: patch
Signed-off-by: Michael Angelos Simos <michalis@resin.io>
2018-09-27 16:19:25 +02:00
Michael Angelos Simos
c3ff030542 doc: Update etcher package repo installation and publishing info
Change-type: patch
Signed-off-by: Michael Angelos Simos <michalis@resin.io>
2018-09-27 16:19:25 +02:00
Lorenzo Alberto Maria Ambrosi
aa05cd1449
Merge pull request #2467 from resin-io/add-missing-store-require
fix(GUI): Add missing 'store' require
2018-09-27 13:52:51 +02:00
Alexis Svinartchouk
31cd33f86c fix(GUI): Add missing 'store' require
Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-09-27 12:51:32 +02:00
Lorenzo Alberto Maria Ambrosi
9abca204e3
Merge pull request #2469 from resin-io/fix-double-flash
fix(sudo-prompt): Use a fork of sudo-prompt
2018-09-27 12:49:58 +02:00
Alexis Svinartchouk
e9760c2100 update(sudo-prompt): Update sudo-prompt to 8.2.3
This is to avoid running the child-writer twice when the hostname isn't
set in /etc/hosts. See https://github.com/jorangreef/sudo-prompt/pull/76

Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-09-27 11:37:50 +02:00
Alexis Svinartchouk
1c5bab63a5
Merge pull request #2470 from resin-io/fix-blacklist-setting
gui: Also blacklist match against device & raw path
2018-09-26 10:41:49 +02:00
Jonas Hermsmeier
0d80957639 gui: Also blacklist match against device & raw path
This fixes device blacklist handling to also match against
`drive.device` and `drive.raw`, in order to be able to specify devices
lacking a `devicePath`.

Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2018-09-25 23:59:55 +02:00
Lorenzo Alberto Maria Ambrosi
6c73ddcaca
Merge pull request #2466 from resin-io/update-drivelist-6.4.2
chore: Update drivelist to v6.4.2
2018-09-25 19:58:53 +02:00
Lorenzo Alberto Maria Ambrosi
1bb86fe4a8 Update drivelist to v6.4.2
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-09-25 18:47:03 +02:00
Lorenzo Alberto Maria Ambrosi
6b7be7a82d
Merge pull request #2489 from resin-io/dont-use-tilde-in-rpm
Makefile: Don't use tilde in rpm versions
2018-09-25 17:27:25 +02:00
Lorenzo Alberto Maria Ambrosi
37b25d8422
Change port so not to overlap with other builds
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-09-25 15:22:42 +01:00
Juan Cruz Viotti
49edd1a6dc
Makefile: Don't use tilde in rpm versions
The tilde is not a valid version character in RPM packages, according to
the RPM source code.

Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@resin.io>
2018-09-24 16:42:14 +01:00
Jonas Hermsmeier
a338c6e60a
Merge branch 'salvozappa-fix-travis-build' 2018-09-10 16:45:53 +02:00
Salvatore Zappalà
f9805f3bc7
minifix: add "make webpack" to travis-ci build script
Currently, the Travis CI build is failing due to the fact that
the folder 'generated/etcher' is empty.

The folder is missing because the "make webpack" step is missing
from the travis CI build.

This commit amends that by adding the "make webpack" build step
after linting.

Change-type: patch
Signed-off-by: Salvatore Zappalà <salvatore@salvatorezappala.info>
2018-08-22 10:21:23 +01:00
Lorenzo Alberto Maria Ambrosi
b24c4ea030
Merge pull request #2448 from resin-io/fix-flash-cancel
fix(GUI): Remove results data from cancel event
2018-08-14 23:35:34 +02:00
Lorenzo Alberto Maria Ambrosi
0cabac1eed fix(GUI): Remove results data from cancel event
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-08-14 21:20:00 +02:00
Lorenzo Alberto Maria Ambrosi
7c08dbfbd2
Merge pull request #2445 from resin-io/fix-webpack-electron-main
fix(webpack): Add etcher.js to webpack build
2018-08-14 20:37:35 +02:00
Lorenzo Alberto Maria Ambrosi
c0ec74bbb7 fix(webpack): Add etcher.js to webpack build
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzoa@resin.io>
2018-08-14 19:04:13 +02:00
Lorenzo Alberto Maria Ambrosi
ea834f6778
Merge pull request #2420 from resin-io/better-analytics
fix(GUI): Additional data on events
2018-08-07 19:40:53 +02:00
Lorenzo Alberto Maria Ambrosi
2271f32140 fix(GUI): Add data on events
Application session UUID for global app events
Flashing workflow UUID for every flashing session
Flash instance UUID for every flashing session

Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
2018-08-07 18:56:14 +02:00
Lorenzo Alberto Maria Ambrosi
93906b9b17
Merge pull request #2433 from resin-io/fix-cli-settings
fix(cli): Don't use electron to get USER_DATA_DIR in CLI
2018-08-07 18:42:04 +02:00
Jonas Hermsmeier
40d84b7a82 fix(cli): Don't use electron to get USER_DATA_DIR in CLI
A previous change erronously relied solely on `electron` to determine
the user's data directory, which of course, isn't available when
running in the CLI. So this adds a fallback to the same mechanic
for CLI should this code not be loaded in Electron.

Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2018-08-07 17:14:53 +02:00
Alexis Svinartchouk
d0ee569989
Merge pull request #2439 from resin-io/fix-shared-tests
fix(test): Move available-drives, flash-state and selection-state tests to gui tests
2018-08-07 13:51:47 +02:00
Alexis Svinartchouk
92d969b075 fix(test): Move tests to correct scope
Move available-drives, flash-state and selection-state tests to gui
tests. These files only test gui code and make `make test-cli` fail.

Change-type: patch
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-08-07 09:22:29 +02:00
Lorenzo Alberto Maria Ambrosi
49b70d0efd
Merge pull request #2296 from resin-io/fix-usbboot-on-linux
fix(sdk): load usbboot adapter on start
2018-08-07 04:36:39 +02:00
Alexis Svinartchouk
26779ef1fb fix(sdk): Load usbboot adapter on start
Change-type: patch
Changelog-entry: Load usbboot adapter on start on GNU/Linux if running as root.
Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
2018-08-07 04:01:13 +02:00
Lorenzo Alberto Maria Ambrosi
fd19af23a6
Merge pull request #2436 from resin-io/update-mountutils-1.3.15
upgrade(package): Bump mountutils to v1.3.15
2018-08-07 03:59:54 +02:00
Jonas Hermsmeier
f798fef212 upgrade(package): Bump mountutils to v1.3.15
Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2018-08-07 03:11:10 +02:00
Lorenzo Alberto Maria Ambrosi
c74eab4fb5
Merge pull request #2435 from resin-io/update-drivelist-6.4.0
upgrade(package): Bump drivelist to v6.4.0
2018-08-07 01:53:29 +02:00
Lorenzo Alberto Maria Ambrosi
6a0198639f
Merge branch 'master' into update-drivelist-6.4.0 2018-08-06 18:04:51 +02:00
Lorenzo Alberto Maria Ambrosi
8c870f2db8
Merge pull request #2430 from resin-io/fix-blockmap-checksum-error
fix(writer): Set EVALIDATION on blockmap checksum errors
2018-08-06 17:58:42 +02:00
Jonas Hermsmeier
73d287e7ee
upgrade(package): Bump drivelist to v6.4.0
Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2018-08-02 22:40:25 +02:00
Jonas Hermsmeier
9eb3eea3f1
fix(writer): Set EVALIDATION on blockmap checksum errors
This patches validation errors coming form the `blockmap` module to have
the `EVALIDATION` error code, in order to trigger the appropriate code
paths and analytics.

Change-type: patch
Signed-off-by: Jonas Hermsmeier <jhermsmeier@gmail.com>
2018-08-01 20:54:08 +02:00
Jonas Hermsmeier
df769396b1
Merge pull request #2422 from Jacalz/solus-instructions
doc(README): add install and uninstall instructions for Solus
2018-07-31 21:30:33 +02:00
Jacob
c2e47ca9dc
doc(README): add install and uninstall instructions for Solus
This adds the required steps to installing and uninstalling Etcher on Solus Linux.

Change-Type: patch
Changelog-Entry: Add instructions for installing and uninstalling on Solus.
2018-07-21 15:30:53 +02:00
Jonas Hermsmeier
b348159e0e
Merge pull request #2418 from resin-io/private-module
resinci: Set private: true in package.json to avoid running npm builds
2018-07-18 17:54:37 +02:00
John (Jack) Brown
45b62f0e77 resinci: Set private: true in package.json to avoid running npm builds
Change-type: patch
Signed-off-by: Jack Brown <jack@resin.io>
2018-07-18 07:25:33 -07:00
Jonas Hermsmeier
1fb420c2fc
Merge pull request #2416 from resin-io/enable-production-react
chore(webpack): Set NODE_ENV to production for React / WebPack
2018-07-10 17:08:12 +02:00
Jonas Hermsmeier
b4f2bc1cb3
chore(webpack): Set NODE_ENV to production
This enables production builds for React

Change-Type: patch
2018-07-09 17:34:03 +02:00
Jonas Hermsmeier
d6cc182da2
Merge pull request #2412 from resin-io/update-winusb-driver
upgrade(package): Update winusb-driver-generator
2018-07-09 17:30:13 +02:00
Jonas Hermsmeier
9d7baa86aa
Merge pull request #2413 from resin-io/fix-fs-promisify
fix(gui): Fix missing promisify in file picker model
2018-07-05 20:14:36 +02:00
Jonas Hermsmeier
872cd90dc6
fix(gui): Fix missing promisify in file picker model
Change-Type: patch
2018-07-05 18:52:04 +02:00
Jonas Hermsmeier
00ab816791
upgrade(package): Update winusb-driver-generator
This updates `winusb-driver-generator` to the latest version,
which supports building under VS 2015 and running under Electron 2.0+

Change-Type: patch
2018-07-04 15:12:45 +02:00
Jonas Hermsmeier
2a9e9962e8
Merge pull request #2405 from resin-io/file-selection-constraint
feat(gui): Enable device specific constraints for file selection
2018-07-03 17:08:39 +02:00
Jonas Hermsmeier
ed25dd931e
feat(gui): Enable device specific constraints for file selection
This adds the ability to restrict the file selection to a given device,
only making its mountpoints accessible.

Change-Type: patch
2018-07-03 15:39:49 +02:00
Jonas Hermsmeier
66031f1bc2
Merge pull request #2402 from resin-io/fix-missing-settings
fix(app): Fix settings being unavailable when packaged
2018-06-20 20:46:30 +02:00
Jonas Hermsmeier
a902872880
fix(app): Fix settings being unavailable when packaged
This fixes an issue where the settings model would be missing
from Etcher when packaged, as it's used in two different contexts;
namely the webpack bundle and the main process.

Change-Type: patch
2018-06-20 20:05:56 +02:00
Jonas Hermsmeier
4c2d440871
Merge pull request #2401 from resin-io/file-picker-separators
refactor(gui): Add separating borders to file selector
2018-06-20 20:01:07 +02:00
Jonas Hermsmeier
0da17de422
refactor(gui): Add separating borders to file selector
This adds thin gray borders to the control surfaces in
the file selector for better visual distinction

Change-Type: patch
2018-06-20 19:03:40 +02:00
Jonas Hermsmeier
07025ae76b
Merge pull request #2400 from resin-io/file-picker-path
feat(gui): Add full filename to file selector
2018-06-20 19:01:38 +02:00
Jonas Hermsmeier
d99fe944f3
feat(gui): Add full filename to file selector
This adds the display of the full filename to the file selector.

Change-Type: minor
2018-06-20 18:31:09 +02:00
Jonas Hermsmeier
408b2a473e
Merge pull request #2388 from resin-io/refactor-file-picker
refactor(gui): Refactor file picker fs I/O
2018-06-12 21:15:07 +02:00
Jonas Hermsmeier
fc22e9e28a
refactor(gui): Refactor file picker fs I/O
This refactors the experimental file picker to avoid fs i/o
in as many places as possible to improve performance.
Further, rendering performance is improved by avoiding unnecessary
element state changes invalidating components.
Also, recent files & favorites have been temporarily disabled
due to lack of need for Etcher Pro.

Change-Type: patch
2018-06-12 18:51:58 +02:00
Jonas Hermsmeier
d1c44ab7b1
Merge pull request #2383 from resin-io/webpack-exclude-node
fix(webpack): Exclude all node externals / node_modules
2018-06-08 17:36:29 +02:00
Jonas Hermsmeier
4ddac50d9b
fix(webpack): Exclude all node externals / node_modules
This adds `webpack-node-externals` to exclude node_modules,
immensely reducing bundle size and avoiding complex exclusion rules
for the etcher-sdk

Change-Type: patch
2018-06-08 16:56:21 +02:00
Jonas Hermsmeier
7208ad67f1
Merge pull request #2376 from resin-io/fix-infinite-digest
fix(gui): Fix an inifinite digest loop trigger
2018-05-31 15:01:27 +02:00
Jonas Hermsmeier
fffdeb1320
fix(gui): Fix an inifinite digest loop trigger
This fixes a guard against infinite digest loop triggering
that was erronously dropped during a rebase.

Change-Type: patch
2018-05-30 20:34:38 +02:00
Jonas Hermsmeier
e8fa7d8812
Merge pull request #2375 from resin-io/update-lodash
upgrade(package): Update lodash to 4.17.10
2018-05-30 16:49:36 +02:00
Jonas Hermsmeier
dfdb92957e
Merge pull request #2362 from resin-io/file-picker-performance
fix(GUI): file-picker performance and design improvements
2018-05-30 14:18:17 +02:00
Jonas Hermsmeier
441069f04b
Merge pull request #2373 from resin-io/fix-drive-blacklist
fix(gui): Fix error with empty drive blacklist
2018-05-30 13:37:45 +02:00
Jonas Hermsmeier
201995eb90
upgrade(package): Update lodash to 4.17.10
This updates `lodash` to mitigate a prototype pollution vulnerability.
See https://nodesecurity.io/advisories/577

Change-Type: patch
2018-05-30 13:17:20 +02:00
Benedict Aas
5863319c0b
fix(GUI): file-picker performance and design improvements
- Replace onClick arrow functions in all components that use them for
  efficiency reasons: 300-500% speed-up
- Sort by folders and ignore case for better UX
- Remove use of `rendition.Button` in files, leading to a 10-20%
  performance increase when browsing files
- Proper sidebar width and spacing
- Recents and favorites are now filtered by existence async for a tiny
  performance improvement
- Make Breadcrumbs and Icon pure components to stop frequent re-rendering
- Initial support for array constraints
- Use first constraint as initial path instead of homedir if a
  constraint is set
- Use correct design height on modal, `calc(100vh - 20px)`
- Reset scroll position when browsing a new folder
- Fuse Bluebird `.map()` and `.reduce()` in
  `files.getAllFilesMetadataAsync`.
- Use `localeCompare`'s own case-insensitive option instead of calling
  `.toLowerCase()` twice on `n-2` files compared.
- Use 16px font sizes in sidebar and files to match design.
- Disable `$locationProvider.html5Mode.rewriteLinks`, which seemed to
  take 50ms of the directory changing time.
- Leave file extension as-is in `files.getFileMetadataSync` and the
  async counterpart for a very minor performance improvement.

Change-Type: patch
2018-05-30 12:39:59 +02:00
Jonas Hermsmeier
2986d85b26
fix(gui): Fix error with empty drive blacklist
This fixes an error occuring if the drive blacklist
is empty, and not split correctly

Change-Type: patch
2018-05-30 12:33:12 +02:00
Jonas Hermsmeier
f312457f35
Merge pull request #2372 from resin-io/file-picker-drag-fix
fix(GUI): restrict webkit drag to header
2018-05-30 12:12:45 +02:00
Jonas Hermsmeier
de501f5ba3
Merge pull request #2369 from resin-io/feature-settings
feat: Use settings for feature control
2018-05-29 23:47:58 +02:00
Jonas Hermsmeier
c5e5141b21
refactor(local-settings): Log JSON parse errors 2018-05-29 22:06:41 +02:00
Jonas Hermsmeier
c08cf61d0c
chore(app): Use settings instead of env vars
Change-Type: patch
2018-05-29 22:06:41 +02:00
Jonas Hermsmeier
6728382141
feat: Use settings for feature control
Change-Type: minor
2018-05-29 22:06:40 +02:00
Jonas Hermsmeier
7c3f104d1b
Merge pull request #2368 from resin-io/refactor-settings
feat(gui): Persist local settings to config file
2018-05-29 22:06:02 +02:00
Jonas Hermsmeier
ad6be11bbc
refactor(store): Return unsubscribe directly 2018-05-29 17:36:51 +02:00
Benedict Aas
f09faf6645
minifix(GUI): move success banner back down (#2367)
Change-Type: patch
2018-05-29 12:56:54 +01:00
Benedict Aas
117a7762e1 fix(GUI): restrict webkit drag to header
We ensure that the `-webkit-app-region` attribute is only set to `drag`
on the header element and we explicitly disable it on modals, as this
has unintended behaviour on a non-draggable window with touch-screens.

Change-Type: patch
2018-05-29 11:23:54 +01:00
Jonas Hermsmeier
3d47f494a8
fix(app): Fix config path on Windows, typos 2018-05-28 17:25:22 +02:00
Jonas Hermsmeier
e0ebdc9045
fix(test): Fix lint errors & tests 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
53f8e9328d
feat(app): Make store change-observable
This adds true change observability to the store,
as the `.subscribe()` callback triggers with every dispatch,
even if the data didn't change.

Now `store.observe(onChange)` can be used to only be notified
once the state data actually changes

Change-Type: minor
2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
687e0b563b
refactor(gui): Move shared models to app/models 2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
6232cc7d49
test(settings): Update test specs accordingly
Change-Type: patch
2018-05-25 20:35:59 +02:00
Jonas Hermsmeier
2a6670a404
refactor: Remove use of localStorage for local settings
Change-Type: minor
2018-05-23 21:20:51 +02:00
Jonas Hermsmeier
447efc7096
refactor: Move shared/store.js -> gui/app/models/store.js 2018-05-23 21:20:50 +02:00
Benedict Aas
c47878202d
feat(GUI): center content independent to window resolution (#2299)
We pave way for different sizes of Etcher windows by dynamically
centering the content with flexbox.

Connects-To: #2263
Closes: #2241
Change-Type: patch
Changelog-Entry: Center content independent to window resolution.
2018-05-23 20:10:02 +01:00
Jonas Hermsmeier
349076bf34
Merge pull request #2353 from resin-io/webber-packer
chore(package): Add npm run script for webpack
2018-05-23 19:43:22 +02:00
Jonas Hermsmeier
1748bf2e2a
chore(package): Add npm run script for webpack
Make life simpler

Change-Type: patch
2018-05-22 18:44:59 +02:00
Jonas Hermsmeier
d9a7730511 test(eslint): Fix JSX not being linted (#2358)
Change-Type: patch
2018-05-21 11:28:22 +01:00
Jonas Hermsmeier
4a239cc217 upgrade(package): Update React to v16 (#2355)
Change-Type: patch
2018-05-21 11:23:42 +01:00
Benedict Aas
ce2534c5b7
minifix(GUI): resolve react missing key field warning (#2354)
We attach key fields where necessary to make the warnings go away.

Change-Type: patch
2018-05-21 11:23:20 +01:00
Jonas Hermsmeier
3083f5fd55
Merge pull request #2351 from resin-io/fix-username-spaces-diskpart
fix(diskpart): Fix diskpart argv when tmpdir contains spaces
2018-05-18 17:46:42 +02:00
Jonas Hermsmeier
2045066b16
fix(diskpart): Fix diskpart argv when tmpdir contains spaces
This escapes the diskpart script filename when shelling out,
to avoid failure when the username and thus the `os.tmpdir()` path
contains spaces.

Change-Type: patch
2018-05-17 18:03:41 +02:00
Jonas Hermsmeier
995177498f
Merge pull request #2349 from resin-io/add-files-module
fix: add missing files module
2018-05-17 18:02:55 +02:00
Benedict Aas
c00b7b62d6 fix: add missing files module
We add a convenience module for file and path operations.
Tests included.

Change-Type: patch
2018-05-17 15:34:34 +01:00
Benedict Aas
93b772f197
fix: ensure file-picker is slicing arrays (#2350)
We ensure the file-picker is slicing arrays when the localStorage values
aren't available.

Change-Type: patch
2018-05-17 10:40:19 +01:00
Benedict Aas
7782f94daa
feat(GUI): add electron-native file-picker component (#2333)
We add a file-picker written with Rendition/React. It is activated with
the `ETCHER_EXPERIMENTAL_FILE_PICKER` environment variable. Further
customisation can be done with the `ETCHER_FILE_BROWSER_CONSTRAIN_FOLDER`
variable that takes a path and allows one to constrain the file-picker to
a folder.

Related: https://github.com/resin-io/etcher/issues/2238
Related: https://github.com/resin-io/etcher/issues/2285
Change-Type: patch
Changelog-Entry: Add electron-native file-picker component.
2018-05-16 20:34:04 +01:00
Jonas Hermsmeier
7c97dc8004
Merge pull request #2346 from CherryDT/master
Fix devtools key binding for Windows in SUPPORT.md
2018-05-16 21:10:25 +02:00
Benedict Aas
34ce00e2d5
feat(GUI): hide unsafe mode option with env var (#2347)
We hide the unsafe mode option toggle with an env var
`ETCHER_HIDE_UNSAFE_MODE` that also enables unsafe mode.

Closes: https://github.com/resin-io/etcher/issues/2243
Change-Type: patch
Changelog-Entry: Hide unsafe mode option toggle with an env var.
2018-05-16 19:52:55 +01:00
CherryDT
702658cca5
Fix devtools key binding for Windows in SUPPORT.md 2018-05-16 16:39:33 +02:00
Benedict Aas
e472fe0276
feat: blacklist devices by device path (#2345)
We use `devicePath` instead of `device` to blacklist drives using the
`ETCHER_BLACKLISTED_DRIVES` environment variable.

Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
2018-05-16 15:28:10 +01:00
Jonas Hermsmeier
fb1c381ab7
Merge pull request #2343 from resin-io/disable-notifications
feat(gui): Add desktop notification setting
Close #2254
2018-05-16 00:51:49 +02:00
Jonas Hermsmeier
03c7998c11
feat(gui): Add desktop notification setting
This adds a setting to disable desktop notifications, to be controlled
via configuration file

Change-Type: feat
2018-05-15 18:58:10 +02:00
Benedict Aas
35729fc36b
feat(GUI): use design background and drive size ordering (#2341)
We use the new design background color, and order the drive step size in
accordance with the new design as well.

Related: https://github.com/resin-io/etcher/issues/2310
Change-Type: patch
Changelog-Entry: Use new design background color and drive step size
ordering.
2018-05-15 14:23:33 +01:00
Benedict Aas
f6ce603e45
feat(GUI): add convenience localstorage class (#2276)
* feat(GUI): add convenience localstorage class

We add a class `Storage` and accompanying helper methods that makes
localStorage usage easier.

Change-Type: patch
Changelog-Entry: Add a convenience Storage class on top of localStorage.
2018-05-15 11:59:36 +01:00
Benedict Aas
81a75ca955
feat(GUI): use new design blue and spacing (#2327)
We use the new design blue, spacing, and order of step buttons.

Closes: https://github.com/resin-io/etcher/issues/2310
Change-Type: patch
2018-05-14 15:58:45 +01:00
Jonas Hermsmeier
b57c9a51f8
Merge pull request #2331 from resin-io/env-analytics
feat(gui): Add ability to set analytics tokens via env
Close #2329
2018-05-11 20:04:21 +02:00
Jonas Hermsmeier
df396966b0
Merge pull request #2332 from resin-io/disable-update-notify
minifix(gui): Don't check for updates when in resin
2018-05-11 20:03:45 +02:00
Jonas Hermsmeier
b8897e0193
minifix(gui): Don't check for updates when in resin
This disabled Etcher checking for updates & showing update notifications
if running under resinOS with update locks enabled

Change-Type: patch
2018-05-11 16:36:14 +02:00
Jonas Hermsmeier
150e8112ea
feat(gui): Add ability to set analytics tokens via env
This adds the ability to set the Sentry & Mixpanel API tokens
via environment variables.

Change-Type: patch
2018-05-11 16:25:11 +02:00
Jonas Hermsmeier
196f16b941
Merge pull request #2326 from resin-io/resin-update-lock
feat(gui): Add resin update lock based on inactivity
2018-05-10 21:07:01 +02:00
Benedict Aas
21cb7a4847
feat(GUI): env var toggle autoselecting all valid drives (#2306)
We introduce an environment variable
`ETCHER_DISABLE_EXPLICIT_DRIVE_SELECTION` that both enables
autoselection of drives and disables explicit drive selection by hiding
the buttons allowing this. All valid drives are autoselected, i.e. any
drive-image pair that does not result in an error, however warnings are
accepted.

Closes: https://github.com/resin-io/etcher/issues/2262
Change-Type: patch
Changelog-Entry: Introduce env var to toggle autoselection of all
drives.
2018-05-10 18:53:53 +01:00
Jonas Hermsmeier
bb2dac7504
feat(gui): Add resin update lock based on inactivity
This adds functionality to acquire & release the update lock
when running under resinOS, re-using the `ELECTRON_RESIN_UPDATE_LOCK`
environment variable from `resin-electronjs`.

Further this adds the `ETCHER_INTERACTION_TIMEOUT_MS` env var, to
facilitate adjusting the inactivity period required to release the lock.

Change-Type: minor
2018-05-10 19:15:31 +02:00
Jonas Hermsmeier
f5fd2f2be3
Merge pull request #2325 from resin-io/update-drivelist
upgrade(package): Bump drivelist 6.1.7 -> 6.2.2
Close #2235
2018-05-10 14:20:38 +02:00
Jonas Hermsmeier
e6ea3879c3
upgrade(package): Bump drivelist 6.1.7 -> 6.2.2
This will enable use of unique device paths on Linux

Change-Type: patch
2018-05-10 13:33:50 +02:00
Jonas Hermsmeier
c07895d418
Merge pull request #2319 from resin-io/update-keyserver
doc(README): Use ubuntu keyserver for apt-key
2018-05-09 21:04:49 +02:00
Jonas Hermsmeier
58fb1cf4c3
Merge pull request #2318 from resin-io/kiosk
minifix(gui): Only enable Kiosk Mode when FULLSCREEN is set
2018-05-09 20:09:29 +02:00
Jonas Hermsmeier
52cc8cb8fc
doc(README): Use ubuntu keyserver for apt-key
As pgp.mit.edu has become extremely unreliable, this switches to
keyserver.ubuntu.com for retrieval of package keys

Change-Type: patch
2018-05-09 17:30:40 +02:00
Benedict Aas
1b30dab8eb
fix(webpack): don't rewrite import paths inside node_modules (#2195)
We ensure that paths inside node_modules files are kept untouched, as
currently the RegExp can match 'shared' folders inside those and rewrite
paths, breaking them.

Change-Type: patch
2018-05-09 16:09:17 +01:00
Jonas Hermsmeier
40df4a94a7
minifix(gui): Only enable Kiosk Mode when FULLSCREEN is set
This fixes the `kiosk` setting always being true, and causing
the operating system's desktop to disappear.

Change-Type: patch
2018-05-09 17:04:38 +02:00
Jonas Hermsmeier
262d06f035
Merge pull request #2311 from resin-io/config-file
feat(gui): Add ability to read settings from a config file
Close #1356
2018-05-09 17:00:36 +02:00
Jonas Hermsmeier
408ab99774
Merge pull request #1921 from resin-io/link-to-windows-usbboot-drivers
feat(GUI): link to drivers when clicking a driverless usbboot device
2018-05-09 16:48:00 +02:00
Jonas Hermsmeier
28cb21db13
Merge pull request #2292 from resin-io/bench-verify
feat(writer): Use xxHash instead of SHA512 for verification
2018-05-09 16:46:02 +02:00
Benedict Aas
7f37f4ca41
feat(GUI): add font-awesome (#2177)
We add font-awesome icons as this is more in-line with the designs.

Change-Type: patch
Changelog-Entry: Add font-awesome.
2018-05-09 15:44:03 +01:00
Jonas Hermsmeier
5f85258e84
feat(gui): Add ability to read settings from a config file
This adds the capability to configure settings via a `.etcher.json` file,
either in the user's home directory, or the current working directory.
In the case of the home directory, the config file is `$HOME/.config/etcher/config.json`,
while on Windows `$HOME/.etcher.json` is used.
The defined settings are merged with localStorage settings, and preceding
configuration files.
If both are present, the current working directory takes precedence.

Change-Type: minor
Changelog-Entry: Add support for configuration files
2018-05-09 16:22:07 +02:00
Benedict Aas
cde1776a2d
feat(GUI): use gtk3 dark theme mode (#2314)
We enable the `darkTheme` mode for GTK-3 applications (mainly Linux)
that suits Etcher's dark theme better, making the window title bar dark.

Change-Type: patch
Changelog-Entry: Use GTK-3 darkTheme mode.
2018-05-09 11:13:14 +01:00
Benedict Aas
7f6303391a
feat(GUI): add env var to toggle fullscreen (#2313)
We add an environment variable to toggle Etcher in fullscreen.

Closes: https://github.com/resin-io/etcher/issues/2307
Change-Type: patch
Changelog-Entry: Add environment variable to toggle fullscreen.
2018-05-09 11:08:15 +01:00
Benedict Aas
66c7806cfa
feat(GUI): blacklist drives with an env var (#2315)
We add an environment variable `ETCHER_BLACKLISTED_DRIVES` that allows
us to filter certain drives from ever showing up in Etcher with comma
separated device paths, e.g. `/dev/sda,/dev/sdb,/dev/mmcblk0`.

Closes: https://github.com/resin-io/etcher/issues/2264
Change-Type: patch
Changelog-Entry: Allow blacklisting of drives through and environment
variable ETCHER_BLACKLISTED_DRIVES.
2018-05-09 11:06:18 +01:00
Benedict Aas
2cdb6945ba
feat(GUI): show selected drives below drive step (#2309)
We add a list of selected drives below the drive selection step, able to
accommodate four lines of drives before scrolling occurs.

Closes: https://github.com/resin-io/etcher/issues/2263
Change-Type: patch
Changelog-Entry: Show selected drives below drive selection step.
2018-05-08 17:45:27 +01:00
Benedict Aas
ca45855ed7
feat(GUI): add drive quantity to flash analytics (#2298)
We add a field `driveCount` to the flash analytics events in the image
writer.

Change-Type: patch
2018-05-08 10:56:15 +01:00
Benedict Aas
07ed90ed11
minifix: add jsx files to gitattributes and attribute jviotti (#2302)
Change-Type: patch
2018-05-04 14:46:27 +01:00
Benedict Aas
c1b97b1b44
minifix(GUI): negate predicate to show help icon (#2300)
Change-Type: patch
2018-05-03 11:00:37 +01:00
Benedict Aas
674019ea75
feat(GUI): add button to cancel flash process (#2301)
We add a cancel button next to the flash progress bar that gracefully
aborts the flash process.

Closes: https://github.com/resin-io/etcher/issues/1791
Closes: https://github.com/resin-io/etcher/issues/2234
Closes: https://github.com/resin-io/etcher/issues/2245
Change-Type: patch
Changelog-Entry: Add a button to cancel the flash process.
2018-05-03 10:58:15 +01:00
Jonas Hermsmeier
8f762484f2
feat(gui): Add CTA in drivelist, update drive download modal 2018-05-02 23:37:15 +02:00
Jonas Hermsmeier
4174991345
feat(gui): Add simple confirmation modal 2018-05-02 23:21:02 +02:00
Benedict Aas
71064cc760
fix(GUI): fix multi-writes analytics (#2295)
We make the analytics block into a function `handleErrorLogging` and
use it in the fail event that happens during multi-writes. Previously
error events would be handled when single drives were flashed on Promise
rejection, instead we now only handle the Promise rejection when all
devices fail as a special event.

Change-Type: patch
Changelog-Entry: Fix multi-writes analytics by reusing existing logic in
multi-write events.
2018-05-02 22:02:31 +01:00
Juan Cruz Viotti
4c40c8ff30
feat(GUI): link to drivers when clicking a driverless usbboot device
Step 2 until we support installing the drivers from within Etcher. This
also introduces an "Open drive link" Mixpanel event.

See: https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md
See: https://github.com/resin-io/etcher/pull/1892
Change-Type: patch
Changelog-Entry: Download usbboot drivers installer when clicking a driverless usbboot device on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-05-02 22:10:49 +02:00
Benedict Aas
d7211b130b
feat(GUI): allow disabling links and hiding help link (#2290)
We allow users to pass an env var `ETCHER_DISABLE_EXTERNAL_LINKS` to
disable external links and hide links rendered useless by the change
such as the help icon.

Closes: https://github.com/resin-io/etcher/issues/2246
Closes: https://github.com/resin-io/etcher/issues/2247
Change-Type: patch
Changelog-Entry: Allow disabling links and hiding help link with an env var.
2018-05-02 17:29:08 +01:00
Jonas Hermsmeier
e40d5a0a5d
Merge pull request #2291 from resin-io/publish-symantec
doc: Update MAINTAINERS.md with Symantec Whitelisting
2018-04-28 00:27:34 +02:00
Jonas Hermsmeier
553fbf1a77
minifix(writer): Increase HWM for verification readstream
Change-Type: patch
2018-04-27 22:29:03 +02:00
Jonas Hermsmeier
d3a4753b79
feat(writer): Use xxHash instead of SHA512 for verification
This switches from SHA512 to xxHash for verification hashing,
as xxHash provides more throughput.

Change-Type: patch
2018-04-27 21:51:05 +02:00
Jonas Hermsmeier
12cc0de571
doc: Update MAINTAINERS.md with Symantec Whitelisting
This adds instructions for submitting Etcher for false positive detection
to Symantec Endpoint Protection.

Change-Type: patch
2018-04-27 21:09:28 +02:00
Jonas Hermsmeier
cbd531e161
Merge pull request #2269 from resin-io/release-1.4.4
Release v1.4.4
2018-04-26 19:06:43 +02:00
Jonas Hermsmeier
a8bbe02e21
v1.4.4 2018-04-25 20:58:17 +02:00
Jonas Hermsmeier
6605d5ee63
Merge pull request #2275 from resin-io/revert-image-data
fix(tests): Revert unintended change to raspberrypi-raw.dmg
2018-04-25 17:36:36 +02:00
Jonas Hermsmeier
df8bacd82e
fix(tests): Revert unintended change to raspberrypi-raw.dmg
This file was accidentally changed due to a globally executed search & replace

Change-Type: patch
2018-04-25 16:34:12 +02:00
Benedict Aas
ee831da52d
minifix: replace succeeded with successful in messages (#2273)
Change-Type: patch
2018-04-25 15:08:46 +01:00
Jonas Hermsmeier
8f969374c7
Merge pull request #2272 from resin-io/fix-store-warning-deselect
fix(store): keep single warning-drives selected
2018-04-25 14:39:58 +02:00
Benedict Aas
5a788b04b5 fix(store): keep single warning-drives selected
We ensure that drive-image pairs with warnings don't get deselected when
there is only one drive available. This happenened because there was no
check for any previous selected devices. Comes with a test case.

Fixes: https://github.com/resin-io/etcher/issues/2267
Change-Type: patch
Changelog-Entry: Keep single warning-drive-image pairs selected.
2018-04-25 00:49:42 +01:00
Benedict Aas
b88a45aa79
refactor(GUI): make the finish notification message concise (#2268)
We make the finish notification message print the device name as usual
when there's one target, and instead list quantity of successful and
failed devices when there are multiple. Previously it would list all
device names, and wouldn't specify how many were successful or failures.

Change-Type: patch
2018-04-24 22:04:36 +01:00
Jonas Hermsmeier
3c20a056e6
Merge pull request #2228 from resin-io/change-succeeded-successful
refactor: use word successful instead of succeeded
2018-04-24 18:24:05 +02:00
Benedict Aas
82a57d34b8
fix(GUI): remove success screen dots with a quantity of zero (#2227)
We remove success screen dots that are zero, which mainly means that the
error dot disappears as it shouldn't currently be possible to end up
with zero successful devices on that screen.

Change-Type: patch
2018-04-23 18:33:31 +01:00
Benedict Aas
c4d7076fe8 refactor: use word successful instead of succeeded
We replace 'succeeded' with 'successful' throughout the codebase.

Change-Type: patch
2018-04-23 18:31:44 +01:00
Jonas Hermsmeier
00b11157b2
Merge pull request #2217 from resin-io/release-1.4.3
Release v1.4.3
2018-04-20 21:22:11 +02:00
Jonas Hermsmeier
b63bb1ac0c
v1.4.3 2018-04-20 15:46:38 +02:00
Jonas Hermsmeier
882d0ecba8
Merge pull request #2219 from resin-io/fix-zero-zero
fix(gui): Fix zero-zero devices when verify is disabled
2018-04-20 15:45:47 +02:00
Jonas Hermsmeier
963f1a11eb
fix(gui): Fix zero-zero devices when verify is disabled
This fixes a state where the success screen would display
zero succeeded and zero failed devices if verification was
turned off. This could occur due to the "done" event being
emitted before the next progress event could set the relevant data.

Change-Type: patch
2018-04-20 01:04:30 +02:00
Jonas Hermsmeier
ba8acb40ec
Merge pull request #2218 from resin-io/fix-flash-result-errors
fix(gui): De-serialize errors from flashResults
2018-04-19 22:56:34 +02:00
Jonas Hermsmeier
1d4ea2164f
fix(gui): De-serialize errors from flashResults
Change-Type: patch
2018-04-19 21:46:03 +02:00
Jonas Hermsmeier
0199243ce9
Merge pull request #2216 from resin-io/fix-usbboot-blobs
fix(usbboot): Move blob handling to SDK
2018-04-19 17:46:35 +02:00
Jonas Hermsmeier
4c8b97afb3
fix(usbboot): Move blob handling to SDK
This moves the usbboot blob handling into the SDK to avoid
root dirname conflicts through shimmed __dirname in bundled UI
and different contexts of execution.

Change-Type: patch
2018-04-19 16:54:23 +02:00
Jonas Hermsmeier
3bac0225e5
refactor(usbboot): Move lib/blobs/usbboot/ -> lib/sdk/adapters/usbboot/blobs 2018-04-19 15:48:59 +02:00
Jonas Hermsmeier
7d13c8d9be
Merge pull request #2213 from resin-io/release-1.4.2
Release v1.4.2
2018-04-19 00:34:03 +02:00
Jonas Hermsmeier
4190a87171
v1.4.2 2018-04-18 23:09:49 +02:00
Jonas Hermsmeier
69e719c4c7
Merge pull request #2215 from resin-io/revert-diskclean
Revert "feat(lib): Use win-drive-clean instead of diskpart"
2018-04-18 23:07:49 +02:00
Jonas Hermsmeier
c5df8742c5
Merge pull request #2214 from resin-io/fix-usbboot-macos
fix(drive-scanner): Fix usbboot blob path when bundled
2018-04-18 22:48:25 +02:00
Jonas Hermsmeier
5867edcc70
Revert "feat(lib): Use win-drive-clean instead of diskpart"
This reverts commit 47fc1b7357bdb9e9aa8e2d7476690435087d984e
in order to prevent a possible regression, until properly investigated
and fixed.

Change-Type: patch
Changelog-Entry: Revert using native binding to clean disks on Windows
2018-04-18 21:55:08 +02:00
Jonas Hermsmeier
b3a7255eed
fix(drive-scanner): Fix usbboot blob path when bundled
This fixes the usbboot blobs path when the application is bundled & packaged.

Change-Type: fix
Changelog-Entry: Fix usbboot blob loading
2018-04-18 21:42:53 +02:00
Jonas Hermsmeier
4179def119
Merge pull request #2211 from resin-io/remove-iserror
fix(image-writer): Remove use of _.isError
2018-04-18 19:12:47 +02:00
Jonas Hermsmeier
ef9b897394
Merge pull request #2198 from resin-io/drive-label-fallback
fix(GUI): display untitled device when device lacks description
2018-04-18 18:37:26 +02:00
Jonas Hermsmeier
c225dd89c6
fix(image-writer): Remove use of _.isError
`_.isError()` returns `true` for anything that has a `name` and `message`
property, causing the check here to always keep the plain object as error.

Change-Type: patch
2018-04-18 17:44:14 +02:00
Benedict Aas
d59ebad167 fix(GUI): display untitled device when device lacks description
We fallback to `'Untitled Device'` when the device lacks a
`.description` field.

Change-Type: patch
Changelog-Entry: Display Untitled Device when the device lacks a
description field.
2018-04-18 16:33:39 +01:00
Jonas Hermsmeier
347932b213
Merge pull request #2209 from resin-io/filter-raid-devices
fix(adapters): Always ignore RAID attached devices
2018-04-17 20:09:31 +02:00
Benedict Aas
32bc615e78
feat(GUI): display succeeded and failed devices on finish screen (#2206)
We display the quantity of succeeded and failed devices using status
dots on the finish screen.

Change-Type: patch
Changelog-Entry: Display succeeded and failed device quantities on the
finish screen.
2018-04-17 15:52:02 +01:00
Jonas Hermsmeier
355373f24d
fix(adapters): Always ignore RAID attached devices
Change-Type: patch
Changelog-Entry: Exclude RAID devices from drive selection list
2018-04-17 16:14:05 +02:00
Jonas Hermsmeier
a044d2fe86
Merge pull request #2207 from resin-io/update-drivelist
upgrade(package): Update drivelist 6.1.5 -> 6.1.7
2018-04-17 13:12:38 +02:00
Jonas Hermsmeier
1d44eff896
upgrade(package): Update drivelist 6.1.5 -> 6.1.7
This fixes a ReferenceError that could occur when the DeviceNode was null,
as well as devices being null when run after the system recovers from sleep / standby.

Change-Type: patch
2018-04-17 00:36:54 +02:00
Jonas Hermsmeier
c1b746ed51
Merge pull request #2205 from resin-io/fix-ci-python
fix(ci): Fix pip installation
2018-04-16 22:35:27 +02:00
Jonas Hermsmeier
3381ad042b
Merge pull request #2199 from resin-io/fix-ipc-user-error
fix(child-writer): Fix handling of user errors over IPC
2018-04-16 22:34:57 +02:00
Benedict Aas
a1b5766a71
minifeat(GUI): prefix multiple devices label with quantity (#2204)
Change the `Multiple Devices (n)` label on selected devices to a
quantity-prefixed form `n Devices`.

Change-Type: patch
2018-04-16 20:11:44 +01:00
Benedict Aas
aeeb1d4294
feat(GUI): remove unnecessary status dots (#2202)
We remove usage of the status dots except when failed devices occur, in
which case we still display the red failed dot and quantity. We also use
singular and plural depending on the quantity of failed devices.

Change-Type: patch
2018-04-16 20:11:19 +01:00
Benedict Aas
7ceec47246
feat(GUI): make the progress button blue on verification (#2203)
We make the progress button blue on verification.

Change-Type: patch
Changelog-Entry: Make the progress button blue on verification.
2018-04-16 20:06:40 +01:00
Jonas Hermsmeier
ede510139f
fix(ci): Fix pip installation
The pip tarball URL now redirects to another location, which
caused `curl` to fail, as the follow-redirects option wasn't specified.

Change-Type: patch
2018-04-16 20:53:36 +02:00
Jonas Hermsmeier
cc848ef9f2
fix(child-writer): Fix handling of user errors over IPC
This fixes transmission of user errors over IPC, as the `report`
property was previously missing. Further it also adds more properties
to `errors.toJSON`, like `syscall`, `errno`, etc. and re-uses the method
for failure signalling.

Change-Type: patch
2018-04-13 18:36:29 +02:00
Jonas Hermsmeier
1c43ee1b18
Merge pull request #2192 from resin-io/release-1.4.1
Release v1.4.1
2018-04-11 00:14:21 +02:00
Jonas Hermsmeier
741f540f77
v1.4.1 2018-04-10 18:31:06 +02:00
Jonas Hermsmeier
fdd26ba8f1
Merge pull request #2190 from resin-io/webpack-exclude-package
fix(webpack): Exclude package.json from UI bundle
2018-04-10 17:42:38 +02:00
Jonas Hermsmeier
bec61f4ce7
fix(webpack): Exclude package.json from UI bundle
Change-Type: patch
2018-04-10 16:47:55 +02:00
Jonas Hermsmeier
2af1496f11
Merge pull request #2186 from resin-io/fix-readme-ci-badge
doc(README): Remove Mac OS from Travis CI badge label
2018-04-10 15:45:26 +02:00
Jonas Hermsmeier
f9e23a17d9
Merge pull request #2189 from resin-io/enable-node-gyp-rebuild
Enable nodeGypRebuild for Etcher builds
2018-04-09 19:31:39 +02:00
John (Jack) Brown
8050fa58a5 Enable nodeGypRebuild for Etcher builds
This will ensure we have all bindings built, even when using cached
modules.

Change-Type: patch
2018-04-09 09:20:58 -07:00
Jonas Hermsmeier
e04023bdfc
Merge pull request #2138 from resin-io/release-1.4.0
Release v1.4.0
2018-04-07 00:05:14 +02:00
Jonas Hermsmeier
950f853fa3
v1.4.0 2018-04-06 20:59:56 +02:00
Jonas Hermsmeier
c3c15e222d
Merge pull request #2183 from resin-io/fix-ui-writer-errors
fix(writer): Fix erronous event handling in write pipeline
2018-04-06 20:59:34 +02:00
Jonas Hermsmeier
3906816e67
doc(README): Remove Mac OS from Travis CI badge label
This removes the "mac" from the Travis CI badge label, as we're not
running Mac OS builds on Travis CI anymore.

Change-Type: none
2018-04-06 20:53:51 +02:00
Jonas Hermsmeier
fe43e21484
fix(writer): Fix erronous event handling in write pipeline
This fixes the use and handling of events in the write pipeline,
such that the pipeline would not be prematurely stalled or terminated.
Also, a new `fail` event is introduced, to signal non-fatal errors.

Change-Type: patch
2018-04-06 20:26:01 +02:00
Jonas Hermsmeier
5f7fd506a3
Merge pull request #2181 from resin-io/fix-menu-about
fix(gui): Fix "about" menu entry
2018-04-06 14:51:31 +02:00
Jonas Hermsmeier
65a3e51ff9
Merge pull request #2180 from resin-io/fix-writer-progress-state
fix(writer): Fix writer progress state values
2018-04-05 23:44:48 +02:00
Jonas Hermsmeier
722c1c6257
Merge pull request #2179 from resin-io/update-drivelist
upgrade(package): Bump drivelist to v6.1.5
2018-04-05 23:26:56 +02:00
Jonas Hermsmeier
2f872375ef
fix(gui): Fix "about" menu entry
This fixes the capitalization of the "About Etcher" entry in the application menu

Change-Type: patch
2018-04-05 21:56:33 +02:00
Jonas Hermsmeier
f119ca683e
fix(writer): Fix writer progress state values
This force-defaults the individual stream speeds to zero,
in order to avoid null values when not available yet.

Change-Type: patch
2018-04-05 21:51:00 +02:00
Jonas Hermsmeier
176c6b76cd
upgrade(package): Bump drivelist to v6.1.5
Change-Type: patch
2018-04-05 21:35:30 +02:00
Jonas Hermsmeier
64604dbcc6
Merge pull request #2156 from resin-io/fix-store-quantity-guards
fix: ensure flash quantity fields are finite
2018-04-05 18:54:05 +02:00
Jonas Hermsmeier
0344a3f104
Merge pull request #2173 from resin-io/label-size-newline
fix(gui): Ensure image/drive size displayed on new line
2018-04-05 18:53:34 +02:00
Benedict Aas
c17247da58
feat(GUI): move drive selector warning to flash step (#1917)
We move the drive selector warning to the flash step, and concatenate
warning messages when more than one needs to be displayed at once.

Change-Type: patch
Changelog-Entry: Move the drive selector warning dialog to the flash step.
2018-04-05 17:26:16 +01:00
Jonas Hermsmeier
9601daedb7
Merge pull request #2174 from resin-io/update-codespell
test(lint): Update codespell 1.11.0 -> 1.12.0
2018-04-05 17:18:03 +02:00
Jonas Hermsmeier
f958f3751d
fix(gui): Ensure image/drive size displayed on new line
This forces the image and device size to always be displayed on the
second line for visual consistency.

Change-Type: patch
2018-04-05 16:52:26 +02:00
Jonas Hermsmeier
0d1b9641c7
Merge pull request #2172 from resin-io/fix-inherit-env-windows
fix(image-writer): Don't inherit environment on Windows
2018-04-05 16:43:13 +02:00
Jonas Hermsmeier
9a9dd43646
Merge pull request #2175 from resin-io/fix-succeeded-count
fix(writer): Fix succeeded flash count in progress state
2018-04-05 16:42:50 +02:00
Jonas Hermsmeier
222257d25d
fix(writer): Fix succeeded flash count in progress state
This fixes a bug where succeeded flashes could become negative due to
improper math

Change-Type: patch
2018-04-04 21:03:48 +02:00
Jonas Hermsmeier
dd961ad30b
test(lint): Update codespell 1.11.0 -> 1.12.0
This updates codespell, and fixes new spelling error detections

```
lib/shared/models/selection-state.js:377: Unselect  ==> Deselect
lib/gui/app/components/modal/styles/_modal.scss:72: programatically  ==> programmatically
tests/shared/errors.spec.js:88: prioritise  ==> prioritize
tests/shared/errors.spec.js:94: prioritise  ==> prioritize
tests/shared/errors.spec.js💯 prioritise  ==> prioritize
tests/gui/components/svg-icon.spec.js💯 prioritise  ==> prioritize
docs/MAINTAINERS.md:19: artefacts  ==> artifacts
docs/MAINTAINERS.md:21: artefacts  ==> artifacts
docs/MAINTAINERS.md:25: artefacts  ==> artifacts
docs/MAINTAINERS.md:36: artefacts  ==> artifacts
docs/MAINTAINERS.md:96: artefacts  ==> artifacts
docs/MAINTAINERS.md:147: artefacts  ==> artifacts
CHANGELOG.md:492: interferring  ==> interfering
```

Change-Type: patch
2018-04-04 21:00:34 +02:00
Jonas Hermsmeier
abf2dc3efc
fix(image-writer): Don't inherit environment on Windows
Due to improper command escaping, cmd metacharacters lead to failure
in spawning the child writer process on Windows when the entire environment
is passed through the command line. The user's environment will still
be inherited by default on Windows.

Change-Type: patch
2018-04-04 20:23:33 +02:00
Benedict Aas
99f819dfbf
minifix: add spacing to drive warning icon (#2169)
Change-Type: patch
Changelog-Entry: Add spacing to the drive warning icon.
2018-04-04 14:53:20 +01:00
Benedict Aas
dc484d79ed fix: ensure flash quantity fields are finite
We replace the `_.identity` predicate with `_.isFinite` to ensure
the flash quantity fields are numbers.

Change-Type: patch
Changelog-Entry: Ensure flash quantity fields are finite.
2018-04-03 21:25:49 +01:00
Jonas Hermsmeier
42f522532e
Merge pull request #2171 from resin-io/electron-1.7.13
upgrade(package): Bump Electron to v1.7.13
2018-04-03 22:00:04 +02:00
Benedict Aas
f97b439bc0
minifix: use multi-drive methods with drive-list warning button (#2170)
Change-Type: patch
Changelog-Entry: Use multi-drive methods with drive-list warning button.
2018-04-03 20:33:20 +01:00
Benedict Aas
65a4a959bb
feat: expose all flash state fields to the store (#2153)
We expose all the flash state fields to the store, and mirror
`speed`'s format with `totalSpeed` with MB as the size unit.
We also format the progress state messages to use information
available with multiwrites.

Change-Type: patch
Changelog-Entry: Expose all flash state fields to the store.
2018-04-03 20:32:38 +01:00
Jonas Hermsmeier
07d6fde34e
upgrade(package): Bump Electron to v1.7.13
This updates Electron to v1.7.13 in order to mitigate 2 vulnerabilities:
[CVE-2018-1000136] and [CVE-2018-1000118]

[CVE-2018-1000136]: https://nvd.nist.gov/vuln/detail/CVE-2018-1000136
[CVE-2018-1000118]: https://nvd.nist.gov/vuln/detail/CVE-2018-1000118

Change-Type: patch
Changelog-Entry: Update Electron to v1.7.13
2018-04-03 20:49:52 +02:00
Jonas Hermsmeier
b1dfbcbceb
Merge pull request #2166 from resin-io/fix-html-lint
fix(lint): Fix html-lint error about "lang" attr
2018-04-02 18:24:15 +02:00
Jonas Hermsmeier
5e6f7e41e6
fix(lint): Fix html-lint error about "lang" attr
This avoids a new error from `html-lint` about the "lang" attr
on `<html>` tags, which isn't applicable to templates.

Change-Type: patch
2018-04-02 17:37:40 +02:00
Jonas Hermsmeier
df95ab1217
Merge pull request #2167 from resin-io/replace-ascii-only-check
test(lint): Replace ASCII-only check with ESLint rule
2018-04-02 17:37:12 +02:00
Jonas Hermsmeier
edf924d012
test(lint): Replace ASCII-only check with ESLint rule
This replaces the `ensure-all-text-files-only-ascii` sanity-check
with an ESLint rule to only check identifiers in code against being
printable ASCII, as there are places where UTF-8 in content is required,
which would make the previous check fail.

Change-Type: patch
2018-04-02 17:10:23 +02:00
Jonas Hermsmeier
8886732b21
Merge pull request #2163 from resin-io/update-resinci-copyright
chore(ci): Update copyright years in .resinci.json
2018-03-30 16:29:28 +02:00
Jonas Hermsmeier
543098cba3
chore(ci): Update copyright years in .resinci.json
Change-Type: patch
2018-03-30 00:12:59 +02:00
Jonas Hermsmeier
8bb20de912
Merge pull request #2161 from resin-io/local-test-blobs
test(image-stream): Use local dir instead of tmpdir
2018-03-30 00:02:52 +02:00
Jonas Hermsmeier
7f118c9841
Merge pull request #2162 from resin-io/refactor-spectron-tests
test(spectron): Refactor tests, dereference app after use
2018-03-30 00:02:18 +02:00
Jonas Hermsmeier
73155cca66
Merge pull request #2159 from resin-io/hide-size-multiple-devices
fix(GUI): hide the size label given multiple devices
2018-03-29 22:55:03 +02:00
Jonas Hermsmeier
267ccf6f97
Merge pull request #2160 from resin-io/wrap-button-sizes-cleanly
fix(GUI): line wrap selector size subtitles wholly
2018-03-29 22:53:55 +02:00
Jonas Hermsmeier
1f8e09868d
upgrade(package): Bump spectron 3.7.2 -> 3.7.3
Change-Type: patch
2018-03-29 19:46:38 +02:00
Jonas Hermsmeier
c9a2a47ee1
test(spectron): Refactor tests, dereference app after use
Change-Type: patch
2018-03-29 19:45:54 +02:00
Jonas Hermsmeier
58f7811c7d
Merge pull request #2148 from resin-io/webpack-progress
chore(webpack): Enable realtime progress display
2018-03-29 19:28:11 +02:00
Jonas Hermsmeier
a32ecb032e
Merge pull request #2158 from resin-io/utils-middle-ellipses
refactor: inline middle-ellipsis package as util
2018-03-29 18:32:27 +02:00
Jonas Hermsmeier
bc2ad581ba
test(image-stream): Use local dir instead of tmpdir
This changes the image-stream tests to use a local directory,
instead of the OS's tmpdir to avoid issues with sandboxing on Concourse CI.

Change-Type: patch
2018-03-29 17:22:52 +02:00
Benedict Aas
3498d59258 fix(GUI): line wrap selector size subtitles wholly
We line wrap the main-page image and drive size labels as a whole
instead of partially, if the drive or image title is long enough for a
line wrap.

Change-Type: patch
Changelog-Entry: Line wrap selector size subtitles wholly
2018-03-29 15:45:38 +01:00
Benedict Aas
f8accd62ed fix(GUI): hide the size label given multiple devices
We hide the size label when there are multiple selected devices, as this
doesn't make sense because you could only logically show the sum size,
which isn't very helpful on its own.

Change-Type: patch
Changelog-Entry: Hide the size label given multiple devices.
2018-03-29 15:36:18 +01:00
Jonas Hermsmeier
25b10490a1
chore(webpack): Enable realtime progress display
This enables realtime progress display for webpack, which can be
governed by setting WEBPACK_PROGRESS to various values.
See https://github.com/dominique-mueller/simple-progress-webpack-plugin

Change-Type: patch
2018-03-29 16:35:00 +02:00
Jonas Hermsmeier
800f0f45e5
Merge pull request #2155 from resin-io/dont-lint-frontend-files-cli
chore: don't lint frontend files (ie HTML) on the Node CLI pipeline
2018-03-29 16:34:25 +02:00
Benedict Aas
57c4a285d8 refactor: inline middle-ellipsis package as util
We remove our dependency on the `middle-ellipses` package and include
and expose the function in `lib/shared/utils`, alongside the regular
Angular filter it exposes. This allows use of the middle ellipsis
method in React.

Change-Type: patch
Changelog-Entry: Inline middle-ellipsis package as util.
2018-03-29 15:25:55 +01:00
Jonas Hermsmeier
1104987b9b
Merge pull request #2157 from resin-io/replace-require-deps-check
chore(package): Replace custom missing require check
2018-03-29 16:08:48 +02:00
Jonas Hermsmeier
3dd646485f
chore(package): Replace custom missing require check
This replaces the custom bash script with rules from the eslint-node plugin
to check for `require()`d modules that don't exist.
This will also check requires of local modules, and installed packages,
yielding a more thorough check.

Change-Type: patch
2018-03-28 18:49:32 +02:00
Juan Cruz Viotti
13eb1718aa
chore: don't lint frontend files (ie HTML) on the Node CLI pipeline
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-03-27 17:16:58 -04:00
Jonas Hermsmeier
e41d4dad3c
Merge pull request #2152 from resin-io/fix-concourse-symlinks
fix(webpack): Use fixed enhanced-resolve
2018-03-27 20:21:02 +02:00
Juan Cruz Viotti
9c1e32d4ba
fix(webpack): Use fixed enhanced-resolve
This diverts to using a custom webpack branch to resolve
cyclic symlink issues with `enhanced-resolve` on Concourse.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Change-Type: patch
2018-03-27 20:20:10 +02:00
Jonas Hermsmeier
ce71b81dbe
Merge pull request #2140 from resin-io/fix-usbboot-appimages
fix: use correct usbbot blob path in appimages
2018-03-27 19:48:36 +02:00
Jonas Hermsmeier
62cc2201b0
Merge pull request #2154 from resin-io/disable-builder-rebuild
fix(windows): Disable rebuilding bindings in electron-builder
2018-03-27 19:46:38 +02:00
Jonas Hermsmeier
831c9aee2a
fix(windows): Disable rebuilding bindings in electron-builder
We disable `npm rebuild` and `node-gyp rebuild` being run through
`electron-builder`, as we already rebuild native bindings against
the respective CPU arch through `make electron-develop`, and
electron-builder doesn't appear to respect package's install / rebuild scripts.

Change-Type: patch
2018-03-27 19:27:25 +02:00
Benedict Aas
cd697d7205 fix: use correct usbbot blob path in appimages
We use the `app.asar` relative path to read the usbboot blob files
instead of relative to the normal project root.

Change-Type: patch
Changelog-Entry: Use correct usbboot blob path in AppImages.
2018-03-26 18:18:05 +01:00
Jonas Hermsmeier
4be22e9ece
Merge pull request #2134 from resin-io/support-forums
docs: point users to forums instead of Gitter
2018-03-26 15:26:42 +02:00
Jonas Hermsmeier
482ea6d8f9
Merge pull request #2135 from resin-io/fix-status-dots-position
fix(GUI): fix status dots to their position
2018-03-26 14:28:56 +02:00
Jonas Hermsmeier
bcf0d80c47
doc(PUBLISHING): Remove link to Gitter channel
Change-Type: patch
2018-03-26 14:13:24 +02:00
Jonas Hermsmeier
9bb292f38e
doc(cli): Replace Gitter with forums link in CLI help
Change-Type: patch
2018-03-26 14:11:33 +02:00
Jonas Hermsmeier
1d89cf2b75
chore(ci): Remove Gitter.im webhooks from CI services
This removes notification webhook configurations from
our CI services, in anticipation of shutdown of the Gitter channel.

Change-Type: patch
2018-03-26 14:10:04 +02:00
Jonas Hermsmeier
8afc872252
doc(README): Replace Gitter badge with Discourse
This replaces the Gitter.im badge with a Discourse badge pointing
to the Etcher topics in the Resin.io Forums.

Change-Type: patch
2018-03-26 14:08:06 +02:00
Jonas Hermsmeier
559036518c
Merge pull request #2121 from resin-io/update-winusb-driver
upgrade(package): Update winusb-driver-generator to v1.1.7
2018-03-26 13:52:57 +02:00
Jonas Hermsmeier
b0562f79d2
Merge pull request #2137 from resin-io/update-drivelist
upgrade(package): Bump drivelist 6.0.4 -> 6.1.3
2018-03-26 13:50:02 +02:00
Jonas Hermsmeier
f57df3f2c1
upgrade(package): Bump drivelist 6.0.4 -> 6.1.3
Change-Type: patch
2018-03-23 22:28:46 +01:00
Jonas Hermsmeier
0da123265c
upgrade(package): Update winusb-driver-generator to v1.1.7
Change-Type: patch
2018-03-23 21:58:44 +01:00
Benedict Aas
cf340f48c3 fix(GUI): fix status dots to their position
We ensure the status dots don't move about and stick to their position
by using absolute positioning relative to its parent element.

Change-Type: patch
Changelog-Entry: Fix status dots to their position.
2018-03-23 17:33:32 +00:00
Juan Cruz Viotti
f0e0eaace4
docs: point users to forums instead of Gitter
We plan to shut down Gitter soon.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-03-23 12:40:54 -04:00
Benedict Aas
4140d49db3
refactor: multi-writes preparatory changes (#2124)
We add some preparatory changes including new utility functions, as well
as changes throughout the codebase that reflect the change from single
drives to a list of drives, given multi-writes is coming.

Change-Type: patch
Changelog-Entry: Various preparatory changes to account for
multi-writes.
2018-03-23 14:36:39 +00:00
Jonas Hermsmeier
8bd9ff58c4
Merge pull request #2131 from resin-io/fix-device-pass
fix(gui): Fix devices passed to writer
2018-03-22 18:12:53 +01:00
Jonas Hermsmeier
fecccb0b28
fix(gui): Fix devices passed to writer
Change-Type: patch
2018-03-22 16:52:01 +01:00
Jonas Hermsmeier
43d79ebd05
Merge pull request #2084 from resin-io/sdk-multiwrite
feat(writer): Impl multi-writes in writer modules
2018-03-22 00:12:02 +01:00
Jonas Hermsmeier
ad7c8760eb
Merge pull request #1807 from resin-io/patch-1136
feat(gui): Display image size when drive too small

Close #1136
Close #2004
2018-03-21 23:37:22 +01:00
Jonas Hermsmeier
22f6cc1c6f
Merge pull request #2118 from resin-io/fix-linux-usbboot
fix(scanner): Enable usbboot on Linux if run as root
2018-03-21 22:56:15 +01:00
Jonas Hermsmeier
98dcb13201
Merge pull request #2112 from resin-io/store-fix-autoselect-stale
fix: stop autoselecting empty value in store
2018-03-21 22:52:20 +01:00
Jonas Hermsmeier
497e8b5f28
Merge pull request #2095 from resin-io/update-packaging-deps
upgrade(package): Update release packaging deps
2018-03-21 22:39:01 +01:00
Jonas Hermsmeier
4108979b65
feat(gui): Display image size when drive too small
This adds a display of the determined image size to the
drive label when the drive has been determined to be too small.

Change-Type: patch
Changelog-Entry: Display image size for comparison if drive is too small
2018-03-21 20:35:47 +01:00
Jonas Hermsmeier
e01aec7b52
Merge pull request #2100 from resin-io/disable-timer-throttle
fix(gui): Disable throttling timers when in background
2018-03-21 20:34:31 +01:00
Jonas Hermsmeier
c5b311359a
Merge pull request #2111 from resin-io/store-efficient-plainify
minifix: remove stale json object plainifying in store
2018-03-21 20:32:45 +01:00
Jonas Hermsmeier
624b95921a
Merge pull request #2123 from lurch/etcher-2120
chore: Allow namespaced requires to be sanity-checked
2018-03-21 20:27:26 +01:00
Jonas Hermsmeier
69c35f7f79
fix(drive-scanner): Warn on usbboot load error on Linux
Change-Type: patch
2018-03-21 20:21:24 +01:00
Jonas Hermsmeier
3424b996c8
fix(writer): Fix state verification count
Change-Type: patch
2018-03-21 19:52:37 +01:00
Jonas Hermsmeier
ef634227aa
feat(cli): Display number of active cards
Change-Type: patch
2018-03-21 18:42:34 +01:00
Jonas Hermsmeier
c724e4cb20
feat(writer): Impl multi-writes in writer modules
Implement writing to multiple destinations simultaneously

Change-Type: minor
Changelog-Entry: Implement writing to multiple destinations simultaneously
2018-03-20 22:21:01 +01:00
Jonas Hermsmeier
936142cf7e
fix(gui): Fix usbboot blob dir path
Change-Type: patch
2018-03-15 16:42:34 +01:00
Jonas Hermsmeier
2aa37571f0
fix(gui): Fix usbboot drive icon path
Change-Type: patch
2018-03-15 16:41:38 +01:00
Jonas Hermsmeier
9b42960b2f
fix(scanner): Enable usbboot on Linux if run as root
This re-enables the usbboot scanner dynamically if Etcher
is run as root on Linux.

Change-Type: patch
2018-03-15 14:45:04 +01:00
Andrew Scheller
6647167d02 chore: Allow namespaced requires to be sanity-checked
Fixes #2120

Change-type: patch
2018-03-15 01:41:34 +00:00
Benedict Aas
835f2cf769
feat(GUI): add colorised multi-writes progress status dots (#2115)
We add colorised progress status dots with quantities of `flashing`,
`validating`, `succeeded`, and `failed` devices.

Change-Type: patch
Changelog-Entry: Add colorised multi-writes progress status dots.
2018-03-14 17:05:01 +00:00
Benedict Aas
3fe5d7711f
minifix: use svg contents list in main template (#2113)
We use a list instead of element with `svg-icon` in `main.tpl.html`, as
required by the `svg-icon` component and will return an error
otherwise.

Fixes: https://github.com/resin-io/etcher/issues/2078
Change-Type: patch
Changelog-Entry: Use SVG contents list in main template.
2018-03-14 17:03:31 +00:00
Benedict Aas
faf9b113a9
feat(CSS): use roboto font instead of helvetica (#2114)
We replace Helvetica with Roboto as the main font.

Change-Type: patch
Changelog-Entry: Replace Helvetica as the main font with Roboto.
2018-03-12 16:38:01 +00:00
Jonas Hermsmeier
f72cc6bbbc
Merge pull request #2108 from resin-io/switch-chksm-algo
fix(perf): Remove support for CRC32 checksumming

Close #643
2018-03-09 15:11:32 +01:00
Benedict Aas
69e85a7ac6 fix: stop autoselecting empty value in store
We fix store autoselection, which selects an empty value when one
drive is selected and then ejected, leaving one drive that is
supposed to be autoselectable. Now it instead properly autoselects the
last drive.

Change-Type: patch
Changelog-Entry: Stop store autoselection from selecting empty values on
drive ejection.
2018-03-09 13:52:38 +00:00
Benedict Aas
82b65399af minifix: remove stale json object plainifying in store
Change-Type: patch
Changelog-Entry: Remove stale JSON object plainifying in store
2018-03-09 13:20:38 +00:00
Benedict Aas
a83e397643
refactor: move memoize function to shared utils (#2090)
We move the memoize function to `lib/shared/utils.js` and expose it to
modules across the project.

Change-Type: patch
Changelog-Entry: Move memoize function to shared utils.
2018-03-09 12:12:34 +00:00
Jonas Hermsmeier
f02c090b8d
fix(package): Fix extraneous dependencies 2018-03-08 22:53:22 +01:00
Jonas Hermsmeier
49dd6553fb
chore(package): Remove crc32-stream dependency 2018-03-08 22:14:03 +01:00
Jonas Hermsmeier
d116cd7e90
upgrade(package): Update asar 0.10.0 -> 0.14.2
Change-Type: patch
2018-03-08 22:00:31 +01:00
Jonas Hermsmeier
ed18842281
upgrade(package): Update bindings 1.2.1 -> 1.3.0
Change-Type: patch
2018-03-08 21:58:51 +01:00
Jonas Hermsmeier
4a3bd5fe7a
upgrade(package): Update nan 2.3.5 -> 2.9.2
Change-Type: patch
2018-03-08 21:58:51 +01:00
Jonas Hermsmeier
8a70cb59d1
upgrade(package): Update pkg 4.1.1 -> 4.3.0
Change-Type: patch
2018-03-08 21:58:51 +01:00
Jonas Hermsmeier
35772b0370
fix(perf): Remove support for CRC32 checksumming
As crc32-stream was identified as a massive performance bottleneck,
we remove it, and default to Node's crypto API with md5 instead.

Change-Type: minor
2018-03-08 20:33:00 +01:00
Jonas Hermsmeier
68b33fcfb9
Merge pull request #2096 from resin-io/update-test-deps
upgrade(package): Update test related dependencies
2018-03-08 17:21:52 +01:00
Jonas Hermsmeier
0b306219c1
Revert "upgrade(package): versionist 2.8.1 -> 2.13.0"
This reverts commit 2604da104d08671742bd4a8b62e07dab1cfb4702.
2018-03-05 22:15:14 +01:00
Jonas Hermsmeier
bdd05a3f71
upgrade(package): Update electron-mocha 6.0.0 -> 6.0.1
See https://github.com/jprichardson/electron-mocha/issues/123

Change-Type: patch
2018-03-05 16:38:53 +01:00
Jonas Hermsmeier
c11205f3cd
fix(shrinkwrap): Fix resolved URL of git repo
Change-Type: patch
2018-03-05 16:38:53 +01:00
Jonas Hermsmeier
11a0aa322f
test(available-drives): Fix set expected set property
Change-Type: patch
2018-03-05 16:38:53 +01:00
Jonas Hermsmeier
a12bb4ee7c
upgrade(package): mochainon 1.0.0 -> 2.0.0
Change-Type: patch
2018-03-05 16:38:52 +01:00
Jonas Hermsmeier
1cc5422557
upgrade(package): eslint-plugin-import 2.8.0 -> 2.9.0
Change-Type: patch
2018-03-05 16:38:52 +01:00
Jonas Hermsmeier
55ed4dbc51
upgrade(package): eslint-plugin-jsdoc 3.3.1 -> 3.5.0
Change-Type: patch
2018-03-05 16:38:52 +01:00
Jonas Hermsmeier
201b8dccaa
upgrade(package): eslint-plugin-node 6.0.0 -> 6.0.1
Change-Type: patch
2018-03-05 16:38:52 +01:00
Jonas Hermsmeier
544cd96e3d
upgrade(package): html-angular-validate 0.1.9 -> 0.2.3
Change-Type: patch
2018-03-05 16:38:52 +01:00
Jonas Hermsmeier
2604da104d
upgrade(package): versionist 2.8.1 -> 2.13.0
Change-Type: patch
2018-03-05 16:38:51 +01:00
Jonas Hermsmeier
a392d3b1b4
upgrade(package): sass-lint 1.10.2 -> 1.12.1
Change-Type: patch
2018-03-05 16:38:51 +01:00
Jonas Hermsmeier
b7ef95f68c
upgrade(package): nock 9.0.9 -> 9.2.3
Change-Type: patch
2018-03-05 16:38:51 +01:00
Jonas Hermsmeier
d12166a872
upgrade(package): mocha 3.2.0 -> 5.0.1
Change-Type: patch
2018-03-05 16:38:51 +01:00
Jonas Hermsmeier
74d9fcdbbc
upgrade(package): electron-mocha 5.0.0 -> 6.0.0
Change-Type: patch
2018-03-05 16:38:51 +01:00
Jonas Hermsmeier
3e9536cef8
Merge pull request #2099 from resin-io/update-cli-visuals
upgrade(package): Update resin-cli-visuals to 1.4.1
2018-03-05 05:52:30 -08:00
Jonas Hermsmeier
95c2c25f1b
Merge pull request #2098 from resin-io/update-contributing
doc(CONTRIBUTING): Add webpack step to instructions

Close #2079
2018-03-02 05:10:46 -08:00
Jonas Hermsmeier
81932e5d9f
Merge pull request #2097 from resin-io/fix-error-image-writer
fix(image-writer): Fix missing error argv
2018-03-02 05:09:52 -08:00
Jonas Hermsmeier
d91d957777
fix(gui): Disable throttling timers when in background
This disables Electron throttling timers when not in the foreground.

Change-Type: patch
2018-03-01 20:04:34 +01:00
Jonas Hermsmeier
804ac8b4dc
upgrade(package): Update resin-cli-visuals to 1.4.1
This updates `resin-cli-visuals` in order to fix drive selection in
the CLI, which was caused by incompatibility of two different `drivelist` versions

Change-Type: patch
2018-03-01 19:12:29 +01:00
Jonas Hermsmeier
bde1e32e29
doc(CONTRIBUTING): Add webpack step to instructions
Change-Type: patch
2018-03-01 18:50:45 +01:00
Jonas Hermsmeier
cb25db2556
fix(image-writer): Fix missing error argv
This fixes a missing error argument being passed in .emit()

Change-Type: patch
2018-03-01 18:12:38 +01:00
Jonas Hermsmeier
1536e62734
Merge pull request #2093 from resin-io/fix-about-copyright
chore(package): Update copyright years
2018-02-28 11:32:00 -08:00
Jonas Hermsmeier
401c2c7cc1
chore(package): Update copyright years
Change-Type: patch
2018-02-28 18:18:35 +01:00
Jonas Hermsmeier
d0faf9bc2f
Merge pull request #2091 from resin-io/webpack-json
fix(webpack): Fix not resolving .json
2018-02-27 13:19:59 -08:00
Jonas Hermsmeier
81b5016168
fix(webpack): Fix not resolving .json
Change-Type: patch
2018-02-27 18:26:05 +01:00
Andrew Scheller
dcbe41bc40
fix(scripts): Add missing types to architecture-convert.sh usage (#2089)
Change-type: patch
2018-02-26 18:37:54 +00:00
Benedict Aas
4e112dc98c
minifix: add missing parameter to verifyNoNilFields example (#2081)
We add the missing `name` parameter to the `verifyNoNilFields` JSDoc
example.

Change-Type: patch
Changelog-Entry: Add missing name param to verifyNoNilFields JSDoc example.
2018-02-26 11:34:46 +00:00
Jonas Hermsmeier
d233558b44
Merge pull request #2080 from resin-io/sdk-write-prepare
feat(sdk): Move CLI writer logic into SDK writer
2018-02-23 10:26:36 -08:00
Benedict Aas
207c2ef5b6
feat: add drive multi-selection in store (#1736)
We lay the foundation for multi-selecting drives by implementing it into
the `store` and relevant modules interacting with the `store`.

Change-Type: patch
Changelog-Entry: Add drive multi-selection to the store.
2018-02-23 17:45:49 +00:00
Jonas Hermsmeier
d9ccc43d15
feat(sdk): Move CLI writer logic into SDK writer
This moves the preparation logic from the CLI into the SDK
in preparation for further SDK rearchitecturing, and to allow
standalone usage of SDK.

Change-Type: minor
Changelog-Entry: Move CLI write preparation logic into SDK
2018-02-23 16:06:07 +01:00
Andrew Scheller
ee93013220
chore: fixup 'distclean' rule to also delete generated directory (#2077)
Change-type: patch
2018-02-23 12:43:13 +00:00
Juan Cruz Viotti
677fc5aa68
chore: only publish production packages to Bintray (#2076)
The devel channels will be completely deprecated. The deb/rpm snapshot
builds will still be accessible through GitHub Releases as part of Resin
CI builds.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-23 11:47:11 +00:00
Juan Cruz Viotti
8a86d0e655
chore: add "make webpack" as a Concourse build step (#2070)
We also have to add the generated directory to the final package.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-21 19:06:35 +00:00
Jonas Hermsmeier
27c4c0c749 fix(package): Add fsevents to platform specific deps (#2065)
This adds `fsevents` to the platform specific dependencies,
in order to avoid shrinkwrap disagreements between platforms.

Change-Type: patch
2018-02-21 17:45:47 +00:00
Benedict Aas
2c0cdcf947
refactor(GUI): remove selection-state clear options to simplify (#2043)
We refactor and simplify the selection-state `.clear()` by removing the
options argument.

Change-Type: patch
Changelog-Entry: Remove `selectionState.clear()` options argument to
simplify.
2018-02-21 15:56:42 +00:00
Benedict Aas
a56755e2c6
feat(GUI): add spacing to drive-selector labels (#2059)
We add a right margin to the drive-selector labels so they look nicer
when there are multiple.

Change-Type: patch
Changelog-Entry: Add spacing to the drive-selector warning/error labels.
2018-02-20 21:07:13 +00:00
Benedict Aas
765de94ca3
refactor: consolidate store-state nil-checking (#2062)
We make the nil-checking of store state fields generic through a
`verifyNoNilFields` function that throws an error if any fields are
nil.

Change-Type: patch
Changelog-Entry: Consolidate store state nil-checking with helper
function.
2018-02-20 13:13:29 +00:00
Benedict Aas
f060dc896f
feat: resolve jsx files (#2063)
We resolve `.jsx` files such that they get handled by babel and bundled
with webpack.

Change-Type: patch
Changelog-Entry: Resolve JSX files
2018-02-20 13:03:47 +00:00
Jonas Hermsmeier
1dcbcef705
Merge pull request #2054 from resin-io/fix-debug-namespaces
fix(lib): Fix debug namespaces
2018-02-20 04:37:37 -08:00
Jonas Hermsmeier
5be64e124b
Merge pull request #2023 from resin-io/drive-clean
feat(lib): Use win-drive-clean instead of diskpart
2018-02-20 03:40:10 -08:00
Jonas Hermsmeier
f70df03b1a
Merge pull request #2056 from resin-io/fix-debug-enable
fix(app): Fix enabling debug output
2018-02-20 03:35:08 -08:00
Benedict Aas
8b577ca12f
feat(GUI): separate svg path and content attributes (#1677)
We separate the SVG component path and content into attributes
`paths` and `contents` which take lists of strings that are
tried until one succeeds. `contents` takes precedence over `paths`,
i.e. it is tried first.

Change-Type: patch
Changelog-Entry: Separate SVG component's path and content attributes.
2018-02-20 09:51:13 +00:00
Benedict Aas
91719435d9
feat(GUI): warn the user on large drive selection (#2045)
We warn the user when they select a large drive to confirm they want to
flash in case the device is important.

Fixes: https://github.com/resin-io/etcher/issues/1916
Change-Type: patch
Changelog-Entry: Warn the user on selection of large drives.
2018-02-19 19:12:48 +00:00
Benedict Aas
b1b82301d9
fix(GUI): make all class label text bold (#2060)
We make all tags with `.label` have bold text and remove the need for
`<b>` tags.

Change-Type: patch
Changelog-Entry: Make all `.label` tags' text bold and remove need for `<b>` tags.
2018-02-19 18:38:03 +00:00
Benedict Aas
fdf15f53d7
feat(GUI): warning makes drive-selector button orange (#2044)
We make the drive-selector button orange when there is a warning attached
to the image-drive pair.

Change-Type: patch
Changelog-Entry: Make the drive-selector button orange on warnings.
2018-02-19 11:27:30 +00:00
Jonas Hermsmeier
4802854cff
Merge pull request #2055 from resin-io/remove-direct-io
fix(cli): Remove O_DIRECT & O_EXCL
2018-02-16 10:53:28 -08:00
Jonas Hermsmeier
b0538099cf
fix(lib): Fix debug namespaces
This fixes some debug namespaces not being prefixed with `etcher:`
and their respective subsystems.

Change-Type: patch
2018-02-16 19:01:26 +01:00
Jonas Hermsmeier
1fa9d7d7d7
Merge pull request #2052 from resin-io/sdk-refactor
feat(sdk): Consolidate low-level components into SDK
2018-02-16 09:59:32 -08:00
Jonas Hermsmeier
2b66762dec
fix(app): Fix enabling debug output
This fixes enabling debug output via the DEBUG env var

Change-Type: patch
2018-02-16 18:21:17 +01:00
Jonas Hermsmeier
7063f254c6
fix(cli): Remove O_DIRECT & O_EXCL
This removes O_DIRECT and O_EXCL flags from the writer,
as O_DIRECT can lead to EINVAL under quite a few circumstances,
and O_EXCL has proven to be useless.

Change-Type: patch
2018-02-16 18:00:10 +01:00
Jonas Hermsmeier
7c9f15d8a9
feat(sdk): Consolidate low-level components into SDK
Changes:

- Split out scanner into own file
- Move `lib/shared/sdk` -> `lib/sdk`
- Move `lib/image-stream` -> `lib/sdk/image-stream`
- Move `lib/writer` -> `lib/sdk/writer`
- Rename `sdk/standard` -> `sdk/blockdevice`
- Move adapters into `sdk/adapters` subdirectory

Change-Type: minor
Changelog-Entry: Consolidate low-level components into Etcher SDK
2018-02-16 17:15:28 +01:00
Jonas Hermsmeier
2982dc478c
Merge pull request #2042 from resin-io/fix-arm-build
fix(Makefile): Support arm64 / armv8 / aarch64
2018-02-16 08:10:37 -08:00
Jonas Hermsmeier
47fc1b7357
feat(lib): Use win-drive-clean instead of diskpart
This replaces shelling out to `diskpart` on Windows to clear
the partition table with `win-drive-clean`, which does so via DeviceIoControl.

Change-Type: minor
Changelog-Entry: Use native code to clean drives on Windows
2018-02-16 15:57:34 +01:00
Jonas Hermsmeier
6990d7632a
fix(Makefile): Support arm64 / armv8 / aarch64
This adds support for 64bit arm cpu architectures.

Change-Type: patch
Changelog-Entry: Support building Etcher on armv8
2018-02-16 15:29:47 +01:00
Juan Cruz Viotti
4fa0f990e5
feat(GUI): bundle the GUI code with Webpack (#1943)
This commit introduces a Webpack configuration file that bundles the GUI
code along with its dependencies (except the Etcher SDK and its own
dependencies), and uses Babel to add support for JSX (required by the
Rendition library).

The GUI code that goes into the bundle was moved to `lib/gui/app` so we
can easily ignore the whole subdirectory when creating production
distributable packages.

We now have a new make target called `webpack` that can be used to
create the GUI bundle. Such target will be called everytime a package is
generated.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-02-15 17:39:15 +00:00
Benedict Aas
e0f789bc14
refactor: remove stale invalid key check in store (#2050)
We remove a piece of code checking whether `_.keys` returns any non-string
values in its array, but per the Lodash documentation `_.keys` always returns an
array of strings.

Change-Type: patch
Changelog-Entry: Remove stale `invalidKey` check in store.
2018-02-15 17:23:11 +00:00
Jonas Hermsmeier
b93dabd670
Merge pull request #2047 from resin-io/update-sass
upgrade(package): Update node-sass 4.5.3 -> 4.7.2
2018-02-15 03:55:36 -08:00
Jonas Hermsmeier
83528df18b
upgrade(package): Update node-sass 4.5.3 -> 4.7.2
Change-Type: patch
2018-02-14 20:38:00 +01:00
Jonas Hermsmeier
1e65a09e8e
Merge pull request #2012 from resin-io/use-template-contents
feat: replace template paths with contents
2018-02-14 06:54:54 -08:00
Benedict Aas
34b4f65c20
feat: log the event status of the banner (#2013)
We add log the banner HTTP load event object to the analytics.

Change-Type: patch
Changelog-Entry: Log the banner load event to analytics.
2018-02-14 12:03:40 +00:00
Jonas Hermsmeier
de4f9e4257
Merge pull request #2039 from resin-io/uv-threadpool-size
feat(writer): Increase UV_THREADPOOL_SIZE
2018-02-13 10:55:07 -08:00
Jonas Hermsmeier
dc2c16d6b5
Merge pull request #2031 from resin-io/remove-unnecessary-deps
chore(package): Remove unnecessary deps
2018-02-13 10:54:44 -08:00
Jonas Hermsmeier
fbb175608d
feat(writer): Increase UV_THREADPOOL_SIZE
This increases the UV_THREADPOOL_SIZE to CPUs * 4 to
facilitate full write speeds when writing to multiple destinations,
in preparation for integrating multi-writes.

Change-Type: patch
Changelog-Entry: Increase UV_THREADPOOL_SIZE to allocate 4 threads per CPU
2018-02-13 17:31:59 +01:00
Jonas Hermsmeier
ab026b1635
test(image-stream): Fix lint error in tester 2018-02-13 17:15:39 +01:00
Jonas Hermsmeier
0bc09defa7
chore(package): Remove unused dependency trackjs 2018-02-13 16:13:49 +01:00
Jonas Hermsmeier
04352494a0
test: Remove unnecessary file-exists dependency
Change-Type: patch
2018-02-13 16:13:49 +01:00
Benedict Aas
96c76177af fix sanity-checks 2018-02-13 11:19:59 +00:00
Benedict Aas
d5a14031c6 pass linter 2018-02-13 11:19:59 +00:00
Benedict Aas
ad0b5e7583 test modal 2018-02-13 11:19:59 +00:00
Benedict Aas
f2424095e0 test other pages 2018-02-13 11:19:59 +00:00
Benedict Aas
db2bed896a feat: replace template paths with contents
We replace the `templateUrl` fields with `template` fields and thus
switch from template paths to template contents in preparation for the
Webpack PR.

Changelog-Entry: Replace template paths with template contents.
Change-Type: patch
2018-02-13 11:19:59 +00:00
Benedict Aas
c3600ee8fc
refactor: rename selection state and store functions (#2037)
We rename functions in `selection-state` and the `store`.

Change-Type: patch
Changelog-Entry: Rename selection-state and store functions.
2018-02-13 11:15:22 +00:00
Benedict Aas
bb5efb3450
feat(GUI): add descriptive name to modals (#2036)
We add a descriptive name to modals for analytics and debugging.

Change-Type: patch
Changelog-Entry: Add descriptive name to modals for analytics and
debugging.
2018-02-13 11:13:48 +00:00
Jonas Hermsmeier
2e1764af82
Merge pull request #2029 from resin-io/remove-unused-robot
refactor(lib): Remove unused robot protocol
2018-02-12 04:58:52 -08:00
Jonas Hermsmeier
a0c704cd94
Merge pull request #2030 from resin-io/update-eslint-plugins
upgrade(package): Update eslint plugins
2018-02-09 12:28:42 -08:00
Jonas Hermsmeier
76f537a636
upgrade(package): Update eslint plugins
This updates outdated eslint plugins:

- eslint-plugin-import 2.7.0 -> 2.8.0
- eslint-plugin-jsdoc 3.1.1 -> 3.3.1
- eslint-plugin-lodash 2.3.6 -> 2.6.1
- eslint-plugin-node 5.1.1 -> 6.0.0
- eslint-plugin-promise 3.5.0 -> 3.6.0

Change-Type: patch
2018-02-09 19:34:53 +01:00
Jonas Hermsmeier
fdd0d781ca
refactor(lib): Remove unused robot protocol
This removes the remnants of the unused "robot protocol",
which was previously used by the CLI, but has been superseded by IPC.

Change-Type: minor
Changelog-Entry: Remove unused robot protocol
2018-02-09 19:25:36 +01:00
Benedict Aas
47338cf07b
upgrade(package): Update eslint 3.19.0 -> 4.17.0 (#2026)
We upgrade eslint for better support of the object-curly-newline
options, and change the quantity of elements required before the linter
enforces newlines on objects, in addition we apply `consistent` to avoid
errors when there are newlines in objects with less than 2 elements.

```
const { field } = object

const {
  field
} = object

const {
  field1,
  field2
} = object
````

Change-Type: patch
Changelog-Entry: Upgrade eslint to use object-curly-newline options.
2018-02-09 15:30:43 +00:00
Jonas Hermsmeier
4c1884fc95
Merge pull request #1998 from resin-io/update-udif
upgrade(package): Update udif 0.10 -> 0.13
2018-02-09 07:10:18 -08:00
Jonas Hermsmeier
c2ba053737
Merge pull request #2021 from resin-io/use-ng-if
feat(GUI): replace ng-show and ng-hide with ng-if
2018-02-09 03:41:53 -08:00
Jonas Hermsmeier
4cd16a40d0
Merge pull request #1743 from Lin-Buo-Ren/patch-1
docs: Add WoeUSB as an alternative tool to burn Windows USB images
2018-02-09 03:40:10 -08:00
Jonas Hermsmeier
0038c6c65a
Merge pull request #2010 from resin-io/menu-link-ref
feat(gui): Add ref params to homepage links in menu
2018-02-09 03:39:22 -08:00
Jonas Hermsmeier
56b0f13525
Merge pull request #2027 from resin-io/remove-tmp
refactor(test): Remove dependency on `tmp`
2018-02-08 10:33:06 -08:00
Jonas Hermsmeier
974315868d
Merge branch 'master' into patch-1 2018-02-08 09:52:12 -08:00
Jonas Hermsmeier
5634954b7e
refactor(test): Remove dependency on tmp
This removes the dependence on `tmp`, as this module has been known
to cause problems, while also being unnecessary for what it's being used for.

Change-Type: minor
2018-02-08 18:43:48 +01:00
Benedict Aas
dab1eece4c
feat: add icon next to drive on warnings (#2014)
We add an icon next to the drive size that is displayed when there is a
drive-image compatibility status message available. We display the first
one in the list and importance is then enforced by the order they are
added to the list in `drive-constraints`.

Change-Type: patch
Changelog-Entry: Add icon next to drive size when compatibility warnings exist.
2018-02-08 16:43:34 +00:00
Jonas Hermsmeier
d01b73a661
upgrade(package): Update udif 0.10 -> 0.13
This updates `udif` to 0.13.0:

**v0.13.0:**

- fix(readstream): Use strict mode for compat with Node 4
- refactor(lib): Improve & fix zerofill streaming
- test: Add passthrough to check for read/push after EOD
- test: Add compression method tests
- feat(udif): Add LZFSE compression type constant
- fix(readstream): Fix passing on readable stream options

**v0.12.0:**

- feat(image): Support use of custom `fs` instances
- feat(readstream): Stream ZEROFILL & FREE blocks

Fixes a buffer allocation failure on large zerofill ranges.

Change-Type: patch
Changelog-Entry: Fix "Array buffer allocation failed" when flashing some .dmg images
2018-02-08 16:11:56 +01:00
Jonas Hermsmeier
5754b4c6af
feat(gui): Add ref params to homepage links in menu
This adds a `ref` param to the URLs in the menu,
in order to see where page views are coming from.

Change-Type: patch
2018-02-08 13:42:53 +01:00
Benedict Aas
e769ef7d0b feat(GUI): replace ng-show and ng-hide with ng-if
We replace `ng-show/hide` with `ng-if` on the main page in order to
remove unnecessary calls and become more efficient.

Changelog-Entry: Replace ng-show/hide with ng-if on main page.
Change-Type: patch
2018-02-07 17:53:17 +00:00
Jonas Hermsmeier
41a694e4a4
Merge pull request #2022 from resin-io/fix-linter-tabindex-button
fix: move tabindex attrs to button from within
2018-02-07 09:24:13 -08:00
Benedict Aas
76a05d2dc9 fix: move tabindex attrs to button from within
We move the `tabindex` attributes to the button element directly from
elements contained within the button element – this is to satisfy the
HTML linter.

Changelog-Entry: Move tabindex attributes to button elements from
contained elements.
Change-Type: patch
2018-02-07 16:06:07 +00:00
Jonas Hermsmeier
1895601198
Merge pull request #2008 from resin-io/update-issue-template
doc(github): Update instructions in ISSUE_TEMPLATE
2018-01-31 07:58:28 -08:00
Jonas Hermsmeier
f6bfdb2ced
doc(github): Update instructions in ISSUE_TEMPLATE
This updates the instructions to open the Developer Tools in the issue template,
as the keyboard shortcuts have changed to their defaults on Linux & Windows
from [Ctrl]+[Alt]+[I] to [Ctrl]+[Shift]+[I].

Further, the editor config is updated to allow trailing spaces in Markdown
files to add trailing spaces to the list items in the issue template, in
order to avoid people not putting whitespace in between, causing the formatting
to not be parsed properly.

Change-Type: patch
2018-01-30 22:30:01 +01:00
Jonas Hermsmeier
1eb7ce8741
Merge pull request #1997 from resin-io/fix-devtools-detach
fix(gui): Fix DevTools opening in docked mode
2018-01-30 08:37:01 -08:00
Jonas Hermsmeier
a5aaf760d0
fix(gui): Fix DevTools opening in docked mode
This fixes the Developer Tools opening in docked mode by default.

Change-Type: patch
2018-01-29 21:59:46 +01:00
Benedict Aas
df2ebf93b6 refactor: replace lodash templates #1810 (#2006)
We replace the lodash templates with arrow-functions and change the
single-argument object into multiple arguments.

Fixes #1810 
Closes #2006 

Change-Type: patch
Changelog-Entry: Replace Lodash templates with arrow-functions.
2018-01-29 12:46:13 -08:00
Benedict Aas
4dc64ee15b
feat(GUI): add app to gui folder structure (#2002)
* feat(GUI): add app to gui folder structure

We add a `lib/gui/app/` folder to help transition to Webpack usage.

Change-Type: patch
Changelog-Entry: Add `lib/gui/app` folder to ease into Webpack usage.
2018-01-29 18:34:21 +00:00
Jonas Hermsmeier
a83ae05316
upgrade(package): Update yargs 4.7.1 -> 11.0.0 (#1995)
This updates `yargs` to 11.0.0

Change-Type: patch
2018-01-29 06:25:50 -08:00
Benedict Aas
b0e6170d93 fix: specify utf-8 encoding with meta tag (#2003)
We specify the encoding to be UTF-8 with a meta tag such that Electron
won't get confused and try any other encodings.

Change-Type: patch
Changelog-Entry: Specify UTF-8 encoding with meta tag.
2018-01-26 10:45:49 -08:00
Jonas Hermsmeier
890122894f
fix(gui): Fix menu's application name (#1996)
This replaces use of `electron.app.getName()` with the package.json's `.displayName`
property to ensure the correct application name is displayed when packaged.

Change-Type: patch
2018-01-26 07:04:54 -08:00
Jonas Hermsmeier
9c019cafd5
upgrade(package): Bump debug 2.6.8 -> 3.1.0 (#1994)
This updates `debug` to 3.1.0 due to a RegExp DOS vulnerability.

Change-Type: patch
2018-01-24 14:48:34 -08:00
Juan Cruz Viotti
b357047e3a
chore: encode complete paths to patched file in patches/ (#1987)
So that the build system doesn't need to know in advance at which
directory the paths needs to be applied.

This will make it easier to add patches support to the Concourse
pipelines.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-23 18:48:35 -04:00
Juan Cruz Viotti
f932e947e0
chore: declare Concourse node-cli pipeline's entrypoint (#1988)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-23 17:56:57 -04:00
Jonas Hermsmeier
c21baeda7a
v1.3.1 2018-01-23 11:39:33 -08:00
Juan Cruz Viotti
4d5c372832
chore: revise Concourse CI related npm scripts (#1977)
- The `concourse-dependencies` and `concourse-build-installers` scripts
are not necessary anymore, given that the Electron pipeline already
knows how to perform these tasks

- The `concourse-test` script will be renamed to
`concourse-test-electron` to include the pipeline name (electron), so a
single project can be served by more than one pipeline. I'll keep the
old `concourse-test` for a bit for backwards compatibility until all
Etcher PRs are rebased

- There is a new `concourse-test-node-cli` script that will be used by
the Node.js CLI pipeline

- There is a new `test-cli` target that is supposed to host CLI tests.
For now, it just runs the SDK tests in a Node.js environment (instead of
in Electron)

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-23 14:43:41 -04:00
Jonas Hermsmeier
9b46587b73
upgrade(package): Update electron 1.7.10 -> 1.7.11 (#1985)
This updates Electron to v1.7.11, mitigating CVE-2018-1000006.

See: https://electronjs.org/blog/protocol-handler-fix
Change-Type: patch
Changelog-Entry: Update Electron to v1.7.11
2018-01-23 06:31:19 -08:00
Jonas Hermsmeier
38ff0e39d6
fix(lib): Fix readonly property typo (#1986)
This fixes the camelcasing of the `.isReadOnly` property
of detected storage devices.

Change-Type: patch
2018-01-23 06:30:06 -08:00
Jonas Hermsmeier
1f838b4b25
upgrade(package): Bump mountutils 1.3.8 -> 1.3.10 (#1983)
This updates `mountutils` from 1.3.8 -> 1.3.10;

- fix(linux): Fix partial unmounts on Linux
- fix(windows): Link to appropriate libraries

Change-Type: patch
Changelog-Entry: Fix incomplete unmounts after flashing on Linux
Fixes #1911
2018-01-23 03:30:12 -08:00
Juan Cruz Viotti
ffbb62a280 chore: add node-cli.node Resin CI option (#1978)
This represents the Node.js version that will be used to compile the
Etcher CLI.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-22 08:18:06 -08:00
Juan Cruz Viotti
b0831f0b9d chore: stop testing macOS on Travis CI (#1979)
We will rely on our Concourse instance for that.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-22 07:37:24 -08:00
Jonas Hermsmeier
e1ddbd300d
fix(gui): Allow selection of images in folders with extension (#1976)
This fixes selection of images contained in directories with a file extension
(i.e. "openSUSE-Leap-42.3-DVD-x86_64.iso") in the open file dialog.

Change-Type: patch
Changelog-Entry: Fix selection of images in folders with file extension on Mac OS
2018-01-19 06:27:07 -08:00
Jonas Hermsmeier
fa4d6e9ef4
upgrade(package): Bump drivelist 6.0.0 -> 6.0.4 (#1975)
This updates `drivelist` to v6.0.4, fixing a crash on Windows 7,
among other things:

- Fix(windows): Impl IsSystemDevice()
- Fix crash on Windows 7
- Fix(darwin): Use proper flag to enable extended regexes in `sed`
- Fix(darwin): Allow mountpoints containing space characters

Change-Type: patch
Changelog-Entry: Fix Etcher not working / crashing on older Windows systems
2018-01-19 06:26:28 -08:00
Jonas Hermsmeier
61a6f9d556
doc(MAINTAINERS): Elaborate on the process of releasing (#1876)
This updates the maintainers' doc with a little more detail
regarding the release process, to avoid it staying tribal knowledge.

Change-Type: patch
2018-01-18 09:29:37 -08:00
Benedict Aas
1ae40c7b15 feat: test that ipc verbosity is off (#1963)
feat: test that ipc verbosity is off

We test that `ipc.config.silent` is set to `true` so that it doesn't
spam `stdout` for users.

Changelog-Entry: Test that IPC verbosity is off
Change-Type: patch
2018-01-18 09:14:09 -08:00
Jonas Hermsmeier
45c72f0c28
fix(usb): Ignore errors if winusb doesn't load (#1970)
Due to some Windows systems missing certain C runtime libraries
(Visual C/C++ 2012 / 2015 Redistributables), we ignore errors when loading
this module until we can ensure distribution of those along with it.

Change-Type: patch
Changelog-Entry: Fix "The specified module could not be found" on Windows
Fixes #1956
2018-01-18 09:11:46 -08:00
Juan Cruz Viotti
8d863638cc upgrade: electron-mocha to v5.0.0 (#1973)
Looks like this will fix an issue where the `electron-mocha` main
process fails with an EPERM error on Windows, which we've been
experiencing on our Concourse setup.

See: https://github.com/jprichardson/electron-mocha/issues/119
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-16 15:34:22 +01:00
Juan Cruz Viotti
759004e2b2
chore: add .resinci.json builder configuration object (#1965)
This object will eventually replace the `electron-builder.yml` file
that's currently present in the root of the project.

For now, it contains the `electron-builder` options that are project
specific (all the generic bits live in the Electron Concourse pipeline),
but in the future we might want to decouple how users configure packages
from the `electron-builder` project, instead making the user provide
Resin Concourse specific options that are then translated to
`electron-builder` (or any other packaging technology we might decide to
use) under the hood.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

Trigger Concourse CI

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-12 13:25:24 -04:00
Jonas Hermsmeier
36d163e464
fix(shrinkwrap): Update unbzip2-stream branch commit (#1968)
The shrinkwrap still contained the commit hash of a commit
previous to an npm install bugfix

Change-Type: patch
2018-01-11 19:34:49 +01:00
Jonas Hermsmeier
96dddecd4d
fix(writer): Silence IPC output on stdout (#1961)
This was causing the stdout maxBuffer size to be exceeded
when flashing larger images (or having flashes that took a while).

Fixes #1955 

Change-Type: patch
Changlog Entry: Fix "stdout maxBuffer exceeded" error on Linux
2018-01-08 23:09:55 +01:00
Jonas Hermsmeier
ece9a5666e
v1.3.0
Features:

- Display connected Compute Modules even if Windows doesn't have the necessary drivers to act on them
- Add read/write retry delays with backoff to ...
- Add native application menu (which fixes OS native window management shortcuts not working)

Fixes:

- Fix "Couldn't scan drives" error
- Ensure the writer process dies when the GUI application is killed
- Run elevated writing process asynchronously on Windows
- Fix trailing space in environment variables during Windows elevation
- Don't send analytics events when attempting to toggle a disabled drive
- Fix handling of transient write errors on Linux (EBUSY)
- Fix runaway perl process in drivelist on Mac OS

Misc:

- Update Electron from v1.7.9 to v1.7.10
- Remove Angular dependency from image-writer

Change-Type: minor
2018-01-05 18:59:33 +01:00
Jonas Hermsmeier
9b721d83dc
upgrade(package): Update drivelist 5.2.12 -> 6.0.0 (#1953)
* upgrade(package): Update drivelist 5.2.12 -> 6.0.0

This updates `drivelist` to incorporate the new native
bindings rewrite on Windows, fixing scanning errors.

Change-Type: patch
Changelog Entry: Fix "Couldn't scan drives" error

* test(drive-selection): Adjust to breaking drivelist changes

* fix(drivelist): Correct conditions in standard adapter

* refactor(usbboot): Adjust readonly & system flags

* doc(drive-constraints): protected -> isReadonly
2018-01-05 17:22:00 +01:00
Juan Cruz Viotti
9c624e8e52
chore: move updates disabling logic out of the Makefile (#1939)
The Makefile current has logic to disable updates when building deb or
rpm packages. To make the Concourse pipeline transition easier, the
logic that disables updates on deb and rpm has been moved to the main
application code.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:51:33 -04:00
Juan Cruz Viotti
a7ff5c4583
chore: re-organize files inside assets/ (second try) (#1952)
Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1941
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:45:07 -04:00
Juan Cruz Viotti
2291321b46 refactor(GUI): remove the intermediate child writer proxy process (#1910)
Etcher currently elevates a child writer proxy that itself spawns the
Etcher CLI in robot mode, parses the output, and proxies those messages
to the GUI application over IPC.

After these set of changes, Etcher elevates a single child writer
process that directly communicates back with the GUI using IPC. The main
purpose behind these changes is to simplify the overall architecture and
fix various issues caused by the current complex child process tree.

Here's a summary of the changes:

- Stop wrapping the Etcher CLI to perform writing
- Remove the robot option from the Etcher CLI (along with related
  documentation)
- Elevate a new `child-write.js` standalone executable
- Move the relevant bits of `lib/child-writer` to the `image-writer` GUI
  module
- Remove the `lib/child-writer` directory
- Add a new "Child died unexpectedly" Mixpanel event
- Floor state percentage in the flash state model

The above changes made is possible to tackle all the remaining issues
where the writer process would remain alive even if the parent died.

Change-Type: patch
Changelog-Entry: Ensure the writer process dies when the GUI application is killed.
See: https://github.com/resin-io/etcher/pull/1873
See: https://github.com/resin-io/etcher/pull/1843
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 20:46:09 +01:00
Juan Cruz Viotti
0ce2fca40a
minifix(GUI): run elevated process asynchronously on Windows (#1950)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 14:17:38 -04:00
Jonas Hermsmeier
4a6955c173
fix(gui): Re-enable application menu (#1888)
* fix(gui): Re-enable application menu

This re-enables the application menu to allow for OS native shortcuts
to work again (i.e. hide/minimize window), which also allows us to
get rid of the global-shortcuts hack to prevent window reloads.

Change-Type: patch
Changelog-Entry: Fix disabled native OS window shortcuts

* refactor(gui): Update kbd shortcut comment to be less specific
2018-01-04 18:07:10 +01:00
Jonas Hermsmeier
fdfdcf915c
upgrade(package): Bump mountutils 1.2.2 -> 1.3.8 (#1946)
Change-Type: patch
2018-01-04 15:47:25 +01:00
Jonas Hermsmeier
222fd9de62
upgrade(package): Bump electron 1.7.9 -> 1.7.10 (#1947)
Electron changelog:

- Fixed crash in custom protocols
- Fixed webrtc crash
- Linux: Fixed subpixel font rendering with freetype
- Mac OS: Fixed rendering issues with Nvidia GPU on High Sierra
- Mac OS: Fixed incorrectly cropped TouchBar items

Change-Type: patch
2018-01-04 13:09:46 +01:00
Jonas Hermsmeier
1093881149
upgrade(package): Bump drivelist 5.2.4 -> 5.2.12 (#1945)
Change-Type: patch
2018-01-04 13:08:55 +01:00
Juan Cruz Viotti
cb876436d4 fix(shared): trailing space in Windows elevation env vars (#1949)
This is a strange one. On Windows, putting a space before the
double-ampersand command concatenator makes the environment variable
value contain a trailing space. So for something like `set foo=bar &&
...` the variable `foo` will be `'bar '` instead of `'bar'`.

Change-Type: patch
Changelog-Entry: Fix trailing space in environment variables during Windows elevation.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 12:47:10 +01:00
Benedict Aas
13758c9568
feat(GUI): remove angular from image-writer (#1680)
* feat(GUI): remove angular from image-writer

We remove Angular from the `image-writer` module by using Redux store
updates, subscribing to them while flashing.

Changelog-Entry: Remove Angular dependency from image-writer.
Change-Type: minor
2018-01-04 11:12:08 +00:00
Juan Cruz Viotti
52af3e8aa8
chore: re-organize files inside assets/ (#1941)
This is the file convention that Resin Concourse will use. I flattened
the directory for simplicity.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-02 08:11:43 -04:00
Juan Cruz Viotti
aeb850f4fb
chore: declare Concourse dependencies in package.json (#1938)
Resin Concourse will make sure to provide these during build time.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-29 09:51:38 -04:00
林博仁(Buo-Ren Lin)
3249af4eaa docs: Add WoeUSB as an alternative tool to burn Windows USB images(2)
Performing requested change, this commit is supposed to be squashed with the previous one.

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2017-12-28 20:25:16 +08:00
林博仁
737b3be5be docs: Add WoeUSB as an alternative tool to burn Windows USB images
By far WoeUSB is one of the few applications that support Windows image
and runs on GNU/Linux so I assume it is worth to mention it.  Additional
line wrapping is made to comply to the code conventions.

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2017-12-28 05:26:50 +08:00
Juan Cruz Viotti
3537848d3d
chore: make test npm script run everything we run on the CI services (#1937)
The idea is that the `test` command will replace the recently introduced
`concourse-test` script.

`concourse-test` will become simply a call to `test` for now to ensure
backwards compatibility while we update Resin Concourse.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-27 13:29:55 -04:00
Jonas Hermsmeier
5387bf19d9
fix(writer): Add EBUSY to transient errors on Linux (#1918)
Change-Type: patch
2017-12-21 18:06:25 +01:00
Juan Cruz Viotti
357f2183b5
chore: add Concourse related NPM scripts (#1933)
Our Electron Concourse pipeline is completely independent from the
application its testing (ie we can apply it to any other Electron app we
build with ease).

In order to keep such genericity, the application under test should
provide certain npm scripts that tell Concourse how to do specific tasks
on the repo, like install dependencies, in a build-system independent
fashion.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-20 16:06:09 -04:00
Juan Cruz Viotti
c586d9f54c
chore: get rid of npx (#1929)
We can live without it with a simple `PATH` trick at the top of the
Makefile (thanks @lurch!).

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-19 16:08:37 -04:00
Jonas Hermsmeier
abfa44a088 upgrade(package): Bump electron-builder 19.9.1 -> 19.40.0 (#1905)
Change-Type: patch
Connects To: #1914
2017-12-19 13:53:26 -04:00
Jonas Hermsmeier
5517beff80
fix(package): Fix noodled merge of shrinkwrap file (#1924)
Out of order squash merging resulted in some from-lines
not being removed in the npm-shrinkwrap.

Change-Type: patch
2017-12-15 22:32:36 +01:00
Jonas Hermsmeier
74c0c13fbd
feat(writer): Add read/write retry delays (#1919)
Change-Type: minor
2017-12-15 16:09:11 +01:00
Jonas Hermsmeier
b086e4c2a1
refactor(scripts): Update clean-shrinkwrap script (#1816)
* refactor(scripts): Update clean-shrinkwrap script

This updates the `postshrinkwrap` script to traverse the dependency tree
and remove all `from` fields to avoid inconsistent diffs across platforms,
environments and installs when shrinkwrapping anew.

* chore(shrinkwrap): Update npm-shrinkwrap.json

* fix(scripts): Ensure `resolved` field in shrinkwrap is HTTPS

* fix(scripts): Only strip "from" of registry packages

* fix(clean-shrinkwrap): Fix linter errors

* chore(shrinkwrap): Update npm-shrinkwrap.json

* fix(scripts): fix spelling typo

Change-Type: patch
2017-12-15 16:08:33 +01:00
Andrew Scheller
b45306487b
Fix small docs typo 2017-12-15 12:01:17 +00:00
Juan Cruz Viotti
f2c9404fc4
chore: setup a Spectron integration test suite (#1884)
- Add a `make test-spectron` target

- Install `spectron` and `mocha` (since we don't need to run the tests
  inside an Electron instance like in the case of `electron-mocha`)

- Add some example tests

Fixes: https://github.com/resin-io/etcher/issues/1870
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-13 13:51:16 -04:00
Juan Cruz Viotti
b703a6f5fb
feat(SDK): display Compute Modules even if host OS has no drivers (#1892)
This is the first step towards full usbboot Windows support. The driver
selector dialog will now display disabled devices to represent Compute
Modules even when Windows drivers are not installed to act on them.
These drives will state "Missing drivers."

Change-Type: minor
Changelog-Entry: Display connected Compute Modules even if Windows doesn't have the necessary drivers to act on them.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-13 13:37:34 -04:00
Juan Cruz Viotti
f8c3faec79
fix(GUI): only emit toggle drive event if drive is selectable (#1913)
Right now we emit "Toggle drive" analytics events even when clicking on
disable/unselectable drives.

The fix is to move the `analytics.logEvent` inside the code path that
applies if a drive selection is considered valid.

Change-Type: patch
Changelog-Entry: Don't send analytics events when attempting to toggle a disabled drive.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-09 16:57:12 -04:00
Juan Cruz Viotti
5432363aa1
chore(appveyor): build x86 on real x86 machines (#1912)
We do this by using Appveyor's `platform` configuration variable instead
of always running on x64 and cross-compiling to x86.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-08 09:57:16 -04:00
Juan Cruz Viotti
85c8cd6340 docs: add high level manual testing script (#1874)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-08 13:55:17 +01:00
Jonas Hermsmeier
4c00a25968
v1.2.1 (#1906) 2017-12-07 16:43:58 +01:00
Juan Cruz Viotti
b74347d21f chore: pass a dictionary to codespell.py (#1717)
The `-` option loads the default dictionary.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-06 12:58:30 +00:00
Jonas Hermsmeier
657142716c
fix(writer): Add missing read/write-retry handling (#1885)
This adds read- & write-retry handling of potentially temporary errors,
as well as errors due to device disconnection.

Change-Type: patch
Changelog-Entry: Fix handling of temporary read/write errors
2017-12-06 13:58:03 +01:00
Juan Cruz Viotti
618440e38f
fix(GUI): ensure settings are loaded before bootstrapping application (#1879)
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-05 11:04:52 -04:00
Juan Cruz Viotti
19b7ce0668
upgrade: resin-corvus to v1.0.0-beta.31 (#1902)
This version contains a couple of patches to ensure that the Mixpanel
library doesn't send any HTTP request to api.mixpanel.com unless the
user enabled analytics.

- https://github.com/resin-io-modules/resin-corvus/pull/35
- https://github.com/resin-io-modules/resin-corvus/pull/36

See: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-05 11:04:23 -04:00
Jonas Hermsmeier
39401b3bfa fix(versionist): Ignore case of Change-Type value (#1847)
There's a commit that slipped in (sorry) with a capitalised
Change-Type value of "Patch". This avoids versionist erroring,
by always lowercasing that value.

Change-Type: PATCH
2017-12-05 09:40:32 -04:00
Benedict Aas
f22938030d minifix: hide drive selector hyphen when no size info (#1900)
We hide the separator hyphen between the name and size when there is no
size information available, in the drive selector modal.

Change-Type: patch
Changelog-Entry: Hide the drive-selector separator hyphen when no drive
size is available.
2017-12-04 19:11:07 -04:00
Andrew Scheller
a70935586b
chore(ci): Attempt to fix TravisCI OSX builds (#1897)
The `pip` command is now `pip2`

Change-Type: patch
2017-12-04 14:37:27 +00:00
Jonas Hermsmeier
b1abc79942
v1.2.0 (#1846) 2017-11-27 15:37:48 +01:00
Jonas Hermsmeier
69c3d61c28
fix(writer): Set flags manually to avoid verifying cache (#1875)
We change from using `rs+` to a composition of read/write,
exlusive, sync & direct i/o flags, in order to avoid reading
stale data from the cache during verification.

Change-Type: patch
Changelog-Entry: Fix verification step reading from the cache
2017-11-23 14:42:11 +01:00
Jonas Hermsmeier
4e891151f4
feat(writer): Display actual write speed (#1863)
As we've actually been displaying the read-speed in various
forms during the flashing process, this is a venture into
displaying the actual write-speed from the end of the pipeline.

Change-Type: minor
Changelog-Entry: Display actual write speed
2017-11-22 21:12:38 +01:00
Jonas Hermsmeier
8e79e9e459
upgrade(package): Bump sudo-prompt 6.1.0 -> 8.0.0 (#1861)
This updates `sudo-prompt` from v6.1.0 to v8.0.0

Changes:

- v8.0.0:
  - Breaking: Windows: Set code page of command batch script to UTF-8
- v7.1.1:
  - readme: explicitly mention that no child process is returned
- v7.1.0:
  - Detect when PowerShell fails to launch command
  - Escape ampersand and other characters special to PowerShell
- v7.0.0:
  - Add status code to error on Windows and macOS
- v6.2.0:
  - Rename OS X to macOS

Change-Type: patch
2017-11-22 21:12:04 +01:00
Jonas Hermsmeier
f9085667d1
fix(child-writer): Reduce env vars passed during elevation (#1872)
As we're not escaping env vars properly in `permissions.getEnvironmentCommandPrefix()`,
passing the entire environment along can cause another instance of the "stuck at starting"
problem, thus we limit the vars explicitly passed along again, keeping PATH and DEBUG.

Change-Type: patch
2017-11-22 17:56:10 +01:00
Jonas Hermsmeier
a35ac7613e
fix(writer): Use a core streams variant of unbzip2-stream (#1862)
This fixes pipage blowing up on unbzip2-stream because it's
based on through streams (which don't implement `.unpipe()`),
by utilizing a custom version based on core streams.

Change-Type: patch
Changelog-Entry: Fix bzip2 streaming with the new pipelines
2017-11-20 22:32:34 +01:00
Jonas Hermsmeier
ecedff2cdf
fix(writer): Fix verify size for unaligned images (#1868)
Change-Type: patch
2017-11-20 19:28:20 +01:00
Andrew Scheller
500af07689
chore: add some more typos to the dictionary (#1864)
As spotted in #1858 and #1717

Change-type: patch
2017-11-18 16:09:32 +00:00
Jonas Hermsmeier
6779e15872
fix(writer): Emit checksum event when verifying bmaps (#1859)
Due to the Blockmap.FilterStream not emitting a "checksum"
event (as it individually verifies specified ranges), the
flashing process would get stuck on finish.

This emits a "checksum" event on "finish" when blockmapping,
averting this issue.

Change-Type: patch
2017-11-17 22:56:25 +01:00
Jonas Hermsmeier
b3b52fce62
fix(writer): Don't calculate checksum before block-stream (#1858)
The checksum-stream being situated in front of the block-stream, which
ensures block size alignment to multiples of 512, and pads the last block,
caused the checksum to be incorrectly calculated for images where the last
block needed to be padded.

Change-Type: patch
2017-11-17 21:37:49 +01:00
Jonas Hermsmeier
0e02998faf
fix(gui): Re-enable printing progress in console (#1853)
Change-Type: patch
2017-11-17 14:36:21 +01:00
Jonas Hermsmeier
19275a5ba4
fix(gui): Disable outlines (#1854)
For the time being, the focus outlines are removed, until
we can improve the UX on this.

Change-Type: patch
2017-11-17 13:33:19 +01:00
Andrew Scheller
701893b472
fix(s3): Fix EAI_AGAIN error at startup with no internet connection (#1855)
Change-type: patch
2017-11-17 11:22:22 +00:00
Jonas Hermsmeier
66cb7293e7
fix(drive-scanner): Dynamically get unsafe mode setting (#1852)
Due to the SDK keeping it's options once initialized,
the unsafe mode setting change was not reflected on subsequent scans.

Change-Type: patch
2017-11-17 03:28:32 +01:00
Jonas Hermsmeier
773ddb6e9e
fix(child-writer): Pass parent env during elevation (#1851)
Change-Type: patch
2017-11-17 02:56:42 +01:00
Jonas Hermsmeier
7ebff68506 fix(store): Fix "Missing state eta" error on Infinity/NaN (#1850)
If the speed is zero, the eta becomes Infinity, which isn't transmitted
properly over IPC for at this time unknown reasons.
To prevent the "Missing state eta" error from popping up when the speed is
zero, we set the eta to zero as well in those cases.

Change-Type: Patch
2017-11-16 17:58:58 -04:00
Jonas Hermsmeier
9e75547166
upgrade(ipc): Update node-ipc 8.9.2 -> 9.1.1 (#1836)
Change-Type: patch
2017-11-16 21:12:36 +01:00
Jonas Hermsmeier
bb4e6c74e0 fix(child-writer): Ensure tmpdir path has trailing slash (#1849)
There's a bug in node-ipc which doesn't allow it to handle
tmpdirs without trailing slashes; this works around this bug.

Change-Type: patch
2017-11-16 15:04:50 -04:00
Jonas Hermsmeier
55d043a626
doc(MAINTAINERS): Fix changelog make target, reword screenshot (#1848)
Change-Type: none
2017-11-16 16:18:13 +01:00
Jonas Hermsmeier
5046af5313
fix(child-writer): Handle exits due to a signal (#1843)
This adds handling for cases where the writer child process
exits due to reception of a signal, while also adjusting some peripherals,
like the IPC socket directory and inherited process environment.

Another addition is that the child process is explicitly killed
should an error arise on the IPC.

Change-Type: patch
2017-11-15 15:52:57 +01:00
Jonas Hermsmeier
5e77958106
feat(writer): Implement streaming pipelines (#1671)
This implements a new way of image write streaming under use of pipage and blockmap, which paves the way for a few things like using network locations as sources, and imaging of storage devices (aka backups). As it allows for mutation of the streaming pipeline while it's writing, it also facilitates the development of dynamic block-mapping.

Change-Type: minor
2017-11-14 19:54:10 +01:00
Juan Cruz Viotti
63528ce8f3 fix(SDK): disable usbboot adapter on GNU/Linux (#1841)
Various GNU/Linux distributions require root access to be able to open
USB devices. This means that Etcher would need to be ran as root, which
is now not possible on Wayland based systems.

We declare usbboot as unsupported on GNU/Linux from the time being, but
we are currently working on a solution.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-11-14 18:00:01 +01:00
Juan Cruz Viotti
856f53067b chore: revert "chore: don't zip AppImages" (#1842)
For usability purposes. We get a high volume of support requests from
GNU/Linux newbies that get deeply confused about setting execution
permissions.

This reverts commit b2d3d0ecb8eadd14593c3b7587775d1ac4b5475e.
2017-11-14 13:51:01 +01:00
Sven Dowideit
58a89ad182 docs: etcher-image-stream was moved to the main etcher repo (#1830)
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-11-14 13:49:13 +01:00
Josh Leeb-du Toit
e815d97265 fix(CLI): add check for drive flag with yes flag (#1753)
Add an options check for the `drive` flag to appear with the `yes` flag.
If the `yes` flag appears without the `drive` flag then a user error
will be thrown.

Change-Type: patch
Link: https://github.com/resin-io/etcher/pull/1753
Fixes: https://github.com/resin-io/etcher/issues/1454
2017-11-14 11:02:43 +00:00
Benedict Aas
33db722f68 docs: add python version to contributing (#1838)
Change-Type: patch
Changelog-Entry: Add the Python version (2.7) to the CONTRIBUTING doc.
2017-11-14 10:58:16 +00:00
Benedict Aas
0058919a8e
feat(GUI): add progress and status to window title (#1438)
* feat(GUI): add progress and status to window title

We add the progress percentage to the window alongside the status
(validating, flashing).

Closes: https://github.com/resin-io/etcher/issues/1427
Fixes: https://github.com/resin-io/etcher/issues/1439
Changelog-Entry: Add the progress and status to the window title.
2017-11-14 09:23:41 +00:00
Benedict Aas
5771c0f56e fix: rid linux startup elevation (#1831)
We remove the Linux elevation meant for usbboot device access.

Reverts: https://github.com/resin-io/etcher/pull/1708
See: https://github.com/resin-io/etcher/issues/1819
Change-Type: minor
Changelog-Entry: Remove Linux elevation meant for usbboot.
2017-11-13 15:34:20 -04:00
Jonas Hermsmeier
8b13a23117
fix(sdk): Remove event listeners on unsubscribe (#1834)
Change-Type: patch
2017-11-09 14:44:42 +01:00
Benedict Aas
08b6397a9a minifix: remove duplicate debug enable in usbboot (#1835)
Changelog-Entry: Remove duplicate debug enabling in usbboot module.
Change-Type: patch
2017-11-09 12:05:55 +00:00
Jonas Hermsmeier
66441e28cb fix(sdk): Correct "subscribe" typos (#1832)
* fix(sdk): Correct "subscribe" typos
* test(dictionary): Add subsribe -> subscribe

Change-Type: Patch
2017-11-08 18:06:00 +00:00
Andrew Scheller
26b521411f
fix: Correct image.size usage in tests and code-comments (#1833)
image.size is always an object, never a plain number

Change-type: patch
2017-11-08 16:53:57 +00:00
Jonas Hermsmeier
03b252024e
fix(gui): Don't check elevation on start on Windows (#1822)
This fixes Electron startup on Windows

Change-Type: patch
2017-10-31 20:20:27 +01:00
Jonas Hermsmeier
68f3f695cd
feat(sdk): Implement continuous scanning (#1814)
This implements an SDK.Scanner which handles any given
adapters and manages the scans. This change enables continuous
scanning without the need to `.scan()` scheduling in other places.

Change-Type: minor
2017-10-31 18:05:32 +01:00
Jonas Hermsmeier
c0d25786ef
fix(scripts): Fix pip install in docker (#1818)
This works around the "Cannot fetch index base URL http://pypi.python.org/simple/"
error by installing pip==9.0.1 directly from the pypi.python.org/packages/

Change-Type: patch
2017-10-31 14:04:00 +01:00
Juan Cruz Viotti
8caf03327c
fix(usbboot): increase device reboot delay a little bit (#1815)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-27 16:32:20 -04:00
Benedict Aas
9815f9a5a1 fix: set debug env variable on remote electron process (#1789)
We fix the DEBUG environment variable by setting it on the `electron.remote`
instead, and we also move the code to `lib/gui/app.js` and away from
`lib/gui/index.html`.

Changelog-Entry: Set the DEBUG environment variable on the remote
electron process.
Change-Type: patch

* use debug.enabled, fix drivelist env setting
* fix: set debug env variable on remote electron process
2017-10-27 20:42:57 +02:00
Benedict Aas
f2f5955264 feat(GUI): use tabindex and focus to navigate (#1745)
* feat(GUI): use tabindex and focus to navigate

We make navigating with the tab key easier by highlighting focused
elements more visibly, adding `tabindex` attributes to elements, and
making `open-external` links respond to keyboard events.

Change-Type: minor
Changelog-Entry: Improve tab-key navigation through tabindex and visual improvements.
Connects-To: https://github.com/resin-io/etcher/issues/1734

* outline with 10s timeout

* use orange "warning colour" as outline

* smaller outline on settings buttons, fix order on settings page

* allow selection in drive-selector

* fix typo, better tabindexes
2017-10-27 20:41:47 +02:00
Jonas Hermsmeier
e5d69465ab test(Makefile): Update codespell excludes (#1811)
This adds excludes for .dtb, .dtbo, .dat, .elf, .bin, .foo, and xz-without-extension
to reduce unnecessary warning output in `make lint`.

```
WARNING: Binary file: lib/blobs/usbboot/bcm2709-rpi-2-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2710-rpi-cm3.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-cm.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2710-rpi-3-b.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-0-w.dtb
WARNING: Binary file: lib/blobs/usbboot/bcm2708-rpi-b-plus.dtb
WARNING: Binary file: lib/blobs/usbboot/overlays/dwc2.dtbo
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/fixup_cd.dat
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/start_cd.elf
WARNING: Binary file: lib/blobs/usbboot/raspberrypi/bootcode.bin
WARNING: Binary file: tests/image-stream/data/unrecognized/xz-without-extension
WARNING: Binary file: tests/image-stream/data/unrecognized/xz-with-invalid-extension.foo
```

Change-Type: patch
2017-10-26 19:21:56 +02:00
Juan Cruz Viotti
eba06a2139 style(usbboot): wait before scanning drives after the file server phase (#1799)
This is a workaround to prevent the USB device from disappearing after
the file server phase, until the resulting block device comes up.

By adding a delay after the file server phase, we prevent the USB
scanner from getting triggered again, therefore keeping the current USB
device visible in the drive selector modal.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-26 12:05:59 -04:00
Juan Cruz Viotti
daa847d29b feat(usbboot): add progress property to usbboot scanned drives (#1803)
This commit re-architects the usbboot adapter to prepare the drives in
the background, while emitting scan results every 2s, where each drive
has a `progress` percentage property.

Change-Type: minor
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-25 14:03:30 -04:00
Benedict Aas
433b2734bb feat: add sudo-prompt to start on linux (#1708)
We prompt the user with a sudo-prompt upon launch on Linux-based systems
to ensure the program has enough permissions for features needed
throughout the program's runtime.

Changelog-Entry: Add a sudo-prompt upon launch on Linux-based systems.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-25 11:27:40 -04:00
Juan Cruz Viotti
02f7a5f55b refactor(SDK): make adapter scan functions event based (#1781)
* refactor(SDK): make adaptor scan functions event based

This change will allow us to start emitting progress events out of the
adaptors scan functions.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

* refactor(sdk): Make adapters event emitters
2017-10-25 13:26:43 +02:00
Benedict Aas
2556807166 feat(GUI): add optional progress bars to drive-selector drives (#1800)
We show a progress bar for any drive objects with a `progress` field
that isn't falsy, e.g. `undefined` or `0`.

Changelog-Type: minor
Changelog-Entry: Add optional progress bars to drive-selector drives.
2017-10-24 14:43:43 -04:00
Juan Cruz Viotti
5bf6633cbe refactor(sdk): add bus number, device address, and ids in usb devices (#1802)
The combination of bus number and device address is the only way to
uniquely identify a USB device, so we'll use that for the `device` and
`raw` properties.

Also, we store the USB vendor and product IDs as properties of the
drives, since they will be handy when implementing the prepare function.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-24 14:32:33 -04:00
Jonas Hermsmeier
acb4271833 doc(CONTRIBUTING): Add note about msvs_version on Windows (#1794)
This adds a small note about setting the `msvs_version`
in the npm config on Windows.

Change-Type: patch
2017-10-20 22:11:31 +02:00
Jonas Hermsmeier
dd0bb43616 upgrade(package): Bump resin-corvus to beta.30 (#1795)
This updates resin-corvus to v1.0.0-beta.30, fixing an issue
with attempting to use https transport in browserland.

Change-Type: patch
2017-10-20 22:11:13 +02:00
Juan Cruz Viotti
a11a22453a fix(usbboot): handle LIBUSB_ERROR_NO_DEVICE when claiming a USB interface (#1796)
Consider the following scenario:

- Usbboot runs successfully on a device
- Before the block device gets a chance to appear, we run usbboot again

If we're fast enough, usbboot will try to claim the device interface,
but then the drive might not be there anymore, causing a
`LIBUSB_ERROR_NO_DEVICE`.

This commit addresses that scenario, and simply ignores the drive.

Change-Type: patch
Changelog-Entry: Fix `LIBUSB_ERROR_NO_DEVICE` error at the end of usbboot.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-20 11:10:12 -04:00
Juan Cruz Viotti
39e6207183 feat(usbboot): add new files that provide better speed (#1775)
We currently ship with `bootcode.bin` and `start.elf` from the Raspberry
Pi Foundation, which provide a writing speed of about 6 MB/s. This PR
includes new boot files by resin.io that boost the speed to ~20 MB/s.

Change-Type: minor
Changelog-Entry: Increase the flashing speed of usbboot discovered devices.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-20 10:36:35 -04:00
Juan Cruz Viotti
88ef235987 fix(usbboot): handle device disconnections (#1798)
This commit handles errors that can come up when unplugging the drive
halfway through the process. After tons of experimentation, the errors
than seem to occur are:

- `LIBUSB_TRANSFER_CANCELLED`
- `LIBUSB_ERROR_NO_DEVICE`

When these errors happen, we can omit the drive, and also not try to
close it, since given the device is no longer there, the close operation
bails out with a strange error message.

Change-Type: patch
Changelog-Entry: Gracefully handle scenarios where a USB drive is disconnected halfway through the usbboot procedure.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-20 08:50:58 -04:00
Jonas Hermsmeier
32399ba8a1 upgrade(package): Update Electron v1.6.6 -> v1.7.9 (#1784)
This updates Electron from v1.6.6 to v1.7.9

Change-Type: patch
Changelog-Entry: Update Electron to v1.7.9
2017-10-18 21:19:23 +02:00
Jonas Hermsmeier
42052dde9f doc(CONTRIBUTING): Remove refence to "install script" (#1790)
This removes a confusing reference to an "install script"
in the dependency section.

Change-Type: patch
2017-10-18 17:43:07 +02:00
Jonas Hermsmeier
ea686ee8e2 doc(CONTRIBUTING): Add libudev requirement to docs (#1787)
Closes #1771
Change-Type: patch
2017-10-18 14:20:47 +02:00
Juan Cruz Viotti
df05d4cc08 fix(usbboot): opening device debug message prints undefined (#1776)
We have a debug message that prints `device.name`, which is not a valid
property, and therefore the debug logs show `undefined` instead of the
USB id pair.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-17 10:47:34 +01:00
Juan Cruz Viotti
e54a8ae92b fix(GUI): improve usbboot USB device branding (#1780)
- Add a loading SVG icon while usbboot is running
- Make the device description more user friendly

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-17 10:47:14 +01:00
Juan Cruz Viotti
0f8043b35b fix(GUI): don't show the "too small" badge if the size is null (#1779)
Some devices don't have a size, like USB devices in the usbboot adaptor.
The `.isDriveLargeEnough()` correctly returns `false` in this case,
however we don't want to show the `TOO SMALL` badge for aesthetics
purposes.

So if a drive has a size that equals `null`, we don't allow such drive
to be selected, and we don't show a badge for it.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-16 17:51:55 +01:00
Juan Cruz Viotti
ec1f3665eb fix(GUI): don't display hyphen in drive selection entry if no size (#1778)
Some drives, like usbboot USB devices, don't have a size associated with
them, which results in the drive selection widget showing a hyphen with
nothing at the side, which looks a bit weird.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-16 16:07:48 +01:00
Juan Cruz Viotti
444072db13 refactor(GUI): generalize the concept of a "pending" drive (#1777)
This commit introduces a boolean `disabled` property rather than a
`pending` flag. Making this distinction clearer means that we can now
treat pending drives in different ways needed to improve the usbboot
experience.

Also, for usbboot, this commit removes the "pending" badge and uses a
more descriptive drive description instead.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-16 12:09:38 +01:00
Niklas Higi
6acfcfd23c fix(GUI): make sure progress button is always rounded (#1768)
At the moment the progress button which has slightly rounded corners
allows the "__bar" to overflow. This causes the corners to become
angular again which looks weird. I set the button's "overflow" to
"hidden" to fix this issue.

Changelog-Entry: Make sure the progress button is always rounded.
Change-Type: patch
2017-10-14 14:41:00 +02:00
Juan Cruz Viotti
78fdc5b07e feat(GUI): add some branding to usbboot-discovered devices (#1764)
- Add a nice icon in the drive selector dialog when a device has been
  discovered through usbboot

- Change the name of usbboot-initialized devices to "Compute Module"

Change-Type: minor
Changelog-Entry: Add eye candy to usbboot initialized devices.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-11 03:53:34 +01:00
Juan Cruz Viotti
f5fcdf4acb fix(sdk): increase bulk transfer usb timeouts (#1759)
We experienced timeouts when sending big files (ie ~14 MBs). Setting the
timeout to 0 makes the timeout infinite.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-10 23:59:49 +01:00
Juan Cruz Viotti
8aa58a722b fix(sdk): set usbboot control transfer timeout to infinite (#1760)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-10 21:35:59 +01:00
Gergely Imreh
f7b0291bf8 fix(sdk): usbboot command typos (#1758)
Change-type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-10 19:06:00 +01:00
Juan Cruz Viotti
179597b86f upgrade: drivelist to v5.2.4 (#1755)
See: https://github.com/resin-io-modules/drivelist/pull/229
Change-Type: patch
Changelog-Entry: Fix permission denied issues when XDG_RUNTIME_DIR is mounted with the `noexec` option.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-09 10:47:56 +01:00
Juan Cruz Viotti
f6a7b2add6 feat: implement usbboot adapter (#1686)
This commit installs `node-usb` v1.3.0 from GitHub, since that version
was never published to NPM, and is the only one that works with Visual
Studio 2015 (see https://github.com/tessel/node-usb/issues/109).

The usbboot communicates with a Raspberry Pi / Amber through USB and
eventually mounts it as a block device we can write to.

This feature bundles bootcode.bin and start.elf from the original
usbboot implementation.

The flow is the following:

- On each scan, the usbboot scanner will try to get a usbboot compatible
  USB device to the next "phase", until they are all transformed to
  block devices the user can flash to as usual

Change-Type: minor
Changelog-Entry: Integrate Raspberry Pi's usbboot technology.
Fixes: https://github.com/resin-io/etcher/issues/1541
See: https://github.com/raspberrypi/usbboot
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-10-06 14:19:35 +01:00
Jonas Hermsmeier
3147a93ca6 feat(image-stream): Support .bin image extension (#1750)
This adds support for selecting images with a `.bin` file extension.

Change-Type: minor
Closes #1739
2017-10-03 18:13:02 +02:00
Jonas Hermsmeier
cb7117a36b upgrade(node-stream-zip): 1.3.4 -> 1.3.7 (#1730)
This fixes RangeErrors occurring with some zip files.

**Changes:**

- Fixed compatibility with node.js v0.10
- Fix error unpacking archives with a special comment
- Fix descriptive error messages

Change-Type: patch
Changelog-Entry: Fix Etcher being unable to read certain zip files
2017-09-22 20:15:29 +03:00
Jonas Hermsmeier
b5912eb9f6 fix: Support raw images without secondary file extension (#1724)
This allows selection of images without a secondary file extension
(i.e. `example.gz`, compared to `example.img.gz`) by defaulting to `img`
in the image-stream handlers, should no secondary extension be found.

Further this adjusts `.getPenultimateFileExtension()` to return `null`
if the detected penultimate extension is not a known file extension.

Change-Type: patch
2017-09-13 18:34:26 +02:00
Jonas Hermsmeier
a3c54f22c8 refactor(image-stream): Remove Promise props resolve (#1726)
This removes `Bluebird.props()` from the image type handlers,
as it's just a remnant when some properties in the return value
were Promises that needed resolving.

Change-Type: patch
Connects To: #1724
2017-09-13 13:56:51 +02:00
Juan Cruz Viotti
70edfa384b chore: fix CLI packaging snapshot relative directory (#1713)
The current CLI releases are broken. Seems that `pkg` creates the
application snapshot based on the current working directory, so at the
moment, the snapshot gets created based on the root of the project,
rather than based on the dist/Etcher-cli-* directories, causing the
native add-ons to not be resolved correctly.

Fixes: https://github.com/resin-io/etcher/issues/1706
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-09-11 10:45:28 -04:00
Juan Cruz Viotti
077eb5b079 upgrade: mountutils to v1.2.2 (#1712)
See: https://github.com/resin-io-modules/mountutils/pull/45
Change-Type: patch
Changelog-Entry: Retry ejection various times before giving up on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-09-08 15:43:46 +02:00
Jonas Hermsmeier
e654311997 chore(package): Bump resin-corvus to 1.0.0-beta.29 (#1720)
This updates `resin-corvus` to version 1.0.0-beta.29, switching
Mixpanel and Sentry analytics to HTTPS transports.

Changes:

- fix(sentry): Default to HTTPS transport
- fix(mixpanel): Use HTTPS transport
- test: Use standardjs for linting
- doc(README): Add CI & npm badges
- fix(ci): Fix Appveyor Node version matrix
- refactor: Ensure Node 4 compatibility

Change-Type: patch
Connects To: #1718
2017-09-06 11:12:18 +02:00
Juan Cruz Viotti
0d0ddd549b upgrade: drivelist to v5.1.8 (#1714)
Fixes: https://github.com/resin-io/etcher/issues/1699
Change-Type: patch
Changelog-Entry: Try to use `$XDG_RUNTIME_DIR` to extract temporary scripts on GNU/Linux.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-09-04 09:56:41 -04:00
Juan Cruz Viotti
ce466bd6ad docs(README): execution -> executable (#1715)
See: https://github.com/resin-io/etcher/pull/1703
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-09-04 09:56:29 -04:00
Juan Cruz Viotti
f67f25bcdc chore: don't zip AppImages (#1703)
See: https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages#common-mistake
See: https://github.com/resin-io/etcher/pull/772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-28 11:27:01 -04:00
Juan Cruz Viotti
488f281ec7 chore: build armhf on GNU/Linux (#1482)
This commit makes use of the `resin/armv7hf-debian` Docker image to
test and generate armhf builds.

We needed to add a slash before `build` in `.gitignore` given that git
was refusing to include any changes on `scripts/build` otherwise.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-28 11:26:36 -04:00
Juan Cruz Viotti
7b791d622f feat(GUI): support new "pending" drive flag (#1709)
We recently added a "pending" flag to all drives that represents whether
the drive is ready for selection or not. This flag will be used by the
"usbboot" flashing adaptor, which will emit various "pending" USB
devices while it converts them to block devices that can actually be
flashed.

In terms of the GUI, the following visible changes were made:

- Drives with a `pending: true` property will be disabled in the drive
  selector window
- Drives with a `pending: true` property have a "PENDING" red badge

See: https://github.com/resin-io/etcher/pull/1707
See: https://github.com/resin-io/etcher/pull/1686
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 19:56:12 -04:00
Juan Cruz Viotti
f3c8ec496a test(shared): ensure drive objects can contain extra properties (#1705)
The usbboot integration will bring in drive objects that include a lot
more properties than the current drive objects. This commit ensures that
the redux store can handle those extra properties.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 19:27:38 -04:00
Juan Cruz Viotti
9f4712f1f8 refactor: use an SDK orchestrator to implement drive scanning (#1707)
This is a major first step towards adopting an SDK architecture. This
commit creates an SDK adaptor with a `.scan()` function that uses
`drivelist` under the hood. Then, an SDK orchestrator is used to provide
drive scanning capabilities to the GUI.

Here's a list of some particularly interesting changes:

- The drives returned by the SDK adaptor now have a "pending" and an
  "adaptor" property. The "pending" property is a boolean flag that
  determines if the drive is ready to be used (this will come handy for
  usbboot), while the "adaptor" property simply contains the name of the
  adaptor that drive came from

- The GUI drive scanner Rx implementation was replaces with a "promise
  loop." Before, the drive scanning routine would be called every 2
  seconds (without waiting for the previous scan to complete), while
  now, the next scan happens *after* the previous scan completes. For
  this reason, I reduced the drive scanning interval timeout to match
  the timing we had before

Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1686
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-24 17:24:48 -04:00
Juan Cruz Viotti
f9d7dd2977 upgrade: drivelist to v5.1.5 (#1692)
See https://github.com/resin-io-modules/drivelist/pull/206

Change-Type: patch
Changelog-Entry: Fix "Couldn't scan the drives: An unknown error occurred" error when there is a drive locked with BitLocker.
Fixes: https://github.com/resin-io/etcher/issues/1687
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-21 17:59:16 -04:00
Juan Cruz Viotti
63d030d4c9
Revert "chore: cache Travis CI docker builds (#1694)"
This reverts commit 5e13be92f50b6f99d8c74ccc36290ff9cd2369b5.
2017-08-15 17:49:30 -04:00
Juan Cruz Viotti
7b308b0e50 chore: fix build system (#1695)
- Bintray deployments are broken because of some bash nested quoting
  issue
- Travis CI will attempt to cache Docker layers on macOS
- Docker caches from different architectures will override each other

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-15 15:07:15 -04:00
Juan Cruz Viotti
5e13be92f5 chore: cache Travis CI docker builds (#1694)
Let's see if we can reduce the time it gets to build and test Etcher on
GNU/Linux.

See: https://giorgos.sealabs.net/docker-cache-on-travis-and-docker-112.html
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-15 13:58:35 -04:00
Juan Cruz Viotti
325fc22a3b docs: add chocolatey install instructions (#1685)
Fixes: https://github.com/resin-io/etcher/issues/1155
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-10 17:25:07 -07:00
Juan Cruz Viotti
5196ac8d32 refactor: simplify release type handling within the app (#1667)
As another step towards moving to GitHub Releases, this commit makes the
application care much less about the actual release type of the current
version, instead checking if the application is stable or not, which is
more aligned to what GitHub provides us.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-09 08:43:19 -07:00
Juan Cruz Viotti
79a7a03d03 chore: enforce single quotes in ESLint (#1679)
We recently adopted the standardjs guidelines ESLint, which doesn't seem
to enforce single quotes, even though the guidelines mention it.

See: https://github.com/resin-io/etcher/pull/1663#discussion_r131623802
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-08 08:42:04 -07:00
Juan Cruz Viotti
b97d7080e5
v1.1.2 2017-08-07 11:26:15 -04:00
Juan Cruz Viotti
b8709d10c7 upgrade: drivelist to v5.1.4 (#1675)
Change-Type: patch
Changelog-Entry: Improve Windows drive detection error codes.
See: https://github.com/resin-io-modules/drivelist/pull/204
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-07 08:10:38 -07:00
Jonas Hermsmeier
762d570f8b refactor(gui): Only enable full debug output on demand (#1600)
This disables full wildcard debug output by default now,
leave the possibility to manually enable selective debug output
via the `DEBUG` environment variable.

Change-Type: patch
2017-08-07 07:56:28 -07:00
Jonas Hermsmeier
a2f1ddddb5 fix(svg-icon): Handle DOMParser parsererrors (#1663)
This checks for `parsererror`s in the DOMParser's returned document,
to prevent re-use of the previous image and avoid displaying an error
document in the SVG icon slot.

Change-Type: patch
Changelog-Entry: Avoid "broken" icon when selecting a zip image archive with invalid SVG.
2017-08-07 07:29:30 -07:00
Juan Cruz Viotti
b5b98cf392 chore: add type option to bintray publish script (#1670)
Used to not hardcode the architecture type, and to be able to
conditionally set the Bintray Debian headers.

See: https://github.com/resin-io/etcher/pull/1611#discussion_r131349440
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-06 19:56:17 -07:00
Juan Cruz Viotti
4827267af6 chore: add a publish-all make target (#1666)
The CI servers currently call `installers-all` to deploy snapshot
builds, however that target builds the installers, but doesn't call the
phony rules that actually publishes them.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 18:13:50 -04:00
Benedict Aas
de63d534c5 fix(GUI): make disabled svgs work in img tags (#1661)
SVGs are displayed through IMG tags, but these do not support CSS
`fill`, and as such we work around it with `opacity`.
2017-08-03 12:30:00 -04:00
Juan Cruz Viotti
269aafd625 fix(GUI): log known user errors when querying S3 for updates (#1655)
We send an HTTP request to S3 to determine the latest available version.
There are various error that can happen that we don't have control over
(like `ETIMEDOUT`).

The current approach is to whitelist certain errors and pretend there is
no update available, however this commit improves that whole situation.

Instead of swallowing these errors, we throw a user error from the
function that determines the latest available version. From the
application code, we check if that function throws a user error, and if
so, instead of showing it to the user, we log a mixpanel event and carry
on.

This change is motivated by the latest reporter error we can't do
anything about: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`.

Fixes: https://github.com/resin-io/etcher/issues/1525
Change-Type: patch
Changelog-Entry: Fix `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` error at startup when behind certain proxies.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 10:23:34 -04:00
Juan Cruz Viotti
d8e31665a0 chore: follow standardjs guidelines (#1664)
- Extend the `standard` ESLint configuration
- Remove ESLint rules that are defined in the `standard` configuration
- Get rid of semi-colons

See: https://github.com/resin-io/etcher/pull/1657
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 09:01:54 -04:00
Juan Cruz Viotti
5c19b70e83 refactor: adhere mostly to StandardJS guidelines (#1657)
This commit changes the whole codebase to adhere to all StandardJS
guidelines rules except semicolons, since the removal of semicolons
affect pretty much all lines, and the final diff is very hard to follow
(and to assess other more involved changes).

In a nutshell:

- When using `function`, we now require a space before the opening
  parenthesis
- If a line with operators is broken into multiple lines, the operator
  should now go after the line break
- Unnecessary padding lines are now forbidden

There were also some minor things that the `standard` CLI caught that I
updated here.

See: https://standardjs.com
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 06:59:02 -04:00
Dhruv Paranjape
064c741e3f docs(README): Add documentation for rpm packages. (#1652) 2017-08-02 10:14:25 -04:00
Juan Cruz Viotti
f05b28218c fix: ignore EHOSTDOWN errors when querying S3 (#1654)
There's not much we can do if we can't connect to S3 to determine the
latest available versions when checking if we should show an update
notification dialog or not.

As with similar errors, lets swallow this particular one, and try again
the next time Etcher runs.

Change-Type: patch
Changelog-Entry: Fix `EHOSTDOWN` error at startup.
Fixes: https://github.com/resin-io/etcher/issues/1645
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:45 -04:00
Juan Cruz Viotti
4b4e6ea035 upgrade: drivelist to v5.1.3 (#1653)
This version contains the following fixes:

- Fix "Couldn't initialize the scanner: An unknown error occurred" error
- Fix "Couldn't scan the drives: An unknown error occurred" where there
  is a mounted virtual drive

See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Fix various drive scanning Windows errors.
Fixes: https://github.com/resin-io/etcher/issues/1646
Fixes: https://github.com/resin-io/etcher/issues/1639
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:27 -04:00
Juan Cruz Viotti
861b8a4450 fix(GUI): throw a user error if the user is not in the sudoers file (#1620)
Change-Type: patch
Changelog-Entry: Display a user-friendly error message if the user is not in the sudoers file.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 17:35:45 -04:00
Benedict Aas
70ad86534d feat(GUI): make size units closest relative (#1539)
We make the size units used the closest relative unit through a new
filter `closestUnit` replacing the old `gigabyte` filter.

Changelog-Entry: Round byte sizes to the more appropriate unit.

* remove filters folder

* new shrinkwrap, add to package.json

* test
2017-08-01 17:34:13 -04:00
Benedict Aas
7714e8b50a fix(GUI): make archive-embedded svgs work again (#1642)
We make the svg-icon component accept XML in its path argument to handle
archive-embedded SVG icons.

Changelog-Entry: Make archive-embedded SVG icons work again.
Fixes: https://github.com/resin-io/etcher/issues/1636
2017-08-01 12:34:06 -04:00
Juan Cruz Viotti
a63b6bf18c fix(CLI): pass required arguments to flashComplete message (#1630)
The `flashComplete` message takes the drive object and the image
basename as arguments. This was updated on the GUI, but causes the CLI
to throw an error upon completion.

Change-Type: patch
Changelog-Entry: Fix "imageBasename is not defined" error on the CLI.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 12:32:50 -04:00
moragues
70c79f6127 feat: support rpi-sdcard image file type (#1648)
Support the rpi-sdcard image file type output by Yocto for
the Raspberry Pi device.

Change-Id: Ia7e3aef0d90fdf21d373a560e6dd2b96e6b51da8
Changelog-Entry: Add support for `.rpi-sdcard` images.
2017-08-01 10:34:25 -04:00
Juan Cruz Viotti
de62b2e65c chore: publish development Bintray packages (#1611)
This commit includes several changes to adapt the CI configuration files
and Bintray publish script to perform development deployments.

- Move our Bintray details to the Makefile
- Deploy to a new Bintray component if `RELEASE_TYPE` is `snapshot`
- Call `publish-bintray-debian` and `publish-bintray-redhat` in the CI
  deployment script
- Call the Bintray deployment scripts for RPMs

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:29:09 -04:00
Juan Cruz Viotti
1103492193 refactor: address review comments from #1625 (#1647)
That PR was merged in a rush, so this is the follow-up commit addressing
the review comments made there.

See: https://github.com/resin-io/etcher/pull/1625
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:59 -04:00
Juan Cruz Viotti
fc3eeff1c9 refactor(GUI): make settings model setter asynchronous (#1597)
This is part of the process of implementing support for a configuration
file. We previously decoupled the Redux store from localStorage by
moving the logic that actually persists the data to localStorage to a
local-settings.js file, however the localStorage API is synchronous, so
it follows that at the moment, all functions that interact with are also
synchronous.

Moving to storing the settings to a file means turning all these
functions to promises, which we do in this commit, in order to not mix
the addition of the configuration file feature with the huge amount of
refactoring it requires.

See: https://github.com/resin-io/etcher/issues/1356
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:15 -04:00
Juan Cruz Viotti
205711da7e refactor(image-stream): parse xz and gzip metadata using a custom read function (#1590)
This commit refactors the xz and gzip image handlers to pass/use a
custom read function to be able to determine the uncompressed size, and
other needed metadata.

By using this function (which currently only uses the `fs` module), we
can implement support for getting the uncompressed size of compressed
files using HTTP Ranges.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:24:19 -04:00
Lucas Rangit MAGASWERAN
57709942a0 docs(README): add debian repository in one line (#1649)
For convenience, create the apt source file and add the repository in one line.

Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
2017-07-31 16:06:25 -03:00
Juan Cruz Viotti
5e582ceb98 chore: use electron-builder default package names (#1609)
We're currently manually changing the names of the final packages
created by `electron-builder`. This commit makes Etcher use the default
package names that `electron-builder` picks for us.

The Windows final package names contain spaces, so I did keep the
`artifactName` entries for them, which now basically use what
`electron-builder` recommends, but use hyphens instead of spaces.

Change-Type: minor
See: https://github.com/resin-io/etcher/pull/1555
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-31 16:04:10 -03:00
Jonas Hermsmeier
25d50fed74 doc: Merge running locally into contributing guide (#1640)
As recently several people have been asking for things
that are described in `RUNNING-LOCALLY.md`, but couldn't be
found in the `CONTRIBUTING.md`, this consilidates the two into
one single resource to look for on how to get started developing.

Change-Type: patch
2017-07-31 17:24:33 +02:00
Jonas Hermsmeier
07ac2ecf4c doc: Add link to commit guidelines to contributing guide (#1641)
This adds a reference to the commit guidelines to the contributing guide.
Fixes #1494

Change-Type: patch
2017-07-28 12:44:15 +02:00
Juan Cruz Viotti
7908c39ef4
v1.1.1
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-25 09:50:24 -03:00
Juan Cruz Viotti
b64ef705e8 chore: use old custom build system to create AppImages (#1625)
electron-builder seems to ship with an older AppImages version that
doesn't play very well with the custom AppImages elevation system we
created.

More particularly, we can't execute custom binaries inside the mounted
AppImage given that the mount point seems to lose permissions, owner,
and group file information.

This commit goes back to our old custom build system just for AppImages,
until we properly solve the problem, which will likely involve updating
the AppImages version in electron-builder.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-25 09:47:33 -03:00
Jonas Hermsmeier
36664fb251 fix(writer): Use final size if it's not an estimation (#1587)
This avoids running into the "flashstate percentage above 100%" error again.

Change-Type: patch
Changelog-Entry: Prevent "percentage above 100%" errors on DMG images.
2017-07-24 16:54:02 -03:00
Andrew Scheller
fa8f8151f6 docs(PUBLISHING): fix Etcher forum link (#1626) 2017-07-24 19:55:34 +01:00
Andrew Scheller
bebedf1a50 chore: make distclean now deletes build directory too (#1624) 2017-07-24 13:12:46 -03:00
Juan Cruz Viotti
f53a0af150 upgrade: mountutils to v1.2.1 (#1623)
This version contains a fix to a set of very recurrent "Unmount failed"
macOS errors.

See: https://github.com/resin-io-modules/mountutils/pull/44
Change-Type: patch
Changelog-Entry: Fix most "Unmount failed" errors on macOS.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-24 09:36:31 -03:00
Juan Cruz Viotti
09bf430a1e chore: remove the concept of target and host platforms (#1610)
Its very unlikely that we will ever support cross platform builds. For
that reason, let's simplify the whole Makefile by removing the concept
of target and host platforms.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:33:05 -03:00
Juan Cruz Viotti
b221914a3d fix(GUI): properly pass error object to "Flash error" event (#1619)
Simply running `_.merge` on an Error object results in an empty plain
object `{}` being sent to Mixpanel/Sentry.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:32:50 -03:00
Juan Cruz Viotti
1d66794450 fix(windows): include local native modules in final asar (#1616)
Etcher has local native code that gets built to `build/`, but that's not
being included inside the final asar.

The fix is to manually add the `*.node` files inside `build/Release` by
adding the appropriate wilcard to the `files` section of
`electron-builder.yml`.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-21 09:10:46 -03:00
Juan Cruz Viotti
1563a2392d
v1.1.0
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-20 14:48:30 -03:00
Juan Cruz Viotti
a19b0e028f upgrade: drivelist to v5.0.27 (#1607)
This new version contains the following PRs that we're interested about:

- https://github.com/resin-io-modules/drivelist/pull/196

To reduce the amount of debug logging we produce (see
https://github.com/resin-io/etcher/pull/1600).

- https://github.com/resin-io-modules/drivelist/pull/195

To properly handle spawning EAGAIN errors.

Fixes: https://github.com/resin-io/etcher/issues/1578
Change-Type: patch
Changelog-Entry: Retry various times on EAGAIN when spawning drive scanning scripts.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-19 15:23:32 -03:00
Andrew Scheller
fa60a746a2 chore: fix typos in target-convert.sh (#1608) 2017-07-19 10:04:15 -03:00
Benedict Aas
227533a7f9 upgrade(package): update resin-corvus to 1.0.0-beta.28 (#1604)
Closes: https://github.com/resin-io/etcher/issues/1465
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 14:54:03 -03:00
Juan Cruz Viotti
4122e0bf1d refactor: move most models to lib/shared/ (#1596)
Now that the Redux store is no longer front-end dependent, we can move
most of the models to lib/shared. Currently, lib/shared is a mess, and
contains all sorts of functionality, however moving things out of the
GUI is the first step. Once we have everything decoupled, we can
organise all the code we have there.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 12:34:10 -03:00
Juan Cruz Viotti
3a42331875 fix(GUI): incorrect function call in FlashController (#1606)
This commit fixes a subtle issue where we are calling a non-existing
function of an error object, instead of using the exception reporter
module.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 11:47:26 -03:00
Juan Cruz Viotti
37b7ea3b0a refactor(image-stream): extract part of utils.js into mime.js (#1594)
This is a small refactoring commit that extracts the MIME related
function from utils.js into a new file called mime.js, and stores the
default image MIME type there as a constant, to avoid duplicating it in
multiple parts of the code.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 19:59:33 -04:00
Juan Cruz Viotti
a772877ae1 test(image-stream): move extraction timeout to a shared constant (#1599)
The image stream tests that extract images all have a 20s timeout, which
is manually set in all the suites related to extraction.

This commit extracts that number as a constant called DEFAULT_TIMEOUT.

See: https://github.com/resin-io/etcher/pull/1595
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 19:59:25 -04:00
Juan Cruz Viotti
76b6bdfd06 chore: cache ~/.pkg-cache in Travis CI and Appveyor CI (#1598)
Looks like pkg downloads node binaries from GitHub Releases, and GitHub
may impose a rate limiting if we download too many things from them in a
short period of time (likely to happen when there are many concurrent
PRs).

In order to mitigate this issue, this commit adds `$HOME/.pkg-cache`,
the directory where pkg stores node binaries, to the CI services cache.

See: https://github.com/resin-io/etcher/pull/1594
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 11:48:45 -04:00
Juan Cruz Viotti
2a8e91190c test(image-stream): increase DMG tests timeouts (#1595)
I caught an sporadic issue a couple of times, where the DMG tests would
exceed the default 2000ms mocha timeout. All the other image
decompression tests have a much higher timeout already, so this commit
adds the same timeout to the DMG tests file.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 17:41:44 -04:00
Juan Cruz Viotti
be8a638fce chore: pass --quiet to pip install (#1592)
This helps reduce a bit of output in the CI servers.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 16:15:03 -04:00
Juan Cruz Viotti
3e2da6a386 chore: cache electron-builder temporary files in macOS (#1591)
Our current Travis CI configuration caches temporary files created by
electron-builder, but only for GNU/Linux builds. In macOS, electron and
electron-builder store their cache at ~/Library/Caches, so we must cache
that as well.

This commit was motivated by the fact that most macOS builds are failing
for Electron package download timeouts.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 11:37:26 -04:00
Juan Cruz Viotti
ff547035be chore: only ignore top level directories in gitignore for some cases (#1588)
We accidentally added build/ to gitignore, causing any new files from
`scripts/build` to be ignored.

See: https://github.com/resin-io/etcher/pull/1547#discussion_r126790010
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 10:23:22 -04:00
Juan Cruz Viotti
ca9136d1cb chore: send analytics about package types (#1570)
This commit adds a `packageType` property to package.json, which is set
according to the package type of the Etcher target (e.g: dmg, nsis, deb,
etc).

This information is then sent to Mixpanel as the `packageType` property
of the "Application start" event.

Change-Type: patch
Changelog-Entry: Send anonymous analytics about package types.
Fixes: https://github.com/resin-io/etcher/issues/1328
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 10:13:56 -04:00
Juan Cruz Viotti
439be1c222 refactor(image-stream): rename file variable to imagePath (#1589)
This is a small initial step towards decoupling the image stream
handlers from the concept of a "file."

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 09:30:28 -04:00
Juan Cruz Viotti
77c60b91c6 upgrade: drivelist to v5.0.25 (#1574)
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  https://github.com/resin-io-modules/drivelist/issues/142)

- Cleanup temporary scripts after execution

This PR also sets the DRIVELIST_DEBUG environment variable to enable
debug information from Windows' drivelist implementation.

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: https://github.com/resin-io/etcher/issues/1108
Fixes: https://github.com/resin-io/etcher/issues/1054
Fixes: https://github.com/resin-io/etcher/issues/995
Fixes: https://github.com/resin-io/etcher/issues/1483
Fixes: https://github.com/resin-io/etcher/issues/1142
Fixes: https://github.com/resin-io/etcher/issues/1571
See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-12 15:18:05 -04:00
Juan Cruz Viotti
a5b1a92920 chore: add eslint-jsdoc-plugin to eslint (#1585)
This plugin helps us detect some things the built-in jsdoc rules can't,
like whether there is an example or not.

As expected, the addition of this plugin helped detect some minor JSDoc
issues.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-12 10:19:08 -04:00
Jonas Hermsmeier
58fa59e06d upgrade(package): Update udif 0.9.0 -> 0.10.0 (#1586)
This updates `udif` from 0.9.0 to 0.10.0, fixing two bugs;

* [57ddf788] fix(readstream): Avoid read-before-open situations
* [6333a183] fix(image): try/catch parsing the resource fork plist

[57ddf788]: 57ddf788b7
[6333a183]: 6333a183f6

Change-Type: patch
2017-07-12 10:21:38 +02:00
Benedict Aas
fc6c5bf585 refactor(GUI): deangular os-dialog and error module (#1546)
We remove the Angular dependency from `lib/gui/os/dialog` and
`lib/gui/modules/error` which is also now renamed to
`lib/gui/modules/exception`.

Changelog-Entry: Deangular the os-dialog and error modules
2017-07-11 17:21:48 -04:00
Juan Cruz Viotti
e52ef501bb chore: avoid brew taking a long time on macOS Travis builds (#1583)
- Homebrew now auto-updates before performing any installation, which
  can take quite some time. We can disable this by enabling
  HOMEBREW_NO_AUTO_UPDATE

- We can pass the --force-bottle option to `brew install` to force it to
  download pre-compiled binaries, and don't attempt any compilations

See: https://github.com/resin-io/etcher/pull/1582
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-11 17:12:44 -04:00
Juan Cruz Viotti
6ffba92dc8 chore: make use of pkg to package the Etcher CLI (#1547)
This commit replaces our home-grown CLI packaging mechanism based on
browserify + node-static-entry-point with pkg, an open source tool to
package Node.js applications for distribution.

Some highlights:

- Removing browserify got rid of a lot of dependencies from
  npm-shrinkwrap.json

- pkg currently has an issue where macOS binaries can't be code-signed
  (https://github.com/zeit/pkg/issues/128), therefore this commit
  comments-out the binary signing section for that operating system

- pkg currently has an issue where Windows binaries can't be branded
  (https://github.com/zeit/pkg/issues/149), therefore this commit
  comments-out the branding section for that operating system

See: https://github.com/zeit/pkg
Fixes: https://github.com/resin-io/etcher/issues/1531
Fixes: https://github.com/resin-io/etcher/issues/1450
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-11 14:37:14 -04:00
Juan Cruz Viotti
3ade1ea59b chore: don't install NSIS in Appveyor CI (#1584)
This dependency comes bundled with electron-builder, so there is no
reason to install it separately.

See: https://github.com/resin-io/etcher/pull/1582
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-11 14:14:15 -04:00
Juan Cruz Viotti
427a791de5 refactor(GUI): remove flash of white electron webContents workaround (#1575)
The lib/gui/etcher.js file contained a workaround to an Electron issue
that have since then been solved. In summary:

- Replace the `did-finish-load` event of `webContents` with
  `ready-to-show`, which is only emitted when the whole webview has
  finished loading

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-11 11:56:05 -04:00
Juan Cruz Viotti
dbe6ea68d5 chore: cache as most as possible from electron-builder (#1582)
These directories contain files downloaded by electron-builder (like
electron itself), that we can cache in Travis CI and Appveyor CI to
speed up builds.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-11 11:46:57 -04:00
Juan Cruz Viotti
b6c6eb4dfa chore(appveyor): make node_modules cache depend on npm-shrinkwrap.json (#1580)
We've been hitting some weird npm-shrinkwrap.json issues in our
shrinkwrap staged sanity checks, where Appveyor would complain that the
shrinkwrap is not up to date, while that wasn't the case either locally
or in Travis CI.

The issue is related to caching. If a commit changes a `from` entry of a
npm-shrinkwrap.json dependency, but the CI servers kept the cached
node_modules, then there will be a discrepancy between the `_from` field
from the `package.json` of a dependency in `node_modules` and what the
npm-shrinkwrap.json says. npm will obey `node_modules` over
`npm-shrinkwrap`, causing the invalid diff.

The fix is to make the Appveyor node_modules cached directory dependent
on any change to the npm-shrinkwrap.json file.

Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1547
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-10 15:07:09 -04:00
Juan Cruz Viotti
fdceaadec5 refactor(GUI): move redux store to lib/shared (#1576)
After https://github.com/resin-io/etcher/pull/1569, the redux store can
run outside of a browser context. This commit moves it to `lib/shared`,
where we will likely move all the other models as well. As an extra, I
renamed `Store` to `store`, since there was no reason for that variable
to be capitalized.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-07 18:47:39 -04:00
Juan Cruz Viotti
4dc56f4678 refactor(GUI): decouple localStorage from the redux store (#1569)
We're currently persisting the user settings in localSettings by using a
redux plugin called redux-localstorage. As a way to decouple the redux
store from a technology that is browser specific, this commit makes the
following changes:

- Create local-settings.js, which is concerned with managing settings in
  a persisting location

- Decouple the redux store from the persisting storage method

- Extend the settings model to persist settings, cache reads, etc

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-06 17:49:13 -04:00
Jonas Hermsmeier
1b79d50288 fix(gui): Fix image checks in image selections (#1573)
I must have screwed something up during a rebase,
this mends the partition table an windows image checks.

Change-Type: patch
2017-07-06 16:00:07 -04:00
Juan Cruz Viotti
1b695a49e9 upgrade: electron-builder to v19.9.1 (#1548)
- Exclude *.dll/*.exe files from the asar in non-Windows operating
  systems (from 19.8.0)

- Correctly parse boolean flags in `--extraMetadata` (in v19.9.0)

See: https://github.com/electron-userland/electron-builder/releases/tag/v19.9.1
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-06 13:51:55 -04:00
Juan Cruz Viotti
fd109b5770 fix(elevator): make use of wide characters everywhere (#1559)
Switching the Windows language to a language encoded using UTF-16 (like
Japanese) revealed that our native elevator module garbles language
specific strings, making the child writer process unable to find an
image inside a language specific directory, and thus resulting in a
"File is not accessible" error.

As a solution, we make use of `std::wstring` and wide character Windows
API functions in the elevator module.

Change-Type: patch
Changelog-Entry: Fix "file is not accessible" error when flashing an image that lives inside a directory whose name is UTF-16 encoded on Windows.
Fixes: https://github.com/resin-io/etcher/issues/1459
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-05 14:13:36 -04:00
Jonas Hermsmeier
80b588683e feat(image-stream): Read MBR & GPT in .getImageMetadata() (#1248)
* feat(image-stream): Read MBR & GPT in .getImageMetadata()
* feat(gui): Display warning when image has no MBR
* test(image-stream): Update .isSupportedImage() tests
* feat(image-stream): Normalize MBR & GPT partitions
* test(image-stream): Add partition info
* feat(image-selection): Send missing part table event
* test(image-stream): Add GPT test image

Change-Type: minor
2017-07-05 16:18:02 +02:00
Benedict Aas
b18fa1f13f feat(GUI): add webview api version parameter (#1558)
We add the API version sent to the banner via a GET search parameter,
allowing for more intricate control over what data needs or can be sent.
2017-07-04 13:11:44 -04:00
Jonas Hermsmeier
f1ddf07a45 test(image-stream): Test more compression methods (#1565)
* test(image-stream): Add more zip compression methods
* test(image-stream): Add more dmg compression methods
* test(image-stream): Add bz2 level 9 test

Change-Type: patch
2017-07-03 23:35:06 +02:00
Jonas Hermsmeier
5f5a4b61b0 chore(scripts): Silence stdout for npm install (#1567)
Change-Type: patch
2017-07-03 17:08:53 -04:00
Andrew Scheller
20ca03496f chore: fix typo in Makefile (#1562)
This is a change that should have been made in #1543
2017-07-03 16:26:10 -04:00
Juan Cruz Viotti
7af66c4911 chore:(windows): make use of NSIS one-click installers (#1560)
One-click installers are a "modern" version of usual wizard installers,
and somewhat resemble the Squirrel.Windows installers you can see in
apps like Atom.

As the name implies, the user needs to agree the license, and that's
all, the remaining installer is non-interactive, leading to a very
smooth user experience.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-03 16:25:48 -04:00
Juan Cruz Viotti
2e3a2f045e chore: pipe stdout from npm ls to /dev/null (#1566)
As part of our CI sanity checks, we run `npm ls`, to ensure we don't
have any extraneous dependencies (the command fails if so), however by
its own definition, `npm ls` prints the whole dependency tree, which
spams the builds.

This commit redirects stdout to /dev/null, which contains the dependency
tree, but still prints and extraneous dependency warning, which is
printed to stderr instead.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-03 13:14:22 -04:00
Juan Cruz Viotti
c2563c2f87 chore(npm): move retry options to INSTALL_OPTS (#1564)
See: https://github.com/resin-io/etcher/pull/1550/files#r125015773
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-03 11:48:07 -04:00
Juan Cruz Viotti
53d8118b8f chore: don't remove optional dependencies in clean-shrinkwrap.js (#1551)
If we include a platform specific optional dependency in the shrinkwrap
file, then npm will insist in installing it even if the platform doesn't
match. As a solution, we figured out we can avoid putting this platform
specific optional dependencies in the npm-shrinkwrap.json file.

In order to do this, we currently have a script called
`clean-shrinkwrap.js` that runs *before* any `npm shrinkwrap` file (its
a `preshrinkwrap` npm script) that deletes all the platform specific
modules we know about using `npm rm`.

The problem with this approach is that `npm rm` will remove the module's
code from `node_modules`, which means that if we run `npm shrinkwrap`,
we will lose certain optional dependencies, that may be needed at a
later stage.

The solution is to modify the `clean-shrinkwrap.js` script to parse
`npm-shrinkwrap.json`, and manually delete the entries that we want to
omit. Also, the script needs to be run *after* `npm shrinkwrap`, so we
change the npm script name to `postshrinkwrap`.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-03 10:30:04 -04:00
Jonas Hermsmeier
9bd987f7f3 chore(package): Disable node_modules caching on Travis CI (#1561)
This disabled caching of the `node_modules` directory again,
as this is causing failures on Travis CI while building the installers.

Change-Type: patch
2017-06-30 09:54:25 -04:00
Jonas Hermsmeier
a370e9d4cb feat(gui): Show friendlier error dialog when opening images (#1557)
* feat(gui): Friendly error dialog when opening image fails

This displays a friendlier error dialog if opening an image fails
due any reason (like i.e. an unsupported compression method)

Change-Type: patch

* test(image-stream): Add test for unsupported compression method
* test(image-stream): Only check `error.description` when given
* test(image-stream): Add zip-deflate64.zip
2017-06-28 16:44:21 +02:00
Jonas Hermsmeier
65210e4cbc chore(ci): Enable node_modules & ccache caching (#1553)
This enables caching of `node_modules`, and `ccache` directories,
as well as installation of ccache on Mac OS.

Change-Type: patch
2017-06-27 23:27:43 +02:00
Jonas Hermsmeier
2008c50ebf chore(scripts): Make npm output less verbose (#1554)
This adds the `--silent` flag to several npm commands,
ideally making the output less verbose, for better overview in CI logs.

Change-Type: patch
2017-06-27 22:27:34 +02:00
Juan Cruz Viotti
3ab989cf3c chore: increase npm retries and max timeout (#1550)
CI servers fail with timeouts, or network issues quite frequently,
requiring maintainers to manually restart failed builds.

Hopefully these npm settings will help mitigating these issues.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-27 13:11:54 -04:00
Juan Cruz Viotti
d8e9cb93b7 chore: move all electron-builder configuration to electron-builder.yml (#1544)
The electron-builder configuration we're putting in package.json is
growing. To make it easier to read and edit, we'll move the whole
`build` property into a configuration file called
`electron-builder.yml`.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-27 10:15:38 -04:00
Juan Cruz Viotti
cd4cff7e43 chore: remove npm ranges from package.json (#1549)
We don't make use of npm ranges at all (every dependency and its
subdependencies are shrinkwrapped). Removing npm ranges allows us to
simplify our clean-shrinkwrap.js script to get rid of platform specific
optional dependencies, and their subdependencies.

See: https://github.com/resin-io/etcher/pull/1514
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-26 18:49:51 -04:00
Juan Cruz Viotti
9b735778c2 chore: use various electron-builder defaults (#1543)
Now that all GUI builds are done through electron-builder, we'll
simplify our Makefile by adopting certain electron-builder defaults:

- Output final packages in `dist/`
- Adopt electron-builder code-signing environment variables

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-24 15:54:55 -04:00
Juan Cruz Viotti
a7ac28b717 chore: make use of electron-builder to build GNU/Linux packages (#1520)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-23 20:10:51 -04:00
Juan Cruz Viotti
4f87079f12 chore: make use of electron-builder for the package-electron target (#1540)
This target builds a package for the current operating system, but
doesn't create an installer out of it, which is useful for debugging
purposes.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-23 18:59:15 -04:00
Juan Cruz Viotti
840388e8c5 chore: don't extract native dependencies out of the asar (#1542)
Turns out add-ons are loaded just fine from the asar now.

See: https://github.com/electron-userland/electron-builder/issues/1723
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-23 18:57:57 -04:00
Benedict Aas
5297ddf68c feat(GUI): swap progress bar speed and time (#1537)
We swap the placement of the progress speed and time residing below the
progress bar.

Changelog-Entry: Swap speed and time below the flashing progress bar.
Closes: https://github.com/resin-io/etcher/issues/1312
2017-06-22 17:35:51 -04:00
Jonas Hermsmeier
4f4c606949 test(image-stream): Fix test image data (#1535)
This updates the base test image to be a complete, but small
disk image, as thre previous image was quite large for running tests (32MB),
and was chopped off at an arbitrary position, causing other tools to fail
on it as an input.

Change-Type: patch
2017-06-21 16:31:21 +02:00
Juan Cruz Viotti
dbc8aa159d chore(travis): remove unused afsctool macOS dependency (#1521)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-16 17:36:00 -04:00
Juan Cruz Viotti
103a048e4d refactor(GUI): replace SET_SETTING with an atomic SET_SETTINGS action (#1515)
This commit is the first on a series of commit to incrementally
implement support for configuration files (so we avoid a huge PR like we
have at the moment).

Once of the first things we can do is replace the `SET_SETTING` redux
action with an atomic `SET_SETTINGS` action that sets all the settings
for the application at once.

The purpose of this change is that later the `SET_SETTINGS` action can
be modified to stringify all the settings and store them in a
configuration file, without having to deal with merges, conflicts, etc
(since the client application if forced to resolve those problems before
calling the `SET_SETTINGS` action.)

The behaviour of the code remains almost the same, with the exception
that the user can now set settings that we don't know about, so the user
can switch between Etcher versions without getting weird errors if one
of the configuration keys he has doesn't exist in the other version.

See: https://github.com/resin-io/etcher/pull/1382
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-15 12:57:15 -04:00
Juan Cruz Viotti
a8f6275763 chore: generate single-binary portable installers on Windows (#1518)
We currently support portable builds that are basically ZIPs containing
the main Etcher executable and all its related libraries.

Turns out `electron-builder` supports NSIS-based portable builds that
can create a single executable that has everything it needs to run,
including any external assets.

This commit makes use of this new portable Windows installer
functionality, replacing the old ZIP approach.

Change-Type: patch
Changelog-Entry: Generate single-binary portable installers on Windows.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-15 12:10:22 -04:00
Benedict Aas
0f600c3cc2 refactor(GUI): remove angular dependency from drive scanner (#1512)
Remove the Angular dependency from DriveScanner and with it the service,
exposing it through the module directly.
2017-06-15 11:26:03 -04:00
Juan Cruz Viotti
9c1f9a54b1 chore: fix version/platform order inconsistencies in package names (#1517)
See: https://github.com/resin-io/etcher/pull/1132#discussion_r121654527
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-15 10:12:00 -04:00
Juan Cruz Viotti
2f605497be chore: use electron-builder to generate macOS builds (#1511)
This commit makes use of electron-builder to replace what our scripts
were already doing.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-15 10:11:49 -04:00
Juan Cruz Viotti
07adafe6f3 chore: use the new electron-builder version to create NSIS installer (#1510)
We've been using `electron-builder` v2 all this time to create the NSIS
installer. This commit upgrade `electron-builder` to v18.6.2, and keeps
using it just to create the NSIS installer (for now).

The final package behaves exactly like the one we have before, just that
we needed various tweaks to upgrade to the latest `electron-builder`
version.

In more detail:

- Inject data to package.json using the new `--extraMetadata` option
- Remove old `.builder` package.json property
- Change the author of the project to Resin Inc. (the company name used
  in our code-signing certificate)

As an extra, the new NSIS installer allows the user to install the
application to any location, and fixes the fact that the previous
installer copied the application to C:\Program Files (x86) even on x64
systems.

Change-Type: patch
Fixes: https://github.com/resin-io/etcher/issues/1030
Fixes: https://github.com/resin-io/etcher/issues/877
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-13 11:19:29 -04:00
Juan Cruz Viotti
15b178a158 refactor(GUI): move ETCHER_DISABLE_UPDATES into package.json (#1501)
Etcher supports disabling the update notification dialog by setting the
`ETCHER_DISABLE_UPDATES` environment variable.

In order to simplify disabling updates for when these are managed by a
package manager (e.g. in a debian package), this removes support for the
`ETCHER_DISABLE_UPDATES` environment variable, and instead requires
packagers to tweak the `updates.enabled` property of the package.json
file, which is set to `true` by default.

We don't want to encourage end users to disable the update mechanism, so
the documention was removed from `USER-DOCUMENTATION.md`. This option
will remain as something only packagers should tweak.

Change-Type: minor
Changelog-Entry: Remove support for the `ETCHER_DISABLE_UPDATES` environment variable.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-13 09:07:47 -04:00
Andrew Scheller
22be831535 chore: move mkdir call from node-package-cli.sh to Makefile (#1516)
This makes it more consistent with the other Makefile rules
2017-06-13 14:00:43 +01:00
Juan Cruz Viotti
71ebe047c6 chore: don't use ./ when generating sass files (#1513)
The `./` prefix is unnecessary.

See: https://github.com/resin-io/etcher/pull/1505#pullrequestreview-43444274
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-12 15:17:43 -04:00
Dhruv Paranjape
f350d28dbd chore: Add support for rpm packages (#1425)
* add support for rpm packages.

* remove bintray file not my place neither do i have the keys.

* Remove last visage of publishing rpm's to bintray.

* address review comments.

* remove electron installer redhat from optional dependancies and add it to dockerfiles. also remove variable ELECTRON-INSTALLER-REDHAT inline with electron installer debian script.

* Add dependancy on libXScrnSaver and remove unsupported fields from config.json.
add rpm package to dockerfiles.
add dependancy check on rpmbuild to installer script.

* change dependancy from lsb-core-noarch to just lsb.

* address review comments.

* Add bintray target for rpm packages.

* Fix missing dependancy removed during conflict resolution.
2017-06-12 18:54:31 +01:00
Benedict Aas
a7d713c323 feat(GUI): rewrite svg-icon directive in react (#1464)
We change from using an Angular directive to using React through
react2angular in the SVGIcon module.
2017-06-12 08:42:52 -04:00
Benedict Aas
ef739fb222 refactor(GUI): remove angular dependency from selection-state (#1509)
We remove the dependency on Angular from SelectionStateModel and rename
it to selectionState.
2017-06-12 08:40:52 -04:00
Juan Cruz Viotti
cff445b64b chore: move npm targets to Makefile (#1505)
We currently have various npm script target, and some of them are
getting complex enough that making sense out of them in package.json is
not a trivial task.

This commit moves all npm targets that are not directly recognisable by
npm (like `start`, `test`, `preshrinkwrap`, etc) into the Makefile.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-10 13:50:29 -04:00
Juan Cruz Viotti
b16f9cfdf7 chore: re-organize package.json in a way similar to electron-builder (#1504)
This commit re-organizes various metadata properties in package.json so
that the structure better matches what `electron-builder` expects, to
ease the transition.

- Move `.companyName` to the Makefile (we don't need this in
  package.json)
- Move `.displayName` to `.build.productName`
- Move `.copyright` to `.build.copyright`
- Move category to `.build.mac.category`
- Move bundle id to `.build.appId`

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-10 13:37:44 -04:00
Juan Cruz Viotti
b12c952a6a chore: output build artifacts to dist/ (#1506)
This is the directory where `electron-builder` will output build
artifacts.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-10 13:37:36 -04:00
Juan Cruz Viotti
9bab3054e9 chore: remove ampersand from package description (#1503)
The ampersand confuses nupkg when generating Windows installers from
`electron-builder`.

The referenced issue talks about an issue where the ampersand is present
on the application name, but anything that gets into the `.nuspec` XML
file, including the description, triggers the issue.

See: https://github.com/electron-userland/electron-builder/issues/517
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-09 15:46:08 -04:00
Juan Cruz Viotti
927a0aba06 chore: remove unused electron-packager dependency (#1502)
We're not using this development dependency anymore. Furthermore, we're
also not using the `packageignore.js` script, which was meant to be used
with `electron-packager`.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-08 15:08:37 -04:00
Juan Cruz Viotti
8811bbed09 upgrade: drivelist to v5.0.22 (#1500)
- https://github.com/resin-io-modules/drivelist/pull/168

Change-Type: patch
Changelog-Entry: Fix occasional increased CPU usage because of perl regular expression in macOS.
Fixes: https://github.com/resin-io/etcher/issues/1288
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-06-08 13:36:57 -04:00
Benedict Aas
31a2389d04 fix(GUI): reset webview after navigating away (#1422)
We reload and reset the webview to its original URL when the user
navigates away from the success screen.

Changelog-Entry: Reset webview after navigating away from the success screen.
2017-06-08 11:42:55 -04:00
Romain Bazile
a3c13e75cf feat: support .sdcard images (#1493)
Change-Type: minor
Changelog-Entry: Add support for `.sdcard` images.
Link: https://github.com/resin-io/etcher/issues/1360
Fixes: https://github.com/resin-io/etcher/issues/1348
Fixes: https://github.com/resin-io/etcher/issues/1361
2017-06-06 12:57:55 -04:00
Jonas Hermsmeier
6037eeba00 doc(README): Update & normalize badges (#1491)
This updates & normalizes the badges in the README to all have
a consistent style and adds a release-badge pointing to the website.

Change-Type: patch
2017-06-05 18:54:48 -04:00
Jonas Hermsmeier
ce50364b9f upgrade(package): Update node-sass to 4.5.3 (#1489)
This updates node-sass from v3.x to v4.x in anticipation
of addition of Electron ABI versions in an upcoming version.

Change-Type: patch
2017-06-05 18:38:19 +02:00
Benedict Aas
14b04413b5 refactor(GUI): remove angular from DrivesModel (#1265)
We remove usage of Angular from DrivesModel.

Depends: https://github.com/resin-io/etcher/pull/1261
Depends: https://github.com/resin-io/etcher/pull/1264

* remove angular injection from tests

* move file

* add empty array test
2017-06-05 10:30:58 -04:00
Juan Cruz Viotti
dc2212a57f fix(GUI): ignore UNABLE_TO_VERIFY_LEAF_SIGNATURE HTTP issues (#1473)
This error may get thrown when fetching the list of S3 packages when the
user is behind a proxy tht causes the SSL certificate to incorrectly not
be trusted.

See: https://github.com/atom/apm/issues/103
See: https://github.com/resin-io/etcher/issues/1465
Change-Type: patch
Changelog-Entry: Fix `UNABLE_TO_VERIFY_LEAF_SIGNATURE` error at startup.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-06-05 10:22:15 -04:00
Jonas Hermsmeier
fe40e7bdf1 chore(package): Update mountutils to 1.2.0 (#1488)
This updates `mountutils` from 1.0.6 to 1.2.0, which includes
various fixes and adds AsyncWorkers:

- fix(windows): Replace use of `wsprintf()`
- fix(darwin): Add local context to avoid global state
- feat(src): Use Nan::AsyncWorker

Change-Type: upgrade
2017-06-04 15:17:07 +02:00
Benedict Aas
ee3c146785 fix(GUI): correct relative notification icon path (#1470)
We update the relative icon path to the correct relative path containing
the Etcher icon.

See: https://github.com/resin-io/etcher/issues/1443
2017-06-01 17:07:12 -04:00
Juan Cruz Viotti
296a554637
Revert "chore: make use of resin.io's Docker base images"
This reverts commit d39b4ba7d7687a7eea72cbf7b8702f8ea122fb39.
2017-05-31 10:51:27 -04:00
Benedict Aas
b56a39e576 style(GUI): normal weight message on success page (#1469)
We make the fonts a regular weight instead of bold on the success page's
fallback banner.

Changelog-Entry: Minor style improvements to the fallback success page banner.
2017-05-30 09:36:33 -04:00
Benedict Aas
7898358617 fix(GUI): stop settings overflow into footer (#1468)
By removing the 'advanced' sub-header we stop the settings from
overflowing into the footer.

Fixes: https://github.com/resin-io/etcher/issues/1383
Changelog-Entry: Remove "Advanced" settings subtitle.
2017-05-30 09:34:45 -04:00
Juan Cruz Viotti
9a3900debb chore: make use of resin.io's Docker base images (#1481)
Resin.io already publishes multi-arch Docker base images running Jessie,
which is Debian version we wanted before falling back to Ubuntu 12.04.

The main reason behind this change is to be able to use other resin.io
base images (like ARM ones) without requiring a lot of per-base-image
changes.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-29 20:45:24 -04:00
Benedict Aas
dcb152aa00 fix(GUI): don't break up size number in drive selector (#1467)
We make the size number in the drive selector stay whole through
the `word-break: keep-all` CSS property, ensuring that it doesn't
partially overflow to the next line.

See: https://github.com/resin-io/etcher/issues/1437
Changelog-Entry: Don't break up size numbers in the drive selector.
2017-05-26 07:36:32 -04:00
Andrew Scheller
2e50ad802f chore(docker): Change APT mirror used by the Ubuntu12.04 32bit docker image (#1471)
Previously it was using http://ubuntu.stu.edu.tw but this host is no longer
active, which was causing all the 32bit Linux TravisCI builds to fail.
2017-05-25 19:06:18 +02:00
Juan Cruz Viotti
1e169315fd refactor(GUI): turn the update notifier modal into a native dialog (#1359)
Electron v1.6.1 introduced checkbox support to the native message
dialog, giving us everything that was needed to implement the update
notifier modal using a native dialog.

This change allows us to get rid of a lot code.

See: https://github.com/electron/electron/pull/8590
Change-Type: patch
Changelog-Entry: Turn the update notifier modal into a native dialog.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-23 19:06:35 -04:00
Benedict Aas
3df6cd07d0 feat(GUI): add metadata and icon to notifications (#1455)
We add the image filename, its destination drive, and application icon
to the notifications.

See: https://github.com/resin-io/etcher/issues/1443
Changelog-Entry: Add image name, drive name, and icon to notifications.
2017-05-22 15:06:32 -04:00
Juan Cruz Viotti
8e681b5534 fix(CLI): get rid of Browserify absolute path workaround (#1449)
We encountered a Browserify bug when releasing the CLI, where absolute
paths would be hard-coded in the final bundle. Since we were in the
middle of a release process, we added a quick and dirty
search-and-replace workaround on `concatenate-javascript.sh`.

After the release, we submitted a PR to Browserify which fixes the
issue. This commit makes use of my personal fork to be able to use such
fix while it gets merged to the main project.

See: https://github.com/substack/node-browserify/pull/1725
See: https://github.com/resin-io/etcher/pull/1409
Fixes: https://github.com/resin-io/etcher/issues/1429
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-22 11:33:09 -04:00
Juan Cruz Viotti
a12abc2a6c chore: unify CI scripts (#1434)
Currently we have almost equal CI scripts implemented in bash (for
Travis), and batch (for Appveyor). This commit takes advantage of MinGW
bash to unify all the scripts as bash scripts.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-22 09:20:28 -04:00
Juan Cruz Viotti
705e273400 fix(GUI): catch EACCES when querying S3 packages (#1463)
When the user is behind a firewall, then the HTTP request to query the
latest available version from S3 may throw an EACCES error, eventually
causing a confusin "You don't have access to this resource" error
window.

Change-Type: patch
Changelog-Entry: Fix "You don't have access to this resource" error at startup when behind a firewall.
Fixes: https://github.com/resin-io/etcher/issues/1458
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-20 14:47:50 -04:00
Juan Cruz Viotti
78f36dfd16 chore: track python dependencies with pip (#1447)
We're currently hardcoding various pip dependencies in
`appveyor-install.bat` and `travis-install.sh`.

This commit moves all the dependencies to a `requirements.txt` file in
the root of the project, and makes every install script run `pip install
-r requirements.txt`.

See: https://github.com/resin-io/etcher/pull/1401#discussion_r116547053
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-18 16:35:06 -04:00
Juan Cruz Viotti
30ed217c79 chore: create installers (but don't publish) on every pull request (#1365)
This allows us to catch changes that break our installer builds before
merging the problematic changes.

As a way to simplify the CI configuration files, this commit introduces
an `installers-all` Makefile target that builds all installers.

This commit also replaces all the `cp -rf` calls with `cp -RLf` in
Makefile to avoid some weird hard link Appveyor issues.

See: https://github.com/resin-io/etcher/pull/1078
See: https://github.com/resin-io/etcher/pull/1354
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-17 23:00:59 -04:00
Juan Cruz Viotti
a74e6b53cd chore: fix lzma-native not building for the x86 Linux CLI (#1448)
There are various problems that contributed to this issue:

- `node-pre-gyp` doesn't detect the 6.10.3 node version. We reverted to
  6.1.0, which the module recognised, and which shares the same v8 ABI

- Passing `--force` to `npm install` causes npm to swallow any errors
  and silently continue

- The x86 Docker container has problems writing to `$HOME/.node-gyp`.
  The solution is to enable `unsafe-perm` given that the container is
  running as `root`

Fixes: https://github.com/resin-io/etcher/issues/1444
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-17 17:10:00 -04:00
Andrew Scheller
57e29a5725 chore: Check for the commands used by electron-installer-debian (#1446) 2017-05-17 13:59:18 +01:00
Juan Cruz Viotti
369cfa7e88 refactor: address review comments from #1401 (#1433)
See: https://github.com/resin-io/etcher/pull/1401#pullrequestreview-37459059
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-15 13:17:51 -04:00
Juan Cruz Viotti
1048150654 chore: check that there are no unstaged shrinkwrap changes (#1379)
See: https://github.com/resin-io/etcher/pull/1372
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-15 12:58:20 -04:00
Benedict Aas
697c86362c feat(GUI): add success page resin referrer (#1430) 2017-05-15 11:24:48 -04:00
Jonas Hermsmeier
d8b48e6373 doc(CLI-INSTALLATION): Make headings h3 (#1419) 2017-05-12 15:03:54 +02:00
Andrew Scheller
b04d7ad8f2 docs(CLI): move the CLI installation instructions to a separate page (#1418) 2017-05-12 13:30:09 +01:00
Juan Cruz Viotti
05692b9947 docs(CLI): add installation instructions (#1417)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-12 11:20:46 +01:00
Juan Cruz Viotti
3203eb5eda
v1.0.0
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-12 01:09:35 -04:00
Benedict Aas
2c26b4c6ac feat(GUI): dynamic finish page (#1368)
* feat(GUI): dynamic finish page

We implement an externally loaded dynamic finish page in React with
`react2angular`. If the Internet connection is unreliable or unavailable, or a
non-200 HTTP response is returned we display a fallback default finish banner.

Change-Type: minor
Changelog-Entry: Implement a dynamic finish page.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-12 01:07:24 -04:00
Juan Cruz Viotti
5c33abca21 fix: add a delay before the final unmount on success (#1416)
If the user has the "Unmount on success" setting enabled, then Etcher
will unmount the drive after ther flashing process completed, right
after closing the drive file descriptor.

Turns out macOS will attempt to re-mount a drive once its file
descriptor gets closed, which means that if we try to unmount too fast,
then the drive will get re-mounted again.

As a naive solution, we add a timeout before finally unmounting the
drive. Keep in the mind this is only a temporary solution until we fix
mountutils to do the right thing.

See: https://github.com/resin-io/etcher/pull/1414
Fixes: https://github.com/resin-io/etcher/issues/1385
Change-Type: patch
Changelog-Entry: Prevent drive from getting re-mounted in macOS even when the unmount on success setting is enabled.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-12 00:40:08 -04:00
Juan Cruz Viotti
b7f871607e fix(GUI): ignore ECONNRESET and ECONNREFUSED when querying S3 (#1415)
Querying S3 to determine the latest available versions might throw
`ECONNRESET` and `ECONNREFUSED`. This commit extends the
`s3Packages.getRemoteVersions()` function to handle these errors and
return no available version if so, like we already do with other similar
HTTP errors.

Change-Type: patch
Changelog-Entry: Fix `ECONNRESET` and `ECONNREFUSED` errors when checking for updates on unstable connections.
Fixes: https://github.com/resin-io/etcher/issues/1396
Fixes: https://github.com/resin-io/etcher/issues/1388
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-11 21:20:03 -04:00
Juan Cruz Viotti
babe12cd7b fix(GUI): handle spaces in installation path when elevating on Windows (#1411)
Etcher will get stuck at "Starting..." when executing the application on
a directory that contains spaces, like "C:\Program Files (x86)".

The problem is that the command is not quoted correctly when passed to
`cmd.exe /c`. This commit addresses the following specific problems:

- Quote the whole argument to `cmd.exe /c`
- Quote each individual argument after `call`

Change-Type: patch
Changelog-Entry: Fix application stuck at "Starting..." on Windows.
See: https://github.com/resin-io/etcher/pull/1376
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-11 18:05:40 -04:00
Jonas Hermsmeier
bb4d352da0 doc(github): Add question about flashed image to issue template (#1413) 2017-05-11 16:10:32 -04:00
Juan Cruz Viotti
9c055fb165 fix(CLI): workaround absolute paths in Browserify bundles (#1409)
For some strange reason, Browserify will hardcode absolute paths from
the machine that generated the bundle to be able to resolve `__dirname`
and `__filename` calls. This makes no sense, given that it means that
the Browserify bundle will not work when we move it to another machine,
which went undetected probably for months.

The Browserify community apparently makes modules to fix this particular
issue (like `bundle-collapser`, and `intreq`), however none of this seem
to solve the problem for the Etcher CLI bundle.

I also gave https://github.com/zeit/pkg a go, however I gave up after
not being able to make use of native modules (nothing seems to work; the
packager result will simply not find the addons).

Finally, I ended up making the following workarounds:

- Edit the Browserify bundle file to use its own `__dirname` to
  dynamically resolve the values of `__dirname` and `__filename` of the
  files it contains

- Patch `lzma-native` to statically require its add-on rather than
  relying on dynamic requires from `node-pre-gyp`, which makes it
  impossible to resolve on the final bundle

See: https://github.com/resin-io/etcher/issues/355
See: http://stackoverflow.com/questions/21993073/browserify-with-paths-to-folders-in-my-system
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-11 15:37:45 -04:00
Juan Cruz Viotti
b02da2d0cd chore(CLI): fix cli-develop Make target headers version (#1407)
The `cli-develop` target was pointing `node-gyp` to the Electron
headers, which caused native add-ons to not work.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-11 06:51:49 -04:00
Benedict Aas
69a982bf8d refactor(GUI): remove analytics angular dependency (#1387)
We rename `AnalyticsService` to `analytics` and remove its dependency on
Angular.
2017-05-10 20:27:54 -04:00
Juan Cruz Viotti
66547c5abd chore: replace wget with curl on node-static-entry-point-download.sh (#1406)
See: https://github.com/resin-io/etcher/pull/1365
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 19:28:12 -04:00
Juan Cruz Viotti
159cc24e78 upgrade: resin-cli-visuals to v1.3.1 (#1404)
This version upgrades `drivelist` to v5.0.20, which inlines the scripts
as a JSON file.

See: https://github.com/resin-io-modules/resin-cli-visuals/pull/41
See: https://github.com/resin-io-modules/resin-cli-visuals/blob/master/CHANGELOG.md
See: https://github.com/resin-io/etcher/issues/355
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 18:02:15 -04:00
Juan Cruz Viotti
777ad14762 chore: upgrade npm-shrinkwrap.json file (#1405)
Ensure that the `npm-shrinkwrap.json` is up to date.

These changes were backported from
https://github.com/resin-io/etcher/pull/1379, since it will take a while
for that PR to get merged.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 17:21:48 -04:00
Juan Cruz Viotti
78705165f0 upgrade: drivelist to v5.0.20 (#1402)
This version includes the following fix:

- https://github.com/resin-io-modules/drivelist/pull/164

The above change is also a huge step forward to finalizing the Etcher
CLI packaging story.

See: https://github.com/resin-io/etcher/issues/355
See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Fixes: https://github.com/resin-io/etcher/issues/1395
Change-Type: patch
Changelog-Entry: Fix error on startup when Windows username contained an ampersand.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 15:19:35 -04:00
Juan Cruz Viotti
d521fbbd2c chore(CLI): minify Etcher CLI code (#1401)
UglifyJS v3 was recently released, which includes support for
compressing ES6 code.

This commit introduces the following changes:

- Add a boolean `-m` option to `concatenate-javascript.sh`, which when
  set, will minify the final concatenated JavaScript file

- Install `uglify-es` in the CI servers

See: https://news.ycombinator.com/item?id=14285179
See: https://github.com/mishoo/UglifyJS2/tree/harmony
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 15:15:41 -04:00
Benedict Aas
b6aa5ada30 refactor(GUI): central error/warning messages function (#1193)
* Centralise drive error/warning messages with a function
  `.getDriveImageCompatibilityStatuses` in `lib/shared/drive-constraints.js`
  -- tests included
* Fix an error where several labels show at once
* Clarify the source drive label to 'Drive Contains Image'
* Remove label icons and make text bold to match Zeplin's design

Closes: https://github.com/resin-io/etcher/issues/1143
Closes: https://github.com/resin-io/etcher/issues/1144
2017-05-10 13:52:20 -04:00
Daniel Aleksandersen
d76a6dff89 doc(GUI): suggest BootCamp as an alternative when flashing Windows images (#1393)
* Specify that Rufus is only an option for Windows.
* Suggest Apple Boot Camp Assistant (built-in) as an alternative for macOS users.
2017-05-10 11:50:36 -04:00
Juan Cruz Viotti
ecb8dd29b7 upgrade: etcher-image-write to v9.1.3 (#1400)
This version gets rid of the `diskpart` optional dependency:

- https://github.com/resin-io-modules/etcher-image-write/pull/101

which will simplify the way we manage our `npm-shrinkwrap.json` file.

See: https://github.com/resin-io/etcher/pull/1379
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 11:47:44 -04:00
Andrew Scheller
bfd2f2bf57 style(settings): Clarify meaning of the "Report Errors" button (#1392)
To make it clear that this actually controls the reporting of errors back to resin.io, and not the reporting of errors to the user.

See #1383
2017-05-10 16:13:07 +01:00
Juan Cruz Viotti
7ddc5d525c refactor: address code review comments from #1366 (#1390)
See: https://github.com/resin-io/etcher/pull/1366
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-09 19:33:45 -04:00
Benedict Aas
efa7f986a4 fix(GUI): bound flash progress percentage within 0-100 (#1258)
We limit the Store state flashing percentage to be within 0-100,
throwing errors otherwise. Comes with tests.

Changelog-Type: Bound flash progress percentage within 0-100 range.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-09 19:24:44 -04:00
Jonas Hermsmeier
df74a2763c feat(image-stream): Make invalid images user errors (#1369)
This displays a user error if the reading the image causes an error,
instead of letting it fall through and get reported.
This is to avoid reporting errors that are not due to malfunction of the software,
but due to malformatted images.

Change-Type: minor
Changelog-Entry: Display nicer error dialog when reading an invalid image
2017-05-08 18:29:28 +02:00
Juan Cruz Viotti
60754250d9 chore: add ensure-npm-valid-dependencies.sh to sanity-checks make target (#1378)
We forgot to do so on the PR that introduces this script.

This commit also moves all the CI code to separate scripts.

See: https://github.com/resin-io/etcher/pull/1371
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-07 17:35:22 -04:00
Jonas Hermsmeier
9055b4b773 doc(contributing): Add section about binary diffs (#1380)
This adds instructions on how to set up human-readable binary diffs
with git for Etcher, which is useful when altering test images etc.
2017-05-07 14:59:11 -04:00
Juan Cruz Viotti
91784d6380 chore(codespell): add rpi-sdcard to the list of ignored extensions (#1377)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-07 14:58:40 -04:00
Juan Cruz Viotti
63fdb18286
v1.0.0-rc.5 2017-05-02 18:40:32 -04:00
Juan Cruz Viotti
b75dfd3ece feat(GUI): implement Windows elevation using a native module (#1366)
Sentry error reports showcase that elevation errors on Windows are one
of the most frequent Windows errors.

In order to perform Windows elevation, we ship compiled EXEs of a third
party CLI elevation application (http://code.kliu.org/misc/elevate/)
that has several limitations:

- We have the scan the output of the script to determine if a user
  cancelled the elevation request, which causes all sorts of issues on
  computers where English is not the main language

- The application displays a `cmd.exe` window for some milliseconds,
  which is bad UX, that we have to workaround by distributing a patched
  version of the tool

- The CLI application has to be spawned, which seems to be problematic
  if users have anti-virus software, leading to hard to debug issues

- We don't have any control if something goes wrong

For these reasons, we decided to implement our own elevation mechanism
in C++ as a Node.js add-on, based on the `elevate.exe` code we where
previously using.

Misc changes:

- Introduce a `lib/shared/bindings.js` module to easily require local native
  add-ons

- Install `cpplint` and configure it to lint C++ files

Note that for practical reasons, the C++ code lives in this repository
rather than in a separate module. We will release this functionality in
a more accessible way in the future as part of the Etcher SDK project.

Change-Type: patch
Changelog-Entry: Fix uncaught errors when cancelling elevation requests on Windows when the system's language is not English.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-02 18:36:57 -04:00
Juan Cruz Viotti
9881364e1d chore: make isstream a top level production development (#1373)
Our `npm-shrinkwrap.json` file contains two entries for the `isstream`
dependency. One of them is in the top level of the file, and marks
`isstream` as a development dependency.

The `request` module makes use of `isstream`, so there is another
instance of `isstream` nested inside `request` which is marked as a
production dependency.

Most NPM versions will realise that there are two instances of
`isstream`, and since one of them is a production development, it will
include it in the final package.

However, there are some NPM version, like 4.6.1, which will only
consider the top level entry, and completely omit `isstream` on the
final package, causing a "Cannot find module 'isstream'" error.

The solution was to manually update the shrinkwrap file to remove the
nested instance, and make the top level instance a production
development.

I don't think there is a way we can protect ourselves from these edge
cases. NPM should have recognised that the dependencies were compatible,
and not create a nested instance on the first place.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-01 19:39:21 -04:00
Juan Cruz Viotti
4f5179f5c9 chore: ensure there are no extraneous or invalid npm dependencies (#1371)
The `npm ls` command will exit with an error code if there are invalid
or extraneous dependencies.

This commits adds that command to `make sanity-checks`, so we can catch
those cases early one.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-01 19:39:03 -04:00
Juan Cruz Viotti
79d5f0e90c chore: remove etcher-latest-version from package.json (#1372)
This version is no longer used, and was removed from the shrinkwrap
file, but for some reason, we forgot to remove it from package.json.

See: https://github.com/resin-io/etcher/pull/1183
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-01 19:38:52 -04:00
Juan Cruz Viotti
09d2a9d897 chore: build on Ubuntu 12.04 Docker base images (#1364)
We recently discovered that users not running latest GNU/Linux
distributions were having problems when Etcher tried to load native
modules. We used to build packages on Ubuntu 16.04, which ships with
GLIBC 2.23.

In order to solve that issue, we moved our build Docker containers to
Debian Jessie, which ships with GLIBC 2.19, however we noticed that
users running even older Linux distributions were still having the same
issue, so this commit switched the Docker containers to Ubuntu 12.04,
which ships with GLIBC 2.15.

See: https://github.com/resin-io/etcher/pull/1319
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-28 12:43:38 -04:00
Jonas Hermsmeier
0c79c492e2 chore(gitattributes): Add "hex" diff tag to binary files (#1367)
This adds a `diff` tag to binary files in `.gitattributes`,
enabling git to use an external tool to generate diffable output for binary files
by adding a handler to the local or global git config, i.e:

```
[diff "hex"]
  textconv = hexdump
  binary = true
```

Change-Type: patch
2017-04-28 11:46:41 -04:00
Jonas Hermsmeier
becca2d05e fix(image-stream): Remove inability to fallback to octet-stream (#1363)
Using `mime-types` in that place made it impossible to use other
other file extensions like `.sdcard` and have them treated as `application/octet-stream`
when drag and dropping images into Etcher.

This moves the fallback logic in `lib/image-stream` to `.getFromFilePath()`,
to still facilitate proper MIME type detection, while allowing it to fall back
to the octet-stream handler, if there's no available handler for a specific type.

Change-Type: patch
Changelog-Entry: Fix not treating unknown images as octet-stream
2017-04-27 18:00:53 +02:00
Juan Cruz Viotti
1cf4cdcee9 refactor(errors): add isUserError utility function (#1320)
This utility function is useful to avoid duplicating the logic of
checking whether an error is a user error across the code base.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 23:54:16 -04:00
Juan Cruz Viotti
c9e410fcb1 refactor: address file-extensions review comments (#1347)
See: https://github.com/resin-io/etcher/pull/1343#pullrequestreview-34288142
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 23:53:03 -04:00
Juan Cruz Viotti
59edd881e2 refactor: move OSNotificationService out of the angular world (#1352)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 23:52:46 -04:00
Juan Cruz Viotti
d3b35742a6 refactor(GUI): integrate etcher-latest-version into the main repo (#1183)
`etcher-latest-version` was kept in a separate repository in order to
re-use it with the Etcher website, however the Etcher website is not
using it at all, and we're moving towards having the website in the main
repository.

Therefore, this commit brings back the logic from
`etcher-latest-version`, but introduces it as
`lib/shared/s3-packages.js`, in order to not tie ourselves to the
AngularJS framework, and as a step towards the Etcher SDK.

As a nice little bonus, this commit adds support for an
`ETCHER_FAKE_S3_LATEST_VERSION` environment variable that can be used to
trick Etcher that there is an available update, and therefore show the
update notifier modal.

Also, this commit adds support for snapshot builds update-checks, by
checking the `resin-nightly-downloads` S3 bucket if the current version
contains a git commit hash build number.

If the version is not a production release, then the update notifier
modal doesn't present the checkbox to disable update notifications for X
days.

We also add a property called `updates.semverRange` to `package.json`,
which can be used to fine control which versions are considered as
candidates for an update notification.

This commit adds a setting called `includeUnstableChannel`, which can be
used to tweak whether unstable (beta) releases are considered or not
when checking for the latest available version.

See: https://github.com/resin-io-modules/etcher-latest-version
Fixes: https://github.com/resin-io/etcher/issues/953
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 23:52:04 -04:00
Juan Cruz Viotti
9acebda035 chore: make use of browserify as a development dependency (#1354)
This is causing all the snapshot builds to fail when a PR is merged to
master.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 11:06:23 -04:00
Juan Cruz Viotti
23a5e53d50 refactor: address review comments from #1351 (#1355)
See: https://github.com/resin-io/etcher/pull/1351
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-26 11:05:36 -04:00
Andrew Scheller
30c531417a refactor(utils): make PERCENTAGE_ constants public, and re-use them in flash.js (#1353) 2017-04-26 11:05:14 -04:00
Juan Cruz Viotti
bc01e151c4 upgrade: electron to v1.6.6 (#1357)
Some changes that we're particularly interested in:

- https://github.com/electron/electron/pull/8590
- https://github.com/electron/electron/pull/8852
- https://github.com/electron/electron/pull/7631

Note that the `electron-prebuilt` packaged has been renamed to
`electron`.

Change-Type: patch
Changelog-Entry: Upgrade Electron to v1.6.6.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-25 15:52:19 -04:00
Juan Cruz Viotti
62ca0e5b09 refactor: extract elevation routines to lib/shared/permissions.js (#1351)
The elevation mechanism currently embedded in
`lib/child-writer/writer-proxy.js` is extracted as a separate re-usable
function in `lib/shared/permissions.js`.

This change hugely simplifies the writer proxy, while allowing us to
iterate faster on the elevation core functionality.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-25 11:28:50 -04:00
Juan Cruz Viotti
0696833ad6 docs: clarify how to deal with problematic releases (#1297)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-24 09:51:11 -04:00
Juan Cruz Viotti
0668f424e1
v1.0.0-rc.4 2017-04-22 20:42:40 -04:00
Ștefan Daniel Mihăilă
1fe87d8883 feat(GUI): collect archive and image extension in analytics (#1343)
Change-Type: patch
2017-04-22 20:40:42 -04:00
Ștefan Daniel Mihăilă
9e7e5de63a feat(GUI): add uuid to flash events (#1344)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-22 20:40:05 -04:00
Juan Cruz Viotti
78ab59a55e upgrade: mountutils to v1.0.6 (#1345)
- https://github.com/resin-io-modules/mountutils/pull/26

Change-Type: patch
Changelog-Entry: Fix "Unmount failed" on Windows where the PC is connected to network drives.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-22 12:07:31 -04:00
Jonas Hermsmeier
4023fe5b59 chore(package): Update udif to 0.9.0 (#1346)
This updates `udif` from 0.8.0 -> 0.9.0, fixing a stall when flashing
certain dmg images due to `UDIF.ReadStream()` overrunning block regions.

See https://github.com/jhermsmeier/node-udif/issues/5

Change-Type: patch
Changelog-Entry: Fix stall / freezing when flashing certain dmg images.
Connects To: #1342
2017-04-22 12:07:22 -04:00
Juan Cruz Viotti
dafa1f3ede refactor(child-writer): add robot commands constant (#1332)
See: https://github.com/resin-io/etcher/pull/1295#discussion_r112463686
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-21 17:41:20 -04:00
Juan Cruz Viotti
cf99a5d598 upgrade: etcher-image-write to v9.1.2 (#1339)
- https://github.com/resin-io-modules/etcher-image-write/pull/99
- https://github.com/resin-io-modules/etcher-image-write/pull/98

See: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Show user friendly messages for `EBUSY, read` and `EBUSY, write` errors on macOS.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-21 17:41:13 -04:00
Jonas Hermsmeier
b06d39726f chore(scripts): Remove prune from shrinkwrap cleanup (#1338)
Newer npm versions (4.4+ I believe) even remove dependencies
not shrinkwrapped yet while pruning causing newly installed dependencies
to not always be shrinkwrapped / updated in the shrinkwrap.
Removing the prune allows for this to work properly again and in the future,
with the drawback that care must be taken to not have extraneous dependencies
in the module tree.

Change-Type: patch
2017-04-21 18:33:27 +02:00
Juan Cruz Viotti
0f8ad15e45 chore(CLI): create basic CLI package installers (#1240)
This commit packages the Etcher CLI as a ZIP archive for Windows, and as
a tarball for GNU/Linux and macOS. These basic "installers" are the
foundation to provide Chocolatey/Brew/AUR/etc packages.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-21 12:17:36 -04:00
Juan Cruz Viotti
8057041bc7 chore: lock optional dependencies versions (#1337)
Optional dependencies (and their dependencies) are not tracked by the
shrinkwrap file. In order to prevent incompatibilities, we lock the
versions of all optional dependencies.

See: https://github.com/resin-io/etcher/pull/1304
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-21 12:03:39 -04:00
Andrew Scheller
ebf9439327 chore: add another typo to codespell dictionary (#1335)
From #1193
2017-04-21 08:55:52 -04:00
Juan Cruz Viotti
c0a91c0aba feat(GUI): add a validateWriteOnSuccess property to the flash event (#1333)
This event property will allow us to inspect how many people are running
Etcher without the validation mechanism.

See: https://github.com/resin-io/etcher/issues/1293
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-21 08:54:44 -04:00
Juan Cruz Viotti
0aefa56e1d chore: make asar a development dependency (#1330)
To prevent any potential version incompatibility caused by simply installing
the latest version of the packages in the CI services.

See: https://github.com/resin-io/etcher/pull/1326
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 13:48:31 -04:00
Juan Cruz Viotti
14a28fedcc upgrade: elevator to v2.2.3 (#1331)
This version contains a fix where an elevation error was not yielded
correctly.

See: https://github.com/resin-io-modules/elevator/pull/12
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 13:44:12 -04:00
Juan Cruz Viotti
fe91be11e8 refactor(errors): createError and createUserError accept an object (#1322)
Currently, both of these functions accept two arguments: the error
title, and the error description. This function signature makes is hard
to keep adding options to these error creation functions, like an error
code, so this commit refactors them to take a single argument: an
options object containing `title` and `description` properties.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 12:23:32 -04:00
Juan Cruz Viotti
b93fd86092 chore: perform GNU/Linux builds on Debian Jessie docker containers (#1319)
We recently hit an issue where Etcher builds produced on Ubuntu relied
on a too new glibc version, making them incompatible with GNU/Linux
distributions such as Debian Jessie.

As a solution, we will start producing builds on Debian Jessie, which
ensures that the builds will be compatible with the majority of
GNU/Linux versions out there.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 12:23:13 -04:00
Juan Cruz Viotti
880ca257a6 chore: make electron-installer-debian an optional dependency (#1326)
We currently require this module to be available in the environment in
order to be able to build debian packages.

This commit adds it as an optional dependency, so we can have control
over the version that we use, to prevent any potential incompatibility.

We also update the `udif` package.json version to match what its on the
shrinkwrap file to avoid npm complaining about version mismatches.

See: https://github.com/resin-io/etcher/pull/1290
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 12:06:53 -04:00
Juan Cruz Viotti
96f586900c fix(GUI): catch EIO errors and display a user friendly message (#1318)
If we get EIO at this point, then it means that the writer did
everything it could to recover (like multiple retries), and the error
is truly an input/output error coming from the operating system.

In this commit, we show a nice user friendly message explaining what
happened, and advising users to try again with another drive, reader, or
port instead of showing an uncaught EIO error.

Change-Type: patch
Changelog-Entry: Show a friendly user message on EIO after many retries.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 12:01:43 -04:00
Juan Cruz Viotti
c3a41b172e chore: pass bintray environment variables to Docker containers (#1307)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 11:06:17 -04:00
Juan Cruz Viotti
586a6950b2 fix(GUI): send an "elevation cancelled" analytics event (#1310)
If the user cancels the elevation dialog, then no event is emitted,
making it hard to track down what happened after the flash button was
pressed.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 11:04:45 -04:00
Juan Cruz Viotti
2ec2ceea14 upgrade: drivelist to v5.0.19 (#1327)
- https://github.com/resin-io-modules/drivelist/pull/161
- https://github.com/resin-io-modules/drivelist/pull/156
- https://github.com/resin-io-modules/drivelist/pull/153

Change-Type: patch
Changelog-Entry: Various fixes for when drive descriptions contain special characters.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-20 10:49:40 -04:00
Ștefan Daniel Mihăilă
24fe1a6c89 upgrade: resin-corvus to 1.0.0-beta.26 (#1321)
This version solves the issue regarding some messages
getting console logged (and reaching Sentry) as "[object Object]".

Change-Type: patch
Changelog-Entry: Upgrade `resin-corvus` to 1.0.0-beta.26.
2017-04-19 11:07:50 -04:00
Juan Cruz Viotti
31aa73ce07
v1.0.0-rc.3 2017-04-15 00:18:35 -04:00
Jonas Hermsmeier
6c930e2d8d fix(image-stream): fix Apple disk image detection & reading (#1283)
This fixes two things: The format detection, and a bug in `udif`.

First, by categorizing the `.dmg` extension as compressed image,
`.isSupportedImage()` would attempt to detect the format after stripping
the extension, causing it to be misdetected.

Second, `udif`'s ReadStream didn't add the `dataForkOffset` to its
position when reading blocks, causing the wrong data to be read for some images,
in turn causing zlib to error on invalid headers.

Changes:
- Classify `.dmg` as `type: 'image'`
- Update `udif` to 0.8.0

Change-Type: patch
Changelog-Entry: Fix Apple disk image detection & streaming
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-15 00:17:41 -04:00
Juan Cruz Viotti
847b41f49a upgrade: etcher-image-write to v9.1.1 (#1306)
This version includes a fix to throw an `EUNPLUGGED` error instead of an
`UNKNOWN` one when unplugging an SD Card from an internal reader on
Windows.

Change-Type: patch
Changelog-Entry: Fix "UNKNOWN: unknown error" error when unplugging an SD Card from an internal reader on Windows.
See: https://github.com/resin-io-modules/etcher-image-write/pull/97
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 23:45:21 -04:00
Juan Cruz Viotti
e4a47611c0 upgrade: elevator to v2.2.2 (#1304)
This version prints debug messages to `stdout`.

See: https://github.com/resin-io-modules/elevator/pull/11
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 22:18:54 -04:00
Juan Cruz Viotti
0b500d2585 fix(GUI): correctly log debugging messages on Windows (#1303)
Windows will not react to dynamically set environment variables (e.g:
`process.env.MOUNTUTILS_DEBUG = '1'`), so in order to workaround this
limitation, we set `MOUNTUTILS_DEBUG` in
`lib/child-writer/writer-proxy.js` when spawning the CLI, and we also
set `DEBUG='*'` in `lib/start.js`, so it gets picked up by the child
writer module, which spawns the writer proxy by inheriting the
environment.
2017-04-14 16:41:00 -04:00
Juan Cruz Viotti
ebd2d85de7 upgrade: mountutils to v1.0.5 (#1302)
This version accepts a `MOUNTUTILS_DEBUG` environment variable to make
the module output extra logging information, which we enable in this
commit as well.

See: https://github.com/resin-io-modules/mountutils/pull/25
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 14:59:27 -04:00
Juan Cruz Viotti
c5a9a1fca4 fix(GUI): show a friendly message when the drive is unplugged half-way through (#1301)
This commit shows a user friendly message when Etcher loses access to
the drive while flashing/validating, and prevents the cryptic errors
from getting to Sentry.

See: https://github.com/resin-io-modules/etcher-image-write/pull/96
Change-Type: minor
Changelog-Entry: Show a user friendly message when the drive is unplugged half-way through.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 14:24:06 -04:00
Juan Cruz Viotti
e66d805672 feat(child-writer): log non-robot messages for debugging purposes (#1295)
Currently, if the child writer receives a message from the writer
process that is not a valid robot object, then it will throw an error.

Now, we check if the message is a robot message, and if so, we try to
parse it (throwing errors if its indeed a malformed/incomplete robot
message), however we log it if not.

The main motivation behind this feature is that it will allows us to
print debugging information on the mountutils module, and have it
redirected to DevTools.

Change-Type: minor
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 14:07:00 -04:00
Juan Cruz Viotti
468312b6cc upgrade: elevator to v2.2.1 (#1300)
This version improves the error message if the elevate.exe utility
failed.

See: https://github.com/resin-io-modules/elevator/pull/10
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 13:17:18 -04:00
Ștefan Daniel Mihăilă
8edc41dee0 upgrade: resin-corvus to 1.0.0-beta.25 (#1299)
This version handles better non-error objects sent to Sentry.

Change-Type: patch
Changelog-Entry: Improve error reporting accuracy.
2017-04-14 12:38:20 -04:00
Juan Cruz Viotti
5535111314 upgrade: elevator to v2.2.0 (#1298)
This version contains a patch to output debugging information.

See: https://github.com/resin-io-modules/elevator/pull/9
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-14 12:27:19 -04:00
Juan Cruz Viotti
0890b1e369 refactor(GUI): move SupportedFormatsModel to lib/shared (#1251)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:38:30 -04:00
Juan Cruz Viotti
64c8eb594b refactor(GUI): make OSWindowProgress a simple CommonJS module (#1253)
There is no need to tie this module to Angular by using an Angular
service.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:38:22 -04:00
Juan Cruz Viotti
55021376b5 tests(image-stream): ensure imageStream.getFromFilePath() returns a path (#1280)
This would have prevented https://github.com/resin-io/etcher/pull/1278
from happening.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:38:13 -04:00
Juan Cruz Viotti
3f7ec8a148 tests(image-stream): remove unnecessary big timeout (#1285)
See: https://github.com/resin-io/etcher/pull/1279#discussion_r110880004
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:38:05 -04:00
Juan Cruz Viotti
5f9b46b98b upgrade: etcher-image-write to v9.0.2 (#1286)
This release fixes an uncaught error when there is a validation error.

See: https://github.com/resin-io-modules/etcher-image-write/pull/94
Change-Type: patch
Changelog-Entry: Fix "function createError(opts) {}" error on validation failure.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:37:56 -04:00
Juan Cruz Viotti
a1d8f28fc2 upgrade: mountutils to v1.0.4 (#1294)
This version contains a fix for when unmounting a physical drive with no
logical volumes attached.

See: http://github.com/resin-io-modules/mountutils/pull/24
Change-Type: patch
Changelog-Entry: Fix "Unmount failed, invalid drive" error on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-13 14:37:43 -04:00
Ștefan Daniel Mihăilă
5ace384607 upgrade: resin-corvus to 1.0.0.beta-24 (#1296)
This version fixes the release not being sent to Mixpanel.

Change-Type: patch
2017-04-13 14:30:04 -04:00
David Lechner
588c94a64f chore: fix debian package run script (#1290)
The rc2 debian package is not working because the path where the package files
is installed has changed. The change in paths comes from an upstream change
in the electron-installer-debian node package. So, updating the path here to
match the actuall install location.
2017-04-13 13:38:54 -04:00
Jonas Hermsmeier
7fc10b71e3 chore(package): fix codespell binary file warnings (#1289)
This avoids codespell printing warnings for binary files
which have been added recently (`.iso`, `.dmg`), as well as dotfiles (i.e. `.DS_Store`).

Change-Type: patch
2017-04-13 08:45:02 -04:00
Andrew Scheller
57045ef1f6 chore: small tweak to the jq-insert.sh syntax (#1287) 2017-04-12 18:33:03 -04:00
Juan Cruz Viotti
36822b1f91
v1.0.0-rc.2 2017-04-11 01:00:08 -04:00
Juan Cruz Viotti
68f87435de fix(CLI): throw error if image is inaccessible (#1281)
Consider the following scenario:

- The user selects an image from an external drive
- The user selects a drive
- The user unmounts/ejects the external drive
- The user clicks flash

The application state will contain an image path that is no longer
accessible, causing an ENOENT error when spawning the CLI process.

Change-Type: patch
Changelog-Entry: Display a user error if the image is no longer accessible when the writer starts.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-11 00:59:08 -04:00
Juan Cruz Viotti
6deec4bbb5
Revert "chore(ci): limit git clone depth (#1269)"
This reverts commit 02da44691459195ebed32d08dd30cb0586f417c2.
2017-04-11 00:56:52 -04:00
Juan Cruz Viotti
cf271100f5 fix(image-stream): throw user error if image is a directory (#1279)
If the user tries to drag and drop a directory to the application, then
he'll get a scary `EISDIR` error message. This commit catches this
error, and display a nice user friendly message instead.

Change-Type: patch
Changelog-Entry: Prevent uncaught `EISDIR` when dropping a directory to the application.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-11 00:34:21 -04:00
Juan Cruz Viotti
2af129d0b7 chore: add analytics token environment variables to Docker container (#1274)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 23:49:53 -04:00
Juan Cruz Viotti
85e1bdb650 chore: fix jq crashing on Windows when using relative paths (#1276)
`jq` crashes when setting a value on a relative file. We workaround the
issue by using `jq` in a pipe instead of passing the file to it as an
argument.

See: https://github.com/stedolan/jq/issues/1155
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 23:49:46 -04:00
Juan Cruz Viotti
c418bc6512 chore: remove duplicated curl dependency in Dockerfiles (#1275)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 23:49:37 -04:00
Juan Cruz Viotti
44094680fb fix(image-stream): return a path from the handler (#1278)
The `application/x-apple-diskimage` handler doesn't return a path,
causing an issue when fetching the image metadata, and trying using the
path to determine if its a supported image type.

Change-Type: patch
Changelog-Entry: Fix "Path must be a string. Received undefined" when selecting Apple images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 23:49:22 -04:00
Juan Cruz Viotti
fc46958ac0 fix(image-stream): interpret iso9660 as application/octet-stream (#1277)
This is a regression caused by
https://github.com/resin-io/etcher/pull/1257, which introduced a new way
to detect mime types by using the `mime-types` module.

This module, contrary to `file-type`, will detect certain ISO files as
`application/x-iso9660-image`, which Etcher doesn't know how to handle,
and will therefore should at the user that the format is unsupported.

Change-Type: patch
Changelog-Entry: Don't interpret certain ISO images as unsupported.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 23:49:11 -04:00
Juan Cruz Viotti
53bc5a51e9
v1.0.0-rc.1 2017-04-10 17:01:15 -04:00
Juan Cruz Viotti
f87a690df1 fix(GUI): correctly reference the eta property in lib/gui/app.js (#1273)
See: https://github.com/resin-io/etcher/pull/1264/files#r110662965
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 16:57:20 -04:00
Ștefan Daniel Mihăilă
91a1c3d107 feat(GUI): use resin-corvus in AnalyticsService (#1208)
Change-Type: patch
Changelog-Entry: Start reporting errors to Sentry instead of to TrackJS.
Fixes: https://github.com/resin-io/etcher/issues/1027
2017-04-10 15:06:32 -04:00
Mico Piira
1d14f8ad08 docs(README): fix waffle.io badge (#1271) 2017-04-10 14:39:46 -04:00
Juan Cruz Viotti
1b68e9394b style(shared): fix given that is -> given that it typo (#1272)
See: https://github.com/resin-io/etcher/pull/1262#discussion_r110541438
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-10 14:36:01 -04:00
Benedict Aas
b28c345ba0 refactor(GUI): remove Angular from FlashStateModel and rename (#1264)
We remove the usage of Angular from 'FlashStateModel' and its usage
throughout the project comes under the new 'flashState' moniker.


Depends: https://github.com/resin-io/etcher/pull/1261
2017-04-10 14:30:21 -04:00
Andrew Scheller
07dad2a0ef chore: fix a CI script to 'properly fail' on Windows (#1270) 2017-04-10 10:06:32 -04:00
Benedict Aas
19dd2834fb fix(GUI): replace Math object usage in progressButton directive (#1263)
We were using `Math.min` in a progressButton's template expression,
however such object is not exposed to the Angular expression context.
2017-04-10 09:59:13 -04:00
Jonas Hermsmeier
f15587807a test: Use mocha with promises instead of callbacks (#1268)
This changes the test cases to just return the Promises,
to avoid timing out on failures and to provide better
error messages and stack traces.

Change-Type: patch
2017-04-09 21:30:58 +02:00
Juan Cruz Viotti
3cdd925c41 refactor: get rid of is-elevated (#1262)
This commit implements our own version of the `is-elevated` module. The
reason behind this is that `is-elevated` relies on lots of unnecessary
modules, that eventually require `spawn-sync` and `try-thread-sleep`,
which conditionally require dependencies that are not even declared in
their `package.json`, causing issues when concatenating the Etcher CLI.

See: https://github.com/resin-io/etcher/pull/1235
See: https://github.com/resin-io/etcher/pull/1228
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-08 20:15:17 -04:00
Jonas Hermsmeier
02da446914 chore(ci): limit git clone depth (#1269)
This may speed up cloning on CI services by reducing the clone depth.

Change-Type: patch
2017-04-08 20:14:46 -04:00
Andrew Scheller
810ced3907 chore: fix CI script to work when 'require'ing nested modules (#1267) 2017-04-08 20:00:43 -04:00
Jonas Hermsmeier
b3b928ae4f feat(image-stream): Support Apple Disk Images (#1257)
This adds support for flashing Apple Disk Images (.dmg)

Change-Type: minor
2017-04-07 21:34:18 +02:00
Juan Cruz Viotti
2411a7677d upgrade: mountutils to v1.0.3 (#1266)
This version contains a fix to make the module work fine on a
concatenated JavaScript file.

See: https://github.com/resin-io-modules/mountutils/pull/23
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-07 12:55:22 -04:00
Benedict Aas
ff495a45a8 refactor(GUI): remove angular from SettingsModel and rename (#1261)
We remove the usage of Angular in SettingsModel in our efforts to make
Etcher as agnostic as possible as we make our move to React.
2017-04-07 10:45:43 -04:00
Jonas Hermsmeier
07b6dd247d feat(robot): Support logging arbitrary data to the console (#1212)
This adds a new command recognition for message type "log",
to enable `console.log()`ing arbitrary data to the parent process console.

Not sure if we'd really want this in, but it's very handy for debugging,
and would keep us from writing these 3 lines every time
we want to inspect something in between those processes.

Change-Type: minor
2017-04-06 14:40:38 -04:00
Juan Cruz Viotti
4cd8776d06 chore: make the CI servers fail-fast if one of their builds fails (#1241)
This means that if any architecture build fails, then we stop the other
ones right away, for performance reasons.

See: ce51074e6f
See: https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-06 14:40:27 -04:00
Ștefan Daniel Mihăilă
7fe503c89a feat(GUI): add analytics image / drive info on flash done / error events (#1255)
Change-Type: patch
2017-04-06 14:39:49 -04:00
Andrew Scheller
76aa05f320 chore: Stop OSX builds on Travis frequently timing out (#1260)
See https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
2017-04-06 17:39:47 +01:00
Juan Cruz Viotti
802d9abb1d refactor: unify image objects across GUI and image-stream (#1229)
`image-stream` returns image objects that look like this:

```js
{
  stream: <readable stream>,
  transform: <transform stream>,
  size: {
    original: <number>,
    final: {
      value: <number>,
      estimation: <boolean>
    }
  },
  ...
}
```

While the GUI handles image objects that look like this:

```sh
{
  path: <string>,
  size: <number>,
  ...
}
```

It looks like we should share a common structure between both, so we can
use `image-stream` images in `drive-constraints`, for example.

Turns out that we actually transform `image-stream` image objects to GUI
image objects when the user selects an image using the image selector
dialog, which is another indicator that we should normalise this
situation.

As a solution, this commit does the following:

- Add `path` to `image-stream` image object
- Reuse `image-stream` image objects in the GUI, given they are a
  superset of GUI image objects

See: https://github.com/resin-io/etcher/pull/1223#discussion_r108165110
Fixes: https://github.com/resin-io/etcher/issues/1232
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-06 09:41:08 -04:00
Benedict Aas
63901ccf77 fix(GUI): limit button progress and width to 100 (#1256)
We limit the progress button width by limiting the progress to a maximum
value of 100.

Change-Type: patch
Changelog-Entry: Prevent progress button percentage to exceed 100%.
2017-04-05 12:00:59 -04:00
Juan Cruz Viotti
e16234e3e8 refactor(GUI): get rid of drive-constraints Angular factory wrapper (#1250)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-04 13:44:03 -04:00
Juan Cruz Viotti
71d5fad2b0 refactor(image-stream): get rid of rindle (#1246)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-04 09:49:00 -04:00
Juan Cruz Viotti
c5a711af0f refactor(CLI): make use of mountutils to unmount drives (#1209)
`mountutils` is a native C++ NodeJS addon the Etcher team has been
working on to solve several issues we've been having with third party
unmount programs.

We'll see how this little module behaves after some real world usage.
I'm confident that it will fix the issues linked in this commit.

This commit also upgrades `npm` to 4.4.4 in Appveyor, given there is a
known building issue on Windows that is solved in a recent version.

Change-Type: minor
Changelog-Entry: Fix several unmount related issues in all platforms.
See: https://github.com/resin-io-modules/mountutils
Fixes: https://github.com/resin-io/etcher/issues/1177
Fixes: https://github.com/resin-io/etcher/issues/985
Fixes: https://github.com/resin-io/etcher/issues/750
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-02 21:34:05 -04:00
Juan Cruz Viotti
997133c979 refactor(GUI): get rid of basename Angular filter (#1252)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-01 14:52:06 -04:00
Juan Cruz Viotti
4a3a123f42 refactor(image-stream): get rid of read-chunk (#1243)
We also took the opportunity to make `utils.getArchiveMimeType()`
asynchronous.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-04-01 14:47:14 -04:00
Jonas Hermsmeier
d5ec71c5da chore(package): Make clean-shrinkwrap remove optional dependencies (#1236)
Previously dependencies weren't actually removed from `node_modules`,
this runs `npm rm` on the optional dependencies, effectively excluding
them, and their dependencies from the shrinkwrap file.

Also the script has been hooked to the `preshrinkwrap` hook,
to remove the need of having to run it manually.

Change-Type: patch
2017-03-31 14:35:50 -04:00
Juan Cruz Viotti
8fff29224d refactor(image-stream): get rid of gzip-uncompressed-size (#1247)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-31 13:38:32 -04:00
Andrew Scheller
63c7eed2a9 chore: add a require() checking script (#1237)
* chore: Add a require() checking script

This adds another sanity-check bash script to scan the Etcher source files
and check all required node modules are available.

* Workaround for jq crash on Windows
2017-03-31 11:00:59 -04:00
Juan Cruz Viotti
4f790afe49 chore: remove unused tail related modules (#1242)
We used to rely on these modules before we started passing progress
information from the writer to the GUI using IPC.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-31 10:53:31 -04:00
Juan Cruz Viotti
8a12e9cf94 refactor(image-stream): get rid of isstream (#1244)
The dependency is not yet removed from `npm-shrinkwrap.json` given that
there another one that keeps requiring it.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-31 10:53:23 -04:00
Juan Cruz Viotti
bc2512ac5e refactor(GUI): get rid of the username module (#1245)
This module contains various fallbacks in case `os.userInfo()` doesn't
exist, which does exist in Electron.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-31 10:52:21 -04:00
Juan Cruz Viotti
4f66d6713f style(CLI): improve drive not large enough message wording (#1239)
See: https://github.com/resin-io/etcher/pull/1223#discussion_r108707741
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-30 01:42:34 +01:00
Andrew Scheller
06be2e9dfb style: fix require() typo in lib/cli/writer.js 2017-03-29 18:13:31 -04:00
Juan Cruz Viotti
55dc17d9a7
Revert "chore(package.json): add dynamic dependencies as optional dependencies (#1228)"
This reverts commit 396145d62586fa5c887f87303ecfc295b9668ea4.
2017-03-29 15:09:30 -04:00
Juan Cruz Viotti
4616f4bfd9
Revert "chore: make thread-sleep and spawn-sync production dependencies (#1235)"
This reverts commit 85cac531c96c422912431b4f00870a2afe56119a.
2017-03-29 15:08:59 -04:00
Juan Cruz Viotti
85cac531c9 chore: make thread-sleep and spawn-sync production dependencies (#1235)
These are dynamic dependencies we've recently added to the list of top
level optional dependencies in order to be able to resolve them when
using browserify to package the Etcher CLI.

The issue is that `thread-sleep` is using a very old `node-pre-gyp`
version (0.6.9) that doesn't support Electron at all, thus resulting in
the following error when setting `npm_config_runtime=electron`:

```
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Unknown Runtime: 'electron'
```

This commit makes these dependencies production dependencies, so we can
tweak the `node-pre-gyp` version to make it work.

See: https://github.com/resin-io/etcher/pull/1228
See: https://github.com/mapbox/node-pre-gyp/issues/281
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-29 13:32:08 -04:00
Juan Cruz Viotti
af921a0cb3 docs(README): uninstall instructions for debian/brew (#1231)
We have inline instructions to install Etcher from package managers.
This commit extends them to quickly mention how to uninstall as well.

Fixes: https://github.com/resin-io/etcher/issues/1225
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-29 12:43:32 -04:00
Jonas Hermsmeier
4f7d160513 chore(package): remove extraneous dependencies from shrinkwrap (#1234)
Change-Type: patch
2017-03-29 11:50:06 -04:00
Juan Cruz Viotti
0e8dee0506 fix(GUI): provide a friendly message when no polkit agent is available (#1221)
`sudo-prompt`, the module we use to provide elevation for GNU/Linux,
relies on polkit to show the elevation dialog. Polkit implements a
"backend" to control privileges, but relies on different packages to
provide a GUI frontend.

If no GUI frontend can be found on the system, then `sudo-prompt` will
fail with a `No polkit authentication agent found.` In this case, we
shouldn't present a scary stack trace to the user, and we should also
not send this error to TrackJS.

As a solution, we intercept such error in
`lib/child-writer/writer-proxy.js`, and convert it into a human readable
user error using `errors.createUserError()`, which is passed to the
Etcher GUI using the "robot" mechanism.

Fixes: https://github.com/resin-io/etcher/issues/1179
Change-Type: patch
Changelog-Entry: Provide a user friendly error message when no polkit authentication agent is available on the system.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-29 11:26:34 -04:00
Benedict Aas
e7f0613d82 feat(GUI): display drive name and description in tooltip (#1233)
In the main page we show the drive description, and on hover a tooltip
shows the drive name. The tooltip behaviour is changed to show both,
un-truncated.

Closes: https://github.com/resin-io/etcher/issues/1170
Changelog-Entry: Add the un-truncated drive description to the selected drive step tooltip.
2017-03-29 09:12:45 -04:00
Juan Cruz Viotti
3c1882d2b4 chore(travis): move deploy command to a separate script (#1224)
We're passing a shell conditional to `deploy.script`, however Travis CI
seems to get confused about this in the deploy section, causing
GNU/Linux to run `make publish-aws-s3` directly on the Travis CI build
instead of in the Docker container, which causes the deployment to
eventually fail because of missing dependencies.

According to Travis CI:

> `deploy.script` must be a scalar pointing to an executable file or
> command.

See https://travis-ci.org/resin-io/etcher/jobs/214723725 for a failure
example.

We also move the Appveyor deploy script to a separate file for symmetry
purposes.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 14:15:52 -04:00
Juan Cruz Viotti
78a3206295 fix(CLI): prevent flashing an image that is larger than the drive (#1223)
The CLI still happily let you flash an image that doesn't fit on the
drive. This commit prevents such scenario right before flashing, but we
should still implement a smarter CLI drive detection widget for when the
user runs the CLI interactively.

Change-Type: patch
Changelog-Entry: Prevent flashing an image that is larger than the drive with the CLI.
Fixes: https://github.com/resin-io/etcher/issues/858
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 13:55:58 -04:00
Juan Cruz Viotti
57952f6f55 fix(CLI): don't print stack traces by default (#1206)
Currently, the Etcher CLI will print scary stack traces for every single
error (e.g: if you forgot to pass an image to the tool), given that
`errors.getDescription()` will return a stack trace if no other
description could be found.

This commit introduces an `ETCHER_CLI_DEBUG` environment variable, which
when set, it will cause the Etcher CLI to output stack traces, plus a
boolean `userFriendlyDescriptionsOnly` option to
`errors.getDescription()`, so we can control whether
`errors.getDescription()` returns things like stack traces, or
stringified error objects.

Change-Type: minor
Changelog-Entry: Don't print stack traces by default in the CLI.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 09:43:15 -04:00
Juan Cruz Viotti
396145d625 chore(package.json): add dynamic dependencies as optional dependencies (#1228)
In order to package the Etcher CLI, we concatenate all the code from the
`lib/cli/etcher.js` entry point using browserify.

There are some dependencies down the hierarchy that dynamically require
other dependencies, by enclosing `require()` calls in `try`/`catch`
blocks. The dynamic dependencies these modules require are not even
present in the `package.json`, and thus rightfully confuse browserify.

See https://github.com/ForbesLindesay/spawn-sync/blob/master/lib/spawn-sync.js#L10
See https://github.com/IndigoUnited/node-cross-spawn/blob/master/index.js#L32

There are two solutions to this problem:

- Make browserify stub these problematic dependencies with a blank file
  by using `--ignore`

This approach initially looks like the way to go, however it means that
every module that requires this particular dependency will receive just
a blank stub. It might be that some other dependencies rely on them, so
this approach could cause very obscure bugs later on.

- Add them to `package.json`

This is the approach taken by this commit. We add them to
`optionalDependencies` instead of `dependencies`, so we can still make
use of tools that analyse the code base for unused dependencies.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 09:41:53 -04:00
Juan Cruz Viotti
da85aa31aa style(CLI): improve error message when drive doesn't exist anymore (#1222)
The current message is short and unfriendly.

Fixes: https://github.com/resin-io/etcher/issues/1125
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 09:41:38 -04:00
Juan Cruz Viotti
63dda89035 fix(GUI): prevent blank application when sending SIGINT (#1220)
This issue only affects GNU/Linux and macOS. If the user sends SIGINT to
the application, the main process dies, but we get an orphaned blank
browser window. The problem only seems to occur when there is a
`beforeunload` window event handlers, which we use to warn the user when
quitting while flashing.

Change-Type: patch
Changelog-Entry: Prevent blank application when sending SIGINT on GNU/Linux and macOS.
Fixes: https://github.com/resin-io/etcher/issues/1028
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 09:39:23 -04:00
Juan Cruz Viotti
724d47fb6a doc(image-stream): document that .getFromFilePath also resolves metadata (#1217)
See: https://github.com/resin-io/etcher/pull/1211#issuecomment-288896853
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-27 09:58:55 -04:00
Juan Cruz Viotti
180802b985 fix(GUI): disallow reloading the app in macOS using Cmd+R (#1219)
Users can currently force the browser window to reload by using Cmd+R in
macOS. The `will-navigate` event handler in this same file is supposed
to protect us from this case, however it's not fired at all just in
macOS for some reason.

As a solution, we attach dummy keyboard shortcut handlers for Cmd+R,
Ctrl+R, and F5, to override the normal browser window behaviour.

The reason behind disallowing reloads is that a reload during a critical
operation such as writing, validation, elevating, unmounting, drive
scanning, etc will cause undefined behaviour, resulting in nonsense
errors that we can't solve coming to TrackJS.

See: https://github.com/electron/electron/issues/8841
Fixes: https://github.com/resin-io/etcher/issues/1210
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-26 19:29:11 -04:00
Andrew Scheller
68d50ba2f5 chore: don't bother sending any build context to Docker (#1226)
We don't actually use any build context, as we just mount the local
directory as a volume anyway. Omitting it speeds up the container
start-up time. This is an enhanced version of #1173
2017-03-26 18:19:40 -04:00
Jonas Hermsmeier
cbc9dfecf6 chore(scripts): rebuild instead of removing node_modules (#1215)
As removing the `node_modules` completely and then re-installing
is quite time consuming and SSD-thrashing, resort to pruning
and rebuilding native add-ons when switching targets.

Change-Type: patch
2017-03-24 12:56:26 -04:00
Jonas Hermsmeier
f50feba78d doc: add option to install win build tools via npm (#1218)
This adds the option to install the Windows C++ Build Tools
via npm to the RUNNING-LOCALLY docs

Change-Type: patch
2017-03-24 12:56:11 -04:00
Jonas Hermsmeier
3d68688f33 fix(image-stream): destroy unused image streams (#1211)
When fetching metadata, a stream is opened, but never consumed.
This destroys the stream when retrieving metadata to avoid
dangling open file descriptors and such.

Change-Type: patch
Changelog-Entry: Fix unmounting freezing in macOS.
Fixes: https://github.com/resin-io/etcher/issues/985
2017-03-24 11:58:13 -04:00
Jonas Hermsmeier
198ddb7433 chore(travis): Use node base, instead of cpp (#1216)
This changes the `.travis.yml` to use the `node_js` language
as a base instead of `cpp` to avoid installing & setting up node
manually.

Change-Type: patch
2017-03-24 11:57:13 -04:00
Peter Dave Hello
d028ed9f6c chore: speed up nvm installation on Travis CI
You don't need to have the whole commit history of `nvm`, let's speed up the clone process.
2017-03-24 11:13:18 -04:00
Andrew Scheller
f595f4ad04 style: fix typo in code-comment (#1213) 2017-03-24 11:10:52 -04:00
Juan Cruz Viotti
7033f7f7c4 chore: add libyaml-dev to GNU/Linux Docker dependencies (#1204)
`pip install awscli` outputs the following warning:

```
Running setup.py install for PyYAML
  checking if libyaml is compilable
  i686-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
  build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
   #include <yaml.h>
                    ^
  compilation terminated.

  libyaml is not found or a compiler error: forcing --without-libyaml
  (if libyaml is installed correctly, you may need to
   specify the option --include-dirs or uncomment and
   modify the parameter include_dirs in setup.cfg)
```

The installation gracefully continues anyway (the `--without-libyaml` is
automatically forced).

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-23 22:31:25 -04:00
Juan Cruz Viotti
f73bcb78a8 docs: revise PUBLISHING.md S3 section (#1197)
- Mention the production and snapshot S3 bucket
- Remove the note that `aws-s3.sh` doesn't run on Windows
- Don't document `./scripts/publish/aws-s3.sh`. Encourage maintainers to
  use `make publish-aws-s3` instead

See: https://github.com/resin-io/etcher/pull/1078#discussion_r107259159
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-23 22:31:18 -04:00
Andrew Scheller
1731e77a25 chore: check that all text files only contain expected ASCII chars (#1205) 2017-03-23 14:00:14 -04:00
Pierre-Yves
003d937a6e chore: make use of 'uname -m' to detect host on GNU/Linux
replace uname -p with uname -m to detect HOST_ARCH on HOST_PLATFORM = linux
2017-03-23 13:33:27 -04:00
Juan Cruz Viotti
063fde1a02 chore: automatic CLI packaging (#1132)
This commit introduces the phony `package-cli` target, used to package
the Electron CLI in a directory.

Other related changes:

- The `package` target has been renamed to `package-electron`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-23 10:10:01 -04:00
Andrew Scheller
61f7c85060 chore: fix small dependency-checking typo (#1201) 2017-03-23 10:09:32 -04:00
Andrew Scheller
a7da396a4c chore: fix copying of variables into Docker (#1203)
Fixes `set -u` errors, and prevents variables being set to undefined values

Change-type: patch
2017-03-23 10:04:31 -04:00
Juan Cruz Viotti
fbfd6f0b47 chore: fix errors during snapshot deployments (#1196)
This commit addresses some issues with snapshot builds that we didn't
caught given we never ran the deployment step in a "real" deployment
scenario.

- On Travis CI, the service reverts all changes in the source tree
  before starting the `deploy` section, which seems to trigger some
  issues when deleting `node_modules`. The solution is to set the
  `skip_cleanup` option

See
https://s3.amazonaws.com/archive.travis-ci.org/jobs/213614487/log.txt

```
...
warning: failed to remove node_modules/helper-date/node_modules/moment/locale/es.js
warning: failed to remove node_modules/helper-date/node_modules/moment/locale/ky.js
warning: failed to remove node_modules/helper-date/node_modules/moment/locale/pt-br.js
warning: failed to remove node_modules/helper-date/node_modules/moment/locale/hu.js
warning: failed to remove node_modules/helper-date/node_modules/moment/locale/en-nz.js
...
```

- On Appveyor CI, `curl` is not installed

See
https://ci.appveyor.com/project/resin-io/etcher/build/job/54i0erd9tsa1cg5p
as an example.

See: https://github.com/resin-io/etcher/pull/1078
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-22 10:27:51 -04:00
Juan Cruz Viotti
799ebc6aa0 chore: publish snapshot builds to S3 (#1078)
This commit makes Appveyor and Travis CI publish snapshot builds to S3
when a pull request is merged, by making use of the `publish-aws-s3`
Makefile target.

The changes required for such type of deployment are the followings:

- Set `S3_BUCKET` to `resin-nightly-downloads` when doing snapshot
  builds

- Add deploy sections to `.travis.yml` and `appveyor.yml` that run `make
  publish-aws-s3`

- Don't change `PRODUCT_NAME` when doing snapshot builds (given we'll be
  publishing to a different S3 bucket)

- Install `awscli` in Appveyor CI and Travis CI

- Make GNU/Linux Docker containers inherit `AWS_ACCESS_KEY_ID` and
  `AWS_SECRET_ACCESS_KEY` from the environment (so `awscli` is
  configured correctly inside them)

- Add a prefix option to `aws-s3.sh` publish script to prepend a string
  to the S3 path, so we can add a timestamp to more easily distinguish
  files inside the `resin-nightly-downloads` bucket

- Print the published URL from `aws-s3.sh` for convenience purposes, so
  we can click it when skimming through CI builds logs

- Add the `-R` and `-L` options when recursively copying `node_modules`
  during a snapshot build to prevent weird Appveyor errors related to
  hard links. The options listed before make sure that we recursively
  resolve every link while copying

- Move from `wget` to `curl` to avoid certificate check failures

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-21 18:35:44 -04:00
Andrew Scheller
5a01f4854c chore: setup .gitattributes to perform correct line-ending conversions (#1192)
This allows `npm run lint` to pass regardless of the `core.autocrlf`
setting in git
2017-03-21 14:32:21 -04:00
Juan Cruz Viotti
4417d94913 upgrade: unbzip2-stream to v1.0.11 (#1194)
We believe this issue fixes the "rawr i'm a dinosaur" error on certain
problematic images.

Gives this only happens on a minority of images, we couldn't confirm
that the fix really solves the issue, but we'll include the upgrade on
the next Etcher version and see how it goes in the real world.

Change-Type: patch
Changelog-Entry: Fix "rawr i'm a dinosaur" bzip2 error.
Fixes: https://github.com/resin-io/etcher/issues/734
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-21 14:31:58 -04:00
Juan Cruz Viotti
9f3798978d upgrade: is-elevated to v2.0.1 (#1184)
This version contains a fix for correctly checking whether a process is
running with administrator right or not, without depending on the
"Server" service.

Fixes: https://github.com/resin-io/etcher/issues/1180
See: https://github.com/sindresorhus/is-admin/pull/4
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-21 11:17:02 -04:00
Juan Cruz Viotti
254da05964 chore: don't compress binaries/libraries with upx (#1188)
upx allows to reduce the package size by some mega bytes, but also
considerably slows down the application start time.

This commit ditches upx, since we can re-gain those benefits (and even
increase them) by other means (e.g: minifying JavaScript).

See: https://github.com/resin-io/etcher/issues/1138
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-21 11:16:48 -04:00
Benedict Aas
58f30494b4 feat(GUI): show drive name instead of device name (#1181)
We show the friendly drive name on the main page with the drive's device name
or mount point now inside a tooltip. Drive names longer than 11 characters are
truncated with a middle ellipsis.

Change-Type: minor
Changelog-Entry: Show friendly drive name instead of device name in the main screen.
Closes: https://github.com/resin-io/etcher/issues/1170
2017-03-20 17:00:07 -04:00
Jonas Hermsmeier
abb6139f32 doc: Add MSVC Build Tools option to Windows requisites (#1186) 2017-03-20 15:56:45 -04:00
Juan Cruz Viotti
0873b1d161 chore: fix lzma-native build issues on Windows (#1191)
* chore: fix `lzma-native` build issues on Windows

We've been recently hitting a weird `lzma-native` build error on Windows
(both locally and on Appveyor CI):

```
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  build
  The input line is too long.

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\projects\etcher\node_modules\lzma-native\build\liblzma.vcxproj]
```

After a lot of experimentation, we realised the issue was gone if we
removed `node-sass` from the development dependencies.

The issue is that `node-gyp` was recently upgraded to v3.6.0, which was
picked up by `node-sass`, which declares `node-gyp` as a dependency. For
some reason, if `node-sass` causes `node-gyp` to be updated, then
`lzma-native` fails with the above cryptic error.

I was able to trace down the error to the following `node-gyp` commit:

ae141e1906

As a solution, this commit starts to shrinkwrap development
dependencies, and locks `node-gyp` to v3.5.0 until the issue is fixed.

Fixes: https://github.com/addaleax/lzma-native/issues/30
See: https://github.com/nodejs/node-gyp/issues/1151
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>

* chore: ensure some modules in npm-shrinkwrap stay at specific versions

* Address code review comments

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-20 15:03:10 -04:00
Andrew Scheller
c9702c3a6d chore: get the CI tests working again (#1182)
* chore: get the CI tests working again
 * an updated eslint-plugin-lodash was creating extra linter errors where we
   were using built-in String methods instead of the lodash equivalents
 * an updated codespell package now installs with a different executable-name
   (no .py extension), and now supports multiple dictionaries
 * while I was at it I replaced the messy double-quoting-string logic with the
   command-join module

Changelog-type: patch

* chore: downgrade codespell to 1.9.2 because the latest version has issues running on Windows
(we'll hopefully be able to revert this commit when codespell works again properly!)
2017-03-15 16:32:25 -04:00
Juan Cruz Viotti
66c0cb6e17 chore: automatically enforce compatible angular core module versions (#1175)
We've recently had an incident were the `angular-mocks` version we were
running was incompatible with the `angular` version.

Each AngularJS core module is versioned equally, therefore we can write
a small script that automatically tests that they match, so we're
guarded against forgetting to similarly upgrade different dependencies.

See: https://github.com/resin-io/etcher/pull/1168
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-15 10:43:20 -04:00
Ștefan Daniel Mihăilă
fe20f5061f fix(GUI): don't log absolute paths in Mixpanel (#1161)
The event data may contain absolute paths that contain user information that
should not be logged in Mixpanel. Instead, we replace absolute path properties
with their base name.

Change-Type: patch
Changelog-Entry: Don't include user paths in Mixpanel analytics events.
2017-03-15 00:05:48 -04:00
Juan Cruz Viotti
2342831104 fix(GUI): avoid duplicated TrackJS errors (#1176)
I've noticed that errors reported to TrackJS appear twice. Turns out
that TrackJS pipes output of `console.error()` as errors, rather than as
extra logging.

The `AnalyticsService.logException()` function reports the exception to
TrackJS using `$window.trackJS.track()`, but then prints it to `stderr`
as well (so it appears on DevTools), causing TrackJS to report that one
too.

The solution is to disable the `console.error` boolean property of the
`_trackJs` object. From the TrackJS documentation:

```
// By default any calls to console.error() will automatically trigger an
// error. Set this to false if you don't want console.error() to
// trigger errors.
error: true,
```

See: http://docs.trackjs.com/tracker/configuration
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-13 11:00:26 -04:00
Andrew Scheller
ee2bbef9da chore: codespell improvements (#1174)
* fix the command so it actually works - see https://github.com/lucasdemarchi/codespell/issues/101
 * check the spelling of more files
 * ignore known-binary filetypes
 * fix a couple of spelling mistakes it caught

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-11 18:10:54 -04:00
Ștefan Daniel Mihăilă
34c85eb150 feat(GUI): improve analytics events (#1111)
* feat(GUI): improve analytics events

This commit adds more events to our current analytics.
Will further improve in a future commit.

Change-Type: patch
See: https://github.com/resin-io/etcher/issues/1100

* refactor(gui): use single function to set normal and dangerous settings

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-10 15:18:49 -04:00
Juan Cruz Viotti
33e044806b chore: support generating armv7l .deb packages (#1038)
This is the architecture of the Raspberry Pi 3. The following changes
were necessary:

- Detect the architecture using `uname -m`
- Set the Debian equivalent architecture to `armhf`
- Handle the new architecture correctly on `dependencies-npm.sh` and
  `electron-download-package.sh`, referring to it as simply `arm` (which
  is what `node-gyp` expects)

This PR also includes `architecture-convert.sh`, which is a script to
find an architecture equivalence for Node and Debian.

Steps to test this PR:

- `make electron-installer-debian` from a Raspberry Pi 3

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-10 14:08:15 -04:00
Ștefan Daniel Mihăilă
465a0e9e04 style(GUI): reduce eslint-disable no-var scope (#1163)
Change-Type: patch
2017-03-10 13:12:13 -04:00
Juan Cruz Viotti
e4a9a03239 refactor: unify error related tasks (#1154)
The current error handling logic is a mess. We have code that tries to
fetch information about errors in different places throughout the
application, and its incredibly hard to ensure certain types of error
get decent human friendly error messages.

This commit groups, improves, and tests all error related functions in
`lib/shared/errors.js`.

Here's a summary of the changes, in more detail:

- Move the `HUMAN_FRIENDLY` object to `shared/errors.js`
- Extend `HUMAN_FRIENDLY` with error descriptions
- Add `ENOMEM` to `shared/errors.js`
- Group CLI and `OSDialogService` mechanisms for getting an error title
  and an error description
- Move error serialisation routines from `robot` to `shared/errors.js`
- Create and use `createError()` and `createUserError()` utility
  functions
- Add user friendly descriptions to many errors
- Don't report user errors to TrackJS

Fixes: https://github.com/resin-io/etcher/issues/1098
Change-Type: minor
Changelog-Entry: Make errors more user friendly throughout the application.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-10 13:11:45 -04:00
Andrew Scheller
0c7e1feb4b chore: migrate from scss-lint to sass-lint (#1172)
https://github.com/brigade/scss-lint now says "NOTICE: Consider other tools
before adopting SCSS-Lint", and recommends sass-lint as an alternative.
sass-lint has the additional advantage of being written in NodeJS, which means
it slots nicely into our existing infrastructure, and we can completely
remove our build-time dependency on Ruby.
2017-03-09 15:09:00 -04:00
Andrew Scheller
0a9b67976c chore: create a temporary .dockerignore during the docker build step (#1173)
This speeds up the 'docker build' step, as it reduces the amount of 'build
context' that needs to be sent to docker.
2017-03-09 15:08:48 -04:00
Juan Cruz Viotti
a624b24bfc fix(GUI): stop drive scanning loop if an error occurs (#1169)
If the drive scanning scripts cause an error, the error will be
presented to the user over and over again. Not only this is terrible UX,
which even makes hard to close the application since dialogs keep coming
in, but it also spams TrackJS, our error reporting service, and makes it
seem that errors happened dozens of times, and thus obscuring real
trending errors.

Change-Type: patch
Changelog-Entry: Stop drive scanning loop if an error occurs.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-09 11:58:14 -04:00
Juan Cruz Viotti
d44868ecab upgrade: angular and angular-mocks to v1.6.3 (#1168)
We recently started hitting the following errors in all our CI builds:

```
TypeError: angular.module(...).info is not a function
    at /etcher/node_modules/angular-mocks/angular-mock
```

The `.info()` function was released in AngularJS 1.6.3. We declare
`angular-mocks@^1.6.1` as a development dependency, which means that
once 1.6.3 was out, npm started resolving `angular-mocks@1.6.3`, however
that version is incompatible with the main Angular version we're
shrinkwrapping (1.6.1), and thus the error.

As a solution, I've upgraded both `angular` and `angular-mocks` to
1.6.3, but also locked down `angular-mocks`, since similar errors will
happen again unless we manually keep these versions in sync.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-09 10:27:39 -04:00
Juan Cruz Viotti
df8611df11 chore: add ESLint Lodash plugin (#1148)
This is one step towards enforcing the linter until we barely have to
check for style issues on code reviews.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-08 19:11:15 -04:00
Juan Cruz Viotti
6c8bc117ab chore: revise ESLint built-in configuration (#1149)
There are a lot of new rules since the last time I revised the ESLint
rules documentation.

I've updated the main `.eslintrc.yml` to include some newer additions,
plus I added another ESLint configuration file inside `tests`, so we can
add some stricted rules to the production code while relaxing them for
the test suite (due to the fact that Mocha is not very ES6 friendly and
Angular tests require a bit of dark magic to setup).

This is a summary of the most important changes:

- Disallow "magic numbers"

These should now be extracted to constants, which forces us to think of
a good name for them, and thus make the code more self-documenting (I
had to Google up the meaning of some existing magic numbers, so I guess
this will be great for readability purposes).

- Require consistent `return` statements

Some functions relied on JavaScript relaxed casting mechanism to work,
which now have explicit return values. This flag also helped me detect
some promises that were not being returned, and therefore risked not
being caught by the exception handlers in case of errors.

- Disallow redefining function arguments

Immutability makes functions easier to reason about.

- Enforce JavaScript string templates instead of string concatenation

We were heavily mixing boths across the codebase.

There are some extra rules that I tweaked, however most of codebase
changes in this commit are related to the rules mentioned above.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-07 23:46:44 -04:00
Juan Cruz Viotti
c93f528f96 upgrade: drivelist to v5.0.16 (#1160)
See: https://github.com/resin-io-modules/drivelist/pull/150
Fixes: https://github.com/resin-io/etcher/issues/1159
Change-Type: patch
Changelog-Entry: Fix GNU/Linux udev error when `net.ifnames` is set.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-07 10:44:34 -04:00
Juan Cruz Viotti
10c5e57b98 upgrade: etcher-image-write to v9.0.1 (#1157)
We're particularly interested in:

- https://github.com/resin-io-modules/etcher-image-write/pull/84

Which fixes ENOSPC alignment issues.

This new version upgrades all its dependencies, which is the reason why
`npm-shrinkwrap.json` contains a lot of changes.

Fixes: https://github.com/resin-io/etcher/issues/1109
Change-Type: patch
Changelog-Entry: Fix `ENOSPC` image alignment errors.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-06 14:22:03 -04:00
Juan Cruz Viotti
c2a27301b7 upgrade drivelist to v5.0.15 (#1158)
We're mainly interested in the following change:

- https://github.com/resin-io-modules/drivelist/pull/148

Fixes: https://github.com/resin-io/etcher/issues/1126
Change-Type: patch
Changelog-Entry: Fix errors when unplugging drives exactly when the drive scanning scripts are running.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-06 13:52:39 -04:00
Juan Cruz Viotti
98284bd5e2 fix(GUI): don't report "invalid archive" errors to TrackJS (#1152)
These errors happen when the user selects an archive that contains no
image, or multiple images, and represents a user error, rather than an
unhandled exception.

For this reason, we should not report this to TrackJS.

This means, however, that we need a reliable way to know whether an
error should be reporter or not. This commit implements
`AnalyticsService.shouldReportError()` for this purpose, which will
check an optional `report` property of the error object.

In order to ensure that errors that we don't control are reported, the
function will return `true` if the error object doesn't have that
property.

Change-Type: patch
Changelog-Entry: Don't report "invalid archive" errors to TrackJS.
Fixes: https://github.com/resin-io/etcher/issues/1103
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-02 12:21:48 -04:00
Juan Cruz Viotti
1a00430999 chore: fix JSDoc warnings (#1151)
- The type in `@type` should be surrounded by curly braces
- We should use `@type` in some cases where we used `@property`
- `@module` descriptions should go above such tag
- Namespaces should not declare their access type

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-02 12:13:28 -04:00
Juan Cruz Viotti
dfd5f70013 style(GUI): fix small chain indentation issue (#1150)
I couldn't find an ESLint rule that would protect us from this in the
future.

See: https://github.com/resin-io/etcher/pull/1148#discussion_r103525165
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-01 18:52:29 -04:00
Juan Cruz Viotti
4172291a10 chore: improve JSDoc ESLint rules (#1147)
- Prefer `@returns` to `@return`
- Prefer `@param` to `@arg`
- Prefer capitalised types

See: https://github.com/resin-io/etcher/pull/1111#discussion_r103483879
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-01 14:26:47 -04:00
Benedict Aas
33a4ed8c95 feat(GUI): allow opening drive selector modal when no drives (#1146)
We change the drive selector button text to be a static 'select drive'
and allow the user to open the dialog even if there are no drives,
displaying the 'no drives' warning inside the modal.

Closes: https://github.com/resin-io/etcher/issues/884
Changelog-Entry: Allow opening the drive selector modal when there are no
drives.
2017-03-01 10:27:26 -04:00
Ștefan Daniel Mihăilă
4604e89b4f chore: add aknowledge->acknowledge to codespell dictionary 2017-02-28 11:45:29 -04:00
Juan Cruz Viotti
311dcd27a8 chore: add missing : after options in publish scripts (#1134)
Not including the colon means that the option parsing mechanism is not
expecting an argument for the `-t` and the `-p` option (for
`bintray-debian.sh` and `aws-s3.sh` respectively), and thus `$OPTARG`
will be undefined.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 17:06:02 -04:00
Juan Cruz Viotti
8d71307831 chore: define S3_BUCKET in Makefile (#1141)
We use that variable in the Makefile but we're not defining it, which
means that maintainers publishing Etcher need to remember to pass that
as an option.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 17:05:58 -04:00
Juan Cruz Viotti
2ebef51d38 chore: don't use symbolic links on Windows builds (#1133)
Cygwin can't resolve them correctly, causing cryptic errors during
build.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 10:09:04 -04:00
Juan Cruz Viotti
d9bd509d22 chore: fix various code-signing Windows issues (#1135)
- Add missing backslash that caused the command to not be interpreted
  completely

- Update `electron-sign-exe.exe` to `electron-sign-exe-win32.exe` in
  Makefile

- Use hyphen options instead of Windows slash style, which confuses bash

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-27 10:08:44 -04:00
Juan Cruz Viotti
be001cc266
v1.0.0-beta.19
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-24 15:15:14 -04:00
Ștefan Daniel Mihăilă
5b9104e8aa feat(GUI): warn when atempting to burn Windows images (#1043)
Change-Type: minor
Changelog-Entry: Show warning when user tries to flash a Windows image
Closes: https://github.com/resin-io/etcher/issues/1035
2017-02-24 15:12:03 -04:00
Juan Cruz Viotti
d845cccff5 upgrade: drivelist to v5.0.14 (#1130)
See: https://github.com/resin-io-modules/drivelist/pull/146
Change-Type: patch
Changelog-Entry: Don't ignore errors coming from the Windows drive detection script.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-24 10:51:40 -04:00
Juan Cruz Viotti
810e3a085b chore: add execution permissions to Windows bash scripts (#1131)
I edited these files in Windows, which seems to have caused the
permissions bits to get lost.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-24 10:51:31 -04:00
Juan Cruz Viotti
0db335c8f1 chore: start codespell dictionary file in the root of the project (#1087)
codespell works by having a dictionary of pairs of malformed words and
their correct equivalents. This means that codespell will not catch most
issues out of the box, but we can train it based on the common spelling
issues we encounter along the way.

The plan is to add a pair to `dictionary` every time we encounter a typo
during a code review, and we ensure that error will not happen again
anymore.

See: https://github.com/resin-io/etcher/pull/1084
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-23 14:56:43 -04:00
Juan Cruz Viotti
96a9b65ea7 chore: ensure npm run sass was ran and the results committed (#1121)
We recently encountered a UI regression caused by forgetting to commit
the generated CSS files.

The solution is to make the CI servers run `npm run sass` and check if
there are unstaged files afterwards. If so, the tests halt.

In order to avoid duplication between Travis CI and Appveyor CI, this
logic has been encoded into a bash script at `scripts/ci`.

See: https://github.com/resin-io/etcher/pull/1120
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-23 11:20:47 -04:00
Juan Cruz Viotti
f4c92676a9 fix(GUI): update notifier transformRequest error at startup (#1122)
Etcher checks what is the latest version by making an HTTP request to S3
in order to see if it should present the update notifier modal at
startup.

If the user is not connected to the internet, or is on an unstable
connection, the request might fail completely or timeout, leading to a
weird error message being presented to the user:

```json
{
  "data": null,
  "status": -1,
  "config": {
    "method": "GET",
    "transformRequest": [null],
    "transformResponse": [null],
    "url": "https://resin-production-downloads.s3.amazonaws.com",
    "headers": {
      "Accept": "application/json, text/plain, */*"
    }
  },
  "statusText": ""
}
```

To solve the error, we tweak `UpdateNotifierService.getLatestVersion()`
to resolve the current version if there was a problem making the request
(e.g: the response didn't come through at all), which after some
experimentation, we can check by comparing the `status` property with
`-1`.

This error happens in all operating systems, and currently is trending
on TrackJS.

Change-Type: patch
Changelog-Entry: Fix `transformRequest` error at startup when not connected to the internet, or when on an unstable connection.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-23 11:20:10 -04:00
Juan Cruz Viotti
389102af62 chore: don't install electron-installer-debian in OS X builds (#1129)
The `electron-installer-debian` is not needed for OS X builds. On top of
that, it seems that we're installing it twice.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-22 20:46:37 -04:00
Juan Cruz Viotti
b6c6e94448 upgrade: drivelist to v5.0.13 (#1123)
This version fixes an `EACCES` issue when spawning the platform scripts
in OS X and GNU/Linux, which caused because previous versions were
published to NPM from Windows, and Windows seems to mess up the file
permissions (the execution bit in this particular case).

I'm not adding a changelog entry given this issue happen on `master` and
didn't affect any release.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-22 15:46:25 -04:00
Juan Cruz Viotti
c3e7e07532 docs: group CLI developer oriented documentation at lib/cli/README.md (#1105)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 17:43:25 -04:00
Juan Cruz Viotti
9aa23c1590 docs: add developer documentation to the lib/image-stream module (#1107)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 17:43:10 -04:00
Juan Cruz Viotti
2f153479da docs: C++ are not auto-selected by Visual Studio anymore (#1112)
Its not possible to build Etcher without it. For some reason, the Visual
Studio Community 2015 installer is not ticking it by default anymore.

See: https://github.com/resin-io/etcher/pull/1110
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 08:12:48 -04:00
Juan Cruz Viotti
d002ed164b docs: document supported operating systems and versions (#1114)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-21 08:12:30 -04:00
Benedict Aas
295585fb06 feat(gui): new flashing step icon (#1119)
We update the flashing step's icon to the new lightning strike icon.

Changelog-Type: Update flashing step's icon to a lightning strike.
2017-02-21 08:12:09 -04:00
Benedict Aas
78ff320d98 minifix: re-build css (#1120) 2017-02-21 08:11:50 -04:00
Juan Cruz Viotti
d9a92a63ee upgrade: drivelist to v5.0.11 (#1117)
Change-Type: patch
Changelog-Entry: Omit empty SD Card readers in the drive selector on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-20 09:26:11 -04:00
Benedict Aas
7adb5b5485 feat(GUI): update image step icon (#1118)
We replace the old image step with the more general 'plus' icon.

Changelog-Entry: Update the image step icon with an hexagonal "plus" icon.
2017-02-20 09:03:55 -04:00
Juan Cruz Viotti
9e80f154f0 chore: update angular-ui-router in npm-shrinkwrap.json (#1102)
Looks like this dependency was not updated correctly on the shrinkwrap
file. Probably happened in the linked pull request, where the shrinkwrap
file was hand edited at some point (see PR discussion).

See: https://github.com/resin-io/etcher/pull/1083
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-16 13:51:15 -04:00
Juan Cruz Viotti
98f8c3f87f upgrade: drivelist to v5.0.10 (#1101)
This version contains a fix to omit drive letters assigned to partitions
without a valid file system (read "valid for Windows"), causing our
unmounting routine to fail in these cases.

Change-Type: patch
Changelog-Entry: Fix "Error: Command Failed" error when unmounting on Windows.
Fixes: https://github.com/resin-io/etcher/issues/1019
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-16 13:50:53 -04:00
Juan Cruz Viotti
cf4dc5ff37 refactor(GUI): remove component-drive-selector-body outdated class (#1072)
The rules inside this class should be moved to
`.modal-drive-selector-modal`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-13 14:59:29 -04:00
Juan Cruz Viotti
a60f7134fc chore: add an HTML linter and fix its warnings (#1077)
This PR creates a script at `scripts/html-lint.js` that runs a NodeJS
HTML linter package that understands AngularJS on top of all our HTML
templates.

The following error was detected and fixed:

```
1 errors at lib/gui/pages/finish/templates/success.tpl.html
  [4:63] Duplicate attribute “class”.
```

This script will run as part of `npm run lint`, but you can call it
independently as `npm run htmllint`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-13 14:58:29 -04:00
Juan Cruz Viotti
43c08d1547 docs: explain the "robot" module in a high level way (#1081)
This commit adds a README file at `lib/shared/robot` explaining in
detail how the "robot" mechanism works, and why it is needed.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-10 11:59:23 -04:00
Benedict Aas
db8f7d0862 refactor(gui): revert drive/image selection step order swap (#1086)
We revert the drive and image selection step order swap back from drive
selection first and image second, to image first and drive second.

See: https://github.com/resin-io/etcher/pull/1049
2017-02-10 11:59:01 -04:00
Juan Cruz Viotti
f4d9c8e7c4 docs: add msys-zip as a required Windows dependency (#1080)
We need this dependency to create ZIP packages on Windows.
2017-02-09 14:30:53 -04:00
Juan Cruz Viotti
108a43512d chore: add support for Windows builds in Makefile (#1079)
This commits introduces the following Windows rules:

- `electron-installer-zip`
- `electron-installer-nsis`

Other changes:

- Remove `scripts/build/windows.bat`
- Update `docs/RUNNING-LOCALLY.md` to point to Makefile
- Update `docs/PUBLISHING.md` to point to Makefile
- Remove `7z` from `docs/RUNNING-LOCALLY.md` pre-requisites

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-09 14:30:39 -04:00
Juan Cruz Viotti
79ea4d4983 docs: clarify that a "style" commit type applies to code annotations (#1085)
See: https://github.com/resin-io/etcher/pull/1084
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-09 11:30:39 -04:00
Juan Cruz Viotti
6bdba5ffd4 style(GUI): move update notifier checkbox inside modal body (#1071)
This is a small step towards unifying all the modal skeletons that we
use through the application.

By moving the checkbox to the modal body we can declare the footer and
the header once in a single place.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-09 11:30:19 -04:00
Benedict Aas
838f3cc50d minifix: re-build css (#1088) 2017-02-09 11:29:57 -04:00
Juan Cruz Viotti
b55ff3eef8 style(GUI): use a OS dialog to show the "exit while flashing" warning (#1070)
For better OS integration purposes.

This commit also fixes a bug where the dialog would be shown for some
milliseconds even if the application is not flashing.

Change-Type: minor
Changelog-Entry: Use a OS dialog to show the "exit while flashing" warning.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-08 10:04:45 -04:00
Ștefan Daniel Mihăilă
92fdba3642 upgrade: angular to v1.6.1; angular-ui-bootstrap to v2.5.0 (#1083)
Angular 1.5 has a bug that causes angular's `$exceptionHandler`
to be called for rejected `$q` promises even if they have
a rejection handler. This bug caused duplicate error messages
in Etcher.

A consequence of upgrading to Angular 1.6 is that `$q` promises
without a rejection handler will throw `Possibly unhandled rejection`
errors. To avoid these errors, this commit moves code responsible
for opening a tooltip from the template to the controller and handles
the rejection.

Other packages upgraded:
- angular-moment to v1.0.1
- angular-ui-router to v0.4.2
- angular-mocks to v1.6.1

Change-type: patch
Changelog-Entry: Fix duplicate error messages
Fixes: https://github.com/resin-io/etcher/issues/1082
See: https://github.com/angular/angular.js/issues/7992
See: https://github.com/angular/angular.js/pull/13662
2017-02-07 19:12:32 -04:00
Ștefan Daniel Mihăilă
f4c6597b3d style(GUI): minor fixes in comments (#1084) 2017-02-07 17:31:30 -04:00
Juan Cruz Viotti
05fdd5cc29 refactor(GUI): unify modal body styles (#1073)
- Remove unnecessary `.modal-text` wrapper
- Move drive selector specific styles to `_drive-selector.scss`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-07 16:14:15 -04:00
Juan Cruz Viotti
70c7ddc52a fix(GUI): don't auto select system drives in unsafe mode
Currently Etcher will auto-select a system drive if its the only
available one when the "unsafe mode" is enabled, which doesn't feel
right.

Change-Type: patch
Changelog-Entry: Don't auto select system drives in unsafe mode.
See: https://github.com/resin-io/etcher/pull/1061
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-07 13:34:07 -04:00
Juan Cruz Viotti
53ea89782c chore: get rid of commitizen
No one on the team is using this and the adaptor we're using proved to
be suboptimal. We might consider this again once we develop a good
Commitizen adapter integrated more closely with Versionist.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-07 13:33:52 -04:00
Shou
048aac5ac2 feat(gui): update main page design
We match the main page design to its updated style.

* Remove help icon text.
* 'Change' image/drive buttons are now violet blue.
* Remove step number icons and accompanying descriptions.
* Flash progress button now turns into a striking orange, from blue.

Changelog-Entry: Update main page design to its new style.
2017-02-07 12:21:45 -04:00
Juan Cruz Viotti
c7d4ac6518 upgrade: drivelist to v5.0.9
This version doesn't throw an error if there is `stderr` output from the
scripts but the scripts exit with code zero.

Instead, the module prints the `stderr` output to a `debug` channel, so
we enable debug information by setting a `localStorage` value in order
to see what's going on.

Fixes: https://github.com/resin-io/etcher/issues/1034
Change-Type: patch
Changelog-Entry: Ignore `stderr` output from drive detection scripts if they exit with code zero.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-06 14:53:38 -04:00
Juan Cruz Viotti
8e5840ce69 chore: integrate codespell and fix existing spelling issues
This tool scans the comments of every source file and reports back
spelling errors.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-06 14:53:20 -04:00
Juan Cruz Viotti
95d4f2f608 fix(GUI): prevent flashing the drive where the source image is located
Currently Etcher will allow you to flash an image to the same drive that
contains the image. As a way to protect against that case we introduce
the concept of a "source drive", which means a drive that contains the
source image.

This commit adds the following logic around this new concept:

- Don't auto-select a source drive
- De-select an already selected drive if an image inside it is selected
- Disable the drive in the drive selector modal
- Add a "Source Drive" badge to the drive in the drive selector modal

Fixes: https://github.com/resin-io/etcher/issues/830
Change-Type: minor
Changelog-Entry: Prevent flashing the drive where the source image is located.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-06 14:53:08 -04:00
Juan Cruz Viotti
16340b412a doc: workaround to npm shrinkwrap development dependencies bug
There are some npm versions that for some strange reason will attempt to
put *every* single development dependency in the `npm-shinkwrap.json`
file when editing the dependencies list.

This commit describes a workaround I've found to ensure only production
dependencies are added to the file.

I also renamed our `npm run shrinkwrap` script to `npm run
clean-shrinkwrap` since in some recent versions of npm, running `npm
shrinkwrap` will trigger our custom script instead of the original
implementation.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-02-06 14:52:40 -04:00
Juan Cruz Viotti
ea95177e94 test(GUI): fix non-running test in DrivesModel test suite (#1061)
We have a test to ensure a drive is not auto-selected when its
protected, however the real functionality of this test was not being
tested given that the size the fake drive had was not enough to hold the
image.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-30 10:03:24 -04:00
Juan Cruz Viotti
0187cb0b2d upgrade: drivelist to v5.0.8 (#1060)
Change-Type: patch
Changelog-Entry: Fix 'MySQL' is not recognised as an internal or external command error on Windows.
See: https://github.com/resin-io-modules/drivelist/issues/133
Fixes: https://github.com/resin-io/etcher/issues/1025
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-30 10:03:04 -04:00
Juan Cruz Viotti
f0020d9fcf chore: fix undefined TEMPORARY_DIRECTORY variable (#1059)
This variable was renamed to `BUILD_TEMPORARY_DIRECTORY`, but the
Makefile silently expands this to nothing and carries on with the build.

Now that the variable is expanded correctly, we must add it as an
order-only prerequisite so it gets created.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-27 18:01:56 -04:00
Juan Cruz Viotti
7c50f3e742 chore: add a package Makefile target (#1058)
This target would easily allow us to create a package for the
application without being wrapped into an installer, which is
particularly useful to provide custom builds, or test asar related
issues, for example.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-27 13:14:15 -04:00
Juan Cruz Viotti
4f621f6ae3 style(GUI): capitalize every text for consitency purposes (#1056)
Fixes: https://github.com/resin-io/etcher/issues/881
Change-Type: patch
Changelog-Entry: Capitalize every text throughout the application.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-27 11:08:49 -04:00
Juan Cruz Viotti
fd9d3ce749
Revert "refactor: remove extended archives extra functionality (#1055)"
This reverts commit b78473ea0ebd76233217fb4f236bb34be635da90.
2017-01-26 18:36:33 -04:00
Juan Cruz Viotti
b78473ea0e refactor: remove extended archives extra functionality (#1055)
We currently attempt to read extra metadata from ZIP files, such as a
logo, image name, image url, etc. In order to simplify the metadata
story, we decided that this metadata will not live on the image itself,
but rather on a centralised repo, which greatly simplified our custom
archive extraction logic and allows us to make use of these nice
features even when streaming the image directly from the internet.

We'll be working on bringing back this functionality from a centralised
repo in subsequent commits.

Change-Type: major
Changelog-Entry: Remove extended archives metadata extraction logic.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-26 15:21:01 -04:00
Juan Cruz Viotti
1bfcee06e2 refactor(image-stream): stream original/final sizes (#1050)
The `image-stream` module currently returns a readable stream, a
transform stream, a "size", and an optional "estimatedUncompressedSize".

Based on this information, its hard to say what "size" represents. Some
format handlers return the compressed size and provide a decompression
transform stream while others return the decompressed stream directly
and put the decompressed size in "size".

As a way to simplify this, every format handler now returns a "size"
object with the following properties:

- `original`: The original compressed size
- `final.estimated`: Whether the final size is an estimation or not
- `final.value`: The final uncompressed size

As a bonus, we extract the file size retrieval logic to
`imageStream.getFromFilePath()`, which is the onlt part where the
concept of a file should be referred to.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-26 12:01:53 -04:00
Benedict Aas
b25b2d1179 feat(GUI): swap drive and image selection step order (#1049)
Change the first step to be drive selection and the second step to be
image selection, instead of vice versa as it previously was.

Changelog-Entry: Swap the order of the drive and image selection steps.
2017-01-26 12:01:10 -04:00
Juan Cruz Viotti
9dd9065305 refactor(GUI): reuse WarningModalService in FlashErrorModal (#1051)
This is the first commit in a series of changes to normalise the use of
modals throughout the application.

`FlashStateModel` is basically a `WarningModalService` that cleans the
flash state, therefore making it re-use `WarningModalService` directly
removes unnecessary duplication.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 17:06:49 -04:00
Juan Cruz Viotti
4649bace00 style(GUI): change WarningModal title to "Attention" (#1052)
See: https://github.com/resin-io/etcher/pull/1043
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 17:06:16 -04:00
Juan Cruz Viotti
7165c60f0d fix(GUI): normalize button text casing (#1046)
Some button texts are all uppercase, while the remaining of them are
capitalised. This commit capitalises all button texts for consistency
purposes.

Fixes: https://github.com/resin-io/etcher/issues/881
Change-Type: patch
Changelog-Entry: Normalize button text casing.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 10:57:47 -04:00
Juan Cruz Viotti
0e1f50422e refactor: integrate etcher-image-stream into the etcher repository (#1040)
This is a long lasting task. The `etcher-image-stream` project takes
care of converting any kind of image input into a NodeJS readable
stream, handling things like decompression in betwee, however its a
module that, except for weird cases, there is no benefit on having
separate from the main repository.

In order to validate the assumption above, we've left the module
separate for almost a year, and no use case has emerged to keep it
like that.

This commit joins the code and tests of that module in the main
repository.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 10:32:37 -04:00
Juan Cruz Viotti
87a782f6ff fix(GUI): emit an analytics event on ENOSPC (#1044)
There exists a change the user will run out of space on his drive when
flashing an image format for which we can't guarantee its uncompressed
size (e.g: gzip and bzip2).

When that happens, we show a friendly error message explaining what
happened, however we should also be emitting an analytics event.

Change-Type: patch
Changelog-Entry: Emit an analytics event on `ENOSPC`.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 10:32:26 -04:00
Juan Cruz Viotti
2b303f51ba refactor(CLI): rename lib/cli/cli.js to lib/cli/options.js (#1045)
The path `lib/cli/cli.js` is confusing. Rename to `options.js` which is
how we were already referencing the file in `lib/cli/etcher.js`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 10:32:17 -04:00
Juan Cruz Viotti
e5a52c9377 fix(GUI): improve validation error message (#1047)
The current validation message is obscure and tends to lead users to
believe there is a problem with Etcher.

Fixes: https://github.com/resin-io/etcher/issues/735
Change-Type: patch
Changelog-Entry: Improve validation error message.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-25 10:32:07 -04:00
Juan Cruz Viotti
acc1f05269 refactor: move lib/shared/child-writer to lib/child-writer (#1041)
The `child-writer` module is not re-used by both the GUI and the CLI, so
it makes sense to have it in `lib/child-writer`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-24 12:06:34 -04:00
Juan Cruz Viotti
1c99b4b5fc chore: don't print Makefile comments (#1039)
We have a big comment block in the `electron-develop` target which gets
printed everytime the target gets executed.

After some research, turns out GNU Make will ignore the comments if they
are not indented.

See: http://stackoverflow.com/a/18363477/1641422
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-24 11:54:13 -04:00
Benedict Aas
4bf313c7a8 fix(gui): break and wrap bootstrap overflowing tooltip text (#1033)
Instead of letting Bootstrap tooltip text overflow, allow breaks to occur in
words.

Closes: https://github.com/resin-io/etcher/issues/1032
Changelog-Entry: Fix text overflowing on tooltips.
Change-Type: patch
2017-01-17 15:13:07 -04:00
Juan Cruz Viotti
cf1b0904e8 docs: minor edits to ARCHITECTURE.md and CLI.md (#1029)
See: https://github.com/resin-io/etcher/pull/1010
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-17 11:55:19 -04:00
Juan Cruz Viotti
5b3926cf10 v1.0.0-beta.18 2017-01-16 11:02:11 -04:00
Juan Cruz Viotti
e8c4589e1c fix(GUI): don't ignore any robot message from the CLI (#1026)
We recently sent a PR to handle multiple buffered IPC messages being
reported as a single message, confusing `JSON.parse()` in
`lib/shared/child-writer/index.js`, by only sending the last message,
and ignoring the rest, under the assumption that the loss of some state
messages is not critical for the application and the writing process to
work property.

As @lurch pointed out, however, a buffer set of messages might contain
an error object somewhere, and by ignoring all but the last message, we
ignore any error that happened in the way.

See: https://github.com/resin-io/etcher/issues/898
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 18:40:32 -04:00
Benedict Aas
0f2cba38d1 fix: allow undefined drives and images in DriveConstraintsModel (#1016)
Currently the `DriveConstraintsModel` errors when given an `undefined`
drive, or image; this commit changes that behaviour. Comes with tests.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 18:14:09 -04:00
Juan Cruz Viotti
5ec460ae1e chore: run Travis CI GNU/Linux tests in Docker containers (#1018)
This commit makes Travis CI run GNU/Linux tests inside Ubuntu 14.04
i386/x86_64 docker containers.

It includes a set of Dockerfiles with everything needed to
run/build/package Etcher while a nice `run-command.sh` script that can
be used to easily run a command on such Dockerfiles with access to the
Etcher source code.

The main motivation behind change is that generating cross-architecture
AppImages is not possible at the moment (although there are PRs on the
way), so this permits us to configure Travis CI to build and publish
AppImages for all architectures.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 17:37:49 -04:00
Juan Cruz Viotti
543cfea1b4 fix(GUI): expand button in modal menu if its the only one (#1023)
The `.modal-menu` class holds buttons that are shown at the bottom of
the modal. If there are two buttons, the class will show them side by
side with equal sizes, however if there is only one button, it will be
incorrectly resized to 50% of the available space.

Change-Type: patch
Changelog-Entry: Fix alignment of single call to action buttons inside modals.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 17:37:35 -04:00
Juan Cruz Viotti
aea4403a16 refactor: move all byte-size conversion logic to lib/shared/units.js (#1021)
This commit extracts the byte-related conversions from the `byte-size`
AngularJS module and the `FlashStateModel` to a re-usable generic
CommonJS module at `lib/shared/units.js`, than can also be used by the
CLI.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 16:11:28 -04:00
Juan Cruz Viotti
c552494480 refactor: extract application messages to lib/shared/messages.js (#1022)
There are certain application messages that should be re-used between
the CLI and the GUI. In order to allow such re-usability, we extract out
the application messages used in JavaScript into
`lib/shared/messages.js` as a collection of Lodash `_.template`
templates.

Notice this file doesn't include application messages included in
Angular templates directly since it'd be hard to refactor all of them.
We plan to move to React soon, which will allow moving the remaining
messages very easily.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-13 11:03:46 -04:00
Juan Cruz Viotti
2b4b1da492 upgrade: drivelist to v5.0.6 (#1020)
- https://github.com/resin-io-modules/drivelist/issues/130

Change-Type: patch
Changelog-Entry: Fix "This key is already associated with an element of this collection" error when multiple partitions point to the same drive letter on Windows.
Fixes: https://github.com/resin-io/etcher/issues/1004
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-12 15:21:58 -04:00
Juan Cruz Viotti
c707c76633 feat(CLI): improve error messages (#1015)
- Inline dictionary of common error codes and friendly descriptions

We used to rely on `resin-cli-errors` for this, however the friendly
descriptions set there can be usually very Resin CLI specific, and thus
confusing to Etcher users.

The dictionary, along with other error related utilities live in
`lib/cli/errors.js`.

- Print error descriptions and codes if they are found

- Move `utils.printError()` to `errors.print()`

Change-Type: minor
Changelog-Entry: Improve Etcher CLI error messages.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-11 18:45:59 -04:00
Juan Cruz Viotti
6c8ddcea07 chore: remove unnecessary modules from npm-shrinkwrap.json (#1017)
Somehow some development dependencies slipped into the shrinkwrap file,
and in some cases, dependencies we don't use anymore didn't remove its
own now unneeded dependencies when running `npm uninstall`.

This PR carefully removes the packages that are not needed anymore,
which are a lot.

See: https://github.com/resin-io/etcher/issues/820
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-11 17:53:20 -04:00
Juan Cruz Viotti
a14506f016 fix(GUI): open DevTools in detach mode (#1014)
We were previously using the `undocked` mode, which would open DevTools
in a seaprate window, however the user was still allows to pick a new
mode, causing DevTools to be shown inside the main application and
completely ruining the UI.

The `detach` mode in the other hand, completely prevents user from
putting DevTools in the main application, therefore allowing no way to
make the UI look broken.

See: http://electron.atom.io/docs/api/web-contents/
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-11 16:14:03 -04:00
Juan Cruz Viotti
2c64f0da23 chore: add support for snapshot builds (#968)
This commit introduces a `RELEASE_TYPE` option to the Makefile, which
can be either `production` or `snapshot`. If its `production`, the
behaviour its same as it was before.

If `RELEASE_TYPE` is `snapshot`, the shorter version of the current
commit hash is appended to the version (replacing the
`APPLICATION_VERSION` in the Makefile, as well as the `package.json`
version inside the `.asar`), and the publish scripts get configured to
deploy to different "snapshot" locations.

This commit also reduces the size of the version tag in the bottom right
corner a bit so that it fits when the commit hash is appended to it.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 21:37:54 -04:00
Juan Cruz Viotti
0b0b097620 refactor(GUI): extract and test child writer CLI argument utilities (#1012)
These utilities were extracted to `lib/shared/child-writer/cli.js`, and
unit tests have been written for them.

As a result of testing, `.getBooleanArgumentForm()` has been extended to
support single letter options.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 21:36:33 -04:00
Juan Cruz Viotti
971ef7d8f9 chore: make use of the "spec" mocha reporter (#1013)
The "min" mocha reporter clears the screen after each run, causing any
error/warning from the renderer process tests to be visually overwritten
by the main process tests.

Therefore, we now make use of the "spec" mocha reporter.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 21:36:17 -04:00
Juan Cruz Viotti
7fa2f437c1 feat(CLI): replace --robot with an ETCHER_CLI_ROBOT env var (#1010)
The `--robot` option of the CLI causes the program to output
machine-parseable strings, which can be easily consumed by the GUI to
update progress and other information.

The problem is that if the CLI fails to parse its command line arguments
when being called from the GUI for whatever reason, the `.fail()` Yargs
handler will be called, which doesn't output error information in the
usual "robot" format, causing the GUI to not understand the error
message.

Since the `.fail()` Yargs handler doesn't have access to the passed
options, we moved the "robot" functionality to an environment variable,
which we can easily check from there.

As a bonus, this PR refactors the whole robot logic into
`lib/shared/robot.js` and adds unit tests to it.

See: https://github.com/resin-io/etcher/issues/986
Change-Type: major
Changelog-Entry: Replace the `--robot` CLI option with an `ETCHER_CLI_ROBOT` environment variable.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 19:46:59 -04:00
Alexis Svinartchouk
b6333067f9 fix(GUI): make the image selection window a modal (#932) (#1009)
The image selection dialog is attached to the parent window so it is a modal.

Change-Type: patch
Changelog-Entry: Make the image file picker attach to the main window.
2017-01-10 17:39:34 -04:00
Juan Cruz Viotti
54b93a56d2 fix(GUI): fix path to Glyphicons Bootstrap font (#1011)
We've recently moved the compiled CSS output to `lib/gui/css/main.css`,
however we didn't update the relative path to Bootstrap icon web font,
causing every icon to break.

See: https://github.com/resin-io/etcher/pull/1002
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 17:36:13 -04:00
Juan Cruz Viotti
735478bf52 fix(GUI): don't split robot input by new lines inside properties (#1008)
We've recently PRed a commit that handles multiple IPC messages being
triggered at the same time, confusing `JSON.parse()`. As a solution to
such problem, we are splitting the CLI output on new lines, based on the
assumption that each line represents a different object, however we
didn't consider that in the case of errors, we include an `stacktrace`
property which usually includes new line characters, causing such
information to be completely garbled and cause `JSON.parse()` once again
to get confused.

As a solution, we only split by new lines that are not surrounded by
quotes (since they represent a JSON property).

See: https://github.com/resin-io/etcher/pull/997
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-10 12:25:16 -04:00
Juan Cruz Viotti
404eeffbeb chore: compile CSS into lib/gui/css (#1002)
We currently compile CSS into `build/css`, however we plan to use
node-gyp in this project, which can't be configured to build to a
directory other than `build`, therefore, the compiled CSS must move
somewhere else.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-06 15:55:07 -04:00
Ștefan Daniel Mihăilă
050d187e6f refactor: extract SelectionStateModel stateless functions (#982)
`SelectionStateModel`'s methods `isSystemDrive` and `isDriveLocked`
don't depend on application state. They have been extracted in a different
AngularJS service: `DriveConstraintsModel`. The new service's actual
implementation is in `lib/src`, in order to be reused by the CLI.

Miscellaneous changes:

- Rename `lib/src` to `lib/shared`
- Refactor `drive-constraints` to throw when image is undefined

The default behaviour was to pretend that we're all good if the if
the image is not specified. We're not using this "feature", and
it can be dangerous if we forget to pass in the image.

- Make `isSystemDrive` return `false` if `system` property is undefined
- Use `drive-constraints` in `store.js`

Change-Type: patch
2017-01-06 12:42:11 -04:00
Juan Cruz Viotti
dc32699b65 upgrade: drivelist to v5.0.5 (#1001)
- https://github.com/resin-io-modules/drivelist/pull/129

Change-Type: patch
Changelog-Entry: Fix system drives detected as removable drives on Mac Mini.
See: https://github.com/resin-io/etcher/issues/983
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-06 12:22:08 -04:00
Juan Cruz Viotti
2dac3ac079 chore: build x64 and x86 jobs for GNU/Linux (#964)
This change makes Travis CI spawn 3 jobs:

- GNU/Linux with TARGET_ARCH=x64
- GNU/Linux with TARGET_ARCH=x86
- macOS with TARGET_ARCH=x64

We add `make info` before starting the build for convenience.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-06 11:32:53 -04:00
Juan Cruz Viotti
e641265f4d upgrade: etcher-image-write to v9.0.0 (#1000)
This version includes support for retrying up to ten times when EIO
errors are encountered during reading.

See: https://github.com/resin-io-modules/etcher-image-write/pull/70
Fixes: https://github.com/resin-io/etcher/issues/981
Change-Type: patch
Changelog-Entry: Fix sporadic "EIO: i/o error, read" errors during validation.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-06 11:31:16 -04:00
Juan Cruz Viotti
405b98d5ef fix(GUI): multiple JSON objects coming up at once from the IPC client (#997)
The GUI executes the CLI and pipes every line of output coming from
either `stdout` or `stderr` to the IPC server as "messages."

In some scenarios, the child process data handler might receive multiple
lines of output at the same time. Since the CLI outputs stringified JSON
objects each in a different line, trying to parse two JSON objects
separated by a new line causes the parser to crash.

As a solution, we split the data coming in by new lines (`\r\n` in
Windows), and emit a message for only the last one.

Fixes: https://github.com/resin-io/etcher/issues/898
Changelog-Entry: Fix "Invalid message" error caused by the IPC client emitting multiple JSON objects as a single message.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-05 13:59:56 -04:00
Juan Cruz Viotti
e82e6bdc5c chore: don't upgrade npm to latest on Appveyor (#999)
Running `npm install -g npm` causes npm to be upgraded to v4, which
seems to have the following bug when running `npm install`:

```
npm ERR! Callback called more than once.
```

Not upgrading npm on our Appveyor builds causes npm to stay at v3, and
the problem dissapears.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-05 12:21:22 -04:00
Juan Cruz Viotti
e210a2ba0e upgrade: etcher-image-write to v8.1.5 (#998)
- https://github.com/resin-io-modules/etcher-image-write/pull/73

Fixes: https://github.com/resin-io/etcher/issues/834
Changelog-Entry: Fix "EIO: i/o error, write" error.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-01-05 11:20:19 -04:00
Benedict Aas
ec3c74d7e5 feat(gui): sort file picker extensions alphabetically (#991)
We sort the supported file extensions listed in the file picker
in alphabetical order.

See: https://github.com/resin-io/etcher/issues/984
Changelog-Entry: Sort supported extensions alphabetically in the image file-picker.
Change-Type: patch
2016-12-30 00:44:13 -04:00
Benedict Aas
de6ad80038 feat(gui): add referers to etcher.io links (#990)
We add referers to the two etcher.io links in the interface—one for the
update link, and one for the footer logo link.

Closes: https://github.com/resin-io/etcher/issues/987
2016-12-30 00:43:31 -04:00
Juan Cruz Viotti
5fb7b30584 Set theme jekyll-theme-minimal 2016-12-21 17:53:10 -04:00
Benedict Aas
d7e1fe09fc feat(gui): label system drives in drive-list widget (#978)
System drives in the drive-list widget now have a red warning label
beneath. Also new is the `isSystemDrive()` method under
`SelectionStateModel` and its unit-tests.

See: https://github.com/resin-io/etcher/issues/888
Changelog-Entry: Label system drives in the drive-list widget
2016-12-16 10:41:04 -04:00
Andrew Scheller
e8544cf315 doc: Move the asar requirement from "Windows" to "Common" (#977)
Asar is needed by all the `electron-installer-*` targets
2016-12-15 12:31:49 -04:00
Juan Cruz Viotti
99538e3120 doc: recommend make electron-develop to clean dependency tree (#974)
Because of NPM shrinkwrap, we recommend having a clean dependency tree
in `CONTRIBUTING.md` before upgrading a dependency. We currently
recommend maually wiping out `node_modules`, but since the
`electron-develop` make target already does that, is more user friendly
to recommend that instead.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-13 14:03:09 -04:00
Juan Cruz Viotti
8e7599b366 chore: implement electron-configure-package-win32.sh (#962)
This script configures an Electron package on Windows.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-13 11:04:09 -04:00
Juan Cruz Viotti
cc96a0c1fe chore: persist temporary artifacts during AppImage builds (#936)
Currently, `electron-installer-appimage.sh` deletes temporary stuff it
needs as it goes (like the AppDir, AppImageAssistant, or even the
AppImage after creating a ZIP). Since this is not very Make-friendly,
the script has been split into the following smaller scripts that
perform a single task:

- `electron-create-appimage-linux.sh`
- `electron-create-appdir.sh`

Utilising them in different Makefile rules effectively results in Make
persisting the "temporary artifacts".

See: https://github.com/resin-io/etcher/pull/913#discussion_r90801230
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-13 10:53:10 -04:00
Andrew Scheller
50b69ad06b chore: download files to a temporary filename first, then rename (#973)
This avoids the failure-mode where wget got interrupted (e.g. network error
or server timeout), which caused the download-tool.sh to stop, which caused
the current make to stop. However if you then ran make again, it would see
that the file existed (and not know that it was incomplete / corrupt) and so
not try downloading it again. This commit fixes the problem by modifying
download-tool.sh to download to a temporary filename, and only rename to the
final destination filename after the checksum has been verified.
2016-12-12 16:46:27 -04:00
Andrew Scheller
07713fe6b1 chore: remove backslash-escaping in Makefile errors & warnings (#972)
They're unnecessary, and actually cause the backslash to get printed.
2016-12-12 15:34:58 -04:00
Andrew Scheller
d42291ef9d chore: add distclean target to Makefile (#971)
This new target also deletes the `node_modules` and `bower_components`
directories, taking the project directory to a totally pristine state.
2016-12-12 15:34:47 -04:00
Juan Cruz Viotti
e6d5d9c910 chore: run tests in x64 and x86 in Appveyor (#963)
This will allow us to later publish development builds for both
architectures from Appveyor. In order to easily do so, the Makefile is
used instead of the current `./scripts/build/windows.bat`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-12 14:33:16 -04:00
Andrew Scheller
61860a79e3 chore: fix check-dependency.sh to work with arguments containing spaces (#969) 2016-12-11 19:09:57 -04:00
Andrew Scheller
c4a92d772d chore: fix error functions in Makefile (#970)
`$(error ...)` (and `$(warning ...)`) functions in a Makefile can't be indented - if they are make displays a `*** commands commence before first target. Stop.` error.
2016-12-11 18:45:26 -04:00
Juan Cruz Viotti
db379bd341 chore: use $(BUILD_OUTPUT_DIRECTORY) in PUBLISH_* accumulators (#965)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-11 18:43:00 -04:00
Juan Cruz Viotti
5e987f2f1e chore: fix electron-sign-app-darwin.sh reference (#967)
`electron-sign-dmg-darwin.sh` was incorrectly referring to
`scripts/build/electron-sign-app-darwin.sh` as
`scripts/darwin/electron-sign-app.sh`, causing the DMG builds to fail in
OS X.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-10 15:32:41 -04:00
Juan Cruz Viotti
47d3f0c8fa chore: create re-usable check-dependency.sh script (#959)
We have a little snippet to check if a dependency is installed on the
system that we're literally copy-pasting in every single script in the
build system script collection.

For re-usability purposes, this snippet has been extracted to a
`check-dependency.sh` that is called by every script that needs it.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-09 10:48:01 -04:00
Juan Cruz Viotti
446e457b5b chore: move directory creation responsibility to Makefile (#946)
This commit adds new rules to create directories and sets order only
pre-requisites to the existing rules as a way to centralise directory
creation, which is currently scattered around all the build scripts.

See: https://github.com/resin-io/etcher/pull/923#discussion_r90881453
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-09 10:40:15 -04:00
Juan Cruz Viotti
b0f94b58ca chore: fix small spacing issue in Makefile (#960)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-08 15:26:46 -04:00
Juan Cruz Viotti
d6fbbeff80 chore: update npm configuration in dependencies-npm.sh (#961)
- The Electron npm headers can now be downloaded from
  https://atom.io/download/electron

- We can configure gyp to build from source by using the
  `npm_config_build_from_source` environment variable rather than having
  to pass `--build-from-source`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-08 15:26:33 -04:00
Andrew Scheller
d9148d585e chore: add publishing Makefile targets (#955)
If there are any files publishable to S3 then a `publish-aws-s3` target will
automagically exist, and similarly if there are any files publishable to
Bintray then a `publish-bintray-debian` target will automagically exist.
Like all phony targets, these get displayed by `make help` when available.
2016-12-08 13:47:42 -04:00
Juan Cruz Viotti
57b89bd77b chore: implement download-tool.sh script (#957)
This script is in charge of downloading any asset from the internet
required by the build system. It accepts a SHA256 checksum and it uses
it to ensure the downloaded file integrity.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-08 12:56:08 -04:00
Juan Cruz Viotti
88d0497982 docs: remind to add S3 links to GitHub Releases entries (#956)
We are now going to be adding links to files published in AWS S3 in
GitHub Releases, so that people used to finding pre-built versions of
the software in GitHub Releases will be re-directed to the right place,
while we still keep the analytics advantages that S3 provides us.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-08 11:57:55 -04:00
Andrew Scheller
4090fe93ad chore: speed up make startup time by using jq (#958)
By changing the `Makefile` to use `jq` instead of `node` for getting settings
from `package.json`, the time to do `make help` drops from over 1.5 seconds to
under 0.05 seconds!
2016-12-08 11:57:22 -04:00
Juan Cruz Viotti
c14257720f chore: group build scripts inside scripts/build (#940)
This makes it easier to have re-usable functionality that we can
call/source from all scripts, like logic to determine the current
operating system, or to check for a dependency in the `$PATH`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-08 11:06:35 -04:00
Andrew Scheller
316d462526 chore: add help Makefile target to show available targets (#954)
Also sets `help` as the default target, so that typing just `make` displays
the list of possible targets. Also customises the list of targets based on
TARGET_PLATFORM (because you can't build e.g. `electron-installer-dmg` when
you're on Linux).
2016-12-07 11:22:41 -04:00
Juan Cruz Viotti
b80bab4562 chore: upgrade Etcher build system to use Visual Studio 2015 (#947)
This version was not working the last time we checked, but it looks like
there were some advancements in node-gyp in the previous months, and all
dependencies have upgraded to it already.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-07 10:35:54 -04:00
Juan Cruz Viotti
ffe0d33026 chore: require MinGW to build Etcher on Windows (#948)
Using MinGW allows us to re-use the build scripts we've been developing
for GNU/Linux and OS X, which are much more robust than their `*.bat`
counterparts (due to Batch limitations).

This commit does the following changes:

- Documents MinGW as a requirement in `RUNNING-LOCALLY.md`
- It setups MinGW in Appveyor CI
- Transforms `windows/sign.bat` into `windows/electron-sign-exe.sh`
- Re-uses `dependencies-npm.sh` and `dependencies-bower.sh` in
  `build/windows.bat`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-07 09:51:05 -04:00
Benedict Aas
cce9ce25d7 feat(gui): show available version in update notifier modal (#928)
We show the Etcher version string in the update notifier modal, by giving
the version string to the template through options similar to the warning
modal.

- We memoize the version Promise and assume the update version won't change
  during runtime.

Changelog-Entry: Show available Etcher version in the update notifier.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-06 11:33:52 -04:00
Juan Cruz Viotti
b63f967d44 chore: set msvs version on dependencies-npm.sh when running on Windows (#943)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 23:01:04 -04:00
Juan Cruz Viotti
f889a0862a chore: don't include *.dll files inside the asar archive (#944)
This change is needed to make `electron-create-asar.sh` output valid
asar packages on Windows (Msys).

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 22:56:34 -04:00
Juan Cruz Viotti
457ce16722 chore: make code-signing optional in OS X (#939)
Code-signing in OS X now relies on the presence of a
`CODE_SIGN_IDENTITY` variable. If it doesn't exist, all the builds will
gracefully complete without code-signing.

As a consequence of this change, the `electron-installer-dmg.sh` script
has been divided into `electron-create-readwrite-dmg.sh`,
`electron-create-readwrite-dmg.sh`, and `electron-sign-dmg.sh`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 22:21:28 -04:00
Juan Cruz Viotti
00b66a9cf7 chore: use pushd/popd instead of --prefix on dependencies-npm.sh (#941)
We currently use the `--prefix` option in `dependencies-npm.sh` to
install dependencies in another directory, however that function causes
ENOSELF to be thrown on Windows under Msys. As a solution, we take the
same `pushd`/`popd` approach as we do in `dependencies-bower.sh`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 21:40:50 -04:00
Juan Cruz Viotti
457c8d194f chore: fix certificate verification error with wget on MinGW (#942)
The `electron-download-package.sh` script yields the following error on
MinGW:

```
cannot verify github.com's certificate
```

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 21:25:41 -04:00
Juan Cruz Viotti
d8aee43f2d chore: simplify .travis.yml dependencies installation across OSes (#938)
After our recent changes, the command to install dependencies for both
OS X and GNU/Linux has been unified as `make electron-develop`, so there
is no longer a need to have multiple conditionals for each OS in
`.travis.yml`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 15:52:50 -04:00
Juan Cruz Viotti
bf2ff121f3 chore: symlink manifests in dependencies scripts (#935)
See: https://github.com/resin-io/etcher/pull/934#issuecomment-264862767
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 15:42:42 -04:00
Juan Cruz Viotti
92bc79df15 chore: move electron package caching responsibility to GNU Make (#926)
Currently, `scripts/unix/electron-download-package.sh` contains its own
logic to determine if the package was already downloaded.

This commit takes the electron package uncompressing task to the
configure scripts, and reduce `electron-download-package.sh` to a script
that simply downloads the zip to a certain location, since this change
allows us to have a separate Make rule to download the Electron zip (and
thus have Make take care of caching).

After this change, the `electron-configure-package-*.sh` scripts are no
longer routines that modify a certain directory, but scripts that take
the zip as an input and actually create the package directory, which
aligns better with Make's design.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 12:28:35 -04:00
Juan Cruz Viotti
dcf5a5c2f4 chore: move bower.json removal after popd in dependencies-bower.sh (#934)
The reason for this change is to make things more explicit.

See: https://github.com/resin-io/etcher/pull/923#discussion_r90571316
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 11:15:03 -04:00
Benedict Aas
e24c2b6466 feat(GUI): confirm before quitting etcher while writing (#868)
When Etcher is writing to a drive and the user closes the window,
currently there is no confirmation. This commit changes that and
the user has to confirm the exit.

Other changes include the warning modal taking a `rejectionLabel` option
that shows a reject button when provided.

Closes: https://github.com/resin-io/etcher/issues/744
Change-Type: minor
Changelog-Entry: Confirm before user quits while writing.
2016-12-05 10:56:38 -04:00
Benedict Aas
ae6b707bb4 feat(gui): add changelog link to update notifier (#920)
We add a blue clickable link to the Github changelog in the update dialog
modal.

Closes: https://github.com/resin-io/etcher/issues/905
Change-Type: patch
Changelog-Entry: Add a changelog link to the update notifier modal.
2016-12-05 10:55:33 -04:00
Juan Cruz Viotti
0c1f9e93ba chore: use rmdir to delete empty npm etc/ directory (#933)
NPM might create an empty `etc/` directory when calling it with the
`--prefix` option and we have a check to see if this directory indeed
exists and its empty in order to proceed and delete it.

We currently use `rm -rf` for it, even though `rmdir` is sufficient.

See: https://github.com/resin-io/etcher/pull/923#discussion_r90570968
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-05 00:16:13 -04:00
Andrew Scheller
ce206fc0b7 chore: fix the bintray-debian publishing script (#930)
This change prevents the script erroring with `BINTRAY_USER: unbound variable` when `$BINTRAY_USER` isn't defined, and instead displays the "Please define the following ..." message as expected.
2016-12-04 20:24:50 -04:00
Andrew Scheller
9d92d58711 chore: attempt to fix Travis builds (#931) 2016-12-03 23:25:54 -04:00
Juan Cruz Viotti
9c02f976ae style: use GNU Make foreach instead of a shell for loop (#927)
Just for conciseness and style.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-02 10:27:25 -04:00
Andrew Scheller
223932eb7b chore: exit with error code 1 on build script usage section (#925) 2016-12-01 20:34:37 -04:00
Juan Cruz Viotti
b7aee7affe chore: attempt to re-use $TMPDIR in installer-appimage.sh (#917)
We currently hardcode the temporary directory location to `/tmp`. Some
Linux systems define `$TMPDIR`, so we should attempt to re-use that
first.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 19:52:27 -04:00
Juan Cruz Viotti
832bfad9d1 chore: reuse npm/bower dependencies across builds (#923)
Currently, we create a "resources app" and install dependencies on it.
This means that to create another "resources app", the whole dependency
installation process needs to be repeated.

As a solution, we cache dependencies at
`release/electron-$(TARGET_PLATFORM)-$(TARGET_ARCH)-dependencies/` and
copy them to the resources apps as we need them.

This has the additional benefit that the resources app depends on the
dependencies rather than the other way around (dependencies depend on
the resources app), which didn't feel right.

In order to accomodate to these changes, the dependencies scripts are
now in charge of taking their corresponding manifests with them when the
prefix option is passed, given that neither `npm` nor `bower` allow to
customise the output location.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 19:52:07 -04:00
Juan Cruz Viotti
2b7f36a3c7 style: convert spaces to tabs in Makefile (#924)
Additionally, we setup an EditorConfig rule to automatically switch to
tab style on Makefile.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 19:51:53 -04:00
Juan Cruz Viotti
68a71d89e2 chore: add Makefile to build OS X and GNU/Linux (#922)
This Makefile ties together all the build scripts we've been developing
so far. It currently only supports UNIX based operating systems, but
Windows support will be added soon.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 15:16:47 -04:00
Juan Cruz Viotti
4f233f20e0 chore: move GNU/Linux zip generation to installer-appimage (#913)
Currently, `installer-appimage` creates only the AppImage, and we rely
on code outside the main task to package it up as a Zip. Since Zip is
a required step for AppImage deployment (since the AppImage will lose
its execution permissions if its moved around), we integrate Zip
generation into the AppImage task itself.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 12:29:27 -04:00
Juan Cruz Viotti
6f0fe93aad chore: improve naming of build scripts (#918)
- `darwin/configure-electron.sh` -> `darwin/electron-configure-package-darwin.sh`
- `darwin/installer-zip.sh` -> `darwin/electron-installer-app-zip.sh`
- `darwin/installer-dmg.sh` -> `darwin/electron-installer-dmg.sh`
- `darwin/sign.sh` -> `darwin/electron-sign-app.sh`
- `linux/configure-electron.sh` -> `linux/electron-configure-package-linux.sh`
- `linux/installer-appimage.sh` -> `linux/electron-installer-appimage.sh`
- `linux/installer-deb.sh` -> `linux/electron-installer-debian.sh`
- `unix/create-asar.sh` -> `unix/electron-create-asar.sh`
- `unix/create-electron-app.sh` -> `unix/electron-create-resources-app.sh`
- `unix/download-electron.sh` -> `unix/electron-download-package.sh`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 12:11:08 -04:00
Juan Cruz Viotti
100ab79eab chore: exit with error code 1 on build script usage section (#916)
We're currently exitting with error code 0 when displaying the usage
information on build scripts, which means that if the user forgets or
mistypes an option argument, the script will carry on its way.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 11:58:10 -04:00
Andrew Scheller
fa958537c1 docs: Update 'announcing' section of Publishing instructions (#921) 2016-12-01 11:40:54 -04:00
Juan Cruz Viotti
b2124499c7 chore: extract code-signing logic from windows.bat to sign.bat (#911)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 10:59:26 -04:00
Juan Cruz Viotti
5b6f3cca60 chore: split dependencies.sh into bower and npm scripts (#914)
The purpose of this change is to stay true to the Makefile approach,
where each rule is meant to create a single directory/file.

Currently, `unix/dependencies.sh` resulted in `bower_components` and
`node_modules`. Splitting this rule also means that we don't have to
install bower dependencies where we don't need them (e.g: the CLI).

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 10:58:26 -04:00
Juan Cruz Viotti
7f79384b71 chore: cache chocolatey installs as recommended by Appveyor (#915)
We tried to save the Chocolatey cache in a previous PR, but it looks
like its not working properly. This PR implements the "correct" way to
cache Chocolatey installs, as recommended in Appveyor forums.

The arrows mean that the cache is invalidated if the file in the right
side (`appveyor.yml`) in this case, is changed.

See: http://help.appveyor.com/discussions/suggestions/592-speeding-up-chocolatey-downloads-and-installs
See: e603cb0838
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-12-01 10:58:14 -04:00
Juan Cruz Viotti
a8116250d2 chore: install dependencies directly in package (#909)
Previously, the build scripts would override the top level
`node_modules` and `bower_components`. After this commit, the
dependencies are installed directly in the Electron package.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-30 11:38:31 -04:00
Juan Cruz Viotti
43922f94c0 chore: extract dependencies.bat from windows.bat (#910)
The logic to install dependencies on Windows now separately lives in
`scripts/windows/dependencies.bat`, similarly to what we've been done
with other operating systems.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-30 11:33:47 -04:00
Benedict Aas
cfeb35b531 feat(GUI): allow double-click to quick-select drives (#889)
The user can now double-click to swiftly select a drive in the
drive widget instead of having to toggle a drive and then clicking the
continue button to close the modal and finalize the drive selection.

Closes: https://github.com/resin-io/etcher/issues/880
Change-Type: patch
Changelog-Entry: Implement double-click to quick-select drives in the
drive widget.
2016-11-30 11:11:11 -04:00
Benedict Aas
ccd2076a20 fix(GUI): show not-allowed cursor over unselectable drives (#886)
The cursor is incorrectly a pointer on hover over a disabled and
unselectable drive in the drive selector widget. This patch changes the
cursor to `not-allowed`, providing the user with visual feedback that it is
not selectable.

Fixes: https://github.com/resin-io/etcher/issues/865
Change-Type: patch
Changelog-Entry: Use not-allowed cursor over disabled drives in the
drive selector widget.
2016-11-30 11:06:41 -04:00
Andrew Scheller
b8ffd24cce chore: refactor and enhance dependency checking in build scripts (#908)
This refactors the way that the build shell-scripts check for dependencies
in order to cut down on code duplication, and also adds additional
dependency-checks that were missing previously.

Change-Type: minor
2016-11-29 19:37:31 -04:00
Juan Cruz Viotti
2397b5d2aa chore: don't include LICENSE and version in OS X package (#907)
Including them means we have to nicely display them in the final `.dmg`.
For simplicity reasons, we'll omit it for now.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-29 19:18:31 -04:00
Juan Cruz Viotti
ad3636c31a fix: don't lock installer-cli architecture to x64 in build scripts (#904)
We were accidentally hardcoding the installer generation to `x64`.

See: https://github.com/resin-io/etcher/pull/896#discussion_r89999295
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-29 15:20:59 -04:00
Juan Cruz Viotti
55bd372082 v1.0.0-beta.17
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-28 09:58:29 -04:00
Juan Cruz Viotti
0ed4f5d3c8 chore: adopt new build command convention for OS X (#903)
The `darwin.sh` script now accepts the following commands:

- `develop-electron`
- `installer-dmg`
- `installer-zip`

In order to accomplish this, `./scripts/darwin/package.sh` is no longer
relying on `electron-packager`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-28 09:56:14 -04:00
Juan Cruz Viotti
7794bf06d1 refactor: extract electron downloading logic to its own script (#902)
This will allow us to easily re-use this functionality in the OS X
package script.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-28 01:13:12 -04:00
Juan Cruz Viotti
6e0d8e1f5c refactor: ditch electron-osx-sign for OS X signing (#901)
Making use of `codesign` directly allows us to have much more
flexibility in how we sign things, which will prove very valuable when
adapting this `sign.sh` script to code sign the Etcher CLI.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-28 01:13:02 -04:00
Juan Cruz Viotti
19b3bc56c2 chore: adopt new build script command convention in GNU/Linux (#899)
The GNU/Linux build script (as the rest of the OSes will in the near
future), now accepts the following command:

- `develop-electron`
- `develop-cli`
- `installer-cli`
- `installer-appimage`
- `installer-debian`

Each of the commands is now completely independent from the others.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-27 22:29:23 -04:00
Juan Cruz Viotti
553f7f3f4b refactor: get rid of electron-packager in GNU/Linux (#897)
In order to take a whitelisting approach to dependencies, the
`unix/dependencies.sh` script is ran as part of packaging as well, but
passing the `-p` (production) flag.

In the future, the current `install`, `package`, and `installer` targets
will be deplaced by `develop-<type>`, `installer-<type>`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 16:13:59 -04:00
Juan Cruz Viotti
151d19ce63 chore: add "cli" command to GNU/Linux and OS X build script (#896)
This is the first step towards properly publishing the Etcher CLI. The
option is not present in Windows yet, and its intentionally undocumented
for the time being.

See: https://github.com/resin-io/etcher/issues/355
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 14:11:13 -04:00
Juan Cruz Viotti
a01c9aa6b1 refactor: improve and unify dependencies.sh script across UNIX targets (#894)
- Unify both `linux/dependencies.sh` and `darwin/dependencies.sh` in
  `unix/dependencies.sh`

- Add `-f` (force) option to `unix/dependencies.sh`

- Add `-p` (production) option to `unix/dependencies.sh`

- Allow passing a target type to `unix/dependencies.sh`

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 12:57:09 -04:00
Juan Cruz Viotti
7d51dea35d fix(CLI): always omit first two elements of process.argv (#891)
This is a great simplification to the logic previously included in the
Yargs `.parse()` function on the Etcher CLI.

There is no scenario where the CLI script will be executed in a
standalone fashion (e.g: `etcher.js <options>`), so we can always safely
drop the first two elements from `process.argv`.

Change-Type: patch
Changelog-Entry: Fix command line arguments not interpreted correctly when running the CLI with a custom named NodeJS binary.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 12:56:54 -04:00
Juan Cruz Viotti
3eac1762b1 upgrade: drivelist to v5.0.4 (#893)
- https://github.com/resin-io-modules/drivelist/pull/125

Change-Type: patch
Changelog-Entry: Fix drive scanning exceptions on GNU/Linux systems with `net.ifnames` enabled.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 12:56:44 -04:00
Juan Cruz Viotti
c4868995aa chore: add appdmg and ds-store to shrinkwrapIgnore (#895)
These dependencies are suddently causing issues when running `npm
install` in platforms other than OS X.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-25 12:08:29 -04:00
Juan Cruz Viotti
f0bc04c238 refactor: extract GNU/Linux build scripts into many files (#890)
Related changes

- Remove AppImages related binary blob from `scripts/build/AppImages` and
  fetch them from the internet instead.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-23 12:20:51 -04:00
Juan Cruz Viotti
2f980e808f chore: add x86 architecture support for darwin/dependencies.sh (#883)
We don't really do x64 builds for OS X at the moment, but nice to make
the build scripts consistent.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 17:28:23 +00:00
Benedict Aas
18799d4274 fix(GUI): wrap long words in drivelist (#882)
Drives with long names or descriptions expand outside the drivelist,
this commit fixes that using CSS `word-break: break-all`.

Change-Type: patch
Changelog-Entry: Wrap drive names and descriptions in the drive selector widget.
2016-11-18 17:28:10 +00:00
Juan Cruz Viotti
8d44c9b86c refactor: extract OS X build script into many files (#875)
This is the first step towards decoupling the build system as many
different scripts, for maintainability and convenience purposes.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 16:54:14 +00:00
Juan Cruz Viotti
ca4d05ced0 refactor(GUI): resolve undefined on modal keyboard bindings (#879)
Currently we resolve `false`, which might not mean very much to some
modal use cases. `undefined` is a much more generic falsy value.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 15:23:10 +00:00
Benedict Aas
e85906d50d fix(GUI): pressing escape cancels modal dialogue (#878)
Pressing the ESC key in any modal dialogue currently just emits a
message. This change actually cancels the modal, closing it.

Closes: https://github.com/resin-io/etcher/issues/874
Change-Type: patch
Changelog-Entry: Allow the user to press ESC to cancel a modal dialog.
2016-11-18 12:55:30 +00:00
Juan Cruz Viotti
938fa71d50 fix(GUI): terminate IPC server on any errors (#872)
If the child process (e.g: writer proxy, or CLI) emits either an error,
or an invalid output, the error will be emitted to the GUI, which will
report it to the state machine, however the IPC server will keep
receiving further messages, which will be passed to the GUI, which will
keep trying to update the state, in which case Redux will rightfully
complain that we can't update the flashing state if there is no flash in
process.

As a solution, we make sure the IPC server is terminated on every
possible error code flow, and to do this effectively, we needed to
manually destroy every connected socket before actually closing the
server.

Change-Type: patch
Changelog-Entry: Fix "Can't set the flashing state when not flashing" error.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-18 11:58:00 +00:00
Juan Cruz Viotti
9b6cd5c81c chore: update "join us" email to join+etcher@resin.io (#873)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-17 09:05:37 +00:00
Juan Cruz Viotti
4296868ff7 upgrade: drivelist to v5.0.3 (#871)
See: https://github.com/resin-io-modules/drivelist/pull/120
Fixes: https://github.com/resin-io/etcher/issues/870
Change-Type: patch
Changelog-Entry: Fix `0x80131700` error when scanning drives on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 14:29:34 +00:00
Juan Cruz Viotti
6456a8fe96 upgrade: drivelist to v5.0.1 (#869)
- Fix internal SDCard reader descriptions in GNU/Linux.
- Transform `mountpoint` into an array of mountpoints.

Change-Type: patch
Changelog-Entry: Fix internal SDCard drive descriptions.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 13:52:20 +00:00
Juan Cruz Viotti
8992db807d fix(GUI): kill CLI processes when child writer dies (#855)
Turns out that when the parent process gets SIGKILL, the children
process would still remain alive.

In order to mitigate this, we force the IPC client opened by the child
writer to not attempt to reconnect to the IPC server if this one dies,
so we can catch the "disconnect" event and kill the children as a
result.

Fixes: https://github.com/resin-io/etcher/issues/850
Change-Type: patch
Changelog-Entry: Fix writing process remaining alive after the GUI is closed.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-16 00:48:29 +00:00
Juan Cruz Viotti
b4f1d82a51 fix(CLI): check CLI elevation early on (#864)
The CLI requires elevation permissions to actually be able to write to
drives. For this reason, it makes sense that we introduce such a check
early on.

See: https://github.com/resin-io/etcher/issues/726
Change-Type: patch
Changelog-Entry: Check available permissions in the CLI early on.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-14 11:22:08 +02:00
Juan Cruz Viotti
4e3bdb7e22 refactor(CLI): move UNIX umount functionality to repository (#866)
- Move UNIX unmount functionality to the CLI module
- Run `electron-mocha` for the CLI code
- Make unmount command templates that take a `drivelist` object as input

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-14 11:11:49 +02:00
David Lechner
f80feb9edf docs: more explicit key server (#861)
Use full URL with port for key server. Also use port 80 to work around firewalls and proxies.

Fixes: #859
2016-11-13 13:14:11 +02:00
Benedict Aas
2c07bce25f style(GUI): clarify wording at finished flash prompt (new → different) (#867)
Currently, the wording "same" versus "new" on the completion screen
is ambiguous when they respectively mean use the same image file, or use a new
and different image file. Therefore, change the wording from "new" to
"different".

Closes: https://github.com/resin-io/etcher/issues/839
2016-11-12 11:22:03 +02:00
Juan Cruz Viotti
6e03a00008 upgrade: electron-mocha to v3.1.1 (#854)
The current version would exit with error code 0 even when the tests
failed, causing CI servers to report false positives.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 22:20:11 +02:00
Juan Cruz Viotti
dae07ad050 test: fix failing ImageSelectionController tests (#856)
This was a small issue affected due to the change in order of the
supported extensions in the ImageSelectionController.

Since we want to test that the array contents are equally the same
independently on the order, we sort both sides of the assertion.

This issue was not caught before since `electron-mocha` was reporting
exit code 0 even when there were changes failing, causing the CI
services to incorrectly support success.

See: https://github.com/resin-io/etcher/pull/854
See: https://github.com/resin-io/etcher/pull/806
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 21:23:30 +02:00
Juan Cruz Viotti
5d25ef7dee docs(GUI): publishing a new version to homebrew cask (#837)
Publishing to Homebrew Cask involves changing a Cask file in the
official Cask registry pull request updating the `version` and `sha256`
properties.

See: https://github.com/caskroom/homebrew-cask/pull/26319
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 17:04:22 +02:00
Juan Cruz Viotti
0085880d3c chore: add productDescription to package.json (#842)
This key is added as the long description of the Debian package.
Omitting this option means that `description` is duplicated two times,
which is of course not the desired outcome.

See: https://github.com/resin-io/etcher/issues/632
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-09 17:04:05 +02:00
Juan Cruz Viotti
9c4afa0680 upgrade: umount to v1.1.5 (#843)
The changes we're interested in are:

- Escape device paths containing spaces.

Change-Type: patch
Changelog-Entry: Fix unmount issues in GNU/Linux and OS Xwhen paths contain spaces.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 18:07:57 +02:00
Juan Cruz Viotti
5a48395d6d style(GUI): unify "close" top right corner X in all modals (#841)
Every modal in the application should contain the same "close" X at the
top right corner, for consistency purposes. The only modal lacking this
button was the update notifier modal.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:56:03 +02:00
Juan Cruz Viotti
5d42fd181a minifix(GUI): improve unsafe mode setting dialog (#840)
- Change dialog message to "Are you sure you want to turn this on? You
  will be able to overwrite your system drives if you're not careful."

- Remove "CANCEL" button and put a cross at the top right corner.

- Change dialog button label from "YES, CONTINUE" to "ENABLE UNSAFE
  MODE"

In order to adapt to changes described above:

- `WarningModalService.display()` now takes an object including
  `description`, and `confirmationLabel`

Fixes: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:13:26 +02:00
Juan Cruz Viotti
136d935eed upgrade: etcher-image-write to v8.1.4 (#831)
We're interested in the following change, which causes the last
unaligned block on an image to be aligned to 512K instead of to 1M if
its smaller than 512K, and to 1M otherwise.

- https://github.com/resin-io-modules/etcher-image-write/pull/58

Fixes: https://github.com/resin-io/etcher/issues/685
Change-Type: patch
Changelog-Entry: Fix "Not Enough Space" error when flashing unaligned images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:02:23 +02:00
Juan Cruz Viotti
611a59dbd8 docs: add instructions on how to install from Cask and Bintray (#832)
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 17:02:11 +02:00
Juan Cruz Viotti
1cc2cb9bad minifix(GUI): warning modal size class (#838)
The `settings-dangerous-modal` modal size class doesn't exist anymore,
and was renamed to `warning-modal`. This was causing the exclamation
sign from the header to not be displayed in red, as it should.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-07 14:25:37 +02:00
Juan Cruz Viotti
71a73ab6c8 docs: list of major technologies used by Etcher (#826)
This commit notes down the most important technologies used by Etcher,
so that contributors know what they should focus their learning in.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 16:00:18 -04:00
Juan Cruz Viotti
5ac486d941 style: refer to Resin.io as resin.io, according to the style manual (#823)
> For all, lower-case capitalization unless beginning a sentence (Ex. I
> like resin.io. Resin.io is great.)

See: https://github.com/resin-io/docs#style-manual
See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 10:57:29 -04:00
Juan Cruz Viotti
af0cfd9587 chore: update package.json and README.md to match repo description (#824)
Repository description says "Flash OS images to SD cards & USB drives,
safely and easily.", while `package.json` currently says "An image
flasher with support for Windows, OS X and GNU/Linux.", and `README.md`
contains "Flash OS images to SD cards & USB drives, safe & easy."

See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 09:41:41 -04:00
Juan Cruz Viotti
adfa0fcd83 chore: remove removedrive from dependencies (#825)
This dependency is already being listed in `optionalDependencies`, which
the place it really belongs to.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-03 09:41:32 -04:00
Juan Cruz Viotti
f16e176b0f minifix(GUI): keep settings checkboxes unchecked until user confirms (#821)
There are some settings, such as "unsafe mode", that prompt the user for
confirmation before actually confirming the setting. In these cases,
when the user attempts to check the checkbox, the checkbox remains
checked unless the user rejects the confirmation dialog, in which case
the checkbox value is reverted.

In order to provide a better UX, we now keep the checkbox unchecked
until the user confirms.

See: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:25:29 -04:00
Juan Cruz Viotti
8b47c3f017 chore: add bintray debian publishing script (#819)
This script can be used to publish Etcher debian packages to Bintray.

See: https://github.com/resin-io/etcher/issues/632
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:24:28 -04:00
Juan Cruz Viotti
e2652e6ee9 style(GUI): improve wording of supported extensions label (#807)
- Change "and many more" to "and others"

See: https://github.com/resin-io/etcher/issues/787
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 18:24:01 -04:00
Juan Cruz Viotti
9ed6e30b00 style(GUI): improve ordering of supported extensions (#806)
The new ordering of the main supported extensions will be: `img`, `iso`,
`zip`.

We make use of `_.intersection` in order to ensure that the values we're
hardcoding indeed exist in the list of all supported format extensions,
otherwise they won't appear at all. This ensures we never show
extensions that are not supported.

Partly fixes: https://github.com/resin-io/etcher/issues/787
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 14:28:21 -04:00
Juan Cruz Viotti
428dbeaf55 upgrade: umount to v1.1.4 (#817)
- This new version passes `force` to `diskutil unmountDisk`

Change-Type: patch
Changelog-Entry: Fix `at least one volume could not be unmounted` error in OS X.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 00:04:36 -04:00
Juan Cruz Viotti
0c66fb65f4 fix(GUI): close IPC server after writing (#816)
Currently, we are not making sure the IPC server we start at
`lib/src/child-writer/index.js` gets closed when the child process exits
(successfully or not). This eventually causes issues when the user click
"flash again", since the stateful `ipc` global exposed by `node-ipc`
gets initialised again, causing the module to get to an invalid state
that eventually results in `this.log is not a function`.

- We've added `ipc.server.stop()` to both the `error` and `close` event
  handlers (which are self exclusive, according to the docs).

- We've added `child.kill()` to the child `stderr` handler, since that
  function causes the `close` event to be triggered, which in turns
  calls `ipc.server.stop()`.

Change-Type: patch
Changelog-Entry: Fix `this.log is not a function` error when clicking "flash again".
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-11-02 00:00:39 -04:00
Andrew Scheller
2d60d1d93b docs: add an 'Announcing' section to PUBLISHING.md (#814) 2016-11-01 21:13:57 -04:00
Andrew Scheller
eabc9991e9 style(CLI): add [options] to usage string 2016-10-31 23:49:59 -04:00
Juan Cruz Viotti
532e732b46 docs: add Win 10 IoT to the list of images requiring special treatment (#804)
Such image seems to require the "Windows 10 IoT Core Dashboard" tools.

See: https://github.com/resin-io/etcher/pull/783#issuecomment-257255185
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 23:49:31 -04:00
Andrew Scheller
54343d9609 minifix(CLI): fix GitHub issues URL in CLI help 2016-10-31 23:49:12 -04:00
Juan Cruz Viotti
081b719bcb style(CLI): don't wrap CLI help outputdrives (#813)
`yargs` wraps help output lines, causing the examples to be displayed
like this:

```
Examples:
/usr/bin/nodejs bin/etcher
raspberry-pi.img
/usr/bin/nodejs bin/etcher --no-check
raspberry-pi.img
/usr/bin/nodejs bin/etcher -d /dev/disk2
ubuntu.iso
/usr/bin/nodejs bin/etcher -d /dev/disk2
-y rpi.img
```

As a solution, we can set `.wrap(null)` to completely disable wrapping.

Fixes: https://github.com/resin-io/etcher/issues/810
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:46:39 -04:00
Juan Cruz Viotti
9e63639a53 docs(CLI): describe proper way to install dependencies (#802)
The `docs/CLI.md` points to user to `docs/CONTRIBUTING.md` for
instructions in how to install dependencies. This document previously
included the explicit `npm` commands to run, but was then changed to
point to the platform scripts, which means that if the user follows the
current instructions but has a NodeJS version which is not ABI
compatible with the NodeJS version used by the currently used Electron
version, the user will get an incompatibility error.

Fixes: https://github.com/resin-io/etcher/issues/801
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:45:21 -04:00
Juan Cruz Viotti
e603cb0838 chore: persist a chocolatey cache Appveyor CI builds (#809)
Setting a Chocolatey cache and Making sure it gets persisted means that
future builds don't have to download every Chocolatey package from the
internet every time.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 19:41:27 -04:00
Juan Cruz Viotti
45dac58e2a chore: remove www from etcher homepage URL (#808)
See: https://github.com/resin-io/etcher/pull/795
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:39:11 -04:00
Juan Cruz Viotti
be1b1a1a3a docs: suggest UNetbootin if user requires setting persistence storage (#805)
See: https://github.com/resin-io/etcher/issues/413
See: https://github.com/resin-io/etcher/pull/783#issuecomment-256959050
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:37:24 -04:00
Juan Cruz Viotti
9df24ae577 docs(GUI): remove <version> from AppImage name (#803)
The ZIP including the AppImage contains the version, but not the
AppImage itself.

See: https://github.com/resin-io/etcher/pull/786#issuecomment-257275494
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 17:35:29 -04:00
Andrew Scheller
8c6f441982 style: fix typos and URLs in CLI.md (#800) 2016-10-31 13:53:06 -04:00
Andrew Scheller
4b11b5aff2 style: fix typo in SUPPORT.md 2016-10-31 13:52:25 -04:00
Juan Cruz Viotti
b4d53fd8e5 chore: update homepage URL to https://www.etcher.io (#795)
The current url we use, http://etcher.io, now redirects to
https://www.etcher.io.

Fixes: https://github.com/resin-io/etcher/issues/794
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 13:51:30 -04:00
Juan Cruz Viotti
5ffcda9c8c chore: remove .hound.yml (#796)
We are not using Hound CI to display lint warnings anymore. The CI
servers are in charge of running the linters now.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 13:51:19 -04:00
Andrew Scheller
5f57614f08 style: fix typo in README.md 2016-10-31 13:51:11 -04:00
Juan Cruz Viotti
f8349d460e docs(GUI): explain why some drives are not bootable out of the box (#783)
The usual case is images requiring special treatment. We recommend the
users to use specialised tooling for those cases.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 01:49:35 -04:00
Juan Cruz Viotti
bc985f08a9 fix(GUI): duplicate drives in Windows (#790)
If a drive contains multiple partitions that Windows recognises and
mounts, then `drivelist` will incorrectly display separate drive objects
for each partition, causing `ngRepeat` to complain in the drive selector
component.

The issue was fixed by grouping the mountpoints of all recognised
partitions in a single drive object, as we do with the other supported
operating systems.

After the fix, `drivelist` also removed its `name` property (since its
now always equal to `device`), so some extra logic to compute an
appropriate display name for the drive has been introduced to
`DriveScannerService`.

Fixes: https://github.com/resin-io/etcher/issues/720
See: https://github.com/resin-io-modules/drivelist/pull/100
Change-Type: patch
Changelog-Entry: Fix duplicate drives in Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 01:18:58 -04:00
Juan Cruz Viotti
a6624cc344 docs(GUI): generic appimage name in desktopintegration SKIP instructions (#786)
We're now including the version as part of the filename, which means
`Etcher-linux-x64` is no longer 100% accurate. As a solution, we include
a filename with "placeholders" for the version and architecture, to
avoid harcoding a specific version.

See: 18e9d1eb11 (commitcomment-19619181)
See: https://github.com/resin-io/etcher/pull/764
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-31 00:30:57 -04:00
Juan Cruz Viotti
2337c91dce refactor(GUI): log elevation command in Windows (#784)
We do this for macOS and GNU/Linux for debugging purposes, but we
weren't doing it for Windows.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-29 00:03:34 -04:00
Juan Cruz Viotti
18e9d1eb11 docs(GUI): skip AppImage desktop integration prompt with SKIP (#782)
The AppImage `desktopintegration` prompt can also be disabled by setting
the `SKIP` environment variable.

As a matter of fact, we use this trick inside Etcher itself when
executing the Etcher CLI as a child process of the Etcher GUI.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-28 16:46:23 -04:00
Juan Cruz Viotti
8103ba851f v1.0.0-beta.16
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-28 16:42:15 -04:00
Andrew Scheller
438c098953 chore: fix linux x86 build script (#780)
While the previous fix in #777 fixed repeated builds, it accidentally broke the first build!
2016-10-27 14:49:14 -04:00
Juan Cruz Viotti
fdbb7673a6 fix(GUI): surround paths in double quotes before elevating (#779)
This PR makes sure every command line argument that represents an
absolute path is surrounded by double quotes, to avoid any potential
escaping issue.

This simplifies a lot the various special character escaping routines we
had in place, since we now only have to make sure double quotes inside
the paths are escaped.

Fixes: https://github.com/resin-io/etcher/issues/773
Change-Type: patch
Changelog-Entry: Prevent escaping issues during elevation by surrounding paths in double quotes.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-27 11:39:14 -04:00
Wasabi Fan
b6817cfbb3 chore: include Etcher version in installer/archive names 2016-10-27 10:46:04 -04:00
Andrew Scheller
0bbcc10cfe chore: fix minor install script problems (#777)
When running the install script as root (e.g. inside a Docker container), bower complained that it

"shouldn't" be run with sudo. When running the x86 install multiple times, it tried to move

Etcher-linux-ia32 inside the existing Etcher-linux-x86/ folder, rather than renaming it, which meant

later commands failed.
2016-10-26 14:58:47 -04:00
Juan Cruz Viotti
9618291f80 feat(GUI): spawn CLI directly from the AppImage in GNU/Linux (#775)
If we pass relative paths as arguments to the AppImage, they get
resolved from `/tmp/.mount_XXXXXX/usr`. We can exploit this to run the
Etcher CLI directly from the AppImage, rather than having to mount it
ourselves:

```sh
ELECTRON_RUN_AS_NODE=1 Etcher-linux-x64.AppImage bin/resources/app.asar [OPTIONS]
```

By using this little trick, we get rid of both our custom mounting logic
and the need of surrounding the command to run in single quotes,
therefore avoiding a whole new kind of escaping issues.

Since running the CLI directly from the AppImage means that the
`desktopintegration` will be ran for the CLI, we pass the `SKIP`
environment variable to avoid having it prompt the user for
installation.

We also updated the `desktopintegration` script to the latest version,
which reduces the amount of logging plus other minor fixes.

Fixes: https://github.com/resin-io/etcher/issues/637
Change-Type: patch
Changelog-Entry: Fix Etcher leaving zombie processes behind in GNU/Linux.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-26 14:07:17 -04:00
Andrew Scheller
bcada80def docs: revise PUBLISHING.md
- Fix typos.
- Add Windows to package instructions.
2016-10-26 13:20:08 -04:00
Juan Cruz Viotti
d9822faf2f fix(GUI): emit progress back to parent using node-ipc (#774)
This PR makes use of `node-ipc` to emit progress information from the
child CLI to the GUI process rather than the tailing approach we've
been doing until now.

This change was motivated by the following Electron fix which landed in
v1.4.4: https://github.com/electron/electron/pull/7578. Before such fix,
Electron would not output anything to stdout/stderr if the Electron
process was running with `ELECTRON_RUN_AS_NODE` under Windows, which
forced us to implement `--log` option in the Etcher CLI to output state
information to a file.

Since this issue is fixed, we can consume the Etcher CLI output from
within `child_process.spawn`, which opens more interesting possibilities
for sharing information between both processes.

This coindentally fixes a Windows issue where the tailing module would
receive malformed JSON, causing Etcher to crash at `JSON.parse`. The
reason of this problem was a bug in the tailing module we were using.

Fixes: https://github.com/resin-io/etcher/issues/642
Change-Type: patch
Changelog-Entry: Fix "Unexpected end of JSON" error in Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-25 23:56:39 -04:00
Juan Cruz Viotti
4d3eab4915 chore: create standalone Windows builds (#769)
This PR zips the package that is built by running:

```sh
.\scripts\build\windows.bat package <arch>
```

And puts it in `etcher-release/installers`.

Fixes: https://github.com/resin-io/etcher/issues/760
Change-Type: minor
Changelog-Entry: Publish standalone Windows builds.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-25 12:35:21 -04:00
Juan Cruz Viotti
63948874d7 chore: distribute AppImage inside a zip (#772)
AppImages need to be marked as executables before they can be used.
Distributing them directly means that virtually all web browsers will
automatically remove the execution permissions, leading us to have to
explain users how to add it back with `chmod`, etc.

For simplicity purposes, we'll be distributing AppImages inside ZIPs,
which ensure the execution permissions are added back when the user
decompresses it.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 20:25:16 -04:00
Juan Cruz Viotti
b6314bf397 refactor: use local variables in shell functions in build scripts (#771)
We translate function arguments (e.g: `$1`, `$2`, etc) to readable names
using shell variables in the top of every shell function in the build
scripts.

Since we were not declaring these variables as `local`, two functions
using the same "argument name" would override each other.

For example:

```sh
function foo() {
  variable=$1
  # Do something with $variable
}

function bar() {
  variable=$1
  # Do something with $variable
}

foo "Hello World"
echo $variable
> Hello World

bar "Changed variable"
echo $variable
> Changed variable
```

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 17:24:32 -04:00
Juan Cruz Viotti
32cac3b78f feat(GUI): use info icon instead of "SHOW FULL FILE NAME" (#770)
The main purpose of this change is to simplify the interface and avoid
unnecessary text.

Fixes: https://github.com/resin-io/etcher/issues/742
Change-Type: minor
Changelog-Entry: Use info icon instead of "SHOW FULL FILE NAME" in first step.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 15:17:52 -04:00
Juan Cruz Viotti
d7d9dc099f chore: fix output_package unbound variable in GNU/Linux (#767)
The `$output_package` variable is defined inside the `package_x$ARCH`
functions, which means that if we run the following commands:

```sh
./scripts/build/linux.sh package x64
./scripts/build/linux.sh appimage x64
```

The `$output_package` variable will not be defined when the script runs
the `appimage` command.

To workaround this issue, we declare a new `$package_directory` variable
inside the `appimage` command clause.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:25:37 -04:00
Juan Cruz Viotti
1609b8df5b fix(GUI): drag and drop not working anymore (#766)
The "dropzone" directive, which we use to implement drag and drop
support, was not being loaded in the application at all for some reason.
It was probably accidentally deleted during major refactorings.

Change-Type: patch
Changelog-Entry: Fix drag and drop not working anymore.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:23:33 -04:00
Juan Cruz Viotti
9086041a80 docs(GUI): minimim macOS supported platform (#765)
Since the Etcher GUI is based on Electron, it only runs on platforms
supported by Electron, which in the case of macOS, is 10.9 and newer
versions.

As an alternative, we propose using the Etcher CLI.

See: https://github.com/electron/electron/blob/master/docs/tutorial/supported-platforms.md
Fixes: https://github.com/resin-io/etcher/issues/761
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-24 14:23:22 -04:00
Juan Cruz Viotti
12f5baaa60 docs(GUI): no polkit authentication agent found Linux error (#757)
Document the need to have a polkit authentication running in GNU/Linux
to be able to go through the authentication system.

Fixes: https://github.com/resin-io/etcher/issues/756
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-14 12:09:31 -03:00
David Lechner
c43dffce80 chore(debian): add dependency on polkit package (#758)
A policy kit authentication agent is needed for privilege escalation.

See: https://github.com/resin-io/etcher/issues/756#issuecomment-253298322
2016-10-14 12:09:02 -03:00
Juan Cruz Viotti
c7f4313ded upgrade: etcher-image-stream to v5.1.0 (#752)
We're particularly interested in the following change:

- Add `etch` support.

Also:

- Add a `.description` property to all archive related errors.
- Rename archive metadata base path from `_info` to `.meta`.

Change-Type: minor
Changelog-Entry: Add support for `etch` images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:25 -03:00
Juan Cruz Viotti
60e3cbd22d fix(GUI): don't clear selection state when re-selecting an image (#753)
Currently, if the "CHANGE" label at the bottom of the image selection
step, once an image has been selected, is clicked, the selection state
is cleared.

Since https://github.com/resin-io/etcher/pull/602, we allow the drive
state to change independently of the image selection state, so the above
behaviour doesn't make sense anymore.

Fixes: https://github.com/resin-io/etcher/issues/730
Change-Type: patch
Changelog-Entry: Don't clear selection state when re-selecting an image.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:16 -03:00
Juan Cruz Viotti
4e5b000440 style(GUI): say "eject" instead of "unmount" in Windows (#754)
In Windows, if the user unmounts a drive, then the drive becomes
inaccessible to the OS. Compare this to UNIX based operating systems,
where an unmounted drive is still available for many I/O operations.

To prevent confusion, we say "eject" instead of "unmount" when running
on Windows, despite "unmount" being the correct way of saying it.

See: https://github.com/resin-io/etcher/issues/750
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 15:32:04 -03:00
Juan Cruz Viotti
c8ae05949c chore: only alias CXX to specific gcc versions on Linux (#755)
There is no `g++-4.8` binary in OS X in Travis CI anymore for some
reason.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-07 14:28:40 -03:00
David Lechner
f28b5a859b chore: add debian packaging (#747)
This adds a "debian" command to the linux build script. It uses
electron-installer-debian to create a debian package.
2016-10-05 12:30:06 -04:00
Juan Cruz Viotti
5924109371 docs: clarify that the install script doesn't install pre-requisites (#746)
We list all the pre-requisites needed to get up and running with Etcher,
and then say "run this script to install dependencies", which can be
interpreted as if the install script actually also installs the
pre-requisites, which is not the case.

To clarify this, we add a clear bold notice, and change "dependencies"
to "npm dependencies", to make the distinction clearer.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-10-03 21:51:00 -04:00
Andrew Scheller
5fbed138a8 feat(GUI): display image path base name as tooltip on truncated name
Changelog-Entry: Display image path base name as a tooltip on truncated image name.
Change-Type: minor
2016-10-03 14:00:56 -04:00
David Lechner
aea9d30271 chore: only apply upx compression when packaging as appimage
Debian packaging tools cannot analyze the binaries if they are compressed
with upx. If we move the compression to the appimage command, then the
output of the package command can be used for building debian packages.
2016-10-02 21:17:28 -04:00
David Lechner
6fedc9eb83 chore: add appimage command to GNU/Linux build script
With this addition, the `package` command simply creates a standalone package, while "appimage" is the one that creates the actual AppImage. The "all" command still generates the AppImage as before.
2016-09-30 10:09:47 -04:00
Andrew Scheller
e47a70606c docs: fix small typo in ARCHITECTURE.md 2016-09-29 22:40:26 -04:00
Juan Cruz Viotti
ddd2f2da40 docs: require at least NodeJS v6 to build Etcher (#727)
Some of the packaging modules that we use don't work on previous NodeJS
versions.

Fixes: https://github.com/resin-io/etcher/issues/725
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-29 09:16:40 -04:00
Juan Cruz Viotti
feb120bf8c v1.0.0-beta.15 2016-09-26 19:28:23 -04:00
Juan Cruz Viotti
81751743fe fix(GUI): no write after elevation in GNU/Linux (#721)
When the application is packaged as an AppImage, we're accidentally not
applying the whitespace escaping routine, causing images that contain
white spaces to cause Etcher to stall and never start the write.

The issue was even harder to debug given that the problem was not
reproducible when running Etcher from `npm start`.

Change-Type: patch
Changelog-Entry: Fix flashing never starting after elevation in GNU/Linux.
Fixes: https://github.com/resin-io/etcher/issues/631
Fixes: https://github.com/resin-io/etcher/issues/665
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 23:06:15 -04:00
Juan Cruz Viotti
95aaea5a0f upgrade: etcher-image-write to v8.1.3 (#719)
This version contains an important fix for the sporadic EPERM issues
encountered on Windows systems.

Fixes: https://github.com/resin-io/etcher/issues/627
Link: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Fix sporadic EPERM write errors on Windows.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-25 21:50:54 -04:00
Juan Cruz Viotti
66a810e764 chore: apply HFS+ compression to *.app in OS X (#715)
This results in ~10MB savings, which is not much, but still worth
reducing as much as we can.

See: https://github.com/resin-io/etcher/issues/711
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-23 14:11:42 -04:00
Juan Cruz Viotti
f9ce62d34f upgrade: etcher-image-write to v8.1.2 (#712)
This version contains a fix for incorrect validation errors being
reported when flashing bzip2 files due to incorrect slicing of the drive
stream when calculating the checksum.

See: https://github.com/resin-io-modules/etcher-image-write/pull/61
Change-Type: patch
Changelog-Entry: Fix incorrect validation errors when flashing bzip2 images.
Fixes: https://github.com/resin-io/etcher/issues/710
Fixes: https://github.com/resin-io/etcher/issues/709
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-22 13:17:10 -04:00
Juan Cruz Viotti
6d767231f8 upgrade: drivelist to v3.3.4 (#714)
This new version contains a fix for a very weird `cscript is not
recognised` error reported long ago.

Change-Type: patch
Changelog-Entry: Fix "cscript is not recognised as an internal or external command" Windows error.
Fixes: https://github.com/resin-io/etcher/issues/552
See: https://github.com/resin-io-modules/drivelist/pull/95
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-22 13:15:39 -04:00
Juan Cruz Viotti
e12f4e0b74 doc: recovering broken drives (#705)
Sometimes a flash error ends up taking the user's drive in a state that
can't be easily recover with usual disk utility tools. For when this
happens, we add some documentation about fail-proof methods to recover
the drive.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-15 08:49:35 -07:00
Juan Cruz Viotti
5d54e2b7e3 feat(GUI): allow disabling auto-update notifications (#704)
This feature is very appealing when running Etcher ouside a common
desktop environment, for example, as a Resin.io application. In such a
platform, an update notifier that points the user to the website makes
no sense, since the platform itself is responsible for the update.

For such cases, we added support for an environment variable called
`ETCHER_DISABLE_UPDATES`, that when set, will prevent the update check
altogether.

Change-Type: minor
Changelog-Entry: Allow the user to disable auto-update notifications with an environment variable.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 18:19:10 -07:00
Juan Cruz Viotti
401cdb6f52 feat(GUI): image-defined recommended drive size (#703)
Recently, we've added support for a `recommendedDriveSize` property in
the `manifest.json` of extended image archives, which the image can use
to warn the user that his drive, even if it is large enough to hold the
image, might not be large enough to deliver a good usage experience
later on.

When this property is found, the GUI reacts in the following ways:

- Drives that are large enough to hold the image but don't meet the
  recommended drive size are tagged with a warning label in the drive
  selector component.

- Attempting to select a "labeled" drive opens a warning modal asking
  for user confirmation.

- Drives that don't meet the recommended drive size declared in the
  image won't get auto-selected.

- If there is a drive already selected, and the user picks an image
  whose recommended drive size is greater than the drive size, the
  currently selected drive gets auto-deselected.

Code-wise, the following significant changes have been introduced:

- Implement `SelectionStateModel.getImageRecommendedDriveSize()`.
- Implement `SelectionStateModel.isDriveSizeRecommended()`.
- Extract `WarningModal` out of the settings page (the dangerous setting
  modal).

Change-Type: minor
Changelog-Entry: Allow images to declare a recommended minimum drive size.
See: https://github.com/resin-io-modules/etcher-image-stream/pull/36
Fixes: https://github.com/resin-io/etcher/issues/698
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 18:06:00 -07:00
Juan Cruz Viotti
7ea098c0d6 v1.0.0-beta.14
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-12 11:10:16 -07:00
Juan Cruz Viotti
a4e3fcccba upgrade: etcher-image-stream to v4.3.0 (#699)
This new version contains the following changes:

- Add `recommendedDriveSize` property in `_info/manifest.json`.
- Upgrade `unbzip2-stream` to v1.0.10, which fixes a known uncaught
  exception when decompressing large `.bz2` files.
- Add support for markdown instructions at
  `_info/instructions.markdown`.

Changelog-Entry: Upgrade `etcher-image-stream` to v4.3.0.
Change-Type: minor
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-12 10:55:13 -07:00
Juan Cruz Viotti
7798c3398b refactor(GUI): remove ErrorService.reportException() ENOSPC workaround (#695)
This function used to handle `ENOSPC` as a corner case in order to
prevent it from being shown using the default Analytics/Dialog
machinery. This was because the "alert ribbon" used to react to changes
automatically from the templates, however, now that the "alert ribbon"
was removed, and replaced it with modals, we have finer control of how
and when this error gets shown, so the workaround is no longer
necessary.

See: 951b8de9fc
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-11 10:26:25 -07:00
Juan Cruz Viotti
1037905cbb fix(GUI): don't clear drive selection if clicking "Retry" (#696)
If the user encounters a flash error, and then presses the "Retry"
button, the drive selection is cleared, but then is re-selected right
away because its probably the only available drive, leading to a very
strange behaviour UX-wise.

As a solution, we avoid clearing the drive selection.

Change-Type: patch
Changelog-Entry: Don't clear the drive selection if clicking the "Retry" button.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-11 10:26:09 -07:00
Juan Cruz Viotti
18cc0c5cd9 minifix(CLI): only show final checksum if one exists (#692)
The Etcher CLI displays a nice `Checksum: $checksum` message upon
completion. Since the addition of bmap support, a checksum for an image
might not be calculated, causing the CLI to display `Checksum:
undefined`.

This PR takes care of this small UX issue by only showing the checksum
message if one indeed exists.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 14:00:22 -07:00
Juan Cruz Viotti
0ff0c77acc feat: zero out configured bytes from drive before flashing with bmap (#691)
This PR makes use of the `bytesToZeroOutFromTheBeginning` option
introduced in:

- https://github.com/resin-io-modules/etcher-image-stream/pull/34
- https://github.com/resin-io-modules/bmapflash/pull/6

The option, when set in `manifest.json`, causes a certain amount of
bytes to be zeroed out before the bmap-assisted write process starts, in
order to prevent issues on certain ROM bootloaders causing by
`bmap-tools` thinking certain parts of the initial sectors are holes.

The following components were upgraded:

- `etcher-image-stream` was upgraded to v4.1.0
- `etcher-image-write` was upgraded to v8.1.0

Changelog-Entry: Allow archive images to configure a certain amount of bytes to be zeroed out from the beginning of the drive when using bmaps.
Change-Type: minor
Fixes: https://github.com/resin-io/etcher/issues/673
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 13:36:08 -07:00
Juan Cruz Viotti
951b8de9fc refactor(GUI): replace the orange alert ribbon with a modal (#689)
As a way to simplify the design and make more use of available
components rather than creating specialised ones, we replaced the
`.alert-ribbon` component, which consisted of an orange alert appearing
at the top of the screen for when a validation failed, the drive ran out
of space, or other issues, with a modal.

This change allowed us to remove the "warning"-related colors from the
theme palette.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 12:40:51 -07:00
Juan Cruz Viotti
ce1c1d724d upgrade: etcher-image-write to v8.0.0 (#688)
This new version stops sending a `passedValidation` boolean property
upon completion and still throws an `EVALIDATION` error when validation
fails.

Such small chance allows us to get rid of lot of complexity related to
handling the `passedValidation` value in the application state.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-07 10:24:34 -07:00
Juan Cruz Viotti
73edf02e5f style(GUI): fix state -> step typo in main controller (#687)
A function in the `MainController` was being named
`shouldFlashStateBeDisabled`, however it should have been
`shouldFlashStepBeDisabled`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-06 12:51:01 -07:00
Juan Cruz Viotti
5ab3d52ab9 style(GUI): make "Connect a drive" button blue (#686)
For consistency purposes on the main screen, we switch the "Connect a
drive" button to be the classic primary blue button as the other ones.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-06 12:14:06 -07:00
Juan Cruz Viotti
b01ff5f0db feat(GUI): "Need help?" dynamically opens the image support url (#683)
We've recently added support for a `supportUrl` property in an archive
image `_info/manifest.json`, which the publisher can use to define the
URL where it would like to redirect users facing problems.

This PR makes the "Need help?" link at the top right corner open the
configured `supportUrl` url, and fallback to the original Etcher's help
page if no `supportUrl` is found.

In order to accomplish this, we made the following changes:

- Implement `SelectionStateModel.getImageSupportUrl()`
- Implement `HeaderController` controller

Change-Type: minor
Changelog-Entry: Make the "Need help?" link dynamically open the image support url.
Fixes: https://github.com/resin-io/etcher/issues/662
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-05 18:15:51 -07:00
Juan Cruz Viotti
b1ba1c887f upgrade: etcher-image-stream to v4.0.0 (#682)
We're interested in the following changes:

- Add `supportUrl` property in `_info/manifest.json`.
- Add `releaseNotesUrl` property in `_info/manifest.json`.
- Add `version` property in `_info/manifest.json`.
- Add `checksum` and `checksumType` properties in `_info/manifest.json`.

Link: https://github.com/resin-io-modules/etcher-image-stream/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 15:44:39 -04:00
Juan Cruz Viotti
f63cad3696 upgrade: drivelist to v3.3.3 (#681)
- https://github.com/resin-io-modules/drivelist/pull/94

Change-Type: patch
Changelog-Entry: Show device id if device doesn't have an assigned drive letter in Windows.
Fixes: https://github.com/resin-io/etcher/issues/671
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 13:52:31 -04:00
Juan Cruz Viotti
eda52fe5f0 refactor(GUI): move alert-ribbon to the top of the page (#679)
This component is visually shown on the top of the window, however its
HTML code is placed below the "Flash" button, which is
counter-intuitive.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 12:28:59 -04:00
Juan Cruz Viotti
a8884f4da9 refactor(GUI): unify modal styles (#678)
Despite all modals sharing the same design and layout, each of theme is
being styled separately, when most of the CSS rules can be moved and
generified to `_modal.scss` and re-used by all of them.

This PR also moves `lib/gui/scss/components/_modal.scss` to the "Modal"
Angular's module.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 12:28:33 -04:00
Juan Cruz Viotti
cefff7b934 refactor(GUI): move button min-width rules to page styles (#677)
The `.button` component is not the responsible of knowing the
`min-width` it should occupy in the actual pages.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 11:47:20 -04:00
Juan Cruz Viotti
17b5ef96da refactor(GUI): move _bootstrap.scss alert rules to .alert-ribbon (#680)
We have some global CSS rules that affect `.alert` living in
`_bootstrap.scss`, however `.alert` is only being used by our
`.alert-ribbon` component, so it makes sense to move those rules over
there.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 11:47:01 -04:00
Juan Cruz Viotti
5b0698192b refactor(GUI): badge coloring (#675)
Move `.badge` coloring to the main page's style file, since the style we
currently hardcode on the component itself is very tied to the
particular context the badge is being instantiated in.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 10:30:56 -04:00
Juan Cruz Viotti
0b7232c339 refactor(GUI): explicitly declare .label-danger coloring (#676)
`.label-danger` is defined by Bootstrap, and its coloring re-uses what
was defined in `$brand-danger`, which is currently unset.

To prevent the module from going out of sync with our new CSS palette,
we explicitly declare the colorings in the component file.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 10:30:29 -04:00
Juan Cruz Viotti
e1f843652b refactor(GUI): CSS color-scheme (#674)
This is a big PR that extracts out a sensible set of SCSS color
variables that can be used to customise Etcher's look.

To achieve such goal, the following changes were introduced:

- Create a separate `lib/gui/scss/modules/_theme.scss` to conveniently
  hold all SCSS color variables.

- Decouple button styles from Bootstrap's `.btn`.

- Stop configuring Bootstrap colors as a whole using the SCSS variables
  it exposes and instead declare them directly in the modules that make
  use of them.

- Normalize all modal layouts into one. We had like 3 different modal
  layouts, each with their own title/body colors, etc. To simplify the
  color palette, we make use of a single modal layout everywhere.

- Remove `.progress-button--primary`. `.progress-button` is now
  "primary" by default.

- Be precise about `tick` foreground colors.

- Rename `.label-default` to `.label-inset`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-02 09:35:25 -04:00
Juan Cruz Viotti
2c9c06a882 chore: upgrade ruby version in CI services (#670)
`scss_lint` suddenly requires Ruby 2, which is breaking all our Travis
CI and Appveyor builds, which ship older versions.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-31 16:54:10 -04:00
Juan Cruz Viotti
36b7cf39f1 docs: nsis required version (#669)
Packaging Etcher with NSIS v3.x results in weird errors. We only support
v2.x, for which the latest version is v2.51.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-29 14:31:47 -04:00
Juan Cruz Viotti
a4e3359a96 doc: extract development setup docs into RUNNING-LOCALLY.md (#667)
This file will contain all information necessary to be able to get a
development version of Etcher running locally.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 15:48:17 -04:00
Juan Cruz Viotti
47c50ffe14 chore(GUI): integrate scss-lint (#666)
This PR integrates SCSS Lint, a tool that will help us keep SCSS tidier.
I've included a sensible configuration at `.scss-lint.yml`, and
documentation on how to install it on `CONTRIBUTING.md`.

The tool will run automatically as part of `npm run lint`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 15:09:07 -04:00
Juan Cruz Viotti
fb49b6ce4d refactor(GUI): move main page specific styles to pages/main/styles (#660)
There are many SCSS rules in `lib/gui/scss/main.scss` that only apply to
the main page. In order to keep things tidy, those styles were moved to
`lib/gui/pages/main/styles/_main.scss`.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 10:26:45 -04:00
Juan Cruz Viotti
3c5eff3739 upgrade: drivelist to v3.3.1 (#659)
This version contains a fix for the `blkid: command not found` error in
certain GNU/Linux distributions.

- https://github.com/resin-io-modules/drivelist/pull/92

Change-Type: patch
Changelog-Entry: Fix `blkid: command not found` error in certain GNU/Linux distributions.
Fixes: https://github.com/resin-io/etcher/issues/640
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-26 10:26:30 -04:00
Juan Cruz Viotti
e91ec71b29 upgrade: etcher-image-stream to v3.1.2 (#658)
- https://github.com/resin-io-modules/etcher-image-stream/pull/27

Change-Type: patch
Changelog-Entry: Fix incorrect estimated entry sizes in certain ZIP archives.
Fixes: https://github.com/resin-io/etcher/issues/644
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 11:30:57 -04:00
Juan Cruz Viotti
893f42a124 upgrade: etcher-image-write to v7.0.1 (#657)
- https://github.com/resin-io-modules/etcher-image-write/pull/53

Change-Type: patch
Changelog-Entry: Prevent `ENOSPC` if the drive capacity is equal to the image size.
Fixes: https://github.com/resin-io/etcher/issues/629
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 11:03:30 -04:00
Juan Cruz Viotti
bf7cedd546 docs(GUI): runtime linux libraries (#655)
This entry documents all the GNU/Linux libraries needed to run Etcher.

Fixes: https://github.com/resin-io/etcher/issues/630
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 10:28:36 -04:00
Juan Cruz Viotti
da81849d4b refactor: rely on etcher-image-stream to fetch bmap contents (#654)
In order to get the bmap file contents to the Etcher CLI, we were
handling extraction, writing to a temporary file, then reading again,
and all sorts of other mumbo-jumbo, without realising that
`etcher-image-stream` already has this information right where we need
it (in the CLI's writer module) and in the way we need it (as plain
text).

Re-using from there hugely simplifies things.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-24 10:19:18 -04:00
Juan Cruz Viotti
8371757c70 upgrade: etcher-image-write to v7.0.0 (#651)
The change we're interested in is:

- https://github.com/resin-io-modules/etcher-image-write/pull/51

Change-Type: patch
Changelog-Entry: Prevent failed validation due to drive getting auto-mounted in GNU/Linux.
Fixes: https://github.com/resin-io/etcher/issues/574
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-23 10:43:05 -04:00
Juan Cruz Viotti
6af74bb9e1 upgrade: drivelist to v3.3.0 (#648)
The changes we're interested in are:

- https://github.com/resin-io-modules/drivelist/pull/89
- https://github.com/resin-io-modules/drivelist/pull/91

Change-Type: patch
Changelog-Entry: Upgrade `drivelist` to v3.3.0.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 12:58:45 -04:00
Juan Cruz Viotti
c5af759ccf upgrade: etcher-image-stream to v3.1.1 (#647)
This version contains an optimisation that makes analysing archive
images (e.g: ZIP) for metadata much faster.

Change-Type: patch
Changelog-Entry: Improve speed when retrieving archive image metadata.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 12:18:58 -04:00
Juan Cruz Viotti
fce399dfd4 fix(GUI): "modal.dismiss" is not a function (#645)
Steps to reproduce:

- Insert a single drive.
- Open drive selector modal.
- Extract the drive while drive selectector modal is open.
- Check DevTools.

The solution is to use `.close()` instead of `.dismiss()`. After some
diving into the documentation and the code, `.dismiss()` is only
available from within the modal controller, however if you want to close
the modal from outside, `.close()` is the way to go.

Notice that `.close()` returns a rejected promise when being called from
the modal itself, but thats not the case from outside, which is quite
confusing, but means we can safely use `.close()` in this context.

Change-Type: patch
Changelog-Entry: Fix "`modal.dismiss` is not a function" exception.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 11:58:42 -04:00
Juan Cruz Viotti
763e2f46f4 minifix(GUI): improve image full file name modal tooltip (#646)
The current tooltip, "SHOW IN FULL", proved to be a bit confusing for
users. We're using "SHOW FULL FILE NAME", as kindly suggested by @dlech.

Fixes: https://github.com/resin-io/etcher/issues/634
Change-Type: patch
Changelog-Entry: Improve image full file name modal tooltip.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 11:58:33 -04:00
Juan Cruz Viotti
a5a195e8fb feat: integrate bmap support (#635)
This PR integrates `.bmap` support recently added to
`etcher-image-write` into Etcher itself.

It does it in the following way:

- It adds a `--bmap` option to the Etcher CLI.
- It saves a potential `bmap` file contents to the
  `SelectionStateModel`.
- In the GUI, at the time of writing, if there is a `bmap` file content
  in `SelectionStateModel`, it gets written to a temporary file and such
  path is passed as the `--bmap` option to the CLI.

Since validation checksums don't make sense anymore, the finish screen
doesn't show the checksum box in this case.

Change-Type: minor
Changelog-Entry: Add `.bmap` support.
Fixes: https://github.com/resin-io/etcher/issues/171
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-08-22 09:50:56 -04:00
Juan Cruz Viotti
b69d03a58b upgrade: etcher-image-stream to v3.1.0 (#633)
This version contains support to extract a bmap file out of an archive
image.

See: https://github.com/resin-io/etcher/issues/171
Change-Type: minor
Changelog-Entry: Upgrade `etcher-image-stream` to v3.1.0.
Link: https://github.com/resin-io-modules/etcher-image-stream/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-15 14:24:11 -04:00
Juan Cruz Viotti
e30f8b08b9 v1.0.0-beta.13
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-05 14:47:19 -04:00
Juan Cruz Viotti
85676a2e94 refactor(GUI): main controller (#623)
The main page controller contained a lot of undocumented and untested
logic. As a first step towards cleaning up the whole thing, this PR
introduces the following changes:

- Implement `ImageSelectionController`, `DriveSelectionController`, and
  `FlashController` as children of `MainController`. Each of them is
  used by the appropriate main page "steps", and contains logic specific
  to them. The `MainController` hosts functionality that applies to the
  page as a whole.

- Add JSDoc annotations fo every controller function/property.

- Unit test several controller functions.

- Simplify template logic.

The "GUI fifty-thousand foot view" section in ARCHITECTURE.md has been
removed since there is no longer a single place where you can see all
the interactions between components.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-05 14:40:51 -04:00
Juan Cruz Viotti
ecd5d5bf5c docs(GUI): running Etcher on Wayland (#624)
This entry roughly documents how to get Etcher running on Wayland by
using the XWayland Server.

Fixes: https://github.com/resin-io/etcher/issues/509
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-04 14:03:36 -04:00
Juan Cruz Viotti
0345c2df6e docs: fix non-sense USER-DOCUMENTATION description (#625)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-04 13:37:10 -04:00
Juan Cruz Viotti
7fa4178161 minifix(GUI): don't call shell.openExternal if resource is undefined (#622)
This PR fixes an uncaught error being thrown when
`OSOpenExternalService.open()` is called with an undefined value.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-04 11:02:20 -04:00
Juan Cruz Viotti
c31b45200d refactor(GUI): move drive scanner logic to application entry point (#621)
Currently, the logic the controls the drive scanner and populates the
drive model lives in the main application controller.

This is not optimal because:

- The drive scanner stops populating the drives model when the
  application is not on the main screen.

- An event handler subscribes to the drive scanner every time the user
  navigates back to the main screen.

This PR moves the drive scanner logic to a run block in the entry point
of the application.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-03 13:54:46 -04:00
Juan Cruz Viotti
1a46ac0301 refactor(GUI): unify error handling (#620)
Error handling is currently a mess. The knowledge to correctly report an
error both to the end user and to us is scattered in many places.

This PR introduces the following changes:

- Rename `AnalyticsService.logDebug()` to `AnalyticsService.logDebug()`
  to clarify better the intention of the function.

- Move `$log` decorators from an `AnalyticsService` run block to
  `AnalyticsService.logDebug()`.

- Implement `AnalyticsService.logException()`, whose duty is to log an
  exception to TrackJS or any related service, and log it to DevTools.

- Implement `ErrorService.reportException()`, whose duty is to report an
  exception to every interested party. This means logging the error to
  TrackJS, displaying it DevTools and showing a nice alert to the user.
  This function is based from `handleError()` from `MainController`.

- Move global `$exceptionHandler` error handler to the entry point of
  the application, and make it simply call
  `ErrorService.reportException()`.

- Replace every `handleError()` call in `MainController` with
  `ErrorService.reportException()`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-03 13:29:23 -04:00
Juan Cruz Viotti
be2413d8cb fix(GUI): drive is removed everytime user navigates to main screen (#619)
The problem can be reproduced with the following steps:

- Start Etcher.
- Plug a single drive, and let Etcher auto-select it.
- Navigate to the settings screen.
- Go back to the main screen.

The drive is auto-removed for a very small amount of time, until
auto-selection takes care of selecting it again. This behaviour causes
no harm, but its a bit annoying.

The problem was caused by a previous fix, which auto-removed the drive
if navigating back to the main screen after a flash finished, however
the fix no longer makes a lot of sense now that we allow a drive to be
selected even when no image has been chosen.

Change-Type: patch
Changelog-Entry: Prevent selected drive from getting auto-removed when navigating back to the main screen from another screen.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-03 11:27:47 -04:00
Juan Cruz Viotti
2c80ca23a7 feat(GUI): show "Unmounting..." while unmounting a drive (#618)
Currently, we show "Finishing..." indenpendently on if we're waiting for
the flash to emit the "done" event, or we're waiting for the drive to be
unmounted.

As a way to simplify things, we move the hairy `ngShow` stack from the
main template to a nice function in the controller.

Change-Type: minor
Changelog-Entry: Show "Unmounting..." while unmounting a drive.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-03 11:23:22 -04:00
Juan Cruz Viotti
98b2cc906f fix(GUI): force Etcher to auto-detect newly available drives (#617)
There are some cases where AngularJS won't recognise that the available
drive list has changed, and incorrectly keeps asking the user to connect
a drive.

This problem was mainly witnessed in Windows, and could be reproduced
with the following steps:

- Start Etcher with no available drive.
- Select an image.
- Plug a drive.

Etcher keeps showing "Connect a drive" in the second step.

Change-Type: patch
Changelog-Entry: Fix new available drives not being recognised automatically in Windows.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-03 00:41:12 -04:00
Juan Cruz Viotti
49bb9677cd fix(CLI): wait for robot output to be flushed before exitting (#616)
When using the `--robot` option, we write to `stdout`/`stderr` using
`WritableStream#write()`. This operation is asynchronous, however we're
not waiting for the data to be flushed before calling `process.exit()`
right after emitting the `done` event.

This causes a rance condition where sometimes `done` is never written to
the log file, and therefore the GUI remains waiting forever.

Change-Type: patch
Changelog-Entry: Fix application stuck at "Finishing".
See: https://github.com/resin-io/etcher/issues/613
See: https://github.com/resin-io/etcher/issues/609
See: https://github.com/resin-io/etcher/issues/573
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-02 21:52:39 -04:00
Juan Cruz Viotti
bdbff0e814 fix(GUI): display an error if no polkit authentication agent was found (#615)
Currently, if no graphical polkit authentication agent is found,
`sudo-prompt` will yield a "User did not grant permission." error, which
gives the impression the user cancelled the dialog (or entered the wrong
password), causing confusion for the user.

Instead, Etcher will now display a nice "No polkit authentication agent
found." error dialog.

Change-Type: patch
Changelog-Entry: Display an error if no graphical polkit authentication agent was found.
See: https://github.com/jorangreef/sudo-prompt/pull/29
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-02 21:44:24 -04:00
Juan Cruz Viotti
cc8ba8b6c9 upgrade: drivelist to v3.2.6 (#614)
Change-Type: patch
Changelog-Entry: Fix internal removable drives considered system drives in macOS Sierra.
See: https://github.com/resin-io-modules/drivelist/pull/86
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-08-01 23:45:43 -04:00
Juan Cruz Viotti
3a008bf764 upgrade: etcher-image-write to v6.0.1 (#612)
This version makes sure the device file descriptor is closed right after
validation completes. This fix prevents `RemoveDrive.exe` from throwing
an `EBUSY` error when trying to unmount the drive.

Change-Type: patch
Changelog-Entry: Upgrade `etcher-image-write` to v6.0.1.
Link: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md
See: https://github.com/resin-io/etcher/issues/573
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-31 22:33:51 -04:00
Juan Cruz Viotti
82cb7ab689 upgrade: removedrive to v1.0.0 (#611)
This version contains the following improvements:

- https://github.com/jviotti/removedrive/pull/3
- https://github.com/jviotti/removedrive/pull/2

We also make sure error descriptions are passed to the dialog service
since this module now sets that property in its error objects.

Change-Type: patch
Changelog-Entry: Upgrade `removedrive` to v1.0.0.
Link: https://github.com/jviotti/removedrive/blob/master/CHANGELOG.md
See: https://github.com/resin-io/etcher/issues/573
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-28 15:53:47 -04:00
Juan Cruz Viotti
4b0eb8236a minifix(GUI): permit a number error code in flash results (#610)
We were currently throwing a validation error if the error code was not
string when setting the flash results, however a number error code makes
sense in some cases, and its what its returned by a `ChildProcess`
object.

Change-Type: patch
See: https://github.com/resin-io/etcher/issues/609
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-28 12:54:05 -04:00
Juan Cruz Viotti
3fc8f02611 refactor(GUI): increase encapsulation of flash results structure (#608)
Currently, the client application knows too much about how the flash
results are stored in the internal state, and relies on its structure to
perform its logic.

This PR introduces several getters to `FlashStateModel` and makes
`FlashStateModel.getFlashResults()` private, ensuring clients don't
depend on the flash results object.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 22:33:34 -04:00
Juan Cruz Viotti
eef1d51a7a refactor(GUI): extract MainPage from lib/gui/app.js (#607)
`lib/gui/app.js` contains a lot of code that should have been split long
ago. This PR extracts the "main page" logic into an actual page
component in `lib/gui/pages`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 22:22:52 -04:00
Juan Cruz Viotti
1febeda04e refactor(GUI): extract FlashStateModel from ImageWriterService (#606)
`ImageWriterService` currently has two responsibilities. It contains
logic to start and manage a flash process, and provides an API to
interact with the current flash state.

To honour the single responsibility principle, we extract
`FlashStateModel` from `ImageWriterService`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 21:21:23 -04:00
Juan Cruz Viotti
70fe34b591 minifix(GUI): deselect auto-selected drive if image is too large (#605)
We recently introduced a feature where a single available drive would be
auto-selected even if the user didn't select an image.

This introduces a potential scenario that brings the state to an
incoherent state:

- Start Etcher.
- Let a drive get auto-selected.
- Select an image larger than the auto-selected drive.

In this case, the drive is known to not have enough space to hold the
image, but remains auto-selected.

This PR makes sure the drive is deselected automatically in the above
scenario.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 20:37:51 -04:00
Juan Cruz Viotti
004a965c33 refactor(GUI): stop storing flash state in a .state object variable (#604)
Currently, we subscribe to the store change events and manually update a
`.state` property in `ImageWriterService`. A much more elegant approach
is to provide a `.getFlashState()` function that fetches the flash state
directly from the store when needed.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 13:25:52 -04:00
Juan Cruz Viotti
54909d267d fix(GUI): only enable error reporting if running inside an asar (#603)
Currently, TrackJS would receive errors when running Etcher locally.
Most of the errors reported from those environments are due to
developing Etcher, and create a lot of noise in TrackJS.

With this PR, we ensure Etcher will only report errors when running
inside an `asar` archive, which means its a "packaged" Etcher version.

Change-Type: patch
Changelog-Entry: Only enable error reporting if running inside an `asar`.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 11:15:41 -04:00
Juan Cruz Viotti
dd5d3e9e8d feat(GUI): perform drive auto-selection when no selected image (#602)
Currently, we intentionally prevent a drive from being auto-selected if
there was no selected image for UX purposes, however this way of
thinking has been challenged, and we didn't find a real UX problem by
doing this.

As a minor design improvement, we gray out the drive name in the main
window when an image hasn't been selected yet.

Change-Type: minor
Changelog-Entry: Perform drive auto-selection even when there is no selected image.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-27 00:00:58 -04:00
Juan Cruz Viotti
d72364115d fix(GUI): backdrop click error on modals (#601)
When the user clicks on the backdrop of a modal, the modal promise gets
rejected, therefore triggering our application error handler.

UI Bootstrap provides a way to disable the backdrop completely, but
doesn't provide a way to allow a backdrop click to simply close the
modal rather than rejecting it, as if an issue happened.

To mitigate this issue, and still preserve the backdrop functionality,
we created `ModalService`, which abstracts the messy details of calling
`$uibModal`, and has custom logic to ignore "backdrop click" errors.

Change-Type: patch
Changelog-Entry: Fix "backdrop click" uncaught errors on modals.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 22:52:48 -04:00
Juan Cruz Viotti
2d1b2ccf6e v1.0.0-beta.12
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 21:31:18 -04:00
Juan Cruz Viotti
b3f2a73f5d upgrade: drivelist to v3.2.4 (#600)
This version contains the following fixes:

- Correctly handle mount points with spaces in GNU/Linux.
- Correctly report drive sizes in macOS Sierra.

Change-Type: patch
Changelog-Entry: Upgrade `drivelist` to v3.2.4.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 21:04:06 -04:00
Juan Cruz Viotti
09b0affe14 refactor(GUI): store drive as a reference to available drives (#599)
Instead of storing the whole selected drive object, we barely store a
reference to the corresponding drive in the available drives array (the
reference being the drive device).

This greatly simplifies the application state in the following ways:

- The drive metadata (size, description, etc) is not duplicated in the
  state, enforcing a single source of truth.
- If the selected drive stops being available (e.g: is unplugged), the
  reference doesn't hold anymore, making this functionality very natural
  to implement.
- Makes `SelectionStateModel.isCurrentDrive()` much more inuitive, since
  we don't have to document that changes in the metadata of the drive
  object, or extra keys such as `$$hashKey` don't change the result of
  this function.
- Ensures the state never goes into a problematic state where we try to
  to write to an unavailable drive.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 20:42:54 -04:00
Juan Cruz Viotti
be8f4bfce7 fix(GUI): escape quotes from image paths (#598)
Consider a directory name such as `Juan's Files`. When passing such path
as an argument to the child writer proxy script, Bash will complain
with:

> Unexpected EOF while looking for matching `'`

The solution is to manually escape quotes on the image path.

Change-Type: patch
Changelog-Entry: Escape quotes from image paths to prevent Bash errors on GNU/Linux and OS X.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 08:50:58 -04:00
Juan Cruz Viotti
7e0f54e7d6 feat(GUI): rich image extensions (#597)
The following PRs add support for a custom `_info` directory containing
metadata such an image URL, display name, logo, etc in
`etcher-image-stream`:

- https://github.com/resin-io-modules/etcher-image-stream/pull/16
- https://github.com/resin-io-modules/etcher-image-stream/pull/14
- https://github.com/resin-io-modules/etcher-image-stream/pull/13

Now that this module supports such metadata, we make use of it in the
GUI as follows:

- The file name is replaced with the display name.
- The file name links to the image URL.
- The "Select Image" logo is replaced with the image logo.

Some miscellaneous changes introduces in this PR to support the changes
described above:

- Implement `SelectionStateModel.getImageUrl()`.
- Implement `SelectionStateModel.getImageLogo()`.
- Implement `SelectionStateModel.getImageName()`.
- Ignore the "logo" image property when displaying the "Select image"
  event, in order to not fill the console with SVG contents.
- Make `svg-icon` understand SVG strings as paths.
- Make `svg-icon` react to changes to the `path` attribute.
- Extract the core functionality of `openExternal` into
  `OSOpenExternalService`.
- Upgrade `etcher-image-stream` to v3.0.1.

Change-Type: minor
Changelog-Entry: Support rich image extensions.
Fixes: https://github.com/resin-io/etcher/issues/470
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-26 08:47:20 -04:00
Juan Cruz Viotti
ce9093625b upgrade: etcher-image-stream to v2.6.1 (#596)
This version fixes an issue were certain malformed Zip files choked
`etcher-image-stream`.

Link: https://github.com/resin-io-modules/etcher-image-stream/blob/master/CHANGELOG.md
Fixes: https://github.com/resin-io/etcher/issues/410
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-25 00:56:36 -04:00
Juan Cruz Viotti
5c4341ace7 minifix(GUI): improve validation error message (#595)
The current error message is a bit blurry. The new one is much more user
friendly and directly guides the user towards a possible "next action".

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-25 00:54:30 -04:00
Juan Cruz Viotti
31e02f64b8 chore: integrate versionist (#594)
Versionist is a small utility to automatically generate CHANGELOGs based
on a certain commit convention.

This PR adds a new `changelog` npm script that calls Versionist to
preppend a new CHANGELOG entry based on our current structure.

Dealing with links to changes between versions in GitHub is hard to
automatise with a tool like Versionist. We chose to get rid of such
links since they are a nice to have, but don't provide any meaningful
value to maintainers, since they can manually see the diffs with `git
diff`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 23:09:56 -04:00
Juan Cruz Viotti
f02202c244 chore: get rid of gulp (#593)
The only thing we were still using gulp for was compiling SCSS.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 17:32:50 -04:00
Juan Cruz Viotti
604f89a54e feat: add support for raw images (#591)
Change-Type: minor
Changelog-Entry: Add support for `raw` images.
See: https://github.com/resin-io-modules/etcher-image-stream/pull/21
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 17:27:42 -04:00
Juan Cruz Viotti
7a5dd092da docs: fix error on the upgrading a dependency guide at CONTRIBUTING.md (#592)
One of the steps incorrectly says "Re-install the dependencies. This
will update the `npm-shrinkwrap.json` file". The intention was to say
that you should `npm install` the *new* dependency, and that will update
the `npm-shrinkwrap.json` file.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 17:27:35 -04:00
Juan Cruz Viotti
9a0fc2c34a docs: revise the SUPPORT.md guide (#590)
- Remove mention about Gitter channel covering Resin.io as a whole.
- Wrap text as the other documents.
- Move links to the bottom.
- Encourage users to submit OS/Etcher version and DevTools info.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 17:15:26 -04:00
Juan Cruz Viotti
b7d6d3d9a1 feat(GUI): display a nice alert ribbon if drive runs out of space (#588)
We try our best to check that the images the user select are too big for
the selected drive as early as possible, but this probes to be
problematic with certain compressed formats, like bzip2, which doesn't
store any information about the uncompressed size, requiring a ~50s
intensive computation as a minimum to find it out.

For these kinds of formats, we don't perform an early check, but instead
gracefully handle the case where the drive doesn't have any more space.

This PR handles an `ENOSPC` error by displaying the alert orange ribbon,
and prompting the user to retry with a larger drive. This is a huge
improvement over the cryptic `EIO` error what was thrown before, and
over having Etcher freeze at a certain percentage point.

Change-Type: minor
Changelog-Entry: Display a nice alert ribbon if drive runs out of space.
See: https://github.com/resin-io/etcher/issues/571
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-24 15:32:00 -04:00
Juan Cruz Viotti
5f943e98be feat(CLI): validate drive (#587)
The Etcher CLI doesn't care if the drive exists or not. The user will
eventually find out since the CLI will output an `ENOENT` when trying to
actually write data, however its nicer from a UX perspective to catch
this early on.

Change-Type: minor
Changelog-Entry: Validate the existence of the passed drive.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-21 18:31:08 -04:00
Juan Cruz Viotti
d2a8739904 docs: upgrade an npm dependency and handling shrinkwrap correctly (#586)
This small entry explains how to upgrade a dependency and ensure
`npm-shrinkwrap.json` is updated correctly.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-21 18:27:09 -04:00
Juan Cruz Viotti
d1c0fdb2b3 docs: ubuntu iso's hybrid format and parted warnings (#585)
Document that `parted` warnings about invalid GPT and physical block
size issues can be safely ignored as they are a consequence of "hybrid
iso's".

Fixes: https://github.com/resin-io/etcher/issues/312
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-20 11:33:20 -04:00
Juan Cruz Viotti
1762ea629f fix(GUI): check drive size against uncompressed image size (#582)
We were currently checking if a drive was large enough for an image by checking
the image file size, completely ignoring compression. This results on a small
chance of the uncompressed image not actually fitting in the drive, and
throwing more weird errors later on.

In order to mitigate this, we use the new `.getEstimatedFinalSize()` function
from `etcher-image-stream`, which returns the uncompressed size in the case of
compressed images.

We needed to update the build script for OS X to configure NPM correctly,
otherwise `lzma-native` throws some errors due to an ABI V8 incompatibility
issue.

Fixes: #571
See: https://github.com/addaleax/lzma-native/issues/25
Change-Type: patch
Changelog-Entry: Check if drive is large enough using the final uncompressed size of the image.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-19 23:17:09 -04:00
Juan Cruz Viotti
ef96ae86a0 chore: stop requiring a specific nodejs version to build Etcher (#584)
We were previously requiring users to run the exact same NodeJS version as
Electron bundled in order to avoid native add-on compilation incompatibilities,
however this problem is completely mitigated by configuring NPM to build
against an Electron specific V8.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-19 22:28:41 -04:00
Juan Cruz Viotti
9c3cb6c51e docs: explicitly list all dependencies in CONTRIBUTING.md (#583)
The dependencies are checked for in the build scripts, but for the user
convenience, we should also list them explicitly in the `CONTRIBUTING.md`
guide.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-19 22:10:57 -04:00
Juan Cruz Viotti
3654cff08f chore: update shrinkwrap file (#581)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-19 21:35:31 -04:00
Juan Cruz Viotti
4e397f099e chore: change CHANGELOG layout to features/fixes/misc (#580)
This layout will be used when generating the CHANGELOG with Versionist.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-19 12:33:39 -04:00
Juan Cruz Viotti
a3dc8624b1 feat(GUI): enable "unsafe" mode (#578)
This setting makes Etcher not filter non-removable drives, allowing you to
arbitrarily write to your system drives.

This is a dangerous option, therefore we present it in a separate section of
the settings page, and show an informative confirmation dialog.

Change-Type: minor
Changelog-Entry: Add an "unsafe" option to bypass drive protection.
Fixes: https://github.com/resin-io/etcher/issues/480
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-18 22:42:24 -04:00
Juan Cruz Viotti
e696d0722d upgrade: drivelist to v3.2.2 (#577)
This version contains a fix to check the removable state of drives without a
file system in Windows.

Link: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Upgrade `drivelist` to v3.2.2.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-18 10:55:38 -04:00
Juan Cruz Viotti
b965b5d835 refactor(GUI): increase writer proxy logging (#576)
We were facing quite some issues that involved debugging the writer child
process, which proved to be a very difficult task given the lack of information
we're exposing to the parent.

This is an attempt to improve that situation.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-18 10:18:15 -04:00
Juan Cruz Viotti
1308177d54 v1.0.0-beta.11
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-17 21:08:51 -04:00
Juan Cruz Viotti
242c042ae7 upgrade: etcher-image-write to v5.0.2 (#575)
This version contains a fix for a `diskpart` error on Windows.

Change-Type: patch
Changelog-Entry: Upgrade `etcher-image-write` to v5.0.2
Link: https://github.com/resin-io-modules/etcher-image-write/blob/master/CHANGELOG.md
See: https://github.com/resin-io/etcher/issues/552
See: https://github.com/resin-io/etcher/issues/571
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-17 20:59:50 -04:00
Wasabi Fan
c809ffe2b2 chore: use comments in issue template (#572) 2016-07-13 16:47:57 -04:00
Juan Cruz Viotti
edc69170d9 chore: don't force a linebreak style in ESLint (#570)
We're currently forcing a UNIX linebreak style, which causes hundreds of
complaints from the linter when cloning the project in a Windows machine
with a default configuration.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-12 10:30:07 -04:00
Juan Cruz Viotti
6348d88c95 chore: add commands to build scripts (#566)
Currently build scripts install dependencies and package everything on
every run. In order to allow more customisation, the build scripts now
accept the following commands:

- `install`: Only install dependencies.
- `package`: Only package the application.
- `all`: Install dependencies and package the application.

The above differentiation allows us to improve the documentation and CI
configuration files to point to the `install` commands instead of having
to explain how to configure NPM correctly, since that's done by the
build scripts by default.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-12 10:15:21 -04:00
Juan Cruz Viotti
fb893bec36 fix(GUI): ignore casing when checking an image extension validity (#568)
Currently, we take the image extension casing into account when
determining if the extension is a recognised one (e.g: `img`, `iso`,
etc). This causes an "Invalid image" error to be thrown when selecting
an image with an uppercase extension, like `UBUNTU.ISO`.

Change-Type: patch
Changelog-Entry: Don't throw an "Invalid image" error if the extension is not in lowercase.
Fixes: https://github.com/resin-io/etcher/issues/567
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-11 17:10:13 -04:00
Juan Cruz Viotti
9117c10c46 chore: simplify GitHub issue template (#569)
The current issue template is overwhelming and most of the questions it
ask are not that frequent in the real world.

The Etcher version, OS, architecture and DevTools output are by far the
most valuable, therefore it makes sense to reduce the issue template to
those.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-11 17:10:02 -04:00
Juan Cruz Viotti
4f49c4c9d0 fix(GUI): preserve original working directory in dialogs in GNU/Linux (#565)
The `$OWD` environment variable, which stands for "Original Working
Directory" is set in recent AppImageKit versions and equals the
directory from where the AppImage was run.

We set the open dialog default path to this environment variable for
consistency with other GNU/Linux applications.

Change-Type: patch,
Changelog-Entry: Set dialog default directory to the place where the AppImage was run from in GNU/Linux.
See: 1569d6f854
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-11 13:36:40 -04:00
Juan Cruz Viotti
e79c03a070 docs(GUI): deactivate desktop shortcut Linux prompt (#563)
Document how to globally disable AppImage's desktop integration feature,
which promtps the user to create a desktop shortcut for the appliation
at startup.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-08 17:55:33 -04:00
Juan Cruz Viotti
4482bb0eeb chore: normalize documentation (#562)
- Make sure we use the same tile style.
- Make sure we wrap lines in the same way.
- Use hyphens as file name separators.
- Move links to the bottom of the docs.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-08 10:40:54 -04:00
Juan Cruz Viotti
fa9966a2b1 upgrade(GUI): electron to v1.2.6 (#561)
This version contains a GNU/Linux fix there the image extension was
changed by the dialog.

Change-Type: patch
Changelog-Entry: Fix `ENOENT` error when selecting certain images with multiple extensions on GNU/Linux.
See: https://github.com/electron/electron/issues/6305
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-07 14:34:27 -04:00
Juan Cruz Viotti
adcc13d474 fix(GUI): escape image path spaces correctly on Windows (#560)
The `elevator` module passes its arguments directly to
`child_process.execFile()`, which handles escaping spaces and other
weird issues by default.

Instead of passing a separate argument for every word of the writer
proxy script command, we passed the whole thing at once, which means we
didn't get the escaping features by default.

Change-Type: patch
Changelog-Entry: Fix flashing not starting when an image name contains a space.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-07 13:31:44 -04:00
Juan Cruz Viotti
b384a1d974 fix(GUI): escape parens in image paths on Linux/OS X (#558)
Images may contain parenthesis. This is usually the case when you
re-download a file with a web browser, which atuaomtically appends `(N)`
to the path.

Not escaping parenthesis means that when passing the image path as an
argument to the write proxy script, bash will complain about it as a
syntax error on the command.

The fix is not necessary in Windows. I've been able to write images
containing parenthesis in that operating system without issues.

Change-Type: patch
Changelog-Entry: Fix error when writing images containing parenthesis in GNU/Linux and OS X.
Fixes: https://github.com/resin-io/etcher/issues/556
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-07 13:20:04 -04:00
Juan Cruz Viotti
57ad0ccc93 fix(GUI): uncaught error when cancelling an elevation request (#559)
Currently, if we cancel elevation, we'd get a big scary validation error
about `passedValidation` not being passed to the flash results object.

This fix also requires some adjustments to `wasLastFlashSuccessful()` in
order to adapt to the cancellation scenario.

Since a cancelled elevation request means the writing never took place,
`wasLastFlashSuccessful()` returns `true` if so, without even looking at
`passedValidation`.

Change-Type: patch
Changelog-Entry: Fix error when cancelling an elevation request.
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-07 13:19:47 -04:00
Juan Cruz Viotti
3e01c62367 docs: commit guidelines (#542)
This document will serve as a more expanded guide on the commit
conventions we are going to be introducing in this project mainly for
the purpose of `CHANGELOG.md` generation.

See: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-07 11:35:05 -04:00
Juan Cruz Viotti
c52addb13f chore: point to the new Gitter channel (#555)
We've created a new Gitter channel specifically for Etcher.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-04 11:51:20 -04:00
Juan Cruz Viotti
eb3ffbfd30 upgrade: etcher-image-stream to v2.3.0 (#551)
* upgrade: etcher-image-stream to v2.3.0

This version contains support for `hddimg` files.

Changelog-Entry: Add support for `hddimg` images.
Change-Type: minor
Fixes: https://github.com/resin-io/etcher/issues/549
Link: https://github.com/resin-io-modules/etcher-image-stream/blob/master/CHANGELOG.md#v230---2016-07-01
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* minifix(GUI): add a "many more" tooltip in the first step

The amount of image types we support is growing exponentially. Adding
the uncompressed extensions and the compressed ones in a tooltip gave us
room the breathe in the past, but its not enough anymore.

The current approach allows us to scale forever: we list the first three
extensions, and add a "many more" tooltip that shows all the rest.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-01 11:05:57 -04:00
Juan Cruz Viotti
c425632e27 minifix(GUI): use close() to dismiss drive selector modal (#550)
Using `dismiss()` causes the promise to be rejected, with no reason in
this case. Given we made sure we were handling errors from dialogs in a
previous commit, this issue manifested itself.

The `close()` function, without arguments, makes more sense in this
case.

See: https://github.com/resin-io/etcher/pull/548
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-01 10:56:30 -04:00
Juan Cruz Viotti
5e1ee62840 chore: update shrinkwrap version (#543)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-07-01 10:47:32 -04:00
Juan Cruz Viotti
e670b6b493 upgrade: sudo-prompt to v5.1.0 (#547)
This new version contains a huge improvement on how the `kdesudo` dialog
looks.

See: 17f45ebef3
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 14:30:47 -04:00
Juan Cruz Viotti
eb0d8d46cc minifix(GUI): handle image dialog and drive selector errors (#548)
Currently, if either `OSDialogService.selectImage()` or
`DriveSelectorService.open()` are rejected, we completely swallow the
errors, making very hard to debug certain problems.

This PR takes care of showing the usual error dialog for those cases.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 14:30:39 -04:00
Juan Cruz Viotti
c434746a49 refactor(GUI): make use of etcher-latest-version (#544)
The code that performs an HTTP request to the S3 bucket where released
are stored and determines which is the latest available version was
extracted to a separate module called `etcher-latest-version`, mainly
for the website to be able to re-use this functionality.

See: https://github.com/resin-io-modules/etcher-latest-version
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 13:17:03 -04:00
Juan Cruz Viotti
f277724749 fix(GUI): incorrect ETA on certain timezones (#545)
In certain timezones, like India's, the ETA would display very weird
numbers. The problem was that we passed a number of milliseconds to
MomentJS, which created a Date object based on it taking timezones into
consideration.

As a solution, we convert the seconds to a Date object containing the
lowest possible date values, and set its seconds to the ETA, since this
effectively represents just the number of seconds we're interested in.

Changelog-Entry: Fix incorrect ETA numbers in certain timezones.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 12:11:41 -04:00
Juan Cruz Viotti
a81fdbe16a fix(GUI): don't throw if state speed is 0 (#546)
There is a small flaw in the current state validation rules where a
speed that equals zero will be considered as if the speed was missing
giving that `!0 == true`.

Changelog-Entry: Fix state validation error when speed equals zero.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 12:11:35 -04:00
Juan Cruz Viotti
0eb0c99056 fix(GUI): display zip in supported images tooltip (#539)
The `SupportedFormatsModel` went through some changes recently, notably,
the distinction between compressed and archived formats.

This change introduced a subtle issue since we listed compressed and non
compressed supported formats on the main screen, but forgot about
archives.

Changelog-Entry: Display `*.zip` in the supported images tooltip.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 20:09:54 +05:30
Juan Cruz Viotti
ea1df5cc11 chore: make use of ESLint (#540)
JSCS has merged with ESLint. This is the perfect excuse to move to
ESLint and unify both JSHint and JSCS hints under ESLint.

This PR also deprecates `gulp lint` in favour of `npm run lint`.

See: https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.zbuwvxa5y
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 20:09:44 +05:30
Juan Cruz Viotti
09424942a0 fix(GUI): uncaught exception in update notifier (#541)
Since the addition of Redux and ImmutableJS data structures, we store
the application settings in the Redux store.

This means that checkboxes on templates can no longer bind to the
setting properties directly.

This was fixed in the setting page, but we missed one of them in the
update notifier model.

```html
ng-model="modal.settings.get('sleepUpdateCheck')"
```

Won't lead any meaningful return, and in fact, throws an uncaught
exception.

Changelog-Entry: Fix uncaught exception when showing the update notifier modal.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-30 20:09:37 +05:30
Juan Cruz Viotti
c0a21ca203 v1.0.0-beta.10
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 19:06:51 -04:00
Juan Cruz Viotti
312540275f chore: update shrinkwrap file (#538)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 18:59:00 -04:00
Juan Cruz Viotti
1c1ec04608 fix(Windows): upgrade etcher-image-stream to v5.0.2 (#537)
This version contains a fix to an `EPERM` issue ocurring on Windows.

See: https://github.com/resin-io-modules/etcher-image-write/pull/45
Fixes: https://github.com/resin-io/etcher/issues/531
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 18:24:09 -04:00
Juan Cruz Viotti
3bf712b592 fix: don't throw if state percentage is zero (#536)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 16:15:35 -04:00
Juan Cruz Viotti
74d436f4f5 chore: add a GitHub issue template (#535)
An issue template would help us ensure we get all the information we
need at the time of submission, so we don't have to go back and forth
with the user to answer the same questions every time, wasting the
user's time.

See: https://github.com/blog/2111-issue-and-pull-request-templates
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 14:54:56 -04:00
Juan Cruz Viotti
49d89b4ace fix: prevent user from zooming in the whole application (#534)
Turns out the user can zoom-in the whole application, which we didn't
notice before.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 14:20:41 -04:00
Juan Cruz Viotti
c6ef5edda3 fix(progressButton): spiky diagonal lines (#533)
The progress button exhibits spiky diagonals when used it with the
"striped" modifier. This can be seen better when drastically reducing the animation
speed.

Turns out its a Webkit rendering bug. I've stumbled into dozens of
"workarounds" on the internet (mainly Stack Overflow), however none of
them fixed the issue.

After some crazy amount of experimentation, the issue is gone if we add
1% to certain stop positions. Weird stuff.

Fixes: https://github.com/resin-io/etcher/issues/472
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-27 14:18:54 -04:00
Juan Cruz Viotti
1a49b36a14 refactor: store settings in redux store (#530)
* refactor: getter/setter interface for SettingsModel

This PR introduces a getter/setter interface for `SettingsModel`, which
replaces the old way of managing setting values by simply assigning
properties to an object.

This is the first step towards moving the settings functionality to the
Redux store.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* refactor: store settings in redux store

The state data structure now contains a property called `settings`,
which is a map containing all setting values.

The list of supported settings can be calculated by retrieving the keys
from the `settings` object, which means that if we support a setting, we
must include a default.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* feat: store settings in localStorage

This functionality was deleted by acb0de2 when moving the settings
object to the redux store, promising that the feature will be added back
in a future commit.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-24 16:06:27 -04:00
Juan Cruz Viotti
714b165c0c refactor: move flash results state to Redux store (#529)
This is a rather big PR that moves the flash results information to the
Redux store, which simplifies and improves a lot of things as throughly
described in the commits that introduced Redux.

Here's a summary of the changes:

- Add a `flashResults` property to the store.

- Validate the contents of `flashResults`, handling certain edge cases
that make the modal incoherent.

- Split `ImageWriterService.setFlashing()` to
`ImageWriterService.setFlashingFlag()` and
`ImageWriterService.unsetFlashingFlag()`.

- Require the flash results to be passed to
`ImageWriterService.unsetFlashingFlag()`.

- Stop resolving the flash results from `ImageWriterService.flash()`.

- Implement `ImageWriterService.getFlashResults()`.

- Make the `RESET_FLASH_STATE` action reset the flash results.

- Access the source checksum from the store in the "finish" page,
  instead of requiring the controller to pass it as a state parameter.

- Implement `.wasLastFlashSuccessful()` function in the main controller
to replace the `.success` property.

- Completely remove the `.success` property in the main controller.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-24 12:52:40 -04:00
Juan Cruz Viotti
d16d5469fd fix: don't throw missing eta if eta is zero (#528)
The commit 0f8136f, which enforced validation for the state object,
introduced a subtle bug where `Missing state eta` would be thrown if
`eta === 0`, since `!0` evaluates to `true`.

This would cause the flashing to stop right at the end (when eta is
zero).

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-24 09:47:24 -04:00
Juan Cruz Viotti
60b68d775b refactor: rename progress property to percentage (#527)
So the property is consistent from what we get from `etcher-image-write`
and we don't have to unnecessarily rename ourselves to pass it to the
model.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-24 09:47:10 -04:00
Juan Cruz Viotti
4708401260 test: validate contents of flash state object (#526)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-24 09:16:15 -04:00
Juan Cruz Viotti
b0d13eee3b fix: broken tests due to orphaned notifier tests (#525)
The `NotifierService` was removed in 934d287, but for some reason, the
CI servers didn't report an error because we forgot to delete the
corresponding test file.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 19:07:48 -04:00
Juan Cruz Viotti
ff8e16b4ac refactor: improve analytics and image-writer module names (#524)
- From `Etcher.analytics` to `Etcher.Modules.Analytics`.
- From `Etcher.image-writer` to `Etcher.Modules.ImageWriter`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 18:39:20 -04:00
Juan Cruz Viotti
c291a9067d fix: emit progress even when not in the main screen (#523)
We have logic that displays useful log messages about the state of the
flashing, as well as update the window progress in each oeprating system
(dock in OS X, task bar in Windows, etc), however since this logic lives
in the controller, the progress reports are completely frozen if the
user navigates away from the main screen (to the settings page for
example).

As a solution, we move the code that subscribes to the state change
events to a global `.run()` so it can persist page changes.

Since making sure the listeners are unregistered is not relevant anymore
(since the code is not running in a controller anymore), we get rid of
`NotifierService`, a module we built for this purpose, and directly
subscribe to the Redux store instead.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 18:39:15 -04:00
Juan Cruz Viotti
c44594b45e refactor: use ES6 fat arrows in application code (#522)
ES6 fat arrows provide reasonable `this` behaviour, which protects us
from some subtle accidental bugs, and erradicates `const self = this`
from the codebase.

Far arrows were not applied in Mocha code and AngularJS
controllers/services constructors since these frameworks rely on
`.bind()` on those functions.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 17:41:41 -04:00
Juan Cruz Viotti
4d89b1b1f7 refactor: flatten "flash" data structure property (#521)
Currently, the "flash" property of the application state containing both
the actual flashing state, and the flashing flag.

To simplify things, the following changes have been introduced:

- Move `flash.flashing` to `isFlashing`.
- Move `flash.state` to `flashState`.
- Rename `SET_FLASHING` to `SET_FLASHING_FLAG`.
- Extract `UNSET_FLASHING_FLAG` from `SET_FLASHING_FLAG`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 17:12:25 -04:00
Juan Cruz Viotti
78da500816 refactor: expose an object of available actions (#520)
Referencing actions as properties of an object is more reliable than
just hardcoding strings everywhere.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 16:10:22 -04:00
Juan Cruz Viotti
5ac5f3a423 fix: don't allow to set the flashing state if not flashing (#519)
Currently, we allow updating the flashing state independently on the
value of the `flashing` property.

In order to maintain the application state coherent, we deny updating
the flashing state if we're not currently flashing, which lets us safely
assume that the state will be in a reset state if we're not flashing.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 15:38:40 -04:00
Juan Cruz Viotti
2ecf9d32a7 refactor: reset state when the flashing flag is set to false (#518)
Currently, we were taking care of resetting the flashing state manually
across several controllers. Now that data mutations live in a single
place, we trigger a flash state reset whenever the flashing flag is set
to false, which reliably handles every case and allows us to forget
about it.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 15:12:57 -04:00
Juan Cruz Viotti
c845fe10b0 fix: check for updates only once at startup (#517)
Currently, the update check runs every single time the main application
controller is instantiated, meaning that the update check would run
again when you visit the settings screen and go back to the main page,
or return to the main page after finishing a flash.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 12:19:32 -04:00
Juan Cruz Viotti
321c653d74 refactor: move auto-select logic to redux store (#516)
Now that we have a central source of truth for state mutations, the
auto-select feature fits really well in the redux store, particularly
inside the `SET_AVAILABLE_DRIVES` action.

This also has the great benefit that we can unit test the auto-selection
logic, which was not particularly trivial before, when such code lived
in the controller instead.

The only downside of this approach is that we lose the nice "Auto-select
drive" analytics event, which will be re-added very soon in a future PR.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 12:19:27 -04:00
Juan Cruz Viotti
77f2b1d1cc fix: infinite digest loop with ngRepeat + ImmutableJS (#514)
The addition of `ImmutableJS` caused some issues with Angular's digest
loop. Since `Immutable#toJS()` returns a new object/array every time
(that is, different references), it caused AngularJS to get stuck in an
infinite digest loop when using `ngRepeat` over a function that called
`Immutable#toJS()`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 11:41:24 -04:00
Juan Cruz Viotti
2b9f0b5003 refactor: apply REMOVE_DRIVE recursively in SET_AVAILABLE_DRIVES (#515)
We were duplicating the remove drive logic in the `SET_AVAILABLE_DRIVES`
case when the currently selected drive didn't exist anymore.

A better way to handle this without coding repetition is to recursively
apply the reduced with the new state.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 11:20:10 -04:00
Juan Cruz Viotti
c2c5eb59b9 fix: deselect drive if its not available anymore (#513)
If the user has a selected drive, but a new scan shows that such drive
is no longer available, then the selected drive should be de-selected.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 09:26:35 -04:00
Juan Cruz Viotti
e16139af03 fix: throw if attempting to select a locked drive (#512)
We shouldn't allow a write-protected drive from being selected, since
users will get confusing `EPERM` errors later on.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-23 09:26:23 -04:00
Juan Cruz Viotti
a93c28ab20 docs(CLI.md): write the CLI.md document (#511)
This document explains what the Etcher CLI is, how can be used, and some
peculiarities, like `--robot` and exit codes.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 17:06:06 -04:00
Juan Cruz Viotti
2f3118e4c3 chore(gulp): make linter exit with a non-zero code (#510)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 16:36:14 -04:00
Juan Cruz Viotti
c4c8e2c038 refactor: manage application state with redux (#508)
Currently, Etcher's application state is stored among various models,
making it a bit hard to mentually visualise the application state at a
certain point of execution. This also means that some quirky bugs
appear, and we have to take non-elegant measures to mitigate them, for
example:

- The current drive selection might be invalid if the current available
drive list doesn't contain it anymore.

- The progress state might be modified while there is no flashing in
process.

- We have to rely on event emission to propagate the current state to
the application progress bar.

- The validity of a selected drive might depend on the currently
selected image.

While all these issues can be addressed with common programming
techniques, Redux introduces a new way of thinking about the application
state that make the above problems non-existent, or trivial to fix.

This PR creates a Redux store containing the logic used to mutate state
from:

- `SelectionStateModel`.
- `DrivesMode`.
- `ImageWriterService`.

We are also making extra effort to preserve the public APIs from the
models, which we will be simplifying in later commits.

There is still much to be done, but we're happy to be taking the first
steo towards a much cleaner architecture.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 16:22:59 -04:00
Juan Cruz Viotti
991b69c17e refactor(DriveScannerService): use RxJS (#505)
The concept of a drive scanner lends itself very well to the concept of
"reactive programming", since the "available drives" make perfect sense
as an "Observable".

For this reason, the module was re-implemented using RxJS, which greatly
simplifies things and erradicates certain edge cases we were protecting
ourselves from automatically.

Other changes made in this PR:

- `DriveScannerService` no longer requires `DrivesModel`. The
`DriveScannerService` is the one in charge of populating the model.

- `DriveScannerService.scan()` no longer returns an `EventEmitter`. The
service itself is now an `EventEmitter`.

- `DriveScannerService` now emits a `drives`, not a `scan` event.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:41:36 -04:00
Juan Cruz Viotti
b923008f7c refactor: make use of angular-if-state (#506)
We'll use this external module rather than our local `if-state`
implementation.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:41:02 -04:00
Juan Cruz Viotti
4670ae125b fix: ensure dialog.showErrorBox() arguments are strings (#497)
If for some reason either the error title or message are not strings,
the user gets a very obscure error that looks something like this:

```
Error: Could not call remote function ''.
Check that the function signature is correct.
Underlying error:
  Error processing argument at index 0, conversion failure
```

What's even worse is that the above error is thrown when we attempt to
display an `Error` object, therefore completely hiding the real error.

In this commit, we make sure both parameters to `showErrorBox()` are
strings, as a safety measure to prevent this from happening again.

See: https://github.com/resin-io/etcher/issues/127
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:51 -04:00
Juan Cruz Viotti
24f442a8fc docs(MAINTAINERS.md): steps to upgrade electron (#501)
This PR documents the process to upgrade the Electron version correctly,
in order to prevent any potential compatibility issue when building
native dependencies.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:45 -04:00
Juan Cruz Viotti
447c67c58f feat: add support for dsk images (#504)
This type of images are distributed by the Ostro Project.

Closes: https://github.com/resin-io/etcher/issues/491
See: https://github.com/resin-io-modules/etcher-image-stream/pull/10
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:38 -04:00
Juan Cruz Viotti
acde20cee1 refactor(cli): make --robot option output JSON (#500)
The Etcher CLI `--robot` option outputs space separated lines including
useful information in a predefined order, for example:

```sh
progress write 50% 15s 65536
```

While this is very easy to parse, a stringified JSON line is much more
convenient since:

- We don't have to write any parsing logic.
- We don't have to guess the value types (string, number, boolean, etc).
- We don't have to hardcode property names.
- We don't have to extend the parsing code if we decide to send new
commands from the CLI, or make any change to the data we output.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:17 -04:00
Juan Cruz Viotti
1e3db916e6 style: fix lint warning in exit-codes.js (#499)
The lint complained that there were two consequent empty lines.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:10 -04:00
Juan Cruz Viotti
b02620c835 refactor: group AppImage related stuff (#498)
Currently we had AppImage scripts and other resources in various
different places in the code base.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-22 10:40:04 -04:00
Juan Cruz Viotti
588c510778 chore(shrinkwrap): omit platform-specific deps (#503)
If you run an `npm install` and then run `npm shrinkwrap`, the resulting
shrinkwrap file will contain the installed optional dependencies, making
them "required". If such optional dependency is platform dependent, `npm
install` will fail on different platform.

This is a known `shrinkwrap` limitation whose only workaround seems to
be manually filtering out platform specific dependencies from
`npm-shrinkwrap.json`.

For this purpose, we introduced the following changes:

- A custom `shrinkwrapIgnore` property in `package.json`, where we can
list specific modules that need to be filtered out from
`npm-shrinkwrap.json`.

- A NodeJS script to generate `npm-shrinkwrap.json` and omit modules
specified in `shrinkwrapIgnore` automatically.

- An NPM script called `shrinkwrap`, for convenience.

- Add `macos-alias` and `fs-xattr` to `shrinkwrapIgnore`.

- Regenerate `npm-shrinkwrap.json` based on newer dependencies from PRs
created before we introduced `npm-shrinkwrap.json` but merged after that
file was in place.

See: https://github.com/npm/npm/issues/2679
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-21 15:21:08 -04:00
Juan Cruz Viotti
95deab0b0d Get rid of application-wide elevation (#423)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-20 21:49:16 -04:00
Juan Cruz Viotti
57169b8313 v1.0.0-beta.9
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-20 12:40:52 -04:00
Juan Cruz Viotti
5eb330d0dc docs: document how to update the shrinkwrap file (#495)
We will be generating shrinkwrap files in every release for the
following purposes:

- Be able to run an `npm install` containing the exact package versions
used at the time of publishing.

- Auto-generate dependency updates CHANGELOG entries by comparing
shrinkwrap files between versions.

See: https://docs.npmjs.com/cli/shrinkwrap
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-20 12:23:53 -04:00
Juan Cruz Viotti
33eb0637b2 chore: configure commitizen (#494)
Etcher will start following Angular's commit guidelines, enforced by a
neat tool called `commitizer`, with the main purpose of being able to
auto-generate the CHANGELOG file.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-20 12:08:29 -04:00
Juan Cruz Viotti
16c3750b15 Don't check extensions before the first non compressed extension (#493)
Currently, we extract all the extensions from an image path and report
back that the image is invalid if *any* of the extensions is not a
valida extension, however this can cause trouble with images including
information between dots that are not strictly extensions.

For example:

```
elementaryos-0.3.2-stable-i386.20151209.iso
```

Etcher will consider `20151209` to be an invalid extension and therefore
will prevent such image from being selected.

As a way to allow these corner cases but will make use of our enforced
check controls, the validation routine will only consider extensions
starting from the first non compressed extension.

This PR also includes logic to show a nice GUI dialog saying that the
image is invalid in order to provide a much better experience than just
silently failing.

Fixes: https://github.com/resin-io/etcher/issues/492
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-20 12:05:33 -04:00
Juan Cruz Viotti
abdf26066c Open DevTools in "undocked" mode by default (#489)
Otherwise, DevTools gets opened inside the Etcher window, causing the
GUI to get completely messed up.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-17 17:53:03 -04:00
Juan Cruz Viotti
f49e2982e5 Resolve AppImage binary path correctly when running it as root (#490)
Currently, when the AppImage was being ran as `root` we would attempt to
run `./usr/bin/etcher`, assuming we were inside the AppDir already and
the relative path would resolve correctly.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-17 15:12:15 -04:00
Juan Cruz Viotti
9895773b6c Make sure elevated mount-point evaluates to a single line in GNU/Linux (#488)
Consider the case where a previously elevated mount was not unmounted
correctly. `mount | grep $(basename $APPIMAGE)` would evaluate to a
multi-line string, and therefore `awk` will perform its work on *each*
line separately, usually returning something like:

```
/tmp/.mountXXXX
/tmp/.mountYYYY-elevated
```

We then pass `$mountpoint` to `mkdir -p`, which evaluates to:

```
mkdir -p /tmp/.mountXXXX
/tmp/.mountYYYY-elevated
```

Therefore `/tmp/.mountXXXX` gets created, and
`/tmp/.mountYYYY-elevated` is ran as an executable, causing all sort of
cryptic errors to come out. This can be even worse, since the third
column of a `mount` line is not always a path, so the errors make even
less sense.

Fixes: https://github.com/resin-io/etcher/issues/482
Fixes: https://github.com/resin-io/etcher/issues/459

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-16 10:18:21 -04:00
Juan Cruz Viotti
cd87586cee Fix application wide vertical scroll bar (#487)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 15:41:42 -04:00
Juan Cruz Viotti
0d2fcac5e4 v1.0.0-beta.8
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:52:02 -04:00
Juan Cruz Viotti
df24388c3d Move update notifier modal style to the component (#486)
Currently, the modal style style used in this component was declared in
`components/_modal.scss`, however since this srule is very specific to
the update notifier component, its better declared in
`update-notifier/styles`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:26:38 -04:00
Juan Cruz Viotti
52f47d7b61 Check for python in build scripts (#485)
This dependency is not used directly by our build scripts, but its used
by `node-gyp` when building native modules, and its much nicer to show a
warning early on than having to halt the build script in the middle for
missing this dependency (specially on Windows systems).

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:26:22 -04:00
Juan Cruz Viotti
21b6e1aabc Prevent an invalid drive from being auto-selected (#484)
Currently we have logic in the drive selector dialog to prevent invalid
drives (too small, locked, etc) from being selected, however we are not
protecting auto-selection from these invalid devices.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:26:03 -04:00
Juan Cruz Viotti
a5fbe40b2d Move drive selector warning labels below the drive (#483)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 11:25:50 -04:00
Juan Cruz Viotti
8aa7bcd952 Prevent a very long image name from breaking the UI (#479)
This PR introduces two changes to mitigate this problem and overall
provide a better UX:

- Show ellipses in the middle of the image name in the first step if
needed.

- Add a tooltip below the image selection label in the first step to
show a little modal displaying the full path to the image.

Fixes: https://github.com/resin-io/etcher/issues/418
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-15 10:31:07 -04:00
Juan Cruz Viotti
34ab982b24 Remove body display hidden white flash workaround (#478)
In older versions of Electron, the application would display a quick
flash of white before running caused by the WebView loading up.

This workaround doesn't seem necessary anymore.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-13 10:58:01 -04:00
Juan Cruz Viotti
3d921f2f86 Upgrade etcher-image-write to v5.0.1 (#469)
* Upgrade etcher-image-write to v5.0.1

The new version contains an important fix to prevent `EPERM` errors on
Windows with certain drives.

Fixes: https://github.com/resin-io/etcher/issues/334
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Upgrade NPM to fix newer package versions not available in Appveyor

See: https://github.com/npm/npm/issues/4984
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-12 17:56:47 -04:00
Juan Cruz Viotti
4e9c25a1dd Fix sporadic race condition in update notifier test suite (#476)
We rely on a millisecond to determine the state of the update notifier
logic, which can fail at least once per 50 builds or so.

We increase the time difference to account for this little room for
error.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-12 15:58:33 -04:00
Juan Cruz Viotti
fbe6fe1142 Show a "Locked" label if the drive is write-protected (#475)
* Implement SelectionStateModel.isDriveLocked()

Notice we also increase the maximum number of lines JSCS check, since
the `SelectionStateModel` test suite already met that limit.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Show a "Locked" label if the drive is write-protected

Fixes: https://github.com/resin-io/etcher/issues/458
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 15:45:46 -04:00
Juan Cruz Viotti
51b6de4634 Show an informative label if a drive is not large enough (#474)
This is a huge improvement over our current approach, which was simply
to cross out the drive without further explanation.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:52:38 -04:00
Juan Cruz Viotti
dc7b31f061 Apply checksum label padding as a custom modifier (#473)
We want to re-use the `label` component without big paddings in other
areas of the application, therefore we move the custom padding to a
separate label modifier.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:44:02 -04:00
Juan Cruz Viotti
608cb5d74a Cleanup CSS (#471)
This is by no means a complete CSS refactoring. There still a lot to be
done. This encompasses mostly:

- Move "Finish page" specific styles to that module.
- Remove unused CSS rules.
- Move generic Bootstrap rules to `_bootstrap.scss`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-11 13:21:22 -04:00
Juan Cruz Viotti
f674f3d706 Fix image containing dots in the filename considered unsupported (#468)
Currently, we detect the extensions of an image path by finding the
first dot, and splitting everything afterwards, however this will fail
with image paths containing dots, like `foo.1.2.3-bar.iso.gz`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-10 10:19:26 -04:00
Juan Cruz Viotti
5ae5a1915d Refactor supported image logic to SupportedFormatsModel (#467)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-09 13:08:01 -04:00
Juan Cruz Viotti
b950136deb Extract DrivesModel from DriveScannerService (#466)
Currently, `DriveScannerService` is in charge of both scanning the
available drives and maintaining the state of the currently detected
drives.

To honour the single responsibility principle, we split this service
into a `DrivesModel`, which is incharge of maintaining the state without
caring how they are detected, and `DriveScannerService`, which only
scans the available drives and modified `DrivesModel` accordingly.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-09 12:42:09 -04:00
Juan Cruz Viotti
fc6ccf70dd Prevent selection of invalid images (#462)
The user might attempt to select an invalid image by dropping on the
first step, which would cause Etcher to blindly select it, possibly
causing errors later on the process.

This PR makes use of the list of supported extensions provided by
`SupportedFormatsModel` and prevents the selection if necessary, logging
an event that might help us determine which unsupported image types
users try to burn most often.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 15:49:55 -04:00
Juan Cruz Viotti
0557c45102 Link README to the roadmap (#463)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 15:49:49 -04:00
Juan Cruz Viotti
7d5f42f38c Try to get more information about error messages (#464)
If the error object is not well-formed, try to get as most information
about it as we can instead of just realying on generic error messages.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 15:49:42 -04:00
Juan Cruz Viotti
f2a8860135 Fix package.json key/property spacing (#461)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 13:36:00 -04:00
Juan Cruz Viotti
8de4be1897 Display ETA during flash and check (#460)
* Show speed during check

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Display ETA during flash and check

Fixes: https://github.com/resin-io/etcher/issues/256
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 13:35:44 -04:00
Juan Cruz Viotti
ef82c2f09b Update Appveyor badge (#457)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 13:19:11 -04:00
Juan Cruz Viotti
0c94de7fcf Prevent exernal resources from being loaded by the WebView (#456)
If a user drags and drops an image, an HTML file, or other resource the
WebView understands, Electron will navigate away from the application
and load it up in the WebView, making the application unusable unless
the user restarts it.

Fixes: https://github.com/resin-io/etcher/issues/430
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-08 11:10:46 -04:00
Juan Cruz Viotti
6c936a5192 Document can-ignore module.require annotation (#455)
* Document `can-ignore` module.require annotation

This annotation was introduced in: 1872d1f

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Trigger CI build
2016-06-08 11:10:32 -04:00
Igor Klopov
a27e246cc9 Annotation for EncloseJS to ignore missing dependency (#454) 2016-06-07 14:52:51 -04:00
Juan Cruz Viotti
11fb499344 Upgrade drivelist to v3.1.2 (#450)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-07 10:56:36 -04:00
Juan Cruz Viotti
052bb00be9 Fix CI tests (#452)
- Fix lint warning.
- Set the correct electron version in `appveyor.yml`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-06 18:12:38 -04:00
Juan Cruz Viotti
dd6182ceb3 Write a document explaining Etcher's architecture (#447)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-06-06 17:52:18 -04:00
Juan Cruz Viotti
31728801f5 Don't show a progress bar in update notifier modal (#445)
Fixes: https://github.com/resin-io/etcher/issues/442
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 21:18:13 -04:00
Juan Cruz Viotti
b14e94fc3b Fix GNU/Linux not opening an external resource when elevated (#446)
We currently had a workaround in place to make use of `node-open`
instead of Electron's built-in `shell` module since the latter didn't
work on older Electron versions on GNU/Linux for some reason.

After some experimentation, `node-open` doesn't seem to be working for
elevated applications anymore. I honestly didn't chase the issue further
since Electron `shell` has been fixed, and works fine when elevated,
therefore this PR basically undoes the previous workaround.

Fixes: https://github.com/resin-io/etcher/issues/443
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 21:18:03 -04:00
Juan Cruz Viotti
28e6cb3f79 Create docs/MAINTAINERS.md (#441)
This document will evolve as a guide for maintainers to perform all
sorts of common tasks.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 16:13:50 -04:00
Juan Cruz Viotti
94bd796daa v1.0.0-beta.7
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 10:12:04 -04:00
Juan Cruz Viotti
efe931cae5 Upgrade drivelist to v3.1.1 (#438)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 10:09:53 -04:00
Juan Cruz Viotti
bedda41843 Provide a GUI elevation dialog for GNU/Linux (#440)
Fixes: https://github.com/resin-io/etcher/issues/439
Fixes: https://github.com/resin-io/etcher/issues/412
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-26 10:04:23 -04:00
Juan Cruz Viotti
e9164df384 Install NPM dev dependencies during the build (#437)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 15:35:56 -04:00
Juan Cruz Viotti
7d0ea21567 Run linter as part of npm test (#436)
* Fix lint warnings

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Run linter as part of `npm test`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 15:35:51 -04:00
Juan Cruz Viotti
abb7dc6469 Prevent pressing "space" to re-click the "Flash" button (#435)
Currently we disable pointer events on the "Flash" button once a flash
is in progress to prevent the user from clicking it, but we didn't
consider that if the user kept focus on the button, he can press the
"space" bar for the same effect.

Fixes: https://github.com/resin-io/etcher/issues/431
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 14:21:31 -04:00
Juan Cruz Viotti
c8edafdad8 Upgrade CI servers NodeJS version (#434)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 14:21:23 -04:00
Juan Cruz Viotti
6af2bd0d30 Prevent global shorcuts from interferring with other applications (#433)
Fixes: https://github.com/resin-io/etcher/issues/389
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 12:40:25 -04:00
Juan Cruz Viotti
2948d13075 Fix image drag and drop not working anymore (#432)
There has been changes in the model regarding with how the image
information was stored, and the dropzone directive was never modified to
comply with those changes.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 11:52:50 -04:00
Juan Cruz Viotti
3b30748b1f Add support for .gz and .bz2 (#419)
See: https://github.com/resin-io/etcher/issues/325
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 10:38:12 -04:00
Juan Cruz Viotti
c1074de198 Upgrade electron to v1.1.1 (#427)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 10:37:31 -04:00
Juan Cruz Viotti
d9f6c1b838 Add instructions to configure NPM for installation (#429)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-24 10:37:12 -04:00
Juan Cruz Viotti
f4d9de850c Fix indentation in build scripts (#428)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-23 14:27:03 -04:00
Juan Cruz Viotti
94e209ac80 Install dev dependencies before calling electron-builder on Windows (#426)
Since the addition of a patch to only install production dependencies on
build scripts, the Windows build would fail when reaching to
`electron-builder`, since this dependency might not be installed at that
point.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-22 22:45:06 -04:00
Juan Cruz Viotti
9c755fbb53 Override files if needed in the build scripts (#425)
This allows the users to continuously run the build script without
having to remove `etcher-release` or certain files inside that directory
to prevent silly "file exists" errors.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-22 22:44:59 -04:00
Juan Cruz Viotti
78fc028ae0 Only install production dependencies from build scripts (#424)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-22 21:43:27 -04:00
Juan Cruz Viotti
b061c116da Enforce expected NodeJS version in build scripts (#422)
Not building Etcher with the exact NodeJS version bundled with Electron
can cause all sorts of weird issues. This was previously documented, but
its now enforced so Etcher packagers don't forget by accident.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-20 10:51:09 -04:00
Juan Cruz Viotti
e1a3c88b10 Display image checksum on success in the CLI (#417)
* Upgrade etcher-image-write to v5.0.0

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Display image CRC32 checksum on success

Fixes: http://github.com/resin-io/etcher/issues/357
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-19 10:13:10 -04:00
Alexandros Marinos
198d24741a make inbound links from the etcher app traceable in resin's analytics (#411) 2016-05-15 21:33:59 -04:00
Juan Cruz Viotti
35f42665d2 Call packageignore.js after depencies have been installed in Windows (#409)
Otherwise, dependencies used by `packageignore.js`, like Lodash, could
not be found.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-13 17:54:43 -04:00
Juan Cruz Viotti
15752b2efb v1.0.0-beta.6
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 17:14:19 -04:00
Juan Cruz Viotti
bf37ee72df Prevent selection of drives that are not large enough (#408)
* Make .selectImage() dialog return an object with a `path` property

This allows to return more than one value for the selected image,
like image size and other metadata for example.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Return image size from .selectImage() dialog

This property will be useful to perform some sanity checks, like
ensuring the selected drive is large enough to contain the image.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Store both the image path and the image size in the selection model

In order to simplify accessing such properties in an encapsulated
manner, `SelectionStateModel.getImage()` was replaced with the following
functions:

- `SelectionStateModel.getImagePath()`.
- `SelectionStateModel.getImageSize()`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Increase SelectionStateModel setter validation

The model not providing any kind of validation was the source of some
bugs I encountered while implementing the previous commits that would
not have happened otherwise.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Prevent selection of drives that are not large enough

- The drive selector modal was modified such that drives that are not
large enough are crossed out, and the user is not able to click them.

- In the case of drive auto-selection, not large enough drives won't
attempt to get autoselected.

This commit introduces:

- The `SelectionStateModel.isDriveLargeEnough()` function.

Fixes: https://github.com/resin-io/etcher/issues/344
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 15:38:19 -04:00
Juan Cruz Viotti
c31ccdbdbe Move the code that performs the writing to lib/cli (#407)
The CLI is the only entity that calls it directly.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 15:16:15 -04:00
Juan Cruz Viotti
a4e2639c00 Implement update notifier modal (#406)
Auto-update functionality is not ready for usage. As a workaround to
prevent users staying with older versions, we now check for updates at
startup, and if the user is not running the latest version, we present a
modal informing the user of the availiblity of a new version, and
provide a call to action to open the Etcher website in his web browser.

Extra features:

- The user can skip the update, and tell the program to delay the
notification for 7 days.

Misc changes:

- Center modal with flexbox, to allow more flexibility on the modal height.
interacting with the S3 server.
- Implement `ManifestBindService`, which now serves as a backend for the
`manifest-bind` directive to allow the directive's functionality to be
re-used by other services.
- Namespace checkbox styles that are specific to the settings page.

Fixes: https://github.com/resin-io/etcher/issues/396
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-12 13:11:30 -04:00
Juan Cruz Viotti
662c589ab9 Implement writing by spawning the CLI as a child process (#400)
After this change, the CLI becomes the only entity actually performing
I/O with the devices, and the GUI is just a wrapper around it.

When you click "Flash", the GUI spawns the CLI with all the appropriate
options, including `--ipc`, which uses an IPC communication channel to
report status back to the parent process.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-11 17:52:09 -04:00
Juan Cruz Viotti
f365f2fa57 Group documentation in a docs/ directory (#405)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-11 12:46:27 -04:00
Juan Cruz Viotti
883cae0d87 Remove implicit "Enable" from settings items (#404)
The fact that there is a checkbox at the left of the items already makes
clear the ticking them enables the setting.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-11 09:25:36 -04:00
Juan Cruz Viotti
9c555fd1c9 Set mocha reporter to min (#403)
Fancier reporters are not shown correctly on CI servers.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 16:10:05 -04:00
Juan Cruz Viotti
d36509d995 Implement cross-platform build scripts (#395)
With the addition of native addons to Etcher, its no longer possible to
package the application for all operating system in a single host.

Given we need to build on Windows, we're creating cross-platform bash
and batch scripts and deprecating the original Makefile.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 16:07:18 -04:00
Juan Cruz Viotti
52a77160e3 Make sure bower dependencies are installed in CI servers (#399)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 15:44:06 -04:00
Juan Cruz Viotti
aa4beaab4d Consider carriage returns when asserting SVG contents equality (#398)
This was causing builds to fail in Windows.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 15:05:32 -04:00
Juan Cruz Viotti
e0416cf2dc Refactor how application selection is accessed from DriveSelectorModal (#397)
* Refactor SelectionStateModel.isCurrentDrive() to only check `.device`

This set of changes modify `SelectionStateModel.isCurrentDrive()` to
only return true if the `.device` property is equal, and ignore the
rest, since there can be tons of false positives if the drive doesn't
exactly matches otherwise.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Implement SelectionStateModel.toggleSetDrive()

This function is useful to toggle the current drive selected based on a
drive object.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Make use of SelectionStateModel directly in DriveSelectorModal

Currently, we were basically proxying (with some additions)
`SelectionStateModel` through a service called
`DriveSelectorStateService`, which was completely unnecessary.

Now, we make use of `SelectionStateModel`, after moving any custom logic
from `DriveSelectorStateService` to `SelectionStateModel`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 15:05:25 -04:00
Juan Cruz Viotti
c508f341f7 Point NPM to electron in Appveyor to avoid compilation issues (#402)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 14:42:07 -04:00
Juan Cruz Viotti
6e3f17fd7a Show electron output in Appveyor (#401)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-10 14:19:06 -04:00
Juan Cruz Viotti
e4024bfe66 v1.0.0-beta.5
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-04 02:12:25 -04:00
Juan Cruz Viotti
cb4798e0a5 Add support for XZ compressed images (#376)
This PR introduces `etcher-image-stream`:

https://github.com/resin-io-modules/etcher-image-stream

a module that will handle support for decompression, URL streaming, and
any other way to get a source of data to write in Etcher.

Most of the changes in this PR are because XZ decompression includes a
native dependency (no pure JS implementations out there for now), so we
had to tweak various things for the dependency to work correctly on
Etcher/Electron.

See: https://github.com/resin-io/etcher/issues/325
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-04 02:07:43 -04:00
Juan Cruz Viotti
5575cb1af8 Revert "Implement writing by spawning the CLI as a child process (#385)" (#394)
This reverts commit fab2d767b0ae6b0401b428910096af236897973d.
2016-05-04 01:57:26 -04:00
Juan Cruz Viotti
ccef599bcf Fix application not being elevated in Windows (#393)
After elevation routine refactoring, it looks like we have to exit the
parent process after a short while, otherwise it kills the app before
the elevated child process is executed.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-04 01:35:19 -04:00
Juan Cruz Viotti
369e38b310 Improve "Select Image" supported file types label with a tooltip (#392)
Fixes: https://github.com/resin-io/etcher/issues/378
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-04 01:30:54 -04:00
Juan Cruz Viotti
5d45ceade7 Add Python as a PUBLISHING pre-requisite (#391)
This is needed to build native NodeJS addons.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-03 19:45:03 -04:00
Juan Cruz Viotti
7d254160c5 Show the forked command as a debug analytics message (#388)
This is very useful for debugging.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-05-02 10:01:50 -04:00
Juan Cruz Viotti
fab2d767b0 Implement writing by spawning the CLI as a child process (#385)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 13:01:06 -04:00
Juan Cruz Viotti
d52f948e46 Use correct exit codes when running Etcher CLI with --robot (#384)
Currently, the exit codes documented in the help section was not
honoured if the CLI was ran with the `--robot` option. In this case, the
CLI would exit with code 0 even if the validation failed.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 12:30:09 -04:00
Juan Cruz Viotti
087a008d0d Make sure CLI args are parsed correctly when spawning in OS X (#383)
The binary used when spawning the CLI in OS X during development is
`electron-prebuilt/disk/Electron.app/Contents/MacOS/Electron`.

To make sure we catch both `Electron` and `electron`, make the
executable name lowercase before comparing it.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 11:55:23 -04:00
Juan Cruz Viotti
36bd696da9 Make use of etcher-image-write (#382)
This is the new name of the older `resin-image-write` dependency.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 09:45:52 -04:00
Juan Cruz Viotti
ad758cf391 Implement Etcher.OS.Dialog module (#381)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 09:03:20 -04:00
Juan Cruz Viotti
d373d32472 Move README "Developing" section to CONTRIBUTING.md (#380)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 09:03:15 -04:00
Juan Cruz Viotti
bd410bd88c Document exit codes in Etcher CLI help (#379)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-29 09:03:08 -04:00
Juan Cruz Viotti
ba9598be1a Upgrade resin-image-write to v4.0.1 (#377)
This new version contains a fix to align unaligned images and prevent
`EINVAL` errors.

Fixes: https://github.com/resin-io/etcher/issues/348
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-28 09:27:38 -04:00
Juan Cruz Viotti
10615b0899 Include lib/cli in final package (#372)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 15:23:46 -04:00
Juan Cruz Viotti
f8b66b317a Escape leading periods on packageignore list (#373)
Otherwise, the `.` is interpreted as a period in a regular expression,
  which matches every literal character, causing some packages deep in
  the `node_modules/` hierarchy to be ignored for no reason.

For example, if we ignore `.git`, then a package like `foo-git` will be
excluded from the final package.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 14:24:55 -04:00
Juan Cruz Viotti
1de3d7b26c Make sure the CLI handles arguments correctly when being packaged (#374)
The CLI now attempts to detect whether it is being run as an argument to
a JavaScript runner (like node or electron), or as a final packaged
executable by applying some heuristics on the first argument.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 14:24:49 -04:00
Juan Cruz Viotti
d7ce744e26 Document that ELECTRON_RUN_AS_NODE doesn't load app.asar by default (#375)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 14:24:32 -04:00
Juan Cruz Viotti
e7760e253f Lock electron development version, and re-use it in Makefile (#371)
By locking the electron version in `package.json`, we can require it
from the Makefile to ensure production and development are both running
the exact same electron version, and ensures they don't easily get out
of sync.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-27 11:48:35 -04:00
Juan Cruz Viotti
a88cab2eb1 Update top-level screenshot (#370)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 13:57:25 -04:00
Juan Cruz Viotti
d80da9f7ce Move Etcher CLI exit code definitions to lib/src (#369)
The purpose is that defined exit codes can be reused in the GUI, so they
are kept in sync more easily.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 13:40:44 -04:00
Juan Cruz Viotti
3af8d4d4a2 Upgrade resin-image-write to v4.0.0 (#368)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 13:33:39 -04:00
Juan Cruz Viotti
ccae6bf783 Prefix robot progress state output with "progress" (#367)
This makes it a bit easier to determine if a `stdout` line is a progress
state or not, rather than checking for both `write` or `check`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 12:30:06 -04:00
Juan Cruz Viotti
1dbe707700 Upgrade node-umount to v1.1.3 (#366)
This new version contains a fix where the `diskutil` command was not
found on certain OS X setups.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 12:16:30 -04:00
Juan Cruz Viotti
4a856d24df Add entry point file to decide between GUI/CLI (#365)
This file runs the Etcher CLI if the binary was ran with
`ELECTRON_RUN_AS_NODE`, or the GUI otherwise.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 11:39:15 -04:00
Juan Cruz Viotti
bb4ad6a042 Add an option to control unmounting on success in Etcher CLI (#362)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 09:38:29 -04:00
Juan Cruz Viotti
3fdf41693a Upgrade sudo-prompt to v3.1.0 (#364)
Fixes: https://github.com/resin-io/etcher/issues/289
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-26 09:38:24 -04:00
Juan Cruz Viotti
ba68892bd3 Upgrade outdated dependencies (#363)
- `electron-mocha`
- `electron-packager`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 16:04:32 -04:00
Juan Cruz Viotti
8bdc089de4 Implement validation support in Etcher CLI (#361)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 15:47:05 -04:00
Juan Cruz Viotti
86cbff940c Implement Etcher CLI "robot" option (#360)
This option makes the Etcher CLI outputs state information in a way that
can be easily parsed by a parent process spawning it.

The format of the state output is:

  <type> <percentage>% <eta>s <speed>

This can be easily parsed as follows:

  const output = line.split(' ');

  const state = {
    type: output[0],
    percentage: parseInt(output[1], 10),
    eta: parseInt(output[2], 10),
    speed: parseInt(output[3], 10)
  };

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 14:50:34 -04:00
Juan Cruz Viotti
f55100d09b Fix lint warnings (#359)
- `os` in unused in `byte-size.spec.js`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 14:50:23 -04:00
Juan Cruz Viotti
d5b3e0a83f Upgrade drivelist to v3.0.0 (#354)
This new version reports the size as a number of bytes instead of a
human readable string, so we have to take care of converting back to a
readable GB format ourselves.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 12:46:59 -04:00
Juan Cruz Viotti
afeba11424 Move GUI code into lib/gui (#358)
This refactoring will be useful on future changes, where there will be
a single application entry point that will execute the CLI or the GUI
version depending on the environment.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 12:08:19 -04:00
Juan Cruz Viotti
0ac79fa251 Deprecate tar.gz GNU/Linux "installers" (#356)
We're distributing AppImages now for convenience.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 11:44:50 -04:00
Juan Cruz Viotti
5bc5b42d3a v1.0.0-beta.4
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-22 13:11:11 -04:00
Juan Cruz Viotti
1ac0fae405 Fix Error: Cannot find module ../global-shortcut in Windows (#353)
Since the Electron upgrade, Windows users are hitting a weird error
about `global-shortcut` not existing.

A solution is to `require('global-shortcut')` instead of accessing it as
a property of `electorn`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-22 13:03:46 -04:00
Juan Cruz Viotti
2fdad8adcb Highlight features in README file (#301)
Fixes: https://github.com/resin-io/etcher/issues/291
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:49:20 -04:00
Juan Cruz Viotti
dcff257f20 Upgrade Electron to v0.37.6 (#350)
* Upgrade Electron to v0.37.6

The main motiviation for such upgrade is that an error manifesting
itself as `Cannot read property 'object' of undefined` on certain Linux
systems was fixed in v0.37.4.

See https://github.com/electron/electron/issues/5229
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Make use of shell module by requiring `shell`

Otherwise we get a strange issue when trying to stub it:

    TypeError: Attempted to wrap undefined property openExternal as function

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:26:29 -04:00
Juan Cruz Viotti
148b9d15ae Integrate Etcher CLI in the main repository (#352)
This PR integrates the Etcher CLI code-wise, but doesn't yet handles the
distribution part of the story.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 10:08:53 -04:00
Juan Cruz Viotti
a462ee86c0 Add Makefile rule to generate an x86 AppImage for GNU/Linux (#349)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-21 09:01:34 -04:00
Juan Cruz Viotti
4d70676612 Distinguish between flash and validation events in Mixpanel (#347)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-20 14:56:58 -04:00
Juan Cruz Viotti
f683b841fa Make use of AppImage desktop integration script (#346)
This is useful to prompt the user to install the `.desktop` file.

The `Description` key in `Etcher.desktop` was changed to `Comment` since
`desktop-file-validate` complained with:

    Etcher.desktop: error: file contains key "Description" in group "Desktop
    Entry", but keys extending the format should start with "X-"

After checking the desktop file format specification, the correct key
should be "Comment"
(https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html).

See: bc6e519964 (commitcomment-17164442)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 16:29:16 -04:00
Juan Cruz Viotti
bc6e519964 Generate AppImage package for GNU/Linux x86_64 (#345)
Fixes: https://github.com/resin-io/etcher/issues/323
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 13:29:32 -04:00
Juan Cruz Viotti
975c949fdf Allow to bypass elevation with an environment variable (#343)
This is mostly used for debugging purposes, or by power users that know
what they're doing.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 11:07:59 -04:00
Juan Cruz Viotti
fdf28cdf5f Remove unnecessary fields from bower.json. (#342)
We don't distribute the application through bower, and removing stuff
means one less place to be concerned about certain meta-data to be in
sync.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 10:01:26 -04:00
Juan Cruz Viotti
ed70e4e590 Refactor initial elevation routine (#341)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-19 09:40:25 -04:00
Juan Cruz Viotti
284f2a0ebb Add dashed underline to footer links (#340)
Fixes: https://github.com/resin-io/etcher/issues/338
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:26 -04:00
Juan Cruz Viotti
5baf8e5407 Improve UX when closing the drive selector modal (#339)
The current "Close" button makes it confusing to the user to know if
he's accepting his changes, or just discarding them.

The "Close" button in the top right corner was replaced with a standard
cross icon, and there is a new "Continue" block button fixed in the
bottom of the modal.

Fixes: https://github.com/resin-io/etcher/issues/294
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 13:16:17 -04:00
Juan Cruz Viotti
35ac745452 Link the version string in the footer to the CHANGELOG (#337)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-18 12:39:18 -04:00
Juan Cruz Viotti
ed592f0597 Add application version to footer (#335)
* Implement ManifestBind directive

This directive is useful to bind the contents of an element to a
property in the `package.json` manifest.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Add application version to footer

Fixes: https://github.com/resin-io/etcher/issues/292
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 23:57:56 -04:00
Juan Cruz Viotti
3842608a16 Add missing CHANGELOG diff link
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 21:26:57 -04:00
Juan Cruz Viotti
ef82c937d3 v1.0.0-beta.3
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-17 21:24:32 -04:00
Juan Cruz Viotti
9489802834 Upgrade resin-image-write to v3.0.3 (#331)
This new version contains a fix for the `stream.push() after EOF` error
hit when writing unaligned images.

Fixes: https://github.com/resin-io/etcher/issues/307
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 17:45:47 -04:00
Juan Cruz Viotti
fa3c598f98 Fix double-quote lint warnings (#329)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 16:44:29 -04:00
Juan Cruz Viotti
34ae49df38 Reset writer state on flash error (#330)
Not doing so leads the writer state to have a `progress` of `100%`,
while `isFlashing()` is `false`, which is an inconsistent state.

Fixes: https://github.com/resin-io/etcher/issues/327
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-15 16:43:42 -04:00
Juan Cruz Viotti
0dcc7b22b8 Implement SVGIcon Angular directive (#324)
* Inherit current scope in osOpenExternal directive

This directive attempts to create a new isolated scope, which leads the
errors when using this directive on top of another directive in the same
element.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Implement SVGIcon Angular directive

This directive replaces part of `hero-icon`, the old Polymer component.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 16:14:46 -04:00
Juan Cruz Viotti
04efd16ca3 Misc changes (#322)
* Fix lint warnings about missing empty line above `module.exports`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>

* Re-build CSS

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:45:52 -04:00
Juan Cruz Viotti
66b38105ca Require ui.router and ui.bootstrap using NPM style (#321)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:37:05 -04:00
Juan Cruz Viotti
79c19ef341 Document directives with JSDoc (#320)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 15:36:52 -04:00
Juan Cruz Viotti
a874d4b808 Make all angular modules export the name of the module (#318)
This makes them very nicely require-able, for example:

    angular.module('MyModule', [
      require('my-dependency');
    ]);

From https://medium.com/@kentcdodds/how-to-distribute-your-angularjs-module-e04d4dd58ddc#.yqg2zo8im
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 14:22:51 -04:00
Juan Cruz Viotti
39786e3271 Don't require angular-ui-bootstrap in main module (#319)
This dependency is only required by `Etcher.Components.DriveSelector`.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 14:17:31 -04:00
Juan Cruz Viotti
bd9b4d0a3a Promisify drivelist.list() with angular-q-promisify (#317)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 13:57:38 -04:00
Juan Cruz Viotti
42db5992fa Reorganize utilities and desktop integration modules (#316)
- Rename `Etcher.Utils.Dropzone` to `Etcher.OS.Dropzone`
- Rename `Etcher.Utils.OpenExternal` to `Etcher.OS.OpenExternal`
- Rename `Etcher.Utils.WindowProgress` to `Etcher.OS.WindowProgress`
- Rename `Etcher.notification` to `Etcher.OS.Notification`
- Rename `Etcher.notifier` to `Etcher.Utils.Notifier`
- Rename `Etcher.path` to `Etcher.Utils.Path`

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 13:34:31 -04:00
Juan Cruz Viotti
cda27982ef Publish ZIP versions of Etcher.app (#315)
`Squirrel.Mac` works with ZIP packages rather than DMGs.

Fixes: https://github.com/resin-io/etcher/issues/314
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 12:29:42 -04:00
Juan Cruz Viotti
fedde73a02 Improve UX when re-selecting a single available drive (#313)
Currently, if you have only one connected drive, Etcher will auto-select
it. One the single drive is auto-selected, if you attempt to change your
drive selection by clicking on the "Change" link button, the
re-selection is undone, and redone in a matter of milliseconds, making
it very difficult to get the drive selector modal to open.

A simple solution to this problem is making "Change" links trigger the
reselection action (e.g: opening modals, dialogs, etc) instead of simply
undoing the selection.

Fixes: https://github.com/resin-io/etcher/issues/296
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 12:12:19 -04:00
Juan Cruz Viotti
fd00a4ae0e Add a Mixpanel event when the application starts (#311)
Fixes: https://github.com/resin-io/etcher/issues/310
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-13 10:05:53 -04:00
Juan Cruz Viotti
dec10f618e Add "Change" button links below each step (#306)
Fixes: https://github.com/resin-io/etcher/issues/290
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 15:59:42 -04:00
Juan Cruz Viotti
e3bac8dc64 Connect DriveSelector with SelectionStateModel (#305)
Previously, `DriveSelector` kept a temporary selection state until the
modal was closed, which caused the selected drives to be passed to
`SelectionStateModel`.

This proves to be problematic when attempting to pass changes to
`SelectionStateModel` to `DriveSelector`. For example, consider the case
where the `DriveSelector` modal is opened with two drives, and one is
ejected. The remaining drive will be auto-selected by Etcher in the
background, but `DriveSelector` will not update itself with such change.

Fixes: https://github.com/resin-io/etcher/issues/304
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 14:42:51 -04:00
Juan Cruz Viotti
aba6e946e3 Hide drive selector modal if no available drives (#303)
If you have the drive selector modal opened, but you eject all the
available drives, the modal will be closed automatically.

Fixes: https://github.com/resin-io/etcher/issues/295
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:02:10 -04:00
Juan Cruz Viotti
77da54431a Add Etcher logo to application footer (#302)
Fixes: https://github.com/resin-io/etcher/issues/252
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 13:01:56 -04:00
Juan Cruz Viotti
3efea5b308 Replace all occurrences of "burn" with "flash" (#300)
Technically, a removable drive is flashed, not burned.

Fixes: https://github.com/resin-io/etcher/issues/297
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-12 12:00:43 -04:00
Juan Cruz Viotti
8417f94649 Allow to drag and drop an image to the first step (#288)
See https://github.com/electron/electron/blob/master/docs/api/file-object.md
Fixes: https://github.com/resin-io/etcher/issues/279
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 15:40:13 -04:00
Juan Cruz Viotti
ec7ad1304f Compress Linux executables and Windows DLLs with UPX (#286)
Before:

    118M   Etcher-linux-x64
    122M   Etcher-linux-x86
    142M   Etcher-win32-x64
    116M   Etcher-win32-x86

After:

    74M    Etcher-linux-x64
    74M    Etcher-linux-x86
    124M   Etcher-win32-x64
    102M   Etcher-win32-x86

Fixes: https://github.com/resin-io/etcher/issues/281
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 13:31:10 -04:00
Juan Cruz Viotti
2b1ef3d980 Move package ignore list computation to a separate script (#285)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 12:30:00 -04:00
Juan Cruz Viotti
2f65bd512f Implement OS notifications on burn completion (#283)
Its helpful to have an auditive/visual cue when a burn operation
completed.

Instead of adding a setting entry to enable/disable notifications, you
can use the standard way to control notifications from your operating
system. For example, in OS X, you might go to "System Preferences" ->
"Notifications" and disable notifications for "Etcher".

Fixes: https://github.com/resin-io/etcher/issues/280
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 11:49:55 -04:00
Juan Cruz Viotti
e1742859e1 Rename Linux binary to "etcher" (#282)
The capital letter is not very user friendly for command line people.

Fixes: https://github.com/resin-io/etcher/issues/278
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-11 10:56:07 -04:00
Juan Cruz Viotti
2e75b7f2bb Upgrade Electron to v0.36.11 (#275)
This version contains a fix for `resizable: false` not working on
GNU/Linux.

See: https://github.com/electron/electron/releases/tag/v0.36.11
Fixes: https://github.com/resin-io/etcher/issues/272
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:22:51 -04:00
Juan Cruz Viotti
c2265c6561 Prevent dialog.showErrorBox() throwing if wrong parameters (#274)
If the function lacks a message or a title, the following error is
thrown:

    Error: Could not call remote function ``.
    Check that the function signature is correct.
    Underlying error: Error processing argument at index 0,
    conversion failure from undefined

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:29 -04:00
Juan Cruz Viotti
5ccc6b6aa4 Upgrade drivelist to v2.0.13 (#270)
This version contains the following changes:

- Detect Macbook SDCard readers in OS X.
- Detect removable drives better in Windows.
- Keep one decimal in Windows drive size.

Fixes: https://github.com/resin-io/etcher/issues/255
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-10 23:11:12 -04:00
Juan Cruz Viotti
4fb7a138a4 Remove OS X minimum version notice from README
This was better explained in the downloads page.
2016-04-08 16:21:09 -04:00
Juan Cruz Viotti
d3fdca12b0 Make clear that Etcher supports OS X >= 10.9 (#269)
Electron no longer supports 10.8.

See http://electron.atom.io/docs/v0.37.5/tutorial/supported-platforms/#os-x

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 15:21:20 -04:00
Juan Cruz Viotti
7e83c378a2 Add subtle hover styling to footer links (#268)
Fixes: https://github.com/resin-io/etcher/issues/253
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 15:21:12 -04:00
Juan Cruz Viotti
67daf086a2 Detect removal of selected drive (#264)
Suppose you plug a device, select it in Etcher, but then eject it from
your computer. Etcher will keep the selection thinking the drive is
still there.

With this PR, the selected drive, if any, is ensured its still inside
the array of available drives, otherwise the selected is cleared.

Fixes: https://github.com/resin-io/etcher/issues/254
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 12:17:36 -04:00
Juan Cruz Viotti
3a04b5ccaa Fix window contents pushed below when a modal is open (#263)
UI Bootstrap adds the `.modal-open` class to the `<body>`
element and sets its right padding to the width of the
window, causing the window content to overflow and get
pushed to the bottom.
The `!important` flag is needed since UI Bootstrap inlines
the styles programatically to the element.

Fixes: https://github.com/resin-io/etcher/issues/257
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:37:10 -04:00
Juan Cruz Viotti
a23fa60b5c Watch sass files in modules/ (#262)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:30:33 -04:00
Juan Cruz Viotti
46629c5ef0 Rebuild pending SASS changes (#261)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:09:30 -04:00
Juan Cruz Viotti
2862663ca7 Invert progress bar stripes (#260)
Make the progress bar background striped, and the actual bar solid.

Fixes: https://github.com/resin-io/etcher/issues/251
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 10:06:56 -04:00
Juan Cruz Viotti
1bfe88f2f4 Show drive name in drive selector modal (#259)
The `name` property equals the drive letter in Windows, and the mount
point in UNIX based operating systems.

Fixes: https://github.com/resin-io/etcher/issues/258
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-08 09:49:11 -04:00
Juan Cruz Viotti
d53bc1ecdf Fix v1.0.0-beta.2 release date in CHANGELOG
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-07 05:35:57 -04:00
234 changed files with 63110 additions and 12126 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
*
!requirements.txt

View File

@ -7,4 +7,15 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
[*.ts]
indent_style = tab
[*.tsx]
indent_style = tab

10
.eslintrc.js Normal file
View File

@ -0,0 +1,10 @@
module.exports = {
extends: ["./node_modules/@balena/lint/config/.eslintrc.js"],
root: true,
ignorePatterns: ["node_modules/"],
rules: {
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
},
};

68
.gitattributes vendored Normal file
View File

@ -0,0 +1,68 @@
# default
* text
# Javascript files must retain LF line-endings (to keep eslint happy)
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
# CSS and SCSS files must retain LF line-endings (to keep ensure-staged-sass.sh happy)
*.css text eol=lf
*.scss text eol=lf
# Text files
Dockerfile* text
.dockerignore text
.editorconfig text
etcher text
.git* text
*.html text
*.json text eol=lf
*.cpp text
*.h text
*.gyp text
LICENSE text
Makefile text
*.md text
*.sh text
*.bat text
*.svg text
*.yml text
*.patch text
*.txt text
*.tpl text
CODEOWNERS text
*.plist text
# Binary files (no line-ending conversions)
*.bz2 binary diff=hex
*.gz binary diff=hex
*.icns binary diff=hex
*.ico binary diff=hex
*.tiff binary diff=hex
*.img binary diff=hex
*.iso binary diff=hex
*.png binary diff=hex
*.bin binary diff=hex
*.elf binary diff=hex
*.xz binary diff=hex
*.zip binary diff=hex
*.dtb binary diff=hex
*.dtbo binary diff=hex
*.dat binary diff=hex
*.bin binary diff=hex
*.dmg binary diff=hex
*.rpi-sdcard binary diff=hex
*.wic binary diff=hex
*.foo binary diff=hex
*.eot binary diff=hex
*.otf binary diff=hex
*.woff binary diff=hex
*.woff2 binary diff=hex
*.ttf binary diff=hex
xz-without-extension binary diff=hex
wmic-output.txt binary diff=hex
# gitsecret
*.secret binary
.gitsecret/** binary

11
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,11 @@
- **Etcher version:**
- **Operating system and architecture:**
- **Image flashed:**
- **What do you think should have happened:** <!-- or a step by step reproduction process -->
- **What happened:**
- **Do you see any meaningful error information in the DevTools?**
<!-- You can open DevTools by pressing `Ctrl+Shift+I` (`Ctrl+Alt+I` for Etcher before v1.3.x), or `Cmd+Opt+I` if you're on macOS. -->
<!-- issues with missing information will be labeled as not-enough-info and closed shortly -->
<!-- please try to include as many influencing elements as possible are you root, does any other process block the device, etc. -->
<!-- if you find a solution in the meantime thank you for sharing the fix and not just closing / abandoning your issue -->

205
.github/actions/publish/action.yml vendored Normal file
View File

@ -0,0 +1,205 @@
---
name: package and publish GitHub (draft) release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
required: true
# --- custom environment
NODE_VERSION:
type: string
# Beware that native modules will be built for this version,
# which might not be compatible with the one used by pkg (see forge.sidecar.ts)
# https://github.com/vercel/pkg-fetch/releases
default: "20.x"
VERBOSE:
type: string
default: "true"
runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: "composite"
steps:
- name: Download custom source artifact
uses: actions/download-artifact@v4
with:
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ runner.temp }}
- name: Extract custom source artifact
if: runner.os != 'Windows'
shell: bash
working-directory: .
run: tar -xf ${{ runner.temp }}/custom.tgz
- name: Extract custom source artifact
if: runner.os == 'Windows'
shell: pwsh
working-directory: .
run: C:\"Program Files"\Git\usr\bin\tar.exe --force-local -xf ${{ runner.temp }}\custom.tgz
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: npm
- name: Install host dependencies
if: runner.os == 'Linux'
shell: bash
run: sudo apt-get install -y --no-install-recommends fakeroot dpkg rpm
# rpmbuild will strip binaries by default, which breaks the sidecar.
# Use a macro to override the "strip" to bypass stripping.
- name: Configure rpmbuild to not strip executables
if: runner.os == 'Linux'
shell: bash
run: echo '%__strip /usr/bin/true' > ~/.rpmmacros
- name: Install host dependencies
if: runner.os == 'macOS'
# FIXME: Python 3.12 dropped distutils that node-gyp depends upon.
# This is a temporary workaround to make the job use Python 3.11 until
# we update to npm 10+.
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: '3.11'
# https://www.electron.build/code-signing.html
# https://dev.to/rwwagner90/signing-electron-apps-with-github-actions-4cof
- name: Import Apple code signing certificate
if: runner.os == 'macOS'
shell: bash
run: |
KEY_CHAIN=build.keychain
CERTIFICATE_P12=certificate.p12
# Recreate the certificate from the secure environment variable
echo $CERTIFICATE_P12_B64 | base64 --decode > $CERTIFICATE_P12
# Create a keychain
security create-keychain -p actions $KEY_CHAIN
# Make the keychain the default so identities are found
security default-keychain -s $KEY_CHAIN
# Unlock the keychain
security unlock-keychain -p actions $KEY_CHAIN
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
# remove certs
rm -fr *.p12
env:
CERTIFICATE_P12_B64: ${{ fromJSON(inputs.secrets).APPLE_SIGNING }}
CERTIFICATE_PASSWORD: ${{ fromJSON(inputs.secrets).APPLE_SIGNING_PASSWORD }}
- name: Import Windows code signing certificate
if: runner.os == 'Windows'
id: import_win_signing_cert
shell: powershell
run: |
Set-Content -Path ${{ runner.temp }}/certificate.base64 -Value $env:SM_CLIENT_CERT_FILE_B64
certutil -decode ${{ runner.temp }}/certificate.base64 ${{ runner.temp }}/Certificate_pkcs12.p12
Remove-Item -path ${{ runner.temp }} -include certificate.base64
echo "certFilePath=${{ runner.temp }}/Certificate_pkcs12.p12" >> $GITHUB_OUTPUT
env:
SM_CLIENT_CERT_FILE_B64: ${{ fromJSON(inputs.secrets).SM_CLIENT_CERT_FILE_B64 }}
- name: Package release
shell: bash
# IMPORTANT: before making changes to this step please consult @engineering in balena's chat.
run: |
## FIXME: causes issues with `xxhash` which tries to load a debug build which doens't exist and cannot be compiled
# if [[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]]; then
# export DEBUG='electron-forge:*,sidecar'
# fi
APPLICATION_VERSION="$(jq -r '.version' package.json)"
HOST_ARCH="$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')"
if [[ "${RUNNER_OS}" == Linux ]]; then
PLATFORM=Linux
SHA256SUM_BIN=sha256sum
elif [[ "${RUNNER_OS}" == macOS ]]; then
PLATFORM=Darwin
SHA256SUM_BIN='shasum -a 256'
elif [[ "${RUNNER_OS}" == Windows ]]; then
PLATFORM=Windows
SHA256SUM_BIN=sha256sum
# Install DigiCert Signing Manager Tools
curl --silent --retry 3 --fail https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download \
-H "x-api-key:$SM_API_KEY" \
-o smtools-windows-x64.msi
msiexec -i smtools-windows-x64.msi -qn
PATH="/c/Program Files/DigiCert/DigiCert One Signing Manager Tools:${PATH}"
smksp_registrar.exe list
smctl.exe keypair ls
/c/Windows/System32/certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
smksp_cert_sync.exe
# (signtool.exe) https://github.com/actions/runner-images/blob/main/images/win/Windows2019-Readme.md#installed-windows-sdks
PATH="/c/Program Files (x86)/Windows Kits/10/bin/${runner_arch}:${PATH}"
else
echo "ERROR: unexpected runner OS: ${RUNNER_OS}"
exit 1
fi
# Currently, we can only build for the host architecture.
npx electron-forge make
echo "version=${APPLICATION_VERSION}" >> $GITHUB_OUTPUT
# collect all artifacts from subdirectories under a common top-level directory
mkdir -p dist
find ./out/make -type f \( \
-iname "*.zip" -o \
-iname "*.dmg" -o \
-iname "*.rpm" -o \
-iname "*.deb" -o \
-iname "*.AppImage" -o \
-iname "*Setup.exe" \
\) -ls -exec cp '{}' dist/ \;
if [[ -n "${SHA256SUM_BIN}" ]]; then
# Compute and save digests.
cd dist/
${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.${HOST_ARCH}.txt"
fi
env:
# ensure we sign the artifacts
NODE_ENV: production
# analytics tokens
SENTRY_TOKEN: https://739bbcfc0ba4481481138d3fc831136d@o95242.ingest.sentry.io/4504451487301632
AMPLITUDE_TOKEN: 'balena-etcher'
# Apple notarization
XCODE_APP_LOADER_EMAIL: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_EMAIL }}
XCODE_APP_LOADER_PASSWORD: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_PASSWORD }}
XCODE_APP_LOADER_TEAM_ID: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_TEAM_ID }}
# Windows signing
SM_CLIENT_CERT_PASSWORD: ${{ fromJSON(inputs.secrets).SM_CLIENT_CERT_PASSWORD }}
SM_CLIENT_CERT_FILE: '${{ runner.temp }}\Certificate_pkcs12.p12'
SM_HOST: ${{ fromJSON(inputs.secrets).SM_HOST }}
SM_API_KEY: ${{ fromJSON(inputs.secrets).SM_API_KEY }}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ fromJSON(inputs.secrets).SM_CODE_SIGNING_CERT_SHA1_HASH }}
TIMESTAMP_SERVER: http://timestamp.digicert.com
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
path: dist
retention-days: 1
if-no-files-found: error

87
.github/actions/test/action.yml vendored Normal file
View File

@ -0,0 +1,87 @@
---
name: test release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: 'JSON stringified object containing all the inputs from the calling workflow'
required: true
secrets:
description: 'JSON stringified object containing all the secrets from the calling workflow'
required: true
# --- custom environment
NODE_VERSION:
type: string
default: '20.10'
VERBOSE:
type: string
default: 'true'
runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: 'composite'
steps:
# https://github.com/actions/setup-node#caching-global-packages-data
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: npm
- name: Install host dependencies
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends xvfb libudev-dev
cat < package.json | jq -r '.hostDependencies[][]' - | \
xargs -L1 echo | sed 's/|//g' | xargs -L1 \
sudo apt-get --ignore-missing install || true
- name: Install host dependencies
if: runner.os == 'macOS'
# FIXME: Python 3.12 dropped distutils that node-gyp depends upon.
# This is a temporary workaround to make the job use Python 3.11 until
# we update to npm 10+.
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: '3.11'
- name: Test release
shell: bash
run: |
## FIXME: causes issues with `xxhash` which tries to load a debug build which doens't exist and cannot be compiled
# if [[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]]; then
# export DEBUG='electron-forge:*,sidecar'
# fi
npm ci
# as the shrinkwrap might have been done on mac/linux, this is ensure the package is there for windows
if [[ "$RUNNER_OS" == "Windows" ]]; then
npm i -D winusb-driver-generator
fi
npm run lint
npm run package
npm run wdio # test stage, note that it requires the package to be done first
env:
# https://www.electronjs.org/docs/latest/api/environment-variables
ELECTRON_NO_ATTACH_CONSOLE: 'true'
- name: Compress custom source
if: runner.os != 'Windows'
shell: bash
run: tar -acf ${{ runner.temp }}/custom.tgz .
- name: Compress custom source
if: runner.os == 'Windows'
shell: pwsh
run: C:\"Program Files"\Git\usr\bin\tar.exe --force-local -acf ${{ runner.temp }}\custom.tgz .
- name: Upload custom artifact
uses: actions/upload-artifact@v4
with:
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ runner.temp }}/custom.tgz
retention-days: 1

41
.github/workflows/flowzone.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Flowzone
on:
pull_request:
types: [opened, synchronize, closed]
branches: [main, master]
# allow external contributions to use secrets within trusted code
pull_request_target:
types: [opened, synchronize, closed]
branches: [main, master]
jobs:
flowzone:
name: Flowzone
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for
# internal or external contributions respectively
if: |
(github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request') ||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
secrets: inherit
with:
custom_test_matrix: >
{
"os": [
["ubuntu-22.04"],
["windows-2019"],
["macos-13"],
["macos-latest-xlarge"]
]
}
custom_publish_matrix: >
{
"os": [
["ubuntu-22.04"],
["windows-2019"],
["macos-13"],
["macos-latest-xlarge"]
]
}
restrict_custom_actions: false
github_prerelease: true
cloudflare_website: "etcher"

14
.github/workflows/winget.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: Publish to WinGet
on:
release:
types: [released]
jobs:
publish:
runs-on: windows-latest # action can only be run on windows
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Balena.Etcher
# matches something like "balenaEtcher-1.19.0.Setup.exe"
installers-regex: 'balenaEtcher-[\d.-]+\.Setup.exe$'
token: ${{ secrets.WINGET_PAT }}

101
.gitignore vendored
View File

@ -1,35 +1,103 @@
# -- ADD NEW ENTRIES AT THE END OF THE FILE ---
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# nyc test coverage
.nyc_output
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
bower_components
# Dependency directories
node_modules/
jspm_packages/
# Compiled Electron releases
etcher-release/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Webpack
.webpack/
# Vite
.vite/
# Electron-Forge
out/
# ---- Do not modify entries above this line ----
# Build artifacts
dist/
# Certificates
*.spc
@ -38,3 +106,18 @@ etcher-release/
*.cer
*.crt
*.pem
# Secrets
.gitsecret/keys/random_seed
!*.secret
secrets/APPLE_SIGNING_PASSWORD.txt
secrets/WINDOWS_SIGNING_PASSWORD.txt
secrets/XCODE_APP_LOADER_PASSWORD.txt
secrets/WINDOWS_SIGNING.pfx
# Image stream output directory
/tests/image-stream/output
#local development
.yalc
yalc.lock

BIN
.gitsecret/keys/pubring.kbx Normal file

Binary file not shown.

Binary file not shown.

BIN
.gitsecret/keys/trustdb.gpg Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
secrets/APPLE_SIGNING_PASSWORD.txt:5c9cfeb1ea5142b547bc842cc6e0b4a932641ae9811ee47abe2c3953f2a4de5d
secrets/WINDOWS_SIGNING_PASSWORD.txt:852e431628494f2559793c39cf09c34e9406dd79bb15b90c9f88194020470568
secrets/XCODE_APP_LOADER_PASSWORD.txt:005eb9a3c7035c77232973c9355468fc396b94e62783fb8e6dce16bce95b94a1
secrets/WINDOWS_SIGNING.pfx:929f401db38733ffc41572539de7c0d938023af51ed06c205a72a71c1f815714
secrets/APPLE_SIGNING.p12:61abf7b4ff2eec76ce889d71bcdd568b99a6a719b4947ac20f03966265b0946a

View File

@ -1,9 +0,0 @@
javascript:
config_file: .jshintrc
jscs:
enabled: true
config_file: .jscsrc
scss:
enabled: false

306
.jscsrc
View File

@ -1,306 +0,0 @@
{
"jsDoc": {
"checkAnnotations": {
"preset": "jsdoc3",
"extra": {
"fulfil": true
}
},
"checkParamExistence": true,
"checkParamNames": true,
"requireParamTypes": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"checkTypes": "capitalizedNativeCase",
"checkRedundantAccess": true,
"requireHyphenBeforeDescription": true,
"requireNewlineAfterDescription": true,
"requireDescriptionCompleteSentence": true,
"requireParamDescription": true,
"checkRedundantParams": true
},
"disallowAnonymousFunctions": false,
"disallowShorthandArrowFunctions": true,
"disallowCapitalizedComments": false,
"disallowCommaBeforeLineBreak": false,
"disallowCurlyBraces": false,
"disallowDanglingUnderscores": false,
"disallowEmptyBlocks": true,
"disallowFunctionDeclarations": true,
"disallowIdenticalDestructuringNames": true,
"disallowImplicitTypeConversion": [
"numeric",
"boolean",
"binary",
"string"
],
"disallowKeywordsOnNewLine": [
"else",
"else if"
],
"disallowKeywords": [
"with",
"for"
],
"disallowMixedSpacesAndTabs": true,
"disallowMultiLineTernary": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleSpaces": true,
"disallowMultipleVarDecl": true,
"disallowNamedUnassignedFunctions": true,
"disallowNestedTernaries": false,
"disallowNewlineBeforeBlockStatements": true,
"disallowNodeTypes": [
"LabeledStatement"
],
"disallowNotOperatorsInConditionals": false,
"disallowObjectKeysOnNewLine": false,
"disallowOperatorBeforeLineBreak": [
"+",
"."
],
"disallowPaddingNewLinesAfterBlocks": false,
"disallowPaddingNewLinesAfterUseStrict": false,
"disallowPaddingNewLinesBeforeExport": false,
"disallowPaddingNewlinesBeforeKeywords": false,
"disallowPaddingNewLinesBeforeLineComments": false,
"disallowPaddingNewlinesInBlocks": false,
"disallowPaddingNewLinesInObjects": false,
"disallowParenthesesAroundArrowParam": false,
"disallowQuotedKeysInObjects": {
"allExcept": [
"reserved"
]
},
"disallowSemicolons": false,
"disallowShorthandArrowFunctions": true,
"disallowSpaceAfterBinaryOperators": false,
"disallowSpaceAfterComma": false,
"disallowSpaceAfterKeywords": false,
"disallowSpaceAfterLineComment": false,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforeBinaryOperators": false,
"disallowSpaceBeforeBlockStatements": false,
"disallowSpaceBeforeComma": true,
"disallowSpaceBeforeKeywords": false,
"disallowSpaceBeforeObjectValues": false,
"disallowSpaceBeforePostfixUnaryOperators": [
"++",
"--"
],
"disallowSpaceBeforeSemicolon": true,
"disallowSpaceBetweenArguments": false,
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInCallExpression": true,
"disallowSpacesInConditionalExpression": false,
"disallowSpacesInForStatement": false,
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInGenerator": {
"beforeStar": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": false,
"disallowSpacesInsideBrackets": false,
"disallowSpacesInsideObjectBrackets": false,
"disallowSpacesInsideParentheses": true,
"disallowSpacesInsideParenthesizedExpression": true,
"disallowTabs": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowUnusedParams": true,
"disallowVar": false,
"disallowYodaConditions": [
"==",
"===",
"!=",
"!=="
],
"maximumLineLength": 130,
"maximumNumberOfLines": 500,
"requireAlignedMultilineParams": true,
"requireAlignedObjectValues": false,
"requireAnonymousFunctions": true,
"requireArrayDestructuring": false,
"requireArrowFunctions": false,
"requireBlocksOnNewline": {
"includeComments": true
},
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedComments": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch",
"case",
"default"
],
"requireDollarBeforejQueryAssignment": true,
"requireDotNotation": true,
"requireEarlyReturn": true,
"requireEnhancedObjectLiterals": false,
"requireFunctionDeclarations": false,
"requireLineBreakAfterVariableAssignment": true,
"requireLineFeedAtFileEnd": true,
"requireMatchingFunctionName": true,
"requireMultiLineTernary": false,
"requireMultipleVarDecl": false,
"requireNewlineBeforeBlockStatements": false,
"requireNumericLiterals": true,
"requireObjectDestructuring": false,
"requireObjectKeysOnNewLine": true,
"requireOperatorBeforeLineBreak": [
"?",
"=",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"requirePaddingNewLineAfterVariableDeclaration": false,
"requirePaddingNewLinesAfterBlocks": true,
"requirePaddingNewLinesAfterUseStrict": true,
"requirePaddingNewLinesBeforeExport": true,
"requirePaddingNewlinesBeforeKeywords": [
"do",
"for",
"if",
"while"
],
"requirePaddingNewLinesBeforeLineComments": true,
"requirePaddingNewlinesInBlocks": false,
"requirePaddingNewLinesInObjects": true,
"requireParenthesesAroundArrowParam": true,
"requireParenthesesAroundIIFE": true,
"requireQuotedKeysInObjects": false,
"requireSemicolons": true,
"requireShorthandArrowFunctions": false,
"requireSpaceAfterBinaryOperators": [
"=",
",",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!=="
],
"requireSpaceBeforeBinaryOperators": [
"=",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!=="
],
"requireSpaceAfterComma": true,
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof"
],
"requireSpaceAfterLineComment": false,
"requireSpaceAfterObjectKeys": false,
"requireSpaceAfterPrefixUnaryOperators": false,
"requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeComma": false,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBeforePostfixUnaryOperators": false,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInCallExpression": false,
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInGenerator": {
"afterStar": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInsideArrayBrackets": "all",
"requireSpacesInsideObjectBrackets": "all",
"requireSpacesInsideParentheses": false,
"requireSpacesInsideParenthesizedExpression": false,
"requireSpread": false,
"requireTemplateStrings": false,
"requireTrailingComma": false,
"requireVarDeclFirst": false,
"requireYodaConditions": false,
"safeContextKeyword": [
"self"
],
"validateAlignedFunctionParameters": false,
"validateCommentPosition": {
"position": "above"
},
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateNewlineAfterArrayElements": true,
"validateOrderInObjectKeys": false,
"validateParameterSeparator": ", ",
"validateQuoteMarks": "'"
}

120
.jshintrc
View File

@ -1,120 +0,0 @@
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
// * set all relaxing options to false
// * set all environment options to false, except the browser value
// * set all JSLint legacy options to false
//
// [1]: http://www.jshint.com/
// [2]: https://github.com/jshint/node-jshint/blob/master/example/config.json
// [3]: https://github.com/oryband/dotfiles/blob/master/jshintrc
//
// @author http://michael.haschke.biz/
// @license http://unlicense.org/
"esversion" : 6,
// == Enforcing Options ===============================================
//
// These options tell JSHint to be more strict towards your code. Use
// them if you want to allow only a safe subset of JavaScript, very
// useful when your codebase is shared with a big number of developers
// with different skill levels.
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
"forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"noempty" : true, // Prohibit use of empty blocks.
"nonew" : true, // Prohibit use of constructors for side-effects.
"plusplus" : true, // Prohibit use of `++` & `--`.
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"undef" : true, // Require all non-global variables be declared before they are used.
"strict" : true, // Require `use strict` pragma in every file.
"trailing" : true, // Prohibit trailing whitespaces.
"maxlen" : 130, // Limit line length.
"unused" : true, // Prohibit unused variables.
"undef" : true, // Prohibit undefined variables.
// == Relaxing Options ================================================
//
// These options allow you to suppress certain types of warnings. Use
// them only if you are absolutely positive that you know what you are
// doing.
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // Tolerate use of `== null`.
"esnext" : true, // Allow ES.next specific features such as `const` and `let`.
"evil" : false, // Tolerate use of `eval`.
"expr" : true, // Tolerate `ExpressionStatement` as Programs.
"funcscope" : false, // Tolerate declarations of variables inside of control structures while accessing them later from the outside.
"globalstrict" : true, // Allow global "use strict" (also enables 'strict').
"iterator" : false, // Allow usage of __iterator__ property.
"lastsemic" : false, // Tolerat missing semicolons when the it is omitted for the last statement in a one-line block.
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"laxcomma" : false, // Suppress warnings about comma-first coding style.
"loopfunc" : false, // Allow functions to be defined within loops.
"multistr" : false, // Tolerate multi-line strings.
"onecase" : false, // Tolerate switches with just one case.
"proto" : false, // Tolerate __proto__ property. This property is deprecated.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : false, // Tolerate script-targeted URLs.
"smarttabs" : false, // Tolerate mixed tabs and spaces when the latter are used for alignmnent only.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
"validthis" : false, // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function.
// == Environments ====================================================
//
// These options pre-define global variables that are exposed by
// popular JavaScript libraries and runtime environments—such as
// browser or node.js.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"couch" : false, // Enable globals exposed by CouchDB.
"devel" : false, // Allow development statements e.g. `console.log();`.
"dojo" : false, // Enable globals exposed by Dojo Toolkit.
"esnext" : false, // Enable globals exposed by ES6.
"mocha" : true, // Enable globals exposed by Mocha.
"jquery" : false, // Enable globals exposed by jQuery JavaScript library.
"mootools" : false, // Enable globals exposed by MooTools JavaScript framework.
"node" : true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"nonstandard" : false, // Define non-standard but widely adopted globals such as escape and unescape.
"prototypejs" : false, // Enable globals exposed by Prototype JavaScript framework.
"rhino" : false, // Enable globals available when your code is running inside of the Rhino runtime environment.
"wsh" : false, // Enable globals available when your code is running as a script for the Windows Script Host.
// == JSLint Legacy ===================================================
//
// These options are legacy from JSLint. Aside from bug fixes they will
// not be improved in any way and might be removed at any point.
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
"onevar" : false, // Allow only one `var` statement per function.
"passfail" : false, // Stop on first error.
"white" : false, // Check against strict whitespace and indentation rules.
// == Undocumented Options ============================================
//
// While I've found these options in [example1][2] and [example2][3]
// they are not described in the [JSHint Options documentation][4].
//
// [4]: http://www.jshint.com/options/
"maxerr" : 100, // Maximum errors before stopping.
"indent" : 4 // Specify indentation spacing
}

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
18

6
.prettierrc.js Normal file
View File

@ -0,0 +1,6 @@
const fs = require("fs");
const path = require("path");
module.exports = JSON.parse(
fs.readFileSync(path.join(__dirname, "node_modules", "@balena", "lint", "config", ".prettierrc"), "utf8"),
);

View File

@ -1,39 +0,0 @@
language: cpp
sudo: false
env:
- NODE_VERSION="4"
os:
- linux
- osx
before_install:
- rm -rf ~/.nvm
- git clone https://github.com/creationix/nvm.git ~/.nvm
- source ~/.nvm/nvm.sh
- nvm --version
- nvm install $NODE_VERSION
- node --version
- npm --version
- npm config set spin=false
install:
- npm install
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
fi
script:
- npm test
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/8b150eaf525c280ec2ac
on_success: change
on_failure: always
on_start: never

13890
.versionbot/CHANGELOG.yml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,93 +0,0 @@
# Contributing guide
Thanks for your interest in contributing to this project! This document aims to serve as a friendly guide for making your first contribution.
## Prerequisites
- [NodeJS](https://nodejs.org).
- [Bower](http://bower.io).
- [Gulp](http://gulpjs.com).
## Cloning
First, clone the repository:
``` shell
$ git clone https://github/resin-io/etcher
```
Make sure you install all the dependencies before attempting to run the application:
``` shell
$ npm install && bower install
```
## Developing
We rely on [gulp](http://gulpjs.com) to provide an automated developing workflow in which your changes will automatically be detected and the necessary resources will be rebuilt for you.
First make sure you have [gulp](http://gulpjs.com) installed as a global dependency:
``` shell
$ npm install -g gulp
```
Run the `watch` task to initialise the build system. We encourage to have this command running in the background all the time as you develop, and check the output from time to time, since it'll let you know of any issues and/or warnings in your changes:
``` javascript
$ gulp watch
```
We make use of [EditorConfig](http://editorconfig.org) to communicate indentation, line endings and other text editing default. We encourage you to install the relevant plugin in your text editor of choice to avoid having to fix any issues during the review process.
## Running
You can run the application with the following command in the root of the project:
``` shell
$ npm start
```
## Testing
We include a test suite that covers both the code running in the main process and in the rendered process.
In order to avoid inaccurate results, the test suites run in a real Electron instance each in the respective process. This means that running the test suite is not a cheap operation and therefore we decided to not run it by default in the `watch` gulp task to not disrupt the user development workflow.
To run the test suite, run the following command:
``` shell
npm test
```
Given the nature of this application, not everything can be unit tested. For example:
- The writing operating on real raw devices.
- Platform inconsistencies.
- Style changes.
- Artwork.
We encourage our contributors to test the application on as many operating systems as they can before sending a pull request.
*The test suite is run automatically by CI servers when you send a pull request.*
## Sending a pull request
When sending a pull request, consider the following guidelines:
- Write a concise commit message explaining your changes.
- If applies, write more descriptive information in the commit body.
- Mention the operating systems with the corresponding versions in which you tested your changes.
- If your change affects the visuals of the application, consider attaching a screenshot.
- Refer to the issue/s your pull request fixes, so they're closed automatically when your pull request is merged.
- Write a descriptive pull request title.
- Squash commits when possible, for example, when commiting review changes.
Before your pull request can be merged, the following conditions must hold:
- The linter doesn't throw any warning.
- All the tests passes.
- The coding style aligns with the project's convention.
- Your changes are confirmed to be working in recent versions of the operating systems we support.
Don't hesitate to get in touch if you have any questions or need any help!

250
Makefile
View File

@ -1,250 +0,0 @@
ELECTRON_PACKAGER=./node_modules/.bin/electron-packager
ELECTRON_BUILDER=./node_modules/.bin/electron-builder
ELECTRON_OSX_SIGN=./node_modules/.bin/electron-osx-sign
ELECTRON_IGNORE=$(shell node -e "console.log(require('./package.json').packageIgnore.join('|'))")
ELECTRON_VERSION=0.36.8
ETCHER_VERSION=$(shell node -e "console.log(require('./package.json').version)")
APPLICATION_NAME=$(shell node -e "console.log(require('./package.json').displayName)")
APPLICATION_DESCRIPTION=$(shell node -e "console.log(require('./package.json').description)")
APPLICATION_COPYRIGHT=$(shell node -e "console.log(require('./package.json').copyright)")
COMPANY_NAME="Resinio Ltd"
SIGN_IDENTITY_OSX="Developer ID Application: Rulemotion Ltd (66H43P8FRG)"
S3_BUCKET="resin-production-downloads"
sign-win32 = osslsigncode sign \
-certs certificate.crt.pem \
-key certificate.key.pem \
-h sha1 \
-t http://timestamp.comodoca.com \
-n "$(APPLICATION_NAME) - $(ETCHER_VERSION)"\
-in $(1) \
-out $(dir $(1))Signed.exe \
&& mv $(dir $(1))Signed.exe $(1)
etcher-release/Etcher-darwin-x64: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=darwin \
--arch=x64 \
--version=$(ELECTRON_VERSION) \
--ignore="$(ELECTRON_IGNORE)" \
--asar \
--app-copyright="$(APPLICATION_COPYRIGHT)" \
--app-version="$(ETCHER_VERSION)" \
--build-version="$(ETCHER_VERSION)" \
--helper-bundle-id="io.resin.etcher-helper" \
--app-bundle-id="io.resin.etcher" \
--app-category-type="public.app-category.developer-tools" \
--icon="assets/icon.icns" \
--overwrite \
--out=$(dir $@)
rm $@/LICENSE
rm $@/LICENSES.chromium.html
rm $@/version
etcher-release/Etcher-linux-x86: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=linux \
--arch=ia32 \
--version=$(ELECTRON_VERSION) \
--ignore="$(ELECTRON_IGNORE)" \
--asar \
--app-version="$(ETCHER_VERSION)" \
--build-version="$(ETCHER_VERSION)" \
--overwrite \
--out=$(dir $@)
mv $(dir $@)Etcher-linux-ia32 $@
etcher-release/Etcher-linux-x64: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=linux \
--arch=x64 \
--version=$(ELECTRON_VERSION) \
--ignore="$(ELECTRON_IGNORE)" \
--asar \
--app-version="$(ETCHER_VERSION)" \
--build-version="$(ETCHER_VERSION)" \
--overwrite \
--out=$(dir $@)
etcher-release/Etcher-win32-x86: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=win32 \
--arch=ia32 \
--version=$(ELECTRON_VERSION) \
--ignore="$(ELECTRON_IGNORE)" \
--icon="assets/icon.ico" \
--asar \
--app-copyright="$(APPLICATION_COPYRIGHT)" \
--app-version="$(ETCHER_VERSION)" \
--build-version="$(ETCHER_VERSION)" \
--version-string.CompanyName=$(COMPANY_NAME) \
--version-string.FileDescription="$(APPLICATION_NAME)" \
--version-string.OriginalFilename=$(notdir $@) \
--version-string.ProductName="$(APPLICATION_NAME) -- $(APPLICATION_DESCRIPTION)" \
--version-string.InternalName="$(APPLICATION_NAME)" \
--overwrite \
--out=$(dir $@)
mv $(dir $@)Etcher-win32-ia32 $@
$(call sign-win32,$@/Etcher.exe)
etcher-release/Etcher-win32-x64: .
$(ELECTRON_PACKAGER) . $(APPLICATION_NAME) \
--platform=win32 \
--arch=x64 \
--version=$(ELECTRON_VERSION) \
--ignore="$(ELECTRON_IGNORE)" \
--icon="assets/icon.ico" \
--asar \
--app-copyright="$(APPLICATION_COPYRIGHT)" \
--app-version="$(ETCHER_VERSION)" \
--build-version="$(ETCHER_VERSION)" \
--version-string.CompanyName=$(COMPANY_NAME) \
--version-string.FileDescription="$(APPLICATION_NAME)" \
--version-string.OriginalFilename=$(notdir $@) \
--version-string.ProductName="$(APPLICATION_NAME) -- $(APPLICATION_DESCRIPTION)" \
--version-string.InternalName="$(APPLICATION_NAME)" \
--overwrite \
--out=$(dir $@)
$(call sign-win32,$@/Etcher.exe)
etcher-release/installers/Etcher-darwin-x64.dmg: etcher-release/Etcher-darwin-x64 package.json
# Create temporal read-write DMG image
hdiutil create \
-srcfolder $< \
-volname "$(APPLICATION_NAME)" \
-fs HFS+ \
-fsargs "-c c=64,a=16,e=16" \
-format UDRW \
-size 600M $<.dmg
# Mount temporal DMG image, so we can modify it
hdiutil attach $<.dmg -readwrite -noverify
# Wait for a bit to ensure the image is mounted
sleep 2
# Link to /Applications within the DMG
pushd /Volumes/$(APPLICATION_NAME) && ln -s /Applications && popd
# Symlink MacOS/Etcher to MacOS/Electron since for some reason, the Electron
# binary tries to be ran in some systems.
# See https://github.com/Microsoft/vscode/issues/92
cp -p /Volumes/$(APPLICATION_NAME)/$(APPLICATION_NAME).app/Contents/MacOS/Etcher /Volumes/$(APPLICATION_NAME)/$(APPLICATION_NAME).app/Contents/MacOS/Electron
# Set the DMG icon image
# Writing this hexadecimal buffer to the com.apple.FinderInfo
# extended attribute does the trick.
# See https://github.com/LinusU/node-appdmg/issues/14#issuecomment-29080500
cp assets/icon.icns /Volumes/$(APPLICATION_NAME)/.VolumeIcon.icns
xattr -wx com.apple.FinderInfo "0000000000000000040000000000000000000000000000000000000000000000" /Volumes/$(APPLICATION_NAME)
# Configure background image.
# We use tiffutil to create a "Multirepresentation Tiff file".
# This allows us to show the retina and non-retina image when appropriate.
mkdir /Volumes/$(APPLICATION_NAME)/.background
tiffutil -cathidpicheck assets/osx/installer.png assets/osx/installer@2x.png \
-out /Volumes/$(APPLICATION_NAME)/.background/installer.tiff
# This AppleScript performs the following tasks
# - Set the window basic properties.
# - Set the window size and position.
# - Set the icon size.
# - Arrange the icons.
echo ' \
tell application "Finder" \n\
tell disk "$(APPLICATION_NAME)" \n\
open \n\
set current view of container window to icon view \n\
set toolbar visible of container window to false \n\
set statusbar visible of container window to false \n\
set the bounds of container window to {400, 100, 944, 530} \n\
set viewOptions to the icon view options of container window \n\
set arrangement of viewOptions to not arranged \n\
set icon size of viewOptions to 110 \n\
set background picture of viewOptions to file ".background:installer.tiff" \n\
set position of item "$(APPLICATION_NAME).app" of container window to {140, 225} \n\
set position of item "Applications" of container window to {415, 225} \n\
close \n\
open \n\
update without registering applications \n\
delay 2 \n\
close \n\
end tell \n\
end tell \n\
' | osascript
sync
# Sign the *.app with `electron-osx-sign`
# See https://github.com/electron-userland/electron-osx-sign
$(ELECTRON_OSX_SIGN) /Volumes/$(APPLICATION_NAME)/$(APPLICATION_NAME).app \
--platform darwin \
--verbose \
--identity $(SIGN_IDENTITY_OSX)
# Light signature verification.
# This might pass even if Gatekeeper pass.
codesign --verify --deep --display --verbose=4 \
"/Volumes/$(APPLICATION_NAME)/$(APPLICATION_NAME).app"
# Hard signature check. This represents what users will see.
spctl --ignore-cache --no-cache --assess --type execute --verbose=4 \
"/Volumes/$(APPLICATION_NAME)/$(APPLICATION_NAME).app"
# Unmount temporal DMG image.
hdiutil detach /Volumes/$(APPLICATION_NAME)
# Convert temporal DMG image into a production-ready
# compressed and read-only DMG image.
mkdir -p $(dir $@)
hdiutil convert $<.dmg \
-format UDZO \
-imagekey zlib-level=9 \
-o $@
# Cleanup temporal DMG image.
rm $<.dmg
etcher-release/installers/Etcher-linux-x64.tar.gz: etcher-release/Etcher-linux-x64
mkdir -p $(dir $@)
tar -zcf $@ $<
etcher-release/installers/Etcher-linux-x86.tar.gz: etcher-release/Etcher-linux-x86
mkdir -p $(dir $@)
tar -zcf $@ $<
etcher-release/installers/Etcher-win32-x64.exe: etcher-release/Etcher-win32-x64 package.json
$(ELECTRON_BUILDER) $< \
--platform=win \
--out=$(dir $@)win32-x64
mv $(dir $@)win32-x64/Etcher\ Setup.exe $@
rmdir $(dir $@)win32-x64
$(call sign-win32,$@)
etcher-release/installers/Etcher-win32-x86.exe: etcher-release/Etcher-win32-x86 package.json
$(ELECTRON_BUILDER) $< \
--platform=win \
--out=$(dir $@)win32-x86
mv $(dir $@)win32-x86/Etcher\ Setup.exe $@
rmdir $(dir $@)win32-x86
$(call sign-win32,$@)
package-osx: etcher-release/Etcher-darwin-x64
package-linux: etcher-release/Etcher-linux-x86 etcher-release/Etcher-linux-x64
package-win32: etcher-release/Etcher-win32-x86 etcher-release/Etcher-win32-x64
package-all: package-osx package-linux package-win32
installer-osx: etcher-release/installers/Etcher-darwin-x64.dmg
installer-linux: etcher-release/installers/Etcher-linux-x64.tar.gz etcher-release/installers/Etcher-linux-x86.tar.gz
installer-win32: etcher-release/installers/Etcher-win32-x64.exe etcher-release/installers/Etcher-win32-x86.exe
installer-all: installer-osx installer-linux installer-win32
S3_UPLOAD=aws s3api put-object \
--bucket $(S3_BUCKET) \
--acl public-read \
--key etcher/$(ETCHER_VERSION)/$(notdir $<) \
--body $<
upload-linux-x64: etcher-release/installers/Etcher-linux-x64.tar.gz ; $(S3_UPLOAD)
upload-linux-x86: etcher-release/installers/Etcher-linux-x86.tar.gz ; $(S3_UPLOAD)
upload-win32-x64: etcher-release/installers/Etcher-win32-x64.exe ; $(S3_UPLOAD)
upload-win32-x86: etcher-release/installers/Etcher-win32-x86.exe ; $(S3_UPLOAD)
upload-osx: etcher-release/installers/Etcher-darwin-x64.dmg ; $(S3_UPLOAD)
upload-linux: upload-linux-x64 upload-linux-x86
upload-win32: upload-win32-x64 upload-win32-x86
upload-all: upload-osx upload-linux upload-win32
release:
rm -rf node_modules/
npm install --force
make upload-all
clean:
rm -rf etcher-release/

View File

@ -1,84 +0,0 @@
Publishing Etcher
=================
This is a small guide to package and publish Etcher to all supported operating systems.
Prequisites
-----------
- [NodeJS](https://nodejs.org)
- [GNU Make](https://www.gnu.org/software/make/)
- [wine (for Windows)](https://www.winehq.org)
- [nsis (for Windows)](http://nsis.sourceforge.net/Main_Page)
- [XCode (for OS X)](https://developer.apple.com/xcode://developer.apple.com/xcode/)
- [AWS CLI (for uploading packages)](https://aws.amazon.com/cli://aws.amazon.com/cli/)
- [osslsigncode (for signing the Windows installers)](https://sourceforge.net/projects/osslsigncode/)
If you're going to generate installers for another platform than the one you're currently running, make sure you force-install all NPM dependencies, so optional dependencies marked for a certain operating system get installed regardless of the host operating system
```sh
npm install --force
```
You can run the following command at any time to start from a fresh state:
```sh
make clean
```
Signing
-------
### OS X
1. Get our Apple Developer ID certificate for signing applications distributed outside the Mac App Store from the Resin.io Apple account.
2. Install the Developer ID certificate to your Mac's Keychain by double clicking on the certificate file.
The application will be signed automatically using this certificate when packaging for OS X.
### Windows
1. Get access to our code signing certificate and decryption key as a Resin.io employee by asking for it to the relevant people.
2. Place the cert and key in the root of the Etcher repository naming them `certificate.crt.pem` and `certificate.key.pem`, respectively.
The application and installer will be signed automatically using these certificates when packaging for Windows.
Packaging
---------
Run the following command to make installers for all supported operating systems:
```sh
make installer-all
```
You can replace `all` with `osx`, `linux` or `win32` to only generate installers for those platforms:
```sh
make installer-osx
make installer-linux
make installer-win32
```
The resulting installers will be saved to `etcher-release/installers`.
Uploading
---------
Make sure you have the [AWS CLI tool](https://aws.amazon.com/cli://aws.amazon.com/cli/) installed and configured to access Resin.io's production downloads S3 bucket.
Run the following command to upload all installers:
```sh
make upload-all
```
As with the `installer` rule, you can replace `all` with `osx`, `linux` or `win32` to only publish those platform's installers:
```sh
make upload-osx
make upload-linux
make upload-win32
```

131
README.md
View File

@ -1,45 +1,120 @@
Etcher
======
# Etcher
> A better way to burn OS images to SD cards
> Flash OS images to SD cards & USB drives, safely and easily.
[![dependencies](https://david-dm.org/resin-io/etcher.svg)](https://david-dm.org/resin-io/etcher.svg)
[![Build Status](https://travis-ci.org/resin-io/etcher.svg?branch=master)](https://travis-ci.org/resin-io/etcher)
[![Build status](https://ci.appveyor.com/api/projects/status/xggqv231byfhync1/branch/master?svg=true)](https://ci.appveyor.com/project/resin-io/etcher/branch/master)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/resin-io/chat)
[![Stories in Ready](https://badge.waffle.io/resin-io/etcher.svg?label=in progress&title=In Progress)](https://waffle.io/resin-io/etcher)
Etcher is a powerful OS image flasher built with web technologies to ensure
flashing an SDCard or USB drive is a pleasant and safe experience. It protects
you from accidentally writing to your hard-drives, ensures every byte of data
was written correctly, and much more. It can also directly flash Raspberry Pi devices that support [USB device boot mode](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#usb-device-boot-mode).
***
[![Current Release](https://img.shields.io/github/release/balena-io/etcher.svg?style=flat-square)](https://balena.io/etcher)
[![License](https://img.shields.io/github/license/balena-io/etcher.svg?style=flat-square)](https://github.com/balena-io/etcher/blob/master/LICENSE)
[![Balena.io Forums](https://img.shields.io/discourse/https/forums.balena.io/topics.svg?style=flat-square&label=balena.io%20forums)](https://forums.balena.io/c/etcher)
[**Download**](http://etcher.io) | [**Support**](https://github.com/resin-io/etcher/blob/master/SUPPORT.md) | [**Contributing**](https://github.com/resin-io/etcher/blob/master/CONTRIBUTING.md) | [**CLI**](https://github.com/resin-io/etcher-cli)
---
![Etcher](https://raw.githubusercontent.com/resin-io/etcher/master/screenshot.png)
[**Download**][etcher] | [**Support**][support] | [**Documentation**][user-documentation] | [**Contributing**][contributing] | [**Roadmap**][milestones]
Installers
----------
## Supported Operating Systems
Refer to the [downloads page](http://etcher.io) for the latest pre-made installers for all supported operating systems.
- Linux; most distros; Intel 64-bit.
- Windows 10 and later; Intel 64-bit.
- macOS 10.13 (High Sierra) and later; both Intel and Apple Silicon.
Developing
----------
## Installers
You can manually run the application with the following commands:
Refer to the [downloads page][etcher] for the latest pre-made
installers for all supported operating systems.
## Packages
#### Debian and Ubuntu based Package Repository (GNU/Linux x86/x64)
Package for Debian and Ubuntu can be downloaded from the [Github release page](https://github.com/balena-io/etcher/releases/)
##### Install .deb file using apt
```sh
sudo apt install ./balena-etcher_******_amd64.deb
```
##### Uninstall
```sh
sudo apt remove balena-etcher
```
#### Redhat (RHEL) and Fedora-based Package Repository (GNU/Linux x86/x64)
##### Yum
Package for Fedora-based and Redhat can be downloaded from the [Github release page](https://github.com/balena-io/etcher/releases/)
1. Install using yum
```sh
git clone https://github.com/resin-io/etcher
cd etcher
npm install && bower install
npm start
sudo yum localinstall balena-etcher-***.x86_64.rpm
```
Take a look at our [contributing guide](https://github.com/resin-io/etcher/blob/master/CONTRIBUTING.md).
#### Arch/Manjaro Linux (GNU/Linux x64)
Support
-------
Etcher is offered through the Arch User Repository and can be installed on both Manjaro and Arch systems. You can compile it from the source code in this repository using [`balena-etcher`](https://aur.archlinux.org/packages/balena-etcher/). The following example uses a common AUR helper to install the latest release:
If you're having any problem, please [raise an issue](https://github.com/resin-io/etcher/issues/new) on GitHub and the Resin.io team will be happy to help.
```sh
yay -S balena-etcher
```
License
-------
##### Uninstall
Etcher is free software, and may be redistributed under the terms specified in the [license](https://github.com/resin-io/etcher/blob/master/LICENSE).
```sh
yay -R balena-etcher
```
#### WinGet (Windows)
This package is updated by [gh-action](https://github.com/vedantmgoyal2009/winget-releaser), and is kept up to date automatically.
```sh
winget install balenaEtcher #or Balena.Etcher
```
##### Uninstall
```sh
winget uninstall balenaEtcher
```
#### Chocolatey (Windows)
This package is maintained by [@majkinetor](https://github.com/majkinetor), and
is kept up to date automatically.
```sh
choco install etcher
```
##### Uninstall
```sh
choco uninstall etcher
```
## Support
If you're having any problem, please [raise an issue][newissue] on GitHub, and
the balena.io team will be happy to help.
## License
Etcher is free software and may be redistributed under the terms specified in
the [license].
[etcher]: https://balena.io/etcher
[electron]: https://electronjs.org/
[electron-supported-platforms]: https://electronjs.org/docs/tutorial/support#supported-platforms
[support]: https://github.com/balena-io/etcher/blob/master/docs/SUPPORT.md
[contributing]: https://github.com/balena-io/etcher/blob/master/docs/CONTRIBUTING.md
[user-documentation]: https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md
[milestones]: https://github.com/balena-io/etcher/milestones
[newissue]: https://github.com/balena-io/etcher/issues/new
[license]: https://github.com/balena-io/etcher/blob/master/LICENSE

View File

@ -1,13 +0,0 @@
Getting help with Etcher
========================
There are various ways get support for Etcher if you experience an issue or have an idea you'd like to share with us.
Gitter
------
We have a [Gitter chat room](https://gitter.im/resin-io/chat) for Resin.io which is open to everyone, please come join us :). The room covers Resin.io as a whole, including but not limited to Etcher. Drop us a line there and the Resin.io staff and community users will be happy to assist.
GitHub
------
If you encounter an issue or have a suggestion, head on over to Etcher's [issue tracker](https://github.com/resin-io/etcher/issues) and if there isn't a ticket covering it, [create one](https://github.com/resin-io/etcher/issues/new).

11
after-install.tpl Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# Link to the binary
# Must hardcode balenaEtcher directory; no variable available
ln -sf '/opt/balenaEtcher/${executable}' '/usr/bin/${executable}'
# SUID chrome-sandbox for Electron 5+
chmod 4755 '/opt/balenaEtcher/chrome-sandbox' || true
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true

View File

@ -1,35 +0,0 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
init:
- git config --global core.autocrlf input
cache:
- C:\Users\appveyor\.node-gyp
- '%AppData%\npm-cache'
# what combinations to test
environment:
matrix:
- nodejs_version: 4
install:
- ps: Install-Product node $env:nodejs_version x64
- npm -g install npm@2
- set PATH=%APPDATA%\npm;%PATH%
- npm install
build: off
test_script:
- node --version
- npm --version
- cmd: npm test
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/3d5ed28fa9ae4c25f46f
on_build_success: false
on_build_failure: true
on_build_status_changed: true

BIN
assets/dmg/background.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
assets/dmg/background.tiff Executable file

Binary file not shown.

BIN
assets/dmg/background@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
assets/icon.icns Normal file → Executable file

Binary file not shown.

BIN
assets/icon.ico Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

BIN
assets/icon.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
assets/iconset/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
assets/iconset/16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

BIN
assets/iconset/256x256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
assets/iconset/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

BIN
assets/iconset/48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/iconset/512x512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="500.028 0 999.944 999.986" enable-background="new 500.028 0 999.944 999.986"
xml:space="preserve">
<g>
<g>
<path fill="#FFFFFF" d="M1174.844,499.923c0-96.492-78.443-174.991-174.991-174.991c-96.492,0-174.991,78.498-174.991,174.991
s78.498,174.991,174.991,174.991c50.949,0,96.548-22.254,128.442-57.25l-29.505-94.243l67.853,26.292
C1171.491,533.927,1174.844,517.428,1174.844,499.923z M999.853,599.922c-55.196,0-99.999-44.802-99.999-99.999
s44.802-99.999,99.999-99.999c55.196,0,99.999,44.802,99.999,99.999S1055.091,599.922,999.853,599.922z"/>
<path fill="#FFFFFF" d="M1109.296,675.808c7.055-8.843,11.693-15.255,15.395-20.802c-34.353,27.647-77.339,44.9-124.74,44.9
c-110.295,0-199.983-89.689-199.983-199.983S889.656,299.94,999.951,299.94s199.983,89.689,199.983,199.983
c0,20.648-4.051,40.248-9.849,58.996l5.7,2.151c15.395,5.951,29.854,13.495,43.098,22.255
c-2.249-40.542,6.147-85.302,44.649-129.587l72.1-83.192l15.2,108.995c4.904,34.995,42.847,82.899,76.389,125.187
c10.505,13.3,21.053,26.655,31.251,40.248c13.9-45.948,21.5-94.592,21.5-144.997C1499.972,223.886,1276.128,0,999.993,0
S500.028,223.886,500.028,499.979s223.83,499.965,499.965,499.965c44.048,0,86.489-6.245,127.24-17.002
c-44.802-45.096-72.24-106.593-72.24-173.286C1054.896,744.206,1086.245,704.712,1109.296,675.808z"/>
<path fill="#FFFFFF" d="M1283.476,756.709c-3.604-54.791-29.603-119.445-105.95-149.048
c26.948,86.252-72.743,101.438-72.743,202.037c0,91.589,62.698,167.838,147.246,190.288c-27.843-25.845,10.1-76.096-18.846-112.6
c36.35,11.553,69.097,38.153,69.097,84.799c36.392-24.755-8.955-92.497,58.354-137.341
c-20.592,61.092,34.995,90.639,25.901,130.887c-2.654,11.805-8.494,20.899-15.898,28.597
c75.243-27.954,129.196-99.691,129.196-184.644c0-109.093-164.289-219.933-178.637-323.228
C1233.183,587.921,1321.782,652.017,1283.476,756.709z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 134.229 134.229" enable-background="new 0 0 134.229 134.229"
xml:space="preserve">
<g>
<g>
<path fill="#FFFFFF" d="M21.343,112.528c2.317,0,4.195,1.875,4.195,4.189c0,2.319-1.878,4.201-4.195,4.201
c-2.32,0-4.199-1.882-4.199-4.201C17.144,114.403,19.022,112.528,21.343,112.528z"/>
<path fill="#FFFFFF" d="M131.246,110.53L119.604,5.8C119.25,2.615,116.047,0,112.48,0H21.754c-3.568,0-6.777,2.615-7.127,5.8
L2.984,110.53c0,0.129-0.061,0.232-0.061,0.359v11.667c0,6.437,5.237,11.673,11.667,11.673h105.05
c6.431,0,11.667-5.236,11.667-11.673v-11.667C131.307,110.762,131.246,110.652,131.246,110.53z M125.474,122.556
c0,3.222-2.631,5.84-5.84,5.84H14.59c-3.206,0-5.836-2.618-5.836-5.84v-11.667c0-3.221,2.63-5.839,5.836-5.839h105.05
c3.203,0,5.834,2.618,5.834,5.839V122.556L125.474,122.556z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 41 41" enable-background="new 0 0 41 41" xml:space="preserve">
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M20.5,0C31.822,0,41,9.178,41,20.5S31.822,41,20.5,41
S0,31.822,0,20.5S9.178,0,20.5,0z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#555760" d="M20.5,12c4.694,0,8.5,3.806,8.5,8.5S25.194,29,20.5,29
S12,25.194,12,20.5S15.806,12,20.5,12z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M20.5,12.625c4.349,0,7.875,3.526,7.875,7.875
s-3.526,7.875-7.875,7.875s-7.875-3.526-7.875-7.875S16.151,12.625,20.5,12.625z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#555760" d="M20.5,16c2.485,0,4.5,2.015,4.5,4.5S22.985,25,20.5,25
S16,22.985,16,20.5S18.015,16,20.5,16z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg viewBox="0 0 837 244" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.2.2 (9983) - http://www.bohemiancoding.com/sketch -->
<title>Group + resin_text</title>
<desc>Created with Sketch.</desc>
<defs>
<path id="path-1" d="M0.246338028,0.51912 L581.907901,0.51912 L581.907901,102.74868 L0.246338028,102.74868 L0.246338028,0.51912 Z"></path>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Group-+-resin_text" sketch:type="MSLayerGroup">
<g id="Group" transform="translate(0.500000, 0.000000)" sketch:type="MSShapeGroup">
<g id="Shape">
<path d="M105.67438,0 L0,61 L105.67438,122 L211,61 L105.67438,0 Z" fill="#E0A800"></path>
<path d="M0,61 L0,183 L105.67438,244 L105.67438,122 L0,61 Z" fill="#FFEC52"></path>
<path d="M105.67438,244 L211,183 L211,61 L105.67438,122 L105.67438,244 Z" fill="#F7C30F"></path>
</g>
<g transform="translate(105.789471, 122.000000) rotate(180.000000) translate(-105.789471, -122.000000) translate(36.159471, 41.480000)" id="Shape">
<path d="M69.7450909,0 L0,40.26 L69.7450909,80.52 L139.26,40.26 L69.7450909,0 Z" fill="#E0A800"></path>
<path d="M0,40.26 L0,120.78 L69.7450909,161.04 L69.7450909,80.52 L0,40.26 Z" fill="#FFEC52"></path>
<path d="M69.7450909,161.04 L139.26,120.78 L139.26,40.26 L69.7450909,80.52 L69.7450909,161.04 Z" fill="#F7C30F"></path>
</g>
<g transform="translate(52.837190, 61.000000)" id="Shape">
<path d="M52.8371901,0 L0,30.5 L52.8371901,61 L105.5,30.5 L52.8371901,0 Z" fill="#E0A800"></path>
<path d="M0,30.5 L0,91.5 L52.8371901,122 L52.8371901,61 L0,30.5 Z" fill="#FFEC52"></path>
<path d="M52.8371901,122 L105.5,91.5 L105.5,30.5 L52.8371901,61 L52.8371901,122 Z" fill="#F7C30F"></path>
</g>
</g>
<g id="resin_text" transform="translate(254.500000, 70.000000)">
<mask id="mask-2" sketch:name="Clip 2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-2"></g>
<path d="M530.14407,81.44416 C514.30043,81.44416 501.80288,68.19424 501.80288,51.40524 C501.80288,35.329 514.653514,22.07496 529.971634,22.07496 C545.638732,22.07496 558.31693,35.50204 558.31693,51.76368 C558.31693,68.19424 545.638732,81.44416 530.14407,81.44416 L530.14407,81.44416 Z M529.790986,0.51912 C501.449796,0.51912 478.199592,23.66528 478.199592,51.76368 C478.199592,80.031 501.449796,103 529.971634,103 C558.31693,103 581.907901,80.031 581.907901,52.46408 C581.907901,23.31508 559.199641,0.51912 529.790986,0.51912 L529.790986,0.51912 Z M440.173211,100.70516 L463.591746,100.70516 L463.591746,2.81396 L440.173211,2.81396 L440.173211,100.70516 Z M394.046415,100.70516 L417.460845,100.70516 L417.460845,78.08636 L394.046415,78.08636 L394.046415,100.70516 Z M334.358711,0.51912 C323.265289,0.51912 315.517958,3.87692 306.892021,12.17872 L306.892021,2.81808 L285.234803,2.81808 L285.234803,100.70516 L308.653338,100.70516 L308.653338,54.59 C308.653338,41.51312 309.531944,35.85636 312.524951,31.08952 C316.220021,25.25972 322.382577,22.07496 329.776824,22.07496 C341.399873,22.07496 348.445141,26.67288 348.445141,52.8184 L348.445141,100.70516 L371.855465,100.70516 L371.855465,48.2246 C371.855465,30.7352 370.102359,22.25212 364.818408,14.65484 C358.47931,5.46724 347.915514,0.51912 334.358711,0.51912 L334.358711,0.51912 Z M242.97962,100.70516 L266.394049,100.70516 L266.394049,2.81396 L242.97962,2.81396 L242.97962,100.70516 Z M202.830627,40.98164 C186.810444,35.85636 186.284923,35.50204 186.284923,30.37676 C186.284923,25.60992 190.156535,22.07496 195.268049,22.07496 C200.19481,22.07496 203.364359,24.72824 204.423613,29.8494 L227.312521,29.8494 C226.42981,11.4742 211.813754,0.51912 195.268049,0.51912 C177.129359,0.51912 162.866387,13.59188 162.866387,30.37676 C162.866387,44.69376 170.613718,52.8184 189.984099,59.35684 C205.651197,64.65928 206.533908,66.24548 206.533908,71.90636 C206.533908,77.3736 201.956127,81.44416 195.966007,81.44416 C189.105493,81.44416 185.229775,77.91332 182.938831,69.6074 L159.347859,69.6074 C161.811239,92.40336 175.721127,103 195.091507,103 C214.634324,103 229.952444,88.33692 229.952444,69.6074 C229.952444,55.11324 223.260261,47.3388 202.830627,40.98164 L202.830627,40.98164 Z M73.2486127,41.51312 C76.9477887,28.9636 86.452331,22.07496 100.362218,22.07496 C114.801732,22.07496 124.306275,28.9636 127.299282,41.51312 L73.2486127,41.51312 L73.2486127,41.51312 Z M100.009134,0.51912 C71.3107535,0.51912 48.5942817,23.31508 48.5942817,52.10976 C48.5942817,80.7314 71.6597324,103 101.421472,103 C121.136725,103 141.385711,91.86776 147.897246,71.72096 L122.368415,71.72096 C116.386507,78.795 110.57293,81.44416 100.887739,81.44416 C86.9860634,81.44416 76.7671408,74.01992 73.9506761,62.18728 L149.490232,62.18728 C150.192296,58.82536 150.368838,56.70768 150.368838,53.17272 C150.368838,22.7836 129.064704,0.51912 100.009134,0.51912 L100.009134,0.51912 Z M21.4806761,12.35588 L21.4806761,2.81808 L0,2.81808 L0,100.70516 L23.4185352,100.70516 L23.4185352,46.27996 C23.4185352,31.08952 30.2831549,23.48812 44.3736901,23.13792 L44.3736901,0.51912 L42.6082676,0.51912 C32.5740986,0.51912 27.6432324,3.34544 21.4806761,12.35588 L21.4806761,12.35588 Z" id="Fill-1" fill="#FFFFFF" sketch:type="MSShapeGroup" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,21 +0,0 @@
{
"name": "etcher",
"version": "0.0.1",
"homepage": "https://github.com/resin-io/etcher",
"authors": [
"Juan Cruz Viotti <juan@resin.io>"
],
"main": "lib/templates/index.html",
"license": "Apache-2.0",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "Polymer/polymer#^1.1.0",
"angular-mixpanel": "~1.1.2"
}
}

File diff suppressed because it is too large Load Diff

70
docs/ARCHITECTURE.md Normal file
View File

@ -0,0 +1,70 @@
Etcher Architecture
===================
This document aims to serve as a high-level overview of how Etcher works,
specially oriented for contributors who want to understand the big picture.
Technologies
------------
This is a non exhaustive list of the major frameworks, libraries, and other
technologies used in Etcher that you should become familiar with:
- [Electron][electron]
- [NodeJS][nodejs]
- [Redux][redux]
- [ImmutableJS][immutablejs]
- [Sass][sass]
- [Mocha][mocha]
- [JSDoc][jsdoc]
Module architecture
-------------------
Instead of embedding all the functionality required to create a full-featured
image writer as a monolithic project, we try to hard to follow the ["lego block
approach"][lego-blocks].
This has the advantage of allowing other applications to re-use logic we
implemented for Etcher in their own project, even for things we didn't expect,
which leads to users benefitting from what we've built, and we benefitting from
user's bug reports, suggestions, etc, as an indirect way to make Etcher better.
The fact that low-level details are scattered around many different modules can
make it challenging for a new contributor to wrap their heads around the
project as a whole, and get a clear high level view of how things work or where
to submit their work or bug reports.
These are the main Etcher components, in a nutshell:
- [Drivelist](https://github.com/balena-io-modules/drivelist)
As the name implies, this module's duty is to detect the connected drives
uniformly in all major operating systems, along with valuable metadata, like if
a drive is removable or not, to prevent users from trying to write an image to
a system drive.
- [Etcher](https://github.com/balena-io/etcher)
This is the *"main repository"*, from which you're reading this from, which is
basically the front-end and glue for all previously listed projects.
Summary
-------
We always welcome contributions to Etcher as well as our documentation. If you
want to give back, but feel that your knowledge on how Etcher works is not
enough to tackle a bug report or feature request, use that as your advantage,
since fresh eyes could help unveil things that we take for granted, but should
be documented instead!
[lego-blocks]: https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328
[exit-codes]: https://github.com/balena-io/etcher/blob/master/lib/shared/exit-codes.js
[gui-dir]: https://github.com/balena-io/etcher/tree/master/lib/gui
[electron]: http://electron.atom.io
[nodejs]: https://nodejs.org
[redux]: http://redux.js.org
[immutablejs]: http://facebook.github.io/immutable-js/
[sass]: http://sass-lang.com
[mocha]: http://mochajs.org
[jsdoc]: http://usejsdoc.org

86
docs/COMMIT-GUIDELINES.md Normal file
View File

@ -0,0 +1,86 @@
Commit Guidelines
=================
We enforce certain rules on commits with the following goals in mind:
- Be able to reliably auto-generate the `CHANGELOG.md` *without* any human
intervention.
- Be able to automatically and correctly increment the semver version number
based on what was done since the last release.
- Be able to get a quick overview of what happened to the project by glancing
over the commit history.
- Be able to automatically reference relevant changes from a dependency
upgrade.
Commit structure
----------------
Each commit message needs to specify the semver-type. Which can be `patch|minor|major`.
See the [Semantic Versioning][semver] specification for a more detailed explanation of the meaning of these types.
See balena commit guidelines for more info about the whole commit structure.
```
<semver-type>: <subject>
```
or
```
<subject>
<BLANK LINE>
<details>
<BLANK LINE>
Change-Type: <semver-type>
```
The subject should not contain more than 70 characters, including the type and
scope, and the body should be wrapped at 72 characters.
Tags
----
### `See: <url>`/`Link: <url>`
This tag can be used to reference a resource that is relevant to the commit,
and can be repeated multiple times in the same commit.
Resource examples include:
- A link to pull requests.
- A link to a GitHub issue.
- A link to a website providing useful information.
- A commit hash.
Its recommended that you avoid relative URLs, and that you include the whole
commit hash to avoid any potential ambiguity issues in the future.
If the commit type equals `upgrade`, this tag should be present, and should
link to the CHANGELOG section of the dependency describing the changes
introduced from the previously used version.
Examples:
```
See: https://github.com/xxx/yyy/
See: 49d89b4acebd80838303b011d30517cd6229fdbe
Link: https://github.com/xxx/yyy/issues/zzz
```
### `Closes: <url>`/`Fixes: <url>`
This tag is used to make GitHub close the referenced issue automatically when
the commit is merged.
Its recommended that you provide the absolute URL to the GitHub issue rather
than simply writing the ID prefixed by a hash tag for convenience when browsing
the commit history outside the GitHub web interface.
A commit can include multiple instances of this tag.
Examples:
```
Closes: https://github.com/balena-io/etcher/issues/XXX
Fixes: https://github.com/balena-io/etcher/issues/XXX
```
[semver]: http://semver.org

184
docs/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,184 @@
Contributing Guide
==================
Thanks for your interest in contributing to this project! This document aims to
serve as a friendly guide for making your first contribution.
High-level Etcher overview
--------------------------
Make sure you checkout our [ARCHITECTURE.md][ARCHITECTURE] guide, which aims to
explain how all the pieces fit together.
Developing
----------
### Prerequisites
#### Common
- [NodeJS](https://nodejs.org) (at least v16.11)
- [Python 3](https://www.python.org)
- [jq](https://stedolan.github.io/jq/)
- [curl](https://curl.haxx.se/)
- [npm](https://www.npmjs.com/)
```sh
pip install -r requirements.txt
```
You might need to run this with `sudo` or administrator permissions.
#### Windows
- [NSIS v2.51](http://nsis.sourceforge.net/Main_Page) (v3.x won't work)
- Either one of the following:
- [Visual C++ 2019 Build Tools](https://visualstudio.microsoft.com/vs/features/cplusplus/) containing standalone compilers, libraries and scripts
- The [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools#windows-build-tools) should be installed along with NodeJS
- [Visual Studio Community 2019](https://visualstudio.microsoft.com/vs/) (free) (other editions, like Professional and Enterprise, should work too)
**NOTE:** Visual Studio doesn't install C++ by default. You have to rerun the
setup, select "Modify" and then check `Visual C++ -> Common Tools for Visual
C++` (see http://stackoverflow.com/a/31955339)
- [MinGW](http://www.mingw.org)
You might need to `npm config set msvs_version 2019` for node-gyp to correctly detect
the version of Visual Studio you're using (in this example VS2019).
The following MinGW packages are required:
- `msys-make`
- `msys-unzip`
- `msys-zip`
- `msys-bash`
- `msys-coreutils`
#### macOS
- [Xcode](https://developer.apple.com/xcode/)
It's not enough to have [Xcode Command Line Tools] installed. Xcode must be installed
as well.
#### Linux
- `libudev-dev` for libusb (for example install with `sudo apt install libudev-dev`, or on fedora `systemd-devel` contains the required package)
### Cloning the project
```sh
git clone --recursive https://github.com/balena-io/etcher
cd etcher
```
### Running the application
#### GUI
```sh
# Build and start application
npm start
```
Testing
-------
To run the test suite, run the following command:
```sh
npm test
```
Given the nature of this application, not everything can be unit tested. For
example:
- The writing operating on real raw devices.
- Platform inconsistencies.
- Style changes.
- Artwork.
We encourage our contributors to test the application on as many operating
systems as they can before sending a pull request.
*The test suite is run automatically by CI servers when you send a pull
request.*
We make use of [EditorConfig] to communicate indentation, line endings and
other text editing default. We encourage you to install the relevant plugin in
your text editor of choice to avoid having to fix any issues during the review
process.
Updating a dependency
---------------------
- Install new version of dependency using npm
- Commit *both* `package.json` and `npm-shrinkwrap.json`.
Diffing Binaries
----------------
Binary files are tagged as "binary" in the `.gitattributes` file, but also have
a `diff=hex` tag, which allows you to see hexdump-style diffs for binaries,
if you add the following to either your global or repository-local git config:
```sh
$ git config diff.hex.textconv hexdump
$ git config diff.hex.binary true
```
And global, respectively:
```sh
$ git config --global diff.hex.textconv hexdump
$ git config --global diff.hex.binary true
```
If you don't have `hexdump` available on your platform,
you can try [hxd], which is also a bit faster.
Commit Guidelines
-----------------
See [COMMIT-GUIDELINES.md][COMMIT-GUIDELINES] for a thorough guide on how to
write commit messages.
Sending a pull request
----------------------
When sending a pull request, consider the following guidelines:
- Write a concise commit message explaining your changes.
- If applies, write more descriptive information in the commit body.
- Mention the operating systems with the corresponding versions in which you
tested your changes.
- If your change affects the visuals of the application, consider attaching a
screenshot.
- Refer to the issue/s your pull request fixes, so they're closed automatically
when your pull request is merged.
- Write a descriptive pull request title.
- Squash commits when possible, for example, when committing review changes.
Before your pull request can be merged, the following conditions must hold:
- The linter doesn't throw any warning.
- All the tests pass.
- The coding style aligns with the project's convention.
- Your changes are confirmed to be working in recent versions of the operating
systems we support.
Don't hesitate to get in touch if you have any questions or need any help!
[ARCHITECTURE]: https://github.com/balena-io/etcher/blob/master/docs/ARCHITECTURE.md
[COMMIT-GUIDELINES]: https://github.com/balena-io/etcher/blob/master/docs/COMMIT-GUIDELINES.md
[EditorConfig]: http://editorconfig.org
[shrinkwrap]: https://docs.npmjs.com/cli/shrinkwrap
[hxd]: https://github.com/jhermsmeier/hxd
[Xcode Command Line Tools]: https://developer.apple.com/library/content/technotes/tn2339/_index.html

52
docs/FAQ.md Normal file
View File

@ -0,0 +1,52 @@
## Why is my drive not bootable?
Etcher copies images to drives byte by byte, without doing any transformation to the final device, which means images that require special treatment to be made bootable, like Windows images, will not work out of the box. In these cases, the general advice is to use software specific to those kind of images, usually available from the image publishers themselves. You can find more information [here](https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#why-is-my-drive-not-bootable).
## How can I configure persistent storage?
Some programs, usually oriented at making GNU/Linux live USB drives, include an option to set persistent storage. This is currently not supported by Etcher, so if you require this functionality, we advise to fallback to [UNetbootin](https://unetbootin.github.io/).
## How do I flash Ubuntu ISOs
Ubuntu images (and potentially some other related GNU/Linux distributions) have a peculiar format that allows the image to boot without any further modification from both CDs and USB drives.
A consequence of this enhancement is that some programs, like parted get confused about the drive's format and partition table, printing warnings such as:
> /dev/xxx contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table? Both the primary and backup GPT tables are corrupt. Try making a fresh table, and using Parted's rescue feature to recover partitions.
> Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
All these warnings are safe to ignore, and your drive should be able to boot without any problems.
Refer to [the following message from Ubuntu's mailing list](https://lists.ubuntu.com/archives/ubuntu-devel/2011-June/033495.html) if you want to learn more.
## How do I run Etcher on Wayland?
The XWayland Server provides backwards compatibility to run any X client on Wayland, including Etcher.
This usually works out of the box on mainstream GNU/Linux distributions that properly support Wayland. If it doesn't, make sure the xwayland.so module is being loaded by declaring it in your [weston.ini](http://manpages.ubuntu.com/manpages/wily/man5/weston.ini.5.html):
```
[core]
modules=xwayland.so
```
## What are the runtime GNU/LINUX dependencies?
[This entry](https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#runtime-gnulinux-dependencies) aims to provide an up to date list of runtime dependencies needed to run Etcher on a GNU/Linux system.
## How can I recover the broken drive?
Sometimes, things might go wrong, and you end up with a half-flashed drive that is unusable by your operating systems, and common graphical tools might even refuse to get it back to a normal state.
To solve these kinds of problems, we've collected [a list of fail-proof methods](https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#recovering-broken-drives) to completely erase your drive in major operating systems.
## I receive "No polkit authentication agent found" error in GNU/Linux
Etcher requires an available [polkit authentication agent](https://wiki.archlinux.org/index.php/Polkit#Authentication_agents) in your system in order to show a secure password prompt dialog to perform elevation. Make sure you have one installed for the desktop environment of your choice.
## May I run Etcher in older macOS versions?
Etcher GUI is based on the [Electron](http://electron.atom.io/) framework, [which only supports macOS 10.10 and newer versions](https://github.com/electron/electron/blob/master/docs/tutorial/support.md#supported-platforms).
## Can I use the Flash With Etcher button on my site?
You can use the Flash with Etcher button on your site or blog, if you have an OS that you want your users to be able to easily flash using Etcher, add the following code where you want to button to be:
`<a href="https://efp.balena.io/open-image-url?imageUrl=<your image URL>"><img src="http://balena.io/flash-with-etcher.png" /></a>`

112
docs/MAINTAINERS.md Normal file
View File

@ -0,0 +1,112 @@
Maintaining Etcher
==================
This document is meant to serve as a guide for maintainers to perform common tasks.
Releasing
---------
### Release Types
- **draft**: A continues snapshot of current master, made by the CI services
- **pre-release** (default): A continues snapshot of current master, made by the CI services
- **release**: Full releases
Draft release is created from each PR, tagged with the branch name.
All merged PR will generate a new tag/version as a *pre-release*.
Mark the pre-release as final when it is necessary, then distribute the packages in alternative channels as necessary.
#### Preparation
- [Prepare the new version](#preparing-a-new-version)
- [Generate build artifacts](#generating-binaries) (binaries, archives, etc.)
- [Draft a release on GitHub](https://github.com/balena-io/etcher/releases)
- Upload build artifacts to GitHub release draft
#### Testing
- Test the prepared release and build artifacts properly on **all supported operating systems** to prevent regressions that went uncaught by the CI tests (see [MANUAL-TESTING.md](MANUAL-TESTING.md))
- If regressions or other issues arise, create issues on the repository for each one, and decide whether to fix them in this release (meaning repeating the process up until this point), or to follow up with a patch release
#### Publishing
- [Publish release draft on GitHub](https://github.com/balena-io/etcher/releases)
- [Post release note to forums](https://forums.balena.io/c/etcher)
- [Submit Windows binaries to Symantec for whitelisting](#submitting-binaries-to-symantec)
- [Update the website](https://github.com/balena-io/etcher-homepage)
- Wait 2-3 hours for analytics (Sentry, Amplitude) to trickle in and check for elevated error rates, or regressions
- If regressions arise; pull the release, and release a patched version, else:
- [Upload deb & rpm packages to Cloudfront](#uploading-packages-to-cloudfront)
- Post changelog with `#release-notes` tag on internal chat
- If this release packs noteworthy major changes:
- Write a blog post about it, and / or
- Write about it to the Etcher mailing list
### Generating binaries
**Environment**
Make sure to set the analytics tokens when generating production release binaries:
```bash
export ANALYTICS_SENTRY_TOKEN="xxxxxx"
export ANALYTICS_AMPLITUDE_TOKEN="xxxxxx"
```
#### Linux
##### Clean dist folder
Delete `.webpack` and `out/`.
##### Generating artifacts
The artifacts are generated by the CI and published as draft-release or pre-release.
Etcher is built with electron-forge. Run:
```
npm run make
```
Our CI will appropriately sign artifacts for macOS and some Windows targets.
### Uploading packages to Cloudfront
Log in to cloudfront and upload the `rpm` and `deb` files.
### Dealing with a Problematic Release
There can be times where a release is accidentally plagued with bugs. If you
released a new version and notice the error rates are higher than normal, then
revert the problematic release as soon as possible, until the bugs are fixed.
You can revert a version by deleting its builds from the S3 bucket and Bintray.
Refer to the `Makefile` for the up to date information about the S3 bucket
where we push builds to, and get in touch with the balena.io operations team to
get write access to it.
The Etcher update notifier dialog and the website only show the a certain
version if all the expected files have been uploaded to it, so deleting a
single package or two is enough to bring down the whole version.
Use the following command to delete files from S3:
```bash
aws s3api delete-object --bucket <bucket name> --key <file name>
```
The Bintray dashboard provides an easy way to delete a version's files.
### Submitting binaries to Symantec
- [Report a Suspected Erroneous Detection](https://submit.symantec.com/false_positive/standard/)
- Fill out form:
- **Select Submission Type:** "Provide a direct download URL"
- **Name of the software being detected:** Etcher
- **Name of detection given by Symantec product:** WS.Reputation.1
- **Contact name:** Balena.io Ltd
- **E-mail address:** hello@etcher.io
- **Are you the creator or distributor of the software in question?** Yes

115
docs/MANUAL-TESTING.md Normal file
View File

@ -0,0 +1,115 @@
Manual Testing
==============
This document describes a high-level script of manual tests to check for. We
should aim to replace items on this list with automated Spectron test cases.
Image Selection
---------------
- [ ] Cancel image selection dialog
- [ ] Select an unbootable image (without a partition table), and expect a
sensible warning
- [ ] Attempt to select a ZIP archive with more than one image
- [ ] Attempt to select a tar archive (with any compression method)
- [ ] Change image selection
- [ ] Select a Windows image, and expect a sensible warning
Drive Selection
---------------
- [ ] Open the drive selection modal
- [ ] Switch drive selection
- [ ] Insert a single drive, and expect auto-selection
- [ ] Insert more than one drive, and don't expect auto-selection
- [ ] Insert a locked SD Card and expect a warning
- [ ] Insert a too small drive and expect a warning
- [ ] Put an image into a drive and attempt to flash the image to the drive
that contains it
- [ ] Attempt to flash a compressed image (for which we can get the
uncompressed size) into a drive that is big enough to hold the compressed
image, but not big enough to hold the uncompressed version
- [ ] Enable "Unsafe Mode" and attempt to select a system drive
- [ ] Enable "Unsafe Mode", and if there is only one system drive (and no
removable ones), don't expect autoselection
Image Support
-------------
Run the following tests with and without validation enabled:
- [ ] Flash an uncompressed image
- [ ] Flash a Bzip2 image
- [ ] Flash a XZ image
- [ ] Flash a ZIP image
- [ ] Flash a GZ image
- [ ] Flash a DMG image
- [ ] Flash an image whose size is not a multiple of 512 bytes
- [ ] Flash a compressed image whose size is not a multiple of 512 bytes
- [ ] Flash an archive whose image size is not a multiple of 512 bytes
- [ ] Flash an archive image containing a logo
- [ ] Flash an archive image containing a blockmap file
- [ ] Flash an archive image containing a manifest metadata file
Flashing Process
----------------
- [ ] Unplug the drive during flash or validation
- [ ] Click "Flash", cancel elevation dialog, and click "Flash" again
- [ ] Start flashing an image, try to close Etcher, cancel the application
close warning dialog, and check that Etcher continues to flash the image
### Child Writer
- [ ] Kill the child writer process (i.e. with `SIGINT` or `SIGKILL`), and
check that the UI reacts appropriately
- [ ] Close the application while flashing using the window manager close icon
- [ ] Close the application while flashing using the OS keyboard shortcut
- [ ] Close the application from the terminal using Ctrl-C while flashing
- [ ] Force kill the application (using a process monitor tool, etc)
In all these cases, the child writer process should not remain alive. Note that
in some systems you need to open your process monitor tool of choice with extra
permissions to see the elevated child writer process.
GUI
----
- [ ] Close application from the terminal using Ctrl-C while the application is
idle
- [ ] Click footer links that take you to an external website
- [ ] Attempt to change image or drive selection while flashing
- [ ] Go to the settings page while flashing and come back
- [ ] Flash consecutive images without closing the application
- [ ] Remove the selected drive right before clicking "Flash"
- [ ] Minimize the application
- [ ] Start the application given no internet connection
Success Banner
--------------
- [ ] Click an external link on the success banner (with and without internet
connection)
Elevation Prompt
----------------
- [ ] Flash an image as `root`/administrator
- [ ] Reject elevation prompt
- [ ] Put incorrect elevation prompt password
- [ ] Unplug the drive during elevation
Unmounting
----------
- [ ] Disable unmounting and flash an image
- [ ] Flash an image with a file system that is readable by the host OS, and
check that is unmounted correctly
Analytics
---------
- [ ] Disable analytics, open DevTools Network pane or a packet sniffer, and
check that no request is sent
- [ ] **Disable analytics, refresh application from DevTools (using Cmd-R or
F5), and check that initial events are not sent to Amplitude**

82
docs/PUBLISHING.md Normal file
View File

@ -0,0 +1,82 @@
Publishing Etcher
=================
This is a small guide to package and publish Etcher to all supported operating
systems.
Release Types
-------------
Etcher supports **pre-release** and **final** release types as does Github. Each is
published to Github releases.
The release version is generated automatically from the commit messasges.
Signing
-------
### OS X
1. Get our Apple Developer ID certificate for signing applications distributed
outside the Mac App Store from the balena.io Apple account.
2. Install the Developer ID certificate to your Mac's Keychain by double
clicking on the certificate file.
The application will be signed automatically using this certificate when
packaging for OS X.
### Windows
1. Get access to our code signing certificate and decryption key as a balena.io
employee by asking for it from the relevant people.
2. Place the certificate in the root of the Etcher repository naming it
`certificate.p12`.
Packaging
---------
Run the following command on each platform:
```sh
npm run make
```
This will produce all targets (eg. zip, dmg) specified in forge.config.ts for the
host platform and architecture.
The resulting artifacts can be found in `out/make`.
Publishing to Cloudfront
---------------------
We publish GNU/Linux Debian packages to [Cloudfront][cloudfront].
Log in to cloudfront and upload the `rpm` and `deb` files.
Publishing to Homebrew Cask
---------------------------
1. Update [`Casks/etcher.rb`][etcher-cask-file] with the new version and
`sha256`
2. Send a PR with the changes above to
[`caskroom/homebrew-cask`][homebrew-cask]
Announcing
----------
Post messages to the [Etcher forum][balena-forum-etcher] announcing the new version
of Etcher, and including the relevant section of the Changelog.
[aws-cli]: https://aws.amazon.com/cli
[cloudfront]: https://cloudfront.com
[etcher-cask-file]: https://github.com/caskroom/homebrew-cask/blob/master/Casks/balenaetcher.rb
[homebrew-cask]: https://github.com/caskroom/homebrew-cask
[balena-forum-etcher]: https://forums.balena.io/c/etcher
[github-releases]: https://github.com/balena-io/etcher/releases
Updating EFP / Success-Banner
-----------------------------
Etcher Featured Project is automatically run based on an algorithm which promoted projects from the balena marketplace which have been contributed by the community, the algorithm prioritises projects which give uses the best experience. Editing both EFP and the Etcher Success-Banner can only be done by someone from balena, instruction are on the [Etcher-EFP repo (private)](https://github.com/balena-io/etcher-efp)

43
docs/SUPPORT.md Normal file
View File

@ -0,0 +1,43 @@
Getting help with BalenaEtcher
===============================
There are various ways to get support for Etcher if you experience an issue or
have an idea you'd like to share with us.
Documentation
------
We have answers to a variety of frequently asked questions in the [user
documentation][documentation] and also in the [FAQs][faq] on the Etcher website.
Forums
------
We have a [Discourse forum][discourse] which is open to everyone, so please
come join us :). Drop us a line there and the balena.io staff and community
users will be happy to assist. Your question might already be answered, so take
a look at the existing threads before opening a new one!
Make sure to mention the following information to help us provide better
support:
- The BalenaEtcher version you're running.
- The operating system you're running Etcher in.
- Relevant logging output, if any, from DevTools, which you can open by
pressing `Ctrl+Shift+I` or `Cmd+Alt+I` depending on your platform.
GitHub
------
If you encounter an issue or have a suggestion, head on over to BalenaEtcher's [issue
tracker][issues] and if there isn't a ticket covering it, [create
one][new-issue].
[discourse]: https://forums.balena.io/c/etcher
[issues]: https://github.com/balena-io/etcher/issues
[new-issue]: https://github.com/balena-io/etcher/issues/new
[documentation]: https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md
[faq]: https://etcher.io

226
docs/USER-DOCUMENTATION.md Normal file
View File

@ -0,0 +1,226 @@
Etcher User Documentation
=========================
This document contains how-tos and FAQs oriented to Etcher users.
Config
------
Etcher's configuration is saved to the `config.json` file in the apps folder.
Not all the options are surfaced to the UI. You may edit this file to tweak settings even before launching the app.
Why is my drive not bootable?
-----------------------------
Etcher copies images to drives byte by byte, without doing any transformation
to the final device, which means images that require special treatment to be
made bootable, like Windows images, will not work out of the box. In these
cases, the general advice is to use software specific to those kind of
images, usually available from the image publishers themselves.
Images known to require special treatment:
- Microsoft Windows (use [Windows USB/DVD Download Tool][windows-usb-tool],
[Rufus][rufus], or [WoeUSB][woeusb]).
- Windows 10 IoT (use the [Windows 10 IoT Core Dashboard][windows-iot-dashboard])
How can I configure persistent storage?
---------------------------------------
Some programs, usually oriented at making GNU/Linux live USB drives, include an
option to set persistent storage. This is currently not supported by Etcher, so
if you require this functionality, we advise to fallback to
[UNetbootin][unetbootin].
Deactivate desktop shortcut prompt on GNU/Linux
-----------------------------------------------
This is a feature provided by [AppImages][appimage], where the applications
prompts the user to automatically register a desktop shortcut to easily access
the application.
To deactivate this feature, `touch` any of the files listed below:
- `$HOME/.local/share/appimagekit/no_desktopintegration`
- `/usr/share/appimagekit/no_desktopintegration`
- `/etc/appimagekit/no_desktopintegration`
Alternatively, set the `SKIP` environment variable before executing the
AppImage:
```sh
SKIP=1 ./Etcher-linux-<arch>.AppImage
```
Flashing Ubuntu ISOs
--------------------
Ubuntu images (and potentially some other related GNU/Linux distributions) have
a peculiar format that allows the image to boot without any further
modification from both CDs and USB drives.
A consequence of this enhancement is that some programs, like `parted` get
confused about the drive's format and partition table, printing warnings such
as:
> /dev/xxx contains GPT signatures, indicating that it has a GPT table.
> However, it does not have a valid fake msdos partition table, as it should.
> Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
> partition tables. Or perhaps you deleted the GPT table, and are now using an
> msdos partition table. Is this a GPT partition table? Both the primary and
> backup GPT tables are corrupt. Try making a fresh table, and using Parted's
> rescue feature to recover partitions.
***
> Warning: The driver descriptor says the physical block size is 2048 bytes,
> but Linux says it is 512 bytes.
All these warnings are **safe to ignore**, and your drive should be able to
boot without any problems.
Refer to [the following message from Ubuntu's mailing
list](https://lists.ubuntu.com/archives/ubuntu-devel/2011-June/033495.html) if
you want to learn more.
Running on Wayland
------------------
Electron is based on Gtk2, which can't run natively on Wayland. Fortunately,
the [XWayland Server][xwayland] provides backwards compatibility to run *any* X
client on Wayland, including Etcher.
This usually works out of the box on mainstream GNU/Linux distributions that
properly support Wayland. If it doesn't, make sure the `xwayland.so` module is
being loaded by declaring it in your [weston.ini]:
```
[core]
modules=xwayland.so
```
Runtime GNU/Linux dependencies
------------------------------
This entry aims to provide an up to date list of runtime dependencies needed to
run Etcher on a GNU/Linux system.
### Electron specific
> See [brightray's gyp file](https://github.com/electron/brightray/blob/master/brightray.gyp#L4)
- gtk+-2.0
- dbus-1
- x11
- xi
- xcursor
- xdamage
- xrandr
- xcomposite
- xext
- xfixes
- xrender
- xtst
- xscrnsaver
- gmodule-2.0
- nss
### Optional dependencies:
- libnotify (for notifications)
- libspeechd (for text-to-speech)
### Etcher specific:
- liblzma (for xz decompression)
Recovering broken drives
------------------------
Sometimes, things might go wrong, and you end up with a half-flashed drive that
is unusable by your operating systems, and common graphical tools might even
refuse to get it back to a normal state.
To solve these kinds of problems, we've collected a list of fail-proof methods
to completely erase your drive in major operating systems.
### Windows
In Windows, we'll use [diskpart], a command line utility tool that comes
pre-installed in all modern Windows versions.
- Open `cmd.exe` from either the list of all installed applications, or from
the "Run..." dialog usually accessible by pressing Ctrl+X.
- Type `diskpart.exe` and press "Enter". You'll be asked to provide
administrator permissions, and a new prompt window will appear. The following
commands should be run **in the new window**.
- Run `list disk` to list the available drives. Take note of the number id that
identifies the drive you want to clean.
- Run `select disk N`, where `N` corresponds to the id from the previous step.
- Run `clean`. This command will completely clean your drive by erasing any
existent filesystem.
- Run `create partition primary`. This command will create a new partition.
- Run `active`. This command will active the partition.
- Run `list partition`. This command will show available partition.
- Run `select partition N`, where `N` corresponds to the id of the newly available partition.
- Run `format override quick`. This command will format the partition. You can choose a specific formatting by adding `FS=xx` where `xx` could be `NTFS or FAT or FAT32` after `format`. Example : `format FS=NTFS override quick`
- Run `exit` to quit diskpart.
### OS X
Run the following command in `Terminal.app`, replacing `N` by the corresponding
disk number, which you can find by running `diskutil list`:
```sh
diskutil eraseDisk FAT32 UNTITLED MBRFormat /dev/diskN
```
### GNU/Linux
Make sure the drive is unmounted (`umount /dev/xxx`), and run the following
command as `root`, replacing `xxx` by your actual device path:
```sh
dd if=/dev/zero of=/dev/xxx bs=512 count=1 conv=notrunc
```
"No polkit authentication agent found" error in GNU/Linux
----------------------------------------------------------
Etcher requires an available [polkit authentication
agent](https://wiki.archlinux.org/index.php/Polkit#Authentication_agents) in
your system in order to show a secure password prompt dialog to perform
elevation. Make sure you have one installed for the desktop environment of your
choice.
Running in older macOS versions
-------------------------------
Etcher GUI is based on the [Electron][electron] framework, [which only supports
macOS 10.10 (Yosemite) and newer versions][electron-supported-platforms].
[balena.io]: https://balena.io
[appimage]: http://appimage.org
[xwayland]: https://wayland.freedesktop.org/xserver.html
[weston.ini]: http://manpages.ubuntu.com/manpages/wily/man5/weston.ini.5.html
[diskpart]: https://technet.microsoft.com/en-us/library/cc770877(v=ws.11).aspx
[electron]: https://electronjs.org/
[electron-supported-platforms]: https://electronjs.org/docs/tutorial/support#supported-platforms
[publishing]: https://github.com/balena-io/etcher/blob/master/docs/PUBLISHING.md
[windows-usb-tool]: https://www.microsoft.com/en-us/download/windows-usb-dvd-download-tool
[rufus]: https://rufus.akeo.ie
[unetbootin]: https://unetbootin.github.io
[windows-iot-dashboard]: https://developer.microsoft.com/en-us/windows/iot/downloads
[woeusb]: https://github.com/slacka/WoeUSB
See [PUBLISHING](/docs/PUBLISHING.md) for more details about release types.

24
entitlements.mac.plist Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
</dict>
</plist>

159
forge.config.ts Normal file
View File

@ -0,0 +1,159 @@
import type { ForgeConfig } from '@electron-forge/shared-types';
import { MakerSquirrel } from '@electron-forge/maker-squirrel';
import { MakerZIP } from '@electron-forge/maker-zip';
import { MakerDeb } from '@electron-forge/maker-deb';
import { MakerRpm } from '@electron-forge/maker-rpm';
import { MakerDMG } from '@electron-forge/maker-dmg';
import { MakerAppImage } from '@reforged/maker-appimage';
import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives';
import { WebpackPlugin } from '@electron-forge/plugin-webpack';
import { exec } from 'child_process';
import { mainConfig, rendererConfig } from './webpack.config';
import * as sidecar from './forge.sidecar';
import { hostDependencies, productDescription } from './package.json';
const osxSigningConfig: any = {};
let winSigningConfig: any = {};
if (process.env.NODE_ENV === 'production') {
osxSigningConfig.osxNotarize = {
tool: 'notarytool',
appleId: process.env.XCODE_APP_LOADER_EMAIL,
appleIdPassword: process.env.XCODE_APP_LOADER_PASSWORD,
teamId: process.env.XCODE_APP_LOADER_TEAM_ID,
};
winSigningConfig = {
signWithParams: `-sha1 ${process.env.SM_CODE_SIGNING_CERT_SHA1_HASH} -tr ${process.env.TIMESTAMP_SERVER} -td sha256 -fd sha256 -d balena-etcher`,
};
}
const config: ForgeConfig = {
packagerConfig: {
asar: true,
icon: './assets/icon',
executableName:
process.platform === 'linux' ? 'balena-etcher' : 'balenaEtcher',
appBundleId: 'io.balena.etcher',
appCategoryType: 'public.app-category.developer-tools',
appCopyright: 'Copyright 2016-2023 Balena Ltd',
darwinDarkModeSupport: true,
protocols: [{ name: 'etcher', schemes: ['etcher'] }],
extraResource: [
'lib/shared/sudo/sudo-askpass.osascript-zh.js',
'lib/shared/sudo/sudo-askpass.osascript-en.js',
],
osxSign: {
optionsForFile: () => ({
entitlements: './entitlements.mac.plist',
hardenedRuntime: true,
}),
},
...osxSigningConfig,
},
rebuildConfig: {
onlyModules: [], // prevent rebuilding *any* native modules as they won't be used by electron but by the sidecar
},
makers: [
new MakerZIP(),
new MakerSquirrel({
setupIcon: 'assets/icon.ico',
loadingGif: 'assets/icon.png',
...winSigningConfig,
}),
new MakerDMG({
background: './assets/dmg/background.tiff',
icon: './assets/icon.icns',
iconSize: 110,
contents: ((opts: { appPath: string }) => {
return [
{ x: 140, y: 250, type: 'file', path: opts.appPath },
{ x: 415, y: 250, type: 'link', path: '/Applications' },
];
}) as any, // type of MakerDMGConfig omits `appPath`
additionalDMGOptions: {
window: {
size: {
width: 540,
height: 425,
},
position: {
x: 400,
y: 500,
},
},
},
}),
new MakerAppImage({
options: {
icon: './assets/icon.png',
categories: ['Utility'],
},
}),
new MakerRpm({
options: {
icon: './assets/icon.png',
categories: ['Utility'],
productDescription,
requires: ['util-linux'],
},
}),
new MakerDeb({
options: {
icon: './assets/icon.png',
categories: ['Utility'],
section: 'utils',
priority: 'optional',
productDescription,
scripts: {
postinst: './after-install.tpl',
},
depends: hostDependencies['debian'],
},
}),
],
plugins: [
new AutoUnpackNativesPlugin({}),
new WebpackPlugin({
mainConfig,
renderer: {
config: rendererConfig,
nodeIntegration: true,
entryPoints: [
{
html: './lib/gui/app/index.html',
js: './lib/gui/app/renderer.ts',
name: 'main_window',
preload: {
js: './lib/gui/app/preload.ts',
},
},
],
},
}),
new sidecar.SidecarPlugin(),
],
hooks: {
postPackage: async (_forgeConfig, options) => {
if (options.platform === 'linux') {
// symlink the etcher binary from balena-etcher to balenaEtcher to ensure compatibility with the wdio suite and the old name
await new Promise<void>((resolve, reject) => {
exec(
`ln -s "${options.outputPaths}/balena-etcher" "${options.outputPaths}/balenaEtcher"`,
(err) => {
if (err) {
reject(err);
} else {
resolve();
}
},
);
});
}
},
},
};
export default config;

168
forge.sidecar.ts Normal file
View File

@ -0,0 +1,168 @@
import { PluginBase } from '@electron-forge/plugin-base';
import type {
ForgeHookMap,
ResolvedForgeConfig,
} from '@electron-forge/shared-types';
import { WebpackPlugin } from '@electron-forge/plugin-webpack';
import { DefinePlugin } from 'webpack';
import { execFileSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import * as d from 'debug';
const debug = d('sidecar');
function isStartScrpt(): boolean {
return process.env.npm_lifecycle_event === 'start';
}
function addWebpackDefine(
config: ResolvedForgeConfig,
defineName: string,
binDir: string,
binName: string,
): ResolvedForgeConfig {
config.plugins.forEach((plugin) => {
if (plugin.name !== 'webpack' || !(plugin instanceof WebpackPlugin)) {
return;
}
const { mainConfig } = plugin.config as any;
if (mainConfig.plugins == null) {
mainConfig.plugins = [];
}
const value = isStartScrpt()
? // on `npm start`, point directly to the binary
path.resolve(binDir, binName)
: // otherwise point relative to the resources folder of the bundled app
binName;
debug(`define '${defineName}'='${value}'`);
mainConfig.plugins.push(
new DefinePlugin({
// expose path to helper via this webpack define
[defineName]: JSON.stringify(value),
}),
);
});
return config;
}
function build(
sourcesDir: string,
buildForArchs: string,
binDir: string,
binName: string,
) {
const commands: Array<[string, string[], object?]> = [
['tsc', ['--project', 'tsconfig.sidecar.json', '--outDir', sourcesDir]],
];
buildForArchs.split(',').forEach((arch) => {
const binPath = isStartScrpt()
? // on `npm start`, we don't know the arch we're building for at the time we're
// adding the webpack define, so we just build under binDir
path.resolve(binDir, binName)
: // otherwise build in arch-specific directory within binDir
path.resolve(binDir, arch, binName);
// FIXME: rebuilding mountutils shouldn't be necessary, but it is.
// It's coming from etcher-sdk, a fix has been upstreamed but to use
// the latest etcher-sdk we need to upgrade axios at the same time.
commands.push(['npm', ['rebuild', 'mountutils', `--arch=${arch}`]]);
commands.push([
'pkg',
[
path.join(sourcesDir, 'util', 'api.js'),
'-c',
'pkg-sidecar.json',
// `--no-bytecode` so that we can cross-compile for arm64 on x64
'--no-bytecode',
'--public',
'--public-packages',
'"*"',
// always build for host platform and node version
// https://github.com/vercel/pkg-fetch/releases
'--target',
`node20-${arch}`,
'--output',
binPath,
],
]);
});
commands.forEach(([cmd, args, opt]) => {
debug('running command:', cmd, args.join(' '));
execFileSync(cmd, args, { shell: true, stdio: 'inherit', ...opt });
});
}
function copyArtifact(
buildPath: string,
arch: string,
binDir: string,
binName: string,
) {
const binPath = isStartScrpt()
? // on `npm start`, we don't know the arch we're building for at the time we're
// adding the webpack define, so look for the binary directly under binDir
path.resolve(binDir, binName)
: // otherwise look into arch-specific directory within binDir
path.resolve(binDir, arch, binName);
// buildPath points to appPath, which is inside resources dir which is the one we actually want
const resourcesPath = path.dirname(buildPath);
const dest = path.resolve(resourcesPath, path.basename(binPath));
debug(`copying '${binPath}' to '${dest}'`);
fs.copyFileSync(binPath, dest);
}
export class SidecarPlugin extends PluginBase<void> {
name = 'sidecar';
constructor() {
super();
this.getHooks = this.getHooks.bind(this);
debug('isStartScript:', isStartScrpt());
}
getHooks(): ForgeHookMap {
const DEFINE_NAME = 'ETCHER_UTIL_BIN_PATH';
const BASE_DIR = path.join('out', 'sidecar');
const SRC_DIR = path.join(BASE_DIR, 'src');
const BIN_DIR = path.join(BASE_DIR, 'bin');
const BIN_NAME = `etcher-util${process.platform === 'win32' ? '.exe' : ''}`;
return {
resolveForgeConfig: async (currentConfig) => {
debug('resolveForgeConfig');
return addWebpackDefine(currentConfig, DEFINE_NAME, BIN_DIR, BIN_NAME);
},
generateAssets: async (_config, platform, arch) => {
debug('generateAssets', { platform, arch });
build(SRC_DIR, arch, BIN_DIR, BIN_NAME);
},
packageAfterCopy: async (
_config,
buildPath,
electronVersion,
platform,
arch,
) => {
debug('packageAfterCopy', {
buildPath,
electronVersion,
platform,
arch,
});
copyArtifact(buildPath, arch, BIN_DIR, BIN_NAME);
},
};
}
}

View File

@ -1,53 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const gulp = require('gulp');
const jscs = require('gulp-jscs');
const jshint = require('gulp-jshint');
const jshintStylish = require('jshint-stylish');
const sass = require('gulp-sass');
const paths = {
scripts: [
'./tests/**/*.spec.js',
'./lib/**/*.js',
'gulpfile.js'
],
sass: [
'./lib/scss/**/*.scss'
]
};
gulp.task('sass', function() {
return gulp.src(paths.sass)
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./build/css'));
});
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jshint())
.pipe(jshint.reporter(jshintStylish))
.pipe(jscs())
.pipe(jscs.reporter());
});
gulp.task('watch', [ 'lint', 'sass' ], function() {
gulp.watch(paths.scripts, [ 'lint' ]);
gulp.watch(paths.sass, [ 'sass' ]);
});

View File

@ -1,246 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @module Etcher
*/
'use strict';
var angular = require('angular');
const _ = require('lodash');
const electron = require('electron');
const dialog = electron.remote.require('./src/dialog');
require('angular-ui-bootstrap');
require('angular-ui-router');
require('./browser/models/selection-state');
require('./browser/modules/drive-scanner');
require('./browser/modules/image-writer');
require('./browser/modules/path');
require('./browser/modules/notifier');
require('./browser/modules/analytics');
require('./browser/components/progress-button/progress-button');
require('./browser/components/drive-selector/drive-selector');
require('./browser/pages/finish/finish');
require('./browser/pages/settings/settings');
require('./browser/utils/window-progress/window-progress');
require('./browser/utils/open-external/open-external');
require('./browser/utils/if-state/if-state');
const app = angular.module('Etcher', [
'ui.router',
'ui.bootstrap',
// Etcher modules
'Etcher.path',
'Etcher.drive-scanner',
'Etcher.image-writer',
'Etcher.notifier',
'Etcher.analytics',
// Models
'Etcher.Models.SelectionState',
'Etcher.Models.Settings',
// Components
'Etcher.Components.ProgressButton',
'Etcher.Components.DriveSelector',
// Pages
'Etcher.Pages.Finish',
'Etcher.Pages.Settings',
// Utils
'Etcher.Utils.WindowProgress',
'Etcher.Utils.OpenExternal',
'Etcher.Utils.IfState'
]);
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/main');
$stateProvider
.state('main', {
url: '/main',
controller: 'AppController as app',
templateUrl: './partials/main.html'
});
});
app.controller('AppController', function(
$q,
$state,
$scope,
NotifierService,
DriveScannerService,
SelectionStateModel,
SettingsModel,
ImageWriterService,
AnalyticsService,
DriveSelectorService,
WindowProgressService
) {
let self = this;
this.selection = SelectionStateModel;
this.writer = ImageWriterService;
this.scanner = DriveScannerService;
this.settings = SettingsModel.data;
this.success = true;
// This catches the case where the user enters
// the settings screen when a burn finished
// and goes back to the main screen with the back button.
if (!this.writer.isBurning()) {
this.selection.clear({
// Preserve image, in case there is one, otherwise
// we revert the behaviour of "Use same image".
preserveImage: true
});
this.writer.resetState();
}
NotifierService.subscribe($scope, 'image-writer:state', function(state) {
AnalyticsService.log(`Progress (${state.type}): ${state.progress}% at ${state.speed} MB/s`);
WindowProgressService.set(state.progress);
});
this.scanner.start(2000).on('error', dialog.showError).on('scan', function(drives) {
// Notice we only autoselect the drive if there is an image,
// which means that the first step was completed successfully,
// otherwise the drive is selected while the drive step is disabled
// which looks very weird.
if (drives.length === 1 && self.selection.hasImage()) {
const drive = _.first(drives);
// Do not autoselect the same drive over and over again
// and fill the logs unnecessary.
// `angular.equals` is used instead of `_.isEqual` to
// cope with `$$hashKey`.
if (!angular.equals(self.selection.getDrive(), drive)) {
AnalyticsService.logEvent('Auto-select drive', {
device: drive.device
});
self.selectDrive(drive);
}
}
});
// We manually add `style="display: none;"` to <body>
// and unset it here instead of using ngCloak since
// the latter takes effect as soon as the Angular
// library was loaded, but doesn't always mean that
// the application is ready, causing the application
// to be shown in an unitialized state for some milliseconds.
// Here in the controller, we are sure things are
// completely up and running.
document.querySelector('body').style.display = 'initial';
this.selectImage = function() {
return $q.when(dialog.selectImage()).then(function(image) {
// Avoid analytics and selection state changes
// if no file was resolved from the dialog.
if (!image) {
return;
}
self.selection.setImage(image);
AnalyticsService.logEvent('Select image', {
image: image
});
});
};
this.selectDrive = function(drive) {
self.selection.setDrive(drive);
AnalyticsService.logEvent('Select drive', {
device: drive.device
});
};
this.openDriveSelector = function() {
DriveSelectorService.open().then(self.selectDrive);
};
this.reselectImage = function() {
if (self.writer.isBurning()) {
return;
}
// Reselecting an image automatically
// de-selects the current drive, if any.
// This is made so the user effectively
// "returns" to the first step.
self.selection.clear();
AnalyticsService.logEvent('Reselect image');
};
this.reselectDrive = function() {
if (self.writer.isBurning()) {
return;
}
self.selection.removeDrive();
AnalyticsService.logEvent('Reselect drive');
};
this.restartAfterFailure = function() {
self.selection.clear({
preserveImage: true
});
self.writer.resetState();
self.success = true;
AnalyticsService.logEvent('Restart after failure');
};
this.burn = function(image, drive) {
// Stop scanning drives when burning
// otherwise Windows throws EPERM
self.scanner.stop();
AnalyticsService.logEvent('Burn', {
image: image,
device: drive.device
});
return self.writer.burn(image, drive).then(function(success) {
// TODO: Find a better way to manage burn/check
// success/error state than a global boolean flag.
self.success = success;
if (self.success) {
AnalyticsService.logEvent('Done');
$state.go('success');
} else {
AnalyticsService.logEvent('Burn error');
}
})
.catch(dialog.showError)
.finally(WindowProgressService.clear);
};
});

View File

@ -1,68 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const _ = require('lodash');
module.exports = function($uibModalInstance, DriveSelectorStateService, DriveScannerService) {
/**
* @summary The drive selector state
* @property
* @type Object
*
* @description
* The state has been splitted from the controller for
* testability purposes.
*/
this.state = DriveSelectorStateService;
/**
* @summary The drive scanner service
* @property
* @type Object
*
* @description
* We expose the whole service instead of the `.drives`
* property, which is the one we're interested in since
* this allows the property to be automatically updated
* when `DriveScannerService` detects a change in the drives.
*/
this.scanner = DriveScannerService;
/**
* @summary Close the modal and resolve the selected drive
* @function
* @public
*
* @example
* DriveSelectorController.closeModal();
*/
this.closeModal = function() {
const selectedDrive = DriveSelectorStateService.getSelectedDrive();
// Sanity check to cover the case where a drive is selected,
// the drive is then unplugged from the computer and the modal
// is resolved with a non-existent drive.
if (!selectedDrive || !_.includes(this.scanner.drives, selectedDrive)) {
return $uibModalInstance.dismiss();
}
return $uibModalInstance.close(selectedDrive);
};
};

View File

@ -1,34 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.Components.DriveSelector
*/
const angular = require('angular');
require('angular-ui-bootstrap');
require('../../../browser/modules/drive-scanner');
const DriveSelector = angular.module('Etcher.Components.DriveSelector', [
'ui.bootstrap',
'Etcher.drive-scanner'
]);
DriveSelector.controller('DriveSelectorController', require('./controllers/drive-selector'));
DriveSelector.service('DriveSelectorStateService', require('./services/drive-selector-state'));
DriveSelector.service('DriveSelectorService', require('./services/drive-selector'));

View File

@ -1,80 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const _ = require('lodash');
module.exports = function() {
/**
* @summary Toggle select drive
* @function
* @public
*
* @param {Object} drive - drive
*
* @example
* DriveSelectorController.toggleSelectDrive({ drive });
*/
this.toggleSelectDrive = function(drive) {
if (this.isSelectedDrive(drive)) {
this.selectedDrive = null;
} else {
this.selectedDrive = drive;
}
};
/**
* @summary Check if a drive is the selected one
* @function
* @public
*
* @param {Object} drive - drive
* @returns {Boolean} whether the drive is selected
*
* @example
* if (DriveSelectorController.isSelectedDrive({ drive })) {
* console.log('The drive is selected!');
* }
*/
this.isSelectedDrive = function(drive) {
if (!_.has(drive, 'device')) {
return false;
}
return drive.device === _.get(this.selectedDrive, 'device');
};
/**
* @summary Get selected drive
* @function
* @public
*
* @returns {Object} selected drive
*
* @example
* const drive = DriveSelectorStateService.getSelectedDrive();
*/
this.getSelectedDrive = function() {
if (_.isEmpty(this.selectedDrive)) {
return;
}
return this.selectedDrive;
};
};

View File

@ -1,43 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
module.exports = function($uibModal) {
/**
* @summary Open the drive selector widget
* @function
* @public
*
* @fulfil {(Object|Undefined)} - selected drive
* @returns {Promise}
*
* @example
* DriveSelectorService.open().then(function(drive) {
* console.log(drive);
* });
*/
this.open = function() {
return $uibModal.open({
animation: true,
templateUrl: './browser/components/drive-selector/templates/drive-selector-modal.tpl.html',
controller: 'DriveSelectorController as modal',
size: 'sm'
}).result;
};
};

View File

@ -1,17 +0,0 @@
<div class="modal-header">
<h4 class="modal-title">SELECT A DRIVE</h4>
<button class="btn btn-default btn-sm" ng-click="modal.closeModal()">CLOSE</button>
</div>
<div class="modal-body">
<ul class="list-group">
<li class="list-group-item" ng-repeat="drive in modal.scanner.drives"
ng-click="modal.state.toggleSelectDrive(drive)">
<div>
<h4 class="list-group-item-heading">{{ drive.description }} - {{ drive.size }}</h4>
<p class="list-group-item-text">{{ drive.device }}</p>
</div>
<span class="tick tick--success" ng-disabled="!modal.state.isSelectedDrive(drive)"></span>
</li>
</ul>
</div>

View File

@ -1,39 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* This directive provides a button containing a progress bar inside.
* The button is styled by default as a primary button.
*
* Example:
*
* <progress-button percentage="{{ 40 }}" striped>My Progress Button</progress-button>
*/
module.exports = function() {
return {
templateUrl: './browser/components/progress-button/templates/progress-button.tpl.html',
restrict: 'E',
replace: true,
transclude: true,
scope: {
percentage: '=',
striped: '@'
}
};
};

View File

@ -1,132 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A button with a progress bar inside.
*
* From http://tympanus.net/Development/ProgressButtonStyles/
*
* The state of the progress bar is controller by the width, in percentage,
* of `.progress-button__bar`.
*
* The current percentage also needs to be reflected in the top level
* `.progress-button` element as a `percentage` attribute, without the percentage sign.
*
* If there is an action in place, the `active` attribute must be set to `true`.
* This is useful to determine if the progress bar is paused from the point of view
* of the styling.
*
* You can optionally pass the `.progress-button--striped` modified to get a striped
* progress bar.
*
* The stripe implementation idea was taken from:
*
* https://css-tricks.com/css3-progress-bars/
*
* Usage:
*
* <button class="progress-button progress-button--primary" percentage="50" active="true">
* <span class="progress-button__content">Button text</span>
* <span class="progress-button__bar" style="width: 50%;"></span>
* </button>
*/
$progress-button-stripes-width: 20px;
$progress-button-stripes-animation-duration: 1s;
.progress-button {
@extend .btn;
}
.progress-button--primary {
@extend .btn-primary;
.progress-button__bar {
background: lighten($brand-primary, 5);
}
$progress-button-stripes-background-color: desaturate($brand-primary, 5%);
$progress-button-stripes-color: desaturate(darken($brand-primary, 18%), 20%);
&.progress-button--striped .progress-button__bar:after {
background-image: -webkit-gradient(linear, 0 0, 100% 100%,
color-stop(0.25, $progress-button-stripes-color),
color-stop(0.25, $progress-button-stripes-background-color),
color-stop(0.50, $progress-button-stripes-background-color),
color-stop(0.50, $progress-button-stripes-color),
color-stop(0.75, $progress-button-stripes-color),
color-stop(0.75, $progress-button-stripes-background-color),
to($progress-button-stripes-background-color));
}
}
.progress-button[percentage="100"][active="false"] .progress-button__bar {
background-color: $brand-success;
}
.progress-button[percentage="100"][active="true"] .progress-button__bar {
background-color: $brand-warning;
}
// Prevent the button from being clickable
// when it has an active progress bar.
.progress-button[active="true"] {
pointer-events: none;
}
.progress-button__content {
position: relative;
z-index: 10;
}
.progress-button__bar {
position: absolute;
left: 0;
top: 0;
width: 0;
height: 100%;
// Subtle progress bar animation
transition: width 0.3s;
}
.progress-button--striped .progress-button__bar:after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-size: $progress-button-stripes-width $progress-button-stripes-width;
animation: progress-button-stripes $progress-button-stripes-animation-duration linear infinite;
overflow: hidden;
}
@keyframes progress-button-stripes {
0% {
background-position: 0 0;
}
100% {
background-position: $progress-button-stripes-width $progress-button-stripes-width;
}
}

View File

@ -1,7 +0,0 @@
<button class="progress-button progress-button--primary"
ng-class="{
'progress-button--striped': striped && striped != 'false'
}">
<span class="progress-button__content" ng-transclude></span>
<span class="progress-button__bar" ng-style="{ width: percentage + '%' }"></span>
</button>

View File

@ -1,169 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.Models.SelectionState
*/
const _ = require('lodash');
const angular = require('angular');
const SelectionStateModel = angular.module('Etcher.Models.SelectionState', []);
SelectionStateModel.service('SelectionStateModel', function() {
let self = this;
/**
* @summary Selection state
* @type Object
* @private
*/
let selection = {};
/**
* @summary Set a drive
* @function
* @public
*
* @param {Object} drive - drive
*
* @example
* SelectionStateModel.setDrive({
* device: '/dev/disk2'
* });
*/
this.setDrive = function(drive) {
selection.drive = drive;
};
/**
* @summary Set a image
* @function
* @public
*
* @param {String} image - image
*
* @example
* SelectionStateModel.setImage('foo.img');
*/
this.setImage = function(image) {
selection.image = image;
};
/**
* @summary Get drive
* @function
* @public
*
* @returns {Object} drive
*
* @example
* const drive = SelectionStateModel.getDrive();
*/
this.getDrive = function() {
return selection.drive;
};
/**
* @summary Get image
* @function
* @public
*
* @returns {String} image
*
* @example
* const image = SelectionStateModel.getImage();
*/
this.getImage = function() {
return selection.image;
};
/**
* @summary Check if there is a selected drive
* @function
* @public
*
* @returns {Boolean} whether there is a selected drive
*
* @example
* if (SelectionStateModel.hasDrive()) {
* console.log('There is a drive!');
* }
*/
this.hasDrive = function() {
return Boolean(self.getDrive());
};
/**
* @summary Check if there is a selected image
* @function
* @public
*
* @returns {Boolean} whether there is a selected image
*
* @example
* if (SelectionStateModel.hasImage()) {
* console.log('There is an image!');
* }
*/
this.hasImage = function() {
return Boolean(self.getImage());
};
/**
* @summary Remove drive
* @function
* @public
*
* @example
* SelectionStateModel.removeDrive();
*/
this.removeDrive = _.partial(self.setDrive, undefined);
/**
* @summary Remove image
* @function
* @public
*
* @example
* SelectionStateModel.removeImage();
*/
this.removeImage = _.partial(self.setImage, undefined);
/**
* @summary Clear selections
* @function
* @public
*
* @param {Object} options - options
* @param {Boolean} [options.preserveImage] - preserve image
*
* @example
* SelectionStateModel.clear();
*
* @example
* SelectionStateModel.clear({ preserveImage: true });
*/
this.clear = function(options) {
if (options && options.preserveImage) {
selection = _.pick(selection, 'image');
} else {
selection = {};
}
};
});

View File

@ -1,157 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.analytics
*/
const _ = require('lodash');
const angular = require('angular');
const username = require('username');
const app = require('electron').remote.app;
const packageJSON = require('../../../package.json');
// Force Mixpanel snippet to load Mixpanel locally
// instead of using a CDN for performance reasons
window.MIXPANEL_CUSTOM_LIB_URL = '../bower_components/mixpanel/mixpanel.js';
require('../../../bower_components/mixpanel/mixpanel-jslib-snippet.js');
require('../../../bower_components/angular-mixpanel/src/angular-mixpanel');
require('../models/settings');
const analytics = angular.module('Etcher.analytics', [
'analytics.mixpanel',
'Etcher.Models.Settings'
]);
analytics.config(function($mixpanelProvider) {
$mixpanelProvider.apiKey('63e5fc4563e00928da67d1226364dd4c');
$mixpanelProvider.superProperties({
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
distinct_id: username.sync(),
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
electron: app.getVersion(),
node: process.version,
arch: process.arch,
version: packageJSON.version
});
});
// TrackJS integration
// http://docs.trackjs.com/tracker/framework-integrations
analytics.run(function($window) {
$window.trackJs.configure({
userId: username.sync(),
version: packageJSON.version
});
});
analytics.config(function($provide) {
$provide.decorator('$exceptionHandler', function($delegate, $window, $injector) {
return function(exception, cause) {
const SettingsModel = $injector.get('SettingsModel');
if (SettingsModel.data.errorReporting) {
$window.trackJs.track(exception);
}
$delegate(exception, cause);
};
});
$provide.decorator('$log', function($delegate, $window, $injector) {
// Save the original $log.debug()
let debugFn = $delegate.debug;
$delegate.debug = function(message) {
message = new Date() + ' ' + message;
const SettingsModel = $injector.get('SettingsModel');
if (SettingsModel.data.errorReporting) {
$window.trackJs.console.debug(message);
}
debugFn.call(null, message);
};
return $delegate;
});
});
analytics.service('AnalyticsService', function($log, $mixpanel, SettingsModel) {
let self = this;
/**
* @summary Log a debug message
* @function
* @public
*
* @description
* This function sends the debug message to TrackJS only.
*
* @param {String} message - message
*
* @example
* AnalyticsService.log('Hello World');
*/
this.log = function(message) {
$log.debug(message);
};
/**
* @summary Log an event
* @function
* @public
*
* @description
* This function sends the debug message to TrackJS and Mixpanel.
*
* @param {String} message - message
* @param {Object} [data] - event data
*
* @example
* AnalyticsService.logEvent('Select image', {
* image: '/dev/disk2'
* });
*/
this.logEvent = function(message, data) {
if (SettingsModel.data.errorReporting) {
// Clone data before passing it to `mixpanel.track`
// since this function mutates the object adding
// some custom private Mixpanel properties.
$mixpanel.track(message, _.clone(data));
}
if (data) {
message += ` (${JSON.stringify(data)})`;
}
self.log(message);
};
});

View File

@ -1,167 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.drive-scanner
*/
const angular = require('angular');
const _ = require('lodash');
const EventEmitter = require('events').EventEmitter;
const drivelist = require('drivelist');
const driveScanner = angular.module('Etcher.drive-scanner', []);
driveScanner.service('DriveScannerService', function($q, $interval, $timeout) {
let self = this;
let interval = null;
/**
* @summary List of available drives
* @type {Object[]}
* @public
*/
this.drives = [];
/**
* @summary Check if there are available drives
* @function
* @public
*
* @returns {Boolean} whether there are available drives
*
* @example
* if (DriveScannerService.hasAvailableDrives()) {
* console.log('There are available drives!');
* }
*/
this.hasAvailableDrives = function() {
return !_.isEmpty(self.drives);
};
/**
* @summary Set the list of drives
* @function
* @private
*
* @param {Object[]} drives - drives
*
* @example
* DriveScannerService.scan().then(function(drives) {
* DriveScannerService.setDrives(drives);
* });
*/
this.setDrives = function(drives) {
// Only update if something has changed
// to avoid unnecessary DOM manipulations
// angular.equals ignores $$hashKey by default
if (!angular.equals(self.drives, drives)) {
self.drives = drives;
}
};
/**
* @summary Get available drives
* @function
* @public
*
* @fulfil {Object[]} - drives
* @returns {Promise}
*
* @example
* DriveScannerService.scan().then(function(drives) {
* console.log(drives);
* });
*/
this.scan = function() {
var deferred = $q.defer();
drivelist.list(function(error, drives) {
if (error) {
return deferred.reject(error);
}
return deferred.resolve(_.filter(drives, function(drive) {
return !drive.system;
}));
});
return deferred.promise;
};
/**
* @summary Scan drives and populate `.drives`
* @function
* @public
*
* @description
* This function returns an event emitter instance
* that emits a `scan` event everything it scans
* the drives successfully.
*
* @param {Number} ms - interval milliseconds
* @returns {EventEmitter} event emitter instance
*
* @example
* const emitter = DriveScannerService.start(2000);
*
* emitter.on('scan', function(drives) {
* console.log(drives);
* });
*/
this.start = function(ms) {
let emitter = new EventEmitter();
const fn = function() {
return self.scan().then(function(drives) {
emitter.emit('scan', drives);
self.setDrives(drives);
}).catch(function(error) {
emitter.emit('error', error);
});
};
// Make sure any pending interval is cancelled
// to avoid potential memory leaks.
self.stop();
// Call fn after in the next process tick
// to be able to capture the first run
// in unit tests.
$timeout(function() {
fn();
interval = $interval(fn, ms);
});
return emitter;
};
/**
* @summary Stop scanning drives
* @function
* @public
*
* @example
* DriveScannerService.stop();
*/
this.stop = function() {
$interval.cancel(interval);
};
});

View File

@ -1,172 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.image-writer
*/
const angular = require('angular');
const electron = require('electron');
if (window.mocha) {
var writer = electron.remote.require(require('path').join(__dirname, '..', '..', 'src', 'writer'));
} else {
var writer = electron.remote.require('./src/writer');
}
require('../models/settings');
require('./notifier');
const imageWriter = angular.module('Etcher.image-writer', [
'Etcher.Models.Settings',
'Etcher.notifier'
]);
imageWriter.service('ImageWriterService', function($q, $timeout, SettingsModel, NotifierService) {
let self = this;
let burning = false;
/**
* @summary Reset burn state
* @function
* @public
*
* @example
* ImageWriterService.resetState();
*/
this.resetState = function() {
self.state = {
progress: 0,
speed: 0
};
};
/**
* @summary Burn progress state
* @type Object
* @public
*/
this.state = {};
this.resetState();
/**
* @summary Check if currently burning
* @function
* @private
*
* @returns {Boolean} whether is burning or not
*
* @example
* if (ImageWriterService.isBurning()) {
* console.log('We\'re currently burning');
* }
*/
this.isBurning = function() {
return burning;
};
/**
* @summary Set the burning status
* @function
* @private
*
* @description
* This function is extracted for testing purposes.
*
* @param {Boolean} status - burning status
*
* @example
* ImageWriterService.setBurning(true);
*/
this.setBurning = function(status) {
burning = Boolean(status);
};
/**
* @summary Perform write operation
* @function
* @private
*
* @description
* This function is extracted for testing purposes.
*
* @param {String} image - image path
* @param {Object} drive - drive
* @param {Function} onProgress - in progress callback (state)
*
* @returns {Promise}
*
* @example
* ImageWriter.performWrite('path/to/image.img', {
* device: '/dev/disk2'
* }, function(state) {
* console.log(state.percentage);
* });
*/
this.performWrite = function(image, drive, onProgress) {
return $q.when(writer.writeImage(image, drive, SettingsModel.data, onProgress));
};
/**
* @summary Burn an image to a drive
* @function
* @public
*
* @description
* This function will update `ImageWriterService.state` with the current writing state.
*
* @param {String} image - image path
* @param {Object} drive - drive
*
* @returns {Promise}
*
* @example
* ImageWriterService.burn('foo.img', {
* device: '/dev/disk2'
* }).then(function() {
* console.log('Write completed!');
* });
*/
this.burn = function(image, drive) {
if (self.isBurning()) {
return $q.reject(new Error('There is already a burn in progress'));
}
self.setBurning(true);
return self.performWrite(image, drive, function(state) {
// Safely bring the state to the world of Angular
$timeout(function() {
self.state = {
type: state.type,
progress: Math.floor(state.percentage),
// Transform bytes to megabytes preserving only two decimal places
speed: Math.floor(state.speed / 1e+6 * 100) / 100 || 0
};
NotifierService.emit('image-writer:state', self.state);
});
}).finally(function() {
self.setBurning(false);
});
};
});

View File

@ -1,74 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.notifier
*/
const angular = require('angular');
const notifier = angular.module('Etcher.notifier', []);
/*
* Based on:
* http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/
*/
notifier.service('NotifierService', function($rootScope) {
/**
* @summary Safely subscribe to an event
* @function
* @public
*
* @description
* We say "safely" since this subscribe function will listen
* to the scope's `$destroy` event and unbind itself automatically.
*
* @param {Object} scope - angular scope
* @param {String} name - event name
* @param {Function} callback - callback
*
* @example
* NotifierService.subscribe($scope, 'my-event', function() {
* console.log('Event received!');
* });
*/
this.subscribe = function(scope, name, callback) {
const handler = $rootScope.$on(name, function(event, data) {
return callback(data);
});
scope.$on('$destroy', handler);
};
/**
* @summary Emit an event
* @function
* @public
*
* @param {String} name - event name
* @param {*} data - event data
*
* @example
* NotifierService.emit('my-event', 'Foo');
*/
this.emit = function(name, data) {
$rootScope.$emit(name, data);
};
});

View File

@ -1,42 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.path
*/
const angular = require('angular');
const path = require('path');
const pathModule = angular.module('Etcher.path', []);
pathModule.filter('basename', function() {
/**
* @summary Get the basename of a path
* @function
* @public
*
* @param {String} input - input path
* @returns {String} path basename
*
* @example
* {{ '/foo/bar/baz' | basename }}
*/
return path.basename;
});

View File

@ -1,46 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
module.exports = function($state, SelectionStateModel, ImageWriterService, AnalyticsService, SettingsModel) {
/**
* @summary Settings data
* @type Object
* @public
*/
this.settings = SettingsModel.data;
/**
* @summary Restart the burning process
* @function
* @public
*
* @param {Object} [options] - options
* @param {Boolean} [options.preserveImage=false] - preserve image
*
* @example
* FinishController.restart({ preserveImage: true });
*/
this.restart = function(options) {
SelectionStateModel.clear(options);
ImageWriterService.resetState();
AnalyticsService.logEvent('Restart', options);
$state.go('main');
};
};

View File

@ -1,53 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.Pages.Finish
*
* The finish page represents the application state where
* the the burn/validation has completed.
*
* Its purpose is to display success or failure information,
* as well as the "next steps".
*/
const angular = require('angular');
require('angular-ui-router');
require('../../modules/image-writer');
require('../../modules/analytics');
require('../../models/selection-state');
require('../../models/settings');
const FinishPage = angular.module('Etcher.Pages.Finish', [
'ui.router',
'Etcher.image-writer',
'Etcher.analytics',
'Etcher.Models.SelectionState',
'Etcher.Models.Settings'
]);
FinishPage.controller('FinishController', require('./controllers/finish'));
FinishPage.config(function($stateProvider) {
$stateProvider
.state('success', {
url: '/success',
controller: 'FinishController as finish',
templateUrl: './browser/pages/finish/templates/success.tpl.html'
});
});

View File

@ -1,32 +0,0 @@
<div class="row around-xs">
<div class="col-xs">
<div class="box text-center">
<h3><span class="tick tick--success" class="space-right-tiny"></span> Burn Complete!</h3>
<p class="soft space-vertical-medium" ng-show="finish.settings.unmountOnSuccess">Safely ejected and ready for use</p>
<div class="row center-xs space-vertical-large">
<div class="col-xs-4 space-medium">
<div class="box">
<p class="soft button-label">Would you like to burn the same image?</p>
<button class="btn btn-primary btn-brick" ng-click="finish.restart({ preserveImage: true })">
Use <b>same</b> image
</button>
</div>
</div>
<div class="col-xs separator-xs"></div>
<div class="col-xs-4 space-medium">
<div class="box">
<p class="soft button-label">Would you like to burn a new image?</p>
<button class="btn btn-primary btn-brick" ng-click="finish.restart()">
Use <b>new</b> image
</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,41 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.Pages.Settings
*/
const angular = require('angular');
require('angular-ui-router');
require('../../models/settings');
const SettingsPage = angular.module('Etcher.Pages.Settings', [
'ui.router',
'Etcher.Models.Settings'
]);
SettingsPage.controller('SettingsController', require('./controllers/settings'));
SettingsPage.config(function($stateProvider) {
$stateProvider
.state('settings', {
url: '/settings',
controller: 'SettingsController as settings',
templateUrl: './browser/pages/settings/templates/settings.tpl.html'
});
});

View File

@ -1,24 +0,0 @@
<div class="text-left">
<h1 class="space-bottom-large">Settings</h1>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.storage.errorReporting">
<span>Enable error reporting</span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.storage.unmountOnSuccess">
<span>Enable auto-unmounting on success</span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.storage.validateWriteOnSuccess">
<span>Enable write validation on success</span>
</label>
</div>
</div>

View File

@ -1,54 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @summary HideIfState directive
* @function
* @public
*
* @description
* This directive provides an attribute to hide an element
* when the current UI Router state matches the specified one.
*
* @param {Object} $state - ui router $state
* @returns {Object} directive
*
* @example
* <button hide-if-state="settings" ui-sref="main">Go Back</button>
*/
module.exports = function($state) {
return {
restrict: 'A',
scope: {
hideIfState: '@'
},
link: function(scope, element) {
scope.$watch(function() {
return $state.is(scope.hideIfState);
}, function(isState) {
if (isState) {
element.css('display', 'none');
} else {
element.css('display', 'initial');
}
});
}
};
};

View File

@ -1,54 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @summary ShowIfState directive
* @function
* @public
*
* @description
* This directive provides an attribute to show an element
* when the current UI Router state matches the specified one.
*
* @param {Object} $state - ui router $state
* @returns {Object} directive
*
* @example
* <button show-if-state="main" ui-sref="settings">Settings</button>
*/
module.exports = function($state) {
return {
restrict: 'A',
scope: {
showIfState: '@'
},
link: function(scope, element) {
scope.$watch(function() {
return $state.is(scope.showIfState);
}, function(isState) {
if (isState) {
element.css('display', 'initial');
} else {
element.css('display', 'none');
}
});
}
};
};

View File

@ -1,35 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
/**
* @module Etcher.Utils.IfState
*
* The purpose of this module is to provide an attribute
* directive to show/hide an element when the current UI Router
* state matches the one specified in the attribute.
*/
const angular = require('angular');
require('angular-ui-router');
const IfState = angular.module('Etcher.Utils.IfState', [
'ui.router'
]);
IfState.directive('showIfState', require('./directives/show-if-state'));
IfState.directive('hideIfState', require('./directives/hide-if-state'));

View File

@ -1,69 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const electron = require('electron');
const shell = electron.remote.require('shell');
const os = require('os');
const nodeOpen = require('open');
/**
* This directive provides an attribute to open an external
* resource with the default operating system action.
*
* Example:
*
* <button open-external="https://resin.io">Resin.io</button>
*/
module.exports = function() {
return {
restrict: 'A',
scope: {
openExternal: '@'
},
link: function(scope, element) {
// This directive might be added to elements
// other than buttons.
element.css('cursor', 'pointer');
element.on('click', function() {
// Electron's `shell.openExternal()` fails on GNU/Linux
// when Electron is ran with `sudo`.
// The issue was reported, and this is a workaround until
// its fixed on the Electron side.
// `node-open` is smart enough to check the `$SUDO_USER`
// environment variable and to prepend `sudo -u <user>`
// if needed.
// We keep `shell.openExternal()` for OSes other than
// Linux since we intend to fully rely on it when the
// issue is fixed, and since its closer integration with
// the operating system might lead to more accurate results
// than a third party NPM module.
//
// See https://github.com/electron/electron/issues/5039
if (os.platform() === 'linux') {
return nodeOpen(scope.openExternal);
}
shell.openExternal(scope.openExternal);
});
}
};
};

View File

@ -1,73 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const electron = require('electron');
module.exports = function() {
const self = this;
/**
* @summary A reference to the current renderer Electron window
* @property
* @protected
*
* @description
* Since electron only has one renderer view, we can assume the
* current window is the one with id == 1.
*
* We expose this property to `this` for testability purposes.
*/
this.currentWindow = electron.remote.BrowserWindow.fromId(1);
/**
* @summary Set operating system window progress
* @function
* @public
*
* @description
* Show progress inline in operating system task bar
*
* @param {Number} percentage - percentage
*
* @example
* WindowProgressService.set(85);
*/
this.set = function(percentage) {
if (percentage > 100 || percentage < 0) {
throw new Error(`Invalid window progress percentage: ${percentage}`);
}
self.currentWindow.setProgressBar(percentage / 100);
};
/**
* @summary Clear the operating system window progress bar
* @function
* @public
*
* @example
* WindowProgressService.clear();
*/
this.clear = function() {
// Passing 0 or null/undefined doesn't work.
self.currentWindow.setProgressBar(-1);
};
};

View File

@ -1,57 +0,0 @@
<link rel="import" href="../../bower_components/polymer/polymer.html">
<dom-module id="hero-icon">
<template>
<style>
:host ::content .caption {
display: block;
margin-top: 10px;
}
:host ::content .icon {
margin: 0 auto;
}
</style>
<div class="icon"></div>
<template is="dom-if" if="{{label}}">
<span class="caption">{{label}}</span>
</template>
</template>
<script>
const fs = require('fs');
const path = require('path');
Polymer({
is: 'hero-icon',
properties: {
path: {
type: String
},
label: {
type: String
},
width: {
type: String
},
height: {
type: String
}
},
ready: function() {
'use strict';
const iconElement = this.querySelector('.icon');
const imagePath = path.join(__dirname, this.path);
const contents = fs.readFileSync(imagePath, {
encoding: 'utf8'
});
iconElement.innerHTML = contents;
iconElement.style.width = this.width || '40px';
iconElement.style.height = this.height || '40px';
}
});
</script>
</dom-module>

View File

@ -1,59 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Prevent text selection */
body {
-webkit-user-select: none;
}
/* Allow window to be dragged from anywhere */
* {
-webkit-app-region: drag;
}
button,
a,
input {
-webkit-app-region: no-drag;
}
/* Prevent WebView bounce effect in OS X */
html,
body {
height: 100%;
width: 100%;
}
html {
overflow: hidden;
}
body {
overflow: auto;
-webkit-overflow-scrolling: touch;
}
/* Prevent blue outline */
input:focus,
button:focus {
outline: none !important;
}
/* Titles don't have margins on desktop apps */
h1, h2, h3, h4, h5, h6 {
margin: 0;
}

View File

@ -1,74 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const electron = require('electron');
const isElevated = require('is-elevated');
const sudoPrompt = require('sudo-prompt');
const os = require('os');
const platform = os.platform();
const packageJSON = require('../package.json');
exports.require = function(app, callback) {
isElevated(function(error, elevated) {
if (error) {
return callback(error);
}
if (elevated) {
return callback();
}
if (!elevated) {
if (platform === 'darwin') {
// Keep parent process hidden
app.dock.hide();
sudoPrompt.exec(process.argv.join(' '), {
name: packageJSON.displayName
}, function(error) {
if (error) {
return callback(error);
}
// Don't keep the original parent process alive
process.exit(0);
});
} else if (platform === 'win32') {
const elevator = require('elevator');
elevator.execute(process.argv, {}, function(error) {
if (error) {
return callback(error);
}
// Don't keep the original parent process alive
process.exit(0);
});
} else {
electron.dialog.showErrorBox(
'You don\'t have enough permissions',
'Please run this application as root or administrator'
);
process.exit(1);
}
}
});
};

View File

@ -1,72 +0,0 @@
/*
* Copyright 2016 Resin.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const electron = require('electron');
const path = require('path');
const elevate = require('./elevate');
let mainWindow = null;
electron.app.on('window-all-closed', electron.app.quit);
electron.app.on('ready', function() {
// No menu bar
electron.Menu.setApplicationMenu(null);
elevate.require(electron.app, function(error) {
if (error) {
electron.dialog.showErrorBox('Elevation Error', error.message);
return process.exit(1);
}
mainWindow = new electron.BrowserWindow({
width: 800,
height: 380,
useContentSize: true,
show: false,
resizable: false,
fullscreen: false,
titleBarStyle: 'hidden-inset',
icon: path.join(__dirname, '..', 'assets', 'icon.png')
});
// Prevent flash of white when starting the application
// https://github.com/atom/electron/issues/2172
mainWindow.webContents.on('did-finish-load', function() {
// The flash of white is still present for a very short
// while after the WebView reports it finished loading
setTimeout(function() {
mainWindow.show();
}, 100);
});
mainWindow.on('closed', function() {
mainWindow = null;
});
electron.globalShortcut.register('CmdOrCtrl+Alt+I', function() {
mainWindow.webContents.openDevTools();
});
mainWindow.loadURL(`file://${path.join(__dirname, 'index.html')}`);
});
});

238
lib/gui/app/app.ts Normal file
View File

@ -0,0 +1,238 @@
/*
* Copyright 2016 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as electron from 'electron';
import * as remote from '@electron/remote';
import type { Dictionary } from 'lodash';
import { debounce, capitalize, values } from 'lodash';
import outdent from 'outdent';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { v4 as uuidV4 } from 'uuid';
import * as packageJSON from '../../../package.json';
import type { DrivelistDrive } from '../../shared/drive-constraints';
import * as EXIT_CODES from '../../shared/exit-codes';
import * as messages from '../../shared/messages';
import * as availableDrives from './models/available-drives';
import * as flashState from './models/flash-state';
import * as settings from './models/settings';
import { Actions, observe, store } from './models/store';
import * as analytics from './modules/analytics';
import { spawnChildAndConnect } from './modules/api';
import * as exceptionReporter from './modules/exception-reporter';
import * as osDialog from './os/dialog';
import * as windowProgress from './os/window-progress';
import MainPage from './pages/main/MainPage';
import './css/main.css';
import * as i18next from 'i18next';
import type { SourceMetadata } from '../../shared/typings/source-selector';
window.addEventListener(
'unhandledrejection',
(event: PromiseRejectionEvent | any) => {
// Promise: event.reason
// Anything else: event
const error = event.reason || event;
analytics.logException(error);
event.preventDefault();
},
);
// Set application session UUID
store.dispatch({
type: Actions.SET_APPLICATION_SESSION_UUID,
data: uuidV4(),
});
// Set first flashing workflow UUID
store.dispatch({
type: Actions.SET_FLASHING_WORKFLOW_UUID,
data: uuidV4(),
});
const applicationSessionUuid = store.getState().toJS().applicationSessionUuid;
const flashingWorkflowUuid = store.getState().toJS().flashingWorkflowUuid;
console.log(outdent`
${outdent}
_____ _ _
| ___| | | |
| |__ | |_ ___| |__ ___ _ __
| __|| __/ __| '_ \\ / _ \\ '__|
| |___| || (__| | | | __/ |
\\____/ \\__\\___|_| |_|\\___|_|
Interested in joining the Etcher team?
Drop us a line at join+etcher@balena.io
Version = ${packageJSON.version}, Type = ${packageJSON.packageType}
`);
const currentVersion = packageJSON.version;
analytics.logEvent('Application start', {
packageType: packageJSON.packageType,
version: currentVersion,
});
const debouncedLog = debounce(console.log, 1000, { maxWait: 1000 });
function pluralize(word: string, quantity: number) {
return `${quantity} ${word}${quantity === 1 ? '' : 's'}`;
}
observe(() => {
if (!flashState.isFlashing()) {
return;
}
const currentFlashState = flashState.getFlashState();
windowProgress.set(currentFlashState);
let eta = '';
if (currentFlashState.eta !== undefined) {
eta = `eta in ${currentFlashState.eta.toFixed(0)}s`;
}
let active = '';
if (currentFlashState.type !== 'decompressing') {
active = pluralize('device', currentFlashState.active);
}
// NOTE: There is usually a short time period between the `isFlashing()`
// property being set, and the flashing actually starting, which
// might cause some non-sense flashing state logs including
// `undefined` values.
debouncedLog(outdent({ newline: ' ' })`
${capitalize(currentFlashState.type)}
${active},
${currentFlashState.percentage}%
at
${(currentFlashState.speed || 0).toFixed(2)}
MB/s
(total ${(currentFlashState.speed * currentFlashState.active).toFixed(2)} MB/s)
${eta}
with
${pluralize('failed device', currentFlashState.failed)}
`);
});
function setDrives(drives: Dictionary<DrivelistDrive>) {
// prevent setting drives while flashing otherwise we might lose some while we unmount them
if (!flashState.isFlashing()) {
availableDrives.setDrives(values(drives));
}
}
// Spawning the child process without privileges to get the drives list
// TODO: clean up this mess of exports
export let requestMetadata: any;
// start the api and spawn the child process
spawnChildAndConnect({
withPrivileges: false,
})
.then(({ emit, registerHandler }) => {
// start scanning
emit('scan', {});
// make the sourceMetada awaitable to be used on source selection
requestMetadata = async (params: any): Promise<SourceMetadata> => {
emit('sourceMetadata', JSON.stringify(params));
return new Promise((resolve) =>
registerHandler('sourceMetadata', (data: any) => {
resolve(JSON.parse(data));
}),
);
};
registerHandler('drives', (data: any) => {
setDrives(JSON.parse(data));
});
})
.catch((error: any) => {
throw new Error(`Failed to start the flasher process. error: ${error}`);
});
let popupExists = false;
analytics.initAnalytics();
window.addEventListener('beforeunload', async (event) => {
if (!flashState.isFlashing() || popupExists) {
analytics.logEvent('Close application', {
isFlashing: flashState.isFlashing(),
});
return;
}
// Don't close window while flashing
event.returnValue = false;
// Don't open any more popups
popupExists = true;
analytics.logEvent('Close attempt while flashing');
try {
const confirmed = await osDialog.showWarning({
confirmationLabel: i18next.t('yesExit'),
rejectionLabel: i18next.t('cancel'),
title: i18next.t('reallyExit'),
description: messages.warning.exitWhileFlashing(),
});
if (confirmed) {
analytics.logEvent('Close confirmed while flashing', {
flashInstanceUuid: flashState.getFlashUuid(),
});
// This circumvents the 'beforeunload' event unlike
// remote.app.quit() which does not.
remote.process.exit(EXIT_CODES.SUCCESS);
}
analytics.logEvent('Close rejected while flashing', {
applicationSessionUuid,
flashingWorkflowUuid,
});
popupExists = false;
} catch (error: any) {
exceptionReporter.report(error);
}
});
export async function main() {
try {
const { init: ledsInit } = require('./models/leds');
await ledsInit();
} catch (error: any) {
exceptionReporter.report(error);
}
ReactDOM.render(
React.createElement(MainPage),
document.getElementById('main'),
// callback to set the correct zoomFactor for webviews as well
async () => {
const fullscreen = await settings.get('fullscreen');
const width = fullscreen ? window.screen.width : window.outerWidth;
try {
electron.webFrame.setZoomFactor(width / settings.DEFAULT_WIDTH);
} catch (err) {
// noop
}
},
);
}

View File

@ -0,0 +1,572 @@
/*
* Copyright 2019 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
import type * as sourceDestination from 'etcher-sdk/build/source-destination/';
import * as React from 'react';
import type { ModalProps, TableColumn } from 'rendition';
import { Flex, Txt, Badge, Link } from 'rendition';
import styled from 'styled-components';
import type {
DriveStatus,
DrivelistDrive,
} from '../../../../shared/drive-constraints';
import {
getDriveImageCompatibilityStatuses,
isDriveValid,
isDriveSizeLarge,
} from '../../../../shared/drive-constraints';
import { compatibility, warning } from '../../../../shared/messages';
import prettyBytes from 'pretty-bytes';
import { getDrives, hasAvailableDrives } from '../../models/available-drives';
import { getImage, isDriveSelected } from '../../models/selection-state';
import { store } from '../../models/store';
import { logEvent, logException } from '../../modules/analytics';
import { open as openExternal } from '../../os/open-external/services/open-external';
import type { GenericTableProps } from '../../styled-components';
import { Alert, Modal, Table } from '../../styled-components';
import type { SourceMetadata } from '../../../../shared/typings/source-selector';
import { middleEllipsis } from '../../utils/middle-ellipsis';
import * as i18next from 'i18next';
interface UsbbootDrive extends sourceDestination.UsbbootDrive {
progress: number;
}
interface DriverlessDrive {
displayName: string; // added in app.ts
description: string;
link: string;
linkTitle: string;
linkMessage: string;
linkCTA: string;
}
type Drive = DrivelistDrive | DriverlessDrive | UsbbootDrive;
function isUsbbootDrive(drive: Drive): drive is UsbbootDrive {
return (drive as UsbbootDrive).progress !== undefined;
}
function isDriverlessDrive(drive: Drive): drive is DriverlessDrive {
return (drive as DriverlessDrive).link !== undefined;
}
function isDrivelistDrive(drive: Drive): drive is DrivelistDrive {
return typeof (drive as DrivelistDrive).size === 'number';
}
const DrivesTable = styled((props: GenericTableProps<Drive>) => (
<Table<Drive> {...props} />
))`
[data-display='table-head'],
[data-display='table-body'] {
> [data-display='table-row'] > [data-display='table-cell'] {
&:nth-child(2) {
width: 32%;
}
&:nth-child(3) {
width: 15%;
}
&:nth-child(4) {
width: 15%;
}
&:nth-child(5) {
width: 32%;
}
}
}
`;
function badgeShadeFromStatus(status: string) {
switch (status) {
case compatibility.containsImage():
return 16;
case compatibility.system():
case compatibility.tooSmall():
return 5;
default:
return 14;
}
}
const InitProgress = styled(
({
value,
...props
}: {
value: number;
props?: React.ProgressHTMLAttributes<Element>;
}) => {
return <progress max="100" value={value} {...props} />;
},
)`
/* Reset the default appearance */
appearance: none;
::-webkit-progress-bar {
width: 130px;
height: 4px;
background-color: #dde1f0;
border-radius: 14px;
}
::-webkit-progress-value {
background-color: #1496e1;
border-radius: 14px;
}
`;
export interface DriveSelectorProps
extends Omit<ModalProps, 'done' | 'cancel' | 'onSelect'> {
write: boolean;
multipleSelection: boolean;
showWarnings?: boolean;
cancel: (drives: DrivelistDrive[]) => void;
done: (drives: DrivelistDrive[]) => void;
titleLabel: string;
emptyListLabel: string;
emptyListIcon: JSX.Element;
selectedList?: DrivelistDrive[];
updateSelectedList?: () => DrivelistDrive[];
onSelect?: (drive: DrivelistDrive) => void;
}
interface DriveSelectorState {
drives: Drive[];
image?: SourceMetadata;
missingDriversModal: { drive?: DriverlessDrive };
selectedList: DrivelistDrive[];
showSystemDrives: boolean;
}
function isSystemDrive(drive: Drive) {
return isDrivelistDrive(drive) && drive.isSystem;
}
export class DriveSelector extends React.Component<
DriveSelectorProps,
DriveSelectorState
> {
private unsubscribe: (() => void) | undefined;
tableColumns: Array<TableColumn<Drive>>;
originalList: DrivelistDrive[];
constructor(props: DriveSelectorProps) {
super(props);
const defaultMissingDriversModalState: { drive?: DriverlessDrive } = {};
const selectedList = this.props.selectedList || [];
this.originalList = [...(this.props.selectedList || [])];
this.state = {
drives: getDrives(),
image: getImage(),
missingDriversModal: defaultMissingDriversModalState,
selectedList,
showSystemDrives: false,
};
this.tableColumns = [
{
field: 'description',
label: i18next.t('drives.name'),
render: (description: string, drive: Drive) => {
if (isDrivelistDrive(drive)) {
const isLargeDrive = isDriveSizeLarge(drive);
const hasWarnings =
this.props.showWarnings && (isLargeDrive || drive.isSystem);
return (
<Flex alignItems="center">
{hasWarnings && (
<ExclamationTriangleSvg
height="1em"
fill={drive.isSystem ? '#fca321' : '#8f9297'}
/>
)}
<Txt ml={(hasWarnings && 8) || 0}>
{middleEllipsis(description, 32)}
</Txt>
</Flex>
);
}
return <Txt>{description}</Txt>;
},
},
{
field: 'description',
key: 'size',
label: i18next.t('drives.size'),
render: (_description: string, drive: Drive) => {
if (isDrivelistDrive(drive) && drive.size !== null) {
return prettyBytes(drive.size);
}
},
},
{
field: 'description',
key: 'link',
label: i18next.t('drives.location'),
render: (_description: string, drive: Drive) => {
return (
<Txt>
{drive.displayName}
{isDriverlessDrive(drive) && (
<>
{' '}
-{' '}
<b>
<a onClick={() => this.installMissingDrivers(drive)}>
{drive.linkCTA}
</a>
</b>
</>
)}
</Txt>
);
},
},
{
field: 'description',
key: 'extra',
// We use an empty React fragment otherwise it uses the field name as label
label: <></>,
render: (_description: string, drive: Drive) => {
if (isUsbbootDrive(drive)) {
return this.renderProgress(drive.progress);
} else if (isDrivelistDrive(drive)) {
return this.renderStatuses(drive);
}
},
},
];
}
private driveShouldBeDisabled(drive: Drive, image?: SourceMetadata) {
return (
isUsbbootDrive(drive) ||
isDriverlessDrive(drive) ||
!isDriveValid(drive, image, this.props.write) ||
(this.props.write && drive.isReadOnly)
);
}
private getDisplayedDrives(drives: Drive[]): Drive[] {
return drives.filter((drive) => {
return (
isUsbbootDrive(drive) ||
isDriverlessDrive(drive) ||
isDriveSelected(drive.device) ||
this.state.showSystemDrives ||
!drive.isSystem
);
});
}
private getDisabledDrives(drives: Drive[], image?: SourceMetadata): string[] {
return drives
.filter((drive) => this.driveShouldBeDisabled(drive, image))
.map((drive) => drive.displayName);
}
private renderProgress(progress: number) {
return (
<Flex flexDirection="column">
<Txt fontSize={12}>Initializing device</Txt>
<InitProgress value={progress} />
</Flex>
);
}
private warningFromStatus(
status: string,
drive: { device: string; size: number },
) {
switch (status) {
case compatibility.containsImage():
return warning.sourceDrive();
case compatibility.largeDrive():
return warning.largeDriveSize();
case compatibility.system():
return warning.systemDrive();
case compatibility.tooSmall():
return warning.tooSmall(
{
size:
this.state.image?.recommendedDriveSize ||
this.state.image?.size ||
0,
},
drive,
);
default:
return '';
}
}
private renderStatuses(drive: DrivelistDrive) {
const statuses: DriveStatus[] = getDriveImageCompatibilityStatuses(
drive,
this.state.image,
this.props.write,
).slice(0, 2);
return (
// the column render fn expects a single Element
<>
{statuses.map((status) => {
const badgeShade = badgeShadeFromStatus(status.message);
const warningMessage = this.warningFromStatus(status.message, {
device: drive.device,
size: drive.size || 0,
});
return (
<Badge
key={status.message}
shade={badgeShade}
mr="8px"
tooltip={this.props.showWarnings ? warningMessage : ''}
>
{status.message}
</Badge>
);
})}
</>
);
}
private installMissingDrivers(drive: DriverlessDrive) {
if (drive.link) {
logEvent('Open driver link modal', {
url: drive.link,
});
this.setState({ missingDriversModal: { drive } });
}
}
componentDidMount() {
this.unsubscribe = store.subscribe(() => {
const drives = getDrives();
const image = getImage();
this.setState({
drives,
image,
selectedList:
(this.props.updateSelectedList && this.props.updateSelectedList()) ||
[],
});
});
}
componentWillUnmount() {
this.unsubscribe?.();
}
render() {
const { cancel, done, ...props } = this.props;
const { selectedList, drives, image, missingDriversModal } = this.state;
const displayedDrives = this.getDisplayedDrives(drives);
const disabledDrives = this.getDisabledDrives(drives, image);
const numberOfSystemDrives = drives.filter(isSystemDrive).length;
const numberOfDisplayedSystemDrives =
displayedDrives.filter(isSystemDrive).length;
const numberOfHiddenSystemDrives =
numberOfSystemDrives - numberOfDisplayedSystemDrives;
const hasSystemDrives = selectedList.filter(isSystemDrive).length;
const showWarnings = this.props.showWarnings && hasSystemDrives;
return (
<Modal
titleElement={
<Flex alignItems="baseline" mb={18}>
<Txt fontSize={24} align="left">
{this.props.titleLabel}
</Txt>
<Txt
fontSize={11}
ml={12}
color="#5b82a7"
style={{ fontWeight: 600 }}
>
{i18next.t('drives.find', { length: drives.length })}
</Txt>
</Flex>
}
titleDetails={<Txt fontSize={11}>{getDrives().length} found</Txt>}
cancel={() => cancel(this.originalList)}
done={() => done(selectedList)}
action={i18next.t('drives.select', { select: selectedList.length })}
primaryButtonProps={{
primary: !showWarnings,
warning: showWarnings,
disabled: !hasAvailableDrives(),
}}
{...props}
>
{!hasAvailableDrives() ? (
<Flex
flexDirection="column"
justifyContent="center"
alignItems="center"
width="100%"
>
{this.props.emptyListIcon}
<b>{this.props.emptyListLabel}</b>
</Flex>
) : (
<>
<DrivesTable
refFn={() => {
// noop
}}
checkedItems={selectedList}
checkedRowsNumber={selectedList.length}
multipleSelection={this.props.multipleSelection}
columns={this.tableColumns}
data={displayedDrives}
disabledRows={disabledDrives}
getRowClass={(row: Drive) =>
isDrivelistDrive(row) && row.isSystem ? ['system'] : []
}
rowKey="displayName"
onCheck={(rows) => {
if (rows == null) {
rows = [];
}
let newSelection = rows.filter(isDrivelistDrive);
if (this.props.multipleSelection) {
if (rows.length === 0) {
newSelection = [];
}
const deselecting = selectedList.filter(
(selected) =>
newSelection.filter(
(row) => row.device === selected.device,
).length === 0,
);
const selecting = newSelection.filter(
(row) =>
selectedList.filter(
(selected) => row.device === selected.device,
).length === 0,
);
deselecting.concat(selecting).forEach((row) => {
if (this.props.onSelect) {
this.props.onSelect(row);
}
});
this.setState({
selectedList: newSelection,
});
return;
}
if (this.props.onSelect) {
this.props.onSelect(newSelection[newSelection.length - 1]);
}
this.setState({
selectedList: newSelection.slice(newSelection.length - 1),
});
}}
onRowClick={(row: Drive) => {
if (
!isDrivelistDrive(row) ||
this.driveShouldBeDisabled(row, image)
) {
return;
}
if (this.props.onSelect) {
this.props.onSelect(row);
}
const index = selectedList.findIndex(
(d) => d.device === row.device,
);
const newList = this.props.multipleSelection
? [...selectedList]
: [];
if (index === -1) {
newList.push(row);
} else {
// Deselect if selected
newList.splice(index, 1);
}
this.setState({
selectedList: newList,
});
}}
/>
{numberOfHiddenSystemDrives > 0 && (
<Link
mt={15}
mb={15}
fontSize="14px"
onClick={() => this.setState({ showSystemDrives: true })}
>
<Flex alignItems="center">
<ChevronDownSvg height="1em" fill="currentColor" />
<Txt ml={8}>
{i18next.t('drives.showHidden', {
num: numberOfHiddenSystemDrives,
})}
</Txt>
</Flex>
</Link>
)}
</>
)}
{this.props.showWarnings && hasSystemDrives ? (
<Alert className="system-drive-alert" style={{ width: '67%' }}>
{i18next.t('drives.systemDriveDanger')}
</Alert>
) : null}
{missingDriversModal.drive !== undefined && (
<Modal
width={400}
title={missingDriversModal.drive.linkTitle}
cancel={() => this.setState({ missingDriversModal: {} })}
done={() => {
try {
if (missingDriversModal.drive !== undefined) {
openExternal(missingDriversModal.drive.link);
}
} catch (error: any) {
logException(error);
} finally {
this.setState({ missingDriversModal: {} });
}
}}
action={i18next.t('yesContinue')}
cancelButtonProps={{
children: i18next.t('cancel'),
}}
children={
missingDriversModal.drive.linkMessage ||
i18next.t('drives.openInBrowser', {
link: missingDriversModal.drive.link,
})
}
/>
)}
</Modal>
);
}
}

View File

@ -0,0 +1,83 @@
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import * as React from 'react';
import type { ModalProps } from 'rendition';
import { Badge, Flex, Txt } from 'rendition';
import { Modal, ScrollableFlex } from '../../styled-components';
import { middleEllipsis } from '../../utils/middle-ellipsis';
import prettyBytes from 'pretty-bytes';
import type { DriveWithWarnings } from '../../pages/main/Flash';
import * as i18next from 'i18next';
const DriveStatusWarningModal = ({
done,
cancel,
isSystem,
drivesWithWarnings,
}: ModalProps & {
isSystem: boolean;
drivesWithWarnings: DriveWithWarnings[];
}) => {
let warningSubtitle = i18next.t('drives.largeDriveWarning');
let warningCta = i18next.t('drives.largeDriveWarningMsg');
if (isSystem) {
warningSubtitle = i18next.t('drives.systemDriveWarning');
warningCta = i18next.t('drives.systemDriveWarningMsg');
}
return (
<Modal
footerShadow={false}
reverseFooterButtons={true}
done={done}
cancel={cancel}
cancelButtonProps={{
primary: false,
warning: true,
children: i18next.t('drives.changeTarget'),
}}
action={i18next.t('sure')}
primaryButtonProps={{
primary: false,
outline: true,
}}
>
<Flex
flexDirection="column"
alignItems="center"
justifyContent="center"
width="100%"
>
<Flex flexDirection="column">
<ExclamationTriangleSvg height="2em" fill="#fca321" />
<Txt fontSize="24px" color="#fca321">
{i18next.t('warning')}
</Txt>
</Flex>
<Txt fontSize="24px">{warningSubtitle}</Txt>
<ScrollableFlex
flexDirection="column"
backgroundColor="#fff5e6"
m="2em 0"
p="1em 2em"
width="420px"
maxHeight="100px"
>
{drivesWithWarnings.map((drive, i, array) => (
<>
<Flex justifyContent="space-between" alignItems="baseline">
<strong>{middleEllipsis(drive.description, 28)}</strong>{' '}
{drive.size && prettyBytes(drive.size) + ' '}
<Badge shade={5}>{drive.statuses[0].message}</Badge>
</Flex>
{i !== array.length - 1 ? <hr style={{ width: '100%' }} /> : null}
</>
))}
</ScrollableFlex>
<Txt style={{ fontWeight: 600 }}>{warningCta}</Txt>
</Flex>
</Modal>
);
};
export default DriveStatusWarningModal;

View File

@ -0,0 +1,125 @@
/*
* Copyright 2019 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { Flex } from 'rendition';
import { v4 as uuidV4 } from 'uuid';
import * as flashState from '../../models/flash-state';
import * as selectionState from '../../models/selection-state';
import * as settings from '../../models/settings';
import { Actions, store } from '../../models/store';
import * as analytics from '../../modules/analytics';
import { FlashAnother } from '../flash-another/flash-another';
import type { FlashError } from '../flash-results/flash-results';
import { FlashResults } from '../flash-results/flash-results';
import { SafeWebview } from '../safe-webview/safe-webview';
function restart(goToMain: () => void) {
selectionState.deselectAllDrives();
analytics.logEvent('Restart');
// Reset the flashing workflow uuid
store.dispatch({
type: Actions.SET_FLASHING_WORKFLOW_UUID,
data: uuidV4(),
});
goToMain();
}
async function getSuccessBannerURL() {
return (
(await settings.get('successBannerURL')) ??
'https://efp.balena.io/success-banner?borderTop=false&darkBackground=true'
);
}
function FinishPage({ goToMain }: { goToMain: () => void }) {
const [webviewShowing, setWebviewShowing] = React.useState(false);
const [successBannerURL, setSuccessBannerURL] = React.useState('');
(async () => {
setSuccessBannerURL(await getSuccessBannerURL());
})();
const flashResults = flashState.getFlashResults();
const errors: FlashError[] = (
store.getState().toJS().failedDeviceErrors || []
).map(([, error]: [string, FlashError]) => ({
...error,
}));
const { averageSpeed, blockmappedSize, bytesWritten, failed, size } =
flashState.getFlashState();
const {
skip,
results = {
bytesWritten,
sourceMetadata: {
size,
blockmappedSize,
},
averageFlashingSpeed: averageSpeed,
devices: { failed, successful: 0 },
},
} = flashResults;
return (
<Flex height="100%" justifyContent="space-between">
<Flex
width={webviewShowing ? '36.2vw' : '100vw'}
height="100vh"
alignItems="center"
justifyContent="center"
flexDirection="column"
style={{
position: 'absolute',
top: 0,
zIndex: 1,
boxShadow: '0 2px 15px 0 rgba(0, 0, 0, 0.2)',
}}
>
<FlashResults
image={selectionState.getImage()?.name}
results={results}
skip={skip}
errors={errors}
mb="32px"
goToMain={goToMain}
/>
<FlashAnother
onClick={() => {
restart(goToMain);
}}
/>
</Flex>
{successBannerURL.length && (
<SafeWebview
src={successBannerURL}
onWebviewShow={setWebviewShowing}
style={{
display: webviewShowing ? 'flex' : 'none',
position: 'absolute',
right: 0,
bottom: 0,
width: '63.8vw',
height: '100vh',
}}
/>
)}
</Flex>
);
}
export default FinishPage;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 Resin.io
* Copyright 2019 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,15 +14,19 @@
* limitations under the License.
*/
'use strict';
import * as React from 'react';
module.exports = function(SettingsModel) {
import { BaseButton } from '../../styled-components';
import * as i18next from 'i18next';
/**
* @summary Settings data
* @type Object
* @public
*/
this.storage = SettingsModel.data;
export interface FlashAnotherProps {
onClick: () => void;
}
export const FlashAnother = (props: FlashAnotherProps) => {
return (
<BaseButton primary onClick={props.onClick}>
{i18next.t('flash.another')}
</BaseButton>
);
};

View File

@ -0,0 +1,244 @@
/*
* Copyright 2019 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import CircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle.svg';
import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-check.svg';
import TimesCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-xmark.svg';
import * as React from 'react';
import type { FlexProps, TableColumn } from 'rendition';
import { Flex, Link, Txt } from 'rendition';
import styled from 'styled-components';
import { progress } from '../../../../shared/messages';
import { bytesToMegabytes } from '../../../../shared/units';
import FlashSvg from '../../../assets/flash.svg';
import { getDrives } from '../../models/available-drives';
import { resetState } from '../../models/flash-state';
import * as selection from '../../models/selection-state';
import { middleEllipsis } from '../../utils/middle-ellipsis';
import { Modal, Table } from '../../styled-components';
import * as i18next from 'i18next';
const ErrorsTable = styled((props) => <Table<FlashError> {...props} />)`
&&& [data-display='table-head'],
&&& [data-display='table-body'] {
> [data-display='table-row'] {
> [data-display='table-cell'] {
&:first-child {
width: 30%;
}
&:nth-child(2) {
width: 20%;
}
&:last-child {
width: 50%;
}
}
}
}
`;
const DoneIcon = (props: {
skipped: boolean;
color: string;
allFailed: boolean;
}) => {
const svgProps = {
width: '28px',
fill: props.color,
style: {
marginTop: '-25px',
marginLeft: '13px',
zIndex: 1,
},
};
return props.allFailed && !props.skipped ? (
<TimesCircleSvg {...svgProps} />
) : (
<CheckCircleSvg {...svgProps} />
);
};
export interface FlashError extends Error {
description: string;
device: string;
code: string;
}
function formattedErrors(errors: FlashError[]) {
return errors
.map((error) => `${error.device}: ${error.message || error.code}`)
.join('\n');
}
const columns: Array<TableColumn<FlashError>> = [
{
field: 'description',
label: i18next.t('flash.target'),
},
{
field: 'device',
label: i18next.t('flash.location'),
},
{
field: 'message',
label: i18next.t('flash.error'),
render: (message: string, { code }: FlashError) => {
return message ?? code;
},
},
];
function getEffectiveSpeed(results: {
sourceMetadata: {
size: number;
blockmappedSize?: number;
};
averageFlashingSpeed: number;
}) {
const flashedSize =
results.sourceMetadata.blockmappedSize ?? results.sourceMetadata.size;
const timeSpent = flashedSize / results.averageFlashingSpeed;
return results.sourceMetadata.size / timeSpent;
}
export function FlashResults({
goToMain,
image = '',
errors,
results,
skip,
...props
}: {
goToMain: () => void;
image?: string;
errors: FlashError[];
skip: boolean;
results: {
sourceMetadata: {
size: number;
blockmappedSize?: number;
};
averageFlashingSpeed: number;
devices: { failed: number; successful: number };
};
} & FlexProps) {
const [showErrorsInfo, setShowErrorsInfo] = React.useState(false);
const allFailed = !skip && results?.devices?.successful === 0;
const someFailed = results?.devices?.failed !== 0 || errors?.length !== 0;
const effectiveSpeed = bytesToMegabytes(getEffectiveSpeed(results)).toFixed(
1,
);
return (
<Flex flexDirection="column" {...props}>
<Flex alignItems="center" flexDirection="column">
<Flex
alignItems="center"
mt="50px"
mb="32px"
color="#7e8085"
flexDirection="column"
>
<FlashSvg width="40px" height="40px" className="disabled" />
<DoneIcon
skipped={skip}
allFailed={allFailed}
color={allFailed || someFailed ? '#c6c8c9' : '#1ac135'}
/>
<Txt>{middleEllipsis(image, 24)}</Txt>
</Flex>
<Txt fontSize={24} color="#fff" mb="17px">
{allFailed
? i18next.t('flash.flashFailed')
: i18next.t('flash.flashCompleted')}
</Txt>
{skip ? <Txt color="#7e8085">{i18next.t('flash.skip')}</Txt> : null}
</Flex>
<Flex flexDirection="column" color="#7e8085">
{results.devices.successful !== 0 ? (
<Flex alignItems="center">
<CircleSvg width="14px" fill="#1ac135" />
<Txt ml="10px" color="#fff">
{results.devices.successful}
</Txt>
<Txt ml="10px">
{progress.successful(results.devices.successful)}
</Txt>
</Flex>
) : null}
{errors.length !== 0 ? (
<Flex alignItems="center">
<CircleSvg width="14px" fill="#ff4444" />
<Txt ml="10px" color="#fff">
{errors.length}
</Txt>
<Txt ml="10px" tooltip={formattedErrors(errors)}>
{progress.failed(errors.length)}
</Txt>
<Link ml="10px" onClick={() => setShowErrorsInfo(true)}>
{i18next.t('flash.moreInfo')}
</Link>
</Flex>
) : null}
{!allFailed && (
<Txt
fontSize="10px"
style={{
fontWeight: 500,
textAlign: 'center',
}}
tooltip={i18next.t('flash.speedTip')}
>
{i18next.t('flash.speed', { speed: effectiveSpeed })}
</Txt>
)}
</Flex>
{showErrorsInfo && (
<Modal
titleElement={
<Flex alignItems="baseline" mb={18}>
<Txt fontSize={24} align="left">
{i18next.t('failedTarget')}
</Txt>
</Flex>
}
action={i18next.t('failedRetry')}
cancel={() => setShowErrorsInfo(false)}
done={() => {
setShowErrorsInfo(false);
resetState();
getDrives()
.map((drive) => {
selection.deselectDrive(drive.device);
return drive.device;
})
.filter((driveDevice) =>
errors.some((error) => error.device === driveDevice),
)
.forEach((driveDevice) => selection.selectDrive(driveDevice));
goToMain();
}}
>
<ErrorsTable columns={columns} data={errors} />
</Modal>
)}
</Flex>
);
}

View File

@ -0,0 +1,136 @@
/*
* Copyright 2016 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { Flex, Button, ProgressBar, Txt } from 'rendition';
import { default as styled } from 'styled-components';
import { fromFlashState } from '../../modules/progress-status';
import { StepButton } from '../../styled-components';
import * as i18next from 'i18next';
const FlashProgressBar = styled(ProgressBar)`
> div {
width: 100%;
height: 12px;
color: white !important;
text-shadow: none !important;
transition-duration: 0s;
> div {
transition-duration: 0s;
}
}
width: 100%;
height: 12px;
margin-bottom: 6px;
border-radius: 14px;
font-size: 16px;
line-height: 48px;
background: #2f3033;
`;
interface ProgressButtonProps {
type: 'decompressing' | 'flashing' | 'verifying';
active: boolean;
percentage: number;
position: number;
disabled: boolean;
cancel: (type: string) => void;
callback: () => void;
warning?: boolean;
}
const colors = {
decompressing: '#00aeef',
flashing: '#da60ff',
verifying: '#1ac135',
} as const;
const CancelButton = styled(({ type, onClick, ...props }) => {
const status = type === 'verifying' ? i18next.t('skip') : i18next.t('cancel');
return (
<Button plain onClick={() => onClick(status)} {...props}>
{status}
</Button>
);
})`
font-weight: 600;
&&& {
width: auto;
height: auto;
font-size: 14px;
}
`;
export class ProgressButton extends React.PureComponent<ProgressButtonProps> {
public render() {
const percentage = this.props.percentage;
const warning = this.props.warning;
const { status, position } = fromFlashState({
type: this.props.type,
percentage,
position: this.props.position,
});
const type = this.props.type || 'default';
if (this.props.active) {
return (
<>
<Flex
alignItems="baseline"
justifyContent="space-between"
width="100%"
style={{
marginTop: 42,
marginBottom: '6px',
fontSize: 16,
fontWeight: 600,
}}
>
<Flex>
<Txt color="#fff">{status}&nbsp;</Txt>
<Txt color={colors[type]}>{position}</Txt>
</Flex>
{type && (
<CancelButton
type={type}
onClick={this.props.cancel}
color="#00aeef"
/>
)}
</Flex>
<FlashProgressBar background={colors[type]} value={percentage} />
</>
);
}
return (
<StepButton
primary={!warning}
warning={warning}
onClick={this.props.callback}
disabled={this.props.disabled}
style={{
marginTop: 30,
}}
>
{i18next.t('flash.flashNow')}
</StepButton>
);
}
}

View File

@ -0,0 +1,74 @@
/*
* Copyright 2016 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as React from 'react';
import { Flex, Txt } from 'rendition';
import DriveSvg from '../../../assets/drive.svg';
import ImageSvg from '../../../assets/image.svg';
import { SVGIcon } from '../svg-icon/svg-icon';
import { middleEllipsis } from '../../utils/middle-ellipsis';
interface ReducedFlashingInfosProps {
imageLogo?: string;
imageName?: string;
imageSize: string;
driveTitle: string;
driveLabel: string;
style?: React.CSSProperties;
}
export class ReducedFlashingInfos extends React.Component<ReducedFlashingInfosProps> {
constructor(props: ReducedFlashingInfosProps) {
super(props);
this.state = {};
}
public render() {
const { imageName = '' } = this.props;
return (
<Flex
flexDirection="column"
style={this.props.style ? this.props.style : undefined}
>
<Flex mb={16}>
<SVGIcon
disabled
width="21px"
height="21px"
contents={this.props.imageLogo}
fallback={ImageSvg}
style={{ marginRight: '9px' }}
/>
<Txt
style={{ marginRight: '9px' }}
tooltip={{ text: imageName, placement: 'right' }}
>
{middleEllipsis(imageName, 16)}
</Txt>
<Txt color="#7e8085">{this.props.imageSize}</Txt>
</Flex>
<Flex>
<DriveSvg width="21px" height="21px" style={{ marginRight: '9px' }} />
<Txt tooltip={{ text: this.props.driveLabel, placement: 'right' }}>
{middleEllipsis(this.props.driveTitle, 16)}
</Txt>
</Flex>
</Flex>
);
}
}

View File

@ -0,0 +1,211 @@
/*
* Copyright 2017 balena.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as electron from 'electron';
import * as remote from '@electron/remote';
import * as _ from 'lodash';
import * as React from 'react';
import * as packageJSON from '../../../../../package.json';
import * as settings from '../../models/settings';
import * as analytics from '../../modules/analytics';
/**
* @summary Electron session identifier
*/
const ELECTRON_SESSION = 'persist:success-banner';
/**
* @summary Etcher version search-parameter key
*/
const ETCHER_VERSION_PARAM = 'etcher-version';
/**
* @summary API version search-parameter key
*/
const API_VERSION_PARAM = 'api-version';
/**
* @summary Opt-out analytics search-parameter key
*/
const OPT_OUT_ANALYTICS_PARAM = 'optOutAnalytics';
/**
* @summary Webview API version
*
* @description
* Changing this number represents a departure from an older API and as such
* should only be changed when truly necessary as it introduces breaking changes.
* This version number is exposed to the banner such that it can determine what
* features are safe to utilize.
*
* See `git blame -L n` where n is the line below for the history of version changes.
*/
const API_VERSION = '2';
interface SafeWebviewProps {
// The website source URL
src: string;
// Webview lifecycle event
onWebviewShow?: (isWebviewShowing: boolean) => void;
style?: React.CSSProperties;
}
interface SafeWebviewState {
shouldShow: boolean;
}
/**
* @summary Webviews that hide/show depending on the HTTP status returned
*/
export class SafeWebview extends React.PureComponent<
SafeWebviewProps,
SafeWebviewState
> {
private entryHref: string;
private session: electron.Session;
private webviewRef: React.RefObject<electron.WebviewTag>;
constructor(props: SafeWebviewProps) {
super(props);
this.webviewRef = React.createRef();
this.state = {
shouldShow: true,
};
const url = new window.URL(this.props.src);
// We set the version GET parameters here.
url.searchParams.set(ETCHER_VERSION_PARAM, packageJSON.version);
url.searchParams.set(API_VERSION_PARAM, API_VERSION);
url.searchParams.set(
OPT_OUT_ANALYTICS_PARAM,
(!settings.getSync('errorReporting')).toString(),
);
this.entryHref = url.href;
// Events steal 'this'
this.handleDomReady = _.bind(this.handleDomReady, this);
this.didFailLoad = _.bind(this.didFailLoad, this);
this.didGetResponseDetails = _.bind(this.didGetResponseDetails, this);
// Make a persistent electron session for the webview
this.session = remote.session.fromPartition(ELECTRON_SESSION, {
// Disable the cache for the session such that new content shows up when refreshing
cache: false,
});
}
private static logWebViewMessage(event: electron.ConsoleMessageEvent) {
console.log('Message from SafeWebview:', event.message);
}
public render() {
const {
style = {
flex: this.state.shouldShow ? undefined : '0 1',
width: this.state.shouldShow ? undefined : '0',
height: this.state.shouldShow ? undefined : '0',
},
} = this.props;
return (
<webview
ref={this.webviewRef}
partition={ELECTRON_SESSION}
style={style}
// @ts-ignore
allowpopups="true"
/>
);
}
// Add the Webview events
public componentDidMount() {
// Events React is unaware of have to be handled manually
if (this.webviewRef.current !== null) {
this.webviewRef.current.addEventListener(
'did-fail-load',
this.didFailLoad,
);
this.webviewRef.current.addEventListener(
'dom-ready',
this.handleDomReady,
);
this.webviewRef.current.addEventListener(
'console-message',
SafeWebview.logWebViewMessage,
);
this.session.webRequest.onCompleted(this.didGetResponseDetails);
// It's important that this comes after the partition setting, otherwise it will
// use another session and we can't change it without destroying the element again
this.webviewRef.current.src = this.entryHref;
}
}
// Remove the Webview events
public componentWillUnmount() {
// Events that React is unaware of have to be handled manually
if (this.webviewRef.current !== null) {
this.webviewRef.current.removeEventListener(
'did-fail-load',
this.didFailLoad,
);
this.webviewRef.current.removeEventListener(
'dom-ready',
this.handleDomReady,
);
this.webviewRef.current.removeEventListener(
'console-message',
SafeWebview.logWebViewMessage,
);
}
this.session.webRequest.onCompleted(null);
}
handleDomReady() {
const webview = this.webviewRef.current;
if (webview == null) {
return;
}
const id = webview.getWebContentsId();
electron.ipcRenderer.send('webview-dom-ready', id);
}
// Set the element state to hidden
public didFailLoad() {
this.setState({
shouldShow: false,
});
if (this.props.onWebviewShow) {
this.props.onWebviewShow(false);
}
}
// Set the element state depending on the HTTP response code
public didGetResponseDetails(event: electron.OnCompletedListenerDetails) {
// This seems to pick up all requests related to the webview,
// only care about this event if it's a request for the main frame
if (event.resourceType === 'mainFrame') {
const HTTP_OK = 200;
const { webContents, ...webviewEvent } = event;
analytics.logEvent('SafeWebview loaded', {
...webviewEvent,
});
this.setState({
shouldShow: event.statusCode === HTTP_OK,
});
if (this.props.onWebviewShow) {
this.props.onWebviewShow(event.statusCode === HTTP_OK);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More