multisite-cms-mcp 1.0.0 → 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/README.md CHANGED
@@ -119,6 +119,7 @@ When converting a website, an AI agent can:
119
119
  - **Correct field names** - No more guessing `{{title}}` vs `{{name}}`
120
120
  - **Triple brace reminders** - Ensures rich text uses `{{{...}}}`
121
121
  - **Structure validation** - Confirms package layout is correct
122
+ - **Space tolerance warnings** - Warns about `{{ name }}` vs `{{name}}` syntax
122
123
 
123
124
  ## License
124
125
 
@@ -1 +1 @@
1
- {"version":3,"file":"validate-template.d.ts","sourceRoot":"","sources":["../../src/tools/validate-template.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,GAAG,aAAa,CAAC;AA0E7J;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,YAAY,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,CAyLjB"}
1
+ {"version":3,"file":"validate-template.d.ts","sourceRoot":"","sources":["../../src/tools/validate-template.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,GAAG,aAAa,CAAC;AA0E7J;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,YAAY,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,CAgNjB"}
@@ -104,6 +104,12 @@ async function validateTemplate(html, templateType, collectionSlug) {
104
104
  const tripleTokens = html.match(/\{\{\{([^{}]+)\}\}\}/g) || [];
105
105
  const eachLoops = html.match(/\{\{#each\s+(\w+)[^}]*\}\}/g) || [];
106
106
  const conditionals = html.match(/\{\{#if\s+([^}]+)\}\}/g) || [];
107
+ // Check for tokens with spaces (like {{ name }} instead of {{name}})
108
+ const tokensWithSpaces = html.match(/\{\{\s+[^{}]+\s*\}\}/g) || [];
109
+ const tokensWithSpaces2 = html.match(/\{\{[^{}]+\s+\}\}/g) || [];
110
+ if (tokensWithSpaces.length > 0 || tokensWithSpaces2.length > 0) {
111
+ warnings.push('- Some tokens have spaces inside braces (e.g., {{ name }} instead of {{name}}). While supported, {{name}} without spaces is preferred.');
112
+ }
107
113
  // Check for common mistakes
108
114
  for (const token of doubleTokens) {
109
115
  const fieldName = token.replace(/\{\{|\}\}/g, '').trim();
@@ -187,6 +193,21 @@ async function validateTemplate(html, templateType, collectionSlug) {
187
193
  if (wrongAssetPaths.length > 5) {
188
194
  warnings.push(`- ...and ${wrongAssetPaths.length - 5} more asset paths that may need /public/ prefix`);
189
195
  }
196
+ // Validate site tokens
197
+ const siteTokens = html.match(/\{\{site\.(\w+)\}\}/g) || [];
198
+ for (const token of siteTokens) {
199
+ const fieldMatch = token.match(/\{\{site\.(\w+)\}\}/);
200
+ if (fieldMatch) {
201
+ const field = fieldMatch[1];
202
+ const validSiteFields = ['site_name', 'siteName', 'name'];
203
+ if (!validSiteFields.includes(field)) {
204
+ warnings.push(`- Unknown site token: ${token} - valid fields are: site_name, siteName, name`);
205
+ }
206
+ }
207
+ }
208
+ if (siteTokens.length > 0) {
209
+ suggestions.push(`- Found ${siteTokens.length} site token(s) like {{site.site_name}} - these come from manifest.json`);
210
+ }
190
211
  // Build result
191
212
  let output = '';
192
213
  if (errors.length === 0 && warnings.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multisite-cms-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.5",
4
4
  "description": "MCP server for AI-assisted website conversion to CMS format. Provides validation, examples, and schema tools.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {