@graphrefly/graphrefly 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cascading-DKIb6Pk8.d.cts → cascading-B25wxpRa.d.cts} +3 -3
- package/dist/{cascading-Bg0a4VSf.d.ts → cascading-BsJ4GbnS.d.ts} +3 -3
- package/dist/{chunk-TZLEMGAK.js → chunk-2Y3DKIZL.js} +2 -2
- package/dist/chunk-3OT7K33Q.js +1 -0
- package/dist/chunk-53XJ2S6D.js +1 -0
- package/dist/chunk-5CPPC75H.js +1 -0
- package/dist/chunk-5KPIYVCC.js +7 -0
- package/dist/{chunk-GAOX6OPT.js → chunk-5XZRCS2M.js} +1 -1
- package/dist/{chunk-C5DINHNP.js → chunk-6G5YD37E.js} +1 -1
- package/dist/{chunk-WBWBY6LI.js → chunk-6SVKZ7VI.js} +1 -1
- package/dist/chunk-A5HZZYRK.js +1 -0
- package/dist/chunk-BGEY3PXH.js +1 -0
- package/dist/chunk-CD4CB6S7.js +1 -0
- package/dist/chunk-CE72X3WO.js +1 -0
- package/dist/chunk-CUQFO6MT.js +1 -0
- package/dist/chunk-D5RFJOZ2.js +1 -0
- package/dist/{chunk-A3GDELMY.js → chunk-E5YSBQSF.js} +7 -7
- package/dist/{chunk-SFIM774L.js → chunk-EUE7ELFQ.js} +1 -1
- package/dist/chunk-F3IGTWCQ.js +1 -0
- package/dist/chunk-F672GV32.js +1 -0
- package/dist/{chunk-GCUYSIM4.js → chunk-GWOKTENT.js} +1 -1
- package/dist/{chunk-4NYSEUKV.js → chunk-J6TGRQUP.js} +1 -1
- package/dist/{chunk-4F564IPP.js → chunk-JJTF75VS.js} +1 -1
- package/dist/{chunk-BY4WKPKM.js → chunk-JUJEPZOI.js} +1 -1
- package/dist/{chunk-65WWQ5CB.js → chunk-M5UC63ZI.js} +5 -5
- package/dist/chunk-MQZWA3DF.js +1 -0
- package/dist/chunk-MYFR67PY.js +18 -0
- package/dist/{chunk-KN2UMFT6.js → chunk-PCD2MU7X.js} +1 -1
- package/dist/{chunk-YDWTVO4E.js → chunk-PIIUJIF7.js} +1 -1
- package/dist/chunk-PVUTRA5K.js +5 -0
- package/dist/chunk-Q7EUZ6NN.js +1 -0
- package/dist/chunk-RLMYS3XZ.js +1 -0
- package/dist/chunk-RRFOCAH6.js +1 -0
- package/dist/{chunk-Q46YJCQH.js → chunk-T6RPUERH.js} +1 -1
- package/dist/{chunk-IPNJDNE7.js → chunk-T7GWBGOO.js} +1 -1
- package/dist/{chunk-U2T2XWDA.js → chunk-U347KVM4.js} +1 -1
- package/dist/chunk-UAMWD4GG.js +1 -0
- package/dist/chunk-VN6RDSK2.js +1 -0
- package/dist/{chunk-CJMFZXIZ.js → chunk-W2ZU226Q.js} +1 -1
- package/dist/{chunk-UF746BQ4.js → chunk-XINLP35X.js} +1 -1
- package/dist/{chunk-TONEKQM3.js → chunk-XMDNNSMK.js} +1 -1
- package/dist/{chunk-INXDSJRC.js → chunk-YOUAVGHJ.js} +1 -1
- package/dist/chunk-YV2A2VWG.js +1 -0
- package/dist/{chunk-PBN426RU.js → chunk-ZGVA2SR5.js} +1 -1
- package/dist/compat/index.cjs +10 -10
- package/dist/compat/index.d.cts +17 -14
- package/dist/compat/index.d.ts +17 -14
- package/dist/compat/index.js +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nestjs/index.cjs +12 -12
- package/dist/compat/nestjs/index.d.cts +9 -6
- package/dist/compat/nestjs/index.d.ts +9 -6
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.cjs +7 -7
- package/dist/compat/zustand/index.d.cts +5 -4
- package/dist/compat/zustand/index.d.ts +5 -4
- package/dist/compat/zustand/index.js +1 -1
- package/dist/{composite-BPDU_XV1.d.ts → composite-CT_mApQD.d.ts} +2 -2
- package/dist/{composite-CmvdhTJe.d.cts → composite-_XckYx2e.d.cts} +2 -2
- package/dist/{content-addressed-storage-DqIWCmZG.d.cts → content-addressed-storage-4-ST1tYk.d.cts} +5 -5
- package/dist/{content-addressed-storage-BUiREIuj.d.ts → content-addressed-storage-DuYMjV7o.d.ts} +5 -5
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/extra/browser.cjs +1 -1
- package/dist/extra/browser.d.cts +4 -3
- package/dist/extra/browser.d.ts +4 -3
- package/dist/extra/browser.js +1 -1
- package/dist/extra/index.cjs +19 -19
- package/dist/extra/index.d.cts +13 -12
- package/dist/extra/index.d.ts +13 -12
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -3
- package/dist/extra/node.d.cts +3 -3
- package/dist/extra/node.d.ts +3 -3
- package/dist/extra/node.js +2 -2
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.d.cts +1 -1
- package/dist/extra/operators.d.ts +1 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.cjs +1 -1
- package/dist/extra/reactive.d.cts +4 -3
- package/dist/extra/reactive.d.ts +4 -3
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/sources.cjs +1 -1
- package/dist/extra/sources.d.cts +57 -2
- package/dist/extra/sources.d.ts +57 -2
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-browser.cjs +1 -1
- package/dist/extra/storage-browser.d.cts +8 -42
- package/dist/extra/storage-browser.d.ts +8 -42
- package/dist/extra/storage-browser.js +1 -1
- package/dist/extra/storage-core.cjs +1 -1
- package/dist/extra/storage-core.d.cts +13 -83
- package/dist/extra/storage-core.d.ts +13 -83
- package/dist/extra/storage-core.js +1 -1
- package/dist/extra/storage-node.cjs +1 -2
- package/dist/extra/storage-node.d.cts +1 -59
- package/dist/extra/storage-node.d.ts +1 -59
- package/dist/extra/storage-node.js +0 -1
- package/dist/extra/storage-tiers-browser.cjs +1 -0
- package/dist/extra/storage-tiers-browser.d.cts +49 -0
- package/dist/extra/storage-tiers-browser.d.ts +49 -0
- package/dist/extra/storage-tiers-browser.js +1 -0
- package/dist/extra/storage-tiers-node.cjs +1 -0
- package/dist/extra/storage-tiers-node.d.cts +86 -0
- package/dist/extra/storage-tiers-node.d.ts +86 -0
- package/dist/extra/storage-tiers-node.js +1 -0
- package/dist/extra/storage-tiers.cjs +1 -0
- package/dist/extra/storage-tiers.d.cts +284 -0
- package/dist/extra/storage-tiers.d.ts +284 -0
- package/dist/extra/storage-tiers.js +1 -0
- package/dist/{fallback-mYSd8vQo.d.ts → fallback-DuEXfA4F.d.ts} +14 -14
- package/dist/{fallback-9YznPvPP.d.cts → fallback-axI2cXwt.d.cts} +14 -14
- package/dist/graph/index.cjs +3 -3
- package/dist/graph/index.d.cts +6 -5
- package/dist/graph/index.d.ts +6 -5
- package/dist/graph/index.js +1 -1
- package/dist/{graph-BROUZPG9.d.ts → graph-Cv-8x0ZI.d.ts} +28 -16
- package/dist/{graph-DaoydJ_u.d.cts → graph-kTltt95s.d.cts} +28 -16
- package/dist/imperative-audit-ahAE65a9.d.cts +28 -0
- package/dist/imperative-audit-ahAE65a9.d.ts +28 -0
- package/dist/{index-CI5fULSz.d.ts → index-8OxXae3g.d.ts} +1 -1
- package/dist/{index-CQ1gt4rn.d.cts → index-9xhIaM-w.d.cts} +1 -1
- package/dist/{index-DhWrMTI6.d.cts → index-B3D_z0Z6.d.cts} +1 -1
- package/dist/{index-Ccv_61jG.d.cts → index-B3Dfl5sS.d.cts} +110 -27
- package/dist/{index-Dia4yc2y.d.ts → index-B4s70vYf.d.ts} +4 -4
- package/dist/{index-Db21wuaD.d.ts → index-B5UR87KG.d.ts} +3 -3
- package/dist/{index-DuvQAU02.d.ts → index-BBdwz2BW.d.ts} +2 -2
- package/dist/{index-B5eS17Bz.d.ts → index-BEvsFlfH.d.ts} +47 -32
- package/dist/{index-BUtCR0k6.d.ts → index-BF-ssbJB.d.ts} +7 -7
- package/dist/{index-ClKm7CFB.d.cts → index-BFuVcqL8.d.cts} +1 -1
- package/dist/{index-BkfL5MXh.d.cts → index-BWH17rK_.d.cts} +3 -3
- package/dist/{index-CD7qmvSf.d.ts → index-BZ1V5GzX.d.ts} +3 -3
- package/dist/{index-BDEhWLF4.d.cts → index-BhkPzu-Z.d.cts} +4 -4
- package/dist/{index-CNxdDb2e.d.ts → index-Bilohojo.d.ts} +3 -3
- package/dist/{index-zA1uVtk0.d.ts → index-BiomL7AW.d.ts} +1 -1
- package/dist/{index-BWiX5foT.d.ts → index-BjWZARLy.d.ts} +1 -1
- package/dist/{index-IxinNgAH.d.cts → index-BkbawFkI.d.cts} +16 -15
- package/dist/{index-RJX4snyi.d.cts → index-BlRVj-7Q.d.cts} +21 -21
- package/dist/index-BpFwRAf9.d.cts +26 -0
- package/dist/{index-Ds3Rz9m9.d.cts → index-BsZlbHM5.d.cts} +3 -3
- package/dist/{index-BFHpNSsV.d.ts → index-BtY2QVDf.d.cts} +8 -7
- package/dist/{index-BsxqmV6u.d.ts → index-BuMzxRO2.d.ts} +2 -2
- package/dist/{index-C5uMGVJw.d.ts → index-BwYGLgmI.d.ts} +4 -4
- package/dist/{index-3L3RC3VJ.d.ts → index-C40wA8zt.d.ts} +7 -7
- package/dist/{index-Bi4ZP6Hc.d.ts → index-C9xF16gc.d.ts} +110 -27
- package/dist/index-CAIhFfws.d.ts +171 -0
- package/dist/{index-BRisOxlx.d.ts → index-CDvC1m5p.d.ts} +1 -1
- package/dist/index-CGKs5ixV.d.cts +287 -0
- package/dist/{index-ygRFoyrN.d.ts → index-CI_yjtua.d.ts} +2 -2
- package/dist/{index-DxEcY7Om.d.ts → index-CIcu6fIR.d.ts} +1 -1
- package/dist/{index-CQtnGFrZ.d.cts → index-CfOSES72.d.cts} +7 -7
- package/dist/{index-Bd2AjMQY.d.ts → index-Cot94_82.d.ts} +21 -21
- package/dist/{index-B1hFhK1K.d.cts → index-CpZKtdMw.d.cts} +1 -1
- package/dist/{index-BO6t0HjV.d.cts → index-CqSJ25A9.d.cts} +1 -1
- package/dist/{index-Jgl7ev9I.d.cts → index-CzC0G0C3.d.cts} +9 -9
- package/dist/{index-p0bkNfby.d.cts → index-D6JRP-1_.d.cts} +3 -3
- package/dist/{index-D23g00HE.d.cts → index-D7r_vd0b.d.cts} +4 -4
- package/dist/{index-Cp91Sxbo.d.cts → index-D8IyqHvT.d.cts} +3 -3
- package/dist/{index-iKsmdnq6.d.cts → index-D9qoEOj_.d.cts} +2 -2
- package/dist/index-DBmBtqAN.d.ts +461 -0
- package/dist/{index-nP13Qe6T.d.ts → index-DFe2Pk2u.d.ts} +1 -1
- package/dist/{index-Cn3taOmp.d.cts → index-DKp1CIbG.d.cts} +2 -2
- package/dist/{index-CoR-tOZA.d.cts → index-DSD6xnbT.d.ts} +8 -7
- package/dist/{index-DheNs40A.d.ts → index-DXSLMoma.d.ts} +2 -2
- package/dist/{index-ZIQaKIdY.d.cts → index-DXZsXxtU.d.cts} +47 -32
- package/dist/{index-BVTjuKeP.d.cts → index-D_QQ_dTD.d.cts} +1 -1
- package/dist/{index-ChZvMC4M.d.cts → index-DeyzuqAi.d.cts} +7 -7
- package/dist/{index-Chi9IiHJ.d.ts → index-DlccEIi3.d.ts} +3 -3
- package/dist/{index-DR3XqZlV.d.cts → index-DmtWMP0X.d.cts} +1 -1
- package/dist/{index-CbCNoogR.d.ts → index-Dp69u0ym.d.ts} +16 -15
- package/dist/{index-b4a6Sg0R.d.ts → index-DwNNufVa.d.ts} +4 -4
- package/dist/{index-D80nGRb9.d.ts → index-DzYTXMBz.d.ts} +3 -3
- package/dist/index-DzgS5uYi.d.ts +26 -0
- package/dist/{index-B-KCkW4M.d.cts → index-GaW6Welt.d.cts} +4 -4
- package/dist/{index-DupIl9wI.d.ts → index-JYtN9uqM.d.ts} +1 -1
- package/dist/{index-Ced0dphF.d.ts → index-KNAMYngu.d.ts} +9 -9
- package/dist/{index-BpjQanLs.d.cts → index-PluovH45.d.cts} +2 -2
- package/dist/index-Qq-G9B6g.d.cts +171 -0
- package/dist/{index-yJY9thRY.d.cts → index-XxSeddWP.d.cts} +2 -2
- package/dist/{index-C8_bnDBZ.d.cts → index-ZhKyR8co.d.cts} +3 -3
- package/dist/index-hXKhbfh-.d.ts +287 -0
- package/dist/index-zK_mN1D-.d.cts +461 -0
- package/dist/index.cjs +59 -59
- package/dist/index.d.cts +53 -49
- package/dist/index.d.ts +53 -49
- package/dist/index.js +1 -1
- package/dist/{meta-BdjSt8ky.d.cts → meta-BGO6C7K9.d.cts} +1 -1
- package/dist/{meta-CtDjj7cU.d.ts → meta-CC6EPdpK.d.ts} +1 -1
- package/dist/{node-8qx0kgYt.d.cts → node-fSc-hCv8.d.cts} +1 -1
- package/dist/{node-8qx0kgYt.d.ts → node-fSc-hCv8.d.ts} +1 -1
- package/dist/{observable-B6Ba-TTI.d.cts → observable-Cqty11jG.d.cts} +1 -1
- package/dist/{observable-DOniYM2B.d.ts → observable-EAV_rNfM.d.ts} +1 -1
- package/dist/patterns/ai/browser.cjs +5 -5
- package/dist/patterns/ai/browser.d.cts +4 -4
- package/dist/patterns/ai/browser.d.ts +4 -4
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +19 -19
- package/dist/patterns/ai/index.d.cts +19 -17
- package/dist/patterns/ai/index.d.ts +19 -17
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.cjs +1 -2
- package/dist/patterns/ai/node.d.cts +9 -9
- package/dist/patterns/ai/node.d.ts +9 -9
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +6 -6
- package/dist/patterns/audit/index.d.cts +7 -5
- package/dist/patterns/audit/index.d.ts +7 -5
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +7 -7
- package/dist/patterns/cqrs/index.d.cts +7 -4
- package/dist/patterns/cqrs/index.d.ts +7 -4
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +8 -8
- package/dist/patterns/demo-shell/index.d.cts +6 -5
- package/dist/patterns/demo-shell/index.d.ts +6 -5
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +5 -5
- package/dist/patterns/domain-templates/index.d.cts +5 -4
- package/dist/patterns/domain-templates/index.d.ts +5 -4
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +20 -20
- package/dist/patterns/graphspec/index.d.cts +6 -5
- package/dist/patterns/graphspec/index.d.ts +6 -5
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +7 -7
- package/dist/patterns/guarded-execution/index.d.cts +8 -6
- package/dist/patterns/guarded-execution/index.d.ts +8 -6
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +12 -12
- package/dist/patterns/harness/index.d.cts +13 -10
- package/dist/patterns/harness/index.d.ts +13 -10
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +7 -7
- package/dist/patterns/job-queue/index.d.cts +8 -4
- package/dist/patterns/job-queue/index.d.ts +8 -4
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +4 -4
- package/dist/patterns/lens/index.d.cts +7 -6
- package/dist/patterns/lens/index.d.ts +7 -6
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +1 -1
- package/dist/patterns/memory/index.d.cts +5 -4
- package/dist/patterns/memory/index.d.ts +5 -4
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +7 -7
- package/dist/patterns/messaging/index.d.cts +6 -4
- package/dist/patterns/messaging/index.d.ts +6 -4
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +7 -7
- package/dist/patterns/orchestration/index.d.cts +8 -5
- package/dist/patterns/orchestration/index.d.ts +8 -5
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +1 -0
- package/dist/patterns/process/index.d.cts +10 -0
- package/dist/patterns/process/index.d.ts +10 -0
- package/dist/patterns/process/index.js +1 -0
- package/dist/patterns/reactive-layout/index.cjs +5 -5
- package/dist/patterns/reactive-layout/index.d.cts +6 -5
- package/dist/patterns/reactive-layout/index.d.ts +6 -5
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +1 -1
- package/dist/patterns/reduction/index.d.cts +5 -4
- package/dist/patterns/reduction/index.d.ts +5 -4
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/refine-loop/index.cjs +8 -8
- package/dist/patterns/refine-loop/index.d.cts +7 -5
- package/dist/patterns/refine-loop/index.d.ts +7 -5
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +7 -6
- package/dist/patterns/resilient-pipeline/index.d.ts +7 -6
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +11 -11
- package/dist/patterns/surface/index.d.cts +7 -6
- package/dist/patterns/surface/index.d.ts +7 -6
- package/dist/patterns/surface/index.js +1 -1
- package/dist/pipeline-graph-B85HUrWg.d.cts +120 -0
- package/dist/pipeline-graph-HOTU4UG0.d.ts +120 -0
- package/dist/{reactive-layout-DBJ3Vz-m.d.ts → reactive-layout-Btv0-efV.d.ts} +2 -2
- package/dist/{reactive-layout-Dk9AOQb_.d.cts → reactive-layout-D9zqqaqK.d.cts} +2 -2
- package/dist/reactive-log-ByBb8g6A.d.ts +188 -0
- package/dist/reactive-log-CgbNqksB.d.cts +188 -0
- package/dist/{reactive-map-LjwjcFaW.d.ts → reactive-map-CHyeCf4D.d.ts} +1 -1
- package/dist/{reactive-map-Cm89Hk0c.d.cts → reactive-map-DmgeADH8.d.cts} +1 -1
- package/dist/{resilience-RjDIHZNZ.d.ts → resilience-BWP2c7Af.d.cts} +27 -45
- package/dist/{resilience-N_VtLf7W.d.cts → resilience-Bys63Cpd.d.ts} +27 -45
- package/dist/resilience-OBU472D2.js +1 -0
- package/dist/{sugar-CQkn_rxB.d.ts → sugar-D13E2M_z.d.ts} +1 -1
- package/dist/{sugar-DVEYhR7a.d.cts → sugar-DgaGJcI6.d.cts} +1 -1
- package/dist/{topology-tree-BB6oJxMz.d.cts → topology-tree-C50l9ARE.d.cts} +1 -1
- package/dist/{topology-tree-CAFOG5S5.d.ts → topology-tree-CJsT24DP.d.ts} +1 -1
- package/dist/{types-Cp_4coR_.d.cts → types-BMSGPlpO.d.cts} +1 -1
- package/dist/{types-B2LfBvNc.d.ts → types-CidcBDuk.d.ts} +1 -1
- package/package.json +41 -1
- package/dist/chunk-2JO6LXFT.js +0 -7
- package/dist/chunk-2LZ6DL45.js +0 -1
- package/dist/chunk-3JXNEPCD.js +0 -2
- package/dist/chunk-3Y4BXFFR.js +0 -1
- package/dist/chunk-55T3K37W.js +0 -1
- package/dist/chunk-6HQ6HVTF.js +0 -1
- package/dist/chunk-7Q2WPFQ7.js +0 -1
- package/dist/chunk-FKRPIRE6.js +0 -1
- package/dist/chunk-HTBOCKVD.js +0 -1
- package/dist/chunk-I6VIH3VA.js +0 -1
- package/dist/chunk-IB64M7VP.js +0 -1
- package/dist/chunk-IJFSR4NU.js +0 -1
- package/dist/chunk-LOF5HSD3.js +0 -18
- package/dist/chunk-T2TB37TW.js +0 -1
- package/dist/chunk-T7EQPKOP.js +0 -1
- package/dist/chunk-Y63GWRHO.js +0 -5
- package/dist/chunk-YUBV7EEE.js +0 -1
- package/dist/index-C2Dey3L-.d.cts +0 -152
- package/dist/index-ClJUZAOr.d.cts +0 -101
- package/dist/index-Cq7Uqgu4.d.ts +0 -192
- package/dist/index-Dtpr2FIB.d.ts +0 -101
- package/dist/index-HvJ90_tX.d.ts +0 -152
- package/dist/index-wcfc7W-f.d.cts +0 -192
- package/dist/reactive-log-CWC7jO4J.d.cts +0 -190
- package/dist/reactive-log-CqaBg8nf.d.ts +0 -190
- package/dist/resilience-7UZHSSGC.js +0 -1
- /package/dist/{chunk-L3KUKDZC.js → chunk-O32GJOUJ.js} +0 -0
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import { a as Node } from '../node-
|
|
2
|
-
import { StorageTier } from './storage-core.js';
|
|
1
|
+
import { a as Node } from '../node-fSc-hCv8.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* Browser-only
|
|
4
|
+
* Browser-only IndexedDB reactive sources.
|
|
6
5
|
*
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Node-only bundles without `lib: ["dom"]` in the consumer's tsconfig.
|
|
6
|
+
* `fromIDBRequest` / `fromIDBTransaction` wrap raw IDB primitives as reactive
|
|
7
|
+
* sources. The old `indexedDbStorage` kv adapter has been replaced by
|
|
8
|
+
* `indexedDbKv` in `./storage-tiers-browser.js` (Audit 4, 2026-04-24).
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Imports require the DOM lib — not safe to pull into Node-only bundles
|
|
11
|
+
* without `lib: ["dom"]` in the consumer's tsconfig.
|
|
14
12
|
*
|
|
15
13
|
* @module
|
|
16
14
|
*/
|
|
17
15
|
|
|
18
|
-
type IndexedDbStorageSpec = {
|
|
19
|
-
dbName: string;
|
|
20
|
-
storeName: string;
|
|
21
|
-
/** Object-store key under which snapshots are written. @default `"graphrefly_checkpoint"`. */
|
|
22
|
-
key?: string;
|
|
23
|
-
version?: number;
|
|
24
|
-
};
|
|
25
16
|
/**
|
|
26
17
|
* Wraps an `IDBRequest` as a one-shot reactive source.
|
|
27
18
|
*
|
|
@@ -42,30 +33,5 @@ declare function fromIDBRequest<T>(req: IDBRequest<T>): Node<T>;
|
|
|
42
33
|
* @category extra
|
|
43
34
|
*/
|
|
44
35
|
declare function fromIDBTransaction(tx: IDBTransaction): Node<void>;
|
|
45
|
-
/**
|
|
46
|
-
* IndexedDB-backed async storage tier (browser runtime).
|
|
47
|
-
*
|
|
48
|
-
* All three methods return `Promise`s — pairs naturally with a warm/cold
|
|
49
|
-
* cadence where async writes are debounced per tier via
|
|
50
|
-
* `Graph.attachStorage`. Writes use `readwrite` transactions; reads use
|
|
51
|
-
* `readonly`. Missing records resolve to `null`.
|
|
52
|
-
*
|
|
53
|
-
* @param spec - Database name, store name, optional `key` (default
|
|
54
|
-
* `"graphrefly_checkpoint"`) and schema `version` (default `1`).
|
|
55
|
-
* @returns Async {@link StorageTier}.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* import { indexedDbStorage, memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
60
|
-
*
|
|
61
|
-
* graph.attachStorage([
|
|
62
|
-
* memoryStorage(),
|
|
63
|
-
* indexedDbStorage({ dbName: "myApp", storeName: "checkpoints" }),
|
|
64
|
-
* ]);
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @category extra
|
|
68
|
-
*/
|
|
69
|
-
declare function indexedDbStorage(spec: IndexedDbStorageSpec): StorageTier;
|
|
70
36
|
|
|
71
|
-
export {
|
|
37
|
+
export { fromIDBRequest, fromIDBTransaction };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b
|
|
1
|
+
import{a,b}from"../chunk-F3IGTWCQ.js";import"../chunk-LYCLF26R.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{a as fromIDBRequest,b as fromIDBTransaction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var k=(n,o)=>{for(var t in o)i(n,t,{get:o[t],enumerable:!0})},d=(n,o,t,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of f(o))!u.call(n,r)&&r!==t&&i(n,r,{get:()=>o[r],enumerable:!(s=c(o,r))||s.enumerable});return n};var g=n=>d(i({},"__esModule",{value:!0}),n);var y={};k(y,{sortJsonValue:()=>e,stableJsonString:()=>p});module.exports=g(y);function e(n){if(n===null||typeof n!="object")return n;if(Array.isArray(n))return n.map(e);let o=n,t=Object.keys(o).sort(),s={};for(let r of t)s[r]=e(o[r]);return s}function p(n){return JSON.stringify(e(n),void 0,0)}0&&(module.exports={sortJsonValue,stableJsonString});
|
|
@@ -1,53 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Storage
|
|
2
|
+
* Storage core — browser-safe shared helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* This module exposes only the stable shared utilities (`StorageHandle`,
|
|
5
|
+
* `sortJsonValue`, `stableJsonString`). The old `StorageTier` interface and
|
|
6
|
+
* its in-memory factories (`memoryStorage`, `dictStorage`) have been removed
|
|
7
|
+
* — use `KvStorageTier` + `memoryKv` / `dictKv` from `./storage-tiers.js`
|
|
8
|
+
* instead (Audit 4, 2026-04-24).
|
|
9
|
+
*
|
|
10
|
+
* Node-only backends (`fileKv`, `sqliteKv`) live in `./storage-tiers-node.js`;
|
|
11
|
+
* browser-only ones (`indexedDbKv`) live in `./storage-tiers-browser.js`.
|
|
11
12
|
*
|
|
12
13
|
* @module
|
|
13
14
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Single persistence primitive — supports sync and async backends alike via
|
|
16
|
-
* `void | Promise<void>` returns. `debounceMs` / `compactEvery` / `filter`
|
|
17
|
-
* are per-tier cadence controls honored by `Graph.attachStorage`;
|
|
18
|
-
* `cascadingCache` ignores them (it has its own eviction policy).
|
|
19
|
-
*/
|
|
20
|
-
interface StorageTier {
|
|
21
|
-
/** Read a value. Returns `null` (or resolves to `null`) on miss. */
|
|
22
|
-
load(key: string): unknown | Promise<unknown>;
|
|
23
|
-
/** Write a record. Sync tiers return `void`; async tiers return `Promise<void>`. */
|
|
24
|
-
save(key: string, data: unknown): void | Promise<void>;
|
|
25
|
-
/** Delete a value. Optional — tiers without `clear` are append/overwrite-only. */
|
|
26
|
-
clear?(key: string): void | Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Enumerate known keys. Optional — tiers that only address a single record
|
|
29
|
-
* (e.g. `indexedDbStorage`) or that can't cheaply enumerate (e.g. a remote
|
|
30
|
-
* write-only sink) may omit it. Callers that require enumeration (the
|
|
31
|
-
* surface `snapshot.list()` helper, MCP `graphrefly_snapshot_list`, CLI
|
|
32
|
-
* `graphrefly snapshot list`) should check before calling.
|
|
33
|
-
*/
|
|
34
|
-
list?(): readonly string[] | Promise<readonly string[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Debounce saves on this tier (ms). Hot tier: `0` (sync-through).
|
|
37
|
-
* Warm: `1000`. Cold: `60000`. Each tier holds its own last-save baseline,
|
|
38
|
-
* so cold flushes aren't penalized by hot flushes.
|
|
39
|
-
*/
|
|
40
|
-
debounceMs?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Every Nth record is a full snapshot; others are diffs against this
|
|
43
|
-
* tier's own baseline. Default `10`. Set `1` for always-full;
|
|
44
|
-
* `Number.POSITIVE_INFINITY` is unsafe — WAL replay needs periodic anchors.
|
|
45
|
-
*/
|
|
46
|
-
compactEvery?: number;
|
|
47
|
-
/** Pre-save filter — return `false` to skip this record on this tier. */
|
|
48
|
-
filter?: (key: string, record: unknown) => boolean;
|
|
49
|
-
}
|
|
50
|
-
/** Handle returned by `Graph.attachStorage` — dispose to stop observing. */
|
|
15
|
+
/** Handle returned by `Graph.attachSnapshotStorage` — dispose to stop observing. */
|
|
51
16
|
interface StorageHandle {
|
|
52
17
|
dispose(): void;
|
|
53
18
|
}
|
|
@@ -55,44 +20,9 @@ interface StorageHandle {
|
|
|
55
20
|
declare function sortJsonValue(value: unknown): unknown;
|
|
56
21
|
/**
|
|
57
22
|
* Stable JSON encoding (no trailing newline). Tiers that want POSIX newline
|
|
58
|
-
* convention (e.g. `
|
|
59
|
-
*
|
|
60
|
-
* comparison.
|
|
23
|
+
* convention (e.g. `fileKv`) append their own; in-database tiers (`sqliteKv`)
|
|
24
|
+
* keep the payload byte-identical for cross-tier hash/CID comparison.
|
|
61
25
|
*/
|
|
62
26
|
declare function stableJsonString(data: unknown): string;
|
|
63
|
-
/**
|
|
64
|
-
* In-memory storage tier (process-local; useful for tests and hot tier).
|
|
65
|
-
*
|
|
66
|
-
* @returns Sync {@link StorageTier} with JSON-cloned isolation.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* import { memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
71
|
-
*
|
|
72
|
-
* const hot = memoryStorage();
|
|
73
|
-
* graph.attachStorage([hot]);
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* @category extra
|
|
77
|
-
*/
|
|
78
|
-
declare function memoryStorage(): StorageTier;
|
|
79
|
-
/**
|
|
80
|
-
* Dict-backed storage tier — stores JSON-cloned values under caller keys in
|
|
81
|
-
* a caller-owned plain object. Useful for embedding in a parent state shape.
|
|
82
|
-
*
|
|
83
|
-
* @param storage - Caller-owned object used as the backing store.
|
|
84
|
-
* @returns Sync {@link StorageTier}.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* import { dictStorage } from "@graphrefly/graphrefly-ts";
|
|
89
|
-
*
|
|
90
|
-
* const state: Record<string, unknown> = {};
|
|
91
|
-
* graph.attachStorage([dictStorage(state)]);
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @category extra
|
|
95
|
-
*/
|
|
96
|
-
declare function dictStorage(storage: Record<string, unknown>): StorageTier;
|
|
97
27
|
|
|
98
|
-
export { type StorageHandle,
|
|
28
|
+
export { type StorageHandle, sortJsonValue, stableJsonString };
|
|
@@ -1,53 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Storage
|
|
2
|
+
* Storage core — browser-safe shared helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
4
|
+
* This module exposes only the stable shared utilities (`StorageHandle`,
|
|
5
|
+
* `sortJsonValue`, `stableJsonString`). The old `StorageTier` interface and
|
|
6
|
+
* its in-memory factories (`memoryStorage`, `dictStorage`) have been removed
|
|
7
|
+
* — use `KvStorageTier` + `memoryKv` / `dictKv` from `./storage-tiers.js`
|
|
8
|
+
* instead (Audit 4, 2026-04-24).
|
|
9
|
+
*
|
|
10
|
+
* Node-only backends (`fileKv`, `sqliteKv`) live in `./storage-tiers-node.js`;
|
|
11
|
+
* browser-only ones (`indexedDbKv`) live in `./storage-tiers-browser.js`.
|
|
11
12
|
*
|
|
12
13
|
* @module
|
|
13
14
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Single persistence primitive — supports sync and async backends alike via
|
|
16
|
-
* `void | Promise<void>` returns. `debounceMs` / `compactEvery` / `filter`
|
|
17
|
-
* are per-tier cadence controls honored by `Graph.attachStorage`;
|
|
18
|
-
* `cascadingCache` ignores them (it has its own eviction policy).
|
|
19
|
-
*/
|
|
20
|
-
interface StorageTier {
|
|
21
|
-
/** Read a value. Returns `null` (or resolves to `null`) on miss. */
|
|
22
|
-
load(key: string): unknown | Promise<unknown>;
|
|
23
|
-
/** Write a record. Sync tiers return `void`; async tiers return `Promise<void>`. */
|
|
24
|
-
save(key: string, data: unknown): void | Promise<void>;
|
|
25
|
-
/** Delete a value. Optional — tiers without `clear` are append/overwrite-only. */
|
|
26
|
-
clear?(key: string): void | Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Enumerate known keys. Optional — tiers that only address a single record
|
|
29
|
-
* (e.g. `indexedDbStorage`) or that can't cheaply enumerate (e.g. a remote
|
|
30
|
-
* write-only sink) may omit it. Callers that require enumeration (the
|
|
31
|
-
* surface `snapshot.list()` helper, MCP `graphrefly_snapshot_list`, CLI
|
|
32
|
-
* `graphrefly snapshot list`) should check before calling.
|
|
33
|
-
*/
|
|
34
|
-
list?(): readonly string[] | Promise<readonly string[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Debounce saves on this tier (ms). Hot tier: `0` (sync-through).
|
|
37
|
-
* Warm: `1000`. Cold: `60000`. Each tier holds its own last-save baseline,
|
|
38
|
-
* so cold flushes aren't penalized by hot flushes.
|
|
39
|
-
*/
|
|
40
|
-
debounceMs?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Every Nth record is a full snapshot; others are diffs against this
|
|
43
|
-
* tier's own baseline. Default `10`. Set `1` for always-full;
|
|
44
|
-
* `Number.POSITIVE_INFINITY` is unsafe — WAL replay needs periodic anchors.
|
|
45
|
-
*/
|
|
46
|
-
compactEvery?: number;
|
|
47
|
-
/** Pre-save filter — return `false` to skip this record on this tier. */
|
|
48
|
-
filter?: (key: string, record: unknown) => boolean;
|
|
49
|
-
}
|
|
50
|
-
/** Handle returned by `Graph.attachStorage` — dispose to stop observing. */
|
|
15
|
+
/** Handle returned by `Graph.attachSnapshotStorage` — dispose to stop observing. */
|
|
51
16
|
interface StorageHandle {
|
|
52
17
|
dispose(): void;
|
|
53
18
|
}
|
|
@@ -55,44 +20,9 @@ interface StorageHandle {
|
|
|
55
20
|
declare function sortJsonValue(value: unknown): unknown;
|
|
56
21
|
/**
|
|
57
22
|
* Stable JSON encoding (no trailing newline). Tiers that want POSIX newline
|
|
58
|
-
* convention (e.g. `
|
|
59
|
-
*
|
|
60
|
-
* comparison.
|
|
23
|
+
* convention (e.g. `fileKv`) append their own; in-database tiers (`sqliteKv`)
|
|
24
|
+
* keep the payload byte-identical for cross-tier hash/CID comparison.
|
|
61
25
|
*/
|
|
62
26
|
declare function stableJsonString(data: unknown): string;
|
|
63
|
-
/**
|
|
64
|
-
* In-memory storage tier (process-local; useful for tests and hot tier).
|
|
65
|
-
*
|
|
66
|
-
* @returns Sync {@link StorageTier} with JSON-cloned isolation.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* import { memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
71
|
-
*
|
|
72
|
-
* const hot = memoryStorage();
|
|
73
|
-
* graph.attachStorage([hot]);
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* @category extra
|
|
77
|
-
*/
|
|
78
|
-
declare function memoryStorage(): StorageTier;
|
|
79
|
-
/**
|
|
80
|
-
* Dict-backed storage tier — stores JSON-cloned values under caller keys in
|
|
81
|
-
* a caller-owned plain object. Useful for embedding in a parent state shape.
|
|
82
|
-
*
|
|
83
|
-
* @param storage - Caller-owned object used as the backing store.
|
|
84
|
-
* @returns Sync {@link StorageTier}.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* import { dictStorage } from "@graphrefly/graphrefly-ts";
|
|
89
|
-
*
|
|
90
|
-
* const state: Record<string, unknown> = {};
|
|
91
|
-
* graph.attachStorage([dictStorage(state)]);
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @category extra
|
|
95
|
-
*/
|
|
96
|
-
declare function dictStorage(storage: Record<string, unknown>): StorageTier;
|
|
97
27
|
|
|
98
|
-
export { type StorageHandle,
|
|
28
|
+
export { type StorageHandle, sortJsonValue, stableJsonString };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b
|
|
1
|
+
import{a,b}from"../chunk-CE72X3WO.js";import"../chunk-QYADASLV.js";export{a as sortJsonValue,b as stableJsonString};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
`,l=(0,p.basename)(i),f=(0,p.dirname)(i),u=(0,p.join)(f,`.${l}.${(0,k.randomBytes)(8).toString("hex")}.tmp`);try{(0,c.writeFileSync)(u,d,"utf8"),(0,c.renameSync)(u,i)}catch(m){try{(0,c.unlinkSync)(u)}catch{}throw m}},load(s){try{let t=(0,c.readFileSync)(r(s),"utf8").trim();return t?JSON.parse(t):null}catch{return null}},clear(s){try{(0,c.unlinkSync)(r(s))}catch(t){if(t.code!=="ENOENT")throw t}},list(){try{let s=(0,c.readdirSync)(n),t=[];for(let i of s){if(i.startsWith("."))continue;let d=a(i);d!==null&&t.push(d)}return t.sort()}catch(s){if(s.code==="ENOENT")return[];throw s}}}}function x(n){let e=new h.DatabaseSync(n);return e.exec("CREATE TABLE IF NOT EXISTS graphrefly_checkpoint (k TEXT PRIMARY KEY, v TEXT NOT NULL)"),{save(o,r){let a=S(r);e.prepare("INSERT OR REPLACE INTO graphrefly_checkpoint (k, v) VALUES (?, ?)").run(o,a)},load(o){let r=e.prepare("SELECT v FROM graphrefly_checkpoint WHERE k = ?").get(o);return r===void 0||typeof r.v!="string"||r.v.trim()===""?null:JSON.parse(r.v)},clear(o){e.prepare("DELETE FROM graphrefly_checkpoint WHERE k = ?").run(o)},list(){return e.prepare("SELECT k FROM graphrefly_checkpoint ORDER BY k").all().map(r=>r.k)},close(){try{e.close()}catch{}}}}0&&(module.exports={fileStorage,sqliteStorage});
|
|
1
|
+
"use strict";
|
|
@@ -1,60 +1,2 @@
|
|
|
1
|
-
import { StorageTier } from './storage-core.cjs';
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
* Node-only storage backends — `fileStorage` (atomic per-key JSON files) and
|
|
5
|
-
* `sqliteStorage` (Node 22.5+ `node:sqlite`). Imports `node:fs`, `node:path`,
|
|
6
|
-
* `node:crypto`, `node:sqlite`.
|
|
7
|
-
*
|
|
8
|
-
* Browser-safe consumers should import {@link ./storage-core} instead; the
|
|
9
|
-
* legacy `extra/storage.ts` barrel re-exports this module for back-compat.
|
|
10
|
-
*
|
|
11
|
-
* @module
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Atomic JSON file storage tier (one file per key in a directory, temp + rename).
|
|
16
|
-
*
|
|
17
|
-
* Keys are sanitized to filesystem-safe names (`[^a-zA-Z0-9_-]` → `%<hex>`).
|
|
18
|
-
* `load` returns `null` for missing files, empty files, or invalid JSON.
|
|
19
|
-
*
|
|
20
|
-
* @param dir - Directory where per-key JSON files are written.
|
|
21
|
-
* @returns Sync {@link StorageTier}.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { fileStorage, memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
26
|
-
*
|
|
27
|
-
* graph.attachStorage([memoryStorage(), fileStorage("./checkpoints")]);
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @category extra
|
|
31
|
-
*/
|
|
32
|
-
declare function fileStorage(dir: string): StorageTier;
|
|
33
|
-
/**
|
|
34
|
-
* SQLite storage tier using Node.js `node:sqlite` ({@link DatabaseSync}).
|
|
35
|
-
*
|
|
36
|
-
* Returns a {@link StorageTier} extended with `close()` — the caller owns the
|
|
37
|
-
* connection and should close it when discarding the tier.
|
|
38
|
-
*
|
|
39
|
-
* **Runtime:** Requires Node 22.5+ with `node:sqlite` enabled.
|
|
40
|
-
*
|
|
41
|
-
* @param path - SQLite database file path.
|
|
42
|
-
* @returns Sync {@link StorageTier} with an idempotent `close()` method.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* import { sqliteStorage, memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
47
|
-
*
|
|
48
|
-
* const cold = sqliteStorage("./graphs.sqlite");
|
|
49
|
-
* graph.attachStorage([memoryStorage(), cold]);
|
|
50
|
-
* // ... later, on shutdown:
|
|
51
|
-
* cold.close();
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @category extra
|
|
55
|
-
*/
|
|
56
|
-
declare function sqliteStorage(path: string): StorageTier & {
|
|
57
|
-
close(): void;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { fileStorage, sqliteStorage };
|
|
2
|
+
export { }
|
|
@@ -1,60 +1,2 @@
|
|
|
1
|
-
import { StorageTier } from './storage-core.js';
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
* Node-only storage backends — `fileStorage` (atomic per-key JSON files) and
|
|
5
|
-
* `sqliteStorage` (Node 22.5+ `node:sqlite`). Imports `node:fs`, `node:path`,
|
|
6
|
-
* `node:crypto`, `node:sqlite`.
|
|
7
|
-
*
|
|
8
|
-
* Browser-safe consumers should import {@link ./storage-core} instead; the
|
|
9
|
-
* legacy `extra/storage.ts` barrel re-exports this module for back-compat.
|
|
10
|
-
*
|
|
11
|
-
* @module
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Atomic JSON file storage tier (one file per key in a directory, temp + rename).
|
|
16
|
-
*
|
|
17
|
-
* Keys are sanitized to filesystem-safe names (`[^a-zA-Z0-9_-]` → `%<hex>`).
|
|
18
|
-
* `load` returns `null` for missing files, empty files, or invalid JSON.
|
|
19
|
-
*
|
|
20
|
-
* @param dir - Directory where per-key JSON files are written.
|
|
21
|
-
* @returns Sync {@link StorageTier}.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { fileStorage, memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
26
|
-
*
|
|
27
|
-
* graph.attachStorage([memoryStorage(), fileStorage("./checkpoints")]);
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @category extra
|
|
31
|
-
*/
|
|
32
|
-
declare function fileStorage(dir: string): StorageTier;
|
|
33
|
-
/**
|
|
34
|
-
* SQLite storage tier using Node.js `node:sqlite` ({@link DatabaseSync}).
|
|
35
|
-
*
|
|
36
|
-
* Returns a {@link StorageTier} extended with `close()` — the caller owns the
|
|
37
|
-
* connection and should close it when discarding the tier.
|
|
38
|
-
*
|
|
39
|
-
* **Runtime:** Requires Node 22.5+ with `node:sqlite` enabled.
|
|
40
|
-
*
|
|
41
|
-
* @param path - SQLite database file path.
|
|
42
|
-
* @returns Sync {@link StorageTier} with an idempotent `close()` method.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* import { sqliteStorage, memoryStorage } from "@graphrefly/graphrefly-ts";
|
|
47
|
-
*
|
|
48
|
-
* const cold = sqliteStorage("./graphs.sqlite");
|
|
49
|
-
* graph.attachStorage([memoryStorage(), cold]);
|
|
50
|
-
* // ... later, on shutdown:
|
|
51
|
-
* cold.close();
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @category extra
|
|
55
|
-
*/
|
|
56
|
-
declare function sqliteStorage(path: string): StorageTier & {
|
|
57
|
-
close(): void;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { fileStorage, sqliteStorage };
|
|
2
|
+
export { }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"../chunk-3JXNEPCD.js";import"../chunk-I6VIH3VA.js";import"../chunk-QYADASLV.js";export{a as fileStorage,b as sqliteStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var b=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var t in n)b(e,t,{get:n[t],enumerable:!0})},K=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of N(n))!C.call(e,r)&&r!==t&&b(e,r,{get:()=>n[r],enumerable:!(o=M(n,r))||o.enumerable});return e};var U=e=>K(b({},"__esModule",{value:!0}),e);var W={};E(W,{indexedDbAppendLog:()=>J,indexedDbBackend:()=>v,indexedDbKv:()=>F,indexedDbSnapshot:()=>R});module.exports=U(W);function h(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(h);let n=e,t=Object.keys(n).sort(),o={};for(let r of t)o[r]=h(n[r]);return o}function x(e){return JSON.stringify(h(e),void 0,0)}var L=new TextEncoder,j=new TextDecoder("utf-8",{fatal:!0}),k={name:"json",version:1,encode(e){return L.encode(x(e))},decode(e){return JSON.parse(j.decode(e))}};function P(e,n={}){let t=n.codec??k,o=n.name??e.name??"snapshot",r=n.keyOf??(l=>l.name??n.name??e.name??"snapshot"),d,u=0,p=n.compactEvery,s,i={name:o,debounceMs:n.debounceMs,compactEvery:p,filter:n.filter,keyOf:r,save(l){if(!(n.filter&&!n.filter(l))&&(d={snapshot:l},u+=1,p!==void 0&&u%p===0||!n.debounceMs))return a()},load(){let l=s??o,c=e.read(l);if(c!==void 0)return c instanceof Uint8Array?c.length===0?void 0:t.decode(c):Promise.resolve(c).then(f=>f===void 0||f.length===0?void 0:t.decode(f))},async flush(){await a()},async rollback(){d=void 0}};function a(){let l=d;if(!l)return;d=void 0;let c=r(l.snapshot),f=t.encode(l.snapshot),m=e.write(c,f);if(m instanceof Promise)return m.then(()=>{s=c});s=c}return i}function A(e,n={}){let t=n.codec??k,o=n.name??e.name??"append-log",r=n.keyOf??(c=>o),d=n.compactEvery,u=new Map,p=0,s,i={name:o,debounceMs:n.debounceMs,compactEvery:d,keyOf:r,appendEntries(c){if(c.length!==0){for(let f of c){let m=r(f),y=u.get(m);y||(y=[],u.set(m,y)),y.push(f)}if(p+=c.length,d!==void 0&&p%d===0||!n.debounceMs)return a()}},async loadEntries(c){let f=c?.keyFilter,m=e.list===void 0?f!==void 0?[f]:[o]:await Promise.resolve(e.list(f)),y=[];for(let S of m){let T=await Promise.resolve(e.read(S));if(T===void 0||T.length===0)continue;let g=t.decode(T);Array.isArray(g)&&y.push(...g)}return{entries:y,cursor:void 0}},async flush(){await a()},async rollback(){u=new Map}};function a(){if(u.size===0)return;let c=u;u=new Map;let f=(s??Promise.resolve()).then(()=>{let m=l(c);return m instanceof Promise?m:Promise.resolve()},()=>{let m=l(c);return m instanceof Promise?m:Promise.resolve()});return s=f.finally(()=>{s===f&&(s=void 0)}),s}function l(c){let f=[];for(let[m,y]of c){let S=e.read(m),T=g=>{let B=[...g===void 0||g.length===0?[]:t.decode(g)??[],...y],D=t.encode(B);return e.write(m,D)};if(S instanceof Promise)f.push(S.then(async g=>{let w=T(g);w instanceof Promise&&await w}));else{let g=T(S);g instanceof Promise&&f.push(g)}}if(f.length>0)return Promise.all(f).then(()=>{})}return i}function O(e,n={}){let t=n.codec??k,o=n.name??e.name??"kv",r=n.compactEvery,d=new Map,u=0,p={name:o,debounceMs:n.debounceMs,compactEvery:r,filter:n.filter,save(i,a){if(!(n.filter&&!n.filter(i,a))&&(d.set(i,a),u+=1,r!==void 0&&u%r===0||!n.debounceMs))return s()},load(i){let a=e.read(i);if(a!==void 0)return a instanceof Uint8Array?a.length===0?void 0:t.decode(a):Promise.resolve(a).then(l=>l===void 0||l.length===0?void 0:t.decode(l))},delete(i){if(d.delete(i),!!e.delete)return e.delete(i)},list(i){return e.list?e.list(i):[]},async flush(){await s()},async rollback(){d=new Map}};function s(){if(d.size===0)return;let i=d;d=new Map;let a=[];for(let[l,c]of i){let f=t.encode(c),m=e.write(l,f);m instanceof Promise&&a.push(m)}if(a.length>0)return Promise.all(a).then(()=>{})}return p}function I(e){return new Promise((n,t)=>{if(typeof indexedDB>"u"){t(new TypeError("indexedDB is not available in this environment"));return}let o=indexedDB.open(e.dbName,e.version??1);o.onupgradeneeded=()=>{let r=o.result;r.objectStoreNames.contains(e.storeName)||r.createObjectStore(e.storeName)},o.onsuccess=()=>n(o.result),o.onerror=()=>t(o.error??new Error(`indexedDbBackend: open(${e.dbName}) failed`))})}function v(e){let n=I(e);return{name:`idb:${e.dbName}/${e.storeName}`,async read(t){let o=await n;return new Promise((r,d)=>{let s=o.transaction(e.storeName,"readonly").objectStore(e.storeName).get(t);s.onsuccess=()=>{let i=s.result;i==null?r(void 0):i instanceof Uint8Array?r(i):i instanceof ArrayBuffer?r(new Uint8Array(i)):r(void 0)},s.onerror=()=>d(s.error)})},async write(t,o){let r=await n;await new Promise((d,u)=>{let p=r.transaction(e.storeName,"readwrite");p.objectStore(e.storeName).put(o,t),p.oncomplete=()=>d(),p.onerror=()=>u(p.error),p.onabort=()=>u(p.error??new Error("indexedDbBackend: write aborted"))})},async delete(t){let o=await n;await new Promise((r,d)=>{let u=o.transaction(e.storeName,"readwrite");u.objectStore(e.storeName).delete(t),u.oncomplete=()=>r(),u.onerror=()=>d(u.error)})},async list(t){let o=await n;return new Promise((r,d)=>{let s=o.transaction(e.storeName,"readonly").objectStore(e.storeName).getAllKeys();s.onsuccess=()=>{let i=s.result.map(a=>String(a));r(t===void 0?i.sort():i.filter(a=>a.startsWith(t)).sort())},s.onerror=()=>d(s.error)})}}}function R(e,n){return P(v(e),n)}function J(e,n){return A(v(e),n)}function F(e,n){return O(v(e),n)}0&&(module.exports={indexedDbAppendLog,indexedDbBackend,indexedDbKv,indexedDbSnapshot});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AppendLogStorageOptions, AppendLogStorageTier, StorageBackend, KvStorageOptions, KvStorageTier, SnapshotStorageOptions, SnapshotStorageTier } from './storage-tiers.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Browser-only Audit 4 storage backend + convenience factories.
|
|
5
|
+
*
|
|
6
|
+
* Uses DOM `IndexedDB`. Browser-safe consumers should import from this module;
|
|
7
|
+
* Node consumers should not import here without the DOM lib in their tsconfig.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
type IndexedDbBackendSpec = {
|
|
13
|
+
dbName: string;
|
|
14
|
+
storeName: string;
|
|
15
|
+
version?: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* IndexedDB backend. Async by nature — `read` / `write` / `delete` / `list`
|
|
19
|
+
* all return `Promise`.
|
|
20
|
+
*
|
|
21
|
+
* @category extra
|
|
22
|
+
*/
|
|
23
|
+
declare function indexedDbBackend(spec: IndexedDbBackendSpec): StorageBackend;
|
|
24
|
+
/**
|
|
25
|
+
* IndexedDB snapshot tier — `snapshotStorage(indexedDbBackend(spec), opts)`.
|
|
26
|
+
*
|
|
27
|
+
* @category extra
|
|
28
|
+
*/
|
|
29
|
+
declare function indexedDbSnapshot<T>(spec: IndexedDbBackendSpec, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
|
|
30
|
+
name?: string;
|
|
31
|
+
}): SnapshotStorageTier<T>;
|
|
32
|
+
/**
|
|
33
|
+
* IndexedDB append-log tier — `appendLogStorage(indexedDbBackend(spec), opts)`.
|
|
34
|
+
*
|
|
35
|
+
* @category extra
|
|
36
|
+
*/
|
|
37
|
+
declare function indexedDbAppendLog<T>(spec: IndexedDbBackendSpec, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
|
|
38
|
+
name?: string;
|
|
39
|
+
}): AppendLogStorageTier<T>;
|
|
40
|
+
/**
|
|
41
|
+
* IndexedDB kv tier — `kvStorage(indexedDbBackend(spec), opts)`.
|
|
42
|
+
*
|
|
43
|
+
* @category extra
|
|
44
|
+
*/
|
|
45
|
+
declare function indexedDbKv<T>(spec: IndexedDbBackendSpec, opts?: Omit<KvStorageOptions<T>, "name"> & {
|
|
46
|
+
name?: string;
|
|
47
|
+
}): KvStorageTier<T>;
|
|
48
|
+
|
|
49
|
+
export { type IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AppendLogStorageOptions, AppendLogStorageTier, StorageBackend, KvStorageOptions, KvStorageTier, SnapshotStorageOptions, SnapshotStorageTier } from './storage-tiers.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Browser-only Audit 4 storage backend + convenience factories.
|
|
5
|
+
*
|
|
6
|
+
* Uses DOM `IndexedDB`. Browser-safe consumers should import from this module;
|
|
7
|
+
* Node consumers should not import here without the DOM lib in their tsconfig.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
type IndexedDbBackendSpec = {
|
|
13
|
+
dbName: string;
|
|
14
|
+
storeName: string;
|
|
15
|
+
version?: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* IndexedDB backend. Async by nature — `read` / `write` / `delete` / `list`
|
|
19
|
+
* all return `Promise`.
|
|
20
|
+
*
|
|
21
|
+
* @category extra
|
|
22
|
+
*/
|
|
23
|
+
declare function indexedDbBackend(spec: IndexedDbBackendSpec): StorageBackend;
|
|
24
|
+
/**
|
|
25
|
+
* IndexedDB snapshot tier — `snapshotStorage(indexedDbBackend(spec), opts)`.
|
|
26
|
+
*
|
|
27
|
+
* @category extra
|
|
28
|
+
*/
|
|
29
|
+
declare function indexedDbSnapshot<T>(spec: IndexedDbBackendSpec, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
|
|
30
|
+
name?: string;
|
|
31
|
+
}): SnapshotStorageTier<T>;
|
|
32
|
+
/**
|
|
33
|
+
* IndexedDB append-log tier — `appendLogStorage(indexedDbBackend(spec), opts)`.
|
|
34
|
+
*
|
|
35
|
+
* @category extra
|
|
36
|
+
*/
|
|
37
|
+
declare function indexedDbAppendLog<T>(spec: IndexedDbBackendSpec, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
|
|
38
|
+
name?: string;
|
|
39
|
+
}): AppendLogStorageTier<T>;
|
|
40
|
+
/**
|
|
41
|
+
* IndexedDB kv tier — `kvStorage(indexedDbBackend(spec), opts)`.
|
|
42
|
+
*
|
|
43
|
+
* @category extra
|
|
44
|
+
*/
|
|
45
|
+
declare function indexedDbKv<T>(spec: IndexedDbBackendSpec, opts?: Omit<KvStorageOptions<T>, "name"> & {
|
|
46
|
+
name?: string;
|
|
47
|
+
}): KvStorageTier<T>;
|
|
48
|
+
|
|
49
|
+
export { type IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"../chunk-F672GV32.js";import"../chunk-D5RFJOZ2.js";import"../chunk-CE72X3WO.js";import"../chunk-QYADASLV.js";export{c as indexedDbAppendLog,a as indexedDbBackend,d as indexedDbKv,b as indexedDbSnapshot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var A=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var j=(n,e)=>{for(var t in e)A(n,t,{get:e[t],enumerable:!0})},_=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of N(e))!F.call(n,l)&&l!==t&&A(n,l,{get:()=>e[l],enumerable:!(s=U(e,l))||s.enumerable});return n};var W=n=>_(A({},"__esModule",{value:!0}),n);var V={};j(V,{fileAppendLog:()=>J,fileBackend:()=>k,fileKv:()=>H,fileSnapshot:()=>I,sqliteAppendLog:()=>z,sqliteBackend:()=>w,sqliteKv:()=>Y,sqliteSnapshot:()=>q});module.exports=W(V);var C=require("node:crypto"),m=require("node:fs"),S=require("node:path"),R=require("node:sqlite");function E(n){if(n===null||typeof n!="object")return n;if(Array.isArray(n))return n.map(E);let e=n,t=Object.keys(e).sort(),s={};for(let l of t)s[l]=E(e[l]);return s}function M(n){return JSON.stringify(E(n),void 0,0)}var $=new TextEncoder,D=new TextDecoder("utf-8",{fatal:!0}),b={name:"json",version:1,encode(n){return $.encode(M(n))},decode(n){return JSON.parse(D.decode(n))}};function P(n,e={}){let t=e.codec??b,s=e.name??n.name??"snapshot",l=e.keyOf??(d=>d.name??e.name??n.name??"snapshot"),o,r=0,c=e.compactEvery,f,a={name:s,debounceMs:e.debounceMs,compactEvery:c,filter:e.filter,keyOf:l,save(d){if(!(e.filter&&!e.filter(d))&&(o={snapshot:d},r+=1,c!==void 0&&r%c===0||!e.debounceMs))return i()},load(){let d=f??s,u=n.read(d);if(u!==void 0)return u instanceof Uint8Array?u.length===0?void 0:t.decode(u):Promise.resolve(u).then(p=>p===void 0||p.length===0?void 0:t.decode(p))},async flush(){await i()},async rollback(){o=void 0}};function i(){let d=o;if(!d)return;o=void 0;let u=l(d.snapshot),p=t.encode(d.snapshot),g=n.write(u,p);if(g instanceof Promise)return g.then(()=>{f=u});f=u}return a}function x(n,e={}){let t=e.codec??b,s=e.name??n.name??"append-log",l=e.keyOf??(u=>s),o=e.compactEvery,r=new Map,c=0,f,a={name:s,debounceMs:e.debounceMs,compactEvery:o,keyOf:l,appendEntries(u){if(u.length!==0){for(let p of u){let g=l(p),y=r.get(g);y||(y=[],r.set(g,y)),y.push(p)}if(c+=u.length,o!==void 0&&c%o===0||!e.debounceMs)return i()}},async loadEntries(u){let p=u?.keyFilter,g=n.list===void 0?p!==void 0?[p]:[s]:await Promise.resolve(n.list(p)),y=[];for(let v of g){let h=await Promise.resolve(n.read(v));if(h===void 0||h.length===0)continue;let T=t.decode(h);Array.isArray(T)&&y.push(...T)}return{entries:y,cursor:void 0}},async flush(){await i()},async rollback(){r=new Map}};function i(){if(r.size===0)return;let u=r;r=new Map;let p=(f??Promise.resolve()).then(()=>{let g=d(u);return g instanceof Promise?g:Promise.resolve()},()=>{let g=d(u);return g instanceof Promise?g:Promise.resolve()});return f=p.finally(()=>{f===p&&(f=void 0)}),f}function d(u){let p=[];for(let[g,y]of u){let v=n.read(g),h=T=>{let B=[...T===void 0||T.length===0?[]:t.decode(T)??[],...y],K=t.encode(B);return n.write(g,K)};if(v instanceof Promise)p.push(v.then(async T=>{let O=h(T);O instanceof Promise&&await O}));else{let T=h(v);T instanceof Promise&&p.push(T)}}if(p.length>0)return Promise.all(p).then(()=>{})}return a}function L(n,e={}){let t=e.codec??b,s=e.name??n.name??"kv",l=e.compactEvery,o=new Map,r=0,c={name:s,debounceMs:e.debounceMs,compactEvery:l,filter:e.filter,save(a,i){if(!(e.filter&&!e.filter(a,i))&&(o.set(a,i),r+=1,l!==void 0&&r%l===0||!e.debounceMs))return f()},load(a){let i=n.read(a);if(i!==void 0)return i instanceof Uint8Array?i.length===0?void 0:t.decode(i):Promise.resolve(i).then(d=>d===void 0||d.length===0?void 0:t.decode(d))},delete(a){if(o.delete(a),!!n.delete)return n.delete(a)},list(a){return n.list?n.list(a):[]},async flush(){await f()},async rollback(){o=new Map}};function f(){if(o.size===0)return;let a=o;o=new Map;let i=[];for(let[d,u]of a){let p=t.encode(u),g=n.write(d,p);g instanceof Promise&&i.push(g)}if(i.length>0)return Promise.all(i).then(()=>{})}return c}function k(n){let e=new TextEncoder,t=new TextDecoder("utf-8",{fatal:!0}),s=o=>{let r="";for(let c of o){if(c.length===1&&/[a-zA-Z0-9_-]/.test(c)){r+=c;continue}for(let f of e.encode(c))r+=`%${f.toString(16).padStart(2,"0")}`}return(0,S.join)(n,`${r}.bin`)},l=o=>{if(!o.endsWith(".bin"))return null;let r=o.slice(0,-4),c=[],f=i=>{for(let d=0;d<i.length;d++)c.push(i.charCodeAt(d))},a=0;for(;a<r.length;){let i=r[a];if(i==="%"&&a+2<r.length){let d=r.slice(a+1,a+3);if(/^[0-9a-f]{2}$/i.test(d)){c.push(Number.parseInt(d,16)),a+=3;continue}}f(i),a+=1}try{return t.decode(new Uint8Array(c))}catch{return null}};return{name:`file:${n}`,read(o){try{let r=(0,m.readFileSync)(s(o));return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}catch{return}},write(o,r){(0,m.mkdirSync)(n,{recursive:!0});let c=s(o),f=(0,S.basename)(c),a=(0,S.dirname)(c),i=(0,S.join)(a,`.${f}.${(0,C.randomBytes)(8).toString("hex")}.tmp`);try{(0,m.writeFileSync)(i,r),(0,m.renameSync)(i,c)}catch(d){try{(0,m.unlinkSync)(i)}catch{}throw d}},delete(o){try{(0,m.unlinkSync)(s(o))}catch(r){if(r.code!=="ENOENT")throw r}},list(o){try{let r=(0,m.readdirSync)(n),c=[];for(let f of r){if(f.startsWith("."))continue;let a=l(f);a!==null&&(o!==void 0&&!a.startsWith(o)||c.push(a))}return c.sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}}}function w(n){let e=new R.DatabaseSync(n);return e.exec("CREATE TABLE IF NOT EXISTS graphrefly_storage (k TEXT PRIMARY KEY, v BLOB NOT NULL)"),{name:`sqlite:${n}`,read(t){return e.prepare("SELECT v FROM graphrefly_storage WHERE k = ?").get(t)?.v},write(t,s){e.prepare("INSERT OR REPLACE INTO graphrefly_storage (k, v) VALUES (?, ?)").run(t,s)},delete(t){e.prepare("DELETE FROM graphrefly_storage WHERE k = ?").run(t)},list(t){if(t===void 0)return e.prepare("SELECT k FROM graphrefly_storage ORDER BY k").all().map(r=>r.k);let s=t.replace(/[\\%_]/g,"\\$&");return e.prepare("SELECT k FROM graphrefly_storage WHERE k LIKE ? ESCAPE '\\' ORDER BY k").all(`${s}%`).map(o=>o.k)},close(){try{e.close()}catch{}}}}function I(n,e){return P(k(n),e)}function J(n,e){return x(k(n),e)}function q(n,e){let t=w(n),s=P(t,e);return Object.assign(s,{close:()=>t.close()})}function z(n,e){let t=w(n),s=x(t,e);return Object.assign(s,{close:()=>t.close()})}function H(n,e){return L(k(n),e)}function Y(n,e){let t=w(n),s=L(t,e);return Object.assign(s,{close:()=>t.close()})}0&&(module.exports={fileAppendLog,fileBackend,fileKv,fileSnapshot,sqliteAppendLog,sqliteBackend,sqliteKv,sqliteSnapshot});
|