wtt-connect 0.2.16 → 0.2.17
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/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +319 -0
- package/node_modules/node-addon-api/common.gypi +20 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +12 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +6607 -0
- package/node_modules/node-addon-api/napi.h +3201 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +32 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +480 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-addon-api/tools/eslint-format.js +79 -0
- package/node_modules/node-pty/LICENSE +69 -0
- package/node_modules/node-pty/README.md +165 -0
- package/node_modules/node-pty/binding.gyp +111 -0
- package/node_modules/node-pty/build/Makefile +369 -0
- package/node_modules/node-pty/build/Release/pty.node +0 -0
- package/node_modules/node-pty/build/binding.Makefile +6 -0
- package/node_modules/node-pty/build/config.gypi +503 -0
- package/node_modules/node-pty/build/pty.target.mk +168 -0
- package/node_modules/node-pty/deps/.editorconfig +2 -0
- package/node_modules/node-pty/deps/winpty/.drone.yml +17 -0
- package/node_modules/node-pty/deps/winpty/.gitattributes +19 -0
- package/node_modules/node-pty/deps/winpty/LICENSE +21 -0
- package/node_modules/node-pty/deps/winpty/Makefile +166 -0
- package/node_modules/node-pty/deps/winpty/README.md +151 -0
- package/node_modules/node-pty/deps/winpty/RELEASES.md +280 -0
- package/node_modules/node-pty/deps/winpty/VERSION.txt +1 -0
- package/node_modules/node-pty/deps/winpty/configure +167 -0
- package/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +90 -0
- package/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +53 -0
- package/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +72 -0
- package/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +117 -0
- package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +116 -0
- package/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +113 -0
- package/node_modules/node-pty/deps/winpty/misc/DebugClient.py +42 -0
- package/node_modules/node-pty/deps/winpty/misc/DebugServer.py +63 -0
- package/node_modules/node-pty/deps/winpty/misc/DumpLines.py +5 -0
- package/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +46 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +528 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +633 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +630 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +630 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +630 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +630 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +16 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +4 -0
- package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +144 -0
- package/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +100 -0
- package/node_modules/node-pty/deps/winpty/misc/FormatChar.h +21 -0
- package/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +62 -0
- package/node_modules/node-pty/deps/winpty/misc/GetCh.cc +20 -0
- package/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +41 -0
- package/node_modules/node-pty/deps/winpty/misc/GetFont.cc +261 -0
- package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +51 -0
- package/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +87 -0
- package/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +90 -0
- package/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +34 -0
- package/node_modules/node-pty/deps/winpty/misc/Notes.txt +219 -0
- package/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +27 -0
- package/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +101 -0
- package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +671 -0
- package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +151 -0
- package/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +45 -0
- package/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +32 -0
- package/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +10 -0
- package/node_modules/node-pty/deps/winpty/misc/SetFont.cc +145 -0
- package/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +36 -0
- package/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +12 -0
- package/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +40 -0
- package/node_modules/node-pty/deps/winpty/misc/Spew.py +5 -0
- package/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +172 -0
- package/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +102 -0
- package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +246 -0
- package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +130 -0
- package/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +89 -0
- package/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +46 -0
- package/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +122 -0
- package/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +56 -0
- package/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +52 -0
- package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +57 -0
- package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +30 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +26 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +19 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +46 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +70 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +78 -0
- package/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +44 -0
- package/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +27 -0
- package/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +106 -0
- package/node_modules/node-pty/deps/winpty/misc/build32.sh +9 -0
- package/node_modules/node-pty/deps/winpty/misc/build64.sh +9 -0
- package/node_modules/node-pty/deps/winpty/misc/color-test.sh +212 -0
- package/node_modules/node-pty/deps/winpty/misc/font-notes.txt +300 -0
- package/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +201 -0
- package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +36 -0
- package/node_modules/node-pty/deps/winpty/ship/common_ship.py +53 -0
- package/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +165 -0
- package/node_modules/node-pty/deps/winpty/ship/ship.py +108 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +613 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Agent.h +103 -0
- package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +84 -0
- package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +28 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +632 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +28 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +852 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +109 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +121 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +36 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +152 -0
- package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +41 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Coord.h +87 -0
- package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +239 -0
- package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +32 -0
- package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +422 -0
- package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +28 -0
- package/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +30 -0
- package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +99 -0
- package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +47 -0
- package/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +246 -0
- package/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +114 -0
- package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +71 -0
- package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +68 -0
- package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +378 -0
- package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +125 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +699 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +103 -0
- package/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +75 -0
- package/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +143 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +535 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +69 -0
- package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +157 -0
- package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +189 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +107 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +67 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +193 -0
- package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +99 -0
- package/node_modules/node-pty/deps/winpty/src/agent/main.cc +114 -0
- package/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +61 -0
- package/node_modules/node-pty/deps/winpty/src/configurations.gypi +60 -0
- package/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +117 -0
- package/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +41 -0
- package/node_modules/node-pty/deps/winpty/src/include/winpty.h +242 -0
- package/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +131 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +75 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +28 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +54 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +72 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +46 -0
- package/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +970 -0
- package/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +38 -0
- package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +122 -0
- package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +73 -0
- package/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +103 -0
- package/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +102 -0
- package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +187 -0
- package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +38 -0
- package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +138 -0
- package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +55 -0
- package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +13 -0
- package/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +54 -0
- package/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +63 -0
- package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +36 -0
- package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +45 -0
- package/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +43 -0
- package/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +227 -0
- package/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +114 -0
- package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +55 -0
- package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +80 -0
- package/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +63 -0
- package/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +45 -0
- package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +20 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +460 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +104 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +252 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +29 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +55 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +64 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +57 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +43 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +42 -0
- package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +27 -0
- package/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +99 -0
- package/node_modules/node-pty/deps/winpty/src/subdir.mk +5 -0
- package/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +28 -0
- package/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +158 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +114 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +56 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +80 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +53 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +86 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +31 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +70 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +42 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +729 -0
- package/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +41 -0
- package/node_modules/node-pty/deps/winpty/src/winpty.gyp +234 -0
- package/node_modules/node-pty/deps/winpty/vcbuild.bat +83 -0
- package/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
- package/node_modules/node-pty/lib/eventEmitter2.js +47 -0
- package/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
- package/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
- package/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
- package/node_modules/node-pty/lib/index.js +52 -0
- package/node_modules/node-pty/lib/index.js.map +1 -0
- package/node_modules/node-pty/lib/interfaces.js +7 -0
- package/node_modules/node-pty/lib/interfaces.js.map +1 -0
- package/node_modules/node-pty/lib/shared/conout.js +11 -0
- package/node_modules/node-pty/lib/shared/conout.js.map +1 -0
- package/node_modules/node-pty/lib/terminal.js +190 -0
- package/node_modules/node-pty/lib/terminal.js.map +1 -0
- package/node_modules/node-pty/lib/terminal.test.js +139 -0
- package/node_modules/node-pty/lib/terminal.test.js.map +1 -0
- package/node_modules/node-pty/lib/testUtils.test.js +28 -0
- package/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
- package/node_modules/node-pty/lib/types.js +7 -0
- package/node_modules/node-pty/lib/types.js.map +1 -0
- package/node_modules/node-pty/lib/unixTerminal.js +346 -0
- package/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
- package/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
- package/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
- package/node_modules/node-pty/lib/utils.js +39 -0
- package/node_modules/node-pty/lib/utils.js.map +1 -0
- package/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
- package/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
- package/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
- package/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
- package/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
- package/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
- package/node_modules/node-pty/lib/windowsTerminal.js +199 -0
- package/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
- package/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
- package/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
- package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
- package/node_modules/node-pty/node-addon-api/node_addon_api.Makefile +6 -0
- package/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +106 -0
- package/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +110 -0
- package/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +106 -0
- package/node_modules/node-pty/package.json +64 -0
- package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
- package/node_modules/node-pty/scripts/gen-compile-commands.js +8 -0
- package/node_modules/node-pty/scripts/increment-version.js +54 -0
- package/node_modules/node-pty/scripts/post-install.js +80 -0
- package/node_modules/node-pty/scripts/prebuild.js +34 -0
- package/node_modules/node-pty/src/conpty_console_list_agent.ts +15 -0
- package/node_modules/node-pty/src/eventEmitter2.test.ts +30 -0
- package/node_modules/node-pty/src/eventEmitter2.ts +48 -0
- package/node_modules/node-pty/src/index.ts +52 -0
- package/node_modules/node-pty/src/interfaces.ts +130 -0
- package/node_modules/node-pty/src/native.d.ts +54 -0
- package/node_modules/node-pty/src/shared/conout.ts +15 -0
- package/node_modules/node-pty/src/terminal.test.ts +119 -0
- package/node_modules/node-pty/src/terminal.ts +211 -0
- package/node_modules/node-pty/src/testUtils.test.ts +23 -0
- package/node_modules/node-pty/src/tsconfig.json +22 -0
- package/node_modules/node-pty/src/types.ts +15 -0
- package/node_modules/node-pty/src/unix/pty.cc +799 -0
- package/node_modules/node-pty/src/unix/spawn-helper.cc +23 -0
- package/node_modules/node-pty/src/unixTerminal.test.ts +367 -0
- package/node_modules/node-pty/src/unixTerminal.ts +388 -0
- package/node_modules/node-pty/src/utils.ts +29 -0
- package/node_modules/node-pty/src/win/conpty.cc +583 -0
- package/node_modules/node-pty/src/win/conpty.h +41 -0
- package/node_modules/node-pty/src/win/conpty_console_list.cc +44 -0
- package/node_modules/node-pty/src/win/path_util.cc +95 -0
- package/node_modules/node-pty/src/win/path_util.h +26 -0
- package/node_modules/node-pty/src/win/winpty.cc +333 -0
- package/node_modules/node-pty/src/windowsConoutConnection.ts +82 -0
- package/node_modules/node-pty/src/windowsPtyAgent.test.ts +94 -0
- package/node_modules/node-pty/src/windowsPtyAgent.ts +321 -0
- package/node_modules/node-pty/src/windowsTerminal.test.ts +229 -0
- package/node_modules/node-pty/src/windowsTerminal.ts +203 -0
- package/node_modules/node-pty/src/worker/conoutSocketWorker.ts +22 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
- package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
- package/node_modules/node-pty/typings/node-pty.d.ts +211 -0
- package/package.json +4 -1
- package/src/config.js +2 -0
- package/src/runner.js +13 -2
- package/src/wtt-client.js +27 -6
|
@@ -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,369 @@
|
|
|
1
|
+
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
2
|
+
# we don't have Kconfig tweaking settings on us.
|
|
3
|
+
|
|
4
|
+
# The implicit make rules have it looking for RCS files, among other things.
|
|
5
|
+
# We instead explicitly write all the rules we care about.
|
|
6
|
+
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
7
|
+
MAKEFLAGS=-r
|
|
8
|
+
|
|
9
|
+
# The source directory tree.
|
|
10
|
+
srcdir := ..
|
|
11
|
+
abs_srcdir := $(abspath $(srcdir))
|
|
12
|
+
|
|
13
|
+
# The name of the builddir.
|
|
14
|
+
builddir_name ?= .
|
|
15
|
+
|
|
16
|
+
# The V=1 flag on command line makes us verbosely print command lines.
|
|
17
|
+
ifdef V
|
|
18
|
+
quiet=
|
|
19
|
+
else
|
|
20
|
+
quiet=quiet_
|
|
21
|
+
endif
|
|
22
|
+
|
|
23
|
+
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
24
|
+
BUILDTYPE ?= Release
|
|
25
|
+
|
|
26
|
+
# Directory all our build output goes into.
|
|
27
|
+
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
28
|
+
# as they reach into the src/ directory for data with relative paths.
|
|
29
|
+
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
30
|
+
abs_builddir := $(abspath $(builddir))
|
|
31
|
+
depsdir := $(builddir)/.deps
|
|
32
|
+
|
|
33
|
+
# Object output directory.
|
|
34
|
+
obj := $(builddir)/obj
|
|
35
|
+
abs_obj := $(abspath $(obj))
|
|
36
|
+
|
|
37
|
+
# We build up a list of every single one of the targets so we can slurp in the
|
|
38
|
+
# generated dependency rule Makefiles in one pass.
|
|
39
|
+
all_deps :=
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
CC.target ?= $(CC)
|
|
44
|
+
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
|
|
45
|
+
CXX.target ?= $(CXX)
|
|
46
|
+
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
|
|
47
|
+
LINK.target ?= $(LINK)
|
|
48
|
+
LDFLAGS.target ?= $(LDFLAGS)
|
|
49
|
+
AR.target ?= $(AR)
|
|
50
|
+
PLI.target ?= pli
|
|
51
|
+
|
|
52
|
+
# C++ apps need to be linked with g++.
|
|
53
|
+
LINK ?= $(CXX.target)
|
|
54
|
+
|
|
55
|
+
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
56
|
+
# to replicate this environment fallback in make as well.
|
|
57
|
+
CC.host ?= gcc
|
|
58
|
+
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
|
|
59
|
+
CXX.host ?= g++
|
|
60
|
+
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
|
|
61
|
+
LINK.host ?= $(CXX.host)
|
|
62
|
+
LDFLAGS.host ?= $(LDFLAGS_host)
|
|
63
|
+
AR.host ?= ar
|
|
64
|
+
PLI.host ?= pli
|
|
65
|
+
|
|
66
|
+
# Define a dir function that can handle spaces.
|
|
67
|
+
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
68
|
+
# "leading spaces cannot appear in the text of the first argument as written.
|
|
69
|
+
# These characters can be put into the argument value by variable substitution."
|
|
70
|
+
empty :=
|
|
71
|
+
space := $(empty) $(empty)
|
|
72
|
+
|
|
73
|
+
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
74
|
+
replace_spaces = $(subst $(space),?,$1)
|
|
75
|
+
unreplace_spaces = $(subst ?,$(space),$1)
|
|
76
|
+
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
77
|
+
|
|
78
|
+
# Flags to make gcc output dependency info. Note that you need to be
|
|
79
|
+
# careful here to use the flags that ccache and distcc can understand.
|
|
80
|
+
# We write to a dep file on the side first and then rename at the end
|
|
81
|
+
# so we can't end up with a broken dep file.
|
|
82
|
+
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
83
|
+
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
84
|
+
|
|
85
|
+
# We have to fixup the deps output in a few ways.
|
|
86
|
+
# (1) the file output should mention the proper .o file.
|
|
87
|
+
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
88
|
+
# the form:
|
|
89
|
+
# foobar.o: DEP1 DEP2
|
|
90
|
+
# into
|
|
91
|
+
# path/to/foobar.o: DEP1 DEP2
|
|
92
|
+
# (2) we want missing files not to cause us to fail to build.
|
|
93
|
+
# We want to rewrite
|
|
94
|
+
# foobar.o: DEP1 DEP2 \
|
|
95
|
+
# DEP3
|
|
96
|
+
# to
|
|
97
|
+
# DEP1:
|
|
98
|
+
# DEP2:
|
|
99
|
+
# DEP3:
|
|
100
|
+
# so if the files are missing, they're just considered phony rules.
|
|
101
|
+
# We have to do some pretty insane escaping to get those backslashes
|
|
102
|
+
# and dollar signs past make, the shell, and sed at the same time.
|
|
103
|
+
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
104
|
+
# their names replaced with other characters.
|
|
105
|
+
define fixup_dep
|
|
106
|
+
# The depfile may not exist if the input file didn't have any #includes.
|
|
107
|
+
touch $(depfile).raw
|
|
108
|
+
# Fixup path as in (1).
|
|
109
|
+
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
110
|
+
# Add extra rules as in (2).
|
|
111
|
+
# We remove slashes and replace spaces with new lines;
|
|
112
|
+
# remove blank lines;
|
|
113
|
+
# delete the first line and append a colon to the remaining lines.
|
|
114
|
+
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
115
|
+
grep -v '^$$' |\
|
|
116
|
+
sed -e 1d -e 's|$$|:|' \
|
|
117
|
+
>> $(depfile)
|
|
118
|
+
rm $(depfile).raw
|
|
119
|
+
endef
|
|
120
|
+
|
|
121
|
+
# Command definitions:
|
|
122
|
+
# - cmd_foo is the actual command to run;
|
|
123
|
+
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
124
|
+
|
|
125
|
+
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
126
|
+
cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c
|
|
127
|
+
|
|
128
|
+
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
129
|
+
cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c
|
|
130
|
+
|
|
131
|
+
quiet_cmd_touch = TOUCH $@
|
|
132
|
+
cmd_touch = touch $@
|
|
133
|
+
|
|
134
|
+
quiet_cmd_copy = COPY $@
|
|
135
|
+
# send stderr to /dev/null to ignore messages when linking directories.
|
|
136
|
+
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
137
|
+
|
|
138
|
+
quiet_cmd_symlink = SYMLINK $@
|
|
139
|
+
cmd_symlink = ln -sf "$<" "$@"
|
|
140
|
+
|
|
141
|
+
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
142
|
+
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
|
|
143
|
+
|
|
144
|
+
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
|
|
145
|
+
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
|
|
146
|
+
|
|
147
|
+
# Due to circular dependencies between libraries :(, we wrap the
|
|
148
|
+
# special "figure out circular dependencies" flags around the entire
|
|
149
|
+
# input list during linking.
|
|
150
|
+
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
151
|
+
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
|
|
152
|
+
|
|
153
|
+
# Note: this does not handle spaces in paths
|
|
154
|
+
define xargs
|
|
155
|
+
$(1) $(word 1,$(2))
|
|
156
|
+
$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2))))
|
|
157
|
+
endef
|
|
158
|
+
|
|
159
|
+
define write-to-file
|
|
160
|
+
@: >$(1)
|
|
161
|
+
$(call xargs,@printf "%s\n" >>$(1),$(2))
|
|
162
|
+
endef
|
|
163
|
+
|
|
164
|
+
OBJ_FILE_LIST := ar-file-list
|
|
165
|
+
|
|
166
|
+
define create_archive
|
|
167
|
+
rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
|
|
168
|
+
$(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
|
|
169
|
+
$(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
|
|
170
|
+
endef
|
|
171
|
+
|
|
172
|
+
define create_thin_archive
|
|
173
|
+
rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
|
|
174
|
+
$(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
|
|
175
|
+
$(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
|
|
176
|
+
endef
|
|
177
|
+
|
|
178
|
+
# We support two kinds of shared objects (.so):
|
|
179
|
+
# 1) shared_library, which is just bundling together many dependent libraries
|
|
180
|
+
# into a link line.
|
|
181
|
+
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
182
|
+
#
|
|
183
|
+
# They differ only slightly:
|
|
184
|
+
# In the former case, we want to package all dependent code into the .so.
|
|
185
|
+
# In the latter case, we want to package just the API exposed by the
|
|
186
|
+
# outermost module.
|
|
187
|
+
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
188
|
+
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
189
|
+
# normal linking.)
|
|
190
|
+
|
|
191
|
+
# Other shared-object link notes:
|
|
192
|
+
# - Set SONAME to the library filename so our binaries don't reference
|
|
193
|
+
# the local, absolute paths used on the link command-line.
|
|
194
|
+
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
195
|
+
cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
196
|
+
|
|
197
|
+
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
198
|
+
cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
# Define an escape_quotes function to escape single quotes.
|
|
202
|
+
# This allows us to handle quotes properly as long as we always use
|
|
203
|
+
# use single quotes and escape_quotes.
|
|
204
|
+
escape_quotes = $(subst ','\'',$(1))
|
|
205
|
+
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
206
|
+
# Define an escape_vars function to escape '$' variable syntax.
|
|
207
|
+
# This allows us to read/write command lines with shell variables (e.g.
|
|
208
|
+
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
209
|
+
escape_vars = $(subst $$,$$$$,$(1))
|
|
210
|
+
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
211
|
+
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
212
|
+
# to escape sequences is more portable than echo's across different shells
|
|
213
|
+
# (e.g., dash, bash).
|
|
214
|
+
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
215
|
+
|
|
216
|
+
# Helper to compare the command we're about to run against the command
|
|
217
|
+
# we logged the last time we ran the command. Produces an empty
|
|
218
|
+
# string (false) when the commands match.
|
|
219
|
+
# Tricky point: Make has no string-equality test function.
|
|
220
|
+
# The kernel uses the following, but it seems like it would have false
|
|
221
|
+
# positives, where one string reordered its arguments.
|
|
222
|
+
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
223
|
+
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
224
|
+
# We instead substitute each for the empty string into the other, and
|
|
225
|
+
# say they're equal if both substitutions produce the empty string.
|
|
226
|
+
# .d files contain ? instead of spaces, take that into account.
|
|
227
|
+
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
228
|
+
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
229
|
+
|
|
230
|
+
# Helper that is non-empty when a prerequisite changes.
|
|
231
|
+
# Normally make does this implicitly, but we force rules to always run
|
|
232
|
+
# so we can check their command lines.
|
|
233
|
+
# $? -- new prerequisites
|
|
234
|
+
# $| -- order-only dependencies
|
|
235
|
+
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
236
|
+
|
|
237
|
+
# Helper that executes all postbuilds until one fails.
|
|
238
|
+
define do_postbuilds
|
|
239
|
+
@E=0;\
|
|
240
|
+
for p in $(POSTBUILDS); do\
|
|
241
|
+
eval $$p;\
|
|
242
|
+
E=$$?;\
|
|
243
|
+
if [ $$E -ne 0 ]; then\
|
|
244
|
+
break;\
|
|
245
|
+
fi;\
|
|
246
|
+
done;\
|
|
247
|
+
if [ $$E -ne 0 ]; then\
|
|
248
|
+
rm -rf "$@";\
|
|
249
|
+
exit $$E;\
|
|
250
|
+
fi
|
|
251
|
+
endef
|
|
252
|
+
|
|
253
|
+
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
254
|
+
# Should always run for a given target to handle command-line changes.
|
|
255
|
+
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
256
|
+
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
257
|
+
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
258
|
+
# spaces already and dirx strips the ? characters.
|
|
259
|
+
define do_cmd
|
|
260
|
+
$(if $(or $(command_changed),$(prereq_changed)),
|
|
261
|
+
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
262
|
+
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
263
|
+
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
264
|
+
@$(cmd_$(1))
|
|
265
|
+
@echo " $(quiet_cmd_$(1)): Finished",
|
|
266
|
+
@$(cmd_$(1))
|
|
267
|
+
)
|
|
268
|
+
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
269
|
+
@$(if $(2),$(fixup_dep))
|
|
270
|
+
$(if $(and $(3), $(POSTBUILDS)),
|
|
271
|
+
$(call do_postbuilds)
|
|
272
|
+
)
|
|
273
|
+
)
|
|
274
|
+
endef
|
|
275
|
+
|
|
276
|
+
# Declare the "all" target first so it is the default,
|
|
277
|
+
# even though we don't have the deps yet.
|
|
278
|
+
.PHONY: all
|
|
279
|
+
all:
|
|
280
|
+
|
|
281
|
+
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
282
|
+
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
283
|
+
# for them makes it go faster.
|
|
284
|
+
%.d: ;
|
|
285
|
+
|
|
286
|
+
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
287
|
+
# do_cmd.
|
|
288
|
+
.PHONY: FORCE_DO_CMD
|
|
289
|
+
FORCE_DO_CMD:
|
|
290
|
+
|
|
291
|
+
TOOLSET := target
|
|
292
|
+
# Suffix rules, putting all outputs into $(obj).
|
|
293
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
294
|
+
@$(call do_cmd,cc,1)
|
|
295
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
296
|
+
@$(call do_cmd,cxx,1)
|
|
297
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
298
|
+
@$(call do_cmd,cxx,1)
|
|
299
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
300
|
+
@$(call do_cmd,cxx,1)
|
|
301
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
302
|
+
@$(call do_cmd,cc,1)
|
|
303
|
+
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
304
|
+
@$(call do_cmd,cc,1)
|
|
305
|
+
|
|
306
|
+
# Try building from generated source, too.
|
|
307
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
308
|
+
@$(call do_cmd,cc,1)
|
|
309
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
310
|
+
@$(call do_cmd,cxx,1)
|
|
311
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
312
|
+
@$(call do_cmd,cxx,1)
|
|
313
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
314
|
+
@$(call do_cmd,cxx,1)
|
|
315
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
316
|
+
@$(call do_cmd,cc,1)
|
|
317
|
+
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
318
|
+
@$(call do_cmd,cc,1)
|
|
319
|
+
|
|
320
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
321
|
+
@$(call do_cmd,cc,1)
|
|
322
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
323
|
+
@$(call do_cmd,cxx,1)
|
|
324
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
325
|
+
@$(call do_cmd,cxx,1)
|
|
326
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
327
|
+
@$(call do_cmd,cxx,1)
|
|
328
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
329
|
+
@$(call do_cmd,cc,1)
|
|
330
|
+
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
331
|
+
@$(call do_cmd,cc,1)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
335
|
+
$(findstring $(join ^,$(prefix)),\
|
|
336
|
+
$(join ^,../node-addon-api/node_addon_api.target.mk)))),)
|
|
337
|
+
include ../node-addon-api/node_addon_api.target.mk
|
|
338
|
+
endif
|
|
339
|
+
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
340
|
+
$(findstring $(join ^,$(prefix)),\
|
|
341
|
+
$(join ^,../node-addon-api/node_addon_api_except.target.mk)))),)
|
|
342
|
+
include ../node-addon-api/node_addon_api_except.target.mk
|
|
343
|
+
endif
|
|
344
|
+
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
345
|
+
$(findstring $(join ^,$(prefix)),\
|
|
346
|
+
$(join ^,../node-addon-api/node_addon_api_maybe.target.mk)))),)
|
|
347
|
+
include ../node-addon-api/node_addon_api_maybe.target.mk
|
|
348
|
+
endif
|
|
349
|
+
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
350
|
+
$(findstring $(join ^,$(prefix)),\
|
|
351
|
+
$(join ^,pty.target.mk)))),)
|
|
352
|
+
include pty.target.mk
|
|
353
|
+
endif
|
|
354
|
+
|
|
355
|
+
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
356
|
+
cmd_regen_makefile = cd $(srcdir); /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/cecwxf/.cache/node-gyp/22.16.0" "-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/cecwxf/.cache/node-gyp/22.16.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/cecwxf/workspace/agent_ref/wtt_project/_downloads/wtt-root-latest/tools/wtt-connect/node_modules/node-pty" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/cecwxf/workspace/agent_ref/wtt_project/_downloads/wtt-root-latest/tools/wtt-connect/node_modules/node-pty/build/config.gypi -I/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/cecwxf/.cache/node-gyp/22.16.0/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
357
|
+
Makefile: $(srcdir)/../../../../../../../../../../../usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../../../../../.cache/node-gyp/22.16.0/include/node/common.gypi $(srcdir)/../node-addon-api/except.gypi $(srcdir)/../node-addon-api/node_addon_api.gyp $(srcdir)/../node-addon-api/noexcept.gypi $(srcdir)/binding.gyp $(srcdir)/build/config.gypi
|
|
358
|
+
$(call do_cmd,regen_makefile)
|
|
359
|
+
|
|
360
|
+
# "all" is a concatenation of the "all" targets from all the included
|
|
361
|
+
# sub-makefiles. This is just here to clarify.
|
|
362
|
+
all:
|
|
363
|
+
|
|
364
|
+
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
365
|
+
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
366
|
+
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
367
|
+
ifneq ($(d_files),)
|
|
368
|
+
include $(d_files)
|
|
369
|
+
endif
|
|
Binary file
|