pxnpm 5.0.0 → 6.0.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 (727) hide show
  1. package/README.md +276 -2
  2. package/bin/{pxnpm.cjs → pnpm.cjs} +2 -2
  3. package/bin/{pxnpx.cjs → pnpx.cjs} +1 -1
  4. package/dist/node_modules/.modules.yaml +92 -98
  5. package/dist/node_modules/.pnpm/lock.yaml +303 -412
  6. package/dist/node_modules/{set-blocking → @isaacs/cliui}/LICENSE.txt +1 -1
  7. package/dist/node_modules/@isaacs/cliui/build/index.cjs +317 -0
  8. package/dist/node_modules/@isaacs/cliui/build/index.d.cts +43 -0
  9. package/dist/node_modules/@isaacs/cliui/build/lib/index.js +302 -0
  10. package/dist/node_modules/@isaacs/cliui/index.mjs +14 -0
  11. package/dist/node_modules/@isaacs/cliui/package.json +86 -0
  12. package/dist/node_modules/@npmcli/agent/lib/agents.js +206 -0
  13. package/dist/node_modules/@npmcli/agent/lib/dns.js +53 -0
  14. package/dist/node_modules/@npmcli/agent/lib/errors.js +61 -0
  15. package/dist/node_modules/@npmcli/agent/lib/index.js +56 -0
  16. package/dist/node_modules/@npmcli/agent/lib/options.js +86 -0
  17. package/dist/node_modules/@npmcli/agent/lib/proxy.js +88 -0
  18. package/dist/node_modules/@npmcli/agent/package.json +60 -0
  19. package/dist/node_modules/@npmcli/fs/lib/cp/index.js +1 -1
  20. package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +2 -2
  21. package/dist/node_modules/@npmcli/fs/lib/index.js +11 -10
  22. package/dist/node_modules/@npmcli/fs/lib/move-file.js +78 -0
  23. package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
  24. package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +4 -6
  25. package/dist/node_modules/@npmcli/fs/package.json +13 -11
  26. package/dist/node_modules/@pkgjs/parseargs/LICENSE +201 -0
  27. package/dist/node_modules/@pkgjs/parseargs/index.js +396 -0
  28. package/dist/node_modules/@pkgjs/parseargs/internal/errors.js +47 -0
  29. package/dist/node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0
  30. package/dist/node_modules/@pkgjs/parseargs/internal/util.js +14 -0
  31. package/dist/node_modules/@pkgjs/parseargs/internal/validators.js +89 -0
  32. package/dist/node_modules/@pkgjs/parseargs/package.json +36 -0
  33. package/dist/node_modules/@pkgjs/parseargs/utils.js +198 -0
  34. package/dist/node_modules/abbrev/lib/index.js +50 -0
  35. package/dist/node_modules/abbrev/package.json +33 -11
  36. package/dist/node_modules/agent-base/LICENSE +22 -0
  37. package/dist/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
  38. package/dist/node_modules/agent-base/dist/helpers.js +66 -0
  39. package/dist/node_modules/agent-base/dist/helpers.js.map +1 -0
  40. package/dist/node_modules/agent-base/dist/index.d.ts.map +1 -0
  41. package/dist/node_modules/agent-base/dist/index.js +175 -0
  42. package/dist/node_modules/agent-base/dist/index.js.map +1 -0
  43. package/dist/node_modules/agent-base/package.json +26 -41
  44. package/dist/node_modules/ansi-regex/index.js +3 -5
  45. package/dist/node_modules/ansi-regex/license +1 -1
  46. package/dist/node_modules/ansi-regex/package.json +9 -6
  47. package/dist/node_modules/ansi-styles/index.js +223 -0
  48. package/dist/node_modules/ansi-styles/license +9 -0
  49. package/dist/node_modules/ansi-styles/package.json +54 -0
  50. package/dist/node_modules/brace-expansion/index.js +86 -84
  51. package/dist/node_modules/brace-expansion/package.json +3 -4
  52. package/dist/node_modules/cacache/lib/content/read.js +10 -86
  53. package/dist/node_modules/cacache/lib/content/rm.js +2 -4
  54. package/dist/node_modules/cacache/lib/content/write.js +42 -25
  55. package/dist/node_modules/cacache/lib/entry-index.js +26 -100
  56. package/dist/node_modules/cacache/lib/get.js +1 -56
  57. package/dist/node_modules/cacache/lib/index.js +0 -3
  58. package/dist/node_modules/cacache/lib/memoization.js +2 -2
  59. package/dist/node_modules/cacache/lib/rm.js +5 -5
  60. package/dist/node_modules/cacache/lib/util/glob.js +7 -0
  61. package/dist/node_modules/cacache/lib/util/tmp.js +3 -10
  62. package/dist/node_modules/cacache/lib/verify.js +31 -31
  63. package/dist/node_modules/cacache/node_modules/fs-minipass/lib/index.js +443 -0
  64. package/dist/node_modules/cacache/node_modules/fs-minipass/package.json +54 -0
  65. package/dist/node_modules/cacache/package.json +23 -25
  66. package/dist/node_modules/color-convert/LICENSE +21 -0
  67. package/dist/node_modules/color-convert/conversions.js +839 -0
  68. package/dist/node_modules/color-convert/index.js +81 -0
  69. package/dist/node_modules/color-convert/package.json +48 -0
  70. package/dist/node_modules/color-convert/route.js +97 -0
  71. package/dist/node_modules/color-name/LICENSE +8 -0
  72. package/dist/node_modules/color-name/index.js +152 -0
  73. package/dist/node_modules/color-name/package.json +28 -0
  74. package/dist/node_modules/{safe-buffer → cross-spawn}/LICENSE +1 -1
  75. package/dist/node_modules/cross-spawn/index.js +39 -0
  76. package/dist/node_modules/cross-spawn/lib/enoent.js +59 -0
  77. package/dist/node_modules/cross-spawn/lib/parse.js +91 -0
  78. package/dist/node_modules/cross-spawn/lib/util/escape.js +45 -0
  79. package/dist/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  80. package/dist/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  81. package/dist/node_modules/cross-spawn/package.json +73 -0
  82. package/dist/node_modules/debug/package.json +4 -3
  83. package/dist/node_modules/debug/src/node.js +2 -2
  84. package/dist/node_modules/eastasianwidth/eastasianwidth.js +311 -0
  85. package/dist/node_modules/eastasianwidth/package.json +18 -0
  86. package/dist/node_modules/emoji-regex/RGI_Emoji.js +6 -0
  87. package/dist/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
  88. package/dist/node_modules/emoji-regex/es2015/index.js +1 -1
  89. package/dist/node_modules/emoji-regex/es2015/text.js +1 -1
  90. package/dist/node_modules/emoji-regex/index.js +1 -1
  91. package/dist/node_modules/emoji-regex/package.json +13 -11
  92. package/dist/node_modules/emoji-regex/text.js +1 -1
  93. package/dist/node_modules/{infer-owner → foreground-child}/LICENSE +1 -1
  94. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -0
  95. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js +58 -0
  96. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js.map +1 -0
  97. package/dist/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -0
  98. package/dist/node_modules/foreground-child/dist/commonjs/index.js +121 -0
  99. package/dist/node_modules/foreground-child/dist/commonjs/index.js.map +1 -0
  100. package/dist/node_modules/foreground-child/dist/commonjs/package.json +3 -0
  101. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -0
  102. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js +38 -0
  103. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +1 -0
  104. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -0
  105. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js +50 -0
  106. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js.map +1 -0
  107. package/dist/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -0
  108. package/dist/node_modules/foreground-child/dist/esm/all-signals.js +52 -0
  109. package/dist/node_modules/foreground-child/dist/esm/all-signals.js.map +1 -0
  110. package/dist/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -0
  111. package/dist/node_modules/foreground-child/dist/esm/index.js +113 -0
  112. package/dist/node_modules/foreground-child/dist/esm/index.js.map +1 -0
  113. package/dist/node_modules/foreground-child/dist/esm/package.json +3 -0
  114. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -0
  115. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js +34 -0
  116. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js.map +1 -0
  117. package/dist/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -0
  118. package/dist/node_modules/foreground-child/dist/esm/watchdog.js +46 -0
  119. package/dist/node_modules/foreground-child/dist/esm/watchdog.js.map +1 -0
  120. package/dist/node_modules/foreground-child/package.json +111 -0
  121. package/dist/node_modules/{cacache/node_modules/minimatch → fs-minipass/node_modules/minipass}/LICENSE +1 -1
  122. package/dist/node_modules/fs-minipass/node_modules/minipass/package.json +56 -0
  123. package/dist/node_modules/glob/LICENSE +1 -7
  124. package/dist/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  125. package/dist/node_modules/glob/dist/commonjs/glob.js +247 -0
  126. package/dist/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  127. package/dist/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  128. package/dist/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  129. package/dist/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  130. package/dist/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  131. package/dist/node_modules/glob/dist/commonjs/ignore.js +119 -0
  132. package/dist/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  133. package/dist/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  134. package/dist/node_modules/glob/dist/commonjs/index.js +68 -0
  135. package/dist/node_modules/glob/dist/commonjs/index.js.map +1 -0
  136. package/dist/node_modules/glob/dist/commonjs/package.json +3 -0
  137. package/dist/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  138. package/dist/node_modules/glob/dist/commonjs/pattern.js +219 -0
  139. package/dist/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  140. package/dist/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  141. package/dist/node_modules/glob/dist/commonjs/processor.js +301 -0
  142. package/dist/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  143. package/dist/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  144. package/dist/node_modules/glob/dist/commonjs/walker.js +387 -0
  145. package/dist/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  146. package/dist/node_modules/glob/dist/esm/bin.d.mts +3 -0
  147. package/dist/node_modules/glob/dist/esm/bin.d.mts.map +1 -0
  148. package/dist/node_modules/glob/dist/esm/bin.mjs +270 -0
  149. package/dist/node_modules/glob/dist/esm/bin.mjs.map +1 -0
  150. package/dist/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  151. package/dist/node_modules/glob/dist/esm/glob.js +243 -0
  152. package/dist/node_modules/glob/dist/esm/glob.js.map +1 -0
  153. package/dist/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  154. package/dist/node_modules/glob/dist/esm/has-magic.js +23 -0
  155. package/dist/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  156. package/dist/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  157. package/dist/node_modules/glob/dist/esm/ignore.js +115 -0
  158. package/dist/node_modules/glob/dist/esm/ignore.js.map +1 -0
  159. package/dist/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  160. package/dist/node_modules/glob/dist/esm/index.js +55 -0
  161. package/dist/node_modules/glob/dist/esm/index.js.map +1 -0
  162. package/dist/node_modules/glob/dist/esm/package.json +3 -0
  163. package/dist/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  164. package/dist/node_modules/glob/dist/esm/pattern.js +215 -0
  165. package/dist/node_modules/glob/dist/esm/pattern.js.map +1 -0
  166. package/dist/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  167. package/dist/node_modules/glob/dist/esm/processor.js +294 -0
  168. package/dist/node_modules/glob/dist/esm/processor.js.map +1 -0
  169. package/dist/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  170. package/dist/node_modules/glob/dist/esm/walker.js +381 -0
  171. package/dist/node_modules/glob/dist/esm/walker.js.map +1 -0
  172. package/dist/node_modules/glob/package.json +79 -35
  173. package/dist/node_modules/{agentkeepalive → http-proxy-agent}/LICENSE +2 -3
  174. package/dist/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
  175. package/dist/node_modules/http-proxy-agent/dist/index.js +142 -8
  176. package/dist/node_modules/http-proxy-agent/dist/index.js.map +1 -1
  177. package/dist/node_modules/http-proxy-agent/package.json +22 -32
  178. package/dist/node_modules/https-proxy-agent/LICENSE +22 -0
  179. package/dist/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
  180. package/dist/node_modules/https-proxy-agent/dist/index.js +169 -8
  181. package/dist/node_modules/https-proxy-agent/dist/index.js.map +1 -1
  182. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
  183. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +47 -12
  184. package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
  185. package/dist/node_modules/https-proxy-agent/package.json +25 -31
  186. package/dist/node_modules/jackspeak/dist/commonjs/index.d.ts.map +1 -0
  187. package/dist/node_modules/jackspeak/dist/commonjs/index.js +1010 -0
  188. package/dist/node_modules/jackspeak/dist/commonjs/index.js.map +1 -0
  189. package/dist/node_modules/jackspeak/dist/commonjs/package.json +3 -0
  190. package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +1 -0
  191. package/dist/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +1 -0
  192. package/dist/node_modules/jackspeak/dist/commonjs/parse-args.js +50 -0
  193. package/dist/node_modules/jackspeak/dist/esm/index.d.ts.map +1 -0
  194. package/dist/node_modules/jackspeak/dist/esm/index.js +1000 -0
  195. package/dist/node_modules/jackspeak/dist/esm/index.js.map +1 -0
  196. package/dist/node_modules/jackspeak/dist/esm/package.json +3 -0
  197. package/dist/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +1 -0
  198. package/dist/node_modules/jackspeak/dist/esm/parse-args.js +26 -0
  199. package/dist/node_modules/jackspeak/dist/esm/parse-args.js.map +1 -0
  200. package/dist/node_modules/jackspeak/package.json +95 -0
  201. package/dist/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  202. package/dist/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
  203. package/dist/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  204. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  205. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  206. package/dist/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  207. package/dist/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  208. package/dist/node_modules/lru-cache/dist/esm/index.js +1542 -0
  209. package/dist/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  210. package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  211. package/dist/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  212. package/dist/node_modules/lru-cache/dist/esm/package.json +3 -0
  213. package/dist/node_modules/lru-cache/package.json +66 -46
  214. package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +28 -1
  215. package/dist/node_modules/make-fetch-happen/lib/options.js +2 -0
  216. package/dist/node_modules/make-fetch-happen/lib/remote.js +13 -3
  217. package/dist/node_modules/make-fetch-happen/package.json +19 -23
  218. package/dist/node_modules/minimatch/LICENSE +1 -1
  219. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  220. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  221. package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  222. package/dist/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  223. package/dist/node_modules/minimatch/dist/commonjs/ast.js +592 -0
  224. package/dist/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  225. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  226. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  227. package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  228. package/dist/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  229. package/dist/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  230. package/dist/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  231. package/dist/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  232. package/dist/node_modules/minimatch/dist/commonjs/index.js +1017 -0
  233. package/dist/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  234. package/dist/node_modules/minimatch/dist/commonjs/package.json +3 -0
  235. package/dist/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  236. package/dist/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  237. package/dist/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  238. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  239. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  240. package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  241. package/dist/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  242. package/dist/node_modules/minimatch/dist/esm/ast.js +588 -0
  243. package/dist/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  244. package/dist/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  245. package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  246. package/dist/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  247. package/dist/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  248. package/dist/node_modules/minimatch/dist/esm/escape.js +18 -0
  249. package/dist/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  250. package/dist/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  251. package/dist/node_modules/minimatch/dist/esm/index.js +1001 -0
  252. package/dist/node_modules/minimatch/dist/esm/index.js.map +1 -0
  253. package/dist/node_modules/minimatch/dist/esm/package.json +3 -0
  254. package/dist/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  255. package/dist/node_modules/minimatch/dist/esm/unescape.js +20 -0
  256. package/dist/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  257. package/dist/node_modules/minimatch/package.json +62 -13
  258. package/dist/node_modules/minipass/LICENSE +1 -1
  259. package/dist/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  260. package/dist/node_modules/minipass/dist/commonjs/index.js +1028 -0
  261. package/dist/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  262. package/dist/node_modules/minipass/dist/commonjs/package.json +3 -0
  263. package/dist/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  264. package/dist/node_modules/minipass/dist/esm/index.js +1018 -0
  265. package/dist/node_modules/minipass/dist/esm/index.js.map +1 -0
  266. package/dist/node_modules/minipass/dist/esm/package.json +3 -0
  267. package/dist/node_modules/minipass/package.json +62 -36
  268. package/dist/node_modules/minipass-collect/LICENSE +1 -1
  269. package/dist/node_modules/minipass-collect/index.js +1 -1
  270. package/dist/node_modules/minipass-collect/package.json +7 -6
  271. package/dist/node_modules/minipass-fetch/lib/blob.js +1 -1
  272. package/dist/node_modules/minipass-fetch/lib/body.js +2 -2
  273. package/dist/node_modules/minipass-fetch/lib/index.js +16 -4
  274. package/dist/node_modules/minipass-fetch/lib/request.js +2 -1
  275. package/dist/node_modules/minipass-fetch/package.json +15 -13
  276. package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
  277. package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
  278. package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
  279. package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
  280. package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
  281. package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
  282. package/dist/node_modules/minipass-sized/node_modules/minipass/LICENSE +15 -0
  283. package/dist/node_modules/minipass-sized/node_modules/minipass/index.js +649 -0
  284. package/dist/node_modules/minipass-sized/node_modules/minipass/package.json +56 -0
  285. package/dist/node_modules/minizlib/node_modules/minipass/LICENSE +15 -0
  286. package/dist/node_modules/minizlib/node_modules/minipass/index.js +649 -0
  287. package/dist/node_modules/minizlib/node_modules/minipass/package.json +56 -0
  288. package/dist/node_modules/ms/index.js +1 -1
  289. package/dist/node_modules/ms/package.json +4 -5
  290. package/dist/node_modules/node-gyp/.release-please-manifest.json +3 -0
  291. package/dist/node_modules/node-gyp/bin/node-gyp.js +27 -29
  292. package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
  293. package/dist/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
  294. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +12 -14
  295. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +1 -1
  296. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +3 -1
  297. package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +4 -2
  298. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common.py +67 -17
  299. package/dist/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +98 -5
  300. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +5 -1
  301. package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +4 -0
  302. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +11 -15
  303. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +4 -4
  304. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +3 -6
  305. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +10 -3
  306. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +1 -4
  307. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +3 -4
  308. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +62 -31
  309. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +47 -52
  310. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +33 -5
  311. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +12 -0
  312. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +2 -5
  313. package/dist/node_modules/node-gyp/gyp/pylib/gyp/input.py +27 -42
  314. package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +12 -23
  315. package/dist/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +4 -5
  316. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +20 -21
  317. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +53 -0
  318. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +21 -20
  319. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
  320. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
  321. package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
  322. package/dist/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
  323. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +108 -0
  324. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
  325. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
  326. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
  327. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
  328. package/dist/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
  329. package/dist/node_modules/node-gyp/gyp/pylib/packaging/markers.py +252 -0
  330. package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +825 -0
  331. package/dist/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  332. package/dist/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
  333. package/dist/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
  334. package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
  335. package/dist/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
  336. package/dist/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
  337. package/dist/node_modules/node-gyp/gyp/pyproject.toml +84 -5
  338. package/dist/node_modules/node-gyp/gyp/release-please-config.json +11 -0
  339. package/dist/node_modules/node-gyp/lib/build.js +110 -96
  340. package/dist/node_modules/node-gyp/lib/clean.js +5 -5
  341. package/dist/node_modules/node-gyp/lib/configure.js +172 -204
  342. package/dist/node_modules/node-gyp/lib/create-config-gypi.js +14 -11
  343. package/dist/node_modules/node-gyp/lib/download.js +39 -0
  344. package/dist/node_modules/node-gyp/lib/find-node-directory.js +5 -5
  345. package/dist/node_modules/node-gyp/lib/find-python.js +128 -162
  346. package/dist/node_modules/node-gyp/lib/find-visualstudio.js +260 -133
  347. package/dist/node_modules/node-gyp/lib/install.js +27 -70
  348. package/dist/node_modules/node-gyp/lib/list.js +14 -15
  349. package/dist/node_modules/node-gyp/lib/log.js +168 -0
  350. package/dist/node_modules/node-gyp/lib/node-gyp.js +147 -174
  351. package/dist/node_modules/node-gyp/lib/process-release.js +22 -23
  352. package/dist/node_modules/node-gyp/lib/rebuild.js +1 -2
  353. package/dist/node_modules/node-gyp/lib/remove.js +18 -21
  354. package/dist/node_modules/node-gyp/lib/util.js +62 -45
  355. package/dist/node_modules/{cacache/node_modules/glob → node-gyp/node_modules/isexe}/LICENSE +1 -1
  356. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.d.ts.map +1 -0
  357. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js +46 -0
  358. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/index.js.map +1 -0
  359. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.d.ts.map +1 -0
  360. package/dist/node_modules/{@tootallnate/once/dist/types.js → node-gyp/node_modules/isexe/dist/cjs/options.js} +1 -1
  361. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/options.js.map +1 -0
  362. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/package.json +3 -0
  363. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.d.ts.map +1 -0
  364. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js +67 -0
  365. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/posix.js.map +1 -0
  366. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.d.ts.map +1 -0
  367. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js +62 -0
  368. package/dist/node_modules/node-gyp/node_modules/isexe/dist/cjs/win32.js.map +1 -0
  369. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.d.ts.map +1 -0
  370. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js +16 -0
  371. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/index.js.map +1 -0
  372. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.d.ts.map +1 -0
  373. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js +2 -0
  374. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/options.js.map +1 -0
  375. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/package.json +3 -0
  376. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.d.ts.map +1 -0
  377. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js +62 -0
  378. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/posix.js.map +1 -0
  379. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.d.ts.map +1 -0
  380. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js +57 -0
  381. package/dist/node_modules/node-gyp/node_modules/isexe/dist/mjs/win32.js.map +1 -0
  382. package/dist/node_modules/node-gyp/node_modules/isexe/package.json +96 -0
  383. package/dist/node_modules/node-gyp/node_modules/which/bin/which.js +52 -0
  384. package/dist/node_modules/node-gyp/node_modules/which/lib/index.js +111 -0
  385. package/dist/node_modules/node-gyp/node_modules/which/package.json +57 -0
  386. package/dist/node_modules/node-gyp/package.json +12 -12
  387. package/dist/node_modules/node-gyp/release-please-config.json +40 -0
  388. package/dist/node_modules/nopt/bin/nopt.js +7 -34
  389. package/dist/node_modules/nopt/lib/debug.js +5 -0
  390. package/dist/node_modules/nopt/lib/nopt-lib.js +479 -0
  391. package/dist/node_modules/nopt/lib/nopt.js +21 -506
  392. package/dist/node_modules/nopt/lib/type-defs.js +91 -0
  393. package/dist/node_modules/nopt/package.json +13 -15
  394. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
  395. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js +124 -0
  396. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
  397. package/dist/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
  398. package/dist/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
  399. package/dist/node_modules/package-json-from-dist/dist/esm/index.js +119 -0
  400. package/dist/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
  401. package/dist/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
  402. package/dist/node_modules/package-json-from-dist/package.json +68 -0
  403. package/dist/node_modules/path-key/index.js +16 -0
  404. package/dist/node_modules/path-key/license +9 -0
  405. package/dist/node_modules/path-key/package.json +39 -0
  406. package/dist/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  407. package/dist/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
  408. package/dist/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  409. package/dist/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  410. package/dist/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  411. package/dist/node_modules/path-scurry/dist/esm/index.js +1979 -0
  412. package/dist/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  413. package/dist/node_modules/path-scurry/dist/esm/package.json +3 -0
  414. package/dist/node_modules/path-scurry/package.json +89 -0
  415. package/dist/node_modules/{inflight → proc-log}/LICENSE +1 -1
  416. package/dist/node_modules/proc-log/lib/index.js +153 -0
  417. package/dist/node_modules/proc-log/package.json +45 -0
  418. package/dist/node_modules/semver/bin/semver.js +5 -14
  419. package/dist/node_modules/semver/classes/range.js +4 -3
  420. package/dist/node_modules/semver/classes/semver.js +1 -1
  421. package/dist/node_modules/semver/functions/coerce.js +13 -5
  422. package/dist/node_modules/semver/internal/lrucache.js +40 -0
  423. package/dist/node_modules/semver/internal/re.js +7 -2
  424. package/dist/node_modules/semver/package.json +8 -18
  425. package/dist/node_modules/shebang-command/index.js +19 -0
  426. package/dist/node_modules/shebang-command/license +9 -0
  427. package/dist/node_modules/shebang-command/package.json +34 -0
  428. package/dist/node_modules/shebang-regex/index.js +2 -0
  429. package/dist/node_modules/shebang-regex/license +9 -0
  430. package/dist/node_modules/shebang-regex/package.json +35 -0
  431. package/dist/node_modules/signal-exit/LICENSE.txt +1 -1
  432. package/dist/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  433. package/dist/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  434. package/dist/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  435. package/dist/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  436. package/dist/node_modules/signal-exit/dist/cjs/index.js +279 -0
  437. package/dist/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  438. package/dist/node_modules/signal-exit/dist/cjs/package.json +3 -0
  439. package/dist/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  440. package/dist/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  441. package/dist/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  442. package/dist/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  443. package/dist/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  444. package/dist/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  445. package/dist/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  446. package/dist/node_modules/signal-exit/dist/mjs/index.js +275 -0
  447. package/dist/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  448. package/dist/node_modules/signal-exit/dist/mjs/package.json +3 -0
  449. package/dist/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  450. package/dist/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  451. package/dist/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  452. package/dist/node_modules/signal-exit/package.json +87 -19
  453. package/dist/node_modules/socks/build/common/helpers.js +5 -1
  454. package/dist/node_modules/socks/build/common/helpers.js.map +1 -1
  455. package/dist/node_modules/socks/package.json +1 -1
  456. package/dist/node_modules/socks-proxy-agent/LICENSE +22 -0
  457. package/dist/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
  458. package/dist/node_modules/socks-proxy-agent/dist/index.js +134 -146
  459. package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
  460. package/dist/node_modules/socks-proxy-agent/package.json +33 -72
  461. package/dist/node_modules/ssri/lib/index.js +158 -102
  462. package/dist/node_modules/ssri/package.json +14 -12
  463. package/dist/node_modules/string-width/index.js +26 -19
  464. package/dist/node_modules/string-width/license +1 -1
  465. package/dist/node_modules/string-width/package.json +12 -9
  466. package/dist/node_modules/string-width-cjs/index.js +47 -0
  467. package/dist/node_modules/string-width-cjs/license +9 -0
  468. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +10 -0
  469. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/license +9 -0
  470. package/dist/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +55 -0
  471. package/dist/node_modules/{delegates/License → string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt} +1 -1
  472. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  473. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  474. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +6 -0
  475. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +50 -0
  476. package/dist/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +6 -0
  477. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +4 -0
  478. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/license +9 -0
  479. package/dist/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +54 -0
  480. package/dist/node_modules/string-width-cjs/package.json +56 -0
  481. package/dist/node_modules/strip-ansi/index.js +13 -3
  482. package/dist/node_modules/strip-ansi/license +1 -1
  483. package/dist/node_modules/strip-ansi/package.json +10 -7
  484. package/dist/node_modules/strip-ansi-cjs/index.js +4 -0
  485. package/dist/node_modules/strip-ansi-cjs/license +9 -0
  486. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  487. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +9 -0
  488. package/dist/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  489. package/dist/node_modules/strip-ansi-cjs/package.json +54 -0
  490. package/dist/node_modules/unique-filename/package.json +12 -9
  491. package/dist/node_modules/unique-slug/package.json +10 -7
  492. package/dist/node_modules/wrap-ansi/index.js +214 -0
  493. package/dist/node_modules/wrap-ansi/license +9 -0
  494. package/dist/node_modules/wrap-ansi/package.json +69 -0
  495. package/dist/node_modules/wrap-ansi-cjs/index.js +216 -0
  496. package/dist/node_modules/wrap-ansi-cjs/license +9 -0
  497. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  498. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +9 -0
  499. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  500. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +163 -0
  501. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +9 -0
  502. package/dist/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +56 -0
  503. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  504. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  505. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  506. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +6 -0
  507. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +50 -0
  508. package/dist/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +6 -0
  509. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +47 -0
  510. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/license +9 -0
  511. package/dist/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +56 -0
  512. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +4 -0
  513. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +9 -0
  514. package/dist/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +54 -0
  515. package/dist/node_modules/wrap-ansi-cjs/package.json +62 -0
  516. package/dist/pnpm.cjs +161888 -155937
  517. package/dist/pnpmrc +0 -7
  518. package/dist/{scripts/bash.sh → templates/completion.bash} +2 -1
  519. package/dist/{scripts/fish.sh → templates/completion.fish} +1 -1
  520. package/dist/templates/completion.ps1 +193 -0
  521. package/dist/templates/completion.zsh +27 -0
  522. package/dist/worker.js +5462 -9749
  523. package/package.json +140 -6
  524. package/dist/node_modules/@gar/promisify/index.js +0 -36
  525. package/dist/node_modules/@gar/promisify/package.json +0 -32
  526. package/dist/node_modules/@npmcli/fs/lib/common/owner-sync.js +0 -96
  527. package/dist/node_modules/@npmcli/fs/lib/common/owner.js +0 -96
  528. package/dist/node_modules/@npmcli/fs/lib/copy-file.js +0 -16
  529. package/dist/node_modules/@npmcli/fs/lib/fs.js +0 -14
  530. package/dist/node_modules/@npmcli/fs/lib/mkdir.js +0 -19
  531. package/dist/node_modules/@npmcli/fs/lib/mkdtemp.js +0 -23
  532. package/dist/node_modules/@npmcli/fs/lib/rm/index.js +0 -22
  533. package/dist/node_modules/@npmcli/fs/lib/rm/polyfill.js +0 -239
  534. package/dist/node_modules/@npmcli/fs/lib/with-owner-sync.js +0 -21
  535. package/dist/node_modules/@npmcli/fs/lib/with-owner.js +0 -21
  536. package/dist/node_modules/@npmcli/fs/lib/write-file.js +0 -14
  537. package/dist/node_modules/@npmcli/move-file/lib/index.js +0 -185
  538. package/dist/node_modules/@npmcli/move-file/package.json +0 -47
  539. package/dist/node_modules/@tootallnate/once/LICENSE +0 -21
  540. package/dist/node_modules/@tootallnate/once/dist/index.js +0 -24
  541. package/dist/node_modules/@tootallnate/once/dist/index.js.map +0 -1
  542. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js +0 -3
  543. package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +0 -1
  544. package/dist/node_modules/@tootallnate/once/dist/types.js.map +0 -1
  545. package/dist/node_modules/@tootallnate/once/package.json +0 -52
  546. package/dist/node_modules/abbrev/abbrev.js +0 -61
  547. package/dist/node_modules/agent-base/dist/src/index.js +0 -203
  548. package/dist/node_modules/agent-base/dist/src/index.js.map +0 -1
  549. package/dist/node_modules/agent-base/dist/src/promisify.js +0 -18
  550. package/dist/node_modules/agent-base/dist/src/promisify.js.map +0 -1
  551. package/dist/node_modules/agentkeepalive/browser.js +0 -5
  552. package/dist/node_modules/agentkeepalive/index.js +0 -5
  553. package/dist/node_modules/agentkeepalive/lib/agent.js +0 -402
  554. package/dist/node_modules/agentkeepalive/lib/constants.js +0 -14
  555. package/dist/node_modules/agentkeepalive/lib/https_agent.js +0 -51
  556. package/dist/node_modules/agentkeepalive/package.json +0 -56
  557. package/dist/node_modules/aproba/LICENSE +0 -14
  558. package/dist/node_modules/aproba/index.js +0 -105
  559. package/dist/node_modules/aproba/package.json +0 -35
  560. package/dist/node_modules/are-we-there-yet/lib/index.js +0 -4
  561. package/dist/node_modules/are-we-there-yet/lib/tracker-base.js +0 -11
  562. package/dist/node_modules/are-we-there-yet/lib/tracker-group.js +0 -116
  563. package/dist/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -36
  564. package/dist/node_modules/are-we-there-yet/lib/tracker.js +0 -32
  565. package/dist/node_modules/are-we-there-yet/package.json +0 -56
  566. package/dist/node_modules/cacache/lib/util/fix-owner.js +0 -145
  567. package/dist/node_modules/cacache/lib/util/move-file.js +0 -56
  568. package/dist/node_modules/cacache/node_modules/brace-expansion/LICENSE +0 -21
  569. package/dist/node_modules/cacache/node_modules/brace-expansion/index.js +0 -203
  570. package/dist/node_modules/cacache/node_modules/brace-expansion/package.json +0 -46
  571. package/dist/node_modules/cacache/node_modules/glob/common.js +0 -244
  572. package/dist/node_modules/cacache/node_modules/glob/glob.js +0 -790
  573. package/dist/node_modules/cacache/node_modules/glob/package.json +0 -55
  574. package/dist/node_modules/cacache/node_modules/glob/sync.js +0 -486
  575. package/dist/node_modules/cacache/node_modules/minimatch/lib/path.js +0 -4
  576. package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +0 -944
  577. package/dist/node_modules/cacache/node_modules/minimatch/package.json +0 -35
  578. package/dist/node_modules/color-support/bin.js +0 -3
  579. package/dist/node_modules/color-support/browser.js +0 -14
  580. package/dist/node_modules/color-support/index.js +0 -134
  581. package/dist/node_modules/color-support/package.json +0 -36
  582. package/dist/node_modules/concat-map/LICENSE +0 -18
  583. package/dist/node_modules/concat-map/README.markdown +0 -62
  584. package/dist/node_modules/concat-map/index.js +0 -13
  585. package/dist/node_modules/concat-map/package.json +0 -43
  586. package/dist/node_modules/console-control-strings/LICENSE +0 -13
  587. package/dist/node_modules/console-control-strings/README.md~ +0 -140
  588. package/dist/node_modules/console-control-strings/index.js +0 -125
  589. package/dist/node_modules/console-control-strings/package.json +0 -27
  590. package/dist/node_modules/debug/node_modules/ms/index.js +0 -162
  591. package/dist/node_modules/debug/node_modules/ms/package.json +0 -37
  592. package/dist/node_modules/delegates/index.js +0 -121
  593. package/dist/node_modules/delegates/package.json +0 -13
  594. package/dist/node_modules/fs.realpath/LICENSE +0 -43
  595. package/dist/node_modules/fs.realpath/index.js +0 -66
  596. package/dist/node_modules/fs.realpath/old.js +0 -303
  597. package/dist/node_modules/fs.realpath/package.json +0 -26
  598. package/dist/node_modules/gauge/lib/base-theme.js +0 -18
  599. package/dist/node_modules/gauge/lib/error.js +0 -24
  600. package/dist/node_modules/gauge/lib/has-color.js +0 -4
  601. package/dist/node_modules/gauge/lib/index.js +0 -289
  602. package/dist/node_modules/gauge/lib/plumbing.js +0 -50
  603. package/dist/node_modules/gauge/lib/process.js +0 -3
  604. package/dist/node_modules/gauge/lib/progress-bar.js +0 -41
  605. package/dist/node_modules/gauge/lib/render-template.js +0 -222
  606. package/dist/node_modules/gauge/lib/set-immediate.js +0 -7
  607. package/dist/node_modules/gauge/lib/set-interval.js +0 -3
  608. package/dist/node_modules/gauge/lib/spin.js +0 -5
  609. package/dist/node_modules/gauge/lib/template-item.js +0 -87
  610. package/dist/node_modules/gauge/lib/theme-set.js +0 -122
  611. package/dist/node_modules/gauge/lib/themes.js +0 -56
  612. package/dist/node_modules/gauge/lib/wide-truncate.js +0 -31
  613. package/dist/node_modules/gauge/package.json +0 -66
  614. package/dist/node_modules/glob/common.js +0 -238
  615. package/dist/node_modules/glob/glob.js +0 -790
  616. package/dist/node_modules/glob/sync.js +0 -486
  617. package/dist/node_modules/has-unicode/LICENSE +0 -14
  618. package/dist/node_modules/has-unicode/index.js +0 -16
  619. package/dist/node_modules/has-unicode/package.json +0 -30
  620. package/dist/node_modules/http-proxy-agent/dist/agent.js +0 -145
  621. package/dist/node_modules/http-proxy-agent/dist/agent.js.map +0 -1
  622. package/dist/node_modules/https-proxy-agent/dist/agent.js +0 -177
  623. package/dist/node_modules/https-proxy-agent/dist/agent.js.map +0 -1
  624. package/dist/node_modules/humanize-ms/LICENSE +0 -17
  625. package/dist/node_modules/humanize-ms/index.js +0 -24
  626. package/dist/node_modules/humanize-ms/package.json +0 -37
  627. package/dist/node_modules/infer-owner/index.js +0 -71
  628. package/dist/node_modules/infer-owner/package.json +0 -26
  629. package/dist/node_modules/inflight/inflight.js +0 -54
  630. package/dist/node_modules/inflight/package.json +0 -29
  631. package/dist/node_modules/inherits/LICENSE +0 -16
  632. package/dist/node_modules/inherits/inherits.js +0 -9
  633. package/dist/node_modules/inherits/inherits_browser.js +0 -27
  634. package/dist/node_modules/inherits/package.json +0 -29
  635. package/dist/node_modules/lru-cache/index.js +0 -1227
  636. package/dist/node_modules/lru-cache/index.mjs +0 -1227
  637. package/dist/node_modules/make-fetch-happen/lib/agent.js +0 -214
  638. package/dist/node_modules/make-fetch-happen/lib/dns.js +0 -49
  639. package/dist/node_modules/minimatch/minimatch.js +0 -947
  640. package/dist/node_modules/node-gyp/.github/workflows/release-please-v9.yml +0 -57
  641. package/dist/node_modules/node-gyp/.github/workflows/release-please.yml +0 -56
  642. package/dist/node_modules/node-gyp/.github/workflows/tests.yml +0 -59
  643. package/dist/node_modules/node-gyp/.github/workflows/visual-studio.yml +0 -37
  644. package/dist/node_modules/node-gyp/gyp/.flake8 +0 -4
  645. package/dist/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml +0 -36
  646. package/dist/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml +0 -45
  647. package/dist/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml +0 -32
  648. package/dist/node_modules/node-gyp/gyp/.github/workflows/release-please.yml +0 -16
  649. package/dist/node_modules/node-gyp/gyp/tools/README +0 -15
  650. package/dist/node_modules/node-gyp/gyp/tools/Xcode/README +0 -5
  651. package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -27
  652. package/dist/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -226
  653. package/dist/node_modules/node-gyp/gyp/tools/emacs/README +0 -12
  654. package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el +0 -63
  655. package/dist/node_modules/node-gyp/gyp/tools/emacs/gyp.el +0 -275
  656. package/dist/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh +0 -7
  657. package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp +0 -1105
  658. package/dist/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified +0 -1107
  659. package/dist/node_modules/node-gyp/gyp/tools/graphviz.py +0 -102
  660. package/dist/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -156
  661. package/dist/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -181
  662. package/dist/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -339
  663. package/dist/node_modules/node-gyp/update-gyp.py +0 -64
  664. package/dist/node_modules/npmlog/lib/log.js +0 -404
  665. package/dist/node_modules/npmlog/package.json +0 -51
  666. package/dist/node_modules/once/once.js +0 -42
  667. package/dist/node_modules/once/package.json +0 -33
  668. package/dist/node_modules/path-is-absolute/index.js +0 -20
  669. package/dist/node_modules/path-is-absolute/license +0 -21
  670. package/dist/node_modules/path-is-absolute/package.json +0 -43
  671. package/dist/node_modules/promise-inflight/LICENSE +0 -14
  672. package/dist/node_modules/promise-inflight/inflight.js +0 -36
  673. package/dist/node_modules/promise-inflight/package.json +0 -24
  674. package/dist/node_modules/readable-stream/LICENSE +0 -47
  675. package/dist/node_modules/readable-stream/errors-browser.js +0 -127
  676. package/dist/node_modules/readable-stream/errors.js +0 -116
  677. package/dist/node_modules/readable-stream/experimentalWarning.js +0 -17
  678. package/dist/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  679. package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  680. package/dist/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  681. package/dist/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  682. package/dist/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  683. package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  684. package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  685. package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  686. package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  687. package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  688. package/dist/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  689. package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  690. package/dist/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  691. package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  692. package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  693. package/dist/node_modules/readable-stream/package.json +0 -68
  694. package/dist/node_modules/readable-stream/readable-browser.js +0 -9
  695. package/dist/node_modules/readable-stream/readable.js +0 -16
  696. package/dist/node_modules/rimraf/LICENSE +0 -15
  697. package/dist/node_modules/rimraf/bin.js +0 -68
  698. package/dist/node_modules/rimraf/package.json +0 -32
  699. package/dist/node_modules/rimraf/rimraf.js +0 -360
  700. package/dist/node_modules/safe-buffer/index.js +0 -65
  701. package/dist/node_modules/safe-buffer/package.json +0 -51
  702. package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
  703. package/dist/node_modules/semver/node_modules/lru-cache/index.js +0 -334
  704. package/dist/node_modules/semver/node_modules/lru-cache/package.json +0 -34
  705. package/dist/node_modules/set-blocking/index.js +0 -7
  706. package/dist/node_modules/set-blocking/package.json +0 -42
  707. package/dist/node_modules/signal-exit/index.js +0 -202
  708. package/dist/node_modules/signal-exit/signals.js +0 -53
  709. package/dist/node_modules/string_decoder/LICENSE +0 -48
  710. package/dist/node_modules/string_decoder/lib/string_decoder.js +0 -296
  711. package/dist/node_modules/string_decoder/package.json +0 -34
  712. package/dist/node_modules/util-deprecate/LICENSE +0 -24
  713. package/dist/node_modules/util-deprecate/browser.js +0 -67
  714. package/dist/node_modules/util-deprecate/node.js +0 -6
  715. package/dist/node_modules/util-deprecate/package.json +0 -27
  716. package/dist/node_modules/wide-align/LICENSE +0 -14
  717. package/dist/node_modules/wide-align/align.js +0 -65
  718. package/dist/node_modules/wide-align/package.json +0 -33
  719. package/dist/node_modules/wrappy/LICENSE +0 -15
  720. package/dist/node_modules/wrappy/package.json +0 -29
  721. package/dist/node_modules/wrappy/wrappy.js +0 -33
  722. package/dist/scripts/zsh.sh +0 -18
  723. /package/dist/node_modules/@npmcli/fs/lib/{errors.js → cp/errors.js} +0 -0
  724. /package/dist/node_modules/{cacache/node_modules/brace-expansion → brace-expansion}/.github/FUNDING.yml +0 -0
  725. /package/dist/node_modules/{color-support → cacache/node_modules/fs-minipass}/LICENSE +0 -0
  726. /package/dist/node_modules/{minipass → fs-minipass/node_modules/minipass}/index.js +0 -0
  727. /package/dist/node_modules/{once → node-gyp/node_modules/which}/LICENSE +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,iEAAiE;AACjE,+DAA+D;AAC/D,qDAAqD;AACrD,4DAA4D;AAC5D,6CAAsC;AAC7B,wFADA,oBAAO,OACA;AAQhB,MAAM,SAAS,GAAG,CAAC,OAAY,EAAwB,EAAE,CACvD,CAAC,CAAC,OAAO;IACT,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO,OAAO,CAAC,cAAc,KAAK,UAAU;IAC5C,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU;IAClC,OAAO,OAAO,CAAC,UAAU,KAAK,UAAU;IACxC,OAAO,OAAO,CAAC,SAAS,KAAK,UAAU;IACvC,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU;IAClC,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;IAC/B,OAAO,OAAO,CAAC,EAAE,KAAK,UAAU,CAAA;AAElC,MAAM,YAAY,GA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CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YACxD,oBAAoB;YACpB,OAAO,GAAG,CAAA;SACX;aAAM;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;SAC3C;IACH,CAAC;CACF;AAED,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAA;AAClC,iEAAiE;AACjE,yBAAyB;AACZ,KA6BT,cAAc,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,EAAE,CACxE;AA9BC;;;;;;;;GAQG;AACH,cAAM;AAEN;;;;;;GAMG;AACH,YAAI;AAEJ;;;;;;GAMG;AACH,cAAM,aAGP","sourcesContent":["// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js'\nexport { signals }\n\n// just a loosened process type so we can do some evil things\ntype ProcessRE = NodeJS.Process & {\n reallyExit: (code?: number | undefined | null) => any\n emit: (ev: string, ...a: any[]) => any\n}\n\nconst processOk = (process: any): process is ProcessRE =>\n !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n\nconst kExitEmitter = Symbol.for('signal-exit emitter')\nconst global: typeof globalThis & { [kExitEmitter]?: Emitter } = globalThis\nconst ObjectDefineProperty = Object.defineProperty.bind(Object)\n\n/**\n * A function that takes an exit code and signal as arguments\n *\n * In the case of signal exits *only*, a return value of true\n * will indicate that the signal is being handled, and we should\n * not synthetically exit with the signal we received. Regardless\n * of the handler return value, the handler is unloaded when an\n * otherwise fatal signal is received, so you get exactly 1 shot\n * at it, unless you add another onExit handler at that point.\n *\n * In the case of numeric code exits, we may already have committed\n * to exiting the process, for example via a fatal exception or\n * unhandled promise rejection, so it is impossible to stop safely.\n */\nexport type Handler = (\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n) => true | void\ntype ExitEvent = 'afterExit' | 'exit'\ntype Emitted = { [k in ExitEvent]: boolean }\ntype Listeners = { [k in ExitEvent]: Handler[] }\n\n// teeny special purpose ee\nclass Emitter {\n emitted: Emitted = {\n afterExit: false,\n exit: false,\n }\n\n listeners: Listeners = {\n afterExit: [],\n exit: [],\n }\n\n count: number = 0\n id: number = Math.random()\n\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter]\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n }\n\n on(ev: ExitEvent, fn: Handler) {\n this.listeners[ev].push(fn)\n }\n\n removeListener(ev: ExitEvent, fn: Handler) {\n const list = this.listeners[ev]\n const i = list.indexOf(fn)\n /* c8 ignore start */\n if (i === -1) {\n return\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0\n } else {\n list.splice(i, 1)\n }\n }\n\n emit(\n ev: ExitEvent,\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n ): boolean {\n if (this.emitted[ev]) {\n return false\n }\n this.emitted[ev] = true\n let ret: boolean = false\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret\n }\n return ret\n }\n}\n\nabstract class SignalExitBase {\n abstract onExit(cb: Handler, opts?: { alwaysLast?: boolean }): () => void\n abstract load(): void\n abstract unload(): void\n}\n\nconst signalExitWrap = <T extends SignalExitBase>(handler: T) => {\n return {\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n return handler.onExit(cb, opts)\n },\n load() {\n return handler.load()\n },\n unload() {\n return handler.unload()\n },\n }\n}\n\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => {}\n }\n load() {}\n unload() {}\n}\n\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'\n /* c8 ignore stop */\n #emitter = new Emitter()\n #process: ProcessRE\n #originalProcessEmit: ProcessRE['emit']\n #originalProcessReallyExit: ProcessRE['reallyExit']\n\n #sigListeners: { [k in NodeJS.Signals]?: () => void } = {}\n #loaded: boolean = false\n\n constructor(process: ProcessRE) {\n super()\n this.#process = process\n // { <signal>: <listener fn>, ... }\n this.#sigListeners = {}\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig)\n let { count } = this.#emitter\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process as unknown as {\n __signal_exit_emitter__?: { count: number }\n }\n if (\n typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number'\n ) {\n count += p.__signal_exit_emitter__.count\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload()\n const ret = this.#emitter.emit('exit', null, sig)\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig\n if (!ret) process.kill(process.pid, s)\n /* c8 ignore stop */\n }\n }\n }\n\n this.#originalProcessReallyExit = process.reallyExit\n this.#originalProcessEmit = process.emit\n }\n\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => {}\n }\n /* c8 ignore stop */\n\n if (this.#loaded === false) {\n this.load()\n }\n\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit'\n this.#emitter.on(ev, cb)\n return () => {\n this.#emitter.removeListener(ev, cb)\n if (\n this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0\n ) {\n this.unload()\n }\n }\n }\n\n load() {\n if (this.#loaded) {\n return\n }\n this.#loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1\n\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig]\n if (fn) this.#process.on(sig, fn)\n } catch (_) {}\n }\n\n this.#process.emit = (ev: string, ...a: any[]) => {\n return this.#processEmit(ev, ...a)\n }\n this.#process.reallyExit = (code?: number | null | undefined) => {\n return this.#processReallyExit(code)\n }\n }\n\n unload() {\n if (!this.#loaded) {\n return\n }\n this.#loaded = false\n\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig]\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig)\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n })\n this.#process.emit = this.#originalProcessEmit\n this.#process.reallyExit = this.#originalProcessReallyExit\n this.#emitter.count -= 1\n }\n\n #processReallyExit(code?: number | null | undefined) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0\n }\n this.#process.exitCode = code || 0\n /* c8 ignore stop */\n\n this.#emitter.emit('exit', this.#process.exitCode, null)\n return this.#originalProcessReallyExit.call(\n this.#process,\n this.#process.exitCode\n )\n }\n\n #processEmit(ev: string, ...args: any[]): any {\n const og = this.#originalProcessEmit\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0]\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args)\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null)\n /* c8 ignore stop */\n return ret\n } else {\n return og.call(this.#process, ev, ...args)\n }\n }\n}\n\nconst process = globalThis.process\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const {\n /**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\n onExit,\n\n /**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n load,\n\n /**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n unload,\n} = signalExitWrap(\n processOk(process) ? new SignalExit(process) : new SignalExitFallback()\n)\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAO,CAAA"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.signals = void 0;
