wtt-connect 0.2.18 → 0.2.20

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 (319) hide show
  1. package/package.json +2 -5
  2. package/src/adapters/codex.js +144 -2
  3. package/src/runner.js +258 -0
  4. package/src/store.js +6 -0
  5. package/src/terminal-session.js +12 -1
  6. package/node_modules/node-addon-api/LICENSE.md +0 -9
  7. package/node_modules/node-addon-api/README.md +0 -319
  8. package/node_modules/node-addon-api/common.gypi +0 -20
  9. package/node_modules/node-addon-api/except.gypi +0 -25
  10. package/node_modules/node-addon-api/index.js +0 -12
  11. package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  12. package/node_modules/node-addon-api/napi-inl.h +0 -6607
  13. package/node_modules/node-addon-api/napi.h +0 -3201
  14. package/node_modules/node-addon-api/node_addon_api.gyp +0 -32
  15. package/node_modules/node-addon-api/node_api.gyp +0 -9
  16. package/node_modules/node-addon-api/noexcept.gypi +0 -26
  17. package/node_modules/node-addon-api/nothing.c +0 -0
  18. package/node_modules/node-addon-api/package-support.json +0 -21
  19. package/node_modules/node-addon-api/package.json +0 -480
  20. package/node_modules/node-addon-api/tools/README.md +0 -73
  21. package/node_modules/node-addon-api/tools/check-napi.js +0 -99
  22. package/node_modules/node-addon-api/tools/clang-format.js +0 -71
  23. package/node_modules/node-addon-api/tools/conversion.js +0 -301
  24. package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
  25. package/node_modules/node-pty/LICENSE +0 -69
  26. package/node_modules/node-pty/README.md +0 -165
  27. package/node_modules/node-pty/binding.gyp +0 -111
  28. package/node_modules/node-pty/build/Makefile +0 -369
  29. package/node_modules/node-pty/build/Release/pty.node +0 -0
  30. package/node_modules/node-pty/build/binding.Makefile +0 -6
  31. package/node_modules/node-pty/build/config.gypi +0 -503
  32. package/node_modules/node-pty/build/pty.target.mk +0 -168
  33. package/node_modules/node-pty/deps/.editorconfig +0 -2
  34. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  35. package/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  36. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  37. package/node_modules/node-pty/deps/winpty/Makefile +0 -166
  38. package/node_modules/node-pty/deps/winpty/README.md +0 -151
  39. package/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  40. package/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  41. package/node_modules/node-pty/deps/winpty/configure +0 -167
  42. package/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  43. package/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  44. package/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  45. package/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  46. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  47. package/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  48. package/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  49. package/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  50. package/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  51. package/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  52. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  53. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  54. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  55. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  56. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  57. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  58. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  59. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  60. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  61. package/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  62. package/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  63. package/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  64. package/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  65. package/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  66. package/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  67. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  68. package/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  69. package/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  70. package/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  71. package/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  72. package/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  73. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  74. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  75. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  76. package/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  77. package/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  78. package/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  79. package/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  80. package/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  81. package/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  82. package/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  83. package/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  84. package/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  85. package/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  86. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  87. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  88. package/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  89. package/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  90. package/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  91. package/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  92. package/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  93. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  94. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  95. package/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  96. package/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  97. package/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  98. package/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  99. package/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  100. package/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  101. package/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  102. package/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  103. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  104. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  105. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  106. package/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  107. package/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  108. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  109. package/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  110. package/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  111. package/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  112. package/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
  113. package/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  114. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  115. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  116. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  117. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  118. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  119. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  120. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  121. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  122. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  123. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  124. package/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  125. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  126. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  127. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  128. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  129. package/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  130. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  131. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  132. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  133. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  134. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  135. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  136. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  137. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  138. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  139. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  140. package/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  141. package/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  142. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  143. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  144. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  145. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  146. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  147. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  148. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  149. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  150. package/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  151. package/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  152. package/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  153. package/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  154. package/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  155. package/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  156. package/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  157. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  158. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  159. package/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  160. package/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  161. package/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  162. package/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  163. package/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  164. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  165. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  166. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  167. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  168. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  169. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  170. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  171. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  172. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  173. package/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  174. package/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  175. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  176. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  177. package/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  178. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  179. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  180. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  181. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  182. package/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  183. package/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  184. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  185. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  186. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  187. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  188. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  189. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  190. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  191. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  192. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  193. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  194. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  195. package/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  196. package/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  197. package/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  198. package/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  199. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  200. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  201. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  202. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  203. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  204. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  205. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  206. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  207. package/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  208. package/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  209. package/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
  210. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  211. package/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
  212. package/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  213. package/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  214. package/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  215. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  216. package/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  217. package/node_modules/node-pty/lib/index.js +0 -52
  218. package/node_modules/node-pty/lib/index.js.map +0 -1
  219. package/node_modules/node-pty/lib/interfaces.js +0 -7
  220. package/node_modules/node-pty/lib/interfaces.js.map +0 -1
  221. package/node_modules/node-pty/lib/shared/conout.js +0 -11
  222. package/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  223. package/node_modules/node-pty/lib/terminal.js +0 -190
  224. package/node_modules/node-pty/lib/terminal.js.map +0 -1
  225. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  226. package/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  227. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  228. package/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  229. package/node_modules/node-pty/lib/types.js +0 -7
  230. package/node_modules/node-pty/lib/types.js.map +0 -1
  231. package/node_modules/node-pty/lib/unixTerminal.js +0 -346
  232. package/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  233. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  234. package/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  235. package/node_modules/node-pty/lib/utils.js +0 -39
  236. package/node_modules/node-pty/lib/utils.js.map +0 -1
  237. package/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
  238. package/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  239. package/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
  240. package/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  241. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  242. package/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  243. package/node_modules/node-pty/lib/windowsTerminal.js +0 -199
  244. package/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  245. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  246. package/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  247. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  248. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  249. package/node_modules/node-pty/node-addon-api/node_addon_api.Makefile +0 -6
  250. package/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +0 -106
  251. package/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +0 -110
  252. package/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +0 -106
  253. package/node_modules/node-pty/package.json +0 -64
  254. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  255. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  256. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  257. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  258. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  259. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  260. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  261. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
  262. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  263. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
  264. package/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  265. package/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
  266. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  267. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
  268. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  269. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
  270. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  271. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  272. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  273. package/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
  274. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  275. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
  276. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  277. package/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
  278. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  279. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
  280. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  281. package/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
  282. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  283. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  284. package/node_modules/node-pty/scripts/post-install.js +0 -80
  285. package/node_modules/node-pty/scripts/prebuild.js +0 -34
  286. package/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
  287. package/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  288. package/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  289. package/node_modules/node-pty/src/index.ts +0 -52
  290. package/node_modules/node-pty/src/interfaces.ts +0 -130
  291. package/node_modules/node-pty/src/native.d.ts +0 -54
  292. package/node_modules/node-pty/src/shared/conout.ts +0 -15
  293. package/node_modules/node-pty/src/terminal.test.ts +0 -119
  294. package/node_modules/node-pty/src/terminal.ts +0 -211
  295. package/node_modules/node-pty/src/testUtils.test.ts +0 -23
  296. package/node_modules/node-pty/src/tsconfig.json +0 -22
  297. package/node_modules/node-pty/src/types.ts +0 -15
  298. package/node_modules/node-pty/src/unix/pty.cc +0 -799
  299. package/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  300. package/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
  301. package/node_modules/node-pty/src/unixTerminal.ts +0 -388
  302. package/node_modules/node-pty/src/utils.ts +0 -29
  303. package/node_modules/node-pty/src/win/conpty.cc +0 -583
  304. package/node_modules/node-pty/src/win/conpty.h +0 -41
  305. package/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
  306. package/node_modules/node-pty/src/win/path_util.cc +0 -95
  307. package/node_modules/node-pty/src/win/path_util.h +0 -26
  308. package/node_modules/node-pty/src/win/winpty.cc +0 -333
  309. package/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
  310. package/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  311. package/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
  312. package/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
  313. package/node_modules/node-pty/src/windowsTerminal.ts +0 -203
  314. package/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  315. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  316. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
  317. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  318. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  319. package/node_modules/node-pty/typings/node-pty.d.ts +0 -211
