type-crafter 0.11.2 → 0.12.1
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 +45 -2
- package/dist/index.js +9525 -7860
- package/dist/templates/typescript-with-decoders/object-syntax.hbs +112 -6
- package/dist/types/index.d.ts +3 -0
- package/dist/utils/logger.d.ts +124 -0
- package/package.json +20 -23
package/README.md
CHANGED
|
@@ -57,10 +57,53 @@ The input specification yaml file must be of following syntax:
|
|
|
57
57
|
|
|
58
58
|
The syntax for writing different types can be referred from the [OpenAPI Data Types Guide](https://swagger.io/docs/specification/data-models/data-types/).
|
|
59
59
|
|
|
60
|
-
## Supported
|
|
60
|
+
## Supported Languages
|
|
61
61
|
|
|
62
62
|
- [✔️] TypeScript
|
|
63
|
-
-
|
|
63
|
+
- [✔️] TypeScript with Decoders (runtime validation)
|
|
64
|
+
- More languages coming soon
|
|
65
|
+
|
|
66
|
+
## MCP Server (AI Assistant Integration)
|
|
67
|
+
|
|
68
|
+
Type Crafter includes an MCP (Model Context Protocol) server that helps AI assistants write correct YAML specifications.
|
|
69
|
+
|
|
70
|
+
### Installation
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install -g @type-crafter/mcp-server
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Configuration (Claude Desktop)
|
|
77
|
+
|
|
78
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"mcpServers": {
|
|
83
|
+
"type-crafter": {
|
|
84
|
+
"command": "type-crafter-mcp"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Available Tools
|
|
91
|
+
|
|
92
|
+
| Tool | Description |
|
|
93
|
+
| ------------------- | ----------------------------------- |
|
|
94
|
+
| `get-writing-guide` | Learn YAML spec format (call first) |
|
|
95
|
+
| `get-rules-section` | Deep-dive into specific topics |
|
|
96
|
+
| `validate-spec` | Check specs for errors |
|
|
97
|
+
| `get-spec-info` | View types in existing spec |
|
|
98
|
+
| `list-languages` | Show supported languages |
|
|
99
|
+
|
|
100
|
+
### Key Features
|
|
101
|
+
|
|
102
|
+
- **Session-based workflow** - Guides LLMs to read documentation first
|
|
103
|
+
- **Educational errors** - Explains what's wrong and how to fix it
|
|
104
|
+
- **Common mistake detection** - Catches `nullable: true`, `optional: true`, wrong paths
|
|
105
|
+
|
|
106
|
+
See [mcp/README.md](./mcp/README.md) for full documentation.
|
|
64
107
|
|
|
65
108
|
## Contributing & Extending
|
|
66
109
|
|