File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
plugins/mcp-metadata-plugin/src Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ const config: Config = {
2323 './plugins/mcp-metadata-plugin' ,
2424 {
2525 thvCommand : 'thv' , // Can be customized if thv is in a different path
26+ failOnError :
27+ process . env . NODE_ENV === 'production' || process . env . CI === 'true' ,
2628 } ,
2729 ] ,
2830 ] ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default function mcpMetadataPlugin(
1414 context : LoadContext ,
1515 options : PluginOptions = { }
1616) : Plugin < PluginContent > {
17- const { thvCommand = 'thv' } = options ;
17+ const { thvCommand = 'thv' , failOnError = false } = options ;
1818
1919 return {
2020 name : 'mcp-metadata-plugin' ,
@@ -53,6 +53,11 @@ export default function mcpMetadataPlugin(
5353 `Failed to fetch data for MCP server: ${ serverName } ` ,
5454 error
5555 ) ;
56+
57+ if ( failOnError ) {
58+ throw error ; // This will fail the build
59+ }
60+
5661 // Store error message as fallback
5762 serverData [ serverName ] = `# Error fetching data for ${ serverName }
5863# ${ error . message }
Original file line number Diff line number Diff line change 33
44export interface PluginOptions {
55 thvCommand ?: string ; // Custom thv command path
6+ failOnError ?: boolean ; // Whether to fail the build on thv command errors
67}
78
89export interface PluginContent {
You can’t perform that action at this time.
0 commit comments