@agiflowai/scaffold-mcp 1.0.3 → 1.0.5
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.
- package/dist/{ScaffoldConfigLoader-DQMCLVGD.cjs → ScaffoldConfigLoader-B-NLy6VP.cjs} +1 -1
- package/dist/{ScaffoldConfigLoader-CI0T6zdG.js → ScaffoldConfigLoader-BDMJNI1o.mjs} +1 -1
- package/dist/ScaffoldConfigLoader-SHk-KEje.mjs +3 -0
- package/dist/{ScaffoldConfigLoader-BrmvENTo.cjs → ScaffoldConfigLoader-Y_SBLPg7.cjs} +0 -1
- package/dist/ScaffoldService-BNOyoqSb.cjs +3 -0
- package/dist/ScaffoldService-BNdfC21Z.mjs +3 -0
- package/dist/{ScaffoldService-DB7-Cyod.js → ScaffoldService-BNuN00Fm.mjs} +8 -8
- package/dist/{ScaffoldService-BwDmXt83.cjs → ScaffoldService-ChzxM0Yc.cjs} +1 -3
- package/dist/TemplateService-BRfzfaZs.mjs +3 -0
- package/dist/{TemplateService-CiZJA06s.js → TemplateService-Cg5QV29n.mjs} +1 -1
- package/dist/{TemplateService-DRubcvS9.cjs → TemplateService-D3ydJR_R.cjs} +0 -2
- package/dist/TemplateService-DqieT1Tq.cjs +3 -0
- package/dist/VariableReplacementService-BWCd-z7X.mjs +3 -0
- package/dist/{VariableReplacementService-D0QnWKUW.cjs → VariableReplacementService-CAjesAYq.cjs} +1 -2
- package/dist/{VariableReplacementService-DRxd9ILB.js → VariableReplacementService-DHIINRnJ.mjs} +5 -5
- package/dist/{VariableReplacementService-CroHkMha.cjs → VariableReplacementService-DKaF2C9l.cjs} +1 -1
- package/dist/cli.cjs +27 -124
- package/dist/{cli.js → cli.mjs} +27 -120
- package/dist/index.cjs +14 -18
- package/dist/{index.d.ts → index.d.mts} +1 -1
- package/dist/{index.js → index.mjs} +14 -16
- package/dist/{stdio-DM_C4xbZ.cjs → stdio-BGj_FLky.cjs} +410 -423
- package/dist/{stdio-BheRzmRj.js → stdio-wAlpLC6l.mjs} +413 -418
- package/package.json +6 -8
- package/dist/ScaffoldConfigLoader-DhthV6xq.js +0 -3
- package/dist/ScaffoldService-B3En_m4t.cjs +0 -3
- package/dist/ScaffoldService-CJ3vNmAj.js +0 -3
- package/dist/TemplateService-BZRt3NI8.cjs +0 -3
- package/dist/TemplateService-DropYdp8.js +0 -3
- package/dist/VariableReplacementService-BAwTGv_R.js +0 -3
- /package/dist/{cli.d.ts → cli.d.mts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JsonSchema } from "@composio/json-schema-to-zod";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
3
|
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
4
|
import "express";
|
|
5
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
6
|
|
|
7
7
|
//#region src/services/BoilerplateGeneratorService.d.ts
|
|
8
8
|
interface GenerateBoilerplateOptions {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ScaffoldConfigLoader } from "./ScaffoldConfigLoader-
|
|
3
|
-
import { ScaffoldProcessingService, ScaffoldService } from "./ScaffoldService-
|
|
4
|
-
import { TemplateService } from "./TemplateService-
|
|
5
|
-
import { VariableReplacementService } from "./VariableReplacementService-
|
|
1
|
+
import { a as UseScaffoldMethodTool, c as ListBoilerplatesTool, d as GenerateBoilerplateFileTool, f as ScaffoldingMethodsService, g as BoilerplateGeneratorService, h as FileSystemService, i as WriteToFileTool, l as GenerateFeatureScaffoldTool, m as BoilerplateService, n as SseTransportHandler, o as UseBoilerplateTool, p as ScaffoldGeneratorService, r as HttpTransportHandler, s as ListScaffoldingMethodsTool, t as StdioTransportHandler, u as GenerateBoilerplateTool } from "./stdio-wAlpLC6l.mjs";
|
|
2
|
+
import { t as ScaffoldConfigLoader } from "./ScaffoldConfigLoader-BDMJNI1o.mjs";
|
|
3
|
+
import { n as ScaffoldProcessingService, t as ScaffoldService } from "./ScaffoldService-BNuN00Fm.mjs";
|
|
4
|
+
import { t as TemplateService } from "./TemplateService-Cg5QV29n.mjs";
|
|
5
|
+
import { t as VariableReplacementService } from "./VariableReplacementService-DHIINRnJ.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import { move, pathExists, remove, writeFile } from "@agiflowai/aicode-utils";
|
|
8
8
|
import { execa } from "execa";
|
|
9
9
|
|
|
10
10
|
//#region src/utils/git.ts
|
|
@@ -27,8 +27,7 @@ async function findWorkspaceRoot(startPath = process.cwd()) {
|
|
|
27
27
|
let currentPath = path.resolve(startPath);
|
|
28
28
|
const rootPath = path.parse(currentPath).root;
|
|
29
29
|
while (true) {
|
|
30
|
-
|
|
31
|
-
if (await fs$1.pathExists(gitPath)) return currentPath;
|
|
30
|
+
if (await pathExists(path.join(currentPath, ".git"))) return currentPath;
|
|
32
31
|
if (currentPath === rootPath) return null;
|
|
33
32
|
currentPath = path.dirname(currentPath);
|
|
34
33
|
}
|
|
@@ -84,8 +83,7 @@ async function cloneSubdirectory(repoUrl, branch, subdirectory, targetFolder) {
|
|
|
84
83
|
"core.sparseCheckout",
|
|
85
84
|
"true"
|
|
86
85
|
], tempFolder);
|
|
87
|
-
|
|
88
|
-
await fs$1.writeFile(sparseCheckoutFile, `${subdirectory}\n`);
|
|
86
|
+
await writeFile(path.join(tempFolder, ".git", "info", "sparse-checkout"), `${subdirectory}\n`);
|
|
89
87
|
await execGit([
|
|
90
88
|
"pull",
|
|
91
89
|
"--depth=1",
|
|
@@ -93,12 +91,12 @@ async function cloneSubdirectory(repoUrl, branch, subdirectory, targetFolder) {
|
|
|
93
91
|
branch
|
|
94
92
|
], tempFolder);
|
|
95
93
|
const sourceDir = path.join(tempFolder, subdirectory);
|
|
96
|
-
if (!await
|
|
97
|
-
if (await
|
|
98
|
-
await
|
|
99
|
-
await
|
|
94
|
+
if (!await pathExists(sourceDir)) throw new Error(`Subdirectory '${subdirectory}' not found in repository at branch '${branch}'`);
|
|
95
|
+
if (await pathExists(targetFolder)) throw new Error(`Target folder already exists: ${targetFolder}`);
|
|
96
|
+
await move(sourceDir, targetFolder);
|
|
97
|
+
await remove(tempFolder);
|
|
100
98
|
} catch (error) {
|
|
101
|
-
if (await
|
|
99
|
+
if (await pathExists(tempFolder)) await remove(tempFolder);
|
|
102
100
|
throw error;
|
|
103
101
|
}
|
|
104
102
|
}
|
|
@@ -112,7 +110,7 @@ async function cloneRepository(repoUrl, targetFolder) {
|
|
|
112
110
|
targetFolder
|
|
113
111
|
]);
|
|
114
112
|
const gitFolder = path.join(targetFolder, ".git");
|
|
115
|
-
if (await
|
|
113
|
+
if (await pathExists(gitFolder)) await remove(gitFolder);
|
|
116
114
|
}
|
|
117
115
|
/**
|
|
118
116
|
* Fetch directory listing from GitHub API
|