@nicia-ai/typegraph 0.46.2 → 0.47.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/README.md +20 -1
- package/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -49
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +11 -10
- package/dist/backend/postgres/index.cjs +27 -26
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +14 -13
- package/dist/backend/postgres/pglite-store.cjs +34 -33
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +30 -29
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +16 -15
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +15 -14
- package/dist/backend/sqlite/index.cjs +24 -23
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +12 -11
- package/dist/backend/sqlite/libsql.cjs +19 -18
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +14 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +35 -34
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +31 -30
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +17 -16
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +15 -14
- package/dist/{chunk-TCT66A7N.cjs → chunk-26YKDNUD.cjs} +10 -10
- package/dist/{chunk-TCT66A7N.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
- package/dist/{chunk-QOJ2L2AD.js → chunk-3DMMGT6S.js} +3 -3
- package/dist/{chunk-QOJ2L2AD.js.map → chunk-3DMMGT6S.js.map} +1 -1
- package/dist/{chunk-ANKOXPCC.cjs → chunk-3HGRTCDU.cjs} +6 -4
- package/dist/chunk-3HGRTCDU.cjs.map +1 -0
- package/dist/{chunk-QU7QLJA4.cjs → chunk-3U5ABFDW.cjs} +26 -26
- package/dist/{chunk-QU7QLJA4.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
- package/dist/{chunk-5PDSCELM.cjs → chunk-425IZOQ5.cjs} +11 -164
- package/dist/chunk-425IZOQ5.cjs.map +1 -0
- package/dist/{chunk-S7WIRFNS.cjs → chunk-5FBRVORR.cjs} +12 -12
- package/dist/{chunk-S7WIRFNS.cjs.map → chunk-5FBRVORR.cjs.map} +1 -1
- package/dist/{chunk-GWXXHOLU.js → chunk-5FT3TLPK.js} +11 -11
- package/dist/{chunk-GWXXHOLU.js.map → chunk-5FT3TLPK.js.map} +1 -1
- package/dist/{chunk-S3G5VLSW.js → chunk-5UMTUOM5.js} +6 -6
- package/dist/{chunk-S3G5VLSW.js.map → chunk-5UMTUOM5.js.map} +1 -1
- package/dist/{chunk-RFDEYLIK.js → chunk-6FWSNSRE.js} +7 -7
- package/dist/{chunk-RFDEYLIK.js.map → chunk-6FWSNSRE.js.map} +1 -1
- package/dist/{chunk-F36KZDFX.cjs → chunk-6JVZSOHQ.cjs} +91 -91
- package/dist/{chunk-F36KZDFX.cjs.map → chunk-6JVZSOHQ.cjs.map} +1 -1
- package/dist/chunk-6KFLYYOC.cjs +161 -0
- package/dist/chunk-6KFLYYOC.cjs.map +1 -0
- package/dist/{chunk-D6GCNNMK.cjs → chunk-6NGW27EO.cjs} +10 -10
- package/dist/{chunk-D6GCNNMK.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
- package/dist/{chunk-WHS2Y43J.js → chunk-6SWPJEYN.js} +5 -5
- package/dist/{chunk-WHS2Y43J.js.map → chunk-6SWPJEYN.js.map} +1 -1
- package/dist/{chunk-7TKNK32B.js → chunk-7SQSZN2J.js} +5 -5
- package/dist/{chunk-7TKNK32B.js.map → chunk-7SQSZN2J.js.map} +1 -1
- package/dist/{chunk-BEB4OFZF.cjs → chunk-AMMWA76F.cjs} +51 -59
- package/dist/chunk-AMMWA76F.cjs.map +1 -0
- package/dist/{chunk-PYKF7UIL.cjs → chunk-AOSSQDVO.cjs} +13 -13
- package/dist/{chunk-PYKF7UIL.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
- package/dist/{chunk-EDHV4CBU.js → chunk-AVGUJWVX.js} +30 -10
- package/dist/chunk-AVGUJWVX.js.map +1 -0
- package/dist/{chunk-C2ZP5YS6.cjs → chunk-BCQ76AXA.cjs} +258 -153
- package/dist/chunk-BCQ76AXA.cjs.map +1 -0
- package/dist/{chunk-WA64ZSCA.cjs → chunk-BFUOME67.cjs} +11 -11
- package/dist/{chunk-WA64ZSCA.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
- package/dist/{chunk-C6KE2HSQ.cjs → chunk-BR7SHKGM.cjs} +1611 -1382
- package/dist/chunk-BR7SHKGM.cjs.map +1 -0
- package/dist/{chunk-FCIZNUW5.js → chunk-CHAOFCHV.js} +3 -3
- package/dist/{chunk-FCIZNUW5.js.map → chunk-CHAOFCHV.js.map} +1 -1
- package/dist/chunk-CICO5GXD.cjs +12 -0
- package/dist/{chunk-73MWKDFK.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
- package/dist/{chunk-SXWLLQ3D.js → chunk-D5R42W5D.js} +4 -4
- package/dist/{chunk-SXWLLQ3D.js.map → chunk-D5R42W5D.js.map} +1 -1
- package/dist/{chunk-YQ4JONWE.js → chunk-DJZTXBWY.js} +342 -113
- package/dist/chunk-DJZTXBWY.js.map +1 -0
- package/dist/{chunk-BZZI7B43.cjs → chunk-DO7SAMEK.cjs} +47 -47
- package/dist/{chunk-BZZI7B43.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
- package/dist/{chunk-2ZWM2RFH.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
- package/dist/{chunk-2ZWM2RFH.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
- package/dist/{chunk-E4OSGBCM.cjs → chunk-EMIB2RXD.cjs} +131 -131
- package/dist/{chunk-E4OSGBCM.cjs.map → chunk-EMIB2RXD.cjs.map} +1 -1
- package/dist/{chunk-GWUWRZXW.js → chunk-EP4RUYD6.js} +3 -3
- package/dist/{chunk-GWUWRZXW.js.map → chunk-EP4RUYD6.js.map} +1 -1
- package/dist/{chunk-LHYSY6SE.js → chunk-FNOMT74T.js} +10 -8
- package/dist/chunk-FNOMT74T.js.map +1 -0
- package/dist/{chunk-ZBVZ7HXD.cjs → chunk-FQPEMEWX.cjs} +12 -12
- package/dist/{chunk-ZBVZ7HXD.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
- package/dist/{chunk-LNIWCQR4.js → chunk-GLHXM7C4.js} +3 -3
- package/dist/{chunk-LNIWCQR4.js.map → chunk-GLHXM7C4.js.map} +1 -1
- package/dist/{chunk-6BD6ZBKT.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
- package/dist/{chunk-6BD6ZBKT.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
- package/dist/{chunk-XBHRKLZU.cjs → chunk-GYUJZARH.cjs} +4 -4
- package/dist/{chunk-XBHRKLZU.cjs.map → chunk-GYUJZARH.cjs.map} +1 -1
- package/dist/{chunk-A7NMUYEL.cjs → chunk-HDL2ARHX.cjs} +27 -27
- package/dist/{chunk-A7NMUYEL.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
- package/dist/{chunk-5ZJOB5YS.js → chunk-HEV35TGT.js} +4 -4
- package/dist/{chunk-5ZJOB5YS.js.map → chunk-HEV35TGT.js.map} +1 -1
- package/dist/{chunk-UTVQPZPN.cjs → chunk-I4G3SQPF.cjs} +20 -20
- package/dist/{chunk-UTVQPZPN.cjs.map → chunk-I4G3SQPF.cjs.map} +1 -1
- package/dist/{chunk-JCNTKRAK.js → chunk-JONXFAPO.js} +5 -5
- package/dist/{chunk-JCNTKRAK.js.map → chunk-JONXFAPO.js.map} +1 -1
- package/dist/{chunk-GVAMRRZR.cjs → chunk-JR6SX5RH.cjs} +4 -4
- package/dist/{chunk-GVAMRRZR.cjs.map → chunk-JR6SX5RH.cjs.map} +1 -1
- package/dist/{chunk-N3QTGPC7.cjs → chunk-KABFHAL7.cjs} +100 -99
- package/dist/chunk-KABFHAL7.cjs.map +1 -0
- package/dist/{chunk-KXSMF6PL.js → chunk-KH7XW7VV.js} +20 -12
- package/dist/chunk-KH7XW7VV.js.map +1 -0
- package/dist/{chunk-EDJDDY6H.js → chunk-KKBDXCLQ.js} +4 -4
- package/dist/{chunk-EDJDDY6H.js.map → chunk-KKBDXCLQ.js.map} +1 -1
- package/dist/{chunk-ZHOAZD7Q.cjs → chunk-L3LQNR34.cjs} +161 -161
- package/dist/{chunk-ZHOAZD7Q.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
- package/dist/{chunk-IHRDX7K6.js → chunk-LEWHMOUY.js} +46 -56
- package/dist/chunk-LEWHMOUY.js.map +1 -0
- package/dist/{chunk-AF3TWL5C.cjs → chunk-LRQKXRXO.cjs} +4 -4
- package/dist/{chunk-AF3TWL5C.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
- package/dist/{chunk-WYFB7BN3.js → chunk-M35DF33T.js} +143 -38
- package/dist/chunk-M35DF33T.js.map +1 -0
- package/dist/{chunk-32UETY6S.cjs → chunk-MFZR4QKM.cjs} +30 -28
- package/dist/chunk-MFZR4QKM.cjs.map +1 -0
- package/dist/chunk-MKJ4KXL5.cjs +12 -0
- package/dist/{chunk-6LAXM4J2.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
- package/dist/{chunk-KCH7WQA5.cjs → chunk-MRDBBHIZ.cjs} +48 -2
- package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
- package/dist/{chunk-QPOQX2DI.cjs → chunk-MX4DHSQP.cjs} +1023 -360
- package/dist/chunk-MX4DHSQP.cjs.map +1 -0
- package/dist/{chunk-FXNHZFZV.js → chunk-MYKHJI2J.js} +3 -3
- package/dist/{chunk-FXNHZFZV.js.map → chunk-MYKHJI2J.js.map} +1 -1
- package/dist/{chunk-DSAWGCMP.js → chunk-NAZ2RA4L.js} +3 -3
- package/dist/{chunk-DSAWGCMP.js.map → chunk-NAZ2RA4L.js.map} +1 -1
- package/dist/{chunk-R7EWHKID.js → chunk-NG2RB5WL.js} +4 -145
- package/dist/chunk-NG2RB5WL.js.map +1 -0
- package/dist/{chunk-A2LJG5GM.js → chunk-NNQ6A3RM.js} +803 -143
- package/dist/chunk-NNQ6A3RM.js.map +1 -0
- package/dist/{chunk-72WUT4GG.js → chunk-NVY5CJFP.js} +4 -4
- package/dist/{chunk-72WUT4GG.js.map → chunk-NVY5CJFP.js.map} +1 -1
- package/dist/{chunk-ZIH42CRX.cjs → chunk-OI2GQ25X.cjs} +7 -7
- package/dist/{chunk-ZIH42CRX.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
- package/dist/{chunk-A4R3H7RU.cjs → chunk-OIFSOPSR.cjs} +259 -238
- package/dist/chunk-OIFSOPSR.cjs.map +1 -0
- package/dist/{chunk-AU3IJNNP.js → chunk-OMZ37BM2.js} +5 -5
- package/dist/{chunk-AU3IJNNP.js.map → chunk-OMZ37BM2.js.map} +1 -1
- package/dist/{chunk-C4DYN2SD.cjs → chunk-OORXGFL5.cjs} +48 -48
- package/dist/{chunk-C4DYN2SD.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
- package/dist/{chunk-BRN3RGD2.js → chunk-OVI7IXYX.js} +3 -3
- package/dist/{chunk-BRN3RGD2.js.map → chunk-OVI7IXYX.js.map} +1 -1
- package/dist/{chunk-WMKEGJG4.js → chunk-P6YLZTRE.js} +3 -3
- package/dist/{chunk-WMKEGJG4.js.map → chunk-P6YLZTRE.js.map} +1 -1
- package/dist/{chunk-AT3MLMJV.js → chunk-QS3NQZVC.js} +82 -16
- package/dist/chunk-QS3NQZVC.js.map +1 -0
- package/dist/{chunk-EJSYWAEV.js → chunk-QTD6HX4O.js} +5 -5
- package/dist/{chunk-EJSYWAEV.js.map → chunk-QTD6HX4O.js.map} +1 -1
- package/dist/{chunk-JL5UEBWT.cjs → chunk-ROR5ZR6A.cjs} +45 -45
- package/dist/{chunk-JL5UEBWT.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
- package/dist/{chunk-FSLTU57P.js → chunk-SDBBMD4N.js} +3 -3
- package/dist/{chunk-FSLTU57P.js.map → chunk-SDBBMD4N.js.map} +1 -1
- package/dist/{chunk-WEJHA7AD.js → chunk-SE6EGQSD.js} +78 -16
- package/dist/chunk-SE6EGQSD.js.map +1 -0
- package/dist/{chunk-36LIJXWC.js → chunk-SHFBB23Q.js} +4 -4
- package/dist/{chunk-36LIJXWC.js.map → chunk-SHFBB23Q.js.map} +1 -1
- package/dist/{chunk-FA6Z7B5L.js → chunk-SHSSRCFR.js} +5 -3
- package/dist/chunk-SHSSRCFR.js.map +1 -0
- package/dist/{chunk-KOAI3KIV.cjs → chunk-TZEGUG6D.cjs} +4 -4
- package/dist/{chunk-KOAI3KIV.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
- package/dist/{chunk-HNYLMPQQ.cjs → chunk-U5EDAVOJ.cjs} +140 -74
- package/dist/chunk-U5EDAVOJ.cjs.map +1 -0
- package/dist/{chunk-RHDOAQCT.cjs → chunk-UPAJHMW3.cjs} +122 -114
- package/dist/chunk-UPAJHMW3.cjs.map +1 -0
- package/dist/{chunk-BQM5P2NO.cjs → chunk-WGX7JH7E.cjs} +235 -170
- package/dist/chunk-WGX7JH7E.cjs.map +1 -0
- package/dist/{chunk-DYPRZ53S.cjs → chunk-WODMN3Q2.cjs} +27 -27
- package/dist/{chunk-DYPRZ53S.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
- package/dist/{chunk-OZJCH7ZS.js → chunk-XVWOYKIK.js} +3 -3
- package/dist/{chunk-OZJCH7ZS.js.map → chunk-XVWOYKIK.js.map} +1 -1
- package/dist/chunk-XY5OMOJD.js +147 -0
- package/dist/chunk-XY5OMOJD.js.map +1 -0
- package/dist/{chunk-KA4L2NZ3.js → chunk-XYBQI6LE.js} +14 -14
- package/dist/{chunk-KA4L2NZ3.js.map → chunk-XYBQI6LE.js.map} +1 -1
- package/dist/{chunk-EAMVXR5B.js → chunk-ZDKTPBGV.js} +4 -4
- package/dist/{chunk-EAMVXR5B.js.map → chunk-ZDKTPBGV.js.map} +1 -1
- package/dist/{chunk-Z43KWLZF.js → chunk-ZHNXLS3C.js} +9 -8
- package/dist/chunk-ZHNXLS3C.js.map +1 -0
- package/dist/{chunk-62ZXBMSD.js → chunk-ZLONH2UD.js} +46 -3
- package/dist/chunk-ZLONH2UD.js.map +1 -0
- package/dist/core/index.cjs +28 -27
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +8 -7
- package/dist/{ddl-opIn8DfX.d.ts → ddl-CprnMXJ-.d.ts} +3 -3
- package/dist/{ddl-mE07h_EM.d.cts → ddl-DJA7Lci5.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +3204 -635
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +502 -60
- package/dist/graph-merge/index.d.ts +502 -60
- package/dist/graph-merge/index.js +2979 -427
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-Deyu8IXL.d.ts → index-CHTv4XMZ.d.cts} +47 -3
- package/dist/{index-DrRS51Ld.d.cts → index-CzoJ3MUw.d.ts} +47 -3
- package/dist/index.cjs +229 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +53 -52
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +17 -13
- package/dist/interchange/index.d.ts +17 -13
- package/dist/interchange/index.js +17 -16
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-DX983gJ0.d.ts → manager-B6sOQzcQ.d.ts} +2 -2
- package/dist/{manager-ptr3JLRP.d.cts → manager-DlY1vlla.d.cts} +2 -2
- package/dist/{materialize-indexes-CpXoggWU.d.ts → materialize-indexes-DQL4xcpf.d.ts} +1 -1
- package/dist/{materialize-indexes-BXz77YqO.d.cts → materialize-indexes-sskhp-c_.d.cts} +1 -1
- package/dist/{postgres-DwgEXSPI.d.cts → postgres-B6YOUcaK.d.ts} +1 -1
- package/dist/{postgres-QdOMHTBz.d.ts → postgres-BXy_nyMs.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +43 -42
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +10 -9
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +45 -44
- package/dist/schema/index.d.cts +6 -6
- package/dist/schema/index.d.ts +6 -6
- package/dist/schema/index.js +18 -17
- package/dist/{searchable-BrUh0pdc.d.cts → searchable-0Cn_lY8U.d.cts} +1 -1
- package/dist/{searchable-BOUuA83f.d.ts → searchable-D9gMiwcS.d.ts} +1 -1
- package/dist/{sqlite-BfYcV61E.d.cts → sqlite-ClXuBYAj.d.ts} +1 -1
- package/dist/{sqlite-DK40XVR1.d.ts → sqlite-DioSxaPe.d.cts} +1 -1
- package/dist/{store-Bo1psfVZ.d.ts → store-5j-w5onJ.d.ts} +120 -71
- package/dist/{store-FTqBpuJD.d.cts → store-CFedKGU5.d.cts} +120 -71
- package/dist/{temporal-CXewwLTB.d.cts → temporal-Ce1pG0S1.d.cts} +1 -1
- package/dist/{temporal-DPtn0HOu.d.ts → temporal-CjO9FH1l.d.ts} +1 -1
- package/dist/{types-CeT7xM4M.d.ts → types-BrdOFu48.d.ts} +1 -1
- package/dist/{types-Du78EvpN.d.ts → types-DKkMJZjR.d.cts} +32 -6
- package/dist/{types-Du78EvpN.d.cts → types-DKkMJZjR.d.ts} +32 -6
- package/dist/{types-XR1nHERK.d.cts → types-oj_OGAaZ.d.cts} +1 -1
- package/dist/{where-CMbFiWwp.d.ts → where-C8w2627G.d.ts} +1 -1
- package/dist/{where-CJsp-YUf.d.cts → where-D1wKCJ4Q.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-32UETY6S.cjs.map +0 -1
- package/dist/chunk-5PDSCELM.cjs.map +0 -1
- package/dist/chunk-62ZXBMSD.js.map +0 -1
- package/dist/chunk-6LAXM4J2.cjs +0 -12
- package/dist/chunk-73MWKDFK.cjs +0 -12
- package/dist/chunk-A2LJG5GM.js.map +0 -1
- package/dist/chunk-A4R3H7RU.cjs.map +0 -1
- package/dist/chunk-ANKOXPCC.cjs.map +0 -1
- package/dist/chunk-AT3MLMJV.js.map +0 -1
- package/dist/chunk-BEB4OFZF.cjs.map +0 -1
- package/dist/chunk-BQM5P2NO.cjs.map +0 -1
- package/dist/chunk-C2ZP5YS6.cjs.map +0 -1
- package/dist/chunk-C6KE2HSQ.cjs.map +0 -1
- package/dist/chunk-EDHV4CBU.js.map +0 -1
- package/dist/chunk-FA6Z7B5L.js.map +0 -1
- package/dist/chunk-HNYLMPQQ.cjs.map +0 -1
- package/dist/chunk-IHRDX7K6.js.map +0 -1
- package/dist/chunk-KCH7WQA5.cjs.map +0 -1
- package/dist/chunk-KXSMF6PL.js.map +0 -1
- package/dist/chunk-LHYSY6SE.js.map +0 -1
- package/dist/chunk-N3QTGPC7.cjs.map +0 -1
- package/dist/chunk-QPOQX2DI.cjs.map +0 -1
- package/dist/chunk-R7EWHKID.js.map +0 -1
- package/dist/chunk-RHDOAQCT.cjs.map +0 -1
- package/dist/chunk-WEJHA7AD.js.map +0 -1
- package/dist/chunk-WYFB7BN3.js.map +0 -1
- package/dist/chunk-YQ4JONWE.js.map +0 -1
- package/dist/chunk-Z43KWLZF.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
3
|
+
var chunkWGX7JH7E_cjs = require('./chunk-WGX7JH7E.cjs');
|
|
4
|
+
var chunkMFZR4QKM_cjs = require('./chunk-MFZR4QKM.cjs');
|
|
5
|
+
var chunkMX4DHSQP_cjs = require('./chunk-MX4DHSQP.cjs');
|
|
6
|
+
var chunk3HGRTCDU_cjs = require('./chunk-3HGRTCDU.cjs');
|
|
7
|
+
var chunkBFUOME67_cjs = require('./chunk-BFUOME67.cjs');
|
|
8
|
+
var chunkFQPEMEWX_cjs = require('./chunk-FQPEMEWX.cjs');
|
|
9
|
+
var chunk425IZOQ5_cjs = require('./chunk-425IZOQ5.cjs');
|
|
10
|
+
var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
|
|
11
11
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
12
12
|
var zod = require('zod');
|
|
13
13
|
|
|
14
14
|
var FORMAT_VERSION = "2.0";
|
|
15
15
|
var AcceptedFormatVersionSchema = zod.z.enum(["1.0", "2.0"]);
|
|
16
|
-
var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) =>
|
|
16
|
+
var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) => chunk425IZOQ5_cjs.isCanonicalIsoDate(value), {
|
|
17
17
|
message: "Expected canonical UTC ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ); convert with new Date(value).toISOString()."
|
|
18
18
|
});
|
|
19
19
|
var InterchangeNodeSchema = zod.z.object({
|
|
@@ -178,6 +178,7 @@ var ImportResultSchema = zod.z.object({
|
|
|
178
178
|
}),
|
|
179
179
|
errors: zod.z.array(ImportErrorSchema)
|
|
180
180
|
});
|
|
181
|
+
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
181
182
|
var ExportOptionsSchema = zod.z.object({
|
|
182
183
|
/** Filter to specific node kinds (undefined = all) */
|
|
183
184
|
nodeKinds: zod.z.array(zod.z.string()).optional(),
|
|
@@ -217,6 +218,20 @@ var ExportOptionsSchema = zod.z.object({
|
|
|
217
218
|
signal: zod.z.instanceof(AbortSignal).optional()
|
|
218
219
|
});
|
|
219
220
|
var ExportStreamOptionsSchema = ExportOptionsSchema.extend({
|
|
221
|
+
/**
|
|
222
|
+
* Maximum time the consumer may leave a delivered chunk unacknowledged
|
|
223
|
+
* before the export settles itself. The clock starts when a chunk is yielded
|
|
224
|
+
* and is cleared when the consumer asks for the next chunk, so time spent
|
|
225
|
+
* waiting for the backend to produce a chunk does not count as consumer
|
|
226
|
+
* idleness. On expiry, the consumer is rejected with
|
|
227
|
+
* `ExportStreamIdleTimeoutError` and any snapshot transaction and serialized
|
|
228
|
+
* connection lease are released.
|
|
229
|
+
*
|
|
230
|
+
* Omit this only when the caller guarantees a cooperative exit (`break`,
|
|
231
|
+
* `throw`, or `iterator.return()`) or supplies a signal it will abort. An
|
|
232
|
+
* abandoned async iterator is not closed by garbage collection.
|
|
233
|
+
*/
|
|
234
|
+
idleTimeoutMs: zod.z.number().int().positive().max(MAX_TIMER_DELAY_MS).optional(),
|
|
220
235
|
batchSize: zod.z.number().int().positive().default(1e3)
|
|
221
236
|
});
|
|
222
237
|
|
|
@@ -239,8 +254,8 @@ async function importGraph(store, data, rawOptions) {
|
|
|
239
254
|
);
|
|
240
255
|
}
|
|
241
256
|
async function withImportStreamLease(store, run) {
|
|
242
|
-
const lease =
|
|
243
|
-
|
|
257
|
+
const lease = chunk3HGRTCDU_cjs.acquireSerializedStreamLease(
|
|
258
|
+
chunkMFZR4QKM_cjs.storeBackend(store),
|
|
244
259
|
"import-stream"
|
|
245
260
|
);
|
|
246
261
|
if (!lease.acquired) {
|
|
@@ -263,13 +278,13 @@ async function importGraphData(store, data, options) {
|
|
|
263
278
|
const errors = [];
|
|
264
279
|
const graph = store.graph;
|
|
265
280
|
const graphId = store.graphId;
|
|
266
|
-
const backend =
|
|
267
|
-
const runtime =
|
|
281
|
+
const backend = chunkMFZR4QKM_cjs.storeBackend(store);
|
|
282
|
+
const runtime = chunkMFZR4QKM_cjs.storeRuntime(store);
|
|
268
283
|
const registry = store.registry;
|
|
269
284
|
const nodeSchemas = buildNodeSchemaMap(graph);
|
|
270
285
|
const edgeSchemas = buildEdgeSchemaMap(graph);
|
|
271
286
|
const importedNodeIds = /* @__PURE__ */ new Set();
|
|
272
|
-
await
|
|
287
|
+
await chunkMX4DHSQP_cjs.runInWriteTransaction(
|
|
273
288
|
{
|
|
274
289
|
graphId,
|
|
275
290
|
schemaVersion: store.introspect().schemaVersion,
|
|
@@ -332,8 +347,8 @@ async function importGraphData(store, data, options) {
|
|
|
332
347
|
async function importGraphStream(store, chunks, rawOptions) {
|
|
333
348
|
const options = ImportOptionsSchema.parse(rawOptions);
|
|
334
349
|
const sourceBackend = exportStreamBackend(chunks);
|
|
335
|
-
const targetBackend =
|
|
336
|
-
const contention = sourceBackend === void 0 ? void 0 :
|
|
350
|
+
const targetBackend = chunkMFZR4QKM_cjs.storeBackend(store);
|
|
351
|
+
const contention = sourceBackend === void 0 ? void 0 : chunk3HGRTCDU_cjs.snapshotExportContention(sourceBackend, targetBackend);
|
|
337
352
|
if (contention !== void 0) {
|
|
338
353
|
throw serializedStreamRefusal({
|
|
339
354
|
graphId: store.graphId,
|
|
@@ -350,7 +365,7 @@ async function importGraphStream(store, chunks, rawOptions) {
|
|
|
350
365
|
try {
|
|
351
366
|
for await (const chunk of chunks) {
|
|
352
367
|
if (releaseImportLease === void 0) {
|
|
353
|
-
const lease =
|
|
368
|
+
const lease = chunk3HGRTCDU_cjs.acquireSerializedStreamLease(
|
|
354
369
|
targetBackend,
|
|
355
370
|
"import-stream"
|
|
356
371
|
);
|
|
@@ -480,7 +495,7 @@ function serializedStreamRefusal(input) {
|
|
|
480
495
|
requested,
|
|
481
496
|
heldBy
|
|
482
497
|
);
|
|
483
|
-
return new
|
|
498
|
+
return new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
484
499
|
message,
|
|
485
500
|
{ code, graphId, requested, heldBy },
|
|
486
501
|
{ suggestion }
|
|
@@ -515,7 +530,7 @@ function throwIfStreamChunkFailed(result, options) {
|
|
|
515
530
|
}
|
|
516
531
|
function assertIdentityImportSupported(store, hasIdentitySection) {
|
|
517
532
|
if (hasIdentitySection && store.graph.identity === void 0) {
|
|
518
|
-
throw new
|
|
533
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
519
534
|
"Cannot import identity assertions into an identity-disabled graph.",
|
|
520
535
|
{ code: "IDENTITY_IMPORT_REQUIRES_PROFILE", graphId: store.graphId }
|
|
521
536
|
);
|
|
@@ -525,7 +540,7 @@ function validateIdentitySection(identity) {
|
|
|
525
540
|
if (identity === void 0) return;
|
|
526
541
|
const parsed = InterchangeIdentitySchema.safeParse(identity);
|
|
527
542
|
if (parsed.success) return;
|
|
528
|
-
throw new
|
|
543
|
+
throw new chunkMRDBBHIZ_cjs.ValidationError(
|
|
529
544
|
`Invalid identity interchange section: ${parsed.error.message}`,
|
|
530
545
|
{
|
|
531
546
|
issues: parsed.error.issues.map((issue) => ({
|
|
@@ -551,19 +566,19 @@ function identityImportError(assertion, graphId, message) {
|
|
|
551
566
|
};
|
|
552
567
|
}
|
|
553
568
|
function isIdConflictError(error) {
|
|
554
|
-
return error instanceof
|
|
569
|
+
return error instanceof chunkMRDBBHIZ_cjs.ConfigurationError && error.details["code"] === IDENTITY_IMPORT_ID_CONFLICT_CODE;
|
|
555
570
|
}
|
|
556
571
|
function touchesRef(assertion, ref) {
|
|
557
572
|
return assertion.a.kind === ref.kind && assertion.a.id === ref.id || assertion.b.kind === ref.kind && assertion.b.id === ref.id;
|
|
558
573
|
}
|
|
559
574
|
function asIdentityImportError(assertions, graphId, error) {
|
|
560
575
|
const tagged = taggedAssertion(assertions, error);
|
|
561
|
-
if (error instanceof
|
|
576
|
+
if (error instanceof chunkMRDBBHIZ_cjs.NodeNotFoundError) {
|
|
562
577
|
const ref = error.details;
|
|
563
578
|
const assertion = tagged ?? assertions.find((candidate) => touchesRef(candidate, ref));
|
|
564
579
|
return identityImportError(assertion, graphId, error.message);
|
|
565
580
|
}
|
|
566
|
-
if (error instanceof
|
|
581
|
+
if (error instanceof chunkMRDBBHIZ_cjs.IdentityContradictionError) {
|
|
567
582
|
const { a, b } = error.details;
|
|
568
583
|
const assertion = tagged ?? assertions.find(
|
|
569
584
|
(candidate) => touchesRef(candidate, a) && touchesRef(candidate, b)
|
|
@@ -589,12 +604,12 @@ function asIdentityImportError(assertions, graphId, error) {
|
|
|
589
604
|
}
|
|
590
605
|
function taggedAssertion(assertions, error) {
|
|
591
606
|
if (typeof error !== "object" || error === null) return void 0;
|
|
592
|
-
const id = error[
|
|
607
|
+
const id = error[chunkMX4DHSQP_cjs.IDENTITY_IMPORT_FAILED_ASSERTION];
|
|
593
608
|
if (typeof id !== "string") return void 0;
|
|
594
609
|
return assertions.find((candidate) => candidate.id === id);
|
|
595
610
|
}
|
|
596
611
|
function isIdentityAssertionValidationError(error) {
|
|
597
|
-
return error instanceof
|
|
612
|
+
return error instanceof chunkMRDBBHIZ_cjs.ValidationError && error.details.issues.length > 0 && error.details.issues.every(
|
|
598
613
|
(issue) => issue.path === "identity.assertions" && issue.assertionId !== void 0
|
|
599
614
|
);
|
|
600
615
|
}
|
|
@@ -620,7 +635,7 @@ function identityImportProgress(error) {
|
|
|
620
635
|
if (typeof error !== "object" || error === null) {
|
|
621
636
|
return { created: 0, skipped: 0 };
|
|
622
637
|
}
|
|
623
|
-
const progress = error[
|
|
638
|
+
const progress = error[chunkMX4DHSQP_cjs.IDENTITY_IMPORT_PROGRESS];
|
|
624
639
|
if (typeof progress !== "object" || progress === null || !("created" in progress) || typeof progress.created !== "number" || !("skipped" in progress) || typeof progress.skipped !== "number") {
|
|
625
640
|
return { created: 0, skipped: 0 };
|
|
626
641
|
}
|
|
@@ -629,7 +644,7 @@ function identityImportProgress(error) {
|
|
|
629
644
|
function validateStreamHeader(header) {
|
|
630
645
|
const parsed = GraphDataHeaderSchema.safeParse(header);
|
|
631
646
|
if (parsed.success) return;
|
|
632
|
-
throw new
|
|
647
|
+
throw new chunkMRDBBHIZ_cjs.ValidationError(
|
|
633
648
|
`Invalid graph interchange stream header: ${parsed.error.message}`,
|
|
634
649
|
{
|
|
635
650
|
issues: parsed.error.issues.map((issue) => ({
|
|
@@ -689,7 +704,7 @@ async function refreshStatisticsAfterImport(store, options, result, surface) {
|
|
|
689
704
|
}
|
|
690
705
|
function buildNodeSchemaMap(graph) {
|
|
691
706
|
const map = /* @__PURE__ */ new Map();
|
|
692
|
-
for (const kindName of
|
|
707
|
+
for (const kindName of chunkBFUOME67_cjs.getNodeKinds(graph)) {
|
|
693
708
|
const registration = graph.nodes[kindName];
|
|
694
709
|
map.set(kindName, {
|
|
695
710
|
registration,
|
|
@@ -700,7 +715,7 @@ function buildNodeSchemaMap(graph) {
|
|
|
700
715
|
}
|
|
701
716
|
function buildEdgeSchemaMap(graph) {
|
|
702
717
|
const map = /* @__PURE__ */ new Map();
|
|
703
|
-
for (const kindName of
|
|
718
|
+
for (const kindName of chunkBFUOME67_cjs.getEdgeKinds(graph)) {
|
|
704
719
|
const registration = graph.edges[kindName];
|
|
705
720
|
map.set(kindName, {
|
|
706
721
|
registration,
|
|
@@ -822,8 +837,8 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
822
837
|
registerAppliedNodeUpdate,
|
|
823
838
|
seedNodeRow,
|
|
824
839
|
seedUniqueRow
|
|
825
|
-
} =
|
|
826
|
-
await
|
|
840
|
+
} = chunkWGX7JH7E_cjs.createNodeBatchValidationBackend(graphId, registry, backend);
|
|
841
|
+
await chunkWGX7JH7E_cjs.primeBatchValidationCaches(
|
|
827
842
|
{ graphId, registry },
|
|
828
843
|
candidates.map((candidate) => candidate.draft),
|
|
829
844
|
backend,
|
|
@@ -844,7 +859,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
844
859
|
case "skip": {
|
|
845
860
|
record(node, {
|
|
846
861
|
status: "skipped",
|
|
847
|
-
liveTarget:
|
|
862
|
+
liveTarget: chunk3HGRTCDU_cjs.isLiveNodeRow(existing)
|
|
848
863
|
});
|
|
849
864
|
break;
|
|
850
865
|
}
|
|
@@ -856,7 +871,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
856
871
|
break;
|
|
857
872
|
}
|
|
858
873
|
case "update": {
|
|
859
|
-
if (!
|
|
874
|
+
if (!chunk3HGRTCDU_cjs.isLiveNodeRow(existing)) {
|
|
860
875
|
record(node, { status: "skipped", liveTarget: false });
|
|
861
876
|
break;
|
|
862
877
|
}
|
|
@@ -891,7 +906,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
891
906
|
registerAppliedNodeUpdate(
|
|
892
907
|
node.kind,
|
|
893
908
|
node.id,
|
|
894
|
-
|
|
909
|
+
chunk3HGRTCDU_cjs.rowPropsToObject(existing.props),
|
|
895
910
|
props,
|
|
896
911
|
uniqueConstraints
|
|
897
912
|
);
|
|
@@ -906,7 +921,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
906
921
|
continue;
|
|
907
922
|
}
|
|
908
923
|
const uniquenessResult = await catchUniquenessError(
|
|
909
|
-
() =>
|
|
924
|
+
() => chunkMFZR4QKM_cjs.checkUniquenessConstraints(
|
|
910
925
|
{ graphId, registry, backend: validationBackend },
|
|
911
926
|
node.kind,
|
|
912
927
|
node.id,
|
|
@@ -933,7 +948,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
|
|
|
933
948
|
} else {
|
|
934
949
|
await backend.insertNodesBatch(insertParamsList);
|
|
935
950
|
}
|
|
936
|
-
await
|
|
951
|
+
await chunkMFZR4QKM_cjs.applyNodeInsertSideEffectsBatch(
|
|
937
952
|
writeContext,
|
|
938
953
|
accepted.map((candidate) => ({
|
|
939
954
|
kind: candidate.node.kind,
|
|
@@ -978,7 +993,7 @@ async function catchUniquenessError(fn) {
|
|
|
978
993
|
try {
|
|
979
994
|
return { ok: true, value: await fn() };
|
|
980
995
|
} catch (error) {
|
|
981
|
-
if (error instanceof
|
|
996
|
+
if (error instanceof chunkMRDBBHIZ_cjs.UniquenessError) {
|
|
982
997
|
return { ok: false, error: error.message };
|
|
983
998
|
}
|
|
984
999
|
throw error;
|
|
@@ -988,7 +1003,7 @@ var NODE_UPDATE_TARGET_CHANGED_CODE = "INTERCHANGE_NODE_UPDATE_TARGET_CHANGED";
|
|
|
988
1003
|
async function updateImportedNode(writeContext, backend, node, args) {
|
|
989
1004
|
try {
|
|
990
1005
|
const result = await catchUniquenessError(
|
|
991
|
-
() =>
|
|
1006
|
+
() => chunkMFZR4QKM_cjs.applyNodeUpdate(
|
|
992
1007
|
writeContext,
|
|
993
1008
|
{
|
|
994
1009
|
existing: args.existing,
|
|
@@ -1003,7 +1018,7 @@ async function updateImportedNode(writeContext, backend, node, args) {
|
|
|
1003
1018
|
);
|
|
1004
1019
|
return result.ok ? void 0 : result.error;
|
|
1005
1020
|
} catch (error) {
|
|
1006
|
-
if (!(error instanceof
|
|
1021
|
+
if (!(error instanceof chunkMRDBBHIZ_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
|
|
1007
1022
|
throw error;
|
|
1008
1023
|
}
|
|
1009
1024
|
return `${NODE_UPDATE_TARGET_CHANGED_CODE}: Node "${node.kind}:${node.id}" was not updated: no live node matching the id and the validity bound this import checked remained when the write ran, so the row changed or was removed after it was checked. Re-export the source and retry.`;
|
|
@@ -1039,7 +1054,7 @@ async function updateImportedEdge(backend, graphId, edge, props, windowFence) {
|
|
|
1039
1054
|
});
|
|
1040
1055
|
return void 0;
|
|
1041
1056
|
} catch (error) {
|
|
1042
|
-
if (!(error instanceof
|
|
1057
|
+
if (!(error instanceof chunkMRDBBHIZ_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
|
|
1043
1058
|
throw error;
|
|
1044
1059
|
}
|
|
1045
1060
|
return `${EDGE_IDENTITY_CONFLICT_CODE}: Edge "${edge.id}" of kind "${edge.kind}" from "${edge.from.kind}:${edge.from.id}" to "${edge.to.kind}:${edge.to.id}" was not updated: no live edge matching the identity and the validity bound this import checked remained when the write ran, so the row changed or was removed after it was checked. Re-export the source and retry.`;
|
|
@@ -1049,9 +1064,9 @@ function windowResultOf(assert) {
|
|
|
1049
1064
|
try {
|
|
1050
1065
|
return { ok: true, value: assert() };
|
|
1051
1066
|
} catch (error) {
|
|
1052
|
-
if (error instanceof
|
|
1067
|
+
if (error instanceof chunkMRDBBHIZ_cjs.ValidationError) {
|
|
1053
1068
|
const coded = error.details.issues.find(
|
|
1054
|
-
(issue) => issue.code ===
|
|
1069
|
+
(issue) => issue.code === chunkMRDBBHIZ_cjs.INVERTED_VALIDITY_WINDOW_CODE || issue.code === chunkMRDBBHIZ_cjs.IMMUTABLE_VALIDITY_LOWER_BOUND_CODE
|
|
1055
1070
|
);
|
|
1056
1071
|
if (coded !== void 0) {
|
|
1057
1072
|
return { ok: false, error: `${coded.code}: ${error.message}` };
|
|
@@ -1069,12 +1084,12 @@ function windowErrorOf(assert) {
|
|
|
1069
1084
|
}
|
|
1070
1085
|
function validateValidityWindow(entity) {
|
|
1071
1086
|
return windowErrorOf(() => {
|
|
1072
|
-
|
|
1087
|
+
chunk425IZOQ5_cjs.validateOptionalCanonicalIsoDate(
|
|
1073
1088
|
entity.validFrom ?? void 0,
|
|
1074
1089
|
"validFrom"
|
|
1075
1090
|
);
|
|
1076
|
-
|
|
1077
|
-
|
|
1091
|
+
chunk425IZOQ5_cjs.validateOptionalCanonicalIsoDate(entity.validTo, "validTo");
|
|
1092
|
+
chunk425IZOQ5_cjs.assertOrderedValidityWindow(
|
|
1078
1093
|
`${entity.kind} "${entity.id}"`,
|
|
1079
1094
|
entity.validFrom ?? void 0,
|
|
1080
1095
|
entity.validTo
|
|
@@ -1083,7 +1098,7 @@ function validateValidityWindow(entity) {
|
|
|
1083
1098
|
}
|
|
1084
1099
|
function validateUpdateValidityWindow(entity, storedValidFrom) {
|
|
1085
1100
|
const verdict = windowResultOf(
|
|
1086
|
-
() =>
|
|
1101
|
+
() => chunk425IZOQ5_cjs.assertWritableValidityWindow(
|
|
1087
1102
|
`${entity.kind} "${entity.id}"`,
|
|
1088
1103
|
entity.validFrom ?? void 0,
|
|
1089
1104
|
{
|
|
@@ -1122,7 +1137,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
1122
1137
|
if (existing) {
|
|
1123
1138
|
switch (options.onConflict) {
|
|
1124
1139
|
case "skip": {
|
|
1125
|
-
return { status: "skipped", liveTarget:
|
|
1140
|
+
return { status: "skipped", liveTarget: chunk3HGRTCDU_cjs.isLiveNodeRow(existing) };
|
|
1126
1141
|
}
|
|
1127
1142
|
case "error": {
|
|
1128
1143
|
return {
|
|
@@ -1131,7 +1146,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
1131
1146
|
};
|
|
1132
1147
|
}
|
|
1133
1148
|
case "update": {
|
|
1134
|
-
if (!
|
|
1149
|
+
if (!chunk3HGRTCDU_cjs.isLiveNodeRow(existing)) {
|
|
1135
1150
|
return { status: "skipped", liveTarget: false };
|
|
1136
1151
|
}
|
|
1137
1152
|
const updateWindow = validateUpdateValidityWindow(
|
|
@@ -1161,7 +1176,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
1161
1176
|
}
|
|
1162
1177
|
}
|
|
1163
1178
|
const uniquenessResult = await catchUniquenessError(
|
|
1164
|
-
() =>
|
|
1179
|
+
() => chunkMFZR4QKM_cjs.checkUniquenessConstraints(
|
|
1165
1180
|
{ graphId, registry, backend },
|
|
1166
1181
|
node.kind,
|
|
1167
1182
|
node.id,
|
|
@@ -1180,7 +1195,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
|
|
|
1180
1195
|
...node.validFrom !== void 0 && { validFrom: node.validFrom },
|
|
1181
1196
|
...node.validTo !== void 0 && { validTo: node.validTo }
|
|
1182
1197
|
});
|
|
1183
|
-
await
|
|
1198
|
+
await chunkMFZR4QKM_cjs.applyNodeInsertSideEffects(
|
|
1184
1199
|
writeContext,
|
|
1185
1200
|
{
|
|
1186
1201
|
kind: node.kind,
|
|
@@ -1266,7 +1281,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
1266
1281
|
});
|
|
1267
1282
|
continue;
|
|
1268
1283
|
}
|
|
1269
|
-
const endpointError =
|
|
1284
|
+
const endpointError = chunkFQPEMEWX_cjs.validateEdgeEndpoints(
|
|
1270
1285
|
edge.kind,
|
|
1271
1286
|
edge.from.kind,
|
|
1272
1287
|
edge.to.kind,
|
|
@@ -1315,7 +1330,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
1315
1330
|
for (const [kind, ids] of idsByKind) {
|
|
1316
1331
|
const rows = await backend.getNodes(graphId, kind, [...ids]);
|
|
1317
1332
|
for (const row of rows) {
|
|
1318
|
-
if (
|
|
1333
|
+
if (chunk3HGRTCDU_cjs.isLiveNodeRow(row)) {
|
|
1319
1334
|
liveEndpointKeys.add(makeNodeKey(kind, row.id));
|
|
1320
1335
|
}
|
|
1321
1336
|
}
|
|
@@ -1326,7 +1341,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
|
|
|
1326
1341
|
if (importedNodeIds.has(key)) return true;
|
|
1327
1342
|
if (checkedEndpointKeys.has(key)) return liveEndpointKeys.has(key);
|
|
1328
1343
|
const row = await backend.getNode(graphId, endpoint.kind, endpoint.id);
|
|
1329
|
-
return row !== void 0 &&
|
|
1344
|
+
return row !== void 0 && chunk3HGRTCDU_cjs.isLiveNodeRow(row);
|
|
1330
1345
|
};
|
|
1331
1346
|
const existingById = /* @__PURE__ */ new Map();
|
|
1332
1347
|
if (candidates.length > 0 && backend.getEdges !== void 0) {
|
|
@@ -1468,7 +1483,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1468
1483
|
if (!nodeSchemas.has(edge.to.kind)) {
|
|
1469
1484
|
return { status: "error", error: `Unknown to node kind: ${edge.to.kind}` };
|
|
1470
1485
|
}
|
|
1471
|
-
const endpointError =
|
|
1486
|
+
const endpointError = chunkFQPEMEWX_cjs.validateEdgeEndpoints(
|
|
1472
1487
|
edge.kind,
|
|
1473
1488
|
edge.from.kind,
|
|
1474
1489
|
edge.to.kind,
|
|
@@ -1487,7 +1502,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1487
1502
|
edge.from.kind,
|
|
1488
1503
|
edge.from.id
|
|
1489
1504
|
);
|
|
1490
|
-
if (fromExists === void 0 || !
|
|
1505
|
+
if (fromExists === void 0 || !chunk3HGRTCDU_cjs.isLiveNodeRow(fromExists)) {
|
|
1491
1506
|
return {
|
|
1492
1507
|
status: "error",
|
|
1493
1508
|
error: `From node not found: ${edge.from.kind}:${edge.from.id}`
|
|
@@ -1496,7 +1511,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
|
|
|
1496
1511
|
}
|
|
1497
1512
|
if (!importedNodeIds.has(toKey)) {
|
|
1498
1513
|
const toExists = await backend.getNode(graphId, edge.to.kind, edge.to.id);
|
|
1499
|
-
if (toExists === void 0 || !
|
|
1514
|
+
if (toExists === void 0 || !chunk3HGRTCDU_cjs.isLiveNodeRow(toExists)) {
|
|
1500
1515
|
return {
|
|
1501
1516
|
status: "error",
|
|
1502
1517
|
error: `To node not found: ${edge.to.kind}:${edge.to.id}`
|
|
@@ -1633,7 +1648,7 @@ function formatZodError(error) {
|
|
|
1633
1648
|
}).join("; ");
|
|
1634
1649
|
}
|
|
1635
1650
|
function makeNodeKey(kind, id) {
|
|
1636
|
-
return
|
|
1651
|
+
return chunkMX4DHSQP_cjs.encodeTupleKey([kind, id]);
|
|
1637
1652
|
}
|
|
1638
1653
|
|
|
1639
1654
|
// src/interchange/export.ts
|
|
@@ -1676,17 +1691,62 @@ async function exportGraph(store, options) {
|
|
|
1676
1691
|
};
|
|
1677
1692
|
}
|
|
1678
1693
|
function exportGraphStream(store, options) {
|
|
1679
|
-
const backend =
|
|
1694
|
+
const backend = chunkMFZR4QKM_cjs.storeBackend(store);
|
|
1680
1695
|
return markExportStreamBackend(
|
|
1681
1696
|
exportGraphStreamFromBackend(store, backend, options),
|
|
1682
1697
|
backend
|
|
1683
1698
|
);
|
|
1684
1699
|
}
|
|
1685
1700
|
async function* exportGraphStreamFromBackend(store, backend, options) {
|
|
1686
|
-
const
|
|
1701
|
+
const parsed = ExportStreamOptionsSchema.parse(options ?? {});
|
|
1702
|
+
const exportsIdentity = store.graph.identity !== void 0;
|
|
1703
|
+
const explicitlyDisabledTemporalFields = options?.includeTemporal === false;
|
|
1704
|
+
if (exportsIdentity && explicitlyDisabledTemporalFields) {
|
|
1705
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
1706
|
+
"Identity export requires temporal endpoint fields.",
|
|
1707
|
+
{
|
|
1708
|
+
code: "IDENTITY_EXPORT_REQUIRES_TEMPORAL_FIELDS",
|
|
1709
|
+
identityMode: parsed.identityMode,
|
|
1710
|
+
includeTemporal: false
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
suggestion: "Remove includeTemporal or set it to true when exporting an identity-enabled graph."
|
|
1714
|
+
}
|
|
1715
|
+
);
|
|
1716
|
+
}
|
|
1717
|
+
const resolved = exportsIdentity ? { ...parsed, includeTemporal: true } : parsed;
|
|
1687
1718
|
const signal = resolved.signal;
|
|
1719
|
+
const idleTimeoutMs = resolved.idleTimeoutMs;
|
|
1688
1720
|
const channel = createRendezvousChannel();
|
|
1689
|
-
|
|
1721
|
+
let idleTimer;
|
|
1722
|
+
let subscribedToSignal = false;
|
|
1723
|
+
function unsubscribeFromSignal() {
|
|
1724
|
+
if (!subscribedToSignal) return;
|
|
1725
|
+
signal?.removeEventListener("abort", abortStream);
|
|
1726
|
+
subscribedToSignal = false;
|
|
1727
|
+
}
|
|
1728
|
+
function clearIdleTimer() {
|
|
1729
|
+
if (idleTimer === void 0) return;
|
|
1730
|
+
clearTimeout(idleTimer);
|
|
1731
|
+
idleTimer = void 0;
|
|
1732
|
+
}
|
|
1733
|
+
function armIdleTimer() {
|
|
1734
|
+
if (idleTimeoutMs === void 0) return;
|
|
1735
|
+
idleTimer = setTimeout(() => {
|
|
1736
|
+
idleTimer = void 0;
|
|
1737
|
+
unsubscribeFromSignal();
|
|
1738
|
+
channel.abort(
|
|
1739
|
+
new chunkMRDBBHIZ_cjs.ExportStreamIdleTimeoutError(
|
|
1740
|
+
store.graphId,
|
|
1741
|
+
idleTimeoutMs,
|
|
1742
|
+
backend.capabilities.transactions
|
|
1743
|
+
)
|
|
1744
|
+
);
|
|
1745
|
+
}, idleTimeoutMs);
|
|
1746
|
+
unrefTimer(idleTimer);
|
|
1747
|
+
}
|
|
1748
|
+
function abortStream() {
|
|
1749
|
+
clearIdleTimer();
|
|
1690
1750
|
channel.abort(
|
|
1691
1751
|
exportStreamCancelled(
|
|
1692
1752
|
"mid-stream",
|
|
@@ -1695,11 +1755,9 @@ async function* exportGraphStreamFromBackend(store, backend, options) {
|
|
|
1695
1755
|
backend.capabilities.transactions
|
|
1696
1756
|
)
|
|
1697
1757
|
);
|
|
1698
|
-
}
|
|
1699
|
-
const unsubscribeFromSignal = () => {
|
|
1700
|
-
signal?.removeEventListener("abort", abortStream);
|
|
1701
|
-
};
|
|
1758
|
+
}
|
|
1702
1759
|
signal?.addEventListener("abort", abortStream, { once: true });
|
|
1760
|
+
subscribedToSignal = signal !== void 0;
|
|
1703
1761
|
if (signal?.aborted === true) {
|
|
1704
1762
|
unsubscribeFromSignal();
|
|
1705
1763
|
throw exportStreamCancelled(
|
|
@@ -1750,20 +1808,28 @@ async function* exportGraphStreamFromBackend(store, backend, options) {
|
|
|
1750
1808
|
for (; ; ) {
|
|
1751
1809
|
const delivery = await channel.take();
|
|
1752
1810
|
if (delivery === void 0) return;
|
|
1811
|
+
armIdleTimer();
|
|
1753
1812
|
yield delivery.value;
|
|
1813
|
+
clearIdleTimer();
|
|
1754
1814
|
delivery.acknowledge();
|
|
1755
1815
|
}
|
|
1756
1816
|
} finally {
|
|
1757
1817
|
unsubscribeFromSignal();
|
|
1818
|
+
clearIdleTimer();
|
|
1758
1819
|
channel.cancel();
|
|
1759
1820
|
await producer;
|
|
1760
1821
|
}
|
|
1761
1822
|
}
|
|
1823
|
+
function unrefTimer(timer) {
|
|
1824
|
+
if (typeof timer === "object" && "unref" in timer && typeof timer.unref === "function") {
|
|
1825
|
+
timer.unref();
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1762
1828
|
function exportStreamCancelled(phase, graphId, signal, framed) {
|
|
1763
1829
|
const message = phase === "before-open" ? "The graph export stream was aborted through its AbortSignal before it opened: no snapshot transaction was started and no database connection claimed." : framed ? "The graph export stream was aborted through its AbortSignal: its repeatable-read snapshot has been rolled back and the connection it held released." : "The graph export stream was aborted through its AbortSignal: its remaining reads were abandoned. This backend does not support transactions, so the export held no snapshot and no connection \u2014 and the chunks already delivered were never guaranteed to agree with one another.";
|
|
1764
1830
|
const cause = signal?.reason;
|
|
1765
1831
|
const suggestion = phase === "before-open" ? "Start a new export; the aborted one claimed nothing." : framed ? "Start a new export; the aborted one released its snapshot transaction and the connection it held." : "Start a new export; nothing was held, but discard the chunks already delivered unless partial, mutually-inconsistent data is acceptable.";
|
|
1766
|
-
return new
|
|
1832
|
+
return new chunkMRDBBHIZ_cjs.ExportStreamCancelledError(
|
|
1767
1833
|
message,
|
|
1768
1834
|
{ graphId },
|
|
1769
1835
|
{
|
|
@@ -1773,7 +1839,7 @@ function exportStreamCancelled(phase, graphId, signal, framed) {
|
|
|
1773
1839
|
);
|
|
1774
1840
|
}
|
|
1775
1841
|
function claimSnapshotExportLeaseOrRefuse(graphId, backend) {
|
|
1776
|
-
const lease =
|
|
1842
|
+
const lease = chunk3HGRTCDU_cjs.acquireSerializedStreamLease(backend, "export-snapshot");
|
|
1777
1843
|
if (!lease.acquired) {
|
|
1778
1844
|
throw serializedStreamRefusal({
|
|
1779
1845
|
graphId,
|
|
@@ -1785,14 +1851,14 @@ function claimSnapshotExportLeaseOrRefuse(graphId, backend) {
|
|
|
1785
1851
|
}
|
|
1786
1852
|
async function produceExportChunks(store, backend, options, emit) {
|
|
1787
1853
|
const graphId = store.graphId;
|
|
1788
|
-
const nodeKinds = options.nodeKinds ??
|
|
1789
|
-
const edgeKinds = options.edgeKinds ??
|
|
1854
|
+
const nodeKinds = options.nodeKinds ?? chunkBFUOME67_cjs.getNodeKinds(store.graph);
|
|
1855
|
+
const edgeKinds = options.edgeKinds ?? chunkBFUOME67_cjs.getEdgeKinds(store.graph);
|
|
1790
1856
|
const schemaVersion = await backend.getActiveSchema(graphId);
|
|
1791
1857
|
await emit({
|
|
1792
1858
|
type: "header",
|
|
1793
1859
|
header: {
|
|
1794
1860
|
formatVersion: FORMAT_VERSION,
|
|
1795
|
-
exportedAt:
|
|
1861
|
+
exportedAt: chunk425IZOQ5_cjs.nowIso(),
|
|
1796
1862
|
source: {
|
|
1797
1863
|
type: "typegraph-export",
|
|
1798
1864
|
graphId,
|
|
@@ -1829,7 +1895,7 @@ async function produceExportChunks(store, backend, options, emit) {
|
|
|
1829
1895
|
if (store.graph.identity === void 0) return;
|
|
1830
1896
|
let after;
|
|
1831
1897
|
for (; ; ) {
|
|
1832
|
-
const page = await
|
|
1898
|
+
const page = await chunkMFZR4QKM_cjs.storeRuntime(store).readIdentityAssertionPageAtTarget(
|
|
1833
1899
|
backend,
|
|
1834
1900
|
options.identityMode,
|
|
1835
1901
|
{
|
|
@@ -1978,7 +2044,7 @@ async function* exportNodeChunks(backend, graphId, kind, options) {
|
|
|
1978
2044
|
const node = {
|
|
1979
2045
|
kind: row.kind,
|
|
1980
2046
|
id: row.id,
|
|
1981
|
-
properties:
|
|
2047
|
+
properties: chunk3HGRTCDU_cjs.rowPropsToObject(row.props)
|
|
1982
2048
|
};
|
|
1983
2049
|
if (options.includeTemporal) {
|
|
1984
2050
|
const validFrom = (
|
|
@@ -2028,7 +2094,7 @@ async function* exportEdgeChunks(backend, graphId, kind, options) {
|
|
|
2028
2094
|
kind: row.to_kind,
|
|
2029
2095
|
id: row.to_id
|
|
2030
2096
|
},
|
|
2031
|
-
properties:
|
|
2097
|
+
properties: chunk3HGRTCDU_cjs.rowPropsToObject(row.props)
|
|
2032
2098
|
};
|
|
2033
2099
|
if (options.includeTemporal) {
|
|
2034
2100
|
const validFrom = (
|
|
@@ -2078,5 +2144,5 @@ exports.importGraph = importGraph;
|
|
|
2078
2144
|
exports.importGraphStream = importGraphStream;
|
|
2079
2145
|
exports.serializedStreamRefusal = serializedStreamRefusal;
|
|
2080
2146
|
exports.withImportStreamLease = withImportStreamLease;
|
|
2081
|
-
//# sourceMappingURL=chunk-
|
|
2082
|
-
//# sourceMappingURL=chunk-
|
|
2147
|
+
//# sourceMappingURL=chunk-U5EDAVOJ.cjs.map
|
|
2148
|
+
//# sourceMappingURL=chunk-U5EDAVOJ.cjs.map
|