@nicia-ai/typegraph 0.55.0 → 0.56.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/CHANGELOG.md +14 -0
- package/dist/backend/index.cjs +86 -86
- package/dist/backend/index.js +7 -7
- package/dist/backend/postgres/index.cjs +22 -22
- package/dist/backend/postgres/index.js +8 -8
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +2 -2
- package/dist/backend/postgres/pglite-store.d.ts +2 -2
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/postgres/pglite.cjs +10 -10
- package/dist/backend/postgres/pglite.js +9 -9
- package/dist/backend/sqlite/index.cjs +21 -21
- package/dist/backend/sqlite/index.js +8 -8
- package/dist/backend/sqlite/libsql.cjs +12 -12
- package/dist/backend/sqlite/libsql.js +8 -8
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.d.cts +2 -2
- package/dist/backend/sqlite/local-store.d.ts +2 -2
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/backend/sqlite/local.cjs +10 -10
- package/dist/backend/sqlite/local.js +9 -9
- package/dist/{chunk-S5WG5AFG.cjs → chunk-2XUAUSMI.cjs} +12 -12
- package/dist/{chunk-S5WG5AFG.cjs.map → chunk-2XUAUSMI.cjs.map} +1 -1
- package/dist/{chunk-MTE255N3.cjs → chunk-36XLQHZA.cjs} +4 -4
- package/dist/{chunk-MTE255N3.cjs.map → chunk-36XLQHZA.cjs.map} +1 -1
- package/dist/{chunk-FWSGKOBN.js → chunk-6LTRZOUU.js} +6 -6
- package/dist/{chunk-FWSGKOBN.js.map → chunk-6LTRZOUU.js.map} +1 -1
- package/dist/{chunk-YVKPUSHS.js → chunk-75KH6Y2W.js} +16 -7
- package/dist/chunk-75KH6Y2W.js.map +1 -0
- package/dist/{chunk-MJXEO7YA.js → chunk-762VPGHN.js} +5 -5
- package/dist/{chunk-MJXEO7YA.js.map → chunk-762VPGHN.js.map} +1 -1
- package/dist/{chunk-GGDTMBNA.cjs → chunk-7CCVR2QF.cjs} +54 -54
- package/dist/{chunk-GGDTMBNA.cjs.map → chunk-7CCVR2QF.cjs.map} +1 -1
- package/dist/{chunk-7EOJO6QB.js → chunk-7MHENVRG.js} +3 -3
- package/dist/{chunk-7EOJO6QB.js.map → chunk-7MHENVRG.js.map} +1 -1
- package/dist/{chunk-7B3DSFX3.cjs → chunk-AUTRK6WM.cjs} +4 -4
- package/dist/{chunk-7B3DSFX3.cjs.map → chunk-AUTRK6WM.cjs.map} +1 -1
- package/dist/{chunk-SIQ4BFL5.js → chunk-AZP5CCHL.js} +4 -4
- package/dist/{chunk-SIQ4BFL5.js.map → chunk-AZP5CCHL.js.map} +1 -1
- package/dist/{chunk-WTW7RWAG.cjs → chunk-BYUIOM4L.cjs} +6 -6
- package/dist/{chunk-WTW7RWAG.cjs.map → chunk-BYUIOM4L.cjs.map} +1 -1
- package/dist/{chunk-74FNI3PT.js → chunk-C3TJU4KQ.js} +6 -6
- package/dist/chunk-C3TJU4KQ.js.map +1 -0
- package/dist/{chunk-7V2R4MH6.js → chunk-CEQOTZGB.js} +5 -5
- package/dist/{chunk-7V2R4MH6.js.map → chunk-CEQOTZGB.js.map} +1 -1
- package/dist/{chunk-TKFQLKH2.cjs → chunk-CYKHSH5O.cjs} +36 -36
- package/dist/{chunk-TKFQLKH2.cjs.map → chunk-CYKHSH5O.cjs.map} +1 -1
- package/dist/{chunk-D5TCKAQT.cjs → chunk-DGIA64DM.cjs} +4 -4
- package/dist/{chunk-D5TCKAQT.cjs.map → chunk-DGIA64DM.cjs.map} +1 -1
- package/dist/{chunk-FFR3YUY2.js → chunk-E4QYEWVH.js} +5 -5
- package/dist/{chunk-FFR3YUY2.js.map → chunk-E4QYEWVH.js.map} +1 -1
- package/dist/{chunk-467YITD4.cjs → chunk-ETU5IILQ.cjs} +13 -13
- package/dist/{chunk-467YITD4.cjs.map → chunk-ETU5IILQ.cjs.map} +1 -1
- package/dist/{chunk-HW3IX2RF.js → chunk-EWRLWI7W.js} +4 -4
- package/dist/{chunk-HW3IX2RF.js.map → chunk-EWRLWI7W.js.map} +1 -1
- package/dist/{chunk-KZ6OHFDV.js → chunk-F2S5JWCT.js} +3 -3
- package/dist/{chunk-KZ6OHFDV.js.map → chunk-F2S5JWCT.js.map} +1 -1
- package/dist/{chunk-45WPPI64.js → chunk-FMCPKMQI.js} +3 -3
- package/dist/{chunk-45WPPI64.js.map → chunk-FMCPKMQI.js.map} +1 -1
- package/dist/{chunk-QM6IQW7B.js → chunk-ILHVYKXJ.js} +7 -7
- package/dist/{chunk-QM6IQW7B.js.map → chunk-ILHVYKXJ.js.map} +1 -1
- package/dist/{chunk-ECYEWFEH.cjs → chunk-J34FSPSC.cjs} +16 -6
- package/dist/chunk-J34FSPSC.cjs.map +1 -0
- package/dist/{chunk-GFYCLCGU.cjs → chunk-KM3CLHDB.cjs} +9 -9
- package/dist/{chunk-GFYCLCGU.cjs.map → chunk-KM3CLHDB.cjs.map} +1 -1
- package/dist/{chunk-SLNH62T3.js → chunk-KQYUKOGX.js} +3 -3
- package/dist/{chunk-SLNH62T3.js.map → chunk-KQYUKOGX.js.map} +1 -1
- package/dist/{chunk-7I2PYI4U.cjs → chunk-KR3N6Y7O.cjs} +67 -67
- package/dist/{chunk-7I2PYI4U.cjs.map → chunk-KR3N6Y7O.cjs.map} +1 -1
- package/dist/{chunk-HZCOCNIX.cjs → chunk-L2REUAJB.cjs} +24 -24
- package/dist/{chunk-HZCOCNIX.cjs.map → chunk-L2REUAJB.cjs.map} +1 -1
- package/dist/{chunk-VU65FXEG.js → chunk-LFXBFPI2.js} +66 -29
- package/dist/chunk-LFXBFPI2.js.map +1 -0
- package/dist/{chunk-NXRSR6QG.js → chunk-MHM6OGZR.js} +9 -9
- package/dist/{chunk-NXRSR6QG.js.map → chunk-MHM6OGZR.js.map} +1 -1
- package/dist/{chunk-FCUSVSYX.js → chunk-MRGWM5LE.js} +10 -10
- package/dist/{chunk-FCUSVSYX.js.map → chunk-MRGWM5LE.js.map} +1 -1
- package/dist/{chunk-WXGMDROJ.js → chunk-QDNEXTON.js} +7 -7
- package/dist/{chunk-WXGMDROJ.js.map → chunk-QDNEXTON.js.map} +1 -1
- package/dist/{chunk-VYU5H4FO.js → chunk-RXA2D3UR.js} +3 -3
- package/dist/{chunk-VYU5H4FO.js.map → chunk-RXA2D3UR.js.map} +1 -1
- package/dist/{chunk-XODNY4QI.js → chunk-TIBSLFHR.js} +6 -6
- package/dist/{chunk-XODNY4QI.js.map → chunk-TIBSLFHR.js.map} +1 -1
- package/dist/{chunk-KZG7HQSN.cjs → chunk-UVMSWO6X.cjs} +173 -173
- package/dist/{chunk-KZG7HQSN.cjs.map → chunk-UVMSWO6X.cjs.map} +1 -1
- package/dist/{chunk-ORPT5EQW.cjs → chunk-UZ6CJUC5.cjs} +27 -27
- package/dist/chunk-UZ6CJUC5.cjs.map +1 -0
- package/dist/{chunk-GNF3PHEQ.cjs → chunk-VF2IMMZT.cjs} +17 -17
- package/dist/{chunk-GNF3PHEQ.cjs.map → chunk-VF2IMMZT.cjs.map} +1 -1
- package/dist/{chunk-PGZV3E3I.cjs → chunk-VXEHEPC4.cjs} +4 -4
- package/dist/{chunk-PGZV3E3I.cjs.map → chunk-VXEHEPC4.cjs.map} +1 -1
- package/dist/{chunk-OJ47LMOB.cjs → chunk-WIUHN6SZ.cjs} +669 -628
- package/dist/chunk-WIUHN6SZ.cjs.map +1 -0
- package/dist/{chunk-HNW5IDB3.js → chunk-WIZB5U6N.js} +7 -7
- package/dist/{chunk-HNW5IDB3.js.map → chunk-WIZB5U6N.js.map} +1 -1
- package/dist/{chunk-IDQZI6GL.js → chunk-XH75W3O5.js} +3 -3
- package/dist/{chunk-IDQZI6GL.js.map → chunk-XH75W3O5.js.map} +1 -1
- package/dist/{chunk-T7LSSV7J.cjs → chunk-XXEFDJHY.cjs} +45 -45
- package/dist/{chunk-T7LSSV7J.cjs.map → chunk-XXEFDJHY.cjs.map} +1 -1
- package/dist/{chunk-GORCU2GR.cjs → chunk-Z4NU4MYB.cjs} +123 -123
- package/dist/{chunk-GORCU2GR.cjs.map → chunk-Z4NU4MYB.cjs.map} +1 -1
- package/dist/{chunk-KFC3OUV4.cjs → chunk-ZHK3HEZ2.cjs} +130 -130
- package/dist/{chunk-KFC3OUV4.cjs.map → chunk-ZHK3HEZ2.cjs.map} +1 -1
- package/dist/{chunk-FYMYLZGX.cjs → chunk-ZXXGMQC3.cjs} +10 -10
- package/dist/{chunk-FYMYLZGX.cjs.map → chunk-ZXXGMQC3.cjs.map} +1 -1
- package/dist/graph-merge/index.cjs +577 -99
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +108 -4
- package/dist/graph-merge/index.d.ts +108 -4
- package/dist/graph-merge/index.js +495 -21
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{graph-templates-qraW63Ry.d.ts → graph-templates-BSA9VU_O.d.ts} +1 -1
- package/dist/{graph-templates--hp2U4kn.d.cts → graph-templates-Cg7DpEOF.d.cts} +1 -1
- package/dist/index.cjs +95 -95
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16 -16
- package/dist/interchange/index.cjs +33 -33
- package/dist/interchange/index.d.cts +1 -1
- package/dist/interchange/index.d.ts +1 -1
- package/dist/interchange/index.js +10 -10
- package/dist/{local-store-impl-HXBO3VF4.js → local-store-impl-77DCLAAY.js} +18 -18
- package/dist/{local-store-impl-HXBO3VF4.js.map → local-store-impl-77DCLAAY.js.map} +1 -1
- package/dist/{local-store-impl-CUQKHHOZ.cjs → local-store-impl-NJCWM3KR.cjs} +22 -22
- package/dist/{local-store-impl-CUQKHHOZ.cjs.map → local-store-impl-NJCWM3KR.cjs.map} +1 -1
- package/dist/{pglite-store-impl-BD3AVOUH.js → pglite-store-impl-3VFSYLAJ.js} +18 -18
- package/dist/{pglite-store-impl-BD3AVOUH.js.map → pglite-store-impl-3VFSYLAJ.js.map} +1 -1
- package/dist/{pglite-store-impl-C3MQ72LT.cjs → pglite-store-impl-LHLJ3GBQ.cjs} +22 -22
- package/dist/{pglite-store-impl-C3MQ72LT.cjs.map → pglite-store-impl-LHLJ3GBQ.cjs.map} +1 -1
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/provenance/index.cjs +21 -21
- package/dist/provenance/index.d.cts +1 -1
- package/dist/provenance/index.d.ts +1 -1
- package/dist/provenance/index.js +5 -5
- package/dist/schema/index.cjs +36 -36
- package/dist/schema/index.d.cts +3 -3
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +6 -6
- package/dist/{store-stw2AEB4.d.ts → store-CQ3uzXla.d.ts} +58 -27
- package/dist/{store-DTEkUQ0k.d.cts → store-DbHAgVMH.d.cts} +58 -27
- package/package.json +1 -1
- package/dist/chunk-74FNI3PT.js.map +0 -1
- package/dist/chunk-ECYEWFEH.cjs.map +0 -1
- package/dist/chunk-OJ47LMOB.cjs.map +0 -1
- package/dist/chunk-ORPT5EQW.cjs.map +0 -1
- package/dist/chunk-VU65FXEG.js.map +0 -1
- package/dist/chunk-YVKPUSHS.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var chunkUVMSWO6X_cjs = require('./chunk-UVMSWO6X.cjs');
|
|
4
|
+
var chunkUZ6CJUC5_cjs = require('./chunk-UZ6CJUC5.cjs');
|
|
5
|
+
var chunk36XLQHZA_cjs = require('./chunk-36XLQHZA.cjs');
|
|
6
|
+
var chunkXXEFDJHY_cjs = require('./chunk-XXEFDJHY.cjs');
|
|
7
|
+
var chunkCYKHSH5O_cjs = require('./chunk-CYKHSH5O.cjs');
|
|
8
|
+
var chunkZXXGMQC3_cjs = require('./chunk-ZXXGMQC3.cjs');
|
|
9
|
+
var chunkJ34FSPSC_cjs = require('./chunk-J34FSPSC.cjs');
|
|
10
10
|
var chunkV32ES2Q2_cjs = require('./chunk-V32ES2Q2.cjs');
|
|
11
11
|
var chunkOJHFXL7Y_cjs = require('./chunk-OJHFXL7Y.cjs');
|
|
12
12
|
var chunkNI2XPJQ2_cjs = require('./chunk-NI2XPJQ2.cjs');
|
|
@@ -251,7 +251,7 @@ function resolveIngestionImportTarget(target) {
|
|
|
251
251
|
const registeredStore = INGESTION_IMPORT_TARGETS.get(target);
|
|
252
252
|
if (registeredStore !== void 0) return registeredStore;
|
|
253
253
|
try {
|
|
254
|
-
|
|
254
|
+
chunkUZ6CJUC5_cjs.storeBackend(target);
|
|
255
255
|
return target;
|
|
256
256
|
} catch (error) {
|
|
257
257
|
throw new chunkASKXTVK5_cjs.ConfigurationError(
|
|
@@ -285,8 +285,8 @@ async function importGraph(target, data, rawOptions) {
|
|
|
285
285
|
);
|
|
286
286
|
}
|
|
287
287
|
async function withImportStreamLease(store, run) {
|
|
288
|
-
const lease =
|
|
289
|
-
|
|
288
|
+
const lease = chunkJ34FSPSC_cjs.acquireSerializedStreamLease(
|
|
289
|
+
chunkUZ6CJUC5_cjs.storeBackend(store),
|
|
290
290
|
"import-stream"
|
|
291
291
|
);
|
|
292
292
|
if (!lease.acquired) {
|
|
@@ -309,26 +309,26 @@ async function importGraphData(store, data, options) {
|
|
|
309
309
|
const errors = [];
|
|
310
310
|
const graph = store.graph;
|
|
311
311
|
const graphId = store.graphId;
|
|
312
|
-
const backend =
|
|
313
|
-
const runtime =
|
|
312
|
+
const backend = chunkUZ6CJUC5_cjs.storeBackend(store);
|
|
313
|
+
const runtime = chunkUZ6CJUC5_cjs.storeRuntime(store);
|
|
314
314
|
const registry = store.registry;
|
|
315
|
-
const batchPointRead =
|
|
316
|
-
const uniqueSidecarBatch =
|
|
317
|
-
const statementExecution =
|
|
318
|
-
const owedClaimReason =
|
|
319
|
-
const claimRefusal = owedClaimReason === void 0 ? void 0 :
|
|
315
|
+
const batchPointRead = chunkZXXGMQC3_cjs.batchPointReadVerdict(backend);
|
|
316
|
+
const uniqueSidecarBatch = chunkZXXGMQC3_cjs.uniqueSidecarBatchVerdict(backend);
|
|
317
|
+
const statementExecution = chunkZXXGMQC3_cjs.statementExecutionVerdict(backend);
|
|
318
|
+
const owedClaimReason = chunkUVMSWO6X_cjs.graphOwesClaims(graph, registry);
|
|
319
|
+
const claimRefusal = owedClaimReason === void 0 ? void 0 : chunkCYKHSH5O_cjs.constraintFenceRefusal({ graphId }, backend, owedClaimReason);
|
|
320
320
|
if (claimRefusal !== void 0) throw claimRefusal;
|
|
321
321
|
const nodeSchemas = buildNodeSchemaMap(graph);
|
|
322
322
|
const edgeSchemas = buildEdgeSchemaMap(graph);
|
|
323
323
|
for (const [kind, entry] of edgeSchemas) {
|
|
324
|
-
|
|
324
|
+
chunkXXEFDJHY_cjs.assertEdgeMatchIdentityBackendSupport(
|
|
325
325
|
entry.registration.matchIdentity,
|
|
326
326
|
backend.capabilities,
|
|
327
327
|
kind
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
const importedNodeIds = /* @__PURE__ */ new Set();
|
|
331
|
-
await
|
|
331
|
+
await chunkUVMSWO6X_cjs.runWritePlan(
|
|
332
332
|
{
|
|
333
333
|
graphId,
|
|
334
334
|
registry,
|
|
@@ -336,7 +336,7 @@ async function importGraphData(store, data, options) {
|
|
|
336
336
|
// thunk object the store's own operations use for this backend — a
|
|
337
337
|
// second, independent memoization for the same backend is exactly what
|
|
338
338
|
// interning exists to rule out.
|
|
339
|
-
claimsVerdict:
|
|
339
|
+
claimsVerdict: chunkZXXGMQC3_cjs.createClaimsVerdictThunk(backend),
|
|
340
340
|
uniqueSidecarBatch,
|
|
341
341
|
statementExecution,
|
|
342
342
|
schemaVersion: store.introspect().schemaVersion,
|
|
@@ -351,7 +351,7 @@ async function importGraphData(store, data, options) {
|
|
|
351
351
|
},
|
|
352
352
|
// An import writes node rows AND edge rows in one frame, so it declares the
|
|
353
353
|
// mixed family explicitly instead of receiving either narrower session.
|
|
354
|
-
|
|
354
|
+
chunkUVMSWO6X_cjs.mixedWritePlan(void 0, true),
|
|
355
355
|
backend,
|
|
356
356
|
async (session, target, overlaidSession, _lock, transactionMode) => {
|
|
357
357
|
let nextEdgeSavepointId = 0;
|
|
@@ -417,8 +417,8 @@ async function importGraphStream(target, chunks, rawOptions) {
|
|
|
417
417
|
const store = resolveIngestionImportTarget(target);
|
|
418
418
|
const options = ImportOptionsSchema.parse(rawOptions);
|
|
419
419
|
const sourceBackend = exportStreamBackend(chunks);
|
|
420
|
-
const targetBackend =
|
|
421
|
-
const contention = sourceBackend === void 0 ? void 0 :
|
|
420
|
+
const targetBackend = chunkUZ6CJUC5_cjs.storeBackend(store);
|
|
421
|
+
const contention = sourceBackend === void 0 ? void 0 : chunkJ34FSPSC_cjs.snapshotExportContention(sourceBackend, targetBackend);
|
|
422
422
|
if (contention !== void 0) {
|
|
423
423
|
throw serializedStreamRefusal({
|
|
424
424
|
graphId: store.graphId,
|
|
@@ -435,7 +435,7 @@ async function importGraphStream(target, chunks, rawOptions) {
|
|
|
435
435
|
try {
|
|
436
436
|
for await (const chunk of chunks) {
|
|
437
437
|
if (releaseImportLease === void 0) {
|
|
438
|
-
const lease =
|
|
438
|
+
const lease = chunkJ34FSPSC_cjs.acquireSerializedStreamLease(
|
|
439
439
|
targetBackend,
|
|
440
440
|
"import-stream"
|
|
441
441
|
);
|
|
@@ -674,7 +674,7 @@ function asIdentityImportError(assertions, graphId, error) {
|
|
|
674
674
|
}
|
|
675
675
|
function taggedAssertion(assertions, error) {
|
|
676
676
|
if (typeof error !== "object" || error === null) return void 0;
|
|
677
|
-
const id = error[
|
|
677
|
+
const id = error[chunkXXEFDJHY_cjs.IDENTITY_IMPORT_FAILED_ASSERTION];
|
|
678
678
|
if (typeof id !== "string") return void 0;
|
|
679
679
|
return assertions.find((candidate) => candidate.id === id);
|
|
680
680
|
}
|
|
@@ -705,7 +705,7 @@ function identityImportProgress(error) {
|
|
|
705
705
|
if (typeof error !== "object" || error === null) {
|
|
706
706
|
return { created: 0, skipped: 0 };
|
|
707
707
|
}
|
|
708
|
-
const progress = error[
|
|
708
|
+
const progress = error[chunkXXEFDJHY_cjs.IDENTITY_IMPORT_PROGRESS];
|
|
709
709
|
if (typeof progress !== "object" || progress === null || !("created" in progress) || typeof progress.created !== "number" || !("skipped" in progress) || typeof progress.skipped !== "number") {
|
|
710
710
|
return { created: 0, skipped: 0 };
|
|
711
711
|
}
|
|
@@ -907,8 +907,8 @@ async function processNodeSlice(frame, graphId, registry, batch, schemas, option
|
|
|
907
907
|
registerAppliedNodeUpdate,
|
|
908
908
|
seedNodeRow,
|
|
909
909
|
seedUniqueRow
|
|
910
|
-
} =
|
|
911
|
-
await
|
|
910
|
+
} = chunkUVMSWO6X_cjs.createNodeBatchValidationSeams(graphId, registry, frame.target);
|
|
911
|
+
await chunkUVMSWO6X_cjs.primeBatchValidationCaches(
|
|
912
912
|
{
|
|
913
913
|
graphId,
|
|
914
914
|
registry,
|
|
@@ -934,7 +934,7 @@ async function processNodeSlice(frame, graphId, registry, batch, schemas, option
|
|
|
934
934
|
case "skip": {
|
|
935
935
|
record(node, {
|
|
936
936
|
status: "skipped",
|
|
937
|
-
liveTarget:
|
|
937
|
+
liveTarget: chunkJ34FSPSC_cjs.isLiveNodeRow(existing)
|
|
938
938
|
});
|
|
939
939
|
break;
|
|
940
940
|
}
|
|
@@ -946,7 +946,7 @@ async function processNodeSlice(frame, graphId, registry, batch, schemas, option
|
|
|
946
946
|
break;
|
|
947
947
|
}
|
|
948
948
|
case "update": {
|
|
949
|
-
if (!
|
|
949
|
+
if (!chunkJ34FSPSC_cjs.isLiveNodeRow(existing)) {
|
|
950
950
|
record(node, { status: "skipped", liveTarget: false });
|
|
951
951
|
break;
|
|
952
952
|
}
|
|
@@ -969,7 +969,7 @@ async function processNodeSlice(frame, graphId, registry, batch, schemas, option
|
|
|
969
969
|
registerAppliedNodeUpdate(
|
|
970
970
|
node.kind,
|
|
971
971
|
node.id,
|
|
972
|
-
|
|
972
|
+
chunkJ34FSPSC_cjs.rowPropsToObject(existing.props),
|
|
973
973
|
props,
|
|
974
974
|
uniqueConstraints
|
|
975
975
|
);
|
|
@@ -984,14 +984,14 @@ async function processNodeSlice(frame, graphId, registry, batch, schemas, option
|
|
|
984
984
|
continue;
|
|
985
985
|
}
|
|
986
986
|
const constraintResult = await catchDeclaredConstraintRefusal(async () => {
|
|
987
|
-
await
|
|
987
|
+
await chunkUZ6CJUC5_cjs.checkUniquenessConstraints(
|
|
988
988
|
{ graphId, registry, backend: validationBackend },
|
|
989
989
|
node.kind,
|
|
990
990
|
node.id,
|
|
991
991
|
props,
|
|
992
992
|
uniqueConstraints
|
|
993
993
|
);
|
|
994
|
-
await
|
|
994
|
+
await chunkUVMSWO6X_cjs.checkDisjointnessConstraint(
|
|
995
995
|
{ graphId, registry, backend: validationBackend },
|
|
996
996
|
node.kind,
|
|
997
997
|
node.id
|
|
@@ -1048,7 +1048,7 @@ function importNodeCreateWork(graphId, registry, node, registration, props) {
|
|
|
1048
1048
|
return {
|
|
1049
1049
|
params: buildImportInsertParams(graphId, node, props),
|
|
1050
1050
|
claim,
|
|
1051
|
-
claimPlan:
|
|
1051
|
+
claimPlan: chunkUZ6CJUC5_cjs.planNodeCreateClaims({ graphId, registry }, claim),
|
|
1052
1052
|
sideEffects: {
|
|
1053
1053
|
kind: node.kind,
|
|
1054
1054
|
id: node.id,
|
|
@@ -1112,7 +1112,7 @@ async function catchEdgeCreateRefusalWithSavepoint(frame, fn) {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
const statementExecution = frame.statementExecution;
|
|
1115
|
-
const result = await
|
|
1115
|
+
const result = await chunkCYKHSH5O_cjs.runRecordedTransactionSavepoint(target, statementExecution, frame.allocateEdgeSavepoint(), async () => {
|
|
1116
1116
|
const guarded = await catchEdgeCreateRefusal(fn);
|
|
1117
1117
|
return guarded.ok ? { action: "release", value: guarded } : { action: "rollback", value: guarded, cause: guarded.cause };
|
|
1118
1118
|
});
|
|
@@ -1193,11 +1193,11 @@ async function updateImportedEdge(session, edge, props, windowFence) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
1195
|
function importedEdgeIdentityUpdateError(registration, edge, existing, props) {
|
|
1196
|
-
return
|
|
1196
|
+
return chunkUVMSWO6X_cjs.edgeMatchIdentityUpdateRefusal({
|
|
1197
1197
|
identity: registration.matchIdentity,
|
|
1198
1198
|
kind: edge.kind,
|
|
1199
1199
|
id: edge.id,
|
|
1200
|
-
beforeProps:
|
|
1200
|
+
beforeProps: chunkJ34FSPSC_cjs.rowPropsToObject(existing.props),
|
|
1201
1201
|
afterProps: props
|
|
1202
1202
|
})?.message;
|
|
1203
1203
|
}
|
|
@@ -1277,7 +1277,7 @@ async function processNode(frame, graphId, registry, node, schemas, options) {
|
|
|
1277
1277
|
if (existing) {
|
|
1278
1278
|
switch (options.onConflict) {
|
|
1279
1279
|
case "skip": {
|
|
1280
|
-
return { status: "skipped", liveTarget:
|
|
1280
|
+
return { status: "skipped", liveTarget: chunkJ34FSPSC_cjs.isLiveNodeRow(existing) };
|
|
1281
1281
|
}
|
|
1282
1282
|
case "error": {
|
|
1283
1283
|
return {
|
|
@@ -1286,7 +1286,7 @@ async function processNode(frame, graphId, registry, node, schemas, options) {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
case "update": {
|
|
1289
|
-
if (!
|
|
1289
|
+
if (!chunkJ34FSPSC_cjs.isLiveNodeRow(existing)) {
|
|
1290
1290
|
return { status: "skipped", liveTarget: false };
|
|
1291
1291
|
}
|
|
1292
1292
|
const updateWindow = validateUpdateValidityWindow(
|
|
@@ -1311,14 +1311,14 @@ async function processNode(frame, graphId, registry, node, schemas, options) {
|
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
1313
|
const constraintResult = await catchDeclaredConstraintRefusal(async () => {
|
|
1314
|
-
await
|
|
1314
|
+
await chunkUZ6CJUC5_cjs.checkUniquenessConstraints(
|
|
1315
1315
|
{ graphId, registry, backend: frame.target },
|
|
1316
1316
|
node.kind,
|
|
1317
1317
|
node.id,
|
|
1318
1318
|
propsResult.data,
|
|
1319
1319
|
uniqueConstraints
|
|
1320
1320
|
);
|
|
1321
|
-
await
|
|
1321
|
+
await chunkUVMSWO6X_cjs.checkDisjointnessConstraint(
|
|
1322
1322
|
{ graphId, registry, backend: frame.target },
|
|
1323
1323
|
node.kind,
|
|
1324
1324
|
node.id
|
|
@@ -1385,7 +1385,7 @@ function recordEdgeOutcome(edge, outcome, result, errors) {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
function prepareEdgeImportCreate(graphId, candidate, registration) {
|
|
1387
1387
|
const { edge, props } = candidate;
|
|
1388
|
-
const matchIdentity =
|
|
1388
|
+
const matchIdentity = chunkUVMSWO6X_cjs.resolveEdgeMatchIdentityStorage(
|
|
1389
1389
|
registration.matchIdentity,
|
|
1390
1390
|
{
|
|
1391
1391
|
fromKind: edge.from.kind,
|
|
@@ -1519,7 +1519,7 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1519
1519
|
const {
|
|
1520
1520
|
backend: cardinalityValidationBackend,
|
|
1521
1521
|
registerPendingEdgeForCardinality
|
|
1522
|
-
} =
|
|
1522
|
+
} = chunkUVMSWO6X_cjs.createEdgeBatchValidationBackend(frame.target);
|
|
1523
1523
|
const candidates = [];
|
|
1524
1524
|
const deferred = [];
|
|
1525
1525
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -1580,10 +1580,10 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1580
1580
|
}
|
|
1581
1581
|
const liveEndpointKeys = /* @__PURE__ */ new Set();
|
|
1582
1582
|
const checkedEndpointKeys = /* @__PURE__ */ new Set();
|
|
1583
|
-
const boundGetNodesForEndpoints =
|
|
1583
|
+
const boundGetNodesForEndpoints = chunkJ34FSPSC_cjs.bindExtraIfReachable(
|
|
1584
1584
|
frame.target,
|
|
1585
1585
|
frame.batchPointRead.extras.getNodes,
|
|
1586
|
-
|
|
1586
|
+
chunkJ34FSPSC_cjs.BATCH_POINT_READ.id
|
|
1587
1587
|
);
|
|
1588
1588
|
if (options.validateReferences && boundGetNodesForEndpoints !== void 0) {
|
|
1589
1589
|
const idsByKind = /* @__PURE__ */ new Map();
|
|
@@ -1602,7 +1602,7 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1602
1602
|
...ids
|
|
1603
1603
|
]);
|
|
1604
1604
|
for (const row of rows) {
|
|
1605
|
-
if (
|
|
1605
|
+
if (chunkJ34FSPSC_cjs.isLiveNodeRow(row)) {
|
|
1606
1606
|
liveEndpointKeys.add(makeNodeKey(kind, row.id));
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
@@ -1613,13 +1613,13 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1613
1613
|
if (importedNodeIds.has(key)) return true;
|
|
1614
1614
|
if (checkedEndpointKeys.has(key)) return liveEndpointKeys.has(key);
|
|
1615
1615
|
const row = await frame.target.getNode(graphId, endpoint.kind, endpoint.id);
|
|
1616
|
-
return row !== void 0 &&
|
|
1616
|
+
return row !== void 0 && chunkJ34FSPSC_cjs.isLiveNodeRow(row);
|
|
1617
1617
|
};
|
|
1618
1618
|
const existingById = /* @__PURE__ */ new Map();
|
|
1619
|
-
const boundGetEdges =
|
|
1619
|
+
const boundGetEdges = chunkJ34FSPSC_cjs.bindExtraIfReachable(
|
|
1620
1620
|
frame.target,
|
|
1621
1621
|
frame.batchPointRead.extras.getEdges,
|
|
1622
|
-
|
|
1622
|
+
chunkJ34FSPSC_cjs.BATCH_POINT_READ.id
|
|
1623
1623
|
);
|
|
1624
1624
|
if (candidates.length > 0 && boundGetEdges !== void 0) {
|
|
1625
1625
|
const rows = await boundGetEdges.getEdges(
|
|
@@ -1737,7 +1737,7 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1737
1737
|
const { candidate, params, cardinality } = prepared;
|
|
1738
1738
|
const { edge } = candidate;
|
|
1739
1739
|
const cardinalityResult = await catchDeclaredConstraintRefusal(
|
|
1740
|
-
() =>
|
|
1740
|
+
() => chunkUVMSWO6X_cjs.checkCardinalityConstraint(
|
|
1741
1741
|
{ graphId, registry, backend: cardinalityValidationBackend },
|
|
1742
1742
|
edge.kind,
|
|
1743
1743
|
cardinality,
|
|
@@ -1805,7 +1805,7 @@ async function processEdgeSlice(frame, graphId, registry, batch, edgeSchemas, no
|
|
|
1805
1805
|
const rows = await chunkBXHAPCQG_cjs.requireDefined(frame.session.createEdgesDurable)(
|
|
1806
1806
|
acceptedWork
|
|
1807
1807
|
);
|
|
1808
|
-
const outcomes =
|
|
1808
|
+
const outcomes = chunkUVMSWO6X_cjs.classifyDurableEdgeBatchOutcomes(
|
|
1809
1809
|
accepted.map((prepared) => prepared.params),
|
|
1810
1810
|
rows
|
|
1811
1811
|
);
|
|
@@ -1908,7 +1908,7 @@ async function processEdge(frame, graphId, registry, edge, edgeSchemas, nodeSche
|
|
|
1908
1908
|
edge.from.kind,
|
|
1909
1909
|
edge.from.id
|
|
1910
1910
|
);
|
|
1911
|
-
if (fromExists === void 0 || !
|
|
1911
|
+
if (fromExists === void 0 || !chunkJ34FSPSC_cjs.isLiveNodeRow(fromExists)) {
|
|
1912
1912
|
return {
|
|
1913
1913
|
status: "error",
|
|
1914
1914
|
error: `From node not found: ${edge.from.kind}:${edge.from.id}`
|
|
@@ -1921,7 +1921,7 @@ async function processEdge(frame, graphId, registry, edge, edgeSchemas, nodeSche
|
|
|
1921
1921
|
edge.to.kind,
|
|
1922
1922
|
edge.to.id
|
|
1923
1923
|
);
|
|
1924
|
-
if (toExists === void 0 || !
|
|
1924
|
+
if (toExists === void 0 || !chunkJ34FSPSC_cjs.isLiveNodeRow(toExists)) {
|
|
1925
1925
|
return {
|
|
1926
1926
|
status: "error",
|
|
1927
1927
|
error: `To node not found: ${edge.to.kind}:${edge.to.id}`
|
|
@@ -2002,7 +2002,7 @@ async function processEdge(frame, graphId, registry, edge, edgeSchemas, nodeSche
|
|
|
2002
2002
|
}
|
|
2003
2003
|
const { cardinality, params } = preparation.value;
|
|
2004
2004
|
const cardinalityResult = await catchDeclaredConstraintRefusal(
|
|
2005
|
-
() =>
|
|
2005
|
+
() => chunkUVMSWO6X_cjs.checkCardinalityConstraint(
|
|
2006
2006
|
{ graphId, registry, backend: frame.target },
|
|
2007
2007
|
edge.kind,
|
|
2008
2008
|
cardinality,
|
|
@@ -2026,7 +2026,7 @@ async function processEdge(frame, graphId, registry, edge, edgeSchemas, nodeSche
|
|
|
2026
2026
|
return { status: "created" };
|
|
2027
2027
|
}
|
|
2028
2028
|
function importEdgeInsertWork(params, cardinality) {
|
|
2029
|
-
const claim =
|
|
2029
|
+
const claim = chunk36XLQHZA_cjs.edgeCardinalityClaim(cardinality, params);
|
|
2030
2030
|
return { params, claim };
|
|
2031
2031
|
}
|
|
2032
2032
|
function validateProperties(properties, schema, unknownStrategy) {
|
|
@@ -2134,7 +2134,7 @@ async function exportGraph(store, options) {
|
|
|
2134
2134
|
};
|
|
2135
2135
|
}
|
|
2136
2136
|
function exportGraphStream(store, options) {
|
|
2137
|
-
const backend =
|
|
2137
|
+
const backend = chunkUZ6CJUC5_cjs.storeBackend(store);
|
|
2138
2138
|
return markExportStreamBackend(
|
|
2139
2139
|
exportGraphStreamFromBackend(store, backend, options),
|
|
2140
2140
|
backend
|
|
@@ -2282,7 +2282,7 @@ function exportStreamCancelled(phase, graphId, signal, framed) {
|
|
|
2282
2282
|
);
|
|
2283
2283
|
}
|
|
2284
2284
|
function claimSnapshotExportLeaseOrRefuse(graphId, backend) {
|
|
2285
|
-
const lease =
|
|
2285
|
+
const lease = chunkJ34FSPSC_cjs.acquireSerializedStreamLease(backend, "export-snapshot");
|
|
2286
2286
|
if (!lease.acquired) {
|
|
2287
2287
|
throw serializedStreamRefusal({
|
|
2288
2288
|
graphId,
|
|
@@ -2338,7 +2338,7 @@ async function produceExportChunks(store, backend, options, emit) {
|
|
|
2338
2338
|
if (store.graph.identity === void 0) return;
|
|
2339
2339
|
let after;
|
|
2340
2340
|
for (; ; ) {
|
|
2341
|
-
const page = await
|
|
2341
|
+
const page = await chunkUZ6CJUC5_cjs.storeRuntime(store).readIdentityAssertionPageAtTarget(
|
|
2342
2342
|
backend,
|
|
2343
2343
|
options.identityMode,
|
|
2344
2344
|
{
|
|
@@ -2487,7 +2487,7 @@ async function* exportNodeChunks(backend, graphId, kind, options) {
|
|
|
2487
2487
|
const node = {
|
|
2488
2488
|
kind: row.kind,
|
|
2489
2489
|
id: row.id,
|
|
2490
|
-
properties:
|
|
2490
|
+
properties: chunkJ34FSPSC_cjs.rowPropsToObject(row.props)
|
|
2491
2491
|
};
|
|
2492
2492
|
if (options.includeTemporal) {
|
|
2493
2493
|
const validFrom = (
|
|
@@ -2537,7 +2537,7 @@ async function* exportEdgeChunks(backend, graphId, kind, options) {
|
|
|
2537
2537
|
kind: row.to_kind,
|
|
2538
2538
|
id: row.to_id
|
|
2539
2539
|
},
|
|
2540
|
-
properties:
|
|
2540
|
+
properties: chunkJ34FSPSC_cjs.rowPropsToObject(row.props)
|
|
2541
2541
|
};
|
|
2542
2542
|
if (options.includeTemporal) {
|
|
2543
2543
|
const validFrom = (
|
|
@@ -2565,9 +2565,9 @@ async function* exportEdgeChunks(backend, graphId, kind, options) {
|
|
|
2565
2565
|
|
|
2566
2566
|
// src/interchange/trusted-import.ts
|
|
2567
2567
|
function rejectUnsupportedStoreFeatures(store) {
|
|
2568
|
-
const backend =
|
|
2568
|
+
const backend = chunkUZ6CJUC5_cjs.storeBackend(store);
|
|
2569
2569
|
for (const [kind, registration] of Object.entries(store.graph.edges)) {
|
|
2570
|
-
|
|
2570
|
+
chunkXXEFDJHY_cjs.assertEdgeMatchIdentityBackendSupport(
|
|
2571
2571
|
registration.matchIdentity,
|
|
2572
2572
|
backend.capabilities,
|
|
2573
2573
|
kind
|
|
@@ -2664,7 +2664,7 @@ function nodeParams(graphId, node) {
|
|
|
2664
2664
|
};
|
|
2665
2665
|
}
|
|
2666
2666
|
function edgeParams(graphId, edge, registration) {
|
|
2667
|
-
const matchIdentity =
|
|
2667
|
+
const matchIdentity = chunkUVMSWO6X_cjs.resolveEdgeMatchIdentityStorage(
|
|
2668
2668
|
registration.matchIdentity,
|
|
2669
2669
|
{
|
|
2670
2670
|
fromKind: edge.from.kind,
|
|
@@ -2826,7 +2826,7 @@ async function consumeTrustedChunks(store, session, chunks) {
|
|
|
2826
2826
|
}
|
|
2827
2827
|
async function trustedImportGraphStream(store, chunks) {
|
|
2828
2828
|
rejectUnsupportedStoreFeatures(store);
|
|
2829
|
-
const backend =
|
|
2829
|
+
const backend = chunkUZ6CJUC5_cjs.storeBackend(store);
|
|
2830
2830
|
const trustedImport = backend.trustedImport;
|
|
2831
2831
|
if (trustedImport === void 0) {
|
|
2832
2832
|
throw new chunkASKXTVK5_cjs.TrustedImportError(
|
|
@@ -2836,7 +2836,7 @@ async function trustedImportGraphStream(store, chunks) {
|
|
|
2836
2836
|
);
|
|
2837
2837
|
}
|
|
2838
2838
|
const sourceBackend = Symbol.asyncIterator in chunks ? exportStreamBackend(chunks) : void 0;
|
|
2839
|
-
const contention = sourceBackend === void 0 ? void 0 :
|
|
2839
|
+
const contention = sourceBackend === void 0 ? void 0 : chunkJ34FSPSC_cjs.snapshotExportContention(sourceBackend, backend);
|
|
2840
2840
|
if (contention !== void 0) {
|
|
2841
2841
|
throw serializedStreamRefusal({
|
|
2842
2842
|
graphId: store.graphId,
|
|
@@ -2903,5 +2903,5 @@ exports.importGraphStream = importGraphStream;
|
|
|
2903
2903
|
exports.registerIngestionImportTarget = registerIngestionImportTarget;
|
|
2904
2904
|
exports.trustedImportGraph = trustedImportGraph;
|
|
2905
2905
|
exports.trustedImportGraphStream = trustedImportGraphStream;
|
|
2906
|
-
//# sourceMappingURL=chunk-
|
|
2907
|
-
//# sourceMappingURL=chunk-
|
|
2906
|
+
//# sourceMappingURL=chunk-KR3N6Y7O.cjs.map
|
|
2907
|
+
//# sourceMappingURL=chunk-KR3N6Y7O.cjs.map
|