@insforge/mcp 1.1.7-dev.19 → 1.1.7-dev.20

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.
@@ -1057,9 +1057,10 @@ ${JSON.stringify(metadata, null, 2)}`
1057
1057
  "download-template",
1058
1058
  "CRITICAL: MANDATORY FIRST STEP for all new InsForge projects. Download pre-configured starter template (React/Next.js/React Router). ALWAYS use this tool BEFORE any other setup when starting a new project.",
1059
1059
  {
1060
- frame: z14.enum(["react"]).describe("Framework to use for the template (currently only React is supported)")
1060
+ frame: z14.enum(["react"]).describe("Framework to use for the template (currently only React is supported)"),
1061
+ projectName: z14.string().optional().describe('Name for the project directory (optional, defaults to "insforge-react")')
1061
1062
  },
1062
- withUsageTracking("download-template", async ({ frame }) => {
1063
+ withUsageTracking("download-template", async ({ frame, projectName }) => {
1063
1064
  try {
1064
1065
  const response = await fetch2(`${API_BASE_URL}/api/auth/tokens/anon`, {
1065
1066
  method: "POST",
@@ -1073,13 +1074,16 @@ ${JSON.stringify(metadata, null, 2)}`
1073
1074
  if (!anonKey) {
1074
1075
  throw new Error("Failed to retrieve anon key from backend");
1075
1076
  }
1076
- const targetDir = `insforge-${frame}`;
1077
- const command = `npx create-insforge-app insforge-${frame} --frame ${frame} --base-url ${API_BASE_URL} --anon-key ${anonKey}`;
1077
+ const targetDir = projectName || `insforge-${frame}`;
1078
+ const command = `npx create-insforge-app ${targetDir} --frame ${frame} --base-url ${API_BASE_URL} --anon-key ${anonKey}`;
1078
1079
  const { stdout, stderr } = await execAsync(command, {
1079
1080
  maxBuffer: 10 * 1024 * 1024
1080
1081
  // 10MB buffer
1081
1082
  });
1082
- const output = stdout || stderr || "Template downloaded successfully";
1083
+ const output = stdout || stderr || "";
1084
+ if (output.toLowerCase().includes("error") && !output.includes("successfully")) {
1085
+ throw new Error(`Failed to download template: ${output}`);
1086
+ }
1083
1087
  return {
1084
1088
  content: [
1085
1089
  {
@@ -1089,8 +1093,6 @@ ${JSON.stringify(metadata, null, 2)}`
1089
1093
  {
1090
1094
  targetDir,
1091
1095
  baseUrl: API_BASE_URL,
1092
- command,
1093
- output: output.trim(),
1094
1096
  nextSteps: [
1095
1097
  `cd ${targetDir}`,
1096
1098
  `npm install`,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-RWTFY5A5.js";
4
+ } from "./chunk-OLIGYXLN.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-RWTFY5A5.js";
4
+ } from "./chunk-OLIGYXLN.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.1.7-dev.19",
3
+ "version": "1.1.7-dev.20",
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",