@emulsify/cli 1.9.0 → 1.10.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 (524) hide show
  1. package/README.md +20 -13
  2. package/dist/node_modules/.package-lock.json +37 -24
  3. package/dist/node_modules/@types/node/README.md +5 -6
  4. package/dist/node_modules/@types/node/assert/strict.d.ts +8 -0
  5. package/dist/node_modules/@types/node/assert.d.ts +955 -45
  6. package/dist/node_modules/@types/node/async_hooks.d.ts +391 -87
  7. package/dist/node_modules/@types/node/buffer.d.ts +2210 -17
  8. package/dist/node_modules/@types/node/child_process.d.ts +1051 -189
  9. package/dist/node_modules/@types/node/cluster.d.ts +421 -143
  10. package/dist/node_modules/@types/node/console.d.ts +359 -49
  11. package/dist/node_modules/@types/node/constants.d.ts +3 -3
  12. package/dist/node_modules/@types/node/crypto.d.ts +3528 -291
  13. package/dist/node_modules/@types/node/dgram.d.ts +446 -30
  14. package/dist/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
  15. package/dist/node_modules/@types/node/dns/promises.d.ts +476 -0
  16. package/dist/node_modules/@types/node/dns.d.ts +588 -240
  17. package/dist/node_modules/@types/node/dom-events.d.ts +124 -0
  18. package/dist/node_modules/@types/node/domain.d.ts +159 -16
  19. package/dist/node_modules/@types/node/events.d.ts +890 -41
  20. package/dist/node_modules/@types/node/fs/promises.d.ts +980 -369
  21. package/dist/node_modules/@types/node/fs.d.ts +2599 -869
  22. package/dist/node_modules/@types/node/globals.d.ts +374 -727
  23. package/dist/node_modules/@types/node/globals.global.d.ts +1 -1
  24. package/dist/node_modules/@types/node/http.d.ts +1459 -132
  25. package/dist/node_modules/@types/node/http2.d.ts +1333 -123
  26. package/dist/node_modules/@types/node/https.d.ts +289 -13
  27. package/dist/node_modules/@types/node/index.d.ts +37 -46
  28. package/dist/node_modules/@types/node/inspector.d.ts +367 -671
  29. package/dist/node_modules/@types/node/module.d.ts +273 -14
  30. package/dist/node_modules/@types/node/net.d.ts +741 -66
  31. package/dist/node_modules/@types/node/os.d.ts +275 -23
  32. package/dist/node_modules/@types/node/package.json +95 -110
  33. package/dist/node_modules/@types/node/path.d.ts +27 -4
  34. package/dist/node_modules/@types/node/perf_hooks.d.ts +756 -125
  35. package/dist/node_modules/@types/node/process.d.ts +1429 -127
  36. package/dist/node_modules/@types/node/punycode.d.ts +65 -26
  37. package/dist/node_modules/@types/node/querystring.d.ts +121 -9
  38. package/dist/node_modules/@types/node/readline/promises.d.ts +150 -0
  39. package/dist/node_modules/@types/node/readline.d.ts +405 -49
  40. package/dist/node_modules/@types/node/repl.d.ts +99 -73
  41. package/dist/node_modules/@types/node/sea.d.ts +153 -0
  42. package/dist/node_modules/@types/node/stream/consumers.d.ts +12 -0
  43. package/dist/node_modules/@types/node/stream/promises.d.ts +83 -0
  44. package/dist/node_modules/@types/node/stream/web.d.ts +367 -0
  45. package/dist/node_modules/@types/node/stream.d.ts +1462 -273
  46. package/dist/node_modules/@types/node/string_decoder.d.ts +59 -2
  47. package/dist/node_modules/@types/node/test.d.ts +1719 -0
  48. package/dist/node_modules/@types/node/timers/promises.d.ts +97 -0
  49. package/dist/node_modules/@types/node/timers.d.ts +233 -12
  50. package/dist/node_modules/@types/node/tls.d.ts +540 -189
  51. package/dist/node_modules/@types/node/trace_events.d.ts +143 -10
  52. package/dist/node_modules/@types/node/tty.d.ts +156 -17
  53. package/dist/node_modules/@types/node/url.d.ts +812 -47
  54. package/dist/node_modules/@types/node/util.d.ts +2159 -145
  55. package/dist/node_modules/@types/node/v8.d.ts +693 -74
  56. package/dist/node_modules/@types/node/vm.d.ts +813 -44
  57. package/dist/node_modules/@types/node/wasi.d.ts +121 -28
  58. package/dist/node_modules/@types/node/worker_threads.d.ts +514 -61
  59. package/dist/node_modules/@types/node/zlib.d.ts +220 -54
  60. package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +1 -1
  61. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +1 -0
  62. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
  63. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
  64. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +2 -2
  65. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
  66. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +1 -1
  67. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +1 -1
  68. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -1
  69. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +3 -3
  70. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/json-schema.d.ts +10 -10
  71. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +5 -1
  72. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
  73. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +1 -0
  74. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +2 -2
  75. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +2 -2
  76. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +1 -1
  77. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +3 -3
  78. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +10 -10
  79. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +4 -1
  80. package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +5 -5
  81. package/dist/node_modules/commander/Readme.md +10 -8
  82. package/dist/node_modules/commander/esm.mjs +1 -1
  83. package/dist/node_modules/commander/lib/argument.js +9 -5
  84. package/dist/node_modules/commander/lib/command.js +406 -196
  85. package/dist/node_modules/commander/lib/error.js +0 -4
  86. package/dist/node_modules/commander/lib/help.js +101 -38
  87. package/dist/node_modules/commander/lib/option.js +11 -8
  88. package/dist/node_modules/commander/lib/suggestSimilar.js +5 -4
  89. package/dist/node_modules/commander/package.json +23 -19
  90. package/dist/node_modules/commander/typings/index.d.ts +110 -40
  91. package/dist/node_modules/debug/package.json +4 -3
  92. package/dist/node_modules/debug/src/browser.js +3 -1
  93. package/dist/node_modules/debug/src/node.js +2 -2
  94. package/dist/node_modules/fast-uri/.gitattributes +2 -0
  95. package/dist/node_modules/fast-uri/.github/.stale.yml +21 -0
  96. package/dist/node_modules/fast-uri/.github/dependabot.yml +13 -0
  97. package/dist/node_modules/fast-uri/.github/tests_checker.yml +8 -0
  98. package/dist/node_modules/fast-uri/.github/workflows/ci.yml +23 -0
  99. package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +20 -0
  100. package/dist/node_modules/fast-uri/.taprc +3 -0
  101. package/dist/node_modules/fast-uri/LICENSE +30 -0
  102. package/dist/node_modules/fast-uri/README.md +125 -0
  103. package/dist/node_modules/fast-uri/benchmark.js +105 -0
  104. package/dist/node_modules/fast-uri/index.js +309 -0
  105. package/dist/node_modules/fast-uri/lib/schemes.js +188 -0
  106. package/dist/node_modules/fast-uri/lib/scopedChars.js +30 -0
  107. package/dist/node_modules/fast-uri/lib/utils.js +242 -0
  108. package/dist/node_modules/fast-uri/package.json +39 -0
  109. package/dist/node_modules/fast-uri/test/.gitkeep +0 -0
  110. package/dist/node_modules/fast-uri/test/ajv.test.js +39 -0
  111. package/dist/node_modules/fast-uri/test/compatibility.test.js +130 -0
  112. package/dist/node_modules/fast-uri/test/equal.test.js +104 -0
  113. package/dist/node_modules/fast-uri/test/parse.test.js +319 -0
  114. package/dist/node_modules/fast-uri/test/resolve.test.js +76 -0
  115. package/dist/node_modules/fast-uri/test/serialize.test.js +144 -0
  116. package/dist/node_modules/fast-uri/test/uri-js.test.js +940 -0
  117. package/dist/node_modules/fast-uri/test/util.test.js +24 -0
  118. package/dist/node_modules/fast-uri/types/index.d.ts +53 -0
  119. package/dist/node_modules/fast-uri/types/index.test-d.ts +17 -0
  120. package/dist/node_modules/fs-extra/README.md +32 -2
  121. package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +3 -11
  122. package/dist/node_modules/fs-extra/lib/copy/copy.js +120 -178
  123. package/dist/node_modules/fs-extra/lib/copy/index.js +1 -1
  124. package/dist/node_modules/fs-extra/lib/ensure/file.js +31 -34
  125. package/dist/node_modules/fs-extra/lib/ensure/link.js +27 -27
  126. package/dist/node_modules/fs-extra/lib/ensure/symlink-paths.js +57 -55
  127. package/dist/node_modules/fs-extra/lib/ensure/symlink-type.js +16 -13
  128. package/dist/node_modules/fs-extra/lib/ensure/symlink.js +29 -44
  129. package/dist/node_modules/fs-extra/lib/esm.mjs +68 -0
  130. package/dist/node_modules/fs-extra/lib/fs/index.js +29 -17
  131. package/dist/node_modules/fs-extra/lib/move/index.js +1 -1
  132. package/dist/node_modules/fs-extra/lib/move/move-sync.js +2 -1
  133. package/dist/node_modules/fs-extra/lib/move/move.js +38 -54
  134. package/dist/node_modules/fs-extra/lib/output-file/index.js +10 -19
  135. package/dist/node_modules/fs-extra/lib/remove/index.js +2 -7
  136. package/dist/node_modules/fs-extra/lib/util/stat.js +46 -42
  137. package/dist/node_modules/fs-extra/lib/util/utimes.js +21 -11
  138. package/dist/node_modules/fs-extra/package.json +11 -7
  139. package/dist/node_modules/simple-git/dist/cjs/index.js +4958 -0
  140. package/dist/node_modules/simple-git/dist/cjs/index.js.map +7 -0
  141. package/dist/node_modules/simple-git/dist/esm/index.js +4813 -0
  142. package/dist/node_modules/simple-git/dist/esm/index.js.map +7 -0
  143. package/dist/node_modules/simple-git/dist/esm/package.json +3 -0
  144. package/dist/node_modules/simple-git/{src → dist/src}/lib/api.d.ts +3 -13
  145. package/dist/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +9 -0
  146. package/dist/node_modules/simple-git/dist/src/lib/args/pathspec.d.ts +3 -0
  147. package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-error.d.ts +3 -2
  148. package/dist/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +7 -0
  149. package/dist/node_modules/simple-git/dist/src/lib/git-factory.d.ts +15 -0
  150. package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-branch.d.ts +1 -1
  151. package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +3 -0
  152. package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-list-log-summary.d.ts +2 -1
  153. package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-pull.d.ts +2 -0
  154. package/dist/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -0
  155. package/dist/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +3 -0
  156. package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/completion-detection.plugin.d.ts +1 -1
  157. package/dist/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +3 -0
  158. package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/index.d.ts +3 -0
  159. package/dist/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +11 -0
  160. package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/progress-monitor-plugin.d.ts +1 -1
  161. package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/simple-git-plugin.d.ts +10 -0
  162. package/dist/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -0
  163. package/dist/node_modules/simple-git/dist/src/lib/plugins/timout-plugin.d.ts +3 -0
  164. package/dist/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +14 -0
  165. package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/FileStatusSummary.d.ts +1 -1
  166. package/dist/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +25 -0
  167. package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/StatusSummary.d.ts +2 -1
  168. package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/git-executor-chain.d.ts +1 -1
  169. package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/git-executor.d.ts +3 -4
  170. package/dist/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -0
  171. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/clone.d.ts +3 -2
  172. package/dist/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +4 -0
  173. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/config.d.ts +1 -1
  174. package/dist/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +12 -0
  175. package/dist/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +12 -0
  176. package/dist/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +5 -0
  177. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/fetch.d.ts +2 -1
  178. package/dist/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -0
  179. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/log.d.ts +3 -3
  180. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/remote.d.ts +3 -3
  181. package/dist/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -0
  182. package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +4 -0
  183. package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/task.d.ts +1 -1
  184. package/dist/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +9 -0
  185. package/dist/node_modules/simple-git/{src → dist/src}/lib/types/index.d.ts +64 -5
  186. package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/exit-codes.d.ts +1 -0
  187. package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/line-parser.d.ts +1 -1
  188. package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/task-parser.d.ts +2 -2
  189. package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/util.d.ts +3 -1
  190. package/dist/node_modules/simple-git/{typings → dist/typings}/errors.d.ts +0 -1
  191. package/dist/node_modules/simple-git/{typings → dist/typings}/index.d.ts +2 -1
  192. package/dist/node_modules/simple-git/{typings → dist/typings}/response.d.ts +68 -25
  193. package/dist/node_modules/simple-git/{typings → dist/typings}/simple-git.d.ts +493 -110
  194. package/dist/node_modules/simple-git/dist/typings/types.d.ts +23 -0
  195. package/dist/node_modules/simple-git/package.json +32 -35
  196. package/dist/node_modules/simple-git/promise.js +14 -4
  197. package/dist/node_modules/simple-git/readme.md +372 -389
  198. package/dist/node_modules/undici-types/README.md +6 -0
  199. package/dist/node_modules/undici-types/agent.d.ts +31 -0
  200. package/dist/node_modules/undici-types/api.d.ts +43 -0
  201. package/dist/node_modules/undici-types/balanced-pool.d.ts +18 -0
  202. package/dist/node_modules/undici-types/cache.d.ts +36 -0
  203. package/dist/node_modules/undici-types/client.d.ts +97 -0
  204. package/dist/node_modules/undici-types/connector.d.ts +34 -0
  205. package/dist/node_modules/undici-types/content-type.d.ts +21 -0
  206. package/dist/node_modules/undici-types/cookies.d.ts +28 -0
  207. package/dist/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  208. package/dist/node_modules/undici-types/dispatcher.d.ts +241 -0
  209. package/dist/node_modules/undici-types/errors.d.ts +128 -0
  210. package/dist/node_modules/undici-types/fetch.d.ts +209 -0
  211. package/dist/node_modules/undici-types/file.d.ts +39 -0
  212. package/dist/node_modules/undici-types/filereader.d.ts +54 -0
  213. package/dist/node_modules/undici-types/formdata.d.ts +108 -0
  214. package/dist/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  215. package/dist/node_modules/undici-types/global-origin.d.ts +7 -0
  216. package/dist/node_modules/undici-types/handlers.d.ts +9 -0
  217. package/dist/node_modules/undici-types/header.d.ts +4 -0
  218. package/dist/node_modules/undici-types/index.d.ts +63 -0
  219. package/dist/node_modules/undici-types/interceptors.d.ts +5 -0
  220. package/dist/node_modules/undici-types/mock-agent.d.ts +50 -0
  221. package/dist/node_modules/undici-types/mock-client.d.ts +25 -0
  222. package/dist/node_modules/undici-types/mock-errors.d.ts +12 -0
  223. package/dist/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  224. package/dist/node_modules/undici-types/mock-pool.d.ts +25 -0
  225. package/dist/node_modules/undici-types/package.json +55 -0
  226. package/dist/node_modules/undici-types/patch.d.ts +71 -0
  227. package/dist/node_modules/undici-types/pool-stats.d.ts +19 -0
  228. package/dist/node_modules/undici-types/pool.d.ts +28 -0
  229. package/dist/node_modules/undici-types/proxy-agent.d.ts +30 -0
  230. package/dist/node_modules/undici-types/readable.d.ts +61 -0
  231. package/dist/node_modules/undici-types/webidl.d.ts +220 -0
  232. package/dist/node_modules/undici-types/websocket.d.ts +131 -0
  233. package/dist/package-lock.json +10146 -0
  234. package/dist/package.json +23 -23
  235. package/dist/schemas/variant.json +5 -21
  236. package/package.json +24 -24
  237. package/dist/node_modules/@types/node/ts4.8/assert.d.ts +0 -130
  238. package/dist/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -237
  239. package/dist/node_modules/@types/node/ts4.8/buffer.d.ts +0 -89
  240. package/dist/node_modules/@types/node/ts4.8/child_process.d.ts +0 -682
  241. package/dist/node_modules/@types/node/ts4.8/cluster.d.ts +0 -300
  242. package/dist/node_modules/@types/node/ts4.8/console.d.ts +0 -142
  243. package/dist/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  244. package/dist/node_modules/@types/node/ts4.8/crypto.d.ts +0 -1287
  245. package/dist/node_modules/@types/node/ts4.8/dgram.d.ts +0 -180
  246. package/dist/node_modules/@types/node/ts4.8/dns.d.ts +0 -516
  247. package/dist/node_modules/@types/node/ts4.8/domain.d.ts +0 -27
  248. package/dist/node_modules/@types/node/ts4.8/events.d.ts +0 -82
  249. package/dist/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -634
  250. package/dist/node_modules/@types/node/ts4.8/fs.d.ts +0 -2587
  251. package/dist/node_modules/@types/node/ts4.8/globals.d.ts +0 -763
  252. package/dist/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  253. package/dist/node_modules/@types/node/ts4.8/http.d.ts +0 -580
  254. package/dist/node_modules/@types/node/ts4.8/http2.d.ts +0 -1208
  255. package/dist/node_modules/@types/node/ts4.8/https.d.ts +0 -274
  256. package/dist/node_modules/@types/node/ts4.8/index.d.ts +0 -53
  257. package/dist/node_modules/@types/node/ts4.8/inspector.d.ts +0 -3050
  258. package/dist/node_modules/@types/node/ts4.8/module.d.ts +0 -56
  259. package/dist/node_modules/@types/node/ts4.8/net.d.ts +0 -324
  260. package/dist/node_modules/@types/node/ts4.8/os.d.ts +0 -243
  261. package/dist/node_modules/@types/node/ts4.8/path.d.ts +0 -168
  262. package/dist/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -274
  263. package/dist/node_modules/@types/node/ts4.8/process.d.ts +0 -452
  264. package/dist/node_modules/@types/node/ts4.8/punycode.d.ts +0 -78
  265. package/dist/node_modules/@types/node/ts4.8/querystring.d.ts +0 -41
  266. package/dist/node_modules/@types/node/ts4.8/readline.d.ts +0 -184
  267. package/dist/node_modules/@types/node/ts4.8/repl.d.ts +0 -404
  268. package/dist/node_modules/@types/node/ts4.8/stream.d.ts +0 -518
  269. package/dist/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -10
  270. package/dist/node_modules/@types/node/ts4.8/timers.d.ts +0 -19
  271. package/dist/node_modules/@types/node/ts4.8/tls.d.ts +0 -866
  272. package/dist/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -64
  273. package/dist/node_modules/@types/node/ts4.8/tty.d.ts +0 -69
  274. package/dist/node_modules/@types/node/ts4.8/url.d.ts +0 -187
  275. package/dist/node_modules/@types/node/ts4.8/util.d.ts +0 -278
  276. package/dist/node_modules/@types/node/ts4.8/v8.d.ts +0 -189
  277. package/dist/node_modules/@types/node/ts4.8/vm.d.ts +0 -155
  278. package/dist/node_modules/@types/node/ts4.8/wasi.d.ts +0 -88
  279. package/dist/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -241
  280. package/dist/node_modules/@types/node/ts4.8/zlib.d.ts +0 -364
  281. package/dist/node_modules/fs-extra/lib/remove/rimraf.js +0 -302
  282. package/dist/node_modules/simple-git/CHANGELOG.md +0 -529
  283. package/dist/node_modules/simple-git/LICENSE +0 -20
  284. package/dist/node_modules/simple-git/promise.d.ts +0 -46
  285. package/dist/node_modules/simple-git/src/git.js +0 -700
  286. package/dist/node_modules/simple-git/src/index.js +0 -7
  287. package/dist/node_modules/simple-git/src/lib/api.js +0 -26
  288. package/dist/node_modules/simple-git/src/lib/api.js.map +0 -1
  289. package/dist/node_modules/simple-git/src/lib/errors/git-construct-error.js +0 -21
  290. package/dist/node_modules/simple-git/src/lib/errors/git-construct-error.js.map +0 -1
  291. package/dist/node_modules/simple-git/src/lib/errors/git-error.js +0 -37
  292. package/dist/node_modules/simple-git/src/lib/errors/git-error.js.map +0 -1
  293. package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts +0 -6
  294. package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.js +0 -14
  295. package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.js.map +0 -1
  296. package/dist/node_modules/simple-git/src/lib/errors/git-response-error.js +0 -36
  297. package/dist/node_modules/simple-git/src/lib/errors/git-response-error.js.map +0 -1
  298. package/dist/node_modules/simple-git/src/lib/errors/task-configuration-error.js +0 -19
  299. package/dist/node_modules/simple-git/src/lib/errors/task-configuration-error.js.map +0 -1
  300. package/dist/node_modules/simple-git/src/lib/git-factory.d.ts +0 -25
  301. package/dist/node_modules/simple-git/src/lib/git-factory.js +0 -45
  302. package/dist/node_modules/simple-git/src/lib/git-factory.js.map +0 -1
  303. package/dist/node_modules/simple-git/src/lib/git-logger.js +0 -101
  304. package/dist/node_modules/simple-git/src/lib/git-logger.js.map +0 -1
  305. package/dist/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js +0 -29
  306. package/dist/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js.map +0 -1
  307. package/dist/node_modules/simple-git/src/lib/parsers/parse-branch.js +0 -18
  308. package/dist/node_modules/simple-git/src/lib/parsers/parse-branch.js.map +0 -1
  309. package/dist/node_modules/simple-git/src/lib/parsers/parse-commit.js +0 -53
  310. package/dist/node_modules/simple-git/src/lib/parsers/parse-commit.js.map +0 -1
  311. package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts +0 -2
  312. package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js +0 -74
  313. package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js.map +0 -1
  314. package/dist/node_modules/simple-git/src/lib/parsers/parse-fetch.js +0 -32
  315. package/dist/node_modules/simple-git/src/lib/parsers/parse-fetch.js.map +0 -1
  316. package/dist/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js +0 -35
  317. package/dist/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js.map +0 -1
  318. package/dist/node_modules/simple-git/src/lib/parsers/parse-merge.js +0 -39
  319. package/dist/node_modules/simple-git/src/lib/parsers/parse-merge.js.map +0 -1
  320. package/dist/node_modules/simple-git/src/lib/parsers/parse-move.js +0 -14
  321. package/dist/node_modules/simple-git/src/lib/parsers/parse-move.js.map +0 -1
  322. package/dist/node_modules/simple-git/src/lib/parsers/parse-pull.js +0 -42
  323. package/dist/node_modules/simple-git/src/lib/parsers/parse-pull.js.map +0 -1
  324. package/dist/node_modules/simple-git/src/lib/parsers/parse-push.js +0 -58
  325. package/dist/node_modules/simple-git/src/lib/parsers/parse-push.js.map +0 -1
  326. package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js +0 -33
  327. package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js.map +0 -1
  328. package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js +0 -41
  329. package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js.map +0 -1
  330. package/dist/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.js +0 -15
  331. package/dist/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.js.map +0 -1
  332. package/dist/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.js +0 -80
  333. package/dist/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.js.map +0 -1
  334. package/dist/node_modules/simple-git/src/lib/plugins/error-detection.plugin.js +0 -39
  335. package/dist/node_modules/simple-git/src/lib/plugins/error-detection.plugin.js.map +0 -1
  336. package/dist/node_modules/simple-git/src/lib/plugins/index.js +0 -21
  337. package/dist/node_modules/simple-git/src/lib/plugins/index.js.map +0 -1
  338. package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.d.ts +0 -6
  339. package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.js +0 -28
  340. package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.js.map +0 -1
  341. package/dist/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.js +0 -45
  342. package/dist/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.js.map +0 -1
  343. package/dist/node_modules/simple-git/src/lib/plugins/simple-git-plugin.js +0 -3
  344. package/dist/node_modules/simple-git/src/lib/plugins/simple-git-plugin.js.map +0 -1
  345. package/dist/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.js +0 -15
  346. package/dist/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.js.map +0 -1
  347. package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts +0 -3
  348. package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.js +0 -37
  349. package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.js.map +0 -1
  350. package/dist/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js +0 -31
  351. package/dist/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js.map +0 -1
  352. package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts +0 -10
  353. package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.js +0 -26
  354. package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.js.map +0 -1
  355. package/dist/node_modules/simple-git/src/lib/responses/CheckIgnore.js +0 -13
  356. package/dist/node_modules/simple-git/src/lib/responses/CheckIgnore.js.map +0 -1
  357. package/dist/node_modules/simple-git/src/lib/responses/CleanSummary.js +0 -28
  358. package/dist/node_modules/simple-git/src/lib/responses/CleanSummary.js.map +0 -1
  359. package/dist/node_modules/simple-git/src/lib/responses/ConfigList.js +0 -89
  360. package/dist/node_modules/simple-git/src/lib/responses/ConfigList.js.map +0 -1
  361. package/dist/node_modules/simple-git/src/lib/responses/DiffSummary.js +0 -16
  362. package/dist/node_modules/simple-git/src/lib/responses/DiffSummary.js.map +0 -1
  363. package/dist/node_modules/simple-git/src/lib/responses/FileStatusSummary.js +0 -18
  364. package/dist/node_modules/simple-git/src/lib/responses/FileStatusSummary.js.map +0 -1
  365. package/dist/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js +0 -30
  366. package/dist/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js.map +0 -1
  367. package/dist/node_modules/simple-git/src/lib/responses/InitSummary.js +0 -36
  368. package/dist/node_modules/simple-git/src/lib/responses/InitSummary.js.map +0 -1
  369. package/dist/node_modules/simple-git/src/lib/responses/MergeSummary.js +0 -35
  370. package/dist/node_modules/simple-git/src/lib/responses/MergeSummary.js.map +0 -1
  371. package/dist/node_modules/simple-git/src/lib/responses/PullSummary.d.ts +0 -12
  372. package/dist/node_modules/simple-git/src/lib/responses/PullSummary.js +0 -22
  373. package/dist/node_modules/simple-git/src/lib/responses/PullSummary.js.map +0 -1
  374. package/dist/node_modules/simple-git/src/lib/responses/StatusSummary.js +0 -128
  375. package/dist/node_modules/simple-git/src/lib/responses/StatusSummary.js.map +0 -1
  376. package/dist/node_modules/simple-git/src/lib/responses/TagList.js +0 -56
  377. package/dist/node_modules/simple-git/src/lib/responses/TagList.js.map +0 -1
  378. package/dist/node_modules/simple-git/src/lib/runners/git-executor-chain.js +0 -173
  379. package/dist/node_modules/simple-git/src/lib/runners/git-executor-chain.js.map +0 -1
  380. package/dist/node_modules/simple-git/src/lib/runners/git-executor.js +0 -21
  381. package/dist/node_modules/simple-git/src/lib/runners/git-executor.js.map +0 -1
  382. package/dist/node_modules/simple-git/src/lib/runners/promise-wrapped.js +0 -133
  383. package/dist/node_modules/simple-git/src/lib/runners/promise-wrapped.js.map +0 -1
  384. package/dist/node_modules/simple-git/src/lib/runners/scheduler.js +0 -48
  385. package/dist/node_modules/simple-git/src/lib/runners/scheduler.js.map +0 -1
  386. package/dist/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js +0 -64
  387. package/dist/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js.map +0 -1
  388. package/dist/node_modules/simple-git/src/lib/simple-git-api.js +0 -80
  389. package/dist/node_modules/simple-git/src/lib/simple-git-api.js.map +0 -1
  390. package/dist/node_modules/simple-git/src/lib/task-callback.js +0 -39
  391. package/dist/node_modules/simple-git/src/lib/task-callback.js.map +0 -1
  392. package/dist/node_modules/simple-git/src/lib/tasks/apply-patch.js +0 -9
  393. package/dist/node_modules/simple-git/src/lib/tasks/apply-patch.js.map +0 -1
  394. package/dist/node_modules/simple-git/src/lib/tasks/branch.js +0 -76
  395. package/dist/node_modules/simple-git/src/lib/tasks/branch.js.map +0 -1
  396. package/dist/node_modules/simple-git/src/lib/tasks/change-working-directory.js +0 -15
  397. package/dist/node_modules/simple-git/src/lib/tasks/change-working-directory.js.map +0 -1
  398. package/dist/node_modules/simple-git/src/lib/tasks/check-ignore.js +0 -13
  399. package/dist/node_modules/simple-git/src/lib/tasks/check-ignore.js.map +0 -1
  400. package/dist/node_modules/simple-git/src/lib/tasks/check-is-repo.js +0 -61
  401. package/dist/node_modules/simple-git/src/lib/tasks/check-is-repo.js.map +0 -1
  402. package/dist/node_modules/simple-git/src/lib/tasks/clean.js +0 -85
  403. package/dist/node_modules/simple-git/src/lib/tasks/clean.js.map +0 -1
  404. package/dist/node_modules/simple-git/src/lib/tasks/clone.js +0 -22
  405. package/dist/node_modules/simple-git/src/lib/tasks/clone.js.map +0 -1
  406. package/dist/node_modules/simple-git/src/lib/tasks/commit.d.ts +0 -3
  407. package/dist/node_modules/simple-git/src/lib/tasks/commit.js +0 -16
  408. package/dist/node_modules/simple-git/src/lib/tasks/commit.js.map +0 -1
  409. package/dist/node_modules/simple-git/src/lib/tasks/config.js +0 -73
  410. package/dist/node_modules/simple-git/src/lib/tasks/config.js.map +0 -1
  411. package/dist/node_modules/simple-git/src/lib/tasks/diff.d.ts +0 -3
  412. package/dist/node_modules/simple-git/src/lib/tasks/diff.js +0 -15
  413. package/dist/node_modules/simple-git/src/lib/tasks/diff.js.map +0 -1
  414. package/dist/node_modules/simple-git/src/lib/tasks/fetch.js +0 -17
  415. package/dist/node_modules/simple-git/src/lib/tasks/fetch.js.map +0 -1
  416. package/dist/node_modules/simple-git/src/lib/tasks/grep.js +0 -76
  417. package/dist/node_modules/simple-git/src/lib/tasks/grep.js.map +0 -1
  418. package/dist/node_modules/simple-git/src/lib/tasks/hash-object.js +0 -16
  419. package/dist/node_modules/simple-git/src/lib/tasks/hash-object.js.map +0 -1
  420. package/dist/node_modules/simple-git/src/lib/tasks/init.js +0 -23
  421. package/dist/node_modules/simple-git/src/lib/tasks/init.js.map +0 -1
  422. package/dist/node_modules/simple-git/src/lib/tasks/log.js +0 -109
  423. package/dist/node_modules/simple-git/src/lib/tasks/log.js.map +0 -1
  424. package/dist/node_modules/simple-git/src/lib/tasks/merge.js +0 -24
  425. package/dist/node_modules/simple-git/src/lib/tasks/merge.js.map +0 -1
  426. package/dist/node_modules/simple-git/src/lib/tasks/move.js +0 -14
  427. package/dist/node_modules/simple-git/src/lib/tasks/move.js.map +0 -1
  428. package/dist/node_modules/simple-git/src/lib/tasks/pull.js +0 -19
  429. package/dist/node_modules/simple-git/src/lib/tasks/pull.js.map +0 -1
  430. package/dist/node_modules/simple-git/src/lib/tasks/push.js +0 -29
  431. package/dist/node_modules/simple-git/src/lib/tasks/push.js.map +0 -1
  432. package/dist/node_modules/simple-git/src/lib/tasks/remote.js +0 -42
  433. package/dist/node_modules/simple-git/src/lib/tasks/remote.js.map +0 -1
  434. package/dist/node_modules/simple-git/src/lib/tasks/reset.js +0 -38
  435. package/dist/node_modules/simple-git/src/lib/tasks/reset.js.map +0 -1
  436. package/dist/node_modules/simple-git/src/lib/tasks/stash-list.d.ts +0 -3
  437. package/dist/node_modules/simple-git/src/lib/tasks/stash-list.js +0 -16
  438. package/dist/node_modules/simple-git/src/lib/tasks/stash-list.js.map +0 -1
  439. package/dist/node_modules/simple-git/src/lib/tasks/status.js +0 -15
  440. package/dist/node_modules/simple-git/src/lib/tasks/status.js.map +0 -1
  441. package/dist/node_modules/simple-git/src/lib/tasks/sub-module.js +0 -25
  442. package/dist/node_modules/simple-git/src/lib/tasks/sub-module.js.map +0 -1
  443. package/dist/node_modules/simple-git/src/lib/tasks/tag.js +0 -45
  444. package/dist/node_modules/simple-git/src/lib/tasks/tag.js.map +0 -1
  445. package/dist/node_modules/simple-git/src/lib/tasks/task.js +0 -52
  446. package/dist/node_modules/simple-git/src/lib/tasks/task.js.map +0 -1
  447. package/dist/node_modules/simple-git/src/lib/types/handlers.js +0 -3
  448. package/dist/node_modules/simple-git/src/lib/types/handlers.js.map +0 -1
  449. package/dist/node_modules/simple-git/src/lib/types/index.js +0 -15
  450. package/dist/node_modules/simple-git/src/lib/types/index.js.map +0 -1
  451. package/dist/node_modules/simple-git/src/lib/types/tasks.js +0 -3
  452. package/dist/node_modules/simple-git/src/lib/types/tasks.js.map +0 -1
  453. package/dist/node_modules/simple-git/src/lib/utils/argument-filters.js +0 -47
  454. package/dist/node_modules/simple-git/src/lib/utils/argument-filters.js.map +0 -1
  455. package/dist/node_modules/simple-git/src/lib/utils/exit-codes.js +0 -14
  456. package/dist/node_modules/simple-git/src/lib/utils/exit-codes.js.map +0 -1
  457. package/dist/node_modules/simple-git/src/lib/utils/git-output-streams.js +0 -14
  458. package/dist/node_modules/simple-git/src/lib/utils/git-output-streams.js.map +0 -1
  459. package/dist/node_modules/simple-git/src/lib/utils/index.js +0 -21
  460. package/dist/node_modules/simple-git/src/lib/utils/index.js.map +0 -1
  461. package/dist/node_modules/simple-git/src/lib/utils/line-parser.js +0 -52
  462. package/dist/node_modules/simple-git/src/lib/utils/line-parser.js.map +0 -1
  463. package/dist/node_modules/simple-git/src/lib/utils/simple-git-options.js +0 -16
  464. package/dist/node_modules/simple-git/src/lib/utils/simple-git-options.js.map +0 -1
  465. package/dist/node_modules/simple-git/src/lib/utils/task-options.js +0 -58
  466. package/dist/node_modules/simple-git/src/lib/utils/task-options.js.map +0 -1
  467. package/dist/node_modules/simple-git/src/lib/utils/task-parser.js +0 -24
  468. package/dist/node_modules/simple-git/src/lib/utils/task-parser.js.map +0 -1
  469. package/dist/node_modules/simple-git/src/lib/utils/util.js +0 -146
  470. package/dist/node_modules/simple-git/src/lib/utils/util.js.map +0 -1
  471. package/dist/node_modules/simple-git/typings/types.d.ts +0 -14
  472. /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-construct-error.d.ts +0 -0
  473. /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-response-error.d.ts +0 -0
  474. /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/task-configuration-error.d.ts +0 -0
  475. /package/dist/node_modules/simple-git/{src → dist/src}/lib/git-logger.d.ts +0 -0
  476. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-branch-delete.d.ts +0 -0
  477. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-commit.d.ts +0 -0
  478. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-fetch.d.ts +0 -0
  479. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-merge.d.ts +0 -0
  480. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-move.d.ts +0 -0
  481. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-push.d.ts +0 -0
  482. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-remote-messages.d.ts +0 -0
  483. /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-remote-objects.d.ts +0 -0
  484. /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/command-config-prefixing-plugin.d.ts +0 -0
  485. /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/error-detection.plugin.d.ts +0 -0
  486. /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/spawn-options-plugin.d.ts +0 -0
  487. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/BranchDeleteSummary.d.ts +0 -0
  488. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/CheckIgnore.d.ts +0 -0
  489. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/CleanSummary.d.ts +0 -0
  490. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/ConfigList.d.ts +0 -0
  491. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/DiffSummary.d.ts +0 -0
  492. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/GetRemoteSummary.d.ts +0 -0
  493. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/InitSummary.d.ts +0 -0
  494. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/MergeSummary.d.ts +0 -0
  495. /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/TagList.d.ts +0 -0
  496. /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/promise-wrapped.d.ts +0 -0
  497. /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/scheduler.d.ts +0 -0
  498. /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/tasks-pending-queue.d.ts +0 -0
  499. /package/dist/node_modules/simple-git/{src → dist/src}/lib/simple-git-api.d.ts +0 -0
  500. /package/dist/node_modules/simple-git/{src → dist/src}/lib/task-callback.d.ts +0 -0
  501. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/apply-patch.d.ts +0 -0
  502. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/branch.d.ts +0 -0
  503. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/change-working-directory.d.ts +0 -0
  504. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/check-ignore.d.ts +0 -0
  505. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/check-is-repo.d.ts +0 -0
  506. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/clean.d.ts +0 -0
  507. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/grep.d.ts +0 -0
  508. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/hash-object.d.ts +0 -0
  509. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/init.d.ts +0 -0
  510. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/merge.d.ts +0 -0
  511. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/move.d.ts +0 -0
  512. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/pull.d.ts +0 -0
  513. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/push.d.ts +0 -0
  514. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/reset.d.ts +0 -0
  515. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/status.d.ts +0 -0
  516. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/sub-module.d.ts +0 -0
  517. /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/tag.d.ts +0 -0
  518. /package/dist/node_modules/simple-git/{src → dist/src}/lib/types/handlers.d.ts +0 -0
  519. /package/dist/node_modules/simple-git/{src → dist/src}/lib/types/tasks.d.ts +0 -0
  520. /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/argument-filters.d.ts +0 -0
  521. /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/git-output-streams.d.ts +0 -0
  522. /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/index.d.ts +0 -0
  523. /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/simple-git-options.d.ts +0 -0
  524. /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/task-options.d.ts +0 -0
