@lark-apaas/coding-template-nestjs-react-fullstack 0.1.73-alpha.20261125113853 → 0.1.73-alpha.20261126083011

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
@@ -27,15 +27,20 @@ MIAODA_APP_TYPE=3 npx @lark-apaas/miaoda-cli@<latest> app init \
27
27
  - `SANDBOX_PUBLIC_URL` —— 沙箱公网域
28
28
  - `CLIENT_BASE_PATH=/app/<app_id>/` —— React Router basename + Vite base
29
29
 
30
- ## MCP UI 的类型与代码检查
30
+ ## 代码检查
31
31
 
32
- 创建 MCP UI 时,Agent 在 `server/mcp/ui` 中同时生成 `tsconfig.json` 和 `eslint.config.cjs`,修改 UI 或其 shared 依赖后主动运行独立检查。模板和 CLI 不生成 UI 配置,也不将 UI 检查接入主工程 lint/type:check。
32
+ 模板使用 Oxlint native 预设(`fullstack-presets@1.1.27`)和 TypeScript-native 7.0.2。
33
33
 
34
- 主工程保留原 client/server 检查。Agent 从工程根执行 `npx --no-install tsc --noEmit --project server/mcp/ui/tsconfig.json`,再执行 `npx --no-install eslint --config server/mcp/ui/eslint.config.cjs "server/mcp/ui/**/*.{ts,tsx,js,jsx}" --max-warnings 0`;必须检查退出码并修复错误。无需辅助脚本或新增 npm 命令。
34
+ - `npm run oxlint`:原生规则及必要 JS 回退;未使用禁用指令为 warning。
35
+ - `npm run type:check`:明确调用 `typescript-native/bin/tsc` 检查 client/server,避免 `.bin/tsc` 冲突。
36
+ - `npm run lint`:串行执行代码、类型与可用的样式检查,全部执行后汇总退出码。runner 与 fullstack-cli、miaoda-cli 的同步版本一致,检查器以工程 scripts 为准。
37
+ - `npm run lint -- --files <paths>`:对目标文件使用同一 Oxlint 配置,并按所属范围检查类型。
35
38
 
36
- CLI 不注入 MCP UI 检查命令;主工程保留原有 client/server 检查,UI 由 Agent 按独立配置执行标准 tsc/eslint。
39
+ Nest 开发和生产编译仍使用 SWC,`typeCheck: false`。Node 配置使用 Preserve/Bundler 做类型检查;SWC 输出 CommonJS。`.swcrc` 为路径别名指定独立 baseUrl,TS7 配置不再使用该废弃字段。模板显式保留 TypeScript 5,满足 preset/parser 等包的 JS API 与 peer 依赖;项目类型检查仍明确使用 TypeScript-native 7。
37
40
 
38
- 存量 sync 不改写 ESLint 源码;UI 全局排除项由平台 ESLint 预设提供。TS 仅向已有显式 `exclude` 数组追加目录,保留注释和原项;依赖继承且未显式声明 `exclude` 的自定义配置保持不变并提示人工调整。自定义检查命令保留。UI ESLint 配置可显式引用 `fullstack-presets/lib/mcp/eslint-ui`。
41
+ MCP UI 在 `server/mcp/ui` 中保留独立 TS 配置,主工程排除该浏览器目录。MCP UI 的编译器和 lint 工具按工程 scripts 与配置判断;对应配置从 coding-steering 的 mcp-guide 资产复制到工程根,不自动将 UI 检查并入主工程。
42
+
43
+ `npm run upgrade` 调用 `fullstack-cli sync`,需使用支持 Oxlint runner 的 CLI 版本。同步后的 `lint.js` 根据工程已有 scripts 选择检查器,保留类型检查脚本和应用 lint 配置。
39
44
 
40
45
  ## 包结构
41
46
 
@@ -54,6 +59,6 @@ CLI 不注入 MCP UI 检查命令;主工程保留原有 client/server 检查
54
59
 
55
60
  模板不生成 `mcp-build-id`,构建脚本沿用原流程。SDK 发布态使用 veFaaS 函数 ID 与发布 revision;开发态使用后端编译产物指纹,UI/Skill 内容继续独立计入修订。首次升级切换版本来源后,Host 应重新发现。
56
61
 
