@nicia-ai/typegraph 0.48.0 → 0.50.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 +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +56 -52
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +11 -11
- package/dist/backend/postgres/index.cjs +34 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +17 -15
- package/dist/backend/postgres/pglite-store.cjs +36 -35
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +32 -31
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +19 -17
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +18 -16
- package/dist/backend/sqlite/index.cjs +31 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +15 -13
- package/dist/backend/sqlite/libsql.cjs +22 -20
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +17 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +37 -36
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +33 -32
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +20 -18
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -16
- package/dist/{chunk-AX6JGVTZ.js → chunk-2CYI5HRH.js} +276 -206
- package/dist/chunk-2CYI5HRH.js.map +1 -0
- package/dist/{chunk-KF6K7TGH.js → chunk-2GIV5X4P.js} +702 -422
- package/dist/chunk-2GIV5X4P.js.map +1 -0
- package/dist/{chunk-2TYSSBU5.js → chunk-2Q45FAIE.js} +15 -15
- package/dist/{chunk-2TYSSBU5.js.map → chunk-2Q45FAIE.js.map} +1 -1
- package/dist/{chunk-WODMN3Q2.cjs → chunk-45YZXI6X.cjs} +27 -27
- package/dist/{chunk-WODMN3Q2.cjs.map → chunk-45YZXI6X.cjs.map} +1 -1
- package/dist/{chunk-3DMMGT6S.js → chunk-46UGOVRW.js} +3 -3
- package/dist/{chunk-3DMMGT6S.js.map → chunk-46UGOVRW.js.map} +1 -1
- package/dist/{chunk-GLHXM7C4.js → chunk-5LKOVCPP.js} +60 -23
- package/dist/chunk-5LKOVCPP.js.map +1 -0
- package/dist/{chunk-JFRT7S3B.cjs → chunk-5OWHU7Z7.cjs} +261 -459
- package/dist/chunk-5OWHU7Z7.cjs.map +1 -0
- package/dist/{chunk-7SQSZN2J.js → chunk-5PP4KRPV.js} +5 -5
- package/dist/{chunk-7SQSZN2J.js.map → chunk-5PP4KRPV.js.map} +1 -1
- package/dist/chunk-6KQEICJ6.cjs +12 -0
- package/dist/{chunk-MKJ4KXL5.cjs.map → chunk-6KQEICJ6.cjs.map} +1 -1
- package/dist/{chunk-6SWPJEYN.js → chunk-6LEOAIIB.js} +40 -6
- package/dist/chunk-6LEOAIIB.js.map +1 -0
- package/dist/{chunk-DZAICA5J.js → chunk-6NKSE5AU.js} +4 -4
- package/dist/{chunk-DZAICA5J.js.map → chunk-6NKSE5AU.js.map} +1 -1
- package/dist/{chunk-OVI7IXYX.js → chunk-6S3PTHL4.js} +3 -3
- package/dist/{chunk-OVI7IXYX.js.map → chunk-6S3PTHL4.js.map} +1 -1
- package/dist/{chunk-3FPR224C.cjs → chunk-7CCMCMJO.cjs} +102 -102
- package/dist/{chunk-3FPR224C.cjs.map → chunk-7CCMCMJO.cjs.map} +1 -1
- package/dist/{chunk-SHFBB23Q.js → chunk-7OWE7WD6.js} +6 -4
- package/dist/chunk-7OWE7WD6.js.map +1 -0
- package/dist/chunk-7PRMDZIA.cjs +182 -0
- package/dist/chunk-7PRMDZIA.cjs.map +1 -0
- package/dist/{chunk-CHAOFCHV.js → chunk-AH2A74OZ.js} +3 -3
- package/dist/{chunk-CHAOFCHV.js.map → chunk-AH2A74OZ.js.map} +1 -1
- package/dist/{chunk-OORXGFL5.cjs → chunk-BYBDM423.cjs} +48 -48
- package/dist/{chunk-OORXGFL5.cjs.map → chunk-BYBDM423.cjs.map} +1 -1
- package/dist/{chunk-JB6T4GLL.cjs → chunk-C76WFIVZ.cjs} +808 -519
- package/dist/chunk-C76WFIVZ.cjs.map +1 -0
- package/dist/{chunk-OTUPEF2W.cjs → chunk-CS6JTQQ2.cjs} +328 -257
- package/dist/chunk-CS6JTQQ2.cjs.map +1 -0
- package/dist/{chunk-AOSSQDVO.cjs → chunk-CSNOYIB4.cjs} +13 -13
- package/dist/{chunk-AOSSQDVO.cjs.map → chunk-CSNOYIB4.cjs.map} +1 -1
- package/dist/{chunk-HEV35TGT.js → chunk-DI6VC62F.js} +13 -4
- package/dist/chunk-DI6VC62F.js.map +1 -0
- package/dist/{chunk-2QGYQBS2.cjs → chunk-DWUDZ66O.cjs} +10 -10
- package/dist/{chunk-2QGYQBS2.cjs.map → chunk-DWUDZ66O.cjs.map} +1 -1
- package/dist/{chunk-ZDKTPBGV.js → chunk-EDLKIQRI.js} +4 -4
- package/dist/{chunk-ZDKTPBGV.js.map → chunk-EDLKIQRI.js.map} +1 -1
- package/dist/chunk-EH3JZJUM.cjs +567 -0
- package/dist/chunk-EH3JZJUM.cjs.map +1 -0
- package/dist/{chunk-S5TERQVW.js → chunk-FX5ZW6PN.js} +196 -33
- package/dist/chunk-FX5ZW6PN.js.map +1 -0
- package/dist/{chunk-XVWOYKIK.js → chunk-FZHF5UWR.js} +3 -3
- package/dist/{chunk-XVWOYKIK.js.map → chunk-FZHF5UWR.js.map} +1 -1
- package/dist/{chunk-BFUOME67.cjs → chunk-G2TLHH6T.cjs} +20 -11
- package/dist/chunk-G2TLHH6T.cjs.map +1 -0
- package/dist/{chunk-5PRKMB24.cjs → chunk-GHZPZNFC.cjs} +12 -4
- package/dist/chunk-GHZPZNFC.cjs.map +1 -0
- package/dist/{chunk-ZFMCDJGB.js → chunk-GVYVGGPJ.js} +11 -199
- package/dist/chunk-GVYVGGPJ.js.map +1 -0
- package/dist/{chunk-SDBBMD4N.js → chunk-H3XP6BAV.js} +3 -3
- package/dist/{chunk-SDBBMD4N.js.map → chunk-H3XP6BAV.js.map} +1 -1
- package/dist/{chunk-ROR5ZR6A.cjs → chunk-HSEZ7X6Y.cjs} +45 -45
- package/dist/{chunk-ROR5ZR6A.cjs.map → chunk-HSEZ7X6Y.cjs.map} +1 -1
- package/dist/{chunk-LRQKXRXO.cjs → chunk-HY5BNOUN.cjs} +4 -4
- package/dist/{chunk-LRQKXRXO.cjs.map → chunk-HY5BNOUN.cjs.map} +1 -1
- package/dist/chunk-HZUB5CON.js +27 -0
- package/dist/chunk-HZUB5CON.js.map +1 -0
- package/dist/{chunk-MYKHJI2J.js → chunk-I5C6OTKR.js} +3 -3
- package/dist/{chunk-MYKHJI2J.js.map → chunk-I5C6OTKR.js.map} +1 -1
- package/dist/{chunk-3U5ABFDW.cjs → chunk-IHK5KA2Q.cjs} +31 -28
- package/dist/chunk-IHK5KA2Q.cjs.map +1 -0
- package/dist/{chunk-26YKDNUD.cjs → chunk-IPRP6TDL.cjs} +12 -10
- package/dist/chunk-IPRP6TDL.cjs.map +1 -0
- package/dist/{chunk-UGHG7PGX.js → chunk-IRPYOHRC.js} +26 -4
- package/dist/chunk-IRPYOHRC.js.map +1 -0
- package/dist/{chunk-7XUYFFR4.cjs → chunk-ISKCIQF2.cjs} +20 -20
- package/dist/{chunk-7XUYFFR4.cjs.map → chunk-ISKCIQF2.cjs.map} +1 -1
- package/dist/{chunk-OD4SSY2U.js → chunk-JG5XIJDY.js} +57 -31
- package/dist/chunk-JG5XIJDY.js.map +1 -0
- package/dist/{chunk-2HIYYMWY.cjs → chunk-K2XYLVVB.cjs} +134 -133
- package/dist/chunk-K2XYLVVB.cjs.map +1 -0
- package/dist/{chunk-5K2BKEBD.js → chunk-K46SDNQD.js} +10 -4
- package/dist/chunk-K46SDNQD.js.map +1 -0
- package/dist/{chunk-TZEGUG6D.cjs → chunk-K6VKTBST.cjs} +4 -4
- package/dist/{chunk-TZEGUG6D.cjs.map → chunk-K6VKTBST.cjs.map} +1 -1
- package/dist/chunk-KWNWG4RC.cjs +12 -0
- package/dist/{chunk-CICO5GXD.cjs.map → chunk-KWNWG4RC.cjs.map} +1 -1
- package/dist/{chunk-FQPEMEWX.cjs → chunk-LLVOQOWE.cjs} +80 -32
- package/dist/chunk-LLVOQOWE.cjs.map +1 -0
- package/dist/{chunk-TQHGE7UC.cjs → chunk-M5MSP3BI.cjs} +18 -10
- package/dist/chunk-M5MSP3BI.cjs.map +1 -0
- package/dist/{chunk-ACGSAMD3.js → chunk-MJPZNEJZ.js} +274 -292
- package/dist/chunk-MJPZNEJZ.js.map +1 -0
- package/dist/{chunk-TUNPBZY3.cjs → chunk-MM3JHVKZ.cjs} +4 -4
- package/dist/{chunk-TUNPBZY3.cjs.map → chunk-MM3JHVKZ.cjs.map} +1 -1
- package/dist/{chunk-BRRP76WO.js → chunk-MX7EKQPM.js} +457 -299
- package/dist/chunk-MX7EKQPM.js.map +1 -0
- package/dist/{chunk-2SYZXD54.js → chunk-MZ34E2GN.js} +13 -12
- package/dist/chunk-MZ34E2GN.js.map +1 -0
- package/dist/{chunk-EDN4Y4ZG.cjs → chunk-OJHD3LXJ.cjs} +9 -9
- package/dist/{chunk-EDN4Y4ZG.cjs.map → chunk-OJHD3LXJ.cjs.map} +1 -1
- package/dist/{chunk-DO7SAMEK.cjs → chunk-ON47CBE4.cjs} +47 -47
- package/dist/{chunk-DO7SAMEK.cjs.map → chunk-ON47CBE4.cjs.map} +1 -1
- package/dist/{chunk-6LN7FIVU.js → chunk-PALYTHGM.js} +11 -4
- package/dist/chunk-PALYTHGM.js.map +1 -0
- package/dist/{chunk-YVF2EM7B.js → chunk-R7MRFE5P.js} +3 -3
- package/dist/{chunk-YVF2EM7B.js.map → chunk-R7MRFE5P.js.map} +1 -1
- package/dist/{chunk-EZEEWCFJ.cjs → chunk-RDP6ZRSM.cjs} +435 -265
- package/dist/chunk-RDP6ZRSM.cjs.map +1 -0
- package/dist/{chunk-GYEG3ZLZ.cjs → chunk-RJMHU2MG.cjs} +121 -18
- package/dist/chunk-RJMHU2MG.cjs.map +1 -0
- package/dist/chunk-RWUWTJQY.cjs +30 -0
- package/dist/chunk-RWUWTJQY.cjs.map +1 -0
- package/dist/{chunk-CT3ZKTOF.js → chunk-S33YQEL7.js} +7 -7
- package/dist/{chunk-CT3ZKTOF.js.map → chunk-S33YQEL7.js.map} +1 -1
- package/dist/chunk-S3SDEQMC.js +532 -0
- package/dist/chunk-S3SDEQMC.js.map +1 -0
- package/dist/{chunk-OI2GQ25X.cjs → chunk-SHC7BCG5.cjs} +7 -7
- package/dist/{chunk-OI2GQ25X.cjs.map → chunk-SHC7BCG5.cjs.map} +1 -1
- package/dist/{chunk-L3LQNR34.cjs → chunk-TEC24ZDA.cjs} +161 -161
- package/dist/{chunk-L3LQNR34.cjs.map → chunk-TEC24ZDA.cjs.map} +1 -1
- package/dist/{chunk-HDL2ARHX.cjs → chunk-TP4NJTI3.cjs} +63 -27
- package/dist/chunk-TP4NJTI3.cjs.map +1 -0
- package/dist/{chunk-UMGZDVOA.cjs → chunk-TTCOPKUL.cjs} +124 -124
- package/dist/{chunk-UMGZDVOA.cjs.map → chunk-TTCOPKUL.cjs.map} +1 -1
- package/dist/chunk-TUVD4DFR.cjs +1207 -0
- package/dist/chunk-TUVD4DFR.cjs.map +1 -0
- package/dist/{chunk-PFBRJBUL.cjs → chunk-TYGGUWMS.cjs} +178 -152
- package/dist/chunk-TYGGUWMS.cjs.map +1 -0
- package/dist/{chunk-4WMMBDS5.js → chunk-U3Z7XKAG.js} +7 -7
- package/dist/{chunk-4WMMBDS5.js.map → chunk-U3Z7XKAG.js.map} +1 -1
- package/dist/{chunk-NACVVDWB.js → chunk-U5EL6JUV.js} +10 -10
- package/dist/{chunk-NACVVDWB.js.map → chunk-U5EL6JUV.js.map} +1 -1
- package/dist/{chunk-OMZ37BM2.js → chunk-V76FGHY3.js} +5 -5
- package/dist/{chunk-OMZ37BM2.js.map → chunk-V76FGHY3.js.map} +1 -1
- package/dist/{chunk-6NGW27EO.cjs → chunk-VLBTRXA2.cjs} +10 -10
- package/dist/{chunk-6NGW27EO.cjs.map → chunk-VLBTRXA2.cjs.map} +1 -1
- package/dist/chunk-VTJVMP4I.js +1182 -0
- package/dist/chunk-VTJVMP4I.js.map +1 -0
- package/dist/{chunk-QTD6HX4O.js → chunk-W5SOCUBL.js} +5 -5
- package/dist/{chunk-QTD6HX4O.js.map → chunk-W5SOCUBL.js.map} +1 -1
- package/dist/{chunk-SR725PWF.cjs → chunk-WCLMKNQE.cjs} +1750 -1592
- package/dist/chunk-WCLMKNQE.cjs.map +1 -0
- package/dist/{chunk-TKZXMWQF.cjs → chunk-WK23PGTP.cjs} +13 -13
- package/dist/{chunk-TKZXMWQF.cjs.map → chunk-WK23PGTP.cjs.map} +1 -1
- package/dist/{chunk-KKBDXCLQ.js → chunk-WQBAQZHR.js} +4 -4
- package/dist/{chunk-KKBDXCLQ.js.map → chunk-WQBAQZHR.js.map} +1 -1
- package/dist/{chunk-MRDBBHIZ.cjs → chunk-X4GDXBOP.cjs} +2 -2
- package/dist/chunk-X4GDXBOP.cjs.map +1 -0
- package/dist/{chunk-WCCATHMB.cjs → chunk-XMY2SXOH.cjs} +438 -456
- package/dist/chunk-XMY2SXOH.cjs.map +1 -0
- package/dist/{chunk-D5R42W5D.js → chunk-XZW2CTNO.js} +115 -12
- package/dist/chunk-XZW2CTNO.js.map +1 -0
- package/dist/{chunk-NVY5CJFP.js → chunk-Y55DLLEG.js} +9 -6
- package/dist/chunk-Y55DLLEG.js.map +1 -0
- package/dist/chunk-YA36ABIL.js +174 -0
- package/dist/chunk-YA36ABIL.js.map +1 -0
- package/dist/{chunk-ZLONH2UD.js → chunk-YDEJQWOL.js} +2 -2
- package/dist/chunk-YDEJQWOL.js.map +1 -0
- package/dist/{chunk-JONXFAPO.js → chunk-ZAQUKCUC.js} +5 -5
- package/dist/{chunk-JONXFAPO.js.map → chunk-ZAQUKCUC.js.map} +1 -1
- package/dist/{chunk-SIT26LAZ.cjs → chunk-ZBFZGLZE.cjs} +29 -5
- package/dist/chunk-ZBFZGLZE.cjs.map +1 -0
- package/dist/{chunk-P6YLZTRE.js → chunk-ZRJTM7MT.js} +3 -3
- package/dist/{chunk-P6YLZTRE.js.map → chunk-ZRJTM7MT.js.map} +1 -1
- package/dist/core/index.cjs +29 -28
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +9 -8
- package/dist/{ddl-D_oW-EVO.d.ts → ddl-B49O7dB_.d.ts} +3 -3
- package/dist/{ddl-BL1NZLMY.d.cts → ddl-DcZG660s.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +21 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +327 -302
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +14 -11
- package/dist/graph-merge/index.d.ts +14 -11
- package/dist/graph-merge/index.js +52 -27
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-D7d1u2gr.d.ts → index-B0PrmE3K.d.cts} +16 -2
- package/dist/{index-COs_z6nV.d.cts → index-CwcXsL5R.d.ts} +16 -2
- package/dist/index.cjs +223 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +37 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/ingestion-import-target-CI8OWIkM.d.ts +17 -0
- package/dist/ingestion-import-target-DCpfM1PX.d.cts +17 -0
- package/dist/interchange/index.cjs +55 -54
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +26 -12
- package/dist/interchange/index.d.ts +26 -12
- package/dist/interchange/index.js +19 -18
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-D9eRT_ns.d.ts → manager-Cfg1ENj1.d.ts} +30 -2
- package/dist/{manager-CYaff3n3.d.cts → manager-D348fa6W.d.cts} +30 -2
- package/dist/{materialize-indexes-DJ3ykH59.d.ts → materialize-indexes-C9GG3O3C.d.ts} +1 -1
- package/dist/{materialize-indexes-DTtAnvfY.d.cts → materialize-indexes-CrSiW_lT.d.cts} +1 -1
- package/dist/{postgres-DMj39MEu.d.cts → postgres-CH1kkM5J.d.cts} +279 -2
- package/dist/{postgres-CcL4bAHS.d.ts → postgres-UStOycLI.d.ts} +279 -2
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +46 -44
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +12 -10
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-DlUSqwCg.d.ts → repair-validity-windows-BtOEe2pS.d.ts} +2 -2
- package/dist/{repair-validity-windows-BFNZvd_H.d.cts → repair-validity-windows-aWX7VNvv.d.cts} +2 -2
- package/dist/schema/index.cjs +46 -46
- package/dist/schema/index.d.cts +6 -6
- package/dist/schema/index.d.ts +6 -6
- package/dist/schema/index.js +19 -19
- package/dist/{searchable-DHJMh_nj.d.cts → searchable-C8-RrL3l.d.cts} +1 -1
- package/dist/{searchable-bpE1bBfc.d.ts → searchable-z4BiFfHI.d.ts} +1 -1
- package/dist/{sqlite-D7Oz0SQh.d.ts → sqlite-Cyx9j9o6.d.cts} +309 -2
- package/dist/{sqlite-YppHrNFb.d.cts → sqlite-axLw5Lo5.d.ts} +309 -2
- package/dist/{store-JUVvtmR4.d.cts → store-CTfQ9taw.d.ts} +110 -13
- package/dist/{store-UzrGvZOo.d.ts → store-DR9J7JVB.d.cts} +110 -13
- package/dist/{temporal-5GqpYCk2.d.cts → temporal-B4Ky4wzh.d.cts} +1 -1
- package/dist/{temporal-CbnLzTmM.d.ts → temporal-CBOrERz5.d.ts} +1 -1
- package/dist/{types-CXAhpW-c.d.cts → types-BE921wRl.d.cts} +1 -1
- package/dist/{types-Bx74kaTt.d.ts → types-BScHXVM7.d.ts} +1 -1
- package/dist/{types-BqFZTQmV.d.cts → types-CWg4dTjj.d.cts} +257 -6
- package/dist/{types-BqFZTQmV.d.ts → types-CWg4dTjj.d.ts} +257 -6
- package/dist/{where-O-k2wgYm.d.ts → where-BWXUPV3C.d.ts} +1 -1
- package/dist/{where-DI_Fqz-X.d.cts → where-CNtx1aLc.d.cts} +1 -1
- package/package.json +4 -4
- package/dist/chunk-26YKDNUD.cjs.map +0 -1
- package/dist/chunk-2HIYYMWY.cjs.map +0 -1
- package/dist/chunk-2SYZXD54.js.map +0 -1
- package/dist/chunk-3KOY4FH3.cjs +0 -934
- package/dist/chunk-3KOY4FH3.cjs.map +0 -1
- package/dist/chunk-3U5ABFDW.cjs.map +0 -1
- package/dist/chunk-5K2BKEBD.js.map +0 -1
- package/dist/chunk-5PRKMB24.cjs.map +0 -1
- package/dist/chunk-6LN7FIVU.js.map +0 -1
- package/dist/chunk-6SWPJEYN.js.map +0 -1
- package/dist/chunk-ACGSAMD3.js.map +0 -1
- package/dist/chunk-AX6JGVTZ.js.map +0 -1
- package/dist/chunk-BFUOME67.cjs.map +0 -1
- package/dist/chunk-BRRP76WO.js.map +0 -1
- package/dist/chunk-CICO5GXD.cjs +0 -12
- package/dist/chunk-D5R42W5D.js.map +0 -1
- package/dist/chunk-EZEEWCFJ.cjs.map +0 -1
- package/dist/chunk-FA2AFWLP.cjs +0 -167
- package/dist/chunk-FA2AFWLP.cjs.map +0 -1
- package/dist/chunk-FQPEMEWX.cjs.map +0 -1
- package/dist/chunk-GLHXM7C4.js.map +0 -1
- package/dist/chunk-GYEG3ZLZ.cjs.map +0 -1
- package/dist/chunk-HDL2ARHX.cjs.map +0 -1
- package/dist/chunk-HEV35TGT.js.map +0 -1
- package/dist/chunk-I4GAZH5Z.js +0 -913
- package/dist/chunk-I4GAZH5Z.js.map +0 -1
- package/dist/chunk-JB6T4GLL.cjs.map +0 -1
- package/dist/chunk-JBQQ7THH.js +0 -20
- package/dist/chunk-JBQQ7THH.js.map +0 -1
- package/dist/chunk-JFRT7S3B.cjs.map +0 -1
- package/dist/chunk-KF6K7TGH.js.map +0 -1
- package/dist/chunk-MKJ4KXL5.cjs +0 -12
- package/dist/chunk-MRDBBHIZ.cjs.map +0 -1
- package/dist/chunk-NVY5CJFP.js.map +0 -1
- package/dist/chunk-OD4SSY2U.js.map +0 -1
- package/dist/chunk-OTUPEF2W.cjs.map +0 -1
- package/dist/chunk-PFBRJBUL.cjs.map +0 -1
- package/dist/chunk-PWLJ77UV.cjs +0 -23
- package/dist/chunk-PWLJ77UV.cjs.map +0 -1
- package/dist/chunk-S5TERQVW.js.map +0 -1
- package/dist/chunk-SHFBB23Q.js.map +0 -1
- package/dist/chunk-SIT26LAZ.cjs.map +0 -1
- package/dist/chunk-SR725PWF.cjs.map +0 -1
- package/dist/chunk-TQHGE7UC.cjs.map +0 -1
- package/dist/chunk-UGHG7PGX.js.map +0 -1
- package/dist/chunk-WCCATHMB.cjs.map +0 -1
- package/dist/chunk-YIURNGXI.js +0 -155
- package/dist/chunk-YIURNGXI.js.map +0 -1
- package/dist/chunk-ZFMCDJGB.js.map +0 -1
- package/dist/chunk-ZLONH2UD.js.map +0 -1
|
@@ -1,91 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var chunkRDP6ZRSM_cjs = require('./chunk-RDP6ZRSM.cjs');
|
|
4
|
+
var chunkZBFZGLZE_cjs = require('./chunk-ZBFZGLZE.cjs');
|
|
5
|
+
var chunkLLVOQOWE_cjs = require('./chunk-LLVOQOWE.cjs');
|
|
6
|
+
var chunkM5MSP3BI_cjs = require('./chunk-M5MSP3BI.cjs');
|
|
7
|
+
var chunkTEC24ZDA_cjs = require('./chunk-TEC24ZDA.cjs');
|
|
8
|
+
var chunkOJHD3LXJ_cjs = require('./chunk-OJHD3LXJ.cjs');
|
|
9
|
+
var chunkRWUWTJQY_cjs = require('./chunk-RWUWTJQY.cjs');
|
|
10
|
+
var chunkX4GDXBOP_cjs = require('./chunk-X4GDXBOP.cjs');
|
|
10
11
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
11
12
|
|
|
12
|
-
// src/errors/validation.ts
|
|
13
|
-
function zodIssuesToValidationIssues(error) {
|
|
14
|
-
return error.issues.map((issue) => ({
|
|
15
|
-
path: issue.path.join("."),
|
|
16
|
-
message: issue.message,
|
|
17
|
-
code: issue.code
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
function buildLocationString(context) {
|
|
21
|
-
if (context.id) {
|
|
22
|
-
return `${context.kind}/${context.id}`;
|
|
23
|
-
}
|
|
24
|
-
return `new ${context.kind}`;
|
|
25
|
-
}
|
|
26
|
-
function validateProps(schema, props, context) {
|
|
27
|
-
const result = schema.safeParse(props);
|
|
28
|
-
if (result.success) {
|
|
29
|
-
return result.data;
|
|
30
|
-
}
|
|
31
|
-
const issues = zodIssuesToValidationIssues(result.error);
|
|
32
|
-
const location = buildLocationString(context);
|
|
33
|
-
throw new chunkMRDBBHIZ_cjs.ValidationError(
|
|
34
|
-
`Invalid ${context.entityType} props for ${location}: ${result.error.message}`,
|
|
35
|
-
{
|
|
36
|
-
entityType: context.entityType,
|
|
37
|
-
kind: context.kind,
|
|
38
|
-
operation: context.operation,
|
|
39
|
-
...context.id !== void 0 && { id: context.id },
|
|
40
|
-
issues
|
|
41
|
-
},
|
|
42
|
-
{ cause: result.error }
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
function validateNodeProps(schema, props, context) {
|
|
46
|
-
return validateProps(schema, props, {
|
|
47
|
-
entityType: "node",
|
|
48
|
-
...context
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function validateEdgeProps(schema, props, context) {
|
|
52
|
-
return validateProps(schema, props, {
|
|
53
|
-
entityType: "edge",
|
|
54
|
-
...context
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function wrapZodError(error, context) {
|
|
58
|
-
const issues = zodIssuesToValidationIssues(error);
|
|
59
|
-
const location = buildLocationString(context);
|
|
60
|
-
return new chunkMRDBBHIZ_cjs.ValidationError(
|
|
61
|
-
`Validation failed for ${context.entityType} ${location}: ${error.message}`,
|
|
62
|
-
{
|
|
63
|
-
entityType: context.entityType,
|
|
64
|
-
kind: context.kind,
|
|
65
|
-
operation: context.operation,
|
|
66
|
-
...context.id !== void 0 && { id: context.id },
|
|
67
|
-
issues
|
|
68
|
-
},
|
|
69
|
-
{ cause: error }
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
function createValidationError(message, issues, context) {
|
|
73
|
-
return new chunkMRDBBHIZ_cjs.ValidationError(message, {
|
|
74
|
-
...context?.entityType !== void 0 && {
|
|
75
|
-
entityType: context.entityType
|
|
76
|
-
},
|
|
77
|
-
...context?.kind !== void 0 && { kind: context.kind },
|
|
78
|
-
...context?.operation !== void 0 && { operation: context.operation },
|
|
79
|
-
...context?.id !== void 0 && { id: context.id },
|
|
80
|
-
issues
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
13
|
// src/identity/row-codec.ts
|
|
85
14
|
function toCanonicalIdentityTimestamp(value) {
|
|
86
|
-
const canonical =
|
|
15
|
+
const canonical = chunkM5MSP3BI_cjs.canonicalizeDatabaseTimestamp(value);
|
|
87
16
|
if (canonical === void 0) {
|
|
88
|
-
throw new
|
|
17
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
89
18
|
"Identity relation returned a timestamp that is not a representable instant.",
|
|
90
19
|
{ value },
|
|
91
20
|
{
|
|
@@ -130,11 +59,11 @@ function toTransferAssertion(row) {
|
|
|
130
59
|
|
|
131
60
|
// src/identity/reference.ts
|
|
132
61
|
function identityReferenceKey(ref) {
|
|
133
|
-
return
|
|
62
|
+
return chunkLLVOQOWE_cjs.encodeTupleKey([ref.kind, ref.id]);
|
|
134
63
|
}
|
|
135
64
|
function compareIdentityReferences(left, right) {
|
|
136
|
-
const kindOrder =
|
|
137
|
-
return kindOrder === 0 ?
|
|
65
|
+
const kindOrder = chunkRWUWTJQY_cjs.compareCodePoints(left.kind, right.kind);
|
|
66
|
+
return kindOrder === 0 ? chunkRWUWTJQY_cjs.compareCodePoints(left.id, right.id) : kindOrder;
|
|
138
67
|
}
|
|
139
68
|
function normalizeIdentityPair(first, second) {
|
|
140
69
|
return compareIdentityReferences(first, second) <= 0 ? [first, second] : [second, first];
|
|
@@ -169,12 +98,12 @@ function spanningDifferentAssertion(assertions, first, second) {
|
|
|
169
98
|
// src/identity/sql-target.ts
|
|
170
99
|
var MAX_REFERENCE_CHUNK_SIZE = 200;
|
|
171
100
|
function identityChunkSize(target, input) {
|
|
172
|
-
const parameterLimit =
|
|
101
|
+
const parameterLimit = chunkRDP6ZRSM_cjs.recordedBindParamBudget(target);
|
|
173
102
|
const chunkSize = Math.floor(
|
|
174
103
|
(parameterLimit - input.fixedParameters) / input.parametersPerItem
|
|
175
104
|
);
|
|
176
105
|
if (chunkSize < 1) {
|
|
177
|
-
throw new
|
|
106
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
178
107
|
"Operational Identity cannot fit this statement within the backend bind-parameter limit.",
|
|
179
108
|
{
|
|
180
109
|
code: "IDENTITY_BIND_BUDGET_TOO_SMALL",
|
|
@@ -188,7 +117,7 @@ function identityChunkSize(target, input) {
|
|
|
188
117
|
}
|
|
189
118
|
function requireStatementTarget(target) {
|
|
190
119
|
if (target.executeStatement === void 0) {
|
|
191
|
-
throw new
|
|
120
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
192
121
|
"Operational Identity requires statement execution support.",
|
|
193
122
|
{ code: "IDENTITY_REQUIRES_STATEMENT_EXECUTION" },
|
|
194
123
|
{
|
|
@@ -198,7 +127,7 @@ function requireStatementTarget(target) {
|
|
|
198
127
|
}
|
|
199
128
|
}
|
|
200
129
|
function identityWriterSlotError(cause) {
|
|
201
|
-
return new
|
|
130
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
202
131
|
"Operational Identity could not take the SQLite writer slot: this transaction was begun DEFERRED and another connection committed before the identity write, so its read snapshot is stale.",
|
|
203
132
|
{
|
|
204
133
|
code: "IDENTITY_TRANSACTION_NOT_WRITE_FENCED",
|
|
@@ -213,9 +142,9 @@ function identityWriterSlotError(cause) {
|
|
|
213
142
|
async function executeIdentityStatement(target, statement) {
|
|
214
143
|
requireStatementTarget(target);
|
|
215
144
|
try {
|
|
216
|
-
await target.executeStatement(
|
|
145
|
+
await target.executeStatement(chunkOJHD3LXJ_cjs.asCompiledStatementSql(statement));
|
|
217
146
|
} catch (error) {
|
|
218
|
-
if (!
|
|
147
|
+
if (!chunkZBFZGLZE_cjs.isSqliteStaleSnapshotError(error)) throw error;
|
|
219
148
|
throw identityWriterSlotError(error);
|
|
220
149
|
}
|
|
221
150
|
}
|
|
@@ -229,7 +158,7 @@ function plainRef(ref) {
|
|
|
229
158
|
function registeredPlainRef(ctx, ref) {
|
|
230
159
|
const result = plainRef(ref);
|
|
231
160
|
if (!ctx.registry.nodeKinds.has(result.kind)) {
|
|
232
|
-
throw new
|
|
161
|
+
throw new chunkX4GDXBOP_cjs.KindNotFoundError(result.kind, "node", {
|
|
233
162
|
graphId: ctx.graphId
|
|
234
163
|
});
|
|
235
164
|
}
|
|
@@ -248,7 +177,7 @@ function normalizePair(first, second) {
|
|
|
248
177
|
return normalizeIdentityPair(first, second);
|
|
249
178
|
}
|
|
250
179
|
function clampValidTo(timestamp, validFrom) {
|
|
251
|
-
return
|
|
180
|
+
return chunkRWUWTJQY_cjs.compareCodePoints(timestamp, validFrom) < 0 ? validFrom : timestamp;
|
|
252
181
|
}
|
|
253
182
|
function publicAssertion(row) {
|
|
254
183
|
return {
|
|
@@ -269,7 +198,7 @@ function publicNodeRef(ref) {
|
|
|
269
198
|
async function lockIdentityGraph(target, graphId) {
|
|
270
199
|
if (target.dialect !== "postgres") return;
|
|
271
200
|
await target.execute(
|
|
272
|
-
|
|
201
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
273
202
|
SELECT pg_advisory_xact_lock(
|
|
274
203
|
hashtext('typegraph:identity'),
|
|
275
204
|
hashtext(${graphId})
|
|
@@ -281,14 +210,14 @@ async function lockIdentityEnablementNodes(target, schema) {
|
|
|
281
210
|
if (target.dialect !== "postgres") return;
|
|
282
211
|
await executeIdentityStatement(
|
|
283
212
|
target,
|
|
284
|
-
|
|
213
|
+
chunkOJHD3LXJ_cjs.sql`LOCK TABLE ${schema.nodesTable} IN SHARE MODE`
|
|
285
214
|
);
|
|
286
215
|
}
|
|
287
216
|
async function loadNodeSnapshot(target, schema, graphId, coordinate) {
|
|
288
|
-
const sqlCoordinate =
|
|
217
|
+
const sqlCoordinate = chunkRDP6ZRSM_cjs.identitySqlCoordinate(coordinate, chunkM5MSP3BI_cjs.nowIso());
|
|
289
218
|
const rows = await target.execute(
|
|
290
|
-
|
|
291
|
-
|
|
219
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(
|
|
220
|
+
chunkRDP6ZRSM_cjs.identityNodeSnapshotSource(schema, graphId, sqlCoordinate)
|
|
292
221
|
)
|
|
293
222
|
);
|
|
294
223
|
return rows.map((row) => ({
|
|
@@ -314,7 +243,7 @@ async function loadCurrentStructuralClasses(target, schema, graphId, references)
|
|
|
314
243
|
});
|
|
315
244
|
if (uniqueReferences.length > chunkSize) {
|
|
316
245
|
const combined = /* @__PURE__ */ new Map();
|
|
317
|
-
for (const refChunk of
|
|
246
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(uniqueReferences, chunkSize)) {
|
|
318
247
|
const classes2 = await loadCurrentStructuralClasses(
|
|
319
248
|
target,
|
|
320
249
|
schema,
|
|
@@ -325,12 +254,12 @@ async function loadCurrentStructuralClasses(target, schema, graphId, references)
|
|
|
325
254
|
}
|
|
326
255
|
return combined;
|
|
327
256
|
}
|
|
328
|
-
const seedRows =
|
|
329
|
-
uniqueReferences.map((ref) =>
|
|
330
|
-
|
|
257
|
+
const seedRows = chunkOJHD3LXJ_cjs.sql.join(
|
|
258
|
+
uniqueReferences.map((ref) => chunkOJHD3LXJ_cjs.sql`(${ref.kind}, ${ref.id})`),
|
|
259
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
331
260
|
);
|
|
332
261
|
const rows = await target.execute(
|
|
333
|
-
|
|
262
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
334
263
|
WITH seeds(seed_kind, seed_id) AS (
|
|
335
264
|
VALUES ${seedRows}
|
|
336
265
|
), anchors AS (
|
|
@@ -368,10 +297,10 @@ async function loadCurrentStructuralClasses(target, schema, graphId, references)
|
|
|
368
297
|
);
|
|
369
298
|
}
|
|
370
299
|
async function loadCurrentVisibleMembers(target, schema, graphId, ref) {
|
|
371
|
-
const now =
|
|
372
|
-
const coordinate =
|
|
300
|
+
const now = chunkM5MSP3BI_cjs.nowIso();
|
|
301
|
+
const coordinate = chunkRDP6ZRSM_cjs.identitySqlCoordinate(void 0, now);
|
|
373
302
|
const rows = await target.execute(
|
|
374
|
-
|
|
303
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
375
304
|
WITH anchor AS (
|
|
376
305
|
SELECT class_kind, class_id
|
|
377
306
|
FROM ${schema.identityClosureTable}
|
|
@@ -395,7 +324,7 @@ async function loadCurrentVisibleMembers(target, schema, graphId, ref) {
|
|
|
395
324
|
WHERE n.graph_id = ${graphId}
|
|
396
325
|
AND n.kind = m.kind
|
|
397
326
|
AND n.id = m.id
|
|
398
|
-
AND ${
|
|
327
|
+
AND ${chunkRDP6ZRSM_cjs.identityNodeVisibilitySql(coordinate, "n")}
|
|
399
328
|
`)
|
|
400
329
|
);
|
|
401
330
|
const members = rows.map((row) => ({ kind: row.kind, id: row.id })).toSorted((left, right) => compareReferences(left, right));
|
|
@@ -430,7 +359,7 @@ async function loadHistoricalClasses(target, schema, graphId, references, coordi
|
|
|
430
359
|
});
|
|
431
360
|
if (uniqueReferences.length > chunkSize) {
|
|
432
361
|
const combined = /* @__PURE__ */ new Map();
|
|
433
|
-
for (const refChunk of
|
|
362
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(uniqueReferences, chunkSize)) {
|
|
434
363
|
const classes = await loadHistoricalClasses(
|
|
435
364
|
target,
|
|
436
365
|
schema,
|
|
@@ -443,26 +372,26 @@ async function loadHistoricalClasses(target, schema, graphId, references, coordi
|
|
|
443
372
|
}
|
|
444
373
|
return combined;
|
|
445
374
|
}
|
|
446
|
-
const currentInstant =
|
|
447
|
-
const sqlCoordinate =
|
|
448
|
-
const seeds =
|
|
449
|
-
uniqueReferences.map((ref) =>
|
|
450
|
-
|
|
375
|
+
const currentInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
376
|
+
const sqlCoordinate = chunkRDP6ZRSM_cjs.identitySqlCoordinate(coordinate, currentInstant);
|
|
377
|
+
const seeds = chunkOJHD3LXJ_cjs.sql.join(
|
|
378
|
+
uniqueReferences.map((ref) => chunkOJHD3LXJ_cjs.sql`(${ref.kind}, ${ref.id})`),
|
|
379
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
451
380
|
);
|
|
452
|
-
const reconstruction =
|
|
381
|
+
const reconstruction = chunkRDP6ZRSM_cjs.historicalIdentityReconstructionCtes({
|
|
453
382
|
schema,
|
|
454
383
|
graphId,
|
|
455
384
|
coordinate: sqlCoordinate,
|
|
456
|
-
seedSource:
|
|
385
|
+
seedSource: chunkOJHD3LXJ_cjs.sql`VALUES ${seeds}`,
|
|
457
386
|
sameIdAcrossKinds
|
|
458
387
|
});
|
|
459
388
|
const rows = await target.execute(
|
|
460
|
-
|
|
389
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
461
390
|
WITH RECURSIVE
|
|
462
391
|
${reconstruction}
|
|
463
392
|
SELECT member.seed_kind, member.seed_id,
|
|
464
393
|
member.kind AS member_kind, member.id AS member_id,
|
|
465
|
-
CASE WHEN ${
|
|
394
|
+
CASE WHEN ${chunkRDP6ZRSM_cjs.identityNodeVisibilitySql(sqlCoordinate, "n")}
|
|
466
395
|
THEN 1 ELSE 0 END AS is_visible
|
|
467
396
|
FROM identity_members member
|
|
468
397
|
JOIN node_snapshot n ON n.kind = member.kind AND n.id = member.id
|
|
@@ -513,24 +442,24 @@ function visibleMembersAtCoordinate(ctx, ref) {
|
|
|
513
442
|
);
|
|
514
443
|
}
|
|
515
444
|
async function loadAssertions(target, schema, graphId, coordinate, currentInstant) {
|
|
516
|
-
const source =
|
|
445
|
+
const source = chunkRDP6ZRSM_cjs.identityAssertionSnapshotSource(
|
|
517
446
|
schema,
|
|
518
447
|
graphId,
|
|
519
|
-
|
|
448
|
+
chunkRDP6ZRSM_cjs.identitySqlCoordinate(coordinate, currentInstant),
|
|
520
449
|
void 0
|
|
521
450
|
);
|
|
522
451
|
const rows = await target.execute(
|
|
523
|
-
|
|
452
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(source)
|
|
524
453
|
);
|
|
525
454
|
return rows.map((row) => normalizeIdentityAssertionRow(row));
|
|
526
455
|
}
|
|
527
456
|
function referenceCondition(kindColumn, idColumn, references) {
|
|
528
|
-
if (references.length === 0) return
|
|
529
|
-
return
|
|
457
|
+
if (references.length === 0) return chunkOJHD3LXJ_cjs.sql`1 = 0`;
|
|
458
|
+
return chunkOJHD3LXJ_cjs.sql`(${chunkOJHD3LXJ_cjs.sql.join(
|
|
530
459
|
references.map(
|
|
531
|
-
(ref) =>
|
|
460
|
+
(ref) => chunkOJHD3LXJ_cjs.sql`(${kindColumn} = ${ref.kind} AND ${idColumn} = ${ref.id})`
|
|
532
461
|
),
|
|
533
|
-
|
|
462
|
+
chunkOJHD3LXJ_cjs.sql` OR `
|
|
534
463
|
)})`;
|
|
535
464
|
}
|
|
536
465
|
async function loadAssertionsTouching(target, schema, graphId, references, coordinate, relation) {
|
|
@@ -542,7 +471,7 @@ async function loadAssertionsTouching(target, schema, graphId, references, coord
|
|
|
542
471
|
});
|
|
543
472
|
if (references.length > chunkSize) {
|
|
544
473
|
const byId = /* @__PURE__ */ new Map();
|
|
545
|
-
for (const refChunk of
|
|
474
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(references, chunkSize)) {
|
|
546
475
|
const assertions = await loadAssertionsTouching(
|
|
547
476
|
target,
|
|
548
477
|
schema,
|
|
@@ -555,25 +484,25 @@ async function loadAssertionsTouching(target, schema, graphId, references, coord
|
|
|
555
484
|
}
|
|
556
485
|
return [...byId.values()];
|
|
557
486
|
}
|
|
558
|
-
const source =
|
|
487
|
+
const source = chunkRDP6ZRSM_cjs.identityAssertionSnapshotSource(
|
|
559
488
|
schema,
|
|
560
489
|
graphId,
|
|
561
|
-
|
|
490
|
+
chunkRDP6ZRSM_cjs.identitySqlCoordinate(coordinate, chunkM5MSP3BI_cjs.nowIso()),
|
|
562
491
|
relation
|
|
563
492
|
);
|
|
564
493
|
const aMatches = referenceCondition(
|
|
565
|
-
|
|
566
|
-
|
|
494
|
+
chunkOJHD3LXJ_cjs.sql`identity_assertions.a_kind`,
|
|
495
|
+
chunkOJHD3LXJ_cjs.sql`identity_assertions.a_id`,
|
|
567
496
|
references
|
|
568
497
|
);
|
|
569
498
|
const bMatches = referenceCondition(
|
|
570
|
-
|
|
571
|
-
|
|
499
|
+
chunkOJHD3LXJ_cjs.sql`identity_assertions.b_kind`,
|
|
500
|
+
chunkOJHD3LXJ_cjs.sql`identity_assertions.b_id`,
|
|
572
501
|
references
|
|
573
502
|
);
|
|
574
503
|
const rows = await target.execute(
|
|
575
|
-
|
|
576
|
-
SELECT ${
|
|
504
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
505
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
577
506
|
FROM (${source}) identity_assertions
|
|
578
507
|
WHERE ${aMatches} OR ${bMatches}
|
|
579
508
|
`)
|
|
@@ -594,11 +523,11 @@ async function loadSpanningDifferentAssertion(target, schema, graphId, firstClas
|
|
|
594
523
|
|
|
595
524
|
// src/identity/interchange-read.ts
|
|
596
525
|
function codePointOrderedAssertionId(target) {
|
|
597
|
-
return
|
|
526
|
+
return chunkTEC24ZDA_cjs.getDialect(target.dialect).binaryText(chunkOJHD3LXJ_cjs.sql`identity_assertions.id`);
|
|
598
527
|
}
|
|
599
528
|
async function readIdentityAssertionPageAtTarget(ctx, target, mode, options) {
|
|
600
529
|
if (!Number.isSafeInteger(options.limit) || options.limit <= 0) {
|
|
601
|
-
throw new
|
|
530
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
602
531
|
"Identity assertion page limit must be a positive safe integer.",
|
|
603
532
|
{ limit: options.limit }
|
|
604
533
|
);
|
|
@@ -610,17 +539,17 @@ async function readIdentityAssertionPageAtTarget(ctx, target, mode, options) {
|
|
|
610
539
|
parametersPerItem: 2
|
|
611
540
|
});
|
|
612
541
|
const filterKindsInMemory = nodeKinds !== void 0 && nodeKinds.length > kindFilterChunkSize;
|
|
613
|
-
const kindFilter = nodeKinds === void 0 ?
|
|
614
|
-
AND identity_assertions.a_kind IN (${
|
|
615
|
-
nodeKinds.map((kind) =>
|
|
616
|
-
|
|
542
|
+
const kindFilter = nodeKinds === void 0 ? chunkOJHD3LXJ_cjs.sql`` : nodeKinds.length === 0 ? chunkOJHD3LXJ_cjs.sql`AND 1 = 0` : filterKindsInMemory ? chunkOJHD3LXJ_cjs.sql`` : chunkOJHD3LXJ_cjs.sql`
|
|
543
|
+
AND identity_assertions.a_kind IN (${chunkOJHD3LXJ_cjs.sql.join(
|
|
544
|
+
nodeKinds.map((kind) => chunkOJHD3LXJ_cjs.sql`${kind}`),
|
|
545
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
617
546
|
)})
|
|
618
|
-
AND identity_assertions.b_kind IN (${
|
|
619
|
-
nodeKinds.map((kind) =>
|
|
620
|
-
|
|
547
|
+
AND identity_assertions.b_kind IN (${chunkOJHD3LXJ_cjs.sql.join(
|
|
548
|
+
nodeKinds.map((kind) => chunkOJHD3LXJ_cjs.sql`${kind}`),
|
|
549
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
621
550
|
)})
|
|
622
551
|
`;
|
|
623
|
-
const liveEndpointJoins = options.includeDeleted === false ?
|
|
552
|
+
const liveEndpointJoins = options.includeDeleted === false ? chunkOJHD3LXJ_cjs.sql`
|
|
624
553
|
JOIN ${ctx.schema.nodesTable} identity_a_node
|
|
625
554
|
ON identity_a_node.graph_id = identity_assertions.graph_id
|
|
626
555
|
AND identity_a_node.kind = identity_assertions.a_kind
|
|
@@ -631,10 +560,10 @@ async function readIdentityAssertionPageAtTarget(ctx, target, mode, options) {
|
|
|
631
560
|
AND identity_b_node.kind = identity_assertions.b_kind
|
|
632
561
|
AND identity_b_node.id = identity_assertions.b_id
|
|
633
562
|
AND identity_b_node.deleted_at IS NULL
|
|
634
|
-
` :
|
|
563
|
+
` : chunkOJHD3LXJ_cjs.sql``;
|
|
635
564
|
const assertionIdKey = codePointOrderedAssertionId(target);
|
|
636
565
|
const rows = await target.execute(
|
|
637
|
-
|
|
566
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
638
567
|
SELECT identity_assertions.graph_id AS graph_id,
|
|
639
568
|
identity_assertions.id AS id,
|
|
640
569
|
identity_assertions.rel AS rel,
|
|
@@ -653,8 +582,8 @@ async function readIdentityAssertionPageAtTarget(ctx, target, mode, options) {
|
|
|
653
582
|
${liveEndpointJoins}
|
|
654
583
|
WHERE identity_assertions.graph_id = ${ctx.graphId}
|
|
655
584
|
AND identity_assertions.deleted_at IS NULL
|
|
656
|
-
${options.after === void 0 ?
|
|
657
|
-
${mode === "state" ?
|
|
585
|
+
${options.after === void 0 ? chunkOJHD3LXJ_cjs.sql`` : chunkOJHD3LXJ_cjs.sql`AND ${assertionIdKey} > ${options.after}`}
|
|
586
|
+
${mode === "state" ? chunkOJHD3LXJ_cjs.sql`AND identity_assertions.valid_to IS NULL` : chunkOJHD3LXJ_cjs.sql``}
|
|
658
587
|
${kindFilter}
|
|
659
588
|
ORDER BY ${assertionIdKey} ASC
|
|
660
589
|
LIMIT ${options.limit}
|
|
@@ -679,123 +608,6 @@ async function readIdentityAssertionsForInterchange(ctx, mode, options) {
|
|
|
679
608
|
return page.assertions;
|
|
680
609
|
}
|
|
681
610
|
|
|
682
|
-
// src/store/operations/write-transaction.ts
|
|
683
|
-
var writeTransactionSessions = /* @__PURE__ */ new WeakMap();
|
|
684
|
-
function forceWriteTransactionRevision(target) {
|
|
685
|
-
const session = writeTransactionSessions.get(target);
|
|
686
|
-
if (session === void 0) return false;
|
|
687
|
-
session.wrote = true;
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
var heldGraphWriteLocks = /* @__PURE__ */ new WeakMap();
|
|
691
|
-
async function withWriteTransactionSession(target, ctx, fn) {
|
|
692
|
-
const session = {
|
|
693
|
-
lock: void 0,
|
|
694
|
-
wrote: false
|
|
695
|
-
};
|
|
696
|
-
writeTransactionSessions.set(target, session);
|
|
697
|
-
try {
|
|
698
|
-
const result = await fn();
|
|
699
|
-
if (session.wrote && ctx.revisionTrackingEnabled && !ctx.historyEnabled) {
|
|
700
|
-
await chunkEZEEWCFJ_cjs.advanceRevisionClock(target, ctx.revisionSchema, ctx.graphId, true);
|
|
701
|
-
}
|
|
702
|
-
return result;
|
|
703
|
-
} finally {
|
|
704
|
-
writeTransactionSessions.delete(target);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
async function lockSchemaVersionForStoreWrite(ctx, backend) {
|
|
708
|
-
const expectedVersion = ctx.schemaVersion;
|
|
709
|
-
if (expectedVersion === void 0) return;
|
|
710
|
-
if ("transaction" in backend && !backend.capabilities.transactions) {
|
|
711
|
-
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
712
|
-
"Schema-managed Store writes require a transactional backend so schema changes and entity writes can share one fence.",
|
|
713
|
-
{
|
|
714
|
-
code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
|
|
715
|
-
graphId: ctx.graphId
|
|
716
|
-
}
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
const lockSchemaVersionForWrite = backend.lockSchemaVersionForWrite;
|
|
720
|
-
if (lockSchemaVersionForWrite === void 0) {
|
|
721
|
-
throw new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
722
|
-
"This backend cannot fence schema-managed Store writes against a concurrent schema change.",
|
|
723
|
-
{
|
|
724
|
-
code: "SCHEMA_WRITE_FENCE_UNSUPPORTED",
|
|
725
|
-
graphId: ctx.graphId
|
|
726
|
-
}
|
|
727
|
-
);
|
|
728
|
-
}
|
|
729
|
-
await lockSchemaVersionForWrite({
|
|
730
|
-
graphId: ctx.graphId,
|
|
731
|
-
expectedVersion
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
var CONSTRAINT_FENCE_ADVICE = {
|
|
735
|
-
edgeCardinality: 'declare the edge `cardinality: "many"` and enforce the limit in application code',
|
|
736
|
-
edgeMatchKeyConvergence: "use `create` with a caller-chosen id, whose uniqueness the edges primary key enforces, instead of `getOrCreateByEndpoints`",
|
|
737
|
-
nodeDisjointness: "drop the `disjointWith` axiom and keep ids distinct across those kinds yourself",
|
|
738
|
-
nodeUniquenessScope: 'scope the unique constraint to `"kind"`, which the uniques primary key enforces on its own'
|
|
739
|
-
};
|
|
740
|
-
function graphWriteFenceRefusal(ctx, backend, reason) {
|
|
741
|
-
if (!("transaction" in backend) || backend.capabilities.transactions) {
|
|
742
|
-
return void 0;
|
|
743
|
-
}
|
|
744
|
-
return new chunkMRDBBHIZ_cjs.ConfigurationError(
|
|
745
|
-
"This backend cannot fence a constrained write: enforcing a declared constraint requires a transaction to scope the per-graph write lock to, and this backend has no transactions.",
|
|
746
|
-
{
|
|
747
|
-
code: "CONSTRAINT_WRITE_FENCE_UNSUPPORTED",
|
|
748
|
-
graphId: ctx.graphId,
|
|
749
|
-
constraint: reason
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
suggestion: `Use a transactional backend, or ${CONSTRAINT_FENCE_ADVICE[reason]}. Unconstrained writes need no fence and keep working on this backend.`
|
|
753
|
-
}
|
|
754
|
-
);
|
|
755
|
-
}
|
|
756
|
-
function runInWriteTransaction(ctx, backend, fn, options) {
|
|
757
|
-
const ownsWriteLock = "transaction" in backend && backend.capabilities.transactions;
|
|
758
|
-
const fenceReason = options?.fencesConstraintProbe;
|
|
759
|
-
const refusal = fenceReason === void 0 ? void 0 : graphWriteFenceRefusal(ctx, backend, fenceReason);
|
|
760
|
-
if (refusal !== void 0) return Promise.reject(refusal);
|
|
761
|
-
const needsGraphWriteLock = ctx.historyEnabled || ctx.revisionTrackingEnabled || fenceReason !== void 0;
|
|
762
|
-
return chunk5PRKMB24_cjs.runOptionallyInTransaction(backend, async (target) => {
|
|
763
|
-
await lockSchemaVersionForStoreWrite(ctx, target);
|
|
764
|
-
const session = needsGraphWriteLock ? writeTransactionSessions.get(target) : void 0;
|
|
765
|
-
const held = heldGraphWriteLocks.get(target) ?? /* @__PURE__ */ new Set();
|
|
766
|
-
heldGraphWriteLocks.set(target, held);
|
|
767
|
-
const acquiresLock = needsGraphWriteLock && session?.lock === void 0 && !held.has(ctx.graphId);
|
|
768
|
-
if (acquiresLock) held.add(ctx.graphId);
|
|
769
|
-
const lock = acquiresLock ? await chunkEZEEWCFJ_cjs.lockRecordedGraphWrite(target, ctx.graphId).catch(
|
|
770
|
-
(error) => {
|
|
771
|
-
held.delete(ctx.graphId);
|
|
772
|
-
throw error;
|
|
773
|
-
}
|
|
774
|
-
) : session?.lock ?? chunkEZEEWCFJ_cjs.uncapturedGraphWriteLock();
|
|
775
|
-
if (session !== void 0) session.lock = lock;
|
|
776
|
-
const result = await (acquiresLock ? fn(target, lock).finally(() => held.delete(ctx.graphId)) : fn(target, lock));
|
|
777
|
-
if (session !== void 0) {
|
|
778
|
-
session.wrote ||= options?.didWrite?.(result) ?? true;
|
|
779
|
-
return result;
|
|
780
|
-
}
|
|
781
|
-
if (ctx.revisionTrackingEnabled && !ctx.historyEnabled && (options?.didWrite?.(result) ?? true)) {
|
|
782
|
-
await chunkEZEEWCFJ_cjs.advanceRevisionClock(
|
|
783
|
-
target,
|
|
784
|
-
ctx.revisionSchema,
|
|
785
|
-
ctx.graphId,
|
|
786
|
-
ownsWriteLock
|
|
787
|
-
);
|
|
788
|
-
}
|
|
789
|
-
return result;
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
function runHookedWriteOperation(ctx, opContext, backend, body, options) {
|
|
793
|
-
return ctx.withOperationHooks(
|
|
794
|
-
opContext,
|
|
795
|
-
() => runInWriteTransaction(ctx, backend, body, options)
|
|
796
|
-
);
|
|
797
|
-
}
|
|
798
|
-
|
|
799
611
|
// src/identity/service-components.ts
|
|
800
612
|
var UnionFind = class {
|
|
801
613
|
#parents = /* @__PURE__ */ new Map();
|
|
@@ -898,7 +710,7 @@ function identityActiveKinds(registry) {
|
|
|
898
710
|
return new Set(registry.nodeKinds.keys());
|
|
899
711
|
}
|
|
900
712
|
async function loadSnapshot(target, schema, graphId, coordinate, allowedKinds, sameIdAcrossKinds = "fold") {
|
|
901
|
-
const currentInstant =
|
|
713
|
+
const currentInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
902
714
|
const [nodes, assertions] = await Promise.all([
|
|
903
715
|
loadNodeSnapshot(target, schema, graphId, coordinate),
|
|
904
716
|
loadAssertions(target, schema, graphId, coordinate, currentInstant)
|
|
@@ -982,7 +794,7 @@ function validateSnapshotIntegrity(snapshot, registry, graphId) {
|
|
|
982
794
|
const a = { kind: assertion.a_kind, id: assertion.a_id };
|
|
983
795
|
const b = { kind: assertion.b_kind, id: assertion.b_id };
|
|
984
796
|
if (!structuralKeys.has(refKey(a)) || !structuralKeys.has(refKey(b))) {
|
|
985
|
-
throw new
|
|
797
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
986
798
|
"Operational Identity contains a current assertion with a missing or deleted endpoint.",
|
|
987
799
|
{
|
|
988
800
|
code: "IDENTITY_SCHEMA_CONTRADICTION",
|
|
@@ -994,7 +806,7 @@ function validateSnapshotIntegrity(snapshot, registry, graphId) {
|
|
|
994
806
|
);
|
|
995
807
|
}
|
|
996
808
|
if (assertion.rel === "different" && sameComponent(snapshot, a, b)) {
|
|
997
|
-
throw new
|
|
809
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
998
810
|
"Operational Identity contains a different assertion within one identity class.",
|
|
999
811
|
{
|
|
1000
812
|
code: "IDENTITY_SCHEMA_CONTRADICTION",
|
|
@@ -1016,7 +828,7 @@ function validateSnapshotIntegrity(snapshot, registry, graphId) {
|
|
|
1016
828
|
component
|
|
1017
829
|
);
|
|
1018
830
|
if (conflictingKinds !== void 0) {
|
|
1019
|
-
throw new
|
|
831
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1020
832
|
"Operational Identity class conflicts with ontology disjointness.",
|
|
1021
833
|
{
|
|
1022
834
|
code: "IDENTITY_SCHEMA_CONTRADICTION",
|
|
@@ -1029,7 +841,7 @@ function validateSnapshotIntegrity(snapshot, registry, graphId) {
|
|
|
1029
841
|
}
|
|
1030
842
|
}
|
|
1031
843
|
function closureMismatchError(graphId, detail) {
|
|
1032
|
-
return new
|
|
844
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1033
845
|
"Operational Identity materialized closure does not match computed identity components.",
|
|
1034
846
|
{ code: "IDENTITY_SCHEMA_CONTRADICTION", graphId, ...detail },
|
|
1035
847
|
{
|
|
@@ -1050,7 +862,7 @@ async function assertClosureMatchesComponents(target, schema, graphId, component
|
|
|
1050
862
|
}
|
|
1051
863
|
}
|
|
1052
864
|
const rows = await target.execute(
|
|
1053
|
-
|
|
865
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1054
866
|
SELECT member_kind, member_id, class_kind, class_id
|
|
1055
867
|
FROM ${schema.identityClosureTable}
|
|
1056
868
|
WHERE graph_id = ${graphId}
|
|
@@ -1080,7 +892,7 @@ async function assertClosureMatchesComponents(target, schema, graphId, component
|
|
|
1080
892
|
}
|
|
1081
893
|
}
|
|
1082
894
|
function selfAssertionError(relation) {
|
|
1083
|
-
return new
|
|
895
|
+
return new chunkX4GDXBOP_cjs.ValidationError(
|
|
1084
896
|
`Identity ${relation} assertions require two distinct node references.`,
|
|
1085
897
|
{
|
|
1086
898
|
issues: [
|
|
@@ -1099,7 +911,7 @@ function selfAssertionError(relation) {
|
|
|
1099
911
|
async function requireLiveEndpoint(target, graphId, ref) {
|
|
1100
912
|
const row = await target.getNode(graphId, ref.kind, ref.id);
|
|
1101
913
|
if (row === void 0 || row.deleted_at !== void 0) {
|
|
1102
|
-
throw new
|
|
914
|
+
throw new chunkX4GDXBOP_cjs.NodeNotFoundError(ref.kind, ref.id);
|
|
1103
915
|
}
|
|
1104
916
|
}
|
|
1105
917
|
async function loadLiveReferences(target, schema, graphId, references) {
|
|
@@ -1111,15 +923,15 @@ async function loadLiveReferences(target, schema, graphId, references) {
|
|
|
1111
923
|
});
|
|
1112
924
|
if (references.length > chunkSize) {
|
|
1113
925
|
const byKey = /* @__PURE__ */ new Map();
|
|
1114
|
-
for (const refChunk of
|
|
926
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(references, chunkSize)) {
|
|
1115
927
|
const live = await loadLiveReferences(target, schema, graphId, refChunk);
|
|
1116
928
|
for (const ref of live) byKey.set(refKey(ref), ref);
|
|
1117
929
|
}
|
|
1118
930
|
return [...byKey.values()];
|
|
1119
931
|
}
|
|
1120
|
-
const matches = referenceCondition(
|
|
932
|
+
const matches = referenceCondition(chunkOJHD3LXJ_cjs.sql`kind`, chunkOJHD3LXJ_cjs.sql`id`, references);
|
|
1121
933
|
const rows = await target.execute(
|
|
1122
|
-
|
|
934
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1123
935
|
SELECT kind, id
|
|
1124
936
|
FROM ${schema.nodesTable}
|
|
1125
937
|
WHERE graph_id = ${graphId}
|
|
@@ -1135,7 +947,7 @@ async function requireLiveEndpoints(target, schema, graphId, references) {
|
|
|
1135
947
|
const live = await loadLiveReferences(target, schema, graphId, references);
|
|
1136
948
|
const liveKeys = new Set(live.map((ref) => refKey(ref)));
|
|
1137
949
|
for (const [key, ref] of uniqueByKey) {
|
|
1138
|
-
if (!liveKeys.has(key)) throw new
|
|
950
|
+
if (!liveKeys.has(key)) throw new chunkX4GDXBOP_cjs.NodeNotFoundError(ref.kind, ref.id);
|
|
1139
951
|
}
|
|
1140
952
|
}
|
|
1141
953
|
async function requireStructuralEndpoints(target, schema, graphId, references) {
|
|
@@ -1149,10 +961,10 @@ async function requireStructuralEndpoints(target, schema, graphId, references) {
|
|
|
1149
961
|
parametersPerItem: 2
|
|
1150
962
|
});
|
|
1151
963
|
const presentKeys = /* @__PURE__ */ new Set();
|
|
1152
|
-
for (const refChunk of
|
|
1153
|
-
const matches = referenceCondition(
|
|
964
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(unique, chunkSize)) {
|
|
965
|
+
const matches = referenceCondition(chunkOJHD3LXJ_cjs.sql`kind`, chunkOJHD3LXJ_cjs.sql`id`, refChunk);
|
|
1154
966
|
const rows = await target.execute(
|
|
1155
|
-
|
|
967
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1156
968
|
SELECT kind, id
|
|
1157
969
|
FROM ${schema.nodesTable}
|
|
1158
970
|
WHERE graph_id = ${graphId}
|
|
@@ -1164,21 +976,21 @@ async function requireStructuralEndpoints(target, schema, graphId, references) {
|
|
|
1164
976
|
}
|
|
1165
977
|
}
|
|
1166
978
|
for (const [key, ref] of uniqueByKey) {
|
|
1167
|
-
if (!presentKeys.has(key)) throw new
|
|
979
|
+
if (!presentKeys.has(key)) throw new chunkX4GDXBOP_cjs.NodeNotFoundError(ref.kind, ref.id);
|
|
1168
980
|
}
|
|
1169
981
|
}
|
|
1170
982
|
|
|
1171
983
|
// src/identity/separation.ts
|
|
1172
984
|
var MAX_SEPARATION_INSERT_CHUNK_SIZE = 100;
|
|
1173
985
|
function identityClassKey(ref) {
|
|
1174
|
-
return
|
|
986
|
+
return chunkLLVOQOWE_cjs.encodeTupleKey([ref.kind, ref.id]);
|
|
1175
987
|
}
|
|
1176
988
|
var PAIR_KEY_SEPARATOR = "\0";
|
|
1177
989
|
function pairKey(pair) {
|
|
1178
990
|
return `${pair.low}${PAIR_KEY_SEPARATOR}${pair.high}`;
|
|
1179
991
|
}
|
|
1180
992
|
function orderedPair(first, second) {
|
|
1181
|
-
return
|
|
993
|
+
return chunkRWUWTJQY_cjs.compareCodePoints(first, second) <= 0 ? { low: first, high: second } : { low: second, high: first };
|
|
1182
994
|
}
|
|
1183
995
|
function buildSeparationProjection(assertions, classKeyOf) {
|
|
1184
996
|
const pairs = /* @__PURE__ */ new Map();
|
|
@@ -1203,7 +1015,7 @@ function buildSeparationProjection(assertions, classKeyOf) {
|
|
|
1203
1015
|
async function deleteSeparationForGraph(target, schema, graphId) {
|
|
1204
1016
|
await executeIdentityStatement(
|
|
1205
1017
|
target,
|
|
1206
|
-
|
|
1018
|
+
chunkOJHD3LXJ_cjs.sql`DELETE FROM ${schema.identitySeparationTable} WHERE graph_id = ${graphId}`
|
|
1207
1019
|
);
|
|
1208
1020
|
}
|
|
1209
1021
|
async function deleteSeparationForClassKeys(target, schema, graphId, classKeys) {
|
|
@@ -1214,14 +1026,14 @@ async function deleteSeparationForClassKeys(target, schema, graphId, classKeys)
|
|
|
1214
1026
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
1215
1027
|
parametersPerItem: 2
|
|
1216
1028
|
});
|
|
1217
|
-
for (const keyChunk of
|
|
1218
|
-
const keyList =
|
|
1219
|
-
keyChunk.map((key) =>
|
|
1220
|
-
|
|
1029
|
+
for (const keyChunk of chunkZBFZGLZE_cjs.chunk(unique, chunkSize)) {
|
|
1030
|
+
const keyList = chunkOJHD3LXJ_cjs.sql.join(
|
|
1031
|
+
keyChunk.map((key) => chunkOJHD3LXJ_cjs.sql`${key}`),
|
|
1032
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
1221
1033
|
);
|
|
1222
1034
|
await executeIdentityStatement(
|
|
1223
1035
|
target,
|
|
1224
|
-
|
|
1036
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
1225
1037
|
DELETE FROM ${schema.identitySeparationTable}
|
|
1226
1038
|
WHERE graph_id = ${graphId}
|
|
1227
1039
|
AND (class_key_low IN (${keyList}) OR class_key_high IN (${keyList}))
|
|
@@ -1258,7 +1070,7 @@ function proveSeparationReadiness(registry, graphId) {
|
|
|
1258
1070
|
async function probeSeparationPair(target, schema, graphId, pair) {
|
|
1259
1071
|
try {
|
|
1260
1072
|
const rows = await target.execute(
|
|
1261
|
-
|
|
1073
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1262
1074
|
SELECT
|
|
1263
1075
|
(
|
|
1264
1076
|
SELECT COUNT(*) FROM ${schema.identitySeparationTable}
|
|
@@ -1281,7 +1093,7 @@ async function probeSeparationPair(target, schema, graphId, pair) {
|
|
|
1281
1093
|
pairSeparated: countOf(row, "pair_rows") > 0
|
|
1282
1094
|
};
|
|
1283
1095
|
} catch (error) {
|
|
1284
|
-
if (!
|
|
1096
|
+
if (!chunkZBFZGLZE_cjs.isMissingTableError(error)) throw error;
|
|
1285
1097
|
throw separationUnreadableError(graphId, schema, error);
|
|
1286
1098
|
}
|
|
1287
1099
|
}
|
|
@@ -1289,7 +1101,7 @@ function countOf(row, column) {
|
|
|
1289
1101
|
return Number(row?.[column] ?? 0);
|
|
1290
1102
|
}
|
|
1291
1103
|
function separationUnreadableError(graphId, schema, cause) {
|
|
1292
|
-
return new
|
|
1104
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1293
1105
|
"Operational Identity could not read the materialized separation relation.",
|
|
1294
1106
|
{
|
|
1295
1107
|
code: "IDENTITY_STORAGE_MISSING",
|
|
@@ -1303,7 +1115,7 @@ function separationUnreadableError(graphId, schema, cause) {
|
|
|
1303
1115
|
);
|
|
1304
1116
|
}
|
|
1305
1117
|
function separationUnfilledError(graphId, schema) {
|
|
1306
|
-
return new
|
|
1118
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1307
1119
|
"Operational Identity found the separation relation present but never filled for this graph.",
|
|
1308
1120
|
{
|
|
1309
1121
|
code: "IDENTITY_STORAGE_MISSING",
|
|
@@ -1329,7 +1141,7 @@ async function separationRebuildRequired(target, schema, graphId, options) {
|
|
|
1329
1141
|
}
|
|
1330
1142
|
async function hasSeparationRows(target, schema, graphId) {
|
|
1331
1143
|
const rows = await target.execute(
|
|
1332
|
-
|
|
1144
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1333
1145
|
SELECT 1 AS present
|
|
1334
1146
|
FROM ${schema.identitySeparationTable}
|
|
1335
1147
|
WHERE graph_id = ${graphId}
|
|
@@ -1342,7 +1154,7 @@ async function hasLiveDifferentAssertions(target, schema, graphId, registry) {
|
|
|
1342
1154
|
if (!await probeAnyLiveDifferent(target, schema, graphId)) return false;
|
|
1343
1155
|
const activeKinds = [...identityActiveKinds(registry)];
|
|
1344
1156
|
if (activeKinds.length === 0) return false;
|
|
1345
|
-
const kindChunks =
|
|
1157
|
+
const kindChunks = chunkZBFZGLZE_cjs.chunk(activeKinds, owedProbeChunkSize(target));
|
|
1346
1158
|
for (const first of kindChunks) {
|
|
1347
1159
|
for (const second of kindChunks) {
|
|
1348
1160
|
if (await probeOwedSeparation(target, schema, graphId, [first, second])) {
|
|
@@ -1356,7 +1168,7 @@ var IDENTITY_SNAPSHOT_PARAMETERS = 4;
|
|
|
1356
1168
|
var OWED_SEPARATION_PROBE_PARAMETERS = IDENTITY_SNAPSHOT_PARAMETERS + 2;
|
|
1357
1169
|
async function probeAnyLiveDifferent(target, schema, graphId) {
|
|
1358
1170
|
const rows = await target.execute(
|
|
1359
|
-
|
|
1171
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1360
1172
|
SELECT 1 AS present
|
|
1361
1173
|
FROM (${liveDifferentSource(schema, graphId)}) live_different
|
|
1362
1174
|
LIMIT 1
|
|
@@ -1366,7 +1178,7 @@ async function probeAnyLiveDifferent(target, schema, graphId) {
|
|
|
1366
1178
|
}
|
|
1367
1179
|
async function probeOwedSeparation(target, schema, graphId, kinds) {
|
|
1368
1180
|
const rows = await target.execute(
|
|
1369
|
-
|
|
1181
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1370
1182
|
SELECT 1 AS present
|
|
1371
1183
|
FROM (${liveDifferentSource(schema, graphId)}) live_different
|
|
1372
1184
|
LEFT JOIN ${schema.identityClosureTable} class_a
|
|
@@ -1398,22 +1210,22 @@ function owedProbeChunkSize(target) {
|
|
|
1398
1210
|
});
|
|
1399
1211
|
}
|
|
1400
1212
|
function liveDifferentSource(schema, graphId) {
|
|
1401
|
-
return
|
|
1213
|
+
return chunkRDP6ZRSM_cjs.identityAssertionSnapshotSource(
|
|
1402
1214
|
schema,
|
|
1403
1215
|
graphId,
|
|
1404
|
-
|
|
1216
|
+
chunkRDP6ZRSM_cjs.identitySqlCoordinate(void 0, chunkM5MSP3BI_cjs.nowIso()),
|
|
1405
1217
|
"different"
|
|
1406
1218
|
);
|
|
1407
1219
|
}
|
|
1408
1220
|
function kindList(kinds) {
|
|
1409
|
-
return
|
|
1410
|
-
kinds.map((kind) =>
|
|
1411
|
-
|
|
1221
|
+
return chunkOJHD3LXJ_cjs.sql.join(
|
|
1222
|
+
kinds.map((kind) => chunkOJHD3LXJ_cjs.sql`${kind}`),
|
|
1223
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
1412
1224
|
);
|
|
1413
1225
|
}
|
|
1414
1226
|
async function readSeparationForGraph(target, schema, graphId) {
|
|
1415
1227
|
const rows = await target.execute(
|
|
1416
|
-
|
|
1228
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1417
1229
|
SELECT class_key_low, class_key_high
|
|
1418
1230
|
FROM ${schema.identitySeparationTable}
|
|
1419
1231
|
WHERE graph_id = ${graphId}
|
|
@@ -1430,23 +1242,23 @@ async function insertSeparationRows(target, schema, graphId, projection) {
|
|
|
1430
1242
|
maxItems: MAX_SEPARATION_INSERT_CHUNK_SIZE,
|
|
1431
1243
|
parametersPerItem: 3
|
|
1432
1244
|
});
|
|
1433
|
-
for (const pairChunk of
|
|
1245
|
+
for (const pairChunk of chunkZBFZGLZE_cjs.chunk(projection.pairs, chunkSize)) {
|
|
1434
1246
|
const values = pairChunk.map(
|
|
1435
|
-
(pair) =>
|
|
1247
|
+
(pair) => chunkOJHD3LXJ_cjs.sql`(${graphId}, ${pair.low}, ${pair.high})`
|
|
1436
1248
|
);
|
|
1437
1249
|
try {
|
|
1438
1250
|
await executeIdentityStatement(
|
|
1439
1251
|
target,
|
|
1440
|
-
|
|
1252
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
1441
1253
|
INSERT INTO ${schema.identitySeparationTable} (
|
|
1442
1254
|
graph_id, class_key_low, class_key_high
|
|
1443
|
-
) VALUES ${
|
|
1255
|
+
) VALUES ${chunkOJHD3LXJ_cjs.sql.join(values, chunkOJHD3LXJ_cjs.sql`, `)}
|
|
1444
1256
|
`
|
|
1445
1257
|
);
|
|
1446
1258
|
} catch (error) {
|
|
1447
1259
|
const collapsed = collapsedIn(projection, pairChunk);
|
|
1448
1260
|
if (collapsed === void 0) throw error;
|
|
1449
|
-
throw new
|
|
1261
|
+
throw new chunkX4GDXBOP_cjs.IdentitySeparationViolationError(
|
|
1450
1262
|
{ graphId, enforcedBy: "database", ...collapsed },
|
|
1451
1263
|
{ cause: error }
|
|
1452
1264
|
);
|
|
@@ -1454,7 +1266,7 @@ async function insertSeparationRows(target, schema, graphId, projection) {
|
|
|
1454
1266
|
}
|
|
1455
1267
|
const accepted = projection.collapsed[0];
|
|
1456
1268
|
if (accepted === void 0) return;
|
|
1457
|
-
throw new
|
|
1269
|
+
throw new chunkX4GDXBOP_cjs.IdentitySeparationViolationError({
|
|
1458
1270
|
graphId,
|
|
1459
1271
|
enforcedBy: "writer",
|
|
1460
1272
|
...accepted
|
|
@@ -1484,7 +1296,7 @@ function assertSeparationMatchesProjection(graphId, persisted, projection) {
|
|
|
1484
1296
|
}
|
|
1485
1297
|
}
|
|
1486
1298
|
function separationMismatchError(graphId, detail) {
|
|
1487
|
-
return new
|
|
1299
|
+
return new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1488
1300
|
"Operational Identity materialized separation relation does not match the assertion ledger.",
|
|
1489
1301
|
{ code: "IDENTITY_SCHEMA_CONTRADICTION", graphId, ...detail },
|
|
1490
1302
|
{
|
|
@@ -1498,26 +1310,26 @@ function hasExplicitIdentityValidityWindow(window) {
|
|
|
1498
1310
|
return window?.validFrom !== void 0 || window?.validTo !== void 0;
|
|
1499
1311
|
}
|
|
1500
1312
|
function resolveIdentityValidityWindow(window, operationInstant) {
|
|
1501
|
-
const validFrom =
|
|
1502
|
-
const validTo =
|
|
1503
|
-
if (
|
|
1504
|
-
throw new
|
|
1313
|
+
const validFrom = chunkM5MSP3BI_cjs.validateOptionalCanonicalIsoDate(window?.validFrom, "validFrom") ?? operationInstant;
|
|
1314
|
+
const validTo = chunkM5MSP3BI_cjs.validateOptionalCanonicalIsoDate(window?.validTo, "validTo");
|
|
1315
|
+
if (chunkRWUWTJQY_cjs.compareCodePoints(validFrom, operationInstant) > 0) {
|
|
1316
|
+
throw new chunkX4GDXBOP_cjs.IdentityValidityWindowError({
|
|
1505
1317
|
reason: "future-valid-from",
|
|
1506
1318
|
validFrom,
|
|
1507
1319
|
...validTo === void 0 ? {} : { validTo },
|
|
1508
1320
|
operationInstant
|
|
1509
1321
|
});
|
|
1510
1322
|
}
|
|
1511
|
-
if (validTo !== void 0 &&
|
|
1512
|
-
throw new
|
|
1323
|
+
if (validTo !== void 0 && chunkRWUWTJQY_cjs.compareCodePoints(validTo, operationInstant) > 0) {
|
|
1324
|
+
throw new chunkX4GDXBOP_cjs.IdentityValidityWindowError({
|
|
1513
1325
|
reason: "future-valid-to",
|
|
1514
1326
|
validFrom,
|
|
1515
1327
|
validTo,
|
|
1516
1328
|
operationInstant
|
|
1517
1329
|
});
|
|
1518
1330
|
}
|
|
1519
|
-
if (validTo !== void 0 &&
|
|
1520
|
-
throw new
|
|
1331
|
+
if (validTo !== void 0 && chunkRWUWTJQY_cjs.compareCodePoints(validTo, validFrom) < 0) {
|
|
1332
|
+
throw new chunkX4GDXBOP_cjs.IdentityValidityWindowError({
|
|
1521
1333
|
reason: "inverted",
|
|
1522
1334
|
validFrom,
|
|
1523
1335
|
validTo,
|
|
@@ -1550,7 +1362,7 @@ async function validateCurrentRelation(ctx, target, relation, operation, a, b) {
|
|
|
1550
1362
|
const bClass = chunkN66HCGCY_cjs.requireDefined(classes.get(refKey(b)));
|
|
1551
1363
|
if (relation === "different") {
|
|
1552
1364
|
if (!containsRef(aClass, b)) return;
|
|
1553
|
-
throw new
|
|
1365
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1554
1366
|
operation,
|
|
1555
1367
|
a,
|
|
1556
1368
|
b,
|
|
@@ -1569,7 +1381,7 @@ async function validateCurrentRelation(ctx, target, relation, operation, a, b) {
|
|
|
1569
1381
|
);
|
|
1570
1382
|
if (different === void 0)
|
|
1571
1383
|
throw unexpectedSeparationError(ctx.graphId, aKey, bKey);
|
|
1572
|
-
throw new
|
|
1384
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1573
1385
|
operation,
|
|
1574
1386
|
a,
|
|
1575
1387
|
b,
|
|
@@ -1579,7 +1391,7 @@ async function validateCurrentRelation(ctx, target, relation, operation, a, b) {
|
|
|
1579
1391
|
}
|
|
1580
1392
|
const disjointKinds = classHasDisjointKinds(ctx.registry, aClass, bClass);
|
|
1581
1393
|
if (disjointKinds === void 0) return;
|
|
1582
|
-
throw new
|
|
1394
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1583
1395
|
operation,
|
|
1584
1396
|
a,
|
|
1585
1397
|
b,
|
|
@@ -1589,8 +1401,8 @@ async function validateCurrentRelation(ctx, target, relation, operation, a, b) {
|
|
|
1589
1401
|
}
|
|
1590
1402
|
async function currentAssertionForPair(target, schema, graphId, relation, a, b) {
|
|
1591
1403
|
const rows = await target.execute(
|
|
1592
|
-
|
|
1593
|
-
SELECT ${
|
|
1404
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1405
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
1594
1406
|
FROM ${schema.identityAssertionsTable}
|
|
1595
1407
|
WHERE graph_id = ${graphId}
|
|
1596
1408
|
AND rel = ${relation}
|
|
@@ -1606,10 +1418,10 @@ async function currentAssertionForPair(target, schema, graphId, relation, a, b)
|
|
|
1606
1418
|
return rows[0] === void 0 ? void 0 : normalizeIdentityAssertionRow(rows[0]);
|
|
1607
1419
|
}
|
|
1608
1420
|
async function assertionForExactWindow(target, schema, graphId, relation, a, b, window) {
|
|
1609
|
-
const validToMatch = window.validTo === void 0 ?
|
|
1421
|
+
const validToMatch = window.validTo === void 0 ? chunkOJHD3LXJ_cjs.sql`valid_to IS NULL` : chunkOJHD3LXJ_cjs.sql`valid_to = ${window.validTo}`;
|
|
1610
1422
|
const rows = await target.execute(
|
|
1611
|
-
|
|
1612
|
-
SELECT ${
|
|
1423
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1424
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
1613
1425
|
FROM ${schema.identityAssertionsTable}
|
|
1614
1426
|
WHERE graph_id = ${graphId}
|
|
1615
1427
|
AND rel = ${relation}
|
|
@@ -1641,7 +1453,7 @@ async function insertAssertion(target, schema, graphId, relation, a, b, operatio
|
|
|
1641
1453
|
function buildAssertionRow(graphId, relation, a, b, timestamp, options) {
|
|
1642
1454
|
return {
|
|
1643
1455
|
graph_id: graphId,
|
|
1644
|
-
id: options?.id ??
|
|
1456
|
+
id: options?.id ?? chunkRDP6ZRSM_cjs.generateId(),
|
|
1645
1457
|
rel: relation,
|
|
1646
1458
|
a_kind: a.kind,
|
|
1647
1459
|
a_id: a.id,
|
|
@@ -1658,12 +1470,12 @@ function buildAssertionRow(graphId, relation, a, b, timestamp, options) {
|
|
|
1658
1470
|
}
|
|
1659
1471
|
function canonicalEndpointTimestamp(value) {
|
|
1660
1472
|
if (value === void 0 || value === null) return void 0;
|
|
1661
|
-
return
|
|
1473
|
+
return chunkM5MSP3BI_cjs.canonicalizeDatabaseTimestamp(value);
|
|
1662
1474
|
}
|
|
1663
1475
|
async function requireEndpointsCoverIdentityWindow(target, graphId, references, window) {
|
|
1664
1476
|
for (const ref of references) {
|
|
1665
1477
|
const row = await target.getNode(graphId, ref.kind, ref.id);
|
|
1666
|
-
if (row === void 0) throw new
|
|
1478
|
+
if (row === void 0) throw new chunkX4GDXBOP_cjs.NodeNotFoundError(ref.kind, ref.id);
|
|
1667
1479
|
if (window.effective === "empty") continue;
|
|
1668
1480
|
const validFrom = canonicalEndpointTimestamp(row.valid_from);
|
|
1669
1481
|
const validTo = canonicalEndpointTimestamp(row.valid_to);
|
|
@@ -1677,7 +1489,7 @@ async function requireEndpointsCoverIdentityWindow(target, graphId, references,
|
|
|
1677
1489
|
const effectiveEnd = [endpointWindow.validTo, endpointWindow.deletedAt].filter((value) => value !== void 0).toSorted()[0];
|
|
1678
1490
|
const endsTooEarly = window.validTo === void 0 ? effectiveEnd !== void 0 : effectiveEnd !== void 0 && effectiveEnd < window.validTo;
|
|
1679
1491
|
if (!startsTooLate && !endsTooEarly) continue;
|
|
1680
|
-
throw new
|
|
1492
|
+
throw new chunkX4GDXBOP_cjs.IdentityEndpointValidityError({
|
|
1681
1493
|
endpoint: ref,
|
|
1682
1494
|
assertionWindow: {
|
|
1683
1495
|
validFrom: window.validFrom,
|
|
@@ -1688,8 +1500,8 @@ async function requireEndpointsCoverIdentityWindow(target, graphId, references,
|
|
|
1688
1500
|
}
|
|
1689
1501
|
}
|
|
1690
1502
|
function windowOverlapSql(alias, lowerBoundary, upperBoundary) {
|
|
1691
|
-
const column = (name) =>
|
|
1692
|
-
return
|
|
1503
|
+
const column = (name) => chunkOJHD3LXJ_cjs.sql`${chunkOJHD3LXJ_cjs.sql.identifier(alias)}.${chunkOJHD3LXJ_cjs.sql.identifier(name)}`;
|
|
1504
|
+
return chunkOJHD3LXJ_cjs.sql`
|
|
1693
1505
|
${column("deleted_at")} IS NULL
|
|
1694
1506
|
AND ${column("valid_from")} <= ${upperBoundary}
|
|
1695
1507
|
AND (${column("valid_to")} IS NULL OR ${column("valid_to")} > ${lowerBoundary})
|
|
@@ -1719,14 +1531,14 @@ async function loadIdentityWindowLedger(target, schema, graphId, requests, opera
|
|
|
1719
1531
|
parametersPerItem: 2
|
|
1720
1532
|
});
|
|
1721
1533
|
const rows = [];
|
|
1722
|
-
for (const referenceChunk of
|
|
1723
|
-
const seedRows =
|
|
1534
|
+
for (const referenceChunk of chunkZBFZGLZE_cjs.chunk(references, seedChunkSize)) {
|
|
1535
|
+
const seedRows = chunkOJHD3LXJ_cjs.sql.join(
|
|
1724
1536
|
referenceChunk.map(
|
|
1725
|
-
(reference) =>
|
|
1537
|
+
(reference) => chunkOJHD3LXJ_cjs.sql`(${reference.kind}, ${reference.id})`
|
|
1726
1538
|
),
|
|
1727
|
-
|
|
1539
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
1728
1540
|
);
|
|
1729
|
-
const component = sameIdAcrossKinds === "fold" ?
|
|
1541
|
+
const component = sameIdAcrossKinds === "fold" ? chunkOJHD3LXJ_cjs.sql`
|
|
1730
1542
|
neighbor_modes(mode) AS (
|
|
1731
1543
|
VALUES ('assertion'), ('fold')
|
|
1732
1544
|
),
|
|
@@ -1760,7 +1572,7 @@ async function loadIdentityWindowLedger(target, schema, graphId, requests, opera
|
|
|
1760
1572
|
AND folded.id = component.id
|
|
1761
1573
|
WHERE assertion.id IS NOT NULL OR folded.id IS NOT NULL
|
|
1762
1574
|
)
|
|
1763
|
-
` :
|
|
1575
|
+
` : chunkOJHD3LXJ_cjs.sql`
|
|
1764
1576
|
component(kind, id) AS (
|
|
1765
1577
|
SELECT seed_kind, seed_id FROM seeds
|
|
1766
1578
|
UNION
|
|
@@ -1785,7 +1597,7 @@ async function loadIdentityWindowLedger(target, schema, graphId, requests, opera
|
|
|
1785
1597
|
`;
|
|
1786
1598
|
rows.push(
|
|
1787
1599
|
...await target.execute(
|
|
1788
|
-
|
|
1600
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1789
1601
|
WITH RECURSIVE
|
|
1790
1602
|
seeds(seed_kind, seed_id) AS (VALUES ${seedRows}),
|
|
1791
1603
|
${component},
|
|
@@ -1798,7 +1610,7 @@ async function loadIdentityWindowLedger(target, schema, graphId, requests, opera
|
|
|
1798
1610
|
WHERE assertion.graph_id = ${graphId}
|
|
1799
1611
|
AND ${windowOverlapSql("assertion", lowerBoundary, upperBoundary)}
|
|
1800
1612
|
)
|
|
1801
|
-
SELECT 'assertion' AS row_type, ${
|
|
1613
|
+
SELECT 'assertion' AS row_type, ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS},
|
|
1802
1614
|
NULL AS node_kind, NULL AS node_id,
|
|
1803
1615
|
NULL AS node_created_at, NULL AS node_deleted_at
|
|
1804
1616
|
FROM selected_assertions
|
|
@@ -1904,7 +1716,7 @@ function validateRelationAgainstLedger(ctx, nodes, assertions, relation, operati
|
|
|
1904
1716
|
const bClass = components.get(refKey(b)) ?? [];
|
|
1905
1717
|
if (relation === "different") {
|
|
1906
1718
|
if (!containsRef(aClass, b)) continue;
|
|
1907
|
-
throw new
|
|
1719
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1908
1720
|
operation,
|
|
1909
1721
|
a,
|
|
1910
1722
|
b,
|
|
@@ -1917,7 +1729,7 @@ function validateRelationAgainstLedger(ctx, nodes, assertions, relation, operati
|
|
|
1917
1729
|
bClass
|
|
1918
1730
|
);
|
|
1919
1731
|
if (different !== void 0) {
|
|
1920
|
-
throw new
|
|
1732
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1921
1733
|
operation,
|
|
1922
1734
|
a,
|
|
1923
1735
|
b,
|
|
@@ -1927,7 +1739,7 @@ function validateRelationAgainstLedger(ctx, nodes, assertions, relation, operati
|
|
|
1927
1739
|
}
|
|
1928
1740
|
const disjointKinds = classHasDisjointKinds(ctx.registry, aClass, bClass);
|
|
1929
1741
|
if (disjointKinds === void 0) continue;
|
|
1930
|
-
throw new
|
|
1742
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
1931
1743
|
operation,
|
|
1932
1744
|
a,
|
|
1933
1745
|
b,
|
|
@@ -1980,7 +1792,7 @@ async function validateRelationThroughoutIdentityWindow(ctx, target, relation, o
|
|
|
1980
1792
|
validator.validate(relation, operation, a, b, window);
|
|
1981
1793
|
}
|
|
1982
1794
|
function nullableAssertionValue(value) {
|
|
1983
|
-
return value === void 0 ?
|
|
1795
|
+
return value === void 0 ? chunkOJHD3LXJ_cjs.sql`NULL` : chunkOJHD3LXJ_cjs.sql`${value}`;
|
|
1984
1796
|
}
|
|
1985
1797
|
async function insertAssertionRows(target, schema, rows) {
|
|
1986
1798
|
if (rows.length === 0) return;
|
|
@@ -1989,9 +1801,9 @@ async function insertAssertionRows(target, schema, rows) {
|
|
|
1989
1801
|
maxItems: MAX_ASSERTION_INSERT_CHUNK_SIZE,
|
|
1990
1802
|
parametersPerItem: 14
|
|
1991
1803
|
});
|
|
1992
|
-
for (const rowChunk of
|
|
1804
|
+
for (const rowChunk of chunkZBFZGLZE_cjs.chunk(rows, chunkSize)) {
|
|
1993
1805
|
const values = rowChunk.map(
|
|
1994
|
-
(row) =>
|
|
1806
|
+
(row) => chunkOJHD3LXJ_cjs.sql`
|
|
1995
1807
|
(
|
|
1996
1808
|
${row.graph_id}, ${row.id}, ${row.rel}, ${row.a_kind}, ${row.a_id},
|
|
1997
1809
|
${row.b_kind}, ${row.b_id}, ${row.valid_from},
|
|
@@ -2005,8 +1817,8 @@ async function insertAssertionRows(target, schema, rows) {
|
|
|
2005
1817
|
);
|
|
2006
1818
|
await executeIdentityStatement(
|
|
2007
1819
|
target,
|
|
2008
|
-
|
|
2009
|
-
INSERT INTO ${schema.identityAssertionsTable} (${
|
|
1820
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
1821
|
+
INSERT INTO ${schema.identityAssertionsTable} (${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}) VALUES ${chunkOJHD3LXJ_cjs.sql.join(values, chunkOJHD3LXJ_cjs.sql`, `)}
|
|
2010
1822
|
`
|
|
2011
1823
|
);
|
|
2012
1824
|
}
|
|
@@ -2020,14 +1832,14 @@ async function loadAssertionsByIds(target, schema, graphId, ids) {
|
|
|
2020
1832
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
2021
1833
|
parametersPerItem: 1
|
|
2022
1834
|
});
|
|
2023
|
-
for (const idChunk of
|
|
2024
|
-
const idList =
|
|
2025
|
-
idChunk.map((id) =>
|
|
2026
|
-
|
|
1835
|
+
for (const idChunk of chunkZBFZGLZE_cjs.chunk(uniqueIds, chunkSize)) {
|
|
1836
|
+
const idList = chunkOJHD3LXJ_cjs.sql.join(
|
|
1837
|
+
idChunk.map((id) => chunkOJHD3LXJ_cjs.sql`${id}`),
|
|
1838
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
2027
1839
|
);
|
|
2028
1840
|
const rows = await target.execute(
|
|
2029
|
-
|
|
2030
|
-
SELECT ${
|
|
1841
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
1842
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
2031
1843
|
FROM ${schema.identityAssertionsTable}
|
|
2032
1844
|
WHERE graph_id = ${graphId} AND id IN (${idList})
|
|
2033
1845
|
`)
|
|
@@ -2049,13 +1861,13 @@ async function loadCurrentClassAnchors(target, schema, graphId, references) {
|
|
|
2049
1861
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
2050
1862
|
parametersPerItem: 2
|
|
2051
1863
|
});
|
|
2052
|
-
for (const refChunk of
|
|
2053
|
-
const seedRows =
|
|
2054
|
-
refChunk.map((ref) =>
|
|
2055
|
-
|
|
1864
|
+
for (const refChunk of chunkZBFZGLZE_cjs.chunk(uniqueReferences, chunkSize)) {
|
|
1865
|
+
const seedRows = chunkOJHD3LXJ_cjs.sql.join(
|
|
1866
|
+
refChunk.map((ref) => chunkOJHD3LXJ_cjs.sql`(${ref.kind}, ${ref.id})`),
|
|
1867
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
2056
1868
|
);
|
|
2057
1869
|
const rows = await target.execute(
|
|
2058
|
-
|
|
1870
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
2059
1871
|
WITH seeds(seed_kind, seed_id) AS (
|
|
2060
1872
|
VALUES ${seedRows}
|
|
2061
1873
|
)
|
|
@@ -2150,7 +1962,7 @@ async function replaceClosure(target, schema, graphId, allowedKinds, sameIdAcros
|
|
|
2150
1962
|
);
|
|
2151
1963
|
await executeIdentityStatement(
|
|
2152
1964
|
target,
|
|
2153
|
-
|
|
1965
|
+
chunkOJHD3LXJ_cjs.sql`DELETE FROM ${schema.identityClosureTable} WHERE graph_id = ${graphId}`
|
|
2154
1966
|
);
|
|
2155
1967
|
await insertClosureComponents(target, schema, graphId, snapshot.components);
|
|
2156
1968
|
await deleteSeparationForGraph(target, schema, graphId);
|
|
@@ -2173,7 +1985,7 @@ async function insertClosureComponents(target, schema, graphId, components) {
|
|
|
2173
1985
|
for (const member of component) {
|
|
2174
1986
|
emitted.add(refKey(member));
|
|
2175
1987
|
values.push(
|
|
2176
|
-
|
|
1988
|
+
chunkOJHD3LXJ_cjs.sql`(${graphId}, ${member.kind}, ${member.id}, ${canonical.kind}, ${canonical.id})`
|
|
2177
1989
|
);
|
|
2178
1990
|
}
|
|
2179
1991
|
}
|
|
@@ -2183,13 +1995,13 @@ async function insertClosureComponents(target, schema, graphId, components) {
|
|
|
2183
1995
|
maxItems: MAX_CLOSURE_INSERT_CHUNK_SIZE,
|
|
2184
1996
|
parametersPerItem: 5
|
|
2185
1997
|
});
|
|
2186
|
-
for (const valueChunk of
|
|
1998
|
+
for (const valueChunk of chunkZBFZGLZE_cjs.chunk(values, chunkSize)) {
|
|
2187
1999
|
await executeIdentityStatement(
|
|
2188
2000
|
target,
|
|
2189
|
-
|
|
2001
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2190
2002
|
INSERT INTO ${schema.identityClosureTable} (
|
|
2191
2003
|
graph_id, member_kind, member_id, class_kind, class_id
|
|
2192
|
-
) VALUES ${
|
|
2004
|
+
) VALUES ${chunkOJHD3LXJ_cjs.sql.join(valueChunk, chunkOJHD3LXJ_cjs.sql`, `)}
|
|
2193
2005
|
`
|
|
2194
2006
|
);
|
|
2195
2007
|
}
|
|
@@ -2228,15 +2040,15 @@ async function replaceAffectedClosure(target, schema, graphId, references, sameI
|
|
|
2228
2040
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
2229
2041
|
parametersPerItem: 2
|
|
2230
2042
|
});
|
|
2231
|
-
for (const affectedChunk of
|
|
2043
|
+
for (const affectedChunk of chunkZBFZGLZE_cjs.chunk(affected, chunkSize)) {
|
|
2232
2044
|
const matches = referenceCondition(
|
|
2233
|
-
|
|
2234
|
-
|
|
2045
|
+
chunkOJHD3LXJ_cjs.sql`member_kind`,
|
|
2046
|
+
chunkOJHD3LXJ_cjs.sql`member_id`,
|
|
2235
2047
|
affectedChunk
|
|
2236
2048
|
);
|
|
2237
2049
|
await executeIdentityStatement(
|
|
2238
2050
|
target,
|
|
2239
|
-
|
|
2051
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2240
2052
|
DELETE FROM ${schema.identityClosureTable}
|
|
2241
2053
|
WHERE graph_id = ${graphId} AND ${matches}
|
|
2242
2054
|
`
|
|
@@ -2272,7 +2084,7 @@ async function mergeCurrentClasses(target, schema, graphId, a, b) {
|
|
|
2272
2084
|
if (refKey(previousCanonical) === refKey(canonical)) return;
|
|
2273
2085
|
await executeIdentityStatement(
|
|
2274
2086
|
target,
|
|
2275
|
-
|
|
2087
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2276
2088
|
UPDATE ${schema.identityClosureTable}
|
|
2277
2089
|
SET class_kind = ${canonical.kind}, class_id = ${canonical.id}
|
|
2278
2090
|
WHERE graph_id = ${graphId}
|
|
@@ -2288,14 +2100,14 @@ async function mergeCurrentClasses(target, schema, graphId, a, b) {
|
|
|
2288
2100
|
);
|
|
2289
2101
|
if (singletonMembers.length > 0) {
|
|
2290
2102
|
const values = singletonMembers.map(
|
|
2291
|
-
(member) =>
|
|
2103
|
+
(member) => chunkOJHD3LXJ_cjs.sql`(${graphId}, ${member.kind}, ${member.id}, ${canonical.kind}, ${canonical.id})`
|
|
2292
2104
|
);
|
|
2293
2105
|
await executeIdentityStatement(
|
|
2294
2106
|
target,
|
|
2295
|
-
|
|
2107
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2296
2108
|
INSERT INTO ${schema.identityClosureTable} (
|
|
2297
2109
|
graph_id, member_kind, member_id, class_kind, class_id
|
|
2298
|
-
) VALUES ${
|
|
2110
|
+
) VALUES ${chunkOJHD3LXJ_cjs.sql.join(values, chunkOJHD3LXJ_cjs.sql`, `)}
|
|
2299
2111
|
`
|
|
2300
2112
|
);
|
|
2301
2113
|
}
|
|
@@ -2380,7 +2192,7 @@ async function assertPair(ctx, target, relation, firstInput, secondInput, touch,
|
|
|
2380
2192
|
b
|
|
2381
2193
|
);
|
|
2382
2194
|
if (current !== void 0) {
|
|
2383
|
-
throw new
|
|
2195
|
+
throw new chunkX4GDXBOP_cjs.IdentityValidityWindowError({
|
|
2384
2196
|
reason: "overlapping-open-window",
|
|
2385
2197
|
validFrom: window.validFrom,
|
|
2386
2198
|
operationInstant
|
|
@@ -2433,7 +2245,7 @@ async function assertPair(ctx, target, relation, firstInput, secondInput, touch,
|
|
|
2433
2245
|
|
|
2434
2246
|
// src/identity/assertion-key.ts
|
|
2435
2247
|
function identityAssertionSemanticKey(relation, a, b) {
|
|
2436
|
-
return
|
|
2248
|
+
return chunkLLVOQOWE_cjs.encodeTupleKey([relation, a.kind, a.id, b.kind, b.id]);
|
|
2437
2249
|
}
|
|
2438
2250
|
|
|
2439
2251
|
// src/identity/service-facade.ts
|
|
@@ -2530,7 +2342,7 @@ async function bulkAssertPairs(ctx, target, relation, pairs, touch) {
|
|
|
2530
2342
|
const createdRows = [];
|
|
2531
2343
|
const results = [];
|
|
2532
2344
|
const closureReferences = [];
|
|
2533
|
-
const timestamp =
|
|
2345
|
+
const timestamp = chunkM5MSP3BI_cjs.nowIso();
|
|
2534
2346
|
const operation = relation === "same" ? "assertSame" : "assertDifferent";
|
|
2535
2347
|
for (const [a, b] of normalizedPairs) {
|
|
2536
2348
|
const semanticKey = assertionSemanticKey(relation, a, b);
|
|
@@ -2543,7 +2355,7 @@ async function bulkAssertPairs(ctx, target, relation, pairs, touch) {
|
|
|
2543
2355
|
const rootB = unionFind.root(b);
|
|
2544
2356
|
if (relation === "different") {
|
|
2545
2357
|
if (rootA === rootB) {
|
|
2546
|
-
throw new
|
|
2358
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
2547
2359
|
operation,
|
|
2548
2360
|
a,
|
|
2549
2361
|
b,
|
|
@@ -2553,7 +2365,7 @@ async function bulkAssertPairs(ctx, target, relation, pairs, touch) {
|
|
|
2553
2365
|
} else {
|
|
2554
2366
|
const spanning = differentByRoot.get(rootA)?.get(rootB);
|
|
2555
2367
|
if (spanning !== void 0) {
|
|
2556
|
-
throw new
|
|
2368
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
2557
2369
|
operation,
|
|
2558
2370
|
a,
|
|
2559
2371
|
b,
|
|
@@ -2567,7 +2379,7 @@ async function bulkAssertPairs(ctx, target, relation, pairs, touch) {
|
|
|
2567
2379
|
kindsByRoot.get(rootB) ?? /* @__PURE__ */ new Set([b.kind])
|
|
2568
2380
|
);
|
|
2569
2381
|
if (disjointKinds !== void 0) {
|
|
2570
|
-
throw new
|
|
2382
|
+
throw new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
2571
2383
|
operation,
|
|
2572
2384
|
a,
|
|
2573
2385
|
b,
|
|
@@ -2660,8 +2472,8 @@ async function bulkAssertWindowedPairs(ctx, target, relation, pairs, touch, oper
|
|
|
2660
2472
|
}
|
|
2661
2473
|
async function findCurrentAssertionById(target, schema, graphId, id) {
|
|
2662
2474
|
const rows = await target.execute(
|
|
2663
|
-
|
|
2664
|
-
SELECT ${
|
|
2475
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
2476
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
2665
2477
|
FROM ${schema.identityAssertionsTable}
|
|
2666
2478
|
WHERE graph_id = ${graphId}
|
|
2667
2479
|
AND id = ${id}
|
|
@@ -2680,12 +2492,12 @@ async function retractById(ctx, target, id, touch) {
|
|
|
2680
2492
|
id
|
|
2681
2493
|
);
|
|
2682
2494
|
if (existing === void 0) return void 0;
|
|
2683
|
-
const now =
|
|
2495
|
+
const now = chunkM5MSP3BI_cjs.nowIso();
|
|
2684
2496
|
const validTo = clampValidTo(now, existing.valid_from);
|
|
2685
2497
|
const ended = { ...existing, valid_to: validTo, updated_at: now };
|
|
2686
2498
|
await executeIdentityStatement(
|
|
2687
2499
|
target,
|
|
2688
|
-
|
|
2500
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2689
2501
|
UPDATE ${ctx.schema.identityAssertionsTable}
|
|
2690
2502
|
SET valid_to = ${validTo}, updated_at = ${now}
|
|
2691
2503
|
WHERE graph_id = ${ctx.graphId}
|
|
@@ -2705,14 +2517,14 @@ async function retractCurrentAssertions(ctx, target, ids, touch, resolveValidTo)
|
|
|
2705
2517
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
2706
2518
|
parametersPerItem: 1
|
|
2707
2519
|
});
|
|
2708
|
-
for (const idChunk of
|
|
2709
|
-
const placeholders =
|
|
2710
|
-
idChunk.map((id) =>
|
|
2711
|
-
|
|
2520
|
+
for (const idChunk of chunkZBFZGLZE_cjs.chunk(uniqueIds, readChunkSize)) {
|
|
2521
|
+
const placeholders = chunkOJHD3LXJ_cjs.sql.join(
|
|
2522
|
+
idChunk.map((id) => chunkOJHD3LXJ_cjs.sql`${id}`),
|
|
2523
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
2712
2524
|
);
|
|
2713
2525
|
const rows = await target.execute(
|
|
2714
|
-
|
|
2715
|
-
SELECT ${
|
|
2526
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
2527
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
2716
2528
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
2717
2529
|
WHERE graph_id = ${ctx.graphId}
|
|
2718
2530
|
AND id IN (${placeholders})
|
|
@@ -2723,7 +2535,7 @@ async function retractCurrentAssertions(ctx, target, ids, touch, resolveValidTo)
|
|
|
2723
2535
|
current.push(...rows.map((row) => normalizeIdentityAssertionRow(row)));
|
|
2724
2536
|
}
|
|
2725
2537
|
if (current.length === 0) return [];
|
|
2726
|
-
const operationInstant =
|
|
2538
|
+
const operationInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
2727
2539
|
const byValidTo = /* @__PURE__ */ new Map();
|
|
2728
2540
|
const endedById = /* @__PURE__ */ new Map();
|
|
2729
2541
|
for (const row of current) {
|
|
@@ -2739,14 +2551,14 @@ async function retractCurrentAssertions(ctx, target, ids, touch, resolveValidTo)
|
|
|
2739
2551
|
parametersPerItem: 1
|
|
2740
2552
|
});
|
|
2741
2553
|
for (const [validTo, ids2] of byValidTo) {
|
|
2742
|
-
for (const idChunk of
|
|
2743
|
-
const placeholders =
|
|
2744
|
-
idChunk.map((id) =>
|
|
2745
|
-
|
|
2554
|
+
for (const idChunk of chunkZBFZGLZE_cjs.chunk(ids2, updateChunkSize)) {
|
|
2555
|
+
const placeholders = chunkOJHD3LXJ_cjs.sql.join(
|
|
2556
|
+
idChunk.map((id) => chunkOJHD3LXJ_cjs.sql`${id}`),
|
|
2557
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
2746
2558
|
);
|
|
2747
2559
|
await executeIdentityStatement(
|
|
2748
2560
|
target,
|
|
2749
|
-
|
|
2561
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
2750
2562
|
UPDATE ${ctx.schema.identityAssertionsTable}
|
|
2751
2563
|
SET valid_to = ${validTo}, updated_at = ${operationInstant}
|
|
2752
2564
|
WHERE graph_id = ${ctx.graphId}
|
|
@@ -2794,7 +2606,7 @@ async function retractPlannedAssertions(ctx, target, retractions, touch) {
|
|
|
2794
2606
|
(row, operationInstant) => {
|
|
2795
2607
|
const retraction = chunkN66HCGCY_cjs.requireDefined(retractionById.get(row.id));
|
|
2796
2608
|
if (retraction.validTo === void 0) {
|
|
2797
|
-
throw new
|
|
2609
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
2798
2610
|
`Identity merge retraction ${retraction.id} is missing validTo.`,
|
|
2799
2611
|
{
|
|
2800
2612
|
code: "IDENTITY_MERGE_RETRACTION_REQUIRES_END",
|
|
@@ -2813,7 +2625,7 @@ async function retractPlannedAssertions(ctx, target, retractions, touch) {
|
|
|
2813
2625
|
}
|
|
2814
2626
|
async function runIdentityMutation(ctx, fn) {
|
|
2815
2627
|
let touched = false;
|
|
2816
|
-
return runInWriteTransaction(
|
|
2628
|
+
return chunkRDP6ZRSM_cjs.runInWriteTransaction(
|
|
2817
2629
|
{
|
|
2818
2630
|
graphId: ctx.graphId,
|
|
2819
2631
|
schemaVersion: ctx.schemaVersion,
|
|
@@ -2824,7 +2636,7 @@ async function runIdentityMutation(ctx, fn) {
|
|
|
2824
2636
|
ctx.backend,
|
|
2825
2637
|
async (target) => {
|
|
2826
2638
|
await lockIdentityGraph(target, ctx.graphId);
|
|
2827
|
-
return
|
|
2639
|
+
return chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(
|
|
2828
2640
|
target,
|
|
2829
2641
|
(rawTarget, touch) => fn(
|
|
2830
2642
|
rawTarget,
|
|
@@ -2949,7 +2761,7 @@ function createIdentityReadFacade(ctx) {
|
|
|
2949
2761
|
);
|
|
2950
2762
|
return assertions.filter(
|
|
2951
2763
|
(assertion) => assertion.a_kind === ref.kind && assertion.a_id === ref.id || assertion.b_kind === ref.kind && assertion.b_id === ref.id
|
|
2952
|
-
).toSorted((left, right) =>
|
|
2764
|
+
).toSorted((left, right) => chunkRWUWTJQY_cjs.compareCodePoints(left.id, right.id)).map((assertion) => publicAssertion(assertion));
|
|
2953
2765
|
}
|
|
2954
2766
|
};
|
|
2955
2767
|
}
|
|
@@ -2974,7 +2786,7 @@ function createIdentityFacade(ctx) {
|
|
|
2974
2786
|
...createIdentityReadFacade(ctx),
|
|
2975
2787
|
assertSame(a, b, window) {
|
|
2976
2788
|
return runIdentityMutation(ctx, (target, touch) => {
|
|
2977
|
-
const operationInstant =
|
|
2789
|
+
const operationInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
2978
2790
|
return assertPair(
|
|
2979
2791
|
ctx,
|
|
2980
2792
|
target,
|
|
@@ -2989,7 +2801,7 @@ function createIdentityFacade(ctx) {
|
|
|
2989
2801
|
},
|
|
2990
2802
|
assertDifferent(a, b, window) {
|
|
2991
2803
|
return runIdentityMutation(ctx, (target, touch) => {
|
|
2992
|
-
const operationInstant =
|
|
2804
|
+
const operationInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
2993
2805
|
return assertPair(
|
|
2994
2806
|
ctx,
|
|
2995
2807
|
target,
|
|
@@ -3013,7 +2825,7 @@ function createIdentityFacade(ctx) {
|
|
|
3013
2825
|
"same",
|
|
3014
2826
|
pairs,
|
|
3015
2827
|
touch,
|
|
3016
|
-
|
|
2828
|
+
chunkM5MSP3BI_cjs.nowIso()
|
|
3017
2829
|
);
|
|
3018
2830
|
});
|
|
3019
2831
|
},
|
|
@@ -3028,7 +2840,7 @@ function createIdentityFacade(ctx) {
|
|
|
3028
2840
|
"different",
|
|
3029
2841
|
pairs,
|
|
3030
2842
|
touch,
|
|
3031
|
-
|
|
2843
|
+
chunkM5MSP3BI_cjs.nowIso()
|
|
3032
2844
|
);
|
|
3033
2845
|
});
|
|
3034
2846
|
},
|
|
@@ -3136,7 +2948,7 @@ function createIdentityFacade(ctx) {
|
|
|
3136
2948
|
|
|
3137
2949
|
// src/identity/service-interchange-write.ts
|
|
3138
2950
|
function transferShapeError(assertion, message, issue) {
|
|
3139
|
-
return new
|
|
2951
|
+
return new chunkX4GDXBOP_cjs.ValidationError(message, {
|
|
3140
2952
|
issues: [
|
|
3141
2953
|
{
|
|
3142
2954
|
path: "identity.assertions",
|
|
@@ -3199,7 +3011,7 @@ function validateTransferShape(ctx, assertion, mode, operationInstant) {
|
|
|
3199
3011
|
operationInstant
|
|
3200
3012
|
);
|
|
3201
3013
|
} catch (error) {
|
|
3202
|
-
if (!(error instanceof
|
|
3014
|
+
if (!(error instanceof chunkX4GDXBOP_cjs.IdentityValidityWindowError)) throw error;
|
|
3203
3015
|
const issue = error.details.reason === "future-valid-from" ? {
|
|
3204
3016
|
code: "IDENTITY_IMPORT_FUTURE_VALID_FROM",
|
|
3205
3017
|
message: `Assertion ${assertion.id} validFrom is in the future`
|
|
@@ -3265,8 +3077,8 @@ function rethrowTaggedWithAssertion(error, assertionId, progress) {
|
|
|
3265
3077
|
async function importIdentityAssertionsIntoTarget(ctx, target, assertions, mode, ignoredAssertionIds = /* @__PURE__ */ new Set()) {
|
|
3266
3078
|
let created = 0;
|
|
3267
3079
|
let skipped = 0;
|
|
3268
|
-
await
|
|
3269
|
-
const operationInstant =
|
|
3080
|
+
await chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget, touch) => {
|
|
3081
|
+
const operationInstant = chunkM5MSP3BI_cjs.nowIso();
|
|
3270
3082
|
const normalized = assertions.map((assertion) => ({
|
|
3271
3083
|
assertion,
|
|
3272
3084
|
...validateTransferShape(ctx, assertion, mode, operationInstant)
|
|
@@ -3288,7 +3100,7 @@ async function importIdentityAssertionsIntoTarget(ctx, target, assertions, mode,
|
|
|
3288
3100
|
}
|
|
3289
3101
|
}
|
|
3290
3102
|
const attributeMissingEndpoint = (error, ended) => {
|
|
3291
|
-
if (error instanceof
|
|
3103
|
+
if (error instanceof chunkX4GDXBOP_cjs.NodeNotFoundError) {
|
|
3292
3104
|
const missing = { kind: error.details.kind, id: error.details.id };
|
|
3293
3105
|
const failing = normalized.find(
|
|
3294
3106
|
({ assertion, endpoints }) => assertion.validTo !== void 0 === ended && endpoints.some(
|
|
@@ -3344,7 +3156,7 @@ async function importIdentityAssertionsIntoTarget(ctx, target, assertions, mode,
|
|
|
3344
3156
|
skipped += 1;
|
|
3345
3157
|
continue;
|
|
3346
3158
|
}
|
|
3347
|
-
throw new
|
|
3159
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
3348
3160
|
`Identity assertion id ${assertion.id} already identifies different truth.`,
|
|
3349
3161
|
{
|
|
3350
3162
|
code: "IDENTITY_IMPORT_ID_CONFLICT",
|
|
@@ -3498,7 +3310,7 @@ async function applyIdentityChangesForContext(ctx, retractions, assertions) {
|
|
|
3498
3310
|
// src/identity/service-maintenance.ts
|
|
3499
3311
|
function requireAtomicIdentityBackend(backend, graphId) {
|
|
3500
3312
|
if (!backend.capabilities.transactions) {
|
|
3501
|
-
throw new
|
|
3313
|
+
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
3502
3314
|
"Operational Identity requires atomic transaction support.",
|
|
3503
3315
|
{ code: "IDENTITY_REQUIRES_ATOMIC_BACKEND", graphId }
|
|
3504
3316
|
);
|
|
@@ -3515,7 +3327,7 @@ async function rebuildIdentityClosureForContext(ctx) {
|
|
|
3515
3327
|
requireAtomicIdentityBackend(ctx.backend, ctx.graphId);
|
|
3516
3328
|
async function rebuildAtTarget(target) {
|
|
3517
3329
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3518
|
-
await
|
|
3330
|
+
await chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3519
3331
|
const activeKinds = identityActiveKinds(ctx.registry);
|
|
3520
3332
|
const snapshot = await loadSnapshot(
|
|
3521
3333
|
rawTarget,
|
|
@@ -3613,7 +3425,7 @@ async function findAffectedClassInconsistency(ctx, target, seeds) {
|
|
|
3613
3425
|
const [leftKind, rightKind] = conflictingKinds;
|
|
3614
3426
|
return {
|
|
3615
3427
|
kind: "contradiction",
|
|
3616
|
-
error: new
|
|
3428
|
+
error: new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
3617
3429
|
operation: "merge",
|
|
3618
3430
|
a: firstMemberOfKind(members, leftKind),
|
|
3619
3431
|
b: firstMemberOfKind(members, rightKind),
|
|
@@ -3639,7 +3451,7 @@ async function findAffectedClassInconsistency(ctx, target, seeds) {
|
|
|
3639
3451
|
if (aClassKey === void 0 || aClassKey !== bClassKey) continue;
|
|
3640
3452
|
return {
|
|
3641
3453
|
kind: "contradiction",
|
|
3642
|
-
error: new
|
|
3454
|
+
error: new chunkX4GDXBOP_cjs.IdentityContradictionError({
|
|
3643
3455
|
operation: "merge",
|
|
3644
3456
|
a,
|
|
3645
3457
|
b,
|
|
@@ -3707,7 +3519,7 @@ async function assertAffectedIdentityClassesConsistent(ctx, target, seeds) {
|
|
|
3707
3519
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3708
3520
|
const observed = await findAffectedClassInconsistency(ctx, target, seeds);
|
|
3709
3521
|
if (observed === void 0) return;
|
|
3710
|
-
await
|
|
3522
|
+
await chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3711
3523
|
await replaceClosure(
|
|
3712
3524
|
rawTarget,
|
|
3713
3525
|
ctx.schema,
|
|
@@ -3730,14 +3542,14 @@ async function deleteAssertionsTouchingKinds(target, schema, graphId, kinds, tou
|
|
|
3730
3542
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
3731
3543
|
parametersPerItem: 2
|
|
3732
3544
|
});
|
|
3733
|
-
for (const kindChunk of
|
|
3734
|
-
const kindList2 =
|
|
3735
|
-
kindChunk.map((kind) =>
|
|
3736
|
-
|
|
3545
|
+
for (const kindChunk of chunkZBFZGLZE_cjs.chunk(removedKinds, kindChunkSize)) {
|
|
3546
|
+
const kindList2 = chunkOJHD3LXJ_cjs.sql.join(
|
|
3547
|
+
kindChunk.map((kind) => chunkOJHD3LXJ_cjs.sql`${kind}`),
|
|
3548
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
3737
3549
|
);
|
|
3738
3550
|
const rows = await target.execute(
|
|
3739
|
-
|
|
3740
|
-
SELECT ${
|
|
3551
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3552
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3741
3553
|
FROM ${schema.identityAssertionsTable}
|
|
3742
3554
|
WHERE graph_id = ${graphId}
|
|
3743
3555
|
AND (a_kind IN (${kindList2}) OR b_kind IN (${kindList2}))
|
|
@@ -3754,14 +3566,14 @@ async function deleteAssertionsTouchingKinds(target, schema, graphId, kinds, tou
|
|
|
3754
3566
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
3755
3567
|
parametersPerItem: 1
|
|
3756
3568
|
});
|
|
3757
|
-
for (const idChunk of
|
|
3758
|
-
const idList =
|
|
3759
|
-
idChunk.map((id) =>
|
|
3760
|
-
|
|
3569
|
+
for (const idChunk of chunkZBFZGLZE_cjs.chunk(ids, idChunkSize)) {
|
|
3570
|
+
const idList = chunkOJHD3LXJ_cjs.sql.join(
|
|
3571
|
+
idChunk.map((id) => chunkOJHD3LXJ_cjs.sql`${id}`),
|
|
3572
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
3761
3573
|
);
|
|
3762
3574
|
await executeIdentityStatement(
|
|
3763
3575
|
target,
|
|
3764
|
-
|
|
3576
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
3765
3577
|
DELETE FROM ${schema.identityAssertionsTable}
|
|
3766
3578
|
WHERE graph_id = ${graphId} AND id IN (${idList})
|
|
3767
3579
|
`
|
|
@@ -3778,13 +3590,13 @@ async function hasAssertionsTouchingKinds(target, schema, graphId, kinds) {
|
|
|
3778
3590
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
3779
3591
|
parametersPerItem: 2
|
|
3780
3592
|
});
|
|
3781
|
-
for (const kindChunk of
|
|
3782
|
-
const kindList2 =
|
|
3783
|
-
kindChunk.map((kind) =>
|
|
3784
|
-
|
|
3593
|
+
for (const kindChunk of chunkZBFZGLZE_cjs.chunk(probedKinds, kindChunkSize)) {
|
|
3594
|
+
const kindList2 = chunkOJHD3LXJ_cjs.sql.join(
|
|
3595
|
+
kindChunk.map((kind) => chunkOJHD3LXJ_cjs.sql`${kind}`),
|
|
3596
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
3785
3597
|
);
|
|
3786
3598
|
const rows = await target.execute(
|
|
3787
|
-
|
|
3599
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3788
3600
|
SELECT id
|
|
3789
3601
|
FROM ${schema.identityAssertionsTable}
|
|
3790
3602
|
WHERE graph_id = ${graphId}
|
|
@@ -3798,7 +3610,7 @@ async function hasAssertionsTouchingKinds(target, schema, graphId, kinds) {
|
|
|
3798
3610
|
}
|
|
3799
3611
|
async function purgeAssertionsWithUnregisteredKinds(target, schema, graphId, registeredKinds, touch) {
|
|
3800
3612
|
const pairs = await target.execute(
|
|
3801
|
-
|
|
3613
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3802
3614
|
SELECT DISTINCT a_kind, b_kind
|
|
3803
3615
|
FROM ${schema.identityAssertionsTable}
|
|
3804
3616
|
WHERE graph_id = ${graphId}
|
|
@@ -3848,13 +3660,13 @@ async function liveNodeKindsSharingIds(ctx, target, ids) {
|
|
|
3848
3660
|
maxItems: MAX_REFERENCE_CHUNK_SIZE,
|
|
3849
3661
|
parametersPerItem: 1
|
|
3850
3662
|
});
|
|
3851
|
-
for (const idChunk of
|
|
3852
|
-
const idList =
|
|
3853
|
-
idChunk.map((id) =>
|
|
3854
|
-
|
|
3663
|
+
for (const idChunk of chunkZBFZGLZE_cjs.chunk(uniqueIds, chunkSize)) {
|
|
3664
|
+
const idList = chunkOJHD3LXJ_cjs.sql.join(
|
|
3665
|
+
idChunk.map((id) => chunkOJHD3LXJ_cjs.sql`${id}`),
|
|
3666
|
+
chunkOJHD3LXJ_cjs.sql`, `
|
|
3855
3667
|
);
|
|
3856
3668
|
const rows = await target.execute(
|
|
3857
|
-
|
|
3669
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3858
3670
|
SELECT kind, id
|
|
3859
3671
|
FROM ${ctx.schema.nodesTable}
|
|
3860
3672
|
WHERE graph_id = ${ctx.graphId}
|
|
@@ -3874,7 +3686,7 @@ async function liveNodeKindsSharingIds(ctx, target, ids) {
|
|
|
3874
3686
|
async function foldIdentityForCreatedNodes(ctx, target, references) {
|
|
3875
3687
|
if (references.length === 0 || ctx.sameIdAcrossKinds === "ignore") return;
|
|
3876
3688
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3877
|
-
await
|
|
3689
|
+
await chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3878
3690
|
const liveKindsById = await liveNodeKindsSharingIds(
|
|
3879
3691
|
ctx,
|
|
3880
3692
|
rawTarget,
|
|
@@ -3914,7 +3726,7 @@ async function foldIdentityForCreatedNodes(ctx, target, references) {
|
|
|
3914
3726
|
}
|
|
3915
3727
|
async function hasMaterializedIdentityClass(target, schema, graphId, ref) {
|
|
3916
3728
|
const rows = await target.execute(
|
|
3917
|
-
|
|
3729
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3918
3730
|
SELECT member_kind, member_id
|
|
3919
3731
|
FROM ${schema.identityClosureTable}
|
|
3920
3732
|
WHERE graph_id = ${graphId}
|
|
@@ -3927,7 +3739,7 @@ async function hasMaterializedIdentityClass(target, schema, graphId, ref) {
|
|
|
3927
3739
|
}
|
|
3928
3740
|
async function readNodeDeletionInstant(target, schema, graphId, ref) {
|
|
3929
3741
|
const rows = await target.execute(
|
|
3930
|
-
|
|
3742
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3931
3743
|
SELECT deleted_at
|
|
3932
3744
|
FROM ${schema.nodesTable}
|
|
3933
3745
|
WHERE graph_id = ${graphId}
|
|
@@ -3941,8 +3753,8 @@ async function readNodeDeletionInstant(target, schema, graphId, ref) {
|
|
|
3941
3753
|
}
|
|
3942
3754
|
async function requireNodeValidityEndCompatible(ctx, target, ref, validTo) {
|
|
3943
3755
|
const rows = await target.execute(
|
|
3944
|
-
|
|
3945
|
-
SELECT ${
|
|
3756
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3757
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3946
3758
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
3947
3759
|
WHERE graph_id = ${ctx.graphId}
|
|
3948
3760
|
AND deleted_at IS NULL
|
|
@@ -3958,7 +3770,7 @@ async function requireNodeValidityEndCompatible(ctx, target, ref, validTo) {
|
|
|
3958
3770
|
const row = rows.at(0);
|
|
3959
3771
|
if (row === void 0) return;
|
|
3960
3772
|
const assertion = normalizeIdentityAssertionRow(row);
|
|
3961
|
-
throw new
|
|
3773
|
+
throw new chunkX4GDXBOP_cjs.IdentityEndpointValidityError({
|
|
3962
3774
|
endpoint: ref,
|
|
3963
3775
|
assertionWindow: {
|
|
3964
3776
|
validFrom: assertion.valid_from,
|
|
@@ -3969,17 +3781,17 @@ async function requireNodeValidityEndCompatible(ctx, target, ref, validTo) {
|
|
|
3969
3781
|
}
|
|
3970
3782
|
async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
3971
3783
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3972
|
-
await
|
|
3973
|
-
const touchesNode =
|
|
3784
|
+
await chunkRDP6ZRSM_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget, touch) => {
|
|
3785
|
+
const touchesNode = chunkOJHD3LXJ_cjs.sql`
|
|
3974
3786
|
(
|
|
3975
3787
|
(a_kind = ${ref.kind} AND a_id = ${ref.id})
|
|
3976
3788
|
OR (b_kind = ${ref.kind} AND b_id = ${ref.id})
|
|
3977
3789
|
)
|
|
3978
3790
|
`;
|
|
3979
|
-
const scope = mode === "hard" ?
|
|
3791
|
+
const scope = mode === "hard" ? chunkOJHD3LXJ_cjs.sql`` : chunkOJHD3LXJ_cjs.sql`AND valid_to IS NULL AND deleted_at IS NULL`;
|
|
3980
3792
|
const rows = await rawTarget.execute(
|
|
3981
|
-
|
|
3982
|
-
SELECT ${
|
|
3793
|
+
chunkOJHD3LXJ_cjs.asCompiledRowsSql(chunkOJHD3LXJ_cjs.sql`
|
|
3794
|
+
SELECT ${chunkRDP6ZRSM_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3983
3795
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
3984
3796
|
WHERE graph_id = ${ctx.graphId}
|
|
3985
3797
|
${scope}
|
|
@@ -3994,7 +3806,7 @@ async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
|
3994
3806
|
)) {
|
|
3995
3807
|
return;
|
|
3996
3808
|
}
|
|
3997
|
-
const now =
|
|
3809
|
+
const now = chunkM5MSP3BI_cjs.nowIso();
|
|
3998
3810
|
const cascadeInstant = mode === "hard" || rows.length === 0 ? now : await readNodeDeletionInstant(
|
|
3999
3811
|
rawTarget,
|
|
4000
3812
|
ctx.schema,
|
|
@@ -4006,7 +3818,7 @@ async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
|
4006
3818
|
if (mode === "hard") {
|
|
4007
3819
|
await executeIdentityStatement(
|
|
4008
3820
|
rawTarget,
|
|
4009
|
-
|
|
3821
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
4010
3822
|
DELETE FROM ${ctx.schema.identityAssertionsTable}
|
|
4011
3823
|
WHERE graph_id = ${ctx.graphId} AND id = ${row.id}
|
|
4012
3824
|
`
|
|
@@ -4023,7 +3835,7 @@ async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
|
4023
3835
|
};
|
|
4024
3836
|
await executeIdentityStatement(
|
|
4025
3837
|
rawTarget,
|
|
4026
|
-
|
|
3838
|
+
chunkOJHD3LXJ_cjs.sql`
|
|
4027
3839
|
UPDATE ${ctx.schema.identityAssertionsTable}
|
|
4028
3840
|
SET valid_to = ${validTo},
|
|
4029
3841
|
updated_at = ${now},
|
|
@@ -4051,11 +3863,9 @@ exports.applyIdentityChangesForContext = applyIdentityChangesForContext;
|
|
|
4051
3863
|
exports.assertAffectedIdentityClassesConsistent = assertAffectedIdentityClassesConsistent;
|
|
4052
3864
|
exports.createIdentityFacade = createIdentityFacade;
|
|
4053
3865
|
exports.createIdentityReadFacade = createIdentityReadFacade;
|
|
4054
|
-
exports.createValidationError = createValidationError;
|
|
4055
3866
|
exports.deleteAssertionsTouchingKinds = deleteAssertionsTouchingKinds;
|
|
4056
3867
|
exports.detachIdentityForNode = detachIdentityForNode;
|
|
4057
3868
|
exports.foldIdentityForCreatedNodes = foldIdentityForCreatedNodes;
|
|
4058
|
-
exports.forceWriteTransactionRevision = forceWriteTransactionRevision;
|
|
4059
3869
|
exports.hasAssertionsTouchingKinds = hasAssertionsTouchingKinds;
|
|
4060
3870
|
exports.identityAssertionSemanticKey = identityAssertionSemanticKey;
|
|
4061
3871
|
exports.identityReferenceKey = identityReferenceKey;
|
|
@@ -4066,7 +3876,6 @@ exports.loadAssertionsByIds = loadAssertionsByIds;
|
|
|
4066
3876
|
exports.loadCurrentStructuralClasses = loadCurrentStructuralClasses;
|
|
4067
3877
|
exports.lockIdentityEnablementNodes = lockIdentityEnablementNodes;
|
|
4068
3878
|
exports.lockIdentityGraph = lockIdentityGraph;
|
|
4069
|
-
exports.lockSchemaVersionForStoreWrite = lockSchemaVersionForStoreWrite;
|
|
4070
3879
|
exports.normalizeIdentityPair = normalizeIdentityPair;
|
|
4071
3880
|
exports.purgeAssertionsWithUnregisteredKinds = purgeAssertionsWithUnregisteredKinds;
|
|
4072
3881
|
exports.readIdentityAssertionPageAtTarget = readIdentityAssertionPageAtTarget;
|
|
@@ -4075,15 +3884,8 @@ exports.rebuildIdentityClosureForContext = rebuildIdentityClosureForContext;
|
|
|
4075
3884
|
exports.refKey = refKey;
|
|
4076
3885
|
exports.removeIdentityKindsForContext = removeIdentityKindsForContext;
|
|
4077
3886
|
exports.requireNodeValidityEndCompatible = requireNodeValidityEndCompatible;
|
|
4078
|
-
exports.runHookedWriteOperation = runHookedWriteOperation;
|
|
4079
|
-
exports.runInWriteTransaction = runInWriteTransaction;
|
|
4080
3887
|
exports.separationRebuildRequired = separationRebuildRequired;
|
|
4081
3888
|
exports.toTransferAssertion = toTransferAssertion;
|
|
4082
|
-
exports.validateEdgeProps = validateEdgeProps;
|
|
4083
3889
|
exports.validateIdentityForContext = validateIdentityForContext;
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
exports.withWriteTransactionSession = withWriteTransactionSession;
|
|
4087
|
-
exports.wrapZodError = wrapZodError;
|
|
4088
|
-
//# sourceMappingURL=chunk-JFRT7S3B.cjs.map
|
|
4089
|
-
//# sourceMappingURL=chunk-JFRT7S3B.cjs.map
|
|
3890
|
+
//# sourceMappingURL=chunk-5OWHU7Z7.cjs.map
|
|
3891
|
+
//# sourceMappingURL=chunk-5OWHU7Z7.cjs.map
|