@openscout/runtime 0.2.30 → 0.2.31
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/mesh-discovery.js +4 -0
- package/package.json +2 -2
- package/src/mesh-discovery.ts +3 -0
package/dist/mesh-discovery.js
CHANGED
|
@@ -58,6 +58,7 @@ export async function discoverMeshNodes(options) {
|
|
|
58
58
|
const candidates = unique([...peerSeeds, ...tailscaleSeeds])
|
|
59
59
|
.filter((seed) => seed && seed !== options.localBrokerUrl);
|
|
60
60
|
const discovered = [];
|
|
61
|
+
const seen = new Set();
|
|
61
62
|
for (const seed of candidates) {
|
|
62
63
|
const node = await probeNode(seed, options.timeoutMs ?? 1500);
|
|
63
64
|
if (!node)
|
|
@@ -66,6 +67,9 @@ export async function discoverMeshNodes(options) {
|
|
|
66
67
|
continue;
|
|
67
68
|
if (node.meshId !== options.meshId)
|
|
68
69
|
continue;
|
|
70
|
+
if (seen.has(node.id))
|
|
71
|
+
continue;
|
|
72
|
+
seen.add(node.id);
|
|
69
73
|
discovered.push({
|
|
70
74
|
...node,
|
|
71
75
|
brokerUrl: node.brokerUrl ?? seed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openscout/runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "Local runtime foundation for the OpenScout control plane",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"postpack": "node ../../scripts/restore-publish-manifest.mjs ."
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@openscout/protocol": "0.2.
|
|
89
|
+
"@openscout/protocol": "0.2.31",
|
|
90
90
|
"smol-toml": "^1.6.1"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
package/src/mesh-discovery.ts
CHANGED
|
@@ -82,12 +82,15 @@ export async function discoverMeshNodes(
|
|
|
82
82
|
.filter((seed) => seed && seed !== options.localBrokerUrl);
|
|
83
83
|
|
|
84
84
|
const discovered: NodeDefinition[] = [];
|
|
85
|
+
const seen = new Set<string>();
|
|
85
86
|
|
|
86
87
|
for (const seed of candidates) {
|
|
87
88
|
const node = await probeNode(seed, options.timeoutMs ?? 1500);
|
|
88
89
|
if (!node) continue;
|
|
89
90
|
if (node.id === options.localNodeId) continue;
|
|
90
91
|
if (node.meshId !== options.meshId) continue;
|
|
92
|
+
if (seen.has(node.id)) continue;
|
|
93
|
+
seen.add(node.id);
|
|
91
94
|
|
|
92
95
|
discovered.push({
|
|
93
96
|
...node,
|