@imenam/mcp-documentor 1.0.51 → 1.0.52

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.
@@ -585,7 +585,7 @@ app.post("/api/images", async (c) => {
585
585
  const finalName = resolveImageFilename(assetsDir, file.name ?? "image");
586
586
  const buffer = Buffer.from(await file.arrayBuffer());
587
587
  fs.writeFileSync(path.join(assetsDir, finalName), buffer);
588
- return c.json({ url: `/api/images/${project}/${finalName}`, filename: finalName });
588
+ return c.json({ url: `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(finalName)}`, filename: finalName });
589
589
  });
590
590
  app.get("/api/images/:project", (c) => {
591
591
  const project = c.req.param("project");
@@ -593,7 +593,7 @@ app.get("/api/images/:project", (c) => {
593
593
  if (!fs.existsSync(assetsDir))
594
594
  return c.json([]);
595
595
  const files = fs.readdirSync(assetsDir).filter((f) => /\.(png|jpe?g|gif|webp|svg)$/i.test(f));
596
- return c.json(files.map((f) => ({ filename: f, url: `/api/images/${project}/${f}` })));
596
+ return c.json(files.map((f) => ({ filename: f, url: `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(f)}` })));
597
597
  });
598
598
  app.get("/api/images/:project/:filename", (c) => {
599
599
  const project = c.req.param("project");
@@ -36,7 +36,7 @@ export async function uploadImage(storageEngine, args) {
36
36
  fs.mkdirSync(assetsDir, { recursive: true });
37
37
  const finalName = resolveFilename(assetsDir, validated.filename);
38
38
  fs.copyFileSync(validated.filePath, path.join(assetsDir, finalName));
39
- const url = `/api/images/${project}/${finalName}`;
39
+ const url = `/api/images/${encodeURIComponent(project)}/${encodeURIComponent(finalName)}`;
40
40
  const alt = validated.alt ?? "";
41
41
  const markdownLink = `![${alt}](${url})`;
42
42
  return {
@@ -1 +1 @@
1
- export declare const APP_VERSION = "1.0.51";
1
+ export declare const APP_VERSION = "1.0.52";
@@ -1,2 +1,2 @@
1
1
  // Auto-generated version file - do not edit manually
2
- export const APP_VERSION = '1.0.51';
2
+ export const APP_VERSION = '1.0.52';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imenam/mcp-documentor",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "main": "dist/src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",