Files
cypress/scripts/gulp/tasks/gulpUtils.ts
Tim Griesser a851d797a8 feat: improved DX for unified-desktop-gui (#18099)
- 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
2021-09-15 11:54:14 -04:00

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.`,
)
}
}