@ashx-j/lunr-dev 0.2.16-dev.9.1 → 0.2.19-dev.10.1

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 (255) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/README.md +7 -1
  3. package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -0
  4. package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
  5. package/dist/builtin-extensions/ashxj-thinking.js +44 -19
  6. package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
  7. package/dist/builtin-extensions/index.d.ts.map +1 -1
  8. package/dist/builtin-extensions/index.js +1 -0
  9. package/dist/builtin-extensions/index.js.map +1 -1
  10. package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
  11. package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
  12. package/dist/builtin-extensions/lunr-computer-use.js +157 -0
  13. package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
  14. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +10 -3
  16. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  17. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +5 -1
  18. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -1
  19. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +26 -4
  20. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -1
  21. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  22. package/dist/builtin-extensions/pi-mcp-adapter/index.js +37 -27
  23. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  24. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
  25. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
  26. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
  27. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  29. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +52 -23
  30. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  31. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  32. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +6 -2
  33. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  34. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
  35. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  36. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
  37. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  38. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts +10 -0
  39. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts.map +1 -0
  40. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js +38 -0
  41. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js.map +1 -0
  42. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  43. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +3 -16
  44. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  45. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
  48. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
  49. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -0
  50. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +70 -30
  52. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  53. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  54. package/dist/builtin-extensions/pi-web-access/index.js +103 -102
  55. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  56. package/dist/core/agent-session-services.d.ts.map +1 -1
  57. package/dist/core/agent-session-services.js +1 -1
  58. package/dist/core/agent-session-services.js.map +1 -1
  59. package/dist/core/computer-use/adapter.d.ts +23 -0
  60. package/dist/core/computer-use/adapter.d.ts.map +1 -0
  61. package/dist/core/computer-use/adapter.js +116 -0
  62. package/dist/core/computer-use/adapter.js.map +1 -0
  63. package/dist/core/computer-use/lease.d.ts +18 -0
  64. package/dist/core/computer-use/lease.d.ts.map +1 -0
  65. package/dist/core/computer-use/lease.js +129 -0
  66. package/dist/core/computer-use/lease.js.map +1 -0
  67. package/dist/core/computer-use/macos-runtime.d.ts +14 -0
  68. package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
  69. package/dist/core/computer-use/macos-runtime.js +148 -0
  70. package/dist/core/computer-use/macos-runtime.js.map +1 -0
  71. package/dist/core/computer-use/policy.d.ts +19 -0
  72. package/dist/core/computer-use/policy.d.ts.map +1 -0
  73. package/dist/core/computer-use/policy.js +66 -0
  74. package/dist/core/computer-use/policy.js.map +1 -0
  75. package/dist/core/computer-use/release.generated.d.ts +31 -0
  76. package/dist/core/computer-use/release.generated.d.ts.map +1 -0
  77. package/dist/core/computer-use/release.generated.js +36 -0
  78. package/dist/core/computer-use/release.generated.js.map +1 -0
  79. package/dist/core/computer-use/runtime.d.ts +13 -0
  80. package/dist/core/computer-use/runtime.d.ts.map +1 -0
  81. package/dist/core/computer-use/runtime.js +158 -0
  82. package/dist/core/computer-use/runtime.js.map +1 -0
  83. package/dist/core/computer-use/schemas.d.ts +88 -0
  84. package/dist/core/computer-use/schemas.d.ts.map +1 -0
  85. package/dist/core/computer-use/schemas.js +80 -0
  86. package/dist/core/computer-use/schemas.js.map +1 -0
  87. package/dist/core/computer-use/windows-desktop.d.ts +3 -0
  88. package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
  89. package/dist/core/computer-use/windows-desktop.js +48 -0
  90. package/dist/core/computer-use/windows-desktop.js.map +1 -0
  91. package/dist/core/computer-use/workflow.d.ts +24 -0
  92. package/dist/core/computer-use/workflow.d.ts.map +1 -0
  93. package/dist/core/computer-use/workflow.js +330 -0
  94. package/dist/core/computer-use/workflow.js.map +1 -0
  95. package/dist/core/keybindings.d.ts +2 -2
  96. package/dist/core/keybindings.d.ts.map +1 -1
  97. package/dist/core/keybindings.js +2 -2
  98. package/dist/core/keybindings.js.map +1 -1
  99. package/dist/core/model-runtime.d.ts +0 -3
  100. package/dist/core/model-runtime.d.ts.map +1 -1
  101. package/dist/core/model-runtime.js +1 -10
  102. package/dist/core/model-runtime.js.map +1 -1
  103. package/dist/core/package-manager.d.ts.map +1 -1
  104. package/dist/core/package-manager.js +1 -1
  105. package/dist/core/package-manager.js.map +1 -1
  106. package/dist/core/permissions.d.ts +1 -1
  107. package/dist/core/permissions.d.ts.map +1 -1
  108. package/dist/core/permissions.js +23 -7
  109. package/dist/core/permissions.js.map +1 -1
  110. package/dist/core/plan-mode.d.ts.map +1 -1
  111. package/dist/core/plan-mode.js +9 -0
  112. package/dist/core/plan-mode.js.map +1 -1
  113. package/dist/core/rollback.d.ts.map +1 -1
  114. package/dist/core/rollback.js +13 -90
  115. package/dist/core/rollback.js.map +1 -1
  116. package/dist/core/session-manager.d.ts +0 -1
  117. package/dist/core/session-manager.d.ts.map +1 -1
  118. package/dist/core/session-manager.js +21 -79
  119. package/dist/core/session-manager.js.map +1 -1
  120. package/dist/core/settings-manager.d.ts +6 -0
  121. package/dist/core/settings-manager.d.ts.map +1 -1
  122. package/dist/core/settings-manager.js +19 -0
  123. package/dist/core/settings-manager.js.map +1 -1
  124. package/dist/dev-cli.js +0 -0
  125. package/dist/gateway/agent-bridge.d.ts +6 -1
  126. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  127. package/dist/gateway/agent-bridge.js +23 -6
  128. package/dist/gateway/agent-bridge.js.map +1 -1
  129. package/dist/gateway/cron.d.ts +1 -1
  130. package/dist/gateway/cron.d.ts.map +1 -1
  131. package/dist/gateway/cron.js +23 -7
  132. package/dist/gateway/cron.js.map +1 -1
  133. package/dist/modes/interactive/components/footer.d.ts +4 -2
  134. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  135. package/dist/modes/interactive/components/footer.js +23 -32
  136. package/dist/modes/interactive/components/footer.js.map +1 -1
  137. package/dist/modes/interactive/components/processes-selector.d.ts +2 -3
  138. package/dist/modes/interactive/components/processes-selector.d.ts.map +1 -1
  139. package/dist/modes/interactive/components/processes-selector.js +5 -10
  140. package/dist/modes/interactive/components/processes-selector.js.map +1 -1
  141. package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
  142. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  143. package/dist/modes/interactive/components/settings-selector.js +20 -0
  144. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  145. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  146. package/dist/modes/interactive/interactive-mode.js +18 -8
  147. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  148. package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
  149. package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
  150. package/dist/modes/interactive/thinking-level-slash.js +23 -0
  151. package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
  152. package/dist/node-runtime/adapter-AZMY335J.js +279 -0
  153. package/dist/node-runtime/{agent-session-services-IFJMSX7Z.js → agent-session-services-RSGP5GDN.js} +15 -12
  154. package/dist/node-runtime/{builtin-extensions-LYZ3BFWQ.js → builtin-extensions-7STLFW3A.js} +4 -3
  155. package/dist/node-runtime/chunk-2IDTZAG5.js +1415 -0
  156. package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-4SJWFTUP.js} +1 -1
  157. package/dist/node-runtime/{chunk-AJX357CL.js → chunk-5NWQCSKR.js} +20 -1013
  158. package/dist/node-runtime/chunk-5OLJGVCB.js +68 -0
  159. package/dist/node-runtime/chunk-5Q45AVQG.js +108 -0
  160. package/dist/node-runtime/{chunk-TQNSPERU.js → chunk-5SQDLSZJ.js} +1 -1
  161. package/dist/node-runtime/{chunk-F4VQFJI2.js → chunk-6SPPH4FY.js} +4 -4
  162. package/dist/node-runtime/{chunk-PBC2Y6GS.js → chunk-6UB6NKA3.js} +29 -72
  163. package/dist/node-runtime/{chunk-A2KQXUJD.js → chunk-7AFOFSDY.js} +1 -1
  164. package/dist/node-runtime/chunk-BKAZ6BKX.js +2185 -0
  165. package/dist/node-runtime/{chunk-AHSTJBIB.js → chunk-EH2LJQPM.js} +4 -4
  166. package/dist/node-runtime/{chunk-N77MY65L.js → chunk-FLYMHKCS.js} +25 -25
  167. package/dist/node-runtime/{chunk-5P7PZMRU.js → chunk-HRS4HMDX.js} +1 -1
  168. package/dist/node-runtime/{chunk-IPA627GP.js → chunk-ISQDQIZN.js} +4 -4
  169. package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-J7QGQD45.js} +1 -1
  170. package/dist/node-runtime/{chunk-WOVTOV5P.js → chunk-JT6YCS5B.js} +29 -34
  171. package/dist/node-runtime/chunk-JZHEUQRL.js +180 -0
  172. package/dist/node-runtime/{chunk-ZKMFUD3Q.js → chunk-K72NVGUB.js} +3 -3
  173. package/dist/node-runtime/{chunk-ECD5L7YI.js → chunk-LCACDWHJ.js} +389 -15
  174. package/dist/node-runtime/{chunk-2QKLKMKC.js → chunk-LTXUQJI4.js} +1 -1
  175. package/dist/node-runtime/{chunk-MKKH27PH.js → chunk-LWJXTA6Z.js} +274 -2416
  176. package/dist/node-runtime/{chunk-EDBJNRSM.js → chunk-MGSB2C3M.js} +1 -1
  177. package/dist/node-runtime/{chunk-CDFZEWPU.js → chunk-MUMMMTW4.js} +6 -2
  178. package/dist/node-runtime/{chunk-YF63P5ZT.js → chunk-OTT6JMPU.js} +10 -67
  179. package/dist/node-runtime/{chunk-PGAJ5MO5.js → chunk-T5GM5BFH.js} +1 -1
  180. package/dist/node-runtime/{chunk-PCGNAY2O.js → chunk-TAP7QTUT.js} +38 -16
  181. package/dist/node-runtime/{chunk-4TLO4PO2.js → chunk-U6C7VTR5.js} +7 -1401
  182. package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
  183. package/dist/node-runtime/{chunk-QH42CDX3.js → chunk-W7S2REEG.js} +111 -84
  184. package/dist/node-runtime/{chunk-LZAW4ZX3.js → chunk-ZRDIMBEQ.js} +27 -9
  185. package/dist/node-runtime/{chunk-AD6VXAO7.js → chunk-ZSEZY3II.js} +5 -100
  186. package/dist/node-runtime/cli-runtime.js +1 -1
  187. package/dist/node-runtime/{command-L3LAHDIH.js → command-6UXQ6XZN.js} +1 -1
  188. package/dist/node-runtime/{commands-RL5YBW5I.js → commands-LGR5VT5X.js} +6 -4
  189. package/dist/node-runtime/{direct-tool-executor-JVDXTO7A.js → direct-tool-executor-TDJS7TBD.js} +9 -6
  190. package/dist/node-runtime/{export-html-KR26FOUZ.js → export-html-E4DT6ZJQ.js} +1 -1
  191. package/dist/node-runtime/{extract-XLQSJN4V.js → extract-IUCVZCWC.js} +2 -2
  192. package/dist/node-runtime/{gateway-X2TI5X7F.js → gateway-3OLC4GQN.js} +22 -367
  193. package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-NCIDF7NE.js} +1 -1
  194. package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-OKIN7AIP.js} +2 -2
  195. package/dist/node-runtime/image-resize-6ZPBFMWW.js +11 -0
  196. package/dist/node-runtime/index.js +53 -49
  197. package/dist/node-runtime/{init-NJV2T55N.js → init-EKE277AG.js} +6 -4
  198. package/dist/node-runtime/{interactive-mode-KOM35YF2.js → interactive-mode-S5M26CQ7.js} +20 -17
  199. package/dist/node-runtime/{interactive-view-U6OILKF3.js → interactive-view-N6F4KUIT.js} +3 -5
  200. package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +206 -0
  201. package/dist/node-runtime/{lunr-cron-YJ5UHYRD.js → lunr-cron-KKBOGAEF.js} +7 -1
  202. package/dist/node-runtime/main.js +24 -21
  203. package/dist/node-runtime/{mcp-auth-flow-QIXHW6QN.js → mcp-auth-flow-YL6RWPYG.js} +2 -1
  204. package/dist/node-runtime/{package-manager-cli-TZZHJCVI.js → package-manager-cli-C4EJOO5Q.js} +8 -6
  205. package/dist/node-runtime/{pi-mcp-adapter-QFB37AVN.js → pi-mcp-adapter-DPTJGAAL.js} +33 -27
  206. package/dist/node-runtime/{pi-subagents-7XJ4H53P.js → pi-subagents-VKCLYIBY.js} +103 -76
  207. package/dist/node-runtime/{pi-web-access-DPGAVKOA.js → pi-web-access-BV6DSZOP.js} +72 -69
  208. package/dist/node-runtime/{proxy-modes-HEEFK4KC.js → proxy-modes-R64LU6WZ.js} +12 -9
  209. package/dist/node-runtime/rpc-entry.js +24 -21
  210. package/dist/node-runtime/runtime-3SB5ATHQ.js +21 -0
  211. package/dist/node-runtime/{runtime-bridges-PPHNBFWL.js → runtime-bridges-UJ5WJJLN.js} +3 -3
  212. package/dist/node-runtime/{session-manager-MQNBYACL.js → session-manager-QEMZBMTM.js} +3 -5
  213. package/dist/node-runtime/{session-selector-5AZLJS6U.js → session-selector-URVJLOTK.js} +2 -2
  214. package/dist/node-runtime/{settings-manager-5LF2VQWC.js → settings-manager-K6IPIQTI.js} +3 -1
  215. package/dist/node-runtime/{src-Y7JSCK64.js → src-GPFAU3N6.js} +30 -10
  216. package/dist/node-runtime/{subagent-executor-5RNDEPIJ.js → subagent-executor-EFLTO32A.js} +39 -21
  217. package/dist/node-runtime/{update-cli-A253SZ7P.js → update-cli-I6OVDRPL.js} +3 -1
  218. package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-ETA5RA7U.js} +2 -2
  219. package/dist/node-runtime/workflow-SA34S4VX.js +325 -0
  220. package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-SRVGNN26.js} +2 -2
  221. package/dist/rpc.d.ts +3 -0
  222. package/dist/rpc.d.ts.map +1 -0
  223. package/dist/rpc.js +18 -0
  224. package/dist/rpc.js.map +1 -0
  225. package/dist/startup/interactive-view.d.ts.map +1 -1
  226. package/dist/startup/interactive-view.js +1 -2
  227. package/dist/startup/interactive-view.js.map +1 -1
  228. package/docs/computer-use.md +277 -0
  229. package/docs/development.md +0 -32
  230. package/docs/features.md +2 -2
  231. package/docs/interactive-startup.md +10 -3
  232. package/docs/keybindings.md +2 -2
  233. package/docs/terminal-setup.md +1 -1
  234. package/docs/usage.md +1 -1
  235. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  236. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  237. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  238. package/examples/extensions/gondolin/package-lock.json +2 -2
  239. package/examples/extensions/gondolin/package.json +1 -1
  240. package/examples/extensions/hidden-thinking-label.ts +1 -1
  241. package/examples/extensions/sandbox/package-lock.json +2 -2
  242. package/examples/extensions/sandbox/package.json +1 -1
  243. package/examples/extensions/with-deps/package-lock.json +2 -2
  244. package/examples/extensions/with-deps/package.json +1 -1
  245. package/install-lock/package-lock.json +3827 -0
  246. package/install-lock/package.json +18 -0
  247. package/native/computer-use/LICENSE.md +21 -0
  248. package/npm-shrinkwrap.json +3808 -0
  249. package/package.json +16 -10
  250. package/dist/startup/interactive-shell.d.ts +0 -55
  251. package/dist/startup/interactive-shell.d.ts.map +0 -1
  252. package/dist/startup/interactive-shell.js +0 -264
  253. package/dist/startup/interactive-shell.js.map +0 -1
  254. package/dist/node-runtime/{chunk-YSKSB3BJ.js → chunk-CH6OL6P2.js} +2 -2
  255. package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-EHMBW7FA.js} +3 -3
