Commit graph

72 commits

Author SHA1 Message Date
Evan Morikawa
1f2370c2a9 [client-app] run windows build separately
Summary:
build-client, aka packaging, aka bundling is now separate from uploading.
This is both to compartmentalize our tasks a bit more and so we can add a
non-grunt windows task inbetween packaging and uploading.

No more heavily-overloaded PUBLISH_BUILD flag.
Added SIGN_BUILD flag instead.
No more TRAVIS and TRAVIS_PULL_REQUEST flag.

Test Plan: Manual

Reviewers: halla, juan, spang

Reviewed By: juan, spang

Differential Revision: https://phab.nylas.com/D4208
2017-03-13 15:48:45 -07:00
Juan Tejada
9e91d9518a [none] (dev) Fix script name 2017-03-07 12:33:29 -08:00
Evan Morikawa
a4de75d3ec [dev] change npm script names
Summary:
`npm run cloud` felt nicer than:
`npm run start-cloud`

Test Plan: manual

Reviewers: juan, spang, mark, khamidou, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4124
2017-03-07 14:54:30 -05:00
Juan Tejada
55ec77a209 wip 2017-03-07 00:24:07 -08:00
Evan Morikawa
3c1c70e262 [client-app] use forked lerna for better npm logging 2017-03-06 15:35:56 -05:00
Evan Morikawa
4e1f03c072 [isomorphic-core] move devDependencies from iso-core to repo root 2017-03-03 14:17:39 -08:00
Halla Moore
2db42db5df [*] Add cloud specs to node scripts
Summary:
Implements `test-cloud` to cd into each cloud package and run `npm test`.
It's easier this way because of the relative paths in the Jasmine configs,
and this also ensures that the tests can always be run within their
individual packages too.

Also calls `test-cloud` from `test` so people don't forget about it. If
someone wants to test just the client, they can explicitly do so with
the `test-client` script.

Depends on D4058, D4059, D4061, and D4062

Test Plan: Ran the tests

Reviewers: evan, mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4031
2017-03-01 11:12:10 -08:00
Evan Morikawa
7b7318b220 [client-app] update Travis
Summary:
Also see:
3a33b0ad64
which was hot-pushed to master in order to get Travis building.

We now have two travis files:

1. /.travis.yml
2. /packages/client-app/travis.yml

The first one is alwas in the private repo and runs `npm install && npm
run build-client`. This decrypts our keys and signs, builds, and uploads
to S3.

The second one is designed to live in our yet-to-be public mirror. It will
basically just run `npm install && npm test`.

That way the public one should just about ALWAYS pass (YAY!) except of
course when you break the tests or something in the installer!

Test Plan: Run on new https://travis-ci.com/nylas/nylas-mail-all

Reviewers: jerm, spang, juan

Reviewed By: spang, juan

Differential Revision: https://phab.nylas.com/D3999
2017-02-22 16:19:45 -05:00
Halla Moore
1105b2621f [*] Rename postinstall.js -> postinstall.es6
The n1Cloud machines try to compile this script, even though they
never run it, and they didn't recognize it was supposed to be es6
2017-02-21 15:55:08 -08:00
Evan Morikawa
a7686bb35b [client-app] build tasks now use absolute paths
Summary:
Grunt is hardcoded to use paths relative to wherever the Gruntfile is
located. Unfortunately it also expects the grunt packages to be siblings
of that gruntfile. We can get around this by changing the relative base
path, but then the cwd is different for each tasks. This is okay as long
as we use absolute paths for various files in each of our tasks. This
updates our grunt tasks to use absolute paths

Test Plan: `npm run build-client`

Reviewers: spang, halla, jerm, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3987
2017-02-21 14:35:51 -05:00
Evan Morikawa
17b7653109 [dev, cloud-*] make Docker run plain npm install and conslidate deps
Summary:
It doesn't really make sense to have the root package.json have any
dependencies since it's never "packaged" or built itself. Everything
really should be a dev dependency. This was only separated before because
the Dockerfile unnecessarily added the --production flag.

This will make the docker build take a smidge longer, but I think it's
worth the extra minute to keep the dependencies orderly and sematically
correct

Test Plan: re-run docker build

Reviewers: jerm, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3978
2017-02-21 14:33:00 -05:00
Evan Morikawa
27c08d86e7 [*] update and add READMEs to each package
Summary:
Adding READMEs for easy and helpful browsing on GitHub.
Also add missing script and `--interpreter` flag

Test Plan: Run new launch commands

Reviewers: mark, spang, juan, halla

Reviewed By: spang, juan, halla

Differential Revision: https://phab.nylas.com/D3971
2017-02-17 17:28:09 -08:00
Evan Morikawa
b686b969cd [cloud-*] Get cloud-api and cloud-workers running on new repo
[dev] remove .tern-project

[cloud-*] move into cloud-core/build

[cloud-core] convert to launch properly via Docker
2017-02-17 11:47:45 -08:00
Evan Morikawa
918fa0b6dd [*] move to monorepo
[*] update babel

[client-app] remove flow-typed

[client-app] Move build/package.json to main package.json

[client-app] remove spec_integration

[client-app] fix babel support

Add client-private-plugins package.json

[client-app] add node_modules to global path for private-plugins

Move client-sync dependencies to client-app root

fix electron rebuild

[*] moved to monorepo

Summary: App now runs in monorepo

Test Plan: npm test

Reviewers: juan, mark, khamidou, halla, spang

