wtt-connect 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/package.json +2 -5
  2. package/src/runner.js +107 -24
  3. package/src/terminal-session.js +12 -1
  4. package/node_modules/node-addon-api/LICENSE.md +0 -9
  5. package/node_modules/node-addon-api/README.md +0 -319
  6. package/node_modules/node-addon-api/common.gypi +0 -20
  7. package/node_modules/node-addon-api/except.gypi +0 -25
  8. package/node_modules/node-addon-api/index.js +0 -12
  9. package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  10. package/node_modules/node-addon-api/napi-inl.h +0 -6607
  11. package/node_modules/node-addon-api/napi.h +0 -3201
  12. package/node_modules/node-addon-api/node_addon_api.gyp +0 -32
  13. package/node_modules/node-addon-api/node_api.gyp +0 -9
  14. package/node_modules/node-addon-api/noexcept.gypi +0 -26
  15. package/node_modules/node-addon-api/nothing.c +0 -0
  16. package/node_modules/node-addon-api/package-support.json +0 -21
  17. package/node_modules/node-addon-api/package.json +0 -480
  18. package/node_modules/node-addon-api/tools/README.md +0 -73
  19. package/node_modules/node-addon-api/tools/check-napi.js +0 -99
  20. package/node_modules/node-addon-api/tools/clang-format.js +0 -71
  21. package/node_modules/node-addon-api/tools/conversion.js +0 -301
  22. package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
  23. package/node_modules/node-pty/LICENSE +0 -69
  24. package/node_modules/node-pty/README.md +0 -165
  25. package/node_modules/node-pty/binding.gyp +0 -111
  26. package/node_modules/node-pty/build/Makefile +0 -369
  27. package/node_modules/node-pty/build/Release/pty.node +0 -0
  28. package/node_modules/node-pty/build/binding.Makefile +0 -6
  29. package/node_modules/node-pty/build/config.gypi +0 -503
  30. package/node_modules/node-pty/build/pty.target.mk +0 -168
  31. package/node_modules/node-pty/deps/.editorconfig +0 -2
  32. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  33. package/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  34. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  35. package/node_modules/node-pty/deps/winpty/Makefile +0 -166
  36. package/node_modules/node-pty/deps/winpty/README.md +0 -151
  37. package/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  38. package/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  39. package/node_modules/node-pty/deps/winpty/configure +0 -167
  40. package/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  41. package/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  42. package/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  43. package/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  44. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  45. package/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  46. package/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  47. package/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  48. package/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  49. package/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  50. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  51. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  52. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  53. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  54. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  55. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  56. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  57. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  58. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  59. package/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  60. package/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  61. package/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  62. package/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  63. package/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  64. package/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  65. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  66. package/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  67. package/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  68. package/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  69. package/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  70. package/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  71. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  72. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  73. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  74. package/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  75. package/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  76. package/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  77. package/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  78. package/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  79. package/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  80. package/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  81. package/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  82. package/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  83. package/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  84. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  85. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  86. package/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  87. package/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  88. package/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  89. package/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  90. package/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  91. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  92. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  93. package/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  94. package/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  95. package/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  96. package/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  97. package/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  98. package/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  99. package/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  100. package/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  101. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  102. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  103. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  104. package/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  105. package/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  106. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  107. package/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  108. package/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  109. package/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  110. package/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
  111. package/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  112. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  113. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  114. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  115. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  116. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  117. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  118. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  119. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  120. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  121. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  122. package/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  123. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  124. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  125. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  126. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  127. package/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  128. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  129. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  130. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  131. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  132. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  133. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  134. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  135. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  136. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  137. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  138. package/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  139. package/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  140. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  141. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  142. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  143. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  144. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  145. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  146. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  147. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  148. package/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  149. package/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  150. package/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  151. package/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  152. package/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  153. package/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  154. package/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  155. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  156. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  157. package/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  158. package/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  159. package/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  160. package/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  161. package/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  162. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  163. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  164. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  165. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  166. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  167. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  168. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  169. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  170. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  171. package/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  172. package/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  173. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  174. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  175. package/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  176. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  177. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  178. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  179. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  180. package/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  181. package/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  182. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  183. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  184. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  185. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  186. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  187. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  188. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  189. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  190. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  191. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  192. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  193. package/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  194. package/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  195. package/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  196. package/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  197. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  198. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  199. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  200. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  201. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  202. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  203. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  204. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  205. package/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  206. package/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  207. package/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
  208. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  209. package/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
  210. package/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  211. package/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  212. package/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  213. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  214. package/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  215. package/node_modules/node-pty/lib/index.js +0 -52
  216. package/node_modules/node-pty/lib/index.js.map +0 -1
  217. package/node_modules/node-pty/lib/interfaces.js +0 -7
  218. package/node_modules/node-pty/lib/interfaces.js.map +0 -1
  219. package/node_modules/node-pty/lib/shared/conout.js +0 -11
  220. package/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  221. package/node_modules/node-pty/lib/terminal.js +0 -190
  222. package/node_modules/node-pty/lib/terminal.js.map +0 -1
  223. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  224. package/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  225. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  226. package/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  227. package/node_modules/node-pty/lib/types.js +0 -7
  228. package/node_modules/node-pty/lib/types.js.map +0 -1
  229. package/node_modules/node-pty/lib/unixTerminal.js +0 -346
  230. package/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  231. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  232. package/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  233. package/node_modules/node-pty/lib/utils.js +0 -39
  234. package/node_modules/node-pty/lib/utils.js.map +0 -1
  235. package/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
  236. package/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  237. package/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
  238. package/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  239. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  240. package/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  241. package/node_modules/node-pty/lib/windowsTerminal.js +0 -199
  242. package/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  243. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  244. package/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  245. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  246. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  247. package/node_modules/node-pty/node-addon-api/node_addon_api.Makefile +0 -6
  248. package/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +0 -106
  249. package/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +0 -110
  250. package/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +0 -106
  251. package/node_modules/node-pty/package.json +0 -64
  252. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  253. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  254. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  255. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  256. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  257. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  258. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  259. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
  260. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  261. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
  262. package/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  263. package/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
  264. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  265. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
  266. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  267. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
  268. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  269. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  270. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  271. package/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
  272. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  273. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
  274. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  275. package/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
  276. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  277. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
  278. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  279. package/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
  280. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  281. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  282. package/node_modules/node-pty/scripts/post-install.js +0 -80
  283. package/node_modules/node-pty/scripts/prebuild.js +0 -34
  284. package/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
  285. package/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  286. package/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  287. package/node_modules/node-pty/src/index.ts +0 -52
  288. package/node_modules/node-pty/src/interfaces.ts +0 -130
  289. package/node_modules/node-pty/src/native.d.ts +0 -54
  290. package/node_modules/node-pty/src/shared/conout.ts +0 -15
  291. package/node_modules/node-pty/src/terminal.test.ts +0 -119
  292. package/node_modules/node-pty/src/terminal.ts +0 -211
  293. package/node_modules/node-pty/src/testUtils.test.ts +0 -23
  294. package/node_modules/node-pty/src/tsconfig.json +0 -22
  295. package/node_modules/node-pty/src/types.ts +0 -15
  296. package/node_modules/node-pty/src/unix/pty.cc +0 -799
  297. package/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  298. package/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
  299. package/node_modules/node-pty/src/unixTerminal.ts +0 -388
  300. package/node_modules/node-pty/src/utils.ts +0 -29
  301. package/node_modules/node-pty/src/win/conpty.cc +0 -583
  302. package/node_modules/node-pty/src/win/conpty.h +0 -41
  303. package/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
  304. package/node_modules/node-pty/src/win/path_util.cc +0 -95
  305. package/node_modules/node-pty/src/win/path_util.h +0 -26
  306. package/node_modules/node-pty/src/win/winpty.cc +0 -333
  307. package/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
  308. package/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  309. package/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
  310. package/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
  311. package/node_modules/node-pty/src/windowsTerminal.ts +0 -203
  312. package/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  313. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  314. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
  315. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  316. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  317. package/node_modules/node-pty/typings/node-pty.d.ts +0 -211
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtt-connect",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "private": false,
5
5
  "description": "WTT-native connector daemon for Codex, Claude Code, Cursor, Gemini, ACP, and other coding agent surfaces.",
