@voidzero-dev/vite-plus-test 0.0.0-0bfcc90f.20260209-0731

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 (318) hide show
  1. package/LICENSE.md +691 -0
  2. package/browser/context.d.ts +4 -0
  3. package/browser/context.js +20 -0
  4. package/config.d.ts +3 -0
  5. package/coverage.d.ts +1 -0
  6. package/dist/@vitest/browser/client/.vite/manifest.json +24 -0
  7. package/dist/@vitest/browser/client/__vitest__/assets/index-BUCFJtth.js +57 -0
  8. package/dist/@vitest/browser/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
  9. package/dist/@vitest/browser/client/__vitest__/bg.png +0 -0
  10. package/dist/@vitest/browser/client/__vitest__/favicon.ico +0 -0
  11. package/dist/@vitest/browser/client/__vitest__/favicon.svg +5 -0
  12. package/dist/@vitest/browser/client/__vitest__/index.html +32 -0
  13. package/dist/@vitest/browser/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
  14. package/dist/@vitest/browser/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
  15. package/dist/@vitest/browser/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
  16. package/dist/@vitest/browser/client/error-catcher.js +82 -0
  17. package/dist/@vitest/browser/client/esm-client-injector.js +67 -0
  18. package/dist/@vitest/browser/client/favicon.svg +5 -0
  19. package/dist/@vitest/browser/client/orchestrator.html +35 -0
  20. package/dist/@vitest/browser/client/tester/tester.html +13 -0
  21. package/dist/@vitest/browser/client.js +456 -0
  22. package/dist/@vitest/browser/context.d.ts +792 -0
  23. package/dist/@vitest/browser/context.js +541 -0
  24. package/dist/@vitest/browser/expect-element.js +32 -0
  25. package/dist/@vitest/browser/index-D6m36C6U.js +11 -0
  26. package/dist/@vitest/browser/index.d.ts +73 -0
  27. package/dist/@vitest/browser/index.js +3513 -0
  28. package/dist/@vitest/browser/jest-dom.d.ts +724 -0
  29. package/dist/@vitest/browser/locators.d.ts +354 -0
  30. package/dist/@vitest/browser/locators.js +1 -0
  31. package/dist/@vitest/browser/matchers.d.ts +29 -0
  32. package/dist/@vitest/browser/shared/screenshotMatcher/types.d.ts +22 -0
  33. package/dist/@vitest/browser/state.js +280 -0
  34. package/dist/@vitest/browser/types.d.ts +69 -0
  35. package/dist/@vitest/browser-playwright/context.d.ts +1 -0
  36. package/dist/@vitest/browser-playwright/index.d.ts +106 -0
  37. package/dist/@vitest/browser-playwright/index.js +1111 -0
  38. package/dist/@vitest/browser-playwright/locators.js +114 -0
  39. package/dist/@vitest/browser-preview/context.d.ts +1 -0
  40. package/dist/@vitest/browser-preview/index.d.ts +19 -0
  41. package/dist/@vitest/browser-preview/index.js +148 -0
  42. package/dist/@vitest/browser-preview/locators.js +79 -0
  43. package/dist/@vitest/browser-webdriverio/context.d.ts +1 -0
  44. package/dist/@vitest/browser-webdriverio/index.d.ts +63 -0
  45. package/dist/@vitest/browser-webdriverio/index.js +600 -0
  46. package/dist/@vitest/browser-webdriverio/locators.js +163 -0
  47. package/dist/@vitest/expect/index.d.ts +807 -0
  48. package/dist/@vitest/expect/index.js +1875 -0
  49. package/dist/@vitest/mocker/auto-register.d.ts +2 -0
  50. package/dist/@vitest/mocker/auto-register.js +9 -0
  51. package/dist/@vitest/mocker/automock.d.ts +12 -0
  52. package/dist/@vitest/mocker/automock.js +1 -0
  53. package/dist/@vitest/mocker/browser.d.ts +53 -0
  54. package/dist/@vitest/mocker/browser.js +91 -0
  55. package/dist/@vitest/mocker/chunk-automock.js +354 -0
  56. package/dist/@vitest/mocker/chunk-interceptor-native.js +15 -0
  57. package/dist/@vitest/mocker/chunk-mocker.js +521 -0
  58. package/dist/@vitest/mocker/chunk-pathe.M-eThtNZ.js +174 -0
  59. package/dist/@vitest/mocker/chunk-registry.js +185 -0
  60. package/dist/@vitest/mocker/chunk-utils.js +16 -0
  61. package/dist/@vitest/mocker/index.d-C-sLYZi-.d.ts +25 -0
  62. package/dist/@vitest/mocker/index.d.ts +2 -0
  63. package/dist/@vitest/mocker/index.js +185 -0
  64. package/dist/@vitest/mocker/mocker.d-TnKRhz7N.d.ts +81 -0
  65. package/dist/@vitest/mocker/node.d.ts +800 -0
  66. package/dist/@vitest/mocker/node.js +966 -0
  67. package/dist/@vitest/mocker/redirect.d.ts +3 -0
  68. package/dist/@vitest/mocker/redirect.js +79 -0
  69. package/dist/@vitest/mocker/register.d.ts +9 -0
  70. package/dist/@vitest/mocker/register.js +41 -0
  71. package/dist/@vitest/mocker/types.d-B8CCKmHt.d.ts +107 -0
  72. package/dist/@vitest/pretty-format/index.d.ts +124 -0
  73. package/dist/@vitest/pretty-format/index.js +1022 -0
  74. package/dist/@vitest/runner/chunk-tasks.js +340 -0
  75. package/dist/@vitest/runner/index.d.ts +180 -0
  76. package/dist/@vitest/runner/index.js +2114 -0
  77. package/dist/@vitest/runner/tasks.d-C7UxawJ9.d.ts +834 -0
  78. package/dist/@vitest/runner/types.d.ts +183 -0
  79. package/dist/@vitest/runner/types.js +1 -0
  80. package/dist/@vitest/runner/utils.d.ts +45 -0
  81. package/dist/@vitest/runner/utils.js +5 -0
  82. package/dist/@vitest/snapshot/environment.d-DHdQ1Csl.d.ts +22 -0
  83. package/dist/@vitest/snapshot/environment.d.ts +16 -0
  84. package/dist/@vitest/snapshot/environment.js +40 -0
  85. package/dist/@vitest/snapshot/index.d.ts +130 -0
  86. package/dist/@vitest/snapshot/index.js +1437 -0
  87. package/dist/@vitest/snapshot/manager.d.ts +18 -0
  88. package/dist/@vitest/snapshot/manager.js +73 -0
  89. package/dist/@vitest/snapshot/rawSnapshot.d-lFsMJFUd.d.ts +61 -0
  90. package/dist/@vitest/spy/index.d.ts +384 -0
  91. package/dist/@vitest/spy/index.js +433 -0
  92. package/dist/@vitest/utils/chunk-_commonjsHelpers.js +5 -0
  93. package/dist/@vitest/utils/chunk-pathe.M-eThtNZ.js +156 -0
  94. package/dist/@vitest/utils/constants.d.ts +21 -0
  95. package/dist/@vitest/utils/constants.js +49 -0
  96. package/dist/@vitest/utils/diff.d.ts +93 -0
  97. package/dist/@vitest/utils/diff.js +2199 -0
  98. package/dist/@vitest/utils/display.d.ts +29 -0
  99. package/dist/@vitest/utils/display.js +742 -0
  100. package/dist/@vitest/utils/error.d.ts +7 -0
  101. package/dist/@vitest/utils/error.js +42 -0
  102. package/dist/@vitest/utils/helpers.d.ts +73 -0
  103. package/dist/@vitest/utils/helpers.js +295 -0
  104. package/dist/@vitest/utils/highlight.d.ts +9 -0
  105. package/dist/@vitest/utils/highlight.js +538 -0
  106. package/dist/@vitest/utils/index.d.ts +5 -0
  107. package/dist/@vitest/utils/index.js +1 -0
  108. package/dist/@vitest/utils/offset.d.ts +5 -0
  109. package/dist/@vitest/utils/offset.js +32 -0
  110. package/dist/@vitest/utils/resolver.d.ts +7 -0
  111. package/dist/@vitest/utils/resolver.js +71 -0
  112. package/dist/@vitest/utils/serialize.d.ts +3 -0
  113. package/dist/@vitest/utils/serialize.js +118 -0
  114. package/dist/@vitest/utils/source-map.d.ts +55 -0
  115. package/dist/@vitest/utils/source-map.js +478 -0
  116. package/dist/@vitest/utils/timers.d.ts +33 -0
  117. package/dist/@vitest/utils/timers.js +49 -0
  118. package/dist/@vitest/utils/types.d-BCElaP-c.d.ts +53 -0
  119. package/dist/@vitest/utils/types.d.ts +34 -0
  120. package/dist/@vitest/utils/types.js +1 -0
  121. package/dist/browser-compat.js +3 -0
  122. package/dist/browser.d.ts +46 -0
  123. package/dist/browser.js +20 -0
  124. package/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
  125. package/dist/chunks/base.CJ0Y4ePK.js +165 -0
  126. package/dist/chunks/benchmark.B3N2zMcH.js +40 -0
  127. package/dist/chunks/benchmark.d.DAaHLpsq.d.ts +24 -0
  128. package/dist/chunks/browser.d.ChKACdzH.d.ts +59 -0
  129. package/dist/chunks/cac.DVeoLl0M.js +1409 -0
  130. package/dist/chunks/cli-api.B7PN_QUv.js +13672 -0
  131. package/dist/chunks/config.d.Cy95HiCx.d.ts +210 -0
  132. package/dist/chunks/console.Cf-YriPC.js +146 -0
  133. package/dist/chunks/constants.D_Q9UYh-.js +36 -0
  134. package/dist/chunks/coverage.AVPTjMgw.js +3292 -0
  135. package/dist/chunks/coverage.D_JHT54q.js +25 -0
  136. package/dist/chunks/coverage.d.BZtK59WP.d.ts +37 -0
  137. package/dist/chunks/creator.DAmOKTvJ.js +673 -0
  138. package/dist/chunks/date.Bq6ZW5rf.js +73 -0
  139. package/dist/chunks/defaults.BOqNVLsY.js +74 -0
  140. package/dist/chunks/env.D4Lgay0q.js +8 -0
  141. package/dist/chunks/environment.d.CrsxCzP1.d.ts +29 -0
  142. package/dist/chunks/evaluatedModules.Dg1zASAC.js +17 -0
  143. package/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts +7 -0
  144. package/dist/chunks/git.Bm2pzPAa.js +71 -0
  145. package/dist/chunks/global.d.B15mdLcR.d.ts +99 -0
  146. package/dist/chunks/globals.DOayXfHP.js +30 -0
  147. package/dist/chunks/index.6Qv1eEA6.js +109 -0
  148. package/dist/chunks/index.C5r1PdPD.js +231 -0
  149. package/dist/chunks/index.Chj8NDwU.js +206 -0
  150. package/dist/chunks/index.CyBMJtT7.js +727 -0
  151. package/dist/chunks/index.D3XRDfWc.js +213 -0
  152. package/dist/chunks/index.D4KonVSU.js +6343 -0
  153. package/dist/chunks/index.M8mOzt4Y.js +3839 -0
  154. package/dist/chunks/index.Z5E_ObnR.js +37 -0
  155. package/dist/chunks/init-forks._y3TW739.js +41 -0
  156. package/dist/chunks/init-threads.DBO2kn-p.js +18 -0
  157. package/dist/chunks/init.B6MLFIaN.js +334 -0
  158. package/dist/chunks/inspector.CvyFGlXm.js +53 -0
  159. package/dist/chunks/modules.BJuCwlRJ.js +36 -0
  160. package/dist/chunks/node.Ce0vMQM7.js +14 -0
  161. package/dist/chunks/plugin.d.CtqpEehP.d.ts +38 -0
  162. package/dist/chunks/reporters.d.CWXNI2jG.d.ts +3271 -0
  163. package/dist/chunks/rpc.BoxB0q7B.js +76 -0
  164. package/dist/chunks/rpc.d.RH3apGEf.d.ts +64 -0
  165. package/dist/chunks/setup-common.Cm-kSBVi.js +60 -0
  166. package/dist/chunks/startModuleRunner.DEj0jb3e.js +861 -0
  167. package/dist/chunks/suite.d.BJWk38HB.d.ts +10 -0
  168. package/dist/chunks/test.B8ej_ZHS.js +254 -0
  169. package/dist/chunks/traces.CCmnQaNT.js +217 -0
  170. package/dist/chunks/traces.d.402V_yFI.d.ts +18 -0
  171. package/dist/chunks/utils.DvEY5TfP.js +52 -0
  172. package/dist/chunks/vi.2VT5v0um.js +3919 -0
  173. package/dist/chunks/vm.D3epNOPZ.js +744 -0
  174. package/dist/chunks/worker.d.Dyxm8DEL.d.ts +255 -0
  175. package/dist/cli.js +28 -0
  176. package/dist/client/.vite/manifest.json +24 -0
  177. package/dist/client/__vitest__/assets/index-BUCFJtth.js +57 -0
  178. package/dist/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
  179. package/dist/client/__vitest__/bg.png +0 -0
  180. package/dist/client/__vitest__/favicon.ico +0 -0
  181. package/dist/client/__vitest__/favicon.svg +5 -0
  182. package/dist/client/__vitest__/index.html +32 -0
  183. package/dist/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
  184. package/dist/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
  185. package/dist/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
  186. package/dist/client/error-catcher.js +82 -0
  187. package/dist/client/esm-client-injector.js +67 -0
  188. package/dist/client/favicon.svg +5 -0
  189. package/dist/client/orchestrator.html +35 -0
  190. package/dist/client/tester/tester.html +13 -0
  191. package/dist/client.js +456 -0
  192. package/dist/config.cjs +94 -0
  193. package/dist/config.d.ts +104 -0
  194. package/dist/config.js +15 -0
  195. package/dist/context.js +541 -0
  196. package/dist/coverage.d.ts +118 -0
  197. package/dist/coverage.js +23 -0
  198. package/dist/dummy.js +2 -0
  199. package/dist/environments.d.ts +22 -0
  200. package/dist/environments.js +3 -0
  201. package/dist/expect-element.js +27 -0
  202. package/dist/index-D6m36C6U.js +6 -0
  203. package/dist/index-node.js +7 -0
  204. package/dist/index.d.ts +510 -0
  205. package/dist/index.js +19 -0
  206. package/dist/locators.d.ts +354 -0
  207. package/dist/locators.js +1 -0
  208. package/dist/mocker.d.ts +1 -0
  209. package/dist/mocker.js +1 -0
  210. package/dist/module-evaluator.d.ts +124 -0
  211. package/dist/module-evaluator.js +343 -0
  212. package/dist/module-runner-stub.js +44 -0
  213. package/dist/module-runner.js +17 -0
  214. package/dist/node.d.ts +251 -0
  215. package/dist/node.js +98 -0
  216. package/dist/path.js +7 -0
  217. package/dist/plugins/browser-client.mjs +2 -0
  218. package/dist/plugins/browser-context.mjs +2 -0
  219. package/dist/plugins/browser-locators.mjs +2 -0
  220. package/dist/plugins/browser-playwright.mjs +2 -0
  221. package/dist/plugins/browser-preview.mjs +2 -0
  222. package/dist/plugins/browser-webdriverio.mjs +2 -0
  223. package/dist/plugins/browser.mjs +2 -0
  224. package/dist/plugins/expect.mjs +2 -0
  225. package/dist/plugins/mocker-automock.mjs +2 -0
  226. package/dist/plugins/mocker-browser.mjs +2 -0
  227. package/dist/plugins/mocker-node.mjs +2 -0
  228. package/dist/plugins/mocker-redirect.mjs +2 -0
  229. package/dist/plugins/mocker-register.mjs +2 -0
  230. package/dist/plugins/mocker.mjs +2 -0
  231. package/dist/plugins/pretty-format.mjs +2 -0
  232. package/dist/plugins/runner-types.mjs +2 -0
  233. package/dist/plugins/runner-utils.mjs +2 -0
  234. package/dist/plugins/runner.mjs +2 -0
  235. package/dist/plugins/snapshot-environment.mjs +2 -0
  236. package/dist/plugins/snapshot-manager.mjs +2 -0
  237. package/dist/plugins/snapshot.mjs +2 -0
  238. package/dist/plugins/spy.mjs +2 -0
  239. package/dist/plugins/utils-constants.mjs +2 -0
  240. package/dist/plugins/utils-diff.mjs +2 -0
  241. package/dist/plugins/utils-display.mjs +2 -0
  242. package/dist/plugins/utils-error.mjs +2 -0
  243. package/dist/plugins/utils-helpers.mjs +2 -0
  244. package/dist/plugins/utils-highlight.mjs +2 -0
  245. package/dist/plugins/utils-offset.mjs +2 -0
  246. package/dist/plugins/utils-resolver.mjs +2 -0
  247. package/dist/plugins/utils-serialize.mjs +2 -0
  248. package/dist/plugins/utils-source-map.mjs +2 -0
  249. package/dist/plugins/utils-timers.mjs +2 -0
  250. package/dist/plugins/utils.mjs +2 -0
  251. package/dist/reporters.d.ts +27 -0
  252. package/dist/reporters.js +24 -0
  253. package/dist/runners.d.ts +50 -0
  254. package/dist/runners.js +19 -0
  255. package/dist/shared/screenshotMatcher/types.d.ts +22 -0
  256. package/dist/snapshot.d.ts +9 -0
  257. package/dist/snapshot.js +4 -0
  258. package/dist/spy.js +1 -0
  259. package/dist/state.js +280 -0
  260. package/dist/suite.d.ts +5 -0
  261. package/dist/suite.js +6 -0
  262. package/dist/types.d.ts +69 -0
  263. package/dist/vendor/chai.d.mts +1 -0
  264. package/dist/vendor/chai.mjs +3577 -0
  265. package/dist/vendor/es-module-lexer.d.mts +193 -0
  266. package/dist/vendor/es-module-lexer.mjs +79 -0
  267. package/dist/vendor/estree-walker.d.mts +583 -0
  268. package/dist/vendor/estree-walker.mjs +339 -0
  269. package/dist/vendor/expect-type.d.mts +1574 -0
  270. package/dist/vendor/expect-type.mjs +214 -0
  271. package/dist/vendor/magic-string.d.mts +261 -0
  272. package/dist/vendor/magic-string.mjs +1700 -0
  273. package/dist/vendor/obug.d.mts +56 -0
  274. package/dist/vendor/obug.mjs +276 -0
  275. package/dist/vendor/pathe.d.mts +46 -0
  276. package/dist/vendor/pathe.mjs +496 -0
  277. package/dist/vendor/picomatch.d.mts +1 -0
  278. package/dist/vendor/picomatch.mjs +1855 -0
  279. package/dist/vendor/shared-3g9mwCWP.mjs +31 -0
  280. package/dist/vendor/std-env.d.mts +88 -0
  281. package/dist/vendor/std-env.mjs +159 -0
  282. package/dist/vendor/tinybench.d.mts +317 -0
  283. package/dist/vendor/tinybench.mjs +504 -0
  284. package/dist/vendor/tinyexec.d.mts +72 -0
  285. package/dist/vendor/tinyexec.mjs +637 -0
  286. package/dist/vendor/tinyglobby.d.mts +157 -0
  287. package/dist/vendor/tinyglobby.mjs +832 -0
  288. package/dist/vendor/tinyrainbow.d.mts +60 -0
  289. package/dist/vendor/tinyrainbow.mjs +93 -0
  290. package/dist/vendor/vitest_browser.mjs +2 -0
  291. package/dist/vendor/vitest_internal_browser.mjs +2 -0
  292. package/dist/vendor/vitest_runner.mjs +2 -0
  293. package/dist/vendor/vitest_runners.mjs +2 -0
  294. package/dist/worker.d.ts +32 -0
  295. package/dist/worker.js +48 -0
  296. package/dist/workers/forks.js +54 -0
  297. package/dist/workers/runVmTests.js +95 -0
  298. package/dist/workers/threads.js +55 -0
  299. package/dist/workers/vmForks.js +36 -0
  300. package/dist/workers/vmThreads.js +37 -0
  301. package/environments.d.ts +1 -0
  302. package/globals.d.ts +20 -0
  303. package/import-meta.d.ts +5 -0
  304. package/importMeta.d.ts +4 -0
  305. package/index.cjs +5 -0
  306. package/index.d.cts +1 -0
  307. package/jsdom.d.ts +6 -0
  308. package/mocker.d.ts +1 -0
  309. package/node.d.ts +1 -0
  310. package/optional-types.d.ts +7 -0
  311. package/package.json +335 -0
  312. package/reporters.d.ts +1 -0
  313. package/runners.d.ts +1 -0
  314. package/snapshot.d.ts +1 -0
  315. package/suite.d.ts +1 -0
  316. package/suppress-warnings.cjs +21 -0
  317. package/vitest.mjs +2 -0
  318. package/worker.d.ts +1 -0
