mirror of
https://github.com/cypress-io/cypress.git
synced 2025-12-21 14:21:13 -06:00
- Moves graphql-codegen config to the root, which will serve all packages needing it - Adds gulpfile for coordinating scripts related to dev environment in launchpad app - yarn dev from the root runs yarn gulp dev, which: Runs autobarrel for rolling up the @packages/graphql files Cleans the dist & cache for .vite Starts the a codegen watcher for Nexus Starts the graphql-codegen --watch & highlights output Starts vite servers for launchpad & app Starts electron watch.js
22 lines
679 B
TypeScript
22 lines
679 B
TypeScript
import detectPort from 'detect-port'
|
|
import { exit } from '../utils/exitUtil'
|
|
|
|
export async function friendlyStartupWarnings () {
|
|
const ALL_SERVER_PORTS_USED = [3000, 4000, 8484, 1234]
|
|
const unavaiablePorts: number[] = []
|
|
|
|
await Promise.all(
|
|
ALL_SERVER_PORTS_USED.map(async (port) => {
|
|
if (port !== (await detectPort(port))) {
|
|
unavaiablePorts.push(port)
|
|
}
|
|
}),
|
|
)
|
|
|
|
if (unavaiablePorts.length > 0) {
|
|
exit(
|
|
`The following ports needed by Cypress are already in use: ${unavaiablePorts.join(', ')}.\nCheck that you don't have another web-server running.\nThe command "pkill node -9" can be used to kill all node processes.`,
|
|
)
|
|
}
|
|
}
|