File tree Expand file tree Collapse file tree 1 file changed +8
-41
lines changed Expand file tree Collapse file tree 1 file changed +8
-41
lines changed Original file line number Diff line number Diff line change @@ -50,21 +50,13 @@ function delay(ms: number): Promise<void> {
50
50
}
51
51
52
52
async function runWebClient ( args : Args ) : Promise < void > {
53
- const inspectorServerPath = resolve (
54
- __dirname ,
55
- "../../" ,
56
- "server" ,
57
- "build" ,
58
- "index.js" ,
59
- ) ;
60
-
61
53
// Path to the client entry point
62
54
const inspectorClientPath = resolve (
63
55
__dirname ,
64
56
"../../" ,
65
57
"client" ,
66
58
"bin" ,
67
- "client .js" ,
59
+ "start .js" ,
68
60
) ;
69
61
70
62
const CLIENT_PORT : string = process . env . CLIENT_PORT ?? "6274" ;
@@ -83,38 +75,13 @@ async function runWebClient(args: Args): Promise<void> {
83
75
let serverOk : unknown ;
84
76
85
77
try {
86
- server = spawnPromise (
87
- "node" ,
88
- [
89
- inspectorServerPath ,
90
- ...( args . command ? [ `--env` , args . command ] : [ ] ) ,
91
- ...( args . args ? [ `--args=${ args . args . join ( " " ) } ` ] : [ ] ) ,
92
- ] ,
93
- {
94
- env : {
95
- ...process . env ,
96
- PORT : SERVER_PORT ,
97
- MCP_ENV_VARS : JSON . stringify ( args . envArgs ) ,
98
- } ,
99
- signal : abort . signal ,
100
- echoOutput : true ,
101
- } ,
102
- ) ;
103
-
104
- // Make sure server started before starting client
105
- serverOk = await Promise . race ( [ server , delay ( 2 * 1000 ) ] ) ;
106
- } catch ( error ) { }
107
-
108
- if ( serverOk ) {
109
- try {
110
- await spawnPromise ( "node" , [ inspectorClientPath ] , {
111
- env : { ...process . env , PORT : CLIENT_PORT } ,
112
- signal : abort . signal ,
113
- echoOutput : true ,
114
- } ) ;
115
- } catch ( e ) {
116
- if ( ! cancelled || process . env . DEBUG ) throw e ;
117
- }
78
+ await spawnPromise ( "node" , [ inspectorClientPath ] , {
79
+ env : { ...process . env , PORT : CLIENT_PORT } ,
80
+ signal : abort . signal ,
81
+ echoOutput : true ,
82
+ } ) ;
83
+ } catch ( e ) {
84
+ if ( ! cancelled || process . env . DEBUG ) throw e ;
118
85
}
119
86
}
120
87
You can’t perform that action at this time.
0 commit comments