@@ -0,0 +1,637 @@
1
+ import { createRequire } from "module";
2
+ import { spawn } from "node:child_process";
3
+ import { delimiter, dirname, normalize, resolve } from "node:path";
4
+ import { cwd } from "node:process";
5
+ import { PassThrough } from "node:stream";
6
+ import c from "node:readline";
7
+
8
+ //#region ../../node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
9
+ var l = Object.create;
10
+ var u = Object.defineProperty;
11
+ var d = Object.getOwnPropertyDescriptor;
12
+ var f = Object.getOwnPropertyNames;
13
+ var p = Object.getPrototypeOf;
14
+ var m = Object.prototype.hasOwnProperty;
15
+ var h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
16
+ var g = (e, t, n, r) => {
17
+ if (t && typeof t === "object" || typeof t === "function") for (var i = f(t), a = 0, o = i.length, s; a < o; a++) {
18
+ s = i[a];
19
+ if (!m.call(e, s) && s !== n) u(e, s, {
20
+ get: ((e) => t[e]).bind(null, s),
21
+ enumerable: !(r = d(t, s)) || r.enumerable
22
+ });
23
+ }
24
+ return e;
25
+ };
26
+ var _ = (e, t, n) => (n = e != null ? l(p(e)) : {}, g(t || !e || !e.__esModule ? u(n, "default", {
27
+ value: e,
28
+ enumerable: true
29
+ }) : n, e));
30
+ var v = /* @__PURE__ */ createRequire(import.meta.url);
31
+ const y = /^path$/i;
32
+ const b = {
33
+ key: "PATH",
34
+ value: ""
35
+ };
36
+ function x(e) {
37
+ for (const t in e) {
38
+ if (!Object.prototype.hasOwnProperty.call(e, t) || !y.test(t)) continue;
39
+ const n = e[t];
40
+ if (!n) return b;
41
+ return {
42
+ key: t,
43
+ value: n
44
+ };
45
+ }
46
+ return b;
47
+ }
48
+ function S(e, t) {
49
+ const i = t.value.split(delimiter);
50
+ let o = e;
51
+ let s;
52
+ do {
53
+ i.push(resolve(o, "node_modules", ".bin"));
54
+ s = o;
55
+ o = dirname(o);
56
+ } while (o !== s);
57
+ return {
58
+ key: t.key,
59
+ value: i.join(delimiter)
60
+ };
61
+ }
62
+ function C(e, t) {
63
+ const n = {
64
+ ...process.env,
65
+ ...t
66
+ };
67
+ const r = S(e, x(n));
68
+ n[r.key] = r.value;
69
+ return n;
70
+ }
71
+ const w = (e) => {
72
+ let t = e.length;
73
+ const n = new PassThrough();
74
+ const r = () => {
75
+ if (--t === 0) n.emit("end");
76
+ };
77
+ for (const t of e) {
78
+ t.pipe(n, { end: false });
79
+ t.on("end", r);
80
+ }
81
+ return n;
82
+ };
83
+ var T = h((exports, t) => {
84
+ t.exports = a;
85
+ a.sync = o;
86
+ var n = v("fs");
87
+ function r(e, t) {
88
+ var n = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
89
+ if (!n) return true;
90
+ n = n.split(";");
91
+ if (n.indexOf("") !== -1) return true;
92
+ for (var r = 0; r < n.length; r++) {
93
+ var i = n[r].toLowerCase();
94
+ if (i && e.substr(-i.length).toLowerCase() === i) return true;
95
+ }
96
+ return false;
97
+ }
98
+ function i(e, t, n) {
99
+ if (!e.isSymbolicLink() && !e.isFile()) return false;
100
+ return r(t, n);
101
+ }
102
+ function a(e, t, r) {
103
+ n.stat(e, function(n, a) {
104
+ r(n, n ? false : i(a, e, t));
105
+ });
106
+ }
107
+ function o(e, t) {
108
+ return i(n.statSync(e), e, t);
109
+ }
110
+ });
111
+ var E = h((exports, t) => {
112
+ t.exports = r;
113
+ r.sync = i;
114
+ var n = v("fs");
115
+ function r(e, t, r) {
116
+ n.stat(e, function(e, n) {
117
+ r(e, e ? false : a(n, t));
118
+ });
119
+ }
120
+ function i(e, t) {
121
+ return a(n.statSync(e), t);
122
+ }
123
+ function a(e, t) {
124
+ return e.isFile() && o(e, t);
125
+ }
126
+ function o(e, t) {
127
+ var n = e.mode;
128
+ var r = e.uid;
129
+ var i = e.gid;
130
+ var a = t.uid !== void 0 ? t.uid : process.getuid && process.getuid();
131
+ var o = t.gid !== void 0 ? t.gid : process.getgid && process.getgid();
132
+ var s = parseInt("100", 8);
133
+ var c = parseInt("010", 8);
134
+ var l = parseInt("001", 8);
135
+ var u = s | c;
136
+ var d = n & l || n & c && i === o || n & s && r === a || n & u && a === 0;
137
+ return d;
138
+ }
139
+ });
140
+ var D = h((exports, t) => {
141
+ var n = v("fs");
142
+ var r;
143
+ if (process.platform === "win32" || global.TESTING_WINDOWS) r = T();
144
+ else r = E();
145
+ t.exports = i;
146
+ i.sync = a;
147
+ function i(e, t, n) {
148
+ if (typeof t === "function") {
149
+ n = t;
150
+ t = {};
151
+ }
152
+ if (!n) {
153
+ if (typeof Promise !== "function") throw new TypeError("callback not provided");
154
+ return new Promise(function(n, r) {
155
+ i(e, t || {}, function(e, t) {
156
+ if (e) r(e);
157
+ else n(t);
158
+ });
159
+ });
160
+ }
161
+ r(e, t || {}, function(e, r) {
162
+ if (e) {
163
+ if (e.code === "EACCES" || t && t.ignoreErrors) {
164
+ e = null;
165
+ r = false;
166
+ }
167
+ }
168
+ n(e, r);
169
+ });
170
+ }
171
+ function a(e, t) {
172
+ try {
173
+ return r.sync(e, t || {});
174
+ } catch (e) {
175
+ if (t && t.ignoreErrors || e.code === "EACCES") return false;
176
+ else throw e;
177
+ }
178
+ }
179
+ });
180
+ var O = h((exports, t) => {
181
+ const n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
182
+ const r = v("path");
183
+ const i = n ? ";" : ":";
184
+ const a = D();
185
+ const o = (e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" });
186
+ const s = (e, t) => {
187
+ const r = t.colon || i;
188
+ const a = e.match(/\//) || n && e.match(/\\/) ? [""] : [...n ? [process.cwd()] : [], ...(t.path || process.env.PATH || "").split(r)];
189
+ const o = n ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
190
+ const s = n ? o.split(r) : [""];
191
+ if (n) {
192
+ if (e.indexOf(".") !== -1 && s[0] !== "") s.unshift("");
193
+ }
194
+ return {
195
+ pathEnv: a,
196
+ pathExt: s,
197
+ pathExtExe: o
198
+ };
199
+ };
200
+ const c = (e, t, n) => {
201
+ if (typeof t === "function") {
202
+ n = t;
203
+ t = {};
204
+ }
205
+ if (!t) t = {};
206
+ const { pathEnv: i, pathExt: c, pathExtExe: l } = s(e, t);
207
+ const u = [];
208
+ const d = (n) => new Promise((a, s) => {
209
+ if (n === i.length) return t.all && u.length ? a(u) : s(o(e));
210
+ const c = i[n];
211
+ const l = /^".*"$/.test(c) ? c.slice(1, -1) : c;
212
+ const d = r.join(l, e);
213
+ const p = !l && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
214
+ a(f(p, n, 0));
215
+ });
216
+ const f = (e, n, r) => new Promise((i, o) => {
217
+ if (r === c.length) return i(d(n + 1));
218
+ const s = c[r];
219
+ a(e + s, { pathExt: l }, (a, o) => {
220
+ if (!a && o) if (t.all) u.push(e + s);
221
+ else return i(e + s);
222
+ return i(f(e, n, r + 1));
223
+ });
224
+ });
225
+ return n ? d(0).then((e) => n(null, e), n) : d(0);
226
+ };
227
+ const l = (e, t) => {
228
+ t = t || {};
229
+ const { pathEnv: n, pathExt: i, pathExtExe: c } = s(e, t);
230
+ const l = [];
231
+ for (let o = 0; o < n.length; o++) {
232
+ const s = n[o];
233
+ const u = /^".*"$/.test(s) ? s.slice(1, -1) : s;
234
+ const d = r.join(u, e);
235
+ const f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
236
+ for (let e = 0; e < i.length; e++) {
237
+ const n = f + i[e];
238
+ try {
239
+ const e = a.sync(n, { pathExt: c });
240
+ if (e) if (t.all) l.push(n);
241
+ else return n;
242
+ } catch (e) {}
243
+ }
244
+ }
245
+ if (t.all && l.length) return l;
246
+ if (t.nothrow) return null;
247
+ throw o(e);
248
+ };
249
+ t.exports = c;
250
+ c.sync = l;
251
+ });
252
+ var k = h((exports, t) => {
253
+ const n = (e = {}) => {
254
+ const t = e.env || process.env;
255
+ const n = e.platform || process.platform;
256
+ if (n !== "win32") return "PATH";
257
+ return Object.keys(t).reverse().find((e) => e.toUpperCase() === "PATH") || "Path";
258
+ };
259
+ t.exports = n;
260
+ t.exports.default = n;
261
+ });
262
+ var A = h((exports, t) => {
263
+ const n = v("path");
264
+ const r = O();
265
+ const i = k();
266
+ function a(e, t) {
267
+ const a = e.options.env || process.env;
268
+ const o = process.cwd();
269
+ const s = e.options.cwd != null;
270
+ const c = s && process.chdir !== void 0 && !process.chdir.disabled;
271
+ if (c) try {
272
+ process.chdir(e.options.cwd);
273
+ } catch (e) {}
274
+ let l;
275
+ try {
276
+ l = r.sync(e.command, {
277
+ path: a[i({ env: a })],
278
+ pathExt: t ? n.delimiter : void 0
279
+ });
280
+ } catch (e) {} finally {
281
+ if (c) process.chdir(o);
282
+ }
283
+ if (l) l = n.resolve(s ? e.options.cwd : "", l);
284
+ return l;
285
+ }
286
+ function o(e) {
287
+ return a(e) || a(e, true);
288
+ }
289
+ t.exports = o;
290
+ });
291
+ var j = h((exports, t) => {
292
+ const n = /([()\][%!^"`<>&|;, *?])/g;
293
+ function r(e) {
294
+ e = e.replace(n, "^$1");
295
+ return e;
296
+ }
297
+ function i(e, t) {
298
+ e = `${e}`;
299
+ e = e.replace(/(\\*)"/g, "$1$1\\\"");
300
+ e = e.replace(/(\\*)$/, "$1$1");
301
+ e = `"${e}"`;
302
+ e = e.replace(n, "^$1");
303
+ if (t) e = e.replace(n, "^$1");
304
+ return e;
305
+ }
306
+ t.exports.command = r;
307
+ t.exports.argument = i;
308
+ });
309
+ var M = h((exports, t) => {
310
+ t.exports = /^#!(.*)/;
311
+ });
312
+ var N = h((exports, t) => {
313
+ const n = M();
314
+ t.exports = (e = "") => {
315
+ const t = e.match(n);
316
+ if (!t) return null;
317
+ const [r, i] = t[0].replace(/#! ?/, "").split(" ");
318
+ const a = r.split("/").pop();
319
+ if (a === "env") return i;
320
+ return i ? `${a} ${i}` : a;
321
+ };
322
+ });
323
+ var P = h((exports, t) => {
324
+ const n = v("fs");
325
+ const r = N();
326
+ function i(e) {
327
+ const t = 150;
328
+ const i = Buffer.alloc(t);
329
+ let a;
330
+ try {
331
+ a = n.openSync(e, "r");
332
+ n.readSync(a, i, 0, t, 0);
333
+ n.closeSync(a);
334
+ } catch (e) {}
335
+ return r(i.toString());
336
+ }
337
+ t.exports = i;
338
+ });
339
+ var F = h((exports, t) => {
340
+ const n = v("path");
341
+ const r = A();
342
+ const i = j();
343
+ const a = P();
344
+ const o = process.platform === "win32";
345
+ const s = /\.(?:com|exe)$/i;
346
+ const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
347
+ function l(e) {
348
+ e.file = r(e);
349
+ const t = e.file && a(e.file);
350
+ if (t) {
351
+ e.args.unshift(e.file);
352
+ e.command = t;
353
+ return r(e);
354
+ }
355
+ return e.file;
356
+ }
357
+ function u(e) {
358
+ if (!o) return e;
359
+ const t = l(e);
360
+ const r = !s.test(t);
361
+ if (e.options.forceShell || r) {
362
+ const r = c.test(t);
363
+ e.command = n.normalize(e.command);
364
+ e.command = i.command(e.command);
365
+ e.args = e.args.map((e) => i.argument(e, r));
366
+ const a = [e.command].concat(e.args).join(" ");
367
+ e.args = [
368
+ "/d",
369
+ "/s",
370
+ "/c",
371
+ `"${a}"`
372
+ ];
373
+ e.command = process.env.comspec || "cmd.exe";
374
+ e.options.windowsVerbatimArguments = true;
375
+ }
376
+ return e;
377
+ }
378
+ function d(e, t, n) {
379
+ if (t && !Array.isArray(t)) {
380
+ n = t;
381
+ t = null;
382
+ }
383
+ t = t ? t.slice(0) : [];
384
+ n = Object.assign({}, n);
385
+ const r = {
386
+ command: e,
387
+ args: t,
388
+ options: n,
389
+ file: void 0,
390
+ original: {
391
+ command: e,
392
+ args: t
393
+ }
394
+ };
395
+ return n.shell ? r : u(r);
396
+ }
397
+ t.exports = d;
398
+ });
399
+ var I = h((exports, t) => {
400
+ const n = process.platform === "win32";
401
+ function r(e, t) {
402
+ return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
403
+ code: "ENOENT",
404
+ errno: "ENOENT",
405
+ syscall: `${t} ${e.command}`,
406
+ path: e.command,
407
+ spawnargs: e.args
408
+ });
409
+ }
410
+ function i(e, t) {
411
+ if (!n) return;
412
+ const r = e.emit;
413
+ e.emit = function(n, i) {
414
+ if (n === "exit") {
415
+ const n = a(i, t, "spawn");
416
+ if (n) return r.call(e, "error", n);
417
+ }
418
+ return r.apply(e, arguments);
419
+ };
420
+ }
421
+ function a(e, t) {
422
+ if (n && e === 1 && !t.file) return r(t.original, "spawn");
423
+ return null;
424
+ }
425
+ function o(e, t) {
426
+ if (n && e === 1 && !t.file) return r(t.original, "spawnSync");
427
+ return null;
428
+ }
429
+ t.exports = {
430
+ hookChildProcess: i,
431
+ verifyENOENT: a,
432
+ verifyENOENTSync: o,
433
+ notFoundError: r
434
+ };
435
+ });
436
+ var L = h((exports, t) => {
437
+ const n = v("child_process");
438
+ const r = F();
439
+ const i = I();
440
+ function a(e, t, a) {
441
+ const o = r(e, t, a);
442
+ const s = n.spawn(o.command, o.args, o.options);
443
+ i.hookChildProcess(s, o);
444
+ return s;
445
+ }
446
+ function o(e, t, a) {
447
+ const o = r(e, t, a);
448
+ const s = n.spawnSync(o.command, o.args, o.options);
449
+ s.error = s.error || i.verifyENOENTSync(s.status, o);
450
+ return s;
451
+ }
452
+ t.exports = a;
453
+ t.exports.spawn = a;
454
+ t.exports.sync = o;
455
+ t.exports._parse = r;
456
+ t.exports._enoent = i;
457
+ });
458
+ var R = _(L(), 1);
459
+ var z = class extends Error {
460
+ result;
461
+ output;
462
+ get exitCode() {
463
+ if (this.result.exitCode !== null) return this.result.exitCode;
464
+ return void 0;
465
+ }
466
+ constructor(e, t) {
467
+ super(`Process exited with non-zero status (${e.exitCode})`);
468
+ this.result = e;
469
+ this.output = t;
470
+ }
471
+ };
472
+ const B = {
473
+ timeout: void 0,
474
+ persist: false
475
+ };
476
+ const V = { windowsHide: true };
477
+ function H(e, t) {
478
+ const n = normalize(e);
479
+ const r = t ?? [];
480
+ return {
481
+ command: n,
482
+ args: r
483
+ };
484
+ }
485
+ function U(e) {
486
+ const t = new AbortController();
487
+ for (const n of e) {
488
+ if (n.aborted) {
489
+ t.abort();
490
+ return n;
491
+ }
492
+ const e = () => {
493
+ t.abort(n.reason);
494
+ };
495
+ n.addEventListener("abort", e, { signal: t.signal });
496
+ }
497
+ return t.signal;
498
+ }
499
+ async function W(e) {
500
+ let t = "";
501
+ for await (const n of e) t += n.toString();
502
+ return t;
503
+ }
504
+ var G = class {
505
+ _process;
506
+ _aborted = false;
507
+ _options;
508
+ _command;
509
+ _args;
510
+ _resolveClose;
511
+ _processClosed;
512
+ _thrownError;
513
+ get process() {
514
+ return this._process;
515
+ }
516
+ get pid() {
517
+ return this._process?.pid;
518
+ }
519
+ get exitCode() {
520
+ if (this._process && this._process.exitCode !== null) return this._process.exitCode;
521
+ return void 0;
522
+ }
523
+ constructor(e, t, n) {
524
+ this._options = {
525
+ ...B,
526
+ ...n
527
+ };
528
+ this._command = e;
529
+ this._args = t ?? [];
530
+ this._processClosed = new Promise((e) => {
531
+ this._resolveClose = e;
532
+ });
533
+ }
534
+ kill(e) {
535
+ return this._process?.kill(e) === true;
536
+ }
537
+ get aborted() {
538
+ return this._aborted;
539
+ }
540
+ get killed() {
541
+ return this._process?.killed === true;
542
+ }
543
+ pipe(e, t, n) {
544
+ return q(e, t, {
545
+ ...n,
546
+ stdin: this
547
+ });
548
+ }
549
+ async *[Symbol.asyncIterator]() {
550
+ const e = this._process;
551
+ if (!e) return;
552
+ const t = [];
553
+ if (this._streamErr) t.push(this._streamErr);
554
+ if (this._streamOut) t.push(this._streamOut);
555
+ const n = w(t);
556
+ const r = c.createInterface({ input: n });
557
+ for await (const e of r) yield e.toString();
558
+ await this._processClosed;
559
+ e.removeAllListeners();
560
+ if (this._thrownError) throw this._thrownError;
561
+ if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this);
562
+ }
563
+ async _waitForOutput() {
564
+ const e = this._process;
565
+ if (!e) throw new Error("No process was started");
566
+ const [t, n] = await Promise.all([this._streamOut ? W(this._streamOut) : "", this._streamErr ? W(this._streamErr) : ""]);
567
+ await this._processClosed;
568
+ if (this._options?.stdin) await this._options.stdin;
569
+ e.removeAllListeners();
570
+ if (this._thrownError) throw this._thrownError;
571
+ const r = {
572
+ stderr: n,
573
+ stdout: t,
574
+ exitCode: this.exitCode
575
+ };
576
+ if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this, r);
577
+ return r;
578
+ }
579
+ then(e, t) {
580
+ return this._waitForOutput().then(e, t);
581
+ }
582
+ _streamOut;
583
+ _streamErr;
584
+ spawn() {
585
+ const e = cwd();
586
+ const n = this._options;
587
+ const r = {
588
+ ...V,
589
+ ...n.nodeOptions
590
+ };
591
+ const i = [];
592
+ this._resetState();
593
+ if (n.timeout !== void 0) i.push(AbortSignal.timeout(n.timeout));
594
+ if (n.signal !== void 0) i.push(n.signal);
595
+ if (n.persist === true) r.detached = true;
596
+ if (i.length > 0) r.signal = U(i);
597
+ r.env = C(e, r.env);
598
+ const { command: a, args: s } = H(this._command, this._args);
599
+ const c = (0, R._parse)(a, s, r);
600
+ const l = spawn(c.command, c.args, c.options);
601
+ if (l.stderr) this._streamErr = l.stderr;
602
+ if (l.stdout) this._streamOut = l.stdout;
603
+ this._process = l;
604
+ l.once("error", this._onError);
605
+ l.once("close", this._onClose);
606
+ if (n.stdin !== void 0 && l.stdin && n.stdin.process) {
607
+ const { stdout: e } = n.stdin.process;
608
+ if (e) e.pipe(l.stdin);
609
+ }
610
+ }
611
+ _resetState() {
612
+ this._aborted = false;
613
+ this._processClosed = new Promise((e) => {
614
+ this._resolveClose = e;
615
+ });
616
+ this._thrownError = void 0;
617
+ }
618
+ _onError = (e) => {
619
+ if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
620
+ this._aborted = true;
621
+ return;
622
+ }
623
+ this._thrownError = e;
624
+ };
625
+ _onClose = () => {
626
+ if (this._resolveClose) this._resolveClose();
627
+ };
628
+ };
629
+ const K = (e, t, n) => {
630
+ const r = new G(e, t, n);
631
+ r.spawn();
632
+ return r;
633
+ };
634
+ const q = K;
635
+
636
+ //#endregion
637
+ export { G as ExecProcess, z as NonZeroExitError, q as exec, K as x };