Commit Graph

8 Commits

Author SHA1 Message Date
emizzle fc01daf3e9 feat(@embark/whisper): Remove support for `service whisper on/off`
Remove support for `service whisper on/off` because Whisper cannot be started without first disabling it in the communications config, then restarting Embark.

Add documentation for the `service [process] on/off` command

This command was only added a few commits back so it is not considered a breaking change.

Refactor the `service [process] on/off` commands so that there is only one command. Previously we had a command registered for each process, ie:
```
service blockchain on/off
service ipfs on/off
…
```

Now, we only have one command with many options:
```
service [process] on/off - Starts/stops the process. Options: blockchain, embark, ipfs, api
```

Whisper is deliberately not included in the available options for the aforementioned reasons.
2019-05-15 13:34:13 +02:00
Pascal Precht e3ecf68fbc refactor: move embarkPath, ipcPath and dappPath into embark-core
This enables removing unnecessary `core/fs` dependencies which can be
replaced with `fs-extra`.

This commit also fixes a bug introduced in f868d1216d
where methods from `embark.fs` weren't available.

The reason for that is because we have several *Process instances
that are created through child process communication, specifically
process.send() APIs. Using those APIs, we can only send data structures
however, methods attached on any of those will get lost.

This is the case when sending embark.fs through process.send().

We still need fs in those places though, mostly because they are relying
on embarkPath and dappPath().

These places are now importing those functions from `embark-core`. Other
API such as writeFile or mkdirp() can be accessed through fs-extra
or fs modules.
2019-05-15 12:20:22 +02:00
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
Michael Bradley, Jr 60ff097406 refactor(@embark/core): create embark-core package, move constants into embark-core 2019-04-30 12:11:25 -05:00