@pnpm/exe 11.0.0-dev.1003 → 11.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (584) hide show
  1. package/dist/node-gyp-bin/node-gyp +6 -0
  2. package/dist/node-gyp-bin/node-gyp.cmd +5 -0
  3. package/dist/node_modules/@gar/promise-retry/LICENSE +20 -0
  4. package/dist/node_modules/@gar/promise-retry/lib/index.js +62 -0
  5. package/dist/node_modules/@gar/promise-retry/lib/retry.js +109 -0
  6. package/dist/node_modules/@gar/promise-retry/package.json +45 -0
  7. package/dist/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
  8. package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
  9. package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
  10. package/dist/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
  11. package/dist/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
  12. package/dist/node_modules/@isaacs/fs-minipass/package.json +72 -0
  13. package/dist/node_modules/@npmcli/agent/lib/agents.js +206 -0
  14. package/dist/node_modules/@npmcli/agent/lib/dns.js +53 -0
  15. package/dist/node_modules/@npmcli/agent/lib/errors.js +61 -0
  16. package/dist/node_modules/@npmcli/agent/lib/index.js +56 -0
  17. package/dist/node_modules/@npmcli/agent/lib/options.js +86 -0
  18. package/dist/node_modules/@npmcli/agent/lib/proxy.js +88 -0
  19. package/dist/node_modules/@npmcli/agent/package.json +60 -0
  20. package/dist/node_modules/@npmcli/fs/lib/common/get-options.js +20 -0
  21. package/dist/node_modules/@npmcli/fs/lib/common/node.js +9 -0
  22. package/dist/node_modules/@npmcli/fs/lib/cp/LICENSE +15 -0
  23. package/dist/node_modules/@npmcli/fs/lib/cp/errors.js +129 -0
  24. package/dist/node_modules/@npmcli/fs/lib/cp/index.js +22 -0
  25. package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +428 -0
  26. package/dist/node_modules/@npmcli/fs/lib/index.js +13 -0
  27. package/dist/node_modules/@npmcli/fs/lib/move-file.js +78 -0
  28. package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
  29. package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +39 -0
  30. package/dist/node_modules/@npmcli/fs/package.json +54 -0
  31. package/dist/node_modules/@npmcli/redact/LICENSE +21 -0
  32. package/dist/node_modules/@npmcli/redact/lib/deep-map.js +71 -0
  33. package/dist/node_modules/@npmcli/redact/lib/error.js +28 -0
  34. package/dist/node_modules/@npmcli/redact/lib/index.js +44 -0
  35. package/dist/node_modules/@npmcli/redact/lib/matchers.js +88 -0
  36. package/dist/node_modules/@npmcli/redact/lib/server.js +59 -0
  37. package/dist/node_modules/@npmcli/redact/lib/utils.js +202 -0
  38. package/dist/node_modules/@npmcli/redact/package.json +52 -0
  39. package/dist/node_modules/abbrev/LICENSE +46 -0
  40. package/dist/node_modules/abbrev/lib/index.js +53 -0
  41. package/dist/node_modules/abbrev/package.json +41 -0
  42. package/dist/node_modules/agent-base/LICENSE +22 -0
  43. package/dist/node_modules/agent-base/dist/helpers.js +66 -0
  44. package/dist/node_modules/agent-base/dist/index.js +178 -0
  45. package/dist/node_modules/agent-base/package.json +46 -0
  46. package/dist/node_modules/balanced-match/dist/commonjs/index.js +59 -0
  47. package/dist/node_modules/balanced-match/dist/commonjs/package.json +3 -0
  48. package/dist/node_modules/balanced-match/dist/esm/index.js +54 -0
  49. package/dist/node_modules/balanced-match/dist/esm/package.json +3 -0
  50. package/dist/node_modules/balanced-match/package.json +68 -0
  51. package/dist/node_modules/brace-expansion/LICENSE +23 -0
  52. package/dist/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
  53. package/dist/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
  54. package/dist/node_modules/brace-expansion/dist/esm/index.js +197 -0
  55. package/dist/node_modules/brace-expansion/dist/esm/package.json +3 -0
  56. package/dist/node_modules/brace-expansion/package.json +64 -0
  57. package/dist/node_modules/cacache/lib/content/path.js +29 -0
  58. package/dist/node_modules/cacache/lib/content/read.js +165 -0
  59. package/dist/node_modules/cacache/lib/content/rm.js +18 -0
  60. package/dist/node_modules/cacache/lib/content/write.js +206 -0
  61. package/dist/node_modules/cacache/lib/entry-index.js +336 -0
  62. package/dist/node_modules/cacache/lib/get.js +170 -0
  63. package/dist/node_modules/cacache/lib/index.js +42 -0
  64. package/dist/node_modules/cacache/lib/memoization.js +72 -0
  65. package/dist/node_modules/cacache/lib/put.js +80 -0
  66. package/dist/node_modules/cacache/lib/rm.js +31 -0
  67. package/dist/node_modules/cacache/lib/util/glob.js +7 -0
  68. package/dist/node_modules/cacache/lib/util/hash-to-segments.js +7 -0
  69. package/dist/node_modules/cacache/lib/util/tmp.js +32 -0
  70. package/dist/node_modules/cacache/lib/verify.js +258 -0
  71. package/dist/node_modules/cacache/package.json +81 -0
  72. package/dist/node_modules/chownr/dist/commonjs/index.js +93 -0
  73. package/dist/node_modules/chownr/dist/commonjs/package.json +3 -0
  74. package/dist/node_modules/chownr/dist/esm/index.js +85 -0
  75. package/dist/node_modules/chownr/dist/esm/package.json +3 -0
  76. package/dist/node_modules/chownr/package.json +69 -0
  77. package/dist/node_modules/debug/LICENSE +20 -0
  78. package/dist/node_modules/debug/package.json +64 -0
  79. package/dist/node_modules/debug/src/browser.js +272 -0
  80. package/dist/node_modules/debug/src/common.js +292 -0
  81. package/dist/node_modules/debug/src/index.js +10 -0
  82. package/dist/node_modules/debug/src/node.js +263 -0
  83. package/dist/node_modules/env-paths/index.js +74 -0
  84. package/dist/node_modules/env-paths/license +9 -0
  85. package/dist/node_modules/env-paths/package.json +45 -0
  86. package/dist/node_modules/exponential-backoff/LICENSE +202 -0
  87. package/dist/node_modules/exponential-backoff/dist/backoff.js +124 -0
  88. package/dist/node_modules/exponential-backoff/dist/delay/always/always.delay.js +25 -0
  89. package/dist/node_modules/exponential-backoff/dist/delay/delay.base.js +45 -0
  90. package/dist/node_modules/exponential-backoff/dist/delay/delay.factory.js +17 -0
  91. package/dist/node_modules/exponential-backoff/dist/delay/delay.interface.js +3 -0
  92. package/dist/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js +82 -0
  93. package/dist/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js +8 -0
  94. package/dist/node_modules/exponential-backoff/dist/jitter/jitter.factory.js +15 -0
  95. package/dist/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js +7 -0
  96. package/dist/node_modules/exponential-backoff/dist/options.js +31 -0
  97. package/dist/node_modules/exponential-backoff/package.json +62 -0
  98. package/dist/node_modules/fdir/LICENSE +7 -0
  99. package/dist/node_modules/fdir/dist/index.cjs +588 -0
  100. package/dist/node_modules/fdir/dist/index.d.cts +155 -0
  101. package/dist/node_modules/fdir/dist/index.d.mts +155 -0
  102. package/dist/node_modules/fdir/dist/index.mjs +570 -0
  103. package/dist/node_modules/fdir/package.json +103 -0
  104. package/dist/node_modules/fs-minipass/LICENSE +15 -0
  105. package/dist/node_modules/fs-minipass/lib/index.js +443 -0
  106. package/dist/node_modules/fs-minipass/package.json +54 -0
  107. package/dist/node_modules/glob/dist/commonjs/glob.js +248 -0
  108. package/dist/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  109. package/dist/node_modules/glob/dist/commonjs/ignore.js +119 -0
  110. package/dist/node_modules/glob/dist/commonjs/index.js +68 -0
  111. package/dist/node_modules/glob/dist/commonjs/index.min.js +4 -0
  112. package/dist/node_modules/glob/dist/commonjs/package.json +3 -0
  113. package/dist/node_modules/glob/dist/commonjs/pattern.js +223 -0
  114. package/dist/node_modules/glob/dist/commonjs/processor.js +301 -0
  115. package/dist/node_modules/glob/dist/commonjs/walker.js +387 -0
  116. package/dist/node_modules/glob/dist/esm/glob.js +244 -0
  117. package/dist/node_modules/glob/dist/esm/has-magic.js +23 -0
  118. package/dist/node_modules/glob/dist/esm/ignore.js +115 -0
  119. package/dist/node_modules/glob/dist/esm/index.js +55 -0
  120. package/dist/node_modules/glob/dist/esm/index.min.js +4 -0
  121. package/dist/node_modules/glob/dist/esm/package.json +3 -0
  122. package/dist/node_modules/glob/dist/esm/pattern.js +219 -0
  123. package/dist/node_modules/glob/dist/esm/processor.js +294 -0
  124. package/dist/node_modules/glob/dist/esm/walker.js +381 -0
  125. package/dist/node_modules/glob/package.json +98 -0
  126. package/dist/node_modules/graceful-fs/LICENSE +15 -0
  127. package/dist/node_modules/graceful-fs/clone.js +23 -0
  128. package/dist/node_modules/graceful-fs/graceful-fs.js +448 -0
  129. package/dist/node_modules/graceful-fs/legacy-streams.js +118 -0
  130. package/dist/node_modules/graceful-fs/package.json +53 -0
  131. package/dist/node_modules/graceful-fs/polyfills.js +355 -0
  132. package/dist/node_modules/http-cache-semantics/LICENSE +9 -0
  133. package/dist/node_modules/http-cache-semantics/index.js +928 -0
  134. package/dist/node_modules/http-cache-semantics/package.json +22 -0
  135. package/dist/node_modules/http-proxy-agent/LICENSE +22 -0
  136. package/dist/node_modules/http-proxy-agent/dist/index.js +148 -0
  137. package/dist/node_modules/http-proxy-agent/package.json +47 -0
  138. package/dist/node_modules/https-proxy-agent/LICENSE +22 -0
  139. package/dist/node_modules/https-proxy-agent/dist/index.js +180 -0
  140. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
  141. package/dist/node_modules/https-proxy-agent/package.json +50 -0
  142. package/dist/node_modules/iconv-lite/LICENSE +21 -0
  143. package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  144. package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  145. package/dist/node_modules/iconv-lite/encodings/index.js +23 -0
  146. package/dist/node_modules/iconv-lite/encodings/internal.js +218 -0
  147. package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  148. package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  149. package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  150. package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  151. package/dist/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  152. package/dist/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  153. package/dist/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  154. package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  155. package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  156. package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  157. package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  158. package/dist/node_modules/iconv-lite/encodings/utf16.js +187 -0
  159. package/dist/node_modules/iconv-lite/encodings/utf32.js +307 -0
  160. package/dist/node_modules/iconv-lite/encodings/utf7.js +283 -0
  161. package/dist/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  162. package/dist/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  163. package/dist/node_modules/iconv-lite/lib/index.js +182 -0
  164. package/dist/node_modules/iconv-lite/lib/streams.js +105 -0
  165. package/dist/node_modules/iconv-lite/package.json +70 -0
  166. package/dist/node_modules/ip-address/LICENSE +19 -0
  167. package/dist/node_modules/ip-address/dist/address-error.js +12 -0
  168. package/dist/node_modules/ip-address/dist/common.js +46 -0
  169. package/dist/node_modules/ip-address/dist/ip-address.js +35 -0
  170. package/dist/node_modules/ip-address/dist/ipv4.js +360 -0
  171. package/dist/node_modules/ip-address/dist/ipv6.js +1003 -0
  172. package/dist/node_modules/ip-address/dist/v4/constants.js +8 -0
  173. package/dist/node_modules/ip-address/dist/v6/constants.js +76 -0
  174. package/dist/node_modules/ip-address/dist/v6/helpers.js +45 -0
  175. package/dist/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
  176. package/dist/node_modules/ip-address/package.json +78 -0
  177. package/dist/node_modules/isexe/dist/commonjs/index.js +56 -0
  178. package/dist/node_modules/isexe/dist/commonjs/index.min.js +2 -0
  179. package/dist/node_modules/isexe/dist/commonjs/options.js +3 -0
  180. package/dist/node_modules/isexe/dist/commonjs/package.json +3 -0
  181. package/dist/node_modules/isexe/dist/commonjs/posix.js +67 -0
  182. package/dist/node_modules/isexe/dist/commonjs/win32.js +63 -0
  183. package/dist/node_modules/isexe/dist/esm/index.js +16 -0
  184. package/dist/node_modules/isexe/dist/esm/index.min.js +2 -0
  185. package/dist/node_modules/isexe/dist/esm/options.js +2 -0
  186. package/dist/node_modules/isexe/dist/esm/package.json +3 -0
  187. package/dist/node_modules/isexe/dist/esm/posix.js +62 -0
  188. package/dist/node_modules/isexe/dist/esm/win32.js +58 -0
  189. package/dist/node_modules/isexe/package.json +78 -0
  190. package/dist/node_modules/lru-cache/dist/commonjs/index.js +1595 -0
  191. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  192. package/dist/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  193. package/dist/node_modules/lru-cache/dist/esm/index.js +1591 -0
  194. package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  195. package/dist/node_modules/lru-cache/dist/esm/package.json +3 -0
  196. package/dist/node_modules/lru-cache/package.json +93 -0
  197. package/dist/node_modules/make-fetch-happen/LICENSE +16 -0
  198. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +471 -0
  199. package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +11 -0
  200. package/dist/node_modules/make-fetch-happen/lib/cache/index.js +49 -0
  201. package/dist/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
  202. package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
  203. package/dist/node_modules/make-fetch-happen/lib/fetch.js +118 -0
  204. package/dist/node_modules/make-fetch-happen/lib/index.js +41 -0
  205. package/dist/node_modules/make-fetch-happen/lib/options.js +59 -0
  206. package/dist/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
  207. package/dist/node_modules/make-fetch-happen/lib/remote.js +134 -0
  208. package/dist/node_modules/make-fetch-happen/package.json +75 -0
  209. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  210. package/dist/node_modules/minimatch/dist/commonjs/ast.js +846 -0
  211. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
  212. package/dist/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  213. package/dist/node_modules/minimatch/dist/commonjs/index.js +1121 -0
  214. package/dist/node_modules/minimatch/dist/commonjs/package.json +3 -0
  215. package/dist/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  216. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  217. package/dist/node_modules/minimatch/dist/esm/ast.js +842 -0
  218. package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
  219. package/dist/node_modules/minimatch/dist/esm/escape.js +26 -0
  220. package/dist/node_modules/minimatch/dist/esm/index.js +1108 -0
  221. package/dist/node_modules/minimatch/dist/esm/package.json +3 -0
  222. package/dist/node_modules/minimatch/dist/esm/unescape.js +34 -0
  223. package/dist/node_modules/minimatch/package.json +67 -0
  224. package/dist/node_modules/minipass/dist/commonjs/index.js +1038 -0
  225. package/dist/node_modules/minipass/dist/commonjs/package.json +3 -0
  226. package/dist/node_modules/minipass/dist/esm/index.js +1020 -0
  227. package/dist/node_modules/minipass/dist/esm/package.json +3 -0
  228. package/dist/node_modules/minipass/package.json +77 -0
  229. package/dist/node_modules/minipass-collect/LICENSE +15 -0
  230. package/dist/node_modules/minipass-collect/index.js +71 -0
  231. package/dist/node_modules/minipass-collect/package.json +30 -0
  232. package/dist/node_modules/minipass-fetch/LICENSE +28 -0
  233. package/dist/node_modules/minipass-fetch/lib/abort-error.js +17 -0
  234. package/dist/node_modules/minipass-fetch/lib/blob.js +97 -0
  235. package/dist/node_modules/minipass-fetch/lib/body.js +360 -0
  236. package/dist/node_modules/minipass-fetch/lib/fetch-error.js +32 -0
  237. package/dist/node_modules/minipass-fetch/lib/headers.js +267 -0
  238. package/dist/node_modules/minipass-fetch/lib/index.js +376 -0
  239. package/dist/node_modules/minipass-fetch/lib/request.js +282 -0
  240. package/dist/node_modules/minipass-fetch/lib/response.js +90 -0
  241. package/dist/node_modules/minipass-fetch/package.json +70 -0
  242. package/dist/node_modules/minipass-flush/LICENSE +15 -0
  243. package/dist/node_modules/minipass-flush/index.js +39 -0
  244. package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
  245. package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
  246. package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
  247. package/dist/node_modules/minipass-flush/package.json +39 -0
  248. package/dist/node_modules/minipass-pipeline/LICENSE +15 -0
  249. package/dist/node_modules/minipass-pipeline/index.js +128 -0
  250. package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
  251. package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
  252. package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
  253. package/dist/node_modules/minipass-pipeline/package.json +29 -0
  254. package/dist/node_modules/minipass-sized/LICENSE +15 -0
  255. package/dist/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
  256. package/dist/node_modules/minipass-sized/dist/commonjs/package.json +3 -0
  257. package/dist/node_modules/minipass-sized/dist/esm/index.js +64 -0
  258. package/dist/node_modules/minipass-sized/dist/esm/package.json +3 -0
  259. package/dist/node_modules/minipass-sized/package.json +69 -0
  260. package/dist/node_modules/minizlib/LICENSE +26 -0
  261. package/dist/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  262. package/dist/node_modules/minizlib/dist/commonjs/index.js +416 -0
  263. package/dist/node_modules/minizlib/dist/commonjs/package.json +3 -0
  264. package/dist/node_modules/minizlib/dist/esm/constants.js +117 -0
  265. package/dist/node_modules/minizlib/dist/esm/index.js +363 -0
  266. package/dist/node_modules/minizlib/dist/esm/package.json +3 -0
  267. package/dist/node_modules/minizlib/package.json +80 -0
  268. package/dist/node_modules/ms/index.js +162 -0
  269. package/dist/node_modules/ms/package.json +38 -0
  270. package/dist/node_modules/negotiator/LICENSE +24 -0
  271. package/dist/node_modules/negotiator/index.js +83 -0
  272. package/dist/node_modules/negotiator/lib/charset.js +169 -0
  273. package/dist/node_modules/negotiator/lib/encoding.js +205 -0
  274. package/dist/node_modules/negotiator/lib/language.js +179 -0
  275. package/dist/node_modules/negotiator/lib/mediaType.js +294 -0
  276. package/dist/node_modules/negotiator/package.json +43 -0
  277. package/dist/node_modules/node-gyp/.release-please-manifest.json +3 -0
  278. package/dist/node_modules/node-gyp/LICENSE +24 -0
  279. package/dist/node_modules/node-gyp/addon.gypi +204 -0
  280. package/dist/node_modules/node-gyp/bin/node-gyp.js +145 -0
  281. package/dist/node_modules/node-gyp/eslint.config.js +3 -0
  282. package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
  283. package/dist/node_modules/node-gyp/gyp/LICENSE +28 -0
  284. package/dist/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
  285. package/dist/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
  286. package/dist/node_modules/node-gyp/gyp/gyp +8 -0
  287. package/dist/node_modules/node-gyp/gyp/gyp.bat +5 -0
  288. package/dist/node_modules/node-gyp/gyp/gyp_main.py +45 -0
  289. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +365 -0
  290. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +206 -0
  291. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1283 -0
  292. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1545 -0
  293. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +59 -0
  294. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +152 -0
  295. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +270 -0
  296. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +599 -0
  297. package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +707 -0
  298. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common.py +725 -0
  299. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +186 -0
  300. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +170 -0
  301. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +113 -0
  302. package/dist/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +55 -0
  303. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
  304. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +805 -0
  305. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1169 -0
  306. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +1316 -0
  307. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +128 -0
  308. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +104 -0
  309. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +461 -0
  310. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +88 -0
  311. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +55 -0
  312. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2755 -0
  313. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3970 -0
  314. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +44 -0
  315. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2956 -0
  316. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +67 -0
  317. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1389 -0
  318. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +26 -0
  319. package/dist/node_modules/node-gyp/gyp/pylib/gyp/input.py +3097 -0
  320. package/dist/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +99 -0
  321. package/dist/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +765 -0
  322. package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +1255 -0
  323. package/dist/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +174 -0
  324. package/dist/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +61 -0
  325. package/dist/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +371 -0
  326. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1936 -0
  327. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +54 -0
  328. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +301 -0
  329. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +3180 -0
  330. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +64 -0
  331. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
  332. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
  333. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
  334. package/dist/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
  335. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +107 -0
  336. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
  337. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
  338. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
  339. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
  340. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
  341. package/dist/node_modules/node-gyp/gyp/pylib/packaging/markers.py +251 -0
  342. package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +824 -0
  343. package/dist/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  344. package/dist/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
  345. package/dist/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
  346. package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
  347. package/dist/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
  348. package/dist/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
  349. package/dist/node_modules/node-gyp/gyp/pyproject.toml +114 -0
  350. package/dist/node_modules/node-gyp/gyp/release-please-config.json +11 -0
  351. package/dist/node_modules/node-gyp/gyp/test_gyp.py +260 -0
  352. package/dist/node_modules/node-gyp/lib/Find-VisualStudio.cs +250 -0
  353. package/dist/node_modules/node-gyp/lib/build.js +230 -0
  354. package/dist/node_modules/node-gyp/lib/clean.js +15 -0
  355. package/dist/node_modules/node-gyp/lib/configure.js +328 -0
  356. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +153 -0
  357. package/dist/node_modules/node-gyp/lib/download.js +39 -0
  358. package/dist/node_modules/node-gyp/lib/find-node-directory.js +63 -0
  359. package/dist/node_modules/node-gyp/lib/find-python.js +304 -0
  360. package/dist/node_modules/node-gyp/lib/find-visualstudio.js +606 -0
  361. package/dist/node_modules/node-gyp/lib/install.js +411 -0
  362. package/dist/node_modules/node-gyp/lib/list.js +26 -0
  363. package/dist/node_modules/node-gyp/lib/log.js +168 -0
  364. package/dist/node_modules/node-gyp/lib/node-gyp.js +199 -0
  365. package/dist/node_modules/node-gyp/lib/process-release.js +146 -0
  366. package/dist/node_modules/node-gyp/lib/rebuild.js +12 -0
  367. package/dist/node_modules/node-gyp/lib/remove.js +43 -0
  368. package/dist/node_modules/node-gyp/lib/util.js +81 -0
  369. package/dist/node_modules/node-gyp/macOS_Catalina_acid_test.sh +21 -0
  370. package/dist/node_modules/node-gyp/package.json +52 -0
  371. package/dist/node_modules/node-gyp/release-please-config.json +40 -0
  372. package/dist/node_modules/node-gyp/src/win_delay_load_hook.cc +41 -0
  373. package/dist/node_modules/nopt/LICENSE +15 -0
  374. package/dist/node_modules/nopt/bin/nopt.js +29 -0
  375. package/dist/node_modules/nopt/lib/debug.js +5 -0
  376. package/dist/node_modules/nopt/lib/nopt-lib.js +514 -0
  377. package/dist/node_modules/nopt/lib/nopt.js +34 -0
  378. package/dist/node_modules/nopt/lib/type-defs.js +91 -0
  379. package/dist/node_modules/nopt/package.json +52 -0
  380. package/dist/node_modules/p-map/index.js +283 -0
  381. package/dist/node_modules/p-map/license +9 -0
  382. package/dist/node_modules/p-map/package.json +57 -0
  383. package/dist/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
  384. package/dist/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  385. package/dist/node_modules/path-scurry/dist/esm/index.js +1983 -0
  386. package/dist/node_modules/path-scurry/dist/esm/package.json +3 -0
  387. package/dist/node_modules/path-scurry/package.json +72 -0
  388. package/dist/node_modules/picomatch/LICENSE +21 -0
  389. package/dist/node_modules/picomatch/index.js +17 -0
  390. package/dist/node_modules/picomatch/lib/constants.js +184 -0
  391. package/dist/node_modules/picomatch/lib/parse.js +1386 -0
  392. package/dist/node_modules/picomatch/lib/picomatch.js +349 -0
  393. package/dist/node_modules/picomatch/lib/scan.js +391 -0
  394. package/dist/node_modules/picomatch/lib/utils.js +72 -0
  395. package/dist/node_modules/picomatch/package.json +82 -0
  396. package/dist/node_modules/picomatch/posix.js +3 -0
  397. package/dist/node_modules/proc-log/LICENSE +15 -0
  398. package/dist/node_modules/proc-log/lib/index.js +158 -0
  399. package/dist/node_modules/proc-log/package.json +46 -0
  400. package/dist/node_modules/safer-buffer/LICENSE +21 -0
  401. package/dist/node_modules/safer-buffer/dangerous.js +58 -0
  402. package/dist/node_modules/safer-buffer/package.json +34 -0
  403. package/dist/node_modules/safer-buffer/safer.js +77 -0
  404. package/dist/node_modules/safer-buffer/tests.js +406 -0
  405. package/dist/node_modules/semver/LICENSE +15 -0
  406. package/dist/node_modules/semver/bin/semver.js +191 -0
  407. package/dist/node_modules/semver/classes/comparator.js +143 -0
  408. package/dist/node_modules/semver/classes/index.js +7 -0
  409. package/dist/node_modules/semver/classes/range.js +557 -0
  410. package/dist/node_modules/semver/classes/semver.js +333 -0
  411. package/dist/node_modules/semver/functions/clean.js +8 -0
  412. package/dist/node_modules/semver/functions/cmp.js +54 -0
  413. package/dist/node_modules/semver/functions/coerce.js +62 -0
  414. package/dist/node_modules/semver/functions/compare-build.js +9 -0
  415. package/dist/node_modules/semver/functions/compare-loose.js +5 -0
  416. package/dist/node_modules/semver/functions/compare.js +7 -0
  417. package/dist/node_modules/semver/functions/diff.js +60 -0
  418. package/dist/node_modules/semver/functions/eq.js +5 -0
  419. package/dist/node_modules/semver/functions/gt.js +5 -0
  420. package/dist/node_modules/semver/functions/gte.js +5 -0
  421. package/dist/node_modules/semver/functions/inc.js +21 -0
  422. package/dist/node_modules/semver/functions/lt.js +5 -0
  423. package/dist/node_modules/semver/functions/lte.js +5 -0
  424. package/dist/node_modules/semver/functions/major.js +5 -0
  425. package/dist/node_modules/semver/functions/minor.js +5 -0
  426. package/dist/node_modules/semver/functions/neq.js +5 -0
  427. package/dist/node_modules/semver/functions/parse.js +18 -0
  428. package/dist/node_modules/semver/functions/patch.js +5 -0
  429. package/dist/node_modules/semver/functions/prerelease.js +8 -0
  430. package/dist/node_modules/semver/functions/rcompare.js +5 -0
  431. package/dist/node_modules/semver/functions/rsort.js +5 -0
  432. package/dist/node_modules/semver/functions/satisfies.js +12 -0
  433. package/dist/node_modules/semver/functions/sort.js +5 -0
  434. package/dist/node_modules/semver/functions/valid.js +8 -0
  435. package/dist/node_modules/semver/index.js +91 -0
  436. package/dist/node_modules/semver/internal/constants.js +37 -0
  437. package/dist/node_modules/semver/internal/debug.js +11 -0
  438. package/dist/node_modules/semver/internal/identifiers.js +29 -0
  439. package/dist/node_modules/semver/internal/lrucache.js +42 -0
  440. package/dist/node_modules/semver/internal/parse-options.js +17 -0
  441. package/dist/node_modules/semver/internal/re.js +223 -0
  442. package/dist/node_modules/semver/package.json +78 -0
  443. package/dist/node_modules/semver/preload.js +4 -0
  444. package/dist/node_modules/semver/range.bnf +16 -0
  445. package/dist/node_modules/semver/ranges/gtr.js +6 -0
  446. package/dist/node_modules/semver/ranges/intersects.js +9 -0
  447. package/dist/node_modules/semver/ranges/ltr.js +6 -0
  448. package/dist/node_modules/semver/ranges/max-satisfying.js +27 -0
  449. package/dist/node_modules/semver/ranges/min-satisfying.js +26 -0
  450. package/dist/node_modules/semver/ranges/min-version.js +63 -0
  451. package/dist/node_modules/semver/ranges/outside.js +82 -0
  452. package/dist/node_modules/semver/ranges/simplify.js +49 -0
  453. package/dist/node_modules/semver/ranges/subset.js +249 -0
  454. package/dist/node_modules/semver/ranges/to-comparators.js +10 -0
  455. package/dist/node_modules/semver/ranges/valid.js +13 -0
  456. package/dist/node_modules/smart-buffer/.prettierrc.yaml +5 -0
  457. package/dist/node_modules/smart-buffer/LICENSE +20 -0
  458. package/dist/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
  459. package/dist/node_modules/smart-buffer/build/utils.js +108 -0
  460. package/dist/node_modules/smart-buffer/package.json +79 -0
  461. package/dist/node_modules/socks/.eslintrc.cjs +11 -0
  462. package/dist/node_modules/socks/.prettierrc.yaml +7 -0
  463. package/dist/node_modules/socks/LICENSE +20 -0
  464. package/dist/node_modules/socks/build/client/socksclient.js +793 -0
  465. package/dist/node_modules/socks/build/common/constants.js +108 -0
  466. package/dist/node_modules/socks/build/common/helpers.js +167 -0
  467. package/dist/node_modules/socks/build/common/receivebuffer.js +43 -0
  468. package/dist/node_modules/socks/build/common/util.js +25 -0
  469. package/dist/node_modules/socks/build/index.js +18 -0
  470. package/dist/node_modules/socks/package.json +58 -0
  471. package/dist/node_modules/socks-proxy-agent/LICENSE +22 -0
  472. package/dist/node_modules/socks-proxy-agent/dist/index.js +195 -0
  473. package/dist/node_modules/socks-proxy-agent/package.json +142 -0
  474. package/dist/node_modules/ssri/lib/index.js +550 -0
  475. package/dist/node_modules/ssri/package.json +66 -0
  476. package/dist/node_modules/tar/dist/commonjs/create.js +82 -0
  477. package/dist/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  478. package/dist/node_modules/tar/dist/commonjs/extract.js +88 -0
  479. package/dist/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  480. package/dist/node_modules/tar/dist/commonjs/header.js +312 -0
  481. package/dist/node_modules/tar/dist/commonjs/index.js +64 -0
  482. package/dist/node_modules/tar/dist/commonjs/index.min.js +4 -0
  483. package/dist/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  484. package/dist/node_modules/tar/dist/commonjs/list.js +145 -0
  485. package/dist/node_modules/tar/dist/commonjs/make-command.js +52 -0
  486. package/dist/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  487. package/dist/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  488. package/dist/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  489. package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  490. package/dist/node_modules/tar/dist/commonjs/options.js +66 -0
  491. package/dist/node_modules/tar/dist/commonjs/pack.js +511 -0
  492. package/dist/node_modules/tar/dist/commonjs/package.json +3 -0
  493. package/dist/node_modules/tar/dist/commonjs/parse.js +610 -0
  494. package/dist/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  495. package/dist/node_modules/tar/dist/commonjs/pax.js +158 -0
  496. package/dist/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  497. package/dist/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  498. package/dist/node_modules/tar/dist/commonjs/replace.js +227 -0
  499. package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  500. package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  501. package/dist/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  502. package/dist/node_modules/tar/dist/commonjs/types.js +50 -0
  503. package/dist/node_modules/tar/dist/commonjs/unpack.js +932 -0
  504. package/dist/node_modules/tar/dist/commonjs/update.js +33 -0
  505. package/dist/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  506. package/dist/node_modules/tar/dist/commonjs/winchars.js +14 -0
  507. package/dist/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  508. package/dist/node_modules/tar/dist/esm/create.js +76 -0
  509. package/dist/node_modules/tar/dist/esm/cwd-error.js +14 -0
  510. package/dist/node_modules/tar/dist/esm/extract.js +49 -0
  511. package/dist/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  512. package/dist/node_modules/tar/dist/esm/header.js +275 -0
  513. package/dist/node_modules/tar/dist/esm/index.js +20 -0
  514. package/dist/node_modules/tar/dist/esm/index.min.js +4 -0
  515. package/dist/node_modules/tar/dist/esm/large-numbers.js +94 -0
  516. package/dist/node_modules/tar/dist/esm/list.js +105 -0
  517. package/dist/node_modules/tar/dist/esm/make-command.js +48 -0
  518. package/dist/node_modules/tar/dist/esm/mkdir.js +179 -0
  519. package/dist/node_modules/tar/dist/esm/mode-fix.js +25 -0
  520. package/dist/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  521. package/dist/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  522. package/dist/node_modules/tar/dist/esm/options.js +54 -0
  523. package/dist/node_modules/tar/dist/esm/pack.js +469 -0
  524. package/dist/node_modules/tar/dist/esm/package.json +3 -0
  525. package/dist/node_modules/tar/dist/esm/parse.js +606 -0
  526. package/dist/node_modules/tar/dist/esm/path-reservations.js +166 -0
  527. package/dist/node_modules/tar/dist/esm/pax.js +154 -0
  528. package/dist/node_modules/tar/dist/esm/process-umask.js +3 -0
  529. package/dist/node_modules/tar/dist/esm/read-entry.js +132 -0
  530. package/dist/node_modules/tar/dist/esm/replace.js +221 -0
  531. package/dist/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  532. package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  533. package/dist/node_modules/tar/dist/esm/symlink-error.js +15 -0
  534. package/dist/node_modules/tar/dist/esm/types.js +45 -0
  535. package/dist/node_modules/tar/dist/esm/unpack.js +891 -0
  536. package/dist/node_modules/tar/dist/esm/update.js +30 -0
  537. package/dist/node_modules/tar/dist/esm/warn-method.js +27 -0
  538. package/dist/node_modules/tar/dist/esm/winchars.js +9 -0
  539. package/dist/node_modules/tar/dist/esm/write-entry.js +656 -0
  540. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.js +384 -0
  541. package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +3 -0
  542. package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.js +379 -0
  543. package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +3 -0
  544. package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
  545. package/dist/node_modules/tar/package.json +297 -0
  546. package/dist/node_modules/tinyglobby/LICENSE +21 -0
  547. package/dist/node_modules/tinyglobby/dist/index.cjs +350 -0
  548. package/dist/node_modules/tinyglobby/dist/index.d.cts +147 -0
  549. package/dist/node_modules/tinyglobby/dist/index.d.mts +147 -0
  550. package/dist/node_modules/tinyglobby/dist/index.mjs +318 -0
  551. package/dist/node_modules/tinyglobby/package.json +73 -0
  552. package/{LICENSE → dist/node_modules/v8-compile-cache/LICENSE} +1 -2
  553. package/dist/node_modules/v8-compile-cache/package.json +34 -0
  554. package/dist/node_modules/v8-compile-cache/v8-compile-cache.js +373 -0
  555. package/dist/node_modules/which/LICENSE +15 -0
  556. package/dist/node_modules/which/bin/which.js +52 -0
  557. package/dist/node_modules/which/lib/index.js +111 -0
  558. package/dist/node_modules/which/package.json +52 -0
  559. package/dist/node_modules/yallist/LICENSE +15 -0
  560. package/dist/node_modules/yallist/iterator.js +8 -0
  561. package/dist/node_modules/yallist/package.json +29 -0
  562. package/dist/node_modules/yallist/yallist.js +426 -0
  563. package/dist/pnpm.mjs +266382 -0
  564. package/dist/pnpmrc +2 -0
  565. package/dist/templates/completion.bash +31 -0
  566. package/dist/templates/completion.fish +22 -0
  567. package/dist/templates/completion.ps1 +193 -0
  568. package/dist/templates/completion.zsh +27 -0
  569. package/dist/vendor/fastlist-0.3.0-x64.exe +0 -0
  570. package/dist/vendor/fastlist-0.3.0-x86.exe +0 -0
  571. package/dist/worker.js +10958 -0
  572. package/package.json +34 -12
  573. package/pn +2 -0
  574. package/pn.cmd +2 -0
  575. package/pn.ps1 +1 -0
  576. package/pnpx +2 -0
  577. package/pnpx.cmd +2 -0
  578. package/pnpx.ps1 +1 -0
  579. package/pnx +2 -0
  580. package/pnx.cmd +2 -0
  581. package/pnx.ps1 +1 -0
  582. package/prepare.js +26 -3
  583. package/setup.js +22 -11
  584. package/CHANGELOG.md +0 -15
