@nicia-ai/typegraph 0.49.0 → 0.51.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 +12 -0
- package/dist/backend/drizzle/indexes.cjs +11 -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 +7 -5
- package/dist/backend/index.cjs +190 -53
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +9 -12
- package/dist/backend/postgres/index.cjs +36 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +7 -62
- 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 +7 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +21 -17
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +20 -16
- package/dist/backend/sqlite/index.cjs +33 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +24 -20
- 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 +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +9 -64
- 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 +8 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +25 -20
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +21 -16
- package/dist/chunk-2CVDZCXH.cjs +1278 -0
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-MYKHJI2J.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-MYKHJI2J.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-JB6T4GLL.cjs → chunk-2KCTP3U2.cjs} +870 -528
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-OORXGFL5.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-OORXGFL5.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/{chunk-FA2AFWLP.cjs → chunk-36SX6QXP.cjs} +31 -12
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-SDBBMD4N.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-SDBBMD4N.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/chunk-4DKY6RIU.js +1253 -0
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-WIC7DRXW.js → chunk-57JM6NW3.js} +9 -19
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/chunk-5WWEYV4H.cjs +5113 -0
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/chunk-6KQEICJ6.cjs +12 -0
- package/dist/{chunk-MKJ4KXL5.cjs.map → chunk-6KQEICJ6.cjs.map} +1 -1
- package/dist/{chunk-DZAICA5J.js → chunk-6NKSE5AU.js} +4 -4
- package/dist/{chunk-DZAICA5J.js.map → chunk-6NKSE5AU.js.map} +1 -1
- package/dist/{chunk-KKBDXCLQ.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-KKBDXCLQ.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-BFUOME67.cjs → chunk-7B7I7YAW.cjs} +20 -11
- package/dist/chunk-7B7I7YAW.cjs.map +1 -0
- package/dist/{chunk-ZDKTPBGV.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-3DMMGT6S.js → chunk-7QFRK6PU.js} +4 -8
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-CHAOFCHV.js → chunk-AH2A74OZ.js} +3 -3
- package/dist/{chunk-CHAOFCHV.js.map → chunk-AH2A74OZ.js.map} +1 -1
- package/dist/{chunk-UGHQV7MP.cjs → chunk-B3MN7EJR.cjs} +228 -162
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-TZEGUG6D.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-TZEGUG6D.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-YVF2EM7B.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-YVF2EM7B.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-JONXFAPO.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-JONXFAPO.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-FQPEMEWX.cjs → chunk-CRZ56SZU.cjs} +81 -32
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-DO7SAMEK.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-DO7SAMEK.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-QTD6HX4O.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-QTD6HX4O.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/{chunk-2QGYQBS2.cjs → chunk-DWUDZ66O.cjs} +10 -10
- package/dist/{chunk-2QGYQBS2.cjs.map → chunk-DWUDZ66O.cjs.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/chunk-FMMW3KX7.cjs +148 -0
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/{chunk-XVWOYKIK.js → chunk-FZHF5UWR.js} +3 -3
- package/dist/{chunk-XVWOYKIK.js.map → chunk-FZHF5UWR.js.map} +1 -1
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-EDN4Y4ZG.cjs → chunk-H5IJSROF.cjs} +9 -15
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/chunk-HZUB5CON.js +27 -0
- package/dist/chunk-HZUB5CON.js.map +1 -0
- package/dist/{chunk-NACVVDWB.js → chunk-I5IOSA27.js} +103 -105
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-OI2GQ25X.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-OI2GQ25X.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-7SQSZN2J.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-7SQSZN2J.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-3FPR224C.cjs → chunk-JHRUZ73O.cjs} +116 -107
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-EZEEWCFJ.cjs → chunk-JQKMEKKW.cjs} +525 -298
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-5K2BKEBD.js → chunk-K46SDNQD.js} +10 -4
- package/dist/chunk-K46SDNQD.js.map +1 -0
- package/dist/{chunk-7LZJNLA5.js → chunk-K67P5DLL.js} +108 -42
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-3G5W2U2L.cjs → chunk-KACEYDYV.cjs} +335 -258
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-JFRT7S3B.cjs → chunk-L6EVYIID.cjs} +318 -478
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-SHFBB23Q.js → chunk-LI4K2KEJ.js} +6 -4
- package/dist/chunk-LI4K2KEJ.js.map +1 -0
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-WODMN3Q2.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-WODMN3Q2.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-P6YLZTRE.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-P6YLZTRE.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-HEV35TGT.js → chunk-M3VTS3F6.js} +13 -4
- package/dist/chunk-M3VTS3F6.js.map +1 -0
- package/dist/{chunk-TQHGE7UC.cjs → chunk-M5MSP3BI.cjs} +18 -10
- package/dist/chunk-M5MSP3BI.cjs.map +1 -0
- package/dist/{chunk-D4QLTJSM.js → chunk-NBOS7BY3.js} +63 -23
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/chunk-NGQDGL5X.js +140 -0
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-SIT26LAZ.cjs → chunk-NLX5OWK7.cjs} +33 -5
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-UMGZDVOA.cjs → chunk-OGL4X4PH.cjs} +206 -208
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-LRQKXRXO.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-LRQKXRXO.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-26YKDNUD.cjs → chunk-PS3TUWJM.cjs} +12 -10
- package/dist/chunk-PS3TUWJM.cjs.map +1 -0
- package/dist/{chunk-OMZ37BM2.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-OMZ37BM2.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-UGHG7PGX.js → chunk-QG5VEOKX.js} +30 -4
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-TUNPBZY3.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-TUNPBZY3.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-BRRP76WO.js → chunk-RCBG6YMT.js} +781 -375
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-LTXQOEIC.js → chunk-RI7RJH4G.js} +281 -204
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-GYEG3ZLZ.cjs → chunk-RJMHU2MG.cjs} +121 -18
- package/dist/chunk-RJMHU2MG.cjs.map +1 -0
- package/dist/{chunk-GLHXM7C4.js → chunk-RVUL2HXY.js} +61 -23
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/chunk-RWUWTJQY.cjs +30 -0
- package/dist/chunk-RWUWTJQY.cjs.map +1 -0
- package/dist/{chunk-2O4PCIZ6.cjs → chunk-S5GU4LUN.cjs} +13 -13
- package/dist/{chunk-2O4PCIZ6.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-JPD2CTC3.js → chunk-SDPWO2Z5.js} +7 -7
- package/dist/{chunk-JPD2CTC3.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-OVI7IXYX.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-OVI7IXYX.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-ROR5ZR6A.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-ROR5ZR6A.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-AOSSQDVO.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-AOSSQDVO.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-KF6K7TGH.js → chunk-TYEYRCXL.js} +766 -433
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-Z2JCLZFJ.js → chunk-UKOVGCRN.js} +2151 -570
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-CICO5GXD.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-S5TERQVW.js → chunk-VAAC7L57.js} +284 -66
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-7UOLHNWC.cjs → chunk-VKHXYVN7.cjs} +22 -33
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/{chunk-6NGW27EO.cjs → chunk-VLBTRXA2.cjs} +10 -10
- package/dist/{chunk-6NGW27EO.cjs.map → chunk-VLBTRXA2.cjs.map} +1 -1
- package/dist/{chunk-YIURNGXI.js → chunk-VUQZNUHU.js} +22 -6
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-YYUHLYM2.cjs → chunk-WDM5WQK4.cjs} +183 -143
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-ZFMCDJGB.js → chunk-WFSYYU4W.js} +70 -220
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-SR725PWF.cjs → chunk-WRBV2FNH.cjs} +2065 -1659
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/{chunk-MRDBBHIZ.cjs → chunk-X4GDXBOP.cjs} +2 -2
- package/dist/chunk-X4GDXBOP.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-D5R42W5D.js → chunk-XZW2CTNO.js} +115 -12
- package/dist/chunk-XZW2CTNO.js.map +1 -0
- package/dist/{chunk-ZLONH2UD.js → chunk-YDEJQWOL.js} +2 -2
- package/dist/chunk-YDEJQWOL.js.map +1 -0
- package/dist/{chunk-2TYSSBU5.js → chunk-YT2IVFAI.js} +30 -21
- package/dist/chunk-YT2IVFAI.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +29 -28
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +9 -8
- package/dist/{ddl-D_oW-EVO.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-BL1NZLMY.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +21 -20
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +324 -307
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +51 -34
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +224 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +38 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +15 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +8 -6
- package/dist/{ingestion-import-target-dNeL7iAv.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-XPxZYw89.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +57 -54
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +19 -8
- package/dist/interchange/index.d.ts +19 -8
- package/dist/interchange/index.js +21 -18
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-6DDTFM32.cjs +77 -0
- package/dist/local-store-impl-6DDTFM32.cjs.map +1 -0
- package/dist/local-store-impl-OXTOVU2J.js +75 -0
- package/dist/local-store-impl-OXTOVU2J.js.map +1 -0
- package/dist/{manager-CYaff3n3.d.cts → manager-B68OrPR2.d.ts} +29 -2
- package/dist/{manager-D9eRT_ns.d.ts → manager-D_t7oK69.d.cts} +29 -2
- package/dist/pglite-store-impl-6EMZGL7K.js +73 -0
- package/dist/pglite-store-impl-6EMZGL7K.js.map +1 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs +75 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs.map +1 -0
- package/dist/{postgres-CcL4bAHS.d.ts → postgres-BPLSVyHM.d.ts} +279 -2
- package/dist/{postgres-DMj39MEu.d.cts → postgres-CqvtFC2y.d.cts} +279 -2
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +59 -44
- 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 +28 -13
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-BFNZvd_H.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-DlUSqwCg.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +48 -46
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +21 -19
- package/dist/{searchable-bpE1bBfc.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-DHJMh_nj.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-YppHrNFb.d.cts → sqlite-D1mXO9Kp.d.cts} +310 -2
- package/dist/{sqlite-D7Oz0SQh.d.ts → sqlite-MZA3oZNB.d.ts} +310 -2
- package/dist/{store-bphCSo7z.d.cts → store-CuFX7fCx.d.cts} +117 -31
- package/dist/{store-DRrFCx5x.d.ts → store-D-ZjXQpW.d.ts} +117 -31
- package/dist/{temporal-CbnLzTmM.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-5GqpYCk2.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-BqFZTQmV.d.cts → types-6yf0Vv-_.d.cts} +2016 -94
- package/dist/{types-BqFZTQmV.d.ts → types-6yf0Vv-_.d.ts} +2016 -94
- package/dist/{types-Bx74kaTt.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-CXAhpW-c.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-O-k2wgYm.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-DI_Fqz-X.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +7 -2
- package/dist/chunk-26YKDNUD.cjs.map +0 -1
- package/dist/chunk-2TYSSBU5.js.map +0 -1
- package/dist/chunk-3DMMGT6S.js.map +0 -1
- package/dist/chunk-3FPR224C.cjs.map +0 -1
- package/dist/chunk-3G5W2U2L.cjs.map +0 -1
- package/dist/chunk-3KOY4FH3.cjs +0 -934
- package/dist/chunk-3KOY4FH3.cjs.map +0 -1
- package/dist/chunk-3QNZ5SAJ.cjs +0 -3502
- package/dist/chunk-3QNZ5SAJ.cjs.map +0 -1
- package/dist/chunk-3U5ABFDW.cjs +0 -259
- package/dist/chunk-3U5ABFDW.cjs.map +0 -1
- package/dist/chunk-5K2BKEBD.js.map +0 -1
- package/dist/chunk-5PRKMB24.cjs +0 -124
- package/dist/chunk-5PRKMB24.cjs.map +0 -1
- package/dist/chunk-6LN7FIVU.js +0 -107
- package/dist/chunk-6LN7FIVU.js.map +0 -1
- package/dist/chunk-6SWPJEYN.js +0 -1126
- package/dist/chunk-6SWPJEYN.js.map +0 -1
- package/dist/chunk-7LZJNLA5.js.map +0 -1
- package/dist/chunk-7UOLHNWC.cjs.map +0 -1
- package/dist/chunk-BFUOME67.cjs.map +0 -1
- package/dist/chunk-BRRP76WO.js.map +0 -1
- package/dist/chunk-CICO5GXD.cjs +0 -12
- package/dist/chunk-D4QLTJSM.js.map +0 -1
- package/dist/chunk-D5R42W5D.js.map +0 -1
- package/dist/chunk-EDN4Y4ZG.cjs.map +0 -1
- package/dist/chunk-EZEEWCFJ.cjs.map +0 -1
- package/dist/chunk-FA2AFWLP.cjs.map +0 -1
- package/dist/chunk-FQPEMEWX.cjs.map +0 -1
- package/dist/chunk-GLHXM7C4.js.map +0 -1
- package/dist/chunk-GYEG3ZLZ.cjs.map +0 -1
- package/dist/chunk-HDL2ARHX.cjs +0 -1156
- package/dist/chunk-HDL2ARHX.cjs.map +0 -1
- package/dist/chunk-HEV35TGT.js.map +0 -1
- package/dist/chunk-I4GAZH5Z.js +0 -913
- package/dist/chunk-I4GAZH5Z.js.map +0 -1
- package/dist/chunk-JB6T4GLL.cjs.map +0 -1
- package/dist/chunk-JBQQ7THH.js +0 -20
- package/dist/chunk-JBQQ7THH.js.map +0 -1
- package/dist/chunk-JFRT7S3B.cjs.map +0 -1
- package/dist/chunk-KF6K7TGH.js.map +0 -1
- package/dist/chunk-L3LQNR34.cjs +0 -1254
- package/dist/chunk-L3LQNR34.cjs.map +0 -1
- package/dist/chunk-LTXQOEIC.js.map +0 -1
- package/dist/chunk-MKJ4KXL5.cjs +0 -12
- package/dist/chunk-MRDBBHIZ.cjs.map +0 -1
- package/dist/chunk-NACVVDWB.js.map +0 -1
- package/dist/chunk-NVY5CJFP.js +0 -244
- package/dist/chunk-NVY5CJFP.js.map +0 -1
- package/dist/chunk-PWLJ77UV.cjs +0 -23
- package/dist/chunk-PWLJ77UV.cjs.map +0 -1
- package/dist/chunk-S5TERQVW.js.map +0 -1
- package/dist/chunk-SHFBB23Q.js.map +0 -1
- package/dist/chunk-SIT26LAZ.cjs.map +0 -1
- package/dist/chunk-SR725PWF.cjs.map +0 -1
- package/dist/chunk-TQHGE7UC.cjs.map +0 -1
- package/dist/chunk-UGHG7PGX.js.map +0 -1
- package/dist/chunk-UGHQV7MP.cjs.map +0 -1
- package/dist/chunk-UMGZDVOA.cjs.map +0 -1
- package/dist/chunk-WIC7DRXW.js.map +0 -1
- package/dist/chunk-YIURNGXI.js.map +0 -1
- package/dist/chunk-YYUHLYM2.cjs.map +0 -1
- package/dist/chunk-Z2JCLZFJ.js.map +0 -1
- package/dist/chunk-ZDKTPBGV.js.map +0 -1
- package/dist/chunk-ZFMCDJGB.js.map +0 -1
- package/dist/chunk-ZLONH2UD.js.map +0 -1
- package/dist/index-COs_z6nV.d.cts +0 -1132
- package/dist/index-D7d1u2gr.d.ts +0 -1132
- package/dist/materialize-indexes-DJ3ykH59.d.ts +0 -266
- package/dist/materialize-indexes-DTtAnvfY.d.cts +0 -266
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var chunkLRQKXRXO_cjs = require('./chunk-LRQKXRXO.cjs');
|
|
3
|
+
var chunkPS3TUWJM_cjs = require('./chunk-PS3TUWJM.cjs');
|
|
4
|
+
var chunkL6EVYIID_cjs = require('./chunk-L6EVYIID.cjs');
|
|
5
|
+
var chunkJQKMEKKW_cjs = require('./chunk-JQKMEKKW.cjs');
|
|
6
|
+
var chunkNLX5OWK7_cjs = require('./chunk-NLX5OWK7.cjs');
|
|
7
|
+
var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
|
|
8
|
+
var chunk7B7I7YAW_cjs = require('./chunk-7B7I7YAW.cjs');
|
|
9
|
+
var chunkCRZ56SZU_cjs = require('./chunk-CRZ56SZU.cjs');
|
|
10
|
+
var chunkM5MSP3BI_cjs = require('./chunk-M5MSP3BI.cjs');
|
|
11
|
+
var chunkOTNTGEXR_cjs = require('./chunk-OTNTGEXR.cjs');
|
|
13
12
|
var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
|
|
14
|
-
var
|
|
13
|
+
var chunkH5IJSROF_cjs = require('./chunk-H5IJSROF.cjs');
|
|
15
14
|
var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
|
|
16
|
-
var
|
|
15
|
+
var chunkRJMHU2MG_cjs = require('./chunk-RJMHU2MG.cjs');
|
|
17
16
|
var chunkXUO3KQFO_cjs = require('./chunk-XUO3KQFO.cjs');
|
|
18
|
-
var
|
|
17
|
+
var chunkRWUWTJQY_cjs = require('./chunk-RWUWTJQY.cjs');
|
|
18
|
+
var chunkX4GDXBOP_cjs = require('./chunk-X4GDXBOP.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
|
+
[chunkPS3TUWJM_cjs.META_EDGE_BRAND]: true,
|
|
26
26
|
name,
|
|
27
27
|
properties: {
|
|
28
28
|
transitive: properties.transitive ?? false,
|
|
@@ -346,11 +346,11 @@ var SUBSCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
346
346
|
]);
|
|
347
347
|
var DEPENDENT_REQUIRED_KEYWORD = "dependentRequired";
|
|
348
348
|
function canonicalKey(value) {
|
|
349
|
-
return JSON.stringify(value,
|
|
349
|
+
return JSON.stringify(value, chunkNLX5OWK7_cjs.sortedReplacer);
|
|
350
350
|
}
|
|
351
351
|
function sortedByCanonicalForm(items) {
|
|
352
352
|
return items.toSorted(
|
|
353
|
-
(left, right) =>
|
|
353
|
+
(left, right) => chunkRWUWTJQY_cjs.compareStrings(canonicalKey(left), canonicalKey(right))
|
|
354
354
|
);
|
|
355
355
|
}
|
|
356
356
|
function orderNormalizedSchema(value) {
|
|
@@ -398,13 +398,13 @@ function normalizedSubschemaMap(value) {
|
|
|
398
398
|
return normalized;
|
|
399
399
|
}
|
|
400
400
|
function propertySchemasEqual(before, after) {
|
|
401
|
-
return
|
|
401
|
+
return chunkNLX5OWK7_cjs.canonicalEqual(
|
|
402
402
|
orderNormalizedSchema(before),
|
|
403
403
|
orderNormalizedSchema(after)
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
406
|
function endpointKindsEqual(before, after) {
|
|
407
|
-
return
|
|
407
|
+
return chunkNLX5OWK7_cjs.canonicalEqual(before?.toSorted(), after?.toSorted());
|
|
408
408
|
}
|
|
409
409
|
function diffNodeDef(name, before, after) {
|
|
410
410
|
const changes = [];
|
|
@@ -433,7 +433,7 @@ function diffNodeDef(name, before, after) {
|
|
|
433
433
|
after
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
if (!
|
|
436
|
+
if (!chunkNLX5OWK7_cjs.canonicalEqual(before.uniqueConstraints, after.uniqueConstraints)) {
|
|
437
437
|
changes.push({
|
|
438
438
|
type: "modified",
|
|
439
439
|
kind: name,
|
|
@@ -531,7 +531,7 @@ function classifyPropertyChanges(kind, before, after) {
|
|
|
531
531
|
for (const [property, beforeProperty] of Object.entries(beforeProps)) {
|
|
532
532
|
const afterProperty = afterProps[property];
|
|
533
533
|
if (afterProperty === void 0) continue;
|
|
534
|
-
if (
|
|
534
|
+
if (chunkNLX5OWK7_cjs.canonicalEqual(beforeProperty, afterProperty)) continue;
|
|
535
535
|
if (isBreakingPropertyChange(beforeProperty, afterProperty)) {
|
|
536
536
|
breakingProps.push(property);
|
|
537
537
|
}
|
|
@@ -660,7 +660,7 @@ function diffEdgeDef(name, before, after) {
|
|
|
660
660
|
function annotationsChanged(before, after) {
|
|
661
661
|
if (before === void 0 && after === void 0) return false;
|
|
662
662
|
if (before === void 0 || after === void 0) return true;
|
|
663
|
-
return !
|
|
663
|
+
return !chunkNLX5OWK7_cjs.canonicalEqual(before, after);
|
|
664
664
|
}
|
|
665
665
|
function diffOntology(before, after) {
|
|
666
666
|
const changes = [];
|
|
@@ -759,7 +759,7 @@ function diffIndexes(before, after) {
|
|
|
759
759
|
for (const [name, beforeIndex] of beforeByName) {
|
|
760
760
|
const afterIndex = afterByName.get(name);
|
|
761
761
|
if (!afterIndex) continue;
|
|
762
|
-
if (!
|
|
762
|
+
if (!chunkNLX5OWK7_cjs.canonicalEqual(beforeIndex, afterIndex)) {
|
|
763
763
|
changes.push({
|
|
764
764
|
type: "modified",
|
|
765
765
|
name,
|
|
@@ -789,7 +789,7 @@ function diffExtension(before, after) {
|
|
|
789
789
|
details: "Graph extension document was removed"
|
|
790
790
|
};
|
|
791
791
|
}
|
|
792
|
-
if (
|
|
792
|
+
if (chunkNLX5OWK7_cjs.canonicalEqual(before, after)) return void 0;
|
|
793
793
|
return {
|
|
794
794
|
type: "modified",
|
|
795
795
|
severity: "safe",
|
|
@@ -932,7 +932,7 @@ function serializeSchema(graph, version) {
|
|
|
932
932
|
return {
|
|
933
933
|
graphId: graph.id,
|
|
934
934
|
version,
|
|
935
|
-
generatedAt:
|
|
935
|
+
generatedAt: chunkM5MSP3BI_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 !== chunkRJMHU2MG_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 chunk7B7I7YAW_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 = chunkCRZ56SZU_cjs.captureWherePredicate(whereFunction);
|
|
1083
1083
|
if (predicate === void 0) {
|
|
1084
|
-
throw new
|
|
1084
|
+
throw new chunkX4GDXBOP_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 chunk7B7I7YAW_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: chunkPS3TUWJM_cjs.getTypeName(relation.from),
|
|
1169
|
+
to: chunkPS3TUWJM_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 = chunkRJMHU2MG_cjs.computeClosuresFromOntology(relations);
|
|
1190
1190
|
return {
|
|
1191
1191
|
subClassAncestors: mapToRecord(computed.subClassAncestors),
|
|
1192
1192
|
subClassDescendants: mapToRecord(computed.subClassDescendants),
|
|
@@ -1253,7 +1253,7 @@ async function computeSchemaHash(schema) {
|
|
|
1253
1253
|
...schema.extension === void 0 ? {} : { extension: schema.extension },
|
|
1254
1254
|
...schema.deprecatedKinds === void 0 ? {} : { deprecatedKinds: schema.deprecatedKinds }
|
|
1255
1255
|
};
|
|
1256
|
-
const json = JSON.stringify(hashable,
|
|
1256
|
+
const json = JSON.stringify(hashable, chunkNLX5OWK7_cjs.sortedReplacer);
|
|
1257
1257
|
return chunkZY4GXIVN_cjs.sha256Hex(json);
|
|
1258
1258
|
}
|
|
1259
1259
|
var COMPILE_NODE_CACHE = /* @__PURE__ */ new Map();
|
|
@@ -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 = chunkPS3TUWJM_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}|${chunkPS3TUWJM_cjs.getTypeName(relation.from)}|${chunkPS3TUWJM_cjs.getTypeName(relation.to)}`;
|
|
1482
1482
|
}
|
|
1483
1483
|
function buildGraphExtensionOntologyKeySet(document) {
|
|
1484
1484
|
return new Set(
|
|
@@ -1496,10 +1496,10 @@ function extensionKindNames(document) {
|
|
|
1496
1496
|
function mergeGraphExtension(graph, document) {
|
|
1497
1497
|
const existingDocument = graph.extension ?? Object.freeze({});
|
|
1498
1498
|
const unionDocument = unionDocuments(existingDocument, document);
|
|
1499
|
-
if (graph.extension !== void 0 &&
|
|
1499
|
+
if (graph.extension !== void 0 && chunkNLX5OWK7_cjs.canonicalEqual(unionDocument, existingDocument)) {
|
|
1500
1500
|
return graph;
|
|
1501
1501
|
}
|
|
1502
|
-
const validatedUnion =
|
|
1502
|
+
const validatedUnion = chunkRJMHU2MG_cjs.unwrap(chunkRJMHU2MG_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 = chunkPS3TUWJM_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 chunk7B7I7YAW_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 = chunk7B7I7YAW_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 chunkX4GDXBOP_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 chunkX4GDXBOP_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 = chunkOTNTGEXR_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 chunkX4GDXBOP_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 = chunkOTNTGEXR_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 chunkX4GDXBOP_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 chunkRJMHU2MG_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 chunkRJMHU2MG_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 (chunkRJMHU2MG_cjs.isExternalIri(endpoint)) return endpoint;
|
|
1799
|
+
throw new chunkRJMHU2MG_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 chunkRJMHU2MG_cjs.RemoveCompileTimeKindError(name, "node", graph.id);
|
|
1823
1823
|
}
|
|
1824
1824
|
if (compileTimeEdgeNames.has(name)) {
|
|
1825
|
-
throw new
|
|
1825
|
+
throw new chunkRJMHU2MG_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 chunkRJMHU2MG_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 = chunkPS3TUWJM_cjs.getTypeName(relation.from);
|
|
1975
|
+
const toName = chunkPS3TUWJM_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 chunkL6EVYIID_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 chunkNLX5OWK7_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 (chunkNLX5OWK7_cjs.isPostgresConcurrentDdlRaceError(error)) {
|
|
2099
2099
|
throw markIdentityDdlRace(error);
|
|
2100
2100
|
}
|
|
2101
2101
|
throw error;
|
|
@@ -2111,16 +2111,25 @@ async function withIdentityDdlRaceRetry(attempt) {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
2113
|
async function lockIdentityDdl(target) {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2114
|
+
const plan = chunkNUQ2YFFH_cjs.resolveWriteFencePlan(target);
|
|
2115
|
+
const fence = chunkNUQ2YFFH_cjs.requireWriteFence(plan, "identity DDL", "advisory-lock");
|
|
2116
|
+
switch (fence.kind) {
|
|
2117
|
+
case "lock": {
|
|
2118
|
+
await target.execute(
|
|
2119
|
+
chunkH5IJSROF_cjs.asCompiledRowsSql(chunkH5IJSROF_cjs.sql`
|
|
2120
|
+
SELECT pg_advisory_xact_lock(hashtext(${IDENTITY_DDL_LOCK_KEY}), 0)
|
|
2121
|
+
`)
|
|
2122
|
+
);
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
case "engine-serialized": {
|
|
2126
|
+
return;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2120
2129
|
}
|
|
2121
2130
|
var IDENTITY_DDL_LOCK_KEY = "typegraph:identity-ddl";
|
|
2122
2131
|
function identityDerivedUpgradeUnsupportedError(graphId, missingPorts) {
|
|
2123
|
-
return new
|
|
2132
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2124
2133
|
"This backend cannot publish an Operational Identity derived-relation upgrade atomically.",
|
|
2125
2134
|
{
|
|
2126
2135
|
code: "IDENTITY_UPGRADE_REQUIRES_ATOMIC_DDL",
|
|
@@ -2141,11 +2150,11 @@ async function identityKindCascadeNeeded(backend, schema, graphId, droppedNodeKi
|
|
|
2141
2150
|
provisionMissing: false
|
|
2142
2151
|
});
|
|
2143
2152
|
if (missingTables.length > 0) return false;
|
|
2144
|
-
return
|
|
2153
|
+
return chunkL6EVYIID_cjs.hasAssertionsTouchingKinds(backend, schema, graphId, droppedNodeKinds);
|
|
2145
2154
|
}
|
|
2146
2155
|
function assertIdentityStoragePresent(graphId, missingTables) {
|
|
2147
2156
|
if (missingTables.length === 0) return;
|
|
2148
|
-
throw new
|
|
2157
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2149
2158
|
"Operational Identity storage was missing from an already enabled graph.",
|
|
2150
2159
|
{
|
|
2151
2160
|
code: "IDENTITY_STORAGE_MISSING",
|
|
@@ -2164,13 +2173,13 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2164
2173
|
ctx.graphId,
|
|
2165
2174
|
options.provisionDerivedRelations ?? []
|
|
2166
2175
|
);
|
|
2167
|
-
await
|
|
2168
|
-
await
|
|
2176
|
+
await chunkJQKMEKKW_cjs.lockRecordedGraphWrite(target, ctx.graphId);
|
|
2177
|
+
await chunkL6EVYIID_cjs.lockIdentityGraph(target, ctx.graphId);
|
|
2169
2178
|
if (options.enablement) {
|
|
2170
|
-
await
|
|
2171
|
-
await
|
|
2179
|
+
await chunkL6EVYIID_cjs.lockIdentityEnablementNodes(target, ctx.schema);
|
|
2180
|
+
await chunkJQKMEKKW_cjs.withRecordedIdentityMutationTarget(
|
|
2172
2181
|
target,
|
|
2173
|
-
(rawTarget, touch) =>
|
|
2182
|
+
(rawTarget, touch) => chunkL6EVYIID_cjs.purgeAssertionsWithUnregisteredKinds(
|
|
2174
2183
|
rawTarget,
|
|
2175
2184
|
ctx.schema,
|
|
2176
2185
|
ctx.graphId,
|
|
@@ -2181,9 +2190,9 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2181
2190
|
}
|
|
2182
2191
|
const droppedNodeKinds = options.droppedNodeKinds ?? [];
|
|
2183
2192
|
if (droppedNodeKinds.length > 0) {
|
|
2184
|
-
await
|
|
2193
|
+
await chunkJQKMEKKW_cjs.withRecordedIdentityMutationTarget(
|
|
2185
2194
|
target,
|
|
2186
|
-
(rawTarget, touch) =>
|
|
2195
|
+
(rawTarget, touch) => chunkL6EVYIID_cjs.deleteAssertionsTouchingKinds(
|
|
2187
2196
|
rawTarget,
|
|
2188
2197
|
ctx.schema,
|
|
2189
2198
|
ctx.graphId,
|
|
@@ -2192,7 +2201,7 @@ function identitySchemaCommitPreflight(ctx, options) {
|
|
|
2192
2201
|
)
|
|
2193
2202
|
);
|
|
2194
2203
|
}
|
|
2195
|
-
await
|
|
2204
|
+
await chunkL6EVYIID_cjs.rebuildIdentityClosureForContext({ ...ctx, backend: target });
|
|
2196
2205
|
};
|
|
2197
2206
|
}
|
|
2198
2207
|
async function provisionDerivedRelationsInCommit(target, graphId, ddl) {
|
|
@@ -2206,11 +2215,11 @@ async function provisionDerivedRelationsInCommit(target, graphId, ddl) {
|
|
|
2206
2215
|
}
|
|
2207
2216
|
function identityKindCascadePreflight(ctx, droppedNodeKinds) {
|
|
2208
2217
|
return async (target) => {
|
|
2209
|
-
await
|
|
2210
|
-
await
|
|
2211
|
-
await
|
|
2218
|
+
await chunkJQKMEKKW_cjs.lockRecordedGraphWrite(target, ctx.graphId);
|
|
2219
|
+
await chunkL6EVYIID_cjs.lockIdentityGraph(target, ctx.graphId);
|
|
2220
|
+
await chunkJQKMEKKW_cjs.withRecordedIdentityMutationTarget(
|
|
2212
2221
|
target,
|
|
2213
|
-
(rawTarget, touch) =>
|
|
2222
|
+
(rawTarget, touch) => chunkL6EVYIID_cjs.deleteAssertionsTouchingKinds(
|
|
2214
2223
|
rawTarget,
|
|
2215
2224
|
ctx.schema,
|
|
2216
2225
|
ctx.graphId,
|
|
@@ -2254,7 +2263,7 @@ function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, implied
|
|
|
2254
2263
|
(kind) => !registry.isAssignableToAny(kind, impliedKinds)
|
|
2255
2264
|
);
|
|
2256
2265
|
if (incompatibleKinds.length === 0) return;
|
|
2257
|
-
throw new
|
|
2266
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2258
2267
|
`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
2268
|
{
|
|
2260
2269
|
metaEdge: chunkXUO3KQFO_cjs.META_EDGE_IMPLIES,
|
|
@@ -2321,7 +2330,7 @@ function assertInverseSideCompatible(sourceEdge, sourceSide, sourceKinds, invers
|
|
|
2321
2330
|
(kind) => !registry.isAssignableToAny(kind, inverseKinds)
|
|
2322
2331
|
);
|
|
2323
2332
|
if (incompatibleKinds.length === 0) return;
|
|
2324
|
-
throw new
|
|
2333
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2325
2334
|
`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
2335
|
{
|
|
2327
2336
|
metaEdge: chunkXUO3KQFO_cjs.META_EDGE_INVERSE_OF,
|
|
@@ -2341,19 +2350,19 @@ function assertInverseSideCompatible(sourceEdge, sourceSide, sourceKinds, invers
|
|
|
2341
2350
|
// src/registry/build-validated.ts
|
|
2342
2351
|
function buildValidatedKindRegistry(input) {
|
|
2343
2352
|
if (input.ontology.length === 0) {
|
|
2344
|
-
const registry2 = new
|
|
2353
|
+
const registry2 = new chunkRJMHU2MG_cjs.KindRegistry(
|
|
2345
2354
|
input.nodeKinds,
|
|
2346
2355
|
input.edgeKinds,
|
|
2347
|
-
|
|
2356
|
+
chunkRJMHU2MG_cjs.createEmptyClosures(),
|
|
2348
2357
|
input.identity
|
|
2349
2358
|
);
|
|
2350
2359
|
validateImpliesEndpointCompatibility(input.edgeEndpoints, registry2);
|
|
2351
2360
|
return registry2;
|
|
2352
2361
|
}
|
|
2353
|
-
const issues =
|
|
2362
|
+
const issues = chunkRJMHU2MG_cjs.validateOntologyRelations(input.ontology);
|
|
2354
2363
|
if (issues.length > 0) {
|
|
2355
2364
|
const firstIssue = chunkN66HCGCY_cjs.requireDefined(issues[0]);
|
|
2356
|
-
throw new
|
|
2365
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2357
2366
|
`Ontology is incoherent: ${firstIssue.message}`,
|
|
2358
2367
|
{
|
|
2359
2368
|
code: firstIssue.code,
|
|
@@ -2364,8 +2373,8 @@ function buildValidatedKindRegistry(input) {
|
|
|
2364
2373
|
}
|
|
2365
2374
|
);
|
|
2366
2375
|
}
|
|
2367
|
-
const closures =
|
|
2368
|
-
const registry = new
|
|
2376
|
+
const closures = chunkRJMHU2MG_cjs.computeClosuresFromNamedOntology(input.ontology);
|
|
2377
|
+
const registry = new chunkRJMHU2MG_cjs.KindRegistry(
|
|
2369
2378
|
input.nodeKinds,
|
|
2370
2379
|
input.edgeKinds,
|
|
2371
2380
|
closures,
|
|
@@ -2409,7 +2418,7 @@ function buildEdgeEndpointKinds(edges) {
|
|
|
2409
2418
|
}
|
|
2410
2419
|
function extractNodeTypes(graph) {
|
|
2411
2420
|
const result = /* @__PURE__ */ new Map();
|
|
2412
|
-
for (const typeName of
|
|
2421
|
+
for (const typeName of chunk7B7I7YAW_cjs.getNodeKinds(graph)) {
|
|
2413
2422
|
const registration = graph.nodes[typeName];
|
|
2414
2423
|
result.set(typeName, registration.type);
|
|
2415
2424
|
}
|
|
@@ -2417,7 +2426,7 @@ function extractNodeTypes(graph) {
|
|
|
2417
2426
|
}
|
|
2418
2427
|
function extractEdgeTypes(graph) {
|
|
2419
2428
|
const result = /* @__PURE__ */ new Map();
|
|
2420
|
-
for (const typeName of
|
|
2429
|
+
for (const typeName of chunk7B7I7YAW_cjs.getEdgeKinds(graph)) {
|
|
2421
2430
|
const registration = graph.edges[typeName];
|
|
2422
2431
|
result.set(typeName, registration.type);
|
|
2423
2432
|
}
|
|
@@ -2766,7 +2775,7 @@ function parseSerializedSchema(json) {
|
|
|
2766
2775
|
try {
|
|
2767
2776
|
parsed = JSON.parse(json);
|
|
2768
2777
|
} catch {
|
|
2769
|
-
throw new
|
|
2778
|
+
throw new chunkX4GDXBOP_cjs.DatabaseOperationError(
|
|
2770
2779
|
"Stored schema document is not valid JSON",
|
|
2771
2780
|
{ operation: "select", entity: "schema" }
|
|
2772
2781
|
);
|
|
@@ -2774,7 +2783,7 @@ function parseSerializedSchema(json) {
|
|
|
2774
2783
|
const result = serializedSchemaZod.safeParse(parsed);
|
|
2775
2784
|
if (!result.success) {
|
|
2776
2785
|
const issues = result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
|
|
2777
|
-
throw new
|
|
2786
|
+
throw new chunkX4GDXBOP_cjs.DatabaseOperationError(
|
|
2778
2787
|
`Stored schema document is malformed: ${issues}`,
|
|
2779
2788
|
{ operation: "select", entity: "schema" }
|
|
2780
2789
|
);
|
|
@@ -2791,7 +2800,7 @@ async function loadActiveSchemaWithBootstrap(backend, graphId) {
|
|
|
2791
2800
|
try {
|
|
2792
2801
|
return await backend.getActiveSchema(graphId);
|
|
2793
2802
|
} catch (error) {
|
|
2794
|
-
if (backend.bootstrapTables &&
|
|
2803
|
+
if (backend.bootstrapTables && chunkNLX5OWK7_cjs.isMissingTableError(error)) {
|
|
2795
2804
|
await backend.bootstrapTables();
|
|
2796
2805
|
return await backend.getActiveSchema(graphId);
|
|
2797
2806
|
}
|
|
@@ -2896,7 +2905,7 @@ async function ensureSchema(backend, graph, options) {
|
|
|
2896
2905
|
const removesKind = [...diff.nodes, ...diff.edges].some(
|
|
2897
2906
|
(change) => change.type === "removed"
|
|
2898
2907
|
);
|
|
2899
|
-
throw new
|
|
2908
|
+
throw new chunkX4GDXBOP_cjs.MigrationError(
|
|
2900
2909
|
`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
2910
|
{
|
|
2902
2911
|
graphId: graph.id,
|
|
@@ -2949,7 +2958,7 @@ async function assertVectorContributionsInitialized(backend, graph) {
|
|
|
2949
2958
|
function schemaBehindError(graphId, fromVersion, diff) {
|
|
2950
2959
|
const actions = getMigrationActions(diff);
|
|
2951
2960
|
const qualifier = isBackwardsCompatible(diff) ? "safe auto-migration" : "breaking change";
|
|
2952
|
-
return new
|
|
2961
|
+
return new chunkX4GDXBOP_cjs.MigrationError(
|
|
2953
2962
|
`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
2963
|
{
|
|
2955
2964
|
graphId,
|
|
@@ -2969,7 +2978,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2969
2978
|
try {
|
|
2970
2979
|
activeRow = await backend.getActiveSchema(graphId);
|
|
2971
2980
|
} catch (error) {
|
|
2972
|
-
if (
|
|
2981
|
+
if (chunkNLX5OWK7_cjs.isMissingTableError(error)) {
|
|
2973
2982
|
throw schemaNotInitializedError(graphId, error);
|
|
2974
2983
|
}
|
|
2975
2984
|
throw error;
|
|
@@ -2980,7 +2989,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2980
2989
|
return activeRow;
|
|
2981
2990
|
}
|
|
2982
2991
|
function schemaNotInitializedError(graphId, cause) {
|
|
2983
|
-
return new
|
|
2992
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2984
2993
|
`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
2994
|
{ graphId },
|
|
2986
2995
|
{
|
|
@@ -2992,7 +3001,7 @@ function schemaNotInitializedError(graphId, cause) {
|
|
|
2992
3001
|
function requireCommitWithPreflight(backend, graph) {
|
|
2993
3002
|
const commitWithPreflight = backend.commitSchemaVersionWithPreflight;
|
|
2994
3003
|
if (commitWithPreflight === void 0) {
|
|
2995
|
-
throw new
|
|
3004
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2996
3005
|
"This backend cannot atomically commit identity data with a schema transition.",
|
|
2997
3006
|
{
|
|
2998
3007
|
code: "IDENTITY_REQUIRES_ATOMIC_BACKEND",
|
|
@@ -3030,15 +3039,15 @@ async function migrateSchema(backend, graph, currentVersion, options) {
|
|
|
3030
3039
|
activeRow
|
|
3031
3040
|
} = await loadAndMergeGraphExtensionDocument(backend, graph);
|
|
3032
3041
|
if (activeRow !== void 0 && activeRow.version !== currentVersion) {
|
|
3033
|
-
throw new
|
|
3042
|
+
throw new chunkX4GDXBOP_cjs.StaleVersionError({
|
|
3034
3043
|
graphId: graph.id,
|
|
3035
3044
|
expected: currentVersion,
|
|
3036
3045
|
actual: activeRow.version
|
|
3037
3046
|
});
|
|
3038
3047
|
}
|
|
3039
3048
|
const dropped = storedSchema === void 0 ? [] : [
|
|
3040
|
-
...droppedKinds(storedSchema.nodes,
|
|
3041
|
-
...droppedKinds(storedSchema.edges,
|
|
3049
|
+
...droppedKinds(storedSchema.nodes, chunk7B7I7YAW_cjs.getNodeKinds(target), "node"),
|
|
3050
|
+
...droppedKinds(storedSchema.edges, chunk7B7I7YAW_cjs.getEdgeKinds(target), "edge")
|
|
3042
3051
|
];
|
|
3043
3052
|
const guardedDrops = options?.discardDroppedKindRows === true ? [] : dropped;
|
|
3044
3053
|
const droppedNodeKinds = dropped.filter((drop) => drop.entity === "node").map((drop) => drop.kind);
|
|
@@ -3081,7 +3090,7 @@ async function migrateSchema(backend, graph, currentVersion, options) {
|
|
|
3081
3090
|
}
|
|
3082
3091
|
async function prepareIdentityKindCascade(backend, target, options) {
|
|
3083
3092
|
if (options.droppedNodeKinds.length === 0) return void 0;
|
|
3084
|
-
const schema = options.schema === void 0 ?
|
|
3093
|
+
const schema = options.schema === void 0 ? chunkNUQ2YFFH_cjs.createSqlSchema(backend.tableNames) : chunkNUQ2YFFH_cjs.requireSqlSchema(options.schema, "The schema option");
|
|
3085
3094
|
if (options.probeBeforeCascade) {
|
|
3086
3095
|
const needed = await identityKindCascadeNeeded(
|
|
3087
3096
|
backend,
|
|
@@ -3097,7 +3106,7 @@ async function prepareIdentityKindCascade(backend, target, options) {
|
|
|
3097
3106
|
);
|
|
3098
3107
|
}
|
|
3099
3108
|
async function prepareIdentitySchemaCommit(backend, target, options) {
|
|
3100
|
-
const schema = options.schema === void 0 ?
|
|
3109
|
+
const schema = options.schema === void 0 ? chunkNUQ2YFFH_cjs.createSqlSchema(backend.tableNames) : chunkNUQ2YFFH_cjs.requireSqlSchema(options.schema, "The schema option");
|
|
3101
3110
|
const registry = buildKindRegistry(target);
|
|
3102
3111
|
const provisioning = await ensureIdentitySchemaStorage(backend, schema, {
|
|
3103
3112
|
graphId: target.id,
|
|
@@ -3142,7 +3151,7 @@ async function commitDroppedKindsOnlyWhenEmpty(backend, graph, currentVersion, d
|
|
|
3142
3151
|
}
|
|
3143
3152
|
function throwPopulatedKindRemovalError(graphId, currentVersion, populated) {
|
|
3144
3153
|
const named = populated.map((entry) => `${entry.entity} "${entry.kind}" (${String(entry.count)})`).join(", ");
|
|
3145
|
-
throw new
|
|
3154
|
+
throw new chunkX4GDXBOP_cjs.MigrationError(
|
|
3146
3155
|
`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
3156
|
{
|
|
3148
3157
|
graphId,
|
|
@@ -3168,7 +3177,7 @@ async function commitNewSchemaVersionIfKindsEmpty(backend, graph, currentVersion
|
|
|
3168
3177
|
const params = await buildNewSchemaVersionCommit(graph, currentVersion);
|
|
3169
3178
|
const commitIfKindsEmpty = backend.commitSchemaVersionIfKindsEmpty;
|
|
3170
3179
|
if (commitIfKindsEmpty === void 0) {
|
|
3171
|
-
throw new
|
|
3180
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
3172
3181
|
"This backend cannot atomically fence entity writes while checking schema kind emptiness.",
|
|
3173
3182
|
{
|
|
3174
3183
|
code: "SCHEMA_KIND_EMPTINESS_FENCE_UNSUPPORTED",
|
|
@@ -3202,7 +3211,7 @@ async function commitNewSchemaVersionWithPreflight(backend, graph, currentVersio
|
|
|
3202
3211
|
async function rollbackSchema(backend, graphId, targetVersion) {
|
|
3203
3212
|
const activeRow = await backend.getActiveSchema(graphId);
|
|
3204
3213
|
if (activeRow === void 0) {
|
|
3205
|
-
throw new
|
|
3214
|
+
throw new chunkX4GDXBOP_cjs.MigrationError(
|
|
3206
3215
|
`Cannot rollback graph "${graphId}": no active schema version exists.`,
|
|
3207
3216
|
{
|
|
3208
3217
|
graphId,
|
|
@@ -3298,5 +3307,5 @@ exports.serializeSchema = serializeSchema;
|
|
|
3298
3307
|
exports.serializeSchemaProperties = serializeSchemaProperties;
|
|
3299
3308
|
exports.stripGraphExtension = stripGraphExtension;
|
|
3300
3309
|
exports.subClassOf = subClassOf;
|
|
3301
|
-
//# sourceMappingURL=chunk-
|
|
3302
|
-
//# sourceMappingURL=chunk-
|
|
3310
|
+
//# sourceMappingURL=chunk-JHRUZ73O.cjs.map
|
|
3311
|
+
//# sourceMappingURL=chunk-JHRUZ73O.cjs.map
|