Differential Revision: https://phab.nylas.com/D3947
2017-02-16 18:46:26 -08:00
Christine Spang
c8d1daddf4 Bump pm2 version to 2.4.0
See https://github.com/Unitech/pm2/blob/master/CHANGELOG.md
for new features and fixes
2017-02-15 07:54:55 -08:00
Karim Hamidou
e55c36a79a [cloud-api] Add support for database migrations
Summary:
This diff adds support for database migration to our cloud API. It's partially inspired by Halla's local-sync migration diff (D3809). You can run a migration by calling "node-babel scripts/migrate-db up|down" or by calling "npm script upgrade-db|downgrade-db".

Note that for simplicity reasons we assume that we're only writing migrations for our MySQL database – people developing locally may have to blow up there dbs whenever there's a schema change, though in practice `ALTER TABLE ADD COLUMN`statements work the same on both dbs.

Test Plan: Tested locally. Will run the metadata migration on staging.

Reviewers: evan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D3840
2017-02-06 13:38:59 -08:00
Juan Tejada
d1ea16d7ee [cloud-*] Move babel devDependencies to dependencies in pkg.json
Our Dockerfile only install production dependencies `--production`, so
lerna and babel dependencies need to be listed under `dependencies`
2017-01-28 02:23:03 -08:00
Juan Tejada
f56a807792 [cloud-*] Fix n1-cloud build
We added new presets and plugins to the k2 .babelrc but didn't add the
respective dependencies in our package.json, so the build was failing.

Add the required dependencies, and make sure that `build-n1-cloud.js`
uses the correct babel presets and plugins
2017-01-28 02:00:16 -08:00
Evan Morikawa
556f4a6c6f Use babel-cli in devDependencies instead 2017-01-27 16:34:16 -05:00
Evan Morikawa
44e7e58b4f Add babel-node as a dev dependency 2017-01-27 16:26:35 -05:00
Jackie Luo
21049b2a1f Update Nylas N1 to Nylas Mail
Test Plan: Tested locally.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3644
2017-01-12 11:25:39 -08:00
Michael Pfister
a738d8a622 Add ability to debug with chrome dev tools in cloud-api 2017-01-10 17:31:51 -08:00
Evan Morikawa
1d254a7aaa [*] Add basic babel toolchain
Summary:
Adds babel to K2
Creates a simple build script so it'll run on prod.

Test Plan: manual

Reviewers: jackie, halla, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3527
2016-12-16 13:08:21 -05:00
Evan Morikawa
4c53247df1 [*] update lerna to 2.0.0-beta.30 2016-12-06 16:03:31 -08:00
Evan Morikawa
aba77ca637 [cloud-api] add npm start for pm2 launch 2016-12-01 16:33:05 -05:00
Evan Morikawa
ae42c37606 Add better-sqlite3 2016-11-23 10:18:47 -08:00
Ben Gotow
0aa11cf9d2 [cloud] fix(*): add things back to package.json 2016-11-22 14:54:40 -08:00
Evan Morikawa
3907c20271 Fix package.json 2016-11-22 14:47:18 -08:00
Karim Hamidou
372beeef52 More structure adapts.
Conflicts:
	packages/local-sync/package.json
2016-11-22 14:26:48 -08:00
Ben Gotow
291106694b Bump eslint 2016-11-22 11:58:34 -08:00
Ben Gotow
27ba2544dd Pull in cloud packages 2016-11-22 10:58:27 -08:00
Evan Morikawa
b13aa32f60 fix(readme): minor readme changes 2016-11-21 18:18:21 -08:00
Ben Gotow
e87e67cea3 Fix linter issues 2016-11-21 14:00:35 -08:00
Evan Morikawa
5e0bcc5eff Quieter logging on dev 2016-07-15 13:07:12 -07:00
Ben Gotow
08c7ca8b0d Use EC2 instance ID instead of hostname 2016-07-14 18:52:30 -07:00
Evan Morikawa
45f132b746 Fix thread moving to support new Promises 2016-07-14 17:37:38 -07:00
Juan Tejada
b58c11605c Moves metrics into its own pkg to be able to instrument other services
- With the Metrics module inside nylas-core, and bc of our current lerna
setup, we required other modules like sequelize and redis before requiring
newrelic, thus preventing them from being properly instrumented
2016-07-14 11:20:58 -07:00
Juan Tejada
16b91ea394 Update metrics with signalfx - report # of syncing accts per host 2016-07-14 10:39:05 -07:00
Ben Gotow
b43b623ca6 Expand promise utils 2016-07-13 17:22:02 -07:00
Juan Tejada
ab9c01a249 Remove bluebird
- Implement `each` and `promisifyAll` + other bluebird fns
2016-07-13 16:35:22 -07:00
Juan Tejada
7f72ab7f14 Add loggly logging service to test it out
- Adds env to all logs, cleans up code a bit
2016-07-13 11:58:46 -07:00
Ben Gotow
9d7343eb91 Fix UTF7 reference - prod will not use ssh 2016-07-12 16:24:03 -07:00
Ben Gotow
8b1e9564cf Fix UTF7 support — module didn’t support Node6 2016-07-12 16:11:29 -07:00
Juan Tejada
039648bae8 Add bunyan-prettystream to regular dependencies 2016-07-11 17:04:30 -07:00
Juan Tejada
f8b8dfb87f Revert to running pm2 in no-daemon mode in dev
- Add a stream for pretty logging in dev mode
2016-07-11 16:40:48 -07:00
Juan Tejada
d4cd2510db Fix pm2 run scripts 2016-07-11 15:46:52 -07:00
Halla Moore
bc10ff453e Change stop script to use pm2 stop command instead of delete 2016-07-11 15:06:36 -07:00
Evan Morikawa
84815ce2fa Add file watching to restart server 2016-07-11 12:00:20 -07:00
Evan Morikawa
c0d7902f9f Add npm run restart 2016-07-11 11:49:11 -07:00
Juan Tejada
ff334e169c Make npm start log output logs too 2016-07-11 11:43:51 -07:00