@lark-apaas/coding-template-nestjs-react-fullstack 0.1.40-alpha.20260914152600 → 0.1.40-alpha.20260915110512
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/package.json +1 -1
- package/template/package-lock.json +54 -54
- package/template/package.json +6 -4
- package/template/scripts/lint.js +120 -18
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "fullstack-nestjs-template",
|
|
9
9
|
"version": "2.3.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@lark-apaas/fullstack-nestjs-core": "1.1.62-alpha.
|
|
11
|
+
"@lark-apaas/fullstack-nestjs-core": "1.1.62-alpha.20260915105802",
|
|
12
12
|
"@nestjs/axios": "^4.0.1",
|
|
13
13
|
"@nestjs/cache-manager": "^3.1.3",
|
|
14
14
|
"@nestjs/common": "^10.4.20",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@hookform/resolvers": "^5.2.2",
|
|
35
35
|
"@lark-apaas/client-toolkit": "^1.2.70",
|
|
36
|
-
"@lark-apaas/coding-preset-vite-react": "1.0.23-alpha.
|
|
36
|
+
"@lark-apaas/coding-preset-vite-react": "1.0.23-alpha.20260915105803",
|
|
37
37
|
"@lark-apaas/fullstack-presets": "^1.1.0",
|
|
38
38
|
"@nestjs/cli": "^10.4.9",
|
|
39
39
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
@@ -1203,7 +1203,7 @@
|
|
|
1203
1203
|
},
|
|
1204
1204
|
"node_modules/@hono/node-server": {
|
|
1205
1205
|
"version": "2.1.1",
|
|
1206
|
-
"resolved": "https://registry.
|
|
1206
|
+
"resolved": "https://registry.npmmirror.com/@hono/node-server/-/node-server-2.1.1.tgz",
|
|
1207
1207
|
"integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==",
|
|
1208
1208
|
"license": "MIT",
|
|
1209
1209
|
"engines": {
|
|
@@ -1634,9 +1634,9 @@
|
|
|
1634
1634
|
"license": "MIT"
|
|
1635
1635
|
},
|
|
1636
1636
|
"node_modules/@lark-apaas/coding-preset-vite-react": {
|
|
1637
|
-
"version": "1.0.23-alpha.
|
|
1638
|
-
"resolved": "https://registry.
|
|
1639
|
-
"integrity": "sha512-
|
|
1637
|
+
"version": "1.0.23-alpha.20260915105803",
|
|
1638
|
+
"resolved": "https://registry.npmmirror.com/@lark-apaas/coding-preset-vite-react/-/coding-preset-vite-react-1.0.23-alpha.20260915105803.tgz",
|
|
1639
|
+
"integrity": "sha512-GwUV/4DHWibTx0GrhflevI2kWC+4UqjtHucAwHWJpvD7rd8Q+AdQEIAvYVj5nKZ6QuCc8yQEAMKSwvREDTwcEg==",
|
|
1640
1640
|
"dev": true,
|
|
1641
1641
|
"license": "MIT",
|
|
1642
1642
|
"dependencies": {
|
|
@@ -1697,9 +1697,9 @@
|
|
|
1697
1697
|
}
|
|
1698
1698
|
},
|
|
1699
1699
|
"node_modules/@lark-apaas/fullstack-nestjs-core": {
|
|
1700
|
-
"version": "1.1.62-alpha.
|
|
1701
|
-
"resolved": "https://registry.
|
|
1702
|
-
"integrity": "sha512-
|
|
1700
|
+
"version": "1.1.62-alpha.20260915105802",
|
|
1701
|
+
"resolved": "https://registry.npmmirror.com/@lark-apaas/fullstack-nestjs-core/-/fullstack-nestjs-core-1.1.62-alpha.20260915105802.tgz",
|
|
1702
|
+
"integrity": "sha512-7eJM0cJ0jqjhKCslzyl5SX6l7RE0CRCWXWW4I6u5SZN0NDogNcYU11uWjXbscZnqIsLwNiQj+tOnk5iKeSkSYA==",
|
|
1703
1703
|
"license": "MIT",
|
|
1704
1704
|
"dependencies": {
|
|
1705
1705
|
"@lark-apaas/cache-service": "^0.1.1",
|
|
@@ -1712,7 +1712,7 @@
|
|
|
1712
1712
|
"@lark-apaas/nestjs-datapaas": "^1.0.21",
|
|
1713
1713
|
"@lark-apaas/nestjs-http-forwarder": "^0.1.3",
|
|
1714
1714
|
"@lark-apaas/nestjs-logger": "^1.0.17",
|
|
1715
|
-
"@lark-apaas/nestjs-mcp": "0.1.1-alpha.
|
|
1715
|
+
"@lark-apaas/nestjs-mcp": "0.1.1-alpha.20260915105801",
|
|
1716
1716
|
"@lark-apaas/nestjs-observable": "^0.0.12",
|
|
1717
1717
|
"@lark-apaas/nestjs-openapi-devtools": "^1.0.10",
|
|
1718
1718
|
"@lark-apaas/nestjs-trigger": "^0.0.3",
|
|
@@ -1945,9 +1945,9 @@
|
|
|
1945
1945
|
}
|
|
1946
1946
|
},
|
|
1947
1947
|
"node_modules/@lark-apaas/nestjs-mcp": {
|
|
1948
|
-
"version": "0.1.1-alpha.
|
|
1949
|
-
"resolved": "https://registry.
|
|
1950
|
-
"integrity": "sha512-
|
|
1948
|
+
"version": "0.1.1-alpha.20260915105801",
|
|
1949
|
+
"resolved": "https://registry.npmmirror.com/@lark-apaas/nestjs-mcp/-/nestjs-mcp-0.1.1-alpha.20260915105801.tgz",
|
|
1950
|
+
"integrity": "sha512-VjW7VlIb24fFktFtzVxySetClX0yD0l5Eixx80LtnsdyKaOKWRW3GCZaVLb0Kn6k5cAao8kF/bImPp55u47Olg==",
|
|
1951
1951
|
"license": "MIT",
|
|
1952
1952
|
"dependencies": {
|
|
1953
1953
|
"@modelcontextprotocol/ext-apps": "^1.7.5",
|
|
@@ -2097,7 +2097,7 @@
|
|
|
2097
2097
|
},
|
|
2098
2098
|
"node_modules/@modelcontextprotocol/ext-apps": {
|
|
2099
2099
|
"version": "1.7.5",
|
|
2100
|
-
"resolved": "https://registry.
|
|
2100
|
+
"resolved": "https://registry.npmmirror.com/@modelcontextprotocol/ext-apps/-/ext-apps-1.7.5.tgz",
|
|
2101
2101
|
"integrity": "sha512-TjPH2S2y5UEGKhmI6+XGFuqfqOV4ppe1x6DA3txnUaEWkgtA4G5vo14jGKFZmegdkZ1H4QMLyujLvoU1BEdnAg==",
|
|
2102
2102
|
"license": "MIT",
|
|
2103
2103
|
"workspaces": [
|
|
@@ -2126,7 +2126,7 @@
|
|
|
2126
2126
|
},
|
|
2127
2127
|
"node_modules/@modelcontextprotocol/sdk": {
|
|
2128
2128
|
"version": "1.30.0",
|
|
2129
|
-
"resolved": "https://registry.
|
|
2129
|
+
"resolved": "https://registry.npmmirror.com/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz",
|
|
2130
2130
|
"integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==",
|
|
2131
2131
|
"license": "MIT",
|
|
2132
2132
|
"dependencies": {
|
|
@@ -2166,7 +2166,7 @@
|
|
|
2166
2166
|
},
|
|
2167
2167
|
"node_modules/@modelcontextprotocol/sdk/node_modules/accepts": {
|
|
2168
2168
|
"version": "2.0.0",
|
|
2169
|
-
"resolved": "https://registry.
|
|
2169
|
+
"resolved": "https://registry.npmmirror.com/accepts/-/accepts-2.0.0.tgz",
|
|
2170
2170
|
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
|
2171
2171
|
"license": "MIT",
|
|
2172
2172
|
"dependencies": {
|
|
@@ -2179,7 +2179,7 @@
|
|
|
2179
2179
|
},
|
|
2180
2180
|
"node_modules/@modelcontextprotocol/sdk/node_modules/ajv": {
|
|
2181
2181
|
"version": "8.20.0",
|
|
2182
|
-
"resolved": "https://registry.
|
|
2182
|
+
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.20.0.tgz",
|
|
2183
2183
|
"integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
|
|
2184
2184
|
"license": "MIT",
|
|
2185
2185
|
"dependencies": {
|
|
@@ -2195,7 +2195,7 @@
|
|
|
2195
2195
|
},
|
|
2196
2196
|
"node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats": {
|
|
2197
2197
|
"version": "3.0.1",
|
|
2198
|
-
"resolved": "https://registry.
|
|
2198
|
+
"resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz",
|
|
2199
2199
|
"integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
|
|
2200
2200
|
"license": "MIT",
|
|
2201
2201
|
"dependencies": {
|
|
@@ -2212,7 +2212,7 @@
|
|
|
2212
2212
|
},
|
|
2213
2213
|
"node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": {
|
|
2214
2214
|
"version": "2.3.0",
|
|
2215
|
-
"resolved": "https://registry.
|
|
2215
|
+
"resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-2.3.0.tgz",
|
|
2216
2216
|
"integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
|
|
2217
2217
|
"license": "MIT",
|
|
2218
2218
|
"dependencies": {
|
|
@@ -2236,7 +2236,7 @@
|
|
|
2236
2236
|
},
|
|
2237
2237
|
"node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type": {
|
|
2238
2238
|
"version": "2.1.0",
|
|
2239
|
-
"resolved": "https://registry.
|
|
2239
|
+
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-2.1.0.tgz",
|
|
2240
2240
|
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
|
2241
2241
|
"license": "MIT",
|
|
2242
2242
|
"engines": {
|
|
@@ -2249,7 +2249,7 @@
|
|
|
2249
2249
|
},
|
|
2250
2250
|
"node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": {
|
|
2251
2251
|
"version": "1.1.0",
|
|
2252
|
-
"resolved": "https://registry.
|
|
2252
|
+
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.1.0.tgz",
|
|
2253
2253
|
"integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
|
|
2254
2254
|
"license": "MIT",
|
|
2255
2255
|
"engines": {
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
},
|
|
2263
2263
|
"node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": {
|
|
2264
2264
|
"version": "1.2.2",
|
|
2265
|
-
"resolved": "https://registry.
|
|
2265
|
+
"resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
|
2266
2266
|
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
|
|
2267
2267
|
"license": "MIT",
|
|
2268
2268
|
"engines": {
|
|
@@ -2271,7 +2271,7 @@
|
|
|
2271
2271
|
},
|
|
2272
2272
|
"node_modules/@modelcontextprotocol/sdk/node_modules/express": {
|
|
2273
2273
|
"version": "5.2.1",
|
|
2274
|
-
"resolved": "https://registry.
|
|
2274
|
+
"resolved": "https://registry.npmmirror.com/express/-/express-5.2.1.tgz",
|
|
2275
2275
|
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
|
2276
2276
|
"license": "MIT",
|
|
2277
2277
|
"dependencies": {
|
|
@@ -2314,7 +2314,7 @@
|
|
|
2314
2314
|
},
|
|
2315
2315
|
"node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": {
|
|
2316
2316
|
"version": "2.1.1",
|
|
2317
|
-
"resolved": "https://registry.
|
|
2317
|
+
"resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-2.1.1.tgz",
|
|
2318
2318
|
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
|
|
2319
2319
|
"license": "MIT",
|
|
2320
2320
|
"dependencies": {
|
|
@@ -2335,7 +2335,7 @@
|
|
|
2335
2335
|
},
|
|
2336
2336
|
"node_modules/@modelcontextprotocol/sdk/node_modules/fresh": {
|
|
2337
2337
|
"version": "2.0.0",
|
|
2338
|
-
"resolved": "https://registry.
|
|
2338
|
+
"resolved": "https://registry.npmmirror.com/fresh/-/fresh-2.0.0.tgz",
|
|
2339
2339
|
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
|
2340
2340
|
"license": "MIT",
|
|
2341
2341
|
"engines": {
|
|
@@ -2344,7 +2344,7 @@
|
|
|
2344
2344
|
},
|
|
2345
2345
|
"node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": {
|
|
2346
2346
|
"version": "0.7.3",
|
|
2347
|
-
"resolved": "https://registry.
|
|
2347
|
+
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.3.tgz",
|
|
2348
2348
|
"integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
|
|
2349
2349
|
"license": "MIT",
|
|
2350
2350
|
"dependencies": {
|
|
@@ -2360,7 +2360,7 @@
|
|
|
2360
2360
|
},
|
|
2361
2361
|
"node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": {
|
|
2362
2362
|
"version": "1.1.1",
|
|
2363
|
-
"resolved": "https://registry.
|
|
2363
|
+
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-1.1.1.tgz",
|
|
2364
2364
|
"integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==",
|
|
2365
2365
|
"license": "MIT",
|
|
2366
2366
|
"engines": {
|
|
@@ -2373,7 +2373,7 @@
|
|
|
2373
2373
|
},
|
|
2374
2374
|
"node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": {
|
|
2375
2375
|
"version": "2.0.0",
|
|
2376
|
-
"resolved": "https://registry.
|
|
2376
|
+
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
|
2377
2377
|
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
|
|
2378
2378
|
"license": "MIT",
|
|
2379
2379
|
"engines": {
|
|
@@ -2385,7 +2385,7 @@
|
|
|
2385
2385
|
},
|
|
2386
2386
|
"node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": {
|
|
2387
2387
|
"version": "3.0.2",
|
|
2388
|
-
"resolved": "https://registry.
|
|
2388
|
+
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-3.0.2.tgz",
|
|
2389
2389
|
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
|
2390
2390
|
"license": "MIT",
|
|
2391
2391
|
"dependencies": {
|
|
@@ -2401,7 +2401,7 @@
|
|
|
2401
2401
|
},
|
|
2402
2402
|
"node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": {
|
|
2403
2403
|
"version": "1.1.0",
|
|
2404
|
-
"resolved": "https://registry.
|
|
2404
|
+
"resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.1.0.tgz",
|
|
2405
2405
|
"integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==",
|
|
2406
2406
|
"license": "MIT",
|
|
2407
2407
|
"dependencies": {
|
|
@@ -2417,7 +2417,7 @@
|
|
|
2417
2417
|
},
|
|
2418
2418
|
"node_modules/@modelcontextprotocol/sdk/node_modules/negotiator/node_modules/content-type": {
|
|
2419
2419
|
"version": "2.1.0",
|
|
2420
|
-
"resolved": "https://registry.
|
|
2420
|
+
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-2.1.0.tgz",
|
|
2421
2421
|
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
|
2422
2422
|
"license": "MIT",
|
|
2423
2423
|
"engines": {
|
|
@@ -2430,7 +2430,7 @@
|
|
|
2430
2430
|
},
|
|
2431
2431
|
"node_modules/@modelcontextprotocol/sdk/node_modules/qs": {
|
|
2432
2432
|
"version": "6.16.0",
|
|
2433
|
-
"resolved": "https://registry.
|
|
2433
|
+
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.16.0.tgz",
|
|
2434
2434
|
"integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==",
|
|
2435
2435
|
"license": "BSD-3-Clause",
|
|
2436
2436
|
"dependencies": {
|
|
@@ -2446,7 +2446,7 @@
|
|
|
2446
2446
|
},
|
|
2447
2447
|
"node_modules/@modelcontextprotocol/sdk/node_modules/raw-body": {
|
|
2448
2448
|
"version": "3.0.2",
|
|
2449
|
-
"resolved": "https://registry.
|
|
2449
|
+
"resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-3.0.2.tgz",
|
|
2450
2450
|
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
|
2451
2451
|
"license": "MIT",
|
|
2452
2452
|
"dependencies": {
|
|
@@ -2461,7 +2461,7 @@
|
|
|
2461
2461
|
},
|
|
2462
2462
|
"node_modules/@modelcontextprotocol/sdk/node_modules/send": {
|
|
2463
2463
|
"version": "1.2.1",
|
|
2464
|
-
"resolved": "https://registry.
|
|
2464
|
+
"resolved": "https://registry.npmmirror.com/send/-/send-1.2.1.tgz",
|
|
2465
2465
|
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
|
|
2466
2466
|
"license": "MIT",
|
|
2467
2467
|
"dependencies": {
|
|
@@ -2487,7 +2487,7 @@
|
|
|
2487
2487
|
},
|
|
2488
2488
|
"node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": {
|
|
2489
2489
|
"version": "2.2.1",
|
|
2490
|
-
"resolved": "https://registry.
|
|
2490
|
+
"resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-2.2.1.tgz",
|
|
2491
2491
|
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
|
|
2492
2492
|
"license": "MIT",
|
|
2493
2493
|
"dependencies": {
|
|
@@ -2506,7 +2506,7 @@
|
|
|
2506
2506
|
},
|
|
2507
2507
|
"node_modules/@modelcontextprotocol/sdk/node_modules/type-is": {
|
|
2508
2508
|
"version": "2.1.0",
|
|
2509
|
-
"resolved": "https://registry.
|
|
2509
|
+
"resolved": "https://registry.npmmirror.com/type-is/-/type-is-2.1.0.tgz",
|
|
2510
2510
|
"integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
|
|
2511
2511
|
"license": "MIT",
|
|
2512
2512
|
"dependencies": {
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
},
|
|
2525
2525
|
"node_modules/@modelcontextprotocol/sdk/node_modules/type-is/node_modules/content-type": {
|
|
2526
2526
|
"version": "2.1.0",
|
|
2527
|
-
"resolved": "https://registry.
|
|
2527
|
+
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-2.1.0.tgz",
|
|
2528
2528
|
"integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
|
|
2529
2529
|
"license": "MIT",
|
|
2530
2530
|
"engines": {
|
|
@@ -7577,7 +7577,7 @@
|
|
|
7577
7577
|
},
|
|
7578
7578
|
"node_modules/@standard-schema/spec": {
|
|
7579
7579
|
"version": "1.1.0",
|
|
7580
|
-
"resolved": "https://
|
|
7580
|
+
"resolved": "https://registry.npmmirror.com/@standard-schema/spec/-/spec-1.1.0.tgz",
|
|
7581
7581
|
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
|
7582
7582
|
"license": "MIT"
|
|
7583
7583
|
},
|
|
@@ -13259,7 +13259,7 @@
|
|
|
13259
13259
|
},
|
|
13260
13260
|
"node_modules/eventsource": {
|
|
13261
13261
|
"version": "3.0.7",
|
|
13262
|
-
"resolved": "https://registry.
|
|
13262
|
+
"resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-3.0.7.tgz",
|
|
13263
13263
|
"integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
|
|
13264
13264
|
"license": "MIT",
|
|
13265
13265
|
"dependencies": {
|
|
@@ -13271,7 +13271,7 @@
|
|
|
13271
13271
|
},
|
|
13272
13272
|
"node_modules/eventsource-parser": {
|
|
13273
13273
|
"version": "3.1.1",
|
|
13274
|
-
"resolved": "https://registry.
|
|
13274
|
+
"resolved": "https://registry.npmmirror.com/eventsource-parser/-/eventsource-parser-3.1.1.tgz",
|
|
13275
13275
|
"integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==",
|
|
13276
13276
|
"license": "MIT",
|
|
13277
13277
|
"engines": {
|
|
@@ -13350,7 +13350,7 @@
|
|
|
13350
13350
|
},
|
|
13351
13351
|
"node_modules/express-rate-limit": {
|
|
13352
13352
|
"version": "8.7.0",
|
|
13353
|
-
"resolved": "https://registry.
|
|
13353
|
+
"resolved": "https://registry.npmmirror.com/express-rate-limit/-/express-rate-limit-8.7.0.tgz",
|
|
13354
13354
|
"integrity": "sha512-hOwV7WOxXfjRpAM1DSJWZDXx3GhplwD8IfwuwvogD8i1Qnkgosw/H45s4ZnFAUHDAhPjlY9hLBvJhKmGMyY26g==",
|
|
13355
13355
|
"license": "MIT",
|
|
13356
13356
|
"dependencies": {
|
|
@@ -13545,7 +13545,7 @@
|
|
|
13545
13545
|
},
|
|
13546
13546
|
"node_modules/fast-uri": {
|
|
13547
13547
|
"version": "3.1.7",
|
|
13548
|
-
"resolved": "https://registry.
|
|
13548
|
+
"resolved": "https://registry.npmmirror.com/fast-uri/-/fast-uri-3.1.7.tgz",
|
|
13549
13549
|
"integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
|
|
13550
13550
|
"funding": [
|
|
13551
13551
|
{
|
|
@@ -14689,7 +14689,7 @@
|
|
|
14689
14689
|
},
|
|
14690
14690
|
"node_modules/hono": {
|
|
14691
14691
|
"version": "4.13.7",
|
|
14692
|
-
"resolved": "https://registry.
|
|
14692
|
+
"resolved": "https://registry.npmmirror.com/hono/-/hono-4.13.7.tgz",
|
|
14693
14693
|
"integrity": "sha512-c8/gF9ac8Y78/agExVocyLevgR+JlpNB444Py0FSX8pJoPdYUfUzRcXtYEYGwt6l19qIlVZPN5Mfsw9jFShmQQ==",
|
|
14694
14694
|
"license": "MIT",
|
|
14695
14695
|
"engines": {
|
|
@@ -15030,7 +15030,7 @@
|
|
|
15030
15030
|
},
|
|
15031
15031
|
"node_modules/ip-address": {
|
|
15032
15032
|
"version": "10.7.0",
|
|
15033
|
-
"resolved": "https://registry.
|
|
15033
|
+
"resolved": "https://registry.npmmirror.com/ip-address/-/ip-address-10.7.0.tgz",
|
|
15034
15034
|
"integrity": "sha512-BGFsyJd5mpXp3rK6jIdADLNgpJUK1jnjzvYF8lK+VyDab9JAmqN0YOKDdP17HlgKb2+ehPgDc8EtnRLbGCAMhA==",
|
|
15035
15035
|
"license": "MIT",
|
|
15036
15036
|
"engines": {
|
|
@@ -15457,7 +15457,7 @@
|
|
|
15457
15457
|
},
|
|
15458
15458
|
"node_modules/is-promise": {
|
|
15459
15459
|
"version": "4.0.0",
|
|
15460
|
-
"resolved": "https://registry.
|
|
15460
|
+
"resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-4.0.0.tgz",
|
|
15461
15461
|
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
|
15462
15462
|
"license": "MIT"
|
|
15463
15463
|
},
|
|
@@ -15724,7 +15724,7 @@
|
|
|
15724
15724
|
},
|
|
15725
15725
|
"node_modules/jose": {
|
|
15726
15726
|
"version": "6.2.12",
|
|
15727
|
-
"resolved": "https://registry.
|
|
15727
|
+
"resolved": "https://registry.npmmirror.com/jose/-/jose-6.2.12.tgz",
|
|
15728
15728
|
"integrity": "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw==",
|
|
15729
15729
|
"license": "MIT",
|
|
15730
15730
|
"funding": {
|
|
@@ -15795,7 +15795,7 @@
|
|
|
15795
15795
|
},
|
|
15796
15796
|
"node_modules/json-schema-typed": {
|
|
15797
15797
|
"version": "8.0.2",
|
|
15798
|
-
"resolved": "https://registry.
|
|
15798
|
+
"resolved": "https://registry.npmmirror.com/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
|
|
15799
15799
|
"integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
|
|
15800
15800
|
"license": "BSD-2-Clause"
|
|
15801
15801
|
},
|
|
@@ -18378,7 +18378,7 @@
|
|
|
18378
18378
|
},
|
|
18379
18379
|
"node_modules/parse5": {
|
|
18380
18380
|
"version": "7.3.0",
|
|
18381
|
-
"resolved": "https://registry.
|
|
18381
|
+
"resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.3.0.tgz",
|
|
18382
18382
|
"integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",
|
|
18383
18383
|
"dev": true,
|
|
18384
18384
|
"license": "MIT",
|
|
@@ -18391,7 +18391,7 @@
|
|
|
18391
18391
|
},
|
|
18392
18392
|
"node_modules/parse5/node_modules/entities": {
|
|
18393
18393
|
"version": "6.0.1",
|
|
18394
|
-
"resolved": "https://registry.
|
|
18394
|
+
"resolved": "https://registry.npmmirror.com/entities/-/entities-6.0.1.tgz",
|
|
18395
18395
|
"integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
|
|
18396
18396
|
"dev": true,
|
|
18397
18397
|
"license": "BSD-2-Clause",
|
|
@@ -18627,7 +18627,7 @@
|
|
|
18627
18627
|
},
|
|
18628
18628
|
"node_modules/pkce-challenge": {
|
|
18629
18629
|
"version": "5.0.1",
|
|
18630
|
-
"resolved": "https://registry.
|
|
18630
|
+
"resolved": "https://registry.npmmirror.com/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
|
|
18631
18631
|
"integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
|
|
18632
18632
|
"license": "MIT",
|
|
18633
18633
|
"engines": {
|
|
@@ -20304,7 +20304,7 @@
|
|
|
20304
20304
|
},
|
|
20305
20305
|
"node_modules/router": {
|
|
20306
20306
|
"version": "2.2.0",
|
|
20307
|
-
"resolved": "https://registry.
|
|
20307
|
+
"resolved": "https://registry.npmmirror.com/router/-/router-2.2.0.tgz",
|
|
20308
20308
|
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
|
|
20309
20309
|
"license": "MIT",
|
|
20310
20310
|
"dependencies": {
|
|
@@ -20320,7 +20320,7 @@
|
|
|
20320
20320
|
},
|
|
20321
20321
|
"node_modules/router/node_modules/path-to-regexp": {
|
|
20322
20322
|
"version": "8.4.2",
|
|
20323
|
-
"resolved": "https://registry.
|
|
20323
|
+
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
|
|
20324
20324
|
"integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
|
|
20325
20325
|
"license": "MIT",
|
|
20326
20326
|
"funding": {
|
|
@@ -23531,7 +23531,7 @@
|
|
|
23531
23531
|
},
|
|
23532
23532
|
"node_modules/yaml": {
|
|
23533
23533
|
"version": "2.9.1",
|
|
23534
|
-
"resolved": "https://registry.
|
|
23534
|
+
"resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.9.1.tgz",
|
|
23535
23535
|
"integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
|
|
23536
23536
|
"license": "ISC",
|
|
23537
23537
|
"bin": {
|
|
@@ -23607,7 +23607,7 @@
|
|
|
23607
23607
|
},
|
|
23608
23608
|
"node_modules/zod-to-json-schema": {
|
|
23609
23609
|
"version": "3.25.2",
|
|
23610
|
-
"resolved": "https://registry.
|
|
23610
|
+
"resolved": "https://registry.npmmirror.com/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz",
|
|
23611
23611
|
"integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==",
|
|
23612
23612
|
"license": "ISC",
|
|
23613
23613
|
"peerDependencies": {
|
package/template/package.json
CHANGED
|
@@ -20,15 +20,17 @@
|
|
|
20
20
|
"start": "NODE_ENV=production node main.js",
|
|
21
21
|
"eslint": "eslint . --quiet",
|
|
22
22
|
"stylelint": "stylelint client/src/**/*.css --quiet",
|
|
23
|
-
"type:check": "
|
|
23
|
+
"type:check": "node ./scripts/lint.js --typecheck",
|
|
24
24
|
"type:check:client": "tsc --noEmit --project tsconfig.app.json",
|
|
25
25
|
"type:check:server": "tsc --noEmit --project tsconfig.node.json",
|
|
26
26
|
"lint": "node ./scripts/lint.js",
|
|
27
27
|
"precommit": "node scripts/hooks/run-precommit.js",
|
|
28
|
-
"upgrade": "npx -y @lark-apaas/fullstack-cli sync --disable-gen-openapi"
|
|
28
|
+
"upgrade": "npx -y @lark-apaas/fullstack-cli sync --disable-gen-openapi",
|
|
29
|
+
"type:check:mcp-ui": "node ./scripts/lint.js --typecheck-mcp-ui",
|
|
30
|
+
"eslint:mcp-ui": "node ./scripts/lint.js --eslint-mcp-ui"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"@lark-apaas/fullstack-nestjs-core": "1.1.62-alpha.
|
|
33
|
+
"@lark-apaas/fullstack-nestjs-core": "1.1.62-alpha.20260915105802",
|
|
32
34
|
"@nestjs/axios": "^4.0.1",
|
|
33
35
|
"@nestjs/cache-manager": "^3.1.3",
|
|
34
36
|
"@nestjs/common": "^10.4.20",
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
"devDependencies": {
|
|
54
56
|
"@hookform/resolvers": "^5.2.2",
|
|
55
57
|
"@lark-apaas/client-toolkit": "^1.2.70",
|
|
56
|
-
"@lark-apaas/coding-preset-vite-react": "1.0.23-alpha.
|
|
58
|
+
"@lark-apaas/coding-preset-vite-react": "1.0.23-alpha.20260915105803",
|
|
57
59
|
"@lark-apaas/fullstack-presets": "^1.1.0",
|
|
58
60
|
"@nestjs/cli": "^10.4.9",
|
|
59
61
|
"@radix-ui/react-accordion": "^1.2.12",
|
package/template/scripts/lint.js
CHANGED
|
@@ -18,19 +18,31 @@ function runCommand(command, args) {
|
|
|
18
18
|
shell: false,
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
child.on('close', (code) => resolve(code
|
|
21
|
+
child.on('close', (code) => resolve(code ?? 1));
|
|
22
22
|
child.on('error', () => resolve(1));
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// 串行依次执行每个任务,全部跑完后再聚合退出码:
|
|
27
|
+
// 降低并发资源占用、让各任务输出按顺序清晰可读,同时保留“一次暴露所有 lint 问题”的行为。
|
|
28
|
+
async function runTasksSerially(taskSpecs) {
|
|
29
|
+
let exitCode = 0;
|
|
30
|
+
for (const [command, args] of taskSpecs) {
|
|
31
|
+
const code = await runCommand(command, args);
|
|
32
|
+
if (code !== 0) {
|
|
33
|
+
exitCode = 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return exitCode;
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
function normalizeProjectFile(filePath) {
|
|
27
40
|
const absolutePath = path.isAbsolute(filePath)
|
|
28
41
|
? filePath
|
|
29
42
|
: path.resolve(cwd, filePath);
|
|
30
43
|
|
|
31
44
|
if (!fs.existsSync(absolutePath)) {
|
|
32
|
-
console.
|
|
33
|
-
return null;
|
|
45
|
+
console.log(`[lint] Deleted file: ${filePath}; checking affected projects`);
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
const relativePath = path.relative(cwd, absolutePath);
|
|
@@ -94,17 +106,92 @@ function canRunStylelint() {
|
|
|
94
106
|
return STYLELINT_CONFIG_FILES.some(file => fs.existsSync(path.join(cwd, file)));
|
|
95
107
|
}
|
|
96
108
|
|
|
109
|
+
const UI_DIR = 'server/mcp/ui';
|
|
110
|
+
const UI_TYPECHECK = 'node ./scripts/lint.js --typecheck';
|
|
111
|
+
|
|
112
|
+
function isUiFile(file) {
|
|
113
|
+
return file.startsWith(`${UI_DIR}/`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function uiSourceFiles() {
|
|
117
|
+
const files = [];
|
|
118
|
+
function visit(relative) {
|
|
119
|
+
const absolute = path.join(cwd, relative);
|
|
120
|
+
if (!fs.existsSync(absolute)) return;
|
|
121
|
+
if (fs.lstatSync(absolute).isSymbolicLink()) {
|
|
122
|
+
throw new Error(`MCP UI 检查不支持符号链接: ${relative}`);
|
|
123
|
+
}
|
|
124
|
+
for (const entry of fs.readdirSync(absolute, { withFileTypes: true })) {
|
|
125
|
+
if (['node_modules', 'dist', '.git'].includes(entry.name)) continue;
|
|
126
|
+
const file = `${relative}/${entry.name}`;
|
|
127
|
+
if (entry.isSymbolicLink()) throw new Error(`MCP UI 检查不支持符号链接: ${file}`);
|
|
128
|
+
if (entry.isDirectory()) visit(file);
|
|
129
|
+
else if (isEslintTarget(file) && !/\.d\.(?:ts|mts|cts)$/.test(file)) files.push(file);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
visit(UI_DIR);
|
|
133
|
+
return files.sort();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function uiTasks({ types = true, eslint = true } = {}) {
|
|
137
|
+
const sources = uiSourceFiles();
|
|
138
|
+
if (!sources.length) return [];
|
|
139
|
+
const tasks = [];
|
|
140
|
+
if (types) {
|
|
141
|
+
const config = `${UI_DIR}/tsconfig.json`;
|
|
142
|
+
if (!fs.existsSync(path.join(cwd, config))) {
|
|
143
|
+
throw new Error(`MCP UI 缺少 ${config},请按 mcp-guide 补齐独立浏览器 TypeScript 配置。`);
|
|
144
|
+
}
|
|
145
|
+
const ts = require('typescript');
|
|
146
|
+
const parsed = ts.getParsedCommandLineOfConfigFile(path.join(cwd, config), {}, {
|
|
147
|
+
...ts.sys,
|
|
148
|
+
onUnRecoverableConfigFileDiagnostic: d => { throw new Error(ts.flattenDiagnosticMessageText(d.messageText, '\n')); },
|
|
149
|
+
});
|
|
150
|
+
if (!parsed || parsed.errors.length) throw new Error(`MCP UI TypeScript 配置无效: ${config}`);
|
|
151
|
+
const included = new Set(parsed.fileNames.map(file => path.resolve(file)));
|
|
152
|
+
const missing = sources.filter(file => !included.has(path.resolve(cwd, file)));
|
|
153
|
+
if (missing.length) throw new Error(`MCP UI TypeScript 配置未覆盖源码: ${missing.join(', ')};请检查 include/exclude,JS 源码需开启 allowJs。`);
|
|
154
|
+
tasks.push([getBinName('npx'), ['--no-install', 'tsc', '--noEmit', '-p', config]]);
|
|
155
|
+
}
|
|
156
|
+
if (eslint) {
|
|
157
|
+
const config = ['eslint.mcp-ui.config.js', 'eslint.mcp-ui.config.cjs', 'eslint.mcp-ui.config.mjs']
|
|
158
|
+
.find(file => fs.existsSync(path.join(cwd, file)));
|
|
159
|
+
if (!config) throw new Error('MCP UI 缺少独立 ESLint 配置,请按 mcp-guide 创建 eslint.mcp-ui.config.cjs。');
|
|
160
|
+
tasks.push([getBinName('npx'), ['--no-install', 'eslint', '--config', config, '--quiet', '--max-warnings', '0', ...sources]]);
|
|
161
|
+
}
|
|
162
|
+
return tasks;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function packageScripts() {
|
|
166
|
+
return JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf8')).scripts || {};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
async function runTypeCheck() {
|
|
170
|
+
const scripts = packageScripts();
|
|
171
|
+
const tasks = ['type:check:server', 'type:check:client'].map(name => {
|
|
172
|
+
if (!scripts[name]) throw new Error(`缺少 scripts.${name},请保留应用原有类型检查命令。`);
|
|
173
|
+
return [getBinName('npm'), ['run', name]];
|
|
174
|
+
});
|
|
175
|
+
tasks.push(...uiTasks({ eslint: false }));
|
|
176
|
+
process.exit(await runTasksSerially(tasks));
|
|
177
|
+
}
|
|
178
|
+
|
|
97
179
|
async function runDefaultLint() {
|
|
98
|
-
const
|
|
180
|
+
const taskSpecs = [
|
|
181
|
+
[getBinName('npm'), ['run', 'eslint']],
|
|
182
|
+
[getBinName('npm'), ['run', 'type:check']],
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
// Customized type:check remains untouched; ensure full lint still checks UI.
|
|
186
|
+
taskSpecs.push(...uiTasks({ types: packageScripts()['type:check'] !== UI_TYPECHECK }));
|
|
99
187
|
|
|
100
188
|
if (canRunStylelint()) {
|
|
101
|
-
|
|
189
|
+
taskSpecs.push([getBinName('npm'), ['run', 'stylelint']]);
|
|
102
190
|
} else {
|
|
103
191
|
console.warn('[lint] Skip stylelint: missing scripts.stylelint or stylelint config');
|
|
104
192
|
}
|
|
105
193
|
|
|
106
|
-
|
|
107
|
-
process.exit(code);
|
|
194
|
+
process.exit(await runTasksSerially(taskSpecs));
|
|
108
195
|
}
|
|
109
196
|
|
|
110
197
|
async function runSelectiveLint(inputFiles) {
|
|
@@ -117,15 +204,20 @@ async function runSelectiveLint(inputFiles) {
|
|
|
117
204
|
process.exit(0);
|
|
118
205
|
}
|
|
119
206
|
|
|
120
|
-
const eslintFiles = normalizedFiles.filter(isEslintTarget);
|
|
121
|
-
const stylelintFiles = normalizedFiles.filter(isStylelintTarget);
|
|
207
|
+
const eslintFiles = normalizedFiles.filter(file => fs.existsSync(path.join(cwd, file)) && isEslintTarget(file) && !isUiFile(file) && !file.startsWith('eslint.mcp-ui.config.'));
|
|
208
|
+
const stylelintFiles = normalizedFiles.filter(file => fs.existsSync(path.join(cwd, file)) && isStylelintTarget(file));
|
|
122
209
|
const typeCheckFiles = normalizedFiles.filter(isTypeCheckTarget);
|
|
123
210
|
|
|
124
211
|
const clientTypeFiles = [];
|
|
125
212
|
const serverTypeFiles = [];
|
|
213
|
+
const rootConfigChanged = normalizedFiles.some(file => /^tsconfig(?:\.[^/]*)?\.json$/.test(file));
|
|
214
|
+
if (rootConfigChanged) { clientTypeFiles.push('config'); serverTypeFiles.push('config'); }
|
|
215
|
+
let checkUi = rootConfigChanged || normalizedFiles.some(file => isUiFile(file) || file.startsWith('shared/') || file.startsWith('eslint.mcp-ui.config.'));
|
|
126
216
|
|
|
127
217
|
for (const filePath of typeCheckFiles) {
|
|
128
|
-
if (filePath
|
|
218
|
+
if (isUiFile(filePath)) {
|
|
219
|
+
checkUi = true;
|
|
220
|
+
} else if (filePath.startsWith('client/')) {
|
|
129
221
|
clientTypeFiles.push(filePath);
|
|
130
222
|
} else if (filePath.startsWith('server/')) {
|
|
131
223
|
serverTypeFiles.push(filePath);
|
|
@@ -135,36 +227,46 @@ async function runSelectiveLint(inputFiles) {
|
|
|
135
227
|
}
|
|
136
228
|
}
|
|
137
229
|
|
|
138
|
-
const
|
|
230
|
+
const taskSpecs = [];
|
|
139
231
|
|
|
140
232
|
if (eslintFiles.length > 0) {
|
|
141
|
-
|
|
233
|
+
taskSpecs.push([getBinName('npx'), ['eslint', '--quiet', ...eslintFiles]]);
|
|
142
234
|
}
|
|
143
235
|
|
|
144
236
|
if (stylelintFiles.length > 0 && !canRunStylelint()) {
|
|
145
237
|
console.warn('[lint] Skip stylelint: missing scripts.stylelint or stylelint config');
|
|
146
238
|
} else if (stylelintFiles.length > 0) {
|
|
147
|
-
|
|
239
|
+
taskSpecs.push([getBinName('npx'), ['stylelint', '--quiet', ...stylelintFiles]]);
|
|
148
240
|
}
|
|
149
241
|
|
|
150
242
|
if (clientTypeFiles.length > 0) {
|
|
151
|
-
|
|
243
|
+
taskSpecs.push([getBinName('npm'), ['run', 'type:check:client']]);
|
|
152
244
|
}
|
|
153
245
|
|
|
154
246
|
if (serverTypeFiles.length > 0) {
|
|
155
|
-
|
|
247
|
+
taskSpecs.push([getBinName('npm'), ['run', 'type:check:server']]);
|
|
156
248
|
}
|
|
157
249
|
|
|
158
|
-
if (
|
|
250
|
+
if (checkUi) taskSpecs.push(...uiTasks());
|
|
251
|
+
|
|
252
|
+
if (taskSpecs.length === 0) {
|
|
159
253
|
console.log('[lint] No supported files matched for lint');
|
|
160
254
|
process.exit(0);
|
|
161
255
|
}
|
|
162
256
|
|
|
163
|
-
|
|
164
|
-
process.exit(results.some(code => code !== 0) ? 1 : 0);
|
|
257
|
+
process.exit(await runTasksSerially(taskSpecs));
|
|
165
258
|
}
|
|
166
259
|
|
|
167
260
|
async function main() {
|
|
261
|
+
const args = process.argv.slice(2);
|
|
262
|
+
const modes = ['--typecheck', '--typecheck-mcp-ui', '--eslint-mcp-ui'];
|
|
263
|
+
if (args.length && !(args[0] === '--files' && args.length > 1) && !(args.length === 1 && modes.includes(args[0]))) {
|
|
264
|
+
throw new Error('用法: lint.js [--files <paths...> | --typecheck | --typecheck-mcp-ui | --eslint-mcp-ui]');
|
|
265
|
+
}
|
|
266
|
+
if (args[0] === '--files' && args.slice(1).some(arg => arg.startsWith('--'))) throw new Error('--files 不可与其他检查模式混用');
|
|
267
|
+
if (args.includes('--typecheck')) return runTypeCheck();
|
|
268
|
+
if (args.includes('--typecheck-mcp-ui')) return process.exit(await runTasksSerially(uiTasks({ eslint: false })));
|
|
269
|
+
if (args.includes('--eslint-mcp-ui')) return process.exit(await runTasksSerially(uiTasks({ types: false })));
|
|
168
270
|
const files = parseFilesArg(process.argv.slice(2));
|
|
169
271
|
if (files === null) {
|
|
170
272
|
await runDefaultLint();
|