multicloud_rule_manager 1.1.50 → 1.1.51
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/commands/retrievedatamap.js +11 -5
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ export default {
|
|
|
8
8
|
output: { type: "string", default: "retrieve.json", describe: "File di output" }
|
|
9
9
|
},
|
|
10
10
|
handler: async (argv) => {
|
|
11
|
-
|
|
12
11
|
function buildMapObject(children) {
|
|
13
12
|
if (!Array.isArray(children) || children.length === 0) return [];
|
|
14
13
|
|
|
@@ -32,9 +31,15 @@ export default {
|
|
|
32
31
|
field_type: item.field_type,
|
|
33
32
|
target_name: item.target_name
|
|
34
33
|
}))
|
|
34
|
+
.sort((a, b) =>
|
|
35
|
+
(a.target_name || "").localeCompare(b.target_name || "")
|
|
36
|
+
)
|
|
35
37
|
: [];
|
|
36
38
|
|
|
37
|
-
const childrenNodes = buildMapObject(child.map_objects)
|
|
39
|
+
const childrenNodes = buildMapObject(child.map_objects)
|
|
40
|
+
.sort((a, b) =>
|
|
41
|
+
(a.name || "").localeCompare(b.name || "")
|
|
42
|
+
);
|
|
38
43
|
|
|
39
44
|
// ❗ se non ha né items né figli validi → scartalo
|
|
40
45
|
if (items.length === 0 && childrenNodes.length === 0) {
|
|
@@ -50,12 +55,13 @@ export default {
|
|
|
50
55
|
|
|
51
56
|
return template;
|
|
52
57
|
})
|
|
53
|
-
.filter(Boolean)
|
|
58
|
+
.filter(Boolean)
|
|
59
|
+
.sort((a, b) =>
|
|
60
|
+
(a.name || "").localeCompare(b.name || "")
|
|
61
|
+
);
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
65
|
try {
|
|
60
66
|
console.log("🔹 Retrieve Datamap in corso..");
|
|
61
67
|
console.log("🔹 Recupero credenziali per alias:", argv.alias);
|