@@ -1,32 +1,463 @@
1
+ /**
2
+ * The `node:child_process` module provides the ability to spawn subprocesses in
3
+ * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
4
+ * is primarily provided by the {@link spawn} function:
5
+ *
6
+ * ```js
7
+ * const { spawn } = require('node:child_process');
8
+ * const ls = spawn('ls', ['-lh', '/usr']);
9
+ *
10
+ * ls.stdout.on('data', (data) => {
11
+ * console.log(`stdout: ${data}`);
12
+ * });
13
+ *
14
+ * ls.stderr.on('data', (data) => {
15
+ * console.error(`stderr: ${data}`);
16
+ * });
17
+ *
18
+ * ls.on('close', (code) => {
19
+ * console.log(`child process exited with code ${code}`);
20
+ * });
21
+ * ```
22
+ *
23
+ * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
24
+ * the parent Node.js process and the spawned subprocess. These pipes have
25
+ * limited (and platform-specific) capacity. If the subprocess writes to
26
+ * stdout in excess of that limit without the output being captured, the
27
+ * subprocess blocks waiting for the pipe buffer to accept more data. This is
28
+ * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
29
+ *
30
+ * The command lookup is performed using the `options.env.PATH` environment
31
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
32
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
33
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
34
+ * manual for execvpe/execvp), on Windows the current processes environment
35
+ * variable `PATH` is used.
36
+ *
37
+ * On Windows, environment variables are case-insensitive. Node.js
38
+ * lexicographically sorts the `env` keys and uses the first one that
39
+ * case-insensitively matches. Only first (in lexicographic order) entry will be
40
+ * passed to the subprocess. This might lead to issues on Windows when passing
41
+ * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`.
42
+ *
43
+ * The {@link spawn} method spawns the child process asynchronously,
44
+ * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
45
+ * the event loop until the spawned process either exits or is terminated.
46
+ *
47
+ * For convenience, the `node:child_process` module provides a handful of
48
+ * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
49
+ * top of {@link spawn} or {@link spawnSync}.
50
+ *
51
+ * * {@link exec}: spawns a shell and runs a command within that
52
+ * shell, passing the `stdout` and `stderr` to a callback function when
53
+ * complete.
54
+ * * {@link execFile}: similar to {@link exec} except
55
+ * that it spawns the command directly without first spawning a shell by
56
+ * default.
57
+ * * {@link fork}: spawns a new Node.js process and invokes a
58
+ * specified module with an IPC communication channel established that allows
59
+ * sending messages between parent and child.
60
+ * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
61
+ * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
62
+ *
63
+ * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
64
+ * the synchronous methods can have significant impact on performance due to
65
+ * stalling the event loop while spawned processes complete.
66
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js)
67
+ */
1
68
  declare module "child_process" {
2
- import { BaseEncodingOptions } from "fs";
3
- import * as events from "events";
4
- import * as net from "net";
5
- import { Pipe, Readable, Stream, Writable } from "stream";
6
-
7
- type Serializable = string | object | number | boolean;
8
- type SendHandle = net.Socket | net.Server;
9
-
10
- interface ChildProcess extends events.EventEmitter {
69
+ import { ObjectEncodingOptions } from "node:fs";
70
+ import { Abortable, EventEmitter } from "node:events";
71
+ import * as dgram from "node:dgram";
72
+ import * as net from "node:net";
73
+ import { Pipe, Readable, Stream, Writable } from "node:stream";
74
+ import { URL } from "node:url";
75
+ type Serializable = string | object | number | boolean | bigint;
76
+ type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
77
+ /**
78
+ * Instances of the `ChildProcess` represent spawned child processes.
79
+ *
80
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
81
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
82
+ * instances of `ChildProcess`.
83
+ * @since v2.2.0
84
+ */
85
+ class ChildProcess extends EventEmitter {
86
+ /**
87
+ * A `Writable Stream` that represents the child process's `stdin`.
88
+ *
89
+ * If a child process waits to read all of its input, the child will not continue
90
+ * until this stream has been closed via `end()`.
91
+ *
92
+ * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
93
+ * then this will be `null`.
94
+ *
95
+ * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
96
+ * refer to the same value.
97
+ *
98
+ * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
99
+ * @since v0.1.90
100
+ */
11
101
  stdin: Writable | null;
102
+ /**
103
+ * A `Readable Stream` that represents the child process's `stdout`.
104
+ *
105
+ * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
106
+ * then this will be `null`.
107
+ *
108
+ * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
109
+ * refer to the same value.
110
+ *
111
+ * ```js
112
+ * const { spawn } = require('node:child_process');
113
+ *
114
+ * const subprocess = spawn('ls');
115
+ *
116
+ * subprocess.stdout.on('data', (data) => {
117
+ * console.log(`Received chunk ${data}`);
118
+ * });
119
+ * ```
120
+ *
121
+ * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
122
+ * @since v0.1.90
123
+ */
12
124
  stdout: Readable | null;
125
+ /**
126
+ * A `Readable Stream` that represents the child process's `stderr`.
127
+ *
128
+ * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
129
+ * then this will be `null`.
130
+ *
131
+ * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
132
+ * refer to the same value.
133
+ *
134
+ * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
135
+ * @since v0.1.90
136
+ */
13
137
  stderr: Readable | null;
138
+ /**
139
+ * The `subprocess.channel` property is a reference to the child's IPC channel. If
140
+ * no IPC channel exists, this property is `undefined`.
141
+ * @since v7.1.0
142
+ */
14
143
  readonly channel?: Pipe | null | undefined;
144
+ /**
145
+ * A sparse array of pipes to the child process, corresponding with positions in
146
+ * the `stdio` option passed to {@link spawn} that have been set
147
+ * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`,
148
+ * respectively.
149
+ *
150
+ * In the following example, only the child's fd `1` (stdout) is configured as a
151
+ * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
152
+ * in the array are `null`.
153
+ *
154
+ * ```js
155
+ * const assert = require('node:assert');
156
+ * const fs = require('node:fs');
157
+ * const child_process = require('node:child_process');
158
+ *
159
+ * const subprocess = child_process.spawn('ls', {
160
+ * stdio: [
161
+ * 0, // Use parent's stdin for child.
162
+ * 'pipe', // Pipe child's stdout to parent.
163
+ * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
164
+ * ],
165
+ * });
166
+ *
167
+ * assert.strictEqual(subprocess.stdio[0], null);
168
+ * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
169
+ *
170
+ * assert(subprocess.stdout);
171
+ * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
172
+ *
173
+ * assert.strictEqual(subprocess.stdio[2], null);
174
+ * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
175
+ * ```
176
+ *
177
+ * The `subprocess.stdio` property can be `undefined` if the child process could
178
+ * not be successfully spawned.
179
+ * @since v0.7.10
180
+ */
15
181
  readonly stdio: [
16
- Writable | null, // stdin
17
- Readable | null, // stdout
18
- Readable | null, // stderr
19
- Readable | Writable | null | undefined, // extra
182
+ Writable | null,
183
+ // stdin
184
+ Readable | null,
185
+ // stdout
186
+ Readable | null,
187
+ // stderr
188
+ Readable | Writable | null | undefined,
189
+ // extra
20
190
  Readable | Writable | null | undefined, // extra
21
191
  ];
192
+ /**
193
+ * The `subprocess.killed` property indicates whether the child process
194
+ * successfully received a signal from `subprocess.kill()`. The `killed` property
195
+ * does not indicate that the child process has been terminated.
196
+ * @since v0.5.10
197
+ */
22
198
  readonly killed: boolean;
23
- readonly pid: number;
199
+ /**
200
+ * Returns the process identifier (PID) of the child process. If the child process
201
+ * fails to spawn due to errors, then the value is `undefined` and `error` is
202
+ * emitted.
203
+ *
204
+ * ```js
205
+ * const { spawn } = require('node:child_process');
206
+ * const grep = spawn('grep', ['ssh']);
207
+ *
208
+ * console.log(`Spawned child pid: ${grep.pid}`);
209
+ * grep.stdin.end();
210
+ * ```
211
+ * @since v0.1.90
212
+ */
213
+ readonly pid?: number | undefined;
214
+ /**
215
+ * The `subprocess.connected` property indicates whether it is still possible to
216
+ * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages.
217
+ * @since v0.7.2
218
+ */
24
219
  readonly connected: boolean;
220
+ /**
221
+ * The `subprocess.exitCode` property indicates the exit code of the child process.
222
+ * If the child process is still running, the field will be `null`.
223
+ */
25
224
  readonly exitCode: number | null;
225
+ /**
226
+ * The `subprocess.signalCode` property indicates the signal received by
227
+ * the child process if any, else `null`.
228
+ */
26
229
  readonly signalCode: NodeJS.Signals | null;
230
+ /**
231
+ * The `subprocess.spawnargs` property represents the full list of command-line
232
+ * arguments the child process was launched with.
233
+ */
27
234
  readonly spawnargs: string[];
235
+ /**
236
+ * The `subprocess.spawnfile` property indicates the executable file name of
237
+ * the child process that is launched.
238
+ *
239
+ * For {@link fork}, its value will be equal to `process.execPath`.
240
+ * For {@link spawn}, its value will be the name of
241
+ * the executable file.
242
+ * For {@link exec}, its value will be the name of the shell
243
+ * in which the child process is launched.
244
+ */
28
245
  readonly spawnfile: string;
246
+ /**
247
+ * The `subprocess.kill()` method sends a signal to the child process. If no
248
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
249
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
250
+ *
251
+ * ```js
252
+ * const { spawn } = require('node:child_process');
253
+ * const grep = spawn('grep', ['ssh']);
254
+ *
255
+ * grep.on('close', (code, signal) => {
256
+ * console.log(
257
+ * `child process terminated due to receipt of signal ${signal}`);
258
+ * });
259
+ *
260
+ * // Send SIGHUP to process.
261
+ * grep.kill('SIGHUP');
262
+ * ```
263
+ *
264
+ * The `ChildProcess` object may emit an `'error'` event if the signal
265
+ * cannot be delivered. Sending a signal to a child process that has already exited
266
+ * is not an error but may have unforeseen consequences. Specifically, if the
267
+ * process identifier (PID) has been reassigned to another process, the signal will
268
+ * be delivered to that process instead which can have unexpected results.
269
+ *
270
+ * While the function is called `kill`, the signal delivered to the child process
271
+ * may not actually terminate the process.
272
+ *
273
+ * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
274
+ *
275
+ * On Windows, where POSIX signals do not exist, the `signal` argument will be
276
+ * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`).
277
+ * See `Signal Events` for more details.
278
+ *
279
+ * On Linux, child processes of child processes will not be terminated
280
+ * when attempting to kill their parent. This is likely to happen when running a
281
+ * new process in a shell or with the use of the `shell` option of `ChildProcess`:
282
+ *
283
+ * ```js
284
+ * 'use strict';
285
+ * const { spawn } = require('node:child_process');
286
+ *
287
+ * const subprocess = spawn(
288
+ * 'sh',
289
+ * [
290
+ * '-c',
291
+ * `node -e "setInterval(() => {
292
+ * console.log(process.pid, 'is alive')
293
+ * }, 500);"`,
294
+ * ], {
295
+ * stdio: ['inherit', 'inherit', 'inherit'],
296
+ * },
297
+ * );
298
+ *
299
+ * setTimeout(() => {
300
+ * subprocess.kill(); // Does not terminate the Node.js process in the shell.
301
+ * }, 2000);
302
+ * ```
303
+ * @since v0.1.90
304
+ */
29
305
  kill(signal?: NodeJS.Signals | number): boolean;
306
+ /**
307
+ * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
308
+ * @since v20.5.0
309
+ */
310
+ [Symbol.dispose](): void;
311
+ /**
312
+ * When an IPC channel has been established between the parent and child (
313
+ * i.e. when using {@link fork}), the `subprocess.send()` method can
314
+ * be used to send messages to the child process. When the child process is a
315
+ * Node.js instance, these messages can be received via the `'message'` event.
316
+ *
317
+ * The message goes through serialization and parsing. The resulting
318
+ * message might not be the same as what is originally sent.
319
+ *
320
+ * For example, in the parent script:
321
+ *
322
+ * ```js
323
+ * const cp = require('node:child_process');
324
+ * const n = cp.fork(`${__dirname}/sub.js`);
325
+ *
326
+ * n.on('message', (m) => {
327
+ * console.log('PARENT got message:', m);
328
+ * });
329
+ *
330
+ * // Causes the child to print: CHILD got message: { hello: 'world' }
331
+ * n.send({ hello: 'world' });
332
+ * ```
333
+ *
334
+ * And then the child script, `'sub.js'` might look like this:
335
+ *
336
+ * ```js
337
+ * process.on('message', (m) => {
338
+ * console.log('CHILD got message:', m);
339
+ * });
340
+ *
341
+ * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
342
+ * process.send({ foo: 'bar', baz: NaN });
343
+ * ```
344
+ *
345
+ * Child Node.js processes will have a `process.send()` method of their own
346
+ * that allows the child to send messages back to the parent.
347
+ *
348
+ * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
349
+ * containing a `NODE_` prefix in the `cmd` property are reserved for use within
350
+ * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js.
351
+ * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice.
352
+ *
353
+ * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
354
+ * for passing a TCP server or socket object to the child process. The child will
355
+ * receive the object as the second argument passed to the callback function
356
+ * registered on the `'message'` event. Any data that is received and buffered in
357
+ * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows.
358
+ *
359
+ * The optional `callback` is a function that is invoked after the message is
360
+ * sent but before the child may have received it. The function is called with a
361
+ * single argument: `null` on success, or an `Error` object on failure.
362
+ *
363
+ * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can
364
+ * happen, for instance, when the child process has already exited.
365
+ *
366
+ * `subprocess.send()` will return `false` if the channel has closed or when the
367
+ * backlog of unsent messages exceeds a threshold that makes it unwise to send
368
+ * more. Otherwise, the method returns `true`. The `callback` function can be
369
+ * used to implement flow control.
370
+ *
371
+ * #### Example: sending a server object
372
+ *
373
+ * The `sendHandle` argument can be used, for instance, to pass the handle of
374
+ * a TCP server object to the child process as illustrated in the example below:
375
+ *
376
+ * ```js
377
+ * const subprocess = require('node:child_process').fork('subprocess.js');
378
+ *
379
+ * // Open up the server object and send the handle.
380
+ * const server = require('node:net').createServer();
381
+ * server.on('connection', (socket) => {
382
+ * socket.end('handled by parent');
383
+ * });
384
+ * server.listen(1337, () => {
385
+ * subprocess.send('server', server);
386
+ * });
387
+ * ```
388
+ *
389
+ * The child would then receive the server object as:
390
+ *
391
+ * ```js
392
+ * process.on('message', (m, server) => {
393
+ * if (m === 'server') {
394
+ * server.on('connection', (socket) => {
395
+ * socket.end('handled by child');
396
+ * });
397
+ * }
398
+ * });
399
+ * ```
400
+ *
401
+ * Once the server is now shared between the parent and child, some connections
402
+ * can be handled by the parent and some by the child.
403
+ *
404
+ * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of
405
+ * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only
406
+ * supported on Unix platforms.
407
+ *
408
+ * #### Example: sending a socket object
409
+ *
410
+ * Similarly, the `sendHandler` argument can be used to pass the handle of a
411
+ * socket to the child process. The example below spawns two children that each
412
+ * handle connections with "normal" or "special" priority:
413
+ *
414
+ * ```js
415
+ * const { fork } = require('node:child_process');
416
+ * const normal = fork('subprocess.js', ['normal']);
417
+ * const special = fork('subprocess.js', ['special']);
418
+ *
419
+ * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
420
+ * // the sockets from being read before they are sent to the child process.
421
+ * const server = require('node:net').createServer({ pauseOnConnect: true });
422
+ * server.on('connection', (socket) => {
423
+ *
424
+ * // If this is special priority...
425
+ * if (socket.remoteAddress === '74.125.127.100') {
426
+ * special.send('socket', socket);
427
+ * return;
428
+ * }
429
+ * // This is normal priority.
430
+ * normal.send('socket', socket);
431
+ * });
432
+ * server.listen(1337);
433
+ * ```
434
+ *
435
+ * The `subprocess.js` would receive the socket handle as the second argument
436
+ * passed to the event callback function:
437
+ *
438
+ * ```js
439
+ * process.on('message', (m, socket) => {
440
+ * if (m === 'socket') {
441
+ * if (socket) {
442
+ * // Check that the client socket exists.
443
+ * // It is possible for the socket to be closed between the time it is
444
+ * // sent and the time it is received in the child process.
445
+ * socket.end(`Request handled with ${process.argv[2]} priority`);
446
+ * }
447
+ * }
448
+ * });
449
+ * ```
450
+ *
451
+ * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
452
+ * The parent cannot track when the socket is destroyed.
453
+ *
454
+ * Any `'message'` handlers in the subprocess should verify that `socket` exists,
455
+ * as the connection may have been closed during the time it takes to send the
456
+ * connection to the child.
457
+ * @since v0.5.9
458
+ * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v20.x/api/dgram.html#class-dgramsocket) object.
459
+ * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
460
+ */
30
461
  send(message: Serializable, callback?: (error: Error | null) => void): boolean;
31
462
  send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
32
463
  send(
@@ -35,10 +466,61 @@ declare module "child_process" {
35
466
  options?: MessageOptions,
36
467
  callback?: (error: Error | null) => void,
37
468
  ): boolean;
469
+ /**
470
+ * Closes the IPC channel between parent and child, allowing the child to exit
471
+ * gracefully once there are no other connections keeping it alive. After calling
472
+ * this method the `subprocess.connected` and `process.connected` properties in
473
+ * both the parent and child (respectively) will be set to `false`, and it will be
474
+ * no longer possible to pass messages between the processes.
475
+ *
476
+ * The `'disconnect'` event will be emitted when there are no messages in the
477
+ * process of being received. This will most often be triggered immediately after
478
+ * calling `subprocess.disconnect()`.
479
+ *
480
+ * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
481
+ * within the child process to close the IPC channel as well.
482
+ * @since v0.7.2
483
+ */
38
484
  disconnect(): void;
485
+ /**
486
+ * By default, the parent will wait for the detached child to exit. To prevent the
487
+ * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not
488
+ * include the child in its reference count, allowing the parent to exit
489
+ * independently of the child, unless there is an established IPC channel between
490
+ * the child and the parent.
491
+ *
492
+ * ```js
493
+ * const { spawn } = require('node:child_process');
494
+ *
495
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
496
+ * detached: true,
497
+ * stdio: 'ignore',
498
+ * });
499
+ *
500
+ * subprocess.unref();
501
+ * ```
502
+ * @since v0.7.10
503
+ */
39
504
  unref(): void;
505
+ /**
506
+ * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
507
+ * restore the removed reference count for the child process, forcing the parent
508
+ * to wait for the child to exit before exiting itself.
509
+ *
510
+ * ```js
511
+ * const { spawn } = require('node:child_process');
512
+ *
513
+ * const subprocess = spawn(process.argv[0], ['child_program.js'], {
514
+ * detached: true,
515
+ * stdio: 'ignore',
516
+ * });
517
+ *
518
+ * subprocess.unref();
519
+ * subprocess.ref();
520
+ * ```
521
+ * @since v0.7.10
522
+ */
40
523
  ref(): void;
41
-
42
524
  /**
43
525
  * events.EventEmitter
44
526
  * 1. close
@@ -46,43 +528,43 @@ declare module "child_process" {
46
528
  * 3. error
47
529
  * 4. exit
48
530
  * 5. message
531
+ * 6. spawn
49
532
  */
50
-
51
533
  addListener(event: string, listener: (...args: any[]) => void): this;
52
534
  addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
53
535
  addListener(event: "disconnect", listener: () => void): this;
54
536
  addListener(event: "error", listener: (err: Error) => void): this;
55
537
  addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
56
538
  addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
57
-
539
+ addListener(event: "spawn", listener: () => void): this;
58
540
  emit(event: string | symbol, ...args: any[]): boolean;
59
541
  emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
60
542
  emit(event: "disconnect"): boolean;
61
543
  emit(event: "error", err: Error): boolean;
62
544
  emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
63
545
  emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
64
-
546
+ emit(event: "spawn", listener: () => void): boolean;
65
547
  on(event: string, listener: (...args: any[]) => void): this;
66
548
  on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
67
549
  on(event: "disconnect", listener: () => void): this;
68
550
  on(event: "error", listener: (err: Error) => void): this;
69
551
  on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
70
552
  on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
71
-
553
+ on(event: "spawn", listener: () => void): this;
72
554
  once(event: string, listener: (...args: any[]) => void): this;
73
555
  once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
74
556
  once(event: "disconnect", listener: () => void): this;
75
557
  once(event: "error", listener: (err: Error) => void): this;
76
558
  once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
77
559
  once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
78
-
560
+ once(event: "spawn", listener: () => void): this;
79
561
  prependListener(event: string, listener: (...args: any[]) => void): this;
80
562
  prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
81
563
  prependListener(event: "disconnect", listener: () => void): this;
82
564
  prependListener(event: "error", listener: (err: Error) => void): this;
83
565
  prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
84
566
  prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
85
-
567
+ prependListener(event: "spawn", listener: () => void): this;
86
568
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
87
569
  prependOnceListener(
88
570
  event: "close",
@@ -95,28 +577,27 @@ declare module "child_process" {
95
577
  listener: (code: number | null, signal: NodeJS.Signals | null) => void,
96
578
  ): this;
97
579
  prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
580
+ prependOnceListener(event: "spawn", listener: () => void): this;
98
581
  }
99
-
100
582
  // return this object when stdio option is undefined or not specified
101
583
  interface ChildProcessWithoutNullStreams extends ChildProcess {
102
584
  stdin: Writable;
103
585
  stdout: Readable;
104
586
  stderr: Readable;
105
587
  readonly stdio: [
106
- Writable, // stdin
107
- Readable, // stdout
108
- Readable, // stderr
109
- Readable | Writable | null | undefined, // extra, no modification
588
+ Writable,
589
+ Readable,
590
+ Readable,
591
+ // stderr
592
+ Readable | Writable | null | undefined,
593
+ // extra, no modification
110
594
  Readable | Writable | null | undefined, // extra, no modification
111
595
  ];
112
596
  }
113
-
114
597
  // return this object when stdio option is a tuple of 3
115
- interface ChildProcessByStdio<
116
- I extends null | Writable,
117
- O extends null | Readable,
118
- E extends null | Readable,
119
- > extends ChildProcess {
598
+ interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable>
599
+ extends ChildProcess
600
+ {
120
601
  stdin: I;
121
602
  stdout: O;
122
603
  stderr: E;
@@ -124,38 +605,39 @@ declare module "child_process" {
124
605
  I,
125
606
  O,
126
607
  E,
127
- Readable | Writable | null | undefined, // extra, no modification
608
+ Readable | Writable | null | undefined,
609
+ // extra, no modification
128
610
  Readable | Writable | null | undefined, // extra, no modification
129
611
  ];
130
612
  }
131
-
132
613
  interface MessageOptions {
133
614
  keepOpen?: boolean | undefined;
134
615
  }
135
-
136
- type StdioOptions =
137
- | "pipe"
138
- | "ignore"
139
- | "inherit"
140
- | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
141
-
616
+ type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
617
+ type StdioOptions = IOType | Array<IOType | "ipc" | Stream | number | null | undefined>;
142
618
  type SerializationType = "json" | "advanced";
143
-
144
- interface MessagingOptions {
619
+ interface MessagingOptions extends Abortable {
145
620
  /**
146
621
  * Specify the kind of serialization used for sending messages between processes.
147
622
  * @default 'json'
148
623
  */
149
624
  serialization?: SerializationType | undefined;
625
+ /**
626
+ * The signal value to be used when the spawned process will be killed by the abort signal.
627
+ * @default 'SIGTERM'
628
+ */
629
+ killSignal?: NodeJS.Signals | number | undefined;
630
+ /**
631
+ * In milliseconds the maximum amount of time the process is allowed to run.
632
+ */
633
+ timeout?: number | undefined;
150
634
  }
151
-
152
635
  interface ProcessEnvOptions {
153
636
  uid?: number | undefined;
154
637
  gid?: number | undefined;
155
- cwd?: string | undefined;
638
+ cwd?: string | URL | undefined;
156
639
  env?: NodeJS.ProcessEnv | undefined;
157
640
  }
158
-
159
641
  interface CommonOptions extends ProcessEnvOptions {
160
642
  /**
161
643
  * @default false
@@ -166,8 +648,7 @@ declare module "child_process" {
166
648
  */
167
649
  timeout?: number | undefined;
168
650
  }
169
-
170
- interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
651
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
171
652
  argv0?: string | undefined;
172
653
  /**
173
654
  * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
@@ -182,18 +663,15 @@ declare module "child_process" {
182
663
  shell?: boolean | string | undefined;
183
664
  windowsVerbatimArguments?: boolean | undefined;
184
665
  }
185
-
186
666
  interface SpawnOptions extends CommonSpawnOptions {
187
667
  detached?: boolean | undefined;
188
668
  }
189
-
190
669
  interface SpawnOptionsWithoutStdio extends SpawnOptions {
191
- stdio?: "pipe" | Array<null | undefined | "pipe"> | undefined;
670
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
192
671
  }
193
-
194
672
  type StdioNull = "inherit" | "ignore" | Stream;
195
- type StdioPipe = undefined | null | "pipe";
196
-
673
+ type StdioPipeNamed = "pipe" | "overlapped";
674
+ type StdioPipe = undefined | null | StdioPipeNamed;
197
675
  interface SpawnOptionsWithStdioTuple<
198
676
  Stdin extends StdioNull | StdioPipe,
199
677
  Stdout extends StdioNull | StdioPipe,
@@ -201,10 +679,126 @@ declare module "child_process" {
201
679
  > extends SpawnOptions {
202
680
  stdio: [Stdin, Stdout, Stderr];
203
681
  }
204
-
205
- // overloads of spawn without 'args'
682
+ /**
683
+ * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults
684
+ * to an empty array.
685
+ *
686
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
687
+ * **function. Any input containing shell metacharacters may be used to trigger**
688
+ * **arbitrary command execution.**
689
+ *
690
+ * A third argument may be used to specify additional options, with these defaults:
691
+ *
692
+ * ```js
693
+ * const defaults = {
694
+ * cwd: undefined,
695
+ * env: process.env,
696
+ * };
697
+ * ```
698
+ *
699
+ * Use `cwd` to specify the working directory from which the process is spawned.
700
+ * If not given, the default is to inherit the current working directory. If given,
701
+ * but the path does not exist, the child process emits an `ENOENT` error
702
+ * and exits immediately. `ENOENT` is also emitted when the command
703
+ * does not exist.
704
+ *
705
+ * Use `env` to specify environment variables that will be visible to the new
706
+ * process, the default is `process.env`.
707
+ *
708
+ * `undefined` values in `env` will be ignored.
709
+ *
710
+ * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
711
+ * exit code:
712
+ *
713
+ * ```js
714
+ * const { spawn } = require('node:child_process');
715
+ * const ls = spawn('ls', ['-lh', '/usr']);
716
+ *
717
+ * ls.stdout.on('data', (data) => {
718
+ * console.log(`stdout: ${data}`);
719
+ * });
720
+ *
721
+ * ls.stderr.on('data', (data) => {
722
+ * console.error(`stderr: ${data}`);
723
+ * });
724
+ *
725
+ * ls.on('close', (code) => {
726
+ * console.log(`child process exited with code ${code}`);
727
+ * });
728
+ * ```
729
+ *
730
+ * Example: A very elaborate way to run `ps ax | grep ssh`
731
+ *
732
+ * ```js
733
+ * const { spawn } = require('node:child_process');
734
+ * const ps = spawn('ps', ['ax']);
735
+ * const grep = spawn('grep', ['ssh']);
736
+ *
737
+ * ps.stdout.on('data', (data) => {
738
+ * grep.stdin.write(data);
739
+ * });
740
+ *
741
+ * ps.stderr.on('data', (data) => {
742
+ * console.error(`ps stderr: ${data}`);
743
+ * });
744
+ *
745
+ * ps.on('close', (code) => {
746
+ * if (code !== 0) {
747
+ * console.log(`ps process exited with code ${code}`);
748
+ * }
749
+ * grep.stdin.end();
750
+ * });
751
+ *
752
+ * grep.stdout.on('data', (data) => {
753
+ * console.log(data.toString());
754
+ * });
755
+ *
756
+ * grep.stderr.on('data', (data) => {
757
+ * console.error(`grep stderr: ${data}`);
758
+ * });
759
+ *
760
+ * grep.on('close', (code) => {
761
+ * if (code !== 0) {
762
+ * console.log(`grep process exited with code ${code}`);
763
+ * }
764
+ * });
765
+ * ```
766
+ *
767
+ * Example of checking for failed `spawn`:
768
+ *
769
+ * ```js
770
+ * const { spawn } = require('node:child_process');
771
+ * const subprocess = spawn('bad_command');
772
+ *
773
+ * subprocess.on('error', (err) => {
774
+ * console.error('Failed to start subprocess.');
775
+ * });
776
+ * ```
777
+ *
778
+ * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
779
+ * title while others (Windows, SunOS) will use `command`.
780
+ *
781
+ * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve
782
+ * it with the `process.argv0` property instead.
783
+ *
784
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
785
+ * the error passed to the callback will be an `AbortError`:
786
+ *
787
+ * ```js
788
+ * const { spawn } = require('node:child_process');
789
+ * const controller = new AbortController();
790
+ * const { signal } = controller;
791
+ * const grep = spawn('grep', ['ssh'], { signal });
792
+ * grep.on('error', (err) => {
793
+ * // This will be called with err being an AbortError if the controller aborts
794
+ * });
795
+ * controller.abort(); // Stops the child process
796
+ * ```
797
+ * @since v0.1.90
798
+ * @param command The command to run.
799
+ * @param args List of string arguments.
800
+ */
206
801
  function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
207
-
208
802
  function spawn(
209
803
  command: string,
210
804
  options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
@@ -237,152 +831,247 @@ declare module "child_process" {
237
831
  command: string,
238
832
  options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
239
833
  ): ChildProcessByStdio<null, null, null>;
240
-
241
834
  function spawn(command: string, options: SpawnOptions): ChildProcess;
242
-
243
835
  // overloads of spawn with 'args'
244
836
  function spawn(
245
837
  command: string,
246
- args?: ReadonlyArray<string>,
838
+ args?: readonly string[],
247
839
  options?: SpawnOptionsWithoutStdio,
248
840
  ): ChildProcessWithoutNullStreams;
249
-
250
841
  function spawn(
251
842
  command: string,
252
- args: ReadonlyArray<string>,
843
+ args: readonly string[],
253
844
  options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
254
845
  ): ChildProcessByStdio<Writable, Readable, Readable>;
255
846
  function spawn(
256
847
  command: string,
257
- args: ReadonlyArray<string>,
848
+ args: readonly string[],
258
849
  options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
259
850
  ): ChildProcessByStdio<Writable, Readable, null>;
260
851
  function spawn(
261
852
  command: string,
262
- args: ReadonlyArray<string>,
853
+ args: readonly string[],
263
854
  options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
264
855
  ): ChildProcessByStdio<Writable, null, Readable>;
265
856
  function spawn(
266
857
  command: string,
267
- args: ReadonlyArray<string>,
858
+ args: readonly string[],
268
859
  options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
269
860
  ): ChildProcessByStdio<null, Readable, Readable>;
270
861
  function spawn(
271
862
  command: string,
272
- args: ReadonlyArray<string>,
863
+ args: readonly string[],
273
864
  options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
274
865
  ): ChildProcessByStdio<Writable, null, null>;
275
866
  function spawn(
276
867
  command: string,
277
- args: ReadonlyArray<string>,
868
+ args: readonly string[],
278
869
  options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
279
870
  ): ChildProcessByStdio<null, Readable, null>;
280
871
  function spawn(
281
872
  command: string,
282
- args: ReadonlyArray<string>,
873
+ args: readonly string[],
283
874
  options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
284
875
  ): ChildProcessByStdio<null, null, Readable>;
285
876
  function spawn(
286
877
  command: string,
287
- args: ReadonlyArray<string>,
878
+ args: readonly string[],
288
879
  options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
289
880
  ): ChildProcessByStdio<null, null, null>;
290
-
291
- function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
292
-
881
+ function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess;
293
882
  interface ExecOptions extends CommonOptions {
294
883
  shell?: string | undefined;
884
+ signal?: AbortSignal | undefined;
295
885
  maxBuffer?: number | undefined;
296
886
  killSignal?: NodeJS.Signals | number | undefined;
297
887
  }
298
-
299
888
  interface ExecOptionsWithStringEncoding extends ExecOptions {
300
889
  encoding: BufferEncoding;
301
890
  }
302
-
303
891
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
304
892
  encoding: BufferEncoding | null; // specify `null`.
305
893
  }
306
-
307
894
  interface ExecException extends Error {
308
895
  cmd?: string | undefined;
309
896
  killed?: boolean | undefined;
310
897
  code?: number | undefined;
311
898
  signal?: NodeJS.Signals | undefined;
899
+ stdout?: string;
900
+ stderr?: string;
312
901
  }
313
-
314
- // no `options` definitely means stdout/stderr are `string`.
902
+ /**
903
+ * Spawns a shell then executes the `command` within that shell, buffering any
904
+ * generated output. The `command` string passed to the exec function is processed
905
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
906
+ * need to be dealt with accordingly:
907
+ *
908
+ * ```js
909
+ * const { exec } = require('node:child_process');
910
+ *
911
+ * exec('"/path/to/test file/test.sh" arg1 arg2');
912
+ * // Double quotes are used so that the space in the path is not interpreted as
913
+ * // a delimiter of multiple arguments.
914
+ *
915
+ * exec('echo "The \\$HOME variable is $HOME"');
916
+ * // The $HOME variable is escaped in the first instance, but not in the second.
917
+ * ```
918
+ *
919
+ * **Never pass unsanitized user input to this function. Any input containing shell**
920
+ * **metacharacters may be used to trigger arbitrary command execution.**
921
+ *
922
+ * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The
923
+ * `error.code` property will be
924
+ * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the
925
+ * process.
926
+ *
927
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
928
+ * stdout and stderr output of the child process. By default, Node.js will decode
929
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
930
+ * can be used to specify the character encoding used to decode the stdout and
931
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
932
+ * encoding, `Buffer` objects will be passed to the callback instead.
933
+ *
934
+ * ```js
935
+ * const { exec } = require('node:child_process');
936
+ * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
937
+ * if (error) {
938
+ * console.error(`exec error: ${error}`);
939
+ * return;
940
+ * }
941
+ * console.log(`stdout: ${stdout}`);
942
+ * console.error(`stderr: ${stderr}`);
943
+ * });
944
+ * ```
945
+ *
946
+ * If `timeout` is greater than `0`, the parent will send the signal
947
+ * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
948
+ * child runs longer than `timeout` milliseconds.
949
+ *
950
+ * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
951
+ * the existing process and uses a shell to execute the command.
952
+ *
953
+ * If this method is invoked as its `util.promisify()` ed version, it returns
954
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
955
+ * case of an error (including any error resulting in an exit code other than 0), a
956
+ * rejected promise is returned, with the same `error` object given in the
957
+ * callback, but with two additional properties `stdout` and `stderr`.
958
+ *
959
+ * ```js
960
+ * const util = require('node:util');
961
+ * const exec = util.promisify(require('node:child_process').exec);
962
+ *
963
+ * async function lsExample() {
964
+ * const { stdout, stderr } = await exec('ls');
965
+ * console.log('stdout:', stdout);
966
+ * console.error('stderr:', stderr);
967
+ * }
968
+ * lsExample();
969
+ * ```
970
+ *
971
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
972
+ * the error passed to the callback will be an `AbortError`:
973
+ *
974
+ * ```js
975
+ * const { exec } = require('node:child_process');
976
+ * const controller = new AbortController();
977
+ * const { signal } = controller;
978
+ * const child = exec('grep ssh', { signal }, (error) => {
979
+ * console.error(error); // an AbortError
980
+ * });
981
+ * controller.abort();
982
+ * ```
983
+ * @since v0.1.90
984
+ * @param command The command to run, with space-separated arguments.
985
+ * @param callback called with the output when process terminates.
986
+ */
315
987
  function exec(
316
988
  command: string,
317
989
  callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
318
990
  ): ChildProcess;
319
-
320
991
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
321
992
  function exec(
322
993
  command: string,
323
- options: { encoding: "buffer" | null } & ExecOptions,
994
+ options: {
995
+ encoding: "buffer" | null;
996
+ } & ExecOptions,
324
997
  callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
325
998
  ): ChildProcess;
326
-
327
999
  // `options` with well known `encoding` means stdout/stderr are definitely `string`.
328
1000
  function exec(
329
1001
  command: string,
330
- options: { encoding: BufferEncoding } & ExecOptions,
1002
+ options: {
1003
+ encoding: BufferEncoding;
1004
+ } & ExecOptions,
331
1005
  callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
332
1006
  ): ChildProcess;
333
-
334
1007
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
335
1008
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
336
1009
  function exec(
337
1010
  command: string,
338
- options: { encoding: BufferEncoding } & ExecOptions,
1011
+ options: {
1012
+ encoding: BufferEncoding;
1013
+ } & ExecOptions,
339
1014
  callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
340
1015
  ): ChildProcess;
341
-
342
1016
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
343
1017
  function exec(
344
1018
  command: string,
345
1019
  options: ExecOptions,
346
1020
  callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
347
1021
  ): ChildProcess;
348
-
349
1022
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
350
1023
  function exec(
351
1024
  command: string,
352
- options: (BaseEncodingOptions & ExecOptions) | undefined | null,
1025
+ options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
353
1026
  callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
354
1027
  ): ChildProcess;
355
-
356
1028
  interface PromiseWithChild<T> extends Promise<T> {
357
1029
  child: ChildProcess;
358
1030
  }
359
-
360
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
361
1031
  namespace exec {
362
- function __promisify__(command: string): PromiseWithChild<{ stdout: string; stderr: string }>;
1032
+ function __promisify__(command: string): PromiseWithChild<{
1033
+ stdout: string;
1034
+ stderr: string;
1035
+ }>;
363
1036
  function __promisify__(
364
1037
  command: string,
365
- options: { encoding: "buffer" | null } & ExecOptions,
366
- ): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
1038
+ options: {
1039
+ encoding: "buffer" | null;
1040
+ } & ExecOptions,
1041
+ ): PromiseWithChild<{
1042
+ stdout: Buffer;
1043
+ stderr: Buffer;
1044
+ }>;
367
1045
  function __promisify__(
368
1046
  command: string,
369
- options: { encoding: BufferEncoding } & ExecOptions,
370
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1047
+ options: {
1048
+ encoding: BufferEncoding;
1049
+ } & ExecOptions,
1050
+ ): PromiseWithChild<{
1051
+ stdout: string;
1052
+ stderr: string;
1053
+ }>;
371
1054
  function __promisify__(
372
1055
  command: string,
373
1056
  options: ExecOptions,
374
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1057
+ ): PromiseWithChild<{
1058
+ stdout: string;
1059
+ stderr: string;
1060
+ }>;
375
1061
  function __promisify__(
376
1062
  command: string,
377
- options?: (BaseEncodingOptions & ExecOptions) | null,
378
- ): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
1063
+ options?: (ObjectEncodingOptions & ExecOptions) | null,
1064
+ ): PromiseWithChild<{
1065
+ stdout: string | Buffer;
1066
+ stderr: string | Buffer;
1067
+ }>;
379
1068
  }
380
-
381
- interface ExecFileOptions extends CommonOptions {
1069
+ interface ExecFileOptions extends CommonOptions, Abortable {
382
1070
  maxBuffer?: number | undefined;
383
1071
  killSignal?: NodeJS.Signals | number | undefined;
384
1072
  windowsVerbatimArguments?: boolean | undefined;
385
1073
  shell?: boolean | string | undefined;
1074
+ signal?: AbortSignal | undefined;
386
1075
  }
387
1076
  interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
388
1077
  encoding: BufferEncoding;
@@ -397,16 +1086,80 @@ declare module "child_process" {
397
1086
  & Omit<ExecException, "code">
398
1087
  & Omit<NodeJS.ErrnoException, "code">
399
1088
  & { code?: string | number | undefined | null };
400
-
1089
+ /**
1090
+ * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
1091
+ * executable `file` is spawned directly as a new process making it slightly more
1092
+ * efficient than {@link exec}.
1093
+ *
1094
+ * The same options as {@link exec} are supported. Since a shell is
1095
+ * not spawned, behaviors such as I/O redirection and file globbing are not
1096
+ * supported.
1097
+ *
1098
+ * ```js
1099
+ * const { execFile } = require('node:child_process');
1100
+ * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
1101
+ * if (error) {
1102
+ * throw error;
1103
+ * }
1104
+ * console.log(stdout);
1105
+ * });
1106
+ * ```
1107
+ *
1108
+ * The `stdout` and `stderr` arguments passed to the callback will contain the
1109
+ * stdout and stderr output of the child process. By default, Node.js will decode
1110
+ * the output as UTF-8 and pass strings to the callback. The `encoding` option
1111
+ * can be used to specify the character encoding used to decode the stdout and
1112
+ * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
1113
+ * encoding, `Buffer` objects will be passed to the callback instead.
1114
+ *
1115
+ * If this method is invoked as its `util.promisify()` ed version, it returns
1116
+ * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
1117
+ * case of an error (including any error resulting in an exit code other than 0), a
1118
+ * rejected promise is returned, with the same `error` object given in the
1119
+ * callback, but with two additional properties `stdout` and `stderr`.
1120
+ *
1121
+ * ```js
1122
+ * const util = require('node:util');
1123
+ * const execFile = util.promisify(require('node:child_process').execFile);
1124
+ * async function getVersion() {
1125
+ * const { stdout } = await execFile('node', ['--version']);
1126
+ * console.log(stdout);
1127
+ * }
1128
+ * getVersion();
1129
+ * ```
1130
+ *
1131
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1132
+ * **function. Any input containing shell metacharacters may be used to trigger**
1133
+ * **arbitrary command execution.**
1134
+ *
1135
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
1136
+ * the error passed to the callback will be an `AbortError`:
1137
+ *
1138
+ * ```js
1139
+ * const { execFile } = require('node:child_process');
1140
+ * const controller = new AbortController();
1141
+ * const { signal } = controller;
1142
+ * const child = execFile('node', ['--version'], { signal }, (error) => {
1143
+ * console.error(error); // an AbortError
1144
+ * });
1145
+ * controller.abort();
1146
+ * ```
1147
+ * @since v0.1.91
1148
+ * @param file The name or path of the executable file to run.
1149
+ * @param args List of string arguments.
1150
+ * @param callback Called with the output when process terminates.
1151
+ */
401
1152
  function execFile(file: string): ChildProcess;
402
- function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
403
- function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
404
1153
  function execFile(
405
1154
  file: string,
406
- args: ReadonlyArray<string> | undefined | null,
407
- options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
1155
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1156
+ ): ChildProcess;
1157
+ function execFile(file: string, args?: readonly string[] | null): ChildProcess;
1158
+ function execFile(
1159
+ file: string,
1160
+ args: readonly string[] | undefined | null,
1161
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
408
1162
  ): ChildProcess;
409
-
410
1163
  // no `options` definitely means stdout/stderr are `string`.
411
1164
  function execFile(
412
1165
  file: string,
@@ -414,10 +1167,9 @@ declare module "child_process" {
414
1167
  ): ChildProcess;
415
1168
  function execFile(
416
1169
  file: string,
417
- args: ReadonlyArray<string> | undefined | null,
1170
+ args: readonly string[] | undefined | null,
418
1171
  callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
419
1172
  ): ChildProcess;
420
-
421
1173
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
422
1174
  function execFile(
423
1175
  file: string,
@@ -426,11 +1178,10 @@ declare module "child_process" {
426
1178
  ): ChildProcess;
427
1179
  function execFile(
428
1180
  file: string,
429
- args: ReadonlyArray<string> | undefined | null,
1181
+ args: readonly string[] | undefined | null,
430
1182
  options: ExecFileOptionsWithBufferEncoding,
431
1183
  callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
432
1184
  ): ChildProcess;
433
-
434
1185
  // `options` with well known `encoding` means stdout/stderr are definitely `string`.
435
1186
  function execFile(
436
1187
  file: string,
@@ -439,11 +1190,10 @@ declare module "child_process" {
439
1190
  ): ChildProcess;
440
1191
  function execFile(
441
1192
  file: string,
442
- args: ReadonlyArray<string> | undefined | null,
1193
+ args: readonly string[] | undefined | null,
443
1194
  options: ExecFileOptionsWithStringEncoding,
444
1195
  callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
445
1196
  ): ChildProcess;
446
-
447
1197
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
448
1198
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
449
1199
  function execFile(
@@ -453,11 +1203,10 @@ declare module "child_process" {
453
1203
  ): ChildProcess;
454
1204
  function execFile(
455
1205
  file: string,
456
- args: ReadonlyArray<string> | undefined | null,
1206
+ args: readonly string[] | undefined | null,
457
1207
  options: ExecFileOptionsWithOtherEncoding,
458
1208
  callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
459
1209
  ): ChildProcess;
460
-
461
1210
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
462
1211
  function execFile(
463
1212
  file: string,
@@ -466,15 +1215,14 @@ declare module "child_process" {
466
1215
  ): ChildProcess;
467
1216
  function execFile(
468
1217
  file: string,
469
- args: ReadonlyArray<string> | undefined | null,
1218
+ args: readonly string[] | undefined | null,
470
1219
  options: ExecFileOptions,
471
1220
  callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
472
1221
  ): ChildProcess;
473
-
474
1222
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
475
1223
  function execFile(
476
1224
  file: string,
477
- options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
1225
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
478
1226
  callback:
479
1227
  | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
480
1228
  | undefined
@@ -482,69 +1230,102 @@ declare module "child_process" {
482
1230
  ): ChildProcess;
483
1231
  function execFile(
484
1232
  file: string,
485
- args: ReadonlyArray<string> | undefined | null,
486
- options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
1233
+ args: readonly string[] | undefined | null,
1234
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
487
1235
  callback:
488
1236
  | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
489
1237
  | undefined
490
1238
  | null,
491
1239
  ): ChildProcess;
492
-
493
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
494
1240
  namespace execFile {
495
- function __promisify__(file: string): PromiseWithChild<{ stdout: string; stderr: string }>;
1241
+ function __promisify__(file: string): PromiseWithChild<{
1242
+ stdout: string;
1243
+ stderr: string;
1244
+ }>;
496
1245
  function __promisify__(
497
1246
  file: string,
498
- args: ReadonlyArray<string> | undefined | null,
499
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1247
+ args: readonly string[] | undefined | null,
1248
+ ): PromiseWithChild<{
1249
+ stdout: string;
1250
+ stderr: string;
1251
+ }>;
500
1252
  function __promisify__(
501
1253
  file: string,
502
1254
  options: ExecFileOptionsWithBufferEncoding,
503
- ): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
1255
+ ): PromiseWithChild<{
1256
+ stdout: Buffer;
1257
+ stderr: Buffer;
1258
+ }>;
504
1259
  function __promisify__(
505
1260
  file: string,
506
- args: ReadonlyArray<string> | undefined | null,
1261
+ args: readonly string[] | undefined | null,
507
1262
  options: ExecFileOptionsWithBufferEncoding,
508
- ): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
1263
+ ): PromiseWithChild<{
1264
+ stdout: Buffer;
1265
+ stderr: Buffer;
1266
+ }>;
509
1267
  function __promisify__(
510
1268
  file: string,
511
1269
  options: ExecFileOptionsWithStringEncoding,
512
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1270
+ ): PromiseWithChild<{
1271
+ stdout: string;
1272
+ stderr: string;
1273
+ }>;
513
1274
  function __promisify__(
514
1275
  file: string,
515
- args: ReadonlyArray<string> | undefined | null,
1276
+ args: readonly string[] | undefined | null,
516
1277
  options: ExecFileOptionsWithStringEncoding,
517
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1278
+ ): PromiseWithChild<{
1279
+ stdout: string;
1280
+ stderr: string;
1281
+ }>;
518
1282
  function __promisify__(
519
1283
  file: string,
520
1284
  options: ExecFileOptionsWithOtherEncoding,
521
- ): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
1285
+ ): PromiseWithChild<{
1286
+ stdout: string | Buffer;
1287
+ stderr: string | Buffer;
1288
+ }>;
522
1289
  function __promisify__(
523
1290
  file: string,
524
- args: ReadonlyArray<string> | undefined | null,
1291
+ args: readonly string[] | undefined | null,
525
1292
  options: ExecFileOptionsWithOtherEncoding,
526
- ): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
1293
+ ): PromiseWithChild<{
1294
+ stdout: string | Buffer;
1295
+ stderr: string | Buffer;
1296
+ }>;
527
1297
  function __promisify__(
528
1298
  file: string,
529
1299
  options: ExecFileOptions,
530
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1300
+ ): PromiseWithChild<{
1301
+ stdout: string;
1302
+ stderr: string;
1303
+ }>;
531
1304
  function __promisify__(
532
1305
  file: string,
533
- args: ReadonlyArray<string> | undefined | null,
1306
+ args: readonly string[] | undefined | null,
534
1307
  options: ExecFileOptions,
535
- ): PromiseWithChild<{ stdout: string; stderr: string }>;
1308
+ ): PromiseWithChild<{
1309
+ stdout: string;
1310
+ stderr: string;
1311
+ }>;
536
1312
  function __promisify__(
537
1313
  file: string,
538
- options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
539
- ): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
1314
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1315
+ ): PromiseWithChild<{
1316
+ stdout: string | Buffer;
1317
+ stderr: string | Buffer;
1318
+ }>;
540
1319
  function __promisify__(
541
1320
  file: string,
542
- args: ReadonlyArray<string> | undefined | null,
543
- options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
544
- ): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
1321
+ args: readonly string[] | undefined | null,
1322
+ options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1323
+ ): PromiseWithChild<{
1324
+ stdout: string | Buffer;
1325
+ stderr: string | Buffer;
1326
+ }>;
545
1327
  }
546
-
547
- interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
1328
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
548
1329
  execPath?: string | undefined;
549
1330
  execArgv?: string[] | undefined;
550
1331
  silent?: boolean | undefined;
@@ -561,12 +1342,59 @@ declare module "child_process" {
561
1342
  detached?: boolean | undefined;
562
1343
  windowsVerbatimArguments?: boolean | undefined;
563
1344
  }
564
- function fork(modulePath: string, options?: ForkOptions): ChildProcess;
565
- function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
566
-
1345
+ /**
1346
+ * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
1347
+ * Like {@link spawn}, a `ChildProcess` object is returned. The
1348
+ * returned `ChildProcess` will have an additional communication channel
1349
+ * built-in that allows messages to be passed back and forth between the parent and
1350
+ * child. See `subprocess.send()` for details.
1351
+ *
1352
+ * Keep in mind that spawned Node.js child processes are
1353
+ * independent of the parent with exception of the IPC communication channel
1354
+ * that is established between the two. Each process has its own memory, with
1355
+ * their own V8 instances. Because of the additional resource allocations
1356
+ * required, spawning a large number of child Node.js processes is not
1357
+ * recommended.
1358
+ *
1359
+ * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative
1360
+ * execution path to be used.
1361
+ *
1362
+ * Node.js processes launched with a custom `execPath` will communicate with the
1363
+ * parent process using the file descriptor (fd) identified using the
1364
+ * environment variable `NODE_CHANNEL_FD` on the child process.
1365
+ *
1366
+ * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
1367
+ * current process.
1368
+ *
1369
+ * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set.
1370
+ *
1371
+ * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
1372
+ * the error passed to the callback will be an `AbortError`:
1373
+ *
1374
+ * ```js
1375
+ * if (process.argv[2] === 'child') {
1376
+ * setTimeout(() => {
1377
+ * console.log(`Hello from ${process.argv[2]}!`);
1378
+ * }, 1_000);
1379
+ * } else {
1380
+ * const { fork } = require('node:child_process');
1381
+ * const controller = new AbortController();
1382
+ * const { signal } = controller;
1383
+ * const child = fork(__filename, ['child'], { signal });
1384
+ * child.on('error', (err) => {
1385
+ * // This will be called with err being an AbortError if the controller aborts
1386
+ * });
1387
+ * controller.abort(); // Stops the child process
1388
+ * }
1389
+ * ```
1390
+ * @since v0.5.0
1391
+ * @param modulePath The module to run in the child.
1392
+ * @param args List of string arguments.
1393
+ */
1394
+ function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess;
1395
+ function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess;
567
1396
  interface SpawnSyncOptions extends CommonSpawnOptions {
568
1397
  input?: string | NodeJS.ArrayBufferView | undefined;
569
- killSignal?: NodeJS.Signals | number | undefined;
570
1398
  maxBuffer?: number | undefined;
571
1399
  encoding?: BufferEncoding | "buffer" | null | undefined;
572
1400
  }
@@ -585,30 +1413,45 @@ declare module "child_process" {
585
1413
  signal: NodeJS.Signals | null;
586
1414
  error?: Error | undefined;
587
1415
  }
1416
+ /**
1417
+ * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
1418
+ * until the child process has fully closed. When a timeout has been encountered
1419
+ * and `killSignal` is sent, the method won't return until the process has
1420
+ * completely exited. If the process intercepts and handles the `SIGTERM` signal
1421
+ * and doesn't exit, the parent process will wait until the child process has
1422
+ * exited.
1423
+ *
1424
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1425
+ * **function. Any input containing shell metacharacters may be used to trigger**
1426
+ * **arbitrary command execution.**
1427
+ * @since v0.11.12
1428
+ * @param command The command to run.
1429
+ * @param args List of string arguments.
1430
+ */
588
1431
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
589
- function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
590
- function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1432
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1433
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
591
1434
  function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1435
+ function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<Buffer>;
592
1436
  function spawnSync(
593
1437
  command: string,
594
- args?: ReadonlyArray<string>,
595
- options?: SpawnSyncOptionsWithStringEncoding,
1438
+ args: readonly string[],
1439
+ options: SpawnSyncOptionsWithStringEncoding,
596
1440
  ): SpawnSyncReturns<string>;
597
1441
  function spawnSync(
598
1442
  command: string,
599
- args?: ReadonlyArray<string>,
600
- options?: SpawnSyncOptionsWithBufferEncoding,
1443
+ args: readonly string[],
1444
+ options: SpawnSyncOptionsWithBufferEncoding,
601
1445
  ): SpawnSyncReturns<Buffer>;
602
1446
  function spawnSync(
603
1447
  command: string,
604
- args?: ReadonlyArray<string>,
1448
+ args?: readonly string[],
605
1449
  options?: SpawnSyncOptions,
606
1450
  ): SpawnSyncReturns<string | Buffer>;
607
-
608
- interface ExecSyncOptions extends CommonOptions {
609
- input?: string | Uint8Array | undefined;
1451
+ interface CommonExecOptions extends CommonOptions {
1452
+ input?: string | NodeJS.ArrayBufferView | undefined;
610
1453
  /**
611
- * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
1454
+ * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
612
1455
  * If passed as an array, the first element is used for `stdin`, the second for
613
1456
  * `stdout`, and the third for `stderr`. A fourth element can be used to
614
1457
  * specify the `stdio` behavior beyond the standard streams. See
@@ -617,65 +1460,84 @@ declare module "child_process" {
617
1460
  * @default 'pipe'
618
1461
  */
619
1462
  stdio?: StdioOptions | undefined;
620
- shell?: string | undefined;
621
1463
  killSignal?: NodeJS.Signals | number | undefined;
622
1464
  maxBuffer?: number | undefined;
623
1465
  encoding?: BufferEncoding | "buffer" | null | undefined;
624
1466
  }
1467
+ interface ExecSyncOptions extends CommonExecOptions {
1468
+ shell?: string | undefined;
1469
+ }
625
1470
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
626
1471
  encoding: BufferEncoding;
627
1472
  }
628
1473
  interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
629
1474
  encoding?: "buffer" | null | undefined;
630
1475
  }
1476
+ /**
1477
+ * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
1478
+ * until the child process has fully closed. When a timeout has been encountered
1479
+ * and `killSignal` is sent, the method won't return until the process has
1480
+ * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process
1481
+ * has exited.
1482
+ *
1483
+ * If the process times out or has a non-zero exit code, this method will throw.
1484
+ * The `Error` object will contain the entire result from {@link spawnSync}.
1485
+ *
1486
+ * **Never pass unsanitized user input to this function. Any input containing shell**
1487
+ * **metacharacters may be used to trigger arbitrary command execution.**
1488
+ * @since v0.11.12
1489
+ * @param command The command to run.
1490
+ * @return The stdout from the command.
1491
+ */
631
1492
  function execSync(command: string): Buffer;
632
1493
  function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
633
1494
  function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
634
1495
  function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
635
-
636
- interface ExecFileSyncOptions extends CommonOptions {
637
- input?: string | NodeJS.ArrayBufferView | undefined;
638
- /**
639
- * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
640
- * If passed as an array, the first element is used for `stdin`, the second for
641
- * `stdout`, and the third for `stderr`. A fourth element can be used to
642
- * specify the `stdio` behavior beyond the standard streams. See
643
- * {@link ChildProcess.stdio} for more information.
644
- *
645
- * @default 'pipe'
646
- */
647
- stdio?: StdioOptions | undefined;
648
- killSignal?: NodeJS.Signals | number | undefined;
649
- maxBuffer?: number | undefined;
650
- encoding?: BufferEncoding | undefined;
1496
+ interface ExecFileSyncOptions extends CommonExecOptions {
651
1497
  shell?: boolean | string | undefined;
652
1498
  }
653
1499
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
654
1500
  encoding: BufferEncoding;
655
1501
  }
656
1502
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
657
- encoding: BufferEncoding; // specify `null`.
1503
+ encoding?: "buffer" | null; // specify `null`.
658
1504
  }
659
- function execFileSync(command: string): Buffer;
660
- function execFileSync(command: string, options: ExecFileSyncOptionsWithStringEncoding): string;
661
- function execFileSync(command: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
662
- function execFileSync(command: string, options?: ExecFileSyncOptions): string | Buffer;
663
- function execFileSync(command: string, args: ReadonlyArray<string>): Buffer;
1505
+ /**
1506
+ * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
1507
+ * return until the child process has fully closed. When a timeout has been
1508
+ * encountered and `killSignal` is sent, the method won't return until the process
1509
+ * has completely exited.
1510
+ *
1511
+ * If the child process intercepts and handles the `SIGTERM` signal and
1512
+ * does not exit, the parent process will still wait until the child process has
1513
+ * exited.
1514
+ *
1515
+ * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
1516
+ *
1517
+ * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1518
+ * **function. Any input containing shell metacharacters may be used to trigger**
1519
+ * **arbitrary command execution.**
1520
+ * @since v0.11.12
1521
+ * @param file The name or path of the executable file to run.
1522
+ * @param args List of string arguments.
1523
+ * @return The stdout from the command.
1524
+ */
1525
+ function execFileSync(file: string): Buffer;
1526
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1527
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1528
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
1529
+ function execFileSync(file: string, args: readonly string[]): Buffer;
664
1530
  function execFileSync(
665
- command: string,
666
- args: ReadonlyArray<string>,
1531
+ file: string,
1532
+ args: readonly string[],
667
1533
  options: ExecFileSyncOptionsWithStringEncoding,
668
1534
  ): string;
669
1535
  function execFileSync(
670
- command: string,
671
- args: ReadonlyArray<string>,
1536
+ file: string,
1537
+ args: readonly string[],
672
1538
  options: ExecFileSyncOptionsWithBufferEncoding,
673
1539
  ): Buffer;
674
- function execFileSync(
675
- command: string,
676
- args?: ReadonlyArray<string>,
677
- options?: ExecFileSyncOptions,
678
- ): string | Buffer;
1540
+ function execFileSync(file: string, args?: readonly string[], options?: ExecFileSyncOptions): string | Buffer;
679
1541
  }
680
1542
  declare module "node:child_process" {
681
1543
  export * from "child_process";