@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.
- package/dist/index.js +6 -3
- 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
|
-
|
|
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.
|
|
1070
|
+
const SERVER_VERSION = "0.5.1";
|
|
1068
1071
|
const CREDENTIAL_WRITE = {
|
|
1069
1072
|
readOnlyHint: false,
|
|
1070
1073
|
destructiveHint: false,
|