wtt-connect 0.2.18 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/package.json +2 -5
  2. package/src/adapters/codex.js +144 -2
  3. package/src/runner.js +258 -0
  4. package/src/store.js +6 -0
  5. package/src/terminal-session.js +12 -1
  6. package/node_modules/node-addon-api/LICENSE.md +0 -9
  7. package/node_modules/node-addon-api/README.md +0 -319
  8. package/node_modules/node-addon-api/common.gypi +0 -20
  9. package/node_modules/node-addon-api/except.gypi +0 -25
  10. package/node_modules/node-addon-api/index.js +0 -12
  11. package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  12. package/node_modules/node-addon-api/napi-inl.h +0 -6607
  13. package/node_modules/node-addon-api/napi.h +0 -3201
  14. package/node_modules/node-addon-api/node_addon_api.gyp +0 -32
  15. package/node_modules/node-addon-api/node_api.gyp +0 -9
  16. package/node_modules/node-addon-api/noexcept.gypi +0 -26
  17. package/node_modules/node-addon-api/nothing.c +0 -0
  18. package/node_modules/node-addon-api/package-support.json +0 -21
  19. package/node_modules/node-addon-api/package.json +0 -480
  20. package/node_modules/node-addon-api/tools/README.md +0 -73
  21. package/node_modules/node-addon-api/tools/check-napi.js +0 -99
  22. package/node_modules/node-addon-api/tools/clang-format.js +0 -71
  23. package/node_modules/node-addon-api/tools/conversion.js +0 -301
  24. package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
  25. package/node_modules/node-pty/LICENSE +0 -69
  26. package/node_modules/node-pty/README.md +0 -165
  27. package/node_modules/node-pty/binding.gyp +0 -111
  28. package/node_modules/node-pty/build/Makefile +0 -369
  29. package/node_modules/node-pty/build/Release/pty.node +0 -0
  30. package/node_modules/node-pty/build/binding.Makefile +0 -6
  31. package/node_modules/node-pty/build/config.gypi +0 -503
  32. package/node_modules/node-pty/build/pty.target.mk +0 -168
  33. package/node_modules/node-pty/deps/.editorconfig +0 -2
  34. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  35. package/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  36. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  37. package/node_modules/node-pty/deps/winpty/Makefile +0 -166
  38. package/node_modules/node-pty/deps/winpty/README.md +0 -151
  39. package/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  40. package/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  41. package/node_modules/node-pty/deps/winpty/configure +0 -167
  42. package/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  43. package/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  44. package/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  45. package/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  46. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  47. package/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  48. package/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  49. package/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  50. package/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  51. package/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  52. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  53. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  54. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  55. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  56. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  57. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  58. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  59. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  60. package/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  61. package/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  62. package/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  63. package/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  64. package/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  65. package/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  66. package/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  67. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  68. package/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  69. package/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  70. package/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  71. package/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  72. package/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  73. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  74. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  75. package/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  76. package/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  77. package/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  78. package/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  79. package/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  80. package/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  81. package/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  82. package/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  83. package/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  84. package/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  85. package/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  86. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  87. package/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  88. package/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  89. package/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  90. package/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  91. package/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  92. package/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  93. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  94. package/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  95. package/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  96. package/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  97. package/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  98. package/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  99. package/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  100. package/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  101. package/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  102. package/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  103. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  104. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  105. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  106. package/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  107. package/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  108. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  109. package/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  110. package/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  111. package/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  112. package/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -613
  113. package/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  114. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  115. package/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  116. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  117. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  118. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  119. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  120. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  121. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  122. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  123. package/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  124. package/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  125. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  126. package/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  127. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  128. package/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  129. package/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  130. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  131. package/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  132. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  133. package/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  134. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  135. package/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  136. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  137. package/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  138. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  139. package/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  140. package/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  141. package/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  142. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  143. package/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  144. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  145. package/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  146. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  147. package/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  148. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  149. package/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  150. package/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  151. package/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  152. package/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  153. package/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  154. package/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  155. package/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  156. package/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  157. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  158. package/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  159. package/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  160. package/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  161. package/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  162. package/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  163. package/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  164. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  165. package/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  166. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  167. package/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  168. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  169. package/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  170. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  171. package/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  172. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  173. package/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  174. package/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  175. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  176. package/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  177. package/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  178. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  179. package/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  180. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  181. package/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  182. package/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  183. package/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  184. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  185. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  186. package/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  187. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  188. package/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  189. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  190. package/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  191. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  192. package/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  193. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  194. package/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  195. package/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  196. package/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  197. package/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  198. package/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  199. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  200. package/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  201. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  202. package/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  203. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  204. package/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  205. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  206. package/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  207. package/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  208. package/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  209. package/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -234
  210. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  211. package/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -16
  212. package/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  213. package/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  214. package/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  215. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  216. package/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  217. package/node_modules/node-pty/lib/index.js +0 -52
  218. package/node_modules/node-pty/lib/index.js.map +0 -1
  219. package/node_modules/node-pty/lib/interfaces.js +0 -7
  220. package/node_modules/node-pty/lib/interfaces.js.map +0 -1
  221. package/node_modules/node-pty/lib/shared/conout.js +0 -11
  222. package/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  223. package/node_modules/node-pty/lib/terminal.js +0 -190
  224. package/node_modules/node-pty/lib/terminal.js.map +0 -1
  225. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  226. package/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  227. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  228. package/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  229. package/node_modules/node-pty/lib/types.js +0 -7
  230. package/node_modules/node-pty/lib/types.js.map +0 -1
  231. package/node_modules/node-pty/lib/unixTerminal.js +0 -346
  232. package/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  233. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  234. package/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  235. package/node_modules/node-pty/lib/utils.js +0 -39
  236. package/node_modules/node-pty/lib/utils.js.map +0 -1
  237. package/node_modules/node-pty/lib/windowsConoutConnection.js +0 -125
  238. package/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  239. package/node_modules/node-pty/lib/windowsPtyAgent.js +0 -320
  240. package/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  241. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  242. package/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  243. package/node_modules/node-pty/lib/windowsTerminal.js +0 -199
  244. package/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  245. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  246. package/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  247. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  248. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  249. package/node_modules/node-pty/node-addon-api/node_addon_api.Makefile +0 -6
  250. package/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +0 -106
  251. package/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +0 -110
  252. package/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +0 -106
  253. package/node_modules/node-pty/package.json +0 -64
  254. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  255. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  256. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  257. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  258. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
  259. package/node_modules/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
  260. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
  261. package/node_modules/node-pty/prebuilds/win32-arm64/conpty.pdb +0 -0
  262. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
  263. package/node_modules/node-pty/prebuilds/win32-arm64/conpty_console_list.pdb +0 -0
  264. package/node_modules/node-pty/prebuilds/win32-arm64/pty.node +0 -0
  265. package/node_modules/node-pty/prebuilds/win32-arm64/pty.pdb +0 -0
  266. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
  267. package/node_modules/node-pty/prebuilds/win32-arm64/winpty-agent.pdb +0 -0
  268. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
  269. package/node_modules/node-pty/prebuilds/win32-arm64/winpty.pdb +0 -0
  270. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  271. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  272. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  273. package/node_modules/node-pty/prebuilds/win32-x64/conpty.pdb +0 -0
  274. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  275. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.pdb +0 -0
  276. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  277. package/node_modules/node-pty/prebuilds/win32-x64/pty.pdb +0 -0
  278. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  279. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.pdb +0 -0
  280. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  281. package/node_modules/node-pty/prebuilds/win32-x64/winpty.pdb +0 -0
  282. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  283. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  284. package/node_modules/node-pty/scripts/post-install.js +0 -80
  285. package/node_modules/node-pty/scripts/prebuild.js +0 -34
  286. package/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -15
  287. package/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  288. package/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  289. package/node_modules/node-pty/src/index.ts +0 -52
  290. package/node_modules/node-pty/src/interfaces.ts +0 -130
  291. package/node_modules/node-pty/src/native.d.ts +0 -54
  292. package/node_modules/node-pty/src/shared/conout.ts +0 -15
  293. package/node_modules/node-pty/src/terminal.test.ts +0 -119
  294. package/node_modules/node-pty/src/terminal.ts +0 -211
  295. package/node_modules/node-pty/src/testUtils.test.ts +0 -23
  296. package/node_modules/node-pty/src/tsconfig.json +0 -22
  297. package/node_modules/node-pty/src/types.ts +0 -15
  298. package/node_modules/node-pty/src/unix/pty.cc +0 -799
  299. package/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  300. package/node_modules/node-pty/src/unixTerminal.test.ts +0 -367
  301. package/node_modules/node-pty/src/unixTerminal.ts +0 -388
  302. package/node_modules/node-pty/src/utils.ts +0 -29
  303. package/node_modules/node-pty/src/win/conpty.cc +0 -583
  304. package/node_modules/node-pty/src/win/conpty.h +0 -41
  305. package/node_modules/node-pty/src/win/conpty_console_list.cc +0 -44
  306. package/node_modules/node-pty/src/win/path_util.cc +0 -95
  307. package/node_modules/node-pty/src/win/path_util.h +0 -26
  308. package/node_modules/node-pty/src/win/winpty.cc +0 -333
  309. package/node_modules/node-pty/src/windowsConoutConnection.ts +0 -82
  310. package/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  311. package/node_modules/node-pty/src/windowsPtyAgent.ts +0 -321
  312. package/node_modules/node-pty/src/windowsTerminal.test.ts +0 -229
  313. package/node_modules/node-pty/src/windowsTerminal.ts +0 -203
  314. package/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  315. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  316. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/conpty.dll +0 -0
  317. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  318. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  319. package/node_modules/node-pty/typings/node-pty.d.ts +0 -211
