worsoft-frontend-codegen-local-mcp 0.1.13 → 0.1.14

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.
Files changed (2) hide show
  1. package/mcp_server.js +11 -11
  2. package/package.json +1 -1
package/mcp_server.js CHANGED
@@ -5,7 +5,7 @@ const fs = require('fs');
5
5
  const path = require('path');
6
6
 
7
7
  const SERVER_NAME = 'worsoft-codegen-local';
8
- const SERVER_VERSION = '0.1.13';
8
+ const SERVER_VERSION = '0.1.14';
9
9
  const PROTOCOL_VERSION = '2024-11-05';
10
10
  const TOOL_NAME = 'worsoft_codegen_local_generate_frontend';
11
11
  const TEMPLATE_LIBRARY_ROOT = path.resolve(__dirname, '..', 'template');
@@ -581,16 +581,16 @@ function normalizeDictType(value) {
581
581
  return normalized.replace(/^['"`]+|['"`]+$/g, '');
582
582
  }
583
583
 
584
- function stripDictAnnotation(label) {
585
- const text = String(label || '').trim();
586
- if (!text) {
587
- return '';
588
- }
589
- return text
590
- .replace(/\s*[\(\uFF08][^()\uFF08\uFF09]*?(?:\u5B57\u5178|dict)(?:[_\s-]*type)?[^()\uFF08\uFF09]*?[\)\uFF09]\s*/gi, '')
591
- .replace(/\s+/g, ' ')
592
- .trim();
593
- }
584
+ function stripDictAnnotation(label) {
585
+ const text = String(label || '').trim();
586
+ if (!text) {
587
+ return '';
588
+ }
589
+ return text
590
+ .replace(/\s*[\(\uFF08][^()\uFF08\uFF09]*[\)\uFF09]\s*/g, ' ')
591
+ .replace(/\s+/g, ' ')
592
+ .trim();
593
+ }
594
594
 
595
595
  function extractDictType(text) {
596
596
  const normalized = String(text || '').trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsoft-frontend-codegen-local-mcp",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Worsoft frontend local-template code generation MCP server.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "worsoft <sw@worsoft.vip>",