-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature-multidomain
- Loading branch information
Showing
41 changed files
with
163 additions
and
3,316 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Vendored from @cypress/listr-verbose-renderer | ||
const figures = require('figures') | ||
const cliCursor = require('cli-cursor') | ||
const chalk = require('chalk') | ||
const dayjs = require('dayjs') | ||
|
||
const formattedLog = (options, output) => { | ||
const timestamp = dayjs().format(options.dateFormat) | ||
|
||
// eslint-disable-next-line no-console | ||
console.log(`${chalk.dim(`[${timestamp}]`) } ${output}`) | ||
} | ||
|
||
const renderHelper = (task, event, options) => { | ||
const log = formattedLog.bind(undefined, options) | ||
|
||
if (event.type === 'STATE') { | ||
const message = task.isPending() ? 'started' : task.state | ||
|
||
log(`${task.title} [${message}]`) | ||
|
||
if (task.isSkipped() && task.output) { | ||
log(`${figures.arrowRight} ${task.output}`) | ||
} | ||
} else if (event.type === 'TITLE') { | ||
log(`${task.title} [title changed]`) | ||
} | ||
} | ||
|
||
const render = (tasks, options) => { | ||
for (const task of tasks) { | ||
task.subscribe( | ||
(event) => { | ||
if (event.type === 'SUBTASKS') { | ||
render(task.subtasks, options) | ||
|
||
return | ||
} | ||
|
||
renderHelper(task, event, options) | ||
}, | ||
(err) => { | ||
// eslint-disable-next-line no-console | ||
console.log(err) | ||
}, | ||
) | ||
} | ||
} | ||
|
||
class VerboseRenderer { | ||
constructor (tasks, options) { | ||
this._tasks = tasks | ||
this._options = Object.assign({ | ||
dateFormat: 'HH:mm:ss', | ||
}, options) | ||
} | ||
|
||
static get nonTTY () { | ||
return true | ||
} | ||
|
||
render () { | ||
cliCursor.hide() | ||
render(this._tasks, this._options) | ||
} | ||
|
||
end () { | ||
cliCursor.show() | ||
} | ||
} | ||
|
||
module.exports = VerboseRenderer |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
|
@@ -29,10 +29,6 @@ | |
table { | ||
margin-bottom: 0; | ||
|
||
th { | ||
font-weight: 200; | ||
} | ||
|
||
td { | ||
font-family: $monospace; | ||
font-size: 11px; | ||
|
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
Large diffs are not rendered by default.
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
Oops, something went wrong.