Skip to content

Commit

Permalink
cleanup, enhane logging, improve auto-login stability
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Jul 26, 2018
1 parent f11fc98 commit 210a13f
Show file tree
Hide file tree
Showing 92 changed files with 1,923 additions and 1,643 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ max_line_length=140
[*.json]
indent_size = 2

[*.yml]
indent_size = 2

[*.md]
max_line_length = off
trim_trailing_whitespace = false
78 changes: 39 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,60 @@

branches:
only:
- master
- master
language: node_js
node_js: 8
addons:
firefox: latest
matrix:
include:
- os: osx
osx_image: xcode9.0
- os: linux
sudo: required
dist: trusty
group: stable
addons:
apt:
packages:
- gnome-keyring
- libgnome-keyring-dev
- libsecret-1-dev
- python-gnomekeyring
services:
- docker
- os: osx
osx_image: xcode9.0
- os: linux
sudo: required
dist: trusty
group: stable
addons:
apt:
packages:
- gnome-keyring
- libgnome-keyring-dev
- libsecret-1-dev
- python-gnomekeyring
services:
- docker
env:
global:
- CI=true
- NO_AT_BRIDGE=1
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- FAILURE_ARCHIVE_FILE=travis-build-id-$TRAVIS_BUILD_ID.tar.gz
- MOZ_HEADLESS=1
- CI=true
- NO_AT_BRIDGE=1
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- FAILURE_ARCHIVE_FILE=travis-build-id-$TRAVIS_BUILD_ID.tar.gz
- MOZ_HEADLESS=1
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.cache/snapcraft
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.cache/snapcraft
install:
- pip install --user awscli ; export PATH=$PATH:$HOME/.local/bin
- yarn install
- pip install --user awscli ; export PATH=$PATH:$HOME/.local/bin
- yarn install
before_script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3;
eval $(dbus-launch --sh-syntax);
eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login);
eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start);
/usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');";
fi
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3;
eval $(dbus-launch --sh-syntax);
eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login);
eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start);
/usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');";
fi
script: ./scripts/travis.sh
after_failure:
- $(git ls-files -o | grep -Fv -e node_modules -e app -e dist >> failure-files.list)
- tar cvzf $FAILURE_ARCHIVE_FILE $(cat failure-files.list)
- aws --endpoint=$AWS_ENDPOINT_URL s3 cp $FAILURE_ARCHIVE_FILE s3://$AWS_BUCKET
- $(git ls-files -o | grep -Fv -e node_modules -e app -e dist >> failure-files.list)
- tar cvzf $FAILURE_ARCHIVE_FILE $(cat failure-files.list)
- aws --endpoint=$AWS_ENDPOINT_URL s3 cp $FAILURE_ARCHIVE_FILE s3://$AWS_BUCKET
notifications:
email:
on_success: never
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ is built with Electron unofficial desktop app for [ProtonMail](https://protonmai

- Regardless of the platform you are working on, you will need to have Node.JS v8 installed. Version 8 is required to match the Node.JS version Electron comes with. If you already have Node.JS installed, but not the version 8, then you might want to use [Node Version Manager](https://github.com/creationix/nvm) to be able to switch between multiple Node.JS versions:
- Install [NVM](https://github.com/creationix/nvm).
- Run `nvm instal 8`.
- Run `nvm install 8`.
- Run `nvm use 8`.
- [keytar](https://github.com/atom/node-keytar) module requires compiling prebuild node files and for that Python and C++ compiler need to be installed on your system:
- **`On Windows`**: the simplest way to install all the needed stuff on Windows is to run `npm install --global --production windows-build-tools` CLI command.
Expand Down
32 changes: 16 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

branches:
only:
- master
- master
skip_tags: true
os: unstable
#environment:
# matrix:
# - nodejs_version: 8
platform:
- x64
- x64
cache:
- "%LOCALAPPDATA%/Yarn"
- "%USERPROFILE%/.electron"
- "%USERPROFILE%/.electron-builder"
- "%LOCALAPPDATA%/Yarn"
- "%USERPROFILE%/.electron"
- "%USERPROFILE%/.electron-builder"
test: off
install:
# - ps: Install-Product node $env:nodejs_version $env:platform
- ps: Install-Product node 8 $env:platform
- SET CI=true
- npm install --global yarn
- set PATH=%PATH%;C:\.yarn\bin
- node --version
- npm --version
- yarn --version
- yarn install --mutex file
# - ps: Install-Product node $env:nodejs_version $env:platform
- ps: Install-Product node 8 $env:platform
- SET CI=true
- npm install --global yarn
- set PATH=%PATH%;C:\.yarn\bin
- node --version
- npm --version
- yarn --version
- yarn install --mutex file
build_script:
- yarn run app:dist
- yarn run electron-builder:publish:x64
- yarn run app:dist
- yarn run electron-builder:publish:x64
15 changes: 8 additions & 7 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ files: [
"!node_modules/rxjs/{_esm5,_esm2015,src,bundles}",
# TODO sodium-native: include into the package only needed prebuilds for the platform is being built
"!node_modules/sodium-native/{src,test,libsodium}",
# TODO exclude not needed stuff in "files:" section to reduce app packages size, can save megabytes, so a significant improvement
]
compression: maximum
asar: true
asarUnpack:
- "**/node_modules/sodium-native/**/*"
- "**/node_modules/keytar/**/*"
- "**/node_modules/sodium-native/**/*"
- "**/node_modules/keytar/**/*"

mac:
icon: ./app/assets/icons/mac/icon.icns
Expand All @@ -31,8 +32,8 @@ dmg:
icon: ./app/assets/icons/mac/icon.icns
iconSize: 128
contents:
- {x: 380, y: 240, type: link, path: /Applications}
- {x: 122, y: 240, type: file}
- {x: 380, y: 240, type: link, path: /Applications}
- {x: 122, y: 240, type: file}

linux:
icon: ./app/assets/icons/png
Expand All @@ -43,13 +44,13 @@ win:
artifactName: ${name}-${version}-windows-${arch}.${ext}
icon: ./app/assets/icons/win/icon.ico
target:
- {target: nsis}
- {target: portable}
- {target: nsis}
- {target: portable}

nsis:
artifactName: ${name}-${version}-windows-${arch}-nsis-installer.${ext}
oneClick: false
perMachine: false

portable:
artifactName: ${name}-${version}-windows-${arch}-portable.${ext}
artifactName: ${name}-${version}-windows-${arch}-portable.${ext}
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "email-securely-app",
"description": "Unofficial desktop app for E2E encrypted email providers",
"version": "1.2.0",
"version": "1.3.0",
"author": "Vladimir Yakovlev <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/vladimiry/email-securely-app",
Expand Down Expand Up @@ -48,7 +48,7 @@
"lint": "npm-run-all lint:sass lint:code",
"lint:code": "npm-run-all lint:js lint:ts",
"lint:js": "tslint \"./src/**/*.js\" \"./*.js\"",
"lint:sass": "sass-lint -v -q -c sass-lint.yml",
"lint:sass": "sass-lint -v -q -c ./sass-lint.yml",
"lint:ts": "tslint -p ./tsconfig.json \"./src/**/*.ts\" \"./src/**/*.js\"",
"security-check": "nsp check --preprocessor yarn --reporter table",
"start": "npm-run-all build:app start:electron-main",
Expand Down Expand Up @@ -76,47 +76,46 @@
"class-validator": "0.9.1",
"compare-versions": "3.3.0",
"electron-log": "2.2.16",
"electron-rpc-api": "1.0.0",
"electron-rpc-api": "2.0.0",
"electron-unhandled": "1.1.0",
"electron-updater": "3.0.3",
"fs-json-store": "2.0.2",
"fs-json-store-encryption-adapter": "0.0.3",
"jimp": "0.2.28",
"keepasshttp-client": "2.2.6",
"keytar": "4.2.1",
"nano-sql": "https://github.com/vladimiry/Nano-SQL#lib",
"nano-sql": "1.7.3",
"ramda": "0.25.0",
"reflect-metadata": "0.1.12",
"rolling-rate-limiter": "0.1.11",
"rxjs": "6.2.2",
"valid-url": "1.0.9"
},
"devDependencies": {
"@angular-devkit/build-optimizer": "0.7.0-beta.1",
"@angular-devkit/core": "0.7.0-beta.1",
"@angular/animations": "6.0.9",
"@angular/common": "6.0.9",
"@angular/compiler": "6.0.9",
"@angular/compiler-cli": "6.0.9",
"@angular/core": "6.0.9",
"@angular/forms": "6.0.9",
"@angular/http": "6.0.9",
"@angular/language-service": "6.0.9",
"@angular/platform-browser": "6.0.9",
"@angular/platform-browser-dynamic": "6.0.9",
"@angular/router": "6.0.9",
"@angular-devkit/build-optimizer": "0.7.1",
"@angular-devkit/core": "0.7.1",
"@angular/animations": "6.1.0",
"@angular/common": "6.1.0",
"@angular/compiler": "6.1.0",
"@angular/compiler-cli": "6.1.0",
"@angular/core": "6.1.0",
"@angular/forms": "6.1.0",
"@angular/http": "6.1.0",
"@angular/language-service": "6.1.0",
"@angular/platform-browser": "6.1.0",
"@angular/platform-browser-dynamic": "6.1.0",
"@angular/router": "6.1.0",
"@angularclass/hmr": "2.1.3",
"@ng-select/ng-select": "2.3.5",
"@ngrx/effects": "6.0.1",
"@ngrx/router-store": "6.0.1",
"@ngrx/store": "6.0.1",
"@ngtools/webpack": "6.1.0-beta.1",
"@ngtools/webpack": "6.1.1",
"@types/glob": "5.0.35",
"@types/html-webpack-plugin": "2.30.4",
"@types/html-webpack-plugin": "3.2.0",
"@types/jasmine": "2.8.8",
"@types/karma": "1.7.5",
"@types/keytar": "4.0.1",
"@types/lodash-es": "4.17.0",
"@types/mini-css-extract-plugin": "0.2.0",
"@types/mkdirp": "0.5.2",
"@types/node": "8.10.11",
Expand All @@ -131,14 +130,14 @@
"@types/uglifyjs-webpack-plugin": "1.1.0",
"@types/valid-url": "1.0.2",
"@types/webdriverio": "4.10.3",
"@types/webpack": "4.4.7",
"@types/webpack": "4.4.8",
"@types/webpack-dev-server": "2.9.5",
"@types/webpack-env": "1.13.6",
"@types/webpack-merge": "4.1.3",
"@types/webpack-node-externals": "1.6.3",
"ava": "1.0.0-beta.6",
"awesome-typescript-loader": "5.2.0",
"bootstrap": "4.1.2",
"bootstrap": "4.1.3",
"cache-loader": "1.2.2",
"circular-dependency-plugin": "5.0.2",
"codelyzer": "4.4.2",
Expand All @@ -147,10 +146,10 @@
"cross-env": "5.2.0",
"cross-spawn": "6.0.5",
"css-loader": "1.0.0",
"cssnano": "4.0.3",
"cssnano": "4.0.4",
"devtron": "1.4.0",
"electron": "2.0.5",
"electron-builder": "20.24.4",
"electron-builder": "20.26.0",
"exports-loader": "0.7.0",
"file-loader": "1.1.11",
"font-awesome": "4.7.0",
Expand All @@ -159,7 +158,7 @@
"html-webpack-plugin": "4.0.0-alpha",
"immer": "1.3.1",
"jasmine": "3.1.0",
"karma": "2.0.4",
"karma": "2.0.5",
"karma-chrome-launcher": "2.2.0",
"karma-firefox-launcher": "1.1.0",
"karma-jasmine": "1.1.2",
Expand All @@ -168,7 +167,6 @@
"karma-webpack": "3.0.0",
"keysim": "2.1.0",
"less-loader": "4.1.0",
"lodash-es": "4.17.10",
"mini-css-extract-plugin": "0.4.1",
"mkdirp": "0.5.1",
"ngx-bootstrap": "3.0.1",
Expand All @@ -177,7 +175,7 @@
"nsp": "3.2.1",
"nsp-preprocessor-yarn": "1.1.2",
"null-loader": "0.1.1",
"otplib": "10.0.0",
"otplib": "10.0.1",
"postcss-custom-properties": "7.0.0",
"postcss-loader": "2.1.6",
"postcss-url": "7.3.2",
Expand All @@ -204,13 +202,14 @@
"tsconfig-paths": "3.4.2",
"tsconfig-paths-webpack-plugin": "3.2.0",
"tslint": "5.11.0",
"tslint-consistent-codestyle": "1.13.3",
"tslint-rules-bunch": "0.0.4",
"typescript": "2.9.2",
"uglifyjs-webpack-plugin": "1.2.7",
"unionize": "https://github.com/vladimiry/unionize#add-tagprefix-option-lib",
"url-loader": "1.0.1",
"wait-on": "2.1.0",
"webpack": "4.16.1",
"webpack": "4.16.2",
"webpack-cli": "3.1.0",
"webpack-dev-server": "3.1.5",
"webpack-merge": "4.1.3",
Expand Down
Loading

0 comments on commit 210a13f

Please sign in to comment.