@insforge/mcp 1.2.4-deployment.3 → 1.2.4-deployment.5
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.
|
@@ -7,7 +7,6 @@ import { promises as fs } from "fs";
|
|
|
7
7
|
import { exec } from "child_process";
|
|
8
8
|
import { promisify } from "util";
|
|
9
9
|
import { tmpdir } from "os";
|
|
10
|
-
import { createWriteStream } from "fs";
|
|
11
10
|
import archiver from "archiver";
|
|
12
11
|
|
|
13
12
|
// src/shared/response-handler.ts
|
|
@@ -2038,13 +2037,12 @@ To: Your current project directory
|
|
|
2038
2037
|
});
|
|
2039
2038
|
const createResult = await handleApiResponse(createResponse);
|
|
2040
2039
|
const { id: deploymentId, uploadUrl, uploadFields } = createResult;
|
|
2041
|
-
const
|
|
2042
|
-
await new Promise((resolve, reject) => {
|
|
2043
|
-
const output = createWriteStream(zipPath);
|
|
2040
|
+
const zipBuffer = await new Promise((resolve, reject) => {
|
|
2044
2041
|
const archive = archiver("zip", { zlib: { level: 9 } });
|
|
2045
|
-
|
|
2042
|
+
const chunks = [];
|
|
2043
|
+
archive.on("data", (chunk) => chunks.push(chunk));
|
|
2044
|
+
archive.on("end", () => resolve(Buffer.concat(chunks)));
|
|
2046
2045
|
archive.on("error", (err) => reject(err));
|
|
2047
|
-
archive.pipe(output);
|
|
2048
2046
|
archive.glob("**/*", {
|
|
2049
2047
|
cwd: sourceDirectory,
|
|
2050
2048
|
ignore: [
|
|
@@ -2060,7 +2058,6 @@ To: Your current project directory
|
|
|
2060
2058
|
});
|
|
2061
2059
|
archive.finalize();
|
|
2062
2060
|
});
|
|
2063
|
-
const zipBuffer = await fs.readFile(zipPath);
|
|
2064
2061
|
const uploadFormData = new FormData();
|
|
2065
2062
|
for (const [key, value] of Object.entries(uploadFields)) {
|
|
2066
2063
|
uploadFormData.append(key, value);
|
|
@@ -2078,8 +2075,6 @@ To: Your current project directory
|
|
|
2078
2075
|
const uploadError = await uploadResponse.text();
|
|
2079
2076
|
throw new Error(`Failed to upload zip file: ${uploadError}`);
|
|
2080
2077
|
}
|
|
2081
|
-
await fs.unlink(zipPath).catch(() => {
|
|
2082
|
-
});
|
|
2083
2078
|
const startBody = {};
|
|
2084
2079
|
if (projectSettings) startBody.projectSettings = projectSettings;
|
|
2085
2080
|
if (envVars) startBody.envVars = envVars;
|
package/dist/http-server.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED