ai-project-manage-cli 3.0.7 → 3.0.8
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/dist/index.js +11 -1
- package/package.json +1 -1
- package/template/apm.config.json +0 -1
package/dist/index.js
CHANGED
|
@@ -730,6 +730,16 @@ function req(v, field) {
|
|
|
730
730
|
}
|
|
731
731
|
return v;
|
|
732
732
|
}
|
|
733
|
+
function reqTopLevelName(cfg) {
|
|
734
|
+
const n = (cfg.name ?? "").trim();
|
|
735
|
+
if (!n) {
|
|
736
|
+
console.error(
|
|
737
|
+
"\u8BF7\u5728 apm.config.json \u9876\u5C42\u914D\u7F6E name\uFF08\u4E0E\u524D\u7AEF\u5236\u54C1\u524D\u7F00\u3001\u540E\u7AEF\u955C\u50CF\u540D\u5171\u7528\uFF09"
|
|
738
|
+
);
|
|
739
|
+
process.exit(1);
|
|
740
|
+
}
|
|
741
|
+
return n;
|
|
742
|
+
}
|
|
733
743
|
function reqBackendPositiveInt(v, field) {
|
|
734
744
|
const n = Number(v);
|
|
735
745
|
if (!Number.isFinite(n) || !Number.isInteger(n) || n < 1) {
|
|
@@ -762,7 +772,7 @@ function resolveBackendDeployFromApmConfig(cfg) {
|
|
|
762
772
|
mappings = rawPorts.map((x) => String(x).trim()).filter(Boolean);
|
|
763
773
|
}
|
|
764
774
|
return {
|
|
765
|
-
name:
|
|
775
|
+
name: reqTopLevelName(cfg),
|
|
766
776
|
registryHost: req(b.registryHost, "registryHost").trim(),
|
|
767
777
|
registryNamespace: req(b.registryNamespace, "registryNamespace").trim(),
|
|
768
778
|
registryUser: req(b.registryUser, "registryUser").trim(),
|
package/package.json
CHANGED