@geravant/sinain 1.22.4 → 1.22.5
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/package.json +1 -1
- package/sinain-core/src/index.ts +7 -1
package/package.json
CHANGED
package/sinain-core/src/index.ts
CHANGED
|
@@ -264,7 +264,13 @@ async function exportConceptBundle(
|
|
|
264
264
|
{ timeout: 30_000, encoding: "utf-8", maxBuffer: 50 * 1024 * 1024 });
|
|
265
265
|
const parsed = JSON.parse(stdout);
|
|
266
266
|
// If the export found at least one entity (the root), return it.
|
|
267
|
-
|
|
267
|
+
// BFS always includes the root in `visited`, so entities >= 1 always —
|
|
268
|
+
// not a useful guard. Check for actual triples instead, otherwise we
|
|
269
|
+
// accept a bundle that has just the root with no data and never try
|
|
270
|
+
// the next DB. This was the bug that produced empty parloa bundles
|
|
271
|
+
// when entity:parloa lived in the workspace DB but local was checked
|
|
272
|
+
// first and returned an empty (root-only) bundle.
|
|
273
|
+
if (parsed.stats && parsed.stats.triples > 0) return parsed;
|
|
268
274
|
} catch (e) {
|
|
269
275
|
// try next DB
|
|
270
276
|
}
|