@lark-apaas/coding-template-nestjs-react-fullstack 0.1.72-alpha.20261123002135 → 0.1.72-alpha.20261123065914
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
CHANGED
|
@@ -1568,6 +1568,16 @@
|
|
|
1568
1568
|
"styled-jsx": ">=5.0.0"
|
|
1569
1569
|
}
|
|
1570
1570
|
},
|
|
1571
|
+
"node_modules/@lark-apaas/client-toolkit/node_modules/clsx": {
|
|
1572
|
+
"version": "2.0.1",
|
|
1573
|
+
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.1.tgz",
|
|
1574
|
+
"integrity": "sha512-PrYqtepbSWwrFmtHX0IHv3zUEbWn1psIqaIZyjB3b9wEGpRAkpyeKbCCCkCXJYiHZPjK7jckJvf2sEB/8VKPgQ==",
|
|
1575
|
+
"dev": true,
|
|
1576
|
+
"license": "MIT",
|
|
1577
|
+
"engines": {
|
|
1578
|
+
"node": ">=6"
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1571
1581
|
"node_modules/@lark-apaas/client-toolkit/node_modules/crypto-js": {
|
|
1572
1582
|
"version": "3.1.9-1",
|
|
1573
1583
|
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.1.9-1.tgz",
|
|
@@ -1575,6 +1585,20 @@
|
|
|
1575
1585
|
"dev": true,
|
|
1576
1586
|
"license": "MIT"
|
|
1577
1587
|
},
|
|
1588
|
+
"node_modules/@lark-apaas/client-toolkit/node_modules/tailwind-merge": {
|
|
1589
|
+
"version": "2.0.0",
|
|
1590
|
+
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.0.0.tgz",
|
|
1591
|
+
"integrity": "sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw==",
|
|
1592
|
+
"dev": true,
|
|
1593
|
+
"license": "MIT",
|
|
1594
|
+
"dependencies": {
|
|
1595
|
+
"@babel/runtime": "^7.23.1"
|
|
1596
|
+
},
|
|
1597
|
+
"funding": {
|
|
1598
|
+
"type": "github",
|
|
1599
|
+
"url": "https://github.com/sponsors/dcastil"
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1578
1602
|
"node_modules/@lark-apaas/coding-preset-vite-react": {
|
|
1579
1603
|
"version": "1.0.33",
|
|
1580
1604
|
"resolved": "https://registry.npmmirror.com/@lark-apaas/coding-preset-vite-react/-/coding-preset-vite-react-1.0.33.tgz",
|
|
@@ -1628,6 +1652,17 @@
|
|
|
1628
1652
|
"dev": true,
|
|
1629
1653
|
"license": "MIT"
|
|
1630
1654
|
},
|
|
1655
|
+
"node_modules/@lark-apaas/coding-preset-vite-react/node_modules/tailwind-merge": {
|
|
1656
|
+
"version": "2.6.2",
|
|
1657
|
+
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.2.tgz",
|
|
1658
|
+
"integrity": "sha512-o2TX9QB8K2cfaJYgMwv96uAUQK5SqpRJHD2vGDK5nyF/tk9PQTZFpwgsDsySQjlIbYdZ6ZDkk5W+bSuWSe92AA==",
|
|
1659
|
+
"dev": true,
|
|
1660
|
+
"license": "MIT",
|
|
1661
|
+
"funding": {
|
|
1662
|
+
"type": "github",
|
|
1663
|
+
"url": "https://github.com/sponsors/dcastil"
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1631
1666
|
"node_modules/@lark-apaas/dataloom": {
|
|
1632
1667
|
"version": "0.1.6",
|
|
1633
1668
|
"resolved": "https://registry.npmmirror.com/@lark-apaas/dataloom/-/dataloom-0.1.6.tgz",
|
|
@@ -1755,6 +1790,30 @@
|
|
|
1755
1790
|
"react": ">=16.8.0"
|
|
1756
1791
|
}
|
|
1757
1792
|
},
|
|
1793
|
+
"node_modules/@lark-apaas/miaoda-inspector/node_modules/clsx": {
|
|
1794
|
+
"version": "2.0.1",
|
|
1795
|
+
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.1.tgz",
|
|
1796
|
+
"integrity": "sha512-PrYqtepbSWwrFmtHX0IHv3zUEbWn1psIqaIZyjB3b9wEGpRAkpyeKbCCCkCXJYiHZPjK7jckJvf2sEB/8VKPgQ==",
|
|
1797
|
+
"dev": true,
|
|
1798
|
+
"license": "MIT",
|
|
1799
|
+
"engines": {
|
|
1800
|
+
"node": ">=6"
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
"node_modules/@lark-apaas/miaoda-inspector/node_modules/tailwind-merge": {
|
|
1804
|
+
"version": "2.0.0",
|
|
1805
|
+
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.0.0.tgz",
|
|
1806
|
+
"integrity": "sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw==",
|
|
1807
|
+
"dev": true,
|
|
1808
|
+
"license": "MIT",
|
|
1809
|
+
"dependencies": {
|
|
1810
|
+
"@babel/runtime": "^7.23.1"
|
|
1811
|
+
},
|
|
1812
|
+
"funding": {
|
|
1813
|
+
"type": "github",
|
|
1814
|
+
"url": "https://github.com/sponsors/dcastil"
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1758
1817
|
"node_modules/@lark-apaas/nestjs-authnpaas": {
|
|
1759
1818
|
"version": "1.0.11",
|
|
1760
1819
|
"resolved": "https://registry.npmmirror.com/@lark-apaas/nestjs-authnpaas/-/nestjs-authnpaas-1.0.11.tgz",
|
|
@@ -20956,6 +21015,17 @@
|
|
|
20956
21015
|
"tailwindcss": "*"
|
|
20957
21016
|
}
|
|
20958
21017
|
},
|
|
21018
|
+
"node_modules/tailwind-variants/node_modules/tailwind-merge": {
|
|
21019
|
+
"version": "2.5.4",
|
|
21020
|
+
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz",
|
|
21021
|
+
"integrity": "sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==",
|
|
21022
|
+
"dev": true,
|
|
21023
|
+
"license": "MIT",
|
|
21024
|
+
"funding": {
|
|
21025
|
+
"type": "github",
|
|
21026
|
+
"url": "https://github.com/sponsors/dcastil"
|
|
21027
|
+
}
|
|
21028
|
+
},
|
|
20959
21029
|
"node_modules/tailwindcss": {
|
|
20960
21030
|
"version": "4.3.3",
|
|
20961
21031
|
"resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-4.3.3.tgz",
|
package/template/package.json
CHANGED
|
@@ -136,14 +136,6 @@
|
|
|
136
136
|
"vite": "^8",
|
|
137
137
|
"zod": "^4.3.6"
|
|
138
138
|
},
|
|
139
|
-
"overrides": {
|
|
140
|
-
"dayjs": "^1.11.15",
|
|
141
|
-
"clsx": "^2.1.1",
|
|
142
|
-
"tailwind-merge": "^3.5.0",
|
|
143
|
-
"zod": "^4.3.6",
|
|
144
|
-
"echarts": "^6.1.0",
|
|
145
|
-
"stylelint": "^17.3.0"
|
|
146
|
-
},
|
|
147
139
|
"engines": {
|
|
148
140
|
"node": ">=22.0.0",
|
|
149
141
|
"npm": ">=10.0.0"
|
|
@@ -16,7 +16,6 @@ export enum ResponseCode {
|
|
|
16
16
|
VALIDATION_ERROR = 'VALIDATION_ERROR',
|
|
17
17
|
CONFLICT = 'CONFLICT',
|
|
18
18
|
TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS',
|
|
19
|
-
PAYLOAD_TOO_LARGE = 'PAYLOAD_TOO_LARGE',
|
|
20
19
|
|
|
21
20
|
// 服务端错误
|
|
22
21
|
INTERNAL_ERROR = 'INTERNAL_ERROR',
|
|
@@ -41,7 +40,6 @@ export const RESPONSE_CODE_TO_HTTP_STATUS_MAP: Record<ResponseCode, number> = {
|
|
|
41
40
|
[ResponseCode.VALIDATION_ERROR]: HttpStatus.UNPROCESSABLE_ENTITY,
|
|
42
41
|
[ResponseCode.CONFLICT]: HttpStatus.CONFLICT,
|
|
43
42
|
[ResponseCode.TOO_MANY_REQUESTS]: HttpStatus.TOO_MANY_REQUESTS,
|
|
44
|
-
[ResponseCode.PAYLOAD_TOO_LARGE]: HttpStatus.PAYLOAD_TOO_LARGE,
|
|
45
43
|
|
|
46
44
|
[ResponseCode.INTERNAL_ERROR]: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
47
45
|
[ResponseCode.BAD_GATEWAY]: HttpStatus.BAD_GATEWAY,
|
|
@@ -44,23 +44,6 @@ export class GlobalExceptionFilter implements ExceptionFilter {
|
|
|
44
44
|
timestamp: Date.now(),
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
|
-
} else if (
|
|
48
|
-
typeof exception === 'object' &&
|
|
49
|
-
exception !== null &&
|
|
50
|
-
((exception as { status?: unknown }).status === HttpStatus.PAYLOAD_TOO_LARGE ||
|
|
51
|
-
(exception as { statusCode?: unknown }).statusCode === HttpStatus.PAYLOAD_TOO_LARGE ||
|
|
52
|
-
(exception as { type?: unknown }).type === 'entity.too.large')
|
|
53
|
-
) {
|
|
54
|
-
// body-parser 请求体超限(PayloadTooLargeError):status/statusCode 为 413 或 type 为 entity.too.large
|
|
55
|
-
// 错误发生在 Nest 路由之前,按异常自带语义状态码响应,避免被兜成 500
|
|
56
|
-
httpStatus = HttpStatus.PAYLOAD_TOO_LARGE;
|
|
57
|
-
errorResponse = {
|
|
58
|
-
error: {
|
|
59
|
-
code: ResponseCode.PAYLOAD_TOO_LARGE,
|
|
60
|
-
message: '请求体过大',
|
|
61
|
-
timestamp: Date.now(),
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
47
|
} else if (
|
|
65
48
|
typeof exception === 'object' &&
|
|
66
49
|
exception !== null &&
|