feat: ProjectLifecycleManager & general launchpad cleanup (#19347)

See #19347 for full summary

Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: estrada9166 <estrada9166@hotmail.com>
Co-authored-by: Alejandro Estrada <estrada9166@gmail.com>
Co-authored-by: Jess <jess@jessicasachs.io>
This commit is contained in:
Tim Griesser
2021-12-21 21:28:44 -05:00
committed by GitHub
parent 67c42fccee
commit 4626f7481c
217 changed files with 4381 additions and 4647 deletions

View File

@@ -1,11 +1,16 @@
const path = require('path')
const execa = require('execa')
const inspector = require('inspector')
const debug = require('debug')('cypress:scripts')
const args = process.argv.slice(2)
const pathToCli = path.resolve(__dirname, '..', 'cli', 'bin', 'cypress')
if (inspector.url()) {
process.CYPRESS_INTERNAL_DEV_DEBUG = `--inspect=${process.debugPort + 1}`
}
// always run the CLI in dev mode
// so it utilizes the development binary
// instead of the globally installed prebuilt one

View File

@@ -1,5 +1,13 @@
// Where to fetch the remote "federated" schema. If you have a long-running branch
// against a development schema, it's probably easiest to set this manually to "develop"
declare global {
namespace NodeJS {
interface ProcessEnv {
CYPRESS_INTERNAL_ENV: 'staging' | 'development' | 'production'
}
}
}
export const DEFAULT_INTERNAL_CLOUD_ENV = process.env.CYPRESS_INTERNAL_ENV || 'staging'
export type MODES = 'dev' | 'devWatch' | 'test'

View File

@@ -271,13 +271,6 @@ gulp.task(viteBuildLaunchpad)
gulp.task(viteBuildAndWatchApp)
gulp.task(viteBuildAndWatchLaunchpad)
gulp.task('debugCypressLaunchpad', gulp.series(
async function setupDebugBrk () {
setGulpGlobal('debug', '--inspect-brk')
},
openCypressLaunchpad,
))
gulp.task(e2eTestScaffoldWatch)
gulp.task(e2eTestScaffold)
gulp.task(startCypressWatch)

View File

@@ -16,7 +16,13 @@ export async function e2eTestScaffold () {
const stat = await fs.stat(fullPath)
if (stat.isDirectory()) {
return fullPath
const files = await fs.readdir(fullPath)
if (files.filter((f) => !f.startsWith('.')).length) {
return fullPath
}
return null
}
}))
const allDirs = dirs.filter((dir) => dir) as string[]