@manfred-kunze-dev/backbone-mcp-server 2.7.0-dev.1 → 2.7.0-dev.3
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/tools/conversion.js +3 -3
- package/package.json +1 -1
package/dist/tools/conversion.js
CHANGED
|
@@ -66,12 +66,12 @@ export function register(server, client) {
|
|
|
66
66
|
if (src.type === "url") {
|
|
67
67
|
if (!src.url)
|
|
68
68
|
throw new Error("url is required for type='url'");
|
|
69
|
-
apiSources.push({ kind: "
|
|
69
|
+
apiSources.push({ kind: "http", url: src.url });
|
|
70
70
|
}
|
|
71
71
|
else if (src.type === "base64") {
|
|
72
72
|
if (!src.data || !src.filename)
|
|
73
73
|
throw new Error("data and filename are required for type='base64'");
|
|
74
|
-
apiSources.push({ kind: "
|
|
74
|
+
apiSources.push({ kind: "base64", content: src.data, filename: src.filename, mimeType: getMimeType(src.filename) });
|
|
75
75
|
}
|
|
76
76
|
else if (src.type === "file") {
|
|
77
77
|
const filePath = src.path ?? src.filename;
|
|
@@ -80,7 +80,7 @@ export function register(server, client) {
|
|
|
80
80
|
const fileBuffer = await readFile(filePath);
|
|
81
81
|
const b64 = fileBuffer.toString("base64");
|
|
82
82
|
const name = src.filename ?? basename(filePath);
|
|
83
|
-
apiSources.push({ kind: "
|
|
83
|
+
apiSources.push({ kind: "base64", content: b64, filename: name, mimeType: getMimeType(name) });
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
const body = {
|