57
- MCP UI 的 `tsconfig.json` 和 `eslint.config.cjs` 由 Agent 随 UI 在 `server/mcp/ui` 中创建,执行命令与完整示例见 coding-steering 的 `mcp-ui-guide`。主工程的 TS/ESLint 排除该浏览器目录,不自动运行 UI 检查;不为无 UI 的应用创建配置或检查命令。
62
+ MCP UI 的 `tsconfig.json` 和 `oxlint.mcp-ui.config.mts` 由 Agent 随 UI 在 `server/mcp/ui` 中创建,执行命令与完整示例见 coding-steering 的 `mcp-ui-guide`。主工程的 TS/Oxlint 排除该浏览器目录,不自动运行 UI 检查;不为无 UI 的应用创建配置或检查命令。
58
63
 
59
64
  `server/mcp/ui` 与 `server/mcp/skills` 变更应由平台判为后端发布;纯前端发布不替换已部署 MCP 产物,也不承诺热更 MCP UI。发布版本号仅在实际后端发布时更新。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/coding-template-nestjs-react-fullstack",
3
- "version": "0.1.73-alpha.20261125113853",
3
+ "version": "0.1.73-alpha.20261126083011",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,5 @@
1
+ {
2
+ "jsc": {
3
+ "baseUrl": "."
4
+ }
5
+ }
@@ -54,7 +54,6 @@ yarn.lock
54
54
  pnpm-lock.yaml
55
55
 
56
56
  # Cache files
57
- .eslintcache
58
57
  *.tsbuildinfo
59
58
 
60
59
  # swc wasm
@@ -143,7 +143,6 @@ export function SelectField(props: SelectFieldProps) {
143
143
  {hasContent ? (
144
144
  children || (options && renderOptions(options))
145
145
  ) : (
146
- // eslint-disable-next-line no-restricted-syntax
147
146
  <SelectItem disabled value={''}>
148
147
  暂无选项
149
148
  </SelectItem>
@@ -0,0 +1,65 @@
1
+ import { defineConfig } from 'oxlint';
2
+ import { oxlintPresetsOfSimple } from '@lark-apaas/fullstack-presets';
3
+
4
+ export default defineConfig({
5
+ categories: {
6
+ correctness: 'off',
7
+ suspicious: 'off',
8
+ pedantic: 'off',
9
+ perf: 'off',
10
+ style: 'off',
11
+ restriction: 'off',
12
+ nursery: 'off',
13
+ },
14
+ options: {
15
+ respectEslintDisableDirectives: true,
16
+ reportUnusedDisableDirectives: 'warn',
17
+ typeAware: false,
18
+ typeCheck: false,
19
+ },
20
+ settings: {
21
+ 'import/resolver': {
22
+ node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] },
23
+ alias: {
24
+ map: [
25
+ ['@', './client/src'],
26
+ ['@client', './client'],
27
+ ['@server', './server'],
28
+ ['@shared', './shared'],
29
+ ],
30
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
31
+ },
32
+ },
33
+ },
34
+ ignorePatterns: [
35
+ 'dist/**',
36
+ 'dist-server/**',
37
+ 'source_package/**',
38
+ 'coverage/**',
39
+ 'logs/**',
40
+ 'tmp/**',
41
+ 'temp/**',
42
+ '.playwright-cli/**',
43
+ '.agent/**',
44
+ 'client/src/api/gen/**',
45
+ 'server/mcp/ui/**',
46
+ 'server/database/.introspect/**',
47
+ '**/node_modules/**',
48
+ '**/*.d.ts',
49
+ '**/*.js.map',
50
+ '**/__tests__/**',
51
+ '**/*.test.{js,jsx,ts,tsx}',
52
+ '**/*.spec.{js,jsx,ts,tsx}',
53
+ ],
54
+ overrides: [
55
+ {
56
+ ...oxlintPresetsOfSimple.client,
57
+ files: ['client/**/*.{ts,tsx}', 'shared/**/*.{ts,tsx}'],
58
+ },
59
+ oxlintPresetsOfSimple.appTsx,
60
+ {
61
+ ...oxlintPresetsOfSimple.server,
62
+ files: ['server/**/*.{ts,tsx}', 'shared/**/*.{ts,tsx}'],
63
+ },
64
+ ],
65
+ });