Commit Graph

106 Commits

Author SHA1 Message Date
emizzle 728713a183
Embark blockchain logs when running standalone
When running `embark blockchain` followed by `embark run` previously, logs generated in the standalone `embark blockchain` process were black boxed and not accessible to the main Embark process.

This is fixed by creating a client IPC connection in the `embark blockchain` process that connects to the IPC server connection running in `embark run`. The connection is made by way of polling `ipc.connect` and continues polling even after a connection is made in case `embark run` is killed and restarted without restarting `embark blockchain`.

`LogHandler` was introduced to extrapolate functionality used in `ProcessLauncher` that needed to also be used in the standalone blockchain process. It also caps the number of logs that are stored in memory per process by a constant value defined in `constants.json`.

A `blockchain_listener` was module was created (and run inside of `embark run`) that listens for logs emitted by the `embark blockchain` client IPC and runs them through the `LogHandler`. Additionally, this module registers the API endpoints needed to handle requests for blockchain process logs in the cockpit (which were 404’ing before).

# Conflicts:
#	lib/modules/blockchain_process/blockchain.js
2018-10-25 12:51:43 +02:00
Iuri Matias 0379f6bc35
use fuzzy to do search; but still do sorting 2018-10-23 11:00:28 +02:00
Iuri Matias 085a282c96
add copytoken command 2018-10-23 10:59:17 +02:00
emizzle aa4bc0fe4d
Fix for logs showing a string as an array
Some strings were being logged as
```
[w,r,i,t,i,n,g, ,f,i,l,e, ,,[,2,m,,[,1,m,.,e,m,b,a,r,k,/,s,t,a,t,s,.,r,e,p,o,r,t,,[,2,2,m,,[,2,2,m]
```
The fix was applied to the `normalizeInput` method which simply returns if the input was a `typeof` string.
2018-10-23 10:50:40 +02:00
emizzle 72a796c11b
Moved `fileTreeSort()` to `utils` 2018-10-23 10:50:39 +02:00
Anthony Laibe 00c6b0029d
Fix start without webserver 2018-10-23 10:44:14 +02:00
Jonathan Rainville dd0ae5023d
fix ws ping and add wait calculation 2018-10-23 10:39:57 +02:00
Iuri Matias ac4b74588e
move intercept logs to utils 2018-10-23 10:15:29 +02:00
Jonathan Rainville ac155ddb86
conflict in specialconfigs 2018-10-22 19:54:46 +02:00
Michael Bradley, Jr 4812a0d1a2
additional warning re: potential version incompatibility 2018-10-22 19:53:50 +02:00
Michael Bradley, Jr 0f6e84bca3
return in the catch branch so the control flow is more clear 2018-10-22 19:53:49 +02:00
Michael Bradley, Jr b9e592ae2e
color retry message yellow 2018-10-22 19:53:49 +02:00
Michael Bradley, Jr 1f47b163e4
auto-retry download with master branch
a fallback download of the master branch is attempted only for unqualified
template names
2018-10-22 19:53:49 +02:00
Michael Bradley, Jr cc08a16ae3
calc a <major>.<minor> branch for unqualified template names
doesn't calc a branch if a url/shortcut is supplied that hostedGitInfo knows
how to parse

