worsoft-frontend-codegen-local-mcp 0.1.77 → 0.1.78

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 +3 -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.77';
8
+ const SERVER_VERSION = '0.1.78';
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');
@@ -1350,9 +1350,8 @@ function parseOptionalOrder(value, label) {
1350
1350
  if (value === undefined || value === null || value === '') return undefined;
1351
1351
  const order = Number.parseInt(String(value), 10);
1352
1352
  if (Number.isNaN(order) || order < 0) {
1353
- throw new Error(`${label} must be a positive integer when provided, or 0/empty when unspecified`);
1354
- }
1355
- if (order === 0) return undefined;
1353
+ throw new Error(`${label} must be a non-negative integer when provided, or empty when unspecified`);
1354
+ }
1356
1355
  return order;
1357
1356
  }
1358
1357
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsoft-frontend-codegen-local-mcp",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "description": "Worsoft frontend local-template code generation MCP server.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "worsoft <sw@worsoft.vip>",