@@ -0,0 +1,2 @@
1
+ var x=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,I=new Set,R=typeof process=="object"&&process?process:{},U=(c,t,e,i)=>{typeof R.emitWarning=="function"?R.emitWarning(c,t,e,i):console.error(`[${e}] ${t}: ${c}`)},C=globalThis.AbortController,D=globalThis.AbortSignal;if(typeof C>"u"){D=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},C=class{constructor(){t()}signal=new D;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let c=R.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{c&&(c=!1,U("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var G=c=>!I.has(c),H=Symbol("type"),y=c=>c&&c===Math.floor(c)&&c>0&&isFinite(c),M=c=>y(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?z:null:null,z=class extends Array{constructor(t){super(t),this.fill(0)}},W=class c{heap;length;static#o=!1;static create(t){let e=M(t);if(!e)return[];c.#o=!0;let i=new c(t,e);return c.#o=!1,i}constructor(t,e){if(!c.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},L=class c{#o;#c;#w;#C;#S;#L;#I;#m;get perf(){return this.#m}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#_;#s;#i;#t;#a;#u;#l;#h;#b;#r;#y;#A;#d;#g;#T;#v;#f;#U;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#d,autopurgeTimers:t.#g,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#a,prev:t.#u,get head(){return t.#l},get tail(){return t.#h},free:t.#b,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#G(e,i,s,n),moveToTail:e=>t.#D(e),indexes:e=>t.#F(e),rindexes:e=>t.#O(e),isStale:e=>t.#p(e)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#_}get size(){return this.#n}get fetchMethod(){return this.#L}get memoMethod(){return this.#I}get dispose(){return this.#w}get onInsert(){return this.#C}get disposeAfter(){return this.#S}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:r,dispose:a,onInsert:w,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:g,maxSize:A=0,maxEntrySize:p=0,sizeCalculation:_,fetchMethod:l,memoMethod:S,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:T,ignoreFetchAbort:F,perf:v}=t;if(v!==void 0&&typeof v?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#m=v??x,e!==0&&!y(e))throw new TypeError("max option must be a nonnegative integer");let O=e?M(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#o=e,this.#c=A,this.maxEntrySize=p||this.#c,this.sizeCalculation=_,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=S,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=l,this.#v=!!l,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#a=new O(e),this.#u=new O(e),this.#l=0,this.#h=0,this.#b=W.create(e),this.#n=0,this.#_=0,typeof a=="function"&&(this.#w=a),typeof w=="function"&&(this.#C=w),typeof f=="function"?(this.#S=f,this.#r=[]):(this.#S=void 0,this.#r=void 0),this.#T=!!this.#w,this.#U=!!this.#C,this.#f=!!this.#S,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!u,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!F,this.maxEntrySize!==0){if(this.#c!==0&&!y(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!y(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#B()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=y(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!y(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#j()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let E="LRU_CACHE_UNBOUNDED";G(E)&&(I.add(E),U("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,c))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#j(){let t=new z(this.#o),e=new z(this.#o);this.#d=t,this.#A=e;let i=this.ttlAutopurge?new Array(this.#o):void 0;this.#g=i,this.#N=(h,r,a=this.#m.now())=>{e[h]=r!==0?a:0,t[h]=r,s(h,r)},this.#R=h=>{e[h]=t[h]!==0?this.#m.now():0,s(h,t[h])};let s=this.ttlAutopurge?(h,r)=>{if(i?.[h]&&(clearTimeout(i[h]),i[h]=void 0),r&&r!==0&&i){let a=setTimeout(()=>{this.#p(h)&&this.#E(this.#i[h],"expire")},r+1);a.unref&&a.unref(),i[h]=a}}:()=>{};this.#z=(h,r)=>{if(t[r]){let a=t[r],w=e[r];if(!a||!w)return;h.ttl=a,h.start=w,h.now=n||o();let f=h.now-w;h.remainingTTL=a-f}};let n=0,o=()=>{let h=this.#m.now();if(this.ttlResolution>0){n=h;let r=setTimeout(()=>n=0,this.ttlResolution);r.unref&&r.unref()}return h};this.getRemainingTTL=h=>{let r=this.#s.get(h);if(r===void 0)return 0;let a=t[r],w=e[r];if(!a||!w)return 1/0;let f=(n||o())-w;return a-f},this.#p=h=>{let r=e[h],a=t[h];return!!a&&!!r&&(n||o())-r>a}}#R=()=>{};#z=()=>{};#N=()=>{};#p=()=>!1;#B(){let t=new z(this.#o);this.#_=0,this.#y=t,this.#W=e=>{this.#_-=t[e],t[e]=0},this.#P=(e,i,s,n)=>{if(this.#e(i))return 0;if(!y(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!y(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#M=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#_>n;)this.#x(!0)}this.#_+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#_)}}#W=t=>{};#M=(t,e,i)=>{};#P=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#H(e)||((t||!this.#p(e))&&(yield e),e===this.#l));)e=this.#u[e]}*#O({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#l;!(!this.#H(e)||((t||!this.#p(e))&&(yield e),e===this.#h));)e=this.#a[e]}#H(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#O())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#O()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#O())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#O()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#O({allowStale:!0}))this.#p(e)&&(this.#E(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#A){let o=this.#d[e],h=this.#A[e];if(o&&h){let r=o-(this.#m.now()-h);n.ttl=r,n.start=Date.now()}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#F({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#d&&this.#A){o.ttl=this.#d[e];let h=this.#m.now()-this.#A[e];o.start=Math.floor(Date.now()-h)}this.#y&&(o.size=this.#y[e]),t.unshift([i,o])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=this.#m.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:r}=i,{noUpdateTTL:a=this.noUpdateTTL}=i,w=this.#P(t,e,i.size||0,h);if(this.maxEntrySize&&w>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#E(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#b.length!==0?this.#b.pop():this.#n===this.#o?this.#x(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#a[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#M(f,w,r),r&&(r.set="add"),a=!1,this.#U&&this.#C?.(e,t,"add");else{this.#D(f);let d=this.#t[f];if(e!==d){if(this.#v&&this.#e(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=d;g!==void 0&&!o&&(this.#T&&this.#w?.(g,t,"set"),this.#f&&this.#r?.push([g,t,"set"]))}else o||(this.#T&&this.#w?.(d,t,"set"),this.#f&&this.#r?.push([d,t,"set"]));if(this.#W(f),this.#M(f,w,r),this.#t[f]=e,r){r.set="replace";let g=d&&this.#e(d)?d.__staleWhileFetching:d;g!==void 0&&(r.oldValue=g)}}else r&&(r.set="update");this.#U&&this.onInsert?.(e,t,e===d?"update":"replace")}if(s!==0&&!this.#d&&this.#j(),this.#d&&(a||this.#N(f,s,n),r&&this.#z(r,f)),!o&&this.#f&&this.#r){let d=this.#r,g;for(;g=d?.shift();)this.#S?.(...g)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#l];if(this.#x(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#S?.(...e)}}}#x(t){let e=this.#l,i=this.#i[e],s=this.#t[e];return this.#v&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#T||this.#f)&&(this.#T&&this.#w?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#W(e),this.#g?.[e]&&(clearTimeout(this.#g[e]),this.#g[e]=void 0),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#n===1?(this.#l=this.#h=0,this.#b.length=0):this.#l=this.#a[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let o=this.#t[n];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#z(s,n));else return i&&this.#R(n),s&&(s.has="hit",this.#z(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#G(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let o=new C,{signal:h}=i;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let r={signal:o.signal,options:i,context:s},a=(p,_=!1)=>{let{aborted:l}=o.signal,S=i.ignoreFetchAbort&&p!==void 0,b=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&p!==void 0);if(i.status&&(l&&!_?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!S&&!_)return f(o.signal.reason,b);let m=g,u=this.#t[e];return(u===g||S&&_&&u===void 0)&&(p===void 0?m.__staleWhileFetching!==void 0?this.#t[e]=m.__staleWhileFetching:this.#E(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,p,r.options))),p},w=p=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=p),f(p,!1)),f=(p,_)=>{let{aborted:l}=o.signal,S=l&&i.allowStaleOnFetchAbort,b=S||i.allowStaleOnFetchRejection,m=b||i.noDeleteOnFetchRejection,u=g;if(this.#t[e]===g&&(!m||!_&&u.__staleWhileFetching===void 0?this.#E(t,"fetch"):S||(this.#t[e]=u.__staleWhileFetching)),b)return i.status&&u.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw p},d=(p,_)=>{let l=this.#L?.(t,n,r);l&&l instanceof Promise&&l.then(S=>p(S===void 0?void 0:S),_),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(p(void 0),i.allowStaleOnFetchAbort&&(p=S=>a(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let g=new Promise(d).then(a,w),A=Object.assign(g,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#v)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:r=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:w=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:p,forceRefresh:_=!1,status:l,signal:S}=e;if(!this.#v)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let b={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:h,size:r,sizeCalculation:a,noUpdateTTL:w,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:A,ignoreFetchAbort:g,status:l,signal:S},m=this.#s.get(t);if(m===void 0){l&&(l.fetch="miss");let u=this.#G(t,m,b,p);return u.__returned=u}else{let u=this.#t[m];if(this.#e(u)){let E=i&&u.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",E&&(l.returnedStale=!0)),E?u.__staleWhileFetching:u.__returned=u}let T=this.#p(m);if(!_&&!T)return l&&(l.fetch="hit"),this.#D(m),s&&this.#R(m),l&&this.#z(l,m),u;let F=this.#G(t,m,b,p),O=F.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=T?"stale":"refresh",O&&T&&(l.returnedStale=!0)),O?F.__staleWhileFetching:F.__returned=F}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...o}=e,h=this.get(t,o);if(!n&&h!==void 0)return h;let r=i(t,h,{options:o,context:s});return this.set(t,r,o),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=e,h=this.#s.get(t);if(h!==void 0){let r=this.#t[h],a=this.#e(r);return o&&this.#z(o,h),this.#p(h)?(o&&(o.get="stale"),a?(o&&i&&r.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#E(t,"expire"),o&&i&&(o.returnedStale=!0),i?r:void 0)):(o&&(o.get="hit"),a?r.__staleWhileFetching:(this.#D(h),s&&this.#R(h),r))}else o&&(o.get="miss")}#k(t,e){this.#u[e]=t,this.#a[t]=e}#D(t){t!==this.#h&&(t===this.#l?this.#l=this.#a[t]:this.#k(this.#u[t],this.#a[t]),this.#k(this.#h,t),this.#h=t)}delete(t){return this.#E(t,"delete")}#E(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#V(e);else{this.#W(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#w?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#l)this.#l=this.#a[s];else{let o=this.#u[s];this.#a[o]=this.#a[s];let h=this.#a[s];this.#u[h]=this.#u[s]}this.#n--,this.#b.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#S?.(...n)}return i}clear(){return this.#V("delete")}#V(t){for(let e of this.#O({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#T&&this.#w?.(i,s,t),this.#f&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#A){this.#d.fill(0),this.#A.fill(0);for(let e of this.#g??[])e!==void 0&&clearTimeout(e);this.#g?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#l=0,this.#h=0,this.#b.length=0,this.#_=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#S?.(...i)}}};export{L as LRUCache};
2
+ //# sourceMappingURL=index.min.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "lru-cache",
3
+ "description": "A cache object that deletes the least-recently-used items.",
4
+ "version": "11.2.7",
5
+ "author": "Isaac Z. Schlueter <i@izs.me>",
6
+ "keywords": [
7
+ "mru",
8
+ "lru",
9
+ "cache"
10
+ ],
11
+ "sideEffects": false,
12
+ "scripts": {
13
+ "build": "npm run prepare",
14
+ "prepare": "tshy && bash fixup.sh",
15
+ "pretest": "npm run prepare",
16
+ "presnap": "npm run prepare",
17
+ "test": "tap",
18
+ "snap": "tap",
19
+ "preversion": "npm test",
20
+ "postversion": "npm publish",
21
+ "prepublishOnly": "git push origin --follow-tags",
22
+ "format": "prettier --write .",
23
+ "typedoc": "typedoc --tsconfig ./.tshy/esm.json ./src/*.ts",
24
+ "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh",
25
+ "prebenchmark": "npm run prepare",
26
+ "benchmark": "make -C benchmark",
27
+ "preprofile": "npm run prepare",
28
+ "profile": "make -C benchmark profile"
29
+ },
30
+ "main": "./dist/commonjs/index.min.js",
31
+ "types": "./dist/commonjs/index.d.ts",
32
+ "tshy": {
33
+ "exports": {
34
+ "./raw": "./src/index.ts",
35
+ ".": {
36
+ "import": {
37
+ "types": "./dist/esm/index.d.ts",
38
+ "default": "./dist/esm/index.min.js"
39
+ },
40
+ "require": {
41
+ "types": "./dist/commonjs/index.d.ts",
42
+ "default": "./dist/commonjs/index.min.js"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+ssh://git@github.com/isaacs/node-lru-cache.git"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^24.3.0",
53
+ "benchmark": "^2.1.4",
54
+ "esbuild": "^0.25.9",
55
+ "marked": "^4.2.12",
56
+ "mkdirp": "^3.0.1",
57
+ "prettier": "^3.6.2",
58
+ "tap": "^21.1.0",
59
+ "tshy": "^3.0.2",
60
+ "typedoc": "^0.28.12"
61
+ },
62
+ "license": "BlueOak-1.0.0",
63
+ "files": [
64
+ "dist"
65
+ ],
66
+ "engines": {
67
+ "node": "20 || >=22"
68
+ },
69
+ "exports": {
70
+ "./raw": {
71
+ "import": {
72
+ "types": "./dist/esm/index.d.ts",
73
+ "default": "./dist/esm/index.js"
74
+ },
75
+ "require": {
76
+ "types": "./dist/commonjs/index.d.ts",
77
+ "default": "./dist/commonjs/index.js"
78
+ }
79
+ },
80
+ ".": {
81
+ "import": {
82
+ "types": "./dist/esm/index.d.ts",
83
+ "default": "./dist/esm/index.min.js"
84
+ },
85
+ "require": {
86
+ "types": "./dist/commonjs/index.d.ts",
87
+ "default": "./dist/commonjs/index.min.js"
88
+ }
89
+ }
90
+ },
91
+ "type": "module",
92
+ "module": "./dist/esm/index.min.js"
93
+ }
@@ -0,0 +1,16 @@
1
+ ISC License
2
+
3
+ Copyright 2017-2022 (c) npm, Inc.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for
6
+ any purpose with or without fee is hereby granted, provided that the
7
+ above copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
10
+ ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12
+ COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
13
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
16
+ USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,471 @@
1
+ const { Request, Response } = require('minipass-fetch')
2
+ const { Minipass } = require('minipass')
3
+ const MinipassFlush = require('minipass-flush')
4
+ const cacache = require('cacache')
5
+ const url = require('url')
6
+
7
+ const CachingMinipassPipeline = require('../pipeline.js')
8
+ const CachePolicy = require('./policy.js')
9
+ const cacheKey = require('./key.js')
10
+ const remote = require('../remote.js')
11
+
12
+ const hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
13
+
14
+ // allow list for request headers that will be written to the cache index
15
+ // note: we will also store any request headers
16
+ // that are named in a response's vary header
17
+ const KEEP_REQUEST_HEADERS = [
18
+ 'accept-charset',
19
+ 'accept-encoding',
20
+ 'accept-language',
21
+ 'accept',
22
+ 'cache-control',
23
+ ]
24
+
25
+ // allow list for response headers that will be written to the cache index
26
+ // note: we must not store the real response's age header, or when we load
27
+ // a cache policy based on the metadata it will think the cached response
28
+ // is always stale
29
+ const KEEP_RESPONSE_HEADERS = [
30
+ 'cache-control',
31
+ 'content-encoding',
32
+ 'content-language',
33
+ 'content-type',
34
+ 'date',
35
+ 'etag',
36
+ 'expires',
37
+ 'last-modified',
38
+ 'link',
39
+ 'location',
40
+ 'pragma',
41
+ 'vary',
42
+ ]
43
+
44
+ // return an object containing all metadata to be written to the index
45
+ const getMetadata = (request, response, options) => {
46
+ const metadata = {
47
+ time: Date.now(),
48
+ url: request.url,
49
+ reqHeaders: {},
50
+ resHeaders: {},
51
+
52
+ // options on which we must match the request and vary the response
53
+ options: {
54
+ compress: options.compress != null ? options.compress : request.compress,
55
+ },
56
+ }
57
+
58
+ // only save the status if it's not a 200 or 304
59
+ if (response.status !== 200 && response.status !== 304) {
60
+ metadata.status = response.status
61
+ }
62
+
63
+ for (const name of KEEP_REQUEST_HEADERS) {
64
+ if (request.headers.has(name)) {
65
+ metadata.reqHeaders[name] = request.headers.get(name)
66
+ }
67
+ }
68
+
69
+ // if the request's host header differs from the host in the url
70
+ // we need to keep it, otherwise it's just noise and we ignore it
71
+ const host = request.headers.get('host')
72
+ const parsedUrl = new url.URL(request.url)
73
+ if (host && parsedUrl.host !== host) {
74
+ metadata.reqHeaders.host = host
75
+ }
76
+
77
+ // if the response has a vary header, make sure
78
+ // we store the relevant request headers too
79
+ if (response.headers.has('vary')) {
80
+ const vary = response.headers.get('vary')
81
+ // a vary of "*" means every header causes a different response.
82
+ // in that scenario, we do not include any additional headers
83
+ // as the freshness check will always fail anyway and we don't
84
+ // want to bloat the cache indexes
85
+ if (vary !== '*') {
86
+ // copy any other request headers that will vary the response
87
+ const varyHeaders = vary.trim().toLowerCase().split(/\s*,\s*/)
88
+ for (const name of varyHeaders) {
89
+ if (request.headers.has(name)) {
90
+ metadata.reqHeaders[name] = request.headers.get(name)
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ for (const name of KEEP_RESPONSE_HEADERS) {
97
+ if (response.headers.has(name)) {
98
+ metadata.resHeaders[name] = response.headers.get(name)
99
+ }
100
+ }
101
+
102
+ for (const name of options.cacheAdditionalHeaders) {
103
+ if (response.headers.has(name)) {
104
+ metadata.resHeaders[name] = response.headers.get(name)
105
+ }
106
+ }
107
+
108
+ return metadata
109
+ }
110
+
111
+ // symbols used to hide objects that may be lazily evaluated in a getter
112
+ const _request = Symbol('request')
113
+ const _response = Symbol('response')
114
+ const _policy = Symbol('policy')
115
+
116
+ class CacheEntry {
117
+ constructor ({ entry, request, response, options }) {
118
+ if (entry) {
119
+ this.key = entry.key
120
+ this.entry = entry
121
+ // previous versions of this module didn't write an explicit timestamp in
122
+ // the metadata, so fall back to the entry's timestamp. we can't use the
123
+ // entry timestamp to determine staleness because cacache will update it
124
+ // when it verifies its data
125
+ this.entry.metadata.time = this.entry.metadata.time || this.entry.time
126
+ } else {
127
+ this.key = cacheKey(request)
128
+ }
129
+
130
+ this.options = options
131
+
132
+ // these properties are behind getters that lazily evaluate
133
+ this[_request] = request
134
+ this[_response] = response
135
+ this[_policy] = null
136
+ }
137
+
138
+ // returns a CacheEntry instance that satisfies the given request
139
+ // or undefined if no existing entry satisfies
140
+ static async find (request, options) {
141
+ try {
142
+ // compacts the index and returns an array of unique entries
143
+ var matches = await cacache.index.compact(options.cachePath, cacheKey(request), (A, B) => {
144
+ const entryA = new CacheEntry({ entry: A, options })
145
+ const entryB = new CacheEntry({ entry: B, options })
146
+ return entryA.policy.satisfies(entryB.request)
147
+ }, {
148
+ validateEntry: (entry) => {
149
+ // clean out entries with a buggy content-encoding value
150
+ if (entry.metadata &&
151
+ entry.metadata.resHeaders &&
152
+ entry.metadata.resHeaders['content-encoding'] === null) {
153
+ return false
154
+ }
155
+
156
+ // if an integrity is null, it needs to have a status specified
157
+ if (entry.integrity === null) {
158
+ return !!(entry.metadata && entry.metadata.status)
159
+ }
160
+
161
+ return true
162
+ },
163
+ })
164
+ } catch (err) {
165
+ // if the compact request fails, ignore the error and return
166
+ return
167
+ }
168
+
169
+ // a cache mode of 'reload' means to behave as though we have no cache
170
+ // on the way to the network. return undefined to allow cacheFetch to
171
+ // create a brand new request no matter what.
172
+ if (options.cache === 'reload') {
173
+ return
174
+ }
175
+
176
+ // find the specific entry that satisfies the request
177
+ let match
178
+ for (const entry of matches) {
179
+ const _entry = new CacheEntry({
180
+ entry,
181
+ options,
182
+ })
183
+
184
+ if (_entry.policy.satisfies(request)) {
185
+ match = _entry
186
+ break
187
+ }
188
+ }
189
+
190
+ return match
191
+ }
192
+
193
+ // if the user made a PUT/POST/PATCH then we invalidate our
194
+ // cache for the same url by deleting the index entirely
195
+ static async invalidate (request, options) {
196
+ const key = cacheKey(request)
197
+ try {
198
+ await cacache.rm.entry(options.cachePath, key, { removeFully: true })
199
+ } catch (err) {
200
+ // ignore errors
201
+ }
202
+ }
203
+
204
+ get request () {
205
+ if (!this[_request]) {
206
+ this[_request] = new Request(this.entry.metadata.url, {
207
+ method: 'GET',
208
+ headers: this.entry.metadata.reqHeaders,
209
+ ...this.entry.metadata.options,
210
+ })
211
+ }
212
+
213
+ return this[_request]
214
+ }
215
+
216
+ get response () {
217
+ if (!this[_response]) {
218
+ this[_response] = new Response(null, {
219
+ url: this.entry.metadata.url,
220
+ counter: this.options.counter,
221
+ status: this.entry.metadata.status || 200,
222
+ headers: {
223
+ ...this.entry.metadata.resHeaders,
224
+ 'content-length': this.entry.size,
225
+ },
226
+ })
227
+ }
228
+
229
+ return this[_response]
230
+ }
231
+
232
+ get policy () {
233
+ if (!this[_policy]) {
234
+ this[_policy] = new CachePolicy({
235
+ entry: this.entry,
236
+ request: this.request,
237
+ response: this.response,
238
+ options: this.options,
239
+ })
240
+ }
241
+
242
+ return this[_policy]
243
+ }
244
+
245
+ // wraps the response in a pipeline that stores the data
246
+ // in the cache while the user consumes it
247
+ async store (status) {
248
+ // if we got a status other than 200, 301, or 308,
249
+ // or the CachePolicy forbid storage, append the
250
+ // cache status header and return it untouched
251
+ if (
252
+ this.request.method !== 'GET' ||
253
+ ![200, 301, 308].includes(this.response.status) ||
254
+ !this.policy.storable()
255
+ ) {
256
+ this.response.headers.set('x-local-cache-status', 'skip')
257
+ return this.response
258
+ }
259
+
260
+ const size = this.response.headers.get('content-length')
261
+ const cacheOpts = {
262
+ algorithms: this.options.algorithms,
263
+ metadata: getMetadata(this.request, this.response, this.options),
264
+ size,
265
+ integrity: this.options.integrity,
266
+ integrityEmitter: this.response.body.hasIntegrityEmitter && this.response.body,
267
+ }
268
+
269
+ let body = null
270
+ // we only set a body if the status is a 200, redirects are
271
+ // stored as metadata only
272
+ if (this.response.status === 200) {
273
+ let cacheWriteResolve, cacheWriteReject
274
+ const cacheWritePromise = new Promise((resolve, reject) => {
275
+ cacheWriteResolve = resolve
276
+ cacheWriteReject = reject
277
+ }).catch((err) => {
278
+ body.emit('error', err)
279
+ })
280
+
281
+ body = new CachingMinipassPipeline({ events: ['integrity', 'size'] }, new MinipassFlush({
282
+ flush () {
283
+ return cacheWritePromise
284
+ },
285
+ }))
286
+ // this is always true since if we aren't reusing the one from the remote fetch, we
287
+ // are using the one from cacache
288
+ body.hasIntegrityEmitter = true
289
+
290
+ const onResume = () => {
291
+ const tee = new Minipass()
292
+ const cacheStream = cacache.put.stream(this.options.cachePath, this.key, cacheOpts)
293
+ // re-emit the integrity and size events on our new response body so they can be reused
294
+ cacheStream.on('integrity', i => body.emit('integrity', i))
295
+ cacheStream.on('size', s => body.emit('size', s))
296
+ // stick a flag on here so downstream users will know if they can expect integrity events
297
+ tee.pipe(cacheStream)
298
+ // TODO if the cache write fails, log a warning but return the response anyway
299
+ // eslint-disable-next-line promise/catch-or-return
300
+ cacheStream.promise().then(cacheWriteResolve, cacheWriteReject)
301
+ body.unshift(tee)
302
+ body.unshift(this.response.body)
303
+ }
304
+
305
+ body.once('resume', onResume)
306
+ body.once('end', () => body.removeListener('resume', onResume))
307
+ } else {
308
+ await cacache.index.insert(this.options.cachePath, this.key, null, cacheOpts)
309
+ }
310
+
311
+ // note: we do not set the x-local-cache-hash header because we do not know
312
+ // the hash value until after the write to the cache completes, which doesn't
313
+ // happen until after the response has been sent and it's too late to write
314
+ // the header anyway
315
+ this.response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath))
316
+ this.response.headers.set('x-local-cache-key', encodeURIComponent(this.key))
317
+ this.response.headers.set('x-local-cache-mode', 'stream')
318
+ this.response.headers.set('x-local-cache-status', status)
319
+ this.response.headers.set('x-local-cache-time', new Date().toISOString())
320
+ const newResponse = new Response(body, {
321
+ url: this.response.url,
322
+ status: this.response.status,
323
+ headers: this.response.headers,
324
+ counter: this.options.counter,
325
+ })
326
+ return newResponse
327
+ }
328
+
329
+ // use the cached data to create a response and return it
330
+ async respond (method, options, status) {
331
+ let response
332
+ if (method === 'HEAD' || [301, 308].includes(this.response.status)) {
333
+ // if the request is a HEAD, or the response is a redirect,
334
+ // then the metadata in the entry already includes everything
335
+ // we need to build a response
336
+ response = this.response
337
+ } else {
338
+ // we're responding with a full cached response, so create a body
339
+ // that reads from cacache and attach it to a new Response
340
+ const body = new Minipass()
341
+ const headers = { ...this.policy.responseHeaders() }
342
+
343
+ const onResume = () => {
344
+ const cacheStream = cacache.get.stream.byDigest(
345
+ this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }
346
+ )
347
+ cacheStream.on('error', async (err) => {
348
+ cacheStream.pause()
349
+ if (err.code === 'EINTEGRITY') {
350
+ await cacache.rm.content(
351
+ this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize }
352
+ )
353
+ }
354
+ if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') {
355
+ await CacheEntry.invalidate(this.request, this.options)
356
+ }
357
+ body.emit('error', err)
358
+ cacheStream.resume()
359
+ })
360
+ // emit the integrity and size events based on our metadata so we're consistent
361
+ body.emit('integrity', this.entry.integrity)
362
+ body.emit('size', Number(headers['content-length']))
363
+ cacheStream.pipe(body)
364
+ }
365
+
366
+ body.once('resume', onResume)
367
+ body.once('end', () => body.removeListener('resume', onResume))
368
+ response = new Response(body, {
369
+ url: this.entry.metadata.url,
370
+ counter: options.counter,
371
+ status: 200,
372
+ headers,
373
+ })
374
+ }
375
+
376
+ response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath))
377
+ response.headers.set('x-local-cache-hash', encodeURIComponent(this.entry.integrity))
378
+ response.headers.set('x-local-cache-key', encodeURIComponent(this.key))
379
+ response.headers.set('x-local-cache-mode', 'stream')
380
+ response.headers.set('x-local-cache-status', status)
381
+ response.headers.set('x-local-cache-time', new Date(this.entry.metadata.time).toUTCString())
382
+ return response
383
+ }
384
+
385
+ // use the provided request along with this cache entry to
386
+ // revalidate the stored response. returns a response, either
387
+ // from the cache or from the update
388
+ async revalidate (request, options) {
389
+ const revalidateRequest = new Request(request, {
390
+ headers: this.policy.revalidationHeaders(request),
391
+ })
392
+
393
+ try {
394
+ // NOTE: be sure to remove the headers property from the
395
+ // user supplied options, since we have already defined
396
+ // them on the new request object. if they're still in the
397
+ // options then those will overwrite the ones from the policy
398
+ var response = await remote(revalidateRequest, {
399
+ ...options,
400
+ headers: undefined,
401
+ })
402
+ } catch (err) {
403
+ // if the network fetch fails, return the stale
404
+ // cached response unless it has a cache-control
405
+ // of 'must-revalidate'
406
+ if (!this.policy.mustRevalidate) {
407
+ return this.respond(request.method, options, 'stale')
408
+ }
409
+
410
+ throw err
411
+ }
412
+
413
+ if (this.policy.revalidated(revalidateRequest, response)) {
414
+ // we got a 304, write a new index to the cache and respond from cache
415
+ const metadata = getMetadata(request, response, options)
416
+ // 304 responses do not include headers that are specific to the response data
417
+ // since they do not include a body, so we copy values for headers that were
418
+ // in the old cache entry to the new one, if the new metadata does not already
419
+ // include that header
420
+ for (const name of KEEP_RESPONSE_HEADERS) {
421
+ if (
422
+ !hasOwnProperty(metadata.resHeaders, name) &&
423
+ hasOwnProperty(this.entry.metadata.resHeaders, name)
424
+ ) {
425
+ metadata.resHeaders[name] = this.entry.metadata.resHeaders[name]
426
+ }
427
+ }
428
+
429
+ for (const name of options.cacheAdditionalHeaders) {
430
+ const inMeta = hasOwnProperty(metadata.resHeaders, name)
431
+ const inEntry = hasOwnProperty(this.entry.metadata.resHeaders, name)
432
+ const inPolicy = hasOwnProperty(this.policy.response.headers, name)
433
+
434
+ // if the header is in the existing entry, but it is not in the metadata
435
+ // then we need to write it to the metadata as this will refresh the on-disk cache
436
+ if (!inMeta && inEntry) {
437
+ metadata.resHeaders[name] = this.entry.metadata.resHeaders[name]
438
+ }
439
+ // if the header is in the metadata, but not in the policy, then we need to set
440
+ // it in the policy so that it's included in the immediate response. future
441
+ // responses will load a new cache entry, so we don't need to change that
442
+ if (!inPolicy && inMeta) {
443
+ this.policy.response.headers[name] = metadata.resHeaders[name]
444
+ }
445
+ }
446
+
447
+ try {
448
+ await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, {
449
+ size: this.entry.size,
450
+ metadata,
451
+ })
452
+ } catch (err) {
453
+ // if updating the cache index fails, we ignore it and
454
+ // respond anyway
455
+ }
456
+ return this.respond(request.method, options, 'revalidated')
457
+ }
458
+
459
+ // if we got a modified response, create a new entry based on it
460
+ const newEntry = new CacheEntry({
461
+ request,
462
+ response,
463
+ options,
464
+ })
465
+
466
+ // respond with the new entry while writing it to the cache
467
+ return newEntry.store('updated')
468
+ }
469
+ }
470
+
471
+ module.exports = CacheEntry
@@ -0,0 +1,11 @@
1
+ class NotCachedError extends Error {
2
+ constructor (url) {
3
+ /* eslint-disable-next-line max-len */
4
+ super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`)
5
+ this.code = 'ENOTCACHED'
6
+ }
7
+ }
8
+
9
+ module.exports = {
10
+ NotCachedError,
11
+ }