wtt-connect 0.2.19 → 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 (316) hide show
  1. package/package.json +2 -5
  2. package/src/terminal-session.js +12 -1
  3. package/node_modules/node-addon-api/LICENSE.md +0 -9
  4. package/node_modules/node-addon-api/README.md +0 -319
  5. package/node_modules/node-addon-api/common.gypi +0 -20
  6. package/node_modules/node-addon-api/except.gypi +0 -25
  7. package/node_modules/node-addon-api/index.js +0 -12
  8. package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  9. package/node_modules/node-addon-api/napi-inl.h +0 -6607
  10. package/node_modules/node-addon-api/napi.h +0 -3201
  11. package/node_modules/node-addon-api/node_addon_api.gyp +0 -32
  12. package/node_modules/node-addon-api/node_api.gyp +0 -9
  13. package/node_modules/node-addon-api/noexcept.gypi +0 -26
  14. package/node_modules/node-addon-api/nothing.c +0 -0
  15. package/node_modules/node-addon-api/package-support.json +0 -21
  16. package/node_modules/node-addon-api/package.json +0 -480
  17. package/node_modules/node-addon-api/tools/README.md +0 -73
  18. package/node_modules/node-addon-api/tools/check-napi.js +0 -99
  19. package/node_modules/node-addon-api/tools/clang-format.js +0 -71
  20. package/node_modules/node-addon-api/tools/conversion.js +0 -301
  21. package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
  22. package/node_modules/node-pty/LICENSE +0 -69
  23. package/node_modules/node-pty/README.md +0 -165
  24. package/node_modules/node-pty/binding.gyp +0 -111
  25. package/node_modules/node-pty/build/Makefile +0 -369
  26. package/node_modules/node-pty/build/Release/pty.node +0 -0
  27. package/node_modules/node-pty/build/binding.Makefile +0 -6
  28. package/node_modules/node-pty/build/config.gypi +0 -503
  29. package/node_modules/node-pty/build/pty.target.mk +0 -168
  30. package/node_modules/node-pty/deps/.editorconfig +0 -2
  31. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  32. package/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  33. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  34. package/node_modules/node-pty/deps/winpty/Makefile +0 -166
  35. package/node_modules/node-pty/deps/winpty/README.md +0 -151
  36. package/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  37. package/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  38. package/node_modules/node-pty/deps/winpty/configure +0 -167
  39. package/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  40. package/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  41. package/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  42. package/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  43. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  44. package/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  45. package/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  46. package/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  47. package/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  48. package/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  49. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  50. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  51. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  52. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  53. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  54. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  55. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  56. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  57. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  58. package/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  59. package/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  60. package/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  61. package/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  62. package/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  63. package/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  64. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  65. package/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  66. package/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  67. package/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  68. package/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  69. package/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  70. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  71. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  72. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  73. package/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  74. package/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  75. package/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  76. package/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  77. package/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  78. package/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  79. package/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  80. package/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  81. package/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  82. package/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  83. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  84. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  85. package/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  86. package/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  87. package/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  88. package/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  89. package/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  90. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  91. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  92. package/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  93. package/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  94. package/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  95. package/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  96. package/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  97. package/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  98. package/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  99. package/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  100. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  101. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  102. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  103. package/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  104. package/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  105. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  106. package/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  107. package/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  108. package/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  109. package/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
  110. package/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  111. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  112. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  113. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  114. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  115. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  116. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  117. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  118. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  119. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  120. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  121. package/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  122. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  123. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  124. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  125. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  126. package/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  127. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  128. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  129. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  130. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  131. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  132. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  133. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  134. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  135. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  136. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  137. package/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  138. package/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  139. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  140. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  141. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  142. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  143. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  144. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  145. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  146. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  147. package/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  148. package/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  149. package/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  150. package/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  151. package/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  152. package/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  153. package/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  154. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  155. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  156. package/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  157. package/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  158. package/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  159. package/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  160. package/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  161. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  162. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  163. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  164. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  165. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  166. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  167. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  168. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  169. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  170. package/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  171. package/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  172. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  173. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  174. package/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  175. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  176. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  177. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  178. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  179. package/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  180. package/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  181. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  182. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  183. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  184. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  185. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  186. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  187. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  188. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  189. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  190. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  191. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  192. package/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  193. package/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  194. package/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  195. package/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  196. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  197. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  198. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  199. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  200. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  201. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  202. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  203. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  204. package/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  205. package/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  206. package/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
  207. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  208. package/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
  209. package/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  210. package/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  211. package/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  212. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  213. package/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  214. package/node_modules/node-pty/lib/index.js +0 -52
  215. package/node_modules/node-pty/lib/index.js.map +0 -1
  216. package/node_modules/node-pty/lib/interfaces.js +0 -7
  217. package/node_modules/node-pty/lib/interfaces.js.map +0 -1
  218. package/node_modules/node-pty/lib/shared/conout.js +0 -11
  219. package/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  220. package/node_modules/node-pty/lib/terminal.js +0 -190
  221. package/node_modules/node-pty/lib/terminal.js.map +0 -1
  222. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  223. package/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  224. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  225. package/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  226. package/node_modules/node-pty/lib/types.js +0 -7
  227. package/node_modules/node-pty/lib/types.js.map +0 -1
  228. package/node_modules/node-pty/lib/unixTerminal.js +0 -346
  229. package/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  230. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  231. package/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  232. package/node_modules/node-pty/lib/utils.js +0 -39
  233. package/node_modules/node-pty/lib/utils.js.map +0 -1
  234. package/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
  235. package/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  236. package/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
  237. package/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  238. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  239. package/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  240. package/node_modules/node-pty/lib/windowsTerminal.js +0 -199
  241. package/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  242. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  243. package/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  244. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  245. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  246. package/node_modules/node-pty/node-addon-api/node_addon_api.Makefile +0 -6
  247. package/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +0 -106
  248. package/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +0 -110
  249. package/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +0 -106
  250. package/node_modules/node-pty/package.json +0 -64
  251. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  252. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  253. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  254. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  255. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  256. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  257. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  258. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
  259. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  260. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
  261. package/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  262. package/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
  263. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  264. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
  265. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  266. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
  267. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  268. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  269. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  270. package/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
  271. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  272. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
  273. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  274. package/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
  275. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  276. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
  277. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  278. package/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
  279. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  280. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  281. package/node_modules/node-pty/scripts/post-install.js +0 -80
  282. package/node_modules/node-pty/scripts/prebuild.js +0 -34
  283. package/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
  284. package/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  285. package/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  286. package/node_modules/node-pty/src/index.ts +0 -52
  287. package/node_modules/node-pty/src/interfaces.ts +0 -130
  288. package/node_modules/node-pty/src/native.d.ts +0 -54
  289. package/node_modules/node-pty/src/shared/conout.ts +0 -15
  290. package/node_modules/node-pty/src/terminal.test.ts +0 -119
  291. package/node_modules/node-pty/src/terminal.ts +0 -211
  292. package/node_modules/node-pty/src/testUtils.test.ts +0 -23
  293. package/node_modules/node-pty/src/tsconfig.json +0 -22
  294. package/node_modules/node-pty/src/types.ts +0 -15
  295. package/node_modules/node-pty/src/unix/pty.cc +0 -799
  296. package/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  297. package/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
  298. package/node_modules/node-pty/src/unixTerminal.ts +0 -388
  299. package/node_modules/node-pty/src/utils.ts +0 -29
  300. package/node_modules/node-pty/src/win/conpty.cc +0 -583
  301. package/node_modules/node-pty/src/win/conpty.h +0 -41
  302. package/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
  303. package/node_modules/node-pty/src/win/path_util.cc +0 -95
  304. package/node_modules/node-pty/src/win/path_util.h +0 -26
  305. package/node_modules/node-pty/src/win/winpty.cc +0 -333
  306. package/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
  307. package/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  308. package/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
  309. package/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
  310. package/node_modules/node-pty/src/windowsTerminal.ts +0 -203
  311. package/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  312. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  313. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
  314. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  315. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  316. package/node_modules/node-pty/typings/node-pty.d.ts +0 -211
