@insforge/mcp 1.1.7-dev.25 → 1.1.7-dev.27
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.
|
@@ -855,8 +855,8 @@ function registerInsforgeTools(server, config = {}) {
|
|
|
855
855
|
"fetch-docs",
|
|
856
856
|
'Fetch Insforge documentation. Use "instructions" for essential backend setup (MANDATORY FIRST), or select specific SDK docs for database, auth, storage, functions, or AI integration.',
|
|
857
857
|
{
|
|
858
|
-
docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react"
|
|
859
|
-
'Documentation type: "instructions" (essential backend setup - use FIRST), "db-sdk" (database operations), "storage-sdk" (file storage), "functions-sdk" (edge functions), "ai-integration-sdk" (AI features), "auth-components-react" (authentication components for React+Vite applications
|
|
858
|
+
docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react"]).describe(
|
|
859
|
+
'Documentation type: "instructions" (essential backend setup - use FIRST), "db-sdk" (database operations), "storage-sdk" (file storage), "functions-sdk" (edge functions), "ai-integration-sdk" (AI features), "auth-components-react" (authentication components for React+Vite applications,'
|
|
860
860
|
)
|
|
861
861
|
},
|
|
862
862
|
withUsageTracking("fetch-docs", async ({ docType }) => {
|
|
@@ -1075,9 +1075,18 @@ ${JSON.stringify(metadata, null, 2)}`
|
|
|
1075
1075
|
if (!anonKey) {
|
|
1076
1076
|
throw new Error("Failed to retrieve anon key from backend");
|
|
1077
1077
|
}
|
|
1078
|
-
const tempDir =
|
|
1078
|
+
const tempDir = tmpdir();
|
|
1079
1079
|
const targetDir = projectName || `insforge-${frame}`;
|
|
1080
|
-
|
|
1080
|
+
const templatePath = `${tempDir}/${targetDir}`;
|
|
1081
|
+
console.error(`[download-template] Target path: ${templatePath}`);
|
|
1082
|
+
try {
|
|
1083
|
+
const stats = await fs.stat(templatePath);
|
|
1084
|
+
if (stats.isDirectory()) {
|
|
1085
|
+
console.error(`[download-template] Removing existing template at ${templatePath}`);
|
|
1086
|
+
await fs.rm(templatePath, { recursive: true, force: true });
|
|
1087
|
+
}
|
|
1088
|
+
} catch (error) {
|
|
1089
|
+
}
|
|
1081
1090
|
const command = `npx create-insforge-app ${targetDir} --frame ${frame} --base-url ${API_BASE_URL} --anon-key ${anonKey}`;
|
|
1082
1091
|
const { stdout, stderr } = await execAsync(command, {
|
|
1083
1092
|
maxBuffer: 10 * 1024 * 1024,
|
|
@@ -1088,28 +1097,22 @@ ${JSON.stringify(metadata, null, 2)}`
|
|
|
1088
1097
|
if (output.toLowerCase().includes("error") && !output.includes("successfully")) {
|
|
1089
1098
|
throw new Error(`Failed to download template: ${output}`);
|
|
1090
1099
|
}
|
|
1091
|
-
const templatePath = `${tempDir}/${targetDir}`;
|
|
1092
1100
|
return {
|
|
1093
1101
|
content: [
|
|
1094
1102
|
{
|
|
1095
1103
|
type: "text",
|
|
1096
|
-
text:
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
`npm install`,
|
|
1109
|
-
`npm run dev`
|
|
1110
|
-
]
|
|
1111
|
-
}
|
|
1112
|
-
)
|
|
1104
|
+
text: `\u2705 React template downloaded successfully
|
|
1105
|
+
|
|
1106
|
+
\u{1F4C1} Template Location: ${templatePath}
|
|
1107
|
+
|
|
1108
|
+
\u26A0\uFE0F IMPORTANT: The template is in a temporary directory and NOT in your current working directory.
|
|
1109
|
+
|
|
1110
|
+
\u{1F534} CRITICAL NEXT STEP REQUIRED:
|
|
1111
|
+
You MUST copy ALL files (INCLUDING HIDDEN FILES like .env, .gitignore, etc.) from the temporary directory to your current project directory.
|
|
1112
|
+
|
|
1113
|
+
Copy all files from: ${templatePath}
|
|
1114
|
+
To: Your current project directory
|
|
1115
|
+
`
|
|
1113
1116
|
}
|
|
1114
1117
|
]
|
|
1115
1118
|
};
|
package/dist/http-server.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED