@vint.tri/report_gen_mcp 1.5.21 → 1.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -111,7 +111,7 @@ if (process.argv.length === 2) {
|
|
|
111
111
|
// No command specified, run in stdio mode using MCP SDK
|
|
112
112
|
const mcpServer = new McpServer({
|
|
113
113
|
name: "report_gen_mcp",
|
|
114
|
-
version: "1.5.
|
|
114
|
+
version: "1.5.23"
|
|
115
115
|
}, {
|
|
116
116
|
// Disable health check to prevent automatic calls
|
|
117
117
|
capabilities: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleReport.d.ts","sourceRoot":"","sources":["../../src/tools/simpleReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gBAAgB;;;;;;;mBAON;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"simpleReport.d.ts","sourceRoot":"","sources":["../../src/tools/simpleReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gBAAgB;;;;;;;mBAON;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;iBAiDjC;YAAE,IAAI,EAAE,UAAU,CAAC;YAAC,QAAQ,EAAE;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,EAAE;;CAa7F,CAAC"}
|
|
@@ -38,12 +38,14 @@ export const simpleReportTool = {
|
|
|
38
38
|
const idMatch = match.match(/id="([^"]+)"/);
|
|
39
39
|
const id = idMatch ? idMatch[1] : `image${++imageCount}`;
|
|
40
40
|
try {
|
|
41
|
+
// Using Function constructor as a safer alternative to eval
|
|
41
42
|
const imageConfig = new Function(`return ${imageConfigString.trim()}`)();
|
|
42
43
|
elements[id] = imageConfig;
|
|
43
44
|
return `[[image:${id}]]`;
|
|
44
45
|
}
|
|
45
46
|
catch (error) {
|
|
46
47
|
console.error(`Error parsing image config for id ${id}:`, error);
|
|
48
|
+
// Keep the original tag if parsing fails
|
|
47
49
|
return match;
|
|
48
50
|
}
|
|
49
51
|
});
|