@@ -1,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
- };
@@ -1,186 +0,0 @@
1
- #ifndef SRC_NAPI_INL_DEPRECATED_H_
2
- #define SRC_NAPI_INL_DEPRECATED_H_
3
-
4
- ////////////////////////////////////////////////////////////////////////////////
5
- // PropertyDescriptor class
6
- ////////////////////////////////////////////////////////////////////////////////
7
-
8
- template <typename Getter>
9
- inline PropertyDescriptor PropertyDescriptor::Accessor(
10
- const char* utf8name,
11
- Getter getter,
12
- napi_property_attributes attributes,
13
- void* /*data*/) {
14
- using CbData = details::CallbackData<Getter, Napi::Value>;
15
- // TODO: Delete when the function is destroyed
16
- auto callbackData = new CbData({getter, nullptr});
17
-
18
- return PropertyDescriptor({utf8name,
19
- nullptr,
20
- nullptr,
21
- CbData::Wrapper,
22
- nullptr,
23
- nullptr,
24
- attributes,
25
- callbackData});
26
- }
27
-
28
- template <typename Getter>
29
- inline PropertyDescriptor PropertyDescriptor::Accessor(
30
- const std::string& utf8name,
31
- Getter getter,
32
- napi_property_attributes attributes,
33
- void* data) {
34
- return Accessor(utf8name.c_str(), getter, attributes, data);
35
- }
36
-
37
- template <typename Getter>
38
- inline PropertyDescriptor PropertyDescriptor::Accessor(
39
- napi_value name,
40
- Getter getter,
41
- napi_property_attributes attributes,
42
- void* /*data*/) {
43
- using CbData = details::CallbackData<Getter, Napi::Value>;
44
- // TODO: Delete when the function is destroyed
45
- auto callbackData = new CbData({getter, nullptr});
46
-
47
- return PropertyDescriptor({nullptr,
48
- name,
49
- nullptr,
50
- CbData::Wrapper,
51
- nullptr,
52
- nullptr,
53
- attributes,
54
- callbackData});
55
- }
56
-
57
- template <typename Getter>
58
- inline PropertyDescriptor PropertyDescriptor::Accessor(
59
- Name name, Getter getter, napi_property_attributes attributes, void* data) {
60
- napi_value nameValue = name;
61
- return PropertyDescriptor::Accessor(nameValue, getter, attributes, data);
62
- }
63
-
64
- template <typename Getter, typename Setter>
65
- inline PropertyDescriptor PropertyDescriptor::Accessor(
66
- const char* utf8name,
67
- Getter getter,
68
- Setter setter,
69
- napi_property_attributes attributes,
70
- void* /*data*/) {
71
- using CbData = details::AccessorCallbackData<Getter, Setter>;
72
- // TODO: Delete when the function is destroyed
73
- auto callbackData = new CbData({getter, setter, nullptr});
74
-
75
- return PropertyDescriptor({utf8name,
76
- nullptr,
77
- nullptr,
78
- CbData::GetterWrapper,
79
- CbData::SetterWrapper,
80
- nullptr,
81
- attributes,
82
- callbackData});
83
- }
84
-
85
- template <typename Getter, typename Setter>
86
- inline PropertyDescriptor PropertyDescriptor::Accessor(
87
- const std::string& utf8name,
88
- Getter getter,
89
- Setter setter,
90
- napi_property_attributes attributes,
91
- void* data) {
92
- return Accessor(utf8name.c_str(), getter, setter, attributes, data);
93
- }
94
-
95
- template <typename Getter, typename Setter>
96
- inline PropertyDescriptor PropertyDescriptor::Accessor(
97
- napi_value name,
98
- Getter getter,
99
- Setter setter,
100
- napi_property_attributes attributes,
101
- void* /*data*/) {
102
- using CbData = details::AccessorCallbackData<Getter, Setter>;
103
- // TODO: Delete when the function is destroyed
104
- auto callbackData = new CbData({getter, setter, nullptr});
105
-
106
- return PropertyDescriptor({nullptr,
107
- name,
108
- nullptr,
109
- CbData::GetterWrapper,
110
- CbData::SetterWrapper,
111
- nullptr,
112
- attributes,
113
- callbackData});
114
- }
115
-
116
- template <typename Getter, typename Setter>
117
- inline PropertyDescriptor PropertyDescriptor::Accessor(
118
- Name name,
119
- Getter getter,
120
- Setter setter,
121
- napi_property_attributes attributes,
122
- void* data) {
123
- napi_value nameValue = name;
124
- return PropertyDescriptor::Accessor(
125
- nameValue, getter, setter, attributes, data);
126
- }
127
-
128
- template <typename Callable>
129
- inline PropertyDescriptor PropertyDescriptor::Function(
130
- const char* utf8name,
131
- Callable cb,
132
- napi_property_attributes attributes,
133
- void* /*data*/) {
134
- using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
135
- using CbData = details::CallbackData<Callable, ReturnType>;
136
- // TODO: Delete when the function is destroyed
137
- auto callbackData = new CbData({cb, nullptr});
138
-
139
- return PropertyDescriptor({utf8name,
140
- nullptr,
141
- CbData::Wrapper,
142
- nullptr,
143
- nullptr,
144
- nullptr,
145
- attributes,
146
- callbackData});
147
- }
148
-
149
- template <typename Callable>
150
- inline PropertyDescriptor PropertyDescriptor::Function(
151
- const std::string& utf8name,
152
- Callable cb,
153
- napi_property_attributes attributes,
154
- void* data) {
155
- return Function(utf8name.c_str(), cb, attributes, data);
156
- }
157
-
158
- template <typename Callable>
159
- inline PropertyDescriptor PropertyDescriptor::Function(
160
- napi_value name,
161
- Callable cb,
162
- napi_property_attributes attributes,
163
- void* /*data*/) {
164
- using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
165
- using CbData = details::CallbackData<Callable, ReturnType>;
166
- // TODO: Delete when the function is destroyed
167
- auto callbackData = new CbData({cb, nullptr});
168
-
169
- return PropertyDescriptor({nullptr,
170
- name,
171
- CbData::Wrapper,
172
- nullptr,
173
- nullptr,
174
- nullptr,
175
- attributes,
176
- callbackData});
177
- }
178
-
179
- template <typename Callable>
180
- inline PropertyDescriptor PropertyDescriptor::Function(
181
- Name name, Callable cb, napi_property_attributes attributes, void* data) {
182
- napi_value nameValue = name;
183
- return PropertyDescriptor::Function(nameValue, cb, attributes, data);
184
- }
185
-
186
- #endif // !SRC_NAPI_INL_DEPRECATED_H_