4
+ /**
5
+ * This is not the set of all possible signals.
6
+ *
7
+ * It IS, however, the set of all signals that trigger
8
+ * an exit on either Linux or BSD systems. Linux is a
9
+ * superset of the signal names supported on BSD, and
10
+ * the unknown signals just fail to register, so we can
11
+ * catch that easily enough.
12
+ *
13
+ * Windows signals are a different set, since there are
14
+ * signals that terminate Windows processes, but don't
15
+ * terminate (or don't even exist) on Posix systems.
16
+ *
17
+ * Don't bother with SIGKILL. It's uncatchable, which
18
+ * means that we can't fire any callbacks anyway.
19
+ *
20
+ * If a user does happen to register a handler on a non-
21
+ * fatal signal like SIGWINCH or something, and then
22
+ * exit, it'll end up firing `process.emit('exit')`, so
23
+ * the handler will be fired anyway.
24
+ *
25
+ * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
26
+ * artificially, inherently leave the process in a
27
+ * state from which it is not safe to try and enter JS
28
+ * listeners.
29
+ */
30
+ exports.signals = [];
31
+ exports.signals.push('SIGHUP', 'SIGINT', 'SIGTERM');
32
+ if (process.platform !== 'win32') {
33
+ exports.signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'
34
+ // should detect profiler and enable/disable accordingly.
35
+ // see #21
36
+ // 'SIGPROF'
37
+ );
38
+ }
39
+ if (process.platform === 'linux') {
40
+ exports.signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');
41
+ }
42
+ //# sourceMappingURL=signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,OAAO,GAAqB,EAAE,CAAA;AAC3C,eAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,eAAO,CAAC,IAAI,CACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ;IACR,yDAAyD;IACzD,UAAU;IACV,YAAY;KACb,CAAA;CACF;AAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,eAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;CACxD","sourcesContent":["/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals: NodeJS.Signals[] = []\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM')\n\nif (process.platform !== 'win32') {\n signals.push(\n 'SIGALRM',\n 'SIGABRT',\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT')\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,eAAO,MAAM,MAAM,EAAE,CACnB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,KAC3B,MAAM,IAAqB,CAAA;AAChC,eAAO,MAAM,IAAI,YAAW,CAAA;AAC5B,eAAO,MAAM,MAAM,YAAW,CAAA"}
@@ -0,0 +1,4 @@
1
+ export const onExit = () => () => { };
2
+ export const load = () => { };
3
+ export const unload = () => { };
4
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,MAAM,GAGD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAA;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA","sourcesContent":["/**\n * This is a browser shim that provides the same functional interface\n * as the main node export, but it does nothing.\n * @module\n */\nimport type { Handler } from './index.js'\nexport const onExit: (\n cb: Handler,\n opts: { alwaysLast?: boolean }\n) => () => void = () => () => {}\nexport const load = () => {}\nexport const unload = () => {}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,CAAA;AAuBlB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAC1B,IAAI,GAAG,IAAI,CAAA;AA8QhB,eAAO;AACL;;;;;;;;GAQG;AACH,MAAM,OAzMO,OAAO;;wBAPiD,IAAI;AAkNzE;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,YAGP,CAAA"}
@@ -0,0 +1,275 @@
1
+ // Note: since nyc uses this module to output coverage, any lines
2
+ // that are in the direct sync flow of nyc's outputCoverage are
3
+ // ignored, since we can never get coverage for them.
4
+ // grab a reference to node's real process object right away
5
+ import { signals } from './signals.js';
6
+ export { signals };
7
+ const processOk = (process) => !!process &&
8
+ typeof process === 'object' &&
9
+ typeof process.removeListener === 'function' &&
10
+ typeof process.emit === 'function' &&
11
+ typeof process.reallyExit === 'function' &&
12
+ typeof process.listeners === 'function' &&
13
+ typeof process.kill === 'function' &&
14
+ typeof process.pid === 'number' &&
15
+ typeof process.on === 'function';
16
+ const kExitEmitter = Symbol.for('signal-exit emitter');
17
+ const global = globalThis;
18
+ const ObjectDefineProperty = Object.defineProperty.bind(Object);
19
+ // teeny special purpose ee
20
+ class Emitter {
21
+ emitted = {
22
+ afterExit: false,
23
+ exit: false,
24
+ };
25
+ listeners = {
26
+ afterExit: [],
27
+ exit: [],
28
+ };
29
+ count = 0;
30
+ id = Math.random();
31
+ constructor() {
32
+ if (global[kExitEmitter]) {
33
+ return global[kExitEmitter];
34
+ }
35
+ ObjectDefineProperty(global, kExitEmitter, {
36
+ value: this,
37
+ writable: false,
38
+ enumerable: false,
39
+ configurable: false,
40
+ });
41
+ }
42
+ on(ev, fn) {
43
+ this.listeners[ev].push(fn);
44
+ }
45
+ removeListener(ev, fn) {
46
+ const list = this.listeners[ev];
47
+ const i = list.indexOf(fn);
48
+ /* c8 ignore start */
49
+ if (i === -1) {
50
+ return;
51
+ }
52
+ /* c8 ignore stop */
53
+ if (i === 0 && list.length === 1) {
54
+ list.length = 0;
55
+ }
56
+ else {
57
+ list.splice(i, 1);
58
+ }
59
+ }
60
+ emit(ev, code, signal) {
61
+ if (this.emitted[ev]) {
62
+ return false;
63
+ }
64
+ this.emitted[ev] = true;
65
+ let ret = false;
66
+ for (const fn of this.listeners[ev]) {
67
+ ret = fn(code, signal) === true || ret;
68
+ }
69
+ if (ev === 'exit') {
70
+ ret = this.emit('afterExit', code, signal) || ret;
71
+ }
72
+ return ret;
73
+ }
74
+ }
75
+ class SignalExitBase {
76
+ }
77
+ const signalExitWrap = (handler) => {
78
+ return {
79
+ onExit(cb, opts) {
80
+ return handler.onExit(cb, opts);
81
+ },
82
+ load() {
83
+ return handler.load();
84
+ },
85
+ unload() {
86
+ return handler.unload();
87
+ },
88
+ };
89
+ };
90
+ class SignalExitFallback extends SignalExitBase {
91
+ onExit() {
92
+ return () => { };
93
+ }
94
+ load() { }
95
+ unload() { }
96
+ }
97
+ class SignalExit extends SignalExitBase {
98
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
99
+ // so use a supported signal instead
100
+ /* c8 ignore start */
101
+ #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';
102
+ /* c8 ignore stop */
103
+ #emitter = new Emitter();
104
+ #process;
105
+ #originalProcessEmit;
106
+ #originalProcessReallyExit;
107
+ #sigListeners = {};
108
+ #loaded = false;
109
+ constructor(process) {
110
+ super();
111
+ this.#process = process;
112
+ // { <signal>: <listener fn>, ... }
113
+ this.#sigListeners = {};
114
+ for (const sig of signals) {
115
+ this.#sigListeners[sig] = () => {
116
+ // If there are no other listeners, an exit is coming!
117
+ // Simplest way: remove us and then re-send the signal.
118
+ // We know that this will kill the process, so we can
119
+ // safely emit now.
120
+ const listeners = this.#process.listeners(sig);
121
+ let { count } = this.#emitter;
122
+ // This is a workaround for the fact that signal-exit v3 and signal
123
+ // exit v4 are not aware of each other, and each will attempt to let
124
+ // the other handle it, so neither of them do. To correct this, we
125
+ // detect if we're the only handler *except* for previous versions
126
+ // of signal-exit, and increment by the count of listeners it has
127
+ // created.
128
+ /* c8 ignore start */
129
+ const p = process;
130
+ if (typeof p.__signal_exit_emitter__ === 'object' &&
131
+ typeof p.__signal_exit_emitter__.count === 'number') {
132
+ count += p.__signal_exit_emitter__.count;
133
+ }
134
+ /* c8 ignore stop */
135
+ if (listeners.length === count) {
136
+ this.unload();
137
+ const ret = this.#emitter.emit('exit', null, sig);
138
+ /* c8 ignore start */
139
+ const s = sig === 'SIGHUP' ? this.#hupSig : sig;
140
+ if (!ret)
141
+ process.kill(process.pid, s);
142
+ /* c8 ignore stop */
143
+ }
144
+ };
145
+ }
146
+ this.#originalProcessReallyExit = process.reallyExit;
147
+ this.#originalProcessEmit = process.emit;
148
+ }
149
+ onExit(cb, opts) {
150
+ /* c8 ignore start */
151
+ if (!processOk(this.#process)) {
152
+ return () => { };
153
+ }
154
+ /* c8 ignore stop */
155
+ if (this.#loaded === false) {
156
+ this.load();
157
+ }
158
+ const ev = opts?.alwaysLast ? 'afterExit' : 'exit';
159
+ this.#emitter.on(ev, cb);
160
+ return () => {
161
+ this.#emitter.removeListener(ev, cb);
162
+ if (this.#emitter.listeners['exit'].length === 0 &&
163
+ this.#emitter.listeners['afterExit'].length === 0) {
164
+ this.unload();
165
+ }
166
+ };
167
+ }
168
+ load() {
169
+ if (this.#loaded) {
170
+ return;
171
+ }
172
+ this.#loaded = true;
173
+ // This is the number of onSignalExit's that are in play.
174
+ // It's important so that we can count the correct number of
175
+ // listeners on signals, and don't wait for the other one to
176
+ // handle it instead of us.
177
+ this.#emitter.count += 1;
178
+ for (const sig of signals) {
179
+ try {
180
+ const fn = this.#sigListeners[sig];
181
+ if (fn)
182
+ this.#process.on(sig, fn);
183
+ }
184
+ catch (_) { }
185
+ }
186
+ this.#process.emit = (ev, ...a) => {
187
+ return this.#processEmit(ev, ...a);
188
+ };
189
+ this.#process.reallyExit = (code) => {
190
+ return this.#processReallyExit(code);
191
+ };
192
+ }
193
+ unload() {
194
+ if (!this.#loaded) {
195
+ return;
196
+ }
197
+ this.#loaded = false;
198
+ signals.forEach(sig => {
199
+ const listener = this.#sigListeners[sig];
200
+ /* c8 ignore start */
201
+ if (!listener) {
202
+ throw new Error('Listener not defined for signal: ' + sig);
203
+ }
204
+ /* c8 ignore stop */
205
+ try {
206
+ this.#process.removeListener(sig, listener);
207
+ /* c8 ignore start */
208
+ }
209
+ catch (_) { }
210
+ /* c8 ignore stop */
211
+ });
212
+ this.#process.emit = this.#originalProcessEmit;
213
+ this.#process.reallyExit = this.#originalProcessReallyExit;
214
+ this.#emitter.count -= 1;
215
+ }
216
+ #processReallyExit(code) {
217
+ /* c8 ignore start */
218
+ if (!processOk(this.#process)) {
219
+ return 0;
220
+ }
221
+ this.#process.exitCode = code || 0;
222
+ /* c8 ignore stop */
223
+ this.#emitter.emit('exit', this.#process.exitCode, null);
224
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
225
+ }
226
+ #processEmit(ev, ...args) {
227
+ const og = this.#originalProcessEmit;
228
+ if (ev === 'exit' && processOk(this.#process)) {
229
+ if (typeof args[0] === 'number') {
230
+ this.#process.exitCode = args[0];
231
+ /* c8 ignore start */
232
+ }
233
+ /* c8 ignore start */
234
+ const ret = og.call(this.#process, ev, ...args);
235
+ /* c8 ignore start */
236
+ this.#emitter.emit('exit', this.#process.exitCode, null);
237
+ /* c8 ignore stop */
238
+ return ret;
239
+ }
240
+ else {
241
+ return og.call(this.#process, ev, ...args);
242
+ }
243
+ }
244
+ }
245
+ const process = globalThis.process;
246
+ // wrap so that we call the method on the actual handler, without
247
+ // exporting it directly.
248
+ export const {
249
+ /**
250
+ * Called when the process is exiting, whether via signal, explicit
251
+ * exit, or running out of stuff to do.
252
+ *
253
+ * If the global process object is not suitable for instrumentation,
254
+ * then this will be a no-op.
255
+ *
256
+ * Returns a function that may be used to unload signal-exit.
257
+ */
258
+ onExit,
259
+ /**
260
+ * Load the listeners. Likely you never need to call this, unless
261
+ * doing a rather deep integration with signal-exit functionality.
262
+ * Mostly exposed for the benefit of testing.
263
+ *
264
+ * @internal
265
+ */
266
+ load,
267
+ /**
268
+ * Unload the listeners. Likely you never need to call this, unless
269
+ * doing a rather deep integration with signal-exit functionality.
270
+ * Mostly exposed for the benefit of testing.
271
+ *
272
+ * @internal
273
+ */
274
+ unload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());
275
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,+DAA+D;AAC/D,qDAAqD;AACrD,4DAA4D;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC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AM,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAA;QACpC,IAAI,EAAE,KAAK,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAC7C,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;gBAC/B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gBAChC,qBAAqB;aACtB;YACD,qBAAqB;YACrB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;YAC/C,qBAAqB;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YACxD,oBAAoB;YACpB,OAAO,GAAG,CAAA;SACX;aAAM;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;SAC3C;IACH,CAAC;CACF;AAED,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAA;AAClC,iEAAiE;AACjE,yBAAyB;AACzB,MAAM,CAAC,MAAM;AACX;;;;;;;;GAQG;AACH,MAAM;AAEN;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,GACP,GAAG,cAAc,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,EAAE,CACxE,CAAA","sourcesContent":["// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js'\nexport { signals }\n\n// just a loosened process type so we can do some evil things\ntype ProcessRE = NodeJS.Process & {\n reallyExit: (code?: number | undefined | null) => any\n emit: (ev: string, ...a: any[]) => any\n}\n\nconst processOk = (process: any): process is ProcessRE =>\n !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n\nconst kExitEmitter = Symbol.for('signal-exit emitter')\nconst global: typeof globalThis & { [kExitEmitter]?: Emitter } = globalThis\nconst ObjectDefineProperty = Object.defineProperty.bind(Object)\n\n/**\n * A function that takes an exit code and signal as arguments\n *\n * In the case of signal exits *only*, a return value of true\n * will indicate that the signal is being handled, and we should\n * not synthetically exit with the signal we received. Regardless\n * of the handler return value, the handler is unloaded when an\n * otherwise fatal signal is received, so you get exactly 1 shot\n * at it, unless you add another onExit handler at that point.\n *\n * In the case of numeric code exits, we may already have committed\n * to exiting the process, for example via a fatal exception or\n * unhandled promise rejection, so it is impossible to stop safely.\n */\nexport type Handler = (\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n) => true | void\ntype ExitEvent = 'afterExit' | 'exit'\ntype Emitted = { [k in ExitEvent]: boolean }\ntype Listeners = { [k in ExitEvent]: Handler[] }\n\n// teeny special purpose ee\nclass Emitter {\n emitted: Emitted = {\n afterExit: false,\n exit: false,\n }\n\n listeners: Listeners = {\n afterExit: [],\n exit: [],\n }\n\n count: number = 0\n id: number = Math.random()\n\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter]\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n }\n\n on(ev: ExitEvent, fn: Handler) {\n this.listeners[ev].push(fn)\n }\n\n removeListener(ev: ExitEvent, fn: Handler) {\n const list = this.listeners[ev]\n const i = list.indexOf(fn)\n /* c8 ignore start */\n if (i === -1) {\n return\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0\n } else {\n list.splice(i, 1)\n }\n }\n\n emit(\n ev: ExitEvent,\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n ): boolean {\n if (this.emitted[ev]) {\n return false\n }\n this.emitted[ev] = true\n let ret: boolean = false\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret\n }\n return ret\n }\n}\n\nabstract class SignalExitBase {\n abstract onExit(cb: Handler, opts?: { alwaysLast?: boolean }): () => void\n abstract load(): void\n abstract unload(): void\n}\n\nconst signalExitWrap = <T extends SignalExitBase>(handler: T) => {\n return {\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n return handler.onExit(cb, opts)\n },\n load() {\n return handler.load()\n },\n unload() {\n return handler.unload()\n },\n }\n}\n\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => {}\n }\n load() {}\n unload() {}\n}\n\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'\n /* c8 ignore stop */\n #emitter = new Emitter()\n #process: ProcessRE\n #originalProcessEmit: ProcessRE['emit']\n #originalProcessReallyExit: ProcessRE['reallyExit']\n\n #sigListeners: { [k in NodeJS.Signals]?: () => void } = {}\n #loaded: boolean = false\n\n constructor(process: ProcessRE) {\n super()\n this.#process = process\n // { <signal>: <listener fn>, ... }\n this.#sigListeners = {}\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig)\n let { count } = this.#emitter\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process as unknown as {\n __signal_exit_emitter__?: { count: number }\n }\n if (\n typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number'\n ) {\n count += p.__signal_exit_emitter__.count\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload()\n const ret = this.#emitter.emit('exit', null, sig)\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig\n if (!ret) process.kill(process.pid, s)\n /* c8 ignore stop */\n }\n }\n }\n\n this.#originalProcessReallyExit = process.reallyExit\n this.#originalProcessEmit = process.emit\n }\n\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => {}\n }\n /* c8 ignore stop */\n\n if (this.#loaded === false) {\n this.load()\n }\n\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit'\n this.#emitter.on(ev, cb)\n return () => {\n this.#emitter.removeListener(ev, cb)\n if (\n this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0\n ) {\n this.unload()\n }\n }\n }\n\n load() {\n if (this.#loaded) {\n return\n }\n this.#loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1\n\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig]\n if (fn) this.#process.on(sig, fn)\n } catch (_) {}\n }\n\n this.#process.emit = (ev: string, ...a: any[]) => {\n return this.#processEmit(ev, ...a)\n }\n this.#process.reallyExit = (code?: number | null | undefined) => {\n return this.#processReallyExit(code)\n }\n }\n\n unload() {\n if (!this.#loaded) {\n return\n }\n this.#loaded = false\n\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig]\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig)\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n })\n this.#process.emit = this.#originalProcessEmit\n this.#process.reallyExit = this.#originalProcessReallyExit\n this.#emitter.count -= 1\n }\n\n #processReallyExit(code?: number | null | undefined) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0\n }\n this.#process.exitCode = code || 0\n /* c8 ignore stop */\n\n this.#emitter.emit('exit', this.#process.exitCode, null)\n return this.#originalProcessReallyExit.call(\n this.#process,\n this.#process.exitCode\n )\n }\n\n #processEmit(ev: string, ...args: any[]): any {\n const og = this.#originalProcessEmit\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0]\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args)\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null)\n /* c8 ignore stop */\n return ret\n } else {\n return og.call(this.#process, ev, ...args)\n }\n }\n}\n\nconst process = globalThis.process\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const {\n /**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\n onExit,\n\n /**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n load,\n\n /**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n unload,\n} = signalExitWrap(\n processOk(process) ? new SignalExit(process) : new SignalExitFallback()\n)\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAO,CAAA"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This is not the set of all possible signals.
3
+ *
4
+ * It IS, however, the set of all signals that trigger
5
+ * an exit on either Linux or BSD systems. Linux is a
6
+ * superset of the signal names supported on BSD, and
7
+ * the unknown signals just fail to register, so we can
8
+ * catch that easily enough.
9
+ *
10
+ * Windows signals are a different set, since there are
11
+ * signals that terminate Windows processes, but don't
12
+ * terminate (or don't even exist) on Posix systems.
13
+ *
14
+ * Don't bother with SIGKILL. It's uncatchable, which
15
+ * means that we can't fire any callbacks anyway.
16
+ *
17
+ * If a user does happen to register a handler on a non-
18
+ * fatal signal like SIGWINCH or something, and then
19
+ * exit, it'll end up firing `process.emit('exit')`, so
20
+ * the handler will be fired anyway.
21
+ *
22
+ * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
23
+ * artificially, inherently leave the process in a
24
+ * state from which it is not safe to try and enter JS
25
+ * listeners.
26
+ */
27
+ export const signals = [];
28
+ signals.push('SIGHUP', 'SIGINT', 'SIGTERM');
29
+ if (process.platform !== 'win32') {
30
+ signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'
31
+ // should detect profiler and enable/disable accordingly.
32
+ // see #21
33
+ // 'SIGPROF'
34
+ );
35
+ }
36
+ if (process.platform === 'linux') {
37
+ signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');
38
+ }
39
+ //# sourceMappingURL=signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB,EAAE,CAAA;AAC3C,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ;IACR,yDAAyD;IACzD,UAAU;IACV,YAAY;KACb,CAAA;CACF;AAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;CACxD","sourcesContent":["/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals: NodeJS.Signals[] = []\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM')\n\nif (process.platform !== 'win32') {\n signals.push(\n 'SIGALRM',\n 'SIGABRT',\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT')\n}\n"]}
@@ -1,19 +1,49 @@
1
1
  {
2
2
  "name": "signal-exit",
3
- "version": "3.0.7",
3
+ "version": "4.1.0",
4
4
  "description": "when you want to fire an event no matter how a process exits.",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "tap",
8
- "snap": "tap",
9
- "preversion": "npm test",
10
- "postversion": "npm publish",
11
- "prepublishOnly": "git push origin --follow-tags"
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/mjs/index.js",
7
+ "browser": "./dist/mjs/browser.js",
8
+ "types": "./dist/mjs/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/mjs/index.d.ts",
13
+ "default": "./dist/mjs/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/cjs/index.d.ts",
17
+ "default": "./dist/cjs/index.js"
18
+ }
19
+ },
20
+ "./signals": {
21
+ "import": {
22
+ "types": "./dist/mjs/signals.d.ts",
23
+ "default": "./dist/mjs/signals.js"
24
+ },
25
+ "require": {
26
+ "types": "./dist/cjs/signals.d.ts",
27
+ "default": "./dist/cjs/signals.js"
28
+ }
29
+ },
30
+ "./browser": {
31
+ "import": {
32
+ "types": "./dist/mjs/browser.d.ts",
33
+ "default": "./dist/mjs/browser.js"
34
+ },
35
+ "require": {
36
+ "types": "./dist/cjs/browser.d.ts",
37
+ "default": "./dist/cjs/browser.js"
38
+ }
39
+ }
12
40
  },
