@lark-apaas/coding-template-nestjs-react-fullstack 0.1.46 → 0.1.47-alpha.20260930060132
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
|
@@ -8,12 +8,20 @@ const SEP = ' ' + '─'.repeat(36);
|
|
|
8
8
|
|
|
9
9
|
function failAndExit(step, body) {
|
|
10
10
|
process.stderr.write('\n✗ pre-commit failed: ' + step + '\n');
|
|
11
|
+
process.stderr.write(' command: npm run lint\n');
|
|
11
12
|
process.stderr.write(SEP + '\n');
|
|
12
13
|
if (body && body.length > 0) {
|
|
13
|
-
process.stderr.write(body
|
|
14
|
+
process.stderr.write(body);
|
|
15
|
+
if (!body.endsWith('\n')) process.stderr.write('\n');
|
|
14
16
|
}
|
|
15
17
|
process.stderr.write(SEP + '\n');
|
|
16
|
-
process.stderr.write(
|
|
18
|
+
process.stderr.write(
|
|
19
|
+
' 修复可编辑代码并重跑 npm run lint(原项目完整检查)。\n',
|
|
20
|
+
);
|
|
21
|
+
process.stderr.write(
|
|
22
|
+
' 命中平台受保护路径时停止反复编辑该文件或检查配置;记录路径、规则和检查原始输出,交有权限的平台维护者修复并复查。\n',
|
|
23
|
+
);
|
|
24
|
+
process.stderr.write(' 检查仍未通过;不得声称检查或提交成功。\n');
|
|
17
25
|
process.exit(1);
|
|
18
26
|
}
|
|
19
27
|
|
|
@@ -25,7 +33,7 @@ function runLint() {
|
|
|
25
33
|
env: process.env,
|
|
26
34
|
});
|
|
27
35
|
if (res.error) {
|
|
28
|
-
failAndExit('lint', String(res.error.
|
|
36
|
+
failAndExit('lint', String(res.error.stack || res.error));
|
|
29
37
|
}
|
|
30
38
|
if (res.status !== 0) {
|
|
31
39
|
const stdout = res.stdout ? res.stdout.toString() : '';
|