2106 Commits

Author SHA1 Message Date
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 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
v1.3.0
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