@nicia-ai/typegraph 0.35.0 → 0.36.0
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/backend/postgres/index.cjs +19 -19
- package/dist/backend/postgres/index.js +6 -6
- package/dist/backend/postgres/pglite.cjs +11 -11
- package/dist/backend/postgres/pglite.js +6 -6
- package/dist/backend/sqlite/index.cjs +9 -9
- package/dist/backend/sqlite/index.js +6 -6
- package/dist/backend/sqlite/libsql.cjs +8 -8
- package/dist/backend/sqlite/libsql.js +6 -6
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.js +6 -6
- package/dist/{chunk-VPYHY3LJ.cjs → chunk-2THZ3TQI.cjs} +11 -11
- package/dist/{chunk-VPYHY3LJ.cjs.map → chunk-2THZ3TQI.cjs.map} +1 -1
- package/dist/{chunk-EM3CWPND.cjs → chunk-456Z2U7Y.cjs} +51 -51
- package/dist/{chunk-EM3CWPND.cjs.map → chunk-456Z2U7Y.cjs.map} +1 -1
- package/dist/{chunk-GSQ6NPH6.cjs → chunk-4BCU6VFZ.cjs} +7 -7
- package/dist/{chunk-GSQ6NPH6.cjs.map → chunk-4BCU6VFZ.cjs.map} +1 -1
- package/dist/chunk-4BMPGT35.cjs +12 -0
- package/dist/{chunk-GUR2FNB5.cjs.map → chunk-4BMPGT35.cjs.map} +1 -1
- package/dist/{chunk-WJT7OU7E.cjs → chunk-4CAXEB2F.cjs} +124 -92
- package/dist/chunk-4CAXEB2F.cjs.map +1 -0
- package/dist/{chunk-WDBCBWC4.js → chunk-4GX2JJXS.js} +6 -6
- package/dist/{chunk-WDBCBWC4.js.map → chunk-4GX2JJXS.js.map} +1 -1
- package/dist/{chunk-UES55P7G.js → chunk-5DIPR3L3.js} +284 -154
- package/dist/chunk-5DIPR3L3.js.map +1 -0
- package/dist/{chunk-CZQ3FO2Q.js → chunk-5VTR2F2K.js} +49 -16
- package/dist/chunk-5VTR2F2K.js.map +1 -0
- package/dist/{chunk-CTTSDJLY.cjs → chunk-5W4L6DLF.cjs} +11 -11
- package/dist/{chunk-CTTSDJLY.cjs.map → chunk-5W4L6DLF.cjs.map} +1 -1
- package/dist/{chunk-J7WFGBJR.cjs → chunk-7BQLPXK6.cjs} +865 -735
- package/dist/chunk-7BQLPXK6.cjs.map +1 -0
- package/dist/{chunk-3TWF3SH4.js → chunk-BJVEU3ZL.js} +7 -7
- package/dist/{chunk-3TWF3SH4.js.map → chunk-BJVEU3ZL.js.map} +1 -1
- package/dist/{chunk-LGEALRC6.cjs → chunk-DIK74MXX.cjs} +18 -2
- package/dist/chunk-DIK74MXX.cjs.map +1 -0
- package/dist/{chunk-QNKSQTKQ.js → chunk-DN5VP4JC.js} +48 -17
- package/dist/chunk-DN5VP4JC.js.map +1 -0
- package/dist/{chunk-4JEZZJ6S.cjs → chunk-HW3LW7DH.cjs} +39 -39
- package/dist/{chunk-4JEZZJ6S.cjs.map → chunk-HW3LW7DH.cjs.map} +1 -1
- package/dist/{chunk-JBTOYDMN.js → chunk-IU46OHVW.js} +4 -4
- package/dist/{chunk-JBTOYDMN.js.map → chunk-IU46OHVW.js.map} +1 -1
- package/dist/{chunk-FL472AMI.cjs → chunk-J3LEGNQB.cjs} +8 -8
- package/dist/{chunk-FL472AMI.cjs.map → chunk-J3LEGNQB.cjs.map} +1 -1
- package/dist/{chunk-O7UN7OXA.cjs → chunk-JFMEONLG.cjs} +80 -80
- package/dist/{chunk-O7UN7OXA.cjs.map → chunk-JFMEONLG.cjs.map} +1 -1
- package/dist/{chunk-I7ZUZKFD.js → chunk-JFUPDJXD.js} +3 -3
- package/dist/{chunk-I7ZUZKFD.js.map → chunk-JFUPDJXD.js.map} +1 -1
- package/dist/{chunk-K3PPLHY7.js → chunk-M75SUBFG.js} +7 -7
- package/dist/{chunk-K3PPLHY7.js.map → chunk-M75SUBFG.js.map} +1 -1
- package/dist/{chunk-CK5BVQOW.cjs → chunk-PWGX5DF5.cjs} +79 -79
- package/dist/{chunk-CK5BVQOW.cjs.map → chunk-PWGX5DF5.cjs.map} +1 -1
- package/dist/{chunk-KMI7LYAF.js → chunk-PZKNKG5M.js} +8 -8
- package/dist/{chunk-KMI7LYAF.js.map → chunk-PZKNKG5M.js.map} +1 -1
- package/dist/{chunk-55MZDDZV.js → chunk-RAXU3RMB.js} +4 -4
- package/dist/{chunk-55MZDDZV.js.map → chunk-RAXU3RMB.js.map} +1 -1
- package/dist/{chunk-BLZDPRXT.cjs → chunk-RSSQKPSZ.cjs} +5 -5
- package/dist/{chunk-BLZDPRXT.cjs.map → chunk-RSSQKPSZ.cjs.map} +1 -1
- package/dist/{chunk-RGPG7EOJ.js → chunk-S5F7ZLP2.js} +3 -3
- package/dist/{chunk-RGPG7EOJ.js.map → chunk-S5F7ZLP2.js.map} +1 -1
- package/dist/{chunk-QWEUYILR.js → chunk-SKCOUWAX.js} +3 -3
- package/dist/{chunk-QWEUYILR.js.map → chunk-SKCOUWAX.js.map} +1 -1
- package/dist/{chunk-QOTI55H7.js → chunk-SXGE7ITL.js} +4 -4
- package/dist/{chunk-QOTI55H7.js.map → chunk-SXGE7ITL.js.map} +1 -1
- package/dist/{chunk-RGP33ZJ5.js → chunk-VQEXF5D4.js} +7 -7
- package/dist/{chunk-RGP33ZJ5.js.map → chunk-VQEXF5D4.js.map} +1 -1
- package/dist/{chunk-MP2JQKSG.js → chunk-WI7ISNQF.js} +17 -3
- package/dist/chunk-WI7ISNQF.js.map +1 -0
- package/dist/{chunk-4TOD4LBZ.cjs → chunk-X4JBT642.cjs} +29 -29
- package/dist/{chunk-4TOD4LBZ.cjs.map → chunk-X4JBT642.cjs.map} +1 -1
- package/dist/{chunk-EMF62TZG.cjs → chunk-ZAMFOJ5P.cjs} +86 -86
- package/dist/{chunk-EMF62TZG.cjs.map → chunk-ZAMFOJ5P.cjs.map} +1 -1
- package/dist/{chunk-VSPCZAXF.js → chunk-ZIGXMKQQ.js} +3 -3
- package/dist/{chunk-VSPCZAXF.js.map → chunk-ZIGXMKQQ.js.map} +1 -1
- package/dist/{chunk-XOX22WHL.cjs → chunk-ZUNQ5BEP.cjs} +104 -71
- package/dist/chunk-ZUNQ5BEP.cjs.map +1 -0
- package/dist/graph-extension/index.cjs +19 -19
- package/dist/graph-extension/index.d.cts +1 -1
- package/dist/graph-extension/index.d.ts +1 -1
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +82 -82
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +2 -2
- package/dist/graph-merge/index.d.ts +2 -2
- package/dist/graph-merge/index.js +13 -13
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-6CSUAq-x.d.ts → index-BFvdmBPV.d.ts} +68 -1
- package/dist/{index-Bks_3HHK.d.cts → index-BLtQWKRj.d.cts} +68 -1
- package/dist/index.cjs +144 -136
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -14
- package/dist/interchange/index.cjs +27 -26
- package/dist/interchange/index.d.cts +1 -1
- package/dist/interchange/index.d.ts +1 -1
- package/dist/interchange/index.js +9 -8
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/provenance/index.cjs +31 -31
- package/dist/provenance/index.d.cts +1 -1
- package/dist/provenance/index.d.ts +1 -1
- package/dist/provenance/index.js +4 -4
- package/dist/schema/index.cjs +31 -31
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +7 -7
- package/dist/{store-view-BSpqvAxK.d.cts → store-view-9KDOpZzF.d.cts} +250 -36
- package/dist/{store-view-CKbHFRnn.d.ts → store-view-DplHC3Nt.d.ts} +250 -36
- package/package.json +1 -1
- package/dist/chunk-CZQ3FO2Q.js.map +0 -1
- package/dist/chunk-GUR2FNB5.cjs +0 -12
- package/dist/chunk-J7WFGBJR.cjs.map +0 -1
- package/dist/chunk-LGEALRC6.cjs.map +0 -1
- package/dist/chunk-MP2JQKSG.js.map +0 -1
- package/dist/chunk-QNKSQTKQ.js.map +0 -1
- package/dist/chunk-UES55P7G.js.map +0 -1
- package/dist/chunk-WJT7OU7E.cjs.map +0 -1
- package/dist/chunk-XOX22WHL.cjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
3
|
+
var chunk4CAXEB2F_cjs = require('./chunk-4CAXEB2F.cjs');
|
|
4
|
+
var chunk2THZ3TQI_cjs = require('./chunk-2THZ3TQI.cjs');
|
|
5
|
+
var chunkZUNQ5BEP_cjs = require('./chunk-ZUNQ5BEP.cjs');
|
|
6
|
+
var chunkX4JBT642_cjs = require('./chunk-X4JBT642.cjs');
|
|
7
|
+
var chunkRSSQKPSZ_cjs = require('./chunk-RSSQKPSZ.cjs');
|
|
8
|
+
var chunkDIK74MXX_cjs = require('./chunk-DIK74MXX.cjs');
|
|
9
9
|
var zod = require('zod');
|
|
10
10
|
|
|
11
11
|
var FORMAT_VERSION = "1.0";
|
|
12
|
-
var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) =>
|
|
12
|
+
var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) => chunkRSSQKPSZ_cjs.isCanonicalIsoDate(value), {
|
|
13
13
|
message: "Expected canonical UTC ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ); convert with new Date(value).toISOString()."
|
|
14
14
|
});
|
|
15
15
|
var InterchangeNodeSchema = zod.z.object({
|
|
@@ -183,14 +183,14 @@ async function* exportGraphStream(store, options) {
|
|
|
183
183
|
const resolved = ExportStreamOptionsSchema.parse(options ?? {});
|
|
184
184
|
const graphId = store.graphId;
|
|
185
185
|
const backend = store.backend;
|
|
186
|
-
const nodeKinds = resolved.nodeKinds ??
|
|
187
|
-
const edgeKinds = resolved.edgeKinds ??
|
|
186
|
+
const nodeKinds = resolved.nodeKinds ?? chunk2THZ3TQI_cjs.getNodeKinds(store.graph);
|
|
187
|
+
const edgeKinds = resolved.edgeKinds ?? chunk2THZ3TQI_cjs.getEdgeKinds(store.graph);
|
|
188
188
|
const schemaVersion = await backend.getActiveSchema(graphId);
|
|
189
189
|
yield {
|
|
190
190
|
type: "header",
|
|
191
191
|
header: {
|
|
192
192
|
formatVersion: FORMAT_VERSION,
|
|
193
|
-
exportedAt:
|
|
193
|
+
exportedAt: chunkRSSQKPSZ_cjs.nowIso(),
|
|
194
194
|
source: {
|
|
195
195
|
type: "typegraph-export",
|
|
196
196
|
graphId,
|
|
@@ -221,7 +221,7 @@ async function* exportNodeChunks(backend, graphId, kind, options) {
|
|
|
221
221
|
const node = {
|
|
222
222
|
kind: row.kind,
|
|
223
223
|
id: row.id,
|
|
224
|
-
properties:
|
|
224
|
+
properties: chunkX4JBT642_cjs.rowPropsToObject(row.props)
|
|
225
225
|
};
|
|
226
226
|
if (options.includeTemporal) {
|
|
227
227
|
const validFrom = (
|
|
@@ -271,7 +271,7 @@ async function* exportEdgeChunks(backend, graphId, kind, options) {
|
|
|
271
271
|
kind: row.to_kind,
|
|
272
272
|
id: row.to_id
|
|
273
273
|
},
|
|
274
|
-
properties:
|
|
274
|
+
properties: chunkX4JBT642_cjs.rowPropsToObject(row.props)
|
|
275
275
|
};
|
|
276
276
|
if (options.includeTemporal) {
|
|
277
277
|
const validFrom = (
|
|
@@ -309,7 +309,7 @@ async function importGraph(store, data, rawOptions) {
|
|
|
309
309
|
const nodeSchemas = buildNodeSchemaMap(graph);
|
|
310
310
|
const edgeSchemas = buildEdgeSchemaMap(graph);
|
|
311
311
|
const importedNodeIds = /* @__PURE__ */ new Set();
|
|
312
|
-
await
|
|
312
|
+
await chunk4CAXEB2F_cjs.runInWriteTransaction(store, backend, async (target, lock) => {
|
|
313
313
|
await processNodes(
|
|
314
314
|
target,
|
|
315
315
|
graphId,
|
|
@@ -452,7 +452,7 @@ async function refreshStatisticsAfterImport(store, options, result, surface) {
|
|
|
452
452
|
}
|
|
453
453
|
function buildNodeSchemaMap(graph) {
|
|
454
454
|
const map = /* @__PURE__ */ new Map();
|
|
455
|
-
for (const kindName of
|
|
455
|
+
for (const kindName of chunk2THZ3TQI_cjs.getNodeKinds(graph)) {
|
|
456
456
|
const registration = graph.nodes[kindName];
|
|
457
457
|
map.set(kindName, {
|
|
458
458
|
registration,
|
|
@@ -463,7 +463,7 @@ function buildNodeSchemaMap(graph) {
|
|
|
463
463
|
}
|
|
464
464
|
function buildEdgeSchemaMap(graph) {
|
|
465
465
|
const map = /* @__PURE__ */ new Map();
|
|
466
|
-
for (const kindName of
|
|
466
|
+
for (const kindName of chunk2THZ3TQI_cjs.getEdgeKinds(graph)) {
|
|
467
467
|
const registration = graph.edges[kindName];
|
|
468
468
|
map.set(kindName, {
|
|
469
469
|
registration,
|
|
@@ -583,8 +583,8 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
583
583
|
registerAppliedNodeUpdate,
|
|
584
584
|
seedNodeRow,
|
|
585
585
|
seedUniqueRow
|
|
586
|
-
} =
|
|
587
|
-
await
|
|
586
|
+
} = chunk4CAXEB2F_cjs.createNodeBatchValidationBackend(graphId, registry, backend);
|
|
587
|
+
await chunk4CAXEB2F_cjs.primeBatchValidationCaches(
|
|
588
588
|
{ graphId, registry },
|
|
589
589
|
candidates.map((candidate) => candidate.draft),
|
|
590
590
|
backend,
|
|
@@ -605,7 +605,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
605
605
|
case "skip": {
|
|
606
606
|
record(node, {
|
|
607
607
|
status: "skipped",
|
|
608
|
-
liveTarget:
|
|
608
|
+
liveTarget: chunkX4JBT642_cjs.isLiveNodeRow(existing)
|
|
609
609
|
});
|
|
610
610
|
break;
|
|
611
611
|
}
|
|
@@ -617,12 +617,12 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
617
617
|
break;
|
|
618
618
|
}
|
|
619
619
|
case "update": {
|
|
620
|
-
if (!
|
|
620
|
+
if (!chunkX4JBT642_cjs.isLiveNodeRow(existing)) {
|
|
621
621
|
record(node, { status: "skipped", liveTarget: false });
|
|
622
622
|
break;
|
|
623
623
|
}
|
|
624
624
|
const updateResult = await catchUniquenessError(
|
|
625
|
-
() =>
|
|
625
|
+
() => chunkZUNQ5BEP_cjs.applyNodeUpdate(
|
|
626
626
|
writeContext,
|
|
627
627
|
{
|
|
628
628
|
existing,
|
|
@@ -645,7 +645,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
645
645
|
registerAppliedNodeUpdate(
|
|
646
646
|
node.kind,
|
|
647
647
|
node.id,
|
|
648
|
-
|
|
648
|
+
chunkX4JBT642_cjs.rowPropsToObject(existing.props),
|
|
649
649
|
props,
|
|
650
650
|
uniqueConstraints
|
|
651
651
|
);
|
|
@@ -660,7 +660,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
660
660
|
continue;
|
|
661
661
|
}
|
|
662
662
|
const uniquenessResult = await catchUniquenessError(
|
|
663
|
-
() =>
|
|
663
|
+
() => chunkZUNQ5BEP_cjs.checkUniquenessConstraints(
|
|
664
664
|
{ graphId, registry, backend: validationBackend },
|
|
665
665
|
node.kind,
|
|
666
666
|
node.id,
|
|
@@ -687,7 +687,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
687
687
|
} else {
|
|
688
688
|
await backend.insertNodesBatch(insertParamsList);
|
|
689
689
|
}
|
|
690
|
-
await
|
|
690
|
+
await chunkZUNQ5BEP_cjs.applyNodeInsertSideEffectsBatch(
|
|
691
691
|
writeContext,
|
|
692
692
|
accepted.map((candidate) => ({
|
|
693
693
|
kind: candidate.node.kind,
|
|
@@ -732,7 +732,7 @@ async function catchUniquenessError(fn) {
|
|
|
732
732
|
try {
|
|
733
733
|
return { ok: true, value: await fn() };
|
|
734
734
|
} catch (error) {
|
|
735
|
-
if (error instanceof
|
|
735
|
+
if (error instanceof chunkDIK74MXX_cjs.UniquenessError) {
|
|
736
736
|
return { ok: false, error: error.message };
|
|
737
737
|
}
|
|
738
738
|
throw error;
|
|
@@ -740,11 +740,11 @@ async function catchUniquenessError(fn) {
|
|
|
740
740
|
}
|
|
741
741
|
function validateValidityWindow(entity) {
|
|
742
742
|
try {
|
|
743
|
-
|
|
743
|
+
chunkRSSQKPSZ_cjs.validateOptionalCanonicalIsoDate(
|
|
744
744
|
entity.validFrom ?? void 0,
|
|
745
745
|
"validFrom"
|
|
746
746
|
);
|
|
747
|
-
|
|
747
|
+
chunkRSSQKPSZ_cjs.validateOptionalCanonicalIsoDate(entity.validTo, "validTo");
|
|
748
748
|
return void 0;
|
|
749
749
|
} catch (error) {
|
|
750
750
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -774,7 +774,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
774
774
|
if (existing) {
|
|
775
775
|
switch (options.onConflict) {
|
|
776
776
|
case "skip": {
|
|
777
|
-
return { status: "skipped", liveTarget:
|
|
777
|
+
return { status: "skipped", liveTarget: chunkX4JBT642_cjs.isLiveNodeRow(existing) };
|
|
778
778
|
}
|
|
779
779
|
case "error": {
|
|
780
780
|
return {
|
|
@@ -783,11 +783,11 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
785
|
case "update": {
|
|
786
|
-
if (!
|
|
786
|
+
if (!chunkX4JBT642_cjs.isLiveNodeRow(existing)) {
|
|
787
787
|
return { status: "skipped", liveTarget: false };
|
|
788
788
|
}
|
|
789
789
|
const updateResult = await catchUniquenessError(
|
|
790
|
-
() =>
|
|
790
|
+
() => chunkZUNQ5BEP_cjs.applyNodeUpdate(
|
|
791
791
|
writeContext,
|
|
792
792
|
{
|
|
793
793
|
existing,
|
|
@@ -807,7 +807,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
const uniquenessResult = await catchUniquenessError(
|
|
810
|
-
() =>
|
|
810
|
+
() => chunkZUNQ5BEP_cjs.checkUniquenessConstraints(
|
|
811
811
|
{ graphId, registry, backend },
|
|
812
812
|
node.kind,
|
|
813
813
|
node.id,
|
|
@@ -826,7 +826,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
826
826
|
...node.validFrom !== void 0 && { validFrom: node.validFrom },
|
|
827
827
|
...node.validTo !== void 0 && { validTo: node.validTo }
|
|
828
828
|
});
|
|
829
|
-
await
|
|
829
|
+
await chunkZUNQ5BEP_cjs.applyNodeInsertSideEffects(
|
|
830
830
|
writeContext,
|
|
831
831
|
{
|
|
832
832
|
kind: node.kind,
|
|
@@ -912,7 +912,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
912
912
|
});
|
|
913
913
|
continue;
|
|
914
914
|
}
|
|
915
|
-
const endpointError =
|
|
915
|
+
const endpointError = chunkZUNQ5BEP_cjs.validateEdgeEndpoints(
|
|
916
916
|
edge.kind,
|
|
917
917
|
edge.from.kind,
|
|
918
918
|
edge.to.kind,
|
|
@@ -961,7 +961,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
961
961
|
for (const [kind, ids] of idsByKind) {
|
|
962
962
|
const rows = await backend.getNodes(graphId, kind, [...ids]);
|
|
963
963
|
for (const row of rows) {
|
|
964
|
-
if (
|
|
964
|
+
if (chunkX4JBT642_cjs.isLiveNodeRow(row)) {
|
|
965
965
|
liveEndpointKeys.add(makeNodeKey(kind, row.id));
|
|
966
966
|
}
|
|
967
967
|
}
|
|
@@ -972,7 +972,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
972
972
|
if (importedNodeIds.has(key)) return true;
|
|
973
973
|
if (checkedEndpointKeys.has(key)) return liveEndpointKeys.has(key);
|
|
974
974
|
const row = await backend.getNode(graphId, endpoint.kind, endpoint.id);
|
|
975
|
-
return row !== void 0 &&
|
|
975
|
+
return row !== void 0 && chunkX4JBT642_cjs.isLiveNodeRow(row);
|
|
976
976
|
};
|
|
977
977
|
const existingById = /* @__PURE__ */ new Map();
|
|
978
978
|
if (candidates.length > 0 && backend.getEdges !== void 0) {
|
|
@@ -1096,7 +1096,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1096
1096
|
if (!nodeSchemas.has(edge.to.kind)) {
|
|
1097
1097
|
return { status: "error", error: `Unknown to node kind: ${edge.to.kind}` };
|
|
1098
1098
|
}
|
|
1099
|
-
const endpointError =
|
|
1099
|
+
const endpointError = chunkZUNQ5BEP_cjs.validateEdgeEndpoints(
|
|
1100
1100
|
edge.kind,
|
|
1101
1101
|
edge.from.kind,
|
|
1102
1102
|
edge.to.kind,
|
|
@@ -1115,7 +1115,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1115
1115
|
edge.from.kind,
|
|
1116
1116
|
edge.from.id
|
|
1117
1117
|
);
|
|
1118
|
-
if (fromExists === void 0 || !
|
|
1118
|
+
if (fromExists === void 0 || !chunkX4JBT642_cjs.isLiveNodeRow(fromExists)) {
|
|
1119
1119
|
return {
|
|
1120
1120
|
status: "error",
|
|
1121
1121
|
error: `From node not found: ${edge.from.kind}:${edge.from.id}`
|
|
@@ -1124,7 +1124,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1124
1124
|
}
|
|
1125
1125
|
if (!importedNodeIds.has(toKey)) {
|
|
1126
1126
|
const toExists = await backend.getNode(graphId, edge.to.kind, edge.to.id);
|
|
1127
|
-
if (toExists === void 0 || !
|
|
1127
|
+
if (toExists === void 0 || !chunkX4JBT642_cjs.isLiveNodeRow(toExists)) {
|
|
1128
1128
|
return {
|
|
1129
1129
|
status: "error",
|
|
1130
1130
|
error: `To node not found: ${edge.to.kind}:${edge.to.id}`
|
|
@@ -1267,5 +1267,5 @@ exports.exportGraph = exportGraph;
|
|
|
1267
1267
|
exports.exportGraphStream = exportGraphStream;
|
|
1268
1268
|
exports.importGraph = importGraph;
|
|
1269
1269
|
exports.importGraphStream = importGraphStream;
|
|
1270
|
-
//# sourceMappingURL=chunk-
|
|
1271
|
-
//# sourceMappingURL=chunk-
|
|
1270
|
+
//# sourceMappingURL=chunk-HW3LW7DH.cjs.map
|
|
1271
|
+
//# sourceMappingURL=chunk-HW3LW7DH.cjs.map
|