forked from wix/Detox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Provide queryable console logs in Detox (wix#835)
* deps: switched from npmlog to bunyan, bunyan-debug-stream * feat: detox writes plain text and json logs to artifacts folder if recording logs is enabled * fix: missing parts of logging messages in Jest log * npm: merging detox-server and detox-common into detox package * ci: force exit e2e test if failed on beforeAll * ci: added Android artifacts integrity check on Jenkins * cli: added no-color flag * cli: adding deprecated warning for the old log level names * docs: updated detox server mentions
- Loading branch information
Showing
72 changed files
with
1,132 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
#!/usr/bin/env node | ||
|
||
const program = require('commander'); | ||
const cp = require('child_process'); | ||
const path = require('path'); | ||
const DetoxServer = require('../src/server/DetoxServer'); | ||
const logger = require('../src/utils/logger'); | ||
|
||
program.parse(process.argv); | ||
program | ||
.name('detox run-server') | ||
.description('Start a standalone Detox server') | ||
.option( | ||
'-p, --port [port]', | ||
'Port number', | ||
'8099' | ||
) | ||
.option('-l, --loglevel [value]', | ||
'Log level: fatal, error, warn, info, debug, trace', 'info') | ||
.option( | ||
'--no-color', | ||
'Disable colorful logs', | ||
false | ||
) | ||
.parse(process.argv); | ||
|
||
const serverPackagePath = require.resolve('detox-server/package.json'); | ||
const cli = require(serverPackagePath).bin['detox-server']; | ||
const binPath = path.join(path.dirname(serverPackagePath), cli); | ||
cp.execFileSync('node', [binPath], {stdio: 'inherit'}); | ||
if (program.port < 1 || program.port > 65535) { | ||
program.help(); | ||
} | ||
|
||
const detoxServer = new DetoxServer({ | ||
port: +program.port, | ||
log: logger, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.