@@ -1,167 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Copyright (c) 2011-2015 Ryan Prichard
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to
7
- # deal in the Software without restriction, including without limitation the
8
- # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9
- # sell copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
- # IN THE SOFTWARE.
22
-
23
- #
24
- # findTool(desc, commandList)
25
- #
26
- # Searches commandLine for the first command in the PATH and returns it.
27
- # Prints an error and aborts the script if no match is found.
28
- #
29
- FINDTOOL_OUT=""
30
- function findTool {
31
- DESC=$1
32
- OPTIONS=$2
33
- for CMD in ${OPTIONS}; do
34
- if (which $CMD &>/dev/null) then
35
- echo "Found $DESC: $CMD"
36
- FINDTOOL_OUT="$CMD"
37
- return
38
- fi
39
- done
40
- echo "Error: could not find $DESC. One of these should be in your PATH:"
41
- for CMD in ${OPTIONS}; do
42
- echo " * $CMD"
43
- done
44
- exit 1
45
- }
46
-
47
- IS_CYGWIN=0
48
- IS_MSYS1=0
49
- IS_MSYS2=0
50
-
51
- # Link parts of the Cygwin binary statically to aid in redistribution? The
52
- # binary still links dynamically against the main DLL. The MinGW binaries are
53
- # also statically linked and therefore depend only on Windows DLLs. I started
54
- # linking the Cygwin/MSYS binary statically, because G++ 4.7 changed the
55
- # Windows C++ ABI.
56
- UNIX_LDFLAGS_STATIC='-static -static-libgcc -static-libstdc++'
57
-
58
- # Detect the environment -- Cygwin or MSYS.
59
- case $(uname -s) in
60
- CYGWIN*)
61
- echo 'uname -s identifies a Cygwin environment.'
62
- IS_CYGWIN=1
63
- case $(uname -m) in
64
- i686)
65
- echo 'uname -m identifies an i686 environment.'
66
- UNIX_CXX=i686-pc-cygwin-g++
67
- MINGW_CXX=i686-w64-mingw32-g++
68
- ;;
69
- x86_64)
70
- echo 'uname -m identifies an x86_64 environment.'
71
- UNIX_CXX=x86_64-pc-cygwin-g++
72
- MINGW_CXX=x86_64-w64-mingw32-g++
73
- ;;
74
- *)
75
- echo 'Error: uname -m did not match either i686 or x86_64.'
76
- exit 1
77
- ;;
78
- esac
79
- ;;
80
- MSYS*|MINGW*)
81
- # MSYS2 notes:
82
- # - MSYS2 offers two shortcuts to open an environment:
83
- # - MinGW-w64 Win32 Shell. This env reports a `uname -s` of
84
- # MINGW32_NT-6.1 on 32-bit Win7. The MinGW-w64 compiler
85
- # (i686-w64-mingw32-g++.exe) is in the PATH.
86
- # - MSYS2 Shell. `uname -s` instead reports MSYS_NT-6.1.
87
- # The i686-w64-mingw32-g++ compiler is not in the PATH.
88
- # - MSYS2 appears to use MinGW-w64, not the older mingw.org.
89
- # MSYS notes:
90
- # - `uname -s` is always MINGW32_NT-6.1 on Win7.
91
- echo 'uname -s identifies an MSYS/MSYS2 environment.'
92
- case $(uname -m) in
93
- i686)
94
- echo 'uname -m identifies an i686 environment.'
95
- UNIX_CXX=i686-pc-msys-g++
96
- if echo "$(uname -r)" | grep '^1[.]' > /dev/null; then
97
- # The MSYS-targeting compiler for the original 32-bit-only
98
- # MSYS does not recognize the -static-libstdc++ flag, and
99
- # it does not work with -static, because it tries to link
100
- # statically with the core MSYS library and fails.
101
- #
102
- # Distinguish between the two using the major version
103
- # number of `uname -r`:
104
- #
105
- # MSYS uname -r: 1.0.18(0.48/3/2)
106
- # MSYS2 uname -r: 2.0.0(0.284/5/3)
107
- #
108
- # This is suboptimal because MSYS2 is not actually the
109
- # second version of MSYS--it's a brand-new fork of Cygwin.
110
- #
111
- IS_MSYS1=1
112
- UNIX_LDFLAGS_STATIC=
113
- MINGW_CXX=mingw32-g++
114
- else
115
- IS_MSYS2=1
116
- MINGW_CXX=i686-w64-mingw32-g++.exe
117
- fi
118
- ;;
119
- x86_64)
120
- echo 'uname -m identifies an x86_64 environment.'
121
- IS_MSYS2=1
122
- UNIX_CXX=x86_64-pc-msys-g++
123
- MINGW_CXX=x86_64-w64-mingw32-g++
124
- ;;
125
- *)
126
- echo 'Error: uname -m did not match either i686 or x86_64.'
127
- exit 1
128
- ;;
129
- esac
130
- ;;
131
- *)
132
- echo 'Error: uname -s did not match either CYGWIN* or MINGW*.'
133
- exit 1
134
- ;;
135
- esac
136
-
137
- # Search the PATH and pick the first match.
138
- findTool "Cygwin/MSYS G++ compiler" "$UNIX_CXX"
139
- UNIX_CXX=$FINDTOOL_OUT
140
- findTool "MinGW G++ compiler" "$MINGW_CXX"
141
- MINGW_CXX=$FINDTOOL_OUT
142
-
143
- # Write config files.
144
- echo Writing config.mk
145
- echo UNIX_CXX=$UNIX_CXX > config.mk
146
- echo UNIX_LDFLAGS_STATIC=$UNIX_LDFLAGS_STATIC >> config.mk
147
- echo MINGW_CXX=$MINGW_CXX >> config.mk
148
-
149
- if test $IS_MSYS1 = 1; then
150
- echo UNIX_CXXFLAGS += -DWINPTY_TARGET_MSYS1 >> config.mk
151
- # The MSYS1 MinGW compiler has a bug that prevents inclusion of algorithm
152
- # and math.h in normal C++11 mode. The workaround is to enable the gnu++11
153
- # mode instead. The bug was fixed on 2015-07-31, but as of 2016-02-26, the
154
- # fix apparently hasn't been released. See
155
- # http://ehc.ac/p/mingw/bugs/2250/.
156
- echo MINGW_ENABLE_CXX11_FLAG := -std=gnu++11 >> config.mk
157
- fi
158
-
159
- if test -d .git -a -f .git/HEAD -a -f .git/index && git rev-parse HEAD >&/dev/null; then
160
- echo "Commit info: git"
161
- echo 'COMMIT_HASH = $(shell git rev-parse HEAD)' >> config.mk
162
- echo 'COMMIT_HASH_DEP := config.mk .git/HEAD .git/index' >> config.mk
163
- else
164
- echo "Commit info: none"
165
- echo 'COMMIT_HASH := none' >> config.mk
166
- echo 'COMMIT_HASH_DEP := config.mk' >> config.mk
167
- fi
@@ -1,90 +0,0 @@
1
- #include <windows.h>
2
- #include <cassert>
3
-
4
- #include "TestUtil.cc"
5
-
6
- void dumpInfoToTrace() {
7
- CONSOLE_SCREEN_BUFFER_INFO info;
8
- assert(GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info));
9
- trace("win=(%d,%d,%d,%d)",
10
- (int)info.srWindow.Left,
11
- (int)info.srWindow.Top,
12
- (int)info.srWindow.Right,
13
- (int)info.srWindow.Bottom);
14
- trace("buf=(%d,%d)",
15
- (int)info.dwSize.X,
16
- (int)info.dwSize.Y);
17
- trace("cur=(%d,%d)",
18
- (int)info.dwCursorPosition.X,
19
- (int)info.dwCursorPosition.Y);
20
- }
21
-
22
- int main(int argc, char *argv[]) {
23
- if (argc == 1) {
24
- startChildProcess(L"CHILD");
25
- return 0;
26
- }
27
-
28
- setWindowPos(0, 0, 1, 1);
29
-
30
- if (false) {
31
- // Reducing the buffer height can move the window up.
32
- setBufferSize(80, 25);
33
- setWindowPos(0, 20, 80, 5);
34
- Sleep(2000);
35
- setBufferSize(80, 10);
36
- }
37
-
38
- if (false) {
39
- // Reducing the buffer height moves the window up and the buffer
40
- // contents up too.
41
- setBufferSize(80, 25);
42
- setWindowPos(0, 20, 80, 5);
43
- setCursorPos(0, 20);
44
- printf("TEST1\nTEST2\nTEST3\nTEST4\n");
45
- fflush(stdout);
46
- Sleep(2000);
47
- setBufferSize(80, 10);
48
- }
49
-
50
- if (false) {
51
- // Reducing the buffer width can move the window left.
52
- setBufferSize(80, 25);
53
- setWindowPos(40, 0, 40, 25);
54
- Sleep(2000);
55
- setBufferSize(60, 25);
56
- }
57
-
58
- if (false) {
59
- // Sometimes the buffer contents are shifted up; sometimes they're
60
- // shifted down. It seems to depend on the cursor position?
61
-
62
- // setBufferSize(80, 25);
63
- // setWindowPos(0, 20, 80, 5);
64
- // setCursorPos(0, 20);
65
- // printf("TESTa\nTESTb\nTESTc\nTESTd\nTESTe");
66
- // fflush(stdout);
67
- // setCursorPos(0, 0);
68
- // printf("TEST1\nTEST2\nTEST3\nTEST4\nTEST5");
69
- // fflush(stdout);
70
- // setCursorPos(0, 24);
71
- // Sleep(5000);
72
- // setBufferSize(80, 24);
73
-
74
- setBufferSize(80, 20);
75
- setWindowPos(0, 10, 80, 10);
76
- setCursorPos(0, 18);
77
-
78
- printf("TEST1\nTEST2");
79
- fflush(stdout);
80
- setCursorPos(0, 18);
81
-
82
- Sleep(2000);
83
- setBufferSize(80, 18);
84
- }
85
-
86
- dumpInfoToTrace();
87
- Sleep(30000);
88
-
89
- return 0;
90
- }
@@ -1,53 +0,0 @@
1
- // A test program for CreateConsoleScreenBuffer / SetConsoleActiveScreenBuffer
2
- //
3
-
4
- #include <windows.h>
5
- #include <stdio.h>
6
- #include <conio.h>
7
- #include <io.h>
8
- #include <cassert>
9
-
10
- #include "TestUtil.cc"
11
-
12
- int main()
13
- {
14
- HANDLE origBuffer = GetStdHandle(STD_OUTPUT_HANDLE);
15
- HANDLE childBuffer = CreateConsoleScreenBuffer(
16
- GENERIC_READ | GENERIC_WRITE,
17
- FILE_SHARE_READ | FILE_SHARE_WRITE,
18
- NULL, CONSOLE_TEXTMODE_BUFFER, NULL);
19
-
20
- SetConsoleActiveScreenBuffer(childBuffer);
21
-
22
- while (true) {
23
- char buf[1024];
24
- CONSOLE_SCREEN_BUFFER_INFO info;
25
-
26
- assert(GetConsoleScreenBufferInfo(origBuffer, &info));
27
- trace("child.size=(%d,%d)", (int)info.dwSize.X, (int)info.dwSize.Y);
28
- trace("child.cursor=(%d,%d)", (int)info.dwCursorPosition.X, (int)info.dwCursorPosition.Y);
29
- trace("child.window=(%d,%d,%d,%d)",
30
- (int)info.srWindow.Left, (int)info.srWindow.Top,
31
- (int)info.srWindow.Right, (int)info.srWindow.Bottom);
32
- trace("child.maxSize=(%d,%d)", (int)info.dwMaximumWindowSize.X, (int)info.dwMaximumWindowSize.Y);
33
-
34
- int ch = getch();
35
- sprintf(buf, "%02x\n", ch);
36
- DWORD actual = 0;
37
- WriteFile(childBuffer, buf, strlen(buf), &actual, NULL);
38
- if (ch == 0x1b/*ESC*/ || ch == 0x03/*CTRL-C*/)
39
- break;
40
-
41
- if (ch == 'b') {
42
- setBufferSize(origBuffer, 40, 25);
43
- } else if (ch == 'w') {
44
- setWindowPos(origBuffer, 1, 1, 38, 23);
45
- } else if (ch == 'c') {
46
- setCursorPos(origBuffer, 10, 10);
47
- }
48
- }
49
-
50
- SetConsoleActiveScreenBuffer(origBuffer);
51
-
52
- return 0;
53
- }
@@ -1,72 +0,0 @@
1
- /*
2
- * Demonstrates that console clearing sets each cell's character to SP, not
3
- * NUL, and it sets the attribute of each cell to the current text attribute.
4
- *
5
- * This confirms the MSDN instruction in the "Clearing the Screen" article.
6
- * https://msdn.microsoft.com/en-us/library/windows/desktop/ms682022(v=vs.85).aspx
7
- * It advises using GetConsoleScreenBufferInfo to get the current text
8
- * attribute, then FillConsoleOutputCharacter and FillConsoleOutputAttribute to
9
- * write to the console buffer.
10
- */
11
-
12
- #include <windows.h>
13
-
14
- #include <cassert>
15
- #include <cstdio>
16
- #include <cstdlib>
17
-
18
- #include "TestUtil.cc"
19
-
20
- int main(int argc, char *argv[]) {
21
- if (argc == 1) {
22
- startChildProcess(L"CHILD");
23
- return 0;
24
- }
25
-
26
- const HANDLE conout = GetStdHandle(STD_OUTPUT_HANDLE);
27
-
28
- SetConsoleTextAttribute(conout, 0x24);
29
- system("cls");
30
-
31
- setWindowPos(0, 0, 1, 1);
32
- setBufferSize(80, 25);
33
- setWindowPos(0, 0, 80, 25);
34
-
35
- CHAR_INFO buf;
36
- COORD bufSize = { 1, 1 };
37
- COORD bufCoord = { 0, 0 };
38
- SMALL_RECT rect = { 5, 5, 5, 5 };
39
- BOOL ret;
40
- DWORD actual;
41
- COORD writeCoord = { 5, 5 };
42
-
43
- // After cls, each cell's character is a space, and its attributes are the
44
- // default text attributes.
45
- ret = ReadConsoleOutputW(conout, &buf, bufSize, bufCoord, &rect);
46
- assert(ret && buf.Char.UnicodeChar == L' ' && buf.Attributes == 0x24);
47
-
48
- // Nevertheless, it is possible to change a cell to NUL.
49
- ret = FillConsoleOutputCharacterW(conout, L'\0', 1, writeCoord, &actual);
50
- assert(ret && actual == 1);
51
- ret = ReadConsoleOutputW(conout, &buf, bufSize, bufCoord, &rect);
52
- assert(ret && buf.Char.UnicodeChar == L'\0' && buf.Attributes == 0x24);
53
-
54
- // As well as a 0 attribute. (As one would expect, the cell is
55
- // black-on-black.)
56
- ret = FillConsoleOutputAttribute(conout, 0, 1, writeCoord, &actual);
57
- assert(ret && actual == 1);
58
- ret = ReadConsoleOutputW(conout, &buf, bufSize, bufCoord, &rect);
59
- assert(ret && buf.Char.UnicodeChar == L'\0' && buf.Attributes == 0);
60
- ret = FillConsoleOutputCharacterW(conout, L'X', 1, writeCoord, &actual);
61
- assert(ret && actual == 1);
62
- ret = ReadConsoleOutputW(conout, &buf, bufSize, bufCoord, &rect);
63
- assert(ret && buf.Char.UnicodeChar == L'X' && buf.Attributes == 0);
64
-
65
- // The 'X' is invisible.
66
- countDown(3);
67
-
68
- ret = FillConsoleOutputAttribute(conout, 0x42, 1, writeCoord, &actual);
69
- assert(ret && actual == 1);
70
-
71
- countDown(5);
72
- }
@@ -1,117 +0,0 @@
1
- #include <windows.h>
2
-
3
- #include <errno.h>
4
- #include <stdio.h>
5
- #include <stdlib.h>
6
-
7
- #include <string>
8
- #include <vector>
9
-
10
- static HANDLE getConin() {
11
- HANDLE conin = GetStdHandle(STD_INPUT_HANDLE);
12
- if (conin == INVALID_HANDLE_VALUE) {
13
- fprintf(stderr, "error: cannot get stdin\n");
14
- exit(1);
15
- }
16
- return conin;
17
- }
18
-
19
- static DWORD getConsoleMode() {
20
- DWORD mode = 0;
21
- if (!GetConsoleMode(getConin(), &mode)) {
22
- fprintf(stderr, "error: GetConsoleMode failed (is stdin a console?)\n");
23
- exit(1);
24
- }
25
- return mode;
26
- }
27
-
28
- static void setConsoleMode(DWORD mode) {
29
- if (!SetConsoleMode(getConin(), mode)) {
30
- fprintf(stderr, "error: SetConsoleMode failed (is stdin a console?)\n");
31
- exit(1);
32
- }
33
- }
34
-
35
- static long parseInt(const std::string &s) {
36
- errno = 0;
37
- char *endptr = nullptr;
38
- long result = strtol(s.c_str(), &endptr, 0);
39
- if (errno != 0 || !endptr || *endptr != '\0') {
40
- fprintf(stderr, "error: could not parse integral argument '%s'\n", s.c_str());
41
- exit(1);
42
- }
43
- return result;
44
- }
45
-
46
- static void usage() {
47
- printf("Usage: ConinMode [verb] [options]\n");
48
- printf("Verbs:\n");
49
- printf(" [info] Dumps info about mode flags.\n");
50
- printf(" get Prints the mode DWORD.\n");
51
- printf(" set VALUE Sets the mode to VALUE, which can be decimal, hex, or octal.\n");
52
- printf(" set VALUE MASK\n");
53
- printf(" Same as `set VALUE`, but only alters the bits in MASK.\n");
54
- exit(1);
55
- }
56
-
57
- struct {
58
- const char *name;
59
- DWORD value;
60
- } kInputFlags[] = {
61
- "ENABLE_PROCESSED_INPUT", ENABLE_PROCESSED_INPUT, // 0x0001
62
- "ENABLE_LINE_INPUT", ENABLE_LINE_INPUT, // 0x0002
63
- "ENABLE_ECHO_INPUT", ENABLE_ECHO_INPUT, // 0x0004
64
- "ENABLE_WINDOW_INPUT", ENABLE_WINDOW_INPUT, // 0x0008
65
- "ENABLE_MOUSE_INPUT", ENABLE_MOUSE_INPUT, // 0x0010
66
- "ENABLE_INSERT_MODE", ENABLE_INSERT_MODE, // 0x0020
67
- "ENABLE_QUICK_EDIT_MODE", ENABLE_QUICK_EDIT_MODE, // 0x0040
68
- "ENABLE_EXTENDED_FLAGS", ENABLE_EXTENDED_FLAGS, // 0x0080
69
- "ENABLE_VIRTUAL_TERMINAL_INPUT", 0x0200/*ENABLE_VIRTUAL_TERMINAL_INPUT*/, // 0x0200
70
- };
71
-
72
- int main(int argc, char *argv[]) {
73
- std::vector<std::string> args;
74
- for (size_t i = 1; i < argc; ++i) {
75
- args.push_back(argv[i]);
76
- }
77
-
78
- if (args.empty() || args.size() == 1 && args[0] == "info") {
79
- DWORD mode = getConsoleMode();
80
- printf("mode: 0x%lx\n", mode);
81
- for (const auto &flag : kInputFlags) {
82
- printf("%-29s 0x%04lx %s\n", flag.name, flag.value, flag.value & mode ? "ON" : "off");
83
- mode &= ~flag.value;
84
- }
85
- for (int i = 0; i < 32; ++i) {
86
- if (mode & (1u << i)) {
87
- printf("Unrecognized flag: %04x\n", (1u << i));
88
- }
89
- }
90
- return 0;
91
- }
92
-
93
- const auto verb = args[0];
94
-
95
- if (verb == "set") {
96
- if (args.size() == 2) {
97
- const DWORD newMode = parseInt(args[1]);
98
- setConsoleMode(newMode);
99
- } else if (args.size() == 3) {
100
- const DWORD mode = parseInt(args[1]);
101
- const DWORD mask = parseInt(args[2]);
102
- const int newMode = (getConsoleMode() & ~mask) | (mode & mask);
103
- setConsoleMode(newMode);
104
- } else {
105
- usage();
106
- }
107
- } else if (verb == "get") {
108
- if (args.size() != 1) {
109
- usage();
110
- }
111
- printf("0x%lx\n", getConsoleMode());
112
- } else {
113
- usage();
114
- }
115
-
116
- return 0;
117
- }
@@ -1,116 +0,0 @@
1
- #
2
- # PowerShell script for controlling the console QuickEdit and InsertMode flags.
3
- #
4
- # Turn QuickEdit off to interact with mouse-driven console programs.
5
- #
6
- # Usage:
7
- #
8
- # powershell .\ConinMode.ps1 [Options]
9
- #
10
- # Options:
11
- # -QuickEdit [on/off]
12
- # -InsertMode [on/off]
13
- # -Mode [integer]
14
- #
15
-
16
- param (
17
- [ValidateSet("on", "off")][string] $QuickEdit,
18
- [ValidateSet("on", "off")][string] $InsertMode,
19
- [int] $Mode
20
- )
21
-
22
- $signature = @'
23
- [DllImport("kernel32.dll", SetLastError = true)]
24
- public static extern IntPtr GetStdHandle(int nStdHandle);
25
-
26
- [DllImport("kernel32.dll", SetLastError = true)]
27
- public static extern uint GetConsoleMode(
28
- IntPtr hConsoleHandle,
29
- out uint lpMode);
30
-
31
- [DllImport("kernel32.dll", SetLastError = true)]
32
- public static extern uint SetConsoleMode(
33
- IntPtr hConsoleHandle,
34
- uint dwMode);
35
-
36
- public const int STD_INPUT_HANDLE = -10;
37
- public const int ENABLE_INSERT_MODE = 0x0020;
38
- public const int ENABLE_QUICK_EDIT_MODE = 0x0040;
39
- public const int ENABLE_EXTENDED_FLAGS = 0x0080;
40
- '@
41
-
42
- $WinAPI = Add-Type -MemberDefinition $signature `
43
- -Name WinAPI -Namespace ConinModeScript `
44
- -PassThru
45
-
46
- function GetConIn {
47
- $ret = $WinAPI::GetStdHandle($WinAPI::STD_INPUT_HANDLE)
48
- if ($ret -eq -1) {
49
- throw "error: cannot get stdin"
50
- }
51
- return $ret
52
- }
53
-
54
- function GetConsoleMode {
55
- $conin = GetConIn
56
- $mode = 0
57
- $ret = $WinAPI::GetConsoleMode($conin, [ref]$mode)
58
- if ($ret -eq 0) {
59
- throw "GetConsoleMode failed (is stdin a console?)"
60
- }
61
- return $mode
62
- }
63
-
64
- function SetConsoleMode($mode) {
65
- $conin = GetConIn
66
- $ret = $WinAPI::SetConsoleMode($conin, $mode)
67
- if ($ret -eq 0) {
68
- throw "SetConsoleMode failed (is stdin a console?)"
69
- }
70
- }
71
-
72
- $oldMode = GetConsoleMode
73
- $newMode = $oldMode
74
- $doingSomething = $false
75
-
76
- if ($PSBoundParameters.ContainsKey("Mode")) {
77
- $newMode = $Mode
78
- $doingSomething = $true
79
- }
80
-
81
- if ($QuickEdit + $InsertMode -ne "") {
82
- if (!($newMode -band $WinAPI::ENABLE_EXTENDED_FLAGS)) {
83
- # We can't enable an extended flag without overwriting the existing
84
- # QuickEdit/InsertMode flags. AFAICT, there is no way to query their
85
- # existing values, so at least we can choose sensible defaults.
86
- $newMode = $newMode -bor $WinAPI::ENABLE_EXTENDED_FLAGS
87
- $newMode = $newMode -bor $WinAPI::ENABLE_QUICK_EDIT_MODE
88
- $newMode = $newMode -bor $WinAPI::ENABLE_INSERT_MODE
89
- $doingSomething = $true
90
- }
91
- }
92
-
93
- if ($QuickEdit -eq "on") {
94
- $newMode = $newMode -bor $WinAPI::ENABLE_QUICK_EDIT_MODE
95
- $doingSomething = $true
96
- } elseif ($QuickEdit -eq "off") {
97
- $newMode = $newMode -band (-bnot $WinAPI::ENABLE_QUICK_EDIT_MODE)
98
- $doingSomething = $true
99
- }
100
-
101
- if ($InsertMode -eq "on") {
102
- $newMode = $newMode -bor $WinAPI::ENABLE_INSERT_MODE
103
- $doingSomething = $true
104
- } elseif ($InsertMode -eq "off") {
105
- $newMode = $newMode -band (-bnot $WinAPI::ENABLE_INSERT_MODE)
106
- $doingSomething = $true
107
- }
108
-
109
- if ($doingSomething) {
110
- echo "old mode: $oldMode"
111
- SetConsoleMode $newMode
112
- $newMode = GetConsoleMode
113
- echo "new mode: $newMode"
114
- } else {
115
- echo "mode: $oldMode"
116
- }