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
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>
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>
* 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>
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>
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>
`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>
- 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>
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
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>
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>
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>
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.
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>
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>
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>
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>
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>
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
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>
`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>
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