@agiflowai/scaffold-mcp 0.4.1 → 0.6.0
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/README.md +5 -5
- package/dist/{ScaffoldConfigLoader-DQMCLVGD.cjs → ScaffoldConfigLoader-DzcV5a_c.cjs} +1 -1
- package/dist/{ScaffoldService-BtjrgKI1.cjs → ScaffoldService-BgFWAOLQ.cjs} +7 -8
- package/dist/ScaffoldService-BvD9WvRi.cjs +3 -0
- package/dist/TemplateService-B5EZjPB0.cjs +3 -0
- package/dist/{TemplateService-B6UG6adf.cjs → TemplateService-_KpkoLfZ.cjs} +6 -5
- package/dist/{VariableReplacementService-DuI8K1r2.cjs → VariableReplacementService-ClshNY_C.cjs} +5 -4
- package/dist/{VariableReplacementService-CS_Uwxfu.cjs → VariableReplacementService-YUpL5nAC.cjs} +1 -2
- package/dist/index.cjs +383 -308
- package/package.json +4 -2
- package/dist/ScaffoldService-CkVFZBcb.cjs +0 -4
- package/dist/TemplateService-DFiUdYAi.cjs +0 -4
- package/dist/logger-DqgpBYuP.cjs +0 -32
- /package/dist/{ScaffoldConfigLoader-BrmvENTo.cjs → ScaffoldConfigLoader-1Pcv9cxm.cjs} +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ A Model Context Protocol (MCP) server for scaffolding applications with boilerpl
|
|
|
13
13
|
- **Template management**: Initialize templates folder and add templates from remote repositories
|
|
14
14
|
- **Multiple frameworks**: Support for Next.js, Vite React, and custom boilerplates
|
|
15
15
|
- **Multiple modes**: MCP server mode (stdio/HTTP/SSE) and standalone CLI mode
|
|
16
|
-
- **MCP integration**: Seamlessly works with Claude
|
|
16
|
+
- **MCP integration**: Seamlessly works with Claude Code and other MCP-compatible clients
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -25,12 +25,12 @@ pnpm install @agiflowai/scaffold-mcp
|
|
|
25
25
|
|
|
26
26
|
### 1. MCP Server
|
|
27
27
|
|
|
28
|
-
Run scaffold-mcp as an MCP server to integrate with Claude
|
|
28
|
+
Run scaffold-mcp as an MCP server to integrate with Claude Code or other MCP clients.
|
|
29
29
|
|
|
30
30
|
#### Starting the Server
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
# stdio transport (default) - for Claude
|
|
33
|
+
# stdio transport (default) - for Claude Code
|
|
34
34
|
npx @agiflowai/scaffold-mcp mcp-serve
|
|
35
35
|
|
|
36
36
|
# HTTP transport - for web applications
|
|
@@ -49,9 +49,9 @@ npx @agiflowai/scaffold-mcp mcp-serve --admin-enable
|
|
|
49
49
|
- `--host <host>`: Host to bind to for HTTP/SSE (default: `localhost`)
|
|
50
50
|
- `--admin-enable`: Enable admin tools for template generation
|
|
51
51
|
|
|
52
|
-
#### Claude
|
|
52
|
+
#### Claude Code Configuration
|
|
53
53
|
|
|
54
|
-
Add to your Claude
|
|
54
|
+
Add to your Claude Code config:
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_logger = require('./logger-DqgpBYuP.cjs');
|
|
3
2
|
let node_path = require("node:path");
|
|
4
3
|
node_path = require_chunk.__toESM(node_path);
|
|
5
4
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
@@ -66,7 +65,7 @@ var ScaffoldProcessingService = class {
|
|
|
66
65
|
try {
|
|
67
66
|
items = await this.fileSystem.readdir(dirPath);
|
|
68
67
|
} catch (error) {
|
|
69
|
-
|
|
68
|
+
__agiflowai_aicode_utils.log.warn(`Cannot read directory ${dirPath}: ${error}`);
|
|
70
69
|
return;
|
|
71
70
|
}
|
|
72
71
|
for (const item of items) {
|
|
@@ -77,7 +76,7 @@ var ScaffoldProcessingService = class {
|
|
|
77
76
|
if (stat.isDirectory()) await this.trackCreatedFilesRecursive(itemPath, createdFiles);
|
|
78
77
|
else if (stat.isFile()) createdFiles.push(itemPath);
|
|
79
78
|
} catch (error) {
|
|
80
|
-
|
|
79
|
+
__agiflowai_aicode_utils.log.warn(`Cannot stat ${itemPath}: ${error}`);
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
}
|
|
@@ -89,7 +88,7 @@ var ScaffoldProcessingService = class {
|
|
|
89
88
|
try {
|
|
90
89
|
items = await this.fileSystem.readdir(dirPath);
|
|
91
90
|
} catch (error) {
|
|
92
|
-
|
|
91
|
+
__agiflowai_aicode_utils.log.warn(`Cannot read directory ${dirPath}: ${error}`);
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
94
|
for (const item of items) {
|
|
@@ -100,7 +99,7 @@ var ScaffoldProcessingService = class {
|
|
|
100
99
|
if (stat.isDirectory()) await this.trackExistingFilesRecursive(itemPath, existingFiles);
|
|
101
100
|
else if (stat.isFile()) existingFiles.push(itemPath);
|
|
102
101
|
} catch (error) {
|
|
103
|
-
|
|
102
|
+
__agiflowai_aicode_utils.log.warn(`Cannot stat ${itemPath}: ${error}`);
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
105
|
}
|
|
@@ -225,10 +224,10 @@ var ScaffoldService = class {
|
|
|
225
224
|
*/
|
|
226
225
|
async processScaffold(params) {
|
|
227
226
|
const { config, targetPath, templatePath, allVariables, scaffoldType } = params;
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
__agiflowai_aicode_utils.log.debug("Config generator:", config.generator);
|
|
228
|
+
__agiflowai_aicode_utils.log.debug("Config:", JSON.stringify(config, null, 2));
|
|
230
229
|
if (config.generator) {
|
|
231
|
-
|
|
230
|
+
__agiflowai_aicode_utils.log.info("Using custom generator:", config.generator);
|
|
232
231
|
try {
|
|
233
232
|
const generator = (await import(node_path.default.join(templatePath, "generators", config.generator))).default;
|
|
234
233
|
if (typeof generator !== "function") return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
|
|
2
|
+
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
3
|
+
__agiflowai_aicode_utils = require_chunk.__toESM(__agiflowai_aicode_utils);
|
|
3
4
|
let liquidjs = require("liquidjs");
|
|
4
5
|
liquidjs = require_chunk.__toESM(liquidjs);
|
|
5
6
|
|
|
@@ -12,7 +13,7 @@ var TemplateService = class {
|
|
|
12
13
|
strictVariables: false
|
|
13
14
|
});
|
|
14
15
|
this.setupCustomFilters();
|
|
15
|
-
|
|
16
|
+
__agiflowai_aicode_utils.log.info("TemplateService initialized");
|
|
16
17
|
}
|
|
17
18
|
toPascalCase(str) {
|
|
18
19
|
const camelCase = str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "");
|
|
@@ -56,15 +57,15 @@ var TemplateService = class {
|
|
|
56
57
|
}
|
|
57
58
|
renderString(template, variables) {
|
|
58
59
|
try {
|
|
59
|
-
|
|
60
|
+
__agiflowai_aicode_utils.log.debug("Rendering template", {
|
|
60
61
|
variables,
|
|
61
62
|
templatePreview: template.substring(0, 100)
|
|
62
63
|
});
|
|
63
64
|
const result = this.liquid.parseAndRenderSync(template, variables);
|
|
64
|
-
|
|
65
|
+
__agiflowai_aicode_utils.log.debug("Rendered template", { resultPreview: result.substring(0, 100) });
|
|
65
66
|
return result;
|
|
66
67
|
} catch (error) {
|
|
67
|
-
|
|
68
|
+
__agiflowai_aicode_utils.log.error("LiquidJS rendering error", {
|
|
68
69
|
error: error instanceof Error ? error.message : String(error),
|
|
69
70
|
templatePreview: template.substring(0, 200),
|
|
70
71
|
variables
|
package/dist/{VariableReplacementService-DuI8K1r2.cjs → VariableReplacementService-ClshNY_C.cjs}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_logger = require('./logger-DqgpBYuP.cjs');
|
|
3
2
|
let node_path = require("node:path");
|
|
4
3
|
node_path = require_chunk.__toESM(node_path);
|
|
4
|
+
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
5
|
+
__agiflowai_aicode_utils = require_chunk.__toESM(__agiflowai_aicode_utils);
|
|
5
6
|
|
|
6
7
|
//#region src/services/VariableReplacementService.ts
|
|
7
8
|
var VariableReplacementService = class {
|
|
@@ -33,7 +34,7 @@ var VariableReplacementService = class {
|
|
|
33
34
|
try {
|
|
34
35
|
items = await this.fileSystem.readdir(dirPath);
|
|
35
36
|
} catch (error) {
|
|
36
|
-
|
|
37
|
+
__agiflowai_aicode_utils.log.warn(`Skipping directory ${dirPath}: ${error}`);
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
for (const item of items) {
|
|
@@ -44,7 +45,7 @@ var VariableReplacementService = class {
|
|
|
44
45
|
if (stat.isDirectory()) await this.processFilesForVariableReplacement(itemPath, variables);
|
|
45
46
|
else if (stat.isFile()) await this.replaceVariablesInFile(itemPath, variables);
|
|
46
47
|
} catch (error) {
|
|
47
|
-
|
|
48
|
+
__agiflowai_aicode_utils.log.warn(`Skipping item ${itemPath}: ${error}`);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -55,7 +56,7 @@ var VariableReplacementService = class {
|
|
|
55
56
|
const renderedContent = this.templateService.renderString(content, variables);
|
|
56
57
|
await this.fileSystem.writeFile(filePath, renderedContent, "utf8");
|
|
57
58
|
} catch (error) {
|
|
58
|
-
|
|
59
|
+
__agiflowai_aicode_utils.log.warn(`Skipping file ${filePath}: ${error}`);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
isBinaryFile(filePath) {
|
package/dist/{VariableReplacementService-CS_Uwxfu.cjs → VariableReplacementService-YUpL5nAC.cjs}
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require('./
|
|
2
|
-
const require_VariableReplacementService = require('./VariableReplacementService-DuI8K1r2.cjs');
|
|
1
|
+
const require_VariableReplacementService = require('./VariableReplacementService-ClshNY_C.cjs');
|
|
3
2
|
|
|
4
3
|
exports.VariableReplacementService = require_VariableReplacementService.VariableReplacementService;
|