13
41
  "files": [
14
- "index.js",
15
- "signals.js"
42
+ "dist"
16
43
  ],
44
+ "engines": {
45
+ "node": ">=14"
46
+ },
17
47
  "repository": {
18
48
  "type": "git",
19
49
  "url": "https://github.com/tapjs/signal-exit.git"
@@ -24,15 +54,53 @@
24
54
  ],
25
55
  "author": "Ben Coe <ben@npmjs.com>",
26
56
  "license": "ISC",
27
- "bugs": {
28
- "url": "https://github.com/tapjs/signal-exit/issues"
29
- },
30
- "homepage": "https://github.com/tapjs/signal-exit",
31
57
  "devDependencies": {
32
- "chai": "^3.5.0",
33
- "coveralls": "^3.1.1",
34
- "nyc": "^15.1.0",
35
- "standard-version": "^9.3.1",
36
- "tap": "^15.1.1"
58
+ "@types/cross-spawn": "^6.0.2",
59
+ "@types/node": "^18.15.11",
60
+ "@types/signal-exit": "^3.0.1",
61
+ "@types/tap": "^15.0.8",
62
+ "c8": "^7.13.0",
63
+ "prettier": "^2.8.6",
64
+ "tap": "^16.3.4",
65
+ "ts-node": "^10.9.1",
66
+ "typedoc": "^0.23.28",
67
+ "typescript": "^5.0.2"
68
+ },
69
+ "scripts": {
70
+ "preversion": "npm test",
71
+ "postversion": "npm publish",
72
+ "prepublishOnly": "git push origin --follow-tags",
73
+ "preprepare": "rm -rf dist",
74
+ "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh",
75
+ "pretest": "npm run prepare",
76
+ "presnap": "npm run prepare",
77
+ "test": "c8 tap",
78
+ "snap": "c8 tap",
79
+ "format": "prettier --write . --loglevel warn",
80
+ "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
81
+ },
82
+ "prettier": {
83
+ "semi": false,
84
+ "printWidth": 75,
85
+ "tabWidth": 2,
86
+ "useTabs": false,
87
+ "singleQuote": true,
88
+ "jsxSingleQuote": false,
89
+ "bracketSameLine": true,
90
+ "arrowParens": "avoid",
91
+ "endOfLine": "lf"
92
+ },
93
+ "tap": {
94
+ "coverage": false,
95
+ "jobs": 1,
96
+ "node-arg": [
97
+ "--no-warnings",
98
+ "--loader",
99
+ "ts-node/esm"
100
+ ],
101
+ "ts": false
102
+ },
103
+ "funding": {
104
+ "url": "https://github.com/sponsors/isaacs"
37
105
  }
38
106
  }
@@ -152,7 +152,11 @@ function ipToBuffer(ip) {
152
152
  else if (net.isIPv6(ip)) {
153
153
  // Handle IPv6 addresses
154
154
  const address = new ip_address_1.Address6(ip);
155
- return Buffer.from(address.toByteArray());
155
+ return Buffer.from(address
156
+ .canonicalForm()
157
+ .split(':')
158
+ .map((segment) => segment.padStart(4, '0'))
159
+ .join(''), 'hex');
156
160
  }
157
161
  else {
158
162
  throw new Error('Invalid IP address format');