worsoft-frontend-codegen-local-mcp 0.1.41 → 0.1.42

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.
@@ -30,7 +30,7 @@
30
30
 
31
31
  <script setup lang="ts" name="{{CLASS_NAME}}Form">
32
32
  import mittBus from '/@/utils/mitt';
33
- import { Local } from '/@/utils/storage';
33
+ import { Session } from '/@/utils/storage';
34
34
  import { useMessage } from '/@/hooks/message';
35
35
  import { getObj, addObj, putObj } from '/@/api/{{API_MODULE_PATH}}';
36
36
  import { useDict } from '/@/hooks/dict';
@@ -16,7 +16,7 @@
16
16
 
17
17
  <script setup lang="ts" name="{{CLASS_NAME}}Dialog">
18
18
  import { useMessage } from '/@/hooks/message';
19
- import { Local } from '/@/utils/storage';
19
+ import { Session } from '/@/utils/storage';
20
20
  import { getObj, addObj, putObj } from '/@/api/{{API_MODULE_PATH}}';
21
21
  import { useDict } from '/@/hooks/dict';
22
22
  import { useCrudPageMeta } from '/@/hooks/useCrudPageMeta';
@@ -27,7 +27,7 @@
27
27
 
28
28
  <script setup lang="ts" name="{{CLASS_NAME}}Form">
29
29
  import mittBus from '/@/utils/mitt';
30
- import { Local } from '/@/utils/storage';
30
+ import { Session } from '/@/utils/storage';
31
31
  import { useMessage } from '/@/hooks/message';
32
32
  import { getObj, addObj, putObj } from '/@/api/{{API_MODULE_PATH}}';
33
33
  import { useDict } from '/@/hooks/dict';
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.41';
8
+ const SERVER_VERSION = '0.1.42';
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');
@@ -1674,7 +1674,7 @@ function renderFormDefaults(model) {
1674
1674
  const lines = [` ${model.pk.attrName}: '',`];
1675
1675
  for (const field of model.fields.filter((item) => item.fieldName !== model.pk.fieldName && !item.isAudit)) lines.push(renderDefaultLine(field));
1676
1676
  lines.push(` version: 1,`);
1677
- lines.push(` tenantId: Local.getTenant(),`);
1677
+ lines.push(` tenantId: Session.getTenant(),`);
1678
1678
  return lines.join('\n');
1679
1679
  }
1680
1680
 
@@ -2174,7 +2174,7 @@ function renderMultiLevelFormVue(model, moduleModel) {
2174
2174
  ` ${moduleModel.pk.attrName}: '',`,
2175
2175
  ...moduleModel.optionFields.map((field) => renderDefaultLine(field)),
2176
2176
  ` version: 1,`,
2177
- ` tenantId: Local.getTenant(),`,
2177
+ ` tenantId: Session.getTenant(),`,
2178
2178
  ].join('\n');
2179
2179
  const rules = renderFormRulesV2(moduleModel.visibleFields);
2180
2180
  return `<template>
@@ -2195,7 +2195,7 @@ ${moduleModel.visibleFields.map(renderMultiLevelFormField).join('\n')}
2195
2195
 
2196
2196
  <script setup lang="ts" name="${componentName}">
2197
2197
  import { useMessage } from '/@/hooks/message';
2198
- import { Local } from '/@/utils/storage';
2198
+ import { Session } from '/@/utils/storage';
2199
2199
  import { useDict } from '/@/hooks/dict';
2200
2200
  import { useCrudPageMeta } from '/@/hooks/useCrudPageMeta';
2201
2201
  import { useI18n } from 'vue-i18n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsoft-frontend-codegen-local-mcp",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "Worsoft frontend local-template code generation MCP server.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "worsoft <sw@worsoft.vip>",