mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-25 08:29:06 -06:00
* WIP: add cli info command to list detected browsers * print found browsers * change to list * start work on info command calling into binary * move info command into binary * print OS info during cypress info command * add binary cache path to info command * add browser profile path * add memory * get browser profile path without partition * pick real browsers as examples * output same info as desired * better names * changed colors * add list of cached binary versions * do not put stable into name * add underlined link * conditionally show profile path, only if the folder exists * do not list cached binaries * human-friendly memory print * print env proxy vars * print CYPRESS_ env variables * use _.sample * update order * store cypress info output on CI as HTML page artifact * add percy CLI screenshots * sanitize cypress info command * store CLI snapshots in cli/visual-snapshots folder * update cli unit snapshot * add cli unit test * start e2e testing for cypress info * add test with proxy and cypress vars * make sure we call the binary * stricter start check * start unit testing modes info * test info mode browser print * add test for profile path * add cypress info command to test binary Circle job * add cypress info to test-binary-as-specific-user circle * print cypress info --dev on circle and on appveyor * update .gitignore * move error in environment load to debug
35 lines
574 B
JavaScript
35 lines
574 B
JavaScript
const state = require('./state')
|
|
const logger = require('../logger')
|
|
const fs = require('../fs')
|
|
const util = require('../util')
|
|
|
|
const path = () => {
|
|
logger.log(state.getCacheDir())
|
|
|
|
return undefined
|
|
}
|
|
|
|
const clear = () => {
|
|
return fs.removeAsync(state.getCacheDir())
|
|
}
|
|
|
|
const list = () => {
|
|
return getCachedVersions()
|
|
.then((versions) => {
|
|
logger.log(versions.join(', '))
|
|
})
|
|
}
|
|
|
|
const getCachedVersions = () => {
|
|
return fs
|
|
.readdirAsync(state.getCacheDir())
|
|
.filter(util.isSemver)
|
|
}
|
|
|
|
module.exports = {
|
|
path,
|
|
clear,
|
|
list,
|
|
getCachedVersions,
|
|
}
|