mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-23 07:39:52 -06:00
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Zach Bloomquist <git@chary.us> Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com> Co-authored-by: Matt Henkes <mjhenkes@gmail.com> Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com> Co-authored-by: Matt Schile <mschile@cypress.io> Co-authored-by: Mark Noonan <mark@cypress.io> Co-authored-by: Zachary Williams <ZachJW34@gmail.com> Co-authored-by: Ben M <benm@cypress.io> Co-authored-by: Zachary Williams <zachjw34@gmail.com> Co-authored-by: astone123 <adams@cypress.io> Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Adam Stone <adams@cypress.io> Co-authored-by: Blue F <blue@cypress.io> Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com> Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com> Co-authored-by: Jordan <jordan@jpdesigning.com> Co-authored-by: Sam Goodger <turbo@tailz.dev> Co-authored-by: Colum Ferry <cferry09@gmail.com> Co-authored-by: Stokes Player <stokes@cypress.io> Co-authored-by: Vilhelm Melkstam <vilhelm.melkstam@gmail.com> Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
const { patchFs } = require('./lib/util/patch-fs')
|
|
const fs = require('fs')
|
|
|
|
// prevent EMFILE errors
|
|
patchFs(fs)
|
|
|
|
// override tty if we're being forced to
|
|
require('./lib/util/tty').override()
|
|
|
|
const electronApp = require('./lib/util/electron-app')
|
|
|
|
// are we in the main node process or the electron process?
|
|
const isRunningElectron = electronApp.isRunning()
|
|
|
|
if (process.env.CY_NET_PROFILE && isRunningElectron) {
|
|
const netProfiler = require('./lib/util/net_profiler')()
|
|
|
|
process.stdout.write(`Network profiler writing to ${netProfiler.logPath}\n`)
|
|
}
|
|
|
|
require('./lib/unhandled_exceptions').handle()
|
|
|
|
process.env.UV_THREADPOOL_SIZE = 128
|
|
|
|
if (isRunningElectron) {
|
|
require('./lib/util/process_profiler').start()
|
|
}
|
|
|
|
// warn when deprecated callback apis are used in electron
|
|
// https://github.com/electron/electron/blob/master/docs/api/process.md#processenablepromiseapis
|
|
process.enablePromiseAPIs = process.env.CYPRESS_INTERNAL_ENV !== 'production'
|
|
|
|
// don't show any electron deprecation warnings in prod
|
|
process.noDeprecation = process.env.CYPRESS_INTERNAL_ENV === 'production'
|
|
|
|
// always show stack traces for Electron deprecation warnings
|
|
process.traceDeprecation = true
|
|
|
|
require('./lib/util/suppress_warnings').suppress()
|
|
|
|
module.exports = require('./lib/cypress').start(process.argv)
|