1
- /* eslint-disable no-dupe-class-members */
2
1
import { CypressError , getError } from '@packages/errors'
3
2
import type { FullConfig , TestingType } from '@packages/types'
4
3
import { ChildProcess , fork , ForkOptions , spawn } from 'child_process'
@@ -36,7 +35,7 @@ const isSandboxNeeded = () => {
36
35
export interface SetupNodeEventsReply {
37
36
setupConfig : Cypress . ConfigOptions | null
38
37
requires : string [ ]
39
- registrations : Array < { event : string , eventId : string } >
38
+ registrations : Array < { event : string , eventId : string } >
40
39
}
41
40
42
41
export interface LoadConfigReply {
@@ -96,10 +95,10 @@ export class ProjectConfigIpc extends EventEmitter {
96
95
}
97
96
98
97
// TODO: options => Cypress.TestingTypeOptions
99
- send ( event : 'execute:plugins' , evt : string , ids : { eventId : string , invocationId : string } , args : any [ ] ) : boolean
100
- send ( event : 'setupTestingType' , testingType : TestingType , options : Cypress . PluginConfigOptions ) : boolean
101
- send ( event : 'loadConfig' ) : boolean
102
- send ( event : 'main:process:will:disconnect' ) : void
98
+ send ( event : 'execute:plugins' , evt : string , ids : { eventId : string , invocationId : string } , args : any [ ] ) : boolean
99
+ send ( event : 'setupTestingType' , testingType : TestingType , options : Cypress . PluginConfigOptions ) : boolean
100
+ send ( event : 'loadConfig' ) : boolean
101
+ send ( event : 'main:process:will:disconnect' ) : void
103
102
send ( event : string , ...args : any [ ] ) {
104
103
if ( this . _childProcess . killed || ! this . _childProcess . connected ) {
105
104
return false
@@ -108,29 +107,29 @@ export class ProjectConfigIpc extends EventEmitter {
108
107
return this . _childProcess . send ( { event, args } )
109
108
}
110
109
111
- on ( evt : 'childProcess:unhandledError' , listener : ( err : CypressError ) => void ) : this
112
- on ( evt : 'export:telemetry' , listener : ( data : string ) => void ) : void
113
- on ( evt : 'main:process:will:disconnect:ack' , listener : ( ) => void ) : void
114
- on ( evt : 'warning' , listener : ( warningErr : CypressError ) => void ) : this
110
+ on ( evt : 'childProcess:unhandledError' , listener : ( err : CypressError ) => void ) : this
111
+ on ( evt : 'export:telemetry' , listener : ( data : string ) => void ) : void
112
+ on ( evt : 'main:process:will:disconnect:ack' , listener : ( ) => void ) : void
113
+ on ( evt : 'warning' , listener : ( warningErr : CypressError ) => void ) : this
115
114
on ( evt : string , listener : ( ...args : any [ ] ) => void ) {
116
115
return super . on ( evt , listener )
117
116
}
118
117
119
- once ( evt : `promise:fulfilled:${string } `, listener : ( err : any , value : any ) => void ) : this
118
+ once ( evt : `promise:fulfilled:${string } `, listener : ( err : any , value : any ) => void ) : this
120
119
121
120
/**
122
121
* When the config is loaded, it comes back with either a "reply", or an "error" if there was a problem
123
122
* sourcing the config (script error, etc.)
124
123
*/
125
- once ( evt : 'ready' , listener : ( ) => void ) : this
126
- once ( evt : 'loadConfig:reply' , listener : ( payload : SerializedLoadConfigReply ) => void ) : this
127
- once ( evt : 'loadConfig:error' , listener : ( err : CypressError ) => void ) : this
124
+ once ( evt : 'ready' , listener : ( ) => void ) : this
125
+ once ( evt : 'loadConfig:reply' , listener : ( payload : SerializedLoadConfigReply ) => void ) : this
126
+ once ( evt : 'loadConfig:error' , listener : ( err : CypressError ) => void ) : this
128
127
129
128
/**
130
129
* When
131
130
*/
132
- once ( evt : 'setupTestingType:reply' , listener : ( payload : SetupNodeEventsReply ) => void ) : this
133
- once ( evt : 'setupTestingType:error' , listener : ( error : CypressError ) => void ) : this
131
+ once ( evt : 'setupTestingType:reply' , listener : ( payload : SetupNodeEventsReply ) => void ) : this
132
+ once ( evt : 'setupTestingType:error' , listener : ( error : CypressError ) => void ) : this
134
133
once ( evt : string , listener : ( ...args : any [ ] ) => void ) {
135
134
return super . once ( evt , listener )
136
135
}
0 commit comments