@@ -186,18 +186,25 @@ export const workspaceMachine = createMachine(
186
186
id : "refreshWorkspace" ,
187
187
src : "refreshWorkspace" ,
188
188
onDone : [
189
- { cond : "jobSucceeded" , target : "#workspaceState.ready.build.started" , actions : [ "clearBuildError" , "assignWorkspace" ] } ,
189
+ {
190
+ cond : "jobSucceeded" ,
191
+ target : "#workspaceState.ready.build.started" ,
192
+ actions : [ "clearBuildError" , "assignWorkspace" ] ,
193
+ } ,
190
194
{ cond : "jobPendingOrRunning" , target : "waiting" , actions : "assignWorkspace" } ,
191
- { target : "#workspaceState.ready.build.error" , actions : [ "assignWorkspace" , "assignBuildError" ] }
195
+ {
196
+ target : "#workspaceState.ready.build.error" ,
197
+ actions : [ "assignWorkspace" , "assignBuildError" ] ,
198
+ } ,
192
199
] ,
193
- onError : { target : "waiting" , actions : "assignRefreshWorkspaceError" }
194
- }
200
+ onError : { target : "waiting" , actions : "assignRefreshWorkspaceError" } ,
201
+ } ,
195
202
} ,
196
203
waiting : {
197
204
after : {
198
- 1000 : "refreshingWorkspace"
199
- }
200
- }
205
+ 1000 : "refreshingWorkspace" ,
206
+ } ,
207
+ } ,
201
208
} ,
202
209
tags : [ "buildLoading" , "starting" ] ,
203
210
} ,
@@ -210,18 +217,25 @@ export const workspaceMachine = createMachine(
210
217
id : "refreshWorkspace" ,
211
218
src : "refreshWorkspace" ,
212
219
onDone : [
213
- { cond : "jobSucceeded" , target : "#workspaceState.ready.build.stopped" , actions : [ "clearBuildError" , "assignWorkspace" ] } ,
220
+ {
221
+ cond : "jobSucceeded" ,
222
+ target : "#workspaceState.ready.build.stopped" ,
223
+ actions : [ "clearBuildError" , "assignWorkspace" ] ,
224
+ } ,
214
225
{ cond : "jobPendingOrRunning" , target : "waiting" , actions : "assignWorkspace" } ,
215
- { target : "#workspaceState.ready.build.error" , actions : [ "assignWorkspace" , "assignBuildError" ] }
226
+ {
227
+ target : "#workspaceState.ready.build.error" ,
228
+ actions : [ "assignWorkspace" , "assignBuildError" ] ,
229
+ } ,
216
230
] ,
217
- onError : { target : "waiting" , actions : "assignRefreshWorkspaceError" }
218
- }
231
+ onError : { target : "waiting" , actions : "assignRefreshWorkspaceError" } ,
232
+ } ,
219
233
} ,
220
234
waiting : {
221
235
after : {
222
- 1000 : "refreshingWorkspace"
223
- }
224
- }
236
+ 1000 : "refreshingWorkspace" ,
237
+ } ,
238
+ } ,
225
239
} ,
226
240
tags : [ "buildLoading" , "stopping" ] ,
227
241
} ,
@@ -289,12 +303,14 @@ export const workspaceMachine = createMachine(
289
303
assign ( {
290
304
buildError : undefined ,
291
305
} ) ,
292
- assignRefreshWorkspaceError : ( _ , event ) => assign ( {
293
- refreshWorkspaceError : event . data
294
- } ) ,
295
- clearRefreshWorkspaceError : ( _ ) => assign ( {
296
- refreshWorkspaceError : undefined
297
- } )
306
+ assignRefreshWorkspaceError : ( _ , event ) =>
307
+ assign ( {
308
+ refreshWorkspaceError : event . data ,
309
+ } ) ,
310
+ clearRefreshWorkspaceError : ( _ ) =>
311
+ assign ( {
312
+ refreshWorkspaceError : undefined ,
313
+ } ) ,
298
314
} ,
299
315
guards : {
300
316
workspaceIsStarted : ( context ) =>
0 commit comments