@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,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunk26YKDNUD_cjs = require('./chunk-26YKDNUD.cjs');
|
|
4
|
+
var chunkMX4DHSQP_cjs = require('./chunk-MX4DHSQP.cjs');
|
|
5
|
+
var chunkOIFSOPSR_cjs = require('./chunk-OIFSOPSR.cjs');
|
|
6
6
|
var chunkPWLJ77UV_cjs = require('./chunk-PWLJ77UV.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
7
|
+
var chunkJR6SX5RH_cjs = require('./chunk-JR6SX5RH.cjs');
|
|
8
|
+
var chunk3U5ABFDW_cjs = require('./chunk-3U5ABFDW.cjs');
|
|
9
|
+
var chunkBFUOME67_cjs = require('./chunk-BFUOME67.cjs');
|
|
10
|
+
var chunkFQPEMEWX_cjs = require('./chunk-FQPEMEWX.cjs');
|
|
11
|
+
var chunk425IZOQ5_cjs = require('./chunk-425IZOQ5.cjs');
|
|
12
|
+
var chunkLRQKXRXO_cjs = require('./chunk-LRQKXRXO.cjs');
|
|
13
13
|
var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
|
|
14
|
-
var
|
|
14
|
+
var chunkEDN4Y4ZG_cjs = require('./chunk-EDN4Y4ZG.cjs');
|
|
15
15
|
var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkGYEG3ZLZ_cjs = require('./chunk-GYEG3ZLZ.cjs');
|
|
17
17
|
var chunkXUO3KQFO_cjs = require('./chunk-XUO3KQFO.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
|
|
19
19
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
20
20
|
var zod = require('zod');
|
|
21
21
|
|
|
22
22
|
// src/ontology/core-meta-edges.ts
|
|
23
23
|
function createMetaEdge(name, properties) {
|
|
24
24
|
return Object.freeze({
|
|
25
|
-
[
|
|
25
|
+
[chunk26YKDNUD_cjs.META_EDGE_BRAND]: true,
|
|
26
26
|
name,
|
|
27
27
|
properties: {
|
|
28
28
|
transitive: properties.transitive ?? false,
|
|
@@ -350,7 +350,7 @@ function canonicalKey(value) {
|
|
|
350
350
|
}
|
|
351
351
|
function sortedByCanonicalForm(items) {
|
|
352
352
|
return items.toSorted(
|
|
353
|
-
(left, right) =>
|
|
353
|
+
(left, right) => chunkOIFSOPSR_cjs.compareStrings(canonicalKey(left), canonicalKey(right))
|
|
354
354
|
);
|
|
355
355
|
}
|
|
356
356
|
function orderNormalizedSchema(value) {
|
|
@@ -932,7 +932,7 @@ function serializeSchema(graph, version) {
|
|
|
932
932
|
return {
|
|
933
933
|
graphId: graph.id,
|
|
934
934
|
version,
|
|
935
|
-
generatedAt:
|
|
935
|
+
generatedAt: chunk425IZOQ5_cjs.nowIso(),
|
|
936
936
|
nodes,
|
|
937
937
|
edges,
|
|
938
938
|
ontology,
|
|
@@ -964,7 +964,7 @@ function serializeDeprecatedKinds(set) {
|
|
|
964
964
|
function canonicalExtension(document) {
|
|
965
965
|
if (document === void 0) return void 0;
|
|
966
966
|
if (document.version === void 0) return document;
|
|
967
|
-
if (document.version !==
|
|
967
|
+
if (document.version !== chunkGYEG3ZLZ_cjs.LEGACY_GRAPH_EXTENSION_VERSION) return document;
|
|
968
968
|
const { version: _omit, ...rest } = document;
|
|
969
969
|
return rest;
|
|
970
970
|
}
|
|
@@ -1050,7 +1050,7 @@ function serializeEdgeIndexDeclaration(declaration) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
function serializeNodes(graph) {
|
|
1052
1052
|
const result = chunkN66HCGCY_cjs.createDataKeyedBag();
|
|
1053
|
-
for (const kindName of
|
|
1053
|
+
for (const kindName of chunkBFUOME67_cjs.getNodeKinds(graph)) {
|
|
1054
1054
|
const registration = graph.nodes[kindName];
|
|
1055
1055
|
if (registration === void 0) continue;
|
|
1056
1056
|
result[kindName] = serializeNodeDef(registration);
|
|
@@ -1079,9 +1079,9 @@ function serializeUniqueConstraints(constraints) {
|
|
|
1079
1079
|
}));
|
|
1080
1080
|
}
|
|
1081
1081
|
function serializeWherePredicate(whereFunction) {
|
|
1082
|
-
const predicate =
|
|
1082
|
+
const predicate = chunkFQPEMEWX_cjs.captureWherePredicate(whereFunction);
|
|
1083
1083
|
if (predicate === void 0) {
|
|
1084
|
-
throw new
|
|
1084
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
1085
1085
|
`A unique constraint's \`where\` callback did not return a predicate, so it cannot be persisted.`,
|
|
1086
1086
|
{},
|
|
1087
1087
|
{
|
|
@@ -1108,7 +1108,7 @@ function deserializeWherePredicate(serialized) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
function serializeEdges(graph) {
|
|
1110
1110
|
const result = chunkN66HCGCY_cjs.createDataKeyedBag();
|
|
1111
|
-
for (const kindName of
|
|
1111
|
+
for (const kindName of chunkBFUOME67_cjs.getEdgeKinds(graph)) {
|
|
1112
1112
|
const registration = graph.edges[kindName];
|
|
1113
1113
|
if (registration === void 0) continue;
|
|
1114
1114
|
result[kindName] = serializeEdgeDef(registration);
|
|
@@ -1165,8 +1165,8 @@ function serializeMetaEdge(metaEdge) {
|
|
|
1165
1165
|
function serializeOntologyRelation(relation) {
|
|
1166
1166
|
return {
|
|
1167
1167
|
metaEdge: relation.metaEdge.name,
|
|
1168
|
-
from:
|
|
1169
|
-
to:
|
|
1168
|
+
from: chunk26YKDNUD_cjs.getTypeName(relation.from),
|
|
1169
|
+
to: chunk26YKDNUD_cjs.getTypeName(relation.to)
|
|
1170
1170
|
};
|
|
1171
1171
|
}
|
|
1172
1172
|
function serializeClosures(relations) {
|
|
@@ -1186,7 +1186,7 @@ function serializeClosures(relations) {
|
|
|
1186
1186
|
edgeImplyingClosure: {}
|
|
1187
1187
|
};
|
|
1188
1188
|
}
|
|
1189
|
-
const computed =
|
|
1189
|
+
const computed = chunkGYEG3ZLZ_cjs.computeClosuresFromOntology(relations);
|
|
1190
1190
|
return {
|
|
1191
1191
|
subClassAncestors: mapToRecord(computed.subClassAncestors),
|
|
1192
1192
|
subClassDescendants: mapToRecord(computed.subClassDescendants),
|
|
@@ -1300,7 +1300,7 @@ function compileNodeCached(kindName, document) {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
function compileNode(kindName, document) {
|
|
1302
1302
|
const schema = buildObjectSchema(document.properties);
|
|
1303
|
-
const type =
|
|
1303
|
+
const type = chunk26YKDNUD_cjs.defineNode(
|
|
1304
1304
|
kindName,
|
|
1305
1305
|
chunkN66HCGCY_cjs.compactUndefined({
|
|
1306
1306
|
schema,
|
|
@@ -1478,7 +1478,7 @@ function graphExtensionOntologyKey(entry) {
|
|
|
1478
1478
|
return `${entry.metaEdge}|${entry.from}|${entry.to}`;
|
|
1479
1479
|
}
|
|
1480
1480
|
function compileTimeOntologyKey(relation) {
|
|
1481
|
-
return `${relation.metaEdge.name}|${
|
|
1481
|
+
return `${relation.metaEdge.name}|${chunk26YKDNUD_cjs.getTypeName(relation.from)}|${chunk26YKDNUD_cjs.getTypeName(relation.to)}`;
|
|
1482
1482
|
}
|
|
1483
1483
|
function buildGraphExtensionOntologyKeySet(document) {
|
|
1484
1484
|
return new Set(
|
|
@@ -1499,7 +1499,7 @@ function mergeGraphExtension(graph, document) {
|
|
|
1499
1499
|
if (graph.extension !== void 0 && chunkPWLJ77UV_cjs.canonicalEqual(unionDocument, existingDocument)) {
|
|
1500
1500
|
return graph;
|
|
1501
1501
|
}
|
|
1502
|
-
const validatedUnion =
|
|
1502
|
+
const validatedUnion = chunkGYEG3ZLZ_cjs.unwrap(chunkGYEG3ZLZ_cjs.validateGraphExtension(unionDocument));
|
|
1503
1503
|
const compiled = compileGraphExtension(validatedUnion);
|
|
1504
1504
|
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = extensionKindNames(existingDocument);
|
|
1505
1505
|
const nodeKinds = /* @__PURE__ */ new Map();
|
|
@@ -1549,7 +1549,7 @@ function mergeGraphExtension(graph, document) {
|
|
|
1549
1549
|
edgeKind: edge.kindName,
|
|
1550
1550
|
side: "to"
|
|
1551
1551
|
});
|
|
1552
|
-
const type =
|
|
1552
|
+
const type = chunk26YKDNUD_cjs.defineEdge(
|
|
1553
1553
|
edge.kindName,
|
|
1554
1554
|
chunkN66HCGCY_cjs.compactUndefined({
|
|
1555
1555
|
schema: edge.schema,
|
|
@@ -1601,7 +1601,7 @@ function deriveGraphExtensionVectorIndexes(compiledNodes) {
|
|
|
1601
1601
|
...compiled.unique.length === 0 ? {} : { unique: [...compiled.unique] }
|
|
1602
1602
|
};
|
|
1603
1603
|
}
|
|
1604
|
-
return
|
|
1604
|
+
return chunkBFUOME67_cjs.autoDeriveVectorIndexes(registrations).map(
|
|
1605
1605
|
(index) => Object.freeze({ ...index, origin: "runtime" })
|
|
1606
1606
|
);
|
|
1607
1607
|
}
|
|
@@ -1619,7 +1619,7 @@ function mergeIndexesWithGraphExtension(existing, runtimeIndexes, graphId) {
|
|
|
1619
1619
|
const runtimeRelational = runtimeIndexes.filter(
|
|
1620
1620
|
(index) => index.entity !== "vector"
|
|
1621
1621
|
);
|
|
1622
|
-
const vectorMerged =
|
|
1622
|
+
const vectorMerged = chunkBFUOME67_cjs.mergeVectorIndexes(compileTimeIndexes, runtimeVectors);
|
|
1623
1623
|
const merged = [...vectorMerged, ...runtimeRelational];
|
|
1624
1624
|
assertUniqueIndexNames(merged, graphId);
|
|
1625
1625
|
return merged;
|
|
@@ -1631,7 +1631,7 @@ function assertUniqueIndexNames(indexes, graphId) {
|
|
|
1631
1631
|
seen.add(index.name);
|
|
1632
1632
|
continue;
|
|
1633
1633
|
}
|
|
1634
|
-
throw new
|
|
1634
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
1635
1635
|
`Duplicate index name "${index.name}" after merging graph extension into graph "${graphId}". Index names must be unique within a graph.`,
|
|
1636
1636
|
{ graphId, indexName: index.name, code: "DUPLICATE_INDEX_NAME" },
|
|
1637
1637
|
{
|
|
@@ -1647,12 +1647,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1647
1647
|
if (document.entity === "node") {
|
|
1648
1648
|
const node = nodeKinds.get(document.kind);
|
|
1649
1649
|
if (node === void 0) {
|
|
1650
|
-
throw new
|
|
1650
|
+
throw new chunkMRDBBHIZ_cjs.KindNotFoundError(document.kind, "node", {
|
|
1651
1651
|
graphId,
|
|
1652
1652
|
suggestion: "Declare the kind under `nodes` in this graph extension, or remove the index from `indexes`."
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
1655
|
-
const declaration2 =
|
|
1655
|
+
const declaration2 = chunkLRQKXRXO_cjs.defineNodeIndex(
|
|
1656
1656
|
node,
|
|
1657
1657
|
toNodeIndexConfig(document)
|
|
1658
1658
|
);
|
|
@@ -1661,12 +1661,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1661
1661
|
}
|
|
1662
1662
|
const edgeRegistration = mergedEdges[document.kind];
|
|
1663
1663
|
if (edgeRegistration === void 0) {
|
|
1664
|
-
throw new
|
|
1664
|
+
throw new chunkMRDBBHIZ_cjs.KindNotFoundError(document.kind, "edge", {
|
|
1665
1665
|
graphId,
|
|
1666
1666
|
suggestion: "Declare the edge under `edges` in this graph extension, or remove the index from `indexes`."
|
|
1667
1667
|
});
|
|
1668
1668
|
}
|
|
1669
|
-
const declaration =
|
|
1669
|
+
const declaration = chunkLRQKXRXO_cjs.defineEdgeIndex(
|
|
1670
1670
|
edgeRegistration.type,
|
|
1671
1671
|
toEdgeIndexConfig(document)
|
|
1672
1672
|
);
|
|
@@ -1678,7 +1678,7 @@ function buildWhereCallback(where) {
|
|
|
1678
1678
|
return (props) => {
|
|
1679
1679
|
const builder = props[where.field];
|
|
1680
1680
|
if (builder === void 0) {
|
|
1681
|
-
throw new
|
|
1681
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
1682
1682
|
`Graph-extension index \`where\` references unknown field "${where.field}".`,
|
|
1683
1683
|
{ field: where.field, code: "EXTENSION_INDEX_WHERE_UNKNOWN_FIELD" }
|
|
1684
1684
|
);
|
|
@@ -1753,14 +1753,14 @@ function isEmptyExtension(extension) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
function assertNoCollision(kindName, entity, collides, graphId) {
|
|
1755
1755
|
if (!collides) return;
|
|
1756
|
-
throw new
|
|
1756
|
+
throw new chunkGYEG3ZLZ_cjs.KindCollisionError(kindName, entity, graphId);
|
|
1757
1757
|
}
|
|
1758
1758
|
function resolveEndpoints(entries, nodeKinds, context) {
|
|
1759
1759
|
return entries.map((entry) => {
|
|
1760
1760
|
if (typeof entry !== "string") return entry;
|
|
1761
1761
|
const resolved = nodeKinds.get(entry);
|
|
1762
1762
|
if (resolved === void 0) {
|
|
1763
|
-
throw new
|
|
1763
|
+
throw new chunkGYEG3ZLZ_cjs.GraphExtensionUnresolvedEndpointError(
|
|
1764
1764
|
context.edgeKind,
|
|
1765
1765
|
context.side,
|
|
1766
1766
|
entry,
|
|
@@ -1795,8 +1795,8 @@ function resolveOntologyEndpoints(relation, nodeKinds, edgeKinds, graphId) {
|
|
|
1795
1795
|
function resolveOntologyEdgeEndpoint(metaEdge, endpoint, edgeKinds, graphId) {
|
|
1796
1796
|
if (typeof endpoint !== "string") return endpoint;
|
|
1797
1797
|
if (Object.hasOwn(edgeKinds, endpoint)) return endpoint;
|
|
1798
|
-
if (
|
|
1799
|
-
throw new
|
|
1798
|
+
if (chunkGYEG3ZLZ_cjs.isExternalIri(endpoint)) return endpoint;
|
|
1799
|
+
throw new chunkGYEG3ZLZ_cjs.GraphExtensionUnresolvedOntologyEndpointError(
|
|
1800
1800
|
metaEdge,
|
|
1801
1801
|
endpoint,
|
|
1802
1802
|
graphId
|
|
@@ -1819,10 +1819,10 @@ function planRemovals(graph, names) {
|
|
|
1819
1819
|
);
|
|
1820
1820
|
for (const name of namesSet) {
|
|
1821
1821
|
if (compileTimeNodeNames.has(name)) {
|
|
1822
|
-
throw new
|
|
1822
|
+
throw new chunkGYEG3ZLZ_cjs.RemoveCompileTimeKindError(name, "node", graph.id);
|
|
1823
1823
|
}
|
|
1824
1824
|
if (compileTimeEdgeNames.has(name)) {
|
|
1825
|
-
throw new
|
|
1825
|
+
throw new chunkGYEG3ZLZ_cjs.RemoveCompileTimeKindError(name, "edge", graph.id);
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
1828
|
const removedNodeKinds = [...namesSet].filter(
|
|
@@ -1838,7 +1838,7 @@ function planRemovals(graph, names) {
|
|
|
1838
1838
|
for (const kindName of removedNodeKinds) {
|
|
1839
1839
|
const referents = referentsByKind.get(kindName);
|
|
1840
1840
|
if (referents !== void 0 && referents.length > 0) {
|
|
1841
|
-
throw new
|
|
1841
|
+
throw new chunkGYEG3ZLZ_cjs.KindHasReferentsError(kindName, referents, graph.id);
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
1844
|
if (document === void 0) {
|
|
@@ -1971,8 +1971,8 @@ function buildCompileTimeReferentIndex(graph, runtimeEdgeNames) {
|
|
|
1971
1971
|
);
|
|
1972
1972
|
for (const relation of graph.ontology) {
|
|
1973
1973
|
if (runtimeOntologyKeys.has(compileTimeOntologyKey(relation))) continue;
|
|
1974
|
-
const fromName =
|
|
1975
|
-
const toName =
|
|
1974
|
+
const fromName = chunk26YKDNUD_cjs.getTypeName(relation.from);
|
|
1975
|
+
const toName = chunk26YKDNUD_cjs.getTypeName(relation.to);
|
|
1976
1976
|
const referent = {
|
|
1977
1977
|
type: "compile-time-ontology",
|
|
1978
1978
|
name: `${relation.metaEdge.name}(${fromName}, ${toName})`
|
|
@@ -2012,7 +2012,7 @@ async function ensureIdentitySchemaStorage(backend, schema, options) {
|
|
|
2012
2012
|
const separationMissing = missingTables.includes(
|
|
2013
2013
|
IDENTITY_SEPARATION_RELATION
|
|
2014
2014
|
);
|
|
2015
|
-
const rebuildRequired = await
|
|
2015
|
+
const rebuildRequired = await chunkMX4DHSQP_cjs.separationRebuildRequired(
|
|
2016
2016
|
backend,
|
|
2017
2017
|
schema,
|
|
2018
2018
|
options.graphId,
|
|
@@ -2083,7 +2083,7 @@ function markIdentityDdlRace(error) {
|
|
|
2083
2083
|
return error;
|
|
2084
2084
|
}
|
|
2085
2085
|
function isIdentityDdlRace(error) {
|
|
2086
|
-
for (const link of
|
|
2086
|
+
for (const link of chunkJR6SX5RH_cjs.errorChain(error)) {
|
|
2087
2087
|
if (typeof link === "object" && link !== null && IDENTITY_DDL_RACES.has(link)) {
|
|
2088
2088
|
return true;
|
|
2089
2089
|
}
|
|
@@ -2095,7 +2095,7 @@ async function executeIdentityDdl(execute, statements) {
|
|
|
2095
2095
|
try {
|
|
2096
2096
|
await execute(statement);
|
|
2097
2097
|
} catch (error) {
|
|
2098
|
-
if (
|
|
2098
|
+
if (chunkJR6SX5RH_cjs.isPostgresConcurrentDdlRaceError(error)) {
|
|
2099
2099
|
throw markIdentityDdlRace(error);
|
|
2100
2100
|
}
|
|
2101
2101
|
throw error;
|
|
@@ -2113,14 +2113,14 @@ async function withIdentityDdlRaceRetry(attempt) {
|
|
|
2113
2113
|
async function lockIdentityDdl(target) {
|
|
2114
2114
|
if (target.dialect !== "postgres") return;
|
|
2115
2115
|
await target.execute(
|
|
2116
|
-
|
|
2116
|
+
chunkEDN4Y4ZG_cjs.asCompiledRowsSql(chunkEDN4Y4ZG_cjs.sql`
|
|
2117
2117
|
SELECT pg_advisory_xact_lock(hashtext(${IDENTITY_DDL_LOCK_KEY}), 0)
|
|
2118
2118
|
`)
|
|
2119
2119
|
);
|
|
2120
2120
|
}
|
|
2121
2121
|
var IDENTITY_DDL_LOCK_KEY = "typegraph:identity-ddl";
|
|
2122
2122
|
function identityDerivedUpgradeUnsupportedError(graphId, missingPorts) {
|
|
2123
|
-
return new
|
|
2123
|
+
return new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2124
2124
|
"This backend cannot publish an Operational Identity derived-relation upgrade atomically.",
|
|
2125
2125
|
{
|
|
2126
2126
|
code: "IDENTITY_UPGRADE_REQUIRES_ATOMIC_DDL",
|
|
@@ -2141,11 +2141,11 @@ async function identityKindCascadeNeeded(backend, schema, graphId, droppedNodeKi
|
|
|
2141
2141
|
provisionMissing: false
|
|
2142
2142
|
});
|
|
2143
2143
|
if (missingTables.length > 0) return false;
|
|
2144
|
-
return
|
|
2144
|
+
return chunkMX4DHSQP_cjs.hasAssertionsTouchingKinds(backend, schema, graphId, droppedNodeKinds);
|
|
2145
2145
|
}
|
|
2146
2146
|
function assertIdentityStoragePresent(graphId, missingTables) {
|
|
2147
2147
|
if (missingTables.length === 0) return;
|
|
2148
|
-
throw new
|
|
2148
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2149
2149
|
"Operational Identity storage was missing from an already enabled graph.",
|
|
2150
2150
|
{
|
|
2151
2151
|
code: "IDENTITY_STORAGE_MISSING",
|
|
@@ -2164,13 +2164,13 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2164
2164
|
ctx.graphId,
|
|
2165
2165
|
options.provisionDerivedRelations ?? []
|
|
2166
2166
|
);
|
|
2167
|
-
await
|
|
2168
|
-
await
|
|
2167
|
+
await chunkOIFSOPSR_cjs.lockRecordedGraphWrite(target, ctx.graphId);
|
|
2168
|
+
await chunkMX4DHSQP_cjs.lockIdentityGraph(target, ctx.graphId);
|
|
2169
2169
|
if (options.enablement) {
|
|
2170
|
-
await
|
|
2171
|
-
await
|
|
2170
|
+
await chunkMX4DHSQP_cjs.lockIdentityEnablementNodes(target, ctx.schema);
|
|
2171
|
+
await chunkOIFSOPSR_cjs.withRecordedIdentityMutationTarget(
|
|
2172
2172
|
target,
|
|
2173
|
-
(rawTarget, touch) =>
|
|
2173
|
+
(rawTarget, touch) => chunkMX4DHSQP_cjs.purgeAssertionsWithUnregisteredKinds(
|
|
2174
2174
|
rawTarget,
|
|
2175
2175
|
ctx.schema,
|
|
2176
2176
|
ctx.graphId,
|
|
@@ -2181,9 +2181,9 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
const droppedNodeKinds = options.droppedNodeKinds ?? [];
|
|
2183
2183
|
if (droppedNodeKinds.length > 0) {
|
|
2184
|
-
await
|
|
2184
|
+
await chunkOIFSOPSR_cjs.withRecordedIdentityMutationTarget(
|
|
2185
2185
|
target,
|
|
2186
|
-
(rawTarget, touch) =>
|
|
2186
|
+
(rawTarget, touch) => chunkMX4DHSQP_cjs.deleteAssertionsTouchingKinds(
|
|
2187
2187
|
rawTarget,
|
|
2188
2188
|
ctx.schema,
|
|
2189
2189
|
ctx.graphId,
|
|
@@ -2192,7 +2192,7 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2192
2192
|
)
|
|
2193
2193
|
);
|
|
2194
2194
|
}
|
|
2195
|
-
await
|
|
2195
|
+
await chunkMX4DHSQP_cjs.rebuildIdentityClosureForContext({ ...ctx, backend: target });
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
2198
|
async function provisionDerivedRelationsInCommit(target, graphId, ddl) {
|
|
@@ -2206,11 +2206,11 @@ async function provisionDerivedRelationsInCommit(target, graphId, ddl) {
|
|
|
2206
2206
|
}
|
|
2207
2207
|
function identityKindCascadePreflight(ctx, droppedNodeKinds) {
|
|
2208
2208
|
return async (target) => {
|
|
2209
|
-
await
|
|
2210
|
-
await
|
|
2211
|
-
await
|
|
2209
|
+
await chunkOIFSOPSR_cjs.lockRecordedGraphWrite(target, ctx.graphId);
|
|
2210
|
+
await chunkMX4DHSQP_cjs.lockIdentityGraph(target, ctx.graphId);
|
|
2211
|
+
await chunkOIFSOPSR_cjs.withRecordedIdentityMutationTarget(
|
|
2212
2212
|
target,
|
|
2213
|
-
(rawTarget, touch) =>
|
|
2213
|
+
(rawTarget, touch) => chunkMX4DHSQP_cjs.deleteAssertionsTouchingKinds(
|
|
2214
2214
|
rawTarget,
|
|
2215
2215
|
ctx.schema,
|
|
2216
2216
|
ctx.graphId,
|
|
@@ -2254,7 +2254,7 @@ function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, implied
|
|
|
2254
2254
|
(kind) => !registry.isAssignableToAny(kind, impliedKinds)
|
|
2255
2255
|
);
|
|
2256
2256
|
if (incompatibleKinds.length === 0) return;
|
|
2257
|
-
throw new
|
|
2257
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2258
2258
|
`implies("${implyingEdgeKind}", "${impliedEdgeKind}") is endpoint-incompatible: ${side} kind(s) [${incompatibleKinds.join(", ")}] declared on "${implyingEdgeKind}" cannot be assigned to any of "${impliedEdgeKind}"'s ${side} kind(s) [${impliedKinds.join(", ")}].`,
|
|
2259
2259
|
{
|
|
2260
2260
|
metaEdge: chunkXUO3KQFO_cjs.META_EDGE_IMPLIES,
|
|
@@ -2321,7 +2321,7 @@ function assertInverseSideCompatible(sourceEdge, sourceSide, sourceKinds, invers
|
|
|
2321
2321
|
(kind) => !registry.isAssignableToAny(kind, inverseKinds)
|
|
2322
2322
|
);
|
|
2323
2323
|
if (incompatibleKinds.length === 0) return;
|
|
2324
|
-
throw new
|
|
2324
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2325
2325
|
`inverseOf("${sourceEdge}", "${inverseEdge}") is endpoint-incompatible: ${sourceSide} kind(s) [${incompatibleKinds.join(", ")}] declared on "${sourceEdge}" cannot be assigned to any of "${inverseEdge}"'s ${inverseSide} kind(s) [${inverseKinds.join(", ")}].`,
|
|
2326
2326
|
{
|
|
2327
2327
|
metaEdge: chunkXUO3KQFO_cjs.META_EDGE_INVERSE_OF,
|
|
@@ -2341,19 +2341,19 @@ function assertInverseSideCompatible(sourceEdge, sourceSide, sourceKinds, invers
|
|
|
2341
2341
|
// src/registry/build-validated.ts
|
|
2342
2342
|
function buildValidatedKindRegistry(input) {
|
|
2343
2343
|
if (input.ontology.length === 0) {
|
|
2344
|
-
const registry2 = new
|
|
2344
|
+
const registry2 = new chunkGYEG3ZLZ_cjs.KindRegistry(
|
|
2345
2345
|
input.nodeKinds,
|
|
2346
2346
|
input.edgeKinds,
|
|
2347
|
-
|
|
2347
|
+
chunkGYEG3ZLZ_cjs.createEmptyClosures(),
|
|
2348
2348
|
input.identity
|
|
2349
2349
|
);
|
|
2350
2350
|
validateImpliesEndpointCompatibility(input.edgeEndpoints, registry2);
|
|
2351
2351
|
return registry2;
|
|
2352
2352
|
}
|
|
2353
|
-
const issues =
|
|
2353
|
+
const issues = chunkGYEG3ZLZ_cjs.validateOntologyRelations(input.ontology);
|
|
2354
2354
|
if (issues.length > 0) {
|
|
2355
2355
|
const firstIssue = chunkN66HCGCY_cjs.requireDefined(issues[0]);
|
|
2356
|
-
throw new
|
|
2356
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2357
2357
|
`Ontology is incoherent: ${firstIssue.message}`,
|
|
2358
2358
|
{
|
|
2359
2359
|
code: firstIssue.code,
|
|
@@ -2364,8 +2364,8 @@ function buildValidatedKindRegistry(input) {
|
|
|
2364
2364
|
}
|
|
2365
2365
|
);
|
|
2366
2366
|
}
|
|
2367
|
-
const closures =
|
|
2368
|
-
const registry = new
|
|
2367
|
+
const closures = chunkGYEG3ZLZ_cjs.computeClosuresFromNamedOntology(input.ontology);
|
|
2368
|
+
const registry = new chunkGYEG3ZLZ_cjs.KindRegistry(
|
|
2369
2369
|
input.nodeKinds,
|
|
2370
2370
|
input.edgeKinds,
|
|
2371
2371
|
closures,
|
|
@@ -2409,7 +2409,7 @@ function buildEdgeEndpointKinds(edges) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
function extractNodeTypes(graph) {
|
|
2411
2411
|
const result = /* @__PURE__ */ new Map();
|
|
2412
|
-
for (const typeName of
|
|
2412
|
+
for (const typeName of chunkBFUOME67_cjs.getNodeKinds(graph)) {
|
|
2413
2413
|
const registration = graph.nodes[typeName];
|
|
2414
2414
|
result.set(typeName, registration.type);
|
|
2415
2415
|
}
|
|
@@ -2417,7 +2417,7 @@ function extractNodeTypes(graph) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
function extractEdgeTypes(graph) {
|
|
2419
2419
|
const result = /* @__PURE__ */ new Map();
|
|
2420
|
-
for (const typeName of
|
|
2420
|
+
for (const typeName of chunkBFUOME67_cjs.getEdgeKinds(graph)) {
|
|
2421
2421
|
const registration = graph.edges[typeName];
|
|
2422
2422
|
result.set(typeName, registration.type);
|
|
2423
2423
|
}
|
|
@@ -2766,7 +2766,7 @@ function parseSerializedSchema(json) {
|
|
|
2766
2766
|
try {
|
|
2767
2767
|
parsed = JSON.parse(json);
|
|
2768
2768
|
} catch {
|
|
2769
|
-
throw new
|
|
2769
|
+
throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
|
|
2770
2770
|
"Stored schema document is not valid JSON",
|
|
2771
2771
|
{ operation: "select", entity: "schema" }
|
|
2772
2772
|
);
|
|
@@ -2774,7 +2774,7 @@ function parseSerializedSchema(json) {
|
|
|
2774
2774
|
const result = serializedSchemaZod.safeParse(parsed);
|
|
2775
2775
|
if (!result.success) {
|
|
2776
2776
|
const issues = result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
|
|
2777
|
-
throw new
|
|
2777
|
+
throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
|
|
2778
2778
|
`Stored schema document is malformed: ${issues}`,
|
|
2779
2779
|
{ operation: "select", entity: "schema" }
|
|
2780
2780
|
);
|
|
@@ -2791,7 +2791,7 @@ async function loadActiveSchemaWithBootstrap(backend, graphId) {
|
|
|
2791
2791
|
try {
|
|
2792
2792
|
return await backend.getActiveSchema(graphId);
|
|
2793
2793
|
} catch (error) {
|
|
2794
|
-
if (backend.bootstrapTables &&
|
|
2794
|
+
if (backend.bootstrapTables && chunkJR6SX5RH_cjs.isMissingTableError(error)) {
|
|
2795
2795
|
await backend.bootstrapTables();
|
|
2796
2796
|
return await backend.getActiveSchema(graphId);
|
|
2797
2797
|
}
|
|
@@ -2896,7 +2896,7 @@ async function ensureSchema(backend, graph, options) {
|
|
|
2896
2896
|
const removesKind = [...diff.nodes, ...diff.edges].some(
|
|
2897
2897
|
(change) => change.type === "removed"
|
|
2898
2898
|
);
|
|
2899
|
-
throw new
|
|
2899
|
+
throw new chunkMRDBBHIZ_cjs.MigrationError(
|
|
2900
2900
|
`Schema migration required: ${diff.summary}. ${actions.length} migration action(s) needed. Use getSchemaChanges() to review, then migrateSchema() to apply.` + (removesKind ? ` This diff removes a kind: migrateSchema() refuses to drop one that still holds rows, so export or delete those rows first and retry.` : ""),
|
|
2901
2901
|
{
|
|
2902
2902
|
graphId: graph.id,
|
|
@@ -2949,7 +2949,7 @@ async function assertVectorContributionsInitialized(backend, graph) {
|
|
|
2949
2949
|
function schemaBehindError(graphId, fromVersion, diff) {
|
|
2950
2950
|
const actions = getMigrationActions(diff);
|
|
2951
2951
|
const qualifier = isBackwardsCompatible(diff) ? "safe auto-migration" : "breaking change";
|
|
2952
|
-
return new
|
|
2952
|
+
return new chunkMRDBBHIZ_cjs.MigrationError(
|
|
2953
2953
|
`Schema verification failed for graph "${graphId}": ${diff.summary} (${qualifier}). ${actions.length} migration action(s) needed. The least-privilege runtime cannot migrate \u2014 run createStoreWithSchema(graph, adminBackend) under a privileged role (after any generated migration SQL, if you manage DDL externally) before attaching with createStore() / createVerifiedStore().`,
|
|
2954
2954
|
{
|
|
2955
2955
|
graphId,
|
|
@@ -2969,7 +2969,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2969
2969
|
try {
|
|
2970
2970
|
activeRow = await backend.getActiveSchema(graphId);
|
|
2971
2971
|
} catch (error) {
|
|
2972
|
-
if (
|
|
2972
|
+
if (chunkJR6SX5RH_cjs.isMissingTableError(error)) {
|
|
2973
2973
|
throw schemaNotInitializedError(graphId, error);
|
|
2974
2974
|
}
|
|
2975
2975
|
throw error;
|
|
@@ -2980,7 +2980,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2980
2980
|
return activeRow;
|
|
2981
2981
|
}
|
|
2982
2982
|
function schemaNotInitializedError(graphId, cause) {
|
|
2983
|
-
return new
|
|
2983
|
+
return new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2984
2984
|
`Cannot verify graph "${graphId}": no schema has been initialized. Run createStoreWithSchema(graph, adminBackend) once under a privileged role (which commits the schema_versions row and materializes contribution markers) before attaching with createStore() / createVerifiedStore(). Generated migration SQL creates the tables but does not initialize the schema row.`,
|
|
2985
2985
|
{ graphId },
|
|
2986
2986
|
{
|
|
@@ -2992,7 +2992,7 @@ function schemaNotInitializedError(graphId, cause) {
|
|
|
2992
2992
|
function requireCommitWithPreflight(backend, graph) {
|
|
2993
2993
|
const commitWithPreflight = backend.commitSchemaVersionWithPreflight;
|
|
2994
2994
|
if (commitWithPreflight === void 0) {
|
|
2995
|
-
throw new
|
|
2995
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
2996
2996
|
"This backend cannot atomically commit identity data with a schema transition.",
|
|
2997
2997
|
{
|
|
2998
2998
|
code: "IDENTITY_REQUIRES_ATOMIC_BACKEND",
|
|
@@ -3030,15 +3030,15 @@ async function migrateSchema(backend, graph, currentVersion, options) {
|
|
|
3030
3030
|
activeRow
|
|
3031
3031
|
} = await loadAndMergeGraphExtensionDocument(backend, graph);
|
|
3032
3032
|
if (activeRow !== void 0 && activeRow.version !== currentVersion) {
|
|
3033
|
-
throw new
|
|
3033
|
+
throw new chunkMRDBBHIZ_cjs.StaleVersionError({
|
|
3034
3034
|
graphId: graph.id,
|
|
3035
3035
|
expected: currentVersion,
|
|
3036
3036
|
actual: activeRow.version
|
|
3037
3037
|
});
|
|
3038
3038
|
}
|
|
3039
3039
|
const dropped = storedSchema === void 0 ? [] : [
|
|
3040
|
-
...droppedKinds(storedSchema.nodes,
|
|
3041
|
-
...droppedKinds(storedSchema.edges,
|
|
3040
|
+
...droppedKinds(storedSchema.nodes, chunkBFUOME67_cjs.getNodeKinds(target), "node"),
|
|
3041
|
+
...droppedKinds(storedSchema.edges, chunkBFUOME67_cjs.getEdgeKinds(target), "edge")
|
|
3042
3042
|
];
|
|
3043
3043
|
const guardedDrops = options?.discardDroppedKindRows === true ? [] : dropped;
|
|
3044
3044
|
const droppedNodeKinds = dropped.filter((drop) => drop.entity === "node").map((drop) => drop.kind);
|
|
@@ -3081,7 +3081,7 @@ async function migrateSchema(backend, graph, currentVersion, options) {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
async function prepareIdentityKindCascade(backend, target, options) {
|
|
3083
3083
|
if (options.droppedNodeKinds.length === 0) return void 0;
|
|
3084
|
-
const schema = options.schema === void 0 ?
|
|
3084
|
+
const schema = options.schema === void 0 ? chunk3U5ABFDW_cjs.createSqlSchema(backend.tableNames) : chunk3U5ABFDW_cjs.requireSqlSchema(options.schema, "The schema option");
|
|
3085
3085
|
if (options.probeBeforeCascade) {
|
|
3086
3086
|
const needed = await identityKindCascadeNeeded(
|
|
3087
3087
|
backend,
|
|
@@ -3097,7 +3097,7 @@ async function prepareIdentityKindCascade(backend, target, options) {
|
|
|
3097
3097
|
);
|
|
3098
3098
|
}
|
|
3099
3099
|
async function prepareIdentitySchemaCommit(backend, target, options) {
|
|
3100
|
-
const schema = options.schema === void 0 ?
|
|
3100
|
+
const schema = options.schema === void 0 ? chunk3U5ABFDW_cjs.createSqlSchema(backend.tableNames) : chunk3U5ABFDW_cjs.requireSqlSchema(options.schema, "The schema option");
|
|
3101
3101
|
const registry = buildKindRegistry(target);
|
|
3102
3102
|
const provisioning = await ensureIdentitySchemaStorage(backend, schema, {
|
|
3103
3103
|
graphId: target.id,
|
|
@@ -3142,7 +3142,7 @@ async function commitDroppedKindsOnlyWhenEmpty(backend, graph, currentVersion, d
|
|
|
3142
3142
|
}
|
|
3143
3143
|
function throwPopulatedKindRemovalError(graphId, currentVersion, populated) {
|
|
3144
3144
|
const named = populated.map((entry) => `${entry.entity} "${entry.kind}" (${String(entry.count)})`).join(", ");
|
|
3145
|
-
throw new
|
|
3145
|
+
throw new chunkMRDBBHIZ_cjs.MigrationError(
|
|
3146
3146
|
`Refusing to commit a schema for graph "${graphId}" that drops kinds still holding rows: ${named}. Committing would make those rows unreachable, and the next materializeRemovals() would delete them. Export or delete those rows, then retry. Pass { discardDroppedKindRows: true } if losing them is the intent.`,
|
|
3147
3147
|
{
|
|
3148
3148
|
graphId,
|
|
@@ -3168,7 +3168,7 @@ async function commitNewSchemaVersionIfKindsEmpty(backend, graph, currentVersion
|
|
|
3168
3168
|
const params = await buildNewSchemaVersionCommit(graph, currentVersion);
|
|
3169
3169
|
const commitIfKindsEmpty = backend.commitSchemaVersionIfKindsEmpty;
|
|
3170
3170
|
if (commitIfKindsEmpty === void 0) {
|
|
3171
|
-
throw new
|
|
3171
|
+
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
3172
3172
|
"This backend cannot atomically fence entity writes while checking schema kind emptiness.",
|
|
3173
3173
|
{
|
|
3174
3174
|
code: "SCHEMA_KIND_EMPTINESS_FENCE_UNSUPPORTED",
|
|
@@ -3202,7 +3202,7 @@ async function commitNewSchemaVersionWithPreflight(backend, graph, currentVersio
|
|
|
3202
3202
|
async function rollbackSchema(backend, graphId, targetVersion) {
|
|
3203
3203
|
const activeRow = await backend.getActiveSchema(graphId);
|
|
3204
3204
|
if (activeRow === void 0) {
|
|
3205
|
-
throw new
|
|
3205
|
+
throw new chunkMRDBBHIZ_cjs.MigrationError(
|
|
3206
3206
|
`Cannot rollback graph "${graphId}": no active schema version exists.`,
|
|
3207
3207
|
{
|
|
3208
3208
|
graphId,
|
|
@@ -3298,5 +3298,5 @@ exports.serializeSchema = serializeSchema;
|
|
|
3298
3298
|
exports.serializeSchemaProperties = serializeSchemaProperties;
|
|
3299
3299
|
exports.stripGraphExtension = stripGraphExtension;
|
|
3300
3300
|
exports.subClassOf = subClassOf;
|
|
3301
|
-
//# sourceMappingURL=chunk-
|
|
3302
|
-
//# sourceMappingURL=chunk-
|
|
3301
|
+
//# sourceMappingURL=chunk-6JVZSOHQ.cjs.map
|
|
3302
|
+
//# sourceMappingURL=chunk-6JVZSOHQ.cjs.map
|