@@ -0,0 +1,1019 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ __commonJS,
4
+ __require
5
+ } from "./chunk-BRJX2PRC.js";
6
+
7
+ // node_modules/graceful-fs/polyfills.js
8
+ var require_polyfills = __commonJS({
9
+ "node_modules/graceful-fs/polyfills.js"(exports, module) {
10
+ var constants = __require("constants"), origCwd = process.cwd, cwd = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
11
+ process.cwd = function() {
12
+ return cwd || (cwd = origCwd.call(process)), cwd;
13
+ };
14
+ try {
15
+ process.cwd();
16
+ } catch {
17
+ }
18
+ typeof process.chdir == "function" && (chdir = process.chdir, process.chdir = function(d) {
19
+ cwd = null, chdir.call(process, d);
20
+ }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
21
+ var chdir;
22
+ module.exports = patch;
23
+ function patch(fs) {
24
+ constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(fs), fs.lutimes || patchLutimes(fs), fs.chown = chownFix(fs.chown), fs.fchown = chownFix(fs.fchown), fs.lchown = chownFix(fs.lchown), fs.chmod = chmodFix(fs.chmod), fs.fchmod = chmodFix(fs.fchmod), fs.lchmod = chmodFix(fs.lchmod), fs.chownSync = chownFixSync(fs.chownSync), fs.fchownSync = chownFixSync(fs.fchownSync), fs.lchownSync = chownFixSync(fs.lchownSync), fs.chmodSync = chmodFixSync(fs.chmodSync), fs.fchmodSync = chmodFixSync(fs.fchmodSync), fs.lchmodSync = chmodFixSync(fs.lchmodSync), fs.stat = statFix(fs.stat), fs.fstat = statFix(fs.fstat), fs.lstat = statFix(fs.lstat), fs.statSync = statFixSync(fs.statSync), fs.fstatSync = statFixSync(fs.fstatSync), fs.lstatSync = statFixSync(fs.lstatSync), fs.chmod && !fs.lchmod && (fs.lchmod = function(path, mode, cb) {
25
+ cb && process.nextTick(cb);
26
+ }, fs.lchmodSync = function() {
27
+ }), fs.chown && !fs.lchown && (fs.lchown = function(path, uid, gid, cb) {
28
+ cb && process.nextTick(cb);
29
+ }, fs.lchownSync = function() {
30
+ }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : (function(fs$rename) {
31
+ function rename(from, to, cb) {
32
+ var start = Date.now(), backoff = 0;
33
+ fs$rename(from, to, function CB(er) {
34
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
35
+ setTimeout(function() {
36
+ fs.stat(to, function(stater, st) {
37
+ stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
38
+ });
39
+ }, backoff), backoff < 100 && (backoff += 10);
40
+ return;
41
+ }
42
+ cb && cb(er);
43
+ });
44
+ }
45
+ return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
46
+ })(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : (function(fs$read) {
47
+ function read(fd, buffer, offset, length, position, callback_) {
48
+ var callback;
49
+ if (callback_ && typeof callback_ == "function") {
50
+ var eagCounter = 0;
51
+ callback = function(er, _, __) {
52
+ if (er && er.code === "EAGAIN" && eagCounter < 10)
53
+ return eagCounter++, fs$read.call(fs, fd, buffer, offset, length, position, callback);
54
+ callback_.apply(this, arguments);
55
+ };
56
+ }
57
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
58
+ }
59
+ return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
60
+ })(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) {
61
+ return function(fd, buffer, offset, length, position) {
62
+ for (var eagCounter = 0; ; )
63
+ try {
64
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
65
+ } catch (er) {
66
+ if (er.code === "EAGAIN" && eagCounter < 10) {
67
+ eagCounter++;
68
+ continue;
69
+ }
70
+ throw er;
71
+ }
72
+ };
73
+ })(fs.readSync);
74
+ function patchLchmod(fs2) {
75
+ fs2.lchmod = function(path, mode, callback) {
76
+ fs2.open(
77
+ path,
78
+ constants.O_WRONLY | constants.O_SYMLINK,
79
+ mode,
80
+ function(err, fd) {
81
+ if (err) {
82
+ callback && callback(err);
83
+ return;
84
+ }
85
+ fs2.fchmod(fd, mode, function(err2) {
86
+ fs2.close(fd, function(err22) {
87
+ callback && callback(err2 || err22);
88
+ });
89
+ });
90
+ }
91
+ );
92
+ }, fs2.lchmodSync = function(path, mode) {
93
+ var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode), threw = !0, ret;
94
+ try {
95
+ ret = fs2.fchmodSync(fd, mode), threw = !1;
96
+ } finally {
97
+ if (threw)
98
+ try {
99
+ fs2.closeSync(fd);
100
+ } catch {
101
+ }
102
+ else
103
+ fs2.closeSync(fd);
104
+ }
105
+ return ret;
106
+ };
107
+ }
108
+ function patchLutimes(fs2) {
109
+ constants.hasOwnProperty("O_SYMLINK") && fs2.futimes ? (fs2.lutimes = function(path, at, mt, cb) {
110
+ fs2.open(path, constants.O_SYMLINK, function(er, fd) {
111
+ if (er) {
112
+ cb && cb(er);
113
+ return;
114
+ }
115
+ fs2.futimes(fd, at, mt, function(er2) {
116
+ fs2.close(fd, function(er22) {
117
+ cb && cb(er2 || er22);
118
+ });
119
+ });
120
+ });
121
+ }, fs2.lutimesSync = function(path, at, mt) {
122
+ var fd = fs2.openSync(path, constants.O_SYMLINK), ret, threw = !0;
123
+ try {
124
+ ret = fs2.futimesSync(fd, at, mt), threw = !1;
125
+ } finally {
126
+ if (threw)
127
+ try {
128
+ fs2.closeSync(fd);
129
+ } catch {
130
+ }
131
+ else
132
+ fs2.closeSync(fd);
133
+ }
134
+ return ret;
135
+ }) : fs2.futimes && (fs2.lutimes = function(_a, _b, _c, cb) {
136
+ cb && process.nextTick(cb);
137
+ }, fs2.lutimesSync = function() {
138
+ });
139
+ }
140
+ function chmodFix(orig) {
141
+ return orig && function(target, mode, cb) {
142
+ return orig.call(fs, target, mode, function(er) {
143
+ chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
144
+ });
145
+ };
146
+ }
147
+ function chmodFixSync(orig) {
148
+ return orig && function(target, mode) {
149
+ try {
150
+ return orig.call(fs, target, mode);
151
+ } catch (er) {
152
+ if (!chownErOk(er)) throw er;
153
+ }
154
+ };
155
+ }
156
+ function chownFix(orig) {
157
+ return orig && function(target, uid, gid, cb) {
158
+ return orig.call(fs, target, uid, gid, function(er) {
159
+ chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
160
+ });
161
+ };
162
+ }
163
+ function chownFixSync(orig) {
164
+ return orig && function(target, uid, gid) {
165
+ try {
166
+ return orig.call(fs, target, uid, gid);
167
+ } catch (er) {
168
+ if (!chownErOk(er)) throw er;
169
+ }
170
+ };
171
+ }
172
+ function statFix(orig) {
173
+ return orig && function(target, options, cb) {
174
+ typeof options == "function" && (cb = options, options = null);
175
+ function callback(er, stats) {
176
+ stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
177
+ }
178
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
179
+ };
180
+ }
181
+ function statFixSync(orig) {
182
+ return orig && function(target, options) {
183
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
184
+ return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
185
+ };
186
+ }
187
+ function chownErOk(er) {
188
+ if (!er || er.code === "ENOSYS")
189
+ return !0;
190
+ var nonroot = !process.getuid || process.getuid() !== 0;
191
+ return !!(nonroot && (er.code === "EINVAL" || er.code === "EPERM"));
192
+ }
193
+ }
194
+ }
195
+ });
196
+
197
+ // node_modules/graceful-fs/legacy-streams.js
198
+ var require_legacy_streams = __commonJS({
199
+ "node_modules/graceful-fs/legacy-streams.js"(exports, module) {
200
+ var Stream = __require("stream").Stream;
201
+ module.exports = legacy;
202
+ function legacy(fs) {
203
+ return {
204
+ ReadStream,
205
+ WriteStream
206
+ };
207
+ function ReadStream(path, options) {
208
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
209
+ Stream.call(this);
210
+ var self = this;
211
+ this.path = path, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
212
+ for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
213
+ var key = keys[index];
214
+ this[key] = options[key];
215
+ }
216
+ if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
217
+ if (typeof this.start != "number")
218
+ throw TypeError("start must be a Number");
219
+ if (this.end === void 0)
220
+ this.end = 1 / 0;
221
+ else if (typeof this.end != "number")
222
+ throw TypeError("end must be a Number");
223
+ if (this.start > this.end)
224
+ throw new Error("start must be <= end");
225
+ this.pos = this.start;
226
+ }
227
+ if (this.fd !== null) {
228
+ process.nextTick(function() {
229
+ self._read();
230
+ });
231
+ return;
232
+ }
233
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
234
+ if (err) {
235
+ self.emit("error", err), self.readable = !1;
236
+ return;
237
+ }
238
+ self.fd = fd, self.emit("open", fd), self._read();
239
+ });
240
+ }
241
+ function WriteStream(path, options) {
242
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
243
+ Stream.call(this), this.path = path, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, options = options || {};
244
+ for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
245
+ var key = keys[index];
246
+ this[key] = options[key];
247
+ }
248
+ if (this.start !== void 0) {
249
+ if (typeof this.start != "number")
250
+ throw TypeError("start must be a Number");
251
+ if (this.start < 0)
252
+ throw new Error("start must be >= zero");
253
+ this.pos = this.start;
254
+ }
255
+ this.busy = !1, this._queue = [], this.fd === null && (this._open = fs.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
256
+ }
257
+ }
258
+ }
259
+ });
260
+
261
+ // node_modules/graceful-fs/clone.js
262
+ var require_clone = __commonJS({
263
+ "node_modules/graceful-fs/clone.js"(exports, module) {
264
+ "use strict";
265
+ module.exports = clone;
266
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
267
+ return obj.__proto__;
268
+ };
269
+ function clone(obj) {
270
+ if (obj === null || typeof obj != "object")
271
+ return obj;
272
+ if (obj instanceof Object)
273
+ var copy = { __proto__: getPrototypeOf(obj) };
274
+ else
275
+ var copy = /* @__PURE__ */ Object.create(null);
276
+ return Object.getOwnPropertyNames(obj).forEach(function(key) {
277
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
278
+ }), copy;
279
+ }
280
+ }
281
+ });
282
+
283
+ // node_modules/graceful-fs/graceful-fs.js
284
+ var require_graceful_fs = __commonJS({
285
+ "node_modules/graceful-fs/graceful-fs.js"(exports, module) {
286
+ var fs = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
287
+ typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
288
+ function noop() {
289
+ }
290
+ function publishQueue(context, queue2) {
291
+ Object.defineProperty(context, gracefulQueue, {
292
+ get: function() {
293
+ return queue2;
294
+ }
295
+ });
296
+ }
297
+ var debug = noop;
298
+ util.debuglog ? debug = util.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (debug = function() {
299
+ var m = util.format.apply(util, arguments);
300
+ m = "GFS4: " + m.split(/\n/).join(`
301
+ GFS4: `), console.error(m);
302
+ });
303
+ fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = (function(fs$close) {
304
+ function close(fd, cb) {
305
+ return fs$close.call(fs, fd, function(err) {
306
+ err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
307
+ });
308
+ }
309
+ return Object.defineProperty(close, previousSymbol, {
310
+ value: fs$close
311
+ }), close;
312
+ })(fs.close), fs.closeSync = (function(fs$closeSync) {
313
+ function closeSync(fd) {
314
+ fs$closeSync.apply(fs, arguments), resetQueue();
315
+ }
316
+ return Object.defineProperty(closeSync, previousSymbol, {
317
+ value: fs$closeSync
318
+ }), closeSync;
319
+ })(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
320
+ debug(fs[gracefulQueue]), __require("assert").equal(fs[gracefulQueue].length, 0);
321
+ }));
322
+ var queue;
323
+ global[gracefulQueue] || publishQueue(global, fs[gracefulQueue]);
324
+ module.exports = patch(clone(fs));
325
+ process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched && (module.exports = patch(fs), fs.__patched = !0);
326
+ function patch(fs2) {
327
+ polyfills(fs2), fs2.gracefulify = patch, fs2.createReadStream = createReadStream, fs2.createWriteStream = createWriteStream;
328
+ var fs$readFile = fs2.readFile;
329
+ fs2.readFile = readFile;
330
+ function readFile(path, options, cb) {
331
+ return typeof options == "function" && (cb = options, options = null), go$readFile(path, options, cb);
332
+ function go$readFile(path2, options2, cb2, startTime) {
333
+ return fs$readFile(path2, options2, function(err) {
334
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
335
+ });
336
+ }
337
+ }
338
+ var fs$writeFile = fs2.writeFile;
339
+ fs2.writeFile = writeFile;
340
+ function writeFile(path, data, options, cb) {
341
+ return typeof options == "function" && (cb = options, options = null), go$writeFile(path, data, options, cb);
342
+ function go$writeFile(path2, data2, options2, cb2, startTime) {
343
+ return fs$writeFile(path2, data2, options2, function(err) {
344
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
345
+ });
346
+ }
347
+ }
348
+ var fs$appendFile = fs2.appendFile;
349
+ fs$appendFile && (fs2.appendFile = appendFile);
350
+ function appendFile(path, data, options, cb) {
351
+ return typeof options == "function" && (cb = options, options = null), go$appendFile(path, data, options, cb);
352
+ function go$appendFile(path2, data2, options2, cb2, startTime) {
353
+ return fs$appendFile(path2, data2, options2, function(err) {
354
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
355
+ });
356
+ }
357
+ }
358
+ var fs$copyFile = fs2.copyFile;
359
+ fs$copyFile && (fs2.copyFile = copyFile);
360
+ function copyFile(src, dest, flags, cb) {
361
+ return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
362
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
363
+ return fs$copyFile(src2, dest2, flags2, function(err) {
364
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
365
+ });
366
+ }
367
+ }
368
+ var fs$readdir = fs2.readdir;
369
+ fs2.readdir = readdir;
370
+ var noReaddirOptionVersions = /^v[0-5]\./;
371
+ function readdir(path, options, cb) {
372
+ typeof options == "function" && (cb = options, options = null);
373
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path2, options2, cb2, startTime) {
374
+ return fs$readdir(path2, fs$readdirCallback(
375
+ path2,
376
+ options2,
377
+ cb2,
378
+ startTime
379
+ ));
380
+ } : function(path2, options2, cb2, startTime) {
381
+ return fs$readdir(path2, options2, fs$readdirCallback(
382
+ path2,
383
+ options2,
384
+ cb2,
385
+ startTime
386
+ ));
387
+ };
388
+ return go$readdir(path, options, cb);
389
+ function fs$readdirCallback(path2, options2, cb2, startTime) {
390
+ return function(err, files) {
391
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
392
+ go$readdir,
393
+ [path2, options2, cb2],
394
+ err,
395
+ startTime || Date.now(),
396
+ Date.now()
397
+ ]) : (files && files.sort && files.sort(), typeof cb2 == "function" && cb2.call(this, err, files));
398
+ };
399
+ }
400
+ }
401
+ if (process.version.substr(0, 4) === "v0.8") {
402
+ var legStreams = legacy(fs2);
403
+ ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
404
+ }
405
+ var fs$ReadStream = fs2.ReadStream;
406
+ fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
407
+ var fs$WriteStream = fs2.WriteStream;
408
+ fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs2, "ReadStream", {
409
+ get: function() {
410
+ return ReadStream;
411
+ },
412
+ set: function(val) {
413
+ ReadStream = val;
414
+ },
415
+ enumerable: !0,
416
+ configurable: !0
417
+ }), Object.defineProperty(fs2, "WriteStream", {
418
+ get: function() {
419
+ return WriteStream;
420
+ },
421
+ set: function(val) {
422
+ WriteStream = val;
423
+ },
424
+ enumerable: !0,
425
+ configurable: !0
426
+ });
427
+ var FileReadStream = ReadStream;
428
+ Object.defineProperty(fs2, "FileReadStream", {
429
+ get: function() {
430
+ return FileReadStream;
431
+ },
432
+ set: function(val) {
433
+ FileReadStream = val;
434
+ },
435
+ enumerable: !0,
436
+ configurable: !0
437
+ });
438
+ var FileWriteStream = WriteStream;
439
+ Object.defineProperty(fs2, "FileWriteStream", {
440
+ get: function() {
441
+ return FileWriteStream;
442
+ },
443
+ set: function(val) {
444
+ FileWriteStream = val;
445
+ },
446
+ enumerable: !0,
447
+ configurable: !0
448
+ });
449
+ function ReadStream(path, options) {
450
+ return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
451
+ }
452
+ function ReadStream$open() {
453
+ var that = this;
454
+ open(that.path, that.flags, that.mode, function(err, fd) {
455
+ err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
456
+ });
457
+ }
458
+ function WriteStream(path, options) {
459
+ return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
460
+ }
461
+ function WriteStream$open() {
462
+ var that = this;
463
+ open(that.path, that.flags, that.mode, function(err, fd) {
464
+ err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
465
+ });
466
+ }
467
+ function createReadStream(path, options) {
468
+ return new fs2.ReadStream(path, options);
469
+ }
470
+ function createWriteStream(path, options) {
471
+ return new fs2.WriteStream(path, options);
472
+ }
473
+ var fs$open = fs2.open;
474
+ fs2.open = open;
475
+ function open(path, flags, mode, cb) {
476
+ return typeof mode == "function" && (cb = mode, mode = null), go$open(path, flags, mode, cb);
477
+ function go$open(path2, flags2, mode2, cb2, startTime) {
478
+ return fs$open(path2, flags2, mode2, function(err, fd) {
479
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
480
+ });
481
+ }
482
+ }
483
+ return fs2;
484
+ }
485
+ function enqueue(elem) {
486
+ debug("ENQUEUE", elem[0].name, elem[1]), fs[gracefulQueue].push(elem), retry();
487
+ }
488
+ var retryTimer;
489
+ function resetQueue() {
490
+ for (var now = Date.now(), i = 0; i < fs[gracefulQueue].length; ++i)
491
+ fs[gracefulQueue][i].length > 2 && (fs[gracefulQueue][i][3] = now, fs[gracefulQueue][i][4] = now);
492
+ retry();
493
+ }
494
+ function retry() {
495
+ if (clearTimeout(retryTimer), retryTimer = void 0, fs[gracefulQueue].length !== 0) {
496
+ var elem = fs[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
497
+ if (startTime === void 0)
498
+ debug("RETRY", fn.name, args), fn.apply(null, args);
499
+ else if (Date.now() - startTime >= 6e4) {
500
+ debug("TIMEOUT", fn.name, args);
501
+ var cb = args.pop();
502
+ typeof cb == "function" && cb.call(null, err);
503
+ } else {
504
+ var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
505
+ sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs[gracefulQueue].push(elem);
506
+ }
507
+ retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
508
+ }
509
+ }
510
+ }
511
+ });
512
+
513
+ // node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js
514
+ var require_retry_operation = __commonJS({
515
+ "node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js"(exports, module) {
516
+ function RetryOperation(timeouts, options) {
517
+ typeof options == "boolean" && (options = { forever: options }), this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)), this._timeouts = timeouts, this._options = options || {}, this._maxRetryTime = options && options.maxRetryTime || 1 / 0, this._fn = null, this._errors = [], this._attempts = 1, this._operationTimeout = null, this._operationTimeoutCb = null, this._timeout = null, this._operationStart = null, this._options.forever && (this._cachedTimeouts = this._timeouts.slice(0));
518
+ }
519
+ module.exports = RetryOperation;
520
+ RetryOperation.prototype.reset = function() {
521
+ this._attempts = 1, this._timeouts = this._originalTimeouts;
522
+ };
523
+ RetryOperation.prototype.stop = function() {
524
+ this._timeout && clearTimeout(this._timeout), this._timeouts = [], this._cachedTimeouts = null;
525
+ };
526
+ RetryOperation.prototype.retry = function(err) {
527
+ if (this._timeout && clearTimeout(this._timeout), !err)
528
+ return !1;
529
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
530
+ if (err && currentTime - this._operationStart >= this._maxRetryTime)
531
+ return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
532
+ this._errors.push(err);
533
+ var timeout = this._timeouts.shift();
534
+ if (timeout === void 0)
535
+ if (this._cachedTimeouts)
536
+ this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout = this._timeouts.shift();
537
+ else
538
+ return !1;
539
+ var self = this, timer = setTimeout(function() {
540
+ self._attempts++, self._operationTimeoutCb && (self._timeout = setTimeout(function() {
541
+ self._operationTimeoutCb(self._attempts);
542
+ }, self._operationTimeout), self._options.unref && self._timeout.unref()), self._fn(self._attempts);
543
+ }, timeout);
544
+ return this._options.unref && timer.unref(), !0;
545
+ };
546
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
547
+ this._fn = fn, timeoutOps && (timeoutOps.timeout && (this._operationTimeout = timeoutOps.timeout), timeoutOps.cb && (this._operationTimeoutCb = timeoutOps.cb));
548
+ var self = this;
549
+ this._operationTimeoutCb && (this._timeout = setTimeout(function() {
550
+ self._operationTimeoutCb();
551
+ }, self._operationTimeout)), this._operationStart = (/* @__PURE__ */ new Date()).getTime(), this._fn(this._attempts);
552
+ };
553
+ RetryOperation.prototype.try = function(fn) {
554
+ console.log("Using RetryOperation.try() is deprecated"), this.attempt(fn);
555
+ };
556
+ RetryOperation.prototype.start = function(fn) {
557
+ console.log("Using RetryOperation.start() is deprecated"), this.attempt(fn);
558
+ };
559
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
560
+ RetryOperation.prototype.errors = function() {
561
+ return this._errors;
562
+ };
563
+ RetryOperation.prototype.attempts = function() {
564
+ return this._attempts;
565
+ };
566
+ RetryOperation.prototype.mainError = function() {
567
+ if (this._errors.length === 0)
568
+ return null;
569
+ for (var counts = {}, mainError = null, mainErrorCount = 0, i = 0; i < this._errors.length; i++) {
570
+ var error = this._errors[i], message = error.message, count = (counts[message] || 0) + 1;
571
+ counts[message] = count, count >= mainErrorCount && (mainError = error, mainErrorCount = count);
572
+ }
573
+ return mainError;
574
+ };
575
+ }
576
+ });
577
+
578
+ // node_modules/proper-lockfile/node_modules/retry/lib/retry.js
579
+ var require_retry = __commonJS({
580
+ "node_modules/proper-lockfile/node_modules/retry/lib/retry.js"(exports) {
581
+ var RetryOperation = require_retry_operation();
582
+ exports.operation = function(options) {
583
+ var timeouts = exports.timeouts(options);
584
+ return new RetryOperation(timeouts, {
585
+ forever: options && options.forever,
586
+ unref: options && options.unref,
587
+ maxRetryTime: options && options.maxRetryTime
588
+ });
589
+ };
590
+ exports.timeouts = function(options) {
591
+ if (options instanceof Array)
592
+ return [].concat(options);
593
+ var opts = {
594
+ retries: 10,
595
+ factor: 2,
596
+ minTimeout: 1 * 1e3,
597
+ maxTimeout: 1 / 0,
598
+ randomize: !1
599
+ };
600
+ for (var key in options)
601
+ opts[key] = options[key];
602
+ if (opts.minTimeout > opts.maxTimeout)
603
+ throw new Error("minTimeout is greater than maxTimeout");
604
+ for (var timeouts = [], i = 0; i < opts.retries; i++)
605
+ timeouts.push(this.createTimeout(i, opts));
606
+ return options && options.forever && !timeouts.length && timeouts.push(this.createTimeout(i, opts)), timeouts.sort(function(a, b) {
607
+ return a - b;
608
+ }), timeouts;
609
+ };
610
+ exports.createTimeout = function(attempt, opts) {
611
+ var random = opts.randomize ? Math.random() + 1 : 1, timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
612
+ return timeout = Math.min(timeout, opts.maxTimeout), timeout;
613
+ };
614
+ exports.wrap = function(obj, options, methods) {
615
+ if (options instanceof Array && (methods = options, options = null), !methods) {
616
+ methods = [];
617
+ for (var key in obj)
618
+ typeof obj[key] == "function" && methods.push(key);
619
+ }
620
+ for (var i = 0; i < methods.length; i++) {
621
+ var method = methods[i], original = obj[method];
622
+ obj[method] = function(original2) {
623
+ var op = exports.operation(options), args = Array.prototype.slice.call(arguments, 1), callback = args.pop();
624
+ args.push(function(err) {
625
+ op.retry(err) || (err && (arguments[0] = op.mainError()), callback.apply(this, arguments));
626
+ }), op.attempt(function() {
627
+ original2.apply(obj, args);
628
+ });
629
+ }.bind(obj, original), obj[method].options = options;
630
+ }
631
+ };
632
+ }
633
+ });
634
+
635
+ // node_modules/proper-lockfile/node_modules/retry/index.js
636
+ var require_retry2 = __commonJS({
637
+ "node_modules/proper-lockfile/node_modules/retry/index.js"(exports, module) {
638
+ module.exports = require_retry();
639
+ }
640
+ });
641
+
642
+ // node_modules/signal-exit/signals.js
643
+ var require_signals = __commonJS({
644
+ "node_modules/signal-exit/signals.js"(exports, module) {
645
+ module.exports = [
646
+ "SIGABRT",
647
+ "SIGALRM",
648
+ "SIGHUP",
649
+ "SIGINT",
650
+ "SIGTERM"
651
+ ];
652
+ process.platform !== "win32" && module.exports.push(
653
+ "SIGVTALRM",
654
+ "SIGXCPU",
655
+ "SIGXFSZ",
656
+ "SIGUSR2",
657
+ "SIGTRAP",
658
+ "SIGSYS",
659
+ "SIGQUIT",
660
+ "SIGIOT"
661
+ // should detect profiler and enable/disable accordingly.
662
+ // see #21
663
+ // 'SIGPROF'
664
+ );
665
+ process.platform === "linux" && module.exports.push(
666
+ "SIGIO",
667
+ "SIGPOLL",
668
+ "SIGPWR",
669
+ "SIGSTKFLT",
670
+ "SIGUNUSED"
671
+ );
672
+ }
673
+ });
674
+
675
+ // node_modules/signal-exit/index.js
676
+ var require_signal_exit = __commonJS({
677
+ "node_modules/signal-exit/index.js"(exports, module) {
678
+ var process2 = global.process, processOk = function(process3) {
679
+ return process3 && typeof process3 == "object" && typeof process3.removeListener == "function" && typeof process3.emit == "function" && typeof process3.reallyExit == "function" && typeof process3.listeners == "function" && typeof process3.kill == "function" && typeof process3.pid == "number" && typeof process3.on == "function";
680
+ };
681
+ processOk(process2) ? (assert = __require("assert"), signals = require_signals(), isWin = /^win/i.test(process2.platform), EE = __require("events"), typeof EE != "function" && (EE = EE.EventEmitter), process2.__signal_exit_emitter__ ? emitter = process2.__signal_exit_emitter__ : (emitter = process2.__signal_exit_emitter__ = new EE(), emitter.count = 0, emitter.emitted = {}), emitter.infinite || (emitter.setMaxListeners(1 / 0), emitter.infinite = !0), module.exports = function(cb, opts) {
682
+ if (!processOk(global.process))
683
+ return function() {
684
+ };
685
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler"), loaded === !1 && load();
686
+ var ev = "exit";
687
+ opts && opts.alwaysLast && (ev = "afterexit");
688
+ var remove = function() {
689
+ emitter.removeListener(ev, cb), emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0 && unload();
690
+ };
691
+ return emitter.on(ev, cb), remove;
692
+ }, unload = function() {
693
+ !loaded || !processOk(global.process) || (loaded = !1, signals.forEach(function(sig) {
694
+ try {
695
+ process2.removeListener(sig, sigListeners[sig]);
696
+ } catch {
697
+ }
698
+ }), process2.emit = originalProcessEmit, process2.reallyExit = originalProcessReallyExit, emitter.count -= 1);
699
+ }, module.exports.unload = unload, emit = function(event, code, signal) {
700
+ emitter.emitted[event] || (emitter.emitted[event] = !0, emitter.emit(event, code, signal));
701
+ }, sigListeners = {}, signals.forEach(function(sig) {
702
+ sigListeners[sig] = function() {
703
+ if (processOk(global.process)) {
704
+ var listeners = process2.listeners(sig);
705
+ listeners.length === emitter.count && (unload(), emit("exit", null, sig), emit("afterexit", null, sig), isWin && sig === "SIGHUP" && (sig = "SIGINT"), process2.kill(process2.pid, sig));
706
+ }
707
+ };
708
+ }), module.exports.signals = function() {
709
+ return signals;
710
+ }, loaded = !1, load = function() {
711
+ loaded || !processOk(global.process) || (loaded = !0, emitter.count += 1, signals = signals.filter(function(sig) {
712
+ try {
713
+ return process2.on(sig, sigListeners[sig]), !0;
714
+ } catch {
715
+ return !1;
716
+ }
717
+ }), process2.emit = processEmit, process2.reallyExit = processReallyExit);
718
+ }, module.exports.load = load, originalProcessReallyExit = process2.reallyExit, processReallyExit = function(code) {
719
+ processOk(global.process) && (process2.exitCode = code || /* istanbul ignore next */
720
+ 0, emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), originalProcessReallyExit.call(process2, process2.exitCode));
721
+ }, originalProcessEmit = process2.emit, processEmit = function(ev, arg) {
722
+ if (ev === "exit" && processOk(global.process)) {
723
+ arg !== void 0 && (process2.exitCode = arg);
724
+ var ret = originalProcessEmit.apply(this, arguments);
725
+ return emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), ret;
726
+ } else
727
+ return originalProcessEmit.apply(this, arguments);
728
+ }) : module.exports = function() {
729
+ return function() {
730
+ };
731
+ };
732
+ var assert, signals, isWin, EE, emitter, unload, emit, sigListeners, loaded, load, originalProcessReallyExit, processReallyExit, originalProcessEmit, processEmit;
733
+ }
734
+ });
735
+
736
+ // node_modules/proper-lockfile/lib/mtime-precision.js
737
+ var require_mtime_precision = __commonJS({
738
+ "node_modules/proper-lockfile/lib/mtime-precision.js"(exports, module) {
739
+ "use strict";
740
+ var cacheSymbol = /* @__PURE__ */ Symbol();
741
+ function probe(file, fs, callback) {
742
+ let cachedPrecision = fs[cacheSymbol];
743
+ if (cachedPrecision)
744
+ return fs.stat(file, (err, stat) => {
745
+ if (err)
746
+ return callback(err);
747
+ callback(null, stat.mtime, cachedPrecision);
748
+ });
749
+ let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
750
+ fs.utimes(file, mtime, mtime, (err) => {
751
+ if (err)
752
+ return callback(err);
753
+ fs.stat(file, (err2, stat) => {
754
+ if (err2)
755
+ return callback(err2);
756
+ let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
757
+ Object.defineProperty(fs, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
758
+ });
759
+ });
760
+ }
761
+ function getMtime(precision) {
762
+ let now = Date.now();
763
+ return precision === "s" && (now = Math.ceil(now / 1e3) * 1e3), new Date(now);
764
+ }
765
+ module.exports.probe = probe;
766
+ module.exports.getMtime = getMtime;
767
+ }
768
+ });
769
+
770
+ // node_modules/proper-lockfile/lib/lockfile.js
771
+ var require_lockfile = __commonJS({
772
+ "node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
773
+ "use strict";
774
+ var path = __require("path"), fs = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
775
+ function getLockFile(file, options) {
776
+ return options.lockfilePath || `${file}.lock`;
777
+ }
778
+ function resolveCanonicalPath(file, options, callback) {
779
+ if (!options.realpath)
780
+ return callback(null, path.resolve(file));
781
+ options.fs.realpath(file, callback);
782
+ }
783
+ function acquireLock(file, options, callback) {
784
+ let lockfilePath = getLockFile(file, options);
785
+ options.fs.mkdir(lockfilePath, (err) => {
786
+ if (!err)
787
+ return mtimePrecision.probe(lockfilePath, options.fs, (err2, mtime, mtimePrecision2) => {
788
+ if (err2)
789
+ return options.fs.rmdir(lockfilePath, () => {
790
+ }), callback(err2);
791
+ callback(null, mtime, mtimePrecision2);
792
+ });
793
+ if (err.code !== "EEXIST")
794
+ return callback(err);
795
+ if (options.stale <= 0)
796
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
797
+ options.fs.stat(lockfilePath, (err2, stat) => {
798
+ if (err2)
799
+ return err2.code === "ENOENT" ? acquireLock(file, { ...options, stale: 0 }, callback) : callback(err2);
800
+ if (!isLockStale(stat, options))
801
+ return callback(Object.assign(new Error("Lock file is already being held"), { code: "ELOCKED", file }));
802
+ removeLock(file, options, (err3) => {
803
+ if (err3)
804
+ return callback(err3);
805
+ acquireLock(file, { ...options, stale: 0 }, callback);
806
+ });
807
+ });
808
+ });
809
+ }
810
+ function isLockStale(stat, options) {
811
+ return stat.mtime.getTime() < Date.now() - options.stale;
812
+ }
813
+ function removeLock(file, options, callback) {
814
+ options.fs.rmdir(getLockFile(file, options), (err) => {
815
+ if (err && err.code !== "ENOENT")
816
+ return callback(err);
817
+ callback();
818
+ });
819
+ }
820
+ function updateLock(file, options) {
821
+ let lock2 = locks[file];
822
+ lock2.updateTimeout || (lock2.updateDelay = lock2.updateDelay || options.update, lock2.updateTimeout = setTimeout(() => {
823
+ lock2.updateTimeout = null, options.fs.stat(lock2.lockfilePath, (err, stat) => {
824
+ let isOverThreshold = lock2.lastUpdate + options.stale < Date.now();
825
+ if (err)
826
+ return err.code === "ENOENT" || isOverThreshold ? setLockAsCompromised(file, lock2, Object.assign(err, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
827
+ if (!(lock2.mtime.getTime() === stat.mtime.getTime()))
828
+ return setLockAsCompromised(
829
+ file,
830
+ lock2,
831
+ Object.assign(
832
+ new Error("Unable to update lock within the stale threshold"),
833
+ { code: "ECOMPROMISED" }
834
+ )
835
+ );
836
+ let mtime = mtimePrecision.getMtime(lock2.mtimePrecision);
837
+ options.fs.utimes(lock2.lockfilePath, mtime, mtime, (err2) => {
838
+ let isOverThreshold2 = lock2.lastUpdate + options.stale < Date.now();
839
+ if (!lock2.released) {
840
+ if (err2)
841
+ return err2.code === "ENOENT" || isOverThreshold2 ? setLockAsCompromised(file, lock2, Object.assign(err2, { code: "ECOMPROMISED" })) : (lock2.updateDelay = 1e3, updateLock(file, options));
842
+ lock2.mtime = mtime, lock2.lastUpdate = Date.now(), lock2.updateDelay = null, updateLock(file, options);
843
+ }
844
+ });
845
+ });
846
+ }, lock2.updateDelay), lock2.updateTimeout.unref && lock2.updateTimeout.unref());
847
+ }
848
+ function setLockAsCompromised(file, lock2, err) {
849
+ lock2.released = !0, lock2.updateTimeout && clearTimeout(lock2.updateTimeout), locks[file] === lock2 && delete locks[file], lock2.options.onCompromised(err);
850
+ }
851
+ function lock(file, options, callback) {
852
+ options = {
853
+ stale: 1e4,
854
+ update: null,
855
+ realpath: !0,
856
+ retries: 0,
857
+ fs,
858
+ onCompromised: (err) => {
859
+ throw err;
860
+ },
861
+ ...options
862
+ }, options.retries = options.retries || 0, options.retries = typeof options.retries == "number" ? { retries: options.retries } : options.retries, options.stale = Math.max(options.stale || 0, 2e3), options.update = options.update == null ? options.stale / 2 : options.update || 0, options.update = Math.max(Math.min(options.update, options.stale / 2), 1e3), resolveCanonicalPath(file, options, (err, file2) => {
863
+ if (err)
864
+ return callback(err);
865
+ let operation = retry.operation(options.retries);
866
+ operation.attempt(() => {
867
+ acquireLock(file2, options, (err2, mtime, mtimePrecision2) => {
868
+ if (operation.retry(err2))
869
+ return;
870
+ if (err2)
871
+ return callback(operation.mainError());
872
+ let lock2 = locks[file2] = {
873
+ lockfilePath: getLockFile(file2, options),
874
+ mtime,
875
+ mtimePrecision: mtimePrecision2,
876
+ options,
877
+ lastUpdate: Date.now()
878
+ };
879
+ updateLock(file2, options), callback(null, (releasedCallback) => {
880
+ if (lock2.released)
881
+ return releasedCallback && releasedCallback(Object.assign(new Error("Lock is already released"), { code: "ERELEASED" }));
882
+ unlock(file2, { ...options, realpath: !1 }, releasedCallback);
883
+ });
884
+ });
885
+ });
886
+ });
887
+ }
888
+ function unlock(file, options, callback) {
889
+ options = {
890
+ fs,
891
+ realpath: !0,
892
+ ...options
893
+ }, resolveCanonicalPath(file, options, (err, file2) => {
894
+ if (err)
895
+ return callback(err);
896
+ let lock2 = locks[file2];
897
+ if (!lock2)
898
+ return callback(Object.assign(new Error("Lock is not acquired/owned by you"), { code: "ENOTACQUIRED" }));
899
+ lock2.updateTimeout && clearTimeout(lock2.updateTimeout), lock2.released = !0, delete locks[file2], removeLock(file2, options, callback);
900
+ });
901
+ }
902
+ function check(file, options, callback) {
903
+ options = {
904
+ stale: 1e4,
905
+ realpath: !0,
906
+ fs,
907
+ ...options
908
+ }, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err, file2) => {
909
+ if (err)
910
+ return callback(err);
911
+ options.fs.stat(getLockFile(file2, options), (err2, stat) => err2 ? err2.code === "ENOENT" ? callback(null, !1) : callback(err2) : callback(null, !isLockStale(stat, options)));
912
+ });
913
+ }
914
+ function getLocks() {
915
+ return locks;
916
+ }
917
+ onExit(() => {
918
+ for (let file in locks) {
919
+ let options = locks[file].options;
920
+ try {
921
+ options.fs.rmdirSync(getLockFile(file, options));
922
+ } catch {
923
+ }
924
+ }
925
+ });
926
+ module.exports.lock = lock;
927
+ module.exports.unlock = unlock;
928
+ module.exports.check = check;
929
+ module.exports.getLocks = getLocks;
930
+ }
931
+ });
932
+
933
+ // node_modules/proper-lockfile/lib/adapter.js
934
+ var require_adapter = __commonJS({
935
+ "node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
936
+ "use strict";
937
+ var fs = require_graceful_fs();
938
+ function createSyncFs(fs2) {
939
+ let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs2 };
940
+ return methods.forEach((method) => {
941
+ newFs[method] = (...args) => {
942
+ let callback = args.pop(), ret;
943
+ try {
944
+ ret = fs2[`${method}Sync`](...args);
945
+ } catch (err) {
946
+ return callback(err);
947
+ }
948
+ callback(null, ret);
949
+ };
950
+ }), newFs;
951
+ }
952
+ function toPromise(method) {
953
+ return (...args) => new Promise((resolve, reject) => {
954
+ args.push((err, result) => {
955
+ err ? reject(err) : resolve(result);
956
+ }), method(...args);
957
+ });
958
+ }
959
+ function toSync(method) {
960
+ return (...args) => {
961
+ let err, result;
962
+ if (args.push((_err, _result) => {
963
+ err = _err, result = _result;
964
+ }), method(...args), err)
965
+ throw err;
966
+ return result;
967
+ };
968
+ }
969
+ function toSyncOptions(options) {
970
+ if (options = { ...options }, options.fs = createSyncFs(options.fs || fs), typeof options.retries == "number" && options.retries > 0 || options.retries && typeof options.retries.retries == "number" && options.retries.retries > 0)
971
+ throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
972
+ return options;
973
+ }
974
+ module.exports = {
975
+ toPromise,
976
+ toSync,
977
+ toSyncOptions
978
+ };
979
+ }
980
+ });
981
+
982
+ // node_modules/proper-lockfile/index.js
983
+ var require_proper_lockfile = __commonJS({
984
+ "node_modules/proper-lockfile/index.js"(exports, module) {
985
+ "use strict";
986
+ var lockfile = require_lockfile(), { toPromise, toSync, toSyncOptions } = require_adapter();
987
+ async function lock(file, options) {
988
+ let release = await toPromise(lockfile.lock)(file, options);
989
+ return toPromise(release);
990
+ }
991
+ function lockSync(file, options) {
992
+ let release = toSync(lockfile.lock)(file, toSyncOptions(options));
993
+ return toSync(release);
994
+ }
995
+ function unlock(file, options) {
996
+ return toPromise(lockfile.unlock)(file, options);
997
+ }
998
+ function unlockSync(file, options) {
999
+ return toSync(lockfile.unlock)(file, toSyncOptions(options));
1000
+ }
1001
+ function check(file, options) {
1002
+ return toPromise(lockfile.check)(file, options);
1003
+ }
1004
+ function checkSync(file, options) {
1005
+ return toSync(lockfile.check)(file, toSyncOptions(options));
1006
+ }
1007
+ module.exports = lock;
1008
+ module.exports.lock = lock;
1009
+ module.exports.unlock = unlock;
1010
+ module.exports.lockSync = lockSync;
1011
+ module.exports.unlockSync = unlockSync;
1012
+ module.exports.check = check;
1013
+ module.exports.checkSync = checkSync;
1014
+ }
1015
+ });
1016
+
1017
+ export {
1018
+ require_proper_lockfile
1019
+ };