worsoft-frontend-codegen-local-mcp 0.1.55 → 0.1.56

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 +4 -4
  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.55';
8
+ const SERVER_VERSION = '0.1.56';
9
9
  const PROTOCOL_VERSION = '2024-11-05';
10
10
  const TOOL_NAME = 'worsoft_codegen_local_generate_frontend';
11
11
  const STYLE_CATALOG_PATH = path.join(__dirname, 'assets', 'style-catalog.json');
@@ -1912,8 +1912,8 @@ function renderOptionFieldV2(field, labelKey, dictRegistryRefs, indent = ' ')
1912
1912
  if (field.show === false) {
1913
1913
  parts.push('show: false');
1914
1914
  }
1915
- if (field.listShow === false) {
1916
- parts.push('listShow: false');
1915
+ if (field.listShow !== field.show) {
1916
+ parts.push(`listShow: ${field.listShow ? 'true' : 'false'}`);
1917
1917
  }
1918
1918
 
1919
1919
  return `${indent}{ ${parts.join(', ')} },`;
@@ -2050,7 +2050,7 @@ function renderMultiLevelOptionField(field, model, moduleModel, dictRegistryRefs
2050
2050
  const width = getDefaultOptionFieldWidthV2(field);
2051
2051
  if (width) parts.push(`width: '${width}'`);
2052
2052
  if (field.show === false) parts.push('show: false');
2053
- if (field.listShow === false) parts.push('listShow: false');
2053
+ if (field.listShow !== field.show) parts.push(`listShow: ${field.listShow ? 'true' : 'false'}`);
2054
2054
  if (field.smart) parts.push('smart: true');
2055
2055
  if (field.dictType) {
2056
2056
  parts.push(`dictType: ${getDictRegistryReference(field.dictType, dictRegistryRefs)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsoft-frontend-codegen-local-mcp",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "description": "Worsoft frontend local-template code generation MCP server.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "worsoft <sw@worsoft.vip>",