@insforge/mcp 1.2.4-deployment.3 → 1.2.4-deployment.4
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.
|
@@ -2042,8 +2042,9 @@ To: Your current project directory
|
|
|
2042
2042
|
await new Promise((resolve, reject) => {
|
|
2043
2043
|
const output = createWriteStream(zipPath);
|
|
2044
2044
|
const archive = archiver("zip", { zlib: { level: 9 } });
|
|
2045
|
-
output.on("close", () => resolve());
|
|
2046
2045
|
archive.on("error", (err) => reject(err));
|
|
2046
|
+
output.on("error", (err) => reject(err));
|
|
2047
|
+
output.on("close", () => resolve());
|
|
2047
2048
|
archive.pipe(output);
|
|
2048
2049
|
archive.glob("**/*", {
|
|
2049
2050
|
cwd: sourceDirectory,
|
|
@@ -2060,7 +2061,22 @@ To: Your current project directory
|
|
|
2060
2061
|
});
|
|
2061
2062
|
archive.finalize();
|
|
2062
2063
|
});
|
|
2063
|
-
const zipBuffer = await
|
|
2064
|
+
const zipBuffer = await (async () => {
|
|
2065
|
+
const maxRetries = 3;
|
|
2066
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
2067
|
+
try {
|
|
2068
|
+
return await fs.readFile(zipPath);
|
|
2069
|
+
} catch (err) {
|
|
2070
|
+
const isEBUSY = err instanceof Error && "code" in err && err.code === "EBUSY";
|
|
2071
|
+
if (isEBUSY && attempt < maxRetries - 1) {
|
|
2072
|
+
await new Promise((r) => setTimeout(r, 100 * (attempt + 1)));
|
|
2073
|
+
continue;
|
|
2074
|
+
}
|
|
2075
|
+
throw err;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
throw new Error("Failed to read zip file after retries");
|
|
2079
|
+
})();
|
|
2064
2080
|
const uploadFormData = new FormData();
|
|
2065
2081
|
for (const [key, value] of Object.entries(uploadFields)) {
|
|
2066
2082
|
uploadFormData.append(key, value);
|
package/dist/http-server.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED