debug
This commit is contained in:
@@ -160,14 +160,29 @@ export function tui(input: {
|
||||
}
|
||||
|
||||
const renderer = await createCliRenderer(rendererConfig(input.config))
|
||||
const registry = createSolidSlotRegistry<TuiSlotMap, TuiSlotContext>(renderer, {
|
||||
url: input.url,
|
||||
directory: input.directory,
|
||||
})
|
||||
const registry = createSolidSlotRegistry<TuiSlotMap, TuiSlotContext>(
|
||||
renderer,
|
||||
{
|
||||
url: input.url,
|
||||
directory: input.directory,
|
||||
},
|
||||
{
|
||||
onPluginError(event) {
|
||||
console.error("[tui.slot] plugin error", {
|
||||
plugin: event.pluginId,
|
||||
slot: event.slot,
|
||||
phase: event.phase,
|
||||
source: event.source,
|
||||
message: event.error.message,
|
||||
})
|
||||
},
|
||||
},
|
||||
)
|
||||
const Slot = createSlot<TuiSlotMap, TuiSlotContext>(registry)
|
||||
const slot: TuiSlot = (props) => Slot(props)
|
||||
const slots: TuiSlots = {
|
||||
register(plugin) {
|
||||
console.error("[tui.slot] register", plugin.id)
|
||||
return registry.register(plugin as SolidPlugin<TuiSlotMap, TuiSlotContext>)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ export namespace TuiPlugin {
|
||||
const plugin = slot(entry)
|
||||
if (plugin) {
|
||||
input.slots.register(plugin)
|
||||
log.info("registered tui slot plugin", { id: plugin.id })
|
||||
}
|
||||
|
||||
const tui = (() => {
|
||||
@@ -97,6 +98,7 @@ export namespace TuiPlugin {
|
||||
})()
|
||||
if (!tui) continue
|
||||
await tui(input, Config.pluginOptions(item))
|
||||
log.info("initialized tui plugin module", { path: spec })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user