@@ -112,15 +112,16 @@ export async function devCommand(dir: string, options: DevCommandOptions) {
112
112
return ;
113
113
}
114
114
115
- const devInstance = await startDev ( dir , options , authorization . auth ) ;
115
+ const devInstance = await startDev ( dir , options , authorization . auth , authorization . dashboardUrl ) ;
116
116
const { waitUntilExit } = devInstance . devReactElement ;
117
117
await waitUntilExit ( ) ;
118
118
}
119
119
120
120
async function startDev (
121
121
dir : string ,
122
122
options : DevCommandOptions ,
123
- authorization : { apiUrl : string ; accessToken : string }
123
+ authorization : { apiUrl : string ; accessToken : string } ,
124
+ dashboardUrl : string
124
125
) {
125
126
let rerender : ( node : React . ReactNode ) => void | undefined ;
126
127
@@ -174,6 +175,7 @@ async function startDev(
174
175
175
176
return (
176
177
< DevUI
178
+ dashboardUrl = { dashboardUrl }
177
179
config = { configParam }
178
180
apiUrl = { apiUrl }
179
181
apiKey = { devEnv . data . apiKey }
@@ -209,6 +211,7 @@ async function startDev(
209
211
210
212
type DevProps = {
211
213
config : ResolvedConfig ;
214
+ dashboardUrl : string ;
212
215
apiUrl : string ;
213
216
apiKey : string ;
214
217
environmentClient : CliApiClient ;
@@ -220,6 +223,7 @@ type DevProps = {
220
223
221
224
function useDev ( {
222
225
config,
226
+ dashboardUrl,
223
227
apiUrl,
224
228
apiKey,
225
229
environmentClient,
@@ -251,7 +255,7 @@ function useDev({
251
255
} ) ;
252
256
253
257
const backgroundWorkerCoordinator = new BackgroundWorkerCoordinator (
254
- `${ apiUrl } /projects/v3/${ config . project } `
258
+ `${ dashboardUrl } /projects/v3/${ config . project } `
255
259
) ;
256
260
257
261
websocket . addEventListener ( "open" , async ( event ) => { } ) ;
0 commit comments