File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
packages/skott/src/rendering/terminal Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,6 @@ node_modules
22.pnpm-debug.log
33.pnpm-store
44.DS_Store
5- .npmrc
5+ .npmrc
6+ .idea
7+ .claude
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export async function renderStaticFile(
1414 try {
1515 const require = createRequire ( import . meta. url ) ;
1616 const pluginPath = require . resolve ( "@skottorg/static-file-plugin" ) ;
17+
1718 const { generateStaticFile, supportedStaticFileTypes } = await import (
1819 pluginPath
1920 ) ;
Original file line number Diff line number Diff line change @@ -21,10 +21,22 @@ export const defaultTerminalConfig: TerminalConfig = {
2121
2222const terminalSchema = D . struct ( {
2323 watch : D . boolean ,
24- // Allow any string so that plugin-provided display modes (e.g. "json") are
25- // not rejected at validation time. Unknown modes are forwarded to the
26- // static-file plugin at runtime.
27- displayMode : D . string ,
24+ displayMode : D . union (
25+ D . literal ( "raw" ) ,
26+ D . literal ( "file-tree" ) ,
27+ D . literal ( "graph" ) ,
28+ D . literal ( "webapp" ) ,
29+ /**
30+ * Those could be coming from `@skottorg/static-file-plugin`.
31+ * We want to allow them since there is no way to register additional display
32+ * modes using plugins. This is a workaround to reduce friction but should be
33+ * addressed in the future by allowing plugins to register additional display modes.
34+ */
35+ D . literal ( "md" ) ,
36+ D . literal ( "json" ) ,
37+ D . literal ( "svg" ) ,
38+ D . literal ( "png" )
39+ ) ,
2840 showCircularDependencies : D . boolean ,
2941 showUnusedDependencies : D . boolean ,
3042 exitCodeOnCircularDependencies : D . number
You can’t perform that action at this time.
0 commit comments