openxiangda 1.0.219 → 1.0.220
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.
|
@@ -592,6 +592,22 @@ function hashWorkspaceFile(cwd, relativePath) {
|
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
function normalizeCandidateResourceBindings(value) {
|
|
596
|
+
if (Array.isArray(value)) {
|
|
597
|
+
return value.map(item => normalizeCandidateResourceBindings(item));
|
|
598
|
+
}
|
|
599
|
+
if (!value || typeof value !== 'object') return value;
|
|
600
|
+
return Object.fromEntries(
|
|
601
|
+
Object.entries(value)
|
|
602
|
+
.filter(([key]) => !['createdAt', 'updatedAt', 'syncedAt'].includes(key))
|
|
603
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
604
|
+
.map(([key, item]) => [
|
|
605
|
+
key,
|
|
606
|
+
normalizeCandidateResourceBindings(item),
|
|
607
|
+
])
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
595
611
|
function buildCandidateEnvironmentBindings(state) {
|
|
596
612
|
const targets =
|
|
597
613
|
state?.targets && typeof state.targets === 'object'
|
|
@@ -615,7 +631,9 @@ function buildCandidateEnvironmentBindings(state) {
|
|
|
615
631
|
binding?.revision === undefined
|
|
616
632
|
? null
|
|
617
633
|
: binding.revision,
|
|
618
|
-
resources:
|
|
634
|
+
resources:
|
|
635
|
+
normalizeCandidateResourceBindings(binding?.resources || {}) ||
|
|
636
|
+
{},
|
|
619
637
|
},
|
|
620
638
|
])
|
|
621
639
|
);
|