@@ -1,321 +0,0 @@
1
- /**
2
- * Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
3
- * Copyright (c) 2016, Daniel Imms (MIT License).
4
- * Copyright (c) 2018, Microsoft Corporation (MIT License).
5
- */
6
-
7
- import * as fs from 'fs';
8
- import * as os from 'os';
9
- import * as path from 'path';
10
- import { fork } from 'child_process';
11
- import { Socket } from 'net';
12
- import { ArgvOrCommandLine } from './types';
13
- import { ConoutConnection } from './windowsConoutConnection';
14
- import { loadNativeModule } from './utils';
15
-
16
- let conptyNative: IConptyNative;
17
- let winptyNative: IWinptyNative;
18
-
19
- /**
20
- * The amount of time to wait for additional data after the conpty shell process has exited before
21
- * shutting down the socket. The timer will be reset if a new data event comes in after the timer
22
- * has started.
23
- */
24
- const FLUSH_DATA_INTERVAL = 1000;
25
-
26
- /**
27
- * This agent sits between the WindowsTerminal class and provides a common interface for both conpty
28
- * and winpty.
29
- */
30
- export class WindowsPtyAgent {
31
- private _inSocket: Socket;
32
- private _outSocket: Socket;
33
- private _pid: number = 0;
34
- private _innerPid: number = 0;
35
- private _closeTimeout: NodeJS.Timer | undefined;
36
- private _exitCode: number | undefined;
37
- private _conoutSocketWorker: ConoutConnection;
38
-
39
- private _fd: any;
40
- private _pty: number;
41
- private _ptyNative: IConptyNative | IWinptyNative;
42
-
43
- public get inSocket(): Socket { return this._inSocket; }
44
- public get outSocket(): Socket { return this._outSocket; }
45
- public get fd(): any { return this._fd; }
46
- public get innerPid(): number { return this._innerPid; }
47
- public get pty(): number { return this._pty; }
48
-
49
- constructor(
50
- file: string,
51
- args: ArgvOrCommandLine,
52
- env: string[],
53
- cwd: string,
54
- cols: number,
55
- rows: number,
56
- debug: boolean,
57
- private _useConpty: boolean | undefined,
58
- private _useConptyDll: boolean = false,
59
- conptyInheritCursor: boolean = false
60
- ) {
61
- if (this._useConpty === undefined || this._useConpty === true) {
62
- this._useConpty = this._getWindowsBuildNumber() >= 18309;
63
- }
64
- if (this._useConpty) {
65
- if (!conptyNative) {
66
- conptyNative = loadNativeModule('conpty').module;
67
- }
68
- } else {
69
- if (!winptyNative) {
70
- winptyNative = loadNativeModule('pty').module;
71
- }
72
- }
73
- this._ptyNative = this._useConpty ? conptyNative : winptyNative;
74
-
75
- // Sanitize input variable.
76
- cwd = path.resolve(cwd);
77
-
78
- // Compose command line
79
- const commandLine = argsToCommandLine(file, args);
80
-
81
- // Open pty session.
82
- let term: IConptyProcess | IWinptyProcess;
83
- if (this._useConpty) {
84
- term = (this._ptyNative as IConptyNative).startProcess(file, cols, rows, debug, this._generatePipeName(), conptyInheritCursor, this._useConptyDll);
85
- } else {
86
- term = (this._ptyNative as IWinptyNative).startProcess(file, commandLine, env, cwd, cols, rows, debug);
87
- this._pid = (term as IWinptyProcess).pid;
88
- this._innerPid = (term as IWinptyProcess).innerPid;
89
- }
90
-
91
- // Not available on windows.
92
- this._fd = term.fd;
93
-
94
- // Generated incremental number that has no real purpose besides using it
95
- // as a terminal id.
96
- this._pty = term.pty;
97
-
98
- // Create terminal pipe IPC channel and forward to a local unix socket.
99
- this._outSocket = new Socket();
100
- this._outSocket.setEncoding('utf8');
101
- // The conout socket must be ready out on another thread to avoid deadlocks
102
- this._conoutSocketWorker = new ConoutConnection(term.conout, this._useConptyDll);
103
- this._conoutSocketWorker.onReady(() => {
104
- this._conoutSocketWorker.connectSocket(this._outSocket);
105
- });
106
- this._outSocket.on('connect', () => {
107
- this._outSocket.emit('ready_datapipe');
108
- });
109
-
110
- const inSocketFD = fs.openSync(term.conin, 'w');
111
- this._inSocket = new Socket({
112
- fd: inSocketFD,
113
- readable: false,
114
- writable: true
115
- });
116
- this._inSocket.setEncoding('utf8');
117
-
118
- if (this._useConpty) {
119
- const connect = (this._ptyNative as IConptyNative).connect(this._pty, commandLine, cwd, env, this._useConptyDll, c => this._$onProcessExit(c));
120
- this._innerPid = connect.pid;
121
- }
122
- }
123
-
124
- public resize(cols: number, rows: number): void {
125
- if (this._useConpty) {
126
- if (this._exitCode !== undefined) {
127
- throw new Error('Cannot resize a pty that has already exited');
128
- }
129
- (this._ptyNative as IConptyNative).resize(this._pty, cols, rows, this._useConptyDll);
130
- return;
131
- }
132
- (this._ptyNative as IWinptyNative).resize(this._pid, cols, rows);
133
- }
134
-
135
- public clear(): void {
136
- if (this._useConpty) {
137
- (this._ptyNative as IConptyNative).clear(this._pty, this._useConptyDll);
138
- }
139
- }
140
-
141
- public kill(): void {
142
- // Tell the agent to kill the pty, this releases handles to the process
143
- if (this._useConpty) {
144
- if (!this._useConptyDll) {
145
- this._inSocket.readable = false;
146
- this._outSocket.readable = false;
147
- this._getConsoleProcessList().then(consoleProcessList => {
148
- consoleProcessList.forEach((pid: number) => {
149
- try {
150
- process.kill(pid);
151
- } catch (e) {
152
- // Ignore if process cannot be found (kill ESRCH error)
153
- }
154
- });
155
- });
156
- (this._ptyNative as IConptyNative).kill(this._pty, this._useConptyDll);
157
- this._conoutSocketWorker.dispose();
158
- } else {
159
- // Close the input write handle to signal the end of session.
160
- this._inSocket.destroy();
161
- (this._ptyNative as IConptyNative).kill(this._pty, this._useConptyDll);
162
- this._outSocket.on('data', () => {
163
- this._conoutSocketWorker.dispose();
164
- });
165
- }
166
- } else {
167
- // Because pty.kill closes the handle, it will kill most processes by itself.
168
- // Process IDs can be reused as soon as all handles to them are
169
- // dropped, so we want to immediately kill the entire console process list.
170
- // If we do not force kill all processes here, node servers in particular
171
- // seem to become detached and remain running (see
172
- // Microsoft/vscode#26807).
173
- const processList: number[] = (this._ptyNative as IWinptyNative).getProcessList(this._pid);
174
- (this._ptyNative as IWinptyNative).kill(this._pid, this._innerPid);
175
- processList.forEach(pid => {
176
- try {
177
- process.kill(pid);
178
- } catch (e) {
179
- // Ignore if process cannot be found (kill ESRCH error)
180
- }
181
- });
182
- }
183
- }
184
-
185
- private _getConsoleProcessList(): Promise<number[]> {
186
- return new Promise<number[]>(resolve => {
187
- const agent = fork(path.join(__dirname, 'conpty_console_list_agent'), [ this._innerPid.toString() ]);
188
- agent.on('message', message => {
189
- clearTimeout(timeout);
190
- resolve(message.consoleProcessList);
191
- });
192
- const timeout = setTimeout(() => {
193
- // Something went wrong, just send back the shell PID
194
- agent.kill();
195
- resolve([ this._innerPid ]);
196
- }, 5000);
197
- });
198
- }
199
-
200
- public get exitCode(): number | undefined {
201
- if (this._useConpty) {
202
- return this._exitCode;
203
- }
204
- const winptyExitCode = (this._ptyNative as IWinptyNative).getExitCode(this._innerPid);
205
- return winptyExitCode === -1 ? undefined : winptyExitCode;
206
- }
207
-
208
- private _getWindowsBuildNumber(): number {
209
- const osVersion = (/(\d+)\.(\d+)\.(\d+)/g).exec(os.release());
210
- let buildNumber: number = 0;
211
- if (osVersion && osVersion.length === 4) {
212
- buildNumber = parseInt(osVersion[3]);
213
- }
214
- return buildNumber;
215
- }
216
-
217
- private _generatePipeName(): string {
218
- return `conpty-${Math.random() * 10000000}`;
219
- }
220
-
221
- /**
222
- * Triggered from the native side when a contpy process exits.
223
- */
224
- private _$onProcessExit(exitCode: number): void {
225
- this._exitCode = exitCode;
226
- if (!this._useConptyDll) {
227
- this._flushDataAndCleanUp();
228
- this._outSocket.on('data', () => this._flushDataAndCleanUp());
229
- }
230
- }
231
-
232
- private _flushDataAndCleanUp(): void {
233
- if (this._useConptyDll) {
234
- return;
235
- }
236
- if (this._closeTimeout) {
237
- clearTimeout(this._closeTimeout);
238
- }
239
- this._closeTimeout = setTimeout(() => this._cleanUpProcess(), FLUSH_DATA_INTERVAL);
240
- }
241
-
242
- private _cleanUpProcess(): void {
243
- if (this._useConptyDll) {
244
- return;
245
- }
246
- this._inSocket.readable = false;
247
- this._outSocket.readable = false;
248
- this._outSocket.destroy();
249
- }
250
- }
251
-
252
- // Convert argc/argv into a Win32 command-line following the escaping convention
253
- // documented on MSDN (e.g. see CommandLineToArgvW documentation). Copied from
254
- // winpty project.
255
- export function argsToCommandLine(file: string, args: ArgvOrCommandLine): string {
256
- if (isCommandLine(args)) {
257
- if (args.length === 0) {
258
- return file;
259
- }
260
- return `${argsToCommandLine(file, [])} ${args}`;
261
- }
262
- const argv = [file];
263
- Array.prototype.push.apply(argv, args);
264
- let result = '';
265
- for (let argIndex = 0; argIndex < argv.length; argIndex++) {
266
- if (argIndex > 0) {
267
- result += ' ';
268
- }
269
- const arg = argv[argIndex];
270
- // if it is empty or it contains whitespace and is not already quoted
271
- const hasLopsidedEnclosingQuote = xOr((arg[0] !== '"'), (arg[arg.length - 1] !== '"'));
272
- const hasNoEnclosingQuotes = ((arg[0] !== '"') && (arg[arg.length - 1] !== '"'));
273
- const quote =
274
- arg === '' ||
275
- (arg.indexOf(' ') !== -1 ||
276
- arg.indexOf('\t') !== -1) &&
277
- ((arg.length > 1) &&
278
- (hasLopsidedEnclosingQuote || hasNoEnclosingQuotes));
279
- if (quote) {
280
- result += '\"';
281
- }
282
- let bsCount = 0;
283
- for (let i = 0; i < arg.length; i++) {
284
- const p = arg[i];
285
- if (p === '\\') {
286
- bsCount++;
287
- } else if (p === '"') {
288
- result += repeatText('\\', bsCount * 2 + 1);
289
- result += '"';
290
- bsCount = 0;
291
- } else {
292
- result += repeatText('\\', bsCount);
293
- bsCount = 0;
294
- result += p;
295
- }
296
- }
297
- if (quote) {
298
- result += repeatText('\\', bsCount * 2);
299
- result += '\"';
300
- } else {
301
- result += repeatText('\\', bsCount);
302
- }
303
- }
304
- return result;
305
- }
306
-
307
- function isCommandLine(args: ArgvOrCommandLine): args is string {
308
- return typeof args === 'string';
309
- }
310
-
311
- function repeatText(text: string, count: number): string {
312
- let result = '';
313
- for (let i = 0; i < count; i++) {
314
- result += text;
315
- }
316
- return result;
317
- }
318
-
319
- function xOr(arg1: boolean, arg2: boolean): boolean {
320
- return ((arg1 && !arg2) || (!arg1 && arg2));
321
- }
@@ -1,229 +0,0 @@
1
- /**
2
- * Copyright (c) 2017, Daniel Imms (MIT License).
3
- * Copyright (c) 2018, Microsoft Corporation (MIT License).
4
- */
5
-
6
- import * as fs from 'fs';
7
- import * as assert from 'assert';
8
- import { WindowsTerminal } from './windowsTerminal';
9
- import * as path from 'path';
10
- import * as psList from 'ps-list';
11
-
12
- interface IProcessState {
13
- // Whether the PID must exist or must not exist
14
- [pid: number]: boolean;
15
- }
16
-
17
- interface IWindowsProcessTreeResult {
18
- name: string;
19
- pid: number;
20
- }
21
-
22
- function pollForProcessState(desiredState: IProcessState, intervalMs: number = 100, timeoutMs: number = 2000): Promise<void> {
23
- return new Promise<void>(resolve => {
24
- let tries = 0;
25
- const interval = setInterval(() => {
26
- psList({ all: true }).then(ps => {
27
- let success = true;
28
- const pids = Object.keys(desiredState).map(k => parseInt(k, 10));
29
- console.log('expected pids', JSON.stringify(pids));
30
- pids.forEach(pid => {
31
- if (desiredState[pid]) {
32
- if (!ps.some(p => p.pid === pid)) {
33
- console.log(`pid ${pid} does not exist`);
34
- success = false;
35
- }
36
- } else {
37
- if (ps.some(p => p.pid === pid)) {
38
- console.log(`pid ${pid} still exists`);
39
- success = false;
40
- }
41
- }
42
- });
43
- if (success) {
44
- clearInterval(interval);
45
- resolve();
46
- return;
47
- }
48
- tries++;
49
- if (tries * intervalMs >= timeoutMs) {
50
- clearInterval(interval);
51
- const processListing = pids.map(k => `${k}: ${desiredState[k]}`).join('\n');
52
- assert.fail(`Bad process state, expected:\n${processListing}`);
53
- resolve();
54
- }
55
- });
56
- }, intervalMs);
57
- });
58
- }
59
-
60
- function pollForProcessTreeSize(pid: number, size: number, intervalMs: number = 100, timeoutMs: number = 2000): Promise<IWindowsProcessTreeResult[]> {
61
- return new Promise<IWindowsProcessTreeResult[]>(resolve => {
62
- let tries = 0;
63
- const interval = setInterval(() => {
64
- psList({ all: true }).then(ps => {
65
- const openList: IWindowsProcessTreeResult[] = [];
66
- openList.push(ps.filter(p => p.pid === pid).map(p => {
67
- return { name: p.name, pid: p.pid };
68
- })[0]);
69
- const list: IWindowsProcessTreeResult[] = [];
70
- while (openList.length) {
71
- const current = openList.shift()!;
72
- ps.filter(p => p.ppid === current.pid).map(p => {
73
- return { name: p.name, pid: p.pid };
74
- }).forEach(p => openList.push(p));
75
- list.push(current);
76
- }
77
- console.log('list', JSON.stringify(list));
78
- const success = list.length === size;
79
- if (success) {
80
- clearInterval(interval);
81
- resolve(list);
82
- return;
83
- }
84
- tries++;
85
- if (tries * intervalMs >= timeoutMs) {
86
- clearInterval(interval);
87
- assert.fail(`Bad process state, expected: ${size}, actual: ${list.length}`);
88
- }
89
- });
90
- }, intervalMs);
91
- });
92
- }
93
-
94
- if (process.platform === 'win32') {
95
- [[false, false], [true, false], [true, true]].forEach(([useConpty, useConptyDll]) => {
96
- describe(`WindowsTerminal (useConpty = ${useConpty}, useConptyDll = ${useConptyDll})`, () => {
97
- describe('kill', () => {
98
- it('should not crash parent process', function (done) {
99
- this.timeout(20000);
100
- const term = new WindowsTerminal('cmd.exe', [], { useConpty, useConptyDll });
101
- term.on('exit', () => done());
102
- term.kill();
103
- });
104
- it('should kill the process tree', function (done: Mocha.Done): void {
105
- this.timeout(20000);
106
- const term = new WindowsTerminal('cmd.exe', [], { useConpty, useConptyDll });
107
- // Start sub-processes
108
- term.write('powershell.exe\r');
109
- term.write('node.exe\r');
110
- console.log('start poll for tree size');
111
- pollForProcessTreeSize(term.pid, 3, 500, 5000).then(list => {
112
- assert.strictEqual(list[0].name.toLowerCase(), 'cmd.exe');
113
- assert.strictEqual(list[1].name.toLowerCase(), 'powershell.exe');
114
- assert.strictEqual(list[2].name.toLowerCase(), 'node.exe');
115
- term.kill();
116
- const desiredState: IProcessState = {};
117
- desiredState[list[0].pid] = false;
118
- desiredState[list[1].pid] = false;
119
- desiredState[list[2].pid] = false;
120
- term.on('exit', () => {
121
- pollForProcessState(desiredState, 1000, 5000).then(() => {
122
- done();
123
- });
124
- });
125
- });
126
- });
127
- });
128
-
129
- describe('resize', () => {
130
- it('should throw a non-native exception when resizing an invalid value', function(done) {
131
- this.timeout(20000);
132
- const term = new WindowsTerminal('cmd.exe', [], { useConpty, useConptyDll });
133
- assert.throws(() => term.resize(-1, -1));
134
- assert.throws(() => term.resize(0, 0));
135
- assert.doesNotThrow(() => term.resize(1, 1));
136
- term.on('exit', () => {
137
- done();
138
- });
139
- term.kill();
140
- });
141
- it('should throw a non-native exception when resizing a killed terminal', function(done) {
142
- this.timeout(20000);
143
- const term = new WindowsTerminal('cmd.exe', [], { useConpty, useConptyDll });
144
- (<any>term)._defer(() => {
145
- term.once('exit', () => {
146
- assert.throws(() => term.resize(1, 1));
147
- done();
148
- });
149
- term.destroy();
150
- });
151
- });
152
- });
153
-
154
- describe('Args as CommandLine', () => {
155
- it('should not fail running a file containing a space in the path', function (done) {
156
- this.timeout(10000);
157
- const spaceFolder = path.resolve(__dirname, '..', 'fixtures', 'space folder');
158
- if (!fs.existsSync(spaceFolder)) {
159
- fs.mkdirSync(spaceFolder);
160
- }
161
-
162
- const cmdCopiedPath = path.resolve(spaceFolder, 'cmd.exe');
163
- const data = fs.readFileSync(`${process.env.windir}\\System32\\cmd.exe`);
164
- fs.writeFileSync(cmdCopiedPath, data);
165
-
166
- if (!fs.existsSync(cmdCopiedPath)) {
167
- // Skip test if git bash isn't installed
168
- return;
169
- }
170
- const term = new WindowsTerminal(cmdCopiedPath, '/c echo "hello world"', { useConpty, useConptyDll });
171
- let result = '';
172
- term.on('data', (data) => {
173
- result += data;
174
- });
175
- term.on('exit', () => {
176
- assert.ok(result.indexOf('hello world') >= 1);
177
- done();
178
- });
179
- });
180
- });
181
-
182
- describe('env', () => {
183
- it('should set environment variables of the shell', function (done) {
184
- this.timeout(10000);
185
- const term = new WindowsTerminal('cmd.exe', '/C echo %FOO%', { useConpty, useConptyDll, env: { FOO: 'BAR' }});
186
- let result = '';
187
- term.on('data', (data) => {
188
- result += data;
189
- });
190
- term.on('exit', () => {
191
- assert.ok(result.indexOf('BAR') >= 0);
192
- done();
193
- });
194
- });
195
- });
196
-
197
- describe('On close', () => {
198
- it('should return process zero exit codes', function (done) {
199
- this.timeout(10000);
200
- const term = new WindowsTerminal('cmd.exe', '/C exit', { useConpty, useConptyDll });
201
- term.on('exit', (code) => {
202
- assert.strictEqual(code, 0);
203
- done();
204
- });
205
- });
206
-
207
- it('should return process non-zero exit codes', function (done) {
208
- this.timeout(10000);
209
- const term = new WindowsTerminal('cmd.exe', '/C exit 2', { useConpty, useConptyDll });
210
- term.on('exit', (code) => {
211
- assert.strictEqual(code, 2);
212
- done();
213
- });
214
- });
215
- });
216
-
217
- describe('Write', () => {
218
- it('should accept input', function (done) {
219
- this.timeout(10000);
220
- const term = new WindowsTerminal('cmd.exe', '', { useConpty, useConptyDll });
221
- term.write('exit\r');
222
- term.on('exit', () => {
223
- done();
224
- });
225
- });
226
- });
227
- });
228
- });
229
- }