Skip to content

Commit 2d684f6

Browse files
committed
fix: send server ready signal again
1 parent ca1e7e4 commit 2d684f6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/lib/watcher/runner.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ require('../tty-linker').create().child.install()
55
import { rootLogger } from '../nexus-logger'
66
import hook from './hook'
77
import * as IPC from './ipc'
8+
import * as DevMode from '../../runtime/dev-mode'
89

910
const log = rootLogger.child('dev').child('runner')
1011

@@ -16,7 +17,7 @@ async function main() {
1617
}
1718

1819
// Enable dev mode code paths for IPC interaction
19-
process.env.NEXUS_DEV_MODE = 'true'
20+
process.env[DevMode.DEV_MODE_ENV_VAR_NAME] = 'true'
2021

2122
// TODO perhaps we should move these unhandled error/rejections
2223
// to start module because we probably want them just as much from production as

src/runtime/dev-mode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { fatal } from '../lib/process'
1515
/**
1616
* Data
1717
*/
18-
const DEV_MODE_ENV_VAR_NAME = 'NEXUS_DEV_MODE'
18+
export const DEV_MODE_ENV_VAR_NAME = 'NEXUS_DEV_MODE'
1919

2020
/**
2121
* Eager integrity check.

src/runtime/server/server.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as Net from 'net'
66
import stripAnsi from 'strip-ansi'
77
import * as Plugin from '../../lib/plugin'
88
import { AppState } from '../app'
9+
import * as DevMode from '../dev-mode'
910
import { ContextContributor } from '../schema/schema'
1011
import { log } from './logger'
1112
import { createRequestHandlerPlayground } from './request-handler-playground'
@@ -88,6 +89,7 @@ export function create(appState: AppState) {
8889
path: settings.data.path,
8990
playgroundPath: settings.data.playground ? settings.data.playground.path : undefined,
9091
})
92+
DevMode.sendServerReadySignalToDevModeMaster()
9193
},
9294
async stop() {
9395
if (!state.running) {

0 commit comments

Comments
 (0)