@nicia-ai/typegraph 0.50.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 +10 -8
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +6 -4
- package/dist/backend/index.cjs +183 -50
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +6 -9
- package/dist/backend/postgres/index.cjs +30 -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 +16 -14
- package/dist/backend/postgres/pglite-store.cjs +6 -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 +6 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +17 -15
- package/dist/backend/sqlite/index.cjs +27 -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 +14 -12
- package/dist/backend/sqlite/libsql.cjs +21 -19
- 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 +16 -14
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +8 -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 +7 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +22 -19
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -15
- package/dist/{chunk-TUVD4DFR.cjs → chunk-2CVDZCXH.cjs} +122 -51
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-I5C6OTKR.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-I5C6OTKR.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-C76WFIVZ.cjs → chunk-2KCTP3U2.cjs} +180 -127
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-BYBDM423.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-BYBDM423.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/chunk-36SX6QXP.cjs +186 -0
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-H3XP6BAV.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-H3XP6BAV.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/{chunk-VTJVMP4I.js → chunk-4DKY6RIU.js} +102 -31
- 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-U3Z7XKAG.js → chunk-57JM6NW3.js} +8 -18
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/{chunk-XMY2SXOH.cjs → chunk-5WWEYV4H.cjs} +2208 -579
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/{chunk-WQBAQZHR.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-WQBAQZHR.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-G2TLHH6T.cjs → chunk-7B7I7YAW.cjs} +6 -6
- package/dist/{chunk-G2TLHH6T.cjs.map → chunk-7B7I7YAW.cjs.map} +1 -1
- package/dist/{chunk-EDLKIQRI.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-46UGOVRW.js → chunk-7QFRK6PU.js} +3 -7
- 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-TYGGUWMS.cjs → chunk-B3MN7EJR.cjs} +177 -137
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-K6VKTBST.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-K6VKTBST.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-R7MRFE5P.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-R7MRFE5P.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-ZAQUKCUC.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-ZAQUKCUC.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-LLVOQOWE.cjs → chunk-CRZ56SZU.cjs} +6 -5
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-ON47CBE4.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-ON47CBE4.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-W5SOCUBL.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-W5SOCUBL.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/{chunk-7PRMDZIA.cjs → chunk-FMMW3KX7.cjs} +21 -55
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- 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-OJHD3LXJ.cjs → chunk-H5IJSROF.cjs} +2 -8
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/{chunk-U5EL6JUV.js → chunk-I5IOSA27.js} +101 -103
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-SHC7BCG5.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-SHC7BCG5.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-5PP4KRPV.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-5PP4KRPV.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-7CCMCMJO.cjs → chunk-JHRUZ73O.cjs} +75 -66
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-RDP6ZRSM.cjs → chunk-JQKMEKKW.cjs} +261 -204
- 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-JG5XIJDY.js → chunk-K67P5DLL.js} +62 -22
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-CS6JTQQ2.cjs → chunk-KACEYDYV.cjs} +94 -62
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-5OWHU7Z7.cjs → chunk-L6EVYIID.cjs} +248 -210
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-7OWE7WD6.js → chunk-LI4K2KEJ.js} +4 -4
- package/dist/{chunk-7OWE7WD6.js.map → chunk-LI4K2KEJ.js.map} +1 -1
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-45YZXI6X.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-45YZXI6X.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-ZRJTM7MT.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-ZRJTM7MT.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-DI6VC62F.js → chunk-M3VTS3F6.js} +3 -3
- package/dist/{chunk-DI6VC62F.js.map → chunk-M3VTS3F6.js.map} +1 -1
- package/dist/{chunk-MZ34E2GN.js → chunk-NBOS7BY3.js} +60 -21
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/{chunk-YA36ABIL.js → chunk-NGQDGL5X.js} +14 -48
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-ZBFZGLZE.cjs → chunk-NLX5OWK7.cjs} +6 -2
- 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-TTCOPKUL.cjs → chunk-OGL4X4PH.cjs} +182 -184
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-HY5BNOUN.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-HY5BNOUN.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-IPRP6TDL.cjs → chunk-PS3TUWJM.cjs} +7 -7
- package/dist/{chunk-IPRP6TDL.cjs.map → chunk-PS3TUWJM.cjs.map} +1 -1
- package/dist/{chunk-V76FGHY3.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-V76FGHY3.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-IRPYOHRC.js → chunk-QG5VEOKX.js} +6 -2
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-MM3JHVKZ.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-MX7EKQPM.js → chunk-RCBG6YMT.js} +345 -97
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-2CYI5HRH.js → chunk-RI7RJH4G.js} +49 -17
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-5LKOVCPP.js → chunk-RVUL2HXY.js} +6 -5
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/{chunk-WK23PGTP.cjs → chunk-S5GU4LUN.cjs} +11 -11
- package/dist/{chunk-WK23PGTP.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-S33YQEL7.js → chunk-SDPWO2Z5.js} +6 -6
- package/dist/{chunk-S33YQEL7.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-6S3PTHL4.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-6S3PTHL4.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-HSEZ7X6Y.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-HSEZ7X6Y.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-CSNOYIB4.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-CSNOYIB4.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-2GIV5X4P.js → chunk-TYEYRCXL.js} +86 -33
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-MJPZNEJZ.js → chunk-UKOVGCRN.js} +2095 -496
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-KWNWG4RC.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-FX5ZW6PN.js → chunk-VAAC7L57.js} +95 -40
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-ISKCIQF2.cjs → chunk-VKHXYVN7.cjs} +14 -25
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/chunk-VUQZNUHU.js +171 -0
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-K2XYLVVB.cjs → chunk-WDM5WQK4.cjs} +175 -136
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-GVYVGGPJ.js → chunk-WFSYYU4W.js} +66 -28
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-WCLMKNQE.cjs → chunk-WRBV2FNH.cjs} +1356 -1108
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-2Q45FAIE.js → chunk-YT2IVFAI.js} +26 -17
- 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 +20 -20
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +4 -4
- package/dist/{ddl-B49O7dB_.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-DcZG660s.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-merge/index.cjs +140 -125
- 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 +42 -27
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +144 -143
- 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 +30 -29
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +14 -12
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +7 -5
- package/dist/{ingestion-import-target-CI8OWIkM.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-DCpfM1PX.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +41 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +8 -8
- package/dist/interchange/index.d.ts +8 -8
- package/dist/interchange/index.js +16 -14
- 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-Cfg1ENj1.d.ts → manager-B68OrPR2.d.ts} +1 -2
- package/dist/{manager-D348fa6W.d.cts → manager-D_t7oK69.d.cts} +1 -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-UStOycLI.d.ts → postgres-BPLSVyHM.d.ts} +1 -1
- package/dist/{postgres-CH1kkM5J.d.cts → postgres-CqvtFC2y.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 +33 -20
- 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 +24 -11
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-aWX7VNvv.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-BtOEe2pS.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 +42 -40
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +15 -13
- package/dist/{searchable-z4BiFfHI.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-C8-RrL3l.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-axLw5Lo5.d.ts → sqlite-D1mXO9Kp.d.cts} +2 -1
- package/dist/{sqlite-Cyx9j9o6.d.cts → sqlite-MZA3oZNB.d.ts} +2 -1
- package/dist/{store-CTfQ9taw.d.ts → store-CuFX7fCx.d.cts} +38 -41
- package/dist/{store-DR9J7JVB.d.cts → store-D-ZjXQpW.d.ts} +38 -41
- package/dist/{temporal-CBOrERz5.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-B4Ky4wzh.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-CWg4dTjj.d.ts → types-6yf0Vv-_.d.cts} +1672 -1
- package/dist/{types-CWg4dTjj.d.cts → types-6yf0Vv-_.d.ts} +1672 -1
- package/dist/{types-BScHXVM7.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-BE921wRl.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-BWXUPV3C.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-CNtx1aLc.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +5 -1
- package/dist/chunk-2CYI5HRH.js.map +0 -1
- package/dist/chunk-2GIV5X4P.js.map +0 -1
- package/dist/chunk-2Q45FAIE.js.map +0 -1
- package/dist/chunk-46UGOVRW.js.map +0 -1
- package/dist/chunk-5LKOVCPP.js.map +0 -1
- package/dist/chunk-5OWHU7Z7.cjs.map +0 -1
- package/dist/chunk-6LEOAIIB.js +0 -1160
- package/dist/chunk-6LEOAIIB.js.map +0 -1
- package/dist/chunk-7CCMCMJO.cjs.map +0 -1
- package/dist/chunk-7PRMDZIA.cjs.map +0 -1
- package/dist/chunk-C76WFIVZ.cjs.map +0 -1
- package/dist/chunk-CS6JTQQ2.cjs.map +0 -1
- package/dist/chunk-EDLKIQRI.js.map +0 -1
- package/dist/chunk-EH3JZJUM.cjs +0 -567
- package/dist/chunk-EH3JZJUM.cjs.map +0 -1
- package/dist/chunk-FX5ZW6PN.js.map +0 -1
- package/dist/chunk-GHZPZNFC.cjs +0 -132
- package/dist/chunk-GHZPZNFC.cjs.map +0 -1
- package/dist/chunk-GVYVGGPJ.js.map +0 -1
- package/dist/chunk-IHK5KA2Q.cjs +0 -262
- package/dist/chunk-IHK5KA2Q.cjs.map +0 -1
- package/dist/chunk-IRPYOHRC.js.map +0 -1
- package/dist/chunk-ISKCIQF2.cjs.map +0 -1
- package/dist/chunk-JG5XIJDY.js.map +0 -1
- package/dist/chunk-K2XYLVVB.cjs.map +0 -1
- package/dist/chunk-KWNWG4RC.cjs +0 -12
- package/dist/chunk-LLVOQOWE.cjs.map +0 -1
- package/dist/chunk-MJPZNEJZ.js.map +0 -1
- package/dist/chunk-MX7EKQPM.js.map +0 -1
- package/dist/chunk-MZ34E2GN.js.map +0 -1
- package/dist/chunk-OJHD3LXJ.cjs.map +0 -1
- package/dist/chunk-PALYTHGM.js +0 -114
- package/dist/chunk-PALYTHGM.js.map +0 -1
- package/dist/chunk-RDP6ZRSM.cjs.map +0 -1
- package/dist/chunk-S3SDEQMC.js +0 -532
- package/dist/chunk-S3SDEQMC.js.map +0 -1
- package/dist/chunk-TEC24ZDA.cjs +0 -1254
- package/dist/chunk-TEC24ZDA.cjs.map +0 -1
- package/dist/chunk-TP4NJTI3.cjs +0 -1192
- package/dist/chunk-TP4NJTI3.cjs.map +0 -1
- package/dist/chunk-TTCOPKUL.cjs.map +0 -1
- package/dist/chunk-TUVD4DFR.cjs.map +0 -1
- package/dist/chunk-TYGGUWMS.cjs.map +0 -1
- package/dist/chunk-U3Z7XKAG.js.map +0 -1
- package/dist/chunk-U5EL6JUV.js.map +0 -1
- package/dist/chunk-VTJVMP4I.js.map +0 -1
- package/dist/chunk-WCLMKNQE.cjs.map +0 -1
- package/dist/chunk-XMY2SXOH.cjs.map +0 -1
- package/dist/chunk-Y55DLLEG.js +0 -247
- package/dist/chunk-Y55DLLEG.js.map +0 -1
- package/dist/chunk-YA36ABIL.js.map +0 -1
- package/dist/chunk-ZBFZGLZE.cjs.map +0 -1
- package/dist/index-B0PrmE3K.d.cts +0 -1146
- package/dist/index-CwcXsL5R.d.ts +0 -1146
- package/dist/materialize-indexes-C9GG3O3C.d.ts +0 -266
- package/dist/materialize-indexes-CrSiW_lT.d.cts +0 -266
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { c6 as SerializedNodeDef, c4 as SerializedEdgeDef, ba as IndexEntity, I as IndexDeclaration, c9 as SerializedSchema } from './types-CWg4dTjj.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Schema migration utilities.
|
|
5
|
-
*
|
|
6
|
-
* Provides diff detection between schema versions to identify
|
|
7
|
-
* what has changed and what migrations might be needed.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Types of changes that can occur in a schema.
|
|
12
|
-
*/
|
|
13
|
-
type ChangeType = "added" | "removed" | "modified" | "renamed";
|
|
14
|
-
/**
|
|
15
|
-
* Severity of a change for migration purposes.
|
|
16
|
-
*/
|
|
17
|
-
type ChangeSeverity = "safe" | "warning" | "breaking";
|
|
18
|
-
/**
|
|
19
|
-
* A change to a node definition.
|
|
20
|
-
*/
|
|
21
|
-
type NodeChange = Readonly<{
|
|
22
|
-
type: ChangeType;
|
|
23
|
-
kind: string;
|
|
24
|
-
severity: ChangeSeverity;
|
|
25
|
-
details: string;
|
|
26
|
-
before?: SerializedNodeDef | undefined;
|
|
27
|
-
after?: SerializedNodeDef | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
/**
|
|
30
|
-
* A change to an edge definition.
|
|
31
|
-
*/
|
|
32
|
-
type EdgeChange = Readonly<{
|
|
33
|
-
type: ChangeType;
|
|
34
|
-
kind: string;
|
|
35
|
-
severity: ChangeSeverity;
|
|
36
|
-
details: string;
|
|
37
|
-
before?: SerializedEdgeDef | undefined;
|
|
38
|
-
after?: SerializedEdgeDef | undefined;
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* A change to the ontology.
|
|
42
|
-
*/
|
|
43
|
-
type OntologyChange = Readonly<{
|
|
44
|
-
type: ChangeType;
|
|
45
|
-
entity: "metaEdge" | "relation";
|
|
46
|
-
name: string;
|
|
47
|
-
severity: ChangeSeverity;
|
|
48
|
-
details: string;
|
|
49
|
-
}>;
|
|
50
|
-
/** A durable graph-level Operational Identity capability change. */
|
|
51
|
-
type IdentityChange = Readonly<{
|
|
52
|
-
type: ChangeType;
|
|
53
|
-
severity: ChangeSeverity;
|
|
54
|
-
details: string;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* A change to an index declaration.
|
|
58
|
-
*
|
|
59
|
-
* Index changes are always `safe`-severity: index DDL is materialized
|
|
60
|
-
* separately and never blocks schema-version commits or migrations.
|
|
61
|
-
* Adding, removing, or modifying an index never invalidates existing
|
|
62
|
-
* data — it only changes which physical indexes the deployment will
|
|
63
|
-
* materialize on its next pass.
|
|
64
|
-
*/
|
|
65
|
-
type IndexChange = Readonly<{
|
|
66
|
-
type: ChangeType;
|
|
67
|
-
/** Index name (the diffing identity key). */
|
|
68
|
-
name: string;
|
|
69
|
-
/**
|
|
70
|
-
* Whether this index is on a node, edge, or vector field. Vector
|
|
71
|
-
* index changes flow through the same diff classification as
|
|
72
|
-
* relational ones.
|
|
73
|
-
*/
|
|
74
|
-
entity: IndexEntity;
|
|
75
|
-
severity: ChangeSeverity;
|
|
76
|
-
details: string;
|
|
77
|
-
before?: IndexDeclaration | undefined;
|
|
78
|
-
after?: IndexDeclaration | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* A change to the persisted graph-extension document.
|
|
82
|
-
*
|
|
83
|
-
* Graph-extension document changes are committed only through the
|
|
84
|
-
* graph-extension lifecycle verbs (`evolve` and `removeKinds`), so the
|
|
85
|
-
* extension-slice change itself is `safe`-severity. The detailed
|
|
86
|
-
* per-kind effect is captured in the corresponding node/edge/ontology
|
|
87
|
-
* changes the merged document produced.
|
|
88
|
-
*/
|
|
89
|
-
type ExtensionChange = Readonly<{
|
|
90
|
-
type: ChangeType;
|
|
91
|
-
severity: ChangeSeverity;
|
|
92
|
-
details: string;
|
|
93
|
-
}>;
|
|
94
|
-
/**
|
|
95
|
-
* Change to the soft-deprecated kind set. `safe`-severity by
|
|
96
|
-
* construction — deprecation is a metadata signal that doesn't gate
|
|
97
|
-
* reads, writes, or queries. The `added` and `removed` arrays carry
|
|
98
|
-
* the per-name deltas so consumers can render granular diffs.
|
|
99
|
-
*/
|
|
100
|
-
type DeprecatedKindsChange = Readonly<{
|
|
101
|
-
added: readonly string[];
|
|
102
|
-
removed: readonly string[];
|
|
103
|
-
severity: ChangeSeverity;
|
|
104
|
-
details: string;
|
|
105
|
-
}>;
|
|
106
|
-
/**
|
|
107
|
-
* A complete diff between two schema versions.
|
|
108
|
-
*/
|
|
109
|
-
type SchemaDiff = Readonly<{
|
|
110
|
-
fromVersion: number;
|
|
111
|
-
toVersion: number;
|
|
112
|
-
/** Changes to node definitions */
|
|
113
|
-
nodes: readonly NodeChange[];
|
|
114
|
-
/** Changes to edge definitions */
|
|
115
|
-
edges: readonly EdgeChange[];
|
|
116
|
-
/** Changes to ontology */
|
|
117
|
-
ontology: readonly OntologyChange[];
|
|
118
|
-
/** Change to the graph-level identity capability, if any. */
|
|
119
|
-
identity?: IdentityChange;
|
|
120
|
-
/** Changes to index declarations */
|
|
121
|
-
indexes: readonly IndexChange[];
|
|
122
|
-
/**
|
|
123
|
-
* Change to the graph-extension document, if any. `undefined` when
|
|
124
|
-
* the slice is unchanged on both sides (the common case).
|
|
125
|
-
*/
|
|
126
|
-
extension?: ExtensionChange;
|
|
127
|
-
/**
|
|
128
|
-
* Change to the soft-deprecated kind set, if any. `undefined` when
|
|
129
|
-
* the set is unchanged on both sides.
|
|
130
|
-
*/
|
|
131
|
-
deprecatedKinds?: DeprecatedKindsChange;
|
|
132
|
-
/** Whether any breaking changes exist */
|
|
133
|
-
hasBreakingChanges: boolean;
|
|
134
|
-
/** Whether the change is backwards compatible (no breaking changes) */
|
|
135
|
-
isBackwardsCompatible: boolean;
|
|
136
|
-
/** Whether any changes exist at all */
|
|
137
|
-
hasChanges: boolean;
|
|
138
|
-
/** Summary of changes */
|
|
139
|
-
summary: string;
|
|
140
|
-
}>;
|
|
141
|
-
/**
|
|
142
|
-
* Computes the diff between two schema versions.
|
|
143
|
-
*
|
|
144
|
-
* @param before - The previous schema version
|
|
145
|
-
* @param after - The new schema version
|
|
146
|
-
* @returns A diff describing all changes
|
|
147
|
-
*/
|
|
148
|
-
declare function computeSchemaDiff(before: SerializedSchema, after: SerializedSchema): SchemaDiff;
|
|
149
|
-
/**
|
|
150
|
-
* Checks if a schema change is backwards compatible.
|
|
151
|
-
*
|
|
152
|
-
* A change is backwards compatible if:
|
|
153
|
-
* - No nodes or edges were removed
|
|
154
|
-
* - No required properties were added
|
|
155
|
-
* - No existing properties were removed
|
|
156
|
-
*/
|
|
157
|
-
declare function isBackwardsCompatible(diff: SchemaDiff): boolean;
|
|
158
|
-
/**
|
|
159
|
-
* How a proposed graph relates to the committed schema.
|
|
160
|
-
*
|
|
161
|
-
* - `identical` — a semantic no-op; committing it changes nothing.
|
|
162
|
-
* - `additive` — changes exist and are all backwards compatible.
|
|
163
|
-
* - `incompatible` — at least one breaking change; needs a deliberate
|
|
164
|
-
* migration decision.
|
|
165
|
-
*/
|
|
166
|
-
type SchemaChangeClassification = "identical" | "additive" | "incompatible";
|
|
167
|
-
/**
|
|
168
|
-
* Classifies a schema diff into the three outcomes a caller actually branches
|
|
169
|
-
* on. Pure — no I/O, no DDL. Pair with `getSchemaChanges(backend, graph)` (or
|
|
170
|
-
* `store.schemaChanges()`) to pre-flight a proposal *before* touching a
|
|
171
|
-
* privileged, migration-gated path.
|
|
172
|
-
*/
|
|
173
|
-
declare function classifySchemaChanges(diff: SchemaDiff): SchemaChangeClassification;
|
|
174
|
-
/**
|
|
175
|
-
* Gets a list of actions needed for migration.
|
|
176
|
-
*/
|
|
177
|
-
declare function getMigrationActions(diff: SchemaDiff): readonly string[];
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Index materialization — runs declared index DDL against the live
|
|
181
|
-
* database and tracks per-deployment status in
|
|
182
|
-
* `typegraph_index_materializations`.
|
|
183
|
-
*
|
|
184
|
-
* Reads `IndexDeclaration[]` from `GraphDef.indexes`, generates DDL via
|
|
185
|
-
* `generateIndexDDL`, executes via `backend.executeDdl` (Postgres path
|
|
186
|
-
* uses `CREATE INDEX CONCURRENTLY`, which cannot run inside a
|
|
187
|
-
* transaction — `executeDdl` runs at the top-level backend, never inside
|
|
188
|
-
* `transaction(...)`), and upserts a status row per index.
|
|
189
|
-
*
|
|
190
|
-
* Caveats baked in to the algorithm:
|
|
191
|
-
*
|
|
192
|
-
* - SQL index names are physical, database-global identifiers.
|
|
193
|
-
* Cross-graph collisions (two graphs declaring the same name with
|
|
194
|
-
* different shapes) surface as a `failed` result with reason
|
|
195
|
-
* "signature drift", because the existing recorded signature won't
|
|
196
|
-
* match the new one.
|
|
197
|
-
* - On Postgres, `CREATE INDEX CONCURRENTLY IF NOT EXISTS` does NOT
|
|
198
|
-
* prove the existing physical index has the same shape as ours —
|
|
199
|
-
* only that something with that name exists. Drift detection here
|
|
200
|
-
* relies on TypeGraph's recorded signature, not on PG metadata.
|
|
201
|
-
* - Failed `CONCURRENTLY` builds leave invalid indexes behind
|
|
202
|
-
* (`pg_index.indisvalid = false`). Relational rebuilds self-heal: the
|
|
203
|
-
* claim-holding materializer drops an invalid leftover with the
|
|
204
|
-
* declaration's name before rebuilding (see dropInvalidIndexLeftover).
|
|
205
|
-
* Vector per-field index leftovers remain operator-repair.
|
|
206
|
-
* - Two materializers racing the SAME index name serialize through a
|
|
207
|
-
* durable claim in the status table (see materializeWithClaim) —
|
|
208
|
-
* concurrent same-name expression-index CIC builds deadlock on
|
|
209
|
-
* Postgres (no safe-snapshot exemption).
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
type MaterializeIndexesOptions = Readonly<{
|
|
213
|
-
/** Restrict to indexes whose `kind` is in this set. */
|
|
214
|
-
kinds?: readonly string[];
|
|
215
|
-
/** Stop on the first failure. Default: false (best-effort). */
|
|
216
|
-
stopOnError?: boolean;
|
|
217
|
-
/**
|
|
218
|
-
* Refresh planner statistics (ANALYZE) after at least one index was
|
|
219
|
-
* created. A fresh index can be ignored by the planner until statistics
|
|
220
|
-
* exist. Default: true. Applied on non-concurrent builders (SQLite) and
|
|
221
|
-
* on concurrent builders that serialize same-index builds via the
|
|
222
|
-
* cross-caller claim primitive (the bundled Postgres backend); a custom
|
|
223
|
-
* concurrent backend without the primitive skips the refresh — see
|
|
224
|
-
* refreshStatisticsAfterCreation — and should call
|
|
225
|
-
* `store.refreshStatistics()` after materializing.
|
|
226
|
-
*/
|
|
227
|
-
refreshStatistics?: boolean;
|
|
228
|
-
}>;
|
|
229
|
-
/**
|
|
230
|
-
* Per-index outcome from `materializeIndexes()`.
|
|
231
|
-
*
|
|
232
|
-
* Status values:
|
|
233
|
-
* - `created`: DDL ran successfully and a new physical index now exists.
|
|
234
|
-
* - `alreadyMaterialized`: status table shows a prior successful
|
|
235
|
-
* materialization with the same signature; no DDL ran.
|
|
236
|
-
* - `failed`: the DDL or status write failed; `error` carries the
|
|
237
|
-
* captured exception. Best-effort mode continues to the next index;
|
|
238
|
-
* `stopOnError: true` halts.
|
|
239
|
-
* - `skipped`: the backend can't materialize this index variant in its
|
|
240
|
-
* current configuration (e.g. vector indexes against SQLite without
|
|
241
|
-
* sqlite-vec, or `indexType: "none"` declared on an embedding). The
|
|
242
|
-
* declaration is recognized but intentionally not acted on. Status
|
|
243
|
-
* table is NOT updated for skipped entries.
|
|
244
|
-
*/
|
|
245
|
-
type MaterializeIndexesEntry = Readonly<{
|
|
246
|
-
indexName: string;
|
|
247
|
-
entity: IndexEntity;
|
|
248
|
-
kind: string;
|
|
249
|
-
status: "created" | "alreadyMaterialized" | "failed" | "skipped";
|
|
250
|
-
error?: Error;
|
|
251
|
-
/**
|
|
252
|
-
* Human-readable reason. Required for `skipped`; optional otherwise.
|
|
253
|
-
*/
|
|
254
|
-
reason?: string;
|
|
255
|
-
}>;
|
|
256
|
-
type MaterializeIndexesResult = Readonly<{
|
|
257
|
-
results: readonly MaterializeIndexesEntry[];
|
|
258
|
-
}>;
|
|
259
|
-
type MaterializeSystemIndexesOptions = Readonly<{
|
|
260
|
-
/** Stop on the first failure. Default: false (best-effort). */
|
|
261
|
-
stopOnError?: boolean;
|
|
262
|
-
/** Refresh planner statistics after a creation. Default: true. */
|
|
263
|
-
refreshStatistics?: boolean;
|
|
264
|
-
}>;
|
|
265
|
-
|
|
266
|
-
export { type ChangeSeverity as C, type DeprecatedKindsChange as D, type EdgeChange as E, type IdentityChange as I, type MaterializeIndexesResult as M, type NodeChange as N, type OntologyChange as O, type SchemaDiff as S, type ChangeType as a, type ExtensionChange as b, type IndexChange as c, type SchemaChangeClassification as d, classifySchemaChanges as e, computeSchemaDiff as f, getMigrationActions as g, type MaterializeIndexesEntry as h, isBackwardsCompatible as i, type MaterializeIndexesOptions as j, type MaterializeSystemIndexesOptions as k };
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { c6 as SerializedNodeDef, c4 as SerializedEdgeDef, ba as IndexEntity, I as IndexDeclaration, c9 as SerializedSchema } from './types-CWg4dTjj.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Schema migration utilities.
|
|
5
|
-
*
|
|
6
|
-
* Provides diff detection between schema versions to identify
|
|
7
|
-
* what has changed and what migrations might be needed.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Types of changes that can occur in a schema.
|
|
12
|
-
*/
|
|
13
|
-
type ChangeType = "added" | "removed" | "modified" | "renamed";
|
|
14
|
-
/**
|
|
15
|
-
* Severity of a change for migration purposes.
|
|
16
|
-
*/
|
|
17
|
-
type ChangeSeverity = "safe" | "warning" | "breaking";
|
|
18
|
-
/**
|
|
19
|
-
* A change to a node definition.
|
|
20
|
-
*/
|
|
21
|
-
type NodeChange = Readonly<{
|
|
22
|
-
type: ChangeType;
|
|
23
|
-
kind: string;
|
|
24
|
-
severity: ChangeSeverity;
|
|
25
|
-
details: string;
|
|
26
|
-
before?: SerializedNodeDef | undefined;
|
|
27
|
-
after?: SerializedNodeDef | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
/**
|
|
30
|
-
* A change to an edge definition.
|
|
31
|
-
*/
|
|
32
|
-
type EdgeChange = Readonly<{
|
|
33
|
-
type: ChangeType;
|
|
34
|
-
kind: string;
|
|
35
|
-
severity: ChangeSeverity;
|
|
36
|
-
details: string;
|
|
37
|
-
before?: SerializedEdgeDef | undefined;
|
|
38
|
-
after?: SerializedEdgeDef | undefined;
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* A change to the ontology.
|
|
42
|
-
*/
|
|
43
|
-
type OntologyChange = Readonly<{
|
|
44
|
-
type: ChangeType;
|
|
45
|
-
entity: "metaEdge" | "relation";
|
|
46
|
-
name: string;
|
|
47
|
-
severity: ChangeSeverity;
|
|
48
|
-
details: string;
|
|
49
|
-
}>;
|
|
50
|
-
/** A durable graph-level Operational Identity capability change. */
|
|
51
|
-
type IdentityChange = Readonly<{
|
|
52
|
-
type: ChangeType;
|
|
53
|
-
severity: ChangeSeverity;
|
|
54
|
-
details: string;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* A change to an index declaration.
|
|
58
|
-
*
|
|
59
|
-
* Index changes are always `safe`-severity: index DDL is materialized
|
|
60
|
-
* separately and never blocks schema-version commits or migrations.
|
|
61
|
-
* Adding, removing, or modifying an index never invalidates existing
|
|
62
|
-
* data — it only changes which physical indexes the deployment will
|
|
63
|
-
* materialize on its next pass.
|
|
64
|
-
*/
|
|
65
|
-
type IndexChange = Readonly<{
|
|
66
|
-
type: ChangeType;
|
|
67
|
-
/** Index name (the diffing identity key). */
|
|
68
|
-
name: string;
|
|
69
|
-
/**
|
|
70
|
-
* Whether this index is on a node, edge, or vector field. Vector
|
|
71
|
-
* index changes flow through the same diff classification as
|
|
72
|
-
* relational ones.
|
|
73
|
-
*/
|
|
74
|
-
entity: IndexEntity;
|
|
75
|
-
severity: ChangeSeverity;
|
|
76
|
-
details: string;
|
|
77
|
-
before?: IndexDeclaration | undefined;
|
|
78
|
-
after?: IndexDeclaration | undefined;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* A change to the persisted graph-extension document.
|
|
82
|
-
*
|
|
83
|
-
* Graph-extension document changes are committed only through the
|
|
84
|
-
* graph-extension lifecycle verbs (`evolve` and `removeKinds`), so the
|
|
85
|
-
* extension-slice change itself is `safe`-severity. The detailed
|
|
86
|
-
* per-kind effect is captured in the corresponding node/edge/ontology
|
|
87
|
-
* changes the merged document produced.
|
|
88
|
-
*/
|
|
89
|
-
type ExtensionChange = Readonly<{
|
|
90
|
-
type: ChangeType;
|
|
91
|
-
severity: ChangeSeverity;
|
|
92
|
-
details: string;
|
|
93
|
-
}>;
|
|
94
|
-
/**
|
|
95
|
-
* Change to the soft-deprecated kind set. `safe`-severity by
|
|
96
|
-
* construction — deprecation is a metadata signal that doesn't gate
|
|
97
|
-
* reads, writes, or queries. The `added` and `removed` arrays carry
|
|
98
|
-
* the per-name deltas so consumers can render granular diffs.
|
|
99
|
-
*/
|
|
100
|
-
type DeprecatedKindsChange = Readonly<{
|
|
101
|
-
added: readonly string[];
|
|
102
|
-
removed: readonly string[];
|
|
103
|
-
severity: ChangeSeverity;
|
|
104
|
-
details: string;
|
|
105
|
-
}>;
|
|
106
|
-
/**
|
|
107
|
-
* A complete diff between two schema versions.
|
|
108
|
-
*/
|
|
109
|
-
type SchemaDiff = Readonly<{
|
|
110
|
-
fromVersion: number;
|
|
111
|
-
toVersion: number;
|
|
112
|
-
/** Changes to node definitions */
|
|
113
|
-
nodes: readonly NodeChange[];
|
|
114
|
-
/** Changes to edge definitions */
|
|
115
|
-
edges: readonly EdgeChange[];
|
|
116
|
-
/** Changes to ontology */
|
|
117
|
-
ontology: readonly OntologyChange[];
|
|
118
|
-
/** Change to the graph-level identity capability, if any. */
|
|
119
|
-
identity?: IdentityChange;
|
|
120
|
-
/** Changes to index declarations */
|
|
121
|
-
indexes: readonly IndexChange[];
|
|
122
|
-
/**
|
|
123
|
-
* Change to the graph-extension document, if any. `undefined` when
|
|
124
|
-
* the slice is unchanged on both sides (the common case).
|
|
125
|
-
*/
|
|
126
|
-
extension?: ExtensionChange;
|
|
127
|
-
/**
|
|
128
|
-
* Change to the soft-deprecated kind set, if any. `undefined` when
|
|
129
|
-
* the set is unchanged on both sides.
|
|
130
|
-
*/
|
|
131
|
-
deprecatedKinds?: DeprecatedKindsChange;
|
|
132
|
-
/** Whether any breaking changes exist */
|
|
133
|
-
hasBreakingChanges: boolean;
|
|
134
|
-
/** Whether the change is backwards compatible (no breaking changes) */
|
|
135
|
-
isBackwardsCompatible: boolean;
|
|
136
|
-
/** Whether any changes exist at all */
|
|
137
|
-
hasChanges: boolean;
|
|
138
|
-
/** Summary of changes */
|
|
139
|
-
summary: string;
|
|
140
|
-
}>;
|
|
141
|
-
/**
|
|
142
|
-
* Computes the diff between two schema versions.
|
|
143
|
-
*
|
|
144
|
-
* @param before - The previous schema version
|
|
145
|
-
* @param after - The new schema version
|
|
146
|
-
* @returns A diff describing all changes
|
|
147
|
-
*/
|
|
148
|
-
declare function computeSchemaDiff(before: SerializedSchema, after: SerializedSchema): SchemaDiff;
|
|
149
|
-
/**
|
|
150
|
-
* Checks if a schema change is backwards compatible.
|
|
151
|
-
*
|
|
152
|
-
* A change is backwards compatible if:
|
|
153
|
-
* - No nodes or edges were removed
|
|
154
|
-
* - No required properties were added
|
|
155
|
-
* - No existing properties were removed
|
|
156
|
-
*/
|
|
157
|
-
declare function isBackwardsCompatible(diff: SchemaDiff): boolean;
|
|
158
|
-
/**
|
|
159
|
-
* How a proposed graph relates to the committed schema.
|
|
160
|
-
*
|
|
161
|
-
* - `identical` — a semantic no-op; committing it changes nothing.
|
|
162
|
-
* - `additive` — changes exist and are all backwards compatible.
|
|
163
|
-
* - `incompatible` — at least one breaking change; needs a deliberate
|
|
164
|
-
* migration decision.
|
|
165
|
-
*/
|
|
166
|
-
type SchemaChangeClassification = "identical" | "additive" | "incompatible";
|
|
167
|
-
/**
|
|
168
|
-
* Classifies a schema diff into the three outcomes a caller actually branches
|
|
169
|
-
* on. Pure — no I/O, no DDL. Pair with `getSchemaChanges(backend, graph)` (or
|
|
170
|
-
* `store.schemaChanges()`) to pre-flight a proposal *before* touching a
|
|
171
|
-
* privileged, migration-gated path.
|
|
172
|
-
*/
|
|
173
|
-
declare function classifySchemaChanges(diff: SchemaDiff): SchemaChangeClassification;
|
|
174
|
-
/**
|
|
175
|
-
* Gets a list of actions needed for migration.
|
|
176
|
-
*/
|
|
177
|
-
declare function getMigrationActions(diff: SchemaDiff): readonly string[];
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Index materialization — runs declared index DDL against the live
|
|
181
|
-
* database and tracks per-deployment status in
|
|
182
|
-
* `typegraph_index_materializations`.
|
|
183
|
-
*
|
|
184
|
-
* Reads `IndexDeclaration[]` from `GraphDef.indexes`, generates DDL via
|
|
185
|
-
* `generateIndexDDL`, executes via `backend.executeDdl` (Postgres path
|
|
186
|
-
* uses `CREATE INDEX CONCURRENTLY`, which cannot run inside a
|
|
187
|
-
* transaction — `executeDdl` runs at the top-level backend, never inside
|
|
188
|
-
* `transaction(...)`), and upserts a status row per index.
|
|
189
|
-
*
|
|
190
|
-
* Caveats baked in to the algorithm:
|
|
191
|
-
*
|
|
192
|
-
* - SQL index names are physical, database-global identifiers.
|
|
193
|
-
* Cross-graph collisions (two graphs declaring the same name with
|
|
194
|
-
* different shapes) surface as a `failed` result with reason
|
|
195
|
-
* "signature drift", because the existing recorded signature won't
|
|
196
|
-
* match the new one.
|
|
197
|
-
* - On Postgres, `CREATE INDEX CONCURRENTLY IF NOT EXISTS` does NOT
|
|
198
|
-
* prove the existing physical index has the same shape as ours —
|
|
199
|
-
* only that something with that name exists. Drift detection here
|
|
200
|
-
* relies on TypeGraph's recorded signature, not on PG metadata.
|
|
201
|
-
* - Failed `CONCURRENTLY` builds leave invalid indexes behind
|
|
202
|
-
* (`pg_index.indisvalid = false`). Relational rebuilds self-heal: the
|
|
203
|
-
* claim-holding materializer drops an invalid leftover with the
|
|
204
|
-
* declaration's name before rebuilding (see dropInvalidIndexLeftover).
|
|
205
|
-
* Vector per-field index leftovers remain operator-repair.
|
|
206
|
-
* - Two materializers racing the SAME index name serialize through a
|
|
207
|
-
* durable claim in the status table (see materializeWithClaim) —
|
|
208
|
-
* concurrent same-name expression-index CIC builds deadlock on
|
|
209
|
-
* Postgres (no safe-snapshot exemption).
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
type MaterializeIndexesOptions = Readonly<{
|
|
213
|
-
/** Restrict to indexes whose `kind` is in this set. */
|
|
214
|
-
kinds?: readonly string[];
|
|
215
|
-
/** Stop on the first failure. Default: false (best-effort). */
|
|
216
|
-
stopOnError?: boolean;
|
|
217
|
-
/**
|
|
218
|
-
* Refresh planner statistics (ANALYZE) after at least one index was
|
|
219
|
-
* created. A fresh index can be ignored by the planner until statistics
|
|
220
|
-
* exist. Default: true. Applied on non-concurrent builders (SQLite) and
|
|
221
|
-
* on concurrent builders that serialize same-index builds via the
|
|
222
|
-
* cross-caller claim primitive (the bundled Postgres backend); a custom
|
|
223
|
-
* concurrent backend without the primitive skips the refresh — see
|
|
224
|
-
* refreshStatisticsAfterCreation — and should call
|
|
225
|
-
* `store.refreshStatistics()` after materializing.
|
|
226
|
-
*/
|
|
227
|
-
refreshStatistics?: boolean;
|
|
228
|
-
}>;
|
|
229
|
-
/**
|
|
230
|
-
* Per-index outcome from `materializeIndexes()`.
|
|
231
|
-
*
|
|
232
|
-
* Status values:
|
|
233
|
-
* - `created`: DDL ran successfully and a new physical index now exists.
|
|
234
|
-
* - `alreadyMaterialized`: status table shows a prior successful
|
|
235
|
-
* materialization with the same signature; no DDL ran.
|
|
236
|
-
* - `failed`: the DDL or status write failed; `error` carries the
|
|
237
|
-
* captured exception. Best-effort mode continues to the next index;
|
|
238
|
-
* `stopOnError: true` halts.
|
|
239
|
-
* - `skipped`: the backend can't materialize this index variant in its
|
|
240
|
-
* current configuration (e.g. vector indexes against SQLite without
|
|
241
|
-
* sqlite-vec, or `indexType: "none"` declared on an embedding). The
|
|
242
|
-
* declaration is recognized but intentionally not acted on. Status
|
|
243
|
-
* table is NOT updated for skipped entries.
|
|
244
|
-
*/
|
|
245
|
-
type MaterializeIndexesEntry = Readonly<{
|
|
246
|
-
indexName: string;
|
|
247
|
-
entity: IndexEntity;
|
|
248
|
-
kind: string;
|
|
249
|
-
status: "created" | "alreadyMaterialized" | "failed" | "skipped";
|
|
250
|
-
error?: Error;
|
|
251
|
-
/**
|
|
252
|
-
* Human-readable reason. Required for `skipped`; optional otherwise.
|
|
253
|
-
*/
|
|
254
|
-
reason?: string;
|
|
255
|
-
}>;
|
|
256
|
-
type MaterializeIndexesResult = Readonly<{
|
|
257
|
-
results: readonly MaterializeIndexesEntry[];
|
|
258
|
-
}>;
|
|
259
|
-
type MaterializeSystemIndexesOptions = Readonly<{
|
|
260
|
-
/** Stop on the first failure. Default: false (best-effort). */
|
|
261
|
-
stopOnError?: boolean;
|
|
262
|
-
/** Refresh planner statistics after a creation. Default: true. */
|
|
263
|
-
refreshStatistics?: boolean;
|
|
264
|
-
}>;
|
|
265
|
-
|
|
266
|
-
export { type ChangeSeverity as C, type DeprecatedKindsChange as D, type EdgeChange as E, type IdentityChange as I, type MaterializeIndexesResult as M, type NodeChange as N, type OntologyChange as O, type SchemaDiff as S, type ChangeType as a, type ExtensionChange as b, type IndexChange as c, type SchemaChangeClassification as d, classifySchemaChanges as e, computeSchemaDiff as f, getMigrationActions as g, type MaterializeIndexesEntry as h, isBackwardsCompatible as i, type MaterializeIndexesOptions as j, type MaterializeSystemIndexesOptions as k };
|