Commit Graph

12 Commits

Author SHA1 Message Date
Michael Bradley, Jr fd09488e4b fix(@embark/core): move process.on inside ProcessWrapper's constructor
This avoids mistakenly placing process event handlers on the parent process
whenever the `embark-core` package is loaded. Also, don't listen for an
`'exit'` event on `process` and then call `process.exit(0)` since the event "is
emitted after the child process ends" ([docs][docs]), i.e. it's unnecessary to
do so and in any case it's not correct to always exit with code `0`.

[docs]: https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_event_exit
2019-05-08 15:55:06 -05:00
Michael Bradley, Jr 2eb5617443 refactor: use explicit codes with process.exit so intent is clear and errors don't exit cleanly 2019-05-08 15:55:06 -05:00
Michael Bradley, Jr 8b94419670 refactor(@embark/i18n): expose __ from embark-i18n, drop global __ 2019-05-08 11:01:16 +02:00
Pascal Precht 21a0f62d86 refactor(@embark/core): move IPC into core package 2019-05-07 12:51:29 +02:00
Pascal Precht ed13aecc25 refactor(@embark/core): move process APIs to embark-core 2019-05-07 10:06:48 +02:00
emizzle 1e4e6e4758 feat(@embark/storage): Add command `service ipfs on/off`
Add support for ability to start and stop IPFS via command `service ipfs on/off`.

Add support for `ProcessState.Errored` process state in the `ProcessManager`. This allows for processes being launched and stopped to trigger an error and the resulting process will be in an errored state. Processes in errored states can still attempt to be started and stopped.

`service ipfs on` - starts an IPFS node if not already started. Shows an error if the node is already starting or started.

`service ipfs off` - kills the running IPFS node as long as Embark has started the IPFS process. If the IPFS process was started externally, an error is shown.

return early
2019-05-03 14:52:55 -04:00
Andre Medeiros 661ce74877 chore: move console to module 2019-05-03 09:24:09 -05:00
Michael Bradley, Jr 2044ed5e9b build: bump tslint in all relevant pkgs from v5.11.0 to v5.16.0
Related to bumping the typescript package to its latest version
2019-05-03 08:53:43 -05:00
Michael Bradley, Jr d5c984c592 build: use babel cli's `--extensions` consistently in all packages
If a package uses only `.js` then supply `--extensions ".js"`. If a package
uses only `.ts` then supply `--extensions ".ts"`. If a package uses both, then
supply `--extensions ".js,.ts"`.

The reason for this is that adding/removing TS/JS support ought to occasion
revising a package's `package.json` file and adjusting other scripts as well,
e.g. for linting. With these changes, it won't work to simply start adding
`.ts` files in a package's `src/` directory, which should prompt the developer
to review `package.json` and make the appropriate changes, and/or other
developers may realize changes need to be made during code review.
2019-05-02 20:33:42 -05:00
Michael Bradley, Jr 142130e533 build: bump typescript in all relevant pkgs from v3.3.1 to v3.4.5
The more recent version of TypeScript works around a [problem][chalk-problem]
encountered with the chalk package's type definitions.

[chalk-problem]: https://github.com/chalk/chalk/pull/296#issuecomment-418789492
2019-05-02 20:24:02 -05:00
Pascal Precht baf6f20066 refactor(@embark/test-runner): move test module into test-runner package 2019-05-02 12:07:19 +02:00
Michael Bradley, Jr 60ff097406 refactor(@embark/core): create embark-core package, move constants into embark-core 2019-04-30 12:11:25 -05:00