@fluentcommerce/fluent-mcp-extn 0.3.1 → 0.3.2
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/settings-tools.js +8 -0
- package/package.json +1 -1
package/dist/settings-tools.js
CHANGED
|
@@ -436,6 +436,10 @@ export async function handleSettingGet(args, ctx) {
|
|
|
436
436
|
catch {
|
|
437
437
|
// Not JSON — write as-is
|
|
438
438
|
}
|
|
439
|
+
// Safety guard — ensure fileContent is always a string (lobValue may be Object)
|
|
440
|
+
if (typeof fileContent !== "string") {
|
|
441
|
+
fileContent = JSON.stringify(fileContent, null, 2);
|
|
442
|
+
}
|
|
439
443
|
// Ensure parent directory exists
|
|
440
444
|
const dir = path.dirname(parsed.outputFile);
|
|
441
445
|
fs.mkdirSync(dir, { recursive: true });
|
|
@@ -475,6 +479,10 @@ export async function handleSettingGet(args, ctx) {
|
|
|
475
479
|
catch {
|
|
476
480
|
// Not JSON — write as-is
|
|
477
481
|
}
|
|
482
|
+
// Safety guard — ensure fileContent is always a string (lobValue may be Object)
|
|
483
|
+
if (typeof fileContent !== "string") {
|
|
484
|
+
fileContent = JSON.stringify(fileContent, null, 2);
|
|
485
|
+
}
|
|
478
486
|
const safeName = setting.name.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
479
487
|
const filePath = path.join(outputDir, `${safeName}.json`);
|
|
480
488
|
fs.writeFileSync(filePath, fileContent, "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentcommerce/fluent-mcp-extn",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "MCP (Model Context Protocol) extension server for Fluent Commerce. Exposes event dispatch, transition actions, GraphQL execution, Prometheus metrics, batch ingestion, and webhook validation as MCP tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|