Skip to content

Commit

Permalink
Fix connection message only when server is up
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Oct 3, 2023
1 parent ef18899 commit 8303dcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ export default async function (autoImportPath: string | undefined, options: Opti
repl.prompt()
})

io.on('connection', socket => {

Check warning on line 69 in src/commands/repl.ts

View workflow job for this annotation

GitHub Actions / test

'socket' is defined but never used. Allowed unused args must match /^_/u
logger.info(successDescription('Dynamic diagram available at: ' + bold(`http://localhost:${options.port}`)))
repl.prompt()
})
io.on('connection', socket => {
socket.emit('initDiagram', options)
socket.emit('updateDiagram', getDataDiagram(interpreter))
})
logger.info(successDescription('Dynamic diagram available at: ' + bold(`http://localhost:${options.port}`)))
repl.prompt()
}

export async function initializeInterpreter(autoImportPath: string | undefined, { project, skipValidations }: Options): Promise<Interpreter> {
Expand Down

0 comments on commit 8303dcd

Please sign in to comment.