vibeman 0.0.13 → 0.0.14
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.
- package/dist/api.js +483 -11
- package/dist/commit.txt +1 -1
- package/dist/index.js +1 -0
- package/dist/node_modules/node-pty/LICENSE +69 -0
- package/dist/node_modules/node-pty/README.md +165 -0
- package/dist/node_modules/node-pty/binding.gyp +111 -0
- package/dist/node_modules/node-pty/deps/.editorconfig +2 -0
- package/dist/node_modules/node-pty/deps/winpty/.drone.yml +17 -0
- package/dist/node_modules/node-pty/deps/winpty/.gitattributes +19 -0
- package/dist/node_modules/node-pty/deps/winpty/LICENSE +21 -0
- package/dist/node_modules/node-pty/deps/winpty/Makefile +166 -0
- package/dist/node_modules/node-pty/deps/winpty/README.md +151 -0
- package/dist/node_modules/node-pty/deps/winpty/RELEASES.md +280 -0
- package/dist/node_modules/node-pty/deps/winpty/VERSION.txt +1 -0
- package/dist/node_modules/node-pty/deps/winpty/configure +167 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +90 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +53 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +72 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +117 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +116 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +113 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/DebugClient.py +42 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/DebugServer.py +63 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/DumpLines.py +5 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +46 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +528 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +633 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +630 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +630 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +630 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +630 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +16 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +4 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +144 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +100 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/FormatChar.h +21 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +62 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/GetCh.cc +20 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +41 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/GetFont.cc +261 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +51 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +87 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +90 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +34 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Notes.txt +219 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +27 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +101 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +671 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +151 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +45 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +32 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +10 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/SetFont.cc +145 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +36 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +12 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +40 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Spew.py +5 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +172 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +102 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +246 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +130 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +89 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +46 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +122 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +56 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +52 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +57 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +30 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +26 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +19 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +46 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +70 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +78 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +44 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +27 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +106 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/build32.sh +9 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/build64.sh +9 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/color-test.sh +212 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/font-notes.txt +300 -0
- package/dist/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +201 -0
- package/dist/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +36 -0
- package/dist/node_modules/node-pty/deps/winpty/ship/common_ship.py +53 -0
- package/dist/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +165 -0
- package/dist/node_modules/node-pty/deps/winpty/ship/ship.py +108 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +613 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Agent.h +103 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +84 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +28 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +632 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +28 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +852 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +109 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +121 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +36 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +152 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +41 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Coord.h +87 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +239 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +32 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +422 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +28 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +30 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +99 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +47 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +246 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +114 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +71 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +68 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +378 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +125 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +699 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +103 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +75 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +143 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +535 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +69 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +157 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +189 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +107 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +67 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +193 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +99 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/main.cc +114 -0
- package/dist/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +61 -0
- package/dist/node_modules/node-pty/deps/winpty/src/configurations.gypi +60 -0
- package/dist/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +117 -0
- package/dist/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +41 -0
- package/dist/node_modules/node-pty/deps/winpty/src/include/winpty.h +242 -0
- package/dist/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +131 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +75 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +28 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +54 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +72 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +46 -0
- package/dist/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +970 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +38 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +122 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +73 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +103 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +102 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +187 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +38 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +138 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +55 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +13 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +54 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +63 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +36 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +45 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +43 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +227 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +114 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +55 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +80 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +63 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +45 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +20 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +460 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +104 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +252 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +29 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +55 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +64 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +57 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +43 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +42 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +27 -0
- package/dist/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +99 -0
- package/dist/node_modules/node-pty/deps/winpty/src/subdir.mk +5 -0
- package/dist/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +28 -0
- package/dist/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +158 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +114 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +56 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +80 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +53 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +86 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +31 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +70 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +42 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +729 -0
- package/dist/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +41 -0
- package/dist/node_modules/node-pty/deps/winpty/src/winpty.gyp +234 -0
- package/dist/node_modules/node-pty/deps/winpty/vcbuild.bat +83 -0
- package/dist/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/dist/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
- package/dist/node_modules/node-pty/lib/eventEmitter2.js +47 -0
- package/dist/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
- package/dist/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
- package/dist/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/index.js +52 -0
- package/dist/node_modules/node-pty/lib/index.js.map +1 -0
- package/dist/node_modules/node-pty/lib/interfaces.js +7 -0
- package/dist/node_modules/node-pty/lib/interfaces.js.map +1 -0
- package/dist/node_modules/node-pty/lib/shared/conout.js +11 -0
- package/dist/node_modules/node-pty/lib/shared/conout.js.map +1 -0
- package/dist/node_modules/node-pty/lib/terminal.js +190 -0
- package/dist/node_modules/node-pty/lib/terminal.js.map +1 -0
- package/dist/node_modules/node-pty/lib/terminal.test.js +139 -0
- package/dist/node_modules/node-pty/lib/terminal.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/testUtils.test.js +28 -0
- package/dist/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/types.js +7 -0
- package/dist/node_modules/node-pty/lib/types.js.map +1 -0
- package/dist/node_modules/node-pty/lib/unixTerminal.js +346 -0
- package/dist/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
- package/dist/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
- package/dist/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/utils.js +39 -0
- package/dist/node_modules/node-pty/lib/utils.js.map +1 -0
- package/dist/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
- package/dist/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
- package/dist/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
- package/dist/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
- package/dist/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
- package/dist/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/windowsTerminal.js +199 -0
- package/dist/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
- package/dist/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
- package/dist/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
- package/dist/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/dist/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
- package/dist/node_modules/node-pty/package.json +64 -0
- package/dist/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/dist/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/dist/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
- package/dist/node_modules/node-pty/scripts/gen-compile-commands.js +8 -0
- package/dist/node_modules/node-pty/scripts/increment-version.js +54 -0
- package/dist/node_modules/node-pty/scripts/post-install.js +80 -0
- package/dist/node_modules/node-pty/scripts/prebuild.js +34 -0
- package/dist/node_modules/node-pty/src/conpty_console_list_agent.ts +15 -0
- package/dist/node_modules/node-pty/src/eventEmitter2.test.ts +30 -0
- package/dist/node_modules/node-pty/src/eventEmitter2.ts +48 -0
- package/dist/node_modules/node-pty/src/index.ts +52 -0
- package/dist/node_modules/node-pty/src/interfaces.ts +130 -0
- package/dist/node_modules/node-pty/src/native.d.ts +54 -0
- package/dist/node_modules/node-pty/src/shared/conout.ts +15 -0
- package/dist/node_modules/node-pty/src/terminal.test.ts +119 -0
- package/dist/node_modules/node-pty/src/terminal.ts +211 -0
- package/dist/node_modules/node-pty/src/testUtils.test.ts +23 -0
- package/dist/node_modules/node-pty/src/tsconfig.json +22 -0
- package/dist/node_modules/node-pty/src/types.ts +15 -0
- package/dist/node_modules/node-pty/src/unix/pty.cc +799 -0
- package/dist/node_modules/node-pty/src/unix/spawn-helper.cc +23 -0
- package/dist/node_modules/node-pty/src/unixTerminal.test.ts +367 -0
- package/dist/node_modules/node-pty/src/unixTerminal.ts +388 -0
- package/dist/node_modules/node-pty/src/utils.ts +29 -0
- package/dist/node_modules/node-pty/src/win/conpty.cc +583 -0
- package/dist/node_modules/node-pty/src/win/conpty.h +41 -0
- package/dist/node_modules/node-pty/src/win/conpty_console_list.cc +44 -0
- package/dist/node_modules/node-pty/src/win/path_util.cc +95 -0
- package/dist/node_modules/node-pty/src/win/path_util.h +26 -0
- package/dist/node_modules/node-pty/src/win/winpty.cc +333 -0
- package/dist/node_modules/node-pty/src/windowsConoutConnection.ts +82 -0
- package/dist/node_modules/node-pty/src/windowsPtyAgent.test.ts +94 -0
- package/dist/node_modules/node-pty/src/windowsPtyAgent.ts +321 -0
- package/dist/node_modules/node-pty/src/windowsTerminal.test.ts +229 -0
- package/dist/node_modules/node-pty/src/windowsTerminal.ts +203 -0
- package/dist/node_modules/node-pty/src/worker/conoutSocketWorker.ts +22 -0
- package/dist/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/dist/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/dist/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/dist/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/dist/node_modules/node-pty/typings/node-pty.d.ts +211 -0
- package/dist/ui/assets/{index-C8FDQRxy.js → index-B65NvzF3.js} +192 -186
- package/dist/ui/assets/{index-BnaWildZ.js → index-B6f0IvI8.js} +1 -1
- package/dist/ui/assets/{index-C-AZWfRD.js → index-BCfnrf9x.js} +1 -1
- package/dist/ui/assets/{index-CuieGJbi.js → index-BHpxmbNr.js} +1 -1
- package/dist/ui/assets/{index-BrOS5hPg.js → index-BRbvQP4r.js} +1 -1
- package/dist/ui/assets/{index-Dhu8BZu7.js → index-BcFJG3pn.js} +1 -1
- package/dist/ui/assets/{index-AacKgcwz.js → index-Bepe4gRM.js} +1 -1
- package/dist/ui/assets/{index-B_lr0R8Z.js → index-BkA7So3L.js} +1 -1
- package/dist/ui/assets/{index-D_uhpUwJ.css → index-BlYNw2Nz.css} +1 -1
- package/dist/ui/assets/{index-BvHGNf4Y.js → index-BxqUzAmT.js} +1 -1
- package/dist/ui/assets/{index-BCRvuZjU.js → index-C86nRoc4.js} +1 -1
- package/dist/ui/assets/{index-D3gXfrX-.js → index-CUwqevMv.js} +1 -1
- package/dist/ui/assets/{index-Btdv65e_.js → index-ClTXL7da.js} +1 -1
- package/dist/ui/assets/{index-D1F9nIOz.js → index-CyH0t-7C.js} +1 -1
- package/dist/ui/assets/{index-DkFfIHJr.js → index-DQJMJ04n.js} +1 -1
- package/dist/ui/assets/{index-B-SoOQ3F.js → index-Dc4Up0Ir.js} +1 -1
- package/dist/ui/assets/{index-q7X3WW0-.js → index-DdwbXAJq.js} +1 -1
- package/dist/ui/assets/{index-CBQN5qXY.js → index-DfsBdEGr.js} +1 -1
- package/dist/ui/assets/{index-CWcSlUCR.js → index-GYxfKBT1.js} +1 -1
- package/dist/ui/assets/{index-DWT6BjYW.js → index-KwWhSMUi.js} +1 -1
- package/dist/ui/assets/{index-cS068OSU.js → index-R05wI85b.js} +1 -1
- package/dist/ui/assets/{index-o8f2ilDp.js → index-TlK-Z_4f.js} +1 -1
- package/dist/ui/assets/{index-BK62XAzY.js → index-iiYTe0B1.js} +1 -1
- package/dist/ui/assets/{index-CXV7fZxu.js → index-kh7xKB6N.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# node-pty
|
|
2
|
+
|
|
3
|
+
[](https://dev.azure.com/vscode/node-pty/_build/latest?definitionId=11&branchName=main)
|
|
4
|
+
|
|
5
|
+
`forkpty(3)` bindings for node.js. This allows you to fork processes with pseudoterminal file descriptors. It returns a terminal object which allows reads and writes.
|
|
6
|
+
|
|
7
|
+
This is useful for:
|
|
8
|
+
|
|
9
|
+
- Writing a terminal emulator (eg. via [xterm.js](https://github.com/sourcelair/xterm.js)).
|
|
10
|
+
- Getting certain programs to *think* you're a terminal, such as when you need a program to send you control sequences.
|
|
11
|
+
|
|
12
|
+
`node-pty` supports Linux, macOS and Windows. Windows support is possible by utilizing the [Windows conpty API](https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/) on Windows 1809+ and the [winpty](https://github.com/rprichard/winpty) library in older version.
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
The full API for node-pty is contained within the [TypeScript declaration file](https://github.com/microsoft/node-pty/blob/main/typings/node-pty.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.
|
|
17
|
+
|
|
18
|
+
## Example Usage
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import * as os from 'node:os';
|
|
22
|
+
import * as pty from 'node-pty';
|
|
23
|
+
|
|
24
|
+
const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
|
|
25
|
+
|
|
26
|
+
const ptyProcess = pty.spawn(shell, [], {
|
|
27
|
+
name: 'xterm-color',
|
|
28
|
+
cols: 80,
|
|
29
|
+
rows: 30,
|
|
30
|
+
cwd: process.env.HOME,
|
|
31
|
+
env: process.env
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
ptyProcess.onData((data) => {
|
|
35
|
+
process.stdout.write(data);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
ptyProcess.write('ls\r');
|
|
39
|
+
ptyProcess.resize(100, 40);
|
|
40
|
+
ptyProcess.write('ls\r');
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Real-world Uses
|
|
44
|
+
|
|
45
|
+
`node-pty` powers many different terminal emulators, including:
|
|
46
|
+
|
|
47
|
+
- [Microsoft Visual Studio Code](https://code.visualstudio.com)
|
|
48
|
+
- [Hyper](https://hyper.is/)
|
|
49
|
+
- [Upterm](https://github.com/railsware/upterm)
|
|
50
|
+
- [Script Runner](https://github.com/ioquatix/script-runner) for Atom.
|
|
51
|
+
- [Theia](https://github.com/theia-ide/theia)
|
|
52
|
+
- [FreeMAN](https://github.com/matthew-matvei/freeman) file manager
|
|
53
|
+
- [terminus](https://atom.io/packages/terminus) - An Atom plugin for providing terminals inside your Atom workspace.
|
|
54
|
+
- [x-terminal](https://atom.io/packages/x-terminal) - Also an Atom plugin that provides terminals inside your Atom workspace.
|
|
55
|
+
- [Termination](https://atom.io/packages/termination) - Also an Atom plugin that provides terminals inside your Atom workspace.
|
|
56
|
+
- [atom-xterm](https://atom.io/packages/atom-xterm) - Also an Atom plugin that provides terminals inside your Atom workspace.
|
|
57
|
+
- [electerm](https://github.com/electerm/electerm) Terminal/SSH/SFTP client(Linux, macOS, Windows).
|
|
58
|
+
- [Extraterm](http://extraterm.org/)
|
|
59
|
+
- [Wetty](https://github.com/krishnasrinivas/wetty) Browser based Terminal over HTTP and HTTPS
|
|
60
|
+
- [nomad](https://github.com/lukebarnard1/nomad-term)
|
|
61
|
+
- [DockerStacks](https://github.com/sfx101/docker-stacks) Local LAMP/LEMP stack using Docker
|
|
62
|
+
- [TeleType](https://github.com/akshaykmr/TeleType): cli tool that allows you to share your terminal online conveniently. Show off mad cli-fu, help a colleague, teach, or troubleshoot.
|
|
63
|
+
- [mesos-term](https://github.com/criteo/mesos-term): A web terminal for Apache Mesos. It allows to execute commands within containers.
|
|
64
|
+
- [Commas](https://github.com/CyanSalt/commas): A hackable terminal and command runner.
|
|
65
|
+
- [ENiGMA½ BBS Software](https://github.com/NuSkooler/enigma-bbs): A modern BBS software with a nostalgic flair!
|
|
66
|
+
- [Tinkerun](https://github.com/tinkerun/tinkerun): A new way of running Tinker.
|
|
67
|
+
- [Tess](https://tessapp.dev): Hackable, simple and rapid terminal for the new era of technology 👍
|
|
68
|
+
- [NxShell](https://nxshell.github.io/): An easy to use new terminal for Windows/Linux/MacOS platform.
|
|
69
|
+
- [OpenSumi](https://github.com/opensumi/core): A framework helps you quickly build Cloud or Desktop IDE products.
|
|
70
|
+
- [Enjoy Git](https://github.com/huangcs427/enjoy-git-release): A modern Git client featuring an intuitive user interface, built with Electron, Vue 3, and TypeScript.
|
|
71
|
+
|
|
72
|
+
Do you use node-pty in your application as well? Please open a [Pull Request](https://github.com/Tyriar/node-pty/pulls) to include it here. We would love to have it in our list.
|
|
73
|
+
|
|
74
|
+
## Building
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Install dependencies and build C++
|
|
78
|
+
npm install
|
|
79
|
+
# Compile TypeScript -> JavaScript
|
|
80
|
+
npm run build
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Dependencies
|
|
84
|
+
|
|
85
|
+
Node.JS 16 or Electron 19 is required to use `node-pty`. What version of node is supported is currently mostly bound to [whatever version Visual Studio Code is using](https://github.com/microsoft/node-pty/issues/557#issuecomment-1332193541).
|
|
86
|
+
|
|
87
|
+
### Linux (apt)
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
sudo apt install -y make python build-essential
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### macOS
|
|
94
|
+
|
|
95
|
+
Xcode is needed to compile the sources, this can be installed from the App Store.
|
|
96
|
+
|
|
97
|
+
### Windows
|
|
98
|
+
|
|
99
|
+
`npm install` requires some tools to be present in the system like Python and C++ compiler. Windows users can easily install them by running the following command in PowerShell as administrator. For more information see https://github.com/felixrieseberg/windows-build-tools:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
npm install --global --production windows-build-tools
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The following are also needed:
|
|
106
|
+
|
|
107
|
+
- [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) - only the "Desktop C++ Apps" components are needed to be installed
|
|
108
|
+
- Spectre-mitigated libraries - In order to avoid the build error "MSB8040: Spectre-mitigated libraries are required for this project", open the Visual Studio Installer, press the Modify button, navigate to the "Individual components" tab, search "Spectre", and install an option like "MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)" (the exact option to install will depend on your version of Visual Studio as well as your operating system architecture)
|
|
109
|
+
|
|
110
|
+
## Debugging
|
|
111
|
+
|
|
112
|
+
[The wiki](https://github.com/Microsoft/node-pty/wiki/Debugging) contains instructions for debugging node-pty.
|
|
113
|
+
|
|
114
|
+
## Security
|
|
115
|
+
|
|
116
|
+
All processes launched from node-pty will launch at the same permission level of the parent process. Take care particularly when using node-pty inside a server that's accessible on the internet. We recommend launching the pty inside a container to protect your host machine.
|
|
117
|
+
|
|
118
|
+
## Thread Safety
|
|
119
|
+
|
|
120
|
+
Note that node-pty is not thread safe so running it across multiple worker threads in node.js could cause issues.
|
|
121
|
+
|
|
122
|
+
## Flow Control
|
|
123
|
+
|
|
124
|
+
Automatic flow control can be enabled by either providing `handleFlowControl = true` in the constructor options or setting it later on:
|
|
125
|
+
|
|
126
|
+
```js
|
|
127
|
+
const PAUSE = '\x13'; // XOFF
|
|
128
|
+
const RESUME = '\x11'; // XON
|
|
129
|
+
|
|
130
|
+
const ptyProcess = pty.spawn(shell, [], {handleFlowControl: true});
|
|
131
|
+
|
|
132
|
+
// flow control in action
|
|
133
|
+
ptyProcess.write(PAUSE); // pty will block and pause the child program
|
|
134
|
+
...
|
|
135
|
+
ptyProcess.write(RESUME); // pty will enter flow mode and resume the child program
|
|
136
|
+
|
|
137
|
+
// temporarily disable/re-enable flow control
|
|
138
|
+
ptyProcess.handleFlowControl = false;
|
|
139
|
+
...
|
|
140
|
+
ptyProcess.handleFlowControl = true;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
By default `PAUSE` and `RESUME` are XON/XOFF control codes (as shown above). To avoid conflicts in environments that use these control codes for different purposes the messages can be customized as `flowControlPause: string` and `flowControlResume: string` in the constructor options. `PAUSE` and `RESUME` are not passed to the underlying pseudoterminal if flow control is enabled.
|
|
144
|
+
|
|
145
|
+
## Troubleshooting
|
|
146
|
+
|
|
147
|
+
### Powershell gives error 8009001d
|
|
148
|
+
|
|
149
|
+
> Internal Windows PowerShell error. Loading managed Windows PowerShell failed with error 8009001d.
|
|
150
|
+
|
|
151
|
+
This happens when PowerShell is launched with no `SystemRoot` environment variable present.
|
|
152
|
+
|
|
153
|
+
### ConnectNamedPipe failed: Windows error 232
|
|
154
|
+
|
|
155
|
+
This error can occur due to anti-virus software intercepting winpty from creating a pty. To workaround this you can exclude this file from your anti-virus scanning `node-pty\build\Release\winpty-agent.exe`
|
|
156
|
+
|
|
157
|
+
## pty.js
|
|
158
|
+
|
|
159
|
+
This project is forked from [chjj/pty.js](https://github.com/chjj/pty.js) with the primary goals being to provide better support for later Node.js versions and Windows.
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
Copyright (c) 2012-2015, Christopher Jeffrey (MIT License).<br>
|
|
164
|
+
Copyright (c) 2016, Daniel Imms (MIT License).<br>
|
|
165
|
+
Copyright (c) 2018, Microsoft Corporation (MIT License).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
'target_defaults': {
|
|
3
|
+
'dependencies': [
|
|
4
|
+
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
|
|
5
|
+
],
|
|
6
|
+
'conditions': [
|
|
7
|
+
['OS=="win"', {
|
|
8
|
+
'msvs_configuration_attributes': {
|
|
9
|
+
'SpectreMitigation': 'Spectre'
|
|
10
|
+
},
|
|
11
|
+
'msvs_settings': {
|
|
12
|
+
'VCCLCompilerTool': {
|
|
13
|
+
'AdditionalOptions': [
|
|
14
|
+
'/guard:cf',
|
|
15
|
+
'/sdl',
|
|
16
|
+
'/W3',
|
|
17
|
+
'/w34244',
|
|
18
|
+
'/w34267',
|
|
19
|
+
'/ZH:SHA_256'
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
'VCLinkerTool': {
|
|
23
|
+
'AdditionalOptions': [
|
|
24
|
+
'/DYNAMICBASE',
|
|
25
|
+
'/guard:cf'
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
}],
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
'conditions': [
|
|
33
|
+
['OS=="win"', {
|
|
34
|
+
'targets': [
|
|
35
|
+
{
|
|
36
|
+
'target_name': 'conpty',
|
|
37
|
+
'sources' : [
|
|
38
|
+
'src/win/conpty.cc',
|
|
39
|
+
'src/win/path_util.cc'
|
|
40
|
+
],
|
|
41
|
+
'libraries': [
|
|
42
|
+
'-lshlwapi'
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
'target_name': 'conpty_console_list',
|
|
47
|
+
'sources' : [
|
|
48
|
+
'src/win/conpty_console_list.cc'
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
'target_name': 'pty',
|
|
53
|
+
'include_dirs' : [
|
|
54
|
+
'<!(node -p "require(\'node-addon-api\').include_dir")',
|
|
55
|
+
'deps/winpty/src/include',
|
|
56
|
+
],
|
|
57
|
+
# Disabled due to winpty
|
|
58
|
+
'msvs_disabled_warnings': [ 4506, 4530 ],
|
|
59
|
+
'dependencies' : [
|
|
60
|
+
'deps/winpty/src/winpty.gyp:winpty-agent',
|
|
61
|
+
'deps/winpty/src/winpty.gyp:winpty',
|
|
62
|
+
],
|
|
63
|
+
'sources' : [
|
|
64
|
+
'src/win/winpty.cc',
|
|
65
|
+
'src/win/path_util.cc'
|
|
66
|
+
],
|
|
67
|
+
'libraries': [
|
|
68
|
+
'-lshlwapi'
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}, { # OS!="win"
|
|
73
|
+
'targets': [
|
|
74
|
+
{
|
|
75
|
+
'target_name': 'pty',
|
|
76
|
+
'sources': [
|
|
77
|
+
'src/unix/pty.cc',
|
|
78
|
+
],
|
|
79
|
+
'libraries': [
|
|
80
|
+
'-lutil'
|
|
81
|
+
],
|
|
82
|
+
'cflags': ['-Wall', '-O2', '-D_FORTIFY_SOURCE=2'],
|
|
83
|
+
'conditions': [
|
|
84
|
+
# http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html
|
|
85
|
+
# One some systems (at least including Cygwin, Interix,
|
|
86
|
+
# OSF/1 4 and 5, and Mac OS X) linking with -lutil is not required.
|
|
87
|
+
['OS=="mac" or OS=="solaris"', {
|
|
88
|
+
'libraries!': [
|
|
89
|
+
'-lutil'
|
|
90
|
+
]
|
|
91
|
+
}]
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}],
|
|
96
|
+
['OS=="mac"', {
|
|
97
|
+
'targets': [
|
|
98
|
+
{
|
|
99
|
+
'target_name': 'spawn-helper',
|
|
100
|
+
'type': 'executable',
|
|
101
|
+
'sources': [
|
|
102
|
+
'src/unix/spawn-helper.cc',
|
|
103
|
+
],
|
|
104
|
+
"xcode_settings": {
|
|
105
|
+
"MACOSX_DEPLOYMENT_TARGET":"10.7"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
]
|
|
109
|
+
}]
|
|
110
|
+
]
|
|
111
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Build configure for https://www.tea-ci.org (fork of Drone CI with Msys2 support)
|
|
2
|
+
build:
|
|
3
|
+
image: teaci/msys$$arch
|
|
4
|
+
pull: true
|
|
5
|
+
shell: msys$$arch
|
|
6
|
+
commands:
|
|
7
|
+
- pacman -S --needed --noconfirm --noprogressbar mingw-w64-cross-gcc mingw-w64-cross-crt-git
|
|
8
|
+
- ./configure
|
|
9
|
+
- make
|
|
10
|
+
- make tests
|
|
11
|
+
- build/trivial_test.exe
|
|
12
|
+
- mintty --log - --exec build/winpty.exe cmd /c ver | grep Windows
|
|
13
|
+
|
|
14
|
+
matrix:
|
|
15
|
+
arch:
|
|
16
|
+
- 64
|
|
17
|
+
- 32
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
* text=auto
|
|
2
|
+
*.bat text eol=crlf
|
|
3
|
+
*.c text
|
|
4
|
+
*.cc text
|
|
5
|
+
*.gyp text
|
|
6
|
+
*.gypi text
|
|
7
|
+
*.h text
|
|
8
|
+
*.ps1 text eol=crlf
|
|
9
|
+
*.rst text
|
|
10
|
+
*.sh text
|
|
11
|
+
*.txt text
|
|
12
|
+
.gitignore text
|
|
13
|
+
.gitattributes text
|
|
14
|
+
Makefile text
|
|
15
|
+
configure text
|
|
16
|
+
|
|
17
|
+
*.sh eol=lf
|
|
18
|
+
configure eol=lf
|
|
19
|
+
VERSION.txt eol=lf
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011-2016 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.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Copyright (c) 2011-2015 Ryan Prichard
|
|
2
|
+
#
|
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
# of this software and associated documentation files (the "Software"), to
|
|
5
|
+
# deal in the Software without restriction, including without limitation the
|
|
6
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
# sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
# furnished to do so, subject to the following conditions:
|
|
9
|
+
#
|
|
10
|
+
# The above copyright notice and this permission notice shall be included in
|
|
11
|
+
# all copies or substantial portions of the Software.
|
|
12
|
+
#
|
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
19
|
+
# IN THE SOFTWARE.
|
|
20
|
+
|
|
21
|
+
# Use make -n to see the actual command-lines make would run.
|
|
22
|
+
|
|
23
|
+
# The default "make install" prefix is /usr/local. Pass PREFIX=<path> on the
|
|
24
|
+
# command-line to override the default.
|
|
25
|
+
|
|
26
|
+
.SECONDEXPANSION :
|
|
27
|
+
|
|
28
|
+
.PHONY : default
|
|
29
|
+
default : all
|
|
30
|
+
|
|
31
|
+
PREFIX := /usr/local
|
|
32
|
+
UNIX_ADAPTER_EXE := winpty.exe
|
|
33
|
+
MINGW_ENABLE_CXX11_FLAG := -std=c++11
|
|
34
|
+
USE_PCH := 1
|
|
35
|
+
|
|
36
|
+
COMMON_CXXFLAGS :=
|
|
37
|
+
UNIX_CXXFLAGS :=
|
|
38
|
+
MINGW_CXXFLAGS :=
|
|
39
|
+
MINGW_LDFLAGS :=
|
|
40
|
+
UNIX_LDFLAGS :=
|
|
41
|
+
|
|
42
|
+
# Include config.mk but complain if it hasn't been created yet.
|
|
43
|
+
ifeq "$(wildcard config.mk)" ""
|
|
44
|
+
$(error config.mk does not exist. Please run ./configure)
|
|
45
|
+
endif
|
|
46
|
+
include config.mk
|
|
47
|
+
|
|
48
|
+
COMMON_CXXFLAGS += \
|
|
49
|
+
-MMD -Wall \
|
|
50
|
+
-DUNICODE \
|
|
51
|
+
-D_UNICODE \
|
|
52
|
+
-D_WIN32_WINNT=0x0501 \
|
|
53
|
+
-Ibuild/gen
|
|
54
|
+
|
|
55
|
+
UNIX_CXXFLAGS += \
|
|
56
|
+
$(COMMON_CXXFLAGS)
|
|
57
|
+
|
|
58
|
+
MINGW_CXXFLAGS += \
|
|
59
|
+
$(COMMON_CXXFLAGS) \
|
|
60
|
+
-O2 \
|
|
61
|
+
$(MINGW_ENABLE_CXX11_FLAG)
|
|
62
|
+
|
|
63
|
+
MINGW_LDFLAGS += -static -static-libgcc -static-libstdc++
|
|
64
|
+
UNIX_LDFLAGS += $(UNIX_LDFLAGS_STATIC)
|
|
65
|
+
|
|
66
|
+
ifeq "$(USE_PCH)" "1"
|
|
67
|
+
MINGW_CXXFLAGS += -include build/mingw/PrecompiledHeader.h
|
|
68
|
+
PCH_DEP := build/mingw/PrecompiledHeader.h.gch
|
|
69
|
+
else
|
|
70
|
+
PCH_DEP :=
|
|
71
|
+
endif
|
|
72
|
+
|
|
73
|
+
build/gen/GenVersion.h : VERSION.txt $(COMMIT_HASH_DEP) | $$(@D)/.mkdir
|
|
74
|
+
$(info Updating build/gen/GenVersion.h)
|
|
75
|
+
@echo "const char GenVersion_Version[] = \"$(shell cat VERSION.txt | tr -d '\r\n')\";" > build/gen/GenVersion.h
|
|
76
|
+
@echo "const char GenVersion_Commit[] = \"$(COMMIT_HASH)\";" >> build/gen/GenVersion.h
|
|
77
|
+
|
|
78
|
+
build/mingw/PrecompiledHeader.h : src/shared/PrecompiledHeader.h | $$(@D)/.mkdir
|
|
79
|
+
$(info Copying $< to $@)
|
|
80
|
+
@cp $< $@
|
|
81
|
+
|
|
82
|
+
build/mingw/PrecompiledHeader.h.gch : build/mingw/PrecompiledHeader.h | $$(@D)/.mkdir
|
|
83
|
+
$(info Compiling $<)
|
|
84
|
+
@$(MINGW_CXX) $(MINGW_CXXFLAGS) -c -o $@ $<
|
|
85
|
+
|
|
86
|
+
-include build/mingw/PrecompiledHeader.h.d
|
|
87
|
+
|
|
88
|
+
define def_unix_target
|
|
89
|
+
build/$1/%.o : src/%.cc | $$$$(@D)/.mkdir
|
|
90
|
+
$$(info Compiling $$<)
|
|
91
|
+
@$$(UNIX_CXX) $$(UNIX_CXXFLAGS) $2 -I src/include -c -o $$@ $$<
|
|
92
|
+
endef
|
|
93
|
+
|
|
94
|
+
define def_mingw_target
|
|
95
|
+
build/$1/%.o : src/%.cc $$(PCH_DEP) | $$$$(@D)/.mkdir
|
|
96
|
+
$$(info Compiling $$<)
|
|
97
|
+
@$$(MINGW_CXX) $$(MINGW_CXXFLAGS) $2 -I src/include -c -o $$@ $$<
|
|
98
|
+
endef
|
|
99
|
+
|
|
100
|
+
include src/subdir.mk
|
|
101
|
+
|
|
102
|
+
.PHONY : all
|
|
103
|
+
all : $(ALL_TARGETS)
|
|
104
|
+
|
|
105
|
+
.PHONY : tests
|
|
106
|
+
tests : $(TEST_PROGRAMS)
|
|
107
|
+
|
|
108
|
+
.PHONY : install-bin
|
|
109
|
+
install-bin : all
|
|
110
|
+
mkdir -p $(PREFIX)/bin
|
|
111
|
+
install -m 755 -p -s build/$(UNIX_ADAPTER_EXE) $(PREFIX)/bin
|
|
112
|
+
install -m 755 -p -s build/winpty.dll $(PREFIX)/bin
|
|
113
|
+
install -m 755 -p -s build/winpty-agent.exe $(PREFIX)/bin
|
|
114
|
+
|
|
115
|
+
.PHONY : install-debugserver
|
|
116
|
+
install-debugserver : all
|
|
117
|
+
mkdir -p $(PREFIX)/bin
|
|
118
|
+
install -m 755 -p -s build/winpty-debugserver.exe $(PREFIX)/bin
|
|
119
|
+
|
|
120
|
+
.PHONY : install-lib
|
|
121
|
+
install-lib : all
|
|
122
|
+
mkdir -p $(PREFIX)/lib
|
|
123
|
+
install -m 644 -p build/winpty.lib $(PREFIX)/lib
|
|
124
|
+
|
|
125
|
+
.PHONY : install-doc
|
|
126
|
+
install-doc :
|
|
127
|
+
mkdir -p $(PREFIX)/share/doc/winpty
|
|
128
|
+
install -m 644 -p LICENSE $(PREFIX)/share/doc/winpty
|
|
129
|
+
install -m 644 -p README.md $(PREFIX)/share/doc/winpty
|
|
130
|
+
install -m 644 -p RELEASES.md $(PREFIX)/share/doc/winpty
|
|
131
|
+
|
|
132
|
+
.PHONY : install-include
|
|
133
|
+
install-include :
|
|
134
|
+
mkdir -p $(PREFIX)/include/winpty
|
|
135
|
+
install -m 644 -p src/include/winpty.h $(PREFIX)/include/winpty
|
|
136
|
+
install -m 644 -p src/include/winpty_constants.h $(PREFIX)/include/winpty
|
|
137
|
+
|
|
138
|
+
.PHONY : install
|
|
139
|
+
install : \
|
|
140
|
+
install-bin \
|
|
141
|
+
install-debugserver \
|
|
142
|
+
install-lib \
|
|
143
|
+
install-doc \
|
|
144
|
+
install-include
|
|
145
|
+
|
|
146
|
+
.PHONY : clean
|
|
147
|
+
clean :
|
|
148
|
+
rm -fr build
|
|
149
|
+
|
|
150
|
+
.PHONY : clean-msvc
|
|
151
|
+
clean-msvc :
|
|
152
|
+
rm -fr src/Default src/Release src/.vs src/gen
|
|
153
|
+
rm -f src/*.vcxproj src/*.vcxproj.filters src/*.sln src/*.sdf
|
|
154
|
+
|
|
155
|
+
.PHONY : distclean
|
|
156
|
+
distclean : clean
|
|
157
|
+
rm -f config.mk
|
|
158
|
+
|
|
159
|
+
.PRECIOUS : %.mkdir
|
|
160
|
+
%.mkdir :
|
|
161
|
+
$(info Creating directory $(dir $@))
|
|
162
|
+
@mkdir -p $(dir $@)
|
|
163
|
+
@touch $@
|
|
164
|
+
|
|
165
|
+
src/%.h :
|
|
166
|
+
@echo "Missing header file $@ (stale dependency file?)"
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# winpty
|
|
2
|
+
|
|
3
|
+
[](https://tea-ci.org/rprichard/winpty)
|
|
4
|
+
|
|
5
|
+
winpty is a Windows software package providing an interface similar to a Unix
|
|
6
|
+
pty-master for communicating with Windows console programs. The package
|
|
7
|
+
consists of a library (libwinpty) and a tool for Cygwin and MSYS for running
|
|
8
|
+
Windows console programs in a Cygwin/MSYS pty.
|
|
9
|
+
|
|
10
|
+
The software works by starting the `winpty-agent.exe` process with a new,
|
|
11
|
+
hidden console window, which bridges between the console API and terminal
|
|
12
|
+
input/output escape codes. It polls the hidden console's screen buffer for
|
|
13
|
+
changes and generates a corresponding stream of output.
|
|
14
|
+
|
|
15
|
+
The Unix adapter allows running Windows console programs (e.g. CMD, PowerShell,
|
|
16
|
+
IronPython, etc.) under `mintty` or Cygwin's `sshd` with
|
|
17
|
+
properly-functioning input (e.g. arrow and function keys) and output (e.g. line
|
|
18
|
+
buffering). The library could be also useful for writing a non-Cygwin SSH
|
|
19
|
+
server.
|
|
20
|
+
|
|
21
|
+
## Supported Windows versions
|
|
22
|
+
|
|
23
|
+
winpty runs on Windows XP through Windows 10, including server versions. It
|
|
24
|
+
can be compiled into either 32-bit or 64-bit binaries.
|
|
25
|
+
|
|
26
|
+
## Cygwin/MSYS adapter (`winpty.exe`)
|
|
27
|
+
|
|
28
|
+
### Prerequisites
|
|
29
|
+
|
|
30
|
+
You need the following to build winpty:
|
|
31
|
+
|
|
32
|
+
* A Cygwin or MSYS installation
|
|
33
|
+
* GNU make
|
|
34
|
+
* A MinGW g++ toolchain capable of compiling C++11 code to build `winpty.dll`
|
|
35
|
+
and `winpty-agent.exe`
|
|
36
|
+
* A g++ toolchain targeting Cygwin or MSYS to build `winpty.exe`
|
|
37
|
+
|
|
38
|
+
Winpty requires two g++ toolchains as it is split into two parts. The
|
|
39
|
+
`winpty.dll` and `winpty-agent.exe` binaries interface with the native
|
|
40
|
+
Windows command prompt window so they are compiled with the native MinGW
|
|
41
|
+
toolchain. The `winpty.exe` binary interfaces with the MSYS/Cygwin terminal so
|
|
42
|
+
it is compiled with the MSYS/Cygwin toolchain.
|
|
43
|
+
|
|
44
|
+
MinGW appears to be split into two distributions -- MinGW (creates 32-bit
|
|
45
|
+
binaries) and MinGW-w64 (creates both 32-bit and 64-bit binaries). Either
|
|
46
|
+
one is generally acceptable.
|
|
47
|
+
|
|
48
|
+
#### Cygwin packages
|
|
49
|
+
|
|
50
|
+
The default g++ compiler for Cygwin targets Cygwin itself, but Cygwin also
|
|
51
|
+
packages MinGW-w64 compilers. As of this writing, the necessary packages are:
|
|
52
|
+
|
|
53
|
+
* Either `mingw64-i686-gcc-g++` or `mingw64-x86_64-gcc-g++`. Select the
|
|
54
|
+
appropriate compiler for your CPU architecture.
|
|
55
|
+
* `gcc-g++`
|
|
56
|
+
* `make`
|
|
57
|
+
|
|
58
|
+
As of this writing (2016-01-23), only the MinGW-w64 compiler is acceptable.
|
|
59
|
+
The MinGW compiler (e.g. from the `mingw-gcc-g++` package) is no longer
|
|
60
|
+
maintained and is too buggy.
|
|
61
|
+
|
|
62
|
+
#### MSYS packages
|
|
63
|
+
|
|
64
|
+
For the original MSYS, use the `mingw-get` tool (MinGW Installation Manager),
|
|
65
|
+
and select at least these components:
|
|
66
|
+
|
|
67
|
+
* `mingw-developer-toolkit`
|
|
68
|
+
* `mingw32-base`
|
|
69
|
+
* `mingw32-gcc-g++`
|
|
70
|
+
* `msys-base`
|
|
71
|
+
* `msys-system-builder`
|
|
72
|
+
|
|
73
|
+
When running `./configure`, make sure that `mingw32-g++` is in your
|
|
74
|
+
`PATH`. It will be in the `C:\MinGW\bin` directory.
|
|
75
|
+
|
|
76
|
+
#### MSYS2 packages
|
|
77
|
+
|
|
78
|
+
For MSYS2, use `pacman` and install at least these packages:
|
|
79
|
+
|
|
80
|
+
* `msys/gcc`
|
|
81
|
+
* `mingw32/mingw-w64-i686-gcc` or `mingw64/mingw-w64-x86_64-gcc`. Select
|
|
82
|
+
the appropriate compiler for your CPU architecture.
|
|
83
|
+
* `make`
|
|
84
|
+
|
|
85
|
+
MSYS2 provides three start menu shortcuts for starting MSYS2:
|
|
86
|
+
|
|
87
|
+
* MinGW-w64 Win32 Shell
|
|
88
|
+
* MinGW-w64 Win64 Shell
|
|
89
|
+
* MSYS2 Shell
|
|
90
|
+
|
|
91
|
+
To build winpty, use the MinGW-w64 {Win32,Win64} shortcut of the architecture
|
|
92
|
+
matching MSYS2. These shortcuts will put the g++ compiler from the
|
|
93
|
+
`{mingw32,mingw64}/mingw-w64-{i686,x86_64}-gcc` packages into the `PATH`.
|
|
94
|
+
|
|
95
|
+
Alternatively, instead of installing `mingw32/mingw-w64-i686-gcc` or
|
|
96
|
+
`mingw64/mingw-w64-x86_64-gcc`, install the `mingw-w64-cross-gcc` and
|
|
97
|
+
`mingw-w64-cross-crt-git` packages. These packages install cross-compilers
|
|
98
|
+
into `/opt/bin`, and then any of the three shortcuts will work.
|
|
99
|
+
|
|
100
|
+
### Building the Unix adapter
|
|
101
|
+
|
|
102
|
+
In the project directory, run `./configure`, then `make`, then `make install`.
|
|
103
|
+
By default, winpty is installed into `/usr/local`. Pass `PREFIX=<path>` to
|
|
104
|
+
`make install` to override this default.
|
|
105
|
+
|
|
106
|
+
### Using the Unix adapter
|
|
107
|
+
|
|
108
|
+
To run a Windows console program in `mintty` or Cygwin `sshd`, prepend
|
|
109
|
+
`winpty` to the command-line:
|
|
110
|
+
|
|
111
|
+
$ winpty powershell
|
|
112
|
+
Windows PowerShell
|
|
113
|
+
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
|
|
114
|
+
|
|
115
|
+
PS C:\rprichard\proj\winpty> 10 + 20
|
|
116
|
+
30
|
|
117
|
+
PS C:\rprichard\proj\winpty> exit
|
|
118
|
+
|
|
119
|
+
## Embedding winpty / MSVC compilation
|
|
120
|
+
|
|
121
|
+
See `src/include/winpty.h` for the prototypes of functions exported by
|
|
122
|
+
`winpty.dll`.
|
|
123
|
+
|
|
124
|
+
Only the `winpty.exe` binary uses Cygwin; all the other binaries work without
|
|
125
|
+
it and can be compiled with either MinGW or MSVC. To compile using MSVC,
|
|
126
|
+
download gyp and run `gyp -I configurations.gypi` in the `src` subdirectory.
|
|
127
|
+
This will generate a `winpty.sln` and associated project files. See the
|
|
128
|
+
`src/winpty.gyp` and `src/configurations.gypi` files for notes on dealing with
|
|
129
|
+
MSVC versions and different architectures.
|
|
130
|
+
|
|
131
|
+
Compiling winpty with MSVC currently requires MSVC 2013 or newer.
|
|
132
|
+
|
|
133
|
+
## Debugging winpty
|
|
134
|
+
|
|
135
|
+
winpty comes with a tool for collecting timestamped debugging output. To use
|
|
136
|
+
it:
|
|
137
|
+
|
|
138
|
+
1. Run `winpty-debugserver.exe` on the same computer as winpty.
|
|
139
|
+
2. Set the `WINPTY_DEBUG` environment variable to `trace` for the
|
|
140
|
+
`winpty.exe` process and/or the process using `libwinpty.dll`.
|
|
141
|
+
|
|
142
|
+
winpty also recognizes a `WINPTY_SHOW_CONSOLE` environment variable. Set it
|
|
143
|
+
to 1 to prevent winpty from hiding the console window.
|
|
144
|
+
|
|
145
|
+
## Copyright
|
|
146
|
+
|
|
147
|
+
This project is distributed under the MIT license (see the `LICENSE` file in
|
|
148
|
+
the project root).
|
|
149
|
+
|
|
150
|
+
By submitting a pull request for this project, you agree to license your
|
|
151
|
+
contribution under the MIT license to this project.
|