814c482d6d
A [Vue warn] emitted during the initial mount (e.g. the missing-render- function warn from a root setup() throw) escaped the stderr filter because mount() installed the console patch only after originalMount. Ink patches in its constructor before the first React render (ink.tsx:435-436); move the install before originalMount to match. The mount-throw catch already restores the console via teardown(). Verified red-first against real Ink v7.0.4 (audit e10): Ink's stderr stays empty for a render-throwing component; vue-tui's initial-mount warn reached a real PTY before this fix. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
21 lines
677 B
TypeScript
21 lines
677 B
TypeScript
import { createApp } from "@vue-tui/runtime";
|
|
import { defineComponent } from "vue";
|
|
|
|
// Root setup() throws during the INITIAL mount. In a dev build Vue then emits
|
|
// its "[Vue warn]: Component is missing template or render function." line on
|
|
// stderr. patchConsole is at its default (on) and debug is off, so that warn
|
|
// must be filtered even though it fires during the first mount.
|
|
const App = defineComponent(() => {
|
|
throw new Error("setup boom");
|
|
});
|
|
|
|
const app = createApp(App);
|
|
app.mount();
|
|
|
|
try {
|
|
await app.waitUntilExit();
|
|
console.log("waitUntilExit:resolved");
|
|
} catch (error: unknown) {
|
|
console.log(`waitUntilExit:rejected:${(error as Error).message}`);
|
|
}
|