@nicia-ai/typegraph 0.41.0 → 0.42.1
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/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -2
- package/dist/backend/drizzle/indexes.d.ts +1 -2
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +50 -50
- package/dist/backend/index.d.cts +3 -4
- package/dist/backend/index.d.ts +3 -4
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +5 -6
- package/dist/backend/postgres/index.d.ts +5 -6
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +34 -34
- package/dist/backend/postgres/pglite-store.d.cts +7 -8
- package/dist/backend/postgres/pglite-store.d.ts +7 -8
- package/dist/backend/postgres/pglite-store.js +30 -30
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +2 -3
- package/dist/backend/postgres/pglite.d.ts +2 -3
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +5 -6
- package/dist/backend/sqlite/index.d.ts +5 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +17 -17
- package/dist/backend/sqlite/libsql.d.cts +2 -3
- package/dist/backend/sqlite/libsql.d.ts +2 -3
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/local-store.cjs +35 -35
- package/dist/backend/sqlite/local-store.d.cts +7 -8
- package/dist/backend/sqlite/local-store.d.ts +7 -8
- package/dist/backend/sqlite/local-store.js +31 -31
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +2 -3
- package/dist/backend/sqlite/local.d.ts +2 -3
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-LOKG3KQV.cjs → chunk-277UZV7X.cjs} +1113 -1089
- package/dist/chunk-277UZV7X.cjs.map +1 -0
- package/dist/{chunk-2I3DNNBU.js → chunk-2G6ZEGYO.js} +4 -4
- package/dist/{chunk-2I3DNNBU.js.map → chunk-2G6ZEGYO.js.map} +1 -1
- package/dist/{chunk-76HE7DJP.js → chunk-2HKIID5K.js} +5 -5
- package/dist/{chunk-76HE7DJP.js.map → chunk-2HKIID5K.js.map} +1 -1
- package/dist/{chunk-QOHTVDHU.js → chunk-2OOY4OYT.js} +4 -4
- package/dist/{chunk-QOHTVDHU.js.map → chunk-2OOY4OYT.js.map} +1 -1
- package/dist/{chunk-UCHW2MGP.cjs → chunk-2SO5I5AI.cjs} +196 -196
- package/dist/{chunk-UCHW2MGP.cjs.map → chunk-2SO5I5AI.cjs.map} +1 -1
- package/dist/{chunk-LFFVD5ZR.cjs → chunk-33PAKPED.cjs} +41 -41
- package/dist/{chunk-LFFVD5ZR.cjs.map → chunk-33PAKPED.cjs.map} +1 -1
- package/dist/{chunk-QCKD3RCI.cjs → chunk-3RPQDGUE.cjs} +5 -5
- package/dist/{chunk-QCKD3RCI.cjs.map → chunk-3RPQDGUE.cjs.map} +1 -1
- package/dist/{chunk-PH4IJ3V5.js → chunk-3V6D5DEC.js} +3 -3
- package/dist/{chunk-PH4IJ3V5.js.map → chunk-3V6D5DEC.js.map} +1 -1
- package/dist/{chunk-Y5UC3IXF.js → chunk-42XYPKZU.js} +3 -3
- package/dist/{chunk-Y5UC3IXF.js.map → chunk-42XYPKZU.js.map} +1 -1
- package/dist/{chunk-XZA3Y4YH.js → chunk-4WYFRACU.js} +3 -3
- package/dist/{chunk-XZA3Y4YH.js.map → chunk-4WYFRACU.js.map} +1 -1
- package/dist/{chunk-AQVDAKXH.js → chunk-4XRP2N6B.js} +3 -3
- package/dist/{chunk-AQVDAKXH.js.map → chunk-4XRP2N6B.js.map} +1 -1
- package/dist/{chunk-PWXGB77L.cjs → chunk-5AERZSHC.cjs} +4 -4
- package/dist/{chunk-PWXGB77L.cjs.map → chunk-5AERZSHC.cjs.map} +1 -1
- package/dist/{chunk-K6CD6W5J.js → chunk-5C75HQYQ.js} +5 -5
- package/dist/{chunk-K6CD6W5J.js.map → chunk-5C75HQYQ.js.map} +1 -1
- package/dist/{chunk-2J5NMMVR.cjs → chunk-5GV4JQNA.cjs} +43 -43
- package/dist/{chunk-2J5NMMVR.cjs.map → chunk-5GV4JQNA.cjs.map} +1 -1
- package/dist/{chunk-KHNKYSGP.cjs → chunk-5P6IPIT6.cjs} +41 -41
- package/dist/{chunk-KHNKYSGP.cjs.map → chunk-5P6IPIT6.cjs.map} +1 -1
- package/dist/{chunk-M2RPZS7J.cjs → chunk-5Q3P6OIC.cjs} +12 -12
- package/dist/{chunk-M2RPZS7J.cjs.map → chunk-5Q3P6OIC.cjs.map} +1 -1
- package/dist/{chunk-QXKVUJLI.cjs → chunk-5ZPRE4CV.cjs} +206 -166
- package/dist/chunk-5ZPRE4CV.cjs.map +1 -0
- package/dist/{chunk-53BSOG3O.js → chunk-6NB73BXV.js} +11 -11
- package/dist/{chunk-53BSOG3O.js.map → chunk-6NB73BXV.js.map} +1 -1
- package/dist/{chunk-SE422RES.cjs → chunk-6TJ6PKPS.cjs} +27 -27
- package/dist/{chunk-SE422RES.cjs.map → chunk-6TJ6PKPS.cjs.map} +1 -1
- package/dist/{chunk-7WLEQIHA.cjs → chunk-7Y6BV3TK.cjs} +100 -100
- package/dist/{chunk-7WLEQIHA.cjs.map → chunk-7Y6BV3TK.cjs.map} +1 -1
- package/dist/{chunk-HP6LWBLB.cjs → chunk-AO2WPYFZ.cjs} +4 -4
- package/dist/{chunk-HP6LWBLB.cjs.map → chunk-AO2WPYFZ.cjs.map} +1 -1
- package/dist/{chunk-7UTUKH4E.cjs → chunk-AQR6BHB3.cjs} +10 -10
- package/dist/{chunk-7UTUKH4E.cjs.map → chunk-AQR6BHB3.cjs.map} +1 -1
- package/dist/{chunk-X4PVHAZ6.cjs → chunk-ARN3ZODS.cjs} +6 -6
- package/dist/{chunk-X4PVHAZ6.cjs.map → chunk-ARN3ZODS.cjs.map} +1 -1
- package/dist/{chunk-YYLMXERH.js → chunk-CDYRPI5U.js} +4 -4
- package/dist/{chunk-YYLMXERH.js.map → chunk-CDYRPI5U.js.map} +1 -1
- package/dist/{chunk-3LKL3S6X.js → chunk-CI5NPLXX.js} +3 -3
- package/dist/{chunk-3LKL3S6X.js.map → chunk-CI5NPLXX.js.map} +1 -1
- package/dist/{chunk-UUIBACKJ.js → chunk-CUPJL6TS.js} +3 -3
- package/dist/{chunk-UUIBACKJ.js.map → chunk-CUPJL6TS.js.map} +1 -1
- package/dist/{chunk-JZYMOHHM.cjs → chunk-CVK4T34X.cjs} +22 -22
- package/dist/{chunk-JZYMOHHM.cjs.map → chunk-CVK4T34X.cjs.map} +1 -1
- package/dist/{chunk-L3DDZUZP.js → chunk-CVNGKTHO.js} +4 -4
- package/dist/{chunk-L3DDZUZP.js.map → chunk-CVNGKTHO.js.map} +1 -1
- package/dist/{chunk-RW24SAHI.cjs → chunk-DMZEVJGL.cjs} +13 -13
- package/dist/{chunk-RW24SAHI.cjs.map → chunk-DMZEVJGL.cjs.map} +1 -1
- package/dist/{chunk-MQBF3XGY.js → chunk-DP7KC6CL.js} +47 -23
- package/dist/chunk-DP7KC6CL.js.map +1 -0
- package/dist/{chunk-QYDUCWD2.cjs → chunk-ECU53PMN.cjs} +4 -4
- package/dist/{chunk-QYDUCWD2.cjs.map → chunk-ECU53PMN.cjs.map} +1 -1
- package/dist/{chunk-SCTZRFW5.js → chunk-EQOQOT55.js} +5 -5
- package/dist/{chunk-SCTZRFW5.js.map → chunk-EQOQOT55.js.map} +1 -1
- package/dist/{chunk-JHK6NPFV.js → chunk-EVFL2ZY5.js} +9 -9
- package/dist/{chunk-JHK6NPFV.js.map → chunk-EVFL2ZY5.js.map} +1 -1
- package/dist/{chunk-SAMJLDGG.cjs → chunk-F2KVJ6FF.cjs} +112 -112
- package/dist/{chunk-SAMJLDGG.cjs.map → chunk-F2KVJ6FF.cjs.map} +1 -1
- package/dist/{chunk-NMQ6C6TS.cjs → chunk-F7TDKSVB.cjs} +4 -4
- package/dist/{chunk-NMQ6C6TS.cjs.map → chunk-F7TDKSVB.cjs.map} +1 -1
- package/dist/{chunk-HQRZEYYB.cjs → chunk-FFQGI67R.cjs} +44 -44
- package/dist/{chunk-HQRZEYYB.cjs.map → chunk-FFQGI67R.cjs.map} +1 -1
- package/dist/{chunk-YIRLBUNN.js → chunk-FMPZPOUD.js} +3 -3
- package/dist/{chunk-YIRLBUNN.js.map → chunk-FMPZPOUD.js.map} +1 -1
- package/dist/{chunk-LL5D5T5W.cjs → chunk-FSCJOTHF.cjs} +10 -10
- package/dist/{chunk-LL5D5T5W.cjs.map → chunk-FSCJOTHF.cjs.map} +1 -1
- package/dist/{chunk-2X73QTIC.cjs → chunk-FY4VY5EV.cjs} +20 -20
- package/dist/{chunk-2X73QTIC.cjs.map → chunk-FY4VY5EV.cjs.map} +1 -1
- package/dist/{chunk-3SHAUJRB.js → chunk-GT7NEXSU.js} +3 -3
- package/dist/{chunk-3SHAUJRB.js.map → chunk-GT7NEXSU.js.map} +1 -1
- package/dist/{chunk-W66YCXWT.js → chunk-HHBKGPEI.js} +11 -10
- package/dist/chunk-HHBKGPEI.js.map +1 -0
- package/dist/{chunk-CKFBZ4LV.cjs → chunk-I73ATSAH.cjs} +4 -4
- package/dist/{chunk-CKFBZ4LV.cjs.map → chunk-I73ATSAH.cjs.map} +1 -1
- package/dist/{chunk-ELA3V6UN.js → chunk-JOYPNY33.js} +9 -9
- package/dist/{chunk-ELA3V6UN.js.map → chunk-JOYPNY33.js.map} +1 -1
- package/dist/{chunk-YIX3BEBR.cjs → chunk-K2HHCWZO.cjs} +108 -108
- package/dist/{chunk-YIX3BEBR.cjs.map → chunk-K2HHCWZO.cjs.map} +1 -1
- package/dist/{chunk-SAFZ6JTI.cjs → chunk-KTBTSHU6.cjs} +19 -2
- package/dist/chunk-KTBTSHU6.cjs.map +1 -0
- package/dist/{chunk-KOI7UEI5.js → chunk-LDCWO5B6.js} +3 -3
- package/dist/{chunk-KOI7UEI5.js.map → chunk-LDCWO5B6.js.map} +1 -1
- package/dist/{chunk-I5CRUPKO.js → chunk-LQLVJWUH.js} +7 -7
- package/dist/{chunk-I5CRUPKO.js.map → chunk-LQLVJWUH.js.map} +1 -1
- package/dist/{chunk-6N7QBIWN.js → chunk-M4GYQF2H.js} +3 -3
- package/dist/{chunk-6N7QBIWN.js.map → chunk-M4GYQF2H.js.map} +1 -1
- package/dist/{chunk-ZE7E46IZ.js → chunk-NXIZL7ZZ.js} +6 -6
- package/dist/{chunk-ZE7E46IZ.js.map → chunk-NXIZL7ZZ.js.map} +1 -1
- package/dist/{chunk-XRU7V7FF.cjs → chunk-O2GZM7UK.cjs} +7 -7
- package/dist/{chunk-XRU7V7FF.cjs.map → chunk-O2GZM7UK.cjs.map} +1 -1
- package/dist/{chunk-ZE6NVENI.js → chunk-O3USVVWS.js} +3 -3
- package/dist/{chunk-ZE6NVENI.js.map → chunk-O3USVVWS.js.map} +1 -1
- package/dist/{chunk-UDS5DZNY.cjs → chunk-O7XVCLXW.cjs} +68 -67
- package/dist/chunk-O7XVCLXW.cjs.map +1 -0
- package/dist/{chunk-KLR77R5A.cjs → chunk-OM6RIOA5.cjs} +13 -13
- package/dist/{chunk-KLR77R5A.cjs.map → chunk-OM6RIOA5.cjs.map} +1 -1
- package/dist/{chunk-LLHMAHG4.cjs → chunk-OMQ2NBOR.cjs} +27 -27
- package/dist/{chunk-LLHMAHG4.cjs.map → chunk-OMQ2NBOR.cjs.map} +1 -1
- package/dist/{chunk-DPNA466P.js → chunk-OYJSYDIH.js} +19 -3
- package/dist/chunk-OYJSYDIH.js.map +1 -0
- package/dist/{chunk-V3S74J44.js → chunk-RAWG2FEU.js} +134 -22
- package/dist/chunk-RAWG2FEU.js.map +1 -0
- package/dist/{chunk-TAUGGLNQ.js → chunk-RXOAXO3R.js} +3 -3
- package/dist/{chunk-TAUGGLNQ.js.map → chunk-RXOAXO3R.js.map} +1 -1
- package/dist/{chunk-LLE25NRD.cjs → chunk-TRC646QQ.cjs} +7 -7
- package/dist/{chunk-LLE25NRD.cjs.map → chunk-TRC646QQ.cjs.map} +1 -1
- package/dist/chunk-U3YRCZ5L.cjs +12 -0
- package/dist/{chunk-IMQKXL4E.cjs.map → chunk-U3YRCZ5L.cjs.map} +1 -1
- package/dist/{chunk-ZVME6OSV.js → chunk-UJRWOV5B.js} +5 -5
- package/dist/{chunk-ZVME6OSV.js.map → chunk-UJRWOV5B.js.map} +1 -1
- package/dist/{chunk-HAQVISUF.cjs → chunk-UTTW2Q3M.cjs} +133 -133
- package/dist/{chunk-HAQVISUF.cjs.map → chunk-UTTW2Q3M.cjs.map} +1 -1
- package/dist/{chunk-L5ET7FYQ.js → chunk-UZLEQFTV.js} +3 -3
- package/dist/{chunk-L5ET7FYQ.js.map → chunk-UZLEQFTV.js.map} +1 -1
- package/dist/{chunk-JP5EICR6.cjs → chunk-V2GZBPY2.cjs} +179 -65
- package/dist/chunk-V2GZBPY2.cjs.map +1 -0
- package/dist/{chunk-BUZWMDNL.js → chunk-VC26BUNP.js} +5 -5
- package/dist/{chunk-BUZWMDNL.js.map → chunk-VC26BUNP.js.map} +1 -1
- package/dist/chunk-VGMNGWBR.cjs +12 -0
- package/dist/{chunk-5YBDB7UG.cjs.map → chunk-VGMNGWBR.cjs.map} +1 -1
- package/dist/{chunk-XMEYZYGE.js → chunk-WYQILW5V.js} +8 -8
- package/dist/{chunk-XMEYZYGE.js.map → chunk-WYQILW5V.js.map} +1 -1
- package/dist/{chunk-YX3H63VV.cjs → chunk-X2XOQZT3.cjs} +9 -9
- package/dist/{chunk-YX3H63VV.cjs.map → chunk-X2XOQZT3.cjs.map} +1 -1
- package/dist/{chunk-N2V3HJFV.cjs → chunk-XDMPDUKL.cjs} +9 -9
- package/dist/{chunk-N2V3HJFV.cjs.map → chunk-XDMPDUKL.cjs.map} +1 -1
- package/dist/{chunk-EFZ4S22A.js → chunk-YPVQYM3L.js} +107 -67
- package/dist/chunk-YPVQYM3L.js.map +1 -0
- package/dist/{chunk-5J4VNCUD.js → chunk-Z3WIL6S3.js} +5 -5
- package/dist/{chunk-5J4VNCUD.js.map → chunk-Z3WIL6S3.js.map} +1 -1
- package/dist/{chunk-MNURF4RF.cjs → chunk-ZBV4LQD2.cjs} +4 -4
- package/dist/{chunk-MNURF4RF.cjs.map → chunk-ZBV4LQD2.cjs.map} +1 -1
- package/dist/{chunk-YGX4PMG6.js → chunk-ZGOUVMVS.js} +5 -5
- package/dist/{chunk-YGX4PMG6.js.map → chunk-ZGOUVMVS.js.map} +1 -1
- package/dist/{chunk-QZYGZVUI.js → chunk-ZIRC2U6G.js} +11 -11
- package/dist/{chunk-QZYGZVUI.js.map → chunk-ZIRC2U6G.js.map} +1 -1
- package/dist/{chunk-6QP4QXBR.js → chunk-ZOHCFYXE.js} +3 -3
- package/dist/{chunk-6QP4QXBR.js.map → chunk-ZOHCFYXE.js.map} +1 -1
- package/dist/{chunk-VWEFXG73.js → chunk-ZP2KPDNN.js} +3 -3
- package/dist/{chunk-VWEFXG73.js.map → chunk-ZP2KPDNN.js.map} +1 -1
- package/dist/{chunk-NT6ILURI.cjs → chunk-ZPCKPLMX.cjs} +8 -8
- package/dist/{chunk-NT6ILURI.cjs.map → chunk-ZPCKPLMX.cjs.map} +1 -1
- package/dist/core/index.cjs +28 -28
- package/dist/core/index.d.cts +5 -6
- package/dist/core/index.d.ts +5 -6
- package/dist/core/index.js +8 -8
- package/dist/{ddl-BCXFRLWg.d.cts → ddl-3unqC-kg.d.cts} +3 -3
- package/dist/{ddl-ByLmGgn9.d.ts → ddl-Bc4Dl8fu.d.ts} +3 -3
- package/dist/{define-graph-BSviZubs.d.ts → define-graph-Byslw2OO.d.cts} +1 -2
- package/dist/{define-graph-XyJheaFm.d.cts → define-graph-DBFnc7u_.d.ts} +1 -2
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -5
- package/dist/graph-merge/index.cjs +105 -105
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +25 -25
- package/dist/{index-BD_3TCgh.d.ts → index-DHXw7QAl.d.cts} +19 -4
- package/dist/{index-BihFPsPu.d.cts → index-DQzVJBHa.d.ts} +19 -4
- package/dist/index.cjs +206 -202
- package/dist/index.d.cts +13 -15
- package/dist/index.d.ts +13 -15
- package/dist/index.js +35 -35
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -5
- package/dist/indexes/index.d.ts +4 -5
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +40 -40
- package/dist/interchange/index.d.cts +9 -10
- package/dist/interchange/index.d.ts +9 -10
- package/dist/interchange/index.js +14 -14
- package/dist/{manager-C7iC5bk_.d.ts → manager-Dl0-er1G.d.ts} +21 -156
- package/dist/{manager-Dm6MCYO7.d.cts → manager-U9_zopqr.d.cts} +21 -156
- package/dist/materialize-indexes-BM3u0aXE.d.ts +258 -0
- package/dist/materialize-indexes-DzMCetZe.d.cts +258 -0
- package/dist/{postgres-DZxwzCQ8.d.cts → postgres-C5-WMKFA.d.ts} +1 -1
- package/dist/{postgres-Cb6ceh4-.d.ts → postgres-DpJqtbSX.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -10
- package/dist/profiler/index.d.ts +9 -10
- package/dist/provenance/index.cjs +39 -39
- package/dist/provenance/index.d.cts +7 -8
- package/dist/provenance/index.d.ts +7 -8
- package/dist/provenance/index.js +9 -9
- package/dist/schema/index.cjs +48 -39
- package/dist/schema/index.d.cts +7 -8
- package/dist/schema/index.d.ts +7 -8
- package/dist/schema/index.js +15 -14
- package/dist/{searchable-aUaKh3_r.d.cts → searchable-B4mUXZT6.d.cts} +2 -2
- package/dist/{searchable-Cet4Oztt.d.ts → searchable-C7jmPNLT.d.ts} +2 -2
- package/dist/{sqlite-Cb3Ilj9_.d.ts → sqlite-Ch5tSYQY.d.ts} +1 -1
- package/dist/{sqlite-Dxklpizv.d.cts → sqlite-Da7jiYu9.d.cts} +1 -1
- package/dist/{store-view-PCT7vTKH.d.cts → store-view-6C2vTWqf.d.ts} +8 -7
- package/dist/{store-view-BDjGFjpN.d.ts → store-view-CNcOG8bQ.d.cts} +8 -7
- package/dist/{temporal-CyFsSPe8.d.ts → temporal-BtrTYTiB.d.ts} +1 -1
- package/dist/{temporal-Dn_JADWY.d.cts → temporal-CMpigMCW.d.cts} +1 -1
- package/dist/{types-CFZiEEPh.d.ts → types-D2rU5Taq.d.ts} +1 -2
- package/dist/{types-D-vOo_pM.d.ts → types-Dh-EgT-w.d.cts} +569 -2
- package/dist/{types-ho4DJJb_.d.cts → types-Dh-EgT-w.d.ts} +569 -2
- package/dist/{types-CsaG00wS.d.cts → types-G4sVM-76.d.cts} +1 -2
- package/dist/{where-DLYaXa4L.d.ts → where-B8Y21kig.d.ts} +1 -2
- package/dist/{where-udes1WRA.d.cts → where-DbZ9XDOI.d.cts} +1 -2
- package/package.json +1 -1
- package/dist/chunk-5YBDB7UG.cjs +0 -12
- package/dist/chunk-DPNA466P.js.map +0 -1
- package/dist/chunk-EFZ4S22A.js.map +0 -1
- package/dist/chunk-IMQKXL4E.cjs +0 -12
- package/dist/chunk-JP5EICR6.cjs.map +0 -1
- package/dist/chunk-LOKG3KQV.cjs.map +0 -1
- package/dist/chunk-MQBF3XGY.js.map +0 -1
- package/dist/chunk-QXKVUJLI.cjs.map +0 -1
- package/dist/chunk-SAFZ6JTI.cjs.map +0 -1
- package/dist/chunk-UDS5DZNY.cjs.map +0 -1
- package/dist/chunk-V3S74J44.js.map +0 -1
- package/dist/chunk-W66YCXWT.js.map +0 -1
- package/dist/extension-types-BLEVH4SG.d.cts +0 -571
- package/dist/extension-types-BLEVH4SG.d.ts +0 -571
- package/dist/materialize-indexes-D4iei4Kp.d.ts +0 -90
- package/dist/materialize-indexes-ExQ6OrAh.d.cts +0 -90
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkTRF4EBJT_cjs = require('./chunk-TRF4EBJT.cjs');
|
|
4
|
+
var chunkDMZEVJGL_cjs = require('./chunk-DMZEVJGL.cjs');
|
|
4
5
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var chunkAO2WPYFZ_cjs = require('./chunk-AO2WPYFZ.cjs');
|
|
7
|
+
var chunkZPCKPLMX_cjs = require('./chunk-ZPCKPLMX.cjs');
|
|
8
|
+
var chunkZBV4LQD2_cjs = require('./chunk-ZBV4LQD2.cjs');
|
|
9
|
+
var chunkI73ATSAH_cjs = require('./chunk-I73ATSAH.cjs');
|
|
9
10
|
var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
|
|
10
11
|
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
11
12
|
var chunkHAHNRASW_cjs = require('./chunk-HAHNRASW.cjs');
|
|
12
|
-
var
|
|
13
|
+
var chunkXDMPDUKL_cjs = require('./chunk-XDMPDUKL.cjs');
|
|
13
14
|
var chunkSVJ5GEXW_cjs = require('./chunk-SVJ5GEXW.cjs');
|
|
14
15
|
var chunkDI74SMXS_cjs = require('./chunk-DI74SMXS.cjs');
|
|
15
|
-
var
|
|
16
|
+
var chunkKTBTSHU6_cjs = require('./chunk-KTBTSHU6.cjs');
|
|
16
17
|
var zod = require('zod');
|
|
17
18
|
|
|
18
19
|
// src/ontology/core-meta-edges.ts
|
|
19
20
|
function createMetaEdge(name, properties) {
|
|
20
21
|
return Object.freeze({
|
|
21
|
-
[
|
|
22
|
+
[chunkDMZEVJGL_cjs.META_EDGE_BRAND]: true,
|
|
22
23
|
name,
|
|
23
24
|
properties: {
|
|
24
25
|
transitive: properties.transitive ?? false,
|
|
@@ -289,9 +290,96 @@ function diffNodes(before, after) {
|
|
|
289
290
|
}
|
|
290
291
|
return changes;
|
|
291
292
|
}
|
|
293
|
+
var SET_VALUED_KEYWORDS = /* @__PURE__ */ new Set(["required", "enum"]);
|
|
294
|
+
var SCHEMA_VALUED_KEYWORDS = /* @__PURE__ */ new Set([
|
|
295
|
+
"additionalProperties",
|
|
296
|
+
"allOf",
|
|
297
|
+
"anyOf",
|
|
298
|
+
"contains",
|
|
299
|
+
"contentSchema",
|
|
300
|
+
"else",
|
|
301
|
+
"if",
|
|
302
|
+
"items",
|
|
303
|
+
"not",
|
|
304
|
+
"oneOf",
|
|
305
|
+
"prefixItems",
|
|
306
|
+
"propertyNames",
|
|
307
|
+
"then",
|
|
308
|
+
"unevaluatedItems",
|
|
309
|
+
"unevaluatedProperties"
|
|
310
|
+
]);
|
|
311
|
+
var SUBSCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
|
|
312
|
+
"properties",
|
|
313
|
+
"patternProperties",
|
|
314
|
+
"dependentSchemas",
|
|
315
|
+
"$defs",
|
|
316
|
+
"definitions"
|
|
317
|
+
]);
|
|
318
|
+
var DEPENDENT_REQUIRED_KEYWORD = "dependentRequired";
|
|
319
|
+
function canonicalKey(value) {
|
|
320
|
+
return JSON.stringify(value, chunkACSVZPK7_cjs.sortedReplacer);
|
|
321
|
+
}
|
|
322
|
+
function sortedByCanonicalForm(items) {
|
|
323
|
+
return items.toSorted(
|
|
324
|
+
(left, right) => chunkTRF4EBJT_cjs.compareStrings(canonicalKey(left), canonicalKey(right))
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function orderNormalizedSchema(value) {
|
|
328
|
+
if (Array.isArray(value)) {
|
|
329
|
+
return value.map((item) => orderNormalizedSchema(item));
|
|
330
|
+
}
|
|
331
|
+
if (value !== null && typeof value === "object") {
|
|
332
|
+
const normalized = {};
|
|
333
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
334
|
+
normalized[key] = normalizedKeywordValue(key, entry);
|
|
335
|
+
}
|
|
336
|
+
return normalized;
|
|
337
|
+
}
|
|
338
|
+
return value;
|
|
339
|
+
}
|
|
340
|
+
function normalizedKeywordValue(key, value) {
|
|
341
|
+
if (SET_VALUED_KEYWORDS.has(key) && Array.isArray(value)) {
|
|
342
|
+
return sortedByCanonicalForm(value);
|
|
343
|
+
}
|
|
344
|
+
if (SUBSCHEMA_MAP_KEYWORDS.has(key)) return normalizedSubschemaMap(value);
|
|
345
|
+
if (key === DEPENDENT_REQUIRED_KEYWORD) {
|
|
346
|
+
return normalizedDependentRequired(value);
|
|
347
|
+
}
|
|
348
|
+
if (SCHEMA_VALUED_KEYWORDS.has(key)) return orderNormalizedSchema(value);
|
|
349
|
+
return value;
|
|
350
|
+
}
|
|
351
|
+
function normalizedDependentRequired(value) {
|
|
352
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
353
|
+
return value;
|
|
354
|
+
}
|
|
355
|
+
const normalized = {};
|
|
356
|
+
for (const [name, required] of Object.entries(value)) {
|
|
357
|
+
normalized[name] = Array.isArray(required) ? sortedByCanonicalForm(required) : required;
|
|
358
|
+
}
|
|
359
|
+
return normalized;
|
|
360
|
+
}
|
|
361
|
+
function normalizedSubschemaMap(value) {
|
|
362
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
363
|
+
return orderNormalizedSchema(value);
|
|
364
|
+
}
|
|
365
|
+
const normalized = {};
|
|
366
|
+
for (const [name, subschema] of Object.entries(value)) {
|
|
367
|
+
normalized[name] = orderNormalizedSchema(subschema);
|
|
368
|
+
}
|
|
369
|
+
return normalized;
|
|
370
|
+
}
|
|
371
|
+
function propertySchemasEqual(before, after) {
|
|
372
|
+
return chunkACSVZPK7_cjs.canonicalEqual(
|
|
373
|
+
orderNormalizedSchema(before),
|
|
374
|
+
orderNormalizedSchema(after)
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
function endpointKindsEqual(before, after) {
|
|
378
|
+
return chunkACSVZPK7_cjs.canonicalEqual(before?.toSorted(), after?.toSorted());
|
|
379
|
+
}
|
|
292
380
|
function diffNodeDef(name, before, after) {
|
|
293
381
|
const changes = [];
|
|
294
|
-
if (!
|
|
382
|
+
if (!propertySchemasEqual(before.properties, after.properties)) {
|
|
295
383
|
const { severity, details } = classifyPropertyChanges(
|
|
296
384
|
name,
|
|
297
385
|
before.properties,
|
|
@@ -364,7 +452,10 @@ function isObjectSchema(schema) {
|
|
|
364
452
|
return schema.type === "object" || schema.properties !== void 0;
|
|
365
453
|
}
|
|
366
454
|
function isBreakingPropertyChange(before, after) {
|
|
367
|
-
if (
|
|
455
|
+
if (propertySchemasEqual(
|
|
456
|
+
stripSchemaMetadata(before),
|
|
457
|
+
stripSchemaMetadata(after)
|
|
458
|
+
)) {
|
|
368
459
|
return false;
|
|
369
460
|
}
|
|
370
461
|
if (propertyTypeSignature(before) !== propertyTypeSignature(after)) {
|
|
@@ -474,7 +565,7 @@ function diffEdges(before, after) {
|
|
|
474
565
|
}
|
|
475
566
|
function diffEdgeDef(name, before, after) {
|
|
476
567
|
const changes = [];
|
|
477
|
-
if (!
|
|
568
|
+
if (!endpointKindsEqual(before.fromKinds, after.fromKinds)) {
|
|
478
569
|
changes.push({
|
|
479
570
|
type: "modified",
|
|
480
571
|
kind: name,
|
|
@@ -484,7 +575,7 @@ function diffEdgeDef(name, before, after) {
|
|
|
484
575
|
after
|
|
485
576
|
});
|
|
486
577
|
}
|
|
487
|
-
if (!
|
|
578
|
+
if (!endpointKindsEqual(before.toKinds, after.toKinds)) {
|
|
488
579
|
changes.push({
|
|
489
580
|
type: "modified",
|
|
490
581
|
kind: name,
|
|
@@ -504,7 +595,7 @@ function diffEdgeDef(name, before, after) {
|
|
|
504
595
|
after
|
|
505
596
|
});
|
|
506
597
|
}
|
|
507
|
-
if (!
|
|
598
|
+
if (!propertySchemasEqual(before.properties, after.properties)) {
|
|
508
599
|
const { severity, details } = classifyPropertyChanges(
|
|
509
600
|
name,
|
|
510
601
|
before.properties,
|
|
@@ -748,6 +839,10 @@ function generateSummary(nodeChanges, edgeChanges, ontologyChanges, indexChanges
|
|
|
748
839
|
function isBackwardsCompatible(diff) {
|
|
749
840
|
return !diff.hasBreakingChanges;
|
|
750
841
|
}
|
|
842
|
+
function classifySchemaChanges(diff) {
|
|
843
|
+
if (!diff.hasChanges) return "identical";
|
|
844
|
+
return diff.hasBreakingChanges ? "incompatible" : "additive";
|
|
845
|
+
}
|
|
751
846
|
function getMigrationActions(diff) {
|
|
752
847
|
const actions = [];
|
|
753
848
|
for (const change of diff.nodes) {
|
|
@@ -815,7 +910,7 @@ var KindRegistry = class {
|
|
|
815
910
|
* Checks if child is a subclass of parent (directly or transitively).
|
|
816
911
|
*/
|
|
817
912
|
isSubClassOf(child, parent) {
|
|
818
|
-
return
|
|
913
|
+
return chunkXDMPDUKL_cjs.isReachable(this.subClassAncestors, child, parent);
|
|
819
914
|
}
|
|
820
915
|
/**
|
|
821
916
|
* Expands a kind to include all its subclasses.
|
|
@@ -842,13 +937,13 @@ var KindRegistry = class {
|
|
|
842
937
|
* Checks if narrowerConcept is narrower than broaderConcept.
|
|
843
938
|
*/
|
|
844
939
|
isNarrowerThan(narrowerConcept, broaderConcept) {
|
|
845
|
-
return
|
|
940
|
+
return chunkXDMPDUKL_cjs.isReachable(this.broaderClosure, narrowerConcept, broaderConcept);
|
|
846
941
|
}
|
|
847
942
|
/**
|
|
848
943
|
* Checks if broaderConcept is broader than narrowerConcept.
|
|
849
944
|
*/
|
|
850
945
|
isBroaderThan(broaderConcept, narrowerConcept) {
|
|
851
|
-
return
|
|
946
|
+
return chunkXDMPDUKL_cjs.isReachable(this.narrowerClosure, broaderConcept, narrowerConcept);
|
|
852
947
|
}
|
|
853
948
|
/**
|
|
854
949
|
* Expands to include all narrower concepts.
|
|
@@ -912,7 +1007,7 @@ var KindRegistry = class {
|
|
|
912
1007
|
* Checks if part is part of whole (directly or transitively).
|
|
913
1008
|
*/
|
|
914
1009
|
isPartOf(part, whole) {
|
|
915
|
-
return
|
|
1010
|
+
return chunkXDMPDUKL_cjs.isReachable(this.partOfClosure, part, whole);
|
|
916
1011
|
}
|
|
917
1012
|
/**
|
|
918
1013
|
* Gets all wholes that contain this part.
|
|
@@ -1073,18 +1168,18 @@ function computeClosuresFromOntology(ontology) {
|
|
|
1073
1168
|
}
|
|
1074
1169
|
}
|
|
1075
1170
|
}
|
|
1076
|
-
const subClassAncestors =
|
|
1077
|
-
const subClassDescendants =
|
|
1078
|
-
const broaderClosure =
|
|
1079
|
-
const narrowerClosure =
|
|
1171
|
+
const subClassAncestors = chunkXDMPDUKL_cjs.computeTransitiveClosure(subClassRelations);
|
|
1172
|
+
const subClassDescendants = chunkXDMPDUKL_cjs.invertClosure(subClassAncestors);
|
|
1173
|
+
const broaderClosure = chunkXDMPDUKL_cjs.computeTransitiveClosure(broaderRelations);
|
|
1174
|
+
const narrowerClosure = chunkXDMPDUKL_cjs.invertClosure(broaderClosure);
|
|
1080
1175
|
const equivalenceSets = computeEquivalenceSets(equivalentRelations);
|
|
1081
1176
|
const iriToKind = computeIriMapping(equivalentRelations);
|
|
1082
1177
|
const disjointPairs = computeDisjointPairs(disjointRelations);
|
|
1083
|
-
const partOfClosure =
|
|
1084
|
-
const hasPartClosure =
|
|
1178
|
+
const partOfClosure = chunkXDMPDUKL_cjs.computeTransitiveClosure(partOfRelations);
|
|
1179
|
+
const hasPartClosure = chunkXDMPDUKL_cjs.invertClosure(partOfClosure);
|
|
1085
1180
|
const edgeInverses = computeEdgeInverses(inverseOfRelations);
|
|
1086
|
-
const edgeImplicationsClosure =
|
|
1087
|
-
const edgeImplyingClosure =
|
|
1181
|
+
const edgeImplicationsClosure = chunkXDMPDUKL_cjs.computeTransitiveClosure(impliesRelations);
|
|
1182
|
+
const edgeImplyingClosure = chunkXDMPDUKL_cjs.invertClosure(edgeImplicationsClosure);
|
|
1088
1183
|
return {
|
|
1089
1184
|
subClassAncestors,
|
|
1090
1185
|
subClassDescendants,
|
|
@@ -1188,7 +1283,7 @@ function serializeSchema(graph, version) {
|
|
|
1188
1283
|
return {
|
|
1189
1284
|
graphId: graph.id,
|
|
1190
1285
|
version,
|
|
1191
|
-
generatedAt:
|
|
1286
|
+
generatedAt: chunkZBV4LQD2_cjs.nowIso(),
|
|
1192
1287
|
nodes,
|
|
1193
1288
|
edges,
|
|
1194
1289
|
ontology,
|
|
@@ -1219,7 +1314,7 @@ function serializeDeprecatedKinds(set) {
|
|
|
1219
1314
|
function canonicalExtension(document) {
|
|
1220
1315
|
if (document === void 0) return void 0;
|
|
1221
1316
|
if (document.version === void 0) return document;
|
|
1222
|
-
if (document.version !==
|
|
1317
|
+
if (document.version !== chunkXDMPDUKL_cjs.LEGACY_GRAPH_EXTENSION_VERSION) return document;
|
|
1223
1318
|
const { version: _omit, ...rest } = document;
|
|
1224
1319
|
return rest;
|
|
1225
1320
|
}
|
|
@@ -1305,7 +1400,7 @@ function serializeEdgeIndexDeclaration(declaration) {
|
|
|
1305
1400
|
}
|
|
1306
1401
|
function serializeNodes(graph) {
|
|
1307
1402
|
const result = {};
|
|
1308
|
-
for (const kindName of
|
|
1403
|
+
for (const kindName of chunkZPCKPLMX_cjs.getNodeKinds(graph)) {
|
|
1309
1404
|
const registration = graph.nodes[kindName];
|
|
1310
1405
|
if (registration === void 0) continue;
|
|
1311
1406
|
result[kindName] = serializeNodeDef(registration);
|
|
@@ -1373,7 +1468,7 @@ function deserializeWherePredicate(serialized) {
|
|
|
1373
1468
|
}
|
|
1374
1469
|
function serializeEdges(graph) {
|
|
1375
1470
|
const result = {};
|
|
1376
|
-
for (const kindName of
|
|
1471
|
+
for (const kindName of chunkZPCKPLMX_cjs.getEdgeKinds(graph)) {
|
|
1377
1472
|
const registration = graph.edges[kindName];
|
|
1378
1473
|
if (registration === void 0) continue;
|
|
1379
1474
|
result[kindName] = serializeEdgeDef(registration);
|
|
@@ -1430,8 +1525,8 @@ function serializeMetaEdge(metaEdge) {
|
|
|
1430
1525
|
function serializeOntologyRelation(relation) {
|
|
1431
1526
|
return {
|
|
1432
1527
|
metaEdge: relation.metaEdge.name,
|
|
1433
|
-
from:
|
|
1434
|
-
to:
|
|
1528
|
+
from: chunkDMZEVJGL_cjs.getTypeName(relation.from),
|
|
1529
|
+
to: chunkDMZEVJGL_cjs.getTypeName(relation.to)
|
|
1435
1530
|
};
|
|
1436
1531
|
}
|
|
1437
1532
|
function serializeClosures(relations) {
|
|
@@ -1564,7 +1659,7 @@ function compileNodeCached(kindName, document) {
|
|
|
1564
1659
|
}
|
|
1565
1660
|
function compileNode(kindName, document) {
|
|
1566
1661
|
const schema = buildObjectSchema(document.properties);
|
|
1567
|
-
const type =
|
|
1662
|
+
const type = chunkDMZEVJGL_cjs.defineNode(
|
|
1568
1663
|
kindName,
|
|
1569
1664
|
chunkDI74SMXS_cjs.compactUndefined({
|
|
1570
1665
|
schema,
|
|
@@ -1742,7 +1837,7 @@ function graphExtensionOntologyKey(entry) {
|
|
|
1742
1837
|
return `${entry.metaEdge}|${entry.from}|${entry.to}`;
|
|
1743
1838
|
}
|
|
1744
1839
|
function compileTimeOntologyKey(relation) {
|
|
1745
|
-
return `${relation.metaEdge.name}|${
|
|
1840
|
+
return `${relation.metaEdge.name}|${chunkDMZEVJGL_cjs.getTypeName(relation.from)}|${chunkDMZEVJGL_cjs.getTypeName(relation.to)}`;
|
|
1746
1841
|
}
|
|
1747
1842
|
function buildGraphExtensionOntologyKeySet(document) {
|
|
1748
1843
|
return new Set(
|
|
@@ -1763,7 +1858,7 @@ function mergeGraphExtension(graph, document) {
|
|
|
1763
1858
|
if (graph.extension !== void 0 && chunkACSVZPK7_cjs.canonicalEqual(unionDocument, existingDocument)) {
|
|
1764
1859
|
return graph;
|
|
1765
1860
|
}
|
|
1766
|
-
const validatedUnion =
|
|
1861
|
+
const validatedUnion = chunkXDMPDUKL_cjs.unwrap(chunkXDMPDUKL_cjs.validateGraphExtension(unionDocument));
|
|
1767
1862
|
const compiled = compileGraphExtension(validatedUnion);
|
|
1768
1863
|
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = extensionKindNames(existingDocument);
|
|
1769
1864
|
const nodeKinds = /* @__PURE__ */ new Map();
|
|
@@ -1813,7 +1908,7 @@ function mergeGraphExtension(graph, document) {
|
|
|
1813
1908
|
edgeKind: edge.kindName,
|
|
1814
1909
|
side: "to"
|
|
1815
1910
|
});
|
|
1816
|
-
const type =
|
|
1911
|
+
const type = chunkDMZEVJGL_cjs.defineEdge(
|
|
1817
1912
|
edge.kindName,
|
|
1818
1913
|
chunkDI74SMXS_cjs.compactUndefined({
|
|
1819
1914
|
schema: edge.schema,
|
|
@@ -1865,7 +1960,7 @@ function deriveGraphExtensionVectorIndexes(compiledNodes) {
|
|
|
1865
1960
|
...compiled.unique.length === 0 ? {} : { unique: [...compiled.unique] }
|
|
1866
1961
|
};
|
|
1867
1962
|
}
|
|
1868
|
-
return
|
|
1963
|
+
return chunkZPCKPLMX_cjs.autoDeriveVectorIndexes(registrations).map(
|
|
1869
1964
|
(index) => Object.freeze({ ...index, origin: "runtime" })
|
|
1870
1965
|
);
|
|
1871
1966
|
}
|
|
@@ -1883,7 +1978,7 @@ function mergeIndexesWithGraphExtension(existing, runtimeIndexes, graphId) {
|
|
|
1883
1978
|
const runtimeRelational = runtimeIndexes.filter(
|
|
1884
1979
|
(index) => index.entity !== "vector"
|
|
1885
1980
|
);
|
|
1886
|
-
const vectorMerged =
|
|
1981
|
+
const vectorMerged = chunkZPCKPLMX_cjs.mergeVectorIndexes(compileTimeIndexes, runtimeVectors);
|
|
1887
1982
|
const merged = [...vectorMerged, ...runtimeRelational];
|
|
1888
1983
|
assertUniqueIndexNames(merged, graphId);
|
|
1889
1984
|
return merged;
|
|
@@ -1895,7 +1990,7 @@ function assertUniqueIndexNames(indexes, graphId) {
|
|
|
1895
1990
|
seen.add(index.name);
|
|
1896
1991
|
continue;
|
|
1897
1992
|
}
|
|
1898
|
-
throw new
|
|
1993
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
1899
1994
|
`Duplicate index name "${index.name}" after merging graph extension into graph "${graphId}". Index names must be unique within a graph.`,
|
|
1900
1995
|
{ graphId, indexName: index.name, code: "DUPLICATE_INDEX_NAME" },
|
|
1901
1996
|
{
|
|
@@ -1911,12 +2006,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1911
2006
|
if (document.entity === "node") {
|
|
1912
2007
|
const node = nodeKinds.get(document.kind);
|
|
1913
2008
|
if (node === void 0) {
|
|
1914
|
-
throw new
|
|
2009
|
+
throw new chunkKTBTSHU6_cjs.KindNotFoundError(document.kind, "node", {
|
|
1915
2010
|
graphId,
|
|
1916
2011
|
suggestion: "Declare the kind under `nodes` in this graph extension, or remove the index from `indexes`."
|
|
1917
2012
|
});
|
|
1918
2013
|
}
|
|
1919
|
-
const declaration2 =
|
|
2014
|
+
const declaration2 = chunkI73ATSAH_cjs.defineNodeIndex(
|
|
1920
2015
|
node,
|
|
1921
2016
|
toNodeIndexConfig(document)
|
|
1922
2017
|
);
|
|
@@ -1925,12 +2020,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1925
2020
|
}
|
|
1926
2021
|
const edgeRegistration = mergedEdges[document.kind];
|
|
1927
2022
|
if (edgeRegistration === void 0) {
|
|
1928
|
-
throw new
|
|
2023
|
+
throw new chunkKTBTSHU6_cjs.KindNotFoundError(document.kind, "edge", {
|
|
1929
2024
|
graphId,
|
|
1930
2025
|
suggestion: "Declare the edge under `edges` in this graph extension, or remove the index from `indexes`."
|
|
1931
2026
|
});
|
|
1932
2027
|
}
|
|
1933
|
-
const declaration =
|
|
2028
|
+
const declaration = chunkI73ATSAH_cjs.defineEdgeIndex(
|
|
1934
2029
|
edgeRegistration.type,
|
|
1935
2030
|
toEdgeIndexConfig(document)
|
|
1936
2031
|
);
|
|
@@ -1942,7 +2037,7 @@ function buildWhereCallback(where) {
|
|
|
1942
2037
|
return (props) => {
|
|
1943
2038
|
const builder = props[where.field];
|
|
1944
2039
|
if (builder === void 0) {
|
|
1945
|
-
throw new
|
|
2040
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
1946
2041
|
`Graph-extension index \`where\` references unknown field "${where.field}".`,
|
|
1947
2042
|
{ field: where.field, code: "EXTENSION_INDEX_WHERE_UNKNOWN_FIELD" }
|
|
1948
2043
|
);
|
|
@@ -2017,14 +2112,14 @@ function isEmptyExtension(extension) {
|
|
|
2017
2112
|
}
|
|
2018
2113
|
function assertNoCollision(kindName, entity, collides, graphId) {
|
|
2019
2114
|
if (!collides) return;
|
|
2020
|
-
throw new
|
|
2115
|
+
throw new chunkXDMPDUKL_cjs.KindCollisionError(kindName, entity, graphId);
|
|
2021
2116
|
}
|
|
2022
2117
|
function resolveEndpoints(entries, nodeKinds, context) {
|
|
2023
2118
|
return entries.map((entry) => {
|
|
2024
2119
|
if (typeof entry !== "string") return entry;
|
|
2025
2120
|
const resolved = nodeKinds.get(entry);
|
|
2026
2121
|
if (resolved === void 0) {
|
|
2027
|
-
throw new
|
|
2122
|
+
throw new chunkXDMPDUKL_cjs.GraphExtensionUnresolvedEndpointError(
|
|
2028
2123
|
context.edgeKind,
|
|
2029
2124
|
context.side,
|
|
2030
2125
|
entry,
|
|
@@ -2073,7 +2168,7 @@ function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, implied
|
|
|
2073
2168
|
(kind) => !registry.isAssignableToAny(kind, impliedKinds)
|
|
2074
2169
|
);
|
|
2075
2170
|
if (incompatibleKinds.length === 0) return;
|
|
2076
|
-
throw new
|
|
2171
|
+
throw new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
2077
2172
|
`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(", ")}].`,
|
|
2078
2173
|
{
|
|
2079
2174
|
metaEdge: chunkSVJ5GEXW_cjs.META_EDGE_IMPLIES,
|
|
@@ -2113,7 +2208,7 @@ function buildEdgeEndpointKinds(edges) {
|
|
|
2113
2208
|
}
|
|
2114
2209
|
function extractNodeTypes(graph) {
|
|
2115
2210
|
const result = /* @__PURE__ */ new Map();
|
|
2116
|
-
for (const typeName of
|
|
2211
|
+
for (const typeName of chunkZPCKPLMX_cjs.getNodeKinds(graph)) {
|
|
2117
2212
|
const registration = graph.nodes[typeName];
|
|
2118
2213
|
result.set(typeName, registration.type);
|
|
2119
2214
|
}
|
|
@@ -2121,7 +2216,7 @@ function extractNodeTypes(graph) {
|
|
|
2121
2216
|
}
|
|
2122
2217
|
function extractEdgeTypes(graph) {
|
|
2123
2218
|
const result = /* @__PURE__ */ new Map();
|
|
2124
|
-
for (const typeName of
|
|
2219
|
+
for (const typeName of chunkZPCKPLMX_cjs.getEdgeKinds(graph)) {
|
|
2125
2220
|
const registration = graph.edges[typeName];
|
|
2126
2221
|
result.set(typeName, registration.type);
|
|
2127
2222
|
}
|
|
@@ -2469,7 +2564,7 @@ function parseSerializedSchema(json) {
|
|
|
2469
2564
|
try {
|
|
2470
2565
|
parsed = JSON.parse(json);
|
|
2471
2566
|
} catch {
|
|
2472
|
-
throw new
|
|
2567
|
+
throw new chunkKTBTSHU6_cjs.DatabaseOperationError(
|
|
2473
2568
|
"Stored schema document is not valid JSON",
|
|
2474
2569
|
{ operation: "select", entity: "schema" }
|
|
2475
2570
|
);
|
|
@@ -2477,7 +2572,7 @@ function parseSerializedSchema(json) {
|
|
|
2477
2572
|
const result = serializedSchemaZod.safeParse(parsed);
|
|
2478
2573
|
if (!result.success) {
|
|
2479
2574
|
const issues = result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
|
|
2480
|
-
throw new
|
|
2575
|
+
throw new chunkKTBTSHU6_cjs.DatabaseOperationError(
|
|
2481
2576
|
`Stored schema document is malformed: ${issues}`,
|
|
2482
2577
|
{ operation: "select", entity: "schema" }
|
|
2483
2578
|
);
|
|
@@ -2494,7 +2589,7 @@ async function loadActiveSchemaWithBootstrap(backend, graphId) {
|
|
|
2494
2589
|
try {
|
|
2495
2590
|
return await backend.getActiveSchema(graphId);
|
|
2496
2591
|
} catch (error) {
|
|
2497
|
-
if (backend.bootstrapTables &&
|
|
2592
|
+
if (backend.bootstrapTables && chunkAO2WPYFZ_cjs.isMissingTableError(error)) {
|
|
2498
2593
|
await backend.bootstrapTables();
|
|
2499
2594
|
return await backend.getActiveSchema(graphId);
|
|
2500
2595
|
}
|
|
@@ -2588,12 +2683,14 @@ async function ensureSchema(backend, graph, options) {
|
|
|
2588
2683
|
}
|
|
2589
2684
|
const actions = getMigrationActions(diff);
|
|
2590
2685
|
if (throwOnBreaking) {
|
|
2591
|
-
throw new
|
|
2686
|
+
throw new chunkKTBTSHU6_cjs.MigrationError(
|
|
2592
2687
|
`Schema migration required: ${diff.summary}. ${actions.length} migration action(s) needed. Use getSchemaChanges() to review, then migrateSchema() to apply.`,
|
|
2593
2688
|
{
|
|
2594
2689
|
graphId: graph.id,
|
|
2595
2690
|
fromVersion: activeSchema.version,
|
|
2596
|
-
toVersion: activeSchema.version + 1
|
|
2691
|
+
toVersion: activeSchema.version + 1,
|
|
2692
|
+
reason: "breaking-change",
|
|
2693
|
+
diff
|
|
2597
2694
|
}
|
|
2598
2695
|
);
|
|
2599
2696
|
}
|
|
@@ -2639,12 +2736,14 @@ async function assertVectorContributionsInitialized(backend, graph) {
|
|
|
2639
2736
|
function schemaBehindError(graphId, fromVersion, diff) {
|
|
2640
2737
|
const actions = getMigrationActions(diff);
|
|
2641
2738
|
const qualifier = isBackwardsCompatible(diff) ? "safe auto-migration" : "breaking change";
|
|
2642
|
-
return new
|
|
2739
|
+
return new chunkKTBTSHU6_cjs.MigrationError(
|
|
2643
2740
|
`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().`,
|
|
2644
2741
|
{
|
|
2645
2742
|
graphId,
|
|
2646
2743
|
fromVersion,
|
|
2647
|
-
toVersion: fromVersion + 1
|
|
2744
|
+
toVersion: fromVersion + 1,
|
|
2745
|
+
reason: "schema-behind",
|
|
2746
|
+
diff
|
|
2648
2747
|
}
|
|
2649
2748
|
);
|
|
2650
2749
|
}
|
|
@@ -2657,7 +2756,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2657
2756
|
try {
|
|
2658
2757
|
activeRow = await backend.getActiveSchema(graphId);
|
|
2659
2758
|
} catch (error) {
|
|
2660
|
-
if (
|
|
2759
|
+
if (chunkAO2WPYFZ_cjs.isMissingTableError(error)) {
|
|
2661
2760
|
throw schemaNotInitializedError(graphId, error);
|
|
2662
2761
|
}
|
|
2663
2762
|
throw error;
|
|
@@ -2668,7 +2767,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2668
2767
|
return activeRow;
|
|
2669
2768
|
}
|
|
2670
2769
|
function schemaNotInitializedError(graphId, cause) {
|
|
2671
|
-
return new
|
|
2770
|
+
return new chunkKTBTSHU6_cjs.ConfigurationError(
|
|
2672
2771
|
`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.`,
|
|
2673
2772
|
{ graphId },
|
|
2674
2773
|
{
|
|
@@ -2713,9 +2812,14 @@ async function commitNewSchemaVersion(backend, graph, currentVersion) {
|
|
|
2713
2812
|
async function rollbackSchema(backend, graphId, targetVersion) {
|
|
2714
2813
|
const activeRow = await backend.getActiveSchema(graphId);
|
|
2715
2814
|
if (activeRow === void 0) {
|
|
2716
|
-
throw new
|
|
2815
|
+
throw new chunkKTBTSHU6_cjs.MigrationError(
|
|
2717
2816
|
`Cannot rollback graph "${graphId}": no active schema version exists.`,
|
|
2718
|
-
{
|
|
2817
|
+
{
|
|
2818
|
+
graphId,
|
|
2819
|
+
fromVersion: 0,
|
|
2820
|
+
toVersion: targetVersion,
|
|
2821
|
+
reason: "no-active-version"
|
|
2822
|
+
}
|
|
2719
2823
|
);
|
|
2720
2824
|
}
|
|
2721
2825
|
await backend.setActiveVersion({
|
|
@@ -2734,12 +2838,20 @@ async function isSchemaInitialized(backend, graphId) {
|
|
|
2734
2838
|
return row !== void 0;
|
|
2735
2839
|
}
|
|
2736
2840
|
async function getSchemaChanges(backend, graph) {
|
|
2737
|
-
const
|
|
2738
|
-
if (
|
|
2739
|
-
const storedSchema =
|
|
2740
|
-
|
|
2841
|
+
const activeRow = await backend.getActiveSchema(graph.id);
|
|
2842
|
+
if (activeRow === void 0) return void 0;
|
|
2843
|
+
const { graph: merged, storedSchema } = mergeStoredGraphExtension(
|
|
2844
|
+
graph,
|
|
2845
|
+
activeRow
|
|
2846
|
+
);
|
|
2847
|
+
const currentSchema = serializeSchema(merged, activeRow.version + 1);
|
|
2741
2848
|
return computeSchemaDiff(storedSchema, currentSchema);
|
|
2742
2849
|
}
|
|
2850
|
+
async function requiresMigration(backend, graph) {
|
|
2851
|
+
const diff = await getSchemaChanges(backend, graph);
|
|
2852
|
+
if (diff === void 0) return true;
|
|
2853
|
+
return diff.hasChanges;
|
|
2854
|
+
}
|
|
2743
2855
|
async function getCommittedSchemaVersion(backend, graphId) {
|
|
2744
2856
|
const row = await backend.getActiveSchema(graphId);
|
|
2745
2857
|
return row?.version;
|
|
@@ -2751,6 +2863,7 @@ exports.assertSchemaCurrent = assertSchemaCurrent;
|
|
|
2751
2863
|
exports.broader = broader;
|
|
2752
2864
|
exports.buildGraphExtensionOntologyKeySet = buildGraphExtensionOntologyKeySet;
|
|
2753
2865
|
exports.buildKindRegistry = buildKindRegistry;
|
|
2866
|
+
exports.classifySchemaChanges = classifySchemaChanges;
|
|
2754
2867
|
exports.commitNewSchemaVersion = commitNewSchemaVersion;
|
|
2755
2868
|
exports.compileTimeOntologyKey = compileTimeOntologyKey;
|
|
2756
2869
|
exports.computeSchemaDiff = computeSchemaDiff;
|
|
@@ -2781,6 +2894,7 @@ exports.narrower = narrower;
|
|
|
2781
2894
|
exports.parseSerializedSchema = parseSerializedSchema;
|
|
2782
2895
|
exports.partOf = partOf;
|
|
2783
2896
|
exports.relatedTo = relatedTo;
|
|
2897
|
+
exports.requiresMigration = requiresMigration;
|
|
2784
2898
|
exports.rollbackSchema = rollbackSchema;
|
|
2785
2899
|
exports.sameAs = sameAs;
|
|
2786
2900
|
exports.serializeIndexDeclaration = serializeIndexDeclaration;
|
|
@@ -2788,5 +2902,5 @@ exports.serializeSchema = serializeSchema;
|
|
|
2788
2902
|
exports.serializeSchemaProperties = serializeSchemaProperties;
|
|
2789
2903
|
exports.subClassOf = subClassOf;
|
|
2790
2904
|
exports.validateImpliesEndpointCompatibility = validateImpliesEndpointCompatibility;
|
|
2791
|
-
//# sourceMappingURL=chunk-
|
|
2792
|
-
//# sourceMappingURL=chunk-
|
|
2905
|
+
//# sourceMappingURL=chunk-V2GZBPY2.cjs.map
|
|
2906
|
+
//# sourceMappingURL=chunk-V2GZBPY2.cjs.map
|