Skip to content

Commit 820bd43

Browse files
committed
imp: logging from edgedb watch should be forwared
So the user knowns when the schema is failing to compile
1 parent 3f8559d commit 820bd43

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/module.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,20 @@ export default defineNuxtModule<ModuleOptions>({
312312
const matches = input.match(pattern)
313313
return matches || []
314314
}
315+
const excluded_logs = [
316+
'EdgeDB Watch initialized.',
317+
`Monitoring "${resolveProject()}".`,
318+
]
315319

316320
edb_watch_process.stderr!.on('data', async (chunk: string) => {
317321
const content = chunk.toString()
318322
const ddls = extractDDLs(content)
319323
if (ddls.length) {
320324
await generateInterfaces()
321325
await generateQueryBuilder()
322-
success(`Schema changes detected - interface & query builder updated`)
326+
success(`EdgeDB - schema changes detected`)
327+
} else if (!excluded_logs.some( e => content.includes(e))) {
328+
console.log(content)
323329
}
324330
})
325331
success('Running \'edgedb watch\' mode in the background.', true)

0 commit comments

Comments
 (0)