@nicia-ai/typegraph 0.34.0 → 0.35.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/postgres/index.cjs +29 -29
- package/dist/backend/postgres/index.d.cts +39 -7
- package/dist/backend/postgres/index.d.ts +39 -7
- package/dist/backend/postgres/index.js +16 -16
- package/dist/backend/postgres/pglite.cjs +21 -21
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +16 -16
- package/dist/backend/sqlite/index.cjs +25 -26
- package/dist/backend/sqlite/index.d.cts +8 -8
- package/dist/backend/sqlite/index.d.ts +8 -8
- package/dist/backend/sqlite/index.js +13 -14
- package/dist/backend/sqlite/libsql.cjs +19 -19
- package/dist/backend/sqlite/libsql.d.cts +4 -4
- package/dist/backend/sqlite/libsql.d.ts +4 -4
- package/dist/backend/sqlite/libsql.js +15 -15
- package/dist/backend/sqlite/local.cjs +101 -21
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +95 -5
- package/dist/backend/sqlite/local.d.ts +95 -5
- package/dist/backend/sqlite/local.js +95 -16
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-ZV5N4DBG.js → chunk-3TWF3SH4.js} +300 -58
- package/dist/chunk-3TWF3SH4.js.map +1 -0
- package/dist/chunk-4JEZZJ6S.cjs +1271 -0
- package/dist/chunk-4JEZZJ6S.cjs.map +1 -0
- package/dist/{chunk-UNNPKQUG.cjs → chunk-4TOD4LBZ.cjs} +246 -155
- package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
- package/dist/{chunk-QV245VMN.js → chunk-55MZDDZV.js} +100 -6
- package/dist/chunk-55MZDDZV.js.map +1 -0
- package/dist/{chunk-GQANNXXT.cjs → chunk-5A6FNS6N.cjs} +75 -20
- package/dist/chunk-5A6FNS6N.cjs.map +1 -0
- package/dist/{chunk-3Z6TW3CT.cjs → chunk-5AQIKK56.cjs} +65 -25
- package/dist/chunk-5AQIKK56.cjs.map +1 -0
- package/dist/{chunk-BVTWD66D.js → chunk-5SEGFTZX.js} +3 -3
- package/dist/{chunk-BVTWD66D.js.map → chunk-5SEGFTZX.js.map} +1 -1
- package/dist/{chunk-6GNSY7AV.js → chunk-6FR2MMS6.js} +7 -7
- package/dist/chunk-6FR2MMS6.js.map +1 -0
- package/dist/chunk-7YSP4V4R.cjs +69 -0
- package/dist/chunk-7YSP4V4R.cjs.map +1 -0
- package/dist/chunk-A42GCBGX.cjs +28 -0
- package/dist/chunk-A42GCBGX.cjs.map +1 -0
- package/dist/{chunk-RHZWOJVA.cjs → chunk-BLZDPRXT.cjs} +52 -4
- package/dist/chunk-BLZDPRXT.cjs.map +1 -0
- package/dist/chunk-BYPOGQWK.js +25 -0
- package/dist/chunk-BYPOGQWK.js.map +1 -0
- package/dist/{chunk-6HVOHZHS.cjs → chunk-CK5BVQOW.cjs} +213 -168
- package/dist/chunk-CK5BVQOW.cjs.map +1 -0
- package/dist/{chunk-JJRCLAUN.cjs → chunk-CTTSDJLY.cjs} +116 -10
- package/dist/chunk-CTTSDJLY.cjs.map +1 -0
- package/dist/chunk-CUHM5CWJ.cjs +12 -0
- package/dist/chunk-CUHM5CWJ.cjs.map +1 -0
- package/dist/{chunk-A7SZZFAG.js → chunk-CZQ3FO2Q.js} +409 -99
- package/dist/chunk-CZQ3FO2Q.js.map +1 -0
- package/dist/{chunk-2JXB3NYJ.cjs → chunk-D7ZEOS56.cjs} +25 -32
- package/dist/chunk-D7ZEOS56.cjs.map +1 -0
- package/dist/chunk-DFVLCOP6.js +10 -0
- package/dist/chunk-DFVLCOP6.js.map +1 -0
- package/dist/{chunk-UJLOZYKT.cjs → chunk-EM3CWPND.cjs} +441 -115
- package/dist/chunk-EM3CWPND.cjs.map +1 -0
- package/dist/chunk-EMF62TZG.cjs +1176 -0
- package/dist/chunk-EMF62TZG.cjs.map +1 -0
- package/dist/chunk-EOLERH7Y.cjs +40 -0
- package/dist/chunk-EOLERH7Y.cjs.map +1 -0
- package/dist/{chunk-TGJE22RM.cjs → chunk-FACJJWGF.cjs} +24 -6
- package/dist/chunk-FACJJWGF.cjs.map +1 -0
- package/dist/{chunk-HK5SATYM.cjs → chunk-FL472AMI.cjs} +16 -109
- package/dist/chunk-FL472AMI.cjs.map +1 -0
- package/dist/{chunk-WVC2Q2FD.cjs → chunk-FN35DLCN.cjs} +31 -9
- package/dist/chunk-FN35DLCN.cjs.map +1 -0
- package/dist/{chunk-KUTNI6SI.js → chunk-FPIZFYHE.js} +10 -18
- package/dist/chunk-FPIZFYHE.js.map +1 -0
- package/dist/{chunk-VCGO4V26.js → chunk-FRV5Q5IO.js} +64 -9
- package/dist/chunk-FRV5Q5IO.js.map +1 -0
- package/dist/{chunk-K5P5OZXS.js → chunk-G6Q5UM7U.js} +2 -2
- package/dist/{chunk-K5P5OZXS.js.map → chunk-G6Q5UM7U.js.map} +1 -1
- package/dist/chunk-GSQ6NPH6.cjs +100 -0
- package/dist/chunk-GSQ6NPH6.cjs.map +1 -0
- package/dist/chunk-GUR2FNB5.cjs +12 -0
- package/dist/{chunk-HMFK4BXR.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
- package/dist/{chunk-JQGIPGVL.cjs → chunk-H7YNSMA7.cjs} +43 -2
- package/dist/chunk-H7YNSMA7.cjs.map +1 -0
- package/dist/{chunk-2MRAX3UE.js → chunk-I7ZUZKFD.js} +47 -4
- package/dist/chunk-I7ZUZKFD.js.map +1 -0
- package/dist/{chunk-3BRVBQQD.cjs → chunk-J7WFGBJR.cjs} +2445 -2367
- package/dist/chunk-J7WFGBJR.cjs.map +1 -0
- package/dist/{chunk-V3QNTB7Z.js → chunk-JBTOYDMN.js} +194 -114
- package/dist/chunk-JBTOYDMN.js.map +1 -0
- package/dist/{chunk-K2TGS3EN.js → chunk-K3PPLHY7.js} +138 -89
- package/dist/chunk-K3PPLHY7.js.map +1 -0
- package/dist/{chunk-Z5XBMDXU.js → chunk-KBGQIPRQ.js} +42 -3
- package/dist/chunk-KBGQIPRQ.js.map +1 -0
- package/dist/chunk-KMI7LYAF.js +1252 -0
- package/dist/chunk-KMI7LYAF.js.map +1 -0
- package/dist/{chunk-JIEJCTDS.cjs → chunk-LGEALRC6.cjs} +21 -4
- package/dist/chunk-LGEALRC6.cjs.map +1 -0
- package/dist/{chunk-TQOYM4LN.js → chunk-MP2JQKSG.js} +21 -5
- package/dist/chunk-MP2JQKSG.js.map +1 -0
- package/dist/{chunk-ZP5WHI4C.cjs → chunk-O7UN7OXA.cjs} +358 -116
- package/dist/chunk-O7UN7OXA.cjs.map +1 -0
- package/dist/chunk-OHMP6N2J.js +47 -0
- package/dist/chunk-OHMP6N2J.js.map +1 -0
- package/dist/{chunk-4DIBPQNJ.js → chunk-OR5ZA5WP.js} +135 -25
- package/dist/chunk-OR5ZA5WP.js.map +1 -0
- package/dist/{chunk-DEQFL35G.js → chunk-Q5TEXCTB.js} +61 -7
- package/dist/chunk-Q5TEXCTB.js.map +1 -0
- package/dist/chunk-QNKSQTKQ.js +1312 -0
- package/dist/chunk-QNKSQTKQ.js.map +1 -0
- package/dist/{chunk-ZURTTSCM.js → chunk-QOTI55H7.js} +6 -94
- package/dist/chunk-QOTI55H7.js.map +1 -0
- package/dist/{chunk-CHXTTSC6.js → chunk-QWEUYILR.js} +104 -5
- package/dist/chunk-QWEUYILR.js.map +1 -0
- package/dist/{chunk-LANHCOXB.js → chunk-RGP33ZJ5.js} +485 -83
- package/dist/chunk-RGP33ZJ5.js.map +1 -0
- package/dist/chunk-RGPG7EOJ.js +94 -0
- package/dist/chunk-RGPG7EOJ.js.map +1 -0
- package/dist/{chunk-G6SOJEDI.cjs → chunk-S55OV6PW.cjs} +15 -15
- package/dist/chunk-S55OV6PW.cjs.map +1 -0
- package/dist/{chunk-3E7SNSIA.cjs → chunk-SJDMVITW.cjs} +4 -4
- package/dist/{chunk-3E7SNSIA.cjs.map → chunk-SJDMVITW.cjs.map} +1 -1
- package/dist/{chunk-XLUNB2TZ.js → chunk-SNXVDZAJ.js} +3 -3
- package/dist/{chunk-XLUNB2TZ.js.map → chunk-SNXVDZAJ.js.map} +1 -1
- package/dist/{chunk-RBV7YCQD.js → chunk-T2WUSPDA.js} +49 -9
- package/dist/chunk-T2WUSPDA.js.map +1 -0
- package/dist/{chunk-KGC4LY5T.cjs → chunk-TCOCYN2P.cjs} +75 -21
- package/dist/chunk-TCOCYN2P.cjs.map +1 -0
- package/dist/{chunk-FLRCVI2G.cjs → chunk-TDXIBCGY.cjs} +2 -2
- package/dist/{chunk-FLRCVI2G.cjs.map → chunk-TDXIBCGY.cjs.map} +1 -1
- package/dist/{chunk-ZY4GXIVN.cjs → chunk-TEDRJXOG.cjs} +5 -5
- package/dist/{chunk-ZY4GXIVN.cjs.map → chunk-TEDRJXOG.cjs.map} +1 -1
- package/dist/{chunk-WLRIWYHQ.js → chunk-UES55P7G.js} +1863 -1785
- package/dist/chunk-UES55P7G.js.map +1 -0
- package/dist/{chunk-WL2SG7ZV.cjs → chunk-UMDVATGY.cjs} +6 -6
- package/dist/{chunk-WL2SG7ZV.cjs.map → chunk-UMDVATGY.cjs.map} +1 -1
- package/dist/chunk-UT3S4SEN.js +31 -0
- package/dist/chunk-UT3S4SEN.js.map +1 -0
- package/dist/{chunk-RRKQAKD6.cjs → chunk-UUT7UN2N.cjs} +149 -39
- package/dist/chunk-UUT7UN2N.cjs.map +1 -0
- package/dist/{chunk-SHLY4MCM.js → chunk-UZV3AZKF.js} +21 -3
- package/dist/chunk-UZV3AZKF.js.map +1 -0
- package/dist/{chunk-CYX2JTDG.js → chunk-VHMPG6UL.js} +29 -7
- package/dist/chunk-VHMPG6UL.js.map +1 -0
- package/dist/{chunk-T6SPUYLX.cjs → chunk-VPYHY3LJ.cjs} +116 -10
- package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
- package/dist/{chunk-T46GR2VY.js → chunk-VSPCZAXF.js} +3 -3
- package/dist/{chunk-T46GR2VY.js.map → chunk-VSPCZAXF.js.map} +1 -1
- package/dist/{chunk-K34OPSJK.js → chunk-W63OVYY4.js} +3 -3
- package/dist/{chunk-K34OPSJK.js.map → chunk-W63OVYY4.js.map} +1 -1
- package/dist/{chunk-RY2VIWAM.js → chunk-WDBCBWC4.js} +355 -32
- package/dist/chunk-WDBCBWC4.js.map +1 -0
- package/dist/chunk-WJT7OU7E.cjs +1334 -0
- package/dist/chunk-WJT7OU7E.cjs.map +1 -0
- package/dist/{chunk-5IQIX7LU.cjs → chunk-XOX22WHL.cjs} +476 -163
- package/dist/chunk-XOX22WHL.cjs.map +1 -0
- package/dist/{ddl-BrmPg61z.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
- package/dist/{ddl-j1-sH6lE.d.cts → ddl-CZz7a0E8.d.cts} +4 -4
- package/dist/{extension-types-YGFJPrzK.d.cts → extension-types-ixRpJVUp.d.cts} +24 -1
- package/dist/{extension-types-YGFJPrzK.d.ts → extension-types-ixRpJVUp.d.ts} +24 -1
- package/dist/{types-DkNnF-7K.d.cts → fulltext-strategy-B57yvC5Q.d.ts} +2562 -2133
- package/dist/{types-D1Sqeyxy.d.ts → fulltext-strategy-CDkSSYhq.d.cts} +2562 -2133
- package/dist/graph-extension/index.cjs +20 -19
- 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 -4
- package/dist/graph-merge/index.cjs +255 -164
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +63 -33
- package/dist/graph-merge/index.d.ts +63 -33
- package/dist/graph-merge/index.js +135 -44
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DGX6D9j1.d.ts → index-6CSUAq-x.d.ts} +234 -93
- package/dist/{index-SEvUHDA6.d.cts → index-Bks_3HHK.d.cts} +234 -93
- package/dist/index.cjs +208 -188
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +33 -33
- package/dist/indexes/index.cjs +19 -20
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -11
- package/dist/interchange/index.cjs +47 -26
- package/dist/interchange/index.d.cts +126 -12
- package/dist/interchange/index.d.ts +126 -12
- package/dist/interchange/index.js +14 -13
- package/dist/{manager-ms9cKdc6.d.cts → manager-DwQi8eV0.d.cts} +9 -2
- package/dist/{manager-BZUeN_BU.d.ts → manager-ejUCB52T.d.ts} +9 -2
- package/dist/{materialize-indexes-D20xNluI.d.cts → materialize-indexes-B4e9360H.d.cts} +20 -4
- package/dist/{materialize-indexes-CAkIYFV-.d.ts → materialize-indexes-te9TPMMJ.d.ts} +20 -4
- package/dist/{postgres-BhpxGMC5.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
- package/dist/{postgres-CWHLwNl1.d.ts → postgres-DQ5R6rzV.d.ts} +152 -1
- package/dist/profiler/index.cjs +11 -11
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +40 -41
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +5 -5
- package/dist/provenance/index.d.ts +5 -5
- package/dist/provenance/index.js +11 -12
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +53 -40
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +57 -57
- package/dist/schema/index.d.ts +57 -57
- package/dist/schema/index.js +28 -15
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-XrDxNaa7.d.cts → sqlite-D7zBinNR.d.cts} +92 -1
- package/dist/{sqlite-CGu5SLsw.d.ts → sqlite-DvQndLky.d.ts} +92 -1
- package/dist/{store-view-D09po4H6.d.cts → store-view-BSpqvAxK.d.cts} +415 -44
- package/dist/{store-view-BlgnhEYf.d.ts → store-view-CKbHFRnn.d.ts} +415 -44
- package/dist/{types-DiE1AO7p.d.cts → types-Bv9DcS_E.d.cts} +2 -2
- package/dist/{types-B1TbZJYS.d.ts → types-CoxuV7EJ.d.ts} +2 -2
- package/dist/{where-DKjuofPr.d.cts → where-7RKFOsXt.d.ts} +2 -2
- package/dist/{where-DrUIIWHb.d.ts → where-DdMIXOtH.d.cts} +2 -2
- package/package.json +14 -13
- package/dist/chunk-2EBMPJBO.js +0 -16
- package/dist/chunk-2EBMPJBO.js.map +0 -1
- package/dist/chunk-2JXB3NYJ.cjs.map +0 -1
- package/dist/chunk-2MRAX3UE.js.map +0 -1
- package/dist/chunk-3BRVBQQD.cjs.map +0 -1
- package/dist/chunk-3EUKJEQ3.js +0 -77
- package/dist/chunk-3EUKJEQ3.js.map +0 -1
- package/dist/chunk-3Z6TW3CT.cjs.map +0 -1
- package/dist/chunk-4DIBPQNJ.js.map +0 -1
- package/dist/chunk-4S2FXGBJ.js +0 -9
- package/dist/chunk-4S2FXGBJ.js.map +0 -1
- package/dist/chunk-5IQIX7LU.cjs.map +0 -1
- package/dist/chunk-6GNSY7AV.js.map +0 -1
- package/dist/chunk-6HVOHZHS.cjs.map +0 -1
- package/dist/chunk-6SCVW4AS.js +0 -20
- package/dist/chunk-6SCVW4AS.js.map +0 -1
- package/dist/chunk-A7SZZFAG.js.map +0 -1
- package/dist/chunk-CHXTTSC6.js.map +0 -1
- package/dist/chunk-CYX2JTDG.js.map +0 -1
- package/dist/chunk-DEQFL35G.js.map +0 -1
- package/dist/chunk-G6SOJEDI.cjs.map +0 -1
- package/dist/chunk-GQANNXXT.cjs.map +0 -1
- package/dist/chunk-GZCNZ7QW.js +0 -24
- package/dist/chunk-GZCNZ7QW.js.map +0 -1
- package/dist/chunk-HK5SATYM.cjs.map +0 -1
- package/dist/chunk-HMFK4BXR.cjs +0 -12
- package/dist/chunk-HTGDWIDE.cjs +0 -89
- package/dist/chunk-HTGDWIDE.cjs.map +0 -1
- package/dist/chunk-JIEJCTDS.cjs.map +0 -1
- package/dist/chunk-JJRCLAUN.cjs.map +0 -1
- package/dist/chunk-JQGIPGVL.cjs.map +0 -1
- package/dist/chunk-K2TGS3EN.js.map +0 -1
- package/dist/chunk-KGC4LY5T.cjs.map +0 -1
- package/dist/chunk-KNHYNQQ3.cjs +0 -663
- package/dist/chunk-KNHYNQQ3.cjs.map +0 -1
- package/dist/chunk-KUTNI6SI.js.map +0 -1
- package/dist/chunk-LANHCOXB.js.map +0 -1
- package/dist/chunk-N6WTUSBV.cjs +0 -23
- package/dist/chunk-N6WTUSBV.cjs.map +0 -1
- package/dist/chunk-NAUA4PW5.cjs +0 -28
- package/dist/chunk-NAUA4PW5.cjs.map +0 -1
- package/dist/chunk-QV245VMN.js.map +0 -1
- package/dist/chunk-RBV7YCQD.js.map +0 -1
- package/dist/chunk-RHZWOJVA.cjs.map +0 -1
- package/dist/chunk-RRKQAKD6.cjs.map +0 -1
- package/dist/chunk-RY2VIWAM.js.map +0 -1
- package/dist/chunk-SHLY4MCM.js.map +0 -1
- package/dist/chunk-T2DWPQNE.js +0 -649
- package/dist/chunk-T2DWPQNE.js.map +0 -1
- package/dist/chunk-T6SPUYLX.cjs.map +0 -1
- package/dist/chunk-TGJE22RM.cjs.map +0 -1
- package/dist/chunk-TOTPVGOG.cjs +0 -774
- package/dist/chunk-TOTPVGOG.cjs.map +0 -1
- package/dist/chunk-TQOYM4LN.js.map +0 -1
- package/dist/chunk-UJLOZYKT.cjs.map +0 -1
- package/dist/chunk-UNNPKQUG.cjs.map +0 -1
- package/dist/chunk-V3QNTB7Z.js.map +0 -1
- package/dist/chunk-VCGO4V26.js.map +0 -1
- package/dist/chunk-WLRIWYHQ.js.map +0 -1
- package/dist/chunk-WVC2Q2FD.cjs.map +0 -1
- package/dist/chunk-XXVEULWX.js +0 -39
- package/dist/chunk-XXVEULWX.js.map +0 -1
- package/dist/chunk-YAZE7QZR.cjs +0 -32
- package/dist/chunk-YAZE7QZR.cjs.map +0 -1
- package/dist/chunk-YC6PWTHY.cjs +0 -44
- package/dist/chunk-YC6PWTHY.cjs.map +0 -1
- package/dist/chunk-Z5HBYM7U.cjs +0 -11
- package/dist/chunk-Z5HBYM7U.cjs.map +0 -1
- package/dist/chunk-Z5XBMDXU.js.map +0 -1
- package/dist/chunk-ZP5WHI4C.cjs.map +0 -1
- package/dist/chunk-ZURTTSCM.js.map +0 -1
- package/dist/chunk-ZV5N4DBG.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
4
|
+
var chunkVPYHY3LJ_cjs = require('./chunk-VPYHY3LJ.cjs');
|
|
5
|
+
var chunkUUT7UN2N_cjs = require('./chunk-UUT7UN2N.cjs');
|
|
6
|
+
var chunkTEDRJXOG_cjs = require('./chunk-TEDRJXOG.cjs');
|
|
7
|
+
var chunkFL472AMI_cjs = require('./chunk-FL472AMI.cjs');
|
|
8
|
+
var chunkGSQ6NPH6_cjs = require('./chunk-GSQ6NPH6.cjs');
|
|
9
|
+
var chunkBLZDPRXT_cjs = require('./chunk-BLZDPRXT.cjs');
|
|
10
|
+
var chunkH7YNSMA7_cjs = require('./chunk-H7YNSMA7.cjs');
|
|
11
11
|
var chunkDI74SMXS_cjs = require('./chunk-DI74SMXS.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkLGEALRC6_cjs = require('./chunk-LGEALRC6.cjs');
|
|
13
13
|
var zod = require('zod');
|
|
14
14
|
|
|
15
15
|
// src/core/node.ts
|
|
16
16
|
function validateSchemaKeys(schema, name) {
|
|
17
|
-
|
|
17
|
+
chunkGSQ6NPH6_cjs.assertSchemaKeysAreFree(
|
|
18
18
|
"Node",
|
|
19
19
|
name,
|
|
20
20
|
Object.keys(schema.shape),
|
|
21
|
-
|
|
21
|
+
chunkGSQ6NPH6_cjs.RESERVED_NODE_KEYS
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
function defineNode(name, options) {
|
|
25
25
|
validateSchemaKeys(options.schema, name);
|
|
26
26
|
if (options.annotations !== void 0) {
|
|
27
|
-
|
|
27
|
+
chunkFL472AMI_cjs.assertJsonValue(options.annotations, "annotations", `Node "${name}"`);
|
|
28
28
|
}
|
|
29
29
|
return Object.freeze({
|
|
30
|
-
[
|
|
30
|
+
[chunkVPYHY3LJ_cjs.NODE_TYPE_BRAND]: true,
|
|
31
31
|
kind: name,
|
|
32
32
|
schema: options.schema,
|
|
33
33
|
description: options.description,
|
|
@@ -36,21 +36,21 @@ function defineNode(name, options) {
|
|
|
36
36
|
}
|
|
37
37
|
var EMPTY_SCHEMA = zod.z.object({});
|
|
38
38
|
function validateSchemaKeys2(schema, name) {
|
|
39
|
-
|
|
39
|
+
chunkGSQ6NPH6_cjs.assertSchemaKeysAreFree(
|
|
40
40
|
"Edge",
|
|
41
41
|
name,
|
|
42
42
|
Object.keys(schema.shape),
|
|
43
|
-
|
|
43
|
+
chunkGSQ6NPH6_cjs.RESERVED_EDGE_KEYS
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
function defineEdge(name, options) {
|
|
47
47
|
const schema = options?.schema ?? EMPTY_SCHEMA;
|
|
48
48
|
validateSchemaKeys2(schema, name);
|
|
49
49
|
if (options?.annotations !== void 0) {
|
|
50
|
-
|
|
50
|
+
chunkFL472AMI_cjs.assertJsonValue(options.annotations, "annotations", `Edge "${name}"`);
|
|
51
51
|
}
|
|
52
52
|
return Object.freeze({
|
|
53
|
-
[
|
|
53
|
+
[chunkVPYHY3LJ_cjs.EDGE_TYPE_BRAND]: true,
|
|
54
54
|
kind: name,
|
|
55
55
|
schema,
|
|
56
56
|
description: options?.description,
|
|
@@ -87,7 +87,7 @@ function createMetaEdge(name, properties) {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
var subClassOfMetaEdge = createMetaEdge(
|
|
90
|
+
var subClassOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_SUB_CLASS_OF, {
|
|
91
91
|
transitive: true,
|
|
92
92
|
inference: "subsumption",
|
|
93
93
|
description: "Type inheritance (Podcast subClassOf Media)"
|
|
@@ -99,9 +99,9 @@ function subClassOf(child, parent) {
|
|
|
99
99
|
to: parent
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
var broaderMetaEdge = createMetaEdge(
|
|
102
|
+
var broaderMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_BROADER, {
|
|
103
103
|
transitive: true,
|
|
104
|
-
inverse:
|
|
104
|
+
inverse: chunkFL472AMI_cjs.META_EDGE_NARROWER,
|
|
105
105
|
inference: "hierarchy",
|
|
106
106
|
description: "Broader concept (ML broader AI)"
|
|
107
107
|
});
|
|
@@ -112,9 +112,9 @@ function broader(narrowerConcept, broaderConcept) {
|
|
|
112
112
|
to: broaderConcept
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
var narrowerMetaEdge = createMetaEdge(
|
|
115
|
+
var narrowerMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_NARROWER, {
|
|
116
116
|
transitive: true,
|
|
117
|
-
inverse:
|
|
117
|
+
inverse: chunkFL472AMI_cjs.META_EDGE_BROADER,
|
|
118
118
|
inference: "hierarchy",
|
|
119
119
|
description: "Narrower concept (AI narrower ML)"
|
|
120
120
|
});
|
|
@@ -125,7 +125,7 @@ function narrower(broaderConcept, narrowerConcept) {
|
|
|
125
125
|
to: narrowerConcept
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
var relatedToMetaEdge = createMetaEdge(
|
|
128
|
+
var relatedToMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_RELATED_TO, {
|
|
129
129
|
symmetric: true,
|
|
130
130
|
inference: "association",
|
|
131
131
|
description: "Non-hierarchical association"
|
|
@@ -137,7 +137,7 @@ function relatedTo(conceptA, conceptB) {
|
|
|
137
137
|
to: conceptB
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
var equivalentToMetaEdge = createMetaEdge(
|
|
140
|
+
var equivalentToMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_EQUIVALENT_TO, {
|
|
141
141
|
symmetric: true,
|
|
142
142
|
transitive: true,
|
|
143
143
|
inference: "substitution",
|
|
@@ -150,7 +150,7 @@ function equivalentTo(kindA, kindBOrIri) {
|
|
|
150
150
|
to: kindBOrIri
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
var sameAsMetaEdge = createMetaEdge(
|
|
153
|
+
var sameAsMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_SAME_AS, {
|
|
154
154
|
symmetric: true,
|
|
155
155
|
transitive: true,
|
|
156
156
|
inference: "substitution",
|
|
@@ -163,7 +163,7 @@ function sameAs(kindA, kindBOrIri) {
|
|
|
163
163
|
to: kindBOrIri
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
var differentFromMetaEdge = createMetaEdge(
|
|
166
|
+
var differentFromMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_DIFFERENT_FROM, {
|
|
167
167
|
symmetric: true,
|
|
168
168
|
inference: "constraint",
|
|
169
169
|
description: "Explicitly different individuals"
|
|
@@ -175,7 +175,7 @@ function differentFrom(kindA, kindB) {
|
|
|
175
175
|
to: kindB
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
var disjointWithMetaEdge = createMetaEdge(
|
|
178
|
+
var disjointWithMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_DISJOINT_WITH, {
|
|
179
179
|
symmetric: true,
|
|
180
180
|
inference: "constraint",
|
|
181
181
|
description: "Mutually exclusive types"
|
|
@@ -187,9 +187,9 @@ function disjointWith(kindA, kindB) {
|
|
|
187
187
|
to: kindB
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
var partOfMetaEdge = createMetaEdge(
|
|
190
|
+
var partOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_PART_OF, {
|
|
191
191
|
transitive: true,
|
|
192
|
-
inverse:
|
|
192
|
+
inverse: chunkFL472AMI_cjs.META_EDGE_HAS_PART,
|
|
193
193
|
inference: "composition",
|
|
194
194
|
description: "X is part of Y"
|
|
195
195
|
});
|
|
@@ -200,9 +200,9 @@ function partOf(part, whole) {
|
|
|
200
200
|
to: whole
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
var hasPartMetaEdge = createMetaEdge(
|
|
203
|
+
var hasPartMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_HAS_PART, {
|
|
204
204
|
transitive: true,
|
|
205
|
-
inverse:
|
|
205
|
+
inverse: chunkFL472AMI_cjs.META_EDGE_PART_OF,
|
|
206
206
|
inference: "composition",
|
|
207
207
|
description: "Y has part X"
|
|
208
208
|
});
|
|
@@ -213,12 +213,12 @@ function hasPart(whole, part) {
|
|
|
213
213
|
to: part
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
var inverseOfMetaEdge = createMetaEdge(
|
|
216
|
+
var inverseOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_INVERSE_OF, {
|
|
217
217
|
symmetric: true,
|
|
218
218
|
inference: "none",
|
|
219
219
|
description: "Edge A is inverse of edge B"
|
|
220
220
|
});
|
|
221
|
-
var impliesMetaEdge = createMetaEdge(
|
|
221
|
+
var impliesMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_IMPLIES, {
|
|
222
222
|
transitive: true,
|
|
223
223
|
inference: "none",
|
|
224
224
|
description: "Edge A implies edge B exists"
|
|
@@ -872,7 +872,7 @@ var KindRegistry = class {
|
|
|
872
872
|
* Checks if child is a subclass of parent (directly or transitively).
|
|
873
873
|
*/
|
|
874
874
|
isSubClassOf(child, parent) {
|
|
875
|
-
return
|
|
875
|
+
return chunkFL472AMI_cjs.isReachable(this.subClassAncestors, child, parent);
|
|
876
876
|
}
|
|
877
877
|
/**
|
|
878
878
|
* Expands a kind to include all its subclasses.
|
|
@@ -899,13 +899,13 @@ var KindRegistry = class {
|
|
|
899
899
|
* Checks if narrowerConcept is narrower than broaderConcept.
|
|
900
900
|
*/
|
|
901
901
|
isNarrowerThan(narrowerConcept, broaderConcept) {
|
|
902
|
-
return
|
|
902
|
+
return chunkFL472AMI_cjs.isReachable(this.broaderClosure, narrowerConcept, broaderConcept);
|
|
903
903
|
}
|
|
904
904
|
/**
|
|
905
905
|
* Checks if broaderConcept is broader than narrowerConcept.
|
|
906
906
|
*/
|
|
907
907
|
isBroaderThan(broaderConcept, narrowerConcept) {
|
|
908
|
-
return
|
|
908
|
+
return chunkFL472AMI_cjs.isReachable(this.narrowerClosure, broaderConcept, narrowerConcept);
|
|
909
909
|
}
|
|
910
910
|
/**
|
|
911
911
|
* Expands to include all narrower concepts.
|
|
@@ -969,7 +969,7 @@ var KindRegistry = class {
|
|
|
969
969
|
* Checks if part is part of whole (directly or transitively).
|
|
970
970
|
*/
|
|
971
971
|
isPartOf(part, whole) {
|
|
972
|
-
return
|
|
972
|
+
return chunkFL472AMI_cjs.isReachable(this.partOfClosure, part, whole);
|
|
973
973
|
}
|
|
974
974
|
/**
|
|
975
975
|
* Gets all wholes that contain this part.
|
|
@@ -1027,6 +1027,17 @@ var KindRegistry = class {
|
|
|
1027
1027
|
if (concreteKind === targetKind) return true;
|
|
1028
1028
|
return this.isSubClassOf(concreteKind, targetKind);
|
|
1029
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Checks if a concrete kind is assignable to at least one of the given
|
|
1032
|
+
* target kinds. Shared by every "is this kind usable where one of these
|
|
1033
|
+
* kinds is expected" check (edge endpoint validation, ontology relation
|
|
1034
|
+
* endpoint compatibility) so they can't independently drift.
|
|
1035
|
+
*/
|
|
1036
|
+
isAssignableToAny(concreteKind, targetKinds) {
|
|
1037
|
+
return targetKinds.some(
|
|
1038
|
+
(targetKind) => this.isAssignableTo(concreteKind, targetKind)
|
|
1039
|
+
);
|
|
1040
|
+
}
|
|
1030
1041
|
/**
|
|
1031
1042
|
* Validates that a kind exists in the registry.
|
|
1032
1043
|
*/
|
|
@@ -1080,57 +1091,57 @@ function computeClosuresFromOntology(ontology) {
|
|
|
1080
1091
|
const fromName = getKindName(relation.from);
|
|
1081
1092
|
const toName = getKindName(relation.to);
|
|
1082
1093
|
switch (relation.metaEdge.name) {
|
|
1083
|
-
case
|
|
1094
|
+
case chunkFL472AMI_cjs.META_EDGE_SUB_CLASS_OF: {
|
|
1084
1095
|
subClassRelations.push([fromName, toName]);
|
|
1085
1096
|
break;
|
|
1086
1097
|
}
|
|
1087
|
-
case
|
|
1098
|
+
case chunkFL472AMI_cjs.META_EDGE_BROADER: {
|
|
1088
1099
|
broaderRelations.push([fromName, toName]);
|
|
1089
1100
|
break;
|
|
1090
1101
|
}
|
|
1091
|
-
case
|
|
1102
|
+
case chunkFL472AMI_cjs.META_EDGE_NARROWER: {
|
|
1092
1103
|
broaderRelations.push([toName, fromName]);
|
|
1093
1104
|
break;
|
|
1094
1105
|
}
|
|
1095
|
-
case
|
|
1096
|
-
case
|
|
1106
|
+
case chunkFL472AMI_cjs.META_EDGE_EQUIVALENT_TO:
|
|
1107
|
+
case chunkFL472AMI_cjs.META_EDGE_SAME_AS: {
|
|
1097
1108
|
equivalentRelations.push([fromName, toName]);
|
|
1098
1109
|
break;
|
|
1099
1110
|
}
|
|
1100
|
-
case
|
|
1111
|
+
case chunkFL472AMI_cjs.META_EDGE_DISJOINT_WITH: {
|
|
1101
1112
|
disjointRelations.push([fromName, toName]);
|
|
1102
1113
|
break;
|
|
1103
1114
|
}
|
|
1104
|
-
case
|
|
1115
|
+
case chunkFL472AMI_cjs.META_EDGE_PART_OF: {
|
|
1105
1116
|
partOfRelations.push([fromName, toName]);
|
|
1106
1117
|
break;
|
|
1107
1118
|
}
|
|
1108
|
-
case
|
|
1119
|
+
case chunkFL472AMI_cjs.META_EDGE_HAS_PART: {
|
|
1109
1120
|
partOfRelations.push([toName, fromName]);
|
|
1110
1121
|
break;
|
|
1111
1122
|
}
|
|
1112
|
-
case
|
|
1123
|
+
case chunkFL472AMI_cjs.META_EDGE_INVERSE_OF: {
|
|
1113
1124
|
inverseOfRelations.push([fromName, toName]);
|
|
1114
1125
|
break;
|
|
1115
1126
|
}
|
|
1116
|
-
case
|
|
1127
|
+
case chunkFL472AMI_cjs.META_EDGE_IMPLIES: {
|
|
1117
1128
|
impliesRelations.push([fromName, toName]);
|
|
1118
1129
|
break;
|
|
1119
1130
|
}
|
|
1120
1131
|
}
|
|
1121
1132
|
}
|
|
1122
|
-
const subClassAncestors =
|
|
1123
|
-
const subClassDescendants =
|
|
1124
|
-
const broaderClosure =
|
|
1125
|
-
const narrowerClosure =
|
|
1133
|
+
const subClassAncestors = chunkFL472AMI_cjs.computeTransitiveClosure(subClassRelations);
|
|
1134
|
+
const subClassDescendants = chunkFL472AMI_cjs.invertClosure(subClassAncestors);
|
|
1135
|
+
const broaderClosure = chunkFL472AMI_cjs.computeTransitiveClosure(broaderRelations);
|
|
1136
|
+
const narrowerClosure = chunkFL472AMI_cjs.invertClosure(broaderClosure);
|
|
1126
1137
|
const equivalenceSets = computeEquivalenceSets(equivalentRelations);
|
|
1127
1138
|
const iriToKind = computeIriMapping(equivalentRelations);
|
|
1128
1139
|
const disjointPairs = computeDisjointPairs(disjointRelations);
|
|
1129
|
-
const partOfClosure =
|
|
1130
|
-
const hasPartClosure =
|
|
1140
|
+
const partOfClosure = chunkFL472AMI_cjs.computeTransitiveClosure(partOfRelations);
|
|
1141
|
+
const hasPartClosure = chunkFL472AMI_cjs.invertClosure(partOfClosure);
|
|
1131
1142
|
const edgeInverses = computeEdgeInverses(inverseOfRelations);
|
|
1132
|
-
const edgeImplicationsClosure =
|
|
1133
|
-
const edgeImplyingClosure =
|
|
1143
|
+
const edgeImplicationsClosure = chunkFL472AMI_cjs.computeTransitiveClosure(impliesRelations);
|
|
1144
|
+
const edgeImplyingClosure = chunkFL472AMI_cjs.invertClosure(edgeImplicationsClosure);
|
|
1134
1145
|
return {
|
|
1135
1146
|
subClassAncestors,
|
|
1136
1147
|
subClassDescendants,
|
|
@@ -1234,7 +1245,7 @@ function serializeSchema(graph, version) {
|
|
|
1234
1245
|
return {
|
|
1235
1246
|
graphId: graph.id,
|
|
1236
1247
|
version,
|
|
1237
|
-
generatedAt:
|
|
1248
|
+
generatedAt: chunkBLZDPRXT_cjs.nowIso(),
|
|
1238
1249
|
nodes,
|
|
1239
1250
|
edges,
|
|
1240
1251
|
ontology,
|
|
@@ -1265,7 +1276,7 @@ function serializeDeprecatedKinds(set) {
|
|
|
1265
1276
|
function canonicalExtension(document) {
|
|
1266
1277
|
if (document === void 0) return void 0;
|
|
1267
1278
|
if (document.version === void 0) return document;
|
|
1268
|
-
if (document.version !==
|
|
1279
|
+
if (document.version !== chunkFL472AMI_cjs.LEGACY_GRAPH_EXTENSION_VERSION) return document;
|
|
1269
1280
|
const { version: _omit, ...rest } = document;
|
|
1270
1281
|
return rest;
|
|
1271
1282
|
}
|
|
@@ -1314,6 +1325,16 @@ function serializeNodeIndexDeclaration(declaration) {
|
|
|
1314
1325
|
unique: declaration.unique,
|
|
1315
1326
|
scope: declaration.scope,
|
|
1316
1327
|
where: declaration.where,
|
|
1328
|
+
// `method: "btree"` is canonicalized by absence, like `origin` below.
|
|
1329
|
+
...declaration.method === void 0 ? {} : { method: declaration.method },
|
|
1330
|
+
// `keySystemColumns: []` is canonicalized by absence, same rule. Checked
|
|
1331
|
+
// against length, not just `undefined` — `NodeIndexDeclaration` is
|
|
1332
|
+
// exported and `defineGraph` accepts pre-built declarations directly
|
|
1333
|
+
// (bypassing `defineNodeIndex`'s own canonicalization and the
|
|
1334
|
+
// `nodeIndexDeclarationZod` parse boundary, which rejects an explicit
|
|
1335
|
+
// `[]` via `.min(1)`), so an in-memory declaration can still carry a
|
|
1336
|
+
// present-but-empty array that must canonicalize to absent here.
|
|
1337
|
+
...declaration.keySystemColumns === void 0 || declaration.keySystemColumns.length === 0 ? {} : { keySystemColumns: declaration.keySystemColumns },
|
|
1317
1338
|
// `origin: "compile-time"` is the default and is omitted from the
|
|
1318
1339
|
// canonical form (absence == compile-time). Only `runtime` is
|
|
1319
1340
|
// emitted explicitly so the restart loader can route the declaration
|
|
@@ -1334,12 +1355,14 @@ function serializeEdgeIndexDeclaration(declaration) {
|
|
|
1334
1355
|
unique: declaration.unique,
|
|
1335
1356
|
scope: declaration.scope,
|
|
1336
1357
|
where: declaration.where,
|
|
1358
|
+
// `method: "btree"` is canonicalized by absence, like `origin`.
|
|
1359
|
+
...declaration.method === void 0 ? {} : { method: declaration.method },
|
|
1337
1360
|
...declaration.origin === "runtime" ? { origin: "runtime" } : {}
|
|
1338
1361
|
};
|
|
1339
1362
|
}
|
|
1340
1363
|
function serializeNodes(graph) {
|
|
1341
1364
|
const result = {};
|
|
1342
|
-
for (const kindName of
|
|
1365
|
+
for (const kindName of chunkVPYHY3LJ_cjs.getNodeKinds(graph)) {
|
|
1343
1366
|
const registration = graph.nodes[kindName];
|
|
1344
1367
|
if (registration === void 0) continue;
|
|
1345
1368
|
result[kindName] = serializeNodeDef(registration);
|
|
@@ -1407,7 +1430,7 @@ function deserializeWherePredicate(serialized) {
|
|
|
1407
1430
|
}
|
|
1408
1431
|
function serializeEdges(graph) {
|
|
1409
1432
|
const result = {};
|
|
1410
|
-
for (const kindName of
|
|
1433
|
+
for (const kindName of chunkVPYHY3LJ_cjs.getEdgeKinds(graph)) {
|
|
1411
1434
|
const registration = graph.edges[kindName];
|
|
1412
1435
|
if (registration === void 0) continue;
|
|
1413
1436
|
result[kindName] = serializeEdgeDef(registration);
|
|
@@ -1509,11 +1532,7 @@ function mapToRecord(map) {
|
|
|
1509
1532
|
return result;
|
|
1510
1533
|
}
|
|
1511
1534
|
function mapToSimpleRecord(map) {
|
|
1512
|
-
|
|
1513
|
-
for (const [key, value] of map) {
|
|
1514
|
-
result[key] = value;
|
|
1515
|
-
}
|
|
1516
|
-
return result;
|
|
1535
|
+
return Object.fromEntries(map);
|
|
1517
1536
|
}
|
|
1518
1537
|
var SCHEMA_PROPERTIES_CACHE = /* @__PURE__ */ new WeakMap();
|
|
1519
1538
|
function serializeSchemaProperties(schema) {
|
|
@@ -1556,7 +1575,7 @@ async function computeSchemaHash(schema) {
|
|
|
1556
1575
|
...schema.deprecatedKinds === void 0 ? {} : { deprecatedKinds: schema.deprecatedKinds }
|
|
1557
1576
|
};
|
|
1558
1577
|
const json = JSON.stringify(hashable, chunkACSVZPK7_cjs.sortedReplacer);
|
|
1559
|
-
return
|
|
1578
|
+
return chunkTEDRJXOG_cjs.sha256Hex(json);
|
|
1560
1579
|
}
|
|
1561
1580
|
var COMPILE_NODE_CACHE = /* @__PURE__ */ new Map();
|
|
1562
1581
|
var COMPILE_EDGE_SCHEMA_CACHE = /* @__PURE__ */ new WeakMap();
|
|
@@ -1672,7 +1691,7 @@ function compileProperty(property) {
|
|
|
1672
1691
|
}
|
|
1673
1692
|
function compileStringProperty(property) {
|
|
1674
1693
|
if (property.searchable !== void 0) {
|
|
1675
|
-
return applyStringRefinements(
|
|
1694
|
+
return applyStringRefinements(chunkH7YNSMA7_cjs.searchable(property.searchable), property);
|
|
1676
1695
|
}
|
|
1677
1696
|
if (property.format === void 0) {
|
|
1678
1697
|
return applyStringRefinements(zod.z.string(), property);
|
|
@@ -1722,7 +1741,7 @@ function compileEnumProperty(property) {
|
|
|
1722
1741
|
}
|
|
1723
1742
|
function compileArrayProperty(property) {
|
|
1724
1743
|
if (property.embedding !== void 0) {
|
|
1725
|
-
return
|
|
1744
|
+
return chunkH7YNSMA7_cjs.embedding(property.embedding.dimensions);
|
|
1726
1745
|
}
|
|
1727
1746
|
const inner = compilePropertyForArrayItem(property.items);
|
|
1728
1747
|
return zod.z.array(inner);
|
|
@@ -1762,7 +1781,7 @@ function makeWherePredicate(field, op) {
|
|
|
1762
1781
|
};
|
|
1763
1782
|
}
|
|
1764
1783
|
var META_EDGE_BY_NAME = Object.fromEntries(
|
|
1765
|
-
|
|
1784
|
+
chunkFL472AMI_cjs.ALL_META_EDGE_NAMES.map((name) => [name, core[`${name}MetaEdge`]])
|
|
1766
1785
|
);
|
|
1767
1786
|
function compileOntologyRelation(relation, nodeTypeByName) {
|
|
1768
1787
|
const metaEdge = META_EDGE_BY_NAME[relation.metaEdge];
|
|
@@ -1801,7 +1820,7 @@ function mergeGraphExtension(graph, document) {
|
|
|
1801
1820
|
if (graph.extension !== void 0 && chunkACSVZPK7_cjs.canonicalEqual(unionDocument, existingDocument)) {
|
|
1802
1821
|
return graph;
|
|
1803
1822
|
}
|
|
1804
|
-
const validatedUnion =
|
|
1823
|
+
const validatedUnion = chunkFL472AMI_cjs.unwrap(chunkFL472AMI_cjs.validateGraphExtension(unionDocument));
|
|
1805
1824
|
const compiled = compileGraphExtension(validatedUnion);
|
|
1806
1825
|
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = extensionKindNames(existingDocument);
|
|
1807
1826
|
const nodeKinds = /* @__PURE__ */ new Map();
|
|
@@ -1903,7 +1922,7 @@ function deriveGraphExtensionVectorIndexes(compiledNodes) {
|
|
|
1903
1922
|
...compiled.unique.length === 0 ? {} : { unique: [...compiled.unique] }
|
|
1904
1923
|
};
|
|
1905
1924
|
}
|
|
1906
|
-
return
|
|
1925
|
+
return chunkVPYHY3LJ_cjs.autoDeriveVectorIndexes(registrations).map(
|
|
1907
1926
|
(index) => Object.freeze({ ...index, origin: "runtime" })
|
|
1908
1927
|
);
|
|
1909
1928
|
}
|
|
@@ -1921,7 +1940,7 @@ function mergeIndexesWithGraphExtension(existing, runtimeIndexes, graphId) {
|
|
|
1921
1940
|
const runtimeRelational = runtimeIndexes.filter(
|
|
1922
1941
|
(index) => index.entity !== "vector"
|
|
1923
1942
|
);
|
|
1924
|
-
const vectorMerged =
|
|
1943
|
+
const vectorMerged = chunkVPYHY3LJ_cjs.mergeVectorIndexes(compileTimeIndexes, runtimeVectors);
|
|
1925
1944
|
const merged = [...vectorMerged, ...runtimeRelational];
|
|
1926
1945
|
assertUniqueIndexNames(merged, graphId);
|
|
1927
1946
|
return merged;
|
|
@@ -1933,7 +1952,7 @@ function assertUniqueIndexNames(indexes, graphId) {
|
|
|
1933
1952
|
seen.add(index.name);
|
|
1934
1953
|
continue;
|
|
1935
1954
|
}
|
|
1936
|
-
throw new
|
|
1955
|
+
throw new chunkLGEALRC6_cjs.ConfigurationError(
|
|
1937
1956
|
`Duplicate index name "${index.name}" after merging graph extension into graph "${graphId}". Index names must be unique within a graph.`,
|
|
1938
1957
|
{ graphId, indexName: index.name, code: "DUPLICATE_INDEX_NAME" },
|
|
1939
1958
|
{
|
|
@@ -1949,12 +1968,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1949
1968
|
if (document.entity === "node") {
|
|
1950
1969
|
const node = nodeKinds.get(document.kind);
|
|
1951
1970
|
if (node === void 0) {
|
|
1952
|
-
throw new
|
|
1971
|
+
throw new chunkLGEALRC6_cjs.KindNotFoundError(document.kind, "node", {
|
|
1953
1972
|
graphId,
|
|
1954
1973
|
suggestion: "Declare the kind under `nodes` in this graph extension, or remove the index from `indexes`."
|
|
1955
1974
|
});
|
|
1956
1975
|
}
|
|
1957
|
-
const declaration2 =
|
|
1976
|
+
const declaration2 = chunkUUT7UN2N_cjs.defineNodeIndex(
|
|
1958
1977
|
node,
|
|
1959
1978
|
toNodeIndexConfig(document)
|
|
1960
1979
|
);
|
|
@@ -1963,12 +1982,12 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
|
|
|
1963
1982
|
}
|
|
1964
1983
|
const edgeRegistration = mergedEdges[document.kind];
|
|
1965
1984
|
if (edgeRegistration === void 0) {
|
|
1966
|
-
throw new
|
|
1985
|
+
throw new chunkLGEALRC6_cjs.KindNotFoundError(document.kind, "edge", {
|
|
1967
1986
|
graphId,
|
|
1968
1987
|
suggestion: "Declare the edge under `edges` in this graph extension, or remove the index from `indexes`."
|
|
1969
1988
|
});
|
|
1970
1989
|
}
|
|
1971
|
-
const declaration =
|
|
1990
|
+
const declaration = chunkUUT7UN2N_cjs.defineEdgeIndex(
|
|
1972
1991
|
edgeRegistration.type,
|
|
1973
1992
|
toEdgeIndexConfig(document)
|
|
1974
1993
|
);
|
|
@@ -1980,7 +1999,7 @@ function buildWhereCallback(where) {
|
|
|
1980
1999
|
return (props) => {
|
|
1981
2000
|
const builder = props[where.field];
|
|
1982
2001
|
if (builder === void 0) {
|
|
1983
|
-
throw new
|
|
2002
|
+
throw new chunkLGEALRC6_cjs.ConfigurationError(
|
|
1984
2003
|
`Graph-extension index \`where\` references unknown field "${where.field}".`,
|
|
1985
2004
|
{ field: where.field, code: "EXTENSION_INDEX_WHERE_UNKNOWN_FIELD" }
|
|
1986
2005
|
);
|
|
@@ -2055,14 +2074,14 @@ function isEmptyExtension(extension) {
|
|
|
2055
2074
|
}
|
|
2056
2075
|
function assertNoCollision(kindName, entity, collides, graphId) {
|
|
2057
2076
|
if (!collides) return;
|
|
2058
|
-
throw new
|
|
2077
|
+
throw new chunkFL472AMI_cjs.KindCollisionError(kindName, entity, graphId);
|
|
2059
2078
|
}
|
|
2060
2079
|
function resolveEndpoints(entries, nodeKinds, context) {
|
|
2061
2080
|
return entries.map((entry) => {
|
|
2062
2081
|
if (typeof entry !== "string") return entry;
|
|
2063
2082
|
const resolved = nodeKinds.get(entry);
|
|
2064
2083
|
if (resolved === void 0) {
|
|
2065
|
-
throw new
|
|
2084
|
+
throw new chunkFL472AMI_cjs.GraphExtensionUnresolvedEndpointError(
|
|
2066
2085
|
context.edgeKind,
|
|
2067
2086
|
context.side,
|
|
2068
2087
|
entry,
|
|
@@ -2077,6 +2096,94 @@ function resolveOntologyEndpoints(relation, nodeKinds) {
|
|
|
2077
2096
|
const to = typeof relation.to === "string" ? nodeKinds.get(relation.to) ?? relation.to : relation.to;
|
|
2078
2097
|
return { ...relation, from, to };
|
|
2079
2098
|
}
|
|
2099
|
+
|
|
2100
|
+
// src/registry/validate-implies.ts
|
|
2101
|
+
function validateImpliesEndpointCompatibility(edgeEndpoints, registry) {
|
|
2102
|
+
for (const [impliedEdgeKind, impliedEndpoints] of edgeEndpoints) {
|
|
2103
|
+
for (const implyingEdgeKind of registry.expandImplyingEdges(
|
|
2104
|
+
impliedEdgeKind
|
|
2105
|
+
)) {
|
|
2106
|
+
if (implyingEdgeKind === impliedEdgeKind) continue;
|
|
2107
|
+
const implyingEndpoints = edgeEndpoints.get(implyingEdgeKind);
|
|
2108
|
+
if (!implyingEndpoints) continue;
|
|
2109
|
+
assertEndpointCompatible(
|
|
2110
|
+
"from",
|
|
2111
|
+
implyingEdgeKind,
|
|
2112
|
+
implyingEndpoints.from,
|
|
2113
|
+
impliedEdgeKind,
|
|
2114
|
+
impliedEndpoints.from,
|
|
2115
|
+
registry
|
|
2116
|
+
);
|
|
2117
|
+
assertEndpointCompatible(
|
|
2118
|
+
"to",
|
|
2119
|
+
implyingEdgeKind,
|
|
2120
|
+
implyingEndpoints.to,
|
|
2121
|
+
impliedEdgeKind,
|
|
2122
|
+
impliedEndpoints.to,
|
|
2123
|
+
registry
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, impliedEdgeKind, impliedKinds, registry) {
|
|
2129
|
+
const incompatibleKinds = implyingKinds.filter(
|
|
2130
|
+
(kind) => !registry.isAssignableToAny(kind, impliedKinds)
|
|
2131
|
+
);
|
|
2132
|
+
if (incompatibleKinds.length === 0) return;
|
|
2133
|
+
throw new chunkLGEALRC6_cjs.ConfigurationError(
|
|
2134
|
+
`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(", ")}].`,
|
|
2135
|
+
{
|
|
2136
|
+
metaEdge: chunkFL472AMI_cjs.META_EDGE_IMPLIES,
|
|
2137
|
+
implyingEdge: implyingEdgeKind,
|
|
2138
|
+
impliedEdge: impliedEdgeKind,
|
|
2139
|
+
endpoint: side,
|
|
2140
|
+
incompatibleKinds,
|
|
2141
|
+
allowedKinds: impliedKinds
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
suggestion: `Add a subClassOf relation from each of [${incompatibleKinds.join(", ")}] to one of "${impliedEdgeKind}"'s ${side} kind(s) [${impliedKinds.join(", ")}], narrow "${implyingEdgeKind}"'s ${side} declaration to exclude [${incompatibleKinds.join(", ")}], or remove implies("${implyingEdgeKind}", "${impliedEdgeKind}").`
|
|
2145
|
+
}
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
// src/registry/builders.ts
|
|
2150
|
+
function buildKindRegistry(graph) {
|
|
2151
|
+
const nodeTypes = extractNodeTypes(graph);
|
|
2152
|
+
const edgeTypes = extractEdgeTypes(graph);
|
|
2153
|
+
const closures = graph.ontology.length > 0 ? computeClosuresFromOntology(graph.ontology) : createEmptyClosures();
|
|
2154
|
+
const registry = new KindRegistry(nodeTypes, edgeTypes, closures);
|
|
2155
|
+
validateImpliesEndpointCompatibility(
|
|
2156
|
+
buildEdgeEndpointKinds(graph.edges),
|
|
2157
|
+
registry
|
|
2158
|
+
);
|
|
2159
|
+
return registry;
|
|
2160
|
+
}
|
|
2161
|
+
function buildEdgeEndpointKinds(edges) {
|
|
2162
|
+
const result = /* @__PURE__ */ new Map();
|
|
2163
|
+
for (const [kind, registration] of Object.entries(edges)) {
|
|
2164
|
+
result.set(kind, {
|
|
2165
|
+
from: registration.from.map((node) => node.kind),
|
|
2166
|
+
to: registration.to.map((node) => node.kind)
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
return result;
|
|
2170
|
+
}
|
|
2171
|
+
function extractNodeTypes(graph) {
|
|
2172
|
+
const result = /* @__PURE__ */ new Map();
|
|
2173
|
+
for (const typeName of chunkVPYHY3LJ_cjs.getNodeKinds(graph)) {
|
|
2174
|
+
const registration = graph.nodes[typeName];
|
|
2175
|
+
result.set(typeName, registration.type);
|
|
2176
|
+
}
|
|
2177
|
+
return result;
|
|
2178
|
+
}
|
|
2179
|
+
function extractEdgeTypes(graph) {
|
|
2180
|
+
const result = /* @__PURE__ */ new Map();
|
|
2181
|
+
for (const typeName of chunkVPYHY3LJ_cjs.getEdgeKinds(graph)) {
|
|
2182
|
+
const registration = graph.edges[typeName];
|
|
2183
|
+
result.set(typeName, registration.type);
|
|
2184
|
+
}
|
|
2185
|
+
return result;
|
|
2186
|
+
}
|
|
2080
2187
|
var deleteBehaviorZod = zod.z.enum(["restrict", "cascade", "disconnect"]);
|
|
2081
2188
|
var cardinalityZod = zod.z.enum(["many", "one", "unique", "oneActive"]);
|
|
2082
2189
|
var endpointExistenceZod = zod.z.enum(["notDeleted", "currentlyValid", "ever"]);
|
|
@@ -2126,6 +2233,12 @@ var systemColumnNameZod = zod.z.enum([
|
|
|
2126
2233
|
"updated_at",
|
|
2127
2234
|
"version"
|
|
2128
2235
|
]);
|
|
2236
|
+
var nodeSystemColumnNameZod = systemColumnNameZod.exclude([
|
|
2237
|
+
"from_kind",
|
|
2238
|
+
"from_id",
|
|
2239
|
+
"to_kind",
|
|
2240
|
+
"to_id"
|
|
2241
|
+
]);
|
|
2129
2242
|
var indexWhereOperandZod = zod.z.discriminatedUnion("__type", [
|
|
2130
2243
|
zod.z.object({
|
|
2131
2244
|
__type: zod.z.literal("index_operand_system"),
|
|
@@ -2202,7 +2315,13 @@ var indexDeclarationCommonShape = {
|
|
|
2202
2315
|
var nodeIndexDeclarationZod = zod.z.object({
|
|
2203
2316
|
entity: zod.z.literal("node"),
|
|
2204
2317
|
kind: zod.z.string(),
|
|
2205
|
-
...indexDeclarationCommonShape
|
|
2318
|
+
...indexDeclarationCommonShape,
|
|
2319
|
+
// Node-only; canonicalized by absence like `method`, so absent/optional
|
|
2320
|
+
// here matches `defineNodeIndex` only emitting it when non-empty.
|
|
2321
|
+
// `.min(1)` rejects an explicit `[]` at the boundary rather than
|
|
2322
|
+
// silently accepting a present-but-empty array that would have to be
|
|
2323
|
+
// canonicalized away again downstream (see `serializeNodeIndexDeclaration`).
|
|
2324
|
+
keySystemColumns: zod.z.array(nodeSystemColumnNameZod).min(1).optional()
|
|
2206
2325
|
}).loose();
|
|
2207
2326
|
var edgeIndexDeclarationZod = zod.z.object({
|
|
2208
2327
|
entity: zod.z.literal("edge"),
|
|
@@ -2407,7 +2526,7 @@ function parseSerializedSchema(json) {
|
|
|
2407
2526
|
try {
|
|
2408
2527
|
parsed = JSON.parse(json);
|
|
2409
2528
|
} catch {
|
|
2410
|
-
throw new
|
|
2529
|
+
throw new chunkLGEALRC6_cjs.DatabaseOperationError(
|
|
2411
2530
|
"Stored schema document is not valid JSON",
|
|
2412
2531
|
{ operation: "select", entity: "schema" }
|
|
2413
2532
|
);
|
|
@@ -2415,7 +2534,7 @@ function parseSerializedSchema(json) {
|
|
|
2415
2534
|
const result = serializedSchemaZod.safeParse(parsed);
|
|
2416
2535
|
if (!result.success) {
|
|
2417
2536
|
const issues = result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
|
|
2418
|
-
throw new
|
|
2537
|
+
throw new chunkLGEALRC6_cjs.DatabaseOperationError(
|
|
2419
2538
|
`Stored schema document is malformed: ${issues}`,
|
|
2420
2539
|
{ operation: "select", entity: "schema" }
|
|
2421
2540
|
);
|
|
@@ -2432,7 +2551,7 @@ async function loadActiveSchemaWithBootstrap(backend, graphId) {
|
|
|
2432
2551
|
try {
|
|
2433
2552
|
return await backend.getActiveSchema(graphId);
|
|
2434
2553
|
} catch (error) {
|
|
2435
|
-
if (backend.bootstrapTables &&
|
|
2554
|
+
if (backend.bootstrapTables && chunkBLZDPRXT_cjs.isMissingTableError(error)) {
|
|
2436
2555
|
await backend.bootstrapTables();
|
|
2437
2556
|
return await backend.getActiveSchema(graphId);
|
|
2438
2557
|
}
|
|
@@ -2526,7 +2645,7 @@ async function ensureSchema(backend, graph, options) {
|
|
|
2526
2645
|
}
|
|
2527
2646
|
const actions = getMigrationActions(diff);
|
|
2528
2647
|
if (throwOnBreaking) {
|
|
2529
|
-
throw new
|
|
2648
|
+
throw new chunkLGEALRC6_cjs.MigrationError(
|
|
2530
2649
|
`Schema migration required: ${diff.summary}. ${actions.length} migration action(s) needed. Use getSchemaChanges() to review, then migrateSchema() to apply.`,
|
|
2531
2650
|
{
|
|
2532
2651
|
graphId: graph.id,
|
|
@@ -2562,7 +2681,7 @@ async function loadAndVerifyGraph(backend, graph) {
|
|
|
2562
2681
|
function schemaBehindError(graphId, fromVersion, diff) {
|
|
2563
2682
|
const actions = getMigrationActions(diff);
|
|
2564
2683
|
const qualifier = isBackwardsCompatible(diff) ? "safe auto-migration" : "breaking change";
|
|
2565
|
-
return new
|
|
2684
|
+
return new chunkLGEALRC6_cjs.MigrationError(
|
|
2566
2685
|
`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().`,
|
|
2567
2686
|
{
|
|
2568
2687
|
graphId,
|
|
@@ -2580,7 +2699,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2580
2699
|
try {
|
|
2581
2700
|
activeRow = await backend.getActiveSchema(graphId);
|
|
2582
2701
|
} catch (error) {
|
|
2583
|
-
if (
|
|
2702
|
+
if (chunkBLZDPRXT_cjs.isMissingTableError(error)) {
|
|
2584
2703
|
throw schemaNotInitializedError(graphId, error);
|
|
2585
2704
|
}
|
|
2586
2705
|
throw error;
|
|
@@ -2591,7 +2710,7 @@ async function readActiveSchemaPure(backend, graphId) {
|
|
|
2591
2710
|
return activeRow;
|
|
2592
2711
|
}
|
|
2593
2712
|
function schemaNotInitializedError(graphId, cause) {
|
|
2594
|
-
return new
|
|
2713
|
+
return new chunkLGEALRC6_cjs.ConfigurationError(
|
|
2595
2714
|
`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.`,
|
|
2596
2715
|
{ graphId },
|
|
2597
2716
|
{
|
|
@@ -2601,6 +2720,7 @@ function schemaNotInitializedError(graphId, cause) {
|
|
|
2601
2720
|
);
|
|
2602
2721
|
}
|
|
2603
2722
|
async function initializeSchema(backend, graph) {
|
|
2723
|
+
buildKindRegistry(graph);
|
|
2604
2724
|
const schema = serializeSchema(graph, 1);
|
|
2605
2725
|
const hash = await computeSchemaHash(schema);
|
|
2606
2726
|
return backend.commitSchemaVersion({
|
|
@@ -2620,6 +2740,7 @@ async function migrateSchema(backend, graph, currentVersion) {
|
|
|
2620
2740
|
return committed.version;
|
|
2621
2741
|
}
|
|
2622
2742
|
async function commitNewSchemaVersion(backend, graph, currentVersion) {
|
|
2743
|
+
buildKindRegistry(graph);
|
|
2623
2744
|
const newVersion = currentVersion + 1;
|
|
2624
2745
|
const schema = serializeSchema(graph, newVersion);
|
|
2625
2746
|
const hash = await computeSchemaHash(schema);
|
|
@@ -2634,7 +2755,7 @@ async function commitNewSchemaVersion(backend, graph, currentVersion) {
|
|
|
2634
2755
|
async function rollbackSchema(backend, graphId, targetVersion) {
|
|
2635
2756
|
const activeRow = await backend.getActiveSchema(graphId);
|
|
2636
2757
|
if (activeRow === void 0) {
|
|
2637
|
-
throw new
|
|
2758
|
+
throw new chunkLGEALRC6_cjs.MigrationError(
|
|
2638
2759
|
`Cannot rollback graph "${graphId}": no active schema version exists.`,
|
|
2639
2760
|
{ graphId, fromVersion: 0, toVersion: targetVersion }
|
|
2640
2761
|
);
|
|
@@ -2662,92 +2783,18 @@ async function getSchemaChanges(backend, graph) {
|
|
|
2662
2783
|
return computeSchemaDiff(storedSchema, currentSchema);
|
|
2663
2784
|
}
|
|
2664
2785
|
|
|
2665
|
-
// src/errors/validation.ts
|
|
2666
|
-
function zodIssuesToValidationIssues(error) {
|
|
2667
|
-
return error.issues.map((issue) => ({
|
|
2668
|
-
path: issue.path.join("."),
|
|
2669
|
-
message: issue.message,
|
|
2670
|
-
code: issue.code
|
|
2671
|
-
}));
|
|
2672
|
-
}
|
|
2673
|
-
function buildLocationString(context) {
|
|
2674
|
-
if (context.id) {
|
|
2675
|
-
return `${context.kind}/${context.id}`;
|
|
2676
|
-
}
|
|
2677
|
-
return `new ${context.kind}`;
|
|
2678
|
-
}
|
|
2679
|
-
function validateProps(schema, props, context) {
|
|
2680
|
-
const result = schema.safeParse(props);
|
|
2681
|
-
if (result.success) {
|
|
2682
|
-
return result.data;
|
|
2683
|
-
}
|
|
2684
|
-
const issues = zodIssuesToValidationIssues(result.error);
|
|
2685
|
-
const location = buildLocationString(context);
|
|
2686
|
-
throw new chunkJIEJCTDS_cjs.ValidationError(
|
|
2687
|
-
`Invalid ${context.entityType} props for ${location}: ${result.error.message}`,
|
|
2688
|
-
{
|
|
2689
|
-
entityType: context.entityType,
|
|
2690
|
-
kind: context.kind,
|
|
2691
|
-
operation: context.operation,
|
|
2692
|
-
...context.id !== void 0 && { id: context.id },
|
|
2693
|
-
issues
|
|
2694
|
-
},
|
|
2695
|
-
{ cause: result.error }
|
|
2696
|
-
);
|
|
2697
|
-
}
|
|
2698
|
-
function validateNodeProps(schema, props, context) {
|
|
2699
|
-
return validateProps(schema, props, {
|
|
2700
|
-
entityType: "node",
|
|
2701
|
-
...context
|
|
2702
|
-
});
|
|
2703
|
-
}
|
|
2704
|
-
function validateEdgeProps(schema, props, context) {
|
|
2705
|
-
return validateProps(schema, props, {
|
|
2706
|
-
entityType: "edge",
|
|
2707
|
-
...context
|
|
2708
|
-
});
|
|
2709
|
-
}
|
|
2710
|
-
function wrapZodError(error, context) {
|
|
2711
|
-
const issues = zodIssuesToValidationIssues(error);
|
|
2712
|
-
const location = buildLocationString(context);
|
|
2713
|
-
return new chunkJIEJCTDS_cjs.ValidationError(
|
|
2714
|
-
`Validation failed for ${context.entityType} ${location}: ${error.message}`,
|
|
2715
|
-
{
|
|
2716
|
-
entityType: context.entityType,
|
|
2717
|
-
kind: context.kind,
|
|
2718
|
-
operation: context.operation,
|
|
2719
|
-
...context.id !== void 0 && { id: context.id },
|
|
2720
|
-
issues
|
|
2721
|
-
},
|
|
2722
|
-
{ cause: error }
|
|
2723
|
-
);
|
|
2724
|
-
}
|
|
2725
|
-
function createValidationError(message, issues, context) {
|
|
2726
|
-
return new chunkJIEJCTDS_cjs.ValidationError(message, {
|
|
2727
|
-
...context?.entityType !== void 0 && {
|
|
2728
|
-
entityType: context.entityType
|
|
2729
|
-
},
|
|
2730
|
-
...context?.kind !== void 0 && { kind: context.kind },
|
|
2731
|
-
...context?.operation !== void 0 && { operation: context.operation },
|
|
2732
|
-
...context?.id !== void 0 && { id: context.id },
|
|
2733
|
-
issues
|
|
2734
|
-
});
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
2786
|
exports.KindRegistry = KindRegistry;
|
|
2738
2787
|
exports.META_EDGE_BRAND = META_EDGE_BRAND;
|
|
2739
2788
|
exports.applyDeprecatedKinds = applyDeprecatedKinds;
|
|
2740
2789
|
exports.assertSchemaCurrent = assertSchemaCurrent;
|
|
2741
2790
|
exports.broader = broader;
|
|
2742
2791
|
exports.buildGraphExtensionOntologyKeySet = buildGraphExtensionOntologyKeySet;
|
|
2792
|
+
exports.buildKindRegistry = buildKindRegistry;
|
|
2743
2793
|
exports.commitNewSchemaVersion = commitNewSchemaVersion;
|
|
2744
2794
|
exports.compileTimeOntologyKey = compileTimeOntologyKey;
|
|
2745
|
-
exports.computeClosuresFromOntology = computeClosuresFromOntology;
|
|
2746
2795
|
exports.computeSchemaDiff = computeSchemaDiff;
|
|
2747
2796
|
exports.computeSchemaHash = computeSchemaHash;
|
|
2748
2797
|
exports.core = core;
|
|
2749
|
-
exports.createEmptyClosures = createEmptyClosures;
|
|
2750
|
-
exports.createValidationError = createValidationError;
|
|
2751
2798
|
exports.defineEdge = defineEdge;
|
|
2752
2799
|
exports.defineNode = defineNode;
|
|
2753
2800
|
exports.deserializeWherePredicate = deserializeWherePredicate;
|
|
@@ -2778,12 +2825,10 @@ exports.partOf = partOf;
|
|
|
2778
2825
|
exports.relatedTo = relatedTo;
|
|
2779
2826
|
exports.rollbackSchema = rollbackSchema;
|
|
2780
2827
|
exports.sameAs = sameAs;
|
|
2828
|
+
exports.serializeIndexDeclaration = serializeIndexDeclaration;
|
|
2781
2829
|
exports.serializeSchema = serializeSchema;
|
|
2782
2830
|
exports.serializeSchemaProperties = serializeSchemaProperties;
|
|
2783
2831
|
exports.subClassOf = subClassOf;
|
|
2784
|
-
exports.
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
exports.wrapZodError = wrapZodError;
|
|
2788
|
-
//# sourceMappingURL=chunk-6HVOHZHS.cjs.map
|
|
2789
|
-
//# sourceMappingURL=chunk-6HVOHZHS.cjs.map
|
|
2832
|
+
exports.validateImpliesEndpointCompatibility = validateImpliesEndpointCompatibility;
|
|
2833
|
+
//# sourceMappingURL=chunk-CK5BVQOW.cjs.map
|
|
2834
|
+
//# sourceMappingURL=chunk-CK5BVQOW.cjs.map
|