6
6
  "type": "module",
@@ -18,12 +18,9 @@
18
18
  "engines": {
19
19
  "node": ">=22"
20
20
  },
21
- "dependencies": {
21
+ "optionalDependencies": {
22
22
  "node-pty": "^1.1.0"
23
23
  },
24
- "bundledDependencies": [
25
- "node-pty"
26
- ],
27
24
  "files": [
28
25
  "bin",
29
26
  "src",
package/src/runner.js CHANGED
@@ -2,6 +2,7 @@ import { WTTClient } from './wtt-client.js';
2
2
  import { execFile } from 'node:child_process';
3
3
  import fs from 'node:fs';
4
4
  import fsp from 'node:fs/promises';
5
+ import os from 'node:os';
5
6
  import path from 'node:path';
6
7
  import { promisify } from 'node:util';
7
8
  import { WTTApi } from './wtt-api.js';
@@ -572,11 +573,11 @@ function parseUpgradeArgs(argsText = '') {
572
573
  }
573
574
 
574
575
  async function upgradeToolchain(config, targets) {
575
- const specs = [];
576
- if (targets.includes('wtt-connect')) specs.push('wtt-connect@latest');
577
- if (targets.includes('codex')) specs.push('@openai/codex@latest');
578
- if (targets.includes('claude-code')) specs.push('@anthropic-ai/claude-code@latest');
579
- if (!specs.length) return { message: upgradeHelp(), summary: {} };
576
+ const packageSpecs = [];
577
+ if (targets.includes('wtt-connect')) packageSpecs.push({ target: 'wtt-connect', spec: 'wtt-connect@latest' });
578
+ if (targets.includes('codex')) packageSpecs.push({ target: 'codex', spec: '@openai/codex@latest' });
579
+ if (targets.includes('claude-code')) packageSpecs.push({ target: 'claude-code', spec: '@anthropic-ai/claude-code@latest' });
580
+ if (!packageSpecs.length) return { message: upgradeHelp(), summary: {} };
580
581
 
581
582
  const prefix = await resolveNpmPrefix(config);
582
583
  const cache = process.env.NPM_CONFIG_CACHE
@@ -595,27 +596,29 @@ async function upgradeToolchain(config, targets) {
595
596
  npm_config_cache: cache,
596
597
  npm_config_nodedir: process.env.npm_config_nodedir || '/usr/local',
597
598
  };
598
- const install = await execFileAsync('npm', [
599
- 'install',
600
- '-g',
601
- '--prefix',
602
- prefix,
603
- '--cache',
604
- cache,
605
- `--registry=${registry}`,
606
- ...specs,
607
- ], {
608
- cwd: config.workDir,
609
- env,
610
- timeout: 10 * 60_000,
611
- maxBuffer: 2 * 1024 * 1024,
612
- });
599
+ const installOutputs = [];
600
+ for (const pkg of packageSpecs) {
601
+ try {
602
+ const install = await installNpmGlobal(config, pkg.spec, { prefix, cache, registry, env });
603
+ installOutputs.push({ spec: pkg.spec, method: 'npm', stdout: install.stdout, stderr: install.stderr });
604
+ } catch (err) {
605
+ if (pkg.target !== 'wtt-connect') throw err;
606
+ const fallback = await installWttConnectFromRegistry(prefix, registry);
607
+ installOutputs.push({
608
+ spec: pkg.spec,
609
+ method: 'registry-tarball',
610
+ stdout: fallback.stdout,
611
+ stderr: `npm install failed; used registry tarball fallback.\n${err.stderr || err.message || err}`,
612
+ });
613
+ }
614
+ }
613
615
  const after = await toolVersions(config, prefix);
614
616
  const lines = [
615
617
  'Toolchain upgrade completed.',
616
618
  `- npm prefix: ${prefix}`,
617
619
  `- npm cache: ${cache}`,
618
- `- packages: ${specs.join(', ')}`,
620
+ `- packages: ${packageSpecs.map((pkg) => pkg.spec).join(', ')}`,
621
+ `- install methods: ${installOutputs.map((out) => `${out.spec}:${out.method}`).join(', ')}`,
619
622
  '',
620
623
  'Versions:',
621
624
  `- wtt-connect: ${before.wtt_connect || 'unknown'} -> ${after.wtt_connect || 'unknown'}`,
@@ -625,14 +628,18 @@ async function upgradeToolchain(config, targets) {
625
628
  if (targets.includes('wtt-connect')) {
626
629
  lines.push('', 'Note: `wtt-connect` was upgraded on disk. Restart this agent process to run the new connector version; Claude Code and Codex upgrades are used on the next run because they are spawned per request.');
627
630
  }
628
- const stdout = String(install.stdout || '').trim();
629
- if (stdout) lines.push('', 'npm output:', truncate(stdout, 4000));
631
+ const outputText = installOutputs
632
+ .map((out) => [`[${out.spec} via ${out.method}]`, out.stdout, out.stderr].filter(Boolean).join('\n'))
633
+ .join('\n\n')
634
+ .trim();
635
+ if (outputText) lines.push('', 'install output:', truncate(outputText, 4000));
630
636
  return {
631
637
  message: lines.join('\n'),
632
638
  summary: {
633
639
  prefix,
634
640
  cache,
635
- packages: specs,
641
+ packages: packageSpecs.map((pkg) => pkg.spec),
642
+ install_methods: Object.fromEntries(installOutputs.map((out) => [out.spec, out.method])),
636
643
  before,
637
644
  after,
638
645
  installed_at: new Date().toISOString(),
@@ -640,6 +647,82 @@ async function upgradeToolchain(config, targets) {
640
647
  };
641
648
  }
642
649
 
650
+ async function installNpmGlobal(config, spec, { prefix, cache, registry, env }) {
651
+ return execFileAsync('npm', [
652
+ 'install',
653
+ '-g',
654
+ '--prefix',
655
+ prefix,
656
+ '--cache',
657
+ cache,
658
+ `--registry=${registry}`,
659
+ spec,
660
+ ], {
661
+ cwd: config.workDir,
662
+ env,
663
+ timeout: 10 * 60_000,
664
+ maxBuffer: 2 * 1024 * 1024,
665
+ });
666
+ }
667
+
668
+ async function installWttConnectFromRegistry(prefix, registry) {
669
+ const registryBase = String(registry || 'https://registry.npmjs.org').replace(/\/+$/, '');
670
+ const metadataUrl = `${registryBase}/wtt-connect`;
671
+ const metadata = await fetchJson(metadataUrl);
672
+ const version = metadata?.['dist-tags']?.latest;
673
+ const tarball = version ? metadata?.versions?.[version]?.dist?.tarball : '';
674
+ if (!version || !tarball) throw new Error(`wtt-connect metadata missing latest tarball from ${metadataUrl}`);
675
+
676
+ const tmpDir = await fsp.mkdtemp(path.join(os.tmpdir(), 'wtt-connect-upgrade-'));
677
+ const archive = path.join(tmpDir, `wtt-connect-${version}.tgz`);
678
+ const extractDir = path.join(tmpDir, 'extract');
679
+ const libDir = path.join(prefix, 'lib', 'node_modules');
680
+ const binDir = path.join(prefix, 'bin');
681
+ const targetDir = path.join(libDir, 'wtt-connect');
682
+ const nextDir = path.join(libDir, `.wtt-connect-${version}-${process.pid}-${Date.now()}`);
683
+ try {
684
+ await execFileAsync('curl', ['-fsSL', tarball, '-o', archive], { timeout: 5 * 60_000, maxBuffer: 512 * 1024 });
685
+ await fsp.mkdir(extractDir, { recursive: true });
686
+ await execFileAsync('tar', ['-xzf', archive, '-C', extractDir], { timeout: 2 * 60_000, maxBuffer: 512 * 1024 });
687
+ await fsp.mkdir(libDir, { recursive: true });
688
+ await fsp.mkdir(binDir, { recursive: true });
689
+ await fsp.rm(nextDir, { recursive: true, force: true });
690
+ await fsp.rename(path.join(extractDir, 'package'), nextDir);
691
+ await fsp.rm(targetDir, { recursive: true, force: true });
692
+ await fsp.rename(nextDir, targetDir);
693
+ const entry = path.join(targetDir, 'bin', 'wtt-connect.js');
694
+ await fsp.chmod(entry, 0o755).catch(() => {});
695
+ const link = path.join(binDir, 'wtt-connect');
696
+ await fsp.rm(link, { force: true });
697
+ await fsp.symlink('../lib/node_modules/wtt-connect/bin/wtt-connect.js', link);
698
+ await writeToolVersion(prefix, 'wtt_connect', version);
699
+ return { stdout: `installed wtt-connect@${version} from ${tarball}`, stderr: '' };
700
+ } finally {
701
+ await fsp.rm(tmpDir, { recursive: true, force: true }).catch(() => {});
702
+ }
703
+ }
704
+
705
+ async function fetchJson(url) {
706
+ const res = await fetch(url);
707
+ if (!res.ok) throw new Error(`GET ${url} failed: ${res.status} ${res.statusText}`);
708
+ return res.json();
709
+ }
710
+
711
+ async function writeToolVersion(prefix, key, version) {
712
+ const toolchainDir = path.dirname(prefix);
713
+ const file = path.join(toolchainDir, 'tool-versions.json');
714
+ let current = {};
715
+ try {
716
+ current = JSON.parse(await fsp.readFile(file, 'utf8'));
717
+ } catch {
718
+ current = {};
719
+ }
720
+ current[key] = version;
721
+ current.updated_at = new Date().toISOString();
722
+ await fsp.mkdir(toolchainDir, { recursive: true });
723
+ await fsp.writeFile(file, `${JSON.stringify(current, null, 2)}\n`);
724
+ }
725
+
643
726
  async function resolveNpmPrefix(config) {
644
727
  const envPrefix = process.env.NPM_CONFIG_PREFIX || process.env.npm_config_prefix || '';
645
728
  if (envPrefix) return path.resolve(envPrefix);
@@ -2,10 +2,10 @@ import os from 'node:os';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
4
  import { createRequire } from 'node:module';
5
- import * as pty from 'node-pty';
6
5
  import { log } from './logger.js';
7
6
 
8
7
  const require = createRequire(import.meta.url);
8
+ let nodePty = null;
9
9
 
10
10
  export class TerminalSessionManager {
11
11
  constructor(config, sendJson) {
@@ -32,6 +32,7 @@ export class TerminalSessionManager {
32
32
 
33
33
  try {
34
34
  ensureNodePtyHelperExecutable();
35
+ const pty = await loadNodePty();
35
36
  const proc = pty.spawn(shell, [], {
36
37
  name: 'xterm-256color',
37
38
  cols,
@@ -119,6 +120,16 @@ export class TerminalSessionManager {
119
120
  }
120
121
  }
121
122
 
123
+ async function loadNodePty() {
124
+ if (nodePty) return nodePty;
125
+ try {
126
+ nodePty = await import('node-pty');
127
+ return nodePty;
128
+ } catch (err) {
129
+ throw new Error(`node-pty is not installed or failed to load; terminal sessions are unavailable in this runtime: ${err.message}`);
130
+ }
131
+ }
132
+
122
133
  function resolveDir(dir) {
123
134
  const resolved = path.resolve(String(dir || process.cwd()));
124
135
  if (!fs.existsSync(resolved)) fs.mkdirSync(resolved, { recursive: true });
@@ -1,9 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 [Node.js API collaborators](https://github.com/nodejs/node-addon-api#collaborators)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,319 +0,0 @@
1
- NOTE: The default branch has been renamed!
2
- master is now named main
3
-
4
- If you have a local clone, you can update it by running:
5
-
6
- ```shell
7
- git branch -m master main
8
- git fetch origin
9
- git branch -u origin/main main
10
- ```
11
-
12
- # **node-addon-api module**
13
- This module contains **header-only C++ wrapper classes** which simplify
14
- the use of the C based [Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)
15
- provided by Node.js when using C++. It provides a C++ object model
16
- and exception handling semantics with low overhead.
17
-
18
- There are three options for implementing addons: Node-API, nan, or direct
19
- use of internal V8, libuv, and Node.js libraries. Unless there is a need for
20
- direct access to functionality that is not exposed by Node-API as outlined
21
- in [C/C++ addons](https://nodejs.org/dist/latest/docs/api/addons.html)
22
- in Node.js core, use Node-API. Refer to
23
- [C/C++ addons with Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)
24
- for more information on Node-API.
25
-
26
- Node-API is an ABI stable C interface provided by Node.js for building native
27
- addons. It is independent of the underlying JavaScript runtime (e.g. V8 or ChakraCore)
28
- and is maintained as part of Node.js itself. It is intended to insulate
29
- native addons from changes in the underlying JavaScript engine and allow
30
- modules compiled for one version to run on later versions of Node.js without
31
- recompilation.
32
-
33
- The `node-addon-api` module, which is not part of Node.js, preserves the benefits
34
- of the Node-API as it consists only of inline code that depends only on the stable API
35
- provided by Node-API. As such, modules built against one version of Node.js
36
- using node-addon-api should run without having to be rebuilt with newer versions
37
- of Node.js.
38
-
39
- It is important to remember that *other* Node.js interfaces such as
40
- `libuv` (included in a project via `#include <uv.h>`) are not ABI-stable across
41
- Node.js major versions. Thus, an addon must use Node-API and/or `node-addon-api`
42
- exclusively and build against a version of Node.js that includes an
43
- implementation of Node-API (meaning an active LTS version of Node.js) in
44
- order to benefit from ABI stability across Node.js major versions. Node.js
45
- provides an [ABI stability guide][] containing a detailed explanation of ABI
46
- stability in general, and the Node-API ABI stability guarantee in particular.
47
-
48
- As new APIs are added to Node-API, node-addon-api must be updated to provide
49
- wrappers for those new APIs. For this reason, node-addon-api provides
50
- methods that allow callers to obtain the underlying Node-API handles so
51
- direct calls to Node-API and the use of the objects/methods provided by
52
- node-addon-api can be used together. For example, in order to be able
53
- to use an API for which the node-addon-api does not yet provide a wrapper.
54
-
55
- APIs exposed by node-addon-api are generally used to create and
56
- manipulate JavaScript values. Concepts and operations generally map
57
- to ideas specified in the **ECMA262 Language Specification**.
58
-
59
- The [Node-API Resource](https://nodejs.github.io/node-addon-examples/) offers an
60
- excellent orientation and tips for developers just getting started with Node-API
61
- and node-addon-api.
62
-
63
- - **[Setup](#setup)**
64
- - **[API Documentation](#api)**
65
- - **[Examples](#examples)**
66
- - **[Tests](#tests)**
67
- - **[More resource and info about native Addons](#resources)**
68
- - **[Badges](#badges)**
69
- - **[Code of Conduct](CODE_OF_CONDUCT.md)**
70
- - **[Contributors](#contributors)**
71
- - **[License](#license)**
72
-
73
- ## **Current version: 7.1.1**
74
-
75
- (See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
76
-
77
- [![NPM](https://nodei.co/npm/node-addon-api.png?downloads=true&downloadRank=true)](https://nodei.co/npm/node-addon-api/) [![NPM](https://nodei.co/npm-dl/node-addon-api.png?months=6&height=1)](https://nodei.co/npm/node-addon-api/)
78
-
79
- <a name="setup"></a>
80
-
81
- node-addon-api is based on [Node-API](https://nodejs.org/api/n-api.html) and supports using different Node-API versions.
82
- This allows addons built with it to run with Node.js versions which support the targeted Node-API version.
83
- **However** the node-addon-api support model is to support only the active LTS Node.js versions. This means that
84
- every year there will be a new major which drops support for the Node.js LTS version which has gone out of service.
85
-
86
- The oldest Node.js version supported by the current version of node-addon-api is Node.js 16.x.
87
-
88
- ## Setup
89
- - [Installation and usage](doc/setup.md)
90
- - [node-gyp](doc/node-gyp.md)
91
- - [cmake-js](doc/cmake-js.md)
92
- - [Conversion tool](doc/conversion-tool.md)
93
- - [Checker tool](doc/checker-tool.md)
94
- - [Generator](doc/generator.md)
95
- - [Prebuild tools](doc/prebuild_tools.md)
96
-
97
- <a name="api"></a>
98
-
99
- ### **API Documentation**
100
-
101
- The following is the documentation for node-addon-api.
102
-
103
- - [Full Class Hierarchy](doc/hierarchy.md)
104
- - [Addon Structure](doc/addon.md)
105
- - Data Types:
106
- - [Env](doc/env.md)
107
- - [CallbackInfo](doc/callbackinfo.md)
108
- - [Reference](doc/reference.md)
109
- - [Value](doc/value.md)
110
- - [Name](doc/name.md)
111
- - [Symbol](doc/symbol.md)
112
- - [String](doc/string.md)
113
- - [Number](doc/number.md)
114
- - [Date](doc/date.md)
115
- - [BigInt](doc/bigint.md)
116
- - [Boolean](doc/boolean.md)
117
- - [External](doc/external.md)
118
- - [Object](doc/object.md)
119
- - [Array](doc/array.md)
120
- - [ObjectReference](doc/object_reference.md)
121
- - [PropertyDescriptor](doc/property_descriptor.md)
122
- - [Function](doc/function.md)
123
- - [FunctionReference](doc/function_reference.md)
124
- - [ObjectWrap](doc/object_wrap.md)
125
- - [ClassPropertyDescriptor](doc/class_property_descriptor.md)
126
- - [Buffer](doc/buffer.md)
127
- - [ArrayBuffer](doc/array_buffer.md)
128
- - [TypedArray](doc/typed_array.md)
129
- - [TypedArrayOf](doc/typed_array_of.md)
130
- - [DataView](doc/dataview.md)
131
- - [Error Handling](doc/error_handling.md)
132
- - [Error](doc/error.md)
133
- - [TypeError](doc/type_error.md)
134
- - [RangeError](doc/range_error.md)
135
- - [SyntaxError](doc/syntax_error.md)
136
- - [Object Lifetime Management](doc/object_lifetime_management.md)
137
- - [HandleScope](doc/handle_scope.md)
138
- - [EscapableHandleScope](doc/escapable_handle_scope.md)
139
- - [Memory Management](doc/memory_management.md)
140
- - [Async Operations](doc/async_operations.md)
141
- - [AsyncWorker](doc/async_worker.md)
142
- - [AsyncContext](doc/async_context.md)
143
- - [AsyncWorker Variants](doc/async_worker_variants.md)
144
- - [Thread-safe Functions](doc/threadsafe.md)
145
- - [ThreadSafeFunction](doc/threadsafe_function.md)
146
- - [TypedThreadSafeFunction](doc/typed_threadsafe_function.md)
147
- - [Promises](doc/promises.md)
148
- - [Version management](doc/version_management.md)
149
-
150
- <a name="examples"></a>
151
-
152
- ### **Examples**
153
-
154
- Are you new to **node-addon-api**? Take a look at our **[examples](https://github.com/nodejs/node-addon-examples)**
155
-
156
- - **[Hello World](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/1_hello_world)**
157
- - **[Pass arguments to a function](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/2_function_arguments/node-addon-api)**
158
- - **[Callbacks](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/3_callbacks/node-addon-api)**
159
- - **[Object factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/4_object_factory/node-addon-api)**
160
- - **[Function factory](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/5_function_factory/node-addon-api)**
161
- - **[Wrapping C++ Object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/6_object_wrap/node-addon-api)**
162
- - **[Factory of wrapped object](https://github.com/nodejs/node-addon-examples/tree/main/src/1-getting-started/7_factory_wrap/node-addon-api)**
163
- - **[Passing wrapped object around](https://github.com/nodejs/node-addon-examples/tree/main/src/2-js-to-native-conversion/8_passing_wrapped/node-addon-api)**
164
-
165
- <a name="tests"></a>
166
-
167
- ### **Tests**
168
-
169
- To run the **node-addon-api** tests do:
170
-
171
- ```
172
- npm install
173
- npm test
174
- ```
175
-
176
- To avoid testing the deprecated portions of the API run
177
- ```
178
- npm install
179
- npm test --disable-deprecated
180
- ```
181
-
182
- To run the tests targeting a specific version of Node-API run
183
- ```
184
- npm install
185
- export NAPI_VERSION=X
186
- npm test --NAPI_VERSION=X
187
- ```
188
-
189
- where X is the version of Node-API you want to target.
190
-
191
- To run a specific unit test, filter conditions are available
192
-
193
- **Example:**
194
- compile and run only tests on objectwrap.cc and objectwrap.js
195
- ```
196
- npm run unit --filter=objectwrap
197
- ```
198
-
199
- Multiple unit tests cane be selected with wildcards
200
-
201
- **Example:**
202
- compile and run all test files ending with "reference" -> function_reference.cc, object_reference.cc, reference.cc
203
- ```
204
- npm run unit --filter=*reference
205
- ```
206
-
207
- Multiple filter conditions can be joined to broaden the test selection
208
-
209
- **Example:**
210
- compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file
211
- npm run unit --filter='*function objectwrap'
212
-
213
- ### **Debug**
214
-
215
- To run the **node-addon-api** tests with `--debug` option:
216
-
217
- ```
218
- npm run-script dev
219
- ```
220
-
221
- If you want a faster build, you might use the following option:
222
-
223
- ```
224
- npm run-script dev:incremental
225
- ```
226
-
227
- Take a look and get inspired by our **[test suite](https://github.com/nodejs/node-addon-api/tree/HEAD/test)**
228
-
229
- ### **Benchmarks**
230
-
231
- You can run the available benchmarks using the following command:
232
-
233
- ```
234
- npm run-script benchmark
235
- ```
236
-
237
- See [benchmark/README.md](benchmark/README.md) for more details about running and adding benchmarks.
238
-
239
- <a name="resources"></a>
240
-
241
- ### **More resource and info about native Addons**
242
- - **[C++ Addons](https://nodejs.org/dist/latest/docs/api/addons.html)**
243
- - **[Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)**
244
- - **[Node-API - Next Generation Node API for Native Modules](https://youtu.be/-Oniup60Afs)**
245
- - **[How We Migrated Realm JavaScript From NAN to Node-API](https://developer.mongodb.com/article/realm-javascript-nan-to-n-api)**
246
-
247
- As node-addon-api's core mission is to expose the plain C Node-API as C++
248
- wrappers, tools that facilitate n-api/node-addon-api providing more
249
- convenient patterns for developing a Node.js add-on with n-api/node-addon-api
250
- can be published to NPM as standalone packages. It is also recommended to tag
251
- such packages with `node-addon-api` to provide more visibility to the community.
252
-
253
- Quick links to NPM searches: [keywords:node-addon-api](https://www.npmjs.com/search?q=keywords%3Anode-addon-api).
254
-
255
- <a name="other-bindings"></a>
256
-
257
- ### **Other bindings**
258
-
259
- - **[napi-rs](https://napi.rs)** - (`Rust`)
260
-
261
- <a name="badges"></a>
262
-
263
- ### **Badges**
264
-
265
- The use of badges is recommended to indicate the minimum version of Node-API
266
- required for the module. This helps to determine which Node.js major versions are
267
- supported. Addon maintainers can consult the [Node-API support matrix][] to determine
268
- which Node.js versions provide a given Node-API version. The following badges are
269
- available:
270
-
271
- ![Node-API v1 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v1%20Badge.svg)
272
- ![Node-API v2 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v2%20Badge.svg)
273
- ![Node-API v3 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v3%20Badge.svg)
274
- ![Node-API v4 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v4%20Badge.svg)
275
- ![Node-API v5 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v5%20Badge.svg)
276
- ![Node-API v6 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v6%20Badge.svg)
277
- ![Node-API v7 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v7%20Badge.svg)
278
- ![Node-API v8 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v8%20Badge.svg)
279
- ![Node-API v9 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v9%20Badge.svg)
280
- ![Node-API Experimental Version Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20Experimental%20Version%20Badge.svg)
281
-
282
- ## **Contributing**
283
-
284
- We love contributions from the community to **node-addon-api**!
285
- See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around extending this module.
286
-
287
- <a name="contributors"></a>
288
-
289
- ## Team members
290
-
291
- ### Active
292
- | Name | GitHub Link |
293
- | ------------------- | ----------------------------------------------------- |
294
- | Anna Henningsen | [addaleax](https://github.com/addaleax) |
295
- | Chengzhong Wu | [legendecas](https://github.com/legendecas) |
296
- | Jack Xia | [JckXia](https://github.com/JckXia) |
297
- | Kevin Eady | [KevinEady](https://github.com/KevinEady) |
298
- | Michael Dawson | [mhdawson](https://github.com/mhdawson) |
299
- | Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
300
- | Vladimir Morozov | [vmoroz](https://github.com/vmoroz) |
301
-
302
- ### Emeritus
303
- | Name | GitHub Link |
304
- | ------------------- | ----------------------------------------------------- |
305
- | Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) |
306
- | Benjamin Byholm | [kkoopa](https://github.com/kkoopa) |
307
- | Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
308
- | Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
309
- | Jason Ginchereau | [jasongin](https://github.com/jasongin) |
310
- | Jim Schlight | [jschlight](https://github.com/jschlight) |
311
- | Sampson Gao | [sampsongao](https://github.com/sampsongao) |
312
- | Taylor Woll | [boingoing](https://github.com/boingoing) |
313
-
314
- <a name="license"></a>
315
-
316
- Licensed under [MIT](./LICENSE.md)
317
-
318
- [ABI stability guide]: https://nodejs.org/en/docs/guides/abi-stability/
319
- [Node-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix
@@ -1,20 +0,0 @@
1
- {
2
- 'variables': {
3
- 'NAPI_VERSION%': "<!(node -p \"process.env.NAPI_VERSION || process.versions.napi\")",
4
- 'disable_deprecated': "<!(node -p \"process.env['npm_config_disable_deprecated']\")"
5
- },
6
- 'conditions': [
7
- ['NAPI_VERSION!=""', { 'defines': ['NAPI_VERSION=<@(NAPI_VERSION)'] } ],
8
- ['disable_deprecated=="true"', {
9
- 'defines': ['NODE_ADDON_API_DISABLE_DEPRECATED']
10
- }],
11
- ['OS=="mac"', {
12
- 'cflags+': ['-fvisibility=hidden'],
13
- 'xcode_settings': {
14
- 'OTHER_CFLAGS': ['-fvisibility=hidden']
15
- }
16
- }]
17
- ],
18
- 'cflags': [ '-Werror', '-Wall', '-Wextra', '-Wpedantic', '-Wunused-parameter' ],
19
- 'cflags_cc': [ '-Werror', '-Wall', '-Wextra', '-Wpedantic', '-Wunused-parameter' ]
20
- }
@@ -1,25 +0,0 @@
1
- {
2
- 'defines': [ 'NAPI_CPP_EXCEPTIONS' ],
3
- 'cflags!': [ '-fno-exceptions' ],
4
- 'cflags_cc!': [ '-fno-exceptions' ],
5
- 'conditions': [
6
- ["OS=='win'", {
7
- "defines": [
8
- "_HAS_EXCEPTIONS=1"
9
- ],
10
- "msvs_settings": {
11
- "VCCLCompilerTool": {
12
- "ExceptionHandling": 1,
13
- 'EnablePREfast': 'true',
14
- },
15
- },
16
- }],
17
- ["OS=='mac'", {
18
- 'xcode_settings': {
19
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
20
- 'CLANG_CXX_LIBRARY': 'libc++',
21
- 'MACOSX_DEPLOYMENT_TARGET': '10.7',
22
- },
23
- }],
24
- ],
25
- }
@@ -1,12 +0,0 @@
1
- const path = require('path');
2
-
3
- const includeDir = path.relative('.', __dirname);
4
-
5
- module.exports = {
6
- include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
7
- include_dir: includeDir,
8
- gyp: path.join(includeDir, 'node_api.gyp:nothing'), // deprecated.
9
- targets: path.join(includeDir, 'node_addon_api.gyp'),
10
- isNodeApiBuiltin: true,
11
- needsFlag: false
12
- };