Commit graph

18 commits

Author SHA1 Message Date
Scott Nonnenberg e6c7ebcaf9
Update builder (Windows taskbar), tweak config (GNOME taskbar) (#1473)
* Update electron-builder and config, grunt-exec, and spellchecker

electron-builder is a major update: ^18.8.1 -> ^19.27.3

Fixes #1463, where we lose the user's decision to pin to taskbar

The other three are all minor changes, but it's generally good to stay
up to date.

FREEBIE

* Add category for our Linux build target

Fixes #1460, though the recommended list of categories doesn't seem to
match what is shown in Linux Mint. Hopefully it understands that
what was previously 'Networking' should now be 'Internet'

Standard list:
  https://standards.freedesktop.org/menu-spec/latest/apa.html

FREEBIE

* Add StartupWMClass to .desktop file so GNOME can find running app

Fixes #1432

FREEBIE
2017-09-14 17:04:03 -07:00
Lilia 50c470e53d
Certificate pinning via node XMLHttpRequest implementation (#1394)
* Add certificate pinning on https service requests

Make https requests to the server using node apis instead of browser apis, so we
can specify our own CA list, which contains only our own CA.

This protects us from MITM by a rogue CA.

As a bonus, this let's us drop the use of non-standard ports and just use good
ol' default 443 all the time, at least for http requests.

// FREEBIE

* Make certificateAuthorities an option on requests

Modify node-based xhr implementation based on driverdan/node-XMLHttpRequest,
adding support for setting certificate authorities on each request.

This allows us to pin our master CA for requests to the server and cdn but not
to the s3 attachment server, for instance. Also fix an exception when sending
binary data in a request: it is submitted as an array buffer, and must be
converted to a node Buffer since we are now using a node based request api.

// FREEBIE

* Import node-based xhr implementation

Add a copy of https://github.com/driverdan/node-XMLHttpRequest@86ff70e, and
expose it to the renderer in the preload script.

In later commits this module will be extended to support custom certificate
authorities.

// FREEBIE

* Support "arraybuffer" responseType on requests

When fetching attachments, we want the result as binary data rather than a utf8
string. This lets our node-based XMLHttpRequest honor the responseType property
if it is set on the xhr.

Note that naively using the raw `.buffer` from a node Buffer won't work, since
it is a reuseable backing buffer that is often much larger than the actual
content defined by the Buffer's offset and length.

Instead, we'll prepare a return buffer based on the response's content length
header, and incrementally write chunks of data into it as they arrive.

// FREEBIE

* Switch to self-signed server endpoint

* Log more error info on failed requests

With the node-based xhr, relevant error info are stored in statusText and
responseText when a request fails.

// FREEBIE

* Add node-based websocket w/ support for custom CA

// FREEBIE

* Support handling array buffers instead of blobs

Our node-based websocket calls onmessage with an arraybuffer instead of a blob.
For robustness (on the off chance we switch or update the socket implementation
agian) I've kept the machinery for converting blobs to array buffers.

// FREEBIE

* Destroy all wacky server ports

// FREEBIE
2017-09-14 17:03:17 -07:00
Scott Nonnenberg 270f626cd7
Add lodash for server-side utility functions
FREEBIE
2017-09-14 17:03:17 -07:00
Scott Nonnenberg 122719688a
Add os-locale to reliably get xx-XX style locale on all OSes
FREEBIE
2017-09-14 17:03:17 -07:00
Scott Nonnenberg 51768a16c4
Add semver and spellchecker directly, remove electron-provider
FREEBIE
2017-09-14 17:03:17 -07:00
David Balatero 9a7f4ae41c
Show dialog box when there's an update for download 2017-09-14 16:53:50 -07:00
Scott Nonnenberg ebc373185a
Introduce new dependency for user settings: electron-config
FREEBIE
2017-09-14 16:53:48 -07:00
lilia d63c603c21
Add spectron 2017-09-14 16:53:45 -07:00
lilia 81d8b78d05
Switch to grunt-sass + node-sass-import-once
These modules together allow us to import css files from third party
components without maintaining symlinks that essentially rename them as
sass partials, which doesn't work on windows.

// FREEBIE
2017-09-14 16:53:44 -07:00
lilia 7ef901d628
yarn remove icon-gen 2017-09-14 16:53:41 -07:00
lilia 7d47b53dc3
Generate icons with electron-icon-maker
Either icon-gen or local scaling of images was producing a corrupted and
glitchy .icns file. With this module, we need only provide a 1024px
image and it handles the scaling and generation of all other icon
assets.

// FREEBIE
2017-09-14 16:53:40 -07:00
lilia c9537ff9a9
Add asar for inspeting asar contents 2017-09-14 16:53:40 -07:00
lilia 429cc46cf9
yarn add --dev electron-publisher-s3
// FREEBIE
2017-09-14 16:53:40 -07:00
lilia 9f873e21a2
yarn upgrade electron-builder 2017-09-14 16:53:40 -07:00
lilia 8732127b1d
yarn upgrade icon-gen 2017-09-14 16:53:40 -07:00
lilia a885123ab3
Upgrade dev dependencies
Including multiple major version upgrades.

// FREEBIE
2017-09-14 16:53:40 -07:00
lilia 404c8baffc
yarn upgrade
// FREEBIE
2017-09-14 16:53:40 -07:00
lilia 90ad83a91d
Add yarn.lock
Remove grunt-preen due to its dependency on module incompatible with
current node.

// FREEBIE
2017-09-14 16:53:40 -07:00