listpage_cli 0.0.296 → 0.0.297
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.
|
@@ -55,11 +55,19 @@ function readConfigText(reader, configPath) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
function validateRequiredFields(config, configPath) {
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const artifacts = config.artifacts;
|
|
59
|
+
// v1.1 配置:存在 artifacts 时,不再强制校验顶层 frontend/backend 必填,
|
|
60
|
+
// 仅对 artifacts.copyFiles 做结构校验,避免对新配置形态误报。
|
|
61
|
+
if (artifacts && typeof artifacts === "object" && !Array.isArray(artifacts)) {
|
|
62
|
+
validateCopyFiles(artifacts, configPath);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// 旧配置形态(无 artifacts):保持原有必填校验以兼容历史行为
|
|
66
|
+
const legacyFrontend = config.frontend;
|
|
67
|
+
if (!Array.isArray(legacyFrontend) || legacyFrontend.length === 0) {
|
|
60
68
|
throw new ConfigLoaderError("CONFIG_REQUIRED_FIELD_MISSING", configPath, `[${exports.CONFIG_LOADER_STAGE}][CONFIG_REQUIRED_FIELD_MISSING] 配置缺少必填字段: frontend (至少包含一个构建项)`);
|
|
61
69
|
}
|
|
62
|
-
|
|
70
|
+
legacyFrontend.forEach((item, index) => {
|
|
63
71
|
const projectDir = getNestedString({ frontend: item }, "frontend.projectDir");
|
|
64
72
|
if (!projectDir) {
|
|
65
73
|
throw new ConfigLoaderError("CONFIG_REQUIRED_FIELD_MISSING", configPath, `[${exports.CONFIG_LOADER_STAGE}][CONFIG_REQUIRED_FIELD_MISSING] 配置缺少必填字段: frontend[${index}].projectDir`);
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "^19.2.0",
|
|
14
14
|
"react-dom": "^19.2.0",
|
|
15
|
-
"listpage-next": "~0.0.
|
|
15
|
+
"listpage-next": "~0.0.297",
|
|
16
16
|
"react-router-dom": ">=6.0.0",
|
|
17
17
|
"@ant-design/v5-patch-for-react-19": "~1.0.3",
|
|
18
18
|
"ahooks": "^3.9.5",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"styled-components": "^6.1.19",
|
|
24
24
|
"mobx": "~6.15.0",
|
|
25
25
|
"@ant-design/icons": "~6.0.2",
|
|
26
|
-
"listpage-components": "~0.0.
|
|
26
|
+
"listpage-components": "~0.0.297",
|
|
27
27
|
"lucide-react": "~0.575.0"
|
|
28
28
|
"mobx-react-lite": "~4.1.1"
|
|
29
29
|
},
|