@nicia-ai/typegraph 0.39.0 → 0.41.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/dist/backend/drizzle/indexes.cjs +8 -10
- package/dist/backend/drizzle/indexes.d.cts +2 -2
- package/dist/backend/drizzle/indexes.d.ts +2 -2
- package/dist/backend/drizzle/indexes.js +4 -6
- package/dist/backend/index.cjs +60 -39
- package/dist/backend/index.d.cts +60 -1
- package/dist/backend/index.d.ts +60 -1
- package/dist/backend/index.js +12 -3
- package/dist/backend/postgres/index.cjs +24 -26
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +11 -13
- package/dist/backend/postgres/pglite-store.cjs +25 -26
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +6 -5
- package/dist/backend/postgres/pglite-store.d.ts +6 -5
- package/dist/backend/postgres/pglite-store.js +21 -22
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +13 -15
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +12 -14
- package/dist/backend/sqlite/index.cjs +25 -27
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +9 -11
- package/dist/backend/sqlite/libsql.cjs +15 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +14 -16
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +26 -27
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +6 -5
- package/dist/backend/sqlite/local-store.d.ts +6 -5
- package/dist/backend/sqlite/local-store.js +22 -23
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +14 -16
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +12 -14
- package/dist/{chunk-U4JDJKPD.js → chunk-2I3DNNBU.js} +4 -4
- package/dist/{chunk-U4JDJKPD.js.map → chunk-2I3DNNBU.js.map} +1 -1
- package/dist/{chunk-NPWACFQJ.cjs → chunk-2J5NMMVR.cjs} +43 -43
- package/dist/{chunk-NPWACFQJ.cjs.map → chunk-2J5NMMVR.cjs.map} +1 -1
- package/dist/{chunk-3YFDFOYB.cjs → chunk-2X73QTIC.cjs} +12 -13
- package/dist/chunk-2X73QTIC.cjs.map +1 -0
- package/dist/chunk-3SHAUJRB.js +79 -0
- package/dist/chunk-3SHAUJRB.js.map +1 -0
- package/dist/{chunk-3SK4SVTW.js → chunk-53BSOG3O.js} +8 -7
- package/dist/chunk-53BSOG3O.js.map +1 -0
- package/dist/chunk-5J4VNCUD.js +856 -0
- package/dist/chunk-5J4VNCUD.js.map +1 -0
- package/dist/chunk-5YBDB7UG.cjs +12 -0
- package/dist/{chunk-FMNUSGZ4.cjs.map → chunk-5YBDB7UG.cjs.map} +1 -1
- package/dist/{chunk-6XDBRDZE.js → chunk-6N7QBIWN.js} +7 -3
- package/dist/chunk-6N7QBIWN.js.map +1 -0
- package/dist/{chunk-EZH7FNUS.js → chunk-6QP4QXBR.js} +3 -3
- package/dist/{chunk-EZH7FNUS.js.map → chunk-6QP4QXBR.js.map} +1 -1
- package/dist/{chunk-E6TXEISH.cjs → chunk-7UTUKH4E.cjs} +4 -4
- package/dist/{chunk-E6TXEISH.cjs.map → chunk-7UTUKH4E.cjs.map} +1 -1
- package/dist/chunk-7WLEQIHA.cjs +605 -0
- package/dist/chunk-7WLEQIHA.cjs.map +1 -0
- package/dist/{chunk-BQITNFQJ.js → chunk-AQVDAKXH.js} +3 -3
- package/dist/{chunk-BQITNFQJ.js.map → chunk-AQVDAKXH.js.map} +1 -1
- package/dist/{chunk-X6CNEA32.js → chunk-BUZWMDNL.js} +5 -5
- package/dist/{chunk-X6CNEA32.js.map → chunk-BUZWMDNL.js.map} +1 -1
- package/dist/{chunk-7M3NACL3.cjs → chunk-CKFBZ4LV.cjs} +4 -4
- package/dist/{chunk-7M3NACL3.cjs.map → chunk-CKFBZ4LV.cjs.map} +1 -1
- package/dist/{chunk-IFRPHG7O.js → chunk-EFZ4S22A.js} +10 -9
- package/dist/chunk-EFZ4S22A.js.map +1 -0
- package/dist/chunk-ELA3V6UN.js +601 -0
- package/dist/chunk-ELA3V6UN.js.map +1 -0
- package/dist/chunk-HAQVISUF.cjs +1098 -0
- package/dist/chunk-HAQVISUF.cjs.map +1 -0
- package/dist/{chunk-BKAKAVRW.cjs → chunk-HQRZEYYB.cjs} +44 -44
- package/dist/{chunk-BKAKAVRW.cjs.map → chunk-HQRZEYYB.cjs.map} +1 -1
- package/dist/{chunk-KAFXPB2L.js → chunk-I5CRUPKO.js} +9 -10
- package/dist/{chunk-KAFXPB2L.js.map → chunk-I5CRUPKO.js.map} +1 -1
- package/dist/{chunk-IFDXG2YJ.js → chunk-JHK6NPFV.js} +217 -305
- package/dist/chunk-JHK6NPFV.js.map +1 -0
- package/dist/{chunk-VXAFOF6Z.cjs → chunk-JP5EICR6.cjs} +12 -7
- package/dist/chunk-JP5EICR6.cjs.map +1 -0
- package/dist/chunk-JZYMOHHM.cjs +226 -0
- package/dist/chunk-JZYMOHHM.cjs.map +1 -0
- package/dist/{chunk-ERZ4QPQX.js → chunk-K6CD6W5J.js} +5 -5
- package/dist/{chunk-ERZ4QPQX.js.map → chunk-K6CD6W5J.js.map} +1 -1
- package/dist/{chunk-JD2YC62H.cjs → chunk-KHNKYSGP.cjs} +34 -34
- package/dist/{chunk-JD2YC62H.cjs.map → chunk-KHNKYSGP.cjs.map} +1 -1
- package/dist/{chunk-CWX77JB4.cjs → chunk-KLR77R5A.cjs} +13 -13
- package/dist/{chunk-CWX77JB4.cjs.map → chunk-KLR77R5A.cjs.map} +1 -1
- package/dist/chunk-KOI7UEI5.js +81 -0
- package/dist/chunk-KOI7UEI5.js.map +1 -0
- package/dist/{chunk-AOL64O4Z.js → chunk-L3DDZUZP.js} +3 -3
- package/dist/{chunk-AOL64O4Z.js.map → chunk-L3DDZUZP.js.map} +1 -1
- package/dist/{chunk-PZHC5GCD.js → chunk-L5ET7FYQ.js} +3 -3
- package/dist/{chunk-PZHC5GCD.js.map → chunk-L5ET7FYQ.js.map} +1 -1
- package/dist/{chunk-B63IFHXR.cjs → chunk-LFFVD5ZR.cjs} +41 -41
- package/dist/{chunk-B63IFHXR.cjs.map → chunk-LFFVD5ZR.cjs.map} +1 -1
- package/dist/chunk-LL5D5T5W.cjs +157 -0
- package/dist/chunk-LL5D5T5W.cjs.map +1 -0
- package/dist/{chunk-GUUWKPTK.cjs → chunk-LLE25NRD.cjs} +7 -7
- package/dist/{chunk-GUUWKPTK.cjs.map → chunk-LLE25NRD.cjs.map} +1 -1
- package/dist/chunk-LLHMAHG4.cjs +886 -0
- package/dist/chunk-LLHMAHG4.cjs.map +1 -0
- package/dist/{chunk-6SRLCSAV.cjs → chunk-LOKG3KQV.cjs} +962 -875
- package/dist/chunk-LOKG3KQV.cjs.map +1 -0
- package/dist/{chunk-KIZSHRUI.cjs → chunk-M2RPZS7J.cjs} +10 -10
- package/dist/{chunk-KIZSHRUI.cjs.map → chunk-M2RPZS7J.cjs.map} +1 -1
- package/dist/chunk-MNURF4RF.cjs +85 -0
- package/dist/chunk-MNURF4RF.cjs.map +1 -0
- package/dist/{chunk-CBK2IVI2.js → chunk-MQBF3XGY.js} +119 -32
- package/dist/chunk-MQBF3XGY.js.map +1 -0
- package/dist/chunk-QCKD3RCI.cjs +83 -0
- package/dist/chunk-QCKD3RCI.cjs.map +1 -0
- package/dist/chunk-QOHTVDHU.js +144 -0
- package/dist/chunk-QOHTVDHU.js.map +1 -0
- package/dist/{chunk-HTQOBY75.cjs → chunk-QXKVUJLI.cjs} +110 -109
- package/dist/chunk-QXKVUJLI.cjs.map +1 -0
- package/dist/{chunk-GNPGGLAE.cjs → chunk-QYDUCWD2.cjs} +4 -4
- package/dist/{chunk-GNPGGLAE.cjs.map → chunk-QYDUCWD2.cjs.map} +1 -1
- package/dist/{chunk-DOKUXLFH.js → chunk-QZYGZVUI.js} +34 -34
- package/dist/chunk-QZYGZVUI.js.map +1 -0
- package/dist/{chunk-GKQU44SQ.cjs → chunk-SAMJLDGG.cjs} +103 -103
- package/dist/{chunk-GKQU44SQ.cjs.map → chunk-SAMJLDGG.cjs.map} +1 -1
- package/dist/{chunk-DOVMTPKE.cjs → chunk-SE422RES.cjs} +27 -27
- package/dist/{chunk-DOVMTPKE.cjs.map → chunk-SE422RES.cjs.map} +1 -1
- package/dist/{chunk-5ELKD2FQ.cjs → chunk-UCHW2MGP.cjs} +330 -431
- package/dist/chunk-UCHW2MGP.cjs.map +1 -0
- package/dist/{chunk-Y6UA55YS.cjs → chunk-UDS5DZNY.cjs} +495 -1095
- package/dist/chunk-UDS5DZNY.cjs.map +1 -0
- package/dist/{chunk-SU7VQOJ3.js → chunk-V3S74J44.js} +9 -5
- package/dist/chunk-V3S74J44.js.map +1 -0
- package/dist/{chunk-VDYA2HMS.js → chunk-VWEFXG73.js} +3 -3
- package/dist/{chunk-VDYA2HMS.js.map → chunk-VWEFXG73.js.map} +1 -1
- package/dist/{chunk-KXFUQNF2.js → chunk-W66YCXWT.js} +463 -1047
- package/dist/chunk-W66YCXWT.js.map +1 -0
- package/dist/{chunk-NQBYTLPW.js → chunk-XMEYZYGE.js} +6 -6
- package/dist/{chunk-NQBYTLPW.js.map → chunk-XMEYZYGE.js.map} +1 -1
- package/dist/{chunk-G3CSQLLT.js → chunk-Y5UC3IXF.js} +461 -6
- package/dist/chunk-Y5UC3IXF.js.map +1 -0
- package/dist/{chunk-SDHV2MWU.js → chunk-YGX4PMG6.js} +5 -5
- package/dist/{chunk-SDHV2MWU.js.map → chunk-YGX4PMG6.js.map} +1 -1
- package/dist/{chunk-E2Q7SP2K.cjs → chunk-YIX3BEBR.cjs} +86 -85
- package/dist/chunk-YIX3BEBR.cjs.map +1 -0
- package/dist/{chunk-X6RDQ5NB.cjs → chunk-YX3H63VV.cjs} +8 -2
- package/dist/chunk-YX3H63VV.cjs.map +1 -0
- package/dist/chunk-YYLMXERH.js +211 -0
- package/dist/chunk-YYLMXERH.js.map +1 -0
- package/dist/{chunk-YPUNPG2T.js → chunk-ZE7E46IZ.js} +5 -5
- package/dist/{chunk-YPUNPG2T.js.map → chunk-ZE7E46IZ.js.map} +1 -1
- package/dist/{chunk-Z2PPIVOO.js → chunk-ZVME6OSV.js} +5 -5
- package/dist/{chunk-Z2PPIVOO.js.map → chunk-ZVME6OSV.js.map} +1 -1
- package/dist/core/index.cjs +15 -3
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +2 -2
- package/dist/{ddl-J6sDyABg.d.cts → ddl-BCXFRLWg.d.cts} +3 -3
- package/dist/{ddl-Dx3Z0_WC.d.ts → ddl-ByLmGgn9.d.ts} +3 -3
- package/dist/{define-graph-DRo9xpYN.d.ts → define-graph-BSviZubs.d.ts} +1 -1
- package/dist/{define-graph-CzEvA_8F.d.cts → define-graph-XyJheaFm.d.cts} +1 -1
- package/dist/graph-merge/index.cjs +37 -38
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +6 -5
- package/dist/graph-merge/index.d.ts +6 -5
- package/dist/graph-merge/index.js +15 -16
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +146 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +23 -22
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +12 -14
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +5 -7
- package/dist/interchange/index.cjs +28 -29
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +6 -5
- package/dist/interchange/index.d.ts +6 -5
- package/dist/interchange/index.js +9 -10
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-CASfhmzV.d.ts → manager-C7iC5bk_.d.ts} +27 -3
- package/dist/{manager-nCEJiYBb.d.cts → manager-Dm6MCYO7.d.cts} +27 -3
- package/dist/{postgres-Cl1ZAN1G.d.ts → postgres-Cb6ceh4-.d.ts} +100 -49
- package/dist/{postgres-DMgIKQU-.d.cts → postgres-DZxwzCQ8.d.cts} +100 -49
- package/dist/profiler/index.d.cts +8 -7
- package/dist/profiler/index.d.ts +8 -7
- package/dist/provenance/index.cjs +19 -19
- package/dist/provenance/index.d.cts +6 -5
- package/dist/provenance/index.d.ts +6 -5
- package/dist/provenance/index.js +6 -6
- package/dist/schema/index.cjs +33 -101
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +55 -55
- package/dist/schema/index.d.ts +55 -55
- package/dist/schema/index.js +6 -86
- package/dist/schema/index.js.map +1 -1
- package/dist/{temporal-DqtOEo_B.d.ts → searchable-Cet4Oztt.d.ts} +3 -58
- package/dist/{temporal-BC_NQV5Y.d.cts → searchable-aUaKh3_r.d.cts} +3 -58
- package/dist/{sqlite-BDkW39aa.d.cts → sqlite-Cb3Ilj9_.d.ts} +124 -97
- package/dist/{sqlite-CYfhvESj.d.ts → sqlite-Dxklpizv.d.cts} +124 -97
- package/dist/{store-view-CLIhwMMX.d.ts → store-view-BDjGFjpN.d.ts} +67 -23
- package/dist/{store-view-BJd6Vwpt.d.cts → store-view-PCT7vTKH.d.cts} +67 -23
- package/dist/temporal-CyFsSPe8.d.ts +73 -0
- package/dist/temporal-Dn_JADWY.d.cts +73 -0
- package/dist/{types-CUevi_D1.d.ts → types-CFZiEEPh.d.ts} +1 -1
- package/dist/{types-COq3-vMC.d.cts → types-CsaG00wS.d.cts} +1 -1
- package/dist/{index-Bq7vSPHy.d.ts → types-D-vOo_pM.d.ts} +2 -2
- package/dist/{index-CrFL_ENI.d.cts → types-ho4DJJb_.d.cts} +2 -2
- package/dist/{where-BdE_cYtx.d.ts → where-DLYaXa4L.d.ts} +1 -1
- package/dist/{where-C92TXCzT.d.cts → where-udes1WRA.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3SK4SVTW.js.map +0 -1
- package/dist/chunk-3YFDFOYB.cjs.map +0 -1
- package/dist/chunk-5ELKD2FQ.cjs.map +0 -1
- package/dist/chunk-6SRLCSAV.cjs.map +0 -1
- package/dist/chunk-6XDBRDZE.js.map +0 -1
- package/dist/chunk-CBK2IVI2.js.map +0 -1
- package/dist/chunk-DDCIXXOO.js +0 -9
- package/dist/chunk-DDCIXXOO.js.map +0 -1
- package/dist/chunk-DDCYVIVV.cjs +0 -44
- package/dist/chunk-DDCYVIVV.cjs.map +0 -1
- package/dist/chunk-DOKUXLFH.js.map +0 -1
- package/dist/chunk-E2Q7SP2K.cjs.map +0 -1
- package/dist/chunk-EOJFGECD.cjs +0 -284
- package/dist/chunk-EOJFGECD.cjs.map +0 -1
- package/dist/chunk-FMNUSGZ4.cjs +0 -12
- package/dist/chunk-G3CSQLLT.js.map +0 -1
- package/dist/chunk-HTQOBY75.cjs.map +0 -1
- package/dist/chunk-I6FX7AAG.js +0 -39
- package/dist/chunk-I6FX7AAG.js.map +0 -1
- package/dist/chunk-IFDXG2YJ.js.map +0 -1
- package/dist/chunk-IFRPHG7O.js.map +0 -1
- package/dist/chunk-J6IJARLG.js +0 -94
- package/dist/chunk-J6IJARLG.js.map +0 -1
- package/dist/chunk-KXFUQNF2.js.map +0 -1
- package/dist/chunk-MTNEGGM2.js +0 -273
- package/dist/chunk-MTNEGGM2.js.map +0 -1
- package/dist/chunk-SU7VQOJ3.js.map +0 -1
- package/dist/chunk-SVUKGWSN.cjs +0 -102
- package/dist/chunk-SVUKGWSN.cjs.map +0 -1
- package/dist/chunk-UH2USOMG.cjs +0 -627
- package/dist/chunk-UH2USOMG.cjs.map +0 -1
- package/dist/chunk-VXAFOF6Z.cjs.map +0 -1
- package/dist/chunk-X6RDQ5NB.cjs.map +0 -1
- package/dist/chunk-Y6UA55YS.cjs.map +0 -1
- package/dist/chunk-Y7M44XEK.js +0 -462
- package/dist/chunk-Y7M44XEK.js.map +0 -1
- package/dist/chunk-Z5QHVL5U.cjs +0 -12
- package/dist/chunk-Z5QHVL5U.cjs.map +0 -1
- package/dist/chunk-ZKZAIX42.cjs +0 -479
- package/dist/chunk-ZKZAIX42.cjs.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { G as GraphDef } from '../define-graph-
|
|
2
|
-
import { b as HistoryStore } from '../store-view-
|
|
1
|
+
import { G as GraphDef } from '../define-graph-XyJheaFm.cjs';
|
|
2
|
+
import { b as HistoryStore } from '../store-view-PCT7vTKH.cjs';
|
|
3
3
|
import '../extension-types-BLEVH4SG.cjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../
|
|
6
|
-
import '../temporal-
|
|
7
|
-
import '../manager-
|
|
5
|
+
import '../types-ho4DJJb_.cjs';
|
|
6
|
+
import '../temporal-Dn_JADWY.cjs';
|
|
7
|
+
import '../manager-Dm6MCYO7.cjs';
|
|
8
|
+
import '../searchable-aUaKh3_r.cjs';
|
|
8
9
|
import '../materialize-indexes-ExQ6OrAh.cjs';
|
|
9
10
|
|
|
10
11
|
type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { G as GraphDef } from '../define-graph-
|
|
2
|
-
import { b as HistoryStore } from '../store-view-
|
|
1
|
+
import { G as GraphDef } from '../define-graph-BSviZubs.js';
|
|
2
|
+
import { b as HistoryStore } from '../store-view-BDjGFjpN.js';
|
|
3
3
|
import '../extension-types-BLEVH4SG.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../
|
|
6
|
-
import '../temporal-
|
|
7
|
-
import '../manager-
|
|
5
|
+
import '../types-D-vOo_pM.js';
|
|
6
|
+
import '../temporal-CyFsSPe8.js';
|
|
7
|
+
import '../manager-C7iC5bk_.js';
|
|
8
|
+
import '../searchable-Cet4Oztt.js';
|
|
8
9
|
import '../materialize-indexes-D4iei4Kp.js';
|
|
9
10
|
|
|
10
11
|
type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
|
package/dist/provenance/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { compareStrings } from '../chunk-DRACN6XG.js';
|
|
2
|
-
import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-
|
|
2
|
+
import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-JHK6NPFV.js';
|
|
3
3
|
import '../chunk-35S6P5ZU.js';
|
|
4
|
-
import
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-YYLMXERH.js';
|
|
5
|
+
import { rowPropsToObject, isLiveNodeRow, isTombstonedNodeRow } from '../chunk-L5ET7FYQ.js';
|
|
6
|
+
import '../chunk-QOHTVDHU.js';
|
|
6
7
|
import '../chunk-UUIBACKJ.js';
|
|
7
|
-
import { nowIso } from '../chunk-
|
|
8
|
+
import { nowIso } from '../chunk-3SHAUJRB.js';
|
|
8
9
|
import '../chunk-2EBMPJBO.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import '../chunk-6XDBRDZE.js';
|
|
10
|
+
import '../chunk-6N7QBIWN.js';
|
|
11
11
|
import '../chunk-SNXVDZAJ.js';
|
|
12
12
|
import '../chunk-QMQLUA66.js';
|
|
13
13
|
import '../chunk-PC2UBAUB.js';
|
package/dist/schema/index.cjs
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQCKD3RCI_cjs = require('../chunk-QCKD3RCI.cjs');
|
|
4
|
+
var chunkJP5EICR6_cjs = require('../chunk-JP5EICR6.cjs');
|
|
4
5
|
require('../chunk-RW24SAHI.cjs');
|
|
5
6
|
var chunkX4PVHAZ6_cjs = require('../chunk-X4PVHAZ6.cjs');
|
|
6
7
|
require('../chunk-ACSVZPK7.cjs');
|
|
7
8
|
require('../chunk-HP6LWBLB.cjs');
|
|
8
9
|
require('../chunk-NT6ILURI.cjs');
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-MNURF4RF.cjs');
|
|
11
|
+
require('../chunk-CKFBZ4LV.cjs');
|
|
11
12
|
require('../chunk-ZY4GXIVN.cjs');
|
|
12
13
|
require('../chunk-NAUA4PW5.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-ZKZAIX42.cjs');
|
|
16
|
-
require('../chunk-X6RDQ5NB.cjs');
|
|
14
|
+
require('../chunk-HAQVISUF.cjs');
|
|
15
|
+
require('../chunk-YX3H63VV.cjs');
|
|
17
16
|
require('../chunk-FJMPR3OH.cjs');
|
|
18
17
|
require('../chunk-SJDMVITW.cjs');
|
|
19
18
|
require('../chunk-764JHTLT.cjs');
|
|
@@ -26,153 +25,87 @@ require('../chunk-XRU7V7FF.cjs');
|
|
|
26
25
|
require('../chunk-SAFZ6JTI.cjs');
|
|
27
26
|
require('../chunk-TDXIBCGY.cjs');
|
|
28
27
|
|
|
29
|
-
// src/schema/deserializer.ts
|
|
30
|
-
function deserializeSchema(schema) {
|
|
31
|
-
const nodeNames = Object.keys(schema.nodes);
|
|
32
|
-
const edgeNames = Object.keys(schema.edges);
|
|
33
|
-
const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
|
|
34
|
-
return {
|
|
35
|
-
graphId: schema.graphId,
|
|
36
|
-
version: schema.version,
|
|
37
|
-
generatedAt: schema.generatedAt,
|
|
38
|
-
getNode: (name) => schema.nodes[name],
|
|
39
|
-
getNodeNames: () => nodeNames,
|
|
40
|
-
getEdge: (name) => schema.edges[name],
|
|
41
|
-
getEdgeNames: () => edgeNames,
|
|
42
|
-
getMetaEdge: (name) => schema.ontology.metaEdges[name],
|
|
43
|
-
getMetaEdgeNames: () => metaEdgeNames,
|
|
44
|
-
getRelations: () => schema.ontology.relations,
|
|
45
|
-
getClosures: () => schema.ontology.closures,
|
|
46
|
-
getDefaults: () => schema.defaults,
|
|
47
|
-
getRaw: () => schema,
|
|
48
|
-
buildRegistry: () => buildRegistryFromClosures(schema)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function buildRegistryFromClosures(schema) {
|
|
52
|
-
const { closures } = schema.ontology;
|
|
53
|
-
const subClassAncestors = recordToMap(closures.subClassAncestors);
|
|
54
|
-
const subClassDescendants = recordToMap(closures.subClassDescendants);
|
|
55
|
-
const broaderClosure = recordToMap(closures.broaderClosure);
|
|
56
|
-
const narrowerClosure = recordToMap(closures.narrowerClosure);
|
|
57
|
-
const equivalenceSets = recordToMap(closures.equivalenceSets);
|
|
58
|
-
const partOfClosure = recordToMap(closures.partOfClosure);
|
|
59
|
-
const hasPartClosure = recordToMap(closures.hasPartClosure);
|
|
60
|
-
const iriToKind = simpleRecordToMap(closures.iriToKind);
|
|
61
|
-
const disjointPairs = new Set(closures.disjointPairs);
|
|
62
|
-
const edgeInverses = simpleRecordToMap(closures.edgeInverses);
|
|
63
|
-
const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
|
|
64
|
-
const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
|
|
65
|
-
const nodeKinds = /* @__PURE__ */ new Map();
|
|
66
|
-
const edgeKinds = /* @__PURE__ */ new Map();
|
|
67
|
-
const registry = new chunkVXAFOF6Z_cjs.KindRegistry(nodeKinds, edgeKinds, {
|
|
68
|
-
subClassAncestors,
|
|
69
|
-
subClassDescendants,
|
|
70
|
-
broaderClosure,
|
|
71
|
-
narrowerClosure,
|
|
72
|
-
equivalenceSets,
|
|
73
|
-
iriToKind,
|
|
74
|
-
disjointPairs,
|
|
75
|
-
partOfClosure,
|
|
76
|
-
hasPartClosure,
|
|
77
|
-
edgeInverses,
|
|
78
|
-
edgeImplicationsClosure,
|
|
79
|
-
edgeImplyingClosure
|
|
80
|
-
});
|
|
81
|
-
chunkVXAFOF6Z_cjs.validateImpliesEndpointCompatibility(
|
|
82
|
-
buildEdgeEndpointKinds(schema.edges),
|
|
83
|
-
registry
|
|
84
|
-
);
|
|
85
|
-
return registry;
|
|
86
|
-
}
|
|
87
|
-
function buildEdgeEndpointKinds(edges) {
|
|
88
|
-
const result = /* @__PURE__ */ new Map();
|
|
89
|
-
for (const [kind, def] of Object.entries(edges)) {
|
|
90
|
-
result.set(kind, { from: def.fromKinds, to: def.toKinds });
|
|
91
|
-
}
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
function recordToMap(record) {
|
|
95
|
-
const result = /* @__PURE__ */ new Map();
|
|
96
|
-
for (const [key, values] of Object.entries(record)) {
|
|
97
|
-
result.set(key, new Set(values));
|
|
98
|
-
}
|
|
99
|
-
return result;
|
|
100
|
-
}
|
|
101
|
-
function simpleRecordToMap(record) {
|
|
102
|
-
return new Map(Object.entries(record));
|
|
103
|
-
}
|
|
104
28
|
|
|
29
|
+
|
|
30
|
+
Object.defineProperty(exports, "deserializeSchema", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkQCKD3RCI_cjs.deserializeSchema; }
|
|
33
|
+
});
|
|
105
34
|
Object.defineProperty(exports, "applyDeprecatedKinds", {
|
|
106
35
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkJP5EICR6_cjs.applyDeprecatedKinds; }
|
|
108
37
|
});
|
|
109
38
|
Object.defineProperty(exports, "assertSchemaCurrent", {
|
|
110
39
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkJP5EICR6_cjs.assertSchemaCurrent; }
|
|
112
41
|
});
|
|
113
42
|
Object.defineProperty(exports, "computeSchemaDiff", {
|
|
114
43
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkJP5EICR6_cjs.computeSchemaDiff; }
|
|
116
45
|
});
|
|
117
46
|
Object.defineProperty(exports, "computeSchemaHash", {
|
|
118
47
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkJP5EICR6_cjs.computeSchemaHash; }
|
|
120
49
|
});
|
|
121
50
|
Object.defineProperty(exports, "deserializeWherePredicate", {
|
|
122
51
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkJP5EICR6_cjs.deserializeWherePredicate; }
|
|
124
53
|
});
|
|
125
54
|
Object.defineProperty(exports, "ensureSchema", {
|
|
126
55
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkJP5EICR6_cjs.ensureSchema; }
|
|
128
57
|
});
|
|
129
58
|
Object.defineProperty(exports, "getActiveSchema", {
|
|
130
59
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkJP5EICR6_cjs.getActiveSchema; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "getCommittedSchemaVersion", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunkJP5EICR6_cjs.getCommittedSchemaVersion; }
|
|
132
65
|
});
|
|
133
66
|
Object.defineProperty(exports, "getMigrationActions", {
|
|
134
67
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkJP5EICR6_cjs.getMigrationActions; }
|
|
136
69
|
});
|
|
137
70
|
Object.defineProperty(exports, "getSchemaChanges", {
|
|
138
71
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkJP5EICR6_cjs.getSchemaChanges; }
|
|
140
73
|
});
|
|
141
74
|
Object.defineProperty(exports, "initializeSchema", {
|
|
142
75
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkJP5EICR6_cjs.initializeSchema; }
|
|
144
77
|
});
|
|
145
78
|
Object.defineProperty(exports, "isBackwardsCompatible", {
|
|
146
79
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkJP5EICR6_cjs.isBackwardsCompatible; }
|
|
148
81
|
});
|
|
149
82
|
Object.defineProperty(exports, "isSchemaInitialized", {
|
|
150
83
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkJP5EICR6_cjs.isSchemaInitialized; }
|
|
152
85
|
});
|
|
153
86
|
Object.defineProperty(exports, "loadActiveSchemaWithBootstrap", {
|
|
154
87
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkJP5EICR6_cjs.loadActiveSchemaWithBootstrap; }
|
|
156
89
|
});
|
|
157
90
|
Object.defineProperty(exports, "loadAndMergeGraphExtensionDocument", {
|
|
158
91
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkJP5EICR6_cjs.loadAndMergeGraphExtensionDocument; }
|
|
160
93
|
});
|
|
161
94
|
Object.defineProperty(exports, "migrateSchema", {
|
|
162
95
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkJP5EICR6_cjs.migrateSchema; }
|
|
164
97
|
});
|
|
165
98
|
Object.defineProperty(exports, "parseSerializedSchema", {
|
|
166
99
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkJP5EICR6_cjs.parseSerializedSchema; }
|
|
168
101
|
});
|
|
169
102
|
Object.defineProperty(exports, "rollbackSchema", {
|
|
170
103
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkJP5EICR6_cjs.rollbackSchema; }
|
|
172
105
|
});
|
|
173
106
|
Object.defineProperty(exports, "serializeSchema", {
|
|
174
107
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkJP5EICR6_cjs.serializeSchema; }
|
|
176
109
|
});
|
|
177
110
|
Object.defineProperty(exports, "createValidationError", {
|
|
178
111
|
enumerable: true,
|
|
@@ -194,6 +127,5 @@ Object.defineProperty(exports, "wrapZodError", {
|
|
|
194
127
|
enumerable: true,
|
|
195
128
|
get: function () { return chunkX4PVHAZ6_cjs.wrapZodError; }
|
|
196
129
|
});
|
|
197
|
-
exports.deserializeSchema = deserializeSchema;
|
|
198
130
|
//# sourceMappingURL=index.cjs.map
|
|
199
131
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,13 +1,63 @@
|
|
|
1
|
-
import { K as KindRegistry } from '../manager-
|
|
2
|
-
export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as
|
|
3
|
-
import { q as
|
|
4
|
-
export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../
|
|
5
|
-
import { G as GraphDef } from '../define-graph-
|
|
1
|
+
import { K as KindRegistry } from '../manager-Dm6MCYO7.cjs';
|
|
2
|
+
export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getCommittedSchemaVersion, k as getMigrationActions, l as getSchemaChanges, m as initializeSchema, n as isBackwardsCompatible, o as isSchemaInitialized, p as loadActiveSchemaWithBootstrap, q as loadAndMergeGraphExtensionDocument, r as migrateSchema, s as parseSerializedSchema, t as rollbackSchema } from '../manager-Dm6MCYO7.cjs';
|
|
3
|
+
import { q as SerializedNodeDef, r as SerializedEdgeDef, s as SerializedMetaEdge, t as SerializedOntologyRelation, u as SerializedClosures, v as SerializedSchema, w as SchemaHash } from '../types-ho4DJJb_.cjs';
|
|
4
|
+
export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-ho4DJJb_.cjs';
|
|
5
|
+
import { G as GraphDef } from '../define-graph-XyJheaFm.cjs';
|
|
6
6
|
import { c as NullCheckOp, K as KindEntity } from '../extension-types-BLEVH4SG.cjs';
|
|
7
7
|
import { ZodType, ZodError } from 'zod';
|
|
8
8
|
import { V as ValidationIssue, a as ValidationError } from '../index-BihFPsPu.cjs';
|
|
9
9
|
import '../materialize-indexes-ExQ6OrAh.cjs';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Schema deserializer for loading stored schemas.
|
|
13
|
+
*
|
|
14
|
+
* Reconstructs runtime objects from SerializedSchema.
|
|
15
|
+
* Note: Zod schemas cannot be fully reconstructed from JSON Schema,
|
|
16
|
+
* so this provides access to the serialized data for introspection.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A deserialized schema provides read-only access to schema metadata.
|
|
21
|
+
*
|
|
22
|
+
* Note: Unlike the original GraphDef, this does not include Zod schemas
|
|
23
|
+
* since those cannot be reconstructed from JSON Schema. Use this for
|
|
24
|
+
* introspection and metadata access only.
|
|
25
|
+
*/
|
|
26
|
+
type DeserializedSchema = Readonly<{
|
|
27
|
+
graphId: string;
|
|
28
|
+
version: number;
|
|
29
|
+
generatedAt: string;
|
|
30
|
+
/** Get node definition by name */
|
|
31
|
+
getNode: (name: string) => SerializedNodeDef | undefined;
|
|
32
|
+
/** Get all node names */
|
|
33
|
+
getNodeNames: () => readonly string[];
|
|
34
|
+
/** Get edge definition by name */
|
|
35
|
+
getEdge: (name: string) => SerializedEdgeDef | undefined;
|
|
36
|
+
/** Get all edge names */
|
|
37
|
+
getEdgeNames: () => readonly string[];
|
|
38
|
+
/** Get meta-edge definition by name */
|
|
39
|
+
getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
|
|
40
|
+
/** Get all meta-edge names */
|
|
41
|
+
getMetaEdgeNames: () => readonly string[];
|
|
42
|
+
/** Get all ontology relations */
|
|
43
|
+
getRelations: () => readonly SerializedOntologyRelation[];
|
|
44
|
+
/** Get precomputed closures */
|
|
45
|
+
getClosures: () => SerializedClosures;
|
|
46
|
+
/** Get graph defaults */
|
|
47
|
+
getDefaults: () => SerializedSchema["defaults"];
|
|
48
|
+
/** Get the raw serialized schema */
|
|
49
|
+
getRaw: () => SerializedSchema;
|
|
50
|
+
/** Build a KindRegistry from the closures */
|
|
51
|
+
buildRegistry: () => KindRegistry;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Deserializes a SerializedSchema into a DeserializedSchema.
|
|
55
|
+
*
|
|
56
|
+
* @param schema - The serialized schema to deserialize
|
|
57
|
+
* @returns A deserialized schema with accessor methods
|
|
58
|
+
*/
|
|
59
|
+
declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
|
|
60
|
+
|
|
11
61
|
/**
|
|
12
62
|
* Schema serializer for homoiconic storage.
|
|
13
63
|
*
|
|
@@ -67,56 +117,6 @@ declare function deserializeWherePredicate(serialized: string): (builder: Predic
|
|
|
67
117
|
*/
|
|
68
118
|
declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
|
|
69
119
|
|
|
70
|
-
/**
|
|
71
|
-
* Schema deserializer for loading stored schemas.
|
|
72
|
-
*
|
|
73
|
-
* Reconstructs runtime objects from SerializedSchema.
|
|
74
|
-
* Note: Zod schemas cannot be fully reconstructed from JSON Schema,
|
|
75
|
-
* so this provides access to the serialized data for introspection.
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* A deserialized schema provides read-only access to schema metadata.
|
|
80
|
-
*
|
|
81
|
-
* Note: Unlike the original GraphDef, this does not include Zod schemas
|
|
82
|
-
* since those cannot be reconstructed from JSON Schema. Use this for
|
|
83
|
-
* introspection and metadata access only.
|
|
84
|
-
*/
|
|
85
|
-
type DeserializedSchema = Readonly<{
|
|
86
|
-
graphId: string;
|
|
87
|
-
version: number;
|
|
88
|
-
generatedAt: string;
|
|
89
|
-
/** Get node definition by name */
|
|
90
|
-
getNode: (name: string) => SerializedNodeDef | undefined;
|
|
91
|
-
/** Get all node names */
|
|
92
|
-
getNodeNames: () => readonly string[];
|
|
93
|
-
/** Get edge definition by name */
|
|
94
|
-
getEdge: (name: string) => SerializedEdgeDef | undefined;
|
|
95
|
-
/** Get all edge names */
|
|
96
|
-
getEdgeNames: () => readonly string[];
|
|
97
|
-
/** Get meta-edge definition by name */
|
|
98
|
-
getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
|
|
99
|
-
/** Get all meta-edge names */
|
|
100
|
-
getMetaEdgeNames: () => readonly string[];
|
|
101
|
-
/** Get all ontology relations */
|
|
102
|
-
getRelations: () => readonly SerializedOntologyRelation[];
|
|
103
|
-
/** Get precomputed closures */
|
|
104
|
-
getClosures: () => SerializedClosures;
|
|
105
|
-
/** Get graph defaults */
|
|
106
|
-
getDefaults: () => SerializedSchema["defaults"];
|
|
107
|
-
/** Get the raw serialized schema */
|
|
108
|
-
getRaw: () => SerializedSchema;
|
|
109
|
-
/** Build a KindRegistry from the closures */
|
|
110
|
-
buildRegistry: () => KindRegistry;
|
|
111
|
-
}>;
|
|
112
|
-
/**
|
|
113
|
-
* Deserializes a SerializedSchema into a DeserializedSchema.
|
|
114
|
-
*
|
|
115
|
-
* @param schema - The serialized schema to deserialize
|
|
116
|
-
* @returns A deserialized schema with accessor methods
|
|
117
|
-
*/
|
|
118
|
-
declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
|
|
119
|
-
|
|
120
120
|
/**
|
|
121
121
|
* Contextual Validation Utilities
|
|
122
122
|
*
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,13 +1,63 @@
|
|
|
1
|
-
import { K as KindRegistry } from '../manager-
|
|
2
|
-
export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as
|
|
3
|
-
import { q as
|
|
4
|
-
export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../
|
|
5
|
-
import { G as GraphDef } from '../define-graph-
|
|
1
|
+
import { K as KindRegistry } from '../manager-C7iC5bk_.js';
|
|
2
|
+
export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getCommittedSchemaVersion, k as getMigrationActions, l as getSchemaChanges, m as initializeSchema, n as isBackwardsCompatible, o as isSchemaInitialized, p as loadActiveSchemaWithBootstrap, q as loadAndMergeGraphExtensionDocument, r as migrateSchema, s as parseSerializedSchema, t as rollbackSchema } from '../manager-C7iC5bk_.js';
|
|
3
|
+
import { q as SerializedNodeDef, r as SerializedEdgeDef, s as SerializedMetaEdge, t as SerializedOntologyRelation, u as SerializedClosures, v as SerializedSchema, w as SchemaHash } from '../types-D-vOo_pM.js';
|
|
4
|
+
export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-D-vOo_pM.js';
|
|
5
|
+
import { G as GraphDef } from '../define-graph-BSviZubs.js';
|
|
6
6
|
import { c as NullCheckOp, K as KindEntity } from '../extension-types-BLEVH4SG.js';
|
|
7
7
|
import { ZodType, ZodError } from 'zod';
|
|
8
8
|
import { V as ValidationIssue, a as ValidationError } from '../index-BD_3TCgh.js';
|
|
9
9
|
import '../materialize-indexes-D4iei4Kp.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Schema deserializer for loading stored schemas.
|
|
13
|
+
*
|
|
14
|
+
* Reconstructs runtime objects from SerializedSchema.
|
|
15
|
+
* Note: Zod schemas cannot be fully reconstructed from JSON Schema,
|
|
16
|
+
* so this provides access to the serialized data for introspection.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A deserialized schema provides read-only access to schema metadata.
|
|
21
|
+
*
|
|
22
|
+
* Note: Unlike the original GraphDef, this does not include Zod schemas
|
|
23
|
+
* since those cannot be reconstructed from JSON Schema. Use this for
|
|
24
|
+
* introspection and metadata access only.
|
|
25
|
+
*/
|
|
26
|
+
type DeserializedSchema = Readonly<{
|
|
27
|
+
graphId: string;
|
|
28
|
+
version: number;
|
|
29
|
+
generatedAt: string;
|
|
30
|
+
/** Get node definition by name */
|
|
31
|
+
getNode: (name: string) => SerializedNodeDef | undefined;
|
|
32
|
+
/** Get all node names */
|
|
33
|
+
getNodeNames: () => readonly string[];
|
|
34
|
+
/** Get edge definition by name */
|
|
35
|
+
getEdge: (name: string) => SerializedEdgeDef | undefined;
|
|
36
|
+
/** Get all edge names */
|
|
37
|
+
getEdgeNames: () => readonly string[];
|
|
38
|
+
/** Get meta-edge definition by name */
|
|
39
|
+
getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
|
|
40
|
+
/** Get all meta-edge names */
|
|
41
|
+
getMetaEdgeNames: () => readonly string[];
|
|
42
|
+
/** Get all ontology relations */
|
|
43
|
+
getRelations: () => readonly SerializedOntologyRelation[];
|
|
44
|
+
/** Get precomputed closures */
|
|
45
|
+
getClosures: () => SerializedClosures;
|
|
46
|
+
/** Get graph defaults */
|
|
47
|
+
getDefaults: () => SerializedSchema["defaults"];
|
|
48
|
+
/** Get the raw serialized schema */
|
|
49
|
+
getRaw: () => SerializedSchema;
|
|
50
|
+
/** Build a KindRegistry from the closures */
|
|
51
|
+
buildRegistry: () => KindRegistry;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Deserializes a SerializedSchema into a DeserializedSchema.
|
|
55
|
+
*
|
|
56
|
+
* @param schema - The serialized schema to deserialize
|
|
57
|
+
* @returns A deserialized schema with accessor methods
|
|
58
|
+
*/
|
|
59
|
+
declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
|
|
60
|
+
|
|
11
61
|
/**
|
|
12
62
|
* Schema serializer for homoiconic storage.
|
|
13
63
|
*
|
|
@@ -67,56 +117,6 @@ declare function deserializeWherePredicate(serialized: string): (builder: Predic
|
|
|
67
117
|
*/
|
|
68
118
|
declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
|
|
69
119
|
|
|
70
|
-
/**
|
|
71
|
-
* Schema deserializer for loading stored schemas.
|
|
72
|
-
*
|
|
73
|
-
* Reconstructs runtime objects from SerializedSchema.
|
|
74
|
-
* Note: Zod schemas cannot be fully reconstructed from JSON Schema,
|
|
75
|
-
* so this provides access to the serialized data for introspection.
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* A deserialized schema provides read-only access to schema metadata.
|
|
80
|
-
*
|
|
81
|
-
* Note: Unlike the original GraphDef, this does not include Zod schemas
|
|
82
|
-
* since those cannot be reconstructed from JSON Schema. Use this for
|
|
83
|
-
* introspection and metadata access only.
|
|
84
|
-
*/
|
|
85
|
-
type DeserializedSchema = Readonly<{
|
|
86
|
-
graphId: string;
|
|
87
|
-
version: number;
|
|
88
|
-
generatedAt: string;
|
|
89
|
-
/** Get node definition by name */
|
|
90
|
-
getNode: (name: string) => SerializedNodeDef | undefined;
|
|
91
|
-
/** Get all node names */
|
|
92
|
-
getNodeNames: () => readonly string[];
|
|
93
|
-
/** Get edge definition by name */
|
|
94
|
-
getEdge: (name: string) => SerializedEdgeDef | undefined;
|
|
95
|
-
/** Get all edge names */
|
|
96
|
-
getEdgeNames: () => readonly string[];
|
|
97
|
-
/** Get meta-edge definition by name */
|
|
98
|
-
getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
|
|
99
|
-
/** Get all meta-edge names */
|
|
100
|
-
getMetaEdgeNames: () => readonly string[];
|
|
101
|
-
/** Get all ontology relations */
|
|
102
|
-
getRelations: () => readonly SerializedOntologyRelation[];
|
|
103
|
-
/** Get precomputed closures */
|
|
104
|
-
getClosures: () => SerializedClosures;
|
|
105
|
-
/** Get graph defaults */
|
|
106
|
-
getDefaults: () => SerializedSchema["defaults"];
|
|
107
|
-
/** Get the raw serialized schema */
|
|
108
|
-
getRaw: () => SerializedSchema;
|
|
109
|
-
/** Build a KindRegistry from the closures */
|
|
110
|
-
buildRegistry: () => KindRegistry;
|
|
111
|
-
}>;
|
|
112
|
-
/**
|
|
113
|
-
* Deserializes a SerializedSchema into a DeserializedSchema.
|
|
114
|
-
*
|
|
115
|
-
* @param schema - The serialized schema to deserialize
|
|
116
|
-
* @returns A deserialized schema with accessor methods
|
|
117
|
-
*/
|
|
118
|
-
declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
|
|
119
|
-
|
|
120
120
|
/**
|
|
121
121
|
* Contextual Validation Utilities
|
|
122
122
|
*
|
package/dist/schema/index.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-
|
|
1
|
+
export { deserializeSchema } from '../chunk-KOI7UEI5.js';
|
|
2
|
+
export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getCommittedSchemaVersion, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-V3S74J44.js';
|
|
3
3
|
import '../chunk-76HE7DJP.js';
|
|
4
4
|
export { createValidationError, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-ZE6NVENI.js';
|
|
5
5
|
import '../chunk-UR7W5YQK.js';
|
|
6
6
|
import '../chunk-UUIBACKJ.js';
|
|
7
7
|
import '../chunk-PH4IJ3V5.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-3SHAUJRB.js';
|
|
9
|
+
import '../chunk-VWEFXG73.js';
|
|
10
10
|
import '../chunk-K34OPSJK.js';
|
|
11
11
|
import '../chunk-2EBMPJBO.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-Y7M44XEK.js';
|
|
15
|
-
import '../chunk-6XDBRDZE.js';
|
|
12
|
+
import '../chunk-Y5UC3IXF.js';
|
|
13
|
+
import '../chunk-6N7QBIWN.js';
|
|
16
14
|
import '../chunk-D7PG5D5K.js';
|
|
17
15
|
import '../chunk-SNXVDZAJ.js';
|
|
18
16
|
import '../chunk-QMQLUA66.js';
|
|
@@ -24,83 +22,5 @@ import '../chunk-ITE4IXAK.js';
|
|
|
24
22
|
import '../chunk-XZA3Y4YH.js';
|
|
25
23
|
import '../chunk-DPNA466P.js';
|
|
26
24
|
import '../chunk-G6Q5UM7U.js';
|
|
27
|
-
|
|
28
|
-
// src/schema/deserializer.ts
|
|
29
|
-
function deserializeSchema(schema) {
|
|
30
|
-
const nodeNames = Object.keys(schema.nodes);
|
|
31
|
-
const edgeNames = Object.keys(schema.edges);
|
|
32
|
-
const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
|
|
33
|
-
return {
|
|
34
|
-
graphId: schema.graphId,
|
|
35
|
-
version: schema.version,
|
|
36
|
-
generatedAt: schema.generatedAt,
|
|
37
|
-
getNode: (name) => schema.nodes[name],
|
|
38
|
-
getNodeNames: () => nodeNames,
|
|
39
|
-
getEdge: (name) => schema.edges[name],
|
|
40
|
-
getEdgeNames: () => edgeNames,
|
|
41
|
-
getMetaEdge: (name) => schema.ontology.metaEdges[name],
|
|
42
|
-
getMetaEdgeNames: () => metaEdgeNames,
|
|
43
|
-
getRelations: () => schema.ontology.relations,
|
|
44
|
-
getClosures: () => schema.ontology.closures,
|
|
45
|
-
getDefaults: () => schema.defaults,
|
|
46
|
-
getRaw: () => schema,
|
|
47
|
-
buildRegistry: () => buildRegistryFromClosures(schema)
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function buildRegistryFromClosures(schema) {
|
|
51
|
-
const { closures } = schema.ontology;
|
|
52
|
-
const subClassAncestors = recordToMap(closures.subClassAncestors);
|
|
53
|
-
const subClassDescendants = recordToMap(closures.subClassDescendants);
|
|
54
|
-
const broaderClosure = recordToMap(closures.broaderClosure);
|
|
55
|
-
const narrowerClosure = recordToMap(closures.narrowerClosure);
|
|
56
|
-
const equivalenceSets = recordToMap(closures.equivalenceSets);
|
|
57
|
-
const partOfClosure = recordToMap(closures.partOfClosure);
|
|
58
|
-
const hasPartClosure = recordToMap(closures.hasPartClosure);
|
|
59
|
-
const iriToKind = simpleRecordToMap(closures.iriToKind);
|
|
60
|
-
const disjointPairs = new Set(closures.disjointPairs);
|
|
61
|
-
const edgeInverses = simpleRecordToMap(closures.edgeInverses);
|
|
62
|
-
const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
|
|
63
|
-
const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
|
|
64
|
-
const nodeKinds = /* @__PURE__ */ new Map();
|
|
65
|
-
const edgeKinds = /* @__PURE__ */ new Map();
|
|
66
|
-
const registry = new KindRegistry(nodeKinds, edgeKinds, {
|
|
67
|
-
subClassAncestors,
|
|
68
|
-
subClassDescendants,
|
|
69
|
-
broaderClosure,
|
|
70
|
-
narrowerClosure,
|
|
71
|
-
equivalenceSets,
|
|
72
|
-
iriToKind,
|
|
73
|
-
disjointPairs,
|
|
74
|
-
partOfClosure,
|
|
75
|
-
hasPartClosure,
|
|
76
|
-
edgeInverses,
|
|
77
|
-
edgeImplicationsClosure,
|
|
78
|
-
edgeImplyingClosure
|
|
79
|
-
});
|
|
80
|
-
validateImpliesEndpointCompatibility(
|
|
81
|
-
buildEdgeEndpointKinds(schema.edges),
|
|
82
|
-
registry
|
|
83
|
-
);
|
|
84
|
-
return registry;
|
|
85
|
-
}
|
|
86
|
-
function buildEdgeEndpointKinds(edges) {
|
|
87
|
-
const result = /* @__PURE__ */ new Map();
|
|
88
|
-
for (const [kind, def] of Object.entries(edges)) {
|
|
89
|
-
result.set(kind, { from: def.fromKinds, to: def.toKinds });
|
|
90
|
-
}
|
|
91
|
-
return result;
|
|
92
|
-
}
|
|
93
|
-
function recordToMap(record) {
|
|
94
|
-
const result = /* @__PURE__ */ new Map();
|
|
95
|
-
for (const [key, values] of Object.entries(record)) {
|
|
96
|
-
result.set(key, new Set(values));
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
function simpleRecordToMap(record) {
|
|
101
|
-
return new Map(Object.entries(record));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export { deserializeSchema };
|
|
105
25
|
//# sourceMappingURL=index.js.map
|
|
106
26
|
//# sourceMappingURL=index.js.map
|