@delali/narsil 0.3.1-next.144 → 0.3.1-next.146
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.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/analysis-change-ZCJNYBJM.mjs +39 -0
- package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-YN3ELL6C.mjs} +1 -1
- package/dist/browser/{analysis-change-JPV775LR.mjs → analysis-change-M65AZQQG.mjs} +8 -5
- package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-H3YIOLXZ.mjs} +1 -1
- package/dist/browser/{chunk-VFYMPCOV.mjs → chunk-2JABMB4S.mjs} +10 -6
- package/dist/{chunk-46NZOPHS.mjs → browser/chunk-4DYLCICG.mjs} +2 -2
- package/dist/browser/{chunk-MZI3TEOW.mjs → chunk-4RD3AFSB.mjs} +1 -1
- package/dist/browser/{chunk-WCFCHIBB.mjs → chunk-5V74FFZE.mjs} +2 -2
- package/dist/{chunk-NN33CZRE.mjs → browser/chunk-6OWX3OP2.mjs} +2 -2
- package/dist/browser/chunk-BRWY3JCN.mjs +678 -0
- package/dist/browser/{chunk-5DB2VDGI.mjs → chunk-BVX2MEHA.mjs} +306 -607
- package/dist/browser/{chunk-KTOK275N.mjs → chunk-D6UFGBF5.mjs} +15 -45
- package/dist/browser/{chunk-D33A5VMU.mjs → chunk-IAXZAVYL.mjs} +25 -66
- package/dist/browser/chunk-JNOAKDUM.mjs +31 -0
- package/dist/browser/{chunk-LVY2LI35.mjs → chunk-KAEVGLYN.mjs} +2 -2
- package/dist/browser/{chunk-3ZBJYAS4.mjs → chunk-LURXVCHG.mjs} +1 -1
- package/dist/browser/chunk-MPK76GVS.mjs +63 -0
- package/dist/browser/{chunk-ZEV26AQ6.mjs → chunk-NVEJJP4R.mjs} +1 -1
- package/dist/browser/{chunk-HKX2G6WH.mjs → chunk-ODQP7P3H.mjs} +455 -66
- package/dist/browser/{chunk-35B42UFM.mjs → chunk-PIS7ZAP7.mjs} +12 -25
- package/dist/browser/{chunk-TCLEOZ4P.mjs → chunk-QMNZFFD3.mjs} +4 -3
- package/dist/browser/{chunk-R4WUDZQV.mjs → chunk-SRL47USS.mjs} +2 -2
- package/dist/browser/chunk-TY7L6OXO.mjs +69 -0
- package/dist/browser/{chunk-MVM33ZUL.mjs → chunk-W643QV3L.mjs} +6 -5
- package/dist/browser/chunk-WXLBZJMT.mjs +25 -0
- package/dist/browser/{chunk-MWUK3DA5.mjs → chunk-XILIT5MT.mjs} +8 -8
- package/dist/browser/{cold-module-MJMKNUYJ.mjs → cold-module-A5S6JFDN.mjs} +20 -20
- package/dist/browser/{durability-wiring-SNOWIT6Z.mjs → durability-wiring-W5AVV3RF.mjs} +120 -80
- package/dist/browser/gzip-5S7ROJFJ.mjs +1 -0
- package/dist/browser/import-PTT63AGK.mjs +12 -0
- package/dist/browser/{module-BUFNZMEU.mjs → module-CEKA7MQH.mjs} +13 -10
- package/dist/browser/module-X5PGOE47.mjs +4288 -0
- package/dist/browser/{phrase-module-HGVBO24W.mjs → phrase-module-CNKMUY4U.mjs} +2 -1
- package/dist/browser/pool-DTYSPBMQ.mjs +296 -0
- package/dist/{restore-queue-FEYAC4SB.mjs → browser/restore-queue-DD4LWZK7.mjs} +2 -2
- package/dist/browser/{runtime-VEUH674B.mjs → runtime-D2ULZGCN.mjs} +3 -2
- package/dist/browser/{snapshot-QXBKHJAG.mjs → snapshot-DQ6A4PQP.mjs} +20 -15
- package/dist/browser/{write-WHFBDWQS.mjs → write-MAGRAIEH.mjs} +14 -11
- package/dist/{capabilities-BCdUwK_L.d.ts → capabilities-BT-HLDC8.d.ts} +3 -3
- package/dist/{chunk-O4LJQI4G.mjs → chunk-2HJWQPR6.mjs} +126 -4
- package/dist/{chunk-Z4HFMYNX.mjs → chunk-3BVGJ4JR.mjs} +36 -13
- package/dist/{chunk-ZPWS2SKJ.mjs → chunk-3HV7M5OJ.mjs} +272 -112
- package/dist/{chunk-UIKN2OTQ.mjs → chunk-3MXV3VHR.mjs} +2 -23
- package/dist/{browser/chunk-CCOAOO73.mjs → chunk-3SBJVQLL.mjs} +2 -2
- package/dist/chunk-3TVDTACC.mjs +104 -0
- package/dist/{chunk-YH5OIL7B.mjs → chunk-5QMHMELB.mjs} +6 -1
- package/dist/{chunk-SBMAWTRG.mjs → chunk-5WB2A3XU.mjs} +84 -15
- package/dist/{chunk-NPNK57CA.mjs → chunk-65WCV5JO.mjs} +1 -1
- package/dist/chunk-6BWLDLS3.mjs +58 -0
- package/dist/{chunk-UUZCQQG2.mjs → chunk-6C5EX2QR.mjs} +3 -3
- package/dist/{chunk-VEFN6X6Q.mjs → chunk-6F6USYII.mjs} +120 -13
- package/dist/{chunk-AST3SHFA.mjs → chunk-7HKWO4BJ.mjs} +7 -7
- package/dist/{chunk-W2COJ5AH.mjs → chunk-7N223GWV.mjs} +2 -2
- package/dist/{chunk-GWOS5DYC.mjs → chunk-ADBS5XRI.mjs} +11 -13
- package/dist/{chunk-TNBIK2LQ.mjs → chunk-AWNHDBKV.mjs} +430 -75
- package/dist/{chunk-ZMBFWQXN.mjs → chunk-B2FTZNNF.mjs} +2 -2
- package/dist/chunk-B7XIOAMK.mjs +100 -0
- package/dist/{chunk-W55X2BYN.mjs → chunk-BEZH7VEH.mjs} +1 -1
- package/dist/{chunk-QSK35UC2.mjs → chunk-BTPGQC6Z.mjs} +3 -11
- package/dist/{chunk-LA4WNDHL.mjs → chunk-CYYSZPVV.mjs} +12 -14
- package/dist/{chunk-SRJBFG2T.mjs → chunk-DOY6EG76.mjs} +6 -7
- package/dist/{chunk-6SNBQESJ.mjs → chunk-F22IOCR2.mjs} +10 -6
- package/dist/{chunk-J6YVB2XM.mjs → chunk-IJPK5PGM.mjs} +1 -1
- package/dist/{chunk-L76W3IZJ.mjs → chunk-IRWP524D.mjs} +1 -1
- package/dist/{chunk-XS2VM7UE.mjs → chunk-IZT3G24Q.mjs} +2 -2
- package/dist/{chunk-NOT5QOHU.mjs → chunk-J7M73VY7.mjs} +1 -1
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/chunk-KAKQ74LS.mjs +53 -0
- package/dist/{chunk-ZSWHPKGM.mjs → chunk-KYVRZAYP.mjs} +69 -2
- package/dist/{chunk-NRUXBYPH.mjs → chunk-KZ5GQE4Z.mjs} +5 -5
- package/dist/{browser/chunk-XNWPP5NS.mjs → chunk-KZQIVGW7.mjs} +2 -2
- package/dist/{chunk-KZL72VTC.mjs → chunk-L7TIAYPX.mjs} +11 -10
- package/dist/{chunk-DD2673TX.mjs → chunk-LDGGR7YT.mjs} +4 -81
- package/dist/{chunk-XZ3SRNDJ.mjs → chunk-LJ4ENXOD.mjs} +77 -16
- package/dist/chunk-LQG5G2LY.mjs +39 -0
- package/dist/{chunk-HNHCNTVG.mjs → chunk-MDF6PDIA.mjs} +11 -0
- package/dist/{chunk-74XB2SXI.mjs → chunk-NVTFQFUL.mjs} +16 -2
- package/dist/{chunk-BOJZGUS6.mjs → chunk-NYSONUB7.mjs} +1 -1
- package/dist/{chunk-WJGO5PGV.mjs → chunk-O4KUNDVF.mjs} +31 -17
- package/dist/{chunk-PWIWSUCX.mjs → chunk-POUYICOU.mjs} +1 -1
- package/dist/{chunk-EBIHRL7B.mjs → chunk-Q2UL2TPC.mjs} +1 -1
- package/dist/{chunk-NJJCPFXN.mjs → chunk-QEYF2SQ6.mjs} +2 -2
- package/dist/{chunk-7AUASRE7.mjs → chunk-QN5WVV5K.mjs} +7 -7
- package/dist/{chunk-RIIUZJQ3.mjs → chunk-QYRNLLLI.mjs} +1 -1
- package/dist/chunk-SOUZMPME.mjs +1635 -0
- package/dist/{chunk-C3YDYX6C.mjs → chunk-T4CJDBBE.mjs} +1 -1
- package/dist/{chunk-YLNSJQLX.mjs → chunk-TTCKT2RT.mjs} +5 -5
- package/dist/{chunk-KEIYVZUX.mjs → chunk-U2726TL5.mjs} +5 -5
- package/dist/{chunk-RKAVHNRW.mjs → chunk-U46IZNCW.mjs} +10 -5
- package/dist/{chunk-BRUUBXCB.mjs → chunk-U6NE6RCV.mjs} +10 -38
- package/dist/{chunk-VJEGOELZ.mjs → chunk-VP6XRMWR.mjs} +4 -4
- package/dist/{chunk-IO5F7ZBE.mjs → chunk-VQDZVWN3.mjs} +874 -413
- package/dist/{chunk-IWVEG5CX.mjs → chunk-XIHUI4KB.mjs} +2 -2
- package/dist/{chunk-YHUTF6EA.mjs → chunk-XKPNKR3V.mjs} +17 -47
- package/dist/{chunk-HJJWY6PT.mjs → chunk-YGQOPB2Z.mjs} +1 -1
- package/dist/chunk-YKEHQUSZ.mjs +248 -0
- package/dist/{chunk-GLZHNSGB.mjs → chunk-ZAYWOHVG.mjs} +1 -1
- package/dist/{chunk-ICW45TTU.mjs → chunk-ZEKDO7YX.mjs} +2 -2
- package/dist/chunk-ZXNNR73R.mjs +31 -0
- package/dist/{chunk-VJS4JFBQ.mjs → chunk-ZXX5GZEX.mjs} +3 -1
- package/dist/{chunk-RHKRTYGO.mjs → chunk-ZYKUD5NX.mjs} +9 -7
- package/dist/{client-B12YFALP.d.ts → client-Cn3gNxUU.d.ts} +62 -5
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +46 -0
- package/dist/{cold-module-4X7WJCFM.mjs → cold-module-2WWGBFJC.mjs} +43 -49
- package/dist/{config-CIG5yDyg.d.ts → config-CfhH1IWQ.d.ts} +150 -3
- package/dist/{config-BhZxIeb1.d.ts → config-aIsy7mcL.d.ts} +63 -3
- package/dist/direct-executor-QLVHMELJ.mjs +24 -0
- package/dist/distribution/coordinator/etcd.d.ts +3 -3
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +16116 -14537
- package/dist/{durability-wiring-324D2DDD.mjs → durability-wiring-GNWQSZI3.mjs} +142 -109
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CtzbHOmG.d.ts → engine-CJRUHXgf.d.ts} +3 -3
- package/dist/gzip-F4HMIEEQ.mjs +1 -0
- package/dist/import-DX55PN4G.mjs +41 -0
- package/dist/{index-DsEurhSl.d.ts → index-MsF7e5hL.d.ts} +2 -2
- package/dist/index.browser.mjs +7 -4
- package/dist/index.d.ts +542 -8
- package/dist/index.mjs +29 -32
- package/dist/index.react-native.mjs +19 -0
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/{long-query-thread-4SW7RWDE.mjs → long-query-thread-SCUE62TO.mjs} +23 -25
- package/dist/{module-DXSJ5LT2.mjs → module-HW6IXUM6.mjs} +603 -112
- package/dist/module-V5K4ZP23.mjs +45 -0
- package/dist/{paged-partition-archive-HFP45PLU.mjs → paged-partition-archive-FDIIWZNR.mjs} +42 -41
- package/dist/partial-words.mjs +7 -9
- package/dist/pattern.mjs +4 -6
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +36 -39
- package/dist/{phrase-module-5QHBD2VJ.mjs → phrase-module-OUQIRUQU.mjs} +1 -1
- package/dist/pool-UPV5PVPY.mjs +298 -0
- package/dist/react-native/chunks/analysis-change-HGW3L6NY.mjs +893 -0
- package/dist/react-native/chunks/analysis-change-entry-BNRU6STO.mjs +1 -0
- package/dist/react-native/chunks/chunk-2J2727V4.mjs +495 -0
- package/dist/react-native/chunks/chunk-3CTWSQRW.mjs +1251 -0
- package/dist/react-native/chunks/chunk-5FV4ZEVA.mjs +2619 -0
- package/dist/react-native/chunks/chunk-7VWQLEFV.mjs +642 -0
- package/dist/react-native/chunks/chunk-AAAETEJK.mjs +27 -0
- package/dist/react-native/chunks/chunk-AM7RSBPF.mjs +32 -0
- package/dist/react-native/chunks/chunk-B6OD63Z3.mjs +997 -0
- package/dist/react-native/chunks/chunk-BRNAVOKP.mjs +177 -0
- package/dist/react-native/chunks/chunk-DKJTZ625.mjs +207 -0
- package/dist/react-native/chunks/chunk-FKGG4UOF.mjs +177 -0
- package/dist/{browser/chunk-6RHTAVZX.mjs → react-native/chunks/chunk-GV5KFQ6M.mjs} +38 -15
- package/dist/react-native/chunks/chunk-HURV3ASY.mjs +4416 -0
- package/dist/react-native/chunks/chunk-IO2SMUQD.mjs +10 -0
- package/dist/react-native/chunks/chunk-JV6VQY2S.mjs +17 -0
- package/dist/react-native/chunks/chunk-KUJOBRKS.mjs +217 -0
- package/dist/react-native/chunks/chunk-KWRW5U65.mjs +226 -0
- package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +110 -0
- package/dist/react-native/chunks/chunk-LQ6Q4L5B.mjs +360 -0
- package/dist/react-native/chunks/chunk-LQAKO5QV.mjs +523 -0
- package/dist/react-native/chunks/chunk-LRGWK367.mjs +11 -0
- package/dist/react-native/chunks/chunk-LVIKKAA6.mjs +93 -0
- package/dist/react-native/chunks/chunk-NFGBOI46.mjs +14 -0
- package/dist/react-native/chunks/chunk-NNE4VDMM.mjs +8 -0
- package/dist/react-native/chunks/chunk-PPEPTUVV.mjs +56 -0
- package/dist/react-native/chunks/chunk-PSWKQVVT.mjs +9 -0
- package/dist/{chunk-KGOXHLLZ.mjs → react-native/chunks/chunk-PU55IOG4.mjs} +228 -11
- package/dist/react-native/chunks/chunk-QC4ZRBSX.mjs +270 -0
- package/dist/react-native/chunks/chunk-R4EEMYM6.mjs +21 -0
- package/dist/react-native/chunks/chunk-R4OPUZQ5.mjs +86 -0
- package/dist/react-native/chunks/chunk-SLGIAD6B.mjs +2634 -0
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +25 -0
- package/dist/react-native/chunks/chunk-TLYD7IJ2.mjs +23 -0
- package/dist/react-native/chunks/chunk-UFNCLEQM.mjs +73 -0
- package/dist/react-native/chunks/chunk-YH7W556M.mjs +179 -0
- package/dist/react-native/chunks/chunk-YJSMEKRE.mjs +22385 -0
- package/dist/react-native/chunks/chunk-ZCKNBPQ4.mjs +79 -0
- package/dist/react-native/chunks/cold-module-TSFWLYWC.mjs +755 -0
- package/dist/react-native/chunks/durability-wiring-PZR6KOQK.mjs +4509 -0
- package/dist/react-native/chunks/gzip.react-native-7JWCLVOB.mjs +3 -0
- package/dist/react-native/chunks/import-VTODLPLO.mjs +22 -0
- package/dist/{browser/module-BVP4TKZU.mjs → react-native/chunks/module-JBBH6PZH.mjs} +671 -146
- package/dist/react-native/chunks/module-VEK2KCKU.mjs +25 -0
- package/dist/react-native/chunks/phrase-module-76UAPPSG.mjs +329 -0
- package/dist/react-native/chunks/pool-CD4ANYUI.mjs +296 -0
- package/dist/react-native/chunks/release-D7ZTIANM.mjs +33 -0
- package/dist/react-native/chunks/replace-IMZUVUOE.mjs +57 -0
- package/dist/{browser/restore-queue-ONYNYUDE.mjs → react-native/chunks/restore-queue-OI5EH7R3.mjs} +2 -2
- package/dist/react-native/chunks/runtime-3MCDLJAF.mjs +559 -0
- package/dist/react-native/chunks/snapshot-AUZMEV36.mjs +1205 -0
- package/dist/react-native/chunks/write-DDC2QBRJ.mjs +197 -0
- package/dist/{chunk-DQNKVOJ2.mjs → react-native/partial-words.mjs} +13 -228
- package/dist/react-native/pattern.mjs +2442 -0
- package/dist/react-native/synonyms.mjs +460 -0
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +11 -0
- package/dist/{rerank-KTLC3E6N.mjs → rerank-3W54N6P2.mjs} +4 -4
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-queue-BQWWNNQI.mjs +41 -0
- package/dist/{runtime-DYV75DCB.mjs → runtime-L2DZYY6N.mjs} +5 -5
- package/dist/{schema-B-Runv0n.d.ts → schema-D33CyXCy.d.ts} +1 -1
- package/dist/server.d.ts +24 -12
- package/dist/server.mjs +159 -38
- package/dist/{snapshot-CGM65VCD.mjs → snapshot-EHXTOTW5.mjs} +47 -50
- package/dist/synonyms.mjs +3 -4
- package/dist/{tasks-CjRJRGTb.d.ts → tasks-C4ElXr4P.d.ts} +59 -7
- package/dist/thread-I7DVHHW7.mjs +31 -0
- package/dist/vector/search-worker.d.ts +2 -2
- package/dist/vector/search-worker.mjs +8 -7
- package/dist/workers/entry.mjs +9 -9
- package/dist/{write-2DZPEQL2.mjs → write-SDJXXQ2G.mjs} +36 -39
- package/openapi.json +349 -2
- package/package.json +108 -8
- package/dist/analysis-change-HQUT2Z3I.mjs +0 -43
- package/dist/browser/import-TLB2A5LJ.mjs +0 -9
- package/dist/chunk-5WYVUPGD.mjs +0 -427
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-N37VMC62.mjs +0 -18
- package/dist/chunk-WNBRW4Q2.mjs +0 -128
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-ZATRDAYU.mjs +0 -160
- package/dist/direct-executor-7XOQ7VQP.mjs +0 -28
- package/dist/import-OOBUW3RR.mjs +0 -44
- package/dist/module-IYPLWHGC.mjs +0 -48
- package/dist/thread-KGNAIKPD.mjs +0 -33
- /package/dist/{chunk-22YPZVMG.mjs → chunk-ZXNQEW43.mjs} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { requireBucket, objectKeyPrefix, objectStoreFailure, requireObjectKey, refuseOversizedObject, requireStreamLength, countedChunks, readWhole, partsOf } from '../chunk-3TVDTACC.mjs';
|
|
2
|
+
import '../chunk-U476IXKQ.mjs';
|
|
3
|
+
import { OBJECT_STORE_LIST_PAGE_KEYS, OBJECT_STORE_CONFLICT_ATTEMPTS, OBJECT_STORE_CONFLICT_RETRY_MS, OBJECT_STORE_PART_BYTES } from '../chunk-K5HSUPYS.mjs';
|
|
4
|
+
import { ErrorCodes, NarsilError } from '../chunk-MDF6PDIA.mjs';
|
|
5
|
+
|
|
6
|
+
// src/persistence/s3.ts
|
|
7
|
+
var S3_NOT_FOUND_STATUS = 404;
|
|
8
|
+
var S3_PRECONDITION_FAILED_STATUS = 412;
|
|
9
|
+
var S3_CONFLICT_STATUS = 409;
|
|
10
|
+
async function loadS3Module() {
|
|
11
|
+
try {
|
|
12
|
+
return await import('@aws-sdk/client-s3');
|
|
13
|
+
} catch (err) {
|
|
14
|
+
throw new NarsilError(
|
|
15
|
+
ErrorCodes.PERSISTENCE_DEPENDENCY_MISSING,
|
|
16
|
+
"The `@aws-sdk/client-s3` package is not installed. Install it with `pnpm add @aws-sdk/client-s3` (or the npm or yarn equivalent) to use createS3Persistence.",
|
|
17
|
+
{ cause: err instanceof Error ? err.message : String(err) }
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function isNotFound(error) {
|
|
22
|
+
if (typeof error !== "object" || error === null) return false;
|
|
23
|
+
const named = error;
|
|
24
|
+
return named.name === "NoSuchKey" || named.name === "NotFound" || named.$metadata?.httpStatusCode === S3_NOT_FOUND_STATUS;
|
|
25
|
+
}
|
|
26
|
+
function statusCodeOf(error) {
|
|
27
|
+
if (typeof error !== "object" || error === null) return void 0;
|
|
28
|
+
return error.$metadata?.httpStatusCode;
|
|
29
|
+
}
|
|
30
|
+
function isPreconditionFailed(error) {
|
|
31
|
+
return statusCodeOf(error) === S3_PRECONDITION_FAILED_STATUS;
|
|
32
|
+
}
|
|
33
|
+
function discardBody(body) {
|
|
34
|
+
if (typeof body === "object" && body !== null && "destroy" in body && typeof body.destroy === "function") {
|
|
35
|
+
body.destroy();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function uploadParts(target, parts, first) {
|
|
39
|
+
const { sdk, client, bucket, objectKey } = target;
|
|
40
|
+
const created = await client.send(new sdk.CreateMultipartUploadCommand({ Bucket: bucket, Key: objectKey }));
|
|
41
|
+
const uploadId = created.UploadId;
|
|
42
|
+
if (uploadId === void 0) {
|
|
43
|
+
throw new NarsilError(
|
|
44
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
45
|
+
`The object store started a multipart upload of "${objectKey}" without an upload ID`,
|
|
46
|
+
{ key: objectKey }
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const completed = [];
|
|
51
|
+
let part = first;
|
|
52
|
+
while (part !== void 0) {
|
|
53
|
+
const PartNumber = completed.length + 1;
|
|
54
|
+
const sent = await client.send(
|
|
55
|
+
new sdk.UploadPartCommand({
|
|
56
|
+
Bucket: bucket,
|
|
57
|
+
Key: objectKey,
|
|
58
|
+
UploadId: uploadId,
|
|
59
|
+
PartNumber,
|
|
60
|
+
Body: part,
|
|
61
|
+
ContentLength: part.byteLength
|
|
62
|
+
})
|
|
63
|
+
);
|
|
64
|
+
completed.push({ ETag: sent.ETag, PartNumber });
|
|
65
|
+
const next = await parts.next();
|
|
66
|
+
part = next.done === true ? void 0 : next.value;
|
|
67
|
+
}
|
|
68
|
+
await client.send(
|
|
69
|
+
new sdk.CompleteMultipartUploadCommand({
|
|
70
|
+
Bucket: bucket,
|
|
71
|
+
Key: objectKey,
|
|
72
|
+
UploadId: uploadId,
|
|
73
|
+
MultipartUpload: { Parts: completed }
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
await client.send(new sdk.AbortMultipartUploadCommand({ Bucket: bucket, Key: objectKey, UploadId: uploadId })).catch(() => void 0);
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function saveObjectStream(target, key, data, length) {
|
|
82
|
+
requireStreamLength(key, length);
|
|
83
|
+
const counted = countedChunks(key, data, length);
|
|
84
|
+
if (length <= OBJECT_STORE_PART_BYTES) {
|
|
85
|
+
const body = await readWhole(counted, length);
|
|
86
|
+
await target.client.send(
|
|
87
|
+
new target.sdk.PutObjectCommand({
|
|
88
|
+
Bucket: target.bucket,
|
|
89
|
+
Key: target.objectKey,
|
|
90
|
+
Body: body,
|
|
91
|
+
ContentLength: length
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const parts = partsOf(counted, OBJECT_STORE_PART_BYTES)[Symbol.asyncIterator]();
|
|
97
|
+
const first = await parts.next();
|
|
98
|
+
if (first.done === true) {
|
|
99
|
+
throw new NarsilError(ErrorCodes.PERSISTENCE_SAVE_FAILED, `The stream for "${key}" ended before its first part`, {
|
|
100
|
+
key
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
await uploadParts(target, parts, first.value);
|
|
104
|
+
}
|
|
105
|
+
async function* bodyChunks(body) {
|
|
106
|
+
const reader = body.transformToWebStream().getReader();
|
|
107
|
+
try {
|
|
108
|
+
for (; ; ) {
|
|
109
|
+
const step = await reader.read();
|
|
110
|
+
if (step.done) return;
|
|
111
|
+
yield step.value;
|
|
112
|
+
}
|
|
113
|
+
} finally {
|
|
114
|
+
await reader.cancel().catch(() => void 0);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async function* failingAs(key, chunks) {
|
|
118
|
+
try {
|
|
119
|
+
yield* chunks;
|
|
120
|
+
} catch (error) {
|
|
121
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_LOAD_FAILED, "load", key, error);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function createS3Persistence(config) {
|
|
125
|
+
const bucket = requireBucket(config.bucket, "S3");
|
|
126
|
+
const root = objectKeyPrefix(config.keyPrefix, "S3");
|
|
127
|
+
const sdk = await loadS3Module();
|
|
128
|
+
const client = new sdk.S3Client({
|
|
129
|
+
...config.region === void 0 ? {} : { region: config.region },
|
|
130
|
+
...config.endpoint === void 0 ? {} : { endpoint: config.endpoint },
|
|
131
|
+
...config.forcePathStyle === void 0 ? {} : { forcePathStyle: config.forcePathStyle },
|
|
132
|
+
...config.credentials === void 0 ? {} : { credentials: config.credentials },
|
|
133
|
+
...config.maxAttempts === void 0 ? {} : { maxAttempts: config.maxAttempts }
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
async save(key, data) {
|
|
137
|
+
requireObjectKey(key);
|
|
138
|
+
try {
|
|
139
|
+
await client.send(
|
|
140
|
+
new sdk.PutObjectCommand({
|
|
141
|
+
Bucket: bucket,
|
|
142
|
+
Key: `${root}${key}`,
|
|
143
|
+
Body: data,
|
|
144
|
+
ContentLength: data.byteLength
|
|
145
|
+
})
|
|
146
|
+
);
|
|
147
|
+
} catch (error) {
|
|
148
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_SAVE_FAILED, "save", key, error);
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
async saveIfAbsent(key, data) {
|
|
152
|
+
requireObjectKey(key);
|
|
153
|
+
for (let attempt = 1; ; attempt++) {
|
|
154
|
+
try {
|
|
155
|
+
await client.send(
|
|
156
|
+
new sdk.PutObjectCommand({
|
|
157
|
+
Bucket: bucket,
|
|
158
|
+
Key: `${root}${key}`,
|
|
159
|
+
Body: data,
|
|
160
|
+
ContentLength: data.byteLength,
|
|
161
|
+
IfNoneMatch: "*"
|
|
162
|
+
})
|
|
163
|
+
);
|
|
164
|
+
return true;
|
|
165
|
+
} catch (error) {
|
|
166
|
+
if (isPreconditionFailed(error)) return false;
|
|
167
|
+
if (statusCodeOf(error) !== S3_CONFLICT_STATUS || attempt >= OBJECT_STORE_CONFLICT_ATTEMPTS) {
|
|
168
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_SAVE_FAILED, "save", key, error);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
await new Promise((resolve) => setTimeout(resolve, OBJECT_STORE_CONFLICT_RETRY_MS * attempt));
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
async load(key) {
|
|
175
|
+
requireObjectKey(key);
|
|
176
|
+
try {
|
|
177
|
+
const object = await client.send(new sdk.GetObjectCommand({ Bucket: bucket, Key: `${root}${key}` }));
|
|
178
|
+
try {
|
|
179
|
+
refuseOversizedObject(key, object.ContentLength ?? 0);
|
|
180
|
+
} catch (error) {
|
|
181
|
+
discardBody(object.Body);
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
if (object.Body === void 0) return new Uint8Array(0);
|
|
185
|
+
const bytes = await object.Body.transformToByteArray();
|
|
186
|
+
refuseOversizedObject(key, bytes.byteLength);
|
|
187
|
+
return bytes;
|
|
188
|
+
} catch (error) {
|
|
189
|
+
if (isNotFound(error)) return null;
|
|
190
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_LOAD_FAILED, "load", key, error);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
async saveStream(key, data, length) {
|
|
194
|
+
requireObjectKey(key);
|
|
195
|
+
try {
|
|
196
|
+
await saveObjectStream({ sdk, client, bucket, objectKey: `${root}${key}` }, key, data, length);
|
|
197
|
+
} catch (error) {
|
|
198
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_SAVE_FAILED, "save", key, error);
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
async loadStream(key) {
|
|
202
|
+
requireObjectKey(key);
|
|
203
|
+
try {
|
|
204
|
+
const object = await client.send(new sdk.GetObjectCommand({ Bucket: bucket, Key: `${root}${key}` }));
|
|
205
|
+
try {
|
|
206
|
+
refuseOversizedObject(key, object.ContentLength ?? 0);
|
|
207
|
+
} catch (error) {
|
|
208
|
+
discardBody(object.Body);
|
|
209
|
+
throw error;
|
|
210
|
+
}
|
|
211
|
+
const body = object.Body;
|
|
212
|
+
if (body === void 0) return failingAs(key, []);
|
|
213
|
+
return failingAs(key, bodyChunks(body));
|
|
214
|
+
} catch (error) {
|
|
215
|
+
if (isNotFound(error)) return null;
|
|
216
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_LOAD_FAILED, "load", key, error);
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
async delete(key) {
|
|
220
|
+
requireObjectKey(key);
|
|
221
|
+
const objectKey = `${root}${key}`;
|
|
222
|
+
try {
|
|
223
|
+
const head = await client.send(new sdk.HeadObjectCommand({ Bucket: bucket, Key: objectKey }));
|
|
224
|
+
if (head.ETag === void 0) {
|
|
225
|
+
throw new NarsilError(
|
|
226
|
+
ErrorCodes.PERSISTENCE_DELETE_FAILED,
|
|
227
|
+
`The store reported no ETag for "${key}", so the adapter deletes nothing`,
|
|
228
|
+
{ key }
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
await client.send(new sdk.DeleteObjectCommand({ Bucket: bucket, Key: objectKey, IfMatch: head.ETag }));
|
|
232
|
+
} catch (error) {
|
|
233
|
+
if (isNotFound(error) || isPreconditionFailed(error)) return;
|
|
234
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_DELETE_FAILED, "delete", key, error);
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
async list(prefix) {
|
|
238
|
+
const keys = [];
|
|
239
|
+
let continuationToken;
|
|
240
|
+
try {
|
|
241
|
+
do {
|
|
242
|
+
const page = await client.send(
|
|
243
|
+
new sdk.ListObjectsV2Command({
|
|
244
|
+
Bucket: bucket,
|
|
245
|
+
Prefix: `${root}${prefix}`,
|
|
246
|
+
MaxKeys: OBJECT_STORE_LIST_PAGE_KEYS,
|
|
247
|
+
...continuationToken === void 0 ? {} : { ContinuationToken: continuationToken }
|
|
248
|
+
})
|
|
249
|
+
);
|
|
250
|
+
for (const object of page.Contents ?? []) {
|
|
251
|
+
if (object.Key?.startsWith(root) === true) keys.push(object.Key.slice(root.length));
|
|
252
|
+
}
|
|
253
|
+
continuationToken = page.IsTruncated === true ? page.NextContinuationToken : void 0;
|
|
254
|
+
} while (continuationToken !== void 0);
|
|
255
|
+
} catch (error) {
|
|
256
|
+
throw objectStoreFailure(ErrorCodes.PERSISTENCE_LOAD_FAILED, "list the keys under", prefix, error);
|
|
257
|
+
}
|
|
258
|
+
return keys;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export { createS3Persistence };
|
|
@@ -36,6 +36,39 @@ interface PersistenceAdapter {
|
|
|
36
36
|
* @returns Every matching key, in any order.
|
|
37
37
|
*/
|
|
38
38
|
list(prefix: string): Promise<string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Writes the bytes that `data` yields under `key` without holding the whole file in memory, replacing whatever the
|
|
41
|
+
* key held. A failed or short stream leaves the previous value in place. Offer it for a store that holds large
|
|
42
|
+
* files, because a cluster backup streams each file through it.
|
|
43
|
+
*
|
|
44
|
+
* @param key - The key that a later {@link PersistenceAdapter.load} reads.
|
|
45
|
+
* @param data - The bytes to store, in order.
|
|
46
|
+
* @param length - The number of bytes that `data` yields.
|
|
47
|
+
* @throws A `NarsilError` with `PERSISTENCE_SAVE_FAILED` when `data` yields more or fewer than `length` bytes, or
|
|
48
|
+
* when the store refuses the write.
|
|
49
|
+
*/
|
|
50
|
+
saveStream?(key: string, data: AsyncIterable<Uint8Array>, length: number): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Reads the bytes stored under `key` in order, without holding the whole file in memory.
|
|
53
|
+
*
|
|
54
|
+
* @param key - The key that a matching save wrote.
|
|
55
|
+
* @returns The stored bytes in chunks, or `null` when the key holds nothing.
|
|
56
|
+
* @throws A `NarsilError` with `PERSISTENCE_LOAD_FAILED` when the store fails the read.
|
|
57
|
+
*/
|
|
58
|
+
loadStream?(key: string): Promise<AsyncIterable<Uint8Array> | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Stores `data` under `key` only where the key holds nothing, as one atomic step, so that where several calls race on
|
|
61
|
+
* an absent key, exactly one returns `true`. A cluster backup store must offer it, because the cluster claims its key
|
|
62
|
+
* prefix with it.
|
|
63
|
+
*
|
|
64
|
+
* @param key - The key to fill.
|
|
65
|
+
* @param data - The bytes to store.
|
|
66
|
+
* @returns `true` where this call stored `data`, and `false` where the key already held a value. A retry after a lost
|
|
67
|
+
* response can return `false` for bytes that the earlier attempt stored, so load the key and compare where you need to
|
|
68
|
+
* know whose bytes it holds.
|
|
69
|
+
* @throws A `NarsilError` with `PERSISTENCE_SAVE_FAILED` when the store refuses the write.
|
|
70
|
+
*/
|
|
71
|
+
saveIfAbsent?(key: string, data: Uint8Array): Promise<boolean>;
|
|
39
72
|
/** This adapter writes to this directory, when a filesystem backs it. */
|
|
40
73
|
readonly directory?: string;
|
|
41
74
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { abandonAnalysisChange, adoptSavedAnalysis, buildHeldAnalysisChange, changeIndexAnalysis, dropHeldAnalysisChange, executeRebalance, heldAnalysisIsBuilt, holdsNamedSettings, releaseHeldAnalysisChange, resumeAnalysisChange, stampAnalysisGeneration } from './chunk-DOY6EG76.mjs';
|
|
2
|
+
import './chunk-VP6XRMWR.mjs';
|
|
3
|
+
import './chunk-VQDZVWN3.mjs';
|
|
4
|
+
import './chunk-6F6USYII.mjs';
|
|
5
|
+
import './chunk-O4KUNDVF.mjs';
|
|
6
|
+
import './chunk-3HV7M5OJ.mjs';
|
|
7
|
+
import './chunk-KAKQ74LS.mjs';
|
|
8
|
+
import './chunk-HJSN7UYG.mjs';
|
|
9
|
+
import './chunk-6BWLDLS3.mjs';
|
|
10
|
+
import './chunk-XIHUI4KB.mjs';
|
|
11
|
+
import './chunk-Q2UL2TPC.mjs';
|
|
12
|
+
import './chunk-3MXV3VHR.mjs';
|
|
13
|
+
import './chunk-EEBCDP36.mjs';
|
|
14
|
+
import './chunk-2HJWQPR6.mjs';
|
|
15
|
+
import './chunk-X5CV2E2B.mjs';
|
|
16
|
+
import './chunk-TGP5M5R7.mjs';
|
|
17
|
+
import './chunk-U2BKYEC7.mjs';
|
|
18
|
+
import './chunk-ZAYWOHVG.mjs';
|
|
19
|
+
import './chunk-QHPYS427.mjs';
|
|
20
|
+
import './chunk-QYRNLLLI.mjs';
|
|
21
|
+
import './chunk-ZXNQEW43.mjs';
|
|
22
|
+
import './chunk-KOKM4PQN.mjs';
|
|
23
|
+
import './chunk-NVTFQFUL.mjs';
|
|
24
|
+
import './chunk-LQG5G2LY.mjs';
|
|
25
|
+
import './chunk-BTPGQC6Z.mjs';
|
|
26
|
+
import './chunk-RFBLQLLZ.mjs';
|
|
27
|
+
import './chunk-U46IZNCW.mjs';
|
|
28
|
+
import './chunk-JUKYYXSP.mjs';
|
|
29
|
+
import './chunk-SOUZMPME.mjs';
|
|
30
|
+
import './chunk-FQBFZAWG.mjs';
|
|
31
|
+
import './chunk-65WCV5JO.mjs';
|
|
32
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
33
|
+
import './chunk-ZXX5GZEX.mjs';
|
|
34
|
+
import './chunk-KYVRZAYP.mjs';
|
|
35
|
+
import './chunk-L5ORED7V.mjs';
|
|
36
|
+
import './chunk-U476IXKQ.mjs';
|
|
37
|
+
import './chunk-MDF6PDIA.mjs';
|
|
38
|
+
import './chunk-R6A773WK.mjs';
|
|
39
|
+
import './chunk-YTJCGKM4.mjs';
|
package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-YN3ELL6C.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-
|
|
1
|
+
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-KZQIVGW7.mjs';
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { requireAnalysisRebuildMemory } from './chunk-
|
|
2
|
-
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, emitEngineEvent, reconstructSchemaFromMetadata, getLanguage, resolveIndexAnalysis, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createPartitionIndex, REBALANCE_CHUNK_SIZE, yieldToEventLoop, prepareDocumentVectors, removeDocumentVectors, insertDocumentVectors, vectorsEqual, rebuildTextIndexes, textRebuildTargetOf, extractVectorFromDoc, deleteNestedValue, ARRAY_POSITION_GAP } from './chunk-
|
|
1
|
+
import { requireAnalysisRebuildMemory } from './chunk-SRL47USS.mjs';
|
|
2
|
+
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, emitEngineEvent, reconstructSchemaFromMetadata, getLanguage, resolveIndexAnalysis, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createPartitionIndex, REBALANCE_CHUNK_SIZE, yieldToEventLoop, prepareDocumentVectors, removeDocumentVectors, insertDocumentVectors, vectorsEqual, rebuildTextIndexes, textRebuildTargetOf, extractVectorFromDoc, deleteNestedValue, ARRAY_POSITION_GAP } from './chunk-BVX2MEHA.mjs';
|
|
3
|
+
import './chunk-MPK76GVS.mjs';
|
|
3
4
|
import './chunk-JPTQZWJQ.mjs';
|
|
4
5
|
import './chunk-26A5JFT2.mjs';
|
|
5
6
|
import './chunk-OIZS5KIX.mjs';
|
|
6
|
-
import { compareCodePoints } from './chunk-
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import { compareCodePoints } from './chunk-IAXZAVYL.mjs';
|
|
8
|
+
import './chunk-TY7L6OXO.mjs';
|
|
9
|
+
import { ANALYSIS_CHANGE_MEMBERS, ANALYSIS_HOLD_APPLY_INTERVAL_MS } from './chunk-4RD3AFSB.mjs';
|
|
10
|
+
import './chunk-WXLBZJMT.mjs';
|
|
11
|
+
import { NarsilError, ErrorCodes } from './chunk-PIS7ZAP7.mjs';
|
|
9
12
|
|
|
10
13
|
// src/engine/analysis-change/pending-target.ts
|
|
11
14
|
function configUnderAnalysis(base, language, tokenizer, stopWords) {
|
package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-H3YIOLXZ.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-
|
|
1
|
+
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-4DYLCICG.mjs';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { chunksOf, restoredConfigFields, restoredEmbedding } from './chunk-
|
|
2
|
-
import { untagDocumentLine } from './chunk-
|
|
3
|
-
import { flattenSchema, requireConfigurationShape } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { chunksOf, restoredConfigFields, restoredEmbedding } from './chunk-NVEJJP4R.mjs';
|
|
2
|
+
import { untagDocumentLine } from './chunk-5V74FFZE.mjs';
|
|
3
|
+
import { flattenSchema, requireConfigurationShape } from './chunk-BVX2MEHA.mjs';
|
|
4
|
+
import { turnsAreBudgeted, turnIsSpent, yieldTurn } from './chunk-IAXZAVYL.mjs';
|
|
5
|
+
import { MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_IMPORT_REFUSALS_REPORTED } from './chunk-4RD3AFSB.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-PIS7ZAP7.mjs';
|
|
6
7
|
|
|
7
8
|
// src/engine/export/lines.ts
|
|
8
9
|
var NEWLINE = 10;
|
|
@@ -203,7 +204,10 @@ async function readDocumentExport(engine, indexName, source) {
|
|
|
203
204
|
result: { imported: 0, refusedCount: 0, refused: [] },
|
|
204
205
|
highestReported: 0
|
|
205
206
|
};
|
|
206
|
-
for await (const entry of lines)
|
|
207
|
+
for await (const entry of lines) {
|
|
208
|
+
await takeLine(state, entry);
|
|
209
|
+
if (turnsAreBudgeted && turnIsSpent()) await yieldTurn();
|
|
210
|
+
}
|
|
207
211
|
await flush(state);
|
|
208
212
|
state.result.refused.sort((a, b) => a.line - b.line);
|
|
209
213
|
return state.result;
|
|
@@ -4,14 +4,14 @@ function holdsChangeWork(entry) {
|
|
|
4
4
|
}
|
|
5
5
|
async function abandonChangeOf(core, indexName) {
|
|
6
6
|
if (!holdsChangeWork(core.indexRegistry.get(indexName))) return;
|
|
7
|
-
const { abandonAnalysisChange } = await import('./analysis-change-
|
|
7
|
+
const { abandonAnalysisChange } = await import('./analysis-change-M65AZQQG.mjs');
|
|
8
8
|
await abandonAnalysisChange(core, indexName);
|
|
9
9
|
}
|
|
10
10
|
async function resumeChangeOf(core, indexName) {
|
|
11
11
|
if ((core.indexRegistry.get(indexName)?.pendingAnalysis ?? null) === null) return;
|
|
12
12
|
if (core.mutationCtx.capacityScope === "partition") return;
|
|
13
13
|
if (core.executor.getManager(indexName) === void 0) return;
|
|
14
|
-
const { resumeAnalysisChange } = await import('./analysis-change-
|
|
14
|
+
const { resumeAnalysisChange } = await import('./analysis-change-M65AZQQG.mjs');
|
|
15
15
|
void resumeAnalysisChange(core, indexName).catch(() => void 0);
|
|
16
16
|
}
|
|
17
17
|
async function resumeEveryChange(core) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-BVX2MEHA.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-PIS7ZAP7.mjs';
|
|
3
3
|
|
|
4
4
|
// src/serialization/base64.ts
|
|
5
5
|
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND } from './chunk-5V74FFZE.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-PIS7ZAP7.mjs';
|
|
3
3
|
|
|
4
4
|
// src/engine/export/json-line.ts
|
|
5
5
|
function refuse(path, kind, docId) {
|