@insforge/mcp 1.2.4-deployment.2 → 1.2.4-deployment.3

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,6 +7,8 @@ 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
+ import archiver from "archiver";
10
12
 
11
13
  // src/shared/response-handler.ts
12
14
  async function handleApiResponse(response) {
@@ -2037,16 +2039,27 @@ To: Your current project directory
2037
2039
  const createResult = await handleApiResponse(createResponse);
2038
2040
  const { id: deploymentId, uploadUrl, uploadFields } = createResult;
2039
2041
  const zipPath = `${tmpdir()}/deployment-${deploymentId}.zip`;
2040
- const excludePatterns = [
2041
- "node_modules/*",
2042
- ".git/*",
2043
- ".next/*",
2044
- "dist/*",
2045
- ".env.local",
2046
- ".DS_Store"
2047
- ];
2048
- const excludeArgs = excludePatterns.map((p) => `-x "${p}"`).join(" ");
2049
- await execAsync(`cd "${sourceDirectory}" && zip -r "${zipPath}" . ${excludeArgs}`);
2042
+ await new Promise((resolve, reject) => {
2043
+ const output = createWriteStream(zipPath);
2044
+ const archive = archiver("zip", { zlib: { level: 9 } });
2045
+ output.on("close", () => resolve());
2046
+ archive.on("error", (err) => reject(err));
2047
+ archive.pipe(output);
2048
+ archive.glob("**/*", {
2049
+ cwd: sourceDirectory,
2050
+ ignore: [
2051
+ "node_modules/**",
2052
+ ".git/**",
2053
+ ".next/**",
2054
+ "dist/**",
2055
+ ".env.local",
2056
+ ".DS_Store"
2057
+ ],
2058
+ dot: true
2059
+ // Include dotfiles like .env
2060
+ });
2061
+ archive.finalize();
2062
+ });
2050
2063
  const zipBuffer = await fs.readFile(zipPath);
2051
2064
  const uploadFormData = new FormData();
2052
2065
  for (const [key, value] of Object.entries(uploadFields)) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-CMGN6RVN.js";
4
+ } from "./chunk-M4J6OPOS.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-CMGN6RVN.js";
4
+ } from "./chunk-M4J6OPOS.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.2",
3
+ "version": "1.2.4-deployment.3",
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",
@@ -39,6 +39,7 @@
39
39
  "@insforge/shared-schemas": "1.1.37-deployment.1",
40
40
  "@modelcontextprotocol/sdk": "^1.15.1",
41
41
  "@types/express": "^5.0.3",
42
+ "archiver": "^7.0.1",
42
43
  "commander": "^14.0.0",
43
44
  "express": "^5.1.0",
44
45
  "form-data": "^4.0.4",
@@ -46,6 +47,7 @@
46
47
  "zod": "^3.23.8"
47
48
  },
48
49
  "devDependencies": {
50
+ "@types/archiver": "^7.0.0",
49
51
  "@types/node": "^20.10.5",
50
52
  "rimraf": "^5.0.5",
51
53
  "tsup": "^8.5.0",