@insforge/mcp 1.2.4-deployment.1 → 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) {
@@ -744,9 +746,7 @@ var realtimePermissionsResponseSchema = z8.object({
744
746
  });
745
747
 
746
748
  // node_modules/@insforge/shared-schemas/dist/metadata.schema.js
747
- var authMetadataSchema = z9.object({
748
- oauths: z9.array(oAuthConfigSchema)
749
- });
749
+ var authMetadataSchema = getPublicAuthConfigResponseSchema;
750
750
  var databaseMetadataSchema = z9.object({
751
751
  tables: z9.array(z9.object({
752
752
  tableName: z9.string(),
@@ -1079,23 +1079,27 @@ var cloudEventSchema = z16.discriminatedUnion("type", [
1079
1079
  import { z as z17 } from "zod";
1080
1080
  var docTypeSchema = z17.enum([
1081
1081
  "instructions",
1082
+ "auth-sdk",
1082
1083
  "db-sdk",
1083
1084
  "storage-sdk",
1084
1085
  "functions-sdk",
1085
1086
  "ai-integration-sdk",
1086
1087
  "auth-components-react",
1087
1088
  "auth-components-nextjs",
1088
- "real-time"
1089
+ "real-time",
1090
+ "deployment"
1089
1091
  ]).describe(`
1090
- Documentation type:
1092
+ Documentation type:
1091
1093
  "instructions" (essential backend setup - use FIRST),
1092
1094
  "db-sdk" (database operations),
1093
1095
  "storage-sdk" (file storage),
1094
1096
  "functions-sdk" (edge functions),
1097
+ "auth-sdk" (direct SDK methods for custom auth flows),
1095
1098
  "auth-components-react" (authentication components for React+Vite applications),
1096
1099
  "auth-components-nextjs" (authentication components for Next.js applications),
1097
1100
  "ai-integration-sdk" (AI features),
1098
- "real-time" (real-time pub/sub through WebSockets)
1101
+ "real-time" (real-time pub/sub through WebSockets),
1102
+ "deployment" (deploy frontend applications via MCP tool)
1099
1103
  `);
1100
1104
 
1101
1105
  // node_modules/@insforge/shared-schemas/dist/email-api.schema.js
@@ -1135,7 +1139,7 @@ var deploymentStatusSchema = z19.enum([
1135
1139
  ]);
1136
1140
  var deploymentSchema = z19.object({
1137
1141
  id: z19.string().uuid(),
1138
- deploymentId: z19.string().nullable(),
1142
+ providerDeploymentId: z19.string().nullable(),
1139
1143
  // Provider's deployment ID, null until deployment starts
1140
1144
  provider: z19.string(),
1141
1145
  status: deploymentStatusSchema,
@@ -2018,7 +2022,7 @@ To: Your current project directory
2018
2022
  );
2019
2023
  server.tool(
2020
2024
  "create-deployment",
2021
- "Deploy source code from a directory. Zips files, uploads to cloud storage, and triggers deployment with optional environment variables and project settings.",
2025
+ "Deploy source code from a directory. This tool zips files, uploads to cloud storage, and triggers deployment with optional environment variables and project settings.",
2022
2026
  {
2023
2027
  sourceDirectory: z21.string().describe("Path to the source directory containing files to deploy"),
2024
2028
  ...startDeploymentRequestSchema.shape
@@ -2035,16 +2039,27 @@ To: Your current project directory
2035
2039
  const createResult = await handleApiResponse(createResponse);
2036
2040
  const { id: deploymentId, uploadUrl, uploadFields } = createResult;
2037
2041
  const zipPath = `${tmpdir()}/deployment-${deploymentId}.zip`;
2038
- const excludePatterns = [
2039
- "node_modules/*",
2040
- ".git/*",
2041
- ".next/*",
2042
- "dist/*",
2043
- ".env.local",
2044
- ".DS_Store"
2045
- ];
2046
- const excludeArgs = excludePatterns.map((p) => `-x "${p}"`).join(" ");
2047
- 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
+ });
2048
2063
  const zipBuffer = await fs.readFile(zipPath);
2049
2064
  const uploadFormData = new FormData();
2050
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-WAOSJ573.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-WAOSJ573.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.1",
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",
@@ -36,9 +36,10 @@
36
36
  "server.json"
37
37
  ],
38
38
  "dependencies": {
39
- "@insforge/shared-schemas": "1.1.36-deployment.2",
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",