@camstack/server 1.2.149 → 1.2.150
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.
|
@@ -767,17 +767,26 @@ class MoleculerService {
|
|
|
767
767
|
// re-handshaking), so the rule resolves the same key on both sides.
|
|
768
768
|
const registryKeyFor = (addonId) => isLocalChild ? addonId : `${addonId}@${nodeId}`;
|
|
769
769
|
// Collect the `(registryKey, capName)` pairs a manifest would APPLY —
|
|
770
|
-
// applying the SAME
|
|
771
|
-
//
|
|
772
|
-
//
|
|
770
|
+
// applying the SAME infra skip and `capDef` existence check the
|
|
771
|
+
// register block below uses, so the set reflects exactly what is
|
|
772
|
+
// (or would have been) registered. Keyed `${registryKey}::${capName}`.
|
|
773
773
|
// The resolved `capDef` is carried through so the register loop never
|
|
774
774
|
// re-looks it up (and never needs a non-null assertion).
|
|
775
|
+
//
|
|
776
|
+
// Infra caps (`data-store-provider`, `storage-provider`, …) used to be
|
|
777
|
+
// skipped for EVERY handshake. That was right for a remote agent — the
|
|
778
|
+
// hub collection is this node's engine, and a second sqlite would make
|
|
779
|
+
// the door refuse (D44). It is wrong for a hub-local child: sqlite-settings
|
|
780
|
+
// isolate (D231) IS this node's engine, and skipping it leaves
|
|
781
|
+
// `getCollection` empty. Hub-local children are proxied; remote nodes
|
|
782
|
+
// are not (D233).
|
|
783
|
+
const skipInfraFromRemote = (capName) => (0, system_1.isInfraCapability)(capName) && !isLocalChild;
|
|
775
784
|
const appliedKeys = (manifest) => {
|
|
776
785
|
const keys = new Map();
|
|
777
786
|
for (const addon of manifest) {
|
|
778
787
|
const registryKey = registryKeyFor(addon.addonId);
|
|
779
788
|
for (const capName of addon.capabilities) {
|
|
780
|
-
if ((
|
|
789
|
+
if (skipInfraFromRemote(capName))
|
|
781
790
|
continue;
|
|
782
791
|
const capDef = registry.getDefinition(capName);
|
|
783
792
|
if (!capDef)
|