@delali/narsil 0.3.1-next.157 → 0.3.1-next.161
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/adapters/filesystem.mjs +3 -3
- package/dist/adapters/gcs.mjs +3 -3
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +3 -3
- package/dist/browser/{chunk-N23GL72Q.mjs → chunk-4RNSFVWI.mjs} +20777 -19056
- package/dist/browser/chunk-MMHIIL5B.mjs +564 -0
- package/dist/browser/chunk-MZHQ65VI.mjs +1228 -0
- package/dist/browser/chunk-WC2DEXWU.mjs +29 -0
- package/dist/browser/{chunk-VLJQW4J6.mjs → core-leaf-TJAGWPZZ.mjs} +4674 -3102
- package/dist/{react-native/chunks/durability-config-QXVZEO7T.mjs → browser/durability-config-SGB5ZP5K.mjs} +8 -3
- package/dist/browser/embed-RF2MPGAO.mjs +222 -0
- package/dist/{react-native/chunks/geo-index-PX3BIHAH.mjs → browser/geo-index-GNHY4PUB.mjs} +190 -93
- package/dist/{react-native/chunks/module-TTEVPRCW.mjs → browser/module-362VSIGR.mjs} +1570 -275
- package/dist/browser/msgpack-leaf-44XNWSSY.mjs +302 -0
- package/dist/browser/optional-reads-XMVPG6HG.mjs +3230 -0
- package/dist/browser/optional-writes-WMZX4OEC.mjs +3196 -0
- package/dist/browser/phrase-module-22TKMXWI.mjs +616 -0
- package/dist/browser/resolve-vector-text-KI65IHMD.mjs +60 -0
- package/dist/browser/{restore-hooks-IE3GGYHG.mjs → restore-queue-S4BWOGMU.mjs} +98 -24
- package/dist/{react-native/chunks/runtime-R5E3TB3J.mjs → browser/runtime-NU6VOVH2.mjs} +61 -25
- package/dist/browser/segment-codec-leaf-A427QJUX.mjs +554 -0
- package/dist/browser/segment-merge-leaf-7BZ54JPI.mjs +1636 -0
- package/dist/browser/storage-leaf-X6CNRHJS.mjs +18221 -0
- package/dist/browser/store-leaf-AEMTAVHX.mjs +2069 -0
- package/dist/browser/{chunk-GFAZPSWK.mjs → suggestions-leaf-3Y6MR6OF.mjs} +441 -119
- package/dist/browser/worker-copies-WQCPP3TS.mjs +2750 -0
- package/dist/{capabilities-D3AoBJoF.d.ts → capabilities-BKDrry0z.d.ts} +2 -2
- package/dist/chunk-2JRERUNZ.mjs +217 -0
- package/dist/chunk-2RIS76RJ.mjs +212 -0
- package/dist/chunk-3B775F3C.mjs +252 -0
- package/dist/{chunk-24FNVRKB.mjs → chunk-3D6RZGJH.mjs} +3 -3
- package/dist/{chunk-INJYO3BU.mjs → chunk-4CAMH7FO.mjs} +1 -1
- package/dist/{chunk-U476IXKQ.mjs → chunk-4PY4JYMY.mjs} +2 -1
- package/dist/chunk-6EZW2GQL.mjs +978 -0
- package/dist/chunk-75UNINFA.mjs +271 -0
- package/dist/chunk-77AUVDQ5.mjs +7 -0
- package/dist/{chunk-JTYPJF3T.mjs → chunk-7MWYORQC.mjs} +2 -2
- package/dist/{chunk-TGP5M5R7.mjs → chunk-7T4LAYT4.mjs} +1 -1
- package/dist/{chunk-XIHUI4KB.mjs → chunk-AB27FWZM.mjs} +8 -3
- package/dist/{chunk-FUD5XSZ5.mjs → chunk-BXM7XM4G.mjs} +7 -3
- package/dist/{chunk-HJJI72X7.mjs → chunk-C7YQHCSO.mjs} +1 -1
- package/dist/{chunk-RVGRFOGN.mjs → chunk-D456ZFPQ.mjs} +2 -1
- package/dist/{chunk-KKQC526K.mjs → chunk-E2F6LZR3.mjs} +19 -21
- package/dist/{chunk-SMOOSIAW.mjs → chunk-FE3MRIBN.mjs} +104 -13
- package/dist/{chunk-KYYABCSW.mjs → chunk-FETZYCH7.mjs} +15 -1
- package/dist/{chunk-XXJZMTZT.mjs → chunk-FVZ5DB6Y.mjs} +3 -2
- package/dist/{chunk-EYD7K3H6.mjs → chunk-GF4K7IUK.mjs} +317 -120
- package/dist/chunk-GXCDWLQI.mjs +193 -0
- package/dist/{chunk-IIRIG7H5.mjs → chunk-H64YDF5M.mjs} +3 -3
- package/dist/{browser/chunk-VY5KW3HN.mjs → chunk-HOOR4CP5.mjs} +63 -7
- package/dist/chunk-IB4BYLE3.mjs +127 -0
- package/dist/{chunk-3C7MTCCI.mjs → chunk-IE3Q62QD.mjs} +2 -2
- package/dist/chunk-IH3G6SJO.mjs +40 -0
- package/dist/chunk-JV74RKCY.mjs +3041 -0
- package/dist/{chunk-ZPZ3YGXV.mjs → chunk-K67I3RF4.mjs} +261 -101
- package/dist/chunk-KLVMK3R5.mjs +47 -0
- package/dist/{chunk-5VV4R6P7.mjs → chunk-LAWIJRMJ.mjs} +4154 -2577
- package/dist/chunk-LF4GB4PO.mjs +281 -0
- package/dist/chunk-NC4QLCZC.mjs +59 -0
- package/dist/chunk-OOO54OVC.mjs +627 -0
- package/dist/chunk-OUWZKNO3.mjs +207 -0
- package/dist/{chunk-FJKKCV4D.mjs → chunk-P5YLI5ED.mjs} +343 -182
- package/dist/{chunk-4ZTHGTVX.mjs → chunk-PTTMGRG5.mjs} +9 -10
- package/dist/{react-native/chunks/chunk-DZ7H7D2C.mjs → chunk-Q3ZZH5Z7.mjs} +6 -0
- package/dist/{browser/chunk-EKMGCRSR.mjs → chunk-QBVTYY4J.mjs} +2 -9
- package/dist/{chunk-W5EB5XKI.mjs → chunk-R4CE4IVU.mjs} +341 -183
- package/dist/chunk-S2POFTLN.mjs +10 -0
- package/dist/{chunk-KJ3RTZDJ.mjs → chunk-S3BSDBF7.mjs} +10 -3
- package/dist/{chunk-4LMSZAK6.mjs → chunk-SHGN3QIF.mjs} +69 -13
- package/dist/chunk-SXIRM4MX.mjs +3549 -0
- package/dist/{chunk-TBC3XUL2.mjs → chunk-TGPKS2UM.mjs} +47 -1
- package/dist/chunk-TINW4BSH.mjs +31301 -0
- package/dist/{cold-module-VOJXMNZB.mjs → chunk-TSLV5P2J.mjs} +397 -80
- package/dist/{chunk-HHBUCIUY.mjs → chunk-TW543F33.mjs} +3 -3
- package/dist/chunk-U6B7DUQW.mjs +788 -0
- package/dist/{chunk-OQLD2BSW.mjs → chunk-V3SGPXWQ.mjs} +8 -9
- package/dist/chunk-W34VJXY7.mjs +4723 -0
- package/dist/chunk-YETKPX5M.mjs +5 -0
- package/dist/chunk-ZQ6QY42L.mjs +59 -0
- package/dist/{client-kqSMevVi.d.ts → client-CTp8RRiK.d.ts} +4 -4
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +66 -18
- package/dist/{config-B4v_Htpu.d.ts → config-PCNzWjHL.d.ts} +6 -3
- package/dist/{config-CTP01fns.d.ts → config-_WT5grSL.d.ts} +3 -3
- package/dist/core-leaf-KXFGP74A.mjs +7 -0
- package/dist/digest-leaf-KXBGKYHZ.mjs +1 -0
- package/dist/direct-executor-MKTZBR26.mjs +16 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +7 -4
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +1 -2
- package/dist/distribution/transport/grpc.mjs +7 -2
- package/dist/distribution/transport/tcp.mjs +7 -1
- package/dist/distribution.d.ts +7 -7
- package/dist/distribution.mjs +1199 -1092
- package/dist/{browser/durability-config-TIYKW6XX.mjs → durability-config-XV4XR7Y4.mjs} +7 -3
- package/dist/embed-4H7RTBVL.mjs +221 -0
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CkPn2PWE.d.ts → engine-DBRVR_d-.d.ts} +1252 -1239
- package/dist/{browser/geo-index-OTV7VPIR.mjs → geo-index-2ZMMWWSK.mjs} +190 -93
- package/dist/{index-C4AmUnl1.d.ts → index-Ck9w5WHz.d.ts} +1 -1
- package/dist/index.browser.mjs +4 -16
- package/dist/index.d.ts +1495 -78
- package/dist/index.mjs +14 -50
- package/dist/index.react-native.mjs +11 -28
- package/dist/invalidation/filesystem.mjs +1 -2
- package/dist/languages/albanian.mjs +1 -1
- package/dist/languages/amharic.mjs +1 -1
- package/dist/languages/arabic.mjs +1 -1
- package/dist/languages/armenian.mjs +1 -1
- package/dist/languages/azerbaijani.mjs +1 -1
- package/dist/languages/bambara.mjs +1 -1
- package/dist/languages/basque.mjs +1 -1
- package/dist/languages/belarusian.mjs +1 -1
- package/dist/languages/bengali.mjs +1 -1
- package/dist/languages/bosnian.mjs +1 -1
- package/dist/languages/breton.mjs +1 -1
- package/dist/languages/bulgarian.mjs +1 -1
- package/dist/languages/burmese.mjs +1 -1
- package/dist/languages/catalan.mjs +1 -1
- package/dist/languages/chinese.mjs +1 -1
- package/dist/languages/croatian.mjs +1 -1
- package/dist/languages/czech.mjs +1 -1
- package/dist/languages/dagbani.mjs +1 -1
- package/dist/languages/danish.mjs +1 -1
- package/dist/languages/dutch.mjs +1 -1
- package/dist/languages/english.mjs +1 -1
- package/dist/languages/esperanto.mjs +1 -1
- package/dist/languages/estonian.mjs +1 -1
- package/dist/languages/ewe.mjs +1 -1
- package/dist/languages/faroese.mjs +1 -1
- package/dist/languages/fijian.mjs +1 -1
- package/dist/languages/finnish.mjs +1 -1
- package/dist/languages/french.mjs +1 -1
- package/dist/languages/ga.mjs +1 -1
- package/dist/languages/galician.mjs +1 -1
- package/dist/languages/georgian.mjs +1 -1
- package/dist/languages/german.mjs +1 -1
- package/dist/languages/greek.mjs +1 -1
- package/dist/languages/guarani.mjs +1 -1
- package/dist/languages/gujarati.mjs +1 -1
- package/dist/languages/haitian-creole.mjs +1 -1
- package/dist/languages/hausa.mjs +1 -1
- package/dist/languages/hawaiian.mjs +1 -1
- package/dist/languages/hebrew.mjs +1 -1
- package/dist/languages/hindi.mjs +1 -1
- package/dist/languages/hungarian.mjs +1 -1
- package/dist/languages/icelandic.mjs +1 -1
- package/dist/languages/igbo.mjs +1 -1
- package/dist/languages/indonesian.mjs +1 -1
- package/dist/languages/irish.mjs +1 -1
- package/dist/languages/italian.mjs +1 -1
- package/dist/languages/japanese.mjs +1 -1
- package/dist/languages/kannada.mjs +1 -1
- package/dist/languages/kazakh.mjs +1 -1
- package/dist/languages/khmer.mjs +1 -1
- package/dist/languages/kinyarwanda.mjs +1 -1
- package/dist/languages/kirundi.mjs +1 -1
- package/dist/languages/korean.mjs +1 -1
- package/dist/languages/kurmanji.mjs +1 -1
- package/dist/languages/kyrgyz.mjs +1 -1
- package/dist/languages/lao.mjs +1 -1
- package/dist/languages/latin.mjs +1 -1
- package/dist/languages/latvian.mjs +1 -1
- package/dist/languages/lingala.mjs +1 -1
- package/dist/languages/lithuanian.mjs +1 -1
- package/dist/languages/luxembourgish.mjs +1 -1
- package/dist/languages/macedonian.mjs +1 -1
- package/dist/languages/malagasy.mjs +1 -1
- package/dist/languages/malay.mjs +1 -1
- package/dist/languages/malayalam.mjs +1 -1
- package/dist/languages/maltese.mjs +1 -1
- package/dist/languages/maori.mjs +1 -1
- package/dist/languages/marathi.mjs +1 -1
- package/dist/languages/nepali.mjs +1 -1
- package/dist/languages/norwegian.mjs +1 -1
- package/dist/languages/oromo.mjs +1 -1
- package/dist/languages/persian.mjs +1 -1
- package/dist/languages/polish.mjs +1 -1
- package/dist/languages/portuguese.mjs +1 -1
- package/dist/languages/punjabi.mjs +1 -1
- package/dist/languages/romanian.mjs +1 -1
- package/dist/languages/russian.mjs +1 -1
- package/dist/languages/samoan.mjs +1 -1
- package/dist/languages/sanskrit.mjs +1 -1
- package/dist/languages/scottish-gaelic.mjs +1 -1
- package/dist/languages/serbian.mjs +1 -1
- package/dist/languages/shona.mjs +1 -1
- package/dist/languages/sinhala.mjs +1 -1
- package/dist/languages/slovak.mjs +1 -1
- package/dist/languages/slovenian.mjs +1 -1
- package/dist/languages/sorani.mjs +1 -1
- package/dist/languages/spanish.mjs +1 -1
- package/dist/languages/swahili.mjs +1 -1
- package/dist/languages/swedish.mjs +1 -1
- package/dist/languages/tagalog.mjs +1 -1
- package/dist/languages/tamil.mjs +1 -1
- package/dist/languages/tatar.mjs +1 -1
- package/dist/languages/telugu.mjs +1 -1
- package/dist/languages/thai.mjs +1 -1
- package/dist/languages/tibetan.mjs +1 -1
- package/dist/languages/tigrinya.mjs +1 -1
- package/dist/languages/tongan.mjs +1 -1
- package/dist/languages/turkish.mjs +1 -1
- package/dist/languages/twi.mjs +1 -1
- package/dist/languages/ukrainian.mjs +1 -1
- package/dist/languages/urdu.mjs +1 -1
- package/dist/languages/vietnamese.mjs +1 -1
- package/dist/languages/welsh.mjs +1 -1
- package/dist/languages/wolof.mjs +1 -1
- package/dist/languages/xhosa.mjs +1 -1
- package/dist/languages/yoruba.mjs +1 -1
- package/dist/languages/zulu.mjs +1 -1
- package/dist/{long-query-thread-QDFQSJD6.mjs → long-query-thread-JMGNGF6V.mjs} +74 -58
- package/dist/{module-N55W4Q5C.mjs → module-ZJ6ARG6V.mjs} +444 -111
- package/dist/msgpack-leaf-5WFRP6JM.mjs +9 -0
- package/dist/optional-reads-BR3BOVZW.mjs +3373 -0
- package/dist/optional-writes-DDFHYUOH.mjs +218 -0
- package/dist/{paged-partition-archive-RLRGOXDX.mjs → paged-partition-archive-G576XGVE.mjs} +29 -69
- package/dist/partial-words.browser.mjs +1649 -0
- package/dist/partial-words.mjs +15 -14
- package/dist/{chunk-CITFCZKF.mjs → pattern.browser.mjs} +153 -186
- package/dist/pattern.mjs +6 -8
- package/dist/persistence/durability/checkpoint-worker.d.ts +32 -24
- package/dist/persistence/durability/checkpoint-worker.mjs +27 -59
- package/dist/phrase-module-XK3T44VU.mjs +634 -0
- package/dist/query-actions-OMXJEC2J.mjs +118 -0
- package/dist/query-suggestions/merge-worker.mjs +18 -54
- package/dist/query-suggestions.browser.mjs +26 -227
- package/dist/query-suggestions.d.ts +2 -2
- package/dist/query-suggestions.mjs +16 -67
- package/dist/react-native/chunks/chunk-4EXKQ2IB.mjs +565 -0
- package/dist/react-native/chunks/chunk-52QD7CBJ.mjs +52 -0
- package/dist/react-native/chunks/chunk-72OKYHZL.mjs +969 -0
- package/dist/react-native/chunks/chunk-AQOWRH2C.mjs +802 -0
- package/dist/react-native/chunks/{chunk-4COWCEY7.mjs → chunk-FTQ7JNMU.mjs} +341 -180
- package/dist/react-native/chunks/chunk-G3CUQ333.mjs +42 -0
- package/dist/react-native/chunks/{chunk-EJ33LCHV.mjs → chunk-HRDMIQ63.mjs} +53 -1
- package/dist/react-native/chunks/{chunk-4AV5PPH6.mjs → chunk-IY6U6HRA.mjs} +63 -7
- package/dist/react-native/chunks/chunk-J2NQW353.mjs +212 -0
- package/dist/react-native/chunks/chunk-L4R5ITVG.mjs +29047 -0
- package/dist/react-native/chunks/{chunk-OXM66LO6.mjs → chunk-OK3WUA6N.mjs} +2 -10
- package/dist/react-native/chunks/{chunk-MVXELMJX.mjs → chunk-PVMEHBQO.mjs} +1 -1
- package/dist/{browser/chunk-SRMZXJSL.mjs → react-native/chunks/chunk-TQ26BKBH.mjs} +6 -0
- package/dist/{browser/chunk-GPPOG6PT.mjs → react-native/chunks/chunk-VUJCSQG5.mjs} +3 -1
- package/dist/react-native/chunks/{chunk-ENLMYKSX.mjs → chunk-XEGKQKLY.mjs} +5385 -3114
- package/dist/react-native/chunks/chunk-YOTP2FPE.mjs +232 -0
- package/dist/react-native/chunks/chunk-ZIU6TWXG.mjs +127 -0
- package/dist/react-native/chunks/core-leaf-5B4JXCVA.mjs +6 -0
- package/dist/react-native/chunks/digest-leaf-X6OIFDIU.mjs +1 -0
- package/dist/{durability-config-GE4U7MCZ.mjs → react-native/chunks/durability-config-3IOXIPYZ.mjs} +7 -3
- package/dist/react-native/chunks/embed-3WQ2CCR5.mjs +221 -0
- package/dist/{geo-index-MRH5JMIR.mjs → react-native/chunks/geo-index-QEYKEVPH.mjs} +190 -93
- package/dist/react-native/chunks/{chunk-CKNRFDTZ.mjs → gzip.react-native-DLO4WW27.mjs} +2 -1
- package/dist/{browser/module-TCT66FWA.mjs → react-native/chunks/module-VUA27HZZ.mjs} +1018 -540
- package/dist/react-native/chunks/msgpack-leaf-TR66ZVAX.mjs +7 -0
- package/dist/react-native/chunks/optional-reads-WDTLLHUT.mjs +3364 -0
- package/dist/react-native/chunks/optional-writes-FZV3QW34.mjs +267 -0
- package/dist/react-native/chunks/phrase-module-KCQWVXYZ.mjs +635 -0
- package/dist/react-native/chunks/resolve-vector-text-LXRYXF7M.mjs +59 -0
- package/dist/react-native/chunks/restore-queue-EI2V2I4S.mjs +179 -0
- package/dist/{browser/runtime-OTAGEFQW.mjs → react-native/chunks/runtime-BUCSAK4U.mjs} +61 -25
- package/dist/react-native/chunks/segment-codec-leaf-6ULP7H3I.mjs +12 -0
- package/dist/react-native/chunks/segment-merge-leaf-F4GQZNK6.mjs +13 -0
- package/dist/react-native/chunks/storage-leaf-OAXBU2L6.mjs +18042 -0
- package/dist/react-native/chunks/store-leaf-GY2ZZFXB.mjs +14 -0
- package/dist/react-native/chunks/{chunk-WW2X2AEI.mjs → suggestions-leaf-SQEZ4IBS.mjs} +332 -118
- package/dist/react-native/chunks/worker-copies-EEHSCFJW.mjs +2627 -0
- package/dist/react-native/partial-words.mjs +954 -35
- package/dist/react-native/pattern.mjs +238 -111
- package/dist/react-native/query-suggestions.mjs +33 -239
- package/dist/react-native/sync.mjs +95 -52
- package/dist/react-native/synonyms.mjs +256 -112
- package/dist/react.d.ts +9 -9
- package/dist/react.mjs +6 -0
- package/dist/{rerank-MQ37IYRV.mjs → rerank-Y6MWBMTT.mjs} +17 -8
- package/dist/rerankers/http.mjs +2 -2
- package/dist/resolve-vector-text-4PDRTPNQ.mjs +2 -0
- package/dist/restore-queue-KPYSRJ4A.mjs +184 -0
- package/dist/runtime-4GKUIAKV.mjs +595 -0
- package/dist/{schema-Jwt928nJ.d.ts → schema-C_7yRJLt.d.ts} +1 -1
- package/dist/segment-codec-leaf-6IFBSBPN.mjs +17 -0
- package/dist/segment-merge-leaf-VE3FUSVE.mjs +17 -0
- package/dist/server.d.ts +33 -13
- package/dist/server.mjs +81 -100
- package/dist/{browser/durability-wiring-GVZEE46O.mjs → storage-leaf-HMIIOUYN.mjs} +2334 -931
- package/dist/store-leaf-M7T7SUZJ.mjs +19 -0
- package/dist/stored-values-BWIMpiT_.d.ts +25 -0
- package/dist/suggestions-leaf-Q3Q5D6XV.mjs +53 -0
- package/dist/sync/filesystem.d.ts +3 -3
- package/dist/sync/filesystem.mjs +27 -11
- package/dist/sync/indexeddb.browser.mjs +287 -0
- package/dist/sync/indexeddb.d.ts +3 -3
- package/dist/sync/indexeddb.mjs +7 -2
- package/dist/sync.browser.mjs +88 -72
- package/dist/sync.d.ts +4 -4
- package/dist/sync.mjs +89 -59
- package/dist/{chunk-I5B7RXU7.mjs → synonyms.browser.mjs} +248 -135
- package/dist/synonyms.mjs +15 -11
- package/dist/{tasks-CoNjxbop.d.ts → tasks-B4tT4vmP.d.ts} +4 -4
- package/dist/thread-SNILJXX3.mjs +30 -0
- package/dist/{types-DPMjfOr_.d.ts → types-CTg0KaMy.d.ts} +2 -2
- package/dist/vector/search-worker.d.ts +7 -1
- package/dist/vector/search-worker.mjs +9 -13
- package/dist/worker-copies-ZLZS2CUM.mjs +2152 -0
- package/dist/workers/entry.mjs +60 -30
- package/openapi.json +66 -50
- package/package.json +233 -8
- package/dist/analysis-change-CKEMM2MC.mjs +0 -55
- package/dist/analysis-change-entry-SEDMJ6MW.mjs +0 -1
- package/dist/archive-history-E4R73RWD.mjs +0 -29
- package/dist/browser/analysis-change-ZKGJFENM.mjs +0 -942
- package/dist/browser/analysis-change-entry-5BFUVMHJ.mjs +0 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +0 -29
- package/dist/browser/chunk-25MTVDYD.mjs +0 -432
- package/dist/browser/chunk-3I27KXQD.mjs +0 -34
- package/dist/browser/chunk-3NLMB5CC.mjs +0 -217
- package/dist/browser/chunk-4RD3AFSB.mjs +0 -32
- package/dist/browser/chunk-5W3MMTLG.mjs +0 -19
- package/dist/browser/chunk-5YWB3E2W.mjs +0 -92
- package/dist/browser/chunk-7IGKGWSQ.mjs +0 -79
- package/dist/browser/chunk-AI5UI46D.mjs +0 -12
- package/dist/browser/chunk-ATEBYXP6.mjs +0 -10
- package/dist/browser/chunk-BLT4RHCJ.mjs +0 -241
- package/dist/browser/chunk-C26SPCGQ.mjs +0 -2636
- package/dist/browser/chunk-C4FJ3WDY.mjs +0 -177
- package/dist/browser/chunk-CXNTHHA7.mjs +0 -63
- package/dist/browser/chunk-DSXIBE6N.mjs +0 -78
- package/dist/browser/chunk-DUH6QUVU.mjs +0 -2374
- package/dist/browser/chunk-ELV4OZOI.mjs +0 -29
- package/dist/browser/chunk-EXQZGUQH.mjs +0 -193
- package/dist/browser/chunk-G64Q6OJF.mjs +0 -96
- package/dist/browser/chunk-HOZW3PKP.mjs +0 -9
- package/dist/browser/chunk-HUCSHDTB.mjs +0 -100
- package/dist/browser/chunk-JPTQZWJQ.mjs +0 -10
- package/dist/browser/chunk-K3IPRX6D.mjs +0 -2559
- package/dist/browser/chunk-ML7THVLJ.mjs +0 -38
- package/dist/browser/chunk-MY2XKH22.mjs +0 -40
- package/dist/browser/chunk-NLWTBAGB.mjs +0 -111
- package/dist/browser/chunk-NXQG7DRA.mjs +0 -318
- package/dist/browser/chunk-OEDCEZXJ.mjs +0 -92
- package/dist/browser/chunk-OIZS5KIX.mjs +0 -6
- package/dist/browser/chunk-RA6LSBCM.mjs +0 -43
- package/dist/browser/chunk-TK63WFXK.mjs +0 -90
- package/dist/browser/chunk-TY7L6OXO.mjs +0 -69
- package/dist/browser/chunk-U3JOQGWX.mjs +0 -19
- package/dist/browser/chunk-U4YDIBUT.mjs +0 -653
- package/dist/browser/chunk-UATIJ4KU.mjs +0 -21
- package/dist/browser/chunk-UKOWD2K5.mjs +0 -315
- package/dist/browser/chunk-UTMHUHUV.mjs +0 -150
- package/dist/browser/chunk-V43N6TZO.mjs +0 -857
- package/dist/browser/chunk-VI7BQR4U.mjs +0 -21
- package/dist/browser/chunk-WN464PTL.mjs +0 -375
- package/dist/browser/chunk-WXLBZJMT.mjs +0 -25
- package/dist/browser/chunk-X7TXYUKO.mjs +0 -86
- package/dist/browser/chunk-XAWNZ4G2.mjs +0 -151
- package/dist/browser/chunk-Y6IBAUNO.mjs +0 -561
- package/dist/browser/chunk-ZI2V4VD7.mjs +0 -21
- package/dist/browser/cold-module-YNUUDNOM.mjs +0 -761
- package/dist/browser/engine-hooks-HBVS6YM4.mjs +0 -18
- package/dist/browser/gzip-5S7ROJFJ.mjs +0 -1
- package/dist/browser/import-5ESVMFDJ.mjs +0 -20
- package/dist/browser/methods-KTQCSIN4.mjs +0 -30
- package/dist/browser/module-NDSQLPMQ.mjs +0 -25
- package/dist/browser/operations-OJ3BXS55.mjs +0 -5
- package/dist/browser/phrase-module-HAT3TLZN.mjs +0 -328
- package/dist/browser/pool-3JLET5RO.mjs +0 -297
- package/dist/browser/release-HYXPVJVS.mjs +0 -32
- package/dist/browser/restore-queue-LQBBTODR.mjs +0 -55
- package/dist/browser/retention-TY3L3BFN.mjs +0 -211
- package/dist/browser/snapshot-5FHPPCNZ.mjs +0 -965
- package/dist/browser/start-2UZTOBG5.mjs +0 -26
- package/dist/browser/sync-state-P5XG6LTQ.mjs +0 -15
- package/dist/browser/write-ULXAN5B4.mjs +0 -196
- package/dist/chunk-2NE7VCYE.mjs +0 -212
- package/dist/chunk-2ROUFMQX.mjs +0 -543
- package/dist/chunk-37CD3OKS.mjs +0 -87
- package/dist/chunk-3MXV3VHR.mjs +0 -46
- package/dist/chunk-3OH67G7R.mjs +0 -214
- package/dist/chunk-4B7JIGQD.mjs +0 -106
- package/dist/chunk-5YNRKI2C.mjs +0 -81
- package/dist/chunk-6HTGOXIK.mjs +0 -875
- package/dist/chunk-6OEGXLBX.mjs +0 -57
- package/dist/chunk-6RC4K46J.mjs +0 -86
- package/dist/chunk-7GFE3PEY.mjs +0 -40
- package/dist/chunk-7GXJUJ24.mjs +0 -49
- package/dist/chunk-7V5IUP2T.mjs +0 -63
- package/dist/chunk-A4L7YTKX.mjs +0 -458
- package/dist/chunk-BEZH7VEH.mjs +0 -23
- package/dist/chunk-BNL5OPRV.mjs +0 -634
- package/dist/chunk-BTPGQC6Z.mjs +0 -27
- package/dist/chunk-C7XQYG6U.mjs +0 -50
- package/dist/chunk-CQZXZ75V.mjs +0 -562
- package/dist/chunk-CWS55TEX.mjs +0 -242
- package/dist/chunk-CZQ33DLW.mjs +0 -78
- package/dist/chunk-EEBCDP36.mjs +0 -32
- package/dist/chunk-FB6463IN.mjs +0 -1499
- package/dist/chunk-FCJ553HS.mjs +0 -655
- package/dist/chunk-FEZVDOWX.mjs +0 -6996
- package/dist/chunk-FOCV4CBZ.mjs +0 -87
- package/dist/chunk-FQBFZAWG.mjs +0 -27
- package/dist/chunk-G6HRSGOU.mjs +0 -74
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-GH4WQ22V.mjs +0 -34
- package/dist/chunk-GPWMUPCA.mjs +0 -1126
- package/dist/chunk-GQPTDQCL.mjs +0 -54
- package/dist/chunk-HJSN7UYG.mjs +0 -10
- package/dist/chunk-I54T6CQP.mjs +0 -117
- package/dist/chunk-IPN7S4KX.mjs +0 -130
- package/dist/chunk-J4IJTTEX.mjs +0 -226
- package/dist/chunk-JSV6OQ4C.mjs +0 -74
- package/dist/chunk-K4ZIGL2O.mjs +0 -290
- package/dist/chunk-KAKQ74LS.mjs +0 -53
- package/dist/chunk-KCQYFO4K.mjs +0 -62
- package/dist/chunk-KHKIRS5D.mjs +0 -113
- package/dist/chunk-KOKM4PQN.mjs +0 -52
- package/dist/chunk-KP7TYHWT.mjs +0 -92
- package/dist/chunk-KZ3NX2P7.mjs +0 -21
- package/dist/chunk-L5ORED7V.mjs +0 -25
- package/dist/chunk-LDNCLRZU.mjs +0 -218
- package/dist/chunk-LHKOSI2J.mjs +0 -58
- package/dist/chunk-LQG5G2LY.mjs +0 -39
- package/dist/chunk-MATMVH65.mjs +0 -9
- package/dist/chunk-MP7ABPTD.mjs +0 -189
- package/dist/chunk-MW6BR4QP.mjs +0 -316
- package/dist/chunk-MWD5VPN7.mjs +0 -21
- package/dist/chunk-ODYKO5TO.mjs +0 -101
- package/dist/chunk-OG7UGJ6F.mjs +0 -63
- package/dist/chunk-ORN5BLL7.mjs +0 -11
- package/dist/chunk-OYABFKTW.mjs +0 -1974
- package/dist/chunk-P5LANSH6.mjs +0 -121
- package/dist/chunk-PELHVTO7.mjs +0 -24
- package/dist/chunk-PIH5SJ4N.mjs +0 -7481
- package/dist/chunk-PSZI4O24.mjs +0 -253
- package/dist/chunk-PV2CG7EJ.mjs +0 -886
- package/dist/chunk-PWGYQXML.mjs +0 -470
- package/dist/chunk-Q2UL2TPC.mjs +0 -21
- package/dist/chunk-QHPYS427.mjs +0 -66
- package/dist/chunk-QJVOLKU6.mjs +0 -111
- package/dist/chunk-QLDABJZM.mjs +0 -20
- package/dist/chunk-QYRNLLLI.mjs +0 -99
- package/dist/chunk-RCX4WNLC.mjs +0 -151
- package/dist/chunk-RFBLQLLZ.mjs +0 -16
- package/dist/chunk-RIHIVFIQ.mjs +0 -240
- package/dist/chunk-RLOES5SX.mjs +0 -31
- package/dist/chunk-RWURUDSP.mjs +0 -2639
- package/dist/chunk-RZWWB2XR.mjs +0 -96
- package/dist/chunk-S5LN746F.mjs +0 -10
- package/dist/chunk-SOI6LTHM.mjs +0 -216
- package/dist/chunk-SQJWAIF4.mjs +0 -12
- package/dist/chunk-TDIK6NTV.mjs +0 -10
- package/dist/chunk-TQXHPFWT.mjs +0 -177
- package/dist/chunk-U55XJEIG.mjs +0 -18
- package/dist/chunk-UD5HIS4U.mjs +0 -382
- package/dist/chunk-UHICS3JI.mjs +0 -83
- package/dist/chunk-UJDJB3NE.mjs +0 -913
- package/dist/chunk-VD7J552I.mjs +0 -28
- package/dist/chunk-VSLSGASN.mjs +0 -30
- package/dist/chunk-VZ2ONHEE.mjs +0 -3715
- package/dist/chunk-W7OSSKH5.mjs +0 -1427
- package/dist/chunk-WZ7YV54N.mjs +0 -152
- package/dist/chunk-X5CV2E2B.mjs +0 -1
- package/dist/chunk-Y4WPNHMC.mjs +0 -50
- package/dist/chunk-YEKL4JBK.mjs +0 -96
- package/dist/chunk-ZXNQEW43.mjs +0 -18
- package/dist/chunk-ZYAY26KG.mjs +0 -29
- package/dist/direct-executor-V5DRIECI.mjs +0 -34
- package/dist/durability-wiring-3TD62MBI.mjs +0 -4072
- package/dist/engine-hooks-HA3SBOBR.mjs +0 -54
- package/dist/gzip-F4HMIEEQ.mjs +0 -1
- package/dist/import-GPKLTSKA.mjs +0 -56
- package/dist/methods-7IOINERF.mjs +0 -30
- package/dist/module-JYHFTVPS.mjs +0 -63
- package/dist/operations-G5EP6JPX.mjs +0 -5
- package/dist/phrase-module-XW5MKWP5.mjs +0 -330
- package/dist/pool-Y4A46T36.mjs +0 -298
- package/dist/react-native/chunks/analysis-change-QUVDNABS.mjs +0 -934
- package/dist/react-native/chunks/analysis-change-entry-OC4XASBF.mjs +0 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +0 -29
- package/dist/react-native/chunks/chunk-2PRHILX3.mjs +0 -529
- package/dist/react-native/chunks/chunk-3NQOVO3K.mjs +0 -1
- package/dist/react-native/chunks/chunk-3WI35N75.mjs +0 -226
- package/dist/react-native/chunks/chunk-4DII3ZSM.mjs +0 -73
- package/dist/react-native/chunks/chunk-4J74WHQM.mjs +0 -177
- package/dist/react-native/chunks/chunk-4NWR3NGS.mjs +0 -151
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +0 -17
- package/dist/react-native/chunks/chunk-5MSX5FRT.mjs +0 -858
- package/dist/react-native/chunks/chunk-6OFDUYVX.mjs +0 -92
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +0 -9
- package/dist/react-native/chunks/chunk-6ZELFCK5.mjs +0 -315
- package/dist/react-native/chunks/chunk-AAAETEJK.mjs +0 -27
- package/dist/react-native/chunks/chunk-AM7RSBPF.mjs +0 -32
- package/dist/react-native/chunks/chunk-BITYFZSZ.mjs +0 -242
- package/dist/react-native/chunks/chunk-C5G6TJ7A.mjs +0 -140
- package/dist/react-native/chunks/chunk-CHPTFFJM.mjs +0 -43
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +0 -10
- package/dist/react-native/chunks/chunk-DMIFXZ3Q.mjs +0 -432
- package/dist/react-native/chunks/chunk-DVDX4SDR.mjs +0 -375
- package/dist/react-native/chunks/chunk-DXRSEWA2.mjs +0 -12
- package/dist/react-native/chunks/chunk-F753DA54.mjs +0 -23
- package/dist/react-native/chunks/chunk-FHPW7P2O.mjs +0 -40
- package/dist/react-native/chunks/chunk-FTZHMRD2.mjs +0 -18
- package/dist/react-native/chunks/chunk-HJBJBH26.mjs +0 -34
- package/dist/react-native/chunks/chunk-IAENKE2D.mjs +0 -21
- package/dist/react-native/chunks/chunk-IO2SMUQD.mjs +0 -10
- package/dist/react-native/chunks/chunk-IYNT75CE.mjs +0 -111
- package/dist/react-native/chunks/chunk-JDOEEMEF.mjs +0 -38
- package/dist/react-native/chunks/chunk-JWUCMVRK.mjs +0 -15
- package/dist/react-native/chunks/chunk-KSBYEMCB.mjs +0 -100
- package/dist/react-native/chunks/chunk-KU646XXT.mjs +0 -164
- package/dist/react-native/chunks/chunk-LU3Y3P63.mjs +0 -68
- package/dist/react-native/chunks/chunk-LVIKKAA6.mjs +0 -93
- package/dist/react-native/chunks/chunk-LZSLNSUN.mjs +0 -193
- package/dist/react-native/chunks/chunk-MJDQU5MW.mjs +0 -1225
- package/dist/react-native/chunks/chunk-NNE4VDMM.mjs +0 -8
- package/dist/react-native/chunks/chunk-NVVRSRX5.mjs +0 -78
- package/dist/react-native/chunks/chunk-OCSLSH27.mjs +0 -22723
- package/dist/react-native/chunks/chunk-PB2YXVQW.mjs +0 -29
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +0 -79
- package/dist/react-native/chunks/chunk-PSWKQVVT.mjs +0 -9
- package/dist/react-native/chunks/chunk-RDWG33MM.mjs +0 -79
- package/dist/react-native/chunks/chunk-SK2PWYDH.mjs +0 -654
- package/dist/react-native/chunks/chunk-SUPXRTMD.mjs +0 -96
- package/dist/react-native/chunks/chunk-TORU2OHQ.mjs +0 -218
- package/dist/react-native/chunks/chunk-U4KSKA4Z.mjs +0 -23
- package/dist/react-native/chunks/chunk-UNUFZ2QY.mjs +0 -68
- package/dist/react-native/chunks/chunk-WBYQRHDY.mjs +0 -86
- package/dist/react-native/chunks/chunk-WVWJNUMN.mjs +0 -2562
- package/dist/react-native/chunks/chunk-YH7QY657.mjs +0 -288
- package/dist/react-native/chunks/chunk-YZW4CHM6.mjs +0 -562
- package/dist/react-native/chunks/chunk-ZNZ6CPAZ.mjs +0 -562
- package/dist/react-native/chunks/chunk-ZVQMBF2H.mjs +0 -63
- package/dist/react-native/chunks/chunk-ZWAIN4GG.mjs +0 -2636
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +0 -92
- package/dist/react-native/chunks/cold-module-N6KFNNZA.mjs +0 -773
- package/dist/react-native/chunks/durability-wiring-RN64S2TL.mjs +0 -4984
- package/dist/react-native/chunks/engine-hooks-CWA5CKCA.mjs +0 -30
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +0 -3
- package/dist/react-native/chunks/import-5UAWBRJP.mjs +0 -32
- package/dist/react-native/chunks/methods-6W5U4C3H.mjs +0 -30
- package/dist/react-native/chunks/module-6RP4ZCBW.mjs +0 -37
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +0 -5
- package/dist/react-native/chunks/phrase-module-QK22HSQ2.mjs +0 -329
- package/dist/react-native/chunks/pool-JR3NJCAF.mjs +0 -297
- package/dist/react-native/chunks/release-2SIHZWDO.mjs +0 -32
- package/dist/react-native/chunks/restore-hooks-ENFMDTWC.mjs +0 -127
- package/dist/react-native/chunks/restore-queue-4R6AASE5.mjs +0 -55
- package/dist/react-native/chunks/retention-5GTFT3GR.mjs +0 -223
- package/dist/react-native/chunks/snapshot-5LGPQXFS.mjs +0 -976
- package/dist/react-native/chunks/start-ZQJVZ5DN.mjs +0 -38
- package/dist/react-native/chunks/sync-state-PASCIHHT.mjs +0 -15
- package/dist/react-native/chunks/write-6BRYIIZ7.mjs +0 -208
- package/dist/release-SMR4WJD4.mjs +0 -32
- package/dist/restore-hooks-HXLIEB4A.mjs +0 -153
- package/dist/restore-queue-LZH7LMLR.mjs +0 -55
- package/dist/retention-3K7ARGAG.mjs +0 -66
- package/dist/runtime-COIUORCN.mjs +0 -177
- package/dist/snapshot-O7ICP7NJ.mjs +0 -783
- package/dist/start-S4PFP6RS.mjs +0 -66
- package/dist/sync-state-ZWHLAFLE.mjs +0 -15
- package/dist/thread-YLJ3ZPQ3.mjs +0 -50
- package/dist/write-2OBJGLFS.mjs +0 -233
- /package/dist/browser/{chunk-M3MQE2X7.mjs → digest-leaf-64IPRPZD.mjs} +0 -0
- /package/dist/browser/{chunk-JNOAKDUM.mjs → gzip-JF3S6PPT.mjs} +0 -0
- /package/dist/{chunk-ZXNNR73R.mjs → gzip-2UCZW2MM.mjs} +0 -0
package/dist/chunk-L5ORED7V.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/schema/constants.ts
|
|
2
|
-
var MAX_NESTING_DEPTH = 4;
|
|
3
|
-
var MAX_DOCUMENT_NESTING_DEPTH = 32;
|
|
4
|
-
var DEFAULT_PATTERN_VALUE_LIMIT = 8192;
|
|
5
|
-
var MIN_PATTERN_VALUE_LIMIT = 1;
|
|
6
|
-
var MAX_PATTERN_VALUE_LIMIT = 65536;
|
|
7
|
-
var MAX_VECTOR_DIMENSION = 4096;
|
|
8
|
-
var MAX_STORED_VECTOR_DIMENSION = 65535;
|
|
9
|
-
var MAX_TEXT_FIELDS = 65536;
|
|
10
|
-
var MAX_DOCUMENT_BYTES = 16777216;
|
|
11
|
-
var PARSED_FIELD_TYPE_CACHE_ENTRIES = 1024;
|
|
12
|
-
|
|
13
|
-
// src/schema/validator/shared.ts
|
|
14
|
-
var VECTOR_PATTERN = /^vector\[(\d+)]$/;
|
|
15
|
-
function isGeopointOrVectorType(fieldType) {
|
|
16
|
-
return fieldType === "geopoint" || fieldType !== void 0 && VECTOR_PATTERN.test(fieldType);
|
|
17
|
-
}
|
|
18
|
-
var FIELD_NAME_PATTERN = /^[A-Za-z0-9_]+$/;
|
|
19
|
-
var RESERVED_ROOT_FIELDS = /* @__PURE__ */ new Set(["id"]);
|
|
20
|
-
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
21
|
-
function isPlainObject(value) {
|
|
22
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { DEFAULT_PATTERN_VALUE_LIMIT, FIELD_NAME_PATTERN, MAX_DOCUMENT_BYTES, MAX_DOCUMENT_NESTING_DEPTH, MAX_NESTING_DEPTH, MAX_PATTERN_VALUE_LIMIT, MAX_STORED_VECTOR_DIMENSION, MAX_TEXT_FIELDS, MAX_VECTOR_DIMENSION, MIN_PATTERN_VALUE_LIMIT, PARSED_FIELD_TYPE_CACHE_ENTRIES, PROTOTYPE_POLLUTION_KEYS, RESERVED_ROOT_FIELDS, VECTOR_PATTERN, isGeopointOrVectorType, isPlainObject };
|
package/dist/chunk-LDNCLRZU.mjs
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import { untagDocumentLine } from './chunk-TQXHPFWT.mjs';
|
|
2
|
-
import { restoredConfigFields, restoredEmbedding } from './chunk-INJYO3BU.mjs';
|
|
3
|
-
import { chunksOf } from './chunk-CZQ33DLW.mjs';
|
|
4
|
-
import { MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_IMPORT_REFUSALS_REPORTED } from './chunk-EEBCDP36.mjs';
|
|
5
|
-
import { requireConfigurationShape } from './chunk-GH4WQ22V.mjs';
|
|
6
|
-
import { flattenSchema } from './chunk-W5EB5XKI.mjs';
|
|
7
|
-
import { turnsAreBudgeted, turnIsSpent, yieldTurn } from './chunk-LQG5G2LY.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
9
|
-
|
|
10
|
-
// src/engine/export/lines.ts
|
|
11
|
-
var NEWLINE = 10;
|
|
12
|
-
function joined(parts, total) {
|
|
13
|
-
if (parts.length === 1) return parts[0];
|
|
14
|
-
const bytes = new Uint8Array(total);
|
|
15
|
-
let offset = 0;
|
|
16
|
-
for (const part of parts) {
|
|
17
|
-
bytes.set(part, offset);
|
|
18
|
-
offset += part.byteLength;
|
|
19
|
-
}
|
|
20
|
-
return bytes;
|
|
21
|
-
}
|
|
22
|
-
async function* exportLines(source, maxLineBytes) {
|
|
23
|
-
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
24
|
-
let parts = [];
|
|
25
|
-
let pending = 0;
|
|
26
|
-
let overflowing = false;
|
|
27
|
-
let line = 0;
|
|
28
|
-
const finishLine = () => {
|
|
29
|
-
line += 1;
|
|
30
|
-
if (overflowing) {
|
|
31
|
-
overflowing = false;
|
|
32
|
-
parts = [];
|
|
33
|
-
pending = 0;
|
|
34
|
-
return { line, refused: "too-long" };
|
|
35
|
-
}
|
|
36
|
-
const bytes = joined(parts, pending);
|
|
37
|
-
parts = [];
|
|
38
|
-
pending = 0;
|
|
39
|
-
try {
|
|
40
|
-
return { line, text: decoder.decode(bytes) };
|
|
41
|
-
} catch {
|
|
42
|
-
return { line, refused: "not-utf8" };
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
for await (const chunk of chunksOf(source)) {
|
|
46
|
-
let start = 0;
|
|
47
|
-
for (; ; ) {
|
|
48
|
-
const newline = chunk.indexOf(NEWLINE, start);
|
|
49
|
-
const end = newline < 0 ? chunk.byteLength : newline;
|
|
50
|
-
const piece = chunk.subarray(start, end);
|
|
51
|
-
if (!overflowing && pending + piece.byteLength <= maxLineBytes) {
|
|
52
|
-
if (piece.byteLength > 0) parts.push(piece.slice());
|
|
53
|
-
pending += piece.byteLength;
|
|
54
|
-
} else {
|
|
55
|
-
overflowing = true;
|
|
56
|
-
parts = [];
|
|
57
|
-
}
|
|
58
|
-
if (newline < 0) break;
|
|
59
|
-
yield finishLine();
|
|
60
|
-
start = newline + 1;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (pending > 0 || overflowing) yield finishLine();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// src/engine/export/import.ts
|
|
67
|
-
var DOCUMENT_EXPORT_FORMAT = "narsil-export";
|
|
68
|
-
var DOCUMENT_EXPORT_VERSION = 1;
|
|
69
|
-
function invalidHeader(message) {
|
|
70
|
-
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `The document export header ${message}`);
|
|
71
|
-
}
|
|
72
|
-
function isRecord(value) {
|
|
73
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
74
|
-
}
|
|
75
|
-
function configOfHeader(line) {
|
|
76
|
-
if (line === void 0) invalidHeader("is missing");
|
|
77
|
-
if (!("text" in line)) {
|
|
78
|
-
invalidHeader(
|
|
79
|
-
line.refused === "too-long" ? `passes the line limit of ${MAX_EXPORT_LINE_BYTES} bytes` : "is not UTF-8"
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
let raw;
|
|
83
|
-
try {
|
|
84
|
-
raw = JSON.parse(line.text);
|
|
85
|
-
} catch {
|
|
86
|
-
invalidHeader("is not JSON");
|
|
87
|
-
}
|
|
88
|
-
if (!isRecord(raw) || raw.format !== DOCUMENT_EXPORT_FORMAT || raw.version !== DOCUMENT_EXPORT_VERSION) {
|
|
89
|
-
invalidHeader(`must name format "${DOCUMENT_EXPORT_FORMAT}" and version ${DOCUMENT_EXPORT_VERSION}`);
|
|
90
|
-
}
|
|
91
|
-
const configuration = requireConfigurationShape(raw.index, "document export header");
|
|
92
|
-
const fields = restoredConfigFields(configuration, (message) => invalidHeader(message));
|
|
93
|
-
const embedding = restoredEmbedding(configuration.embedding, (message) => invalidHeader(message));
|
|
94
|
-
return {
|
|
95
|
-
schema: configuration.schema,
|
|
96
|
-
language: configuration.language,
|
|
97
|
-
...fields,
|
|
98
|
-
...embedding === void 0 ? {} : {
|
|
99
|
-
embedding: {
|
|
100
|
-
fields: embedding.fields,
|
|
101
|
-
...embedding.adapter === void 0 ? {} : { adapter: embedding.adapter }
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
async function prepareIndex(engine, indexName, config) {
|
|
107
|
-
if (!engine.listIndexes().some((index) => index.name === indexName)) {
|
|
108
|
-
await engine.createIndex(indexName, config);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const existing = flattenSchema(engine.getStats(indexName).schema);
|
|
112
|
-
const exported = flattenSchema(config.schema);
|
|
113
|
-
const fields = /* @__PURE__ */ new Set([...Object.keys(existing), ...Object.keys(exported)]);
|
|
114
|
-
for (const field of fields) {
|
|
115
|
-
if (existing[field] === exported[field]) continue;
|
|
116
|
-
throw new NarsilError(
|
|
117
|
-
ErrorCodes.CONFIG_INVALID,
|
|
118
|
-
`Index "${indexName}" gives field "${field}" another type than the export does, so the import cannot write into it`,
|
|
119
|
-
{ indexName, field }
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function highestReportedAt(refused) {
|
|
124
|
-
let highest = 0;
|
|
125
|
-
for (let at = 1; at < refused.length; at++) {
|
|
126
|
-
if (refused[at].line > refused[highest].line) highest = at;
|
|
127
|
-
}
|
|
128
|
-
return highest;
|
|
129
|
-
}
|
|
130
|
-
function refuse(state, line, code, message) {
|
|
131
|
-
state.result.refusedCount += 1;
|
|
132
|
-
const refused = state.result.refused;
|
|
133
|
-
if (refused.length < MAX_IMPORT_REFUSALS_REPORTED) {
|
|
134
|
-
refused.push({ line, code, message });
|
|
135
|
-
if (refused.length === MAX_IMPORT_REFUSALS_REPORTED) state.highestReported = highestReportedAt(refused);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (line >= refused[state.highestReported].line) return;
|
|
139
|
-
refused[state.highestReported] = { line, code, message };
|
|
140
|
-
state.highestReported = highestReportedAt(refused);
|
|
141
|
-
}
|
|
142
|
-
async function flush(state) {
|
|
143
|
-
if (state.batch.length === 0) return;
|
|
144
|
-
const batch = state.batch;
|
|
145
|
-
state.batch = [];
|
|
146
|
-
state.batchIds = /* @__PURE__ */ new Set();
|
|
147
|
-
const lineOf = new Map(batch.map((entry) => [entry.docId, entry.line]));
|
|
148
|
-
const inserts = [];
|
|
149
|
-
const updates = [];
|
|
150
|
-
for (const entry of batch) {
|
|
151
|
-
if (await state.engine.has(state.indexName, entry.docId))
|
|
152
|
-
updates.push({ docId: entry.docId, document: entry.document });
|
|
153
|
-
else inserts.push(entry.document);
|
|
154
|
-
}
|
|
155
|
-
for (const outcome of [
|
|
156
|
-
inserts.length === 0 ? null : await state.engine.insertBatch(state.indexName, inserts, { skipClone: true }),
|
|
157
|
-
updates.length === 0 ? null : await state.engine.updateBatch(state.indexName, updates)
|
|
158
|
-
]) {
|
|
159
|
-
if (outcome === null) continue;
|
|
160
|
-
state.result.imported += outcome.succeeded.length;
|
|
161
|
-
for (const failure of outcome.failed) {
|
|
162
|
-
const code = failure.error instanceof NarsilError ? failure.error.code : ErrorCodes.DOC_VALIDATION_FAILED;
|
|
163
|
-
refuse(state, lineOf.get(failure.docId) ?? 0, code, failure.error.message);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
async function takeLine(state, entry) {
|
|
168
|
-
if (!("text" in entry)) {
|
|
169
|
-
const message = entry.refused === "too-long" ? `The line passes the limit of ${MAX_EXPORT_LINE_BYTES} bytes` : "The line is not UTF-8";
|
|
170
|
-
refuse(state, entry.line, ErrorCodes.DOC_VALIDATION_FAILED, message);
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
if (entry.text.length === 0) return;
|
|
174
|
-
let document;
|
|
175
|
-
try {
|
|
176
|
-
document = JSON.parse(entry.text);
|
|
177
|
-
} catch {
|
|
178
|
-
refuse(state, entry.line, ErrorCodes.DOC_VALIDATION_FAILED, "The line is not JSON");
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
if (!isRecord(document) || typeof document.id !== "string" || document.id.length === 0) {
|
|
182
|
-
refuse(state, entry.line, ErrorCodes.DOC_VALIDATION_FAILED, "The line holds no document with a string id");
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
try {
|
|
186
|
-
untagDocumentLine(entry.text, document);
|
|
187
|
-
} catch (error) {
|
|
188
|
-
if (!(error instanceof NarsilError)) throw error;
|
|
189
|
-
refuse(state, entry.line, error.code, error.message);
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (state.batchIds.has(document.id)) await flush(state);
|
|
193
|
-
state.batch.push({ line: entry.line, docId: document.id, document });
|
|
194
|
-
state.batchIds.add(document.id);
|
|
195
|
-
if (state.batch.length >= IMPORT_BATCH_DOCUMENTS) await flush(state);
|
|
196
|
-
}
|
|
197
|
-
async function readDocumentExport(engine, indexName, source) {
|
|
198
|
-
const lines = exportLines(source, MAX_EXPORT_LINE_BYTES);
|
|
199
|
-
const header = await lines.next();
|
|
200
|
-
await prepareIndex(engine, indexName, configOfHeader(header.done === true ? void 0 : header.value));
|
|
201
|
-
const state = {
|
|
202
|
-
engine,
|
|
203
|
-
indexName,
|
|
204
|
-
batch: [],
|
|
205
|
-
batchIds: /* @__PURE__ */ new Set(),
|
|
206
|
-
result: { imported: 0, refusedCount: 0, refused: [] },
|
|
207
|
-
highestReported: 0
|
|
208
|
-
};
|
|
209
|
-
for await (const entry of lines) {
|
|
210
|
-
await takeLine(state, entry);
|
|
211
|
-
if (turnsAreBudgeted && turnIsSpent()) await yieldTurn();
|
|
212
|
-
}
|
|
213
|
-
await flush(state);
|
|
214
|
-
state.result.refused.sort((a, b) => a.line - b.line);
|
|
215
|
-
return state.result;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport };
|
package/dist/chunk-LHKOSI2J.mjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { WORKER_YOUNG_GENERATION_MB } from './chunk-3MXV3VHR.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
3
|
-
|
|
4
|
-
// src/runtime/detect.ts
|
|
5
|
-
function detectRuntimeName() {
|
|
6
|
-
if ("Bun" in globalThis) {
|
|
7
|
-
return "bun";
|
|
8
|
-
}
|
|
9
|
-
if ("Deno" in globalThis) {
|
|
10
|
-
return "deno";
|
|
11
|
-
}
|
|
12
|
-
const proc = globalThis.process;
|
|
13
|
-
if (typeof proc === "object" && proc !== null && typeof proc.versions === "object" && typeof proc.versions?.node === "string") {
|
|
14
|
-
return "node";
|
|
15
|
-
}
|
|
16
|
-
return "browser";
|
|
17
|
-
}
|
|
18
|
-
function getCpuCount() {
|
|
19
|
-
const nav = globalThis.navigator;
|
|
20
|
-
if (nav && typeof nav.hardwareConcurrency === "number" && nav.hardwareConcurrency >= 1) {
|
|
21
|
-
return nav.hardwareConcurrency;
|
|
22
|
-
}
|
|
23
|
-
return 1;
|
|
24
|
-
}
|
|
25
|
-
function detectRuntime() {
|
|
26
|
-
const runtime = detectRuntimeName();
|
|
27
|
-
return {
|
|
28
|
-
runtime,
|
|
29
|
-
cpuCount: getCpuCount(),
|
|
30
|
-
supportsWorkerThreads: runtime === "node" || runtime === "bun",
|
|
31
|
-
supportsWebWorkers: runtime === "browser" || runtime === "deno" || runtime === "bun",
|
|
32
|
-
supportsFileSystem: runtime === "node" || runtime === "bun" || runtime === "deno",
|
|
33
|
-
supportsIndexedDB: runtime === "browser" || "indexedDB" in globalThis,
|
|
34
|
-
supportsBroadcastChannel: "BroadcastChannel" in globalThis
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/workers/entry-point.ts
|
|
39
|
-
var DIST_SEGMENT = "/dist/";
|
|
40
|
-
function resolveWorkerEntry(moduleUrl, sourceDirectory, distEntry) {
|
|
41
|
-
const distIndex = moduleUrl.lastIndexOf(DIST_SEGMENT);
|
|
42
|
-
const entry = distIndex !== -1 ? new URL(distEntry, moduleUrl.slice(0, distIndex + DIST_SEGMENT.length)).href : sourceDirectory.test(moduleUrl) ? moduleUrl.replace(sourceDirectory, `${DIST_SEGMENT}${distEntry}`) : null;
|
|
43
|
-
return entry === moduleUrl ? null : entry;
|
|
44
|
-
}
|
|
45
|
-
function missingWorkerEntry(moduleUrl) {
|
|
46
|
-
return new NarsilError(
|
|
47
|
-
ErrorCodes.CONFIG_INVALID,
|
|
48
|
-
`The engine finds no worker entry beside its own module at "${moduleUrl}", which happens where a bundler folds @delali/narsil into an application bundle. Keep @delali/narsil outside the bundle, or set workers.enabled to false`,
|
|
49
|
-
{ moduleUrl }
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// src/workers/resource-limits.ts
|
|
54
|
-
function workerResourceLimits() {
|
|
55
|
-
return { maxYoungGenerationSizeMb: WORKER_YOUNG_GENERATION_MB };
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { detectRuntime, missingWorkerEntry, resolveWorkerEntry, workerResourceLimits };
|
package/dist/chunk-LQG5G2LY.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/runtime/turn-budget.ts
|
|
2
|
-
var turnsAreBudgeted = false;
|
|
3
|
-
function turnIsSpent() {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
function yieldTurn() {
|
|
7
|
-
return Promise.resolve();
|
|
8
|
-
}
|
|
9
|
-
function backgroundTurnIsSpent() {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
function yieldBackgroundTurn() {
|
|
13
|
-
return Promise.resolve();
|
|
14
|
-
}
|
|
15
|
-
function countWrite(write) {
|
|
16
|
-
return write();
|
|
17
|
-
}
|
|
18
|
-
function waitOutsideCountedWrite(wait) {
|
|
19
|
-
return wait();
|
|
20
|
-
}
|
|
21
|
-
function changeIndexOutsideExternalWaits(change) {
|
|
22
|
-
return change();
|
|
23
|
-
}
|
|
24
|
-
function indexChangeOutsideExternalWaits(change) {
|
|
25
|
-
return change;
|
|
26
|
-
}
|
|
27
|
-
function holdWrites(read) {
|
|
28
|
-
return read();
|
|
29
|
-
}
|
|
30
|
-
function holdWritesAndBackgroundWork(read) {
|
|
31
|
-
return read();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// src/core/doc-id-tables/plain.ts
|
|
35
|
-
function createDocIdMap() {
|
|
36
|
-
return /* @__PURE__ */ new Map();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { backgroundTurnIsSpent, changeIndexOutsideExternalWaits, countWrite, createDocIdMap, holdWrites, holdWritesAndBackgroundWork, indexChangeOutsideExternalWaits, turnIsSpent, turnsAreBudgeted, waitOutsideCountedWrite, yieldBackgroundTurn, yieldTurn };
|
package/dist/chunk-MATMVH65.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OSQ4_MIN_DIMENSION } from './chunk-VD7J552I.mjs';
|
|
2
|
-
|
|
3
|
-
// src/vector/vector-index/default-quantization.ts
|
|
4
|
-
function defaultQuantizationFor(dimension) {
|
|
5
|
-
if (dimension >= OSQ4_MIN_DIMENSION) return "osq4";
|
|
6
|
-
return "osq8";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { defaultQuantizationFor };
|
package/dist/chunk-MP7ABPTD.mjs
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
// src/errors.ts
|
|
2
|
-
var NARSIL_ERROR_MARKER = /* @__PURE__ */ Symbol.for("@delali/narsil.NarsilError");
|
|
3
|
-
var ErrorCodes = {
|
|
4
|
-
SCHEMA_INVALID_TYPE: "SCHEMA_INVALID_TYPE",
|
|
5
|
-
SCHEMA_DEPTH_EXCEEDED: "SCHEMA_DEPTH_EXCEEDED",
|
|
6
|
-
SCHEMA_INVALID_VECTOR_DIMENSION: "SCHEMA_INVALID_VECTOR_DIMENSION",
|
|
7
|
-
SCHEMA_INVALID_GEOPOINT: "SCHEMA_INVALID_GEOPOINT",
|
|
8
|
-
DOC_NOT_FOUND: "DOC_NOT_FOUND",
|
|
9
|
-
DOC_ALREADY_EXISTS: "DOC_ALREADY_EXISTS",
|
|
10
|
-
DOC_VALIDATION_FAILED: "DOC_VALIDATION_FAILED",
|
|
11
|
-
INDEX_NOT_FOUND: "INDEX_NOT_FOUND",
|
|
12
|
-
INDEX_ALREADY_EXISTS: "INDEX_ALREADY_EXISTS",
|
|
13
|
-
INDEX_ORPHANED: "INDEX_ORPHANED",
|
|
14
|
-
INDEX_REOPEN_CAPACITY_EXHAUSTED: "INDEX_REOPEN_CAPACITY_EXHAUSTED",
|
|
15
|
-
INSTANCE_SHUT_DOWN: "INSTANCE_SHUT_DOWN",
|
|
16
|
-
PARTITION_CORRUPTED: "PARTITION_CORRUPTED",
|
|
17
|
-
PARTITION_REBALANCING_BACKPRESSURE: "PARTITION_REBALANCING_BACKPRESSURE",
|
|
18
|
-
WORKER_CRASHED: "WORKER_CRASHED",
|
|
19
|
-
WORKER_BUSY: "WORKER_BUSY",
|
|
20
|
-
WORKER_TIMEOUT: "WORKER_TIMEOUT",
|
|
21
|
-
WORKER_ACTION_FAILED: "WORKER_ACTION_FAILED",
|
|
22
|
-
PERSISTENCE_SAVE_FAILED: "PERSISTENCE_SAVE_FAILED",
|
|
23
|
-
PERSISTENCE_LOAD_FAILED: "PERSISTENCE_LOAD_FAILED",
|
|
24
|
-
PERSISTENCE_DELETE_FAILED: "PERSISTENCE_DELETE_FAILED",
|
|
25
|
-
PERSISTENCE_CRC_MISMATCH: "PERSISTENCE_CRC_MISMATCH",
|
|
26
|
-
PERSISTENCE_WAL_CORRUPT: "PERSISTENCE_WAL_CORRUPT",
|
|
27
|
-
PERSISTENCE_FSYNC_FAILED: "PERSISTENCE_FSYNC_FAILED",
|
|
28
|
-
PERSISTENCE_DEPENDENCY_MISSING: "PERSISTENCE_DEPENDENCY_MISSING",
|
|
29
|
-
BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND",
|
|
30
|
-
BACKUP_ALREADY_EXISTS: "BACKUP_ALREADY_EXISTS",
|
|
31
|
-
BACKUP_DAMAGED: "BACKUP_DAMAGED",
|
|
32
|
-
BACKUP_DURABILITY_REQUIRED: "BACKUP_DURABILITY_REQUIRED",
|
|
33
|
-
BACKUP_IN_PROGRESS: "BACKUP_IN_PROGRESS",
|
|
34
|
-
BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED",
|
|
35
|
-
BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED",
|
|
36
|
-
BACKUP_NOT_READY: "BACKUP_NOT_READY",
|
|
37
|
-
SYNC_DURABILITY_REQUIRED: "SYNC_DURABILITY_REQUIRED",
|
|
38
|
-
SYNC_BACKUP_STORE_REQUIRED: "SYNC_BACKUP_STORE_REQUIRED",
|
|
39
|
-
SYNC_NOT_READY: "SYNC_NOT_READY",
|
|
40
|
-
SYNC_NOT_ENABLED: "SYNC_NOT_ENABLED",
|
|
41
|
-
SYNC_SNAPSHOT_PREPARING: "SYNC_SNAPSHOT_PREPARING",
|
|
42
|
-
QUERY_SUGGESTIONS_NOT_ENABLED: "QUERY_SUGGESTIONS_NOT_ENABLED",
|
|
43
|
-
SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
|
|
44
|
-
VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
|
|
45
|
-
SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
|
|
46
|
-
SEARCH_INVALID_MODE: "SEARCH_INVALID_MODE",
|
|
47
|
-
SEARCH_INVALID_CURSOR: "SEARCH_INVALID_CURSOR",
|
|
48
|
-
SEARCH_RESULT_WINDOW_EXCEEDED: "SEARCH_RESULT_WINDOW_EXCEEDED",
|
|
49
|
-
SEARCH_WORK_CAP_EXCEEDED: "SEARCH_WORK_CAP_EXCEEDED",
|
|
50
|
-
SEARCH_INVALID_PHRASE: "SEARCH_INVALID_PHRASE",
|
|
51
|
-
SEARCH_PHRASE_NOT_READY: "SEARCH_PHRASE_NOT_READY",
|
|
52
|
-
BM25_NOT_READY: "BM25_NOT_READY",
|
|
53
|
-
LANGUAGE_NOT_SUPPORTED: "LANGUAGE_NOT_SUPPORTED",
|
|
54
|
-
ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH",
|
|
55
|
-
ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC",
|
|
56
|
-
PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED",
|
|
57
|
-
RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED",
|
|
58
|
-
MEMORY_WRITE_BLOCKED: "MEMORY_WRITE_BLOCKED",
|
|
59
|
-
ANALYSIS_CHANGE_REPLACED: "ANALYSIS_CHANGE_REPLACED",
|
|
60
|
-
ANALYSIS_CHANGE_NOT_READY: "ANALYSIS_CHANGE_NOT_READY",
|
|
61
|
-
ANALYSIS_GENERATION_MISSING: "ANALYSIS_GENERATION_MISSING",
|
|
62
|
-
ANALYSIS_REBUILD_MEMORY_EXCEEDED: "ANALYSIS_REBUILD_MEMORY_EXCEEDED",
|
|
63
|
-
EMBEDDING_FAILED: "EMBEDDING_FAILED",
|
|
64
|
-
EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH",
|
|
65
|
-
EMBEDDING_NO_SOURCE: "EMBEDDING_NO_SOURCE",
|
|
66
|
-
EMBEDDING_CONFIG_INVALID: "EMBEDDING_CONFIG_INVALID",
|
|
67
|
-
RERANK_FAILED: "RERANK_FAILED",
|
|
68
|
-
RERANK_CONFIG_INVALID: "RERANK_CONFIG_INVALID",
|
|
69
|
-
DOC_MISSING_REQUIRED_FIELD: "DOC_MISSING_REQUIRED_FIELD",
|
|
70
|
-
CONFIG_INVALID: "CONFIG_INVALID",
|
|
71
|
-
QUERY_ROUTING_FAILED: "QUERY_ROUTING_FAILED",
|
|
72
|
-
QUERY_PARTIAL_FAILURE: "QUERY_PARTIAL_FAILURE",
|
|
73
|
-
QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT",
|
|
74
|
-
QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA",
|
|
75
|
-
SEARCH_CONTEXT_MISSING: "SEARCH_CONTEXT_MISSING",
|
|
76
|
-
CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED",
|
|
77
|
-
CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED",
|
|
78
|
-
ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES",
|
|
79
|
-
ALLOCATION_INVALID_CONFIG: "ALLOCATION_INVALID_CONFIG",
|
|
80
|
-
ALLOCATION_FAILED: "ALLOCATION_FAILED",
|
|
81
|
-
CONTROLLER_METADATA_INVALID: "CONTROLLER_METADATA_INVALID",
|
|
82
|
-
NODE_BOOTSTRAP_FAILED: "NODE_BOOTSTRAP_FAILED",
|
|
83
|
-
NODE_ALREADY_JOINED: "NODE_ALREADY_JOINED",
|
|
84
|
-
NODE_NOT_JOINED: "NODE_NOT_JOINED",
|
|
85
|
-
NODE_NOT_READY: "NODE_NOT_READY",
|
|
86
|
-
NODE_NOT_CONTROLLER: "NODE_NOT_CONTROLLER",
|
|
87
|
-
NODE_VERSION_INCOMPATIBLE: "NODE_VERSION_INCOMPATIBLE",
|
|
88
|
-
COORDINATOR_DEPENDENCY_MISSING: "COORDINATOR_DEPENDENCY_MISSING",
|
|
89
|
-
COORDINATOR_AUTH_FAILED: "COORDINATOR_AUTH_FAILED",
|
|
90
|
-
COORDINATOR_UNAVAILABLE: "COORDINATOR_UNAVAILABLE",
|
|
91
|
-
TRANSPORT_DEPENDENCY_MISSING: "TRANSPORT_DEPENDENCY_MISSING",
|
|
92
|
-
NATIVE_DEPENDENCY_MISSING: "NATIVE_DEPENDENCY_MISSING",
|
|
93
|
-
REPLICATION_ENTRY_INVALID: "REPLICATION_ENTRY_INVALID",
|
|
94
|
-
REPLICATION_INSYNC_REMOVAL_FAILED: "REPLICATION_INSYNC_REMOVAL_FAILED",
|
|
95
|
-
REPLICATION_ROLLBACK_FAILED: "REPLICATION_ROLLBACK_FAILED",
|
|
96
|
-
REPLICATION_OUTCOME_UNKNOWN: "REPLICATION_OUTCOME_UNKNOWN",
|
|
97
|
-
REPLICATION_WRITE_CONFLICT: "REPLICATION_WRITE_CONFLICT",
|
|
98
|
-
REPLICATION_LOG_FULL: "REPLICATION_LOG_FULL",
|
|
99
|
-
REPLICATION_ENTRY_CORRUPT: "REPLICATION_ENTRY_CORRUPT",
|
|
100
|
-
REPLICATION_SNAPSHOT_CORRUPT: "REPLICATION_SNAPSHOT_CORRUPT",
|
|
101
|
-
REPLICATION_TERM_MISMATCH: "REPLICATION_TERM_MISMATCH",
|
|
102
|
-
REPLICATION_SYNC_FAILED: "REPLICATION_SYNC_FAILED",
|
|
103
|
-
PARTITION_NOT_PRIMARY: "PARTITION_NOT_PRIMARY",
|
|
104
|
-
PARTITION_UNASSIGNED: "PARTITION_UNASSIGNED",
|
|
105
|
-
INSUFFICIENT_REPLICAS: "INSUFFICIENT_REPLICAS",
|
|
106
|
-
SNAPSHOT_SYNC_UNAUTHORIZED: "SNAPSHOT_SYNC_UNAUTHORIZED",
|
|
107
|
-
SNAPSHOT_SYNC_REQUEST_INVALID: "SNAPSHOT_SYNC_REQUEST_INVALID",
|
|
108
|
-
SNAPSHOT_SYNC_INDEX_NOT_FOUND: "SNAPSHOT_SYNC_INDEX_NOT_FOUND",
|
|
109
|
-
SNAPSHOT_SYNC_CAPACITY_EXHAUSTED: "SNAPSHOT_SYNC_CAPACITY_EXHAUSTED",
|
|
110
|
-
SNAPSHOT_SYNC_SNAPSHOT_FAILED: "SNAPSHOT_SYNC_SNAPSHOT_FAILED",
|
|
111
|
-
SNAPSHOT_SYNC_DECODE_FAILED: "SNAPSHOT_SYNC_DECODE_FAILED",
|
|
112
|
-
SNAPSHOT_SYNC_FRAME_INVALID: "SNAPSHOT_SYNC_FRAME_INVALID",
|
|
113
|
-
SNAPSHOT_SYNC_HEADER_INVALID: "SNAPSHOT_SYNC_HEADER_INVALID",
|
|
114
|
-
SNAPSHOT_SYNC_HEADER_MISMATCH: "SNAPSHOT_SYNC_HEADER_MISMATCH",
|
|
115
|
-
SNAPSHOT_SYNC_CHUNK_OUT_OF_ORDER: "SNAPSHOT_SYNC_CHUNK_OUT_OF_ORDER",
|
|
116
|
-
SNAPSHOT_SYNC_CHUNK_OVERFLOW: "SNAPSHOT_SYNC_CHUNK_OVERFLOW",
|
|
117
|
-
SNAPSHOT_SYNC_CHUNK_SIZE_EXCEEDED: "SNAPSHOT_SYNC_CHUNK_SIZE_EXCEEDED",
|
|
118
|
-
SNAPSHOT_SYNC_CHUNK_MISSING: "SNAPSHOT_SYNC_CHUNK_MISSING",
|
|
119
|
-
SNAPSHOT_SYNC_END_MISSING: "SNAPSHOT_SYNC_END_MISSING",
|
|
120
|
-
SNAPSHOT_SYNC_CHECKSUM_MISMATCH: "SNAPSHOT_SYNC_CHECKSUM_MISMATCH",
|
|
121
|
-
SNAPSHOT_SYNC_PRIMARY_ERROR: "SNAPSHOT_SYNC_PRIMARY_ERROR",
|
|
122
|
-
SNAPSHOT_SYNC_NO_TARGETS: "SNAPSHOT_SYNC_NO_TARGETS",
|
|
123
|
-
SNAPSHOT_SYNC_TRANSPORT_FAILED: "SNAPSHOT_SYNC_TRANSPORT_FAILED",
|
|
124
|
-
SNAPSHOT_SYNC_SCHEMA_UNAVAILABLE: "SNAPSHOT_SYNC_SCHEMA_UNAVAILABLE",
|
|
125
|
-
SNAPSHOT_SYNC_RESTORE_FAILED: "SNAPSHOT_SYNC_RESTORE_FAILED",
|
|
126
|
-
SNAPSHOT_SYNC_RESTORE_CLEANUP_FAILED: "SNAPSHOT_SYNC_RESTORE_CLEANUP_FAILED",
|
|
127
|
-
SNAPSHOT_SYNC_TIMEOUT: "SNAPSHOT_SYNC_TIMEOUT",
|
|
128
|
-
SNAPSHOT_SYNC_ALLOCATION_UNAVAILABLE: "SNAPSHOT_SYNC_ALLOCATION_UNAVAILABLE",
|
|
129
|
-
SNAPSHOT_SYNC_NOT_ASSIGNED: "SNAPSHOT_SYNC_NOT_ASSIGNED",
|
|
130
|
-
SNAPSHOT_SYNC_ABORTED: "SNAPSHOT_SYNC_ABORTED"
|
|
131
|
-
};
|
|
132
|
-
var ServerErrorCodes = {
|
|
133
|
-
INVALID_REQUEST: "INVALID_REQUEST",
|
|
134
|
-
INVALID_JSON: "INVALID_JSON",
|
|
135
|
-
EMPTY_BODY: "EMPTY_BODY",
|
|
136
|
-
PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE",
|
|
137
|
-
NOT_FOUND: "NOT_FOUND",
|
|
138
|
-
TASK_NOT_FOUND: "TASK_NOT_FOUND",
|
|
139
|
-
TASK_NOT_CANCELLABLE: "TASK_NOT_CANCELLABLE",
|
|
140
|
-
TASK_OWNED_BY_ANOTHER_INSTANCE: "TASK_OWNED_BY_ANOTHER_INSTANCE",
|
|
141
|
-
TASK_INTERRUPTED: "TASK_INTERRUPTED",
|
|
142
|
-
TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS",
|
|
143
|
-
HOOK_ERROR: "HOOK_ERROR",
|
|
144
|
-
INTERNAL_ERROR: "INTERNAL_ERROR"
|
|
145
|
-
};
|
|
146
|
-
var ClientErrorCodes = {
|
|
147
|
-
CLIENT_CONNECTION_FAILED: "CLIENT_CONNECTION_FAILED",
|
|
148
|
-
CLIENT_REQUEST_TIMEOUT: "CLIENT_REQUEST_TIMEOUT",
|
|
149
|
-
CLIENT_REQUEST_ABORTED: "CLIENT_REQUEST_ABORTED",
|
|
150
|
-
CLIENT_INVALID_RESPONSE: "CLIENT_INVALID_RESPONSE",
|
|
151
|
-
CLIENT_TASK_TIMEOUT: "CLIENT_TASK_TIMEOUT",
|
|
152
|
-
CLIENT_UNEXPECTED_ERROR: "CLIENT_UNEXPECTED_ERROR",
|
|
153
|
-
SYNC_ANALYSIS_UNAVAILABLE: "SYNC_ANALYSIS_UNAVAILABLE"
|
|
154
|
-
};
|
|
155
|
-
var NarsilError = class extends Error {
|
|
156
|
-
/** This says which failure it is. */
|
|
157
|
-
code;
|
|
158
|
-
/** This carries the values behind the failure, such as the field, index, or limit involved. It is empty when the code says everything. */
|
|
159
|
-
details;
|
|
160
|
-
/**
|
|
161
|
-
* Builds an error carrying a code the caller can branch on.
|
|
162
|
-
*
|
|
163
|
-
* @param code - The failure this error reports, from {@link ErrorCodes} for
|
|
164
|
-
* an engine failure, {@link ServerErrorCodes} for one the HTTP layer raised,
|
|
165
|
-
* or {@link ClientErrorCodes} for one that stopped a request from reaching a
|
|
166
|
-
* server.
|
|
167
|
-
* @param message - Plain description, for a log or a person.
|
|
168
|
-
* @param details - Values behind the failure, which reach
|
|
169
|
-
* {@link NarsilError.details}.
|
|
170
|
-
*/
|
|
171
|
-
constructor(code, message, details) {
|
|
172
|
-
super(message);
|
|
173
|
-
this.name = "NarsilError";
|
|
174
|
-
this.code = code;
|
|
175
|
-
this.details = details ?? {};
|
|
176
|
-
Object.defineProperty(this, NARSIL_ERROR_MARKER, { value: true });
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
function isNarsilError(value) {
|
|
180
|
-
return typeof value === "object" && value !== null && NARSIL_ERROR_MARKER in value;
|
|
181
|
-
}
|
|
182
|
-
function createNarsilError(code, message, details) {
|
|
183
|
-
return new NarsilError(code, message, details);
|
|
184
|
-
}
|
|
185
|
-
function describeError(error) {
|
|
186
|
-
return error instanceof Error ? error.message : String(error);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, createNarsilError, describeError, isNarsilError };
|