only does this for unqualified names if a committish isn't supplied, i.e.
doesn't override '#develop' in 'typescript#develop'
2018-10-22 19:43:16 +02:00
Jonathan Rainville eaafa9bed2
add default account if set in config 2018-10-22 19:35:04 +02:00
Michael Bradley, Jr aa87614a98
don't log "Next steps" messages until `npm install` has finished 2018-10-22 19:25:15 +02:00
Michael Bradley, Jr 585e286adb
exit w/ error code if `npm install` fails 2018-10-22 19:25:15 +02:00
Michael Bradley, Jr 97f22a3543
consistent use of utils.errorMessage 2018-10-22 19:25:15 +02:00
Michael Bradley, Jr 36eabda506 rev error handling so error msg from hosted-git-info would be logged 2018-09-25 09:20:59 -05:00
Michael Bradley, Jr cf67bd0332 rename var 2018-09-24 19:26:51 -05:00
Michael Bradley, Jr d945f8f2f4 don't log complete/ready messages until after `npm install` 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr 67f57217d5 log re: installing pkgs for built-in boilerplate not just demo 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr c8a9ac6048 tweak log messages 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr c2d92b19f3 log browsable url from info gen'd by hosted-git-info 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr 1b7935678c use hosted-git-info pkg to process --template name/url 2018-09-24 17:44:53 -05:00
Michael Bradley, Jr 82de81015b allow for / in branch name when handling github shortcuts 2018-09-23 12:34:23 -05:00
Andre Medeiros 12c495502d Resolve private key path instead of forcing inside dApp root 2018-09-21 14:04:04 -04:00
Michael Bradley, Jr fa274675a5 timer function doesn't need to be async, since it returns a promise 2018-09-19 21:11:55 -05:00
Michael Bradley, Jr ae8a59cf9b timer utility 2018-09-19 19:47:38 -05:00
Iuri Matias dfe49291be
Merge pull request #797 from subramanianv/pluginCmd
Plugin cmd
2018-09-12 17:57:18 -04:00
Subramanian Venkatesan b2d6421ea6 fix code formatting 2018-09-12 11:50:20 +05:30
Subramanian Venkatesan 1a756e8a05 Added better error logging, dashboard doesnt break in run mode 2018-09-12 11:27:28 +05:30
Michael Bradley, Jr a9865eedc5 provide helpful messages when template download fails 2018-09-11 15:44:54 -05:00
Michael Bradley, Jr a4af0d8f5b assume cb is always supplied 2018-09-11 15:44:37 -05:00
Michael Bradley, Jr 803b3f5050 should return after callback w/ error 2018-09-11 15:22:35 -05:00
Michael Bradley, Jr a44be3740b template generator should report err msg and exit if download fails 2018-09-11 15:19:15 -05:00
Michael Bradley, Jr ed48599aa9 downloadFile should callback w/ err msg if response code is not 200 2018-09-11 15:18:32 -05:00
Subramanian Venkatesan fe0bbc3559 changes from the code review 2018-09-10 22:38:17 +05:30
Subramanian Venkatesan 78bc27ad95 fix runCmd 2018-09-10 14:16:02 +05:30
Subramanian Venkatesan f20934ac8c Use Object.assign 2018-09-10 14:11:40 +05:30
Subramanian Venkatesan 4823d2312e remove console.log 2018-09-10 14:07:02 +05:30
Subramanian Venkatesan cb751b5213 install npm package using shell.js 2018-09-10 14:01:36 +05:30
eiselems c99d75c9f1 Extend template_generator to support git urls and branches
This change will also:
* upgrade calls from HTTP to HTTPS
* update / add some tests
See: #765
2018-09-06 02:09:46 +02:00
Anthony Laibe df651865c1 Enable no-else-return 2018-08-30 14:53:04 +01:00
Michael Bradley, Jr 8bec33177e rm some else clauses 2018-08-24 15:04:16 -05:00
Michael Bradley, Jr f66552b044 errorMessage helper moved to utils 2018-08-24 15:04:16 -05:00
Michael Bradley, Jr 76502fa693 rm utils.pwd() -- redundant now that fs.dappPath is anchored to env var 2018-08-24 15:04:16 -05:00
Jonathan Rainville 9d4a3fd228 if there is a password field in privateKeyFile object, decode keystore 2018-08-24 15:30:44 -04:00
Michael Bradley, Jr 2280d30cd1 don't continue with template install if destination path exists 2018-08-23 15:43:42 -05:00
Jonathan Rainville 86f1cf51d2 enable node=embark 2018-08-23 12:54:43 -04:00