shell-mirror 1.5.140 → 1.5.143

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 (2457) hide show
  1. package/auth.js +8 -2
  2. package/mac-agent/.env.example +9 -0
  3. package/mac-agent/agent.js +46 -18
  4. package/package.json +4 -1
  5. package/public/app/config.js +12 -0
  6. package/public/app/dashboard.html +1 -0
  7. package/public/app/dashboard.js +10 -4
  8. package/public/app/terminal.html +38 -10
  9. package/public/app/terminal.js +210 -59
  10. package/mac-agent/.env +0 -9
  11. package/mac-agent/agent-debug.log +0 -143
  12. package/mac-agent/authorized-users.json +0 -35
  13. package/mac-agent/logs/http-agent.log +0 -823
  14. package/mac-agent/node +0 -0
  15. package/mac-agent/node_modules/.package-lock.json +0 -2255
  16. package/mac-agent/node_modules/@colors/colors/LICENSE +0 -26
  17. package/mac-agent/node_modules/@colors/colors/README.md +0 -219
  18. package/mac-agent/node_modules/@colors/colors/examples/normal-usage.js +0 -83
  19. package/mac-agent/node_modules/@colors/colors/examples/safe-string.js +0 -80
  20. package/mac-agent/node_modules/@colors/colors/index.d.ts +0 -184
  21. package/mac-agent/node_modules/@colors/colors/lib/colors.js +0 -211
  22. package/mac-agent/node_modules/@colors/colors/lib/custom/trap.js +0 -46
  23. package/mac-agent/node_modules/@colors/colors/lib/custom/zalgo.js +0 -110
  24. package/mac-agent/node_modules/@colors/colors/lib/extendStringPrototype.js +0 -110
  25. package/mac-agent/node_modules/@colors/colors/lib/index.js +0 -13
  26. package/mac-agent/node_modules/@colors/colors/lib/maps/america.js +0 -10
  27. package/mac-agent/node_modules/@colors/colors/lib/maps/rainbow.js +0 -12
  28. package/mac-agent/node_modules/@colors/colors/lib/maps/random.js +0 -11
  29. package/mac-agent/node_modules/@colors/colors/lib/maps/zebra.js +0 -5
  30. package/mac-agent/node_modules/@colors/colors/lib/styles.js +0 -95
  31. package/mac-agent/node_modules/@colors/colors/lib/system/has-flag.js +0 -35
  32. package/mac-agent/node_modules/@colors/colors/lib/system/supports-colors.js +0 -151
  33. package/mac-agent/node_modules/@colors/colors/package.json +0 -45
  34. package/mac-agent/node_modules/@colors/colors/safe.d.ts +0 -64
  35. package/mac-agent/node_modules/@colors/colors/safe.js +0 -10
  36. package/mac-agent/node_modules/@colors/colors/themes/generic-logging.js +0 -12
  37. package/mac-agent/node_modules/@dabh/diagnostics/CHANGELOG.md +0 -26
  38. package/mac-agent/node_modules/@dabh/diagnostics/LICENSE +0 -20
  39. package/mac-agent/node_modules/@dabh/diagnostics/README.md +0 -473
  40. package/mac-agent/node_modules/@dabh/diagnostics/adapters/hash.js +0 -11
  41. package/mac-agent/node_modules/@dabh/diagnostics/adapters/index.js +0 -18
  42. package/mac-agent/node_modules/@dabh/diagnostics/adapters/localstorage.js +0 -11
  43. package/mac-agent/node_modules/@dabh/diagnostics/adapters/process.env.js +0 -11
  44. package/mac-agent/node_modules/@dabh/diagnostics/browser/development.js +0 -35
  45. package/mac-agent/node_modules/@dabh/diagnostics/browser/index.js +0 -8
  46. package/mac-agent/node_modules/@dabh/diagnostics/browser/override.js +0 -6
  47. package/mac-agent/node_modules/@dabh/diagnostics/browser/production.js +0 -24
  48. package/mac-agent/node_modules/@dabh/diagnostics/diagnostics.js +0 -212
  49. package/mac-agent/node_modules/@dabh/diagnostics/logger/console.js +0 -19
  50. package/mac-agent/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js +0 -20
  51. package/mac-agent/node_modules/@dabh/diagnostics/modifiers/namespace.js +0 -32
  52. package/mac-agent/node_modules/@dabh/diagnostics/node/development.js +0 -36
  53. package/mac-agent/node_modules/@dabh/diagnostics/node/index.js +0 -8
  54. package/mac-agent/node_modules/@dabh/diagnostics/node/override.js +0 -21
  55. package/mac-agent/node_modules/@dabh/diagnostics/node/production.js +0 -24
  56. package/mac-agent/node_modules/@dabh/diagnostics/package.json +0 -64
  57. package/mac-agent/node_modules/@koush/wrtc/CMakeLists.txt +0 -664
  58. package/mac-agent/node_modules/@koush/wrtc/LICENSE.md +0 -30
  59. package/mac-agent/node_modules/@koush/wrtc/NodeJS.cmake +0 -638
  60. package/mac-agent/node_modules/@koush/wrtc/README.md +0 -120
  61. package/mac-agent/node_modules/@koush/wrtc/THIRD_PARTY_LICENSES.md +0 -1314
  62. package/mac-agent/node_modules/@koush/wrtc/build/Release/wrtc.node +0 -0
  63. package/mac-agent/node_modules/@koush/wrtc/build-linux-variants.sh +0 -10
  64. package/mac-agent/node_modules/@koush/wrtc/build-mac-variants.sh +0 -14
  65. package/mac-agent/node_modules/@koush/wrtc/clean.sh +0 -2
  66. package/mac-agent/node_modules/@koush/wrtc/lib/binding.js +0 -7
  67. package/mac-agent/node_modules/@koush/wrtc/lib/browser.js +0 -18
  68. package/mac-agent/node_modules/@koush/wrtc/lib/datachannelevent.js +0 -26
  69. package/mac-agent/node_modules/@koush/wrtc/lib/datachannelmessageevent.js +0 -9
  70. package/mac-agent/node_modules/@koush/wrtc/lib/error.js +0 -20
  71. package/mac-agent/node_modules/@koush/wrtc/lib/eventtarget.js +0 -50
  72. package/mac-agent/node_modules/@koush/wrtc/lib/icecandidate.js +0 -28
  73. package/mac-agent/node_modules/@koush/wrtc/lib/index.js +0 -81
  74. package/mac-agent/node_modules/@koush/wrtc/lib/mediadevices.js +0 -24
  75. package/mac-agent/node_modules/@koush/wrtc/lib/peerconnection.js +0 -313
  76. package/mac-agent/node_modules/@koush/wrtc/lib/rtcpeerconnectioniceerrorevent.js +0 -36
  77. package/mac-agent/node_modules/@koush/wrtc/lib/rtcpeerconnectioniceevent.js +0 -20
  78. package/mac-agent/node_modules/@koush/wrtc/lib/sessiondescription.js +0 -10
  79. package/mac-agent/node_modules/@koush/wrtc/package.json +0 -95
  80. package/mac-agent/node_modules/@koush/wrtc/scripts/build-appveyor.bat +0 -73
  81. package/mac-agent/node_modules/@koush/wrtc/scripts/build-from-source.js +0 -45
  82. package/mac-agent/node_modules/@koush/wrtc/scripts/build-webrtc.bat +0 -20
  83. package/mac-agent/node_modules/@koush/wrtc/scripts/build-webrtc.sh +0 -23
  84. package/mac-agent/node_modules/@koush/wrtc/scripts/configure-webrtc.bat +0 -28
  85. package/mac-agent/node_modules/@koush/wrtc/scripts/configure-webrtc.sh +0 -25
  86. package/mac-agent/node_modules/@koush/wrtc/scripts/download-prebuilt-or-build-from-source.js +0 -25
  87. package/mac-agent/node_modules/@koush/wrtc/scripts/download-prebuilt.js +0 -35
  88. package/mac-agent/node_modules/@koush/wrtc/scripts/download-webrtc.bat +0 -47
  89. package/mac-agent/node_modules/@koush/wrtc/scripts/download-webrtc.sh +0 -21
  90. package/mac-agent/node_modules/@koush/wrtc/scripts/install-example.js +0 -80
  91. package/mac-agent/node_modules/@koush/wrtc/scripts/karma.js +0 -70
  92. package/mac-agent/node_modules/@koush/wrtc/scripts/pack-webrtc.bat +0 -1
  93. package/mac-agent/node_modules/@koush/wrtc/scripts/pack-webrtc.js +0 -93
  94. package/mac-agent/node_modules/@koush/wrtc/scripts/pack-webrtc.sh +0 -38
  95. package/mac-agent/node_modules/@koush/wrtc/scripts/publish-to-npm.js +0 -98
  96. package/mac-agent/node_modules/@koush/wrtc/scripts/publish.js +0 -26
  97. package/mac-agent/node_modules/@koush/wrtc/scripts/run-tests.bat +0 -25
  98. package/mac-agent/node_modules/@koush/wrtc/scripts/unpack-webrtc.bat +0 -1
  99. package/mac-agent/node_modules/@koush/wrtc/scripts/unpack-webrtc.js +0 -36
  100. package/mac-agent/node_modules/@koush/wrtc/scripts/unpack-webrtc.sh +0 -28
  101. package/mac-agent/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml +0 -74
  102. package/mac-agent/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md +0 -510
  103. package/mac-agent/node_modules/@mapbox/node-pre-gyp/LICENSE +0 -27
  104. package/mac-agent/node_modules/@mapbox/node-pre-gyp/README.md +0 -742
  105. package/mac-agent/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp +0 -4
  106. package/mac-agent/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd +0 -2
  107. package/mac-agent/node_modules/@mapbox/node-pre-gyp/contributing.md +0 -10
  108. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/build.js +0 -51
  109. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/clean.js +0 -31
  110. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/configure.js +0 -52
  111. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/info.js +0 -38
  112. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/install.js +0 -235
  113. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/main.js +0 -125
  114. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js +0 -309
  115. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/package.js +0 -73
  116. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js +0 -34
  117. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/publish.js +0 -81
  118. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js +0 -20
  119. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js +0 -19
  120. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/reveal.js +0 -32
  121. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js +0 -79
  122. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js +0 -53
  123. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js +0 -41
  124. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json +0 -2602
  125. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js +0 -93
  126. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -102
  127. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js +0 -205
  128. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html +0 -26
  129. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json +0 -9
  130. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js +0 -163
  131. package/mac-agent/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +0 -335
  132. package/mac-agent/node_modules/@mapbox/node-pre-gyp/package.json +0 -62
  133. package/mac-agent/node_modules/@types/triple-beam/LICENSE +0 -21
  134. package/mac-agent/node_modules/@types/triple-beam/README.md +0 -36
  135. package/mac-agent/node_modules/@types/triple-beam/index.d.ts +0 -17
  136. package/mac-agent/node_modules/@types/triple-beam/package.json +0 -25
  137. package/mac-agent/node_modules/abbrev/LICENSE +0 -46
  138. package/mac-agent/node_modules/abbrev/README.md +0 -23
  139. package/mac-agent/node_modules/abbrev/abbrev.js +0 -61
  140. package/mac-agent/node_modules/abbrev/package.json +0 -21
  141. package/mac-agent/node_modules/agent-base/README.md +0 -145
  142. package/mac-agent/node_modules/agent-base/dist/src/index.d.ts +0 -78
  143. package/mac-agent/node_modules/agent-base/dist/src/index.js +0 -203
  144. package/mac-agent/node_modules/agent-base/dist/src/index.js.map +0 -1
  145. package/mac-agent/node_modules/agent-base/dist/src/promisify.d.ts +0 -4
  146. package/mac-agent/node_modules/agent-base/dist/src/promisify.js +0 -18
  147. package/mac-agent/node_modules/agent-base/dist/src/promisify.js.map +0 -1
  148. package/mac-agent/node_modules/agent-base/package.json +0 -64
  149. package/mac-agent/node_modules/agent-base/src/index.ts +0 -345
  150. package/mac-agent/node_modules/agent-base/src/promisify.ts +0 -33
  151. package/mac-agent/node_modules/ansi-regex/index.d.ts +0 -37
  152. package/mac-agent/node_modules/ansi-regex/index.js +0 -10
  153. package/mac-agent/node_modules/ansi-regex/license +0 -9
  154. package/mac-agent/node_modules/ansi-regex/package.json +0 -55
  155. package/mac-agent/node_modules/ansi-regex/readme.md +0 -78
  156. package/mac-agent/node_modules/anymatch/LICENSE +0 -15
  157. package/mac-agent/node_modules/anymatch/README.md +0 -87
  158. package/mac-agent/node_modules/anymatch/index.d.ts +0 -20
  159. package/mac-agent/node_modules/anymatch/index.js +0 -104
  160. package/mac-agent/node_modules/anymatch/package.json +0 -48
  161. package/mac-agent/node_modules/aproba/LICENSE +0 -14
  162. package/mac-agent/node_modules/aproba/README.md +0 -94
  163. package/mac-agent/node_modules/aproba/index.js +0 -105
  164. package/mac-agent/node_modules/aproba/package.json +0 -35
  165. package/mac-agent/node_modules/are-we-there-yet/LICENSE.md +0 -18
  166. package/mac-agent/node_modules/are-we-there-yet/README.md +0 -208
  167. package/mac-agent/node_modules/are-we-there-yet/lib/index.js +0 -4
  168. package/mac-agent/node_modules/are-we-there-yet/lib/tracker-base.js +0 -11
  169. package/mac-agent/node_modules/are-we-there-yet/lib/tracker-group.js +0 -116
  170. package/mac-agent/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -36
  171. package/mac-agent/node_modules/are-we-there-yet/lib/tracker.js +0 -32
  172. package/mac-agent/node_modules/are-we-there-yet/package.json +0 -53
  173. package/mac-agent/node_modules/async/CHANGELOG.md +0 -351
  174. package/mac-agent/node_modules/async/LICENSE +0 -19
  175. package/mac-agent/node_modules/async/README.md +0 -59
  176. package/mac-agent/node_modules/async/all.js +0 -119
  177. package/mac-agent/node_modules/async/allLimit.js +0 -46
  178. package/mac-agent/node_modules/async/allSeries.js +0 -45
  179. package/mac-agent/node_modules/async/any.js +0 -122
  180. package/mac-agent/node_modules/async/anyLimit.js +0 -47
  181. package/mac-agent/node_modules/async/anySeries.js +0 -46
  182. package/mac-agent/node_modules/async/apply.js +0 -11
  183. package/mac-agent/node_modules/async/applyEach.js +0 -57
  184. package/mac-agent/node_modules/async/applyEachSeries.js +0 -37
  185. package/mac-agent/node_modules/async/asyncify.js +0 -118
  186. package/mac-agent/node_modules/async/auto.js +0 -333
  187. package/mac-agent/node_modules/async/autoInject.js +0 -182
  188. package/mac-agent/node_modules/async/bower.json +0 -17
  189. package/mac-agent/node_modules/async/cargo.js +0 -63
  190. package/mac-agent/node_modules/async/cargoQueue.js +0 -71
  191. package/mac-agent/node_modules/async/compose.js +0 -55
  192. package/mac-agent/node_modules/async/concat.js +0 -115
  193. package/mac-agent/node_modules/async/concatLimit.js +0 -60
  194. package/mac-agent/node_modules/async/concatSeries.js +0 -41
  195. package/mac-agent/node_modules/async/constant.js +0 -14
  196. package/mac-agent/node_modules/async/detect.js +0 -96
  197. package/mac-agent/node_modules/async/detectLimit.js +0 -48
  198. package/mac-agent/node_modules/async/detectSeries.js +0 -47
  199. package/mac-agent/node_modules/async/dir.js +0 -43
  200. package/mac-agent/node_modules/async/dist/async.js +0 -6061
  201. package/mac-agent/node_modules/async/dist/async.min.js +0 -1
  202. package/mac-agent/node_modules/async/dist/async.mjs +0 -5948
  203. package/mac-agent/node_modules/async/doDuring.js +0 -68
  204. package/mac-agent/node_modules/async/doUntil.js +0 -46
  205. package/mac-agent/node_modules/async/doWhilst.js +0 -68
  206. package/mac-agent/node_modules/async/during.js +0 -78
  207. package/mac-agent/node_modules/async/each.js +0 -129
  208. package/mac-agent/node_modules/async/eachLimit.js +0 -50
  209. package/mac-agent/node_modules/async/eachOf.js +0 -185
  210. package/mac-agent/node_modules/async/eachOfLimit.js +0 -47
  211. package/mac-agent/node_modules/async/eachOfSeries.js +0 -39
  212. package/mac-agent/node_modules/async/eachSeries.js +0 -44
  213. package/mac-agent/node_modules/async/ensureAsync.js +0 -67
  214. package/mac-agent/node_modules/async/every.js +0 -119
  215. package/mac-agent/node_modules/async/everyLimit.js +0 -46
  216. package/mac-agent/node_modules/async/everySeries.js +0 -45
  217. package/mac-agent/node_modules/async/filter.js +0 -93
  218. package/mac-agent/node_modules/async/filterLimit.js +0 -45
  219. package/mac-agent/node_modules/async/filterSeries.js +0 -43
  220. package/mac-agent/node_modules/async/find.js +0 -96
  221. package/mac-agent/node_modules/async/findLimit.js +0 -48
  222. package/mac-agent/node_modules/async/findSeries.js +0 -47
  223. package/mac-agent/node_modules/async/flatMap.js +0 -115
  224. package/mac-agent/node_modules/async/flatMapLimit.js +0 -60
  225. package/mac-agent/node_modules/async/flatMapSeries.js +0 -41
  226. package/mac-agent/node_modules/async/foldl.js +0 -153
  227. package/mac-agent/node_modules/async/foldr.js +0 -41
  228. package/mac-agent/node_modules/async/forEach.js +0 -129
  229. package/mac-agent/node_modules/async/forEachLimit.js +0 -50
  230. package/mac-agent/node_modules/async/forEachOf.js +0 -185
  231. package/mac-agent/node_modules/async/forEachOfLimit.js +0 -47
  232. package/mac-agent/node_modules/async/forEachOfSeries.js +0 -39
  233. package/mac-agent/node_modules/async/forEachSeries.js +0 -44
  234. package/mac-agent/node_modules/async/forever.js +0 -68
  235. package/mac-agent/node_modules/async/groupBy.js +0 -108
  236. package/mac-agent/node_modules/async/groupByLimit.js +0 -71
  237. package/mac-agent/node_modules/async/groupBySeries.js +0 -36
  238. package/mac-agent/node_modules/async/index.js +0 -588
  239. package/mac-agent/node_modules/async/inject.js +0 -153
  240. package/mac-agent/node_modules/async/internal/DoublyLinkedList.js +0 -92
  241. package/mac-agent/node_modules/async/internal/Heap.js +0 -120
  242. package/mac-agent/node_modules/async/internal/applyEach.js +0 -29
  243. package/mac-agent/node_modules/async/internal/asyncEachOfLimit.js +0 -75
  244. package/mac-agent/node_modules/async/internal/awaitify.js +0 -28
  245. package/mac-agent/node_modules/async/internal/breakLoop.js +0 -10
  246. package/mac-agent/node_modules/async/internal/consoleFunc.js +0 -31
  247. package/mac-agent/node_modules/async/internal/createTester.js +0 -40
  248. package/mac-agent/node_modules/async/internal/eachOfLimit.js +0 -90
  249. package/mac-agent/node_modules/async/internal/filter.js +0 -55
  250. package/mac-agent/node_modules/async/internal/getIterator.js +0 -11
  251. package/mac-agent/node_modules/async/internal/initialParams.js +0 -14
  252. package/mac-agent/node_modules/async/internal/isArrayLike.js +0 -10
  253. package/mac-agent/node_modules/async/internal/iterator.js +0 -57
  254. package/mac-agent/node_modules/async/internal/map.js +0 -30
  255. package/mac-agent/node_modules/async/internal/once.js +0 -17
  256. package/mac-agent/node_modules/async/internal/onlyOnce.js +0 -15
  257. package/mac-agent/node_modules/async/internal/parallel.js +0 -34
  258. package/mac-agent/node_modules/async/internal/promiseCallback.js +0 -23
  259. package/mac-agent/node_modules/async/internal/queue.js +0 -294
  260. package/mac-agent/node_modules/async/internal/range.js +0 -14
  261. package/mac-agent/node_modules/async/internal/reject.js +0 -26
  262. package/mac-agent/node_modules/async/internal/setImmediate.js +0 -34
  263. package/mac-agent/node_modules/async/internal/withoutIndex.js +0 -10
  264. package/mac-agent/node_modules/async/internal/wrapAsync.js +0 -34
  265. package/mac-agent/node_modules/async/log.js +0 -41
  266. package/mac-agent/node_modules/async/map.js +0 -142
  267. package/mac-agent/node_modules/async/mapLimit.js +0 -45
  268. package/mac-agent/node_modules/async/mapSeries.js +0 -44
  269. package/mac-agent/node_modules/async/mapValues.js +0 -152
  270. package/mac-agent/node_modules/async/mapValuesLimit.js +0 -61
  271. package/mac-agent/node_modules/async/mapValuesSeries.js +0 -37
  272. package/mac-agent/node_modules/async/memoize.js +0 -91
  273. package/mac-agent/node_modules/async/nextTick.js +0 -52
  274. package/mac-agent/node_modules/async/package.json +0 -75
  275. package/mac-agent/node_modules/async/parallel.js +0 -180
  276. package/mac-agent/node_modules/async/parallelLimit.js +0 -41
  277. package/mac-agent/node_modules/async/priorityQueue.js +0 -60
  278. package/mac-agent/node_modules/async/queue.js +0 -24
  279. package/mac-agent/node_modules/async/race.js +0 -67
  280. package/mac-agent/node_modules/async/reduce.js +0 -153
  281. package/mac-agent/node_modules/async/reduceRight.js +0 -41
  282. package/mac-agent/node_modules/async/reflect.js +0 -78
  283. package/mac-agent/node_modules/async/reflectAll.js +0 -93
  284. package/mac-agent/node_modules/async/reject.js +0 -87
  285. package/mac-agent/node_modules/async/rejectLimit.js +0 -45
  286. package/mac-agent/node_modules/async/rejectSeries.js +0 -43
  287. package/mac-agent/node_modules/async/retry.js +0 -159
  288. package/mac-agent/node_modules/async/retryable.js +0 -77
  289. package/mac-agent/node_modules/async/select.js +0 -93
  290. package/mac-agent/node_modules/async/selectLimit.js +0 -45
  291. package/mac-agent/node_modules/async/selectSeries.js +0 -43
  292. package/mac-agent/node_modules/async/seq.js +0 -79
  293. package/mac-agent/node_modules/async/series.js +0 -186
  294. package/mac-agent/node_modules/async/setImmediate.js +0 -45
  295. package/mac-agent/node_modules/async/some.js +0 -122
  296. package/mac-agent/node_modules/async/someLimit.js +0 -47
  297. package/mac-agent/node_modules/async/someSeries.js +0 -46
  298. package/mac-agent/node_modules/async/sortBy.js +0 -190
  299. package/mac-agent/node_modules/async/timeout.js +0 -89
  300. package/mac-agent/node_modules/async/times.js +0 -50
  301. package/mac-agent/node_modules/async/timesLimit.js +0 -43
  302. package/mac-agent/node_modules/async/timesSeries.js +0 -32
  303. package/mac-agent/node_modules/async/transform.js +0 -173
  304. package/mac-agent/node_modules/async/tryEach.js +0 -78
  305. package/mac-agent/node_modules/async/unmemoize.js +0 -25
  306. package/mac-agent/node_modules/async/until.js +0 -61
  307. package/mac-agent/node_modules/async/waterfall.js +0 -105
  308. package/mac-agent/node_modules/async/whilst.js +0 -78
  309. package/mac-agent/node_modules/async/wrapSync.js +0 -118
  310. package/mac-agent/node_modules/asynckit/LICENSE +0 -21
  311. package/mac-agent/node_modules/asynckit/README.md +0 -233
  312. package/mac-agent/node_modules/asynckit/bench.js +0 -76
  313. package/mac-agent/node_modules/asynckit/index.js +0 -6
  314. package/mac-agent/node_modules/asynckit/lib/abort.js +0 -29
  315. package/mac-agent/node_modules/asynckit/lib/async.js +0 -34
  316. package/mac-agent/node_modules/asynckit/lib/defer.js +0 -26
  317. package/mac-agent/node_modules/asynckit/lib/iterate.js +0 -75
  318. package/mac-agent/node_modules/asynckit/lib/readable_asynckit.js +0 -91
  319. package/mac-agent/node_modules/asynckit/lib/readable_parallel.js +0 -25
  320. package/mac-agent/node_modules/asynckit/lib/readable_serial.js +0 -25
  321. package/mac-agent/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
  322. package/mac-agent/node_modules/asynckit/lib/state.js +0 -37
  323. package/mac-agent/node_modules/asynckit/lib/streamify.js +0 -141
  324. package/mac-agent/node_modules/asynckit/lib/terminator.js +0 -29
  325. package/mac-agent/node_modules/asynckit/package.json +0 -63
  326. package/mac-agent/node_modules/asynckit/parallel.js +0 -43
  327. package/mac-agent/node_modules/asynckit/serial.js +0 -17
  328. package/mac-agent/node_modules/asynckit/serialOrdered.js +0 -75
  329. package/mac-agent/node_modules/asynckit/stream.js +0 -21
  330. package/mac-agent/node_modules/axios/CHANGELOG.md +0 -1220
  331. package/mac-agent/node_modules/axios/LICENSE +0 -7
  332. package/mac-agent/node_modules/axios/MIGRATION_GUIDE.md +0 -3
  333. package/mac-agent/node_modules/axios/README.md +0 -1682
  334. package/mac-agent/node_modules/axios/dist/axios.js +0 -4296
  335. package/mac-agent/node_modules/axios/dist/axios.js.map +0 -1
  336. package/mac-agent/node_modules/axios/dist/axios.min.js +0 -3
  337. package/mac-agent/node_modules/axios/dist/axios.min.js.map +0 -1
  338. package/mac-agent/node_modules/axios/dist/browser/axios.cjs +0 -3730
  339. package/mac-agent/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  340. package/mac-agent/node_modules/axios/dist/esm/axios.js +0 -3753
  341. package/mac-agent/node_modules/axios/dist/esm/axios.js.map +0 -1
  342. package/mac-agent/node_modules/axios/dist/esm/axios.min.js +0 -3
  343. package/mac-agent/node_modules/axios/dist/esm/axios.min.js.map +0 -1
  344. package/mac-agent/node_modules/axios/dist/node/axios.cjs +0 -4787
  345. package/mac-agent/node_modules/axios/dist/node/axios.cjs.map +0 -1
  346. package/mac-agent/node_modules/axios/index.d.cts +0 -550
  347. package/mac-agent/node_modules/axios/index.d.ts +0 -572
  348. package/mac-agent/node_modules/axios/index.js +0 -43
  349. package/mac-agent/node_modules/axios/lib/adapters/README.md +0 -37
  350. package/mac-agent/node_modules/axios/lib/adapters/adapters.js +0 -79
  351. package/mac-agent/node_modules/axios/lib/adapters/fetch.js +0 -229
  352. package/mac-agent/node_modules/axios/lib/adapters/http.js +0 -695
  353. package/mac-agent/node_modules/axios/lib/adapters/xhr.js +0 -197
  354. package/mac-agent/node_modules/axios/lib/axios.js +0 -89
  355. package/mac-agent/node_modules/axios/lib/cancel/CancelToken.js +0 -135
  356. package/mac-agent/node_modules/axios/lib/cancel/CanceledError.js +0 -25
  357. package/mac-agent/node_modules/axios/lib/cancel/isCancel.js +0 -5
  358. package/mac-agent/node_modules/axios/lib/core/Axios.js +0 -242
  359. package/mac-agent/node_modules/axios/lib/core/AxiosError.js +0 -103
  360. package/mac-agent/node_modules/axios/lib/core/AxiosHeaders.js +0 -314
  361. package/mac-agent/node_modules/axios/lib/core/InterceptorManager.js +0 -71
  362. package/mac-agent/node_modules/axios/lib/core/README.md +0 -8
  363. package/mac-agent/node_modules/axios/lib/core/buildFullPath.js +0 -22
  364. package/mac-agent/node_modules/axios/lib/core/dispatchRequest.js +0 -81
  365. package/mac-agent/node_modules/axios/lib/core/mergeConfig.js +0 -106
  366. package/mac-agent/node_modules/axios/lib/core/settle.js +0 -27
  367. package/mac-agent/node_modules/axios/lib/core/transformData.js +0 -28
  368. package/mac-agent/node_modules/axios/lib/defaults/index.js +0 -161
  369. package/mac-agent/node_modules/axios/lib/defaults/transitional.js +0 -7
  370. package/mac-agent/node_modules/axios/lib/env/README.md +0 -3
  371. package/mac-agent/node_modules/axios/lib/env/classes/FormData.js +0 -2
  372. package/mac-agent/node_modules/axios/lib/env/data.js +0 -1
  373. package/mac-agent/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -143
  374. package/mac-agent/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -58
  375. package/mac-agent/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -71
  376. package/mac-agent/node_modules/axios/lib/helpers/README.md +0 -7
  377. package/mac-agent/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -28
  378. package/mac-agent/node_modules/axios/lib/helpers/bind.js +0 -7
  379. package/mac-agent/node_modules/axios/lib/helpers/buildURL.js +0 -69
  380. package/mac-agent/node_modules/axios/lib/helpers/callbackify.js +0 -16
  381. package/mac-agent/node_modules/axios/lib/helpers/combineURLs.js +0 -15
  382. package/mac-agent/node_modules/axios/lib/helpers/composeSignals.js +0 -48
  383. package/mac-agent/node_modules/axios/lib/helpers/cookies.js +0 -42
  384. package/mac-agent/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -26
  385. package/mac-agent/node_modules/axios/lib/helpers/formDataToJSON.js +0 -95
  386. package/mac-agent/node_modules/axios/lib/helpers/formDataToStream.js +0 -112
  387. package/mac-agent/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
  388. package/mac-agent/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -15
  389. package/mac-agent/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  390. package/mac-agent/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -14
  391. package/mac-agent/node_modules/axios/lib/helpers/null.js +0 -2
  392. package/mac-agent/node_modules/axios/lib/helpers/parseHeaders.js +0 -55
  393. package/mac-agent/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  394. package/mac-agent/node_modules/axios/lib/helpers/progressEventReducer.js +0 -44
  395. package/mac-agent/node_modules/axios/lib/helpers/readBlob.js +0 -15
  396. package/mac-agent/node_modules/axios/lib/helpers/resolveConfig.js +0 -57
  397. package/mac-agent/node_modules/axios/lib/helpers/speedometer.js +0 -55
  398. package/mac-agent/node_modules/axios/lib/helpers/spread.js +0 -28
  399. package/mac-agent/node_modules/axios/lib/helpers/throttle.js +0 -44
  400. package/mac-agent/node_modules/axios/lib/helpers/toFormData.js +0 -223
  401. package/mac-agent/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -18
  402. package/mac-agent/node_modules/axios/lib/helpers/trackStream.js +0 -87
  403. package/mac-agent/node_modules/axios/lib/helpers/validator.js +0 -99
  404. package/mac-agent/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  405. package/mac-agent/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  406. package/mac-agent/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
  407. package/mac-agent/node_modules/axios/lib/platform/browser/index.js +0 -13
  408. package/mac-agent/node_modules/axios/lib/platform/common/utils.js +0 -51
  409. package/mac-agent/node_modules/axios/lib/platform/index.js +0 -7
  410. package/mac-agent/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
  411. package/mac-agent/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
  412. package/mac-agent/node_modules/axios/lib/platform/node/index.js +0 -38
  413. package/mac-agent/node_modules/axios/lib/utils.js +0 -744
  414. package/mac-agent/node_modules/axios/package.json +0 -228
  415. package/mac-agent/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  416. package/mac-agent/node_modules/balanced-match/LICENSE.md +0 -21
  417. package/mac-agent/node_modules/balanced-match/README.md +0 -97
  418. package/mac-agent/node_modules/balanced-match/index.js +0 -62
  419. package/mac-agent/node_modules/balanced-match/package.json +0 -48
  420. package/mac-agent/node_modules/binary-extensions/binary-extensions.json +0 -263
  421. package/mac-agent/node_modules/binary-extensions/binary-extensions.json.d.ts +0 -3
  422. package/mac-agent/node_modules/binary-extensions/index.d.ts +0 -14
  423. package/mac-agent/node_modules/binary-extensions/index.js +0 -1
  424. package/mac-agent/node_modules/binary-extensions/license +0 -10
  425. package/mac-agent/node_modules/binary-extensions/package.json +0 -40
  426. package/mac-agent/node_modules/binary-extensions/readme.md +0 -25
  427. package/mac-agent/node_modules/brace-expansion/LICENSE +0 -21
  428. package/mac-agent/node_modules/brace-expansion/README.md +0 -129
  429. package/mac-agent/node_modules/brace-expansion/index.js +0 -201
  430. package/mac-agent/node_modules/brace-expansion/package.json +0 -50
  431. package/mac-agent/node_modules/braces/LICENSE +0 -21
  432. package/mac-agent/node_modules/braces/README.md +0 -586
  433. package/mac-agent/node_modules/braces/index.js +0 -170
  434. package/mac-agent/node_modules/braces/lib/compile.js +0 -60
  435. package/mac-agent/node_modules/braces/lib/constants.js +0 -57
  436. package/mac-agent/node_modules/braces/lib/expand.js +0 -113
  437. package/mac-agent/node_modules/braces/lib/parse.js +0 -331
  438. package/mac-agent/node_modules/braces/lib/stringify.js +0 -32
  439. package/mac-agent/node_modules/braces/lib/utils.js +0 -122
  440. package/mac-agent/node_modules/braces/package.json +0 -77
  441. package/mac-agent/node_modules/call-bind/.eslintignore +0 -1
  442. package/mac-agent/node_modules/call-bind/.eslintrc +0 -16
  443. package/mac-agent/node_modules/call-bind/.github/FUNDING.yml +0 -12
  444. package/mac-agent/node_modules/call-bind/.nycrc +0 -9
  445. package/mac-agent/node_modules/call-bind/CHANGELOG.md +0 -106
  446. package/mac-agent/node_modules/call-bind/LICENSE +0 -21
  447. package/mac-agent/node_modules/call-bind/README.md +0 -64
  448. package/mac-agent/node_modules/call-bind/callBound.js +0 -15
  449. package/mac-agent/node_modules/call-bind/index.js +0 -24
  450. package/mac-agent/node_modules/call-bind/package.json +0 -93
  451. package/mac-agent/node_modules/call-bind/test/callBound.js +0 -54
  452. package/mac-agent/node_modules/call-bind/test/index.js +0 -74
  453. package/mac-agent/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  454. package/mac-agent/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  455. package/mac-agent/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  456. package/mac-agent/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  457. package/mac-agent/node_modules/call-bind-apply-helpers/LICENSE +0 -21
  458. package/mac-agent/node_modules/call-bind-apply-helpers/README.md +0 -62
  459. package/mac-agent/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  460. package/mac-agent/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  461. package/mac-agent/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  462. package/mac-agent/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  463. package/mac-agent/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  464. package/mac-agent/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  465. package/mac-agent/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  466. package/mac-agent/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  467. package/mac-agent/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  468. package/mac-agent/node_modules/call-bind-apply-helpers/index.js +0 -15
  469. package/mac-agent/node_modules/call-bind-apply-helpers/package.json +0 -85
  470. package/mac-agent/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  471. package/mac-agent/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  472. package/mac-agent/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  473. package/mac-agent/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  474. package/mac-agent/node_modules/call-bound/.eslintrc +0 -13
  475. package/mac-agent/node_modules/call-bound/.github/FUNDING.yml +0 -12
  476. package/mac-agent/node_modules/call-bound/.nycrc +0 -9
  477. package/mac-agent/node_modules/call-bound/CHANGELOG.md +0 -42
  478. package/mac-agent/node_modules/call-bound/LICENSE +0 -21
  479. package/mac-agent/node_modules/call-bound/README.md +0 -53
  480. package/mac-agent/node_modules/call-bound/index.d.ts +0 -94
  481. package/mac-agent/node_modules/call-bound/index.js +0 -19
  482. package/mac-agent/node_modules/call-bound/package.json +0 -99
  483. package/mac-agent/node_modules/call-bound/test/index.js +0 -61
  484. package/mac-agent/node_modules/call-bound/tsconfig.json +0 -10
  485. package/mac-agent/node_modules/camelcase/index.js +0 -56
  486. package/mac-agent/node_modules/camelcase/license +0 -21
  487. package/mac-agent/node_modules/camelcase/package.json +0 -39
  488. package/mac-agent/node_modules/camelcase/readme.md +0 -57
  489. package/mac-agent/node_modules/chokidar/LICENSE +0 -21
  490. package/mac-agent/node_modules/chokidar/README.md +0 -308
  491. package/mac-agent/node_modules/chokidar/index.js +0 -973
  492. package/mac-agent/node_modules/chokidar/lib/constants.js +0 -66
  493. package/mac-agent/node_modules/chokidar/lib/fsevents-handler.js +0 -526
  494. package/mac-agent/node_modules/chokidar/lib/nodefs-handler.js +0 -654
  495. package/mac-agent/node_modules/chokidar/package.json +0 -70
  496. package/mac-agent/node_modules/chokidar/types/index.d.ts +0 -192
  497. package/mac-agent/node_modules/chownr/LICENSE +0 -15
  498. package/mac-agent/node_modules/chownr/README.md +0 -3
  499. package/mac-agent/node_modules/chownr/chownr.js +0 -167
  500. package/mac-agent/node_modules/chownr/package.json +0 -32
  501. package/mac-agent/node_modules/cliui/CHANGELOG.md +0 -15
  502. package/mac-agent/node_modules/cliui/LICENSE.txt +0 -14
  503. package/mac-agent/node_modules/cliui/README.md +0 -110
  504. package/mac-agent/node_modules/cliui/index.js +0 -316
  505. package/mac-agent/node_modules/cliui/node_modules/ansi-regex/index.js +0 -4
  506. package/mac-agent/node_modules/cliui/node_modules/ansi-regex/license +0 -21
  507. package/mac-agent/node_modules/cliui/node_modules/ansi-regex/package.json +0 -64
  508. package/mac-agent/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -39
  509. package/mac-agent/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js +0 -46
  510. package/mac-agent/node_modules/cliui/node_modules/is-fullwidth-code-point/license +0 -21
  511. package/mac-agent/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json +0 -45
  512. package/mac-agent/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md +0 -39
  513. package/mac-agent/node_modules/cliui/node_modules/string-width/index.js +0 -37
  514. package/mac-agent/node_modules/cliui/node_modules/string-width/license +0 -21
  515. package/mac-agent/node_modules/cliui/node_modules/string-width/package.json +0 -56
  516. package/mac-agent/node_modules/cliui/node_modules/string-width/readme.md +0 -42
  517. package/mac-agent/node_modules/cliui/node_modules/strip-ansi/index.js +0 -6
  518. package/mac-agent/node_modules/cliui/node_modules/strip-ansi/license +0 -21
  519. package/mac-agent/node_modules/cliui/node_modules/strip-ansi/package.json +0 -57
  520. package/mac-agent/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -33
  521. package/mac-agent/node_modules/cliui/package.json +0 -64
  522. package/mac-agent/node_modules/code-point-at/index.js +0 -32
  523. package/mac-agent/node_modules/code-point-at/license +0 -21
  524. package/mac-agent/node_modules/code-point-at/package.json +0 -38
  525. package/mac-agent/node_modules/code-point-at/readme.md +0 -32
  526. package/mac-agent/node_modules/color/LICENSE +0 -21
  527. package/mac-agent/node_modules/color/README.md +0 -123
  528. package/mac-agent/node_modules/color/index.js +0 -482
  529. package/mac-agent/node_modules/color/package.json +0 -40
  530. package/mac-agent/node_modules/color-convert/CHANGELOG.md +0 -54
  531. package/mac-agent/node_modules/color-convert/LICENSE +0 -21
  532. package/mac-agent/node_modules/color-convert/README.md +0 -68
  533. package/mac-agent/node_modules/color-convert/conversions.js +0 -868
  534. package/mac-agent/node_modules/color-convert/index.js +0 -78
  535. package/mac-agent/node_modules/color-convert/package.json +0 -46
  536. package/mac-agent/node_modules/color-convert/route.js +0 -97
  537. package/mac-agent/node_modules/color-name/.eslintrc.json +0 -43
  538. package/mac-agent/node_modules/color-name/LICENSE +0 -8
  539. package/mac-agent/node_modules/color-name/README.md +0 -11
  540. package/mac-agent/node_modules/color-name/index.js +0 -152
  541. package/mac-agent/node_modules/color-name/package.json +0 -25
  542. package/mac-agent/node_modules/color-name/test.js +0 -7
  543. package/mac-agent/node_modules/color-string/LICENSE +0 -21
  544. package/mac-agent/node_modules/color-string/README.md +0 -62
  545. package/mac-agent/node_modules/color-string/index.js +0 -242
  546. package/mac-agent/node_modules/color-string/package.json +0 -39
  547. package/mac-agent/node_modules/color-support/LICENSE +0 -15
  548. package/mac-agent/node_modules/color-support/README.md +0 -129
  549. package/mac-agent/node_modules/color-support/bin.js +0 -3
  550. package/mac-agent/node_modules/color-support/browser.js +0 -14
  551. package/mac-agent/node_modules/color-support/index.js +0 -134
  552. package/mac-agent/node_modules/color-support/package.json +0 -36
  553. package/mac-agent/node_modules/colorspace/LICENSE.md +0 -20
  554. package/mac-agent/node_modules/colorspace/README.md +0 -43
  555. package/mac-agent/node_modules/colorspace/index.js +0 -29
  556. package/mac-agent/node_modules/colorspace/package.json +0 -37
  557. package/mac-agent/node_modules/combined-stream/License +0 -19
  558. package/mac-agent/node_modules/combined-stream/Readme.md +0 -138
  559. package/mac-agent/node_modules/combined-stream/lib/combined_stream.js +0 -208
  560. package/mac-agent/node_modules/combined-stream/package.json +0 -25
  561. package/mac-agent/node_modules/combined-stream/yarn.lock +0 -17
  562. package/mac-agent/node_modules/concat-map/.travis.yml +0 -4
  563. package/mac-agent/node_modules/concat-map/LICENSE +0 -18
  564. package/mac-agent/node_modules/concat-map/README.markdown +0 -62
  565. package/mac-agent/node_modules/concat-map/example/map.js +0 -6
  566. package/mac-agent/node_modules/concat-map/index.js +0 -13
  567. package/mac-agent/node_modules/concat-map/package.json +0 -43
  568. package/mac-agent/node_modules/concat-map/test/map.js +0 -39
  569. package/mac-agent/node_modules/console-control-strings/LICENSE +0 -13
  570. package/mac-agent/node_modules/console-control-strings/README.md +0 -145
  571. package/mac-agent/node_modules/console-control-strings/README.md~ +0 -140
  572. package/mac-agent/node_modules/console-control-strings/index.js +0 -125
  573. package/mac-agent/node_modules/console-control-strings/package.json +0 -27
  574. package/mac-agent/node_modules/debug/LICENSE +0 -20
  575. package/mac-agent/node_modules/debug/README.md +0 -481
  576. package/mac-agent/node_modules/debug/package.json +0 -64
  577. package/mac-agent/node_modules/debug/src/browser.js +0 -272
  578. package/mac-agent/node_modules/debug/src/common.js +0 -292
  579. package/mac-agent/node_modules/debug/src/index.js +0 -10
  580. package/mac-agent/node_modules/debug/src/node.js +0 -263
  581. package/mac-agent/node_modules/decamelize/index.js +0 -13
  582. package/mac-agent/node_modules/decamelize/license +0 -21
  583. package/mac-agent/node_modules/decamelize/package.json +0 -38
  584. package/mac-agent/node_modules/decamelize/readme.md +0 -48
  585. package/mac-agent/node_modules/define-data-property/.eslintrc +0 -24
  586. package/mac-agent/node_modules/define-data-property/.github/FUNDING.yml +0 -12
  587. package/mac-agent/node_modules/define-data-property/.nycrc +0 -13
  588. package/mac-agent/node_modules/define-data-property/CHANGELOG.md +0 -70
  589. package/mac-agent/node_modules/define-data-property/LICENSE +0 -21
  590. package/mac-agent/node_modules/define-data-property/README.md +0 -67
  591. package/mac-agent/node_modules/define-data-property/index.d.ts +0 -12
  592. package/mac-agent/node_modules/define-data-property/index.js +0 -56
  593. package/mac-agent/node_modules/define-data-property/package.json +0 -106
  594. package/mac-agent/node_modules/define-data-property/test/index.js +0 -392
  595. package/mac-agent/node_modules/define-data-property/tsconfig.json +0 -59
  596. package/mac-agent/node_modules/define-properties/.editorconfig +0 -13
  597. package/mac-agent/node_modules/define-properties/.eslintrc +0 -19
  598. package/mac-agent/node_modules/define-properties/.github/FUNDING.yml +0 -12
  599. package/mac-agent/node_modules/define-properties/.nycrc +0 -9
  600. package/mac-agent/node_modules/define-properties/CHANGELOG.md +0 -91
  601. package/mac-agent/node_modules/define-properties/LICENSE +0 -21
  602. package/mac-agent/node_modules/define-properties/README.md +0 -84
  603. package/mac-agent/node_modules/define-properties/index.js +0 -47
  604. package/mac-agent/node_modules/define-properties/package.json +0 -88
  605. package/mac-agent/node_modules/delayed-stream/License +0 -19
  606. package/mac-agent/node_modules/delayed-stream/Makefile +0 -7
  607. package/mac-agent/node_modules/delayed-stream/Readme.md +0 -141
  608. package/mac-agent/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
  609. package/mac-agent/node_modules/delayed-stream/package.json +0 -27
  610. package/mac-agent/node_modules/delegates/History.md +0 -22
  611. package/mac-agent/node_modules/delegates/License +0 -20
  612. package/mac-agent/node_modules/delegates/Makefile +0 -8
  613. package/mac-agent/node_modules/delegates/Readme.md +0 -94
  614. package/mac-agent/node_modules/delegates/index.js +0 -121
  615. package/mac-agent/node_modules/delegates/package.json +0 -13
  616. package/mac-agent/node_modules/delegates/test/index.js +0 -94
  617. package/mac-agent/node_modules/detect-libc/LICENSE +0 -201
  618. package/mac-agent/node_modules/detect-libc/README.md +0 -163
  619. package/mac-agent/node_modules/detect-libc/index.d.ts +0 -14
  620. package/mac-agent/node_modules/detect-libc/lib/detect-libc.js +0 -267
  621. package/mac-agent/node_modules/detect-libc/lib/filesystem.js +0 -41
  622. package/mac-agent/node_modules/detect-libc/lib/process.js +0 -24
  623. package/mac-agent/node_modules/detect-libc/package.json +0 -41
  624. package/mac-agent/node_modules/domexception/LICENSE.txt +0 -21
  625. package/mac-agent/node_modules/domexception/README.md +0 -19
  626. package/mac-agent/node_modules/domexception/lib/DOMException-impl.js +0 -22
  627. package/mac-agent/node_modules/domexception/lib/DOMException.js +0 -368
  628. package/mac-agent/node_modules/domexception/lib/legacy-error-codes.json +0 -27
  629. package/mac-agent/node_modules/domexception/lib/public-api.js +0 -5
  630. package/mac-agent/node_modules/domexception/lib/utils.js +0 -86
  631. package/mac-agent/node_modules/domexception/package.json +0 -36
  632. package/mac-agent/node_modules/dotenv/CHANGELOG.md +0 -520
  633. package/mac-agent/node_modules/dotenv/LICENSE +0 -23
  634. package/mac-agent/node_modules/dotenv/README-es.md +0 -411
  635. package/mac-agent/node_modules/dotenv/README.md +0 -645
  636. package/mac-agent/node_modules/dotenv/SECURITY.md +0 -1
  637. package/mac-agent/node_modules/dotenv/config.d.ts +0 -1
  638. package/mac-agent/node_modules/dotenv/config.js +0 -9
  639. package/mac-agent/node_modules/dotenv/lib/cli-options.js +0 -17
  640. package/mac-agent/node_modules/dotenv/lib/env-options.js +0 -28
  641. package/mac-agent/node_modules/dotenv/lib/main.d.ts +0 -162
  642. package/mac-agent/node_modules/dotenv/lib/main.js +0 -386
  643. package/mac-agent/node_modules/dotenv/package.json +0 -62
  644. package/mac-agent/node_modules/dunder-proto/.eslintrc +0 -5
  645. package/mac-agent/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  646. package/mac-agent/node_modules/dunder-proto/.nycrc +0 -13
  647. package/mac-agent/node_modules/dunder-proto/CHANGELOG.md +0 -24
  648. package/mac-agent/node_modules/dunder-proto/LICENSE +0 -21
  649. package/mac-agent/node_modules/dunder-proto/README.md +0 -54
  650. package/mac-agent/node_modules/dunder-proto/get.d.ts +0 -5
  651. package/mac-agent/node_modules/dunder-proto/get.js +0 -30
  652. package/mac-agent/node_modules/dunder-proto/package.json +0 -76
  653. package/mac-agent/node_modules/dunder-proto/set.d.ts +0 -5
  654. package/mac-agent/node_modules/dunder-proto/set.js +0 -35
  655. package/mac-agent/node_modules/dunder-proto/test/get.js +0 -34
  656. package/mac-agent/node_modules/dunder-proto/test/index.js +0 -4
  657. package/mac-agent/node_modules/dunder-proto/test/set.js +0 -50
  658. package/mac-agent/node_modules/dunder-proto/tsconfig.json +0 -9
  659. package/mac-agent/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  660. package/mac-agent/node_modules/emoji-regex/README.md +0 -73
  661. package/mac-agent/node_modules/emoji-regex/es2015/index.js +0 -6
  662. package/mac-agent/node_modules/emoji-regex/es2015/text.js +0 -6
  663. package/mac-agent/node_modules/emoji-regex/index.d.ts +0 -23
  664. package/mac-agent/node_modules/emoji-regex/index.js +0 -6
  665. package/mac-agent/node_modules/emoji-regex/package.json +0 -50
  666. package/mac-agent/node_modules/emoji-regex/text.js +0 -6
  667. package/mac-agent/node_modules/enabled/.travis.yml +0 -9
  668. package/mac-agent/node_modules/enabled/LICENSE +0 -20
  669. package/mac-agent/node_modules/enabled/README.md +0 -68
  670. package/mac-agent/node_modules/enabled/index.js +0 -34
  671. package/mac-agent/node_modules/enabled/package.json +0 -33
  672. package/mac-agent/node_modules/enabled/test.js +0 -39
  673. package/mac-agent/node_modules/error-ex/LICENSE +0 -21
  674. package/mac-agent/node_modules/error-ex/README.md +0 -144
  675. package/mac-agent/node_modules/error-ex/index.js +0 -141
  676. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/.editorconfig +0 -18
  677. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/.istanbul.yml +0 -4
  678. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/.travis.yml +0 -17
  679. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/LICENSE +0 -21
  680. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/README.md +0 -16
  681. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/index.js +0 -10
  682. package/mac-agent/node_modules/error-ex/node_modules/is-arrayish/package.json +0 -34
  683. package/mac-agent/node_modules/error-ex/package.json +0 -46
  684. package/mac-agent/node_modules/es-define-property/.eslintrc +0 -13
  685. package/mac-agent/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  686. package/mac-agent/node_modules/es-define-property/.nycrc +0 -9
  687. package/mac-agent/node_modules/es-define-property/CHANGELOG.md +0 -29
  688. package/mac-agent/node_modules/es-define-property/LICENSE +0 -21
  689. package/mac-agent/node_modules/es-define-property/README.md +0 -49
  690. package/mac-agent/node_modules/es-define-property/index.d.ts +0 -3
  691. package/mac-agent/node_modules/es-define-property/index.js +0 -14
  692. package/mac-agent/node_modules/es-define-property/package.json +0 -81
  693. package/mac-agent/node_modules/es-define-property/test/index.js +0 -56
  694. package/mac-agent/node_modules/es-define-property/tsconfig.json +0 -10
  695. package/mac-agent/node_modules/es-errors/.eslintrc +0 -5
  696. package/mac-agent/node_modules/es-errors/.github/FUNDING.yml +0 -12
  697. package/mac-agent/node_modules/es-errors/CHANGELOG.md +0 -40
  698. package/mac-agent/node_modules/es-errors/LICENSE +0 -21
  699. package/mac-agent/node_modules/es-errors/README.md +0 -55
  700. package/mac-agent/node_modules/es-errors/eval.d.ts +0 -3
  701. package/mac-agent/node_modules/es-errors/eval.js +0 -4
  702. package/mac-agent/node_modules/es-errors/index.d.ts +0 -3
  703. package/mac-agent/node_modules/es-errors/index.js +0 -4
  704. package/mac-agent/node_modules/es-errors/package.json +0 -80
  705. package/mac-agent/node_modules/es-errors/range.d.ts +0 -3
  706. package/mac-agent/node_modules/es-errors/range.js +0 -4
  707. package/mac-agent/node_modules/es-errors/ref.d.ts +0 -3
  708. package/mac-agent/node_modules/es-errors/ref.js +0 -4
  709. package/mac-agent/node_modules/es-errors/syntax.d.ts +0 -3
  710. package/mac-agent/node_modules/es-errors/syntax.js +0 -4
  711. package/mac-agent/node_modules/es-errors/test/index.js +0 -19
  712. package/mac-agent/node_modules/es-errors/tsconfig.json +0 -49
  713. package/mac-agent/node_modules/es-errors/type.d.ts +0 -3
  714. package/mac-agent/node_modules/es-errors/type.js +0 -4
  715. package/mac-agent/node_modules/es-errors/uri.d.ts +0 -3
  716. package/mac-agent/node_modules/es-errors/uri.js +0 -4
  717. package/mac-agent/node_modules/es-object-atoms/.eslintrc +0 -16
  718. package/mac-agent/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  719. package/mac-agent/node_modules/es-object-atoms/CHANGELOG.md +0 -37
  720. package/mac-agent/node_modules/es-object-atoms/LICENSE +0 -21
  721. package/mac-agent/node_modules/es-object-atoms/README.md +0 -63
  722. package/mac-agent/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  723. package/mac-agent/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  724. package/mac-agent/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  725. package/mac-agent/node_modules/es-object-atoms/ToObject.js +0 -10
  726. package/mac-agent/node_modules/es-object-atoms/index.d.ts +0 -3
  727. package/mac-agent/node_modules/es-object-atoms/index.js +0 -4
  728. package/mac-agent/node_modules/es-object-atoms/isObject.d.ts +0 -3
  729. package/mac-agent/node_modules/es-object-atoms/isObject.js +0 -6
  730. package/mac-agent/node_modules/es-object-atoms/package.json +0 -80
  731. package/mac-agent/node_modules/es-object-atoms/test/index.js +0 -38
  732. package/mac-agent/node_modules/es-object-atoms/tsconfig.json +0 -6
  733. package/mac-agent/node_modules/es-set-tostringtag/.eslintrc +0 -13
  734. package/mac-agent/node_modules/es-set-tostringtag/.nycrc +0 -9
  735. package/mac-agent/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
  736. package/mac-agent/node_modules/es-set-tostringtag/LICENSE +0 -21
  737. package/mac-agent/node_modules/es-set-tostringtag/README.md +0 -53
  738. package/mac-agent/node_modules/es-set-tostringtag/index.d.ts +0 -10
  739. package/mac-agent/node_modules/es-set-tostringtag/index.js +0 -35
  740. package/mac-agent/node_modules/es-set-tostringtag/package.json +0 -78
  741. package/mac-agent/node_modules/es-set-tostringtag/test/index.js +0 -85
  742. package/mac-agent/node_modules/es-set-tostringtag/tsconfig.json +0 -9
  743. package/mac-agent/node_modules/fecha/LICENSE +0 -22
  744. package/mac-agent/node_modules/fecha/README.md +0 -320
  745. package/mac-agent/node_modules/fecha/dist/fecha.min.js +0 -2
  746. package/mac-agent/node_modules/fecha/dist/fecha.min.js.map +0 -1
  747. package/mac-agent/node_modules/fecha/lib/fecha.d.ts +0 -52
  748. package/mac-agent/node_modules/fecha/lib/fecha.js +0 -403
  749. package/mac-agent/node_modules/fecha/lib/fecha.js.map +0 -1
  750. package/mac-agent/node_modules/fecha/lib/fecha.umd.js +0 -418
  751. package/mac-agent/node_modules/fecha/lib/fecha.umd.js.map +0 -1
  752. package/mac-agent/node_modules/fecha/package.json +0 -55
  753. package/mac-agent/node_modules/fecha/src/fecha.ts +0 -524
  754. package/mac-agent/node_modules/fill-range/LICENSE +0 -21
  755. package/mac-agent/node_modules/fill-range/README.md +0 -237
  756. package/mac-agent/node_modules/fill-range/index.js +0 -248
  757. package/mac-agent/node_modules/fill-range/package.json +0 -74
  758. package/mac-agent/node_modules/find-up/index.js +0 -53
  759. package/mac-agent/node_modules/find-up/license +0 -21
  760. package/mac-agent/node_modules/find-up/package.json +0 -51
  761. package/mac-agent/node_modules/find-up/readme.md +0 -72
  762. package/mac-agent/node_modules/fn.name/.gitattributes +0 -1
  763. package/mac-agent/node_modules/fn.name/.travis.yml +0 -10
  764. package/mac-agent/node_modules/fn.name/LICENSE +0 -22
  765. package/mac-agent/node_modules/fn.name/README.md +0 -42
  766. package/mac-agent/node_modules/fn.name/index.js +0 -42
  767. package/mac-agent/node_modules/fn.name/package.json +0 -37
  768. package/mac-agent/node_modules/fn.name/test.js +0 -73
  769. package/mac-agent/node_modules/follow-redirects/LICENSE +0 -18
  770. package/mac-agent/node_modules/follow-redirects/README.md +0 -155
  771. package/mac-agent/node_modules/follow-redirects/debug.js +0 -15
  772. package/mac-agent/node_modules/follow-redirects/http.js +0 -1
  773. package/mac-agent/node_modules/follow-redirects/https.js +0 -1
  774. package/mac-agent/node_modules/follow-redirects/index.js +0 -686
  775. package/mac-agent/node_modules/follow-redirects/package.json +0 -58
  776. package/mac-agent/node_modules/form-data/License +0 -19
  777. package/mac-agent/node_modules/form-data/README.md.bak +0 -355
  778. package/mac-agent/node_modules/form-data/Readme.md +0 -355
  779. package/mac-agent/node_modules/form-data/index.d.ts +0 -62
  780. package/mac-agent/node_modules/form-data/lib/browser.js +0 -4
  781. package/mac-agent/node_modules/form-data/lib/form_data.js +0 -498
  782. package/mac-agent/node_modules/form-data/lib/populate.js +0 -10
  783. package/mac-agent/node_modules/form-data/package.json +0 -66
  784. package/mac-agent/node_modules/fs-minipass/LICENSE +0 -15
  785. package/mac-agent/node_modules/fs-minipass/README.md +0 -70
  786. package/mac-agent/node_modules/fs-minipass/index.js +0 -422
  787. package/mac-agent/node_modules/fs-minipass/node_modules/minipass/LICENSE +0 -15
  788. package/mac-agent/node_modules/fs-minipass/node_modules/minipass/README.md +0 -728
  789. package/mac-agent/node_modules/fs-minipass/node_modules/minipass/index.d.ts +0 -155
  790. package/mac-agent/node_modules/fs-minipass/node_modules/minipass/index.js +0 -649
  791. package/mac-agent/node_modules/fs-minipass/node_modules/minipass/package.json +0 -56
  792. package/mac-agent/node_modules/fs-minipass/package.json +0 -39
  793. package/mac-agent/node_modules/fs.realpath/LICENSE +0 -43
  794. package/mac-agent/node_modules/fs.realpath/README.md +0 -33
  795. package/mac-agent/node_modules/fs.realpath/index.js +0 -66
  796. package/mac-agent/node_modules/fs.realpath/old.js +0 -303
  797. package/mac-agent/node_modules/fs.realpath/package.json +0 -26
  798. package/mac-agent/node_modules/fsevents/LICENSE +0 -22
  799. package/mac-agent/node_modules/fsevents/README.md +0 -89
  800. package/mac-agent/node_modules/fsevents/fsevents.d.ts +0 -46
  801. package/mac-agent/node_modules/fsevents/fsevents.js +0 -83
  802. package/mac-agent/node_modules/fsevents/fsevents.node +0 -0
  803. package/mac-agent/node_modules/fsevents/package.json +0 -62
  804. package/mac-agent/node_modules/function-bind/.eslintrc +0 -21
  805. package/mac-agent/node_modules/function-bind/.github/FUNDING.yml +0 -12
  806. package/mac-agent/node_modules/function-bind/.github/SECURITY.md +0 -3
  807. package/mac-agent/node_modules/function-bind/.nycrc +0 -13
  808. package/mac-agent/node_modules/function-bind/CHANGELOG.md +0 -136
  809. package/mac-agent/node_modules/function-bind/LICENSE +0 -20
  810. package/mac-agent/node_modules/function-bind/README.md +0 -46
  811. package/mac-agent/node_modules/function-bind/implementation.js +0 -84
  812. package/mac-agent/node_modules/function-bind/index.js +0 -5
  813. package/mac-agent/node_modules/function-bind/package.json +0 -87
  814. package/mac-agent/node_modules/function-bind/test/.eslintrc +0 -9
  815. package/mac-agent/node_modules/function-bind/test/index.js +0 -252
  816. package/mac-agent/node_modules/gauge/CHANGELOG.md +0 -163
  817. package/mac-agent/node_modules/gauge/LICENSE +0 -13
  818. package/mac-agent/node_modules/gauge/README.md +0 -402
  819. package/mac-agent/node_modules/gauge/base-theme.js +0 -14
  820. package/mac-agent/node_modules/gauge/error.js +0 -24
  821. package/mac-agent/node_modules/gauge/has-color.js +0 -4
  822. package/mac-agent/node_modules/gauge/index.js +0 -233
  823. package/mac-agent/node_modules/gauge/package.json +0 -66
  824. package/mac-agent/node_modules/gauge/plumbing.js +0 -48
  825. package/mac-agent/node_modules/gauge/process.js +0 -3
  826. package/mac-agent/node_modules/gauge/progress-bar.js +0 -35
  827. package/mac-agent/node_modules/gauge/render-template.js +0 -178
  828. package/mac-agent/node_modules/gauge/set-immediate.js +0 -7
  829. package/mac-agent/node_modules/gauge/set-interval.js +0 -3
  830. package/mac-agent/node_modules/gauge/spin.js +0 -5
  831. package/mac-agent/node_modules/gauge/template-item.js +0 -72
  832. package/mac-agent/node_modules/gauge/theme-set.js +0 -114
  833. package/mac-agent/node_modules/gauge/themes.js +0 -56
  834. package/mac-agent/node_modules/gauge/wide-truncate.js +0 -25
  835. package/mac-agent/node_modules/get-caller-file/LICENSE.md +0 -6
  836. package/mac-agent/node_modules/get-caller-file/README.md +0 -4
  837. package/mac-agent/node_modules/get-caller-file/index.js +0 -20
  838. package/mac-agent/node_modules/get-caller-file/package.json +0 -31
  839. package/mac-agent/node_modules/get-intrinsic/.eslintrc +0 -42
  840. package/mac-agent/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  841. package/mac-agent/node_modules/get-intrinsic/.nycrc +0 -9
  842. package/mac-agent/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  843. package/mac-agent/node_modules/get-intrinsic/LICENSE +0 -21
  844. package/mac-agent/node_modules/get-intrinsic/README.md +0 -71
  845. package/mac-agent/node_modules/get-intrinsic/index.js +0 -378
  846. package/mac-agent/node_modules/get-intrinsic/package.json +0 -97
  847. package/mac-agent/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  848. package/mac-agent/node_modules/get-proto/.eslintrc +0 -10
  849. package/mac-agent/node_modules/get-proto/.github/FUNDING.yml +0 -12
  850. package/mac-agent/node_modules/get-proto/.nycrc +0 -9
  851. package/mac-agent/node_modules/get-proto/CHANGELOG.md +0 -21
  852. package/mac-agent/node_modules/get-proto/LICENSE +0 -21
  853. package/mac-agent/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  854. package/mac-agent/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  855. package/mac-agent/node_modules/get-proto/README.md +0 -50
  856. package/mac-agent/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  857. package/mac-agent/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  858. package/mac-agent/node_modules/get-proto/index.d.ts +0 -5
  859. package/mac-agent/node_modules/get-proto/index.js +0 -27
  860. package/mac-agent/node_modules/get-proto/package.json +0 -81
  861. package/mac-agent/node_modules/get-proto/test/index.js +0 -68
  862. package/mac-agent/node_modules/get-proto/tsconfig.json +0 -9
  863. package/mac-agent/node_modules/glob/LICENSE +0 -21
  864. package/mac-agent/node_modules/glob/README.md +0 -378
  865. package/mac-agent/node_modules/glob/common.js +0 -238
  866. package/mac-agent/node_modules/glob/glob.js +0 -790
  867. package/mac-agent/node_modules/glob/package.json +0 -55
  868. package/mac-agent/node_modules/glob/sync.js +0 -486
  869. package/mac-agent/node_modules/glob-parent/CHANGELOG.md +0 -110
  870. package/mac-agent/node_modules/glob-parent/LICENSE +0 -15
  871. package/mac-agent/node_modules/glob-parent/README.md +0 -137
  872. package/mac-agent/node_modules/glob-parent/index.js +0 -42
  873. package/mac-agent/node_modules/glob-parent/package.json +0 -48
  874. package/mac-agent/node_modules/gopd/.eslintrc +0 -16
  875. package/mac-agent/node_modules/gopd/.github/FUNDING.yml +0 -12
  876. package/mac-agent/node_modules/gopd/CHANGELOG.md +0 -45
  877. package/mac-agent/node_modules/gopd/LICENSE +0 -21
  878. package/mac-agent/node_modules/gopd/README.md +0 -40
  879. package/mac-agent/node_modules/gopd/gOPD.d.ts +0 -1
  880. package/mac-agent/node_modules/gopd/gOPD.js +0 -4
  881. package/mac-agent/node_modules/gopd/index.d.ts +0 -5
  882. package/mac-agent/node_modules/gopd/index.js +0 -15
  883. package/mac-agent/node_modules/gopd/package.json +0 -77
  884. package/mac-agent/node_modules/gopd/test/index.js +0 -36
  885. package/mac-agent/node_modules/gopd/tsconfig.json +0 -9
  886. package/mac-agent/node_modules/graceful-fs/LICENSE +0 -15
  887. package/mac-agent/node_modules/graceful-fs/README.md +0 -143
  888. package/mac-agent/node_modules/graceful-fs/clone.js +0 -23
  889. package/mac-agent/node_modules/graceful-fs/graceful-fs.js +0 -448
  890. package/mac-agent/node_modules/graceful-fs/legacy-streams.js +0 -118
  891. package/mac-agent/node_modules/graceful-fs/package.json +0 -53
  892. package/mac-agent/node_modules/graceful-fs/polyfills.js +0 -355
  893. package/mac-agent/node_modules/has-flag/index.js +0 -8
  894. package/mac-agent/node_modules/has-flag/license +0 -9
  895. package/mac-agent/node_modules/has-flag/package.json +0 -44
  896. package/mac-agent/node_modules/has-flag/readme.md +0 -70
  897. package/mac-agent/node_modules/has-property-descriptors/.eslintrc +0 -13
  898. package/mac-agent/node_modules/has-property-descriptors/.github/FUNDING.yml +0 -12
  899. package/mac-agent/node_modules/has-property-descriptors/.nycrc +0 -9
  900. package/mac-agent/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  901. package/mac-agent/node_modules/has-property-descriptors/LICENSE +0 -21
  902. package/mac-agent/node_modules/has-property-descriptors/README.md +0 -43
  903. package/mac-agent/node_modules/has-property-descriptors/index.js +0 -22
  904. package/mac-agent/node_modules/has-property-descriptors/package.json +0 -77
  905. package/mac-agent/node_modules/has-property-descriptors/test/index.js +0 -57
  906. package/mac-agent/node_modules/has-symbols/.eslintrc +0 -11
  907. package/mac-agent/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  908. package/mac-agent/node_modules/has-symbols/.nycrc +0 -9
  909. package/mac-agent/node_modules/has-symbols/CHANGELOG.md +0 -91
  910. package/mac-agent/node_modules/has-symbols/LICENSE +0 -21
  911. package/mac-agent/node_modules/has-symbols/README.md +0 -46
  912. package/mac-agent/node_modules/has-symbols/index.d.ts +0 -3
  913. package/mac-agent/node_modules/has-symbols/index.js +0 -14
  914. package/mac-agent/node_modules/has-symbols/package.json +0 -111
  915. package/mac-agent/node_modules/has-symbols/shams.d.ts +0 -3
  916. package/mac-agent/node_modules/has-symbols/shams.js +0 -45
  917. package/mac-agent/node_modules/has-symbols/test/index.js +0 -22
  918. package/mac-agent/node_modules/has-symbols/test/shams/core-js.js +0 -29
  919. package/mac-agent/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  920. package/mac-agent/node_modules/has-symbols/test/tests.js +0 -58
  921. package/mac-agent/node_modules/has-symbols/tsconfig.json +0 -10
  922. package/mac-agent/node_modules/has-tostringtag/.eslintrc +0 -5
  923. package/mac-agent/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
  924. package/mac-agent/node_modules/has-tostringtag/.nycrc +0 -13
  925. package/mac-agent/node_modules/has-tostringtag/CHANGELOG.md +0 -42
  926. package/mac-agent/node_modules/has-tostringtag/LICENSE +0 -21
  927. package/mac-agent/node_modules/has-tostringtag/README.md +0 -46
  928. package/mac-agent/node_modules/has-tostringtag/index.d.ts +0 -3
  929. package/mac-agent/node_modules/has-tostringtag/index.js +0 -8
  930. package/mac-agent/node_modules/has-tostringtag/package.json +0 -108
  931. package/mac-agent/node_modules/has-tostringtag/shams.d.ts +0 -3
  932. package/mac-agent/node_modules/has-tostringtag/shams.js +0 -8
  933. package/mac-agent/node_modules/has-tostringtag/test/index.js +0 -21
  934. package/mac-agent/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
  935. package/mac-agent/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
  936. package/mac-agent/node_modules/has-tostringtag/test/tests.js +0 -15
  937. package/mac-agent/node_modules/has-tostringtag/tsconfig.json +0 -49
  938. package/mac-agent/node_modules/has-unicode/LICENSE +0 -14
  939. package/mac-agent/node_modules/has-unicode/README.md +0 -43
  940. package/mac-agent/node_modules/has-unicode/index.js +0 -16
  941. package/mac-agent/node_modules/has-unicode/package.json +0 -30
  942. package/mac-agent/node_modules/hasown/.eslintrc +0 -5
  943. package/mac-agent/node_modules/hasown/.github/FUNDING.yml +0 -12
  944. package/mac-agent/node_modules/hasown/.nycrc +0 -13
  945. package/mac-agent/node_modules/hasown/CHANGELOG.md +0 -40
  946. package/mac-agent/node_modules/hasown/LICENSE +0 -21
  947. package/mac-agent/node_modules/hasown/README.md +0 -40
  948. package/mac-agent/node_modules/hasown/index.d.ts +0 -3
  949. package/mac-agent/node_modules/hasown/index.js +0 -8
  950. package/mac-agent/node_modules/hasown/package.json +0 -92
  951. package/mac-agent/node_modules/hasown/tsconfig.json +0 -6
  952. package/mac-agent/node_modules/hosted-git-info/CHANGELOG.md +0 -151
  953. package/mac-agent/node_modules/hosted-git-info/LICENSE +0 -13
  954. package/mac-agent/node_modules/hosted-git-info/README.md +0 -133
  955. package/mac-agent/node_modules/hosted-git-info/git-host-info.js +0 -79
  956. package/mac-agent/node_modules/hosted-git-info/git-host.js +0 -156
  957. package/mac-agent/node_modules/hosted-git-info/index.js +0 -148
  958. package/mac-agent/node_modules/hosted-git-info/package.json +0 -40
  959. package/mac-agent/node_modules/https-proxy-agent/README.md +0 -137
  960. package/mac-agent/node_modules/https-proxy-agent/dist/agent.d.ts +0 -30
  961. package/mac-agent/node_modules/https-proxy-agent/dist/agent.js +0 -177
  962. package/mac-agent/node_modules/https-proxy-agent/dist/agent.js.map +0 -1
  963. package/mac-agent/node_modules/https-proxy-agent/dist/index.d.ts +0 -23
  964. package/mac-agent/node_modules/https-proxy-agent/dist/index.js +0 -14
  965. package/mac-agent/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  966. package/mac-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -7
  967. package/mac-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -66
  968. package/mac-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  969. package/mac-agent/node_modules/https-proxy-agent/package.json +0 -56
  970. package/mac-agent/node_modules/ignore-by-default/LICENSE +0 -14
  971. package/mac-agent/node_modules/ignore-by-default/README.md +0 -26
  972. package/mac-agent/node_modules/ignore-by-default/index.js +0 -12
  973. package/mac-agent/node_modules/ignore-by-default/package.json +0 -34
  974. package/mac-agent/node_modules/inflight/LICENSE +0 -15
  975. package/mac-agent/node_modules/inflight/README.md +0 -37
  976. package/mac-agent/node_modules/inflight/inflight.js +0 -54
  977. package/mac-agent/node_modules/inflight/package.json +0 -29
  978. package/mac-agent/node_modules/inherits/LICENSE +0 -16
  979. package/mac-agent/node_modules/inherits/README.md +0 -42
  980. package/mac-agent/node_modules/inherits/inherits.js +0 -9
  981. package/mac-agent/node_modules/inherits/inherits_browser.js +0 -27
  982. package/mac-agent/node_modules/inherits/package.json +0 -29
  983. package/mac-agent/node_modules/invert-kv/index.js +0 -15
  984. package/mac-agent/node_modules/invert-kv/package.json +0 -33
  985. package/mac-agent/node_modules/invert-kv/readme.md +0 -25
  986. package/mac-agent/node_modules/is-arrayish/LICENSE +0 -21
  987. package/mac-agent/node_modules/is-arrayish/README.md +0 -16
  988. package/mac-agent/node_modules/is-arrayish/index.js +0 -9
  989. package/mac-agent/node_modules/is-arrayish/package.json +0 -45
  990. package/mac-agent/node_modules/is-arrayish/yarn-error.log +0 -1443
  991. package/mac-agent/node_modules/is-binary-path/index.d.ts +0 -17
  992. package/mac-agent/node_modules/is-binary-path/index.js +0 -7
  993. package/mac-agent/node_modules/is-binary-path/license +0 -9
  994. package/mac-agent/node_modules/is-binary-path/package.json +0 -40
  995. package/mac-agent/node_modules/is-binary-path/readme.md +0 -34
  996. package/mac-agent/node_modules/is-core-module/.eslintrc +0 -18
  997. package/mac-agent/node_modules/is-core-module/.nycrc +0 -9
  998. package/mac-agent/node_modules/is-core-module/CHANGELOG.md +0 -218
  999. package/mac-agent/node_modules/is-core-module/LICENSE +0 -20
  1000. package/mac-agent/node_modules/is-core-module/README.md +0 -40
  1001. package/mac-agent/node_modules/is-core-module/core.json +0 -162
  1002. package/mac-agent/node_modules/is-core-module/index.js +0 -69
  1003. package/mac-agent/node_modules/is-core-module/package.json +0 -76
  1004. package/mac-agent/node_modules/is-core-module/test/index.js +0 -157
  1005. package/mac-agent/node_modules/is-extglob/LICENSE +0 -21
  1006. package/mac-agent/node_modules/is-extglob/README.md +0 -107
  1007. package/mac-agent/node_modules/is-extglob/index.js +0 -20
  1008. package/mac-agent/node_modules/is-extglob/package.json +0 -69
  1009. package/mac-agent/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  1010. package/mac-agent/node_modules/is-fullwidth-code-point/index.js +0 -50
  1011. package/mac-agent/node_modules/is-fullwidth-code-point/license +0 -9
  1012. package/mac-agent/node_modules/is-fullwidth-code-point/package.json +0 -42
  1013. package/mac-agent/node_modules/is-fullwidth-code-point/readme.md +0 -39
  1014. package/mac-agent/node_modules/is-glob/LICENSE +0 -21
  1015. package/mac-agent/node_modules/is-glob/README.md +0 -206
  1016. package/mac-agent/node_modules/is-glob/index.js +0 -150
  1017. package/mac-agent/node_modules/is-glob/package.json +0 -81
  1018. package/mac-agent/node_modules/is-number/LICENSE +0 -21
  1019. package/mac-agent/node_modules/is-number/README.md +0 -187
  1020. package/mac-agent/node_modules/is-number/index.js +0 -18
  1021. package/mac-agent/node_modules/is-number/package.json +0 -82
  1022. package/mac-agent/node_modules/is-stream/index.d.ts +0 -79
  1023. package/mac-agent/node_modules/is-stream/index.js +0 -28
  1024. package/mac-agent/node_modules/is-stream/license +0 -9
  1025. package/mac-agent/node_modules/is-stream/package.json +0 -42
  1026. package/mac-agent/node_modules/is-stream/readme.md +0 -60
  1027. package/mac-agent/node_modules/is-utf8/LICENSE +0 -9
  1028. package/mac-agent/node_modules/is-utf8/README.md +0 -16
  1029. package/mac-agent/node_modules/is-utf8/is-utf8.js +0 -76
  1030. package/mac-agent/node_modules/is-utf8/package.json +0 -19
  1031. package/mac-agent/node_modules/isexe/LICENSE +0 -15
  1032. package/mac-agent/node_modules/isexe/README.md +0 -51
  1033. package/mac-agent/node_modules/isexe/index.js +0 -57
  1034. package/mac-agent/node_modules/isexe/mode.js +0 -41
  1035. package/mac-agent/node_modules/isexe/package.json +0 -31
  1036. package/mac-agent/node_modules/isexe/test/basic.js +0 -221
  1037. package/mac-agent/node_modules/isexe/windows.js +0 -42
  1038. package/mac-agent/node_modules/kuler/.travis.yml +0 -5
  1039. package/mac-agent/node_modules/kuler/LICENSE +0 -7
  1040. package/mac-agent/node_modules/kuler/README.md +0 -40
  1041. package/mac-agent/node_modules/kuler/index.js +0 -118
  1042. package/mac-agent/node_modules/kuler/package.json +0 -34
  1043. package/mac-agent/node_modules/kuler/test.js +0 -23
  1044. package/mac-agent/node_modules/lcid/index.js +0 -22
  1045. package/mac-agent/node_modules/lcid/lcid.json +0 -203
  1046. package/mac-agent/node_modules/lcid/license +0 -21
  1047. package/mac-agent/node_modules/lcid/package.json +0 -46
  1048. package/mac-agent/node_modules/lcid/readme.md +0 -35
  1049. package/mac-agent/node_modules/load-json-file/index.js +0 -21
  1050. package/mac-agent/node_modules/load-json-file/license +0 -21
  1051. package/mac-agent/node_modules/load-json-file/package.json +0 -46
  1052. package/mac-agent/node_modules/load-json-file/readme.md +0 -45
  1053. package/mac-agent/node_modules/logform/.babelrc +0 -3
  1054. package/mac-agent/node_modules/logform/.eslintrc +0 -7
  1055. package/mac-agent/node_modules/logform/.gitattributes +0 -1
  1056. package/mac-agent/node_modules/logform/CHANGELOG.md +0 -309
  1057. package/mac-agent/node_modules/logform/LICENSE +0 -21
  1058. package/mac-agent/node_modules/logform/README.md +0 -653
  1059. package/mac-agent/node_modules/logform/align.js +0 -14
  1060. package/mac-agent/node_modules/logform/browser.js +0 -38
  1061. package/mac-agent/node_modules/logform/cli.js +0 -52
  1062. package/mac-agent/node_modules/logform/colorize.js +0 -122
  1063. package/mac-agent/node_modules/logform/combine.js +0 -66
  1064. package/mac-agent/node_modules/logform/dist/align.js +0 -14
  1065. package/mac-agent/node_modules/logform/dist/browser.js +0 -72
  1066. package/mac-agent/node_modules/logform/dist/cli.js +0 -62
  1067. package/mac-agent/node_modules/logform/dist/colorize.js +0 -131
  1068. package/mac-agent/node_modules/logform/dist/combine.js +0 -62
  1069. package/mac-agent/node_modules/logform/dist/errors.js +0 -44
  1070. package/mac-agent/node_modules/logform/dist/format.js +0 -70
  1071. package/mac-agent/node_modules/logform/dist/index.js +0 -86
  1072. package/mac-agent/node_modules/logform/dist/json.js +0 -30
  1073. package/mac-agent/node_modules/logform/dist/label.js +0 -18
  1074. package/mac-agent/node_modules/logform/dist/levels.js +0 -13
  1075. package/mac-agent/node_modules/logform/dist/logstash.js +0 -28
  1076. package/mac-agent/node_modules/logform/dist/metadata.js +0 -56
  1077. package/mac-agent/node_modules/logform/dist/ms.js +0 -18
  1078. package/mac-agent/node_modules/logform/dist/pad-levels.js +0 -110
  1079. package/mac-agent/node_modules/logform/dist/pretty-print.js +0 -32
  1080. package/mac-agent/node_modules/logform/dist/printf.js +0 -33
  1081. package/mac-agent/node_modules/logform/dist/simple.js +0 -32
  1082. package/mac-agent/node_modules/logform/dist/splat.js +0 -143
  1083. package/mac-agent/node_modules/logform/dist/timestamp.js +0 -26
  1084. package/mac-agent/node_modules/logform/dist/uncolorize.js +0 -25
  1085. package/mac-agent/node_modules/logform/errors.js +0 -41
  1086. package/mac-agent/node_modules/logform/format.js +0 -52
  1087. package/mac-agent/node_modules/logform/index.d.ts +0 -201
  1088. package/mac-agent/node_modules/logform/index.js +0 -52
  1089. package/mac-agent/node_modules/logform/json.js +0 -30
  1090. package/mac-agent/node_modules/logform/label.js +0 -19
  1091. package/mac-agent/node_modules/logform/levels.js +0 -12
  1092. package/mac-agent/node_modules/logform/logstash.js +0 -29
  1093. package/mac-agent/node_modules/logform/metadata.js +0 -61
  1094. package/mac-agent/node_modules/logform/ms.js +0 -18
  1095. package/mac-agent/node_modules/logform/package.json +0 -53
  1096. package/mac-agent/node_modules/logform/pad-levels.js +0 -83
  1097. package/mac-agent/node_modules/logform/pretty-print.js +0 -29
  1098. package/mac-agent/node_modules/logform/printf.js +0 -26
  1099. package/mac-agent/node_modules/logform/simple.js +0 -33
  1100. package/mac-agent/node_modules/logform/splat.js +0 -132
  1101. package/mac-agent/node_modules/logform/timestamp.js +0 -30
  1102. package/mac-agent/node_modules/logform/tsconfig.json +0 -22
  1103. package/mac-agent/node_modules/logform/uncolorize.js +0 -27
  1104. package/mac-agent/node_modules/make-dir/index.d.ts +0 -66
  1105. package/mac-agent/node_modules/make-dir/index.js +0 -156
  1106. package/mac-agent/node_modules/make-dir/license +0 -9
  1107. package/mac-agent/node_modules/make-dir/node_modules/semver/LICENSE +0 -15
  1108. package/mac-agent/node_modules/make-dir/node_modules/semver/README.md +0 -443
  1109. package/mac-agent/node_modules/make-dir/node_modules/semver/bin/semver.js +0 -174
  1110. package/mac-agent/node_modules/make-dir/node_modules/semver/package.json +0 -38
  1111. package/mac-agent/node_modules/make-dir/node_modules/semver/range.bnf +0 -16
  1112. package/mac-agent/node_modules/make-dir/node_modules/semver/semver.js +0 -1643
  1113. package/mac-agent/node_modules/make-dir/package.json +0 -59
  1114. package/mac-agent/node_modules/make-dir/readme.md +0 -125
  1115. package/mac-agent/node_modules/math-intrinsics/.eslintrc +0 -16
  1116. package/mac-agent/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  1117. package/mac-agent/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  1118. package/mac-agent/node_modules/math-intrinsics/LICENSE +0 -21
  1119. package/mac-agent/node_modules/math-intrinsics/README.md +0 -50
  1120. package/mac-agent/node_modules/math-intrinsics/abs.d.ts +0 -1
  1121. package/mac-agent/node_modules/math-intrinsics/abs.js +0 -4
  1122. package/mac-agent/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  1123. package/mac-agent/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  1124. package/mac-agent/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  1125. package/mac-agent/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  1126. package/mac-agent/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  1127. package/mac-agent/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  1128. package/mac-agent/node_modules/math-intrinsics/floor.d.ts +0 -1
  1129. package/mac-agent/node_modules/math-intrinsics/floor.js +0 -4
  1130. package/mac-agent/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  1131. package/mac-agent/node_modules/math-intrinsics/isFinite.js +0 -12
  1132. package/mac-agent/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  1133. package/mac-agent/node_modules/math-intrinsics/isInteger.js +0 -16
  1134. package/mac-agent/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  1135. package/mac-agent/node_modules/math-intrinsics/isNaN.js +0 -6
  1136. package/mac-agent/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  1137. package/mac-agent/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  1138. package/mac-agent/node_modules/math-intrinsics/max.d.ts +0 -1
  1139. package/mac-agent/node_modules/math-intrinsics/max.js +0 -4
  1140. package/mac-agent/node_modules/math-intrinsics/min.d.ts +0 -1
  1141. package/mac-agent/node_modules/math-intrinsics/min.js +0 -4
  1142. package/mac-agent/node_modules/math-intrinsics/mod.d.ts +0 -3
  1143. package/mac-agent/node_modules/math-intrinsics/mod.js +0 -9
  1144. package/mac-agent/node_modules/math-intrinsics/package.json +0 -86
  1145. package/mac-agent/node_modules/math-intrinsics/pow.d.ts +0 -1
  1146. package/mac-agent/node_modules/math-intrinsics/pow.js +0 -4
  1147. package/mac-agent/node_modules/math-intrinsics/round.d.ts +0 -1
  1148. package/mac-agent/node_modules/math-intrinsics/round.js +0 -4
  1149. package/mac-agent/node_modules/math-intrinsics/sign.d.ts +0 -3
  1150. package/mac-agent/node_modules/math-intrinsics/sign.js +0 -11
  1151. package/mac-agent/node_modules/math-intrinsics/test/index.js +0 -192
  1152. package/mac-agent/node_modules/math-intrinsics/tsconfig.json +0 -3
  1153. package/mac-agent/node_modules/mime-db/HISTORY.md +0 -507
  1154. package/mac-agent/node_modules/mime-db/LICENSE +0 -23
  1155. package/mac-agent/node_modules/mime-db/README.md +0 -100
  1156. package/mac-agent/node_modules/mime-db/db.json +0 -8519
  1157. package/mac-agent/node_modules/mime-db/index.js +0 -12
  1158. package/mac-agent/node_modules/mime-db/package.json +0 -60
  1159. package/mac-agent/node_modules/mime-types/HISTORY.md +0 -397
  1160. package/mac-agent/node_modules/mime-types/LICENSE +0 -23
  1161. package/mac-agent/node_modules/mime-types/README.md +0 -113
  1162. package/mac-agent/node_modules/mime-types/index.js +0 -188
  1163. package/mac-agent/node_modules/mime-types/package.json +0 -44
  1164. package/mac-agent/node_modules/minimatch/LICENSE +0 -15
  1165. package/mac-agent/node_modules/minimatch/README.md +0 -230
  1166. package/mac-agent/node_modules/minimatch/minimatch.js +0 -947
  1167. package/mac-agent/node_modules/minimatch/package.json +0 -33
  1168. package/mac-agent/node_modules/minipass/LICENSE +0 -15
  1169. package/mac-agent/node_modules/minipass/README.md +0 -769
  1170. package/mac-agent/node_modules/minipass/index.d.ts +0 -152
  1171. package/mac-agent/node_modules/minipass/index.js +0 -702
  1172. package/mac-agent/node_modules/minipass/index.mjs +0 -702
  1173. package/mac-agent/node_modules/minipass/package.json +0 -76
  1174. package/mac-agent/node_modules/minizlib/LICENSE +0 -26
  1175. package/mac-agent/node_modules/minizlib/README.md +0 -60
  1176. package/mac-agent/node_modules/minizlib/constants.js +0 -115
  1177. package/mac-agent/node_modules/minizlib/index.js +0 -348
  1178. package/mac-agent/node_modules/minizlib/node_modules/minipass/LICENSE +0 -15
  1179. package/mac-agent/node_modules/minizlib/node_modules/minipass/README.md +0 -728
  1180. package/mac-agent/node_modules/minizlib/node_modules/minipass/index.d.ts +0 -155
  1181. package/mac-agent/node_modules/minizlib/node_modules/minipass/index.js +0 -649
  1182. package/mac-agent/node_modules/minizlib/node_modules/minipass/package.json +0 -56
  1183. package/mac-agent/node_modules/minizlib/package.json +0 -42
  1184. package/mac-agent/node_modules/mkdirp/CHANGELOG.md +0 -15
  1185. package/mac-agent/node_modules/mkdirp/LICENSE +0 -21
  1186. package/mac-agent/node_modules/mkdirp/bin/cmd.js +0 -68
  1187. package/mac-agent/node_modules/mkdirp/index.js +0 -31
  1188. package/mac-agent/node_modules/mkdirp/lib/find-made.js +0 -29
  1189. package/mac-agent/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  1190. package/mac-agent/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  1191. package/mac-agent/node_modules/mkdirp/lib/opts-arg.js +0 -23
  1192. package/mac-agent/node_modules/mkdirp/lib/path-arg.js +0 -29
  1193. package/mac-agent/node_modules/mkdirp/lib/use-native.js +0 -10
  1194. package/mac-agent/node_modules/mkdirp/package.json +0 -44
  1195. package/mac-agent/node_modules/mkdirp/readme.markdown +0 -266
  1196. package/mac-agent/node_modules/ms/index.js +0 -162
  1197. package/mac-agent/node_modules/ms/license.md +0 -21
  1198. package/mac-agent/node_modules/ms/package.json +0 -38
  1199. package/mac-agent/node_modules/ms/readme.md +0 -59
  1200. package/mac-agent/node_modules/nan/.github/workflows/ci.yml +0 -52
  1201. package/mac-agent/node_modules/nan/CHANGELOG.md +0 -577
  1202. package/mac-agent/node_modules/nan/CMakeLists.txt +0 -138
  1203. package/mac-agent/node_modules/nan/LICENSE.md +0 -9
  1204. package/mac-agent/node_modules/nan/README.md +0 -455
  1205. package/mac-agent/node_modules/nan/doc/asyncworker.md +0 -146
  1206. package/mac-agent/node_modules/nan/doc/buffers.md +0 -54
  1207. package/mac-agent/node_modules/nan/doc/callback.md +0 -76
  1208. package/mac-agent/node_modules/nan/doc/converters.md +0 -41
  1209. package/mac-agent/node_modules/nan/doc/errors.md +0 -226
  1210. package/mac-agent/node_modules/nan/doc/json.md +0 -62
  1211. package/mac-agent/node_modules/nan/doc/maybe_types.md +0 -583
  1212. package/mac-agent/node_modules/nan/doc/methods.md +0 -672
  1213. package/mac-agent/node_modules/nan/doc/new.md +0 -147
  1214. package/mac-agent/node_modules/nan/doc/node_misc.md +0 -123
  1215. package/mac-agent/node_modules/nan/doc/object_wrappers.md +0 -263
  1216. package/mac-agent/node_modules/nan/doc/persistent.md +0 -296
  1217. package/mac-agent/node_modules/nan/doc/scopes.md +0 -73
  1218. package/mac-agent/node_modules/nan/doc/script.md +0 -58
  1219. package/mac-agent/node_modules/nan/doc/string_bytes.md +0 -62
  1220. package/mac-agent/node_modules/nan/doc/v8_internals.md +0 -199
  1221. package/mac-agent/node_modules/nan/doc/v8_misc.md +0 -85
  1222. package/mac-agent/node_modules/nan/include_dirs.js +0 -1
  1223. package/mac-agent/node_modules/nan/nan.h +0 -3049
  1224. package/mac-agent/node_modules/nan/nan_callbacks.h +0 -128
  1225. package/mac-agent/node_modules/nan/nan_callbacks_12_inl.h +0 -676
  1226. package/mac-agent/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
  1227. package/mac-agent/node_modules/nan/nan_converters.h +0 -72
  1228. package/mac-agent/node_modules/nan/nan_converters_43_inl.h +0 -68
  1229. package/mac-agent/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  1230. package/mac-agent/node_modules/nan/nan_define_own_property_helper.h +0 -29
  1231. package/mac-agent/node_modules/nan/nan_implementation_12_inl.h +0 -430
  1232. package/mac-agent/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  1233. package/mac-agent/node_modules/nan/nan_json.h +0 -166
  1234. package/mac-agent/node_modules/nan/nan_maybe_43_inl.h +0 -356
  1235. package/mac-agent/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  1236. package/mac-agent/node_modules/nan/nan_new.h +0 -340
  1237. package/mac-agent/node_modules/nan/nan_object_wrap.h +0 -156
  1238. package/mac-agent/node_modules/nan/nan_persistent_12_inl.h +0 -132
  1239. package/mac-agent/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  1240. package/mac-agent/node_modules/nan/nan_private.h +0 -73
  1241. package/mac-agent/node_modules/nan/nan_scriptorigin.h +0 -95
  1242. package/mac-agent/node_modules/nan/nan_string_bytes.h +0 -305
  1243. package/mac-agent/node_modules/nan/nan_typedarray_contents.h +0 -96
  1244. package/mac-agent/node_modules/nan/nan_weak.h +0 -437
  1245. package/mac-agent/node_modules/nan/package.json +0 -38
  1246. package/mac-agent/node_modules/nan/tools/1to2.js +0 -412
  1247. package/mac-agent/node_modules/nan/tools/README.md +0 -14
  1248. package/mac-agent/node_modules/nan/tools/package.json +0 -19
  1249. package/mac-agent/node_modules/node-addon-api/.editorconfig +0 -8
  1250. package/mac-agent/node_modules/node-addon-api/.travis.yml +0 -65
  1251. package/mac-agent/node_modules/node-addon-api/CHANGELOG.md +0 -325
  1252. package/mac-agent/node_modules/node-addon-api/CODE_OF_CONDUCT.md +0 -4
  1253. package/mac-agent/node_modules/node-addon-api/CONTRIBUTING.md +0 -66
  1254. package/mac-agent/node_modules/node-addon-api/LICENSE.md +0 -13
  1255. package/mac-agent/node_modules/node-addon-api/README.md +0 -200
  1256. package/mac-agent/node_modules/node-addon-api/appveyor.yml +0 -48
  1257. package/mac-agent/node_modules/node-addon-api/doc/Doxyfile +0 -2450
  1258. package/mac-agent/node_modules/node-addon-api/doc/array_buffer.md +0 -129
  1259. package/mac-agent/node_modules/node-addon-api/doc/async_context.md +0 -76
  1260. package/mac-agent/node_modules/node-addon-api/doc/async_operations.md +0 -31
  1261. package/mac-agent/node_modules/node-addon-api/doc/async_worker.md +0 -397
  1262. package/mac-agent/node_modules/node-addon-api/doc/basic_types.md +0 -415
  1263. package/mac-agent/node_modules/node-addon-api/doc/bigint.md +0 -92
  1264. package/mac-agent/node_modules/node-addon-api/doc/boolean.md +0 -64
  1265. package/mac-agent/node_modules/node-addon-api/doc/buffer.md +0 -140
  1266. package/mac-agent/node_modules/node-addon-api/doc/callback_scope.md +0 -54
  1267. package/mac-agent/node_modules/node-addon-api/doc/callbackinfo.md +0 -97
  1268. package/mac-agent/node_modules/node-addon-api/doc/checker-tool.md +0 -32
  1269. package/mac-agent/node_modules/node-addon-api/doc/class_property_descriptor.md +0 -118
  1270. package/mac-agent/node_modules/node-addon-api/doc/cmake-js.md +0 -19
  1271. package/mac-agent/node_modules/node-addon-api/doc/conversion-tool.md +0 -28
  1272. package/mac-agent/node_modules/node-addon-api/doc/creating_a_release.md +0 -62
  1273. package/mac-agent/node_modules/node-addon-api/doc/dataview.md +0 -244
  1274. package/mac-agent/node_modules/node-addon-api/doc/env.md +0 -63
  1275. package/mac-agent/node_modules/node-addon-api/doc/error.md +0 -115
  1276. package/mac-agent/node_modules/node-addon-api/doc/error_handling.md +0 -186
  1277. package/mac-agent/node_modules/node-addon-api/doc/escapable_handle_scope.md +0 -82
  1278. package/mac-agent/node_modules/node-addon-api/doc/external.md +0 -59
  1279. package/mac-agent/node_modules/node-addon-api/doc/function.md +0 -294
  1280. package/mac-agent/node_modules/node-addon-api/doc/function_reference.md +0 -238
  1281. package/mac-agent/node_modules/node-addon-api/doc/generator.md +0 -13
  1282. package/mac-agent/node_modules/node-addon-api/doc/handle_scope.md +0 -65
  1283. package/mac-agent/node_modules/node-addon-api/doc/memory_management.md +0 -27
  1284. package/mac-agent/node_modules/node-addon-api/doc/node-gyp.md +0 -82
  1285. package/mac-agent/node_modules/node-addon-api/doc/number.md +0 -163
  1286. package/mac-agent/node_modules/node-addon-api/doc/object.md +0 -202
  1287. package/mac-agent/node_modules/node-addon-api/doc/object_lifetime_management.md +0 -83
  1288. package/mac-agent/node_modules/node-addon-api/doc/object_reference.md +0 -117
  1289. package/mac-agent/node_modules/node-addon-api/doc/object_wrap.md +0 -546
  1290. package/mac-agent/node_modules/node-addon-api/doc/prebuild_tools.md +0 -16
  1291. package/mac-agent/node_modules/node-addon-api/doc/promises.md +0 -74
  1292. package/mac-agent/node_modules/node-addon-api/doc/property_descriptor.md +0 -231
  1293. package/mac-agent/node_modules/node-addon-api/doc/range_error.md +0 -59
  1294. package/mac-agent/node_modules/node-addon-api/doc/reference.md +0 -111
  1295. package/mac-agent/node_modules/node-addon-api/doc/setup.md +0 -82
  1296. package/mac-agent/node_modules/node-addon-api/doc/string.md +0 -89
  1297. package/mac-agent/node_modules/node-addon-api/doc/symbol.md +0 -44
  1298. package/mac-agent/node_modules/node-addon-api/doc/threadsafe_function.md +0 -303
  1299. package/mac-agent/node_modules/node-addon-api/doc/type_error.md +0 -59
  1300. package/mac-agent/node_modules/node-addon-api/doc/typed_array.md +0 -74
  1301. package/mac-agent/node_modules/node-addon-api/doc/typed_array_of.md +0 -133
  1302. package/mac-agent/node_modules/node-addon-api/doc/value.md +0 -269
  1303. package/mac-agent/node_modules/node-addon-api/doc/version_management.md +0 -43
  1304. package/mac-agent/node_modules/node-addon-api/doc/working_with_javascript_values.md +0 -14
  1305. package/mac-agent/node_modules/node-addon-api/external-napi/node_api.h +0 -7
  1306. package/mac-agent/node_modules/node-addon-api/index.js +0 -45
  1307. package/mac-agent/node_modules/node-addon-api/napi-inl.deprecated.h +0 -192
  1308. package/mac-agent/node_modules/node-addon-api/napi-inl.h +0 -4097
  1309. package/mac-agent/node_modules/node-addon-api/napi.h +0 -2053
  1310. package/mac-agent/node_modules/node-addon-api/package.json +0 -79
  1311. package/mac-agent/node_modules/node-addon-api/src/node_api.cc +0 -3655
  1312. package/mac-agent/node_modules/node-addon-api/src/node_api.gyp +0 -21
  1313. package/mac-agent/node_modules/node-addon-api/src/node_api.h +0 -588
  1314. package/mac-agent/node_modules/node-addon-api/src/node_api_types.h +0 -115
  1315. package/mac-agent/node_modules/node-addon-api/src/node_internals.cc +0 -142
  1316. package/mac-agent/node_modules/node-addon-api/src/node_internals.h +0 -157
  1317. package/mac-agent/node_modules/node-addon-api/src/nothing.c +0 -0
  1318. package/mac-agent/node_modules/node-addon-api/src/util-inl.h +0 -38
  1319. package/mac-agent/node_modules/node-addon-api/src/util.h +0 -7
  1320. package/mac-agent/node_modules/node-addon-api/tools/README.md +0 -67
  1321. package/mac-agent/node_modules/node-addon-api/tools/check-napi.js +0 -100
  1322. package/mac-agent/node_modules/node-addon-api/tools/conversion.js +0 -313
  1323. package/mac-agent/node_modules/node-cmake/.jshintrc +0 -20
  1324. package/mac-agent/node_modules/node-cmake/LICENSE.txt +0 -15
  1325. package/mac-agent/node_modules/node-cmake/NodeJS.cmake +0 -637
  1326. package/mac-agent/node_modules/node-cmake/README.md +0 -93
  1327. package/mac-agent/node_modules/node-cmake/docs/Nan.md +0 -9
  1328. package/mac-agent/node_modules/node-cmake/docs/NcmakeManual.md +0 -83
  1329. package/mac-agent/node_modules/node-cmake/docs/NodeJSCmakeManual.md +0 -107
  1330. package/mac-agent/node_modules/node-cmake/example/CMakeLists.txt +0 -8
  1331. package/mac-agent/node_modules/node-cmake/example/README.md +0 -28
  1332. package/mac-agent/node_modules/node-cmake/example/index.js +0 -2
  1333. package/mac-agent/node_modules/node-cmake/example/package.json +0 -20
  1334. package/mac-agent/node_modules/node-cmake/example/src/hello.cc +0 -16
  1335. package/mac-agent/node_modules/node-cmake/index.js +0 -44
  1336. package/mac-agent/node_modules/node-cmake/lib/embed.js +0 -17
  1337. package/mac-agent/node_modules/node-cmake/lib/ncmake.js +0 -284
  1338. package/mac-agent/node_modules/node-cmake/package.json +0 -34
  1339. package/mac-agent/node_modules/node-cmake/src/win_delay_load_hook.c +0 -68
  1340. package/mac-agent/node_modules/node-fetch/LICENSE.md +0 -22
  1341. package/mac-agent/node_modules/node-fetch/README.md +0 -634
  1342. package/mac-agent/node_modules/node-fetch/browser.js +0 -25
  1343. package/mac-agent/node_modules/node-fetch/lib/index.es.js +0 -1777
  1344. package/mac-agent/node_modules/node-fetch/lib/index.js +0 -1787
  1345. package/mac-agent/node_modules/node-fetch/lib/index.mjs +0 -1775
  1346. package/mac-agent/node_modules/node-fetch/package.json +0 -89
  1347. package/mac-agent/node_modules/node-pty/LICENSE +0 -69
  1348. package/mac-agent/node_modules/node-pty/README.md +0 -163
  1349. package/mac-agent/node_modules/node-pty/binding.gyp +0 -117
  1350. package/mac-agent/node_modules/node-pty/build/Makefile +0 -352
  1351. package/mac-agent/node_modules/node-pty/build/Release/pty.node +0 -0
  1352. package/mac-agent/node_modules/node-pty/build/Release/spawn-helper +0 -0
  1353. package/mac-agent/node_modules/node-pty/build/binding.Makefile +0 -6
  1354. package/mac-agent/node_modules/node-pty/build/gyp-mac-tool +0 -768
  1355. package/mac-agent/node_modules/node-pty/build/pty.target.mk +0 -183
  1356. package/mac-agent/node_modules/node-pty/build/spawn-helper.target.mk +0 -172
  1357. package/mac-agent/node_modules/node-pty/deps/.editorconfig +0 -2
  1358. package/mac-agent/node_modules/node-pty/deps/winpty/.drone.yml +0 -17
  1359. package/mac-agent/node_modules/node-pty/deps/winpty/.gitattributes +0 -19
  1360. package/mac-agent/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  1361. package/mac-agent/node_modules/node-pty/deps/winpty/Makefile +0 -166
  1362. package/mac-agent/node_modules/node-pty/deps/winpty/README.md +0 -151
  1363. package/mac-agent/node_modules/node-pty/deps/winpty/RELEASES.md +0 -280
  1364. package/mac-agent/node_modules/node-pty/deps/winpty/VERSION.txt +0 -1
  1365. package/mac-agent/node_modules/node-pty/deps/winpty/configure +0 -167
  1366. package/mac-agent/node_modules/node-pty/deps/winpty/misc/BufferResizeTests.cc +0 -90
  1367. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ChangeScreenBuffer.cc +0 -53
  1368. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ClearConsole.cc +0 -72
  1369. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ConinMode.cc +0 -117
  1370. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  1371. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ConoutMode.cc +0 -113
  1372. package/mac-agent/node_modules/node-pty/deps/winpty/misc/DebugClient.py +0 -42
  1373. package/mac-agent/node_modules/node-pty/deps/winpty/misc/DebugServer.py +0 -63
  1374. package/mac-agent/node_modules/node-pty/deps/winpty/misc/DumpLines.py +0 -5
  1375. package/mac-agent/node_modules/node-pty/deps/winpty/misc/EnableExtendedFlags.txt +0 -46
  1376. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Consolas.txt +0 -528
  1377. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP437-Lucida.txt +0 -633
  1378. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP932.txt +0 -630
  1379. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP936.txt +0 -630
  1380. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP949.txt +0 -630
  1381. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/CP950.txt +0 -630
  1382. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt +0 -16
  1383. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt +0 -4
  1384. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Windows10SetFontBugginess.txt +0 -144
  1385. package/mac-agent/node_modules/node-pty/deps/winpty/misc/FontSurvey.cc +0 -100
  1386. package/mac-agent/node_modules/node-pty/deps/winpty/misc/FormatChar.h +0 -21
  1387. package/mac-agent/node_modules/node-pty/deps/winpty/misc/FreezePerfTest.cc +0 -62
  1388. package/mac-agent/node_modules/node-pty/deps/winpty/misc/GetCh.cc +0 -20
  1389. package/mac-agent/node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc +0 -41
  1390. package/mac-agent/node_modules/node-pty/deps/winpty/misc/GetFont.cc +0 -261
  1391. package/mac-agent/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  1392. package/mac-agent/node_modules/node-pty/deps/winpty/misc/IsNewConsole.cc +0 -87
  1393. package/mac-agent/node_modules/node-pty/deps/winpty/misc/MouseInputNotes.txt +0 -90
  1394. package/mac-agent/node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc +0 -34
  1395. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Notes.txt +0 -219
  1396. package/mac-agent/node_modules/node-pty/deps/winpty/misc/OSVersion.cc +0 -27
  1397. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ScreenBufferFreezeInactive.cc +0 -101
  1398. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest.cc +0 -671
  1399. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ScreenBufferTest2.cc +0 -151
  1400. package/mac-agent/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +0 -45
  1401. package/mac-agent/node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc +0 -32
  1402. package/mac-agent/node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc +0 -10
  1403. package/mac-agent/node_modules/node-pty/deps/winpty/misc/SetFont.cc +0 -145
  1404. package/mac-agent/node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc +0 -36
  1405. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ShowArgv.cc +0 -12
  1406. package/mac-agent/node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc +0 -40
  1407. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Spew.py +0 -5
  1408. package/mac-agent/node_modules/node-pty/deps/winpty/misc/TestUtil.cc +0 -172
  1409. package/mac-agent/node_modules/node-pty/deps/winpty/misc/UnicodeDoubleWidthTest.cc +0 -102
  1410. package/mac-agent/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest1.cc +0 -246
  1411. package/mac-agent/node_modules/node-pty/deps/winpty/misc/UnicodeWideTest2.cc +0 -130
  1412. package/mac-agent/node_modules/node-pty/deps/winpty/misc/UnixEcho.cc +0 -89
  1413. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc +0 -46
  1414. package/mac-agent/node_modules/node-pty/deps/winpty/misc/VeryLargeRead.cc +0 -122
  1415. package/mac-agent/node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc +0 -56
  1416. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win10ResizeWhileFrozen.cc +0 -52
  1417. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc +0 -57
  1418. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc +0 -30
  1419. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc +0 -26
  1420. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc +0 -19
  1421. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Test1.cc +0 -46
  1422. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Test2.cc +0 -70
  1423. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Test3.cc +0 -78
  1424. package/mac-agent/node_modules/node-pty/deps/winpty/misc/Win32Write1.cc +0 -44
  1425. package/mac-agent/node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc +0 -27
  1426. package/mac-agent/node_modules/node-pty/deps/winpty/misc/WriteConsole.cc +0 -106
  1427. package/mac-agent/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  1428. package/mac-agent/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  1429. package/mac-agent/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  1430. package/mac-agent/node_modules/node-pty/deps/winpty/misc/font-notes.txt +0 -300
  1431. package/mac-agent/node_modules/node-pty/deps/winpty/misc/winbug-15048.cc +0 -201
  1432. package/mac-agent/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  1433. package/mac-agent/node_modules/node-pty/deps/winpty/ship/common_ship.py +0 -53
  1434. package/mac-agent/node_modules/node-pty/deps/winpty/ship/make_msvc_package.py +0 -165
  1435. package/mac-agent/node_modules/node-pty/deps/winpty/ship/ship.py +0 -108
  1436. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Agent.cc +0 -605
  1437. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Agent.h +0 -103
  1438. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.cc +0 -84
  1439. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h +0 -28
  1440. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.cc +0 -632
  1441. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h +0 -28
  1442. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.cc +0 -852
  1443. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleInput.h +0 -109
  1444. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.cc +0 -121
  1445. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h +0 -36
  1446. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.cc +0 -152
  1447. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h +0 -41
  1448. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Coord.h +0 -87
  1449. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.cc +0 -239
  1450. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h +0 -32
  1451. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.cc +0 -422
  1452. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h +0 -28
  1453. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/DsrSender.h +0 -30
  1454. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/EventLoop.cc +0 -99
  1455. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/EventLoop.h +0 -47
  1456. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/InputMap.cc +0 -246
  1457. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/InputMap.h +0 -114
  1458. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.cc +0 -71
  1459. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/LargeConsoleRead.h +0 -68
  1460. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.cc +0 -378
  1461. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/NamedPipe.h +0 -125
  1462. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Scraper.cc +0 -699
  1463. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Scraper.h +0 -103
  1464. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/SimplePool.h +0 -75
  1465. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/SmallRect.h +0 -143
  1466. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Terminal.cc +0 -535
  1467. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Terminal.h +0 -69
  1468. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncoding.h +0 -157
  1469. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/UnicodeEncodingTest.cc +0 -189
  1470. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Win32Console.cc +0 -107
  1471. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Win32Console.h +0 -67
  1472. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.cc +0 -193
  1473. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/Win32ConsoleBuffer.h +0 -99
  1474. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/main.cc +0 -114
  1475. package/mac-agent/node_modules/node-pty/deps/winpty/src/agent/subdir.mk +0 -61
  1476. package/mac-agent/node_modules/node-pty/deps/winpty/src/configurations.gypi +0 -60
  1477. package/mac-agent/node_modules/node-pty/deps/winpty/src/debugserver/DebugServer.cc +0 -117
  1478. package/mac-agent/node_modules/node-pty/deps/winpty/src/debugserver/subdir.mk +0 -41
  1479. package/mac-agent/node_modules/node-pty/deps/winpty/src/include/winpty.h +0 -242
  1480. package/mac-agent/node_modules/node-pty/deps/winpty/src/include/winpty_constants.h +0 -131
  1481. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.cc +0 -75
  1482. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h +0 -28
  1483. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/LibWinptyException.h +0 -54
  1484. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/WinptyInternal.h +0 -72
  1485. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/subdir.mk +0 -46
  1486. package/mac-agent/node_modules/node-pty/deps/winpty/src/libwinpty/winpty.cc +0 -970
  1487. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h +0 -38
  1488. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.cc +0 -122
  1489. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/BackgroundDesktop.h +0 -73
  1490. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/Buffer.cc +0 -103
  1491. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/Buffer.h +0 -102
  1492. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/DebugClient.cc +0 -187
  1493. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/DebugClient.h +0 -38
  1494. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/GenRandom.cc +0 -138
  1495. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/GenRandom.h +0 -55
  1496. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  1497. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/Mutex.h +0 -54
  1498. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/OsModule.h +0 -63
  1499. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc +0 -36
  1500. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.h +0 -45
  1501. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h +0 -43
  1502. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/StringBuilder.h +0 -227
  1503. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/StringBuilderTest.cc +0 -114
  1504. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/StringUtil.cc +0 -55
  1505. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/StringUtil.h +0 -80
  1506. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/TimeMeasurement.h +0 -63
  1507. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/UnixCtrlChars.h +0 -45
  1508. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  1509. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.cc +0 -460
  1510. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WindowsSecurity.h +0 -104
  1511. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.cc +0 -252
  1512. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h +0 -29
  1513. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.cc +0 -55
  1514. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyAssert.h +0 -64
  1515. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyException.cc +0 -57
  1516. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyException.h +0 -43
  1517. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.cc +0 -42
  1518. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h +0 -27
  1519. package/mac-agent/node_modules/node-pty/deps/winpty/src/shared/winpty_snprintf.h +0 -99
  1520. package/mac-agent/node_modules/node-pty/deps/winpty/src/subdir.mk +0 -5
  1521. package/mac-agent/node_modules/node-pty/deps/winpty/src/tests/subdir.mk +0 -28
  1522. package/mac-agent/node_modules/node-pty/deps/winpty/src/tests/trivial_test.cc +0 -158
  1523. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.cc +0 -114
  1524. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/InputHandler.h +0 -56
  1525. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.cc +0 -80
  1526. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/OutputHandler.h +0 -53
  1527. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.cc +0 -86
  1528. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h +0 -31
  1529. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.cc +0 -70
  1530. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/WakeupFd.h +0 -42
  1531. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/main.cc +0 -729
  1532. package/mac-agent/node_modules/node-pty/deps/winpty/src/unix-adapter/subdir.mk +0 -41
  1533. package/mac-agent/node_modules/node-pty/deps/winpty/src/winpty.gyp +0 -206
  1534. package/mac-agent/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  1535. package/mac-agent/node_modules/node-pty/lib/conpty_console_list_agent.js +0 -20
  1536. package/mac-agent/node_modules/node-pty/lib/conpty_console_list_agent.js.map +0 -1
  1537. package/mac-agent/node_modules/node-pty/lib/eventEmitter2.js +0 -47
  1538. package/mac-agent/node_modules/node-pty/lib/eventEmitter2.js.map +0 -1
  1539. package/mac-agent/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  1540. package/mac-agent/node_modules/node-pty/lib/eventEmitter2.test.js.map +0 -1
  1541. package/mac-agent/node_modules/node-pty/lib/index.js +0 -51
  1542. package/mac-agent/node_modules/node-pty/lib/index.js.map +0 -1
  1543. package/mac-agent/node_modules/node-pty/lib/interfaces.js +0 -7
  1544. package/mac-agent/node_modules/node-pty/lib/interfaces.js.map +0 -1
  1545. package/mac-agent/node_modules/node-pty/lib/shared/conout.js +0 -11
  1546. package/mac-agent/node_modules/node-pty/lib/shared/conout.js.map +0 -1
  1547. package/mac-agent/node_modules/node-pty/lib/terminal.js +0 -190
  1548. package/mac-agent/node_modules/node-pty/lib/terminal.js.map +0 -1
  1549. package/mac-agent/node_modules/node-pty/lib/terminal.test.js +0 -139
  1550. package/mac-agent/node_modules/node-pty/lib/terminal.test.js.map +0 -1
  1551. package/mac-agent/node_modules/node-pty/lib/testUtils.test.js +0 -28
  1552. package/mac-agent/node_modules/node-pty/lib/testUtils.test.js.map +0 -1
  1553. package/mac-agent/node_modules/node-pty/lib/types.js +0 -7
  1554. package/mac-agent/node_modules/node-pty/lib/types.js.map +0 -1
  1555. package/mac-agent/node_modules/node-pty/lib/unixTerminal.js +0 -304
  1556. package/mac-agent/node_modules/node-pty/lib/unixTerminal.js.map +0 -1
  1557. package/mac-agent/node_modules/node-pty/lib/unixTerminal.test.js +0 -330
  1558. package/mac-agent/node_modules/node-pty/lib/unixTerminal.test.js.map +0 -1
  1559. package/mac-agent/node_modules/node-pty/lib/utils.js +0 -17
  1560. package/mac-agent/node_modules/node-pty/lib/utils.js.map +0 -1
  1561. package/mac-agent/node_modules/node-pty/lib/windowsConoutConnection.js +0 -122
  1562. package/mac-agent/node_modules/node-pty/lib/windowsConoutConnection.js.map +0 -1
  1563. package/mac-agent/node_modules/node-pty/lib/windowsPtyAgent.js +0 -324
  1564. package/mac-agent/node_modules/node-pty/lib/windowsPtyAgent.js.map +0 -1
  1565. package/mac-agent/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  1566. package/mac-agent/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +0 -1
  1567. package/mac-agent/node_modules/node-pty/lib/windowsTerminal.js +0 -201
  1568. package/mac-agent/node_modules/node-pty/lib/windowsTerminal.js.map +0 -1
  1569. package/mac-agent/node_modules/node-pty/lib/windowsTerminal.test.js +0 -203
  1570. package/mac-agent/node_modules/node-pty/lib/windowsTerminal.test.js.map +0 -1
  1571. package/mac-agent/node_modules/node-pty/lib/worker/conoutSocketWorker.js +0 -22
  1572. package/mac-agent/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +0 -1
  1573. package/mac-agent/node_modules/node-pty/package.json +0 -59
  1574. package/mac-agent/node_modules/node-pty/scripts/post-install.js +0 -42
  1575. package/mac-agent/node_modules/node-pty/scripts/publish.js +0 -62
  1576. package/mac-agent/node_modules/node-pty/src/conpty_console_list_agent.ts +0 -19
  1577. package/mac-agent/node_modules/node-pty/src/eventEmitter2.test.ts +0 -30
  1578. package/mac-agent/node_modules/node-pty/src/eventEmitter2.ts +0 -48
  1579. package/mac-agent/node_modules/node-pty/src/index.ts +0 -51
  1580. package/mac-agent/node_modules/node-pty/src/interfaces.ts +0 -129
  1581. package/mac-agent/node_modules/node-pty/src/native.d.ts +0 -56
  1582. package/mac-agent/node_modules/node-pty/src/shared/conout.ts +0 -15
  1583. package/mac-agent/node_modules/node-pty/src/terminal.test.ts +0 -119
  1584. package/mac-agent/node_modules/node-pty/src/terminal.ts +0 -211
  1585. package/mac-agent/node_modules/node-pty/src/testUtils.test.ts +0 -23
  1586. package/mac-agent/node_modules/node-pty/src/tsconfig.json +0 -22
  1587. package/mac-agent/node_modules/node-pty/src/types.ts +0 -15
  1588. package/mac-agent/node_modules/node-pty/src/unix/pty.cc +0 -826
  1589. package/mac-agent/node_modules/node-pty/src/unix/spawn-helper.cc +0 -23
  1590. package/mac-agent/node_modules/node-pty/src/unixTerminal.test.ts +0 -335
  1591. package/mac-agent/node_modules/node-pty/src/unixTerminal.ts +0 -320
  1592. package/mac-agent/node_modules/node-pty/src/utils.ts +0 -9
  1593. package/mac-agent/node_modules/node-pty/src/win/conpty.cc +0 -498
  1594. package/mac-agent/node_modules/node-pty/src/win/conpty_console_list.cc +0 -43
  1595. package/mac-agent/node_modules/node-pty/src/win/path_util.cc +0 -73
  1596. package/mac-agent/node_modules/node-pty/src/win/path_util.h +0 -22
  1597. package/mac-agent/node_modules/node-pty/src/win/winpty.cc +0 -312
  1598. package/mac-agent/node_modules/node-pty/src/windowsConoutConnection.ts +0 -79
  1599. package/mac-agent/node_modules/node-pty/src/windowsPtyAgent.test.ts +0 -94
  1600. package/mac-agent/node_modules/node-pty/src/windowsPtyAgent.ts +0 -323
  1601. package/mac-agent/node_modules/node-pty/src/windowsTerminal.test.ts +0 -214
  1602. package/mac-agent/node_modules/node-pty/src/windowsTerminal.ts +0 -208
  1603. package/mac-agent/node_modules/node-pty/src/worker/conoutSocketWorker.ts +0 -22
  1604. package/mac-agent/node_modules/node-pty/typings/node-pty.d.ts +0 -203
  1605. package/mac-agent/node_modules/nodemon/.prettierrc.json +0 -3
  1606. package/mac-agent/node_modules/nodemon/LICENSE +0 -21
  1607. package/mac-agent/node_modules/nodemon/README.md +0 -441
  1608. package/mac-agent/node_modules/nodemon/bin/nodemon.js +0 -16
  1609. package/mac-agent/node_modules/nodemon/bin/windows-kill.exe +0 -0
  1610. package/mac-agent/node_modules/nodemon/doc/cli/authors.txt +0 -8
  1611. package/mac-agent/node_modules/nodemon/doc/cli/config.txt +0 -44
  1612. package/mac-agent/node_modules/nodemon/doc/cli/help.txt +0 -29
  1613. package/mac-agent/node_modules/nodemon/doc/cli/logo.txt +0 -20
  1614. package/mac-agent/node_modules/nodemon/doc/cli/options.txt +0 -36
  1615. package/mac-agent/node_modules/nodemon/doc/cli/topics.txt +0 -8
  1616. package/mac-agent/node_modules/nodemon/doc/cli/usage.txt +0 -3
  1617. package/mac-agent/node_modules/nodemon/doc/cli/whoami.txt +0 -9
  1618. package/mac-agent/node_modules/nodemon/index.d.ts +0 -125
  1619. package/mac-agent/node_modules/nodemon/jsconfig.json +0 -7
  1620. package/mac-agent/node_modules/nodemon/lib/cli/index.js +0 -49
  1621. package/mac-agent/node_modules/nodemon/lib/cli/parse.js +0 -230
  1622. package/mac-agent/node_modules/nodemon/lib/config/command.js +0 -43
  1623. package/mac-agent/node_modules/nodemon/lib/config/defaults.js +0 -34
  1624. package/mac-agent/node_modules/nodemon/lib/config/exec.js +0 -234
  1625. package/mac-agent/node_modules/nodemon/lib/config/index.js +0 -93
  1626. package/mac-agent/node_modules/nodemon/lib/config/load.js +0 -225
  1627. package/mac-agent/node_modules/nodemon/lib/help/index.js +0 -27
  1628. package/mac-agent/node_modules/nodemon/lib/index.js +0 -1
  1629. package/mac-agent/node_modules/nodemon/lib/monitor/index.js +0 -4
  1630. package/mac-agent/node_modules/nodemon/lib/monitor/match.js +0 -287
  1631. package/mac-agent/node_modules/nodemon/lib/monitor/run.js +0 -562
  1632. package/mac-agent/node_modules/nodemon/lib/monitor/signals.js +0 -34
  1633. package/mac-agent/node_modules/nodemon/lib/monitor/watch.js +0 -244
  1634. package/mac-agent/node_modules/nodemon/lib/nodemon.js +0 -317
  1635. package/mac-agent/node_modules/nodemon/lib/rules/add.js +0 -89
  1636. package/mac-agent/node_modules/nodemon/lib/rules/index.js +0 -53
  1637. package/mac-agent/node_modules/nodemon/lib/rules/parse.js +0 -43
  1638. package/mac-agent/node_modules/nodemon/lib/spawn.js +0 -74
  1639. package/mac-agent/node_modules/nodemon/lib/utils/bus.js +0 -44
  1640. package/mac-agent/node_modules/nodemon/lib/utils/clone.js +0 -40
  1641. package/mac-agent/node_modules/nodemon/lib/utils/colour.js +0 -26
  1642. package/mac-agent/node_modules/nodemon/lib/utils/index.js +0 -103
  1643. package/mac-agent/node_modules/nodemon/lib/utils/log.js +0 -82
  1644. package/mac-agent/node_modules/nodemon/lib/utils/merge.js +0 -47
  1645. package/mac-agent/node_modules/nodemon/lib/version.js +0 -100
  1646. package/mac-agent/node_modules/nodemon/package.json +0 -75
  1647. package/mac-agent/node_modules/nopt/CHANGELOG.md +0 -58
  1648. package/mac-agent/node_modules/nopt/LICENSE +0 -15
  1649. package/mac-agent/node_modules/nopt/README.md +0 -213
  1650. package/mac-agent/node_modules/nopt/bin/nopt.js +0 -54
  1651. package/mac-agent/node_modules/nopt/lib/nopt.js +0 -441
  1652. package/mac-agent/node_modules/nopt/package.json +0 -34
  1653. package/mac-agent/node_modules/normalize-package-data/AUTHORS +0 -4
  1654. package/mac-agent/node_modules/normalize-package-data/LICENSE +0 -30
  1655. package/mac-agent/node_modules/normalize-package-data/README.md +0 -106
  1656. package/mac-agent/node_modules/normalize-package-data/lib/extract_description.js +0 -14
  1657. package/mac-agent/node_modules/normalize-package-data/lib/fixer.js +0 -418
  1658. package/mac-agent/node_modules/normalize-package-data/lib/make_warning.js +0 -23
  1659. package/mac-agent/node_modules/normalize-package-data/lib/normalize.js +0 -39
  1660. package/mac-agent/node_modules/normalize-package-data/lib/safe_format.js +0 -9
  1661. package/mac-agent/node_modules/normalize-package-data/lib/typos.json +0 -25
  1662. package/mac-agent/node_modules/normalize-package-data/lib/warning_messages.json +0 -30
  1663. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/LICENSE +0 -15
  1664. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/README.md +0 -412
  1665. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/bin/semver +0 -160
  1666. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/package.json +0 -38
  1667. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/range.bnf +0 -16
  1668. package/mac-agent/node_modules/normalize-package-data/node_modules/semver/semver.js +0 -1525
  1669. package/mac-agent/node_modules/normalize-package-data/package.json +0 -31
  1670. package/mac-agent/node_modules/normalize-path/LICENSE +0 -21
  1671. package/mac-agent/node_modules/normalize-path/README.md +0 -127
  1672. package/mac-agent/node_modules/normalize-path/index.js +0 -35
  1673. package/mac-agent/node_modules/normalize-path/package.json +0 -77
  1674. package/mac-agent/node_modules/npmlog/LICENSE +0 -15
  1675. package/mac-agent/node_modules/npmlog/README.md +0 -216
  1676. package/mac-agent/node_modules/npmlog/log.js +0 -403
  1677. package/mac-agent/node_modules/npmlog/package.json +0 -33
  1678. package/mac-agent/node_modules/number-is-nan/index.js +0 -4
  1679. package/mac-agent/node_modules/number-is-nan/license +0 -21
  1680. package/mac-agent/node_modules/number-is-nan/package.json +0 -35
  1681. package/mac-agent/node_modules/number-is-nan/readme.md +0 -28
  1682. package/mac-agent/node_modules/object-assign/index.js +0 -90
  1683. package/mac-agent/node_modules/object-assign/license +0 -21
  1684. package/mac-agent/node_modules/object-assign/package.json +0 -42
  1685. package/mac-agent/node_modules/object-assign/readme.md +0 -61
  1686. package/mac-agent/node_modules/object-keys/.editorconfig +0 -13
  1687. package/mac-agent/node_modules/object-keys/.eslintrc +0 -17
  1688. package/mac-agent/node_modules/object-keys/.travis.yml +0 -277
  1689. package/mac-agent/node_modules/object-keys/CHANGELOG.md +0 -232
  1690. package/mac-agent/node_modules/object-keys/LICENSE +0 -21
  1691. package/mac-agent/node_modules/object-keys/README.md +0 -76
  1692. package/mac-agent/node_modules/object-keys/implementation.js +0 -122
  1693. package/mac-agent/node_modules/object-keys/index.js +0 -32
  1694. package/mac-agent/node_modules/object-keys/isArguments.js +0 -17
  1695. package/mac-agent/node_modules/object-keys/package.json +0 -88
  1696. package/mac-agent/node_modules/object-keys/test/index.js +0 -5
  1697. package/mac-agent/node_modules/object.assign/.editorconfig +0 -20
  1698. package/mac-agent/node_modules/object.assign/.eslintrc +0 -28
  1699. package/mac-agent/node_modules/object.assign/.github/FUNDING.yml +0 -12
  1700. package/mac-agent/node_modules/object.assign/.nycrc +0 -9
  1701. package/mac-agent/node_modules/object.assign/CHANGELOG.md +0 -246
  1702. package/mac-agent/node_modules/object.assign/LICENSE +0 -21
  1703. package/mac-agent/node_modules/object.assign/README.md +0 -136
  1704. package/mac-agent/node_modules/object.assign/auto.js +0 -3
  1705. package/mac-agent/node_modules/object.assign/dist/browser.js +0 -1304
  1706. package/mac-agent/node_modules/object.assign/hasSymbols.js +0 -43
  1707. package/mac-agent/node_modules/object.assign/implementation.js +0 -46
  1708. package/mac-agent/node_modules/object.assign/index.js +0 -22
  1709. package/mac-agent/node_modules/object.assign/package.json +0 -96
  1710. package/mac-agent/node_modules/object.assign/polyfill.js +0 -55
  1711. package/mac-agent/node_modules/object.assign/shim.js +0 -14
  1712. package/mac-agent/node_modules/object.assign/test/implementation.js +0 -19
  1713. package/mac-agent/node_modules/object.assign/test/index.js +0 -17
  1714. package/mac-agent/node_modules/object.assign/test/native.js +0 -49
  1715. package/mac-agent/node_modules/object.assign/test/ses-compat.js +0 -12
  1716. package/mac-agent/node_modules/object.assign/test/shimmed.js +0 -52
  1717. package/mac-agent/node_modules/object.assign/test/tests.js +0 -232
  1718. package/mac-agent/node_modules/once/LICENSE +0 -15
  1719. package/mac-agent/node_modules/once/README.md +0 -79
  1720. package/mac-agent/node_modules/once/once.js +0 -42
  1721. package/mac-agent/node_modules/once/package.json +0 -33
  1722. package/mac-agent/node_modules/one-time/LICENSE +0 -22
  1723. package/mac-agent/node_modules/one-time/README.md +0 -88
  1724. package/mac-agent/node_modules/one-time/async.js +0 -43
  1725. package/mac-agent/node_modules/one-time/index.js +0 -42
  1726. package/mac-agent/node_modules/one-time/package.json +0 -34
  1727. package/mac-agent/node_modules/os-locale/index.js +0 -127
  1728. package/mac-agent/node_modules/os-locale/license +0 -21
  1729. package/mac-agent/node_modules/os-locale/package.json +0 -43
  1730. package/mac-agent/node_modules/os-locale/readme.md +0 -47
  1731. package/mac-agent/node_modules/parse-json/index.js +0 -35
  1732. package/mac-agent/node_modules/parse-json/license +0 -21
  1733. package/mac-agent/node_modules/parse-json/package.json +0 -46
  1734. package/mac-agent/node_modules/parse-json/readme.md +0 -83
  1735. package/mac-agent/node_modules/parse-json/vendor/parse.js +0 -752
  1736. package/mac-agent/node_modules/parse-json/vendor/unicode.js +0 -71
  1737. package/mac-agent/node_modules/path-exists/index.js +0 -24
  1738. package/mac-agent/node_modules/path-exists/license +0 -21
  1739. package/mac-agent/node_modules/path-exists/package.json +0 -40
  1740. package/mac-agent/node_modules/path-exists/readme.md +0 -45
  1741. package/mac-agent/node_modules/path-is-absolute/index.js +0 -20
  1742. package/mac-agent/node_modules/path-is-absolute/license +0 -21
  1743. package/mac-agent/node_modules/path-is-absolute/package.json +0 -43
  1744. package/mac-agent/node_modules/path-is-absolute/readme.md +0 -59
  1745. package/mac-agent/node_modules/path-parse/LICENSE +0 -21
  1746. package/mac-agent/node_modules/path-parse/README.md +0 -42
  1747. package/mac-agent/node_modules/path-parse/index.js +0 -75
  1748. package/mac-agent/node_modules/path-parse/package.json +0 -33
  1749. package/mac-agent/node_modules/path-type/index.js +0 -29
  1750. package/mac-agent/node_modules/path-type/license +0 -21
  1751. package/mac-agent/node_modules/path-type/package.json +0 -52
  1752. package/mac-agent/node_modules/path-type/readme.md +0 -42
  1753. package/mac-agent/node_modules/picomatch/CHANGELOG.md +0 -136
  1754. package/mac-agent/node_modules/picomatch/LICENSE +0 -21
  1755. package/mac-agent/node_modules/picomatch/README.md +0 -708
  1756. package/mac-agent/node_modules/picomatch/index.js +0 -3
  1757. package/mac-agent/node_modules/picomatch/lib/constants.js +0 -179
  1758. package/mac-agent/node_modules/picomatch/lib/parse.js +0 -1091
  1759. package/mac-agent/node_modules/picomatch/lib/picomatch.js +0 -342
  1760. package/mac-agent/node_modules/picomatch/lib/scan.js +0 -391
  1761. package/mac-agent/node_modules/picomatch/lib/utils.js +0 -64
  1762. package/mac-agent/node_modules/picomatch/package.json +0 -81
  1763. package/mac-agent/node_modules/pify/index.js +0 -68
  1764. package/mac-agent/node_modules/pify/license +0 -21
  1765. package/mac-agent/node_modules/pify/package.json +0 -48
  1766. package/mac-agent/node_modules/pify/readme.md +0 -119
  1767. package/mac-agent/node_modules/pinkie/index.js +0 -292
  1768. package/mac-agent/node_modules/pinkie/license +0 -21
  1769. package/mac-agent/node_modules/pinkie/package.json +0 -36
  1770. package/mac-agent/node_modules/pinkie/readme.md +0 -83
  1771. package/mac-agent/node_modules/pinkie-promise/index.js +0 -3
  1772. package/mac-agent/node_modules/pinkie-promise/license +0 -21
  1773. package/mac-agent/node_modules/pinkie-promise/package.json +0 -35
  1774. package/mac-agent/node_modules/pinkie-promise/readme.md +0 -28
  1775. package/mac-agent/node_modules/proxy-from-env/.eslintrc +0 -29
  1776. package/mac-agent/node_modules/proxy-from-env/.travis.yml +0 -10
  1777. package/mac-agent/node_modules/proxy-from-env/LICENSE +0 -20
  1778. package/mac-agent/node_modules/proxy-from-env/README.md +0 -131
  1779. package/mac-agent/node_modules/proxy-from-env/index.js +0 -108
  1780. package/mac-agent/node_modules/proxy-from-env/package.json +0 -34
  1781. package/mac-agent/node_modules/proxy-from-env/test.js +0 -483
  1782. package/mac-agent/node_modules/pstree.remy/.travis.yml +0 -8
  1783. package/mac-agent/node_modules/pstree.remy/LICENSE +0 -7
  1784. package/mac-agent/node_modules/pstree.remy/README.md +0 -26
  1785. package/mac-agent/node_modules/pstree.remy/lib/index.js +0 -37
  1786. package/mac-agent/node_modules/pstree.remy/lib/tree.js +0 -37
  1787. package/mac-agent/node_modules/pstree.remy/lib/utils.js +0 -53
  1788. package/mac-agent/node_modules/pstree.remy/package.json +0 -33
  1789. package/mac-agent/node_modules/pstree.remy/tests/fixtures/index.js +0 -13
  1790. package/mac-agent/node_modules/pstree.remy/tests/fixtures/out1 +0 -10
  1791. package/mac-agent/node_modules/pstree.remy/tests/fixtures/out2 +0 -29
  1792. package/mac-agent/node_modules/pstree.remy/tests/index.test.js +0 -51
  1793. package/mac-agent/node_modules/read-pkg/index.js +0 -48
  1794. package/mac-agent/node_modules/read-pkg/license +0 -21
  1795. package/mac-agent/node_modules/read-pkg/package.json +0 -42
  1796. package/mac-agent/node_modules/read-pkg/readme.md +0 -79
  1797. package/mac-agent/node_modules/read-pkg-up/index.js +0 -31
  1798. package/mac-agent/node_modules/read-pkg-up/license +0 -21
  1799. package/mac-agent/node_modules/read-pkg-up/package.json +0 -59
  1800. package/mac-agent/node_modules/read-pkg-up/readme.md +0 -79
  1801. package/mac-agent/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  1802. package/mac-agent/node_modules/readable-stream/GOVERNANCE.md +0 -136
  1803. package/mac-agent/node_modules/readable-stream/LICENSE +0 -47
  1804. package/mac-agent/node_modules/readable-stream/README.md +0 -106
  1805. package/mac-agent/node_modules/readable-stream/errors-browser.js +0 -127
  1806. package/mac-agent/node_modules/readable-stream/errors.js +0 -116
  1807. package/mac-agent/node_modules/readable-stream/experimentalWarning.js +0 -17
  1808. package/mac-agent/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  1809. package/mac-agent/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  1810. package/mac-agent/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  1811. package/mac-agent/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  1812. package/mac-agent/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  1813. package/mac-agent/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  1814. package/mac-agent/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  1815. package/mac-agent/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  1816. package/mac-agent/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  1817. package/mac-agent/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  1818. package/mac-agent/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  1819. package/mac-agent/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  1820. package/mac-agent/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  1821. package/mac-agent/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  1822. package/mac-agent/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  1823. package/mac-agent/node_modules/readable-stream/package.json +0 -68
  1824. package/mac-agent/node_modules/readable-stream/readable-browser.js +0 -9
  1825. package/mac-agent/node_modules/readable-stream/readable.js +0 -16
  1826. package/mac-agent/node_modules/readdirp/LICENSE +0 -21
  1827. package/mac-agent/node_modules/readdirp/README.md +0 -122
  1828. package/mac-agent/node_modules/readdirp/index.d.ts +0 -43
  1829. package/mac-agent/node_modules/readdirp/index.js +0 -287
  1830. package/mac-agent/node_modules/readdirp/package.json +0 -122
  1831. package/mac-agent/node_modules/require-directory/.jshintrc +0 -67
  1832. package/mac-agent/node_modules/require-directory/.travis.yml +0 -3
  1833. package/mac-agent/node_modules/require-directory/LICENSE +0 -22
  1834. package/mac-agent/node_modules/require-directory/README.markdown +0 -184
  1835. package/mac-agent/node_modules/require-directory/index.js +0 -86
  1836. package/mac-agent/node_modules/require-directory/package.json +0 -40
  1837. package/mac-agent/node_modules/require-main-filename/.travis.yml +0 -8
  1838. package/mac-agent/node_modules/require-main-filename/LICENSE.txt +0 -14
  1839. package/mac-agent/node_modules/require-main-filename/README.md +0 -26
  1840. package/mac-agent/node_modules/require-main-filename/index.js +0 -18
  1841. package/mac-agent/node_modules/require-main-filename/package.json +0 -30
  1842. package/mac-agent/node_modules/require-main-filename/test.js +0 -36
  1843. package/mac-agent/node_modules/resolve/.editorconfig +0 -37
  1844. package/mac-agent/node_modules/resolve/.eslintrc +0 -65
  1845. package/mac-agent/node_modules/resolve/.github/FUNDING.yml +0 -12
  1846. package/mac-agent/node_modules/resolve/LICENSE +0 -21
  1847. package/mac-agent/node_modules/resolve/SECURITY.md +0 -3
  1848. package/mac-agent/node_modules/resolve/async.js +0 -3
  1849. package/mac-agent/node_modules/resolve/bin/resolve +0 -50
  1850. package/mac-agent/node_modules/resolve/example/async.js +0 -5
  1851. package/mac-agent/node_modules/resolve/example/sync.js +0 -3
  1852. package/mac-agent/node_modules/resolve/index.js +0 -6
  1853. package/mac-agent/node_modules/resolve/lib/async.js +0 -329
  1854. package/mac-agent/node_modules/resolve/lib/caller.js +0 -8
  1855. package/mac-agent/node_modules/resolve/lib/core.js +0 -12
  1856. package/mac-agent/node_modules/resolve/lib/core.json +0 -162
  1857. package/mac-agent/node_modules/resolve/lib/homedir.js +0 -24
  1858. package/mac-agent/node_modules/resolve/lib/is-core.js +0 -5
  1859. package/mac-agent/node_modules/resolve/lib/node-modules-paths.js +0 -42
  1860. package/mac-agent/node_modules/resolve/lib/normalize-options.js +0 -10
  1861. package/mac-agent/node_modules/resolve/lib/sync.js +0 -208
  1862. package/mac-agent/node_modules/resolve/package.json +0 -75
  1863. package/mac-agent/node_modules/resolve/readme.markdown +0 -301
  1864. package/mac-agent/node_modules/resolve/sync.js +0 -3
  1865. package/mac-agent/node_modules/resolve/test/core.js +0 -88
  1866. package/mac-agent/node_modules/resolve/test/dotdot/abc/index.js +0 -2
  1867. package/mac-agent/node_modules/resolve/test/dotdot/index.js +0 -1
  1868. package/mac-agent/node_modules/resolve/test/dotdot.js +0 -29
  1869. package/mac-agent/node_modules/resolve/test/faulty_basedir.js +0 -29
  1870. package/mac-agent/node_modules/resolve/test/filter.js +0 -34
  1871. package/mac-agent/node_modules/resolve/test/filter_sync.js +0 -33
  1872. package/mac-agent/node_modules/resolve/test/home_paths.js +0 -127
  1873. package/mac-agent/node_modules/resolve/test/home_paths_sync.js +0 -114
  1874. package/mac-agent/node_modules/resolve/test/mock.js +0 -315
  1875. package/mac-agent/node_modules/resolve/test/mock_sync.js +0 -214
  1876. package/mac-agent/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +0 -1
  1877. package/mac-agent/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +0 -1
  1878. package/mac-agent/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +0 -1
  1879. package/mac-agent/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +0 -3
  1880. package/mac-agent/node_modules/resolve/test/module_dir.js +0 -56
  1881. package/mac-agent/node_modules/resolve/test/node-modules-paths.js +0 -143
  1882. package/mac-agent/node_modules/resolve/test/node_path/x/aaa/index.js +0 -1
  1883. package/mac-agent/node_modules/resolve/test/node_path/x/ccc/index.js +0 -1
  1884. package/mac-agent/node_modules/resolve/test/node_path/y/bbb/index.js +0 -1
  1885. package/mac-agent/node_modules/resolve/test/node_path/y/ccc/index.js +0 -1
  1886. package/mac-agent/node_modules/resolve/test/node_path.js +0 -70
  1887. package/mac-agent/node_modules/resolve/test/nonstring.js +0 -9
  1888. package/mac-agent/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  1889. package/mac-agent/node_modules/resolve/test/pathfilter.js +0 -75
  1890. package/mac-agent/node_modules/resolve/test/precedence/aaa/index.js +0 -1
  1891. package/mac-agent/node_modules/resolve/test/precedence/aaa/main.js +0 -1
  1892. package/mac-agent/node_modules/resolve/test/precedence/aaa.js +0 -1
  1893. package/mac-agent/node_modules/resolve/test/precedence/bbb/main.js +0 -1
  1894. package/mac-agent/node_modules/resolve/test/precedence/bbb.js +0 -1
  1895. package/mac-agent/node_modules/resolve/test/precedence.js +0 -23
  1896. package/mac-agent/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  1897. package/mac-agent/node_modules/resolve/test/resolver/baz/package.json +0 -4
  1898. package/mac-agent/node_modules/resolve/test/resolver/baz/quux.js +0 -1
  1899. package/mac-agent/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  1900. package/mac-agent/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  1901. package/mac-agent/node_modules/resolve/test/resolver/browser_field/package.json +0 -5
  1902. package/mac-agent/node_modules/resolve/test/resolver/cup.coffee +0 -1
  1903. package/mac-agent/node_modules/resolve/test/resolver/dot_main/index.js +0 -1
  1904. package/mac-agent/node_modules/resolve/test/resolver/dot_main/package.json +0 -3
  1905. package/mac-agent/node_modules/resolve/test/resolver/dot_slash_main/index.js +0 -1
  1906. package/mac-agent/node_modules/resolve/test/resolver/dot_slash_main/package.json +0 -3
  1907. package/mac-agent/node_modules/resolve/test/resolver/false_main/index.js +0 -0
  1908. package/mac-agent/node_modules/resolve/test/resolver/false_main/package.json +0 -4
  1909. package/mac-agent/node_modules/resolve/test/resolver/foo.js +0 -1
  1910. package/mac-agent/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
  1911. package/mac-agent/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
  1912. package/mac-agent/node_modules/resolve/test/resolver/invalid_main/package.json +0 -7
  1913. package/mac-agent/node_modules/resolve/test/resolver/mug.coffee +0 -0
  1914. package/mac-agent/node_modules/resolve/test/resolver/mug.js +0 -0
  1915. package/mac-agent/node_modules/resolve/test/resolver/multirepo/lerna.json +0 -6
  1916. package/mac-agent/node_modules/resolve/test/resolver/multirepo/package.json +0 -20
  1917. package/mac-agent/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +0 -35
  1918. package/mac-agent/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +0 -14
  1919. package/mac-agent/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  1920. package/mac-agent/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +0 -14
  1921. package/mac-agent/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +0 -26
  1922. package/mac-agent/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +0 -15
  1923. package/mac-agent/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +0 -12
  1924. package/mac-agent/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  1925. package/mac-agent/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  1926. package/mac-agent/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
  1927. package/mac-agent/node_modules/resolve/test/resolver/same_names/foo/index.js +0 -1
  1928. package/mac-agent/node_modules/resolve/test/resolver/same_names/foo.js +0 -1
  1929. package/mac-agent/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  1930. package/mac-agent/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  1931. package/mac-agent/node_modules/resolve/test/resolver/symlinked/package/bar.js +0 -1
  1932. package/mac-agent/node_modules/resolve/test/resolver/symlinked/package/package.json +0 -3
  1933. package/mac-agent/node_modules/resolve/test/resolver/without_basedir/main.js +0 -5
  1934. package/mac-agent/node_modules/resolve/test/resolver.js +0 -597
  1935. package/mac-agent/node_modules/resolve/test/resolver_sync.js +0 -730
  1936. package/mac-agent/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  1937. package/mac-agent/node_modules/resolve/test/shadowed_core.js +0 -54
  1938. package/mac-agent/node_modules/resolve/test/subdirs.js +0 -13
  1939. package/mac-agent/node_modules/resolve/test/symlinks.js +0 -176
  1940. package/mac-agent/node_modules/rimraf/CHANGELOG.md +0 -65
  1941. package/mac-agent/node_modules/rimraf/LICENSE +0 -15
  1942. package/mac-agent/node_modules/rimraf/README.md +0 -101
  1943. package/mac-agent/node_modules/rimraf/bin.js +0 -68
  1944. package/mac-agent/node_modules/rimraf/package.json +0 -32
  1945. package/mac-agent/node_modules/rimraf/rimraf.js +0 -360
  1946. package/mac-agent/node_modules/safe-buffer/LICENSE +0 -21
  1947. package/mac-agent/node_modules/safe-buffer/README.md +0 -584
  1948. package/mac-agent/node_modules/safe-buffer/index.d.ts +0 -187
  1949. package/mac-agent/node_modules/safe-buffer/index.js +0 -65
  1950. package/mac-agent/node_modules/safe-buffer/package.json +0 -51
  1951. package/mac-agent/node_modules/safe-stable-stringify/LICENSE +0 -21
  1952. package/mac-agent/node_modules/safe-stable-stringify/esm/package.json +0 -4
  1953. package/mac-agent/node_modules/safe-stable-stringify/esm/wrapper.d.ts +0 -4
  1954. package/mac-agent/node_modules/safe-stable-stringify/esm/wrapper.js +0 -6
  1955. package/mac-agent/node_modules/safe-stable-stringify/index.d.ts +0 -22
  1956. package/mac-agent/node_modules/safe-stable-stringify/index.js +0 -625
  1957. package/mac-agent/node_modules/safe-stable-stringify/package.json +0 -65
  1958. package/mac-agent/node_modules/safe-stable-stringify/readme.md +0 -179
  1959. package/mac-agent/node_modules/semver/LICENSE +0 -15
  1960. package/mac-agent/node_modules/semver/README.md +0 -664
  1961. package/mac-agent/node_modules/semver/bin/semver.js +0 -191
  1962. package/mac-agent/node_modules/semver/classes/comparator.js +0 -143
  1963. package/mac-agent/node_modules/semver/classes/index.js +0 -7
  1964. package/mac-agent/node_modules/semver/classes/range.js +0 -556
  1965. package/mac-agent/node_modules/semver/classes/semver.js +0 -319
  1966. package/mac-agent/node_modules/semver/functions/clean.js +0 -8
  1967. package/mac-agent/node_modules/semver/functions/cmp.js +0 -54
  1968. package/mac-agent/node_modules/semver/functions/coerce.js +0 -62
  1969. package/mac-agent/node_modules/semver/functions/compare-build.js +0 -9
  1970. package/mac-agent/node_modules/semver/functions/compare-loose.js +0 -5
  1971. package/mac-agent/node_modules/semver/functions/compare.js +0 -7
  1972. package/mac-agent/node_modules/semver/functions/diff.js +0 -60
  1973. package/mac-agent/node_modules/semver/functions/eq.js +0 -5
  1974. package/mac-agent/node_modules/semver/functions/gt.js +0 -5
  1975. package/mac-agent/node_modules/semver/functions/gte.js +0 -5
  1976. package/mac-agent/node_modules/semver/functions/inc.js +0 -21
  1977. package/mac-agent/node_modules/semver/functions/lt.js +0 -5
  1978. package/mac-agent/node_modules/semver/functions/lte.js +0 -5
  1979. package/mac-agent/node_modules/semver/functions/major.js +0 -5
  1980. package/mac-agent/node_modules/semver/functions/minor.js +0 -5
  1981. package/mac-agent/node_modules/semver/functions/neq.js +0 -5
  1982. package/mac-agent/node_modules/semver/functions/parse.js +0 -18
  1983. package/mac-agent/node_modules/semver/functions/patch.js +0 -5
  1984. package/mac-agent/node_modules/semver/functions/prerelease.js +0 -8
  1985. package/mac-agent/node_modules/semver/functions/rcompare.js +0 -5
  1986. package/mac-agent/node_modules/semver/functions/rsort.js +0 -5
  1987. package/mac-agent/node_modules/semver/functions/satisfies.js +0 -12
  1988. package/mac-agent/node_modules/semver/functions/sort.js +0 -5
  1989. package/mac-agent/node_modules/semver/functions/valid.js +0 -8
  1990. package/mac-agent/node_modules/semver/index.js +0 -91
  1991. package/mac-agent/node_modules/semver/internal/constants.js +0 -37
  1992. package/mac-agent/node_modules/semver/internal/debug.js +0 -11
  1993. package/mac-agent/node_modules/semver/internal/identifiers.js +0 -25
  1994. package/mac-agent/node_modules/semver/internal/lrucache.js +0 -42
  1995. package/mac-agent/node_modules/semver/internal/parse-options.js +0 -17
  1996. package/mac-agent/node_modules/semver/internal/re.js +0 -223
  1997. package/mac-agent/node_modules/semver/package.json +0 -78
  1998. package/mac-agent/node_modules/semver/preload.js +0 -4
  1999. package/mac-agent/node_modules/semver/range.bnf +0 -16
  2000. package/mac-agent/node_modules/semver/ranges/gtr.js +0 -6
  2001. package/mac-agent/node_modules/semver/ranges/intersects.js +0 -9
  2002. package/mac-agent/node_modules/semver/ranges/ltr.js +0 -6
  2003. package/mac-agent/node_modules/semver/ranges/max-satisfying.js +0 -27
  2004. package/mac-agent/node_modules/semver/ranges/min-satisfying.js +0 -26
  2005. package/mac-agent/node_modules/semver/ranges/min-version.js +0 -63
  2006. package/mac-agent/node_modules/semver/ranges/outside.js +0 -82
  2007. package/mac-agent/node_modules/semver/ranges/simplify.js +0 -49
  2008. package/mac-agent/node_modules/semver/ranges/subset.js +0 -249
  2009. package/mac-agent/node_modules/semver/ranges/to-comparators.js +0 -10
  2010. package/mac-agent/node_modules/semver/ranges/valid.js +0 -13
  2011. package/mac-agent/node_modules/set-blocking/CHANGELOG.md +0 -26
  2012. package/mac-agent/node_modules/set-blocking/LICENSE.txt +0 -14
  2013. package/mac-agent/node_modules/set-blocking/README.md +0 -31
  2014. package/mac-agent/node_modules/set-blocking/index.js +0 -7
  2015. package/mac-agent/node_modules/set-blocking/package.json +0 -42
  2016. package/mac-agent/node_modules/set-function-length/.eslintrc +0 -27
  2017. package/mac-agent/node_modules/set-function-length/.github/FUNDING.yml +0 -12
  2018. package/mac-agent/node_modules/set-function-length/.nycrc +0 -13
  2019. package/mac-agent/node_modules/set-function-length/CHANGELOG.md +0 -70
  2020. package/mac-agent/node_modules/set-function-length/LICENSE +0 -21
  2021. package/mac-agent/node_modules/set-function-length/README.md +0 -56
  2022. package/mac-agent/node_modules/set-function-length/env.d.ts +0 -9
  2023. package/mac-agent/node_modules/set-function-length/env.js +0 -25
  2024. package/mac-agent/node_modules/set-function-length/index.d.ts +0 -7
  2025. package/mac-agent/node_modules/set-function-length/index.js +0 -42
  2026. package/mac-agent/node_modules/set-function-length/package.json +0 -102
  2027. package/mac-agent/node_modules/set-function-length/tsconfig.json +0 -9
  2028. package/mac-agent/node_modules/signal-exit/LICENSE.txt +0 -16
  2029. package/mac-agent/node_modules/signal-exit/README.md +0 -39
  2030. package/mac-agent/node_modules/signal-exit/index.js +0 -202
  2031. package/mac-agent/node_modules/signal-exit/package.json +0 -38
  2032. package/mac-agent/node_modules/signal-exit/signals.js +0 -53
  2033. package/mac-agent/node_modules/simple-swizzle/LICENSE +0 -21
  2034. package/mac-agent/node_modules/simple-swizzle/README.md +0 -39
  2035. package/mac-agent/node_modules/simple-swizzle/index.js +0 -29
  2036. package/mac-agent/node_modules/simple-swizzle/package.json +0 -36
  2037. package/mac-agent/node_modules/simple-update-notifier/LICENSE +0 -21
  2038. package/mac-agent/node_modules/simple-update-notifier/README.md +0 -82
  2039. package/mac-agent/node_modules/simple-update-notifier/build/index.d.ts +0 -13
  2040. package/mac-agent/node_modules/simple-update-notifier/build/index.js +0 -210
  2041. package/mac-agent/node_modules/simple-update-notifier/package.json +0 -100
  2042. package/mac-agent/node_modules/simple-update-notifier/src/borderedText.ts +0 -12
  2043. package/mac-agent/node_modules/simple-update-notifier/src/cache.spec.ts +0 -17
  2044. package/mac-agent/node_modules/simple-update-notifier/src/cache.ts +0 -44
  2045. package/mac-agent/node_modules/simple-update-notifier/src/getDistVersion.spec.ts +0 -35
  2046. package/mac-agent/node_modules/simple-update-notifier/src/getDistVersion.ts +0 -29
  2047. package/mac-agent/node_modules/simple-update-notifier/src/hasNewVersion.spec.ts +0 -82
  2048. package/mac-agent/node_modules/simple-update-notifier/src/hasNewVersion.ts +0 -40
  2049. package/mac-agent/node_modules/simple-update-notifier/src/index.spec.ts +0 -27
  2050. package/mac-agent/node_modules/simple-update-notifier/src/index.ts +0 -34
  2051. package/mac-agent/node_modules/simple-update-notifier/src/isNpmOrYarn.ts +0 -12
  2052. package/mac-agent/node_modules/simple-update-notifier/src/types.ts +0 -8
  2053. package/mac-agent/node_modules/spdx-correct/LICENSE +0 -202
  2054. package/mac-agent/node_modules/spdx-correct/README.md +0 -22
  2055. package/mac-agent/node_modules/spdx-correct/index.js +0 -386
  2056. package/mac-agent/node_modules/spdx-correct/package.json +0 -32
  2057. package/mac-agent/node_modules/spdx-exceptions/README.md +0 -36
  2058. package/mac-agent/node_modules/spdx-exceptions/deprecated.json +0 -3
  2059. package/mac-agent/node_modules/spdx-exceptions/index.json +0 -68
  2060. package/mac-agent/node_modules/spdx-exceptions/package.json +0 -19
  2061. package/mac-agent/node_modules/spdx-expression-parse/AUTHORS +0 -4
  2062. package/mac-agent/node_modules/spdx-expression-parse/LICENSE +0 -22
  2063. package/mac-agent/node_modules/spdx-expression-parse/README.md +0 -91
  2064. package/mac-agent/node_modules/spdx-expression-parse/index.js +0 -8
  2065. package/mac-agent/node_modules/spdx-expression-parse/package.json +0 -39
  2066. package/mac-agent/node_modules/spdx-expression-parse/parse.js +0 -138
  2067. package/mac-agent/node_modules/spdx-expression-parse/scan.js +0 -131
  2068. package/mac-agent/node_modules/spdx-license-ids/README.md +0 -51
  2069. package/mac-agent/node_modules/spdx-license-ids/deprecated.json +0 -28
  2070. package/mac-agent/node_modules/spdx-license-ids/index.json +0 -650
  2071. package/mac-agent/node_modules/spdx-license-ids/package.json +0 -29
  2072. package/mac-agent/node_modules/stack-trace/License +0 -19
  2073. package/mac-agent/node_modules/stack-trace/Makefile +0 -11
  2074. package/mac-agent/node_modules/stack-trace/Readme.md +0 -98
  2075. package/mac-agent/node_modules/stack-trace/lib/stack-trace.js +0 -136
  2076. package/mac-agent/node_modules/stack-trace/package.json +0 -21
  2077. package/mac-agent/node_modules/string-width/index.d.ts +0 -29
  2078. package/mac-agent/node_modules/string-width/index.js +0 -47
  2079. package/mac-agent/node_modules/string-width/license +0 -9
  2080. package/mac-agent/node_modules/string-width/package.json +0 -56
  2081. package/mac-agent/node_modules/string-width/readme.md +0 -50
  2082. package/mac-agent/node_modules/string_decoder/LICENSE +0 -48
  2083. package/mac-agent/node_modules/string_decoder/README.md +0 -47
  2084. package/mac-agent/node_modules/string_decoder/lib/string_decoder.js +0 -296
  2085. package/mac-agent/node_modules/string_decoder/package.json +0 -34
  2086. package/mac-agent/node_modules/strip-ansi/index.d.ts +0 -17
  2087. package/mac-agent/node_modules/strip-ansi/index.js +0 -4
  2088. package/mac-agent/node_modules/strip-ansi/license +0 -9
  2089. package/mac-agent/node_modules/strip-ansi/package.json +0 -54
  2090. package/mac-agent/node_modules/strip-ansi/readme.md +0 -46
  2091. package/mac-agent/node_modules/strip-bom/index.js +0 -17
  2092. package/mac-agent/node_modules/strip-bom/license +0 -21
  2093. package/mac-agent/node_modules/strip-bom/package.json +0 -42
  2094. package/mac-agent/node_modules/strip-bom/readme.md +0 -39
  2095. package/mac-agent/node_modules/supports-color/browser.js +0 -5
  2096. package/mac-agent/node_modules/supports-color/index.js +0 -131
  2097. package/mac-agent/node_modules/supports-color/license +0 -9
  2098. package/mac-agent/node_modules/supports-color/package.json +0 -53
  2099. package/mac-agent/node_modules/supports-color/readme.md +0 -66
  2100. package/mac-agent/node_modules/supports-preserve-symlinks-flag/.eslintrc +0 -14
  2101. package/mac-agent/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +0 -12
  2102. package/mac-agent/node_modules/supports-preserve-symlinks-flag/.nycrc +0 -9
  2103. package/mac-agent/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +0 -22
  2104. package/mac-agent/node_modules/supports-preserve-symlinks-flag/LICENSE +0 -21
  2105. package/mac-agent/node_modules/supports-preserve-symlinks-flag/README.md +0 -42
  2106. package/mac-agent/node_modules/supports-preserve-symlinks-flag/browser.js +0 -3
  2107. package/mac-agent/node_modules/supports-preserve-symlinks-flag/index.js +0 -9
  2108. package/mac-agent/node_modules/supports-preserve-symlinks-flag/package.json +0 -70
  2109. package/mac-agent/node_modules/supports-preserve-symlinks-flag/test/index.js +0 -29
  2110. package/mac-agent/node_modules/tar/LICENSE +0 -15
  2111. package/mac-agent/node_modules/tar/README.md +0 -1080
  2112. package/mac-agent/node_modules/tar/index.js +0 -18
  2113. package/mac-agent/node_modules/tar/lib/create.js +0 -111
  2114. package/mac-agent/node_modules/tar/lib/extract.js +0 -113
  2115. package/mac-agent/node_modules/tar/lib/get-write-flag.js +0 -20
  2116. package/mac-agent/node_modules/tar/lib/header.js +0 -304
  2117. package/mac-agent/node_modules/tar/lib/high-level-opt.js +0 -29
  2118. package/mac-agent/node_modules/tar/lib/large-numbers.js +0 -104
  2119. package/mac-agent/node_modules/tar/lib/list.js +0 -139
  2120. package/mac-agent/node_modules/tar/lib/mkdir.js +0 -229
  2121. package/mac-agent/node_modules/tar/lib/mode-fix.js +0 -27
  2122. package/mac-agent/node_modules/tar/lib/normalize-unicode.js +0 -12
  2123. package/mac-agent/node_modules/tar/lib/normalize-windows-path.js +0 -8
  2124. package/mac-agent/node_modules/tar/lib/pack.js +0 -432
  2125. package/mac-agent/node_modules/tar/lib/parse.js +0 -552
  2126. package/mac-agent/node_modules/tar/lib/path-reservations.js +0 -156
  2127. package/mac-agent/node_modules/tar/lib/pax.js +0 -150
  2128. package/mac-agent/node_modules/tar/lib/read-entry.js +0 -107
  2129. package/mac-agent/node_modules/tar/lib/replace.js +0 -246
  2130. package/mac-agent/node_modules/tar/lib/strip-absolute-path.js +0 -24
  2131. package/mac-agent/node_modules/tar/lib/strip-trailing-slashes.js +0 -13
  2132. package/mac-agent/node_modules/tar/lib/types.js +0 -44
  2133. package/mac-agent/node_modules/tar/lib/unpack.js +0 -923
  2134. package/mac-agent/node_modules/tar/lib/update.js +0 -40
  2135. package/mac-agent/node_modules/tar/lib/warn-mixin.js +0 -24
  2136. package/mac-agent/node_modules/tar/lib/winchars.js +0 -23
  2137. package/mac-agent/node_modules/tar/lib/write-entry.js +0 -546
  2138. package/mac-agent/node_modules/tar/package.json +0 -70
  2139. package/mac-agent/node_modules/text-hex/LICENSE +0 -21
  2140. package/mac-agent/node_modules/text-hex/README.md +0 -20
  2141. package/mac-agent/node_modules/text-hex/index.js +0 -24
  2142. package/mac-agent/node_modules/text-hex/package.json +0 -30
  2143. package/mac-agent/node_modules/text-hex/test.js +0 -11
  2144. package/mac-agent/node_modules/to-regex-range/LICENSE +0 -21
  2145. package/mac-agent/node_modules/to-regex-range/README.md +0 -305
  2146. package/mac-agent/node_modules/to-regex-range/index.js +0 -288
  2147. package/mac-agent/node_modules/to-regex-range/package.json +0 -88
  2148. package/mac-agent/node_modules/touch/LICENSE +0 -15
  2149. package/mac-agent/node_modules/touch/README.md +0 -52
  2150. package/mac-agent/node_modules/touch/bin/nodetouch.js +0 -112
  2151. package/mac-agent/node_modules/touch/index.js +0 -224
  2152. package/mac-agent/node_modules/touch/package.json +0 -25
  2153. package/mac-agent/node_modules/tr46/index.js +0 -193
  2154. package/mac-agent/node_modules/tr46/lib/.gitkeep +0 -0
  2155. package/mac-agent/node_modules/tr46/lib/mappingTable.json +0 -1
  2156. package/mac-agent/node_modules/tr46/package.json +0 -31
  2157. package/mac-agent/node_modules/triple-beam/.nyc_output/c579bf8f-6820-47a5-b2da-a11267eb8435.json +0 -1
  2158. package/mac-agent/node_modules/triple-beam/.nyc_output/processinfo/c579bf8f-6820-47a5-b2da-a11267eb8435.json +0 -1
  2159. package/mac-agent/node_modules/triple-beam/.nyc_output/processinfo/index.json +0 -1
  2160. package/mac-agent/node_modules/triple-beam/CHANGELOG.md +0 -22
  2161. package/mac-agent/node_modules/triple-beam/LICENSE +0 -21
  2162. package/mac-agent/node_modules/triple-beam/README.md +0 -34
  2163. package/mac-agent/node_modules/triple-beam/config/cli.js +0 -42
  2164. package/mac-agent/node_modules/triple-beam/config/index.js +0 -32
  2165. package/mac-agent/node_modules/triple-beam/config/npm.js +0 -36
  2166. package/mac-agent/node_modules/triple-beam/config/syslog.js +0 -38
  2167. package/mac-agent/node_modules/triple-beam/index.js +0 -46
  2168. package/mac-agent/node_modules/triple-beam/package.json +0 -40
  2169. package/mac-agent/node_modules/undefsafe/.github/workflows/release.yml +0 -25
  2170. package/mac-agent/node_modules/undefsafe/.jscsrc +0 -13
  2171. package/mac-agent/node_modules/undefsafe/.jshintrc +0 -16
  2172. package/mac-agent/node_modules/undefsafe/.travis.yml +0 -18
  2173. package/mac-agent/node_modules/undefsafe/LICENSE +0 -22
  2174. package/mac-agent/node_modules/undefsafe/README.md +0 -63
  2175. package/mac-agent/node_modules/undefsafe/example.js +0 -14
  2176. package/mac-agent/node_modules/undefsafe/lib/undefsafe.js +0 -125
  2177. package/mac-agent/node_modules/undefsafe/package.json +0 -34
  2178. package/mac-agent/node_modules/util-deprecate/History.md +0 -16
  2179. package/mac-agent/node_modules/util-deprecate/LICENSE +0 -24
  2180. package/mac-agent/node_modules/util-deprecate/README.md +0 -53
  2181. package/mac-agent/node_modules/util-deprecate/browser.js +0 -67
  2182. package/mac-agent/node_modules/util-deprecate/node.js +0 -6
  2183. package/mac-agent/node_modules/util-deprecate/package.json +0 -27
  2184. package/mac-agent/node_modules/uuid/CHANGELOG.md +0 -229
  2185. package/mac-agent/node_modules/uuid/CONTRIBUTING.md +0 -18
  2186. package/mac-agent/node_modules/uuid/LICENSE.md +0 -9
  2187. package/mac-agent/node_modules/uuid/README.md +0 -505
  2188. package/mac-agent/node_modules/uuid/dist/bin/uuid +0 -2
  2189. package/mac-agent/node_modules/uuid/dist/esm-browser/index.js +0 -9
  2190. package/mac-agent/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  2191. package/mac-agent/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  2192. package/mac-agent/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  2193. package/mac-agent/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  2194. package/mac-agent/node_modules/uuid/dist/esm-browser/rng.js +0 -19
  2195. package/mac-agent/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  2196. package/mac-agent/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
  2197. package/mac-agent/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  2198. package/mac-agent/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  2199. package/mac-agent/node_modules/uuid/dist/esm-browser/v35.js +0 -64
  2200. package/mac-agent/node_modules/uuid/dist/esm-browser/v4.js +0 -24
  2201. package/mac-agent/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  2202. package/mac-agent/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  2203. package/mac-agent/node_modules/uuid/dist/esm-browser/version.js +0 -11
  2204. package/mac-agent/node_modules/uuid/dist/esm-node/index.js +0 -9
  2205. package/mac-agent/node_modules/uuid/dist/esm-node/md5.js +0 -13
  2206. package/mac-agent/node_modules/uuid/dist/esm-node/nil.js +0 -1
  2207. package/mac-agent/node_modules/uuid/dist/esm-node/parse.js +0 -35
  2208. package/mac-agent/node_modules/uuid/dist/esm-node/regex.js +0 -1
  2209. package/mac-agent/node_modules/uuid/dist/esm-node/rng.js +0 -12
  2210. package/mac-agent/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  2211. package/mac-agent/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  2212. package/mac-agent/node_modules/uuid/dist/esm-node/v1.js +0 -95
  2213. package/mac-agent/node_modules/uuid/dist/esm-node/v3.js +0 -4
  2214. package/mac-agent/node_modules/uuid/dist/esm-node/v35.js +0 -64
  2215. package/mac-agent/node_modules/uuid/dist/esm-node/v4.js +0 -24
  2216. package/mac-agent/node_modules/uuid/dist/esm-node/v5.js +0 -4
  2217. package/mac-agent/node_modules/uuid/dist/esm-node/validate.js +0 -7
  2218. package/mac-agent/node_modules/uuid/dist/esm-node/version.js +0 -11
  2219. package/mac-agent/node_modules/uuid/dist/index.js +0 -79
  2220. package/mac-agent/node_modules/uuid/dist/md5-browser.js +0 -223
  2221. package/mac-agent/node_modules/uuid/dist/md5.js +0 -23
  2222. package/mac-agent/node_modules/uuid/dist/nil.js +0 -8
  2223. package/mac-agent/node_modules/uuid/dist/parse.js +0 -45
  2224. package/mac-agent/node_modules/uuid/dist/regex.js +0 -8
  2225. package/mac-agent/node_modules/uuid/dist/rng-browser.js +0 -26
  2226. package/mac-agent/node_modules/uuid/dist/rng.js +0 -24
  2227. package/mac-agent/node_modules/uuid/dist/sha1-browser.js +0 -104
  2228. package/mac-agent/node_modules/uuid/dist/sha1.js +0 -23
  2229. package/mac-agent/node_modules/uuid/dist/stringify.js +0 -39
  2230. package/mac-agent/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  2231. package/mac-agent/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  2232. package/mac-agent/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  2233. package/mac-agent/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  2234. package/mac-agent/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  2235. package/mac-agent/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  2236. package/mac-agent/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  2237. package/mac-agent/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  2238. package/mac-agent/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  2239. package/mac-agent/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  2240. package/mac-agent/node_modules/uuid/dist/uuid-bin.js +0 -85
  2241. package/mac-agent/node_modules/uuid/dist/v1.js +0 -107
  2242. package/mac-agent/node_modules/uuid/dist/v3.js +0 -16
  2243. package/mac-agent/node_modules/uuid/dist/v35.js +0 -78
  2244. package/mac-agent/node_modules/uuid/dist/v4.js +0 -37
  2245. package/mac-agent/node_modules/uuid/dist/v5.js +0 -16
  2246. package/mac-agent/node_modules/uuid/dist/validate.js +0 -17
  2247. package/mac-agent/node_modules/uuid/dist/version.js +0 -21
  2248. package/mac-agent/node_modules/uuid/package.json +0 -135
  2249. package/mac-agent/node_modules/uuid/wrapper.mjs +0 -10
  2250. package/mac-agent/node_modules/validate-npm-package-license/LICENSE +0 -202
  2251. package/mac-agent/node_modules/validate-npm-package-license/README.md +0 -113
  2252. package/mac-agent/node_modules/validate-npm-package-license/index.js +0 -86
  2253. package/mac-agent/node_modules/validate-npm-package-license/package.json +0 -28
  2254. package/mac-agent/node_modules/webidl-conversions/LICENSE.md +0 -12
  2255. package/mac-agent/node_modules/webidl-conversions/README.md +0 -80
  2256. package/mac-agent/node_modules/webidl-conversions/lib/index.js +0 -332
  2257. package/mac-agent/node_modules/webidl-conversions/package.json +0 -27
  2258. package/mac-agent/node_modules/whatwg-url/LICENSE.txt +0 -21
  2259. package/mac-agent/node_modules/whatwg-url/README.md +0 -67
  2260. package/mac-agent/node_modules/whatwg-url/lib/URL-impl.js +0 -200
  2261. package/mac-agent/node_modules/whatwg-url/lib/URL.js +0 -196
  2262. package/mac-agent/node_modules/whatwg-url/lib/public-api.js +0 -11
  2263. package/mac-agent/node_modules/whatwg-url/lib/url-state-machine.js +0 -1297
  2264. package/mac-agent/node_modules/whatwg-url/lib/utils.js +0 -20
  2265. package/mac-agent/node_modules/whatwg-url/node_modules/webidl-conversions/LICENSE.md +0 -12
  2266. package/mac-agent/node_modules/whatwg-url/node_modules/webidl-conversions/README.md +0 -53
  2267. package/mac-agent/node_modules/whatwg-url/node_modules/webidl-conversions/lib/index.js +0 -189
  2268. package/mac-agent/node_modules/whatwg-url/node_modules/webidl-conversions/package.json +0 -23
  2269. package/mac-agent/node_modules/whatwg-url/package.json +0 -32
  2270. package/mac-agent/node_modules/which/CHANGELOG.md +0 -152
  2271. package/mac-agent/node_modules/which/LICENSE +0 -15
  2272. package/mac-agent/node_modules/which/README.md +0 -51
  2273. package/mac-agent/node_modules/which/bin/which +0 -52
  2274. package/mac-agent/node_modules/which/package.json +0 -30
  2275. package/mac-agent/node_modules/which/which.js +0 -135
  2276. package/mac-agent/node_modules/which-module/CHANGELOG.md +0 -11
  2277. package/mac-agent/node_modules/which-module/LICENSE +0 -13
  2278. package/mac-agent/node_modules/which-module/README.md +0 -55
  2279. package/mac-agent/node_modules/which-module/index.js +0 -9
  2280. package/mac-agent/node_modules/which-module/package.json +0 -41
  2281. package/mac-agent/node_modules/wide-align/LICENSE +0 -14
  2282. package/mac-agent/node_modules/wide-align/README.md +0 -47
  2283. package/mac-agent/node_modules/wide-align/align.js +0 -65
  2284. package/mac-agent/node_modules/wide-align/package.json +0 -33
  2285. package/mac-agent/node_modules/winston/LICENSE +0 -19
  2286. package/mac-agent/node_modules/winston/README.md +0 -1271
  2287. package/mac-agent/node_modules/winston/dist/winston/common.js +0 -44
  2288. package/mac-agent/node_modules/winston/dist/winston/config/index.js +0 -36
  2289. package/mac-agent/node_modules/winston/dist/winston/container.js +0 -141
  2290. package/mac-agent/node_modules/winston/dist/winston/create-logger.js +0 -123
  2291. package/mac-agent/node_modules/winston/dist/winston/exception-handler.js +0 -265
  2292. package/mac-agent/node_modules/winston/dist/winston/exception-stream.js +0 -75
  2293. package/mac-agent/node_modules/winston/dist/winston/logger.js +0 -672
  2294. package/mac-agent/node_modules/winston/dist/winston/profiler.js +0 -65
  2295. package/mac-agent/node_modules/winston/dist/winston/rejection-handler.js +0 -265
  2296. package/mac-agent/node_modules/winston/dist/winston/rejection-stream.js +0 -72
  2297. package/mac-agent/node_modules/winston/dist/winston/tail-file.js +0 -113
  2298. package/mac-agent/node_modules/winston/dist/winston/transports/console.js +0 -143
  2299. package/mac-agent/node_modules/winston/dist/winston/transports/file.js +0 -788
  2300. package/mac-agent/node_modules/winston/dist/winston/transports/http.js +0 -288
  2301. package/mac-agent/node_modules/winston/dist/winston/transports/index.js +0 -56
  2302. package/mac-agent/node_modules/winston/dist/winston/transports/stream.js +0 -86
  2303. package/mac-agent/node_modules/winston/dist/winston.js +0 -171
  2304. package/mac-agent/node_modules/winston/index.d.ts +0 -208
  2305. package/mac-agent/node_modules/winston/lib/winston/common.js +0 -46
  2306. package/mac-agent/node_modules/winston/lib/winston/config/index.d.ts +0 -99
  2307. package/mac-agent/node_modules/winston/lib/winston/config/index.js +0 -35
  2308. package/mac-agent/node_modules/winston/lib/winston/container.js +0 -118
  2309. package/mac-agent/node_modules/winston/lib/winston/create-logger.js +0 -104
  2310. package/mac-agent/node_modules/winston/lib/winston/exception-handler.js +0 -245
  2311. package/mac-agent/node_modules/winston/lib/winston/exception-stream.js +0 -54
  2312. package/mac-agent/node_modules/winston/lib/winston/logger.js +0 -677
  2313. package/mac-agent/node_modules/winston/lib/winston/profiler.js +0 -53
  2314. package/mac-agent/node_modules/winston/lib/winston/rejection-handler.js +0 -251
  2315. package/mac-agent/node_modules/winston/lib/winston/rejection-stream.js +0 -52
  2316. package/mac-agent/node_modules/winston/lib/winston/tail-file.js +0 -124
  2317. package/mac-agent/node_modules/winston/lib/winston/transports/console.js +0 -125
  2318. package/mac-agent/node_modules/winston/lib/winston/transports/file.js +0 -763
  2319. package/mac-agent/node_modules/winston/lib/winston/transports/http.js +0 -262
  2320. package/mac-agent/node_modules/winston/lib/winston/transports/index.d.ts +0 -117
  2321. package/mac-agent/node_modules/winston/lib/winston/transports/index.js +0 -56
  2322. package/mac-agent/node_modules/winston/lib/winston/transports/stream.js +0 -63
  2323. package/mac-agent/node_modules/winston/lib/winston.js +0 -191
  2324. package/mac-agent/node_modules/winston/package.json +0 -74
  2325. package/mac-agent/node_modules/winston-transport/.babelrc +0 -3
  2326. package/mac-agent/node_modules/winston-transport/.eslintrc +0 -7
  2327. package/mac-agent/node_modules/winston-transport/.gitattributes +0 -1
  2328. package/mac-agent/node_modules/winston-transport/.nyc_output/68e78020-c804-4f37-a68a-a967c6380da9.json +0 -1
  2329. package/mac-agent/node_modules/winston-transport/.nyc_output/processinfo/68e78020-c804-4f37-a68a-a967c6380da9.json +0 -1
  2330. package/mac-agent/node_modules/winston-transport/.nyc_output/processinfo/index.json +0 -1
  2331. package/mac-agent/node_modules/winston-transport/CHANGELOG.md +0 -126
  2332. package/mac-agent/node_modules/winston-transport/LICENSE +0 -22
  2333. package/mac-agent/node_modules/winston-transport/README.md +0 -50
  2334. package/mac-agent/node_modules/winston-transport/dist/index.js +0 -8
  2335. package/mac-agent/node_modules/winston-transport/dist/legacy.js +0 -116
  2336. package/mac-agent/node_modules/winston-transport/dist/modern.js +0 -212
  2337. package/mac-agent/node_modules/winston-transport/index.d.ts +0 -39
  2338. package/mac-agent/node_modules/winston-transport/index.js +0 -7
  2339. package/mac-agent/node_modules/winston-transport/legacy.js +0 -119
  2340. package/mac-agent/node_modules/winston-transport/modern.js +0 -211
  2341. package/mac-agent/node_modules/winston-transport/package.json +0 -52
  2342. package/mac-agent/node_modules/wrap-ansi/index.js +0 -168
  2343. package/mac-agent/node_modules/wrap-ansi/license +0 -21
  2344. package/mac-agent/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -4
  2345. package/mac-agent/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -21
  2346. package/mac-agent/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -64
  2347. package/mac-agent/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -39
  2348. package/mac-agent/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +0 -46
  2349. package/mac-agent/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +0 -21
  2350. package/mac-agent/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +0 -45
  2351. package/mac-agent/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +0 -39
  2352. package/mac-agent/node_modules/wrap-ansi/node_modules/string-width/index.js +0 -37
  2353. package/mac-agent/node_modules/wrap-ansi/node_modules/string-width/license +0 -21
  2354. package/mac-agent/node_modules/wrap-ansi/node_modules/string-width/package.json +0 -56
  2355. package/mac-agent/node_modules/wrap-ansi/node_modules/string-width/readme.md +0 -42
  2356. package/mac-agent/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -6
  2357. package/mac-agent/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -21
  2358. package/mac-agent/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -57
  2359. package/mac-agent/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -33
  2360. package/mac-agent/node_modules/wrap-ansi/package.json +0 -68
  2361. package/mac-agent/node_modules/wrap-ansi/readme.md +0 -73
  2362. package/mac-agent/node_modules/wrappy/LICENSE +0 -15
  2363. package/mac-agent/node_modules/wrappy/README.md +0 -36
  2364. package/mac-agent/node_modules/wrappy/package.json +0 -29
  2365. package/mac-agent/node_modules/wrappy/wrappy.js +0 -33
  2366. package/mac-agent/node_modules/ws/LICENSE +0 -20
  2367. package/mac-agent/node_modules/ws/README.md +0 -548
  2368. package/mac-agent/node_modules/ws/browser.js +0 -8
  2369. package/mac-agent/node_modules/ws/index.js +0 -13
  2370. package/mac-agent/node_modules/ws/lib/buffer-util.js +0 -131
  2371. package/mac-agent/node_modules/ws/lib/constants.js +0 -18
  2372. package/mac-agent/node_modules/ws/lib/event-target.js +0 -292
  2373. package/mac-agent/node_modules/ws/lib/extension.js +0 -203
  2374. package/mac-agent/node_modules/ws/lib/limiter.js +0 -55
  2375. package/mac-agent/node_modules/ws/lib/permessage-deflate.js +0 -528
  2376. package/mac-agent/node_modules/ws/lib/receiver.js +0 -706
  2377. package/mac-agent/node_modules/ws/lib/sender.js +0 -602
  2378. package/mac-agent/node_modules/ws/lib/stream.js +0 -161
  2379. package/mac-agent/node_modules/ws/lib/subprotocol.js +0 -62
  2380. package/mac-agent/node_modules/ws/lib/validation.js +0 -152
  2381. package/mac-agent/node_modules/ws/lib/websocket-server.js +0 -550
  2382. package/mac-agent/node_modules/ws/lib/websocket.js +0 -1388
  2383. package/mac-agent/node_modules/ws/package.json +0 -69
  2384. package/mac-agent/node_modules/ws/wrapper.mjs +0 -8
  2385. package/mac-agent/node_modules/y18n/CHANGELOG.md +0 -6
  2386. package/mac-agent/node_modules/y18n/LICENSE +0 -13
  2387. package/mac-agent/node_modules/y18n/README.md +0 -91
  2388. package/mac-agent/node_modules/y18n/index.js +0 -172
  2389. package/mac-agent/node_modules/y18n/package.json +0 -37
  2390. package/mac-agent/node_modules/yallist/LICENSE +0 -15
  2391. package/mac-agent/node_modules/yallist/README.md +0 -204
  2392. package/mac-agent/node_modules/yallist/iterator.js +0 -8
  2393. package/mac-agent/node_modules/yallist/package.json +0 -29
  2394. package/mac-agent/node_modules/yallist/yallist.js +0 -426
  2395. package/mac-agent/node_modules/yargs/CHANGELOG.md +0 -928
  2396. package/mac-agent/node_modules/yargs/LICENSE +0 -22
  2397. package/mac-agent/node_modules/yargs/README.md +0 -2017
  2398. package/mac-agent/node_modules/yargs/completion.sh.hbs +0 -28
  2399. package/mac-agent/node_modules/yargs/index.js +0 -31
  2400. package/mac-agent/node_modules/yargs/lib/apply-extends.js +0 -41
  2401. package/mac-agent/node_modules/yargs/lib/argsert.js +0 -72
  2402. package/mac-agent/node_modules/yargs/lib/assign.js +0 -15
  2403. package/mac-agent/node_modules/yargs/lib/command.js +0 -334
  2404. package/mac-agent/node_modules/yargs/lib/completion.js +0 -104
  2405. package/mac-agent/node_modules/yargs/lib/levenshtein.js +0 -47
  2406. package/mac-agent/node_modules/yargs/lib/obj-filter.js +0 -10
  2407. package/mac-agent/node_modules/yargs/lib/usage.js +0 -489
  2408. package/mac-agent/node_modules/yargs/lib/validation.js +0 -363
  2409. package/mac-agent/node_modules/yargs/lib/yerror.js +0 -10
  2410. package/mac-agent/node_modules/yargs/locales/be.json +0 -39
  2411. package/mac-agent/node_modules/yargs/locales/de.json +0 -39
  2412. package/mac-agent/node_modules/yargs/locales/en.json +0 -40
  2413. package/mac-agent/node_modules/yargs/locales/es.json +0 -39
  2414. package/mac-agent/node_modules/yargs/locales/fr.json +0 -37
  2415. package/mac-agent/node_modules/yargs/locales/hi.json +0 -39
  2416. package/mac-agent/node_modules/yargs/locales/hu.json +0 -39
  2417. package/mac-agent/node_modules/yargs/locales/id.json +0 -40
  2418. package/mac-agent/node_modules/yargs/locales/it.json +0 -39
  2419. package/mac-agent/node_modules/yargs/locales/ja.json +0 -39
  2420. package/mac-agent/node_modules/yargs/locales/ko.json +0 -39
  2421. package/mac-agent/node_modules/yargs/locales/nb.json +0 -37
  2422. package/mac-agent/node_modules/yargs/locales/nl.json +0 -39
  2423. package/mac-agent/node_modules/yargs/locales/pirate.json +0 -12
  2424. package/mac-agent/node_modules/yargs/locales/pl.json +0 -39
  2425. package/mac-agent/node_modules/yargs/locales/pt.json +0 -38
  2426. package/mac-agent/node_modules/yargs/locales/pt_BR.json +0 -40
  2427. package/mac-agent/node_modules/yargs/locales/ru.json +0 -39
  2428. package/mac-agent/node_modules/yargs/locales/th.json +0 -39
  2429. package/mac-agent/node_modules/yargs/locales/tr.json +0 -39
  2430. package/mac-agent/node_modules/yargs/locales/zh_CN.json +0 -37
  2431. package/mac-agent/node_modules/yargs/locales/zh_TW.json +0 -40
  2432. package/mac-agent/node_modules/yargs/node_modules/ansi-regex/index.js +0 -4
  2433. package/mac-agent/node_modules/yargs/node_modules/ansi-regex/license +0 -21
  2434. package/mac-agent/node_modules/yargs/node_modules/ansi-regex/package.json +0 -64
  2435. package/mac-agent/node_modules/yargs/node_modules/ansi-regex/readme.md +0 -39
  2436. package/mac-agent/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js +0 -46
  2437. package/mac-agent/node_modules/yargs/node_modules/is-fullwidth-code-point/license +0 -21
  2438. package/mac-agent/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json +0 -45
  2439. package/mac-agent/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md +0 -39
  2440. package/mac-agent/node_modules/yargs/node_modules/string-width/index.js +0 -37
  2441. package/mac-agent/node_modules/yargs/node_modules/string-width/license +0 -21
  2442. package/mac-agent/node_modules/yargs/node_modules/string-width/package.json +0 -56
  2443. package/mac-agent/node_modules/yargs/node_modules/string-width/readme.md +0 -42
  2444. package/mac-agent/node_modules/yargs/node_modules/strip-ansi/index.js +0 -6
  2445. package/mac-agent/node_modules/yargs/node_modules/strip-ansi/license +0 -21
  2446. package/mac-agent/node_modules/yargs/node_modules/strip-ansi/package.json +0 -57
  2447. package/mac-agent/node_modules/yargs/node_modules/strip-ansi/readme.md +0 -33
  2448. package/mac-agent/node_modules/yargs/package.json +0 -80
  2449. package/mac-agent/node_modules/yargs/yargs.js +0 -1126
  2450. package/mac-agent/node_modules/yargs-parser/CHANGELOG.md +0 -176
  2451. package/mac-agent/node_modules/yargs-parser/LICENSE.txt +0 -14
  2452. package/mac-agent/node_modules/yargs-parser/README.md +0 -257
  2453. package/mac-agent/node_modules/yargs-parser/index.js +0 -753
  2454. package/mac-agent/node_modules/yargs-parser/lib/tokenize-arg-string.js +0 -34
  2455. package/mac-agent/node_modules/yargs-parser/package.json +0 -44
  2456. package/mac-agent/package-lock.json +0 -2272
  2457. package/mac-agent/shell-mirror@1.5.7 +0 -0
@@ -1,4097 +0,0 @@
1
- #ifndef SRC_NAPI_INL_H_
2
- #define SRC_NAPI_INL_H_
3
-
4
- ////////////////////////////////////////////////////////////////////////////////
5
- // N-API C++ Wrapper Classes
6
- //
7
- // Inline header-only implementations for "N-API" ABI-stable C APIs for Node.js.
8
- ////////////////////////////////////////////////////////////////////////////////
9
-
10
- // Note: Do not include this file directly! Include "napi.h" instead.
11
-
12
- #include <cstring>
13
- #include <type_traits>
14
-
15
- namespace Napi {
16
-
17
- // Helpers to handle functions exposed from C++.
18
- namespace details {
19
-
20
- // Attach a data item to an object and delete it when the object gets
21
- // garbage-collected.
22
- // TODO: Replace this code with `napi_add_finalizer()` whenever it becomes
23
- // available on all supported versions of Node.js.
24
- template <typename FreeType>
25
- static inline napi_status AttachData(napi_env env,
26
- napi_value obj,
27
- FreeType* data) {
28
- napi_value symbol, external;
29
- napi_status status = napi_create_symbol(env, nullptr, &symbol);
30
- if (status == napi_ok) {
31
- status = napi_create_external(env,
32
- data,
33
- [](napi_env /*env*/, void* data, void* /*hint*/) {
34
- delete static_cast<FreeType*>(data);
35
- },
36
- nullptr,
37
- &external);
38
- if (status == napi_ok) {
39
- napi_property_descriptor desc = {
40
- nullptr,
41
- symbol,
42
- nullptr,
43
- nullptr,
44
- nullptr,
45
- external,
46
- napi_default,
47
- nullptr
48
- };
49
- status = napi_define_properties(env, obj, 1, &desc);
50
- }
51
- }
52
- return status;
53
- }
54
-
55
- // For use in JS to C++ callback wrappers to catch any Napi::Error exceptions
56
- // and rethrow them as JavaScript exceptions before returning from the callback.
57
- template <typename Callable>
58
- inline napi_value WrapCallback(Callable callback) {
59
- #ifdef NAPI_CPP_EXCEPTIONS
60
- try {
61
- return callback();
62
- } catch (const Error& e) {
63
- e.ThrowAsJavaScriptException();
64
- return nullptr;
65
- }
66
- #else // NAPI_CPP_EXCEPTIONS
67
- // When C++ exceptions are disabled, errors are immediately thrown as JS
68
- // exceptions, so there is no need to catch and rethrow them here.
69
- return callback();
70
- #endif // NAPI_CPP_EXCEPTIONS
71
- }
72
-
73
- template <typename Callable, typename Return>
74
- struct CallbackData {
75
- static inline
76
- napi_value Wrapper(napi_env env, napi_callback_info info) {
77
- return details::WrapCallback([&] {
78
- CallbackInfo callbackInfo(env, info);
79
- CallbackData* callbackData =
80
- static_cast<CallbackData*>(callbackInfo.Data());
81
- callbackInfo.SetData(callbackData->data);
82
- return callbackData->callback(callbackInfo);
83
- });
84
- }
85
-
86
- Callable callback;
87
- void* data;
88
- };
89
-
90
- template <typename Callable>
91
- struct CallbackData<Callable, void> {
92
- static inline
93
- napi_value Wrapper(napi_env env, napi_callback_info info) {
94
- return details::WrapCallback([&] {
95
- CallbackInfo callbackInfo(env, info);
96
- CallbackData* callbackData =
97
- static_cast<CallbackData*>(callbackInfo.Data());
98
- callbackInfo.SetData(callbackData->data);
99
- callbackData->callback(callbackInfo);
100
- return nullptr;
101
- });
102
- }
103
-
104
- Callable callback;
105
- void* data;
106
- };
107
-
108
- template <typename T, typename Finalizer, typename Hint = void>
109
- struct FinalizeData {
110
- static inline
111
- void Wrapper(napi_env env, void* data, void* finalizeHint) {
112
- FinalizeData* finalizeData = static_cast<FinalizeData*>(finalizeHint);
113
- finalizeData->callback(Env(env), static_cast<T*>(data));
114
- delete finalizeData;
115
- }
116
-
117
- static inline
118
- void WrapperWithHint(napi_env env, void* data, void* finalizeHint) {
119
- FinalizeData* finalizeData = static_cast<FinalizeData*>(finalizeHint);
120
- finalizeData->callback(Env(env), static_cast<T*>(data), finalizeData->hint);
121
- delete finalizeData;
122
- }
123
-
124
- Finalizer callback;
125
- Hint* hint;
126
- };
127
-
128
- #if (NAPI_VERSION > 3)
129
- template <typename ContextType=void,
130
- typename Finalizer=std::function<void(Env, void*, ContextType*)>,
131
- typename FinalizerDataType=void>
132
- struct ThreadSafeFinalize {
133
- static inline
134
- void Wrapper(napi_env env, void* rawFinalizeData, void* /* rawContext */) {
135
- if (rawFinalizeData == nullptr)
136
- return;
137
-
138
- ThreadSafeFinalize* finalizeData =
139
- static_cast<ThreadSafeFinalize*>(rawFinalizeData);
140
- finalizeData->callback(Env(env));
141
- if (finalizeData->tsfn) {
142
- *finalizeData->tsfn = nullptr;
143
- }
144
- delete finalizeData;
145
- }
146
-
147
- static inline
148
- void FinalizeWrapperWithData(napi_env env,
149
- void* rawFinalizeData,
150
- void* /* rawContext */) {
151
- if (rawFinalizeData == nullptr)
152
- return;
153
-
154
- ThreadSafeFinalize* finalizeData =
155
- static_cast<ThreadSafeFinalize*>(rawFinalizeData);
156
- finalizeData->callback(Env(env), finalizeData->data);
157
- if (finalizeData->tsfn) {
158
- *finalizeData->tsfn = nullptr;
159
- }
160
- delete finalizeData;
161
- }
162
-
163
- static inline
164
- void FinalizeWrapperWithContext(napi_env env,
165
- void* rawFinalizeData,
166
- void* rawContext) {
167
- if (rawFinalizeData == nullptr)
168
- return;
169
-
170
- ThreadSafeFinalize* finalizeData =
171
- static_cast<ThreadSafeFinalize*>(rawFinalizeData);
172
- finalizeData->callback(Env(env), static_cast<ContextType*>(rawContext));
173
- if (finalizeData->tsfn) {
174
- *finalizeData->tsfn = nullptr;
175
- }
176
- delete finalizeData;
177
- }
178
-
179
- static inline
180
- void FinalizeFinalizeWrapperWithDataAndContext(napi_env env,
181
- void* rawFinalizeData,
182
- void* rawContext) {
183
- if (rawFinalizeData == nullptr)
184
- return;
185
-
186
- ThreadSafeFinalize* finalizeData =
187
- static_cast<ThreadSafeFinalize*>(rawFinalizeData);
188
- finalizeData->callback(Env(env), finalizeData->data,
189
- static_cast<ContextType*>(rawContext));
190
- if (finalizeData->tsfn) {
191
- *finalizeData->tsfn = nullptr;
192
- }
193
- delete finalizeData;
194
- }
195
-
196
- FinalizerDataType* data;
197
- Finalizer callback;
198
- napi_threadsafe_function* tsfn;
199
- };
200
- #endif
201
-
202
- template <typename Getter, typename Setter>
203
- struct AccessorCallbackData {
204
- static inline
205
- napi_value GetterWrapper(napi_env env, napi_callback_info info) {
206
- return details::WrapCallback([&] {
207
- CallbackInfo callbackInfo(env, info);
208
- AccessorCallbackData* callbackData =
209
- static_cast<AccessorCallbackData*>(callbackInfo.Data());
210
- callbackInfo.SetData(callbackData->data);
211
- return callbackData->getterCallback(callbackInfo);
212
- });
213
- }
214
-
215
- static inline
216
- napi_value SetterWrapper(napi_env env, napi_callback_info info) {
217
- return details::WrapCallback([&] {
218
- CallbackInfo callbackInfo(env, info);
219
- AccessorCallbackData* callbackData =
220
- static_cast<AccessorCallbackData*>(callbackInfo.Data());
221
- callbackInfo.SetData(callbackData->data);
222
- callbackData->setterCallback(callbackInfo);
223
- return nullptr;
224
- });
225
- }
226
-
227
- Getter getterCallback;
228
- Setter setterCallback;
229
- void* data;
230
- };
231
-
232
- } // namespace details
233
-
234
- #ifndef NODE_ADDON_API_DISABLE_DEPRECATED
235
- # include "napi-inl.deprecated.h"
236
- #endif // !NODE_ADDON_API_DISABLE_DEPRECATED
237
-
238
- ////////////////////////////////////////////////////////////////////////////////
239
- // Module registration
240
- ////////////////////////////////////////////////////////////////////////////////
241
-
242
- #define NODE_API_MODULE(modname, regfunc) \
243
- napi_value __napi_ ## regfunc(napi_env env, \
244
- napi_value exports) { \
245
- return Napi::RegisterModule(env, exports, regfunc); \
246
- } \
247
- NAPI_MODULE(modname, __napi_ ## regfunc)
248
-
249
- // Adapt the NAPI_MODULE registration function:
250
- // - Wrap the arguments in NAPI wrappers.
251
- // - Catch any NAPI errors and rethrow as JS exceptions.
252
- inline napi_value RegisterModule(napi_env env,
253
- napi_value exports,
254
- ModuleRegisterCallback registerCallback) {
255
- return details::WrapCallback([&] {
256
- return napi_value(registerCallback(Napi::Env(env),
257
- Napi::Object(env, exports)));
258
- });
259
- }
260
-
261
- ////////////////////////////////////////////////////////////////////////////////
262
- // Env class
263
- ////////////////////////////////////////////////////////////////////////////////
264
-
265
- inline Env::Env(napi_env env) : _env(env) {
266
- }
267
-
268
- inline Env::operator napi_env() const {
269
- return _env;
270
- }
271
-
272
- inline Object Env::Global() const {
273
- napi_value value;
274
- napi_status status = napi_get_global(*this, &value);
275
- NAPI_THROW_IF_FAILED(*this, status, Object());
276
- return Object(*this, value);
277
- }
278
-
279
- inline Value Env::Undefined() const {
280
- napi_value value;
281
- napi_status status = napi_get_undefined(*this, &value);
282
- NAPI_THROW_IF_FAILED(*this, status, Value());
283
- return Value(*this, value);
284
- }
285
-
286
- inline Value Env::Null() const {
287
- napi_value value;
288
- napi_status status = napi_get_null(*this, &value);
289
- NAPI_THROW_IF_FAILED(*this, status, Value());
290
- return Value(*this, value);
291
- }
292
-
293
- inline bool Env::IsExceptionPending() const {
294
- bool result;
295
- napi_status status = napi_is_exception_pending(_env, &result);
296
- if (status != napi_ok) result = false; // Checking for a pending exception shouldn't throw.
297
- return result;
298
- }
299
-
300
- inline Error Env::GetAndClearPendingException() {
301
- napi_value value;
302
- napi_status status = napi_get_and_clear_last_exception(_env, &value);
303
- if (status != napi_ok) {
304
- // Don't throw another exception when failing to get the exception!
305
- return Error();
306
- }
307
- return Error(_env, value);
308
- }
309
-
310
- ////////////////////////////////////////////////////////////////////////////////
311
- // Value class
312
- ////////////////////////////////////////////////////////////////////////////////
313
-
314
- inline Value::Value() : _env(nullptr), _value(nullptr) {
315
- }
316
-
317
- inline Value::Value(napi_env env, napi_value value) : _env(env), _value(value) {
318
- }
319
-
320
- inline Value::operator napi_value() const {
321
- return _value;
322
- }
323
-
324
- inline bool Value::operator ==(const Value& other) const {
325
- return StrictEquals(other);
326
- }
327
-
328
- inline bool Value::operator !=(const Value& other) const {
329
- return !this->operator ==(other);
330
- }
331
-
332
- inline bool Value::StrictEquals(const Value& other) const {
333
- bool result;
334
- napi_status status = napi_strict_equals(_env, *this, other, &result);
335
- NAPI_THROW_IF_FAILED(_env, status, false);
336
- return result;
337
- }
338
-
339
- inline Napi::Env Value::Env() const {
340
- return Napi::Env(_env);
341
- }
342
-
343
- inline bool Value::IsEmpty() const {
344
- return _value == nullptr;
345
- }
346
-
347
- inline napi_valuetype Value::Type() const {
348
- if (IsEmpty()) {
349
- return napi_undefined;
350
- }
351
-
352
- napi_valuetype type;
353
- napi_status status = napi_typeof(_env, _value, &type);
354
- NAPI_THROW_IF_FAILED(_env, status, napi_undefined);
355
- return type;
356
- }
357
-
358
- inline bool Value::IsUndefined() const {
359
- return Type() == napi_undefined;
360
- }
361
-
362
- inline bool Value::IsNull() const {
363
- return Type() == napi_null;
364
- }
365
-
366
- inline bool Value::IsBoolean() const {
367
- return Type() == napi_boolean;
368
- }
369
-
370
- inline bool Value::IsNumber() const {
371
- return Type() == napi_number;
372
- }
373
-
374
- // currently experimental guard with version of NAPI_VERSION that it is
375
- // released in once it is no longer experimental
376
- #if (NAPI_VERSION > 2147483646)
377
- inline bool Value::IsBigInt() const {
378
- return Type() == napi_bigint;
379
- }
380
- #endif // NAPI_EXPERIMENTAL
381
-
382
- inline bool Value::IsString() const {
383
- return Type() == napi_string;
384
- }
385
-
386
- inline bool Value::IsSymbol() const {
387
- return Type() == napi_symbol;
388
- }
389
-
390
- inline bool Value::IsArray() const {
391
- if (IsEmpty()) {
392
- return false;
393
- }
394
-
395
- bool result;
396
- napi_status status = napi_is_array(_env, _value, &result);
397
- NAPI_THROW_IF_FAILED(_env, status, false);
398
- return result;
399
- }
400
-
401
- inline bool Value::IsArrayBuffer() const {
402
- if (IsEmpty()) {
403
- return false;
404
- }
405
-
406
- bool result;
407
- napi_status status = napi_is_arraybuffer(_env, _value, &result);
408
- NAPI_THROW_IF_FAILED(_env, status, false);
409
- return result;
410
- }
411
-
412
- inline bool Value::IsTypedArray() const {
413
- if (IsEmpty()) {
414
- return false;
415
- }
416
-
417
- bool result;
418
- napi_status status = napi_is_typedarray(_env, _value, &result);
419
- NAPI_THROW_IF_FAILED(_env, status, false);
420
- return result;
421
- }
422
-
423
- inline bool Value::IsObject() const {
424
- return Type() == napi_object || IsFunction();
425
- }
426
-
427
- inline bool Value::IsFunction() const {
428
- return Type() == napi_function;
429
- }
430
-
431
- inline bool Value::IsPromise() const {
432
- if (IsEmpty()) {
433
- return false;
434
- }
435
-
436
- bool result;
437
- napi_status status = napi_is_promise(_env, _value, &result);
438
- NAPI_THROW_IF_FAILED(_env, status, false);
439
- return result;
440
- }
441
-
442
- inline bool Value::IsDataView() const {
443
- if (IsEmpty()) {
444
- return false;
445
- }
446
-
447
- bool result;
448
- napi_status status = napi_is_dataview(_env, _value, &result);
449
- NAPI_THROW_IF_FAILED(_env, status, false);
450
- return result;
451
- }
452
-
453
- inline bool Value::IsBuffer() const {
454
- if (IsEmpty()) {
455
- return false;
456
- }
457
-
458
- bool result;
459
- napi_status status = napi_is_buffer(_env, _value, &result);
460
- NAPI_THROW_IF_FAILED(_env, status, false);
461
- return result;
462
- }
463
-
464
- inline bool Value::IsExternal() const {
465
- return Type() == napi_external;
466
- }
467
-
468
- template <typename T>
469
- inline T Value::As() const {
470
- return T(_env, _value);
471
- }
472
-
473
- inline Boolean Value::ToBoolean() const {
474
- napi_value result;
475
- napi_status status = napi_coerce_to_bool(_env, _value, &result);
476
- NAPI_THROW_IF_FAILED(_env, status, Boolean());
477
- return Boolean(_env, result);
478
- }
479
-
480
- inline Number Value::ToNumber() const {
481
- napi_value result;
482
- napi_status status = napi_coerce_to_number(_env, _value, &result);
483
- NAPI_THROW_IF_FAILED(_env, status, Number());
484
- return Number(_env, result);
485
- }
486
-
487
- inline String Value::ToString() const {
488
- napi_value result;
489
- napi_status status = napi_coerce_to_string(_env, _value, &result);
490
- NAPI_THROW_IF_FAILED(_env, status, String());
491
- return String(_env, result);
492
- }
493
-
494
- inline Object Value::ToObject() const {
495
- napi_value result;
496
- napi_status status = napi_coerce_to_object(_env, _value, &result);
497
- NAPI_THROW_IF_FAILED(_env, status, Object());
498
- return Object(_env, result);
499
- }
500
-
501
- ////////////////////////////////////////////////////////////////////////////////
502
- // Boolean class
503
- ////////////////////////////////////////////////////////////////////////////////
504
-
505
- inline Boolean Boolean::New(napi_env env, bool val) {
506
- napi_value value;
507
- napi_status status = napi_get_boolean(env, val, &value);
508
- NAPI_THROW_IF_FAILED(env, status, Boolean());
509
- return Boolean(env, value);
510
- }
511
-
512
- inline Boolean::Boolean() : Napi::Value() {
513
- }
514
-
515
- inline Boolean::Boolean(napi_env env, napi_value value) : Napi::Value(env, value) {
516
- }
517
-
518
- inline Boolean::operator bool() const {
519
- return Value();
520
- }
521
-
522
- inline bool Boolean::Value() const {
523
- bool result;
524
- napi_status status = napi_get_value_bool(_env, _value, &result);
525
- NAPI_THROW_IF_FAILED(_env, status, false);
526
- return result;
527
- }
528
-
529
- ////////////////////////////////////////////////////////////////////////////////
530
- // Number class
531
- ////////////////////////////////////////////////////////////////////////////////
532
-
533
- inline Number Number::New(napi_env env, double val) {
534
- napi_value value;
535
- napi_status status = napi_create_double(env, val, &value);
536
- NAPI_THROW_IF_FAILED(env, status, Number());
537
- return Number(env, value);
538
- }
539
-
540
- inline Number::Number() : Value() {
541
- }
542
-
543
- inline Number::Number(napi_env env, napi_value value) : Value(env, value) {
544
- }
545
-
546
- inline Number::operator int32_t() const {
547
- return Int32Value();
548
- }
549
-
550
- inline Number::operator uint32_t() const {
551
- return Uint32Value();
552
- }
553
-
554
- inline Number::operator int64_t() const {
555
- return Int64Value();
556
- }
557
-
558
- inline Number::operator float() const {
559
- return FloatValue();
560
- }
561
-
562
- inline Number::operator double() const {
563
- return DoubleValue();
564
- }
565
-
566
- inline int32_t Number::Int32Value() const {
567
- int32_t result;
568
- napi_status status = napi_get_value_int32(_env, _value, &result);
569
- NAPI_THROW_IF_FAILED(_env, status, 0);
570
- return result;
571
- }
572
-
573
- inline uint32_t Number::Uint32Value() const {
574
- uint32_t result;
575
- napi_status status = napi_get_value_uint32(_env, _value, &result);
576
- NAPI_THROW_IF_FAILED(_env, status, 0);
577
- return result;
578
- }
579
-
580
- inline int64_t Number::Int64Value() const {
581
- int64_t result;
582
- napi_status status = napi_get_value_int64(_env, _value, &result);
583
- NAPI_THROW_IF_FAILED(_env, status, 0);
584
- return result;
585
- }
586
-
587
- inline float Number::FloatValue() const {
588
- return static_cast<float>(DoubleValue());
589
- }
590
-
591
- inline double Number::DoubleValue() const {
592
- double result;
593
- napi_status status = napi_get_value_double(_env, _value, &result);
594
- NAPI_THROW_IF_FAILED(_env, status, 0);
595
- return result;
596
- }
597
-
598
- // currently experimental guard with version of NAPI_VERSION that it is
599
- // released in once it is no longer experimental
600
- #if (NAPI_VERSION > 2147483646)
601
- ////////////////////////////////////////////////////////////////////////////////
602
- // BigInt Class
603
- ////////////////////////////////////////////////////////////////////////////////
604
-
605
- inline BigInt BigInt::New(napi_env env, int64_t val) {
606
- napi_value value;
607
- napi_status status = napi_create_bigint_int64(env, val, &value);
608
- NAPI_THROW_IF_FAILED(env, status, BigInt());
609
- return BigInt(env, value);
610
- }
611
-
612
- inline BigInt BigInt::New(napi_env env, uint64_t val) {
613
- napi_value value;
614
- napi_status status = napi_create_bigint_uint64(env, val, &value);
615
- NAPI_THROW_IF_FAILED(env, status, BigInt());
616
- return BigInt(env, value);
617
- }
618
-
619
- inline BigInt BigInt::New(napi_env env, int sign_bit, size_t word_count, const uint64_t* words) {
620
- napi_value value;
621
- napi_status status = napi_create_bigint_words(env, sign_bit, word_count, words, &value);
622
- NAPI_THROW_IF_FAILED(env, status, BigInt());
623
- return BigInt(env, value);
624
- }
625
-
626
- inline BigInt::BigInt() : Value() {
627
- }
628
-
629
- inline BigInt::BigInt(napi_env env, napi_value value) : Value(env, value) {
630
- }
631
-
632
- inline int64_t BigInt::Int64Value(bool* lossless) const {
633
- int64_t result;
634
- napi_status status = napi_get_value_bigint_int64(
635
- _env, _value, &result, lossless);
636
- NAPI_THROW_IF_FAILED(_env, status, 0);
637
- return result;
638
- }
639
-
640
- inline uint64_t BigInt::Uint64Value(bool* lossless) const {
641
- uint64_t result;
642
- napi_status status = napi_get_value_bigint_uint64(
643
- _env, _value, &result, lossless);
644
- NAPI_THROW_IF_FAILED(_env, status, 0);
645
- return result;
646
- }
647
-
648
- inline size_t BigInt::WordCount() const {
649
- size_t word_count;
650
- napi_status status = napi_get_value_bigint_words(
651
- _env, _value, nullptr, &word_count, nullptr);
652
- NAPI_THROW_IF_FAILED(_env, status, 0);
653
- return word_count;
654
- }
655
-
656
- inline void BigInt::ToWords(int* sign_bit, size_t* word_count, uint64_t* words) {
657
- napi_status status = napi_get_value_bigint_words(
658
- _env, _value, sign_bit, word_count, words);
659
- NAPI_THROW_IF_FAILED_VOID(_env, status);
660
- }
661
- #endif // NAPI_EXPERIMENTAL
662
-
663
- ////////////////////////////////////////////////////////////////////////////////
664
- // Name class
665
- ////////////////////////////////////////////////////////////////////////////////
666
-
667
- inline Name::Name() : Value() {
668
- }
669
-
670
- inline Name::Name(napi_env env, napi_value value) : Value(env, value) {
671
- }
672
-
673
- ////////////////////////////////////////////////////////////////////////////////
674
- // String class
675
- ////////////////////////////////////////////////////////////////////////////////
676
-
677
- inline String String::New(napi_env env, const std::string& val) {
678
- return String::New(env, val.c_str(), val.size());
679
- }
680
-
681
- inline String String::New(napi_env env, const std::u16string& val) {
682
- return String::New(env, val.c_str(), val.size());
683
- }
684
-
685
- inline String String::New(napi_env env, const char* val) {
686
- napi_value value;
687
- napi_status status = napi_create_string_utf8(env, val, std::strlen(val), &value);
688
- NAPI_THROW_IF_FAILED(env, status, String());
689
- return String(env, value);
690
- }
691
-
692
- inline String String::New(napi_env env, const char16_t* val) {
693
- napi_value value;
694
- napi_status status = napi_create_string_utf16(env, val, std::u16string(val).size(), &value);
695
- NAPI_THROW_IF_FAILED(env, status, String());
696
- return String(env, value);
697
- }
698
-
699
- inline String String::New(napi_env env, const char* val, size_t length) {
700
- napi_value value;
701
- napi_status status = napi_create_string_utf8(env, val, length, &value);
702
- NAPI_THROW_IF_FAILED(env, status, String());
703
- return String(env, value);
704
- }
705
-
706
- inline String String::New(napi_env env, const char16_t* val, size_t length) {
707
- napi_value value;
708
- napi_status status = napi_create_string_utf16(env, val, length, &value);
709
- NAPI_THROW_IF_FAILED(env, status, String());
710
- return String(env, value);
711
- }
712
-
713
- inline String::String() : Name() {
714
- }
715
-
716
- inline String::String(napi_env env, napi_value value) : Name(env, value) {
717
- }
718
-
719
- inline String::operator std::string() const {
720
- return Utf8Value();
721
- }
722
-
723
- inline String::operator std::u16string() const {
724
- return Utf16Value();
725
- }
726
-
727
- inline std::string String::Utf8Value() const {
728
- size_t length;
729
- napi_status status = napi_get_value_string_utf8(_env, _value, nullptr, 0, &length);
730
- NAPI_THROW_IF_FAILED(_env, status, "");
731
-
732
- std::string value;
733
- value.reserve(length + 1);
734
- value.resize(length);
735
- status = napi_get_value_string_utf8(_env, _value, &value[0], value.capacity(), nullptr);
736
- NAPI_THROW_IF_FAILED(_env, status, "");
737
- return value;
738
- }
739
-
740
- inline std::u16string String::Utf16Value() const {
741
- size_t length;
742
- napi_status status = napi_get_value_string_utf16(_env, _value, nullptr, 0, &length);
743
- NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT(""));
744
-
745
- std::u16string value;
746
- value.reserve(length + 1);
747
- value.resize(length);
748
- status = napi_get_value_string_utf16(_env, _value, &value[0], value.capacity(), nullptr);
749
- NAPI_THROW_IF_FAILED(_env, status, NAPI_WIDE_TEXT(""));
750
- return value;
751
- }
752
-
753
- ////////////////////////////////////////////////////////////////////////////////
754
- // Symbol class
755
- ////////////////////////////////////////////////////////////////////////////////
756
-
757
- inline Symbol Symbol::New(napi_env env, const char* description) {
758
- napi_value descriptionValue = description != nullptr ?
759
- String::New(env, description) : static_cast<napi_value>(nullptr);
760
- return Symbol::New(env, descriptionValue);
761
- }
762
-
763
- inline Symbol Symbol::New(napi_env env, const std::string& description) {
764
- napi_value descriptionValue = String::New(env, description);
765
- return Symbol::New(env, descriptionValue);
766
- }
767
-
768
- inline Symbol Symbol::New(napi_env env, String description) {
769
- napi_value descriptionValue = description;
770
- return Symbol::New(env, descriptionValue);
771
- }
772
-
773
- inline Symbol Symbol::New(napi_env env, napi_value description) {
774
- napi_value value;
775
- napi_status status = napi_create_symbol(env, description, &value);
776
- NAPI_THROW_IF_FAILED(env, status, Symbol());
777
- return Symbol(env, value);
778
- }
779
-
780
- inline Symbol Symbol::WellKnown(napi_env env, const std::string& name) {
781
- return Napi::Env(env).Global().Get("Symbol").As<Object>().Get(name).As<Symbol>();
782
- }
783
-
784
- inline Symbol::Symbol() : Name() {
785
- }
786
-
787
- inline Symbol::Symbol(napi_env env, napi_value value) : Name(env, value) {
788
- }
789
-
790
- ////////////////////////////////////////////////////////////////////////////////
791
- // Automagic value creation
792
- ////////////////////////////////////////////////////////////////////////////////
793
-
794
- namespace details {
795
- template <typename T>
796
- struct vf_number {
797
- static Number From(napi_env env, T value) {
798
- return Number::New(env, static_cast<double>(value));
799
- }
800
- };
801
-
802
- template<>
803
- struct vf_number<bool> {
804
- static Boolean From(napi_env env, bool value) {
805
- return Boolean::New(env, value);
806
- }
807
- };
808
-
809
- struct vf_utf8_charp {
810
- static String From(napi_env env, const char* value) {
811
- return String::New(env, value);
812
- }
813
- };
814
-
815
- struct vf_utf16_charp {
816
- static String From(napi_env env, const char16_t* value) {
817
- return String::New(env, value);
818
- }
819
- };
820
- struct vf_utf8_string {
821
- static String From(napi_env env, const std::string& value) {
822
- return String::New(env, value);
823
- }
824
- };
825
-
826
- struct vf_utf16_string {
827
- static String From(napi_env env, const std::u16string& value) {
828
- return String::New(env, value);
829
- }
830
- };
831
-
832
- template <typename T>
833
- struct vf_fallback {
834
- static Value From(napi_env env, const T& value) {
835
- return Value(env, value);
836
- }
837
- };
838
-
839
- template <typename...> struct disjunction : std::false_type {};
840
- template <typename B> struct disjunction<B> : B {};
841
- template <typename B, typename... Bs>
842
- struct disjunction<B, Bs...>
843
- : std::conditional<bool(B::value), B, disjunction<Bs...>>::type {};
844
-
845
- template <typename T>
846
- struct can_make_string
847
- : disjunction<typename std::is_convertible<T, const char *>::type,
848
- typename std::is_convertible<T, const char16_t *>::type,
849
- typename std::is_convertible<T, std::string>::type,
850
- typename std::is_convertible<T, std::u16string>::type> {};
851
- }
852
-
853
- template <typename T>
854
- Value Value::From(napi_env env, const T& value) {
855
- using Helper = typename std::conditional<
856
- std::is_integral<T>::value || std::is_floating_point<T>::value,
857
- details::vf_number<T>,
858
- typename std::conditional<
859
- details::can_make_string<T>::value,
860
- String,
861
- details::vf_fallback<T>
862
- >::type
863
- >::type;
864
- return Helper::From(env, value);
865
- }
866
-
867
- template <typename T>
868
- String String::From(napi_env env, const T& value) {
869
- struct Dummy {};
870
- using Helper = typename std::conditional<
871
- std::is_convertible<T, const char*>::value,
872
- details::vf_utf8_charp,
873
- typename std::conditional<
874
- std::is_convertible<T, const char16_t*>::value,
875
- details::vf_utf16_charp,
876
- typename std::conditional<
877
- std::is_convertible<T, std::string>::value,
878
- details::vf_utf8_string,
879
- typename std::conditional<
880
- std::is_convertible<T, std::u16string>::value,
881
- details::vf_utf16_string,
882
- Dummy
883
- >::type
884
- >::type
885
- >::type
886
- >::type;
887
- return Helper::From(env, value);
888
- }
889
-
890
- ////////////////////////////////////////////////////////////////////////////////
891
- // Object class
892
- ////////////////////////////////////////////////////////////////////////////////
893
-
894
- template <typename Key>
895
- inline Object::PropertyLValue<Key>::operator Value() const {
896
- return Object(_env, _object).Get(_key);
897
- }
898
-
899
- template <typename Key> template <typename ValueType>
900
- inline Object::PropertyLValue<Key>& Object::PropertyLValue<Key>::operator =(ValueType value) {
901
- Object(_env, _object).Set(_key, value);
902
- return *this;
903
- }
904
-
905
- template <typename Key>
906
- inline Object::PropertyLValue<Key>::PropertyLValue(Object object, Key key)
907
- : _env(object.Env()), _object(object), _key(key) {}
908
-
909
- inline Object Object::New(napi_env env) {
910
- napi_value value;
911
- napi_status status = napi_create_object(env, &value);
912
- NAPI_THROW_IF_FAILED(env, status, Object());
913
- return Object(env, value);
914
- }
915
-
916
- inline Object::Object() : Value() {
917
- }
918
-
919
- inline Object::Object(napi_env env, napi_value value) : Value(env, value) {
920
- }
921
-
922
- inline Object::PropertyLValue<std::string> Object::operator [](const char* utf8name) {
923
- return PropertyLValue<std::string>(*this, utf8name);
924
- }
925
-
926
- inline Object::PropertyLValue<std::string> Object::operator [](const std::string& utf8name) {
927
- return PropertyLValue<std::string>(*this, utf8name);
928
- }
929
-
930
- inline Object::PropertyLValue<uint32_t> Object::operator [](uint32_t index) {
931
- return PropertyLValue<uint32_t>(*this, index);
932
- }
933
-
934
- inline Value Object::operator [](const char* utf8name) const {
935
- return Get(utf8name);
936
- }
937
-
938
- inline Value Object::operator [](const std::string& utf8name) const {
939
- return Get(utf8name);
940
- }
941
-
942
- inline Value Object::operator [](uint32_t index) const {
943
- return Get(index);
944
- }
945
-
946
- inline bool Object::Has(napi_value key) const {
947
- bool result;
948
- napi_status status = napi_has_property(_env, _value, key, &result);
949
- NAPI_THROW_IF_FAILED(_env, status, false);
950
- return result;
951
- }
952
-
953
- inline bool Object::Has(Value key) const {
954
- bool result;
955
- napi_status status = napi_has_property(_env, _value, key, &result);
956
- NAPI_THROW_IF_FAILED(_env, status, false);
957
- return result;
958
- }
959
-
960
- inline bool Object::Has(const char* utf8name) const {
961
- bool result;
962
- napi_status status = napi_has_named_property(_env, _value, utf8name, &result);
963
- NAPI_THROW_IF_FAILED(_env, status, false);
964
- return result;
965
- }
966
-
967
- inline bool Object::Has(const std::string& utf8name) const {
968
- return Has(utf8name.c_str());
969
- }
970
-
971
- inline bool Object::HasOwnProperty(napi_value key) const {
972
- bool result;
973
- napi_status status = napi_has_own_property(_env, _value, key, &result);
974
- NAPI_THROW_IF_FAILED(_env, status, false);
975
- return result;
976
- }
977
-
978
- inline bool Object::HasOwnProperty(Value key) const {
979
- bool result;
980
- napi_status status = napi_has_own_property(_env, _value, key, &result);
981
- NAPI_THROW_IF_FAILED(_env, status, false);
982
- return result;
983
- }
984
-
985
- inline bool Object::HasOwnProperty(const char* utf8name) const {
986
- napi_value key;
987
- napi_status status = napi_create_string_utf8(_env, utf8name, std::strlen(utf8name), &key);
988
- NAPI_THROW_IF_FAILED(_env, status, false);
989
- return HasOwnProperty(key);
990
- }
991
-
992
- inline bool Object::HasOwnProperty(const std::string& utf8name) const {
993
- return HasOwnProperty(utf8name.c_str());
994
- }
995
-
996
- inline Value Object::Get(napi_value key) const {
997
- napi_value result;
998
- napi_status status = napi_get_property(_env, _value, key, &result);
999
- NAPI_THROW_IF_FAILED(_env, status, Value());
1000
- return Value(_env, result);
1001
- }
1002
-
1003
- inline Value Object::Get(Value key) const {
1004
- napi_value result;
1005
- napi_status status = napi_get_property(_env, _value, key, &result);
1006
- NAPI_THROW_IF_FAILED(_env, status, Value());
1007
- return Value(_env, result);
1008
- }
1009
-
1010
- inline Value Object::Get(const char* utf8name) const {
1011
- napi_value result;
1012
- napi_status status = napi_get_named_property(_env, _value, utf8name, &result);
1013
- NAPI_THROW_IF_FAILED(_env, status, Value());
1014
- return Value(_env, result);
1015
- }
1016
-
1017
- inline Value Object::Get(const std::string& utf8name) const {
1018
- return Get(utf8name.c_str());
1019
- }
1020
-
1021
- template <typename ValueType>
1022
- inline void Object::Set(napi_value key, const ValueType& value) {
1023
- napi_status status =
1024
- napi_set_property(_env, _value, key, Value::From(_env, value));
1025
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1026
- }
1027
-
1028
- template <typename ValueType>
1029
- inline void Object::Set(Value key, const ValueType& value) {
1030
- napi_status status =
1031
- napi_set_property(_env, _value, key, Value::From(_env, value));
1032
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1033
- }
1034
-
1035
- template <typename ValueType>
1036
- inline void Object::Set(const char* utf8name, const ValueType& value) {
1037
- napi_status status =
1038
- napi_set_named_property(_env, _value, utf8name, Value::From(_env, value));
1039
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1040
- }
1041
-
1042
- template <typename ValueType>
1043
- inline void Object::Set(const std::string& utf8name, const ValueType& value) {
1044
- Set(utf8name.c_str(), value);
1045
- }
1046
-
1047
- inline bool Object::Delete(napi_value key) {
1048
- bool result;
1049
- napi_status status = napi_delete_property(_env, _value, key, &result);
1050
- NAPI_THROW_IF_FAILED(_env, status, false);
1051
- return result;
1052
- }
1053
-
1054
- inline bool Object::Delete(Value key) {
1055
- bool result;
1056
- napi_status status = napi_delete_property(_env, _value, key, &result);
1057
- NAPI_THROW_IF_FAILED(_env, status, false);
1058
- return result;
1059
- }
1060
-
1061
- inline bool Object::Delete(const char* utf8name) {
1062
- return Delete(String::New(_env, utf8name));
1063
- }
1064
-
1065
- inline bool Object::Delete(const std::string& utf8name) {
1066
- return Delete(String::New(_env, utf8name));
1067
- }
1068
-
1069
- inline bool Object::Has(uint32_t index) const {
1070
- bool result;
1071
- napi_status status = napi_has_element(_env, _value, index, &result);
1072
- NAPI_THROW_IF_FAILED(_env, status, false);
1073
- return result;
1074
- }
1075
-
1076
- inline Value Object::Get(uint32_t index) const {
1077
- napi_value value;
1078
- napi_status status = napi_get_element(_env, _value, index, &value);
1079
- NAPI_THROW_IF_FAILED(_env, status, Value());
1080
- return Value(_env, value);
1081
- }
1082
-
1083
- template <typename ValueType>
1084
- inline void Object::Set(uint32_t index, const ValueType& value) {
1085
- napi_status status =
1086
- napi_set_element(_env, _value, index, Value::From(_env, value));
1087
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1088
- }
1089
-
1090
- inline bool Object::Delete(uint32_t index) {
1091
- bool result;
1092
- napi_status status = napi_delete_element(_env, _value, index, &result);
1093
- NAPI_THROW_IF_FAILED(_env, status, false);
1094
- return result;
1095
- }
1096
-
1097
- inline Array Object::GetPropertyNames() const {
1098
- napi_value result;
1099
- napi_status status = napi_get_property_names(_env, _value, &result);
1100
- NAPI_THROW_IF_FAILED(_env, status, Array());
1101
- return Array(_env, result);
1102
- }
1103
-
1104
- inline void Object::DefineProperty(const PropertyDescriptor& property) {
1105
- napi_status status = napi_define_properties(_env, _value, 1,
1106
- reinterpret_cast<const napi_property_descriptor*>(&property));
1107
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1108
- }
1109
-
1110
- inline void Object::DefineProperties(const std::initializer_list<PropertyDescriptor>& properties) {
1111
- napi_status status = napi_define_properties(_env, _value, properties.size(),
1112
- reinterpret_cast<const napi_property_descriptor*>(properties.begin()));
1113
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1114
- }
1115
-
1116
- inline void Object::DefineProperties(const std::vector<PropertyDescriptor>& properties) {
1117
- napi_status status = napi_define_properties(_env, _value, properties.size(),
1118
- reinterpret_cast<const napi_property_descriptor*>(properties.data()));
1119
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1120
- }
1121
-
1122
- inline bool Object::InstanceOf(const Function& constructor) const {
1123
- bool result;
1124
- napi_status status = napi_instanceof(_env, _value, constructor, &result);
1125
- NAPI_THROW_IF_FAILED(_env, status, false);
1126
- return result;
1127
- }
1128
-
1129
- ////////////////////////////////////////////////////////////////////////////////
1130
- // External class
1131
- ////////////////////////////////////////////////////////////////////////////////
1132
-
1133
- template <typename T>
1134
- inline External<T> External<T>::New(napi_env env, T* data) {
1135
- napi_value value;
1136
- napi_status status = napi_create_external(env, data, nullptr, nullptr, &value);
1137
- NAPI_THROW_IF_FAILED(env, status, External());
1138
- return External(env, value);
1139
- }
1140
-
1141
- template <typename T>
1142
- template <typename Finalizer>
1143
- inline External<T> External<T>::New(napi_env env,
1144
- T* data,
1145
- Finalizer finalizeCallback) {
1146
- napi_value value;
1147
- details::FinalizeData<T, Finalizer>* finalizeData =
1148
- new details::FinalizeData<T, Finalizer>({ finalizeCallback, nullptr });
1149
- napi_status status = napi_create_external(
1150
- env,
1151
- data,
1152
- details::FinalizeData<T, Finalizer>::Wrapper,
1153
- finalizeData,
1154
- &value);
1155
- if (status != napi_ok) {
1156
- delete finalizeData;
1157
- NAPI_THROW_IF_FAILED(env, status, External());
1158
- }
1159
- return External(env, value);
1160
- }
1161
-
1162
- template <typename T>
1163
- template <typename Finalizer, typename Hint>
1164
- inline External<T> External<T>::New(napi_env env,
1165
- T* data,
1166
- Finalizer finalizeCallback,
1167
- Hint* finalizeHint) {
1168
- napi_value value;
1169
- details::FinalizeData<T, Finalizer, Hint>* finalizeData =
1170
- new details::FinalizeData<T, Finalizer, Hint>({ finalizeCallback, finalizeHint });
1171
- napi_status status = napi_create_external(
1172
- env,
1173
- data,
1174
- details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
1175
- finalizeData,
1176
- &value);
1177
- if (status != napi_ok) {
1178
- delete finalizeData;
1179
- NAPI_THROW_IF_FAILED(env, status, External());
1180
- }
1181
- return External(env, value);
1182
- }
1183
-
1184
- template <typename T>
1185
- inline External<T>::External() : Value() {
1186
- }
1187
-
1188
- template <typename T>
1189
- inline External<T>::External(napi_env env, napi_value value) : Value(env, value) {
1190
- }
1191
-
1192
- template <typename T>
1193
- inline T* External<T>::Data() const {
1194
- void* data;
1195
- napi_status status = napi_get_value_external(_env, _value, &data);
1196
- NAPI_THROW_IF_FAILED(_env, status, nullptr);
1197
- return reinterpret_cast<T*>(data);
1198
- }
1199
-
1200
- ////////////////////////////////////////////////////////////////////////////////
1201
- // Array class
1202
- ////////////////////////////////////////////////////////////////////////////////
1203
-
1204
- inline Array Array::New(napi_env env) {
1205
- napi_value value;
1206
- napi_status status = napi_create_array(env, &value);
1207
- NAPI_THROW_IF_FAILED(env, status, Array());
1208
- return Array(env, value);
1209
- }
1210
-
1211
- inline Array Array::New(napi_env env, size_t length) {
1212
- napi_value value;
1213
- napi_status status = napi_create_array_with_length(env, length, &value);
1214
- NAPI_THROW_IF_FAILED(env, status, Array());
1215
- return Array(env, value);
1216
- }
1217
-
1218
- inline Array::Array() : Object() {
1219
- }
1220
-
1221
- inline Array::Array(napi_env env, napi_value value) : Object(env, value) {
1222
- }
1223
-
1224
- inline uint32_t Array::Length() const {
1225
- uint32_t result;
1226
- napi_status status = napi_get_array_length(_env, _value, &result);
1227
- NAPI_THROW_IF_FAILED(_env, status, 0);
1228
- return result;
1229
- }
1230
-
1231
- ////////////////////////////////////////////////////////////////////////////////
1232
- // ArrayBuffer class
1233
- ////////////////////////////////////////////////////////////////////////////////
1234
-
1235
- inline ArrayBuffer ArrayBuffer::New(napi_env env, size_t byteLength) {
1236
- napi_value value;
1237
- void* data;
1238
- napi_status status = napi_create_arraybuffer(env, byteLength, &data, &value);
1239
- NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
1240
-
1241
- return ArrayBuffer(env, value, data, byteLength);
1242
- }
1243
-
1244
- inline ArrayBuffer ArrayBuffer::New(napi_env env,
1245
- void* externalData,
1246
- size_t byteLength) {
1247
- napi_value value;
1248
- napi_status status = napi_create_external_arraybuffer(
1249
- env, externalData, byteLength, nullptr, nullptr, &value);
1250
- NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
1251
-
1252
- return ArrayBuffer(env, value, externalData, byteLength);
1253
- }
1254
-
1255
- template <typename Finalizer>
1256
- inline ArrayBuffer ArrayBuffer::New(napi_env env,
1257
- void* externalData,
1258
- size_t byteLength,
1259
- Finalizer finalizeCallback) {
1260
- napi_value value;
1261
- details::FinalizeData<void, Finalizer>* finalizeData =
1262
- new details::FinalizeData<void, Finalizer>({ finalizeCallback, nullptr });
1263
- napi_status status = napi_create_external_arraybuffer(
1264
- env,
1265
- externalData,
1266
- byteLength,
1267
- details::FinalizeData<void, Finalizer>::Wrapper,
1268
- finalizeData,
1269
- &value);
1270
- if (status != napi_ok) {
1271
- delete finalizeData;
1272
- NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
1273
- }
1274
-
1275
- return ArrayBuffer(env, value, externalData, byteLength);
1276
- }
1277
-
1278
- template <typename Finalizer, typename Hint>
1279
- inline ArrayBuffer ArrayBuffer::New(napi_env env,
1280
- void* externalData,
1281
- size_t byteLength,
1282
- Finalizer finalizeCallback,
1283
- Hint* finalizeHint) {
1284
- napi_value value;
1285
- details::FinalizeData<void, Finalizer, Hint>* finalizeData =
1286
- new details::FinalizeData<void, Finalizer, Hint>({ finalizeCallback, finalizeHint });
1287
- napi_status status = napi_create_external_arraybuffer(
1288
- env,
1289
- externalData,
1290
- byteLength,
1291
- details::FinalizeData<void, Finalizer, Hint>::WrapperWithHint,
1292
- finalizeData,
1293
- &value);
1294
- if (status != napi_ok) {
1295
- delete finalizeData;
1296
- NAPI_THROW_IF_FAILED(env, status, ArrayBuffer());
1297
- }
1298
-
1299
- return ArrayBuffer(env, value, externalData, byteLength);
1300
- }
1301
-
1302
- inline ArrayBuffer::ArrayBuffer() : Object(), _data(nullptr), _length(0) {
1303
- }
1304
-
1305
- inline ArrayBuffer::ArrayBuffer(napi_env env, napi_value value)
1306
- : Object(env, value), _data(nullptr), _length(0) {
1307
- }
1308
-
1309
- inline ArrayBuffer::ArrayBuffer(napi_env env, napi_value value, void* data, size_t length)
1310
- : Object(env, value), _data(data), _length(length) {
1311
- }
1312
-
1313
- inline void* ArrayBuffer::Data() {
1314
- EnsureInfo();
1315
- return _data;
1316
- }
1317
-
1318
- inline size_t ArrayBuffer::ByteLength() {
1319
- EnsureInfo();
1320
- return _length;
1321
- }
1322
-
1323
- inline void ArrayBuffer::EnsureInfo() const {
1324
- // The ArrayBuffer instance may have been constructed from a napi_value whose
1325
- // length/data are not yet known. Fetch and cache these values just once,
1326
- // since they can never change during the lifetime of the ArrayBuffer.
1327
- if (_data == nullptr) {
1328
- napi_status status = napi_get_arraybuffer_info(_env, _value, &_data, &_length);
1329
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1330
- }
1331
- }
1332
-
1333
- ////////////////////////////////////////////////////////////////////////////////
1334
- // DataView class
1335
- ////////////////////////////////////////////////////////////////////////////////
1336
- inline DataView DataView::New(napi_env env,
1337
- Napi::ArrayBuffer arrayBuffer) {
1338
- return New(env, arrayBuffer, 0, arrayBuffer.ByteLength());
1339
- }
1340
-
1341
- inline DataView DataView::New(napi_env env,
1342
- Napi::ArrayBuffer arrayBuffer,
1343
- size_t byteOffset) {
1344
- if (byteOffset > arrayBuffer.ByteLength()) {
1345
- NAPI_THROW(RangeError::New(env,
1346
- "Start offset is outside the bounds of the buffer"),
1347
- DataView());
1348
- }
1349
- return New(env, arrayBuffer, byteOffset,
1350
- arrayBuffer.ByteLength() - byteOffset);
1351
- }
1352
-
1353
- inline DataView DataView::New(napi_env env,
1354
- Napi::ArrayBuffer arrayBuffer,
1355
- size_t byteOffset,
1356
- size_t byteLength) {
1357
- if (byteOffset + byteLength > arrayBuffer.ByteLength()) {
1358
- NAPI_THROW(RangeError::New(env, "Invalid DataView length"),
1359
- DataView());
1360
- }
1361
- napi_value value;
1362
- napi_status status = napi_create_dataview(
1363
- env, byteLength, arrayBuffer, byteOffset, &value);
1364
- NAPI_THROW_IF_FAILED(env, status, DataView());
1365
- return DataView(env, value);
1366
- }
1367
-
1368
- inline DataView::DataView() : Object() {
1369
- }
1370
-
1371
- inline DataView::DataView(napi_env env, napi_value value) : Object(env, value) {
1372
- napi_status status = napi_get_dataview_info(
1373
- _env,
1374
- _value /* dataView */,
1375
- &_length /* byteLength */,
1376
- &_data /* data */,
1377
- nullptr /* arrayBuffer */,
1378
- nullptr /* byteOffset */);
1379
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1380
- }
1381
-
1382
- inline Napi::ArrayBuffer DataView::ArrayBuffer() const {
1383
- napi_value arrayBuffer;
1384
- napi_status status = napi_get_dataview_info(
1385
- _env,
1386
- _value /* dataView */,
1387
- nullptr /* byteLength */,
1388
- nullptr /* data */,
1389
- &arrayBuffer /* arrayBuffer */,
1390
- nullptr /* byteOffset */);
1391
- NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer());
1392
- return Napi::ArrayBuffer(_env, arrayBuffer);
1393
- }
1394
-
1395
- inline size_t DataView::ByteOffset() const {
1396
- size_t byteOffset;
1397
- napi_status status = napi_get_dataview_info(
1398
- _env,
1399
- _value /* dataView */,
1400
- nullptr /* byteLength */,
1401
- nullptr /* data */,
1402
- nullptr /* arrayBuffer */,
1403
- &byteOffset /* byteOffset */);
1404
- NAPI_THROW_IF_FAILED(_env, status, 0);
1405
- return byteOffset;
1406
- }
1407
-
1408
- inline size_t DataView::ByteLength() const {
1409
- return _length;
1410
- }
1411
-
1412
- inline void* DataView::Data() const {
1413
- return _data;
1414
- }
1415
-
1416
- inline float DataView::GetFloat32(size_t byteOffset) const {
1417
- return ReadData<float>(byteOffset);
1418
- }
1419
-
1420
- inline double DataView::GetFloat64(size_t byteOffset) const {
1421
- return ReadData<double>(byteOffset);
1422
- }
1423
-
1424
- inline int8_t DataView::GetInt8(size_t byteOffset) const {
1425
- return ReadData<int8_t>(byteOffset);
1426
- }
1427
-
1428
- inline int16_t DataView::GetInt16(size_t byteOffset) const {
1429
- return ReadData<int16_t>(byteOffset);
1430
- }
1431
-
1432
- inline int32_t DataView::GetInt32(size_t byteOffset) const {
1433
- return ReadData<int32_t>(byteOffset);
1434
- }
1435
-
1436
- inline uint8_t DataView::GetUint8(size_t byteOffset) const {
1437
- return ReadData<uint8_t>(byteOffset);
1438
- }
1439
-
1440
- inline uint16_t DataView::GetUint16(size_t byteOffset) const {
1441
- return ReadData<uint16_t>(byteOffset);
1442
- }
1443
-
1444
- inline uint32_t DataView::GetUint32(size_t byteOffset) const {
1445
- return ReadData<uint32_t>(byteOffset);
1446
- }
1447
-
1448
- inline void DataView::SetFloat32(size_t byteOffset, float value) const {
1449
- WriteData<float>(byteOffset, value);
1450
- }
1451
-
1452
- inline void DataView::SetFloat64(size_t byteOffset, double value) const {
1453
- WriteData<double>(byteOffset, value);
1454
- }
1455
-
1456
- inline void DataView::SetInt8(size_t byteOffset, int8_t value) const {
1457
- WriteData<int8_t>(byteOffset, value);
1458
- }
1459
-
1460
- inline void DataView::SetInt16(size_t byteOffset, int16_t value) const {
1461
- WriteData<int16_t>(byteOffset, value);
1462
- }
1463
-
1464
- inline void DataView::SetInt32(size_t byteOffset, int32_t value) const {
1465
- WriteData<int32_t>(byteOffset, value);
1466
- }
1467
-
1468
- inline void DataView::SetUint8(size_t byteOffset, uint8_t value) const {
1469
- WriteData<uint8_t>(byteOffset, value);
1470
- }
1471
-
1472
- inline void DataView::SetUint16(size_t byteOffset, uint16_t value) const {
1473
- WriteData<uint16_t>(byteOffset, value);
1474
- }
1475
-
1476
- inline void DataView::SetUint32(size_t byteOffset, uint32_t value) const {
1477
- WriteData<uint32_t>(byteOffset, value);
1478
- }
1479
-
1480
- template <typename T>
1481
- inline T DataView::ReadData(size_t byteOffset) const {
1482
- if (byteOffset + sizeof(T) > _length ||
1483
- byteOffset + sizeof(T) < byteOffset) { // overflow
1484
- NAPI_THROW(RangeError::New(_env,
1485
- "Offset is outside the bounds of the DataView"), 0);
1486
- }
1487
-
1488
- return *reinterpret_cast<T*>(static_cast<uint8_t*>(_data) + byteOffset);
1489
- }
1490
-
1491
- template <typename T>
1492
- inline void DataView::WriteData(size_t byteOffset, T value) const {
1493
- if (byteOffset + sizeof(T) > _length ||
1494
- byteOffset + sizeof(T) < byteOffset) { // overflow
1495
- NAPI_THROW_VOID(RangeError::New(_env,
1496
- "Offset is outside the bounds of the DataView"));
1497
- }
1498
-
1499
- *reinterpret_cast<T*>(static_cast<uint8_t*>(_data) + byteOffset) = value;
1500
- }
1501
-
1502
- ////////////////////////////////////////////////////////////////////////////////
1503
- // TypedArray class
1504
- ////////////////////////////////////////////////////////////////////////////////
1505
-
1506
- inline TypedArray::TypedArray()
1507
- : Object(), _type(TypedArray::unknown_array_type), _length(0) {
1508
- }
1509
-
1510
- inline TypedArray::TypedArray(napi_env env, napi_value value)
1511
- : Object(env, value), _type(TypedArray::unknown_array_type), _length(0) {
1512
- }
1513
-
1514
- inline TypedArray::TypedArray(napi_env env,
1515
- napi_value value,
1516
- napi_typedarray_type type,
1517
- size_t length)
1518
- : Object(env, value), _type(type), _length(length) {
1519
- }
1520
-
1521
- inline napi_typedarray_type TypedArray::TypedArrayType() const {
1522
- if (_type == TypedArray::unknown_array_type) {
1523
- napi_status status = napi_get_typedarray_info(_env, _value,
1524
- &const_cast<TypedArray*>(this)->_type, &const_cast<TypedArray*>(this)->_length,
1525
- nullptr, nullptr, nullptr);
1526
- NAPI_THROW_IF_FAILED(_env, status, napi_int8_array);
1527
- }
1528
-
1529
- return _type;
1530
- }
1531
-
1532
- inline uint8_t TypedArray::ElementSize() const {
1533
- switch (TypedArrayType()) {
1534
- case napi_int8_array:
1535
- case napi_uint8_array:
1536
- case napi_uint8_clamped_array:
1537
- return 1;
1538
- case napi_int16_array:
1539
- case napi_uint16_array:
1540
- return 2;
1541
- case napi_int32_array:
1542
- case napi_uint32_array:
1543
- case napi_float32_array:
1544
- return 4;
1545
- case napi_float64_array:
1546
- return 8;
1547
- default:
1548
- return 0;
1549
- }
1550
- }
1551
-
1552
- inline size_t TypedArray::ElementLength() const {
1553
- if (_type == TypedArray::unknown_array_type) {
1554
- napi_status status = napi_get_typedarray_info(_env, _value,
1555
- &const_cast<TypedArray*>(this)->_type, &const_cast<TypedArray*>(this)->_length,
1556
- nullptr, nullptr, nullptr);
1557
- NAPI_THROW_IF_FAILED(_env, status, 0);
1558
- }
1559
-
1560
- return _length;
1561
- }
1562
-
1563
- inline size_t TypedArray::ByteOffset() const {
1564
- size_t byteOffset;
1565
- napi_status status = napi_get_typedarray_info(
1566
- _env, _value, nullptr, nullptr, nullptr, nullptr, &byteOffset);
1567
- NAPI_THROW_IF_FAILED(_env, status, 0);
1568
- return byteOffset;
1569
- }
1570
-
1571
- inline size_t TypedArray::ByteLength() const {
1572
- return ElementSize() * ElementLength();
1573
- }
1574
-
1575
- inline Napi::ArrayBuffer TypedArray::ArrayBuffer() const {
1576
- napi_value arrayBuffer;
1577
- napi_status status = napi_get_typedarray_info(
1578
- _env, _value, nullptr, nullptr, nullptr, &arrayBuffer, nullptr);
1579
- NAPI_THROW_IF_FAILED(_env, status, Napi::ArrayBuffer());
1580
- return Napi::ArrayBuffer(_env, arrayBuffer);
1581
- }
1582
-
1583
- ////////////////////////////////////////////////////////////////////////////////
1584
- // TypedArrayOf<T> class
1585
- ////////////////////////////////////////////////////////////////////////////////
1586
-
1587
- template <typename T>
1588
- inline TypedArrayOf<T> TypedArrayOf<T>::New(napi_env env,
1589
- size_t elementLength,
1590
- napi_typedarray_type type) {
1591
- Napi::ArrayBuffer arrayBuffer = Napi::ArrayBuffer::New(env, elementLength * sizeof (T));
1592
- return New(env, elementLength, arrayBuffer, 0, type);
1593
- }
1594
-
1595
- template <typename T>
1596
- inline TypedArrayOf<T> TypedArrayOf<T>::New(napi_env env,
1597
- size_t elementLength,
1598
- Napi::ArrayBuffer arrayBuffer,
1599
- size_t bufferOffset,
1600
- napi_typedarray_type type) {
1601
- napi_value value;
1602
- napi_status status = napi_create_typedarray(
1603
- env, type, elementLength, arrayBuffer, bufferOffset, &value);
1604
- NAPI_THROW_IF_FAILED(env, status, TypedArrayOf<T>());
1605
-
1606
- return TypedArrayOf<T>(
1607
- env, value, type, elementLength,
1608
- reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(arrayBuffer.Data()) + bufferOffset));
1609
- }
1610
-
1611
- template <typename T>
1612
- inline TypedArrayOf<T>::TypedArrayOf() : TypedArray(), _data(nullptr) {
1613
- }
1614
-
1615
- template <typename T>
1616
- inline TypedArrayOf<T>::TypedArrayOf(napi_env env, napi_value value)
1617
- : TypedArray(env, value), _data(nullptr) {
1618
- napi_status status = napi_get_typedarray_info(
1619
- _env, _value, &_type, &_length, reinterpret_cast<void**>(&_data), nullptr, nullptr);
1620
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1621
- }
1622
-
1623
- template <typename T>
1624
- inline TypedArrayOf<T>::TypedArrayOf(napi_env env,
1625
- napi_value value,
1626
- napi_typedarray_type type,
1627
- size_t length,
1628
- T* data)
1629
- : TypedArray(env, value, type, length), _data(data) {
1630
- if (!(type == TypedArrayTypeForPrimitiveType<T>() ||
1631
- (type == napi_uint8_clamped_array && std::is_same<T, uint8_t>::value))) {
1632
- NAPI_THROW_VOID(TypeError::New(env, "Array type must match the template parameter. "
1633
- "(Uint8 arrays may optionally have the \"clamped\" array type.)"));
1634
- }
1635
- }
1636
-
1637
- template <typename T>
1638
- inline T& TypedArrayOf<T>::operator [](size_t index) {
1639
- return _data[index];
1640
- }
1641
-
1642
- template <typename T>
1643
- inline const T& TypedArrayOf<T>::operator [](size_t index) const {
1644
- return _data[index];
1645
- }
1646
-
1647
- template <typename T>
1648
- inline T* TypedArrayOf<T>::Data() {
1649
- return _data;
1650
- }
1651
-
1652
- template <typename T>
1653
- inline const T* TypedArrayOf<T>::Data() const {
1654
- return _data;
1655
- }
1656
-
1657
- ////////////////////////////////////////////////////////////////////////////////
1658
- // Function class
1659
- ////////////////////////////////////////////////////////////////////////////////
1660
-
1661
- template <typename CbData>
1662
- static inline napi_status
1663
- CreateFunction(napi_env env,
1664
- const char* utf8name,
1665
- napi_callback cb,
1666
- CbData* data,
1667
- napi_value* result) {
1668
- napi_status status =
1669
- napi_create_function(env, utf8name, NAPI_AUTO_LENGTH, cb, data, result);
1670
- if (status == napi_ok) {
1671
- status = Napi::details::AttachData(env, *result, data);
1672
- }
1673
-
1674
- return status;
1675
- }
1676
-
1677
- template <typename Callable>
1678
- inline Function Function::New(napi_env env,
1679
- Callable cb,
1680
- const char* utf8name,
1681
- void* data) {
1682
- typedef decltype(cb(CallbackInfo(nullptr, nullptr))) ReturnType;
1683
- typedef details::CallbackData<Callable, ReturnType> CbData;
1684
- auto callbackData = new CbData({ cb, data });
1685
-
1686
- napi_value value;
1687
- napi_status status = CreateFunction(env,
1688
- utf8name,
1689
- CbData::Wrapper,
1690
- callbackData,
1691
- &value);
1692
- if (status != napi_ok) {
1693
- delete callbackData;
1694
- NAPI_THROW_IF_FAILED(env, status, Function());
1695
- }
1696
-
1697
- return Function(env, value);
1698
- }
1699
-
1700
- template <typename Callable>
1701
- inline Function Function::New(napi_env env,
1702
- Callable cb,
1703
- const std::string& utf8name,
1704
- void* data) {
1705
- return New(env, cb, utf8name.c_str(), data);
1706
- }
1707
-
1708
- inline Function::Function() : Object() {
1709
- }
1710
-
1711
- inline Function::Function(napi_env env, napi_value value) : Object(env, value) {
1712
- }
1713
-
1714
- inline Value Function::operator ()(const std::initializer_list<napi_value>& args) const {
1715
- return Call(Env().Undefined(), args);
1716
- }
1717
-
1718
- inline Value Function::Call(const std::initializer_list<napi_value>& args) const {
1719
- return Call(Env().Undefined(), args);
1720
- }
1721
-
1722
- inline Value Function::Call(const std::vector<napi_value>& args) const {
1723
- return Call(Env().Undefined(), args);
1724
- }
1725
-
1726
- inline Value Function::Call(size_t argc, const napi_value* args) const {
1727
- return Call(Env().Undefined(), argc, args);
1728
- }
1729
-
1730
- inline Value Function::Call(napi_value recv, const std::initializer_list<napi_value>& args) const {
1731
- return Call(recv, args.size(), args.begin());
1732
- }
1733
-
1734
- inline Value Function::Call(napi_value recv, const std::vector<napi_value>& args) const {
1735
- return Call(recv, args.size(), args.data());
1736
- }
1737
-
1738
- inline Value Function::Call(napi_value recv, size_t argc, const napi_value* args) const {
1739
- napi_value result;
1740
- napi_status status = napi_call_function(
1741
- _env, recv, _value, argc, args, &result);
1742
- NAPI_THROW_IF_FAILED(_env, status, Value());
1743
- return Value(_env, result);
1744
- }
1745
-
1746
- inline Value Function::MakeCallback(
1747
- napi_value recv,
1748
- const std::initializer_list<napi_value>& args,
1749
- napi_async_context context) const {
1750
- return MakeCallback(recv, args.size(), args.begin(), context);
1751
- }
1752
-
1753
- inline Value Function::MakeCallback(
1754
- napi_value recv,
1755
- const std::vector<napi_value>& args,
1756
- napi_async_context context) const {
1757
- return MakeCallback(recv, args.size(), args.data(), context);
1758
- }
1759
-
1760
- inline Value Function::MakeCallback(
1761
- napi_value recv,
1762
- size_t argc,
1763
- const napi_value* args,
1764
- napi_async_context context) const {
1765
- napi_value result;
1766
- napi_status status = napi_make_callback(
1767
- _env, context, recv, _value, argc, args, &result);
1768
- NAPI_THROW_IF_FAILED(_env, status, Value());
1769
- return Value(_env, result);
1770
- }
1771
-
1772
- inline Object Function::New(const std::initializer_list<napi_value>& args) const {
1773
- return New(args.size(), args.begin());
1774
- }
1775
-
1776
- inline Object Function::New(const std::vector<napi_value>& args) const {
1777
- return New(args.size(), args.data());
1778
- }
1779
-
1780
- inline Object Function::New(size_t argc, const napi_value* args) const {
1781
- napi_value result;
1782
- napi_status status = napi_new_instance(
1783
- _env, _value, argc, args, &result);
1784
- NAPI_THROW_IF_FAILED(_env, status, Object());
1785
- return Object(_env, result);
1786
- }
1787
-
1788
- ////////////////////////////////////////////////////////////////////////////////
1789
- // Promise class
1790
- ////////////////////////////////////////////////////////////////////////////////
1791
-
1792
- inline Promise::Deferred Promise::Deferred::New(napi_env env) {
1793
- return Promise::Deferred(env);
1794
- }
1795
-
1796
- inline Promise::Deferred::Deferred(napi_env env) : _env(env) {
1797
- napi_status status = napi_create_promise(_env, &_deferred, &_promise);
1798
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1799
- }
1800
-
1801
- inline Promise Promise::Deferred::Promise() const {
1802
- return Napi::Promise(_env, _promise);
1803
- }
1804
-
1805
- inline Napi::Env Promise::Deferred::Env() const {
1806
- return Napi::Env(_env);
1807
- }
1808
-
1809
- inline void Promise::Deferred::Resolve(napi_value value) const {
1810
- napi_status status = napi_resolve_deferred(_env, _deferred, value);
1811
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1812
- }
1813
-
1814
- inline void Promise::Deferred::Reject(napi_value value) const {
1815
- napi_status status = napi_reject_deferred(_env, _deferred, value);
1816
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1817
- }
1818
-
1819
- inline Promise::Promise(napi_env env, napi_value value) : Object(env, value) {
1820
- }
1821
-
1822
- ////////////////////////////////////////////////////////////////////////////////
1823
- // Buffer<T> class
1824
- ////////////////////////////////////////////////////////////////////////////////
1825
-
1826
- template <typename T>
1827
- inline Buffer<T> Buffer<T>::New(napi_env env, size_t length) {
1828
- napi_value value;
1829
- void* data;
1830
- napi_status status = napi_create_buffer(env, length * sizeof (T), &data, &value);
1831
- NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
1832
- return Buffer(env, value, length, static_cast<T*>(data));
1833
- }
1834
-
1835
- template <typename T>
1836
- inline Buffer<T> Buffer<T>::New(napi_env env, T* data, size_t length) {
1837
- napi_value value;
1838
- napi_status status = napi_create_external_buffer(
1839
- env, length * sizeof (T), data, nullptr, nullptr, &value);
1840
- NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
1841
- return Buffer(env, value, length, data);
1842
- }
1843
-
1844
- template <typename T>
1845
- template <typename Finalizer>
1846
- inline Buffer<T> Buffer<T>::New(napi_env env,
1847
- T* data,
1848
- size_t length,
1849
- Finalizer finalizeCallback) {
1850
- napi_value value;
1851
- details::FinalizeData<T, Finalizer>* finalizeData =
1852
- new details::FinalizeData<T, Finalizer>({ finalizeCallback, nullptr });
1853
- napi_status status = napi_create_external_buffer(
1854
- env,
1855
- length * sizeof (T),
1856
- data,
1857
- details::FinalizeData<T, Finalizer>::Wrapper,
1858
- finalizeData,
1859
- &value);
1860
- if (status != napi_ok) {
1861
- delete finalizeData;
1862
- NAPI_THROW_IF_FAILED(env, status, Buffer());
1863
- }
1864
- return Buffer(env, value, length, data);
1865
- }
1866
-
1867
- template <typename T>
1868
- template <typename Finalizer, typename Hint>
1869
- inline Buffer<T> Buffer<T>::New(napi_env env,
1870
- T* data,
1871
- size_t length,
1872
- Finalizer finalizeCallback,
1873
- Hint* finalizeHint) {
1874
- napi_value value;
1875
- details::FinalizeData<T, Finalizer, Hint>* finalizeData =
1876
- new details::FinalizeData<T, Finalizer, Hint>({ finalizeCallback, finalizeHint });
1877
- napi_status status = napi_create_external_buffer(
1878
- env,
1879
- length * sizeof (T),
1880
- data,
1881
- details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
1882
- finalizeData,
1883
- &value);
1884
- if (status != napi_ok) {
1885
- delete finalizeData;
1886
- NAPI_THROW_IF_FAILED(env, status, Buffer());
1887
- }
1888
- return Buffer(env, value, length, data);
1889
- }
1890
-
1891
- template <typename T>
1892
- inline Buffer<T> Buffer<T>::Copy(napi_env env, const T* data, size_t length) {
1893
- napi_value value;
1894
- napi_status status = napi_create_buffer_copy(
1895
- env, length * sizeof (T), data, nullptr, &value);
1896
- NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
1897
- return Buffer<T>(env, value);
1898
- }
1899
-
1900
- template <typename T>
1901
- inline Buffer<T>::Buffer() : Uint8Array(), _length(0), _data(nullptr) {
1902
- }
1903
-
1904
- template <typename T>
1905
- inline Buffer<T>::Buffer(napi_env env, napi_value value)
1906
- : Uint8Array(env, value), _length(0), _data(nullptr) {
1907
- }
1908
-
1909
- template <typename T>
1910
- inline Buffer<T>::Buffer(napi_env env, napi_value value, size_t length, T* data)
1911
- : Uint8Array(env, value), _length(length), _data(data) {
1912
- }
1913
-
1914
- template <typename T>
1915
- inline size_t Buffer<T>::Length() const {
1916
- EnsureInfo();
1917
- return _length;
1918
- }
1919
-
1920
- template <typename T>
1921
- inline T* Buffer<T>::Data() const {
1922
- EnsureInfo();
1923
- return _data;
1924
- }
1925
-
1926
- template <typename T>
1927
- inline void Buffer<T>::EnsureInfo() const {
1928
- // The Buffer instance may have been constructed from a napi_value whose
1929
- // length/data are not yet known. Fetch and cache these values just once,
1930
- // since they can never change during the lifetime of the Buffer.
1931
- if (_data == nullptr) {
1932
- size_t byteLength;
1933
- void* voidData;
1934
- napi_status status = napi_get_buffer_info(_env, _value, &voidData, &byteLength);
1935
- NAPI_THROW_IF_FAILED_VOID(_env, status);
1936
- _length = byteLength / sizeof (T);
1937
- _data = static_cast<T*>(voidData);
1938
- }
1939
- }
1940
-
1941
- ////////////////////////////////////////////////////////////////////////////////
1942
- // Error class
1943
- ////////////////////////////////////////////////////////////////////////////////
1944
-
1945
- inline Error Error::New(napi_env env) {
1946
- napi_status status;
1947
- napi_value error = nullptr;
1948
-
1949
- const napi_extended_error_info* info;
1950
- status = napi_get_last_error_info(env, &info);
1951
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_last_error_info");
1952
-
1953
- if (status == napi_ok) {
1954
- if (info->error_code == napi_pending_exception) {
1955
- status = napi_get_and_clear_last_exception(env, &error);
1956
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_and_clear_last_exception");
1957
- }
1958
- else {
1959
- const char* error_message = info->error_message != nullptr ?
1960
- info->error_message : "Error in native callback";
1961
-
1962
- bool isExceptionPending;
1963
- status = napi_is_exception_pending(env, &isExceptionPending);
1964
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_is_exception_pending");
1965
-
1966
- if (isExceptionPending) {
1967
- status = napi_get_and_clear_last_exception(env, &error);
1968
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_get_and_clear_last_exception");
1969
- }
1970
-
1971
- napi_value message;
1972
- status = napi_create_string_utf8(
1973
- env,
1974
- error_message,
1975
- std::strlen(error_message),
1976
- &message);
1977
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_string_utf8");
1978
-
1979
- if (status == napi_ok) {
1980
- switch (info->error_code) {
1981
- case napi_object_expected:
1982
- case napi_string_expected:
1983
- case napi_boolean_expected:
1984
- case napi_number_expected:
1985
- status = napi_create_type_error(env, nullptr, message, &error);
1986
- break;
1987
- default:
1988
- status = napi_create_error(env, nullptr, message, &error);
1989
- break;
1990
- }
1991
- NAPI_FATAL_IF_FAILED(status, "Error::New", "napi_create_error");
1992
- }
1993
- }
1994
- }
1995
-
1996
- return Error(env, error);
1997
- }
1998
-
1999
- inline Error Error::New(napi_env env, const char* message) {
2000
- return Error::New<Error>(env, message, std::strlen(message), napi_create_error);
2001
- }
2002
-
2003
- inline Error Error::New(napi_env env, const std::string& message) {
2004
- return Error::New<Error>(env, message.c_str(), message.size(), napi_create_error);
2005
- }
2006
-
2007
- inline NAPI_NO_RETURN void Error::Fatal(const char* location, const char* message) {
2008
- napi_fatal_error(location, NAPI_AUTO_LENGTH, message, NAPI_AUTO_LENGTH);
2009
- }
2010
-
2011
- inline Error::Error() : ObjectReference() {
2012
- }
2013
-
2014
- inline Error::Error(napi_env env, napi_value value) : ObjectReference(env, nullptr) {
2015
- if (value != nullptr) {
2016
- napi_status status = napi_create_reference(env, value, 1, &_ref);
2017
-
2018
- // Avoid infinite recursion in the failure case.
2019
- // Don't try to construct & throw another Error instance.
2020
- NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_create_reference");
2021
- }
2022
- }
2023
-
2024
- inline Error::Error(Error&& other) : ObjectReference(std::move(other)) {
2025
- }
2026
-
2027
- inline Error& Error::operator =(Error&& other) {
2028
- static_cast<Reference<Object>*>(this)->operator=(std::move(other));
2029
- return *this;
2030
- }
2031
-
2032
- inline Error::Error(const Error& other) : ObjectReference(other) {
2033
- }
2034
-
2035
- inline Error& Error::operator =(Error& other) {
2036
- Reset();
2037
-
2038
- _env = other.Env();
2039
- HandleScope scope(_env);
2040
-
2041
- napi_value value = other.Value();
2042
- if (value != nullptr) {
2043
- napi_status status = napi_create_reference(_env, value, 1, &_ref);
2044
- NAPI_THROW_IF_FAILED(_env, status, *this);
2045
- }
2046
-
2047
- return *this;
2048
- }
2049
-
2050
- inline const std::string& Error::Message() const NAPI_NOEXCEPT {
2051
- if (_message.size() == 0 && _env != nullptr) {
2052
- #ifdef NAPI_CPP_EXCEPTIONS
2053
- try {
2054
- _message = Get("message").As<String>();
2055
- }
2056
- catch (...) {
2057
- // Catch all errors here, to include e.g. a std::bad_alloc from
2058
- // the std::string::operator=, because this method may not throw.
2059
- }
2060
- #else // NAPI_CPP_EXCEPTIONS
2061
- _message = Get("message").As<String>();
2062
- #endif // NAPI_CPP_EXCEPTIONS
2063
- }
2064
- return _message;
2065
- }
2066
-
2067
- inline void Error::ThrowAsJavaScriptException() const {
2068
- HandleScope scope(_env);
2069
- if (!IsEmpty()) {
2070
-
2071
- // We intentionally don't use `NAPI_THROW_*` macros here to ensure
2072
- // that there is no possible recursion as `ThrowAsJavaScriptException`
2073
- // is part of `NAPI_THROW_*` macro definition for noexcept.
2074
-
2075
- napi_status status = napi_throw(_env, Value());
2076
-
2077
- #ifdef NAPI_CPP_EXCEPTIONS
2078
- if (status != napi_ok) {
2079
- throw Error::New(_env);
2080
- }
2081
- #else // NAPI_CPP_EXCEPTIONS
2082
- NAPI_FATAL_IF_FAILED(status, "Error::ThrowAsJavaScriptException", "napi_throw");
2083
- #endif // NAPI_CPP_EXCEPTIONS
2084
- }
2085
- }
2086
-
2087
- #ifdef NAPI_CPP_EXCEPTIONS
2088
-
2089
- inline const char* Error::what() const NAPI_NOEXCEPT {
2090
- return Message().c_str();
2091
- }
2092
-
2093
- #endif // NAPI_CPP_EXCEPTIONS
2094
-
2095
- template <typename TError>
2096
- inline TError Error::New(napi_env env,
2097
- const char* message,
2098
- size_t length,
2099
- create_error_fn create_error) {
2100
- napi_value str;
2101
- napi_status status = napi_create_string_utf8(env, message, length, &str);
2102
- NAPI_THROW_IF_FAILED(env, status, TError());
2103
-
2104
- napi_value error;
2105
- status = create_error(env, nullptr, str, &error);
2106
- NAPI_THROW_IF_FAILED(env, status, TError());
2107
-
2108
- return TError(env, error);
2109
- }
2110
-
2111
- inline TypeError TypeError::New(napi_env env, const char* message) {
2112
- return Error::New<TypeError>(env, message, std::strlen(message), napi_create_type_error);
2113
- }
2114
-
2115
- inline TypeError TypeError::New(napi_env env, const std::string& message) {
2116
- return Error::New<TypeError>(env, message.c_str(), message.size(), napi_create_type_error);
2117
- }
2118
-
2119
- inline TypeError::TypeError() : Error() {
2120
- }
2121
-
2122
- inline TypeError::TypeError(napi_env env, napi_value value) : Error(env, value) {
2123
- }
2124
-
2125
- inline RangeError RangeError::New(napi_env env, const char* message) {
2126
- return Error::New<RangeError>(env, message, std::strlen(message), napi_create_range_error);
2127
- }
2128
-
2129
- inline RangeError RangeError::New(napi_env env, const std::string& message) {
2130
- return Error::New<RangeError>(env, message.c_str(), message.size(), napi_create_range_error);
2131
- }
2132
-
2133
- inline RangeError::RangeError() : Error() {
2134
- }
2135
-
2136
- inline RangeError::RangeError(napi_env env, napi_value value) : Error(env, value) {
2137
- }
2138
-
2139
- ////////////////////////////////////////////////////////////////////////////////
2140
- // Reference<T> class
2141
- ////////////////////////////////////////////////////////////////////////////////
2142
-
2143
- template <typename T>
2144
- inline Reference<T> Reference<T>::New(const T& value, uint32_t initialRefcount) {
2145
- napi_env env = value.Env();
2146
- napi_value val = value;
2147
-
2148
- if (val == nullptr) {
2149
- return Reference<T>(env, nullptr);
2150
- }
2151
-
2152
- napi_ref ref;
2153
- napi_status status = napi_create_reference(env, value, initialRefcount, &ref);
2154
- NAPI_THROW_IF_FAILED(env, status, Reference<T>());
2155
-
2156
- return Reference<T>(env, ref);
2157
- }
2158
-
2159
-
2160
- template <typename T>
2161
- inline Reference<T>::Reference() : _env(nullptr), _ref(nullptr), _suppressDestruct(false) {
2162
- }
2163
-
2164
- template <typename T>
2165
- inline Reference<T>::Reference(napi_env env, napi_ref ref)
2166
- : _env(env), _ref(ref), _suppressDestruct(false) {
2167
- }
2168
-
2169
- template <typename T>
2170
- inline Reference<T>::~Reference() {
2171
- if (_ref != nullptr) {
2172
- if (!_suppressDestruct) {
2173
- napi_delete_reference(_env, _ref);
2174
- }
2175
-
2176
- _ref = nullptr;
2177
- }
2178
- }
2179
-
2180
- template <typename T>
2181
- inline Reference<T>::Reference(Reference<T>&& other)
2182
- : _env(other._env), _ref(other._ref), _suppressDestruct(other._suppressDestruct) {
2183
- other._env = nullptr;
2184
- other._ref = nullptr;
2185
- other._suppressDestruct = false;
2186
- }
2187
-
2188
- template <typename T>
2189
- inline Reference<T>& Reference<T>::operator =(Reference<T>&& other) {
2190
- Reset();
2191
- _env = other._env;
2192
- _ref = other._ref;
2193
- _suppressDestruct = other._suppressDestruct;
2194
- other._env = nullptr;
2195
- other._ref = nullptr;
2196
- other._suppressDestruct = false;
2197
- return *this;
2198
- }
2199
-
2200
- template <typename T>
2201
- inline Reference<T>::Reference(const Reference<T>& other)
2202
- : _env(other._env), _ref(nullptr), _suppressDestruct(false) {
2203
- HandleScope scope(_env);
2204
-
2205
- napi_value value = other.Value();
2206
- if (value != nullptr) {
2207
- // Copying is a limited scenario (currently only used for Error object) and always creates a
2208
- // strong reference to the given value even if the incoming reference is weak.
2209
- napi_status status = napi_create_reference(_env, value, 1, &_ref);
2210
- NAPI_FATAL_IF_FAILED(status, "Reference<T>::Reference", "napi_create_reference");
2211
- }
2212
- }
2213
-
2214
- template <typename T>
2215
- inline Reference<T>::operator napi_ref() const {
2216
- return _ref;
2217
- }
2218
-
2219
- template <typename T>
2220
- inline bool Reference<T>::operator ==(const Reference<T> &other) const {
2221
- HandleScope scope(_env);
2222
- return this->Value().StrictEquals(other.Value());
2223
- }
2224
-
2225
- template <typename T>
2226
- inline bool Reference<T>::operator !=(const Reference<T> &other) const {
2227
- return !this->operator ==(other);
2228
- }
2229
-
2230
- template <typename T>
2231
- inline Napi::Env Reference<T>::Env() const {
2232
- return Napi::Env(_env);
2233
- }
2234
-
2235
- template <typename T>
2236
- inline bool Reference<T>::IsEmpty() const {
2237
- return _ref == nullptr;
2238
- }
2239
-
2240
- template <typename T>
2241
- inline T Reference<T>::Value() const {
2242
- if (_ref == nullptr) {
2243
- return T(_env, nullptr);
2244
- }
2245
-
2246
- napi_value value;
2247
- napi_status status = napi_get_reference_value(_env, _ref, &value);
2248
- NAPI_THROW_IF_FAILED(_env, status, T());
2249
- return T(_env, value);
2250
- }
2251
-
2252
- template <typename T>
2253
- inline uint32_t Reference<T>::Ref() {
2254
- uint32_t result;
2255
- napi_status status = napi_reference_ref(_env, _ref, &result);
2256
- NAPI_THROW_IF_FAILED(_env, status, 1);
2257
- return result;
2258
- }
2259
-
2260
- template <typename T>
2261
- inline uint32_t Reference<T>::Unref() {
2262
- uint32_t result;
2263
- napi_status status = napi_reference_unref(_env, _ref, &result);
2264
- NAPI_THROW_IF_FAILED(_env, status, 1);
2265
- return result;
2266
- }
2267
-
2268
- template <typename T>
2269
- inline void Reference<T>::Reset() {
2270
- if (_ref != nullptr) {
2271
- napi_status status = napi_delete_reference(_env, _ref);
2272
- NAPI_THROW_IF_FAILED_VOID(_env, status);
2273
- _ref = nullptr;
2274
- }
2275
- }
2276
-
2277
- template <typename T>
2278
- inline void Reference<T>::Reset(const T& value, uint32_t refcount) {
2279
- Reset();
2280
- _env = value.Env();
2281
-
2282
- napi_value val = value;
2283
- if (val != nullptr) {
2284
- napi_status status = napi_create_reference(_env, value, refcount, &_ref);
2285
- NAPI_THROW_IF_FAILED_VOID(_env, status);
2286
- }
2287
- }
2288
-
2289
- template <typename T>
2290
- inline void Reference<T>::SuppressDestruct() {
2291
- _suppressDestruct = true;
2292
- }
2293
-
2294
- template <typename T>
2295
- inline Reference<T> Weak(T value) {
2296
- return Reference<T>::New(value, 0);
2297
- }
2298
-
2299
- inline ObjectReference Weak(Object value) {
2300
- return Reference<Object>::New(value, 0);
2301
- }
2302
-
2303
- inline FunctionReference Weak(Function value) {
2304
- return Reference<Function>::New(value, 0);
2305
- }
2306
-
2307
- template <typename T>
2308
- inline Reference<T> Persistent(T value) {
2309
- return Reference<T>::New(value, 1);
2310
- }
2311
-
2312
- inline ObjectReference Persistent(Object value) {
2313
- return Reference<Object>::New(value, 1);
2314
- }
2315
-
2316
- inline FunctionReference Persistent(Function value) {
2317
- return Reference<Function>::New(value, 1);
2318
- }
2319
-
2320
- ////////////////////////////////////////////////////////////////////////////////
2321
- // ObjectReference class
2322
- ////////////////////////////////////////////////////////////////////////////////
2323
-
2324
- inline ObjectReference::ObjectReference(): Reference<Object>() {
2325
- }
2326
-
2327
- inline ObjectReference::ObjectReference(napi_env env, napi_ref ref): Reference<Object>(env, ref) {
2328
- }
2329
-
2330
- inline ObjectReference::ObjectReference(Reference<Object>&& other)
2331
- : Reference<Object>(std::move(other)) {
2332
- }
2333
-
2334
- inline ObjectReference& ObjectReference::operator =(Reference<Object>&& other) {
2335
- static_cast<Reference<Object>*>(this)->operator=(std::move(other));
2336
- return *this;
2337
- }
2338
-
2339
- inline ObjectReference::ObjectReference(ObjectReference&& other)
2340
- : Reference<Object>(std::move(other)) {
2341
- }
2342
-
2343
- inline ObjectReference& ObjectReference::operator =(ObjectReference&& other) {
2344
- static_cast<Reference<Object>*>(this)->operator=(std::move(other));
2345
- return *this;
2346
- }
2347
-
2348
- inline ObjectReference::ObjectReference(const ObjectReference& other)
2349
- : Reference<Object>(other) {
2350
- }
2351
-
2352
- inline Napi::Value ObjectReference::Get(const char* utf8name) const {
2353
- EscapableHandleScope scope(_env);
2354
- return scope.Escape(Value().Get(utf8name));
2355
- }
2356
-
2357
- inline Napi::Value ObjectReference::Get(const std::string& utf8name) const {
2358
- EscapableHandleScope scope(_env);
2359
- return scope.Escape(Value().Get(utf8name));
2360
- }
2361
-
2362
- inline void ObjectReference::Set(const char* utf8name, napi_value value) {
2363
- HandleScope scope(_env);
2364
- Value().Set(utf8name, value);
2365
- }
2366
-
2367
- inline void ObjectReference::Set(const char* utf8name, Napi::Value value) {
2368
- HandleScope scope(_env);
2369
- Value().Set(utf8name, value);
2370
- }
2371
-
2372
- inline void ObjectReference::Set(const char* utf8name, const char* utf8value) {
2373
- HandleScope scope(_env);
2374
- Value().Set(utf8name, utf8value);
2375
- }
2376
-
2377
- inline void ObjectReference::Set(const char* utf8name, bool boolValue) {
2378
- HandleScope scope(_env);
2379
- Value().Set(utf8name, boolValue);
2380
- }
2381
-
2382
- inline void ObjectReference::Set(const char* utf8name, double numberValue) {
2383
- HandleScope scope(_env);
2384
- Value().Set(utf8name, numberValue);
2385
- }
2386
-
2387
- inline void ObjectReference::Set(const std::string& utf8name, napi_value value) {
2388
- HandleScope scope(_env);
2389
- Value().Set(utf8name, value);
2390
- }
2391
-
2392
- inline void ObjectReference::Set(const std::string& utf8name, Napi::Value value) {
2393
- HandleScope scope(_env);
2394
- Value().Set(utf8name, value);
2395
- }
2396
-
2397
- inline void ObjectReference::Set(const std::string& utf8name, std::string& utf8value) {
2398
- HandleScope scope(_env);
2399
- Value().Set(utf8name, utf8value);
2400
- }
2401
-
2402
- inline void ObjectReference::Set(const std::string& utf8name, bool boolValue) {
2403
- HandleScope scope(_env);
2404
- Value().Set(utf8name, boolValue);
2405
- }
2406
-
2407
- inline void ObjectReference::Set(const std::string& utf8name, double numberValue) {
2408
- HandleScope scope(_env);
2409
- Value().Set(utf8name, numberValue);
2410
- }
2411
-
2412
- inline Napi::Value ObjectReference::Get(uint32_t index) const {
2413
- EscapableHandleScope scope(_env);
2414
- return scope.Escape(Value().Get(index));
2415
- }
2416
-
2417
- inline void ObjectReference::Set(uint32_t index, napi_value value) {
2418
- HandleScope scope(_env);
2419
- Value().Set(index, value);
2420
- }
2421
-
2422
- inline void ObjectReference::Set(uint32_t index, Napi::Value value) {
2423
- HandleScope scope(_env);
2424
- Value().Set(index, value);
2425
- }
2426
-
2427
- inline void ObjectReference::Set(uint32_t index, const char* utf8value) {
2428
- HandleScope scope(_env);
2429
- Value().Set(index, utf8value);
2430
- }
2431
-
2432
- inline void ObjectReference::Set(uint32_t index, const std::string& utf8value) {
2433
- HandleScope scope(_env);
2434
- Value().Set(index, utf8value);
2435
- }
2436
-
2437
- inline void ObjectReference::Set(uint32_t index, bool boolValue) {
2438
- HandleScope scope(_env);
2439
- Value().Set(index, boolValue);
2440
- }
2441
-
2442
- inline void ObjectReference::Set(uint32_t index, double numberValue) {
2443
- HandleScope scope(_env);
2444
- Value().Set(index, numberValue);
2445
- }
2446
-
2447
- ////////////////////////////////////////////////////////////////////////////////
2448
- // FunctionReference class
2449
- ////////////////////////////////////////////////////////////////////////////////
2450
-
2451
- inline FunctionReference::FunctionReference(): Reference<Function>() {
2452
- }
2453
-
2454
- inline FunctionReference::FunctionReference(napi_env env, napi_ref ref)
2455
- : Reference<Function>(env, ref) {
2456
- }
2457
-
2458
- inline FunctionReference::FunctionReference(Reference<Function>&& other)
2459
- : Reference<Function>(std::move(other)) {
2460
- }
2461
-
2462
- inline FunctionReference& FunctionReference::operator =(Reference<Function>&& other) {
2463
- static_cast<Reference<Function>*>(this)->operator=(std::move(other));
2464
- return *this;
2465
- }
2466
-
2467
- inline FunctionReference::FunctionReference(FunctionReference&& other)
2468
- : Reference<Function>(std::move(other)) {
2469
- }
2470
-
2471
- inline FunctionReference& FunctionReference::operator =(FunctionReference&& other) {
2472
- static_cast<Reference<Function>*>(this)->operator=(std::move(other));
2473
- return *this;
2474
- }
2475
-
2476
- inline Napi::Value FunctionReference::operator ()(
2477
- const std::initializer_list<napi_value>& args) const {
2478
- EscapableHandleScope scope(_env);
2479
- return scope.Escape(Value()(args));
2480
- }
2481
-
2482
- inline Napi::Value FunctionReference::Call(const std::initializer_list<napi_value>& args) const {
2483
- EscapableHandleScope scope(_env);
2484
- Napi::Value result = Value().Call(args);
2485
- if (scope.Env().IsExceptionPending()) {
2486
- return Value();
2487
- }
2488
- return scope.Escape(result);
2489
- }
2490
-
2491
- inline Napi::Value FunctionReference::Call(const std::vector<napi_value>& args) const {
2492
- EscapableHandleScope scope(_env);
2493
- Napi::Value result = Value().Call(args);
2494
- if (scope.Env().IsExceptionPending()) {
2495
- return Value();
2496
- }
2497
- return scope.Escape(result);
2498
- }
2499
-
2500
- inline Napi::Value FunctionReference::Call(
2501
- napi_value recv, const std::initializer_list<napi_value>& args) const {
2502
- EscapableHandleScope scope(_env);
2503
- Napi::Value result = Value().Call(recv, args);
2504
- if (scope.Env().IsExceptionPending()) {
2505
- return Value();
2506
- }
2507
- return scope.Escape(result);
2508
- }
2509
-
2510
- inline Napi::Value FunctionReference::Call(
2511
- napi_value recv, const std::vector<napi_value>& args) const {
2512
- EscapableHandleScope scope(_env);
2513
- Napi::Value result = Value().Call(recv, args);
2514
- if (scope.Env().IsExceptionPending()) {
2515
- return Value();
2516
- }
2517
- return scope.Escape(result);
2518
- }
2519
-
2520
- inline Napi::Value FunctionReference::Call(
2521
- napi_value recv, size_t argc, const napi_value* args) const {
2522
- EscapableHandleScope scope(_env);
2523
- Napi::Value result = Value().Call(recv, argc, args);
2524
- if (scope.Env().IsExceptionPending()) {
2525
- return Value();
2526
- }
2527
- return scope.Escape(result);
2528
- }
2529
-
2530
- inline Napi::Value FunctionReference::MakeCallback(
2531
- napi_value recv,
2532
- const std::initializer_list<napi_value>& args,
2533
- napi_async_context context) const {
2534
- EscapableHandleScope scope(_env);
2535
- Napi::Value result = Value().MakeCallback(recv, args, context);
2536
- if (scope.Env().IsExceptionPending()) {
2537
- return Value();
2538
- }
2539
- return scope.Escape(result);
2540
- }
2541
-
2542
- inline Napi::Value FunctionReference::MakeCallback(
2543
- napi_value recv,
2544
- const std::vector<napi_value>& args,
2545
- napi_async_context context) const {
2546
- EscapableHandleScope scope(_env);
2547
- Napi::Value result = Value().MakeCallback(recv, args, context);
2548
- if (scope.Env().IsExceptionPending()) {
2549
- return Value();
2550
- }
2551
- return scope.Escape(result);
2552
- }
2553
-
2554
- inline Napi::Value FunctionReference::MakeCallback(
2555
- napi_value recv,
2556
- size_t argc,
2557
- const napi_value* args,
2558
- napi_async_context context) const {
2559
- EscapableHandleScope scope(_env);
2560
- Napi::Value result = Value().MakeCallback(recv, argc, args, context);
2561
- if (scope.Env().IsExceptionPending()) {
2562
- return Value();
2563
- }
2564
- return scope.Escape(result);
2565
- }
2566
-
2567
- inline Object FunctionReference::New(const std::initializer_list<napi_value>& args) const {
2568
- EscapableHandleScope scope(_env);
2569
- return scope.Escape(Value().New(args)).As<Object>();
2570
- }
2571
-
2572
- inline Object FunctionReference::New(const std::vector<napi_value>& args) const {
2573
- EscapableHandleScope scope(_env);
2574
- return scope.Escape(Value().New(args)).As<Object>();
2575
- }
2576
-
2577
- ////////////////////////////////////////////////////////////////////////////////
2578
- // CallbackInfo class
2579
- ////////////////////////////////////////////////////////////////////////////////
2580
-
2581
- inline CallbackInfo::CallbackInfo(napi_env env, napi_callback_info info)
2582
- : _env(env), _info(info), _this(nullptr), _dynamicArgs(nullptr), _data(nullptr) {
2583
- _argc = _staticArgCount;
2584
- _argv = _staticArgs;
2585
- napi_status status = napi_get_cb_info(env, info, &_argc, _argv, &_this, &_data);
2586
- NAPI_THROW_IF_FAILED_VOID(_env, status);
2587
-
2588
- if (_argc > _staticArgCount) {
2589
- // Use either a fixed-size array (on the stack) or a dynamically-allocated
2590
- // array (on the heap) depending on the number of args.
2591
- _dynamicArgs = new napi_value[_argc];
2592
- _argv = _dynamicArgs;
2593
-
2594
- status = napi_get_cb_info(env, info, &_argc, _argv, nullptr, nullptr);
2595
- NAPI_THROW_IF_FAILED_VOID(_env, status);
2596
- }
2597
- }
2598
-
2599
- inline CallbackInfo::~CallbackInfo() {
2600
- if (_dynamicArgs != nullptr) {
2601
- delete[] _dynamicArgs;
2602
- }
2603
- }
2604
-
2605
- inline Value CallbackInfo::NewTarget() const {
2606
- napi_value newTarget;
2607
- napi_status status = napi_get_new_target(_env, _info, &newTarget);
2608
- NAPI_THROW_IF_FAILED(_env, status, Value());
2609
- return Value(_env, newTarget);
2610
- }
2611
-
2612
- inline bool CallbackInfo::IsConstructCall() const {
2613
- return !NewTarget().IsEmpty();
2614
- }
2615
-
2616
- inline Napi::Env CallbackInfo::Env() const {
2617
- return Napi::Env(_env);
2618
- }
2619
-
2620
- inline size_t CallbackInfo::Length() const {
2621
- return _argc;
2622
- }
2623
-
2624
- inline const Value CallbackInfo::operator [](size_t index) const {
2625
- return index < _argc ? Value(_env, _argv[index]) : Env().Undefined();
2626
- }
2627
-
2628
- inline Value CallbackInfo::This() const {
2629
- if (_this == nullptr) {
2630
- return Env().Undefined();
2631
- }
2632
- return Object(_env, _this);
2633
- }
2634
-
2635
- inline void* CallbackInfo::Data() const {
2636
- return _data;
2637
- }
2638
-
2639
- inline void CallbackInfo::SetData(void* data) {
2640
- _data = data;
2641
- }
2642
-
2643
- ////////////////////////////////////////////////////////////////////////////////
2644
- // PropertyDescriptor class
2645
- ////////////////////////////////////////////////////////////////////////////////
2646
-
2647
- template <typename Getter>
2648
- inline PropertyDescriptor
2649
- PropertyDescriptor::Accessor(Napi::Env env,
2650
- Napi::Object object,
2651
- const char* utf8name,
2652
- Getter getter,
2653
- napi_property_attributes attributes,
2654
- void* data) {
2655
- typedef details::CallbackData<Getter, Napi::Value> CbData;
2656
- auto callbackData = new CbData({ getter, data });
2657
-
2658
- napi_status status = AttachData(env, object, callbackData);
2659
- if (status != napi_ok) {
2660
- delete callbackData;
2661
- NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
2662
- }
2663
-
2664
- return PropertyDescriptor({
2665
- utf8name,
2666
- nullptr,
2667
- nullptr,
2668
- CbData::Wrapper,
2669
- nullptr,
2670
- nullptr,
2671
- attributes,
2672
- callbackData
2673
- });
2674
- }
2675
-
2676
- template <typename Getter>
2677
- inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
2678
- Napi::Object object,
2679
- const std::string& utf8name,
2680
- Getter getter,
2681
- napi_property_attributes attributes,
2682
- void* data) {
2683
- return Accessor(env, object, utf8name.c_str(), getter, attributes, data);
2684
- }
2685
-
2686
- template <typename Getter>
2687
- inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
2688
- Napi::Object object,
2689
- Name name,
2690
- Getter getter,
2691
- napi_property_attributes attributes,
2692
- void* data) {
2693
- typedef details::CallbackData<Getter, Napi::Value> CbData;
2694
- auto callbackData = new CbData({ getter, data });
2695
-
2696
- napi_status status = AttachData(env, object, callbackData);
2697
- if (status != napi_ok) {
2698
- delete callbackData;
2699
- NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
2700
- }
2701
-
2702
- return PropertyDescriptor({
2703
- nullptr,
2704
- name,
2705
- nullptr,
2706
- CbData::Wrapper,
2707
- nullptr,
2708
- nullptr,
2709
- attributes,
2710
- callbackData
2711
- });
2712
- }
2713
-
2714
- template <typename Getter, typename Setter>
2715
- inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
2716
- Napi::Object object,
2717
- const char* utf8name,
2718
- Getter getter,
2719
- Setter setter,
2720
- napi_property_attributes attributes,
2721
- void* data) {
2722
- typedef details::AccessorCallbackData<Getter, Setter> CbData;
2723
- auto callbackData = new CbData({ getter, setter, data });
2724
-
2725
- napi_status status = AttachData(env, object, callbackData);
2726
- if (status != napi_ok) {
2727
- delete callbackData;
2728
- NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
2729
- }
2730
-
2731
- return PropertyDescriptor({
2732
- utf8name,
2733
- nullptr,
2734
- nullptr,
2735
- CbData::GetterWrapper,
2736
- CbData::SetterWrapper,
2737
- nullptr,
2738
- attributes,
2739
- callbackData
2740
- });
2741
- }
2742
-
2743
- template <typename Getter, typename Setter>
2744
- inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
2745
- Napi::Object object,
2746
- const std::string& utf8name,
2747
- Getter getter,
2748
- Setter setter,
2749
- napi_property_attributes attributes,
2750
- void* data) {
2751
- return Accessor(env, object, utf8name.c_str(), getter, setter, attributes, data);
2752
- }
2753
-
2754
- template <typename Getter, typename Setter>
2755
- inline PropertyDescriptor PropertyDescriptor::Accessor(Napi::Env env,
2756
- Napi::Object object,
2757
- Name name,
2758
- Getter getter,
2759
- Setter setter,
2760
- napi_property_attributes attributes,
2761
- void* data) {
2762
- typedef details::AccessorCallbackData<Getter, Setter> CbData;
2763
- auto callbackData = new CbData({ getter, setter, data });
2764
-
2765
- napi_status status = AttachData(env, object, callbackData);
2766
- if (status != napi_ok) {
2767
- delete callbackData;
2768
- NAPI_THROW_IF_FAILED(env, status, napi_property_descriptor());
2769
- }
2770
-
2771
- return PropertyDescriptor({
2772
- nullptr,
2773
- name,
2774
- nullptr,
2775
- CbData::GetterWrapper,
2776
- CbData::SetterWrapper,
2777
- nullptr,
2778
- attributes,
2779
- callbackData
2780
- });
2781
- }
2782
-
2783
- template <typename Callable>
2784
- inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
2785
- Napi::Object /*object*/,
2786
- const char* utf8name,
2787
- Callable cb,
2788
- napi_property_attributes attributes,
2789
- void* data) {
2790
- return PropertyDescriptor({
2791
- utf8name,
2792
- nullptr,
2793
- nullptr,
2794
- nullptr,
2795
- nullptr,
2796
- Napi::Function::New(env, cb, utf8name, data),
2797
- attributes,
2798
- nullptr
2799
- });
2800
- }
2801
-
2802
- template <typename Callable>
2803
- inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
2804
- Napi::Object object,
2805
- const std::string& utf8name,
2806
- Callable cb,
2807
- napi_property_attributes attributes,
2808
- void* data) {
2809
- return Function(env, object, utf8name.c_str(), cb, attributes, data);
2810
- }
2811
-
2812
- template <typename Callable>
2813
- inline PropertyDescriptor PropertyDescriptor::Function(Napi::Env env,
2814
- Napi::Object /*object*/,
2815
- Name name,
2816
- Callable cb,
2817
- napi_property_attributes attributes,
2818
- void* data) {
2819
- return PropertyDescriptor({
2820
- nullptr,
2821
- name,
2822
- nullptr,
2823
- nullptr,
2824
- nullptr,
2825
- Napi::Function::New(env, cb, nullptr, data),
2826
- attributes,
2827
- nullptr
2828
- });
2829
- }
2830
-
2831
- inline PropertyDescriptor PropertyDescriptor::Value(const char* utf8name,
2832
- napi_value value,
2833
- napi_property_attributes attributes) {
2834
- return PropertyDescriptor({
2835
- utf8name, nullptr, nullptr, nullptr, nullptr, value, attributes, nullptr
2836
- });
2837
- }
2838
-
2839
- inline PropertyDescriptor PropertyDescriptor::Value(const std::string& utf8name,
2840
- napi_value value,
2841
- napi_property_attributes attributes) {
2842
- return Value(utf8name.c_str(), value, attributes);
2843
- }
2844
-
2845
- inline PropertyDescriptor PropertyDescriptor::Value(napi_value name,
2846
- napi_value value,
2847
- napi_property_attributes attributes) {
2848
- return PropertyDescriptor({
2849
- nullptr, name, nullptr, nullptr, nullptr, value, attributes, nullptr
2850
- });
2851
- }
2852
-
2853
- inline PropertyDescriptor PropertyDescriptor::Value(Name name,
2854
- Napi::Value value,
2855
- napi_property_attributes attributes) {
2856
- napi_value nameValue = name;
2857
- napi_value valueValue = value;
2858
- return PropertyDescriptor::Value(nameValue, valueValue, attributes);
2859
- }
2860
-
2861
- inline PropertyDescriptor::PropertyDescriptor(napi_property_descriptor desc)
2862
- : _desc(desc) {
2863
- }
2864
-
2865
- inline PropertyDescriptor::operator napi_property_descriptor&() {
2866
- return _desc;
2867
- }
2868
-
2869
- inline PropertyDescriptor::operator const napi_property_descriptor&() const {
2870
- return _desc;
2871
- }
2872
-
2873
- ////////////////////////////////////////////////////////////////////////////////
2874
- // ObjectWrap<T> class
2875
- ////////////////////////////////////////////////////////////////////////////////
2876
-
2877
- template <typename T>
2878
- inline ObjectWrap<T>::ObjectWrap(const Napi::CallbackInfo& callbackInfo) {
2879
- napi_env env = callbackInfo.Env();
2880
- napi_value wrapper = callbackInfo.This();
2881
- napi_status status;
2882
- napi_ref ref;
2883
- T* instance = static_cast<T*>(this);
2884
- status = napi_wrap(env, wrapper, instance, FinalizeCallback, nullptr, &ref);
2885
- NAPI_THROW_IF_FAILED_VOID(env, status);
2886
-
2887
- Reference<Object>* instanceRef = instance;
2888
- *instanceRef = Reference<Object>(env, ref);
2889
- }
2890
-
2891
- template<typename T>
2892
- inline T* ObjectWrap<T>::Unwrap(Object wrapper) {
2893
- T* unwrapped;
2894
- napi_status status = napi_unwrap(wrapper.Env(), wrapper, reinterpret_cast<void**>(&unwrapped));
2895
- NAPI_THROW_IF_FAILED(wrapper.Env(), status, nullptr);
2896
- return unwrapped;
2897
- }
2898
-
2899
- template <typename T>
2900
- inline Function
2901
- ObjectWrap<T>::DefineClass(Napi::Env env,
2902
- const char* utf8name,
2903
- const size_t props_count,
2904
- const napi_property_descriptor* descriptors,
2905
- void* data) {
2906
- napi_status status;
2907
- std::vector<napi_property_descriptor> props(props_count);
2908
-
2909
- // We copy the descriptors to a local array because before defining the class
2910
- // we must replace static method property descriptors with value property
2911
- // descriptors such that the value is a function-valued `napi_value` created
2912
- // with `CreateFunction()`.
2913
- //
2914
- // This replacement could be made for instance methods as well, but V8 aborts
2915
- // if we do that, because it expects methods defined on the prototype template
2916
- // to have `FunctionTemplate`s.
2917
- for (size_t index = 0; index < props_count; index++) {
2918
- props[index] = descriptors[index];
2919
- napi_property_descriptor* prop = &props[index];
2920
- if (prop->method == T::StaticMethodCallbackWrapper) {
2921
- status = CreateFunction(env,
2922
- utf8name,
2923
- prop->method,
2924
- static_cast<StaticMethodCallbackData*>(prop->data),
2925
- &(prop->value));
2926
- NAPI_THROW_IF_FAILED(env, status, Function());
2927
- prop->method = nullptr;
2928
- prop->data = nullptr;
2929
- } else if (prop->method == T::StaticVoidMethodCallbackWrapper) {
2930
- status = CreateFunction(env,
2931
- utf8name,
2932
- prop->method,
2933
- static_cast<StaticVoidMethodCallbackData*>(prop->data),
2934
- &(prop->value));
2935
- NAPI_THROW_IF_FAILED(env, status, Function());
2936
- prop->method = nullptr;
2937
- prop->data = nullptr;
2938
- }
2939
- }
2940
-
2941
- napi_value value;
2942
- status = napi_define_class(env,
2943
- utf8name,
2944
- NAPI_AUTO_LENGTH,
2945
- T::ConstructorCallbackWrapper,
2946
- data,
2947
- props_count,
2948
- props.data(),
2949
- &value);
2950
- NAPI_THROW_IF_FAILED(env, status, Function());
2951
-
2952
- // After defining the class we iterate once more over the property descriptors
2953
- // and attach the data associated with accessors and instance methods to the
2954
- // newly created JavaScript class.
2955
- for (size_t idx = 0; idx < props_count; idx++) {
2956
- const napi_property_descriptor* prop = &props[idx];
2957
-
2958
- if (prop->getter == T::StaticGetterCallbackWrapper ||
2959
- prop->setter == T::StaticSetterCallbackWrapper) {
2960
- status = Napi::details::AttachData(env,
2961
- value,
2962
- static_cast<StaticAccessorCallbackData*>(prop->data));
2963
- NAPI_THROW_IF_FAILED(env, status, Function());
2964
- } else if (prop->getter == T::InstanceGetterCallbackWrapper ||
2965
- prop->setter == T::InstanceSetterCallbackWrapper) {
2966
- status = Napi::details::AttachData(env,
2967
- value,
2968
- static_cast<InstanceAccessorCallbackData*>(prop->data));
2969
- NAPI_THROW_IF_FAILED(env, status, Function());
2970
- } else if (prop->method != nullptr && !(prop->attributes & napi_static)) {
2971
- if (prop->method == T::InstanceVoidMethodCallbackWrapper) {
2972
- status = Napi::details::AttachData(env,
2973
- value,
2974
- static_cast<InstanceVoidMethodCallbackData*>(prop->data));
2975
- NAPI_THROW_IF_FAILED(env, status, Function());
2976
- } else if (prop->method == T::InstanceMethodCallbackWrapper) {
2977
- status = Napi::details::AttachData(env,
2978
- value,
2979
- static_cast<InstanceMethodCallbackData*>(prop->data));
2980
- NAPI_THROW_IF_FAILED(env, status, Function());
2981
- }
2982
- }
2983
- }
2984
-
2985
- return Function(env, value);
2986
- }
2987
-
2988
- template <typename T>
2989
- inline Function ObjectWrap<T>::DefineClass(
2990
- Napi::Env env,
2991
- const char* utf8name,
2992
- const std::initializer_list<ClassPropertyDescriptor<T>>& properties,
2993
- void* data) {
2994
- return DefineClass(env,
2995
- utf8name,
2996
- properties.size(),
2997
- reinterpret_cast<const napi_property_descriptor*>(properties.begin()),
2998
- data);
2999
- }
3000
-
3001
- template <typename T>
3002
- inline Function ObjectWrap<T>::DefineClass(
3003
- Napi::Env env,
3004
- const char* utf8name,
3005
- const std::vector<ClassPropertyDescriptor<T>>& properties,
3006
- void* data) {
3007
- return DefineClass(env,
3008
- utf8name,
3009
- properties.size(),
3010
- reinterpret_cast<const napi_property_descriptor*>(properties.data()),
3011
- data);
3012
- }
3013
-
3014
- template <typename T>
3015
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
3016
- const char* utf8name,
3017
- StaticVoidMethodCallback method,
3018
- napi_property_attributes attributes,
3019
- void* data) {
3020
- StaticVoidMethodCallbackData* callbackData = new StaticVoidMethodCallbackData({ method, data });
3021
-
3022
- napi_property_descriptor desc = napi_property_descriptor();
3023
- desc.utf8name = utf8name;
3024
- desc.method = T::StaticVoidMethodCallbackWrapper;
3025
- desc.data = callbackData;
3026
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3027
- return desc;
3028
- }
3029
-
3030
- template <typename T>
3031
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
3032
- const char* utf8name,
3033
- StaticMethodCallback method,
3034
- napi_property_attributes attributes,
3035
- void* data) {
3036
- StaticMethodCallbackData* callbackData = new StaticMethodCallbackData({ method, data });
3037
-
3038
- napi_property_descriptor desc = napi_property_descriptor();
3039
- desc.utf8name = utf8name;
3040
- desc.method = T::StaticMethodCallbackWrapper;
3041
- desc.data = callbackData;
3042
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3043
- return desc;
3044
- }
3045
-
3046
- template <typename T>
3047
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
3048
- Symbol name,
3049
- StaticVoidMethodCallback method,
3050
- napi_property_attributes attributes,
3051
- void* data) {
3052
- StaticVoidMethodCallbackData* callbackData = new StaticVoidMethodCallbackData({ method, data });
3053
-
3054
- napi_property_descriptor desc = napi_property_descriptor();
3055
- desc.name = name;
3056
- desc.method = T::StaticVoidMethodCallbackWrapper;
3057
- desc.data = callbackData;
3058
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3059
- return desc;
3060
- }
3061
-
3062
- template <typename T>
3063
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticMethod(
3064
- Symbol name,
3065
- StaticMethodCallback method,
3066
- napi_property_attributes attributes,
3067
- void* data) {
3068
- StaticMethodCallbackData* callbackData = new StaticMethodCallbackData({ method, data });
3069
-
3070
- napi_property_descriptor desc = napi_property_descriptor();
3071
- desc.name = name;
3072
- desc.method = T::StaticMethodCallbackWrapper;
3073
- desc.data = callbackData;
3074
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3075
- return desc;
3076
- }
3077
-
3078
- template <typename T>
3079
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
3080
- const char* utf8name,
3081
- StaticGetterCallback getter,
3082
- StaticSetterCallback setter,
3083
- napi_property_attributes attributes,
3084
- void* data) {
3085
- StaticAccessorCallbackData* callbackData =
3086
- new StaticAccessorCallbackData({ getter, setter, data });
3087
-
3088
- napi_property_descriptor desc = napi_property_descriptor();
3089
- desc.utf8name = utf8name;
3090
- desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr;
3091
- desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr;
3092
- desc.data = callbackData;
3093
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3094
- return desc;
3095
- }
3096
-
3097
- template <typename T>
3098
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticAccessor(
3099
- Symbol name,
3100
- StaticGetterCallback getter,
3101
- StaticSetterCallback setter,
3102
- napi_property_attributes attributes,
3103
- void* data) {
3104
- StaticAccessorCallbackData* callbackData =
3105
- new StaticAccessorCallbackData({ getter, setter, data });
3106
-
3107
- napi_property_descriptor desc = napi_property_descriptor();
3108
- desc.name = name;
3109
- desc.getter = getter != nullptr ? T::StaticGetterCallbackWrapper : nullptr;
3110
- desc.setter = setter != nullptr ? T::StaticSetterCallbackWrapper : nullptr;
3111
- desc.data = callbackData;
3112
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3113
- return desc;
3114
- }
3115
-
3116
- template <typename T>
3117
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
3118
- const char* utf8name,
3119
- InstanceVoidMethodCallback method,
3120
- napi_property_attributes attributes,
3121
- void* data) {
3122
- InstanceVoidMethodCallbackData* callbackData =
3123
- new InstanceVoidMethodCallbackData({ method, data});
3124
-
3125
- napi_property_descriptor desc = napi_property_descriptor();
3126
- desc.utf8name = utf8name;
3127
- desc.method = T::InstanceVoidMethodCallbackWrapper;
3128
- desc.data = callbackData;
3129
- desc.attributes = attributes;
3130
- return desc;
3131
- }
3132
-
3133
- template <typename T>
3134
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
3135
- const char* utf8name,
3136
- InstanceMethodCallback method,
3137
- napi_property_attributes attributes,
3138
- void* data) {
3139
- InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData({ method, data });
3140
-
3141
- napi_property_descriptor desc = napi_property_descriptor();
3142
- desc.utf8name = utf8name;
3143
- desc.method = T::InstanceMethodCallbackWrapper;
3144
- desc.data = callbackData;
3145
- desc.attributes = attributes;
3146
- return desc;
3147
- }
3148
-
3149
- template <typename T>
3150
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
3151
- Symbol name,
3152
- InstanceVoidMethodCallback method,
3153
- napi_property_attributes attributes,
3154
- void* data) {
3155
- InstanceVoidMethodCallbackData* callbackData =
3156
- new InstanceVoidMethodCallbackData({ method, data});
3157
-
3158
- napi_property_descriptor desc = napi_property_descriptor();
3159
- desc.name = name;
3160
- desc.method = T::InstanceVoidMethodCallbackWrapper;
3161
- desc.data = callbackData;
3162
- desc.attributes = attributes;
3163
- return desc;
3164
- }
3165
-
3166
- template <typename T>
3167
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceMethod(
3168
- Symbol name,
3169
- InstanceMethodCallback method,
3170
- napi_property_attributes attributes,
3171
- void* data) {
3172
- InstanceMethodCallbackData* callbackData = new InstanceMethodCallbackData({ method, data });
3173
-
3174
- napi_property_descriptor desc = napi_property_descriptor();
3175
- desc.name = name;
3176
- desc.method = T::InstanceMethodCallbackWrapper;
3177
- desc.data = callbackData;
3178
- desc.attributes = attributes;
3179
- return desc;
3180
- }
3181
-
3182
- template <typename T>
3183
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceAccessor(
3184
- const char* utf8name,
3185
- InstanceGetterCallback getter,
3186
- InstanceSetterCallback setter,
3187
- napi_property_attributes attributes,
3188
- void* data) {
3189
- InstanceAccessorCallbackData* callbackData =
3190
- new InstanceAccessorCallbackData({ getter, setter, data });
3191
-
3192
- napi_property_descriptor desc = napi_property_descriptor();
3193
- desc.utf8name = utf8name;
3194
- desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr;
3195
- desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr;
3196
- desc.data = callbackData;
3197
- desc.attributes = attributes;
3198
- return desc;
3199
- }
3200
-
3201
- template <typename T>
3202
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceAccessor(
3203
- Symbol name,
3204
- InstanceGetterCallback getter,
3205
- InstanceSetterCallback setter,
3206
- napi_property_attributes attributes,
3207
- void* data) {
3208
- InstanceAccessorCallbackData* callbackData =
3209
- new InstanceAccessorCallbackData({ getter, setter, data });
3210
-
3211
- napi_property_descriptor desc = napi_property_descriptor();
3212
- desc.name = name;
3213
- desc.getter = getter != nullptr ? T::InstanceGetterCallbackWrapper : nullptr;
3214
- desc.setter = setter != nullptr ? T::InstanceSetterCallbackWrapper : nullptr;
3215
- desc.data = callbackData;
3216
- desc.attributes = attributes;
3217
- return desc;
3218
- }
3219
-
3220
- template <typename T>
3221
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticValue(const char* utf8name,
3222
- Napi::Value value, napi_property_attributes attributes) {
3223
- napi_property_descriptor desc = napi_property_descriptor();
3224
- desc.utf8name = utf8name;
3225
- desc.value = value;
3226
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3227
- return desc;
3228
- }
3229
-
3230
- template <typename T>
3231
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::StaticValue(Symbol name,
3232
- Napi::Value value, napi_property_attributes attributes) {
3233
- napi_property_descriptor desc = napi_property_descriptor();
3234
- desc.name = name;
3235
- desc.value = value;
3236
- desc.attributes = static_cast<napi_property_attributes>(attributes | napi_static);
3237
- return desc;
3238
- }
3239
-
3240
- template <typename T>
3241
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceValue(
3242
- const char* utf8name,
3243
- Napi::Value value,
3244
- napi_property_attributes attributes) {
3245
- napi_property_descriptor desc = napi_property_descriptor();
3246
- desc.utf8name = utf8name;
3247
- desc.value = value;
3248
- desc.attributes = attributes;
3249
- return desc;
3250
- }
3251
-
3252
- template <typename T>
3253
- inline ClassPropertyDescriptor<T> ObjectWrap<T>::InstanceValue(
3254
- Symbol name,
3255
- Napi::Value value,
3256
- napi_property_attributes attributes) {
3257
- napi_property_descriptor desc = napi_property_descriptor();
3258
- desc.name = name;
3259
- desc.value = value;
3260
- desc.attributes = attributes;
3261
- return desc;
3262
- }
3263
-
3264
- template <typename T>
3265
- inline napi_value ObjectWrap<T>::ConstructorCallbackWrapper(
3266
- napi_env env,
3267
- napi_callback_info info) {
3268
- napi_value new_target;
3269
- napi_status status = napi_get_new_target(env, info, &new_target);
3270
- if (status != napi_ok) return nullptr;
3271
-
3272
- bool isConstructCall = (new_target != nullptr);
3273
- if (!isConstructCall) {
3274
- napi_throw_type_error(env, nullptr, "Class constructors cannot be invoked without 'new'");
3275
- return nullptr;
3276
- }
3277
-
3278
- T* instance;
3279
- napi_value wrapper = details::WrapCallback([&] {
3280
- CallbackInfo callbackInfo(env, info);
3281
- instance = new T(callbackInfo);
3282
- return callbackInfo.This();
3283
- });
3284
-
3285
- return wrapper;
3286
- }
3287
-
3288
- template <typename T>
3289
- inline napi_value ObjectWrap<T>::StaticVoidMethodCallbackWrapper(
3290
- napi_env env,
3291
- napi_callback_info info) {
3292
- return details::WrapCallback([&] {
3293
- CallbackInfo callbackInfo(env, info);
3294
- StaticVoidMethodCallbackData* callbackData =
3295
- reinterpret_cast<StaticVoidMethodCallbackData*>(callbackInfo.Data());
3296
- callbackInfo.SetData(callbackData->data);
3297
- callbackData->callback(callbackInfo);
3298
- return nullptr;
3299
- });
3300
- }
3301
-
3302
- template <typename T>
3303
- inline napi_value ObjectWrap<T>::StaticMethodCallbackWrapper(
3304
- napi_env env,
3305
- napi_callback_info info) {
3306
- return details::WrapCallback([&] {
3307
- CallbackInfo callbackInfo(env, info);
3308
- StaticMethodCallbackData* callbackData =
3309
- reinterpret_cast<StaticMethodCallbackData*>(callbackInfo.Data());
3310
- callbackInfo.SetData(callbackData->data);
3311
- return callbackData->callback(callbackInfo);
3312
- });
3313
- }
3314
-
3315
- template <typename T>
3316
- inline napi_value ObjectWrap<T>::StaticGetterCallbackWrapper(
3317
- napi_env env,
3318
- napi_callback_info info) {
3319
- return details::WrapCallback([&] {
3320
- CallbackInfo callbackInfo(env, info);
3321
- StaticAccessorCallbackData* callbackData =
3322
- reinterpret_cast<StaticAccessorCallbackData*>(callbackInfo.Data());
3323
- callbackInfo.SetData(callbackData->data);
3324
- return callbackData->getterCallback(callbackInfo);
3325
- });
3326
- }
3327
-
3328
- template <typename T>
3329
- inline napi_value ObjectWrap<T>::StaticSetterCallbackWrapper(
3330
- napi_env env,
3331
- napi_callback_info info) {
3332
- return details::WrapCallback([&] {
3333
- CallbackInfo callbackInfo(env, info);
3334
- StaticAccessorCallbackData* callbackData =
3335
- reinterpret_cast<StaticAccessorCallbackData*>(callbackInfo.Data());
3336
- callbackInfo.SetData(callbackData->data);
3337
- callbackData->setterCallback(callbackInfo, callbackInfo[0]);
3338
- return nullptr;
3339
- });
3340
- }
3341
-
3342
- template <typename T>
3343
- inline napi_value ObjectWrap<T>::InstanceVoidMethodCallbackWrapper(
3344
- napi_env env,
3345
- napi_callback_info info) {
3346
- return details::WrapCallback([&] {
3347
- CallbackInfo callbackInfo(env, info);
3348
- InstanceVoidMethodCallbackData* callbackData =
3349
- reinterpret_cast<InstanceVoidMethodCallbackData*>(callbackInfo.Data());
3350
- callbackInfo.SetData(callbackData->data);
3351
- T* instance = Unwrap(callbackInfo.This().As<Object>());
3352
- auto cb = callbackData->callback;
3353
- (instance->*cb)(callbackInfo);
3354
- return nullptr;
3355
- });
3356
- }
3357
-
3358
- template <typename T>
3359
- inline napi_value ObjectWrap<T>::InstanceMethodCallbackWrapper(
3360
- napi_env env,
3361
- napi_callback_info info) {
3362
- return details::WrapCallback([&] {
3363
- CallbackInfo callbackInfo(env, info);
3364
- InstanceMethodCallbackData* callbackData =
3365
- reinterpret_cast<InstanceMethodCallbackData*>(callbackInfo.Data());
3366
- callbackInfo.SetData(callbackData->data);
3367
- T* instance = Unwrap(callbackInfo.This().As<Object>());
3368
- auto cb = callbackData->callback;
3369
- return (instance->*cb)(callbackInfo);
3370
- });
3371
- }
3372
-
3373
- template <typename T>
3374
- inline napi_value ObjectWrap<T>::InstanceGetterCallbackWrapper(
3375
- napi_env env,
3376
- napi_callback_info info) {
3377
- return details::WrapCallback([&] {
3378
- CallbackInfo callbackInfo(env, info);
3379
- InstanceAccessorCallbackData* callbackData =
3380
- reinterpret_cast<InstanceAccessorCallbackData*>(callbackInfo.Data());
3381
- callbackInfo.SetData(callbackData->data);
3382
- T* instance = Unwrap(callbackInfo.This().As<Object>());
3383
- auto cb = callbackData->getterCallback;
3384
- return (instance->*cb)(callbackInfo);
3385
- });
3386
- }
3387
-
3388
- template <typename T>
3389
- inline napi_value ObjectWrap<T>::InstanceSetterCallbackWrapper(
3390
- napi_env env,
3391
- napi_callback_info info) {
3392
- return details::WrapCallback([&] {
3393
- CallbackInfo callbackInfo(env, info);
3394
- InstanceAccessorCallbackData* callbackData =
3395
- reinterpret_cast<InstanceAccessorCallbackData*>(callbackInfo.Data());
3396
- callbackInfo.SetData(callbackData->data);
3397
- T* instance = Unwrap(callbackInfo.This().As<Object>());
3398
- auto cb = callbackData->setterCallback;
3399
- (instance->*cb)(callbackInfo, callbackInfo[0]);
3400
- return nullptr;
3401
- });
3402
- }
3403
-
3404
- template <typename T>
3405
- inline void ObjectWrap<T>::FinalizeCallback(napi_env /*env*/, void* data, void* /*hint*/) {
3406
- T* instance = reinterpret_cast<T*>(data);
3407
- delete instance;
3408
- }
3409
-
3410
- ////////////////////////////////////////////////////////////////////////////////
3411
- // HandleScope class
3412
- ////////////////////////////////////////////////////////////////////////////////
3413
-
3414
- inline HandleScope::HandleScope(napi_env env, napi_handle_scope scope)
3415
- : _env(env), _scope(scope) {
3416
- }
3417
-
3418
- inline HandleScope::HandleScope(Napi::Env env) : _env(env) {
3419
- napi_status status = napi_open_handle_scope(_env, &_scope);
3420
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3421
- }
3422
-
3423
- inline HandleScope::~HandleScope() {
3424
- napi_close_handle_scope(_env, _scope);
3425
- }
3426
-
3427
- inline HandleScope::operator napi_handle_scope() const {
3428
- return _scope;
3429
- }
3430
-
3431
- inline Napi::Env HandleScope::Env() const {
3432
- return Napi::Env(_env);
3433
- }
3434
-
3435
- ////////////////////////////////////////////////////////////////////////////////
3436
- // EscapableHandleScope class
3437
- ////////////////////////////////////////////////////////////////////////////////
3438
-
3439
- inline EscapableHandleScope::EscapableHandleScope(
3440
- napi_env env, napi_escapable_handle_scope scope) : _env(env), _scope(scope) {
3441
- }
3442
-
3443
- inline EscapableHandleScope::EscapableHandleScope(Napi::Env env) : _env(env) {
3444
- napi_status status = napi_open_escapable_handle_scope(_env, &_scope);
3445
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3446
- }
3447
-
3448
- inline EscapableHandleScope::~EscapableHandleScope() {
3449
- napi_close_escapable_handle_scope(_env, _scope);
3450
- }
3451
-
3452
- inline EscapableHandleScope::operator napi_escapable_handle_scope() const {
3453
- return _scope;
3454
- }
3455
-
3456
- inline Napi::Env EscapableHandleScope::Env() const {
3457
- return Napi::Env(_env);
3458
- }
3459
-
3460
- inline Value EscapableHandleScope::Escape(napi_value escapee) {
3461
- napi_value result;
3462
- napi_status status = napi_escape_handle(_env, _scope, escapee, &result);
3463
- NAPI_THROW_IF_FAILED(_env, status, Value());
3464
- return Value(_env, result);
3465
- }
3466
-
3467
-
3468
- #if (NAPI_VERSION > 2)
3469
- ////////////////////////////////////////////////////////////////////////////////
3470
- // CallbackScope class
3471
- ////////////////////////////////////////////////////////////////////////////////
3472
-
3473
- inline CallbackScope::CallbackScope(
3474
- napi_env env, napi_callback_scope scope) : _env(env), _scope(scope) {
3475
- }
3476
-
3477
- inline CallbackScope::CallbackScope(napi_env env, napi_async_context context)
3478
- : _env(env) {
3479
- napi_status status = napi_open_callback_scope(
3480
- _env, Object::New(env), context, &_scope);
3481
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3482
- }
3483
-
3484
- inline CallbackScope::~CallbackScope() {
3485
- napi_close_callback_scope(_env, _scope);
3486
- }
3487
-
3488
- inline CallbackScope::operator napi_callback_scope() const {
3489
- return _scope;
3490
- }
3491
-
3492
- inline Napi::Env CallbackScope::Env() const {
3493
- return Napi::Env(_env);
3494
- }
3495
- #endif
3496
-
3497
- ////////////////////////////////////////////////////////////////////////////////
3498
- // AsyncContext class
3499
- ////////////////////////////////////////////////////////////////////////////////
3500
-
3501
- inline AsyncContext::AsyncContext(napi_env env, const char* resource_name)
3502
- : AsyncContext(env, resource_name, Object::New(env)) {
3503
- }
3504
-
3505
- inline AsyncContext::AsyncContext(napi_env env,
3506
- const char* resource_name,
3507
- const Object& resource)
3508
- : _env(env),
3509
- _context(nullptr) {
3510
- napi_value resource_id;
3511
- napi_status status = napi_create_string_utf8(
3512
- _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
3513
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3514
-
3515
- status = napi_async_init(_env, resource, resource_id, &_context);
3516
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3517
- }
3518
-
3519
- inline AsyncContext::~AsyncContext() {
3520
- if (_context != nullptr) {
3521
- napi_async_destroy(_env, _context);
3522
- _context = nullptr;
3523
- }
3524
- }
3525
-
3526
- inline AsyncContext::AsyncContext(AsyncContext&& other) {
3527
- _env = other._env;
3528
- other._env = nullptr;
3529
- _context = other._context;
3530
- other._context = nullptr;
3531
- }
3532
-
3533
- inline AsyncContext& AsyncContext::operator =(AsyncContext&& other) {
3534
- _env = other._env;
3535
- other._env = nullptr;
3536
- _context = other._context;
3537
- other._context = nullptr;
3538
- return *this;
3539
- }
3540
-
3541
- inline AsyncContext::operator napi_async_context() const {
3542
- return _context;
3543
- }
3544
-
3545
- ////////////////////////////////////////////////////////////////////////////////
3546
- // AsyncWorker class
3547
- ////////////////////////////////////////////////////////////////////////////////
3548
-
3549
- inline AsyncWorker::AsyncWorker(const Function& callback)
3550
- : AsyncWorker(callback, "generic") {
3551
- }
3552
-
3553
- inline AsyncWorker::AsyncWorker(const Function& callback,
3554
- const char* resource_name)
3555
- : AsyncWorker(callback, resource_name, Object::New(callback.Env())) {
3556
- }
3557
-
3558
- inline AsyncWorker::AsyncWorker(const Function& callback,
3559
- const char* resource_name,
3560
- const Object& resource)
3561
- : AsyncWorker(Object::New(callback.Env()),
3562
- callback,
3563
- resource_name,
3564
- resource) {
3565
- }
3566
-
3567
- inline AsyncWorker::AsyncWorker(const Object& receiver,
3568
- const Function& callback)
3569
- : AsyncWorker(receiver, callback, "generic") {
3570
- }
3571
-
3572
- inline AsyncWorker::AsyncWorker(const Object& receiver,
3573
- const Function& callback,
3574
- const char* resource_name)
3575
- : AsyncWorker(receiver,
3576
- callback,
3577
- resource_name,
3578
- Object::New(callback.Env())) {
3579
- }
3580
-
3581
- inline AsyncWorker::AsyncWorker(const Object& receiver,
3582
- const Function& callback,
3583
- const char* resource_name,
3584
- const Object& resource)
3585
- : _env(callback.Env()),
3586
- _receiver(Napi::Persistent(receiver)),
3587
- _callback(Napi::Persistent(callback)),
3588
- _suppress_destruct(false) {
3589
- napi_value resource_id;
3590
- napi_status status = napi_create_string_latin1(
3591
- _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
3592
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3593
-
3594
- status = napi_create_async_work(_env, resource, resource_id, OnExecute,
3595
- OnWorkComplete, this, &_work);
3596
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3597
- }
3598
-
3599
- inline AsyncWorker::AsyncWorker(Napi::Env env)
3600
- : AsyncWorker(env, "generic") {
3601
- }
3602
-
3603
- inline AsyncWorker::AsyncWorker(Napi::Env env,
3604
- const char* resource_name)
3605
- : AsyncWorker(env, resource_name, Object::New(env)) {
3606
- }
3607
-
3608
- inline AsyncWorker::AsyncWorker(Napi::Env env,
3609
- const char* resource_name,
3610
- const Object& resource)
3611
- : _env(env),
3612
- _receiver(),
3613
- _callback(),
3614
- _suppress_destruct(false) {
3615
- napi_value resource_id;
3616
- napi_status status = napi_create_string_latin1(
3617
- _env, resource_name, NAPI_AUTO_LENGTH, &resource_id);
3618
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3619
-
3620
- status = napi_create_async_work(_env, resource, resource_id, OnExecute,
3621
- OnWorkComplete, this, &_work);
3622
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3623
- }
3624
-
3625
- inline AsyncWorker::~AsyncWorker() {
3626
- if (_work != nullptr) {
3627
- napi_delete_async_work(_env, _work);
3628
- _work = nullptr;
3629
- }
3630
- }
3631
-
3632
- inline void AsyncWorker::Destroy() {
3633
- delete this;
3634
- }
3635
-
3636
- inline AsyncWorker::AsyncWorker(AsyncWorker&& other) {
3637
- _env = other._env;
3638
- other._env = nullptr;
3639
- _work = other._work;
3640
- other._work = nullptr;
3641
- _receiver = std::move(other._receiver);
3642
- _callback = std::move(other._callback);
3643
- _error = std::move(other._error);
3644
- _suppress_destruct = other._suppress_destruct;
3645
- }
3646
-
3647
- inline AsyncWorker& AsyncWorker::operator =(AsyncWorker&& other) {
3648
- _env = other._env;
3649
- other._env = nullptr;
3650
- _work = other._work;
3651
- other._work = nullptr;
3652
- _receiver = std::move(other._receiver);
3653
- _callback = std::move(other._callback);
3654
- _error = std::move(other._error);
3655
- _suppress_destruct = other._suppress_destruct;
3656
- return *this;
3657
- }
3658
-
3659
- inline AsyncWorker::operator napi_async_work() const {
3660
- return _work;
3661
- }
3662
-
3663
- inline Napi::Env AsyncWorker::Env() const {
3664
- return Napi::Env(_env);
3665
- }
3666
-
3667
- inline void AsyncWorker::Queue() {
3668
- napi_status status = napi_queue_async_work(_env, _work);
3669
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3670
- }
3671
-
3672
- inline void AsyncWorker::Cancel() {
3673
- napi_status status = napi_cancel_async_work(_env, _work);
3674
- NAPI_THROW_IF_FAILED_VOID(_env, status);
3675
- }
3676
-
3677
- inline ObjectReference& AsyncWorker::Receiver() {
3678
- return _receiver;
3679
- }
3680
-
3681
- inline FunctionReference& AsyncWorker::Callback() {
3682
- return _callback;
3683
- }
3684
-
3685
- inline void AsyncWorker::SuppressDestruct() {
3686
- _suppress_destruct = true;
3687
- }
3688
-
3689
- inline void AsyncWorker::OnOK() {
3690
- if (!_callback.IsEmpty()) {
3691
- _callback.Call(_receiver.Value(), GetResult(_callback.Env()));
3692
- }
3693
- }
3694
-
3695
- inline void AsyncWorker::OnError(const Error& e) {
3696
- if (!_callback.IsEmpty()) {
3697
- _callback.Call(_receiver.Value(), std::initializer_list<napi_value>{ e.Value() });
3698
- }
3699
- }
3700
-
3701
- inline void AsyncWorker::SetError(const std::string& error) {
3702
- _error = error;
3703
- }
3704
-
3705
- inline std::vector<napi_value> AsyncWorker::GetResult(Napi::Env /*env*/) {
3706
- return {};
3707
- }
3708
- // The OnExecute method receives an napi_env argument. However, do NOT
3709
- // use it within this method, as it does not run on the main thread and must
3710
- // not run any method that would cause JavaScript to run. In practice, this
3711
- // means that almost any use of napi_env will be incorrect.
3712
- inline void AsyncWorker::OnExecute(napi_env /*DO_NOT_USE*/, void* this_pointer) {
3713
- AsyncWorker* self = static_cast<AsyncWorker*>(this_pointer);
3714
- #ifdef NAPI_CPP_EXCEPTIONS
3715
- try {
3716
- self->Execute();
3717
- } catch (const std::exception& e) {
3718
- self->SetError(e.what());
3719
- }
3720
- #else // NAPI_CPP_EXCEPTIONS
3721
- self->Execute();
3722
- #endif // NAPI_CPP_EXCEPTIONS
3723
- }
3724
-
3725
- inline void AsyncWorker::OnWorkComplete(
3726
- napi_env /*env*/, napi_status status, void* this_pointer) {
3727
- AsyncWorker* self = static_cast<AsyncWorker*>(this_pointer);
3728
- if (status != napi_cancelled) {
3729
- HandleScope scope(self->_env);
3730
- details::WrapCallback([&] {
3731
- if (self->_error.size() == 0) {
3732
- self->OnOK();
3733
- }
3734
- else {
3735
- self->OnError(Error::New(self->_env, self->_error));
3736
- }
3737
- return nullptr;
3738
- });
3739
- }
3740
- if (!self->_suppress_destruct) {
3741
- self->Destroy();
3742
- }
3743
- }
3744
-
3745
- #if (NAPI_VERSION > 3)
3746
- ////////////////////////////////////////////////////////////////////////////////
3747
- // ThreadSafeFunction class
3748
- ////////////////////////////////////////////////////////////////////////////////
3749
-
3750
- // static
3751
- template <typename ResourceString>
3752
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3753
- const Function& callback,
3754
- ResourceString resourceName,
3755
- size_t maxQueueSize,
3756
- size_t initialThreadCount) {
3757
- return New(env, callback, Object(), resourceName, maxQueueSize,
3758
- initialThreadCount);
3759
- }
3760
-
3761
- // static
3762
- template <typename ResourceString, typename ContextType>
3763
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3764
- const Function& callback,
3765
- ResourceString resourceName,
3766
- size_t maxQueueSize,
3767
- size_t initialThreadCount,
3768
- ContextType* context) {
3769
- return New(env, callback, Object(), resourceName, maxQueueSize,
3770
- initialThreadCount, context);
3771
- }
3772
-
3773
- // static
3774
- template <typename ResourceString, typename Finalizer>
3775
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3776
- const Function& callback,
3777
- ResourceString resourceName,
3778
- size_t maxQueueSize,
3779
- size_t initialThreadCount,
3780
- Finalizer finalizeCallback) {
3781
- return New(env, callback, Object(), resourceName, maxQueueSize,
3782
- initialThreadCount, finalizeCallback);
3783
- }
3784
-
3785
- // static
3786
- template <typename ResourceString, typename Finalizer,
3787
- typename FinalizerDataType>
3788
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3789
- const Function& callback,
3790
- ResourceString resourceName,
3791
- size_t maxQueueSize,
3792
- size_t initialThreadCount,
3793
- Finalizer finalizeCallback,
3794
- FinalizerDataType* data) {
3795
- return New(env, callback, Object(), resourceName, maxQueueSize,
3796
- initialThreadCount, finalizeCallback, data);
3797
- }
3798
-
3799
- // static
3800
- template <typename ResourceString, typename ContextType, typename Finalizer>
3801
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3802
- const Function& callback,
3803
- ResourceString resourceName,
3804
- size_t maxQueueSize,
3805
- size_t initialThreadCount,
3806
- ContextType* context,
3807
- Finalizer finalizeCallback) {
3808
- return New(env, callback, Object(), resourceName, maxQueueSize,
3809
- initialThreadCount, context, finalizeCallback);
3810
- }
3811
-
3812
- // static
3813
- template <typename ResourceString, typename ContextType,
3814
- typename Finalizer, typename FinalizerDataType>
3815
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3816
- const Function& callback,
3817
- ResourceString resourceName,
3818
- size_t maxQueueSize,
3819
- size_t initialThreadCount,
3820
- ContextType* context,
3821
- Finalizer finalizeCallback,
3822
- FinalizerDataType* data) {
3823
- return New(env, callback, Object(), resourceName, maxQueueSize,
3824
- initialThreadCount, context, finalizeCallback, data);
3825
- }
3826
-
3827
- // static
3828
- template <typename ResourceString>
3829
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3830
- const Function& callback,
3831
- const Object& resource,
3832
- ResourceString resourceName,
3833
- size_t maxQueueSize,
3834
- size_t initialThreadCount) {
3835
- return New(env, callback, resource, resourceName, maxQueueSize,
3836
- initialThreadCount, static_cast<void*>(nullptr) /* context */);
3837
- }
3838
-
3839
- // static
3840
- template <typename ResourceString, typename ContextType>
3841
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3842
- const Function& callback,
3843
- const Object& resource,
3844
- ResourceString resourceName,
3845
- size_t maxQueueSize,
3846
- size_t initialThreadCount,
3847
- ContextType* context) {
3848
- return New(env, callback, resource, resourceName, maxQueueSize,
3849
- initialThreadCount, context,
3850
- [](Env, ContextType*) {} /* empty finalizer */);
3851
- }
3852
-
3853
- // static
3854
- template <typename ResourceString, typename Finalizer>
3855
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3856
- const Function& callback,
3857
- const Object& resource,
3858
- ResourceString resourceName,
3859
- size_t maxQueueSize,
3860
- size_t initialThreadCount,
3861
- Finalizer finalizeCallback) {
3862
- return New(env, callback, resource, resourceName, maxQueueSize,
3863
- initialThreadCount, static_cast<void*>(nullptr) /* context */,
3864
- finalizeCallback, static_cast<void*>(nullptr) /* data */,
3865
- details::ThreadSafeFinalize<void, Finalizer>::Wrapper);
3866
- }
3867
-
3868
- // static
3869
- template <typename ResourceString, typename Finalizer,
3870
- typename FinalizerDataType>
3871
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3872
- const Function& callback,
3873
- const Object& resource,
3874
- ResourceString resourceName,
3875
- size_t maxQueueSize,
3876
- size_t initialThreadCount,
3877
- Finalizer finalizeCallback,
3878
- FinalizerDataType* data) {
3879
- return New(env, callback, resource, resourceName, maxQueueSize,
3880
- initialThreadCount, static_cast<void*>(nullptr) /* context */,
3881
- finalizeCallback, data,
3882
- details::ThreadSafeFinalize<
3883
- void, Finalizer, FinalizerDataType>::FinalizeWrapperWithData);
3884
- }
3885
-
3886
- // static
3887
- template <typename ResourceString, typename ContextType, typename Finalizer>
3888
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3889
- const Function& callback,
3890
- const Object& resource,
3891
- ResourceString resourceName,
3892
- size_t maxQueueSize,
3893
- size_t initialThreadCount,
3894
- ContextType* context,
3895
- Finalizer finalizeCallback) {
3896
- return New(env, callback, resource, resourceName, maxQueueSize,
3897
- initialThreadCount, context, finalizeCallback,
3898
- static_cast<void*>(nullptr) /* data */,
3899
- details::ThreadSafeFinalize<
3900
- ContextType, Finalizer>::FinalizeWrapperWithContext);
3901
- }
3902
-
3903
- // static
3904
- template <typename ResourceString, typename ContextType,
3905
- typename Finalizer, typename FinalizerDataType>
3906
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
3907
- const Function& callback,
3908
- const Object& resource,
3909
- ResourceString resourceName,
3910
- size_t maxQueueSize,
3911
- size_t initialThreadCount,
3912
- ContextType* context,
3913
- Finalizer finalizeCallback,
3914
- FinalizerDataType* data) {
3915
- return New(env, callback, resource, resourceName, maxQueueSize,
3916
- initialThreadCount, context, finalizeCallback, data,
3917
- details::ThreadSafeFinalize<ContextType, Finalizer,
3918
- FinalizerDataType>::FinalizeFinalizeWrapperWithDataAndContext);
3919
- }
3920
-
3921
- inline ThreadSafeFunction::ThreadSafeFunction()
3922
- : _tsfn(new napi_threadsafe_function(nullptr)) {
3923
- }
3924
-
3925
- inline ThreadSafeFunction::ThreadSafeFunction(
3926
- napi_threadsafe_function tsfn)
3927
- : _tsfn(new napi_threadsafe_function(tsfn)) {
3928
- }
3929
-
3930
- inline ThreadSafeFunction::ThreadSafeFunction(ThreadSafeFunction&& other)
3931
- : _tsfn(std::move(other._tsfn)) {
3932
- other._tsfn.reset();
3933
- }
3934
-
3935
- inline ThreadSafeFunction& ThreadSafeFunction::operator =(
3936
- ThreadSafeFunction&& other) {
3937
- if (*_tsfn != nullptr) {
3938
- Error::Fatal("ThreadSafeFunction::operator =",
3939
- "You cannot assign a new TSFN because existing one is still alive.");
3940
- return *this;
3941
- }
3942
- _tsfn = std::move(other._tsfn);
3943
- other._tsfn.reset();
3944
- return *this;
3945
- }
3946
-
3947
- inline napi_status ThreadSafeFunction::BlockingCall() const {
3948
- return CallInternal(nullptr, napi_tsfn_blocking);
3949
- }
3950
-
3951
- template <typename Callback>
3952
- inline napi_status ThreadSafeFunction::BlockingCall(
3953
- Callback callback) const {
3954
- return CallInternal(new CallbackWrapper(callback), napi_tsfn_blocking);
3955
- }
3956
-
3957
- template <typename DataType, typename Callback>
3958
- inline napi_status ThreadSafeFunction::BlockingCall(
3959
- DataType* data, Callback callback) const {
3960
- auto wrapper = [data, callback](Env env, Function jsCallback) {
3961
- callback(env, jsCallback, data);
3962
- };
3963
- return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_blocking);
3964
- }
3965
-
3966
- inline napi_status ThreadSafeFunction::NonBlockingCall() const {
3967
- return CallInternal(nullptr, napi_tsfn_nonblocking);
3968
- }
3969
-
3970
- template <typename Callback>
3971
- inline napi_status ThreadSafeFunction::NonBlockingCall(
3972
- Callback callback) const {
3973
- return CallInternal(new CallbackWrapper(callback), napi_tsfn_nonblocking);
3974
- }
3975
-
3976
- template <typename DataType, typename Callback>
3977
- inline napi_status ThreadSafeFunction::NonBlockingCall(
3978
- DataType* data, Callback callback) const {
3979
- auto wrapper = [data, callback](Env env, Function jsCallback) {
3980
- callback(env, jsCallback, data);
3981
- };
3982
- return CallInternal(new CallbackWrapper(wrapper), napi_tsfn_nonblocking);
3983
- }
3984
-
3985
- inline napi_status ThreadSafeFunction::Acquire() const {
3986
- return napi_acquire_threadsafe_function(*_tsfn);
3987
- }
3988
-
3989
- inline napi_status ThreadSafeFunction::Release() {
3990
- return napi_release_threadsafe_function(*_tsfn, napi_tsfn_release);
3991
- }
3992
-
3993
- inline napi_status ThreadSafeFunction::Abort() {
3994
- return napi_release_threadsafe_function(*_tsfn, napi_tsfn_abort);
3995
- }
3996
-
3997
- inline ThreadSafeFunction::ConvertibleContext
3998
- ThreadSafeFunction::GetContext() const {
3999
- void* context;
4000
- napi_get_threadsafe_function_context(*_tsfn, &context);
4001
- return ConvertibleContext({ context });
4002
- }
4003
-
4004
- // static
4005
- template <typename ResourceString, typename ContextType,
4006
- typename Finalizer, typename FinalizerDataType>
4007
- inline ThreadSafeFunction ThreadSafeFunction::New(napi_env env,
4008
- const Function& callback,
4009
- const Object& resource,
4010
- ResourceString resourceName,
4011
- size_t maxQueueSize,
4012
- size_t initialThreadCount,
4013
- ContextType* context,
4014
- Finalizer finalizeCallback,
4015
- FinalizerDataType* data,
4016
- napi_finalize wrapper) {
4017
- static_assert(details::can_make_string<ResourceString>::value
4018
- || std::is_convertible<ResourceString, napi_value>::value,
4019
- "Resource name should be convertible to the string type");
4020
-
4021
- ThreadSafeFunction tsfn;
4022
- auto* finalizeData = new details::ThreadSafeFinalize<ContextType, Finalizer,
4023
- FinalizerDataType>({ data, finalizeCallback, tsfn._tsfn.get() });
4024
- napi_status status = napi_create_threadsafe_function(env, callback, resource,
4025
- Value::From(env, resourceName), maxQueueSize, initialThreadCount,
4026
- finalizeData, wrapper, context, CallJS, tsfn._tsfn.get());
4027
- if (status != napi_ok) {
4028
- delete finalizeData;
4029
- NAPI_THROW_IF_FAILED(env, status, ThreadSafeFunction());
4030
- }
4031
-
4032
- return tsfn;
4033
- }
4034
-
4035
- inline napi_status ThreadSafeFunction::CallInternal(
4036
- CallbackWrapper* callbackWrapper,
4037
- napi_threadsafe_function_call_mode mode) const {
4038
- napi_status status = napi_call_threadsafe_function(
4039
- *_tsfn, callbackWrapper, mode);
4040
- if (status != napi_ok && callbackWrapper != nullptr) {
4041
- delete callbackWrapper;
4042
- }
4043
-
4044
- return status;
4045
- }
4046
-
4047
- // static
4048
- inline void ThreadSafeFunction::CallJS(napi_env env,
4049
- napi_value jsCallback,
4050
- void* /* context */,
4051
- void* data) {
4052
- if (env == nullptr && jsCallback == nullptr) {
4053
- return;
4054
- }
4055
-
4056
- if (data != nullptr) {
4057
- auto* callbackWrapper = static_cast<CallbackWrapper*>(data);
4058
- (*callbackWrapper)(env, Function(env, jsCallback));
4059
- delete callbackWrapper;
4060
- } else if (jsCallback != nullptr) {
4061
- Function(env, jsCallback).Call({});
4062
- }
4063
- }
4064
- #endif
4065
-
4066
- ////////////////////////////////////////////////////////////////////////////////
4067
- // Memory Management class
4068
- ////////////////////////////////////////////////////////////////////////////////
4069
-
4070
- inline int64_t MemoryManagement::AdjustExternalMemory(Env env, int64_t change_in_bytes) {
4071
- int64_t result;
4072
- napi_status status = napi_adjust_external_memory(env, change_in_bytes, &result);
4073
- NAPI_THROW_IF_FAILED(env, status, 0);
4074
- return result;
4075
- }
4076
-
4077
- ////////////////////////////////////////////////////////////////////////////////
4078
- // Version Management class
4079
- ////////////////////////////////////////////////////////////////////////////////
4080
-
4081
- inline uint32_t VersionManagement::GetNapiVersion(Env env) {
4082
- uint32_t result;
4083
- napi_status status = napi_get_version(env, &result);
4084
- NAPI_THROW_IF_FAILED(env, status, 0);
4085
- return result;
4086
- }
4087
-
4088
- inline const napi_node_version* VersionManagement::GetNodeVersion(Env env) {
4089
- const napi_node_version* result;
4090
- napi_status status = napi_get_node_version(env, &result);
4091
- NAPI_THROW_IF_FAILED(env, status, 0);
4092
- return result;
4093
- }
4094
-
4095
- } // namespace Napi
4096
-
4097
- #endif // SRC_NAPI_INL_H_