3433 Commits

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