mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 13:30:26 -05:00
fix: re-enable CYPRESS_INTERNAL_VITE_DEV development (#25364)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"check-ts": "vue-tsc --noEmit",
|
||||
"build-prod-ui": "cross-env NODE_ENV=production vite build",
|
||||
"clean": "rimraf dist && rimraf ./node_modules/.vite && echo 'cleaned'",
|
||||
"clean": "rimraf dist && echo 'cleaned'",
|
||||
"clean-deps": "rimraf node_modules",
|
||||
"test": "echo 'ok'",
|
||||
"cypress:run-cypress-in-cypress": "cross-env CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=1 HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"check-ts": "vue-tsc --noEmit",
|
||||
"build-prod-ui": "cross-env NODE_ENV=production vite build",
|
||||
"clean": "rimraf dist && rimraf ./node_modules/.vite && rimraf dist-e2e && echo 'cleaned'",
|
||||
"clean": "rimraf dist && rimraf dist-e2e && echo 'cleaned'",
|
||||
"clean-deps": "rimraf node_modules",
|
||||
"test": "yarn cypress:run:ct && yarn types",
|
||||
"windi": "yarn windicss-analysis",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
CYPRESS_INTERNAL_ENV: 'staging' | 'development' | 'production'
|
||||
CYPRESS_INTERNAL_ENV?: 'staging' | 'development' | 'production'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ function spawnViteDevServer (
|
||||
) {
|
||||
return spawnUntilMatch(prefix, {
|
||||
command,
|
||||
match: 'dev server running at',
|
||||
match: /VITE v(\d+.)+ ready in \d+/,
|
||||
options,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import util from 'util'
|
||||
|
||||
import { prefixLog, prefixStream } from './prefixStream'
|
||||
import { addChildProcess } from '../tasks/gulpRegistry'
|
||||
import stripAnsi from 'strip-ansi'
|
||||
|
||||
export type AllSpawnableApps =
|
||||
| `cmd-${string}`
|
||||
@@ -45,7 +46,7 @@ export async function spawnUntilMatch (
|
||||
spawned(prefix, config.command, {
|
||||
...config.options,
|
||||
tapOut (chunk, enc, cb) {
|
||||
if (!ready && String(chunk).match(config.match)) {
|
||||
if (!ready && stripAnsi(String(chunk)).match(config.match)) {
|
||||
ready = true
|
||||
setTimeout(() => dfd.resolve(), 20) // flush the rest of the chunks
|
||||
}
|
||||
@@ -172,16 +173,19 @@ export const execAsync = async (
|
||||
const { silent } = options
|
||||
|
||||
if (!silent) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(command)
|
||||
}
|
||||
|
||||
const result = await execAsyncLocal(command, options)
|
||||
|
||||
if (!silent && typeof result.stdout === 'string' && result.stdout.length) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(result.stdout)
|
||||
}
|
||||
|
||||
if (!silent && typeof result.stderr === 'string' && result.stderr.length) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(result.stderr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user