@drop2run/mcp 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -860,8 +860,11 @@ async function publish(credentials, source, site, onProgress, subdomain) {
860
860
  });
861
861
  return { url, siteId: target.siteId, subdomain: target.subdomain, files, unchanged };
862
862
  }
863
- function publishDirectory(credentials, directory, site, onProgress, subdomain) {
864
- return publish(credentials, directorySource(directory), site, onProgress, subdomain);
863
+ async function publishDirectory(credentials, directory, site, onProgress, subdomain) {
864
+ const found = await stat(directory).catch(() => null);
865
+ if (found === null) throw new Error(`There is no folder at ${directory}.`);
866
+ if (!found.isDirectory()) throw new Error(`${directory} is a file, not a folder to publish.`);
867
+ return await publish(credentials, directorySource(directory), site, onProgress, subdomain);
865
868
  }
866
869
  function cleanPath(path) {
867
870
  const cleaned = path.trim().replaceAll("\\", "/").replace(/^\.?\//, "");
@@ -1064,7 +1067,7 @@ async function signInWithCode(waitSeconds, replace = false) {
1064
1067
  "Call this tool again to keep waiting. Nothing has been changed yet."
1065
1068
  ].join("\n");
1066
1069
  }
1067
- const SERVER_VERSION = "0.5.0";
1070
+ const SERVER_VERSION = "0.5.1";
1068
1071
  const CREDENTIAL_WRITE = {
1069
1072
  readOnlyHint: false,
1070
1073
  destructiveHint: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drop2run/mcp",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "MCP server that publishes a folder or an HTML page to Drop2Run and returns a live URL.",
5
5
  "mcpName": "run.dropto/drop2run",
6
6
  "license": "MIT",