tsconfig.base.json adds noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on top of strict. Vendored packages opt out of the new flags locally (their tsconfigs are ours to regenerate; their source is not), keeping upstream-sync friendliness. Our code fixed accordingly: index accesses acknowledge undefined (assembler flush cursors, lastTurnNumber); optional properties are omitted instead of set-to-undefined (GenerateResult.usage, ToolDefinition.strict, GenerateOptions.system/tools, error payloads via an errorData helper); Session.onAppend is explicitly `(…) => void | undefined`; tests and examples updated for unused parameters and indexed access.
@cordisjs/plugin-logger-console
Console exporter for the built-in Cordis logger service.
Usage
import { Context } from 'cordis'
import ConsoleLogger from '@cordisjs/plugin-logger-console'
const root = new Context()
await root.plugin(ConsoleLogger, {
showDiff: true,
levels: {
default: 2,
hmr: 3,
},
})
root.logger('app').info('started')
Config
| Field | Description |
|---|---|
colors |
Color support level, or false to disable colors. |
maxLength |
Maximum rendered line length before truncation. |
levels |
Per-logger minimum level map. |
showDiff |
Show elapsed time since the previous message. |
showTime |
Timestamp template. |
label |
Label width, margin, and alignment options. |
The Node entry uses node:util.inspect for %o and %O; the browser entry
passes log arguments through to console.