@insforge/mcp 1.2.4-deployment.5 → 1.2.4-deployment.7
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,7 @@ 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 path from "path";
|
|
10
11
|
import archiver from "archiver";
|
|
11
12
|
|
|
12
13
|
// src/shared/response-handler.ts
|
|
@@ -2028,6 +2029,7 @@ To: Your current project directory
|
|
|
2028
2029
|
},
|
|
2029
2030
|
withUsageTracking("create-deployment", async ({ sourceDirectory, projectSettings, envVars, meta }) => {
|
|
2030
2031
|
try {
|
|
2032
|
+
const resolvedSourceDir = path.resolve(sourceDirectory);
|
|
2031
2033
|
const createResponse = await fetch2(`${API_BASE_URL}/api/deployments`, {
|
|
2032
2034
|
method: "POST",
|
|
2033
2035
|
headers: {
|
|
@@ -2043,18 +2045,29 @@ To: Your current project directory
|
|
|
2043
2045
|
archive.on("data", (chunk) => chunks.push(chunk));
|
|
2044
2046
|
archive.on("end", () => resolve(Buffer.concat(chunks)));
|
|
2045
2047
|
archive.on("error", (err) => reject(err));
|
|
2046
|
-
archive.
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2048
|
+
archive.on("warning", (err) => {
|
|
2049
|
+
console.warn("Archiver warning:", err.message);
|
|
2050
|
+
});
|
|
2051
|
+
const excludePatterns = [
|
|
2052
|
+
"node_modules",
|
|
2053
|
+
".git",
|
|
2054
|
+
".next",
|
|
2055
|
+
"dist",
|
|
2056
|
+
"build",
|
|
2057
|
+
".env.local",
|
|
2058
|
+
".DS_Store"
|
|
2059
|
+
];
|
|
2060
|
+
archive.directory(resolvedSourceDir, false, (entry) => {
|
|
2061
|
+
const normalizedName = entry.name.replace(/\\/g, "/");
|
|
2062
|
+
for (const pattern of excludePatterns) {
|
|
2063
|
+
if (normalizedName.startsWith(pattern + "/") || normalizedName === pattern || normalizedName.endsWith("/" + pattern) || normalizedName.includes("/" + pattern + "/")) {
|
|
2064
|
+
return false;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
if (normalizedName.endsWith(".log")) {
|
|
2068
|
+
return false;
|
|
2069
|
+
}
|
|
2070
|
+
return entry;
|
|
2058
2071
|
});
|
|
2059
2072
|
archive.finalize();
|
|
2060
2073
|
});
|
package/dist/http-server.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED