7zip-native 0.0.6 → 0.0.8

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.
Files changed (305) hide show
  1. package/README.md +83 -12
  2. package/bench/folder-concurrency.mts +192 -0
  3. package/dist/index.cjs +229 -21
  4. package/dist/index.d.cts +19 -2
  5. package/dist/index.d.mts +19 -2
  6. package/dist/index.d.ts +19 -2
  7. package/dist/index.mjs +219 -11
  8. package/native/addon.cpp +470 -0
  9. package/package.json +4 -3
  10. package/prebuilds/darwin-arm64/7zip_native.node +0 -0
  11. package/prebuilds/darwin-x64/7zip_native.node +0 -0
  12. package/prebuilds/linux-arm/7zip_native.node +0 -0
  13. package/prebuilds/linux-arm64/7zip_native.node +0 -0
  14. package/prebuilds/linux-ia32/7zip_native.node +0 -0
  15. package/prebuilds/linux-x64/7zip_native.node +0 -0
  16. package/prebuilds/win32-arm64/7z.dll +0 -0
  17. package/prebuilds/win32-arm64/7zip_native.node +0 -0
  18. package/prebuilds/win32-x64/7z.dll +0 -0
  19. package/prebuilds/win32-x64/7zip_native.node +0 -0
  20. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7z.so +0 -0
  21. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zAes.o +0 -0
  22. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zAesRegister.o +0 -0
  23. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zBuf2.o +0 -0
  24. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCompressionMode.o +0 -0
  25. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCrc.o +0 -0
  26. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCrcOpt.o +0 -0
  27. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zDecode.o +0 -0
  28. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zEncode.o +0 -0
  29. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zExtract.o +0 -0
  30. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zFolderInStream.o +0 -0
  31. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHandler.o +0 -0
  32. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHandlerOut.o +0 -0
  33. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHeader.o +0 -0
  34. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zIn.o +0 -0
  35. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zOut.o +0 -0
  36. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zProperties.o +0 -0
  37. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zRegister.o +0 -0
  38. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zSpecStream.o +0 -0
  39. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zStream.o +0 -0
  40. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zUpdate.o +0 -0
  41. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Aes.o +0 -0
  42. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/AesOpt.o +0 -0
  43. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Alloc.o +0 -0
  44. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ApfsHandler.o +0 -0
  45. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ApmHandler.o +0 -0
  46. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArHandler.o +0 -0
  47. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArchiveExports.o +0 -0
  48. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArjHandler.o +0 -0
  49. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Crc.o +0 -0
  50. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Decoder.o +0 -0
  51. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Encoder.o +0 -0
  52. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Register.o +0 -0
  53. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Base64Handler.o +0 -0
  54. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2.o +0 -0
  55. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Coder.o +0 -0
  56. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Enc.o +0 -0
  57. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Register.o +0 -0
  58. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BcjCoder.o +0 -0
  59. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BcjRegister.o +0 -0
  60. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BitlDecoder.o +0 -0
  61. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Blake2s.o +0 -0
  62. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bra.o +0 -0
  63. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bra86.o +0 -0
  64. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BraIA64.o +0 -0
  65. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BranchMisc.o +0 -0
  66. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BranchRegister.o +0 -0
  67. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BwtSort.o +0 -0
  68. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ByteSwap.o +0 -0
  69. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bz2Handler.o +0 -0
  70. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CRC.o +0 -0
  71. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CWrappers.o +0 -0
  72. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabBlockInStream.o +0 -0
  73. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabHandler.o +0 -0
  74. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabHeader.o +0 -0
  75. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabIn.o +0 -0
  76. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabRegister.o +0 -0
  77. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ChmHandler.o +0 -0
  78. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ChmIn.o +0 -0
  79. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CodecExports.o +0 -0
  80. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CoderMixer2.o +0 -0
  81. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ComHandler.o +0 -0
  82. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CopyCoder.o +0 -0
  83. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CopyRegister.o +0 -0
  84. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CpioHandler.o +0 -0
  85. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CpuArch.o +0 -0
  86. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CramfsHandler.o +0 -0
  87. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CrcReg.o +0 -0
  88. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CreateCoder.o +0 -0
  89. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Deflate64Register.o +0 -0
  90. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateDecoder.o +0 -0
  91. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateEncoder.o +0 -0
  92. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateProps.o +0 -0
  93. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateRegister.o +0 -0
  94. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Delta.o +0 -0
  95. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeltaFilter.o +0 -0
  96. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DllExports2.o +0 -0
  97. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DmgHandler.o +0 -0
  98. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DummyOutStream.o +0 -0
  99. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DynLimBuf.o +0 -0
  100. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ElfHandler.o +0 -0
  101. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ExtHandler.o +0 -0
  102. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FatHandler.o +0 -0
  103. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileDir.o +0 -0
  104. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileFind.o +0 -0
  105. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileIO.o +0 -0
  106. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileName.o +0 -0
  107. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FilterCoder.o +0 -0
  108. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FindSignature.o +0 -0
  109. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FlvHandler.o +0 -0
  110. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/GptHandler.o +0 -0
  111. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/GzHandler.o +0 -0
  112. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HandlerCont.o +0 -0
  113. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HandlerOut.o +0 -0
  114. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HfsHandler.o +0 -0
  115. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HmacSha1.o +0 -0
  116. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HmacSha256.o +0 -0
  117. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HuffEnc.o +0 -0
  118. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IhexHandler.o +0 -0
  119. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ImplodeDecoder.o +0 -0
  120. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InBuffer.o +0 -0
  121. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InOutTempBuffer.o +0 -0
  122. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InStreamWithCRC.o +0 -0
  123. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IntToString.o +0 -0
  124. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoHandler.o +0 -0
  125. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoHeader.o +0 -0
  126. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoIn.o +0 -0
  127. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoRegister.o +0 -0
  128. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ItemNameUtils.o +0 -0
  129. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LimitedStreams.o +0 -0
  130. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LockedStream.o +0 -0
  131. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LpHandler.o +0 -0
  132. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFind.o +0 -0
  133. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindMt.o +0 -0
  134. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindOpt.o +0 -0
  135. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindPrepare.o +0 -0
  136. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzOutWindow.o +0 -0
  137. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzfseDecoder.o +0 -0
  138. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzhDecoder.o +0 -0
  139. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzhHandler.o +0 -0
  140. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Dec.o +0 -0
  141. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2DecMt.o +0 -0
  142. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Decoder.o +0 -0
  143. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Enc.o +0 -0
  144. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Encoder.o +0 -0
  145. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Register.o +0 -0
  146. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaDec.o +0 -0
  147. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaDecoder.o +0 -0
  148. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaEnc.o +0 -0
  149. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaEncoder.o +0 -0
  150. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaHandler.o +0 -0
  151. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaRegister.o +0 -0
  152. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmsDecoder.o +0 -0
  153. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzxDecoder.o +0 -0
  154. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MachoHandler.o +0 -0
  155. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MbrHandler.o +0 -0
  156. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Md5.o +0 -0
  157. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Md5Reg.o +0 -0
  158. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MemBlocks.o +0 -0
  159. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MethodId.o +0 -0
  160. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MethodProps.o +0 -0
  161. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MslzHandler.o +0 -0
  162. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MtCoder.o +0 -0
  163. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MtDec.o +0 -0
  164. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MubHandler.o +0 -0
  165. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MultiStream.o +0 -0
  166. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyAes.o +0 -0
  167. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyAesReg.o +0 -0
  168. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyMap.o +0 -0
  169. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyString.o +0 -0
  170. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyVector.o +0 -0
  171. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyWindows.o +0 -0
  172. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyXml.o +0 -0
  173. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NewHandler.o +0 -0
  174. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisDecode.o +0 -0
  175. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisHandler.o +0 -0
  176. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisIn.o +0 -0
  177. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisRegister.o +0 -0
  178. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NtfsHandler.o +0 -0
  179. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OffsetStream.o +0 -0
  180. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutBuffer.o +0 -0
  181. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutMemStream.o +0 -0
  182. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutStreamWithCRC.o +0 -0
  183. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutStreamWithSha1.o +0 -0
  184. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ParseProperties.o +0 -0
  185. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Pbkdf2HmacSha1.o +0 -0
  186. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PeHandler.o +0 -0
  187. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7.o +0 -0
  188. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7Dec.o +0 -0
  189. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7Enc.o +0 -0
  190. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7aDec.o +0 -0
  191. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8.o +0 -0
  192. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8Dec.o +0 -0
  193. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8Enc.o +0 -0
  194. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdDecoder.o +0 -0
  195. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdEncoder.o +0 -0
  196. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdHandler.o +0 -0
  197. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdRegister.o +0 -0
  198. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdZip.o +0 -0
  199. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ProgressMt.o +0 -0
  200. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ProgressUtils.o +0 -0
  201. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropId.o +0 -0
  202. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariant.o +0 -0
  203. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariantConv.o +0 -0
  204. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariantUtils.o +0 -0
  205. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/QcowHandler.o +0 -0
  206. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/QuantumDecoder.o +0 -0
  207. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RandGen.o +0 -0
  208. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar1Decoder.o +0 -0
  209. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar20Crypto.o +0 -0
  210. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar2Decoder.o +0 -0
  211. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar3Decoder.o +0 -0
  212. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar3Vm.o +0 -0
  213. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Aes.o +0 -0
  214. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Decoder.o +0 -0
  215. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Handler.o +0 -0
  216. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarAes.o +0 -0
  217. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarCodecsRegister.o +0 -0
  218. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarHandler.o +0 -0
  219. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RpmHandler.o +0 -0
  220. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1.o +0 -0
  221. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Opt.o +0 -0
  222. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Prepare.o +0 -0
  223. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Reg.o +0 -0
  224. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256.o +0 -0
  225. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Opt.o +0 -0
  226. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Prepare.o +0 -0
  227. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Reg.o +0 -0
  228. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha3.o +0 -0
  229. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha3Reg.o +0 -0
  230. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512.o +0 -0
  231. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Opt.o +0 -0
  232. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Prepare.o +0 -0
  233. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Reg.o +0 -0
  234. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ShrinkDecoder.o +0 -0
  235. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sort.o +0 -0
  236. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SparseHandler.o +0 -0
  237. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SplitHandler.o +0 -0
  238. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SquashfsHandler.o +0 -0
  239. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamBinder.o +0 -0
  240. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamObjects.o +0 -0
  241. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamUtils.o +0 -0
  242. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StringConvert.o +0 -0
  243. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StringToInt.o +0 -0
  244. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SwapBytes.o +0 -0
  245. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SwfHandler.o +0 -0
  246. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Synchronization.o +0 -0
  247. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/System.o +0 -0
  248. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHandler.o +0 -0
  249. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHandlerOut.o +0 -0
  250. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHeader.o +0 -0
  251. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarIn.o +0 -0
  252. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarOut.o +0 -0
  253. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarRegister.o +0 -0
  254. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarUpdate.o +0 -0
  255. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Threads.o +0 -0
  256. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TimeUtils.o +0 -0
  257. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UTFConvert.o +0 -0
  258. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UdfHandler.o +0 -0
  259. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UdfIn.o +0 -0
  260. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UefiHandler.o +0 -0
  261. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UniqBlocks.o +0 -0
  262. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VdiHandler.o +0 -0
  263. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VhdHandler.o +0 -0
  264. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VhdxHandler.o +0 -0
  265. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VirtThread.o +0 -0
  266. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VmdkHandler.o +0 -0
  267. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Wildcard.o +0 -0
  268. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimHandler.o +0 -0
  269. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimHandlerOut.o +0 -0
  270. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimIn.o +0 -0
  271. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimRegister.o +0 -0
  272. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WzAes.o +0 -0
  273. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XarHandler.o +0 -0
  274. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XpressDecoder.o +0 -0
  275. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xxh64.o +0 -0
  276. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xxh64Reg.o +0 -0
  277. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xz.o +0 -0
  278. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64.o +0 -0
  279. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Init.o +0 -0
  280. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Opt.o +0 -0
  281. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Reg.o +0 -0
  282. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzDec.o +0 -0
  283. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzDecoder.o +0 -0
  284. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzEnc.o +0 -0
  285. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzEncoder.o +0 -0
  286. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzHandler.o +0 -0
  287. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzIn.o +0 -0
  288. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZDecoder.o +0 -0
  289. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZHandler.o +0 -0
  290. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipAddCommon.o +0 -0
  291. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipCrypto.o +0 -0
  292. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipHandler.o +0 -0
  293. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipHandlerOut.o +0 -0
  294. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipIn.o +0 -0
  295. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipItem.o +0 -0
  296. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipOut.o +0 -0
  297. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipRegister.o +0 -0
  298. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipStrong.o +0 -0
  299. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipUpdate.o +0 -0
  300. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZlibDecoder.o +0 -0
  301. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZlibEncoder.o +0 -0
  302. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdDec.o +0 -0
  303. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdDecoder.o +0 -0
  304. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdHandler.o +0 -0
  305. package/scripts/clean-upstream-build.mjs +0 -9
package/dist/index.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  import { existsSync, createWriteStream } from 'node:fs';
2
- import { rename, rm, lstat, mkdir } from 'node:fs/promises';
2
+ import { rename, link, rm, lstat, mkdir } from 'node:fs/promises';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { createRequire } from 'node:module';
5
5
  import { availableParallelism } from 'node:os';
6
- import { dirname, resolve, join, relative, sep } from 'node:path';
7
- import { Transform, Readable } from 'node:stream';
6
+ import { dirname, resolve, join, extname, relative, sep } from 'node:path';
7
+ import { Readable, Transform } from 'node:stream';
8
8
  import { pipeline } from 'node:stream/promises';
9
- import { fileURLToPath } from 'node:url';
10
9
 
11
10
  class ArchiveError extends Error {
12
11
  code;
@@ -44,7 +43,7 @@ if (process.platform === 'win32') {
44
43
  else if (process.platform === 'darwin') {
45
44
  engineName = 'lib7z.dylib';
46
45
  }
47
- const packageDirectory = dirname(fileURLToPath(import.meta.url));
46
+ const packageDirectory = dirname(require$1.resolve('7zip-native'));
48
47
  const runtimeDirectory = [
49
48
  resolve(packageDirectory, `../prebuilds/${process.platform}-${process.arch}`),
50
49
  resolve(packageDirectory, '../build/Release'),
@@ -73,10 +72,32 @@ function safeEntrySegments(entryPath) {
73
72
  }
74
73
  return segments;
75
74
  }
75
+ function sanitizeOutputPath(entryPath) {
76
+ if (process.platform !== 'win32') {
77
+ return entryPath;
78
+ }
79
+ return entryPath
80
+ .replace(/([. ]+)([\\/]|$)/g, (_match, unsupported, separator) => '_'.repeat(unsupported.length) + separator)
81
+ .replace(/[<>:|?*"]/g, '_');
82
+ }
83
+ function assertSafeRelativeArchivePath(entryPath) {
84
+ const normalized = entryPath.replace(/\\/g, '/');
85
+ const segments = normalized.split('/').filter(segment => segment !== '' && segment !== '.');
86
+ if (entryPath.includes('\0')
87
+ || normalized.startsWith('/')
88
+ || /^[a-zA-Z]:/.test(normalized)
89
+ || segments.length === 0
90
+ || segments.some(segment => segment === '..')) {
91
+ throw new ArchiveError('ERR_ARCHIVE_PATH', `Unsafe archive entry path: ${entryPath}`);
92
+ }
93
+ }
76
94
  function makeOutputPlans(root, entries) {
77
95
  const caseInsensitivePaths = process.platform === 'win32' || process.platform === 'darwin';
78
96
  const plans = entries.map((entry) => {
79
- const segments = safeEntrySegments(entry.path);
97
+ if (process.platform === 'win32') {
98
+ assertSafeRelativeArchivePath(entry.path);
99
+ }
100
+ const segments = safeEntrySegments(sanitizeOutputPath(entry.path));
80
101
  const targetPath = resolve(root, ...segments);
81
102
  const relative$1 = relative(root, targetPath);
82
103
  if (relative$1 === ''
@@ -135,6 +156,37 @@ async function assertReplaceableOutput(filePath) {
135
156
  }
136
157
  }
137
158
  }
159
+ async function assertOutputDoesNotExist(filePath) {
160
+ try {
161
+ await lstat(filePath);
162
+ throw new ArchiveError('ERR_ARCHIVE_CREATE', `Output archive already exists: ${filePath}`);
163
+ }
164
+ catch (error) {
165
+ if (error instanceof ArchiveError || error.code !== 'ENOENT') {
166
+ throw error;
167
+ }
168
+ }
169
+ }
170
+ async function normalizeCreateEntry(entry) {
171
+ if (entry === null || typeof entry !== 'object'
172
+ || typeof entry.sourcePath !== 'string' || entry.sourcePath.length === 0
173
+ || typeof entry.path !== 'string' || entry.path.length === 0) {
174
+ throw new TypeError('Each archive creation entry must have non-empty sourcePath and path strings');
175
+ }
176
+ const internalPath = safeEntrySegments(entry.path).join('/');
177
+ const sourcePath = resolve(entry.sourcePath);
178
+ let details;
179
+ try {
180
+ details = await lstat(sourcePath);
181
+ }
182
+ catch (cause) {
183
+ throw new ArchiveError('ERR_ARCHIVE_CREATE', `Unable to access archive creation source: ${sourcePath}`, { cause });
184
+ }
185
+ if (details.isSymbolicLink() || !details.isFile()) {
186
+ throw new ArchiveError('ERR_ARCHIVE_CREATE', `Archive creation source is not a regular file: ${sourcePath}`);
187
+ }
188
+ return { sourcePath, path: internalPath };
189
+ }
138
190
  async function ensureExtractionRoot(root) {
139
191
  try {
140
192
  const details = await lstat(root);
@@ -296,6 +348,99 @@ class Archive {
296
348
  throw new ArchiveError(/password/i.test(message) ? 'ERR_ARCHIVE_PASSWORD' : 'ERR_ARCHIVE_OPEN', message, { cause });
297
349
  }
298
350
  }
351
+ static async create(outputPath, entries, options = {}) {
352
+ if (typeof outputPath !== 'string' || outputPath.length === 0) {
353
+ throw new TypeError('Output archive path must be a non-empty string');
354
+ }
355
+ if (!Array.isArray(entries)) {
356
+ throw new TypeError('Archive creation entries must be an array');
357
+ }
358
+ if (entries.length > 1_000_000) {
359
+ throw new RangeError('Archive creation exceeds the 1,000,000-entry limit');
360
+ }
361
+ if (options === null || typeof options !== 'object') {
362
+ throw new TypeError('Archive creation options must be an object');
363
+ }
364
+ if (options.overwrite !== undefined && typeof options.overwrite !== 'boolean') {
365
+ throw new TypeError('Archive creation overwrite option must be a boolean');
366
+ }
367
+ const compressionLevel = options.compressionLevel ?? 5;
368
+ if (!Number.isSafeInteger(compressionLevel) || compressionLevel < 0 || compressionLevel > 9) {
369
+ throw new RangeError('Compression level must be an integer between 0 and 9');
370
+ }
371
+ const targetPath = resolve(outputPath);
372
+ let format;
373
+ if (options.format !== undefined) {
374
+ if (options.format !== '7z' && options.format !== 'zip'
375
+ && options.format !== 'tar' && options.format !== 'wim') {
376
+ throw new TypeError('Archive format must be "7z", "zip", "tar", or "wim"');
377
+ }
378
+ format = options.format;
379
+ }
380
+ else {
381
+ const extension = extname(targetPath).toLowerCase();
382
+ if (extension === '.7z') {
383
+ format = '7z';
384
+ }
385
+ else if (extension === '.zip') {
386
+ format = 'zip';
387
+ }
388
+ else if (extension === '.tar') {
389
+ format = 'tar';
390
+ }
391
+ else if (extension === '.wim') {
392
+ format = 'wim';
393
+ }
394
+ else {
395
+ throw new TypeError('Specify format as "7z", "zip", "tar", or "wim" for an unrecognized output extension');
396
+ }
397
+ }
398
+ if (options.compressionLevel !== undefined && format !== '7z' && format !== 'zip') {
399
+ throw new TypeError('compressionLevel is only supported for ZIP and 7z archives');
400
+ }
401
+ const normalizedEntries = await Promise.all(entries.map(normalizeCreateEntry));
402
+ const caseInsensitivePaths = process.platform === 'win32' || process.platform === 'darwin';
403
+ const pathKeys = normalizedEntries.map(entry => caseInsensitivePaths ? entry.path.toLowerCase() : entry.path);
404
+ const archivePaths = new Set(pathKeys);
405
+ if (archivePaths.size !== normalizedEntries.length) {
406
+ throw new ArchiveError('ERR_ARCHIVE_PATH', 'Archive creation paths must be unique');
407
+ }
408
+ for (const entry of normalizedEntries) {
409
+ const segments = entry.path.split('/');
410
+ for (let index = 1; index < segments.length; index++) {
411
+ const parent = segments.slice(0, index).join('/');
412
+ const parentKey = caseInsensitivePaths ? parent.toLowerCase() : parent;
413
+ if (archivePaths.has(parentKey)) {
414
+ throw new ArchiveError('ERR_ARCHIVE_PATH', `Archive creation file path is a parent of another entry: ${parent}`);
415
+ }
416
+ }
417
+ }
418
+ if (options.overwrite) {
419
+ await assertReplaceableOutput(targetPath);
420
+ }
421
+ else {
422
+ await assertOutputDoesNotExist(targetPath);
423
+ }
424
+ const temporaryPath = join(dirname(targetPath), `.7zip-native-${randomUUID()}.tmp`);
425
+ try {
426
+ await native.create(temporaryPath, format, normalizedEntries, compressionLevel, enginePath);
427
+ if (options.overwrite) {
428
+ await assertReplaceableOutput(targetPath);
429
+ await rename(temporaryPath, targetPath);
430
+ }
431
+ else {
432
+ await link(temporaryPath, targetPath);
433
+ await rm(temporaryPath);
434
+ }
435
+ }
436
+ catch (cause) {
437
+ await rm(temporaryPath, { force: true });
438
+ if (cause instanceof ArchiveError) {
439
+ throw cause;
440
+ }
441
+ throw new ArchiveError('ERR_ARCHIVE_CREATE', errorMessage(cause), { cause });
442
+ }
443
+ }
299
444
  async entries() {
300
445
  this.assertOpen();
301
446
  this.entriesPromise ??= native.entries(this.handle).catch((cause) => {
@@ -379,9 +524,19 @@ class Archive {
379
524
  if (options.overwrite !== undefined && typeof options.overwrite !== 'boolean') {
380
525
  throw new TypeError('Folder extraction overwrite option must be a boolean');
381
526
  }
527
+ if (options.concurrency !== undefined
528
+ && (!Number.isSafeInteger(options.concurrency)
529
+ || options.concurrency < 1
530
+ || options.concurrency > 128)) {
531
+ throw new RangeError('Folder extraction concurrency must be an integer between 1 and 128');
532
+ }
382
533
  if (options.onProgress !== undefined && typeof options.onProgress !== 'function') {
383
534
  throw new TypeError('Folder extraction onProgress option must be a function');
384
535
  }
536
+ if (options.onExtract !== undefined && typeof options.onExtract !== 'function') {
537
+ throw new TypeError('Folder extraction onExtract option must be a function');
538
+ }
539
+ const concurrency = Math.min(options.concurrency ?? 1, Archive.concurrency());
385
540
  options.signal?.throwIfAborted();
386
541
  const maxBytes = normalizeMaxBytes(options.maxBytes, 'maxBytes');
387
542
  const entries = await this.entries();
@@ -451,8 +606,28 @@ class Archive {
451
606
  options.signal?.throwIfAborted();
452
607
  if (plan.isDirectory) {
453
608
  await ensureOutputDirectoryTree(root, plan.targetPath);
454
- continue;
455
609
  }
610
+ }
611
+ const filePlans = plans.filter(plan => !plan.isDirectory);
612
+ const controller = new AbortController();
613
+ const extractionSignal = controller.signal;
614
+ let hasFailure = false;
615
+ let failure;
616
+ let nextFileIndex = 0;
617
+ const stop = (error) => {
618
+ if (!hasFailure) {
619
+ hasFailure = true;
620
+ failure = error;
621
+ }
622
+ if (!extractionSignal.aborted) {
623
+ controller.abort(error);
624
+ }
625
+ };
626
+ const abortFromCaller = () => {
627
+ stop(options.signal?.reason);
628
+ };
629
+ options.signal?.addEventListener('abort', abortFromCaller, { once: true });
630
+ const extractFile = async (plan) => {
456
631
  await ensureOutputParents(root, plan.targetPath);
457
632
  const limit = new Transform({
458
633
  transform(chunk, _encoding, callback) {
@@ -477,10 +652,12 @@ class Archive {
477
652
  const temporaryPath = join(dirname(plan.targetPath), `.7zip-native-${randomUUID()}.tmp`);
478
653
  try {
479
654
  await pipeline(this.createReadStream(plan.entry.id, {
480
- signal: options.signal,
655
+ signal: extractionSignal,
481
656
  maxBytes: null,
482
- }), limit, createWriteStream(temporaryPath, { flags: 'wx', mode: 0o600 }), { signal: options.signal });
657
+ }), limit, createWriteStream(temporaryPath, { flags: 'wx', mode: 0o600 }), { signal: extractionSignal });
658
+ extractionSignal.throwIfAborted();
483
659
  await assertReplaceableOutput(plan.targetPath);
660
+ extractionSignal.throwIfAborted();
484
661
  await rename(temporaryPath, plan.targetPath);
485
662
  }
486
663
  catch (error) {
@@ -490,12 +667,43 @@ class Archive {
490
667
  }
491
668
  else {
492
669
  await pipeline(this.createReadStream(plan.entry.id, {
493
- signal: options.signal,
670
+ signal: extractionSignal,
494
671
  maxBytes: null,
495
- }), limit, createWriteStream(plan.targetPath, { flags: 'wx', mode: 0o600 }), { signal: options.signal });
672
+ }), limit, createWriteStream(plan.targetPath, { flags: 'wx', mode: 0o600 }), { signal: extractionSignal });
496
673
  }
497
674
  filesExtracted++;
498
675
  reportProgress();
676
+ options.onExtract?.({ entry: plan.entry, outputPath: plan.targetPath });
677
+ };
678
+ const runWorker = async () => {
679
+ while (!hasFailure) {
680
+ if (options.signal?.aborted) {
681
+ stop(options.signal.reason);
682
+ return;
683
+ }
684
+ const plan = filePlans[nextFileIndex++];
685
+ if (!plan) {
686
+ return;
687
+ }
688
+ try {
689
+ await extractFile(plan);
690
+ }
691
+ catch (error) {
692
+ stop(error);
693
+ return;
694
+ }
695
+ }
696
+ };
697
+ try {
698
+ options.signal?.throwIfAborted();
699
+ const workers = Array.from({ length: Math.min(concurrency, filePlans.length) }, () => runWorker());
700
+ await Promise.all(workers);
701
+ if (hasFailure) {
702
+ throw failure;
703
+ }
704
+ }
705
+ finally {
706
+ options.signal?.removeEventListener('abort', abortFromCaller);
499
707
  }
500
708
  }
501
709
  async read(idOrPath, options) {