dsh --dump-config and dsh web --dump-config compose the shipped base, the surface overlay, and the --config or personal overlay — exactly the layers that surface boots — and print the entry list as YAML without booting; --dump-default-config stops at the surface overlay so the two outputs diff to precisely the user layer's effect. The dump shares the mounting code: the vendored include exports its patch algorithm as applyEntryPatches() and its !!js dialect as entryListSchema (logged in vendor/README.md), dsh-app-boot's renderConfigDump() composes and renders through both (and now imports the dialect instead of duplicating it), and the CLI adds a thin dump-config mode. !!js expressions print verbatim; unmatched patches warn on stderr; boot-only flags are rejected alongside the dump flags. (cherry picked from commit 1fdbebfa8a5dc7df840d53666320064a7e3dae59)
@cordisjs/plugin-include
File-backed loader tree for Cordis. The include plugin reads a YAML or JSON file, turns it into loader entries, and writes updates back when the file is writable.
Usage
import { Context } from 'cordis'
import Loader from '@cordisjs/plugin-loader'
import Include from '@cordisjs/plugin-include'
const root = new Context()
await root.plugin(Loader, { baseUrl: import.meta.url })
await root.plugin(Include, {
path: './cordis.yml',
initial: [],
enableLogs: true,
})
Example cordis.yml:
- id: timer
name: '@cordisjs/plugin-timer'
- id: app
name: ./plugins/app
config:
message: hello
Config
| Field | Description |
|---|---|
path |
YAML or JSON file path resolved from ctx.baseUrl. |
initial |
Entry list written when the file is missing. |
patches |
Runtime patches applied after reading the file. |
enableLogs |
Enables loader apply, reload, and unload logs. |
Patches can insert entries or override fields on entries with a matching id.