@insforge/mcp 1.2.4-deployment.4 → 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,14 +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 zipPath = `${tmpdir()}/deployment-${deploymentId}.zip`;
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 } });
2042
+ const chunks = [];
2043
+ archive.on("data", (chunk) => chunks.push(chunk));
2044
+ archive.on("end", () => resolve(Buffer.concat(chunks)));
2045
2045
  archive.on("error", (err) => reject(err));
2046
- output.on("error", (err) => reject(err));
2047
- output.on("close", () => resolve());
2048
- archive.pipe(output);
2049
2046
  archive.glob("**/*", {
2050
2047
  cwd: sourceDirectory,
2051
2048
  ignore: [
@@ -2061,22 +2058,6 @@ To: Your current project directory
2061
2058
  });
2062
2059
  archive.finalize();
2063
2060
  });
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
- })();
2080
2061
  const uploadFormData = new FormData();
2081
2062
  for (const [key, value] of Object.entries(uploadFields)) {
2082
2063
  uploadFormData.append(key, value);
@@ -2094,8 +2075,6 @@ To: Your current project directory
2094
2075
  const uploadError = await uploadResponse.text();
2095
2076
  throw new Error(`Failed to upload zip file: ${uploadError}`);
2096
2077
  }
2097
- await fs.unlink(zipPath).catch(() => {
2098
- });
2099
2078
  const startBody = {};
2100
2079
  if (projectSettings) startBody.projectSettings = projectSettings;
2101
2080
  if (envVars) startBody.envVars = envVars;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-YDPBWOQA.js";
4
+ } from "./chunk-LLO6ZJQR.js";
5
5
 
6
6
  // src/http/server.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-YDPBWOQA.js";
4
+ } from "./chunk-LLO6ZJQR.js";
5
5
 
6
6
  // src/stdio/index.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/mcp",
3
- "version": "1.2.4-deployment.4",
3
+ "version": "1.2.4-deployment.5",
4
4
  "description": "MCP (Model Context Protocol) server for Insforge backend-as-a-service",
5
5
  "mcpName": "io.github.InsForge/insforge-mcp",
6
6
  "type": "module",