@@ -107,23 +107,11 @@ export interface ForceReconfigureProjectDataShape {
107
107
component ?: boolean | null
108
108
}
109
109
110
- export interface ActiveAppData {
110
+ interface Diagnostics {
111
111
error : ErrorWrapperSource | null
112
112
warnings : ErrorWrapperSource [ ]
113
113
}
114
114
115
- export interface CurrentTestingTypeData {
116
- error : ErrorWrapperSource | null
117
- warnings : ErrorWrapperSource [ ]
118
- activeAppData : ActiveAppData | null
119
- }
120
-
121
- export interface CurrentProjectData {
122
- error : ErrorWrapperSource | null
123
- warnings : ErrorWrapperSource [ ]
124
- testingTypeData : CurrentTestingTypeData | null
125
- }
126
-
127
115
export interface CoreDataShape {
128
116
cliBrowser : string | null
129
117
cliTestingType : string | null
@@ -139,25 +127,20 @@ export interface CoreDataShape {
139
127
gqlSocketServer ?: Maybe < SocketIONamespace >
140
128
}
141
129
hasInitializedMode : 'run' | 'open' | null
142
- baseError : ErrorWrapperSource | null
143
130
dashboardGraphQLError : ErrorWrapperSource | null
144
131
dev : DevStateShape
145
132
localSettings : LocalSettingsDataShape
146
133
app : AppDataShape
147
134
currentProject : string | null
148
135
currentProjectGitInfo : GitDataSource | null
149
136
currentTestingType : TestingType | null
150
-
151
- // TODO: Move everything under this container, to make it simpler to reset the data when switching
152
- currentProjectData : CurrentProjectData | null
153
-
137
+ diagnostics : Diagnostics
154
138
wizard : WizardDataShape
155
139
migration : MigrationDataShape
156
140
user : AuthenticatedUserShape | null
157
141
electron : ElectronShape
158
142
authState : AuthStateShape
159
143
scaffoldedFiles : NexusGenObjects [ 'ScaffoldedFile' ] [ ] | null
160
- warnings : ErrorWrapperSource [ ]
161
144
packageManager : typeof PACKAGE_MANAGERS [ number ]
162
145
forceReconfigureProject : ForceReconfigureProjectDataShape | null
163
146
versionData : {
@@ -176,7 +159,6 @@ export function makeCoreData (modeOptions: Partial<AllModeOptions> = {}): CoreDa
176
159
cliTestingType : modeOptions . testingType ?? null ,
177
160
machineBrowsers : null ,
178
161
hasInitializedMode : null ,
179
- baseError : null ,
180
162
dashboardGraphQLError : null ,
181
163
dev : {
182
164
refreshState : null ,
@@ -198,7 +180,7 @@ export function makeCoreData (modeOptions: Partial<AllModeOptions> = {}): CoreDa
198
180
browserOpened : false ,
199
181
} ,
200
182
currentProject : modeOptions . projectRoot ?? null ,
201
- currentProjectData : makeCurrentProjectData ( modeOptions . projectRoot , modeOptions . testingType ) ,
183
+ diagnostics : { error : null , warnings : [ ] } ,
202
184
currentProjectGitInfo : null ,
203
185
currentTestingType : modeOptions . testingType ?? null ,
204
186
wizard : {
@@ -225,7 +207,6 @@ export function makeCoreData (modeOptions: Partial<AllModeOptions> = {}): CoreDa
225
207
shouldAddCustomE2ESpecPattern : false ,
226
208
} ,
227
209
} ,
228
- warnings : [ ] ,
229
210
activeBrowser : null ,
230
211
user : null ,
231
212
electron : {
@@ -238,27 +219,3 @@ export function makeCoreData (modeOptions: Partial<AllModeOptions> = {}): CoreDa
238
219
versionData : null ,
239
220
}
240
221
}
241
-
242
- export function makeCurrentProjectData ( projectRoot : Maybe < string > , testingType : Maybe < TestingType > ) : CurrentProjectData | null {
243
- if ( projectRoot ) {
244
- return {
245
- error : null ,
246
- warnings : [ ] ,
247
- testingTypeData : makeTestingTypeData ( testingType ) ,
248
- }
249
- }
250
-
251
- return null
252
- }
253
-
254
- export function makeTestingTypeData ( testingType : Maybe < TestingType > ) : CurrentTestingTypeData | null {
255
- if ( testingType ) {
256
- return {
257
- error : null ,
258
- warnings : [ ] ,
259
- activeAppData : null ,
260
- }
261
- }
262
-
263
- return null
264
- }
0 commit comments