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,3655 +0,0 @@
1
- /******************************************************************************
2
- * Experimental prototype for demonstrating VM agnostic and ABI stable API
3
- * for native modules to use instead of using Nan and V8 APIs directly.
4
- *
5
- * The current status is "Experimental" and should not be used for
6
- * production applications. The API is still subject to change
7
- * and as an experimental feature is NOT subject to semver.
8
- *
9
- ******************************************************************************/
10
-
11
- #include <node_buffer.h>
12
- #include <node_object_wrap.h>
13
- #include <limits.h> // INT_MAX
14
- #include <string.h>
15
- #include <algorithm>
16
- #include <cmath>
17
- #include <vector>
18
- #include "node_api.h"
19
- #include "node_internals.h"
20
-
21
- #define NAPI_VERSION 1
22
-
23
- static
24
- napi_status napi_set_last_error(napi_env env, napi_status error_code,
25
- uint32_t engine_error_code = 0,
26
- void* engine_reserved = nullptr);
27
- static
28
- napi_status napi_clear_last_error(napi_env env);
29
-
30
- struct napi_env__ {
31
- explicit napi_env__(v8::Isolate* _isolate): isolate(_isolate),
32
- has_instance_available(true), last_error() {}
33
- ~napi_env__() {
34
- last_exception.Reset();
35
- has_instance.Reset();
36
- wrap_template.Reset();
37
- }
38
- v8::Isolate* isolate;
39
- v8::Persistent<v8::Value> last_exception;
40
- v8::Persistent<v8::Value> has_instance;
41
- v8::Persistent<v8::ObjectTemplate> wrap_template;
42
- bool has_instance_available;
43
- napi_extended_error_info last_error;
44
- int open_handle_scopes = 0;
45
- };
46
-
47
- #define ENV_OBJECT_TEMPLATE(env, prefix, destination, field_count) \
48
- do { \
49
- if ((env)->prefix ## _template.IsEmpty()) { \
50
- (destination) = v8::ObjectTemplate::New(isolate); \
51
- (destination)->SetInternalFieldCount((field_count)); \
52
- (env)->prefix ## _template.Reset(isolate, (destination)); \
53
- } else { \
54
- (destination) = v8::Local<v8::ObjectTemplate>::New( \
55
- isolate, env->prefix ## _template); \
56
- } \
57
- } while (0)
58
-
59
- #define RETURN_STATUS_IF_FALSE(env, condition, status) \
60
- do { \
61
- if (!(condition)) { \
62
- return napi_set_last_error((env), (status)); \
63
- } \
64
- } while (0)
65
-
66
- #define CHECK_ENV(env) \
67
- if ((env) == nullptr) { \
68
- return napi_invalid_arg; \
69
- }
70
-
71
- #define CHECK_ARG(env, arg) \
72
- RETURN_STATUS_IF_FALSE((env), ((arg) != nullptr), napi_invalid_arg)
73
-
74
- #define CHECK_MAYBE_EMPTY(env, maybe, status) \
75
- RETURN_STATUS_IF_FALSE((env), !((maybe).IsEmpty()), (status))
76
-
77
- #define CHECK_MAYBE_NOTHING(env, maybe, status) \
78
- RETURN_STATUS_IF_FALSE((env), !((maybe).IsNothing()), (status))
79
-
80
- // NAPI_PREAMBLE is not wrapped in do..while: try_catch must have function scope
81
- #define NAPI_PREAMBLE(env) \
82
- CHECK_ENV((env)); \
83
- RETURN_STATUS_IF_FALSE((env), (env)->last_exception.IsEmpty(), \
84
- napi_pending_exception); \
85
- napi_clear_last_error((env)); \
86
- v8impl::TryCatch try_catch((env))
87
-
88
- #define CHECK_TO_TYPE(env, type, context, result, src, status) \
89
- do { \
90
- CHECK_ARG((env), (src)); \
91
- auto maybe = v8impl::V8LocalValueFromJsValue((src))->To##type((context)); \
92
- CHECK_MAYBE_EMPTY((env), maybe, (status)); \
93
- (result) = maybe.ToLocalChecked(); \
94
- } while (0)
95
-
96
- #define CHECK_TO_FUNCTION(env, result, src) \
97
- do { \
98
- CHECK_ARG((env), (src)); \
99
- v8::Local<v8::Value> v8value = v8impl::V8LocalValueFromJsValue((src)); \
100
- RETURN_STATUS_IF_FALSE((env), v8value->IsFunction(), napi_invalid_arg); \
101
- (result) = v8value.As<v8::Function>(); \
102
- } while (0)
103
-
104
- #define CHECK_TO_OBJECT(env, context, result, src) \
105
- CHECK_TO_TYPE((env), Object, (context), (result), (src), napi_object_expected)
106
-
107
- #define CHECK_TO_STRING(env, context, result, src) \
108
- CHECK_TO_TYPE((env), String, (context), (result), (src), napi_string_expected)
109
-
110
- #define CHECK_TO_NUMBER(env, context, result, src) \
111
- CHECK_TO_TYPE((env), Number, (context), (result), (src), napi_number_expected)
112
-
113
- #define CHECK_TO_BOOL(env, context, result, src) \
114
- CHECK_TO_TYPE((env), Boolean, (context), (result), (src), \
115
- napi_boolean_expected)
116
-
117
- // n-api defines NAPI_AUTO_LENGHTH as the indicator that a string
118
- // is null terminated. For V8 the equivalent is -1. The assert
119
- // validates that our cast of NAPI_AUTO_LENGTH results in -1 as
120
- // needed by V8.
121
- #define CHECK_NEW_FROM_UTF8_LEN(env, result, str, len) \
122
- do { \
123
- static_assert(static_cast<int>(NAPI_AUTO_LENGTH) == -1, \
124
- "Casting NAPI_AUTO_LENGTH to int must result in -1"); \
125
- RETURN_STATUS_IF_FALSE((env), \
126
- (len == NAPI_AUTO_LENGTH) || len <= INT_MAX, \
127
- napi_invalid_arg); \
128
- auto str_maybe = v8::String::NewFromUtf8( \
129
- (env)->isolate, (str), v8::NewStringType::kInternalized, \
130
- static_cast<int>(len)); \
131
- CHECK_MAYBE_EMPTY((env), str_maybe, napi_generic_failure); \
132
- (result) = str_maybe.ToLocalChecked(); \
133
- } while (0)
134
-
135
- #define CHECK_NEW_FROM_UTF8(env, result, str) \
136
- CHECK_NEW_FROM_UTF8_LEN((env), (result), (str), NAPI_AUTO_LENGTH)
137
-
138
- #define GET_RETURN_STATUS(env) \
139
- (!try_catch.HasCaught() ? napi_ok \
140
- : napi_set_last_error((env), napi_pending_exception))
141
-
142
- #define THROW_RANGE_ERROR_IF_FALSE(env, condition, error, message) \
143
- do { \
144
- if (!(condition)) { \
145
- napi_throw_range_error((env), (error), (message)); \
146
- return napi_set_last_error((env), napi_generic_failure); \
147
- } \
148
- } while (0)
149
-
150
- #define CREATE_TYPED_ARRAY( \
151
- env, type, size_of_element, buffer, byte_offset, length, out) \
152
- do { \
153
- if ((size_of_element) > 1) { \
154
- THROW_RANGE_ERROR_IF_FALSE( \
155
- (env), (byte_offset) % (size_of_element) == 0, \
156
- "ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT", \
157
- "start offset of "#type" should be a multiple of "#size_of_element); \
158
- } \
159
- THROW_RANGE_ERROR_IF_FALSE((env), (length) * (size_of_element) + \
160
- (byte_offset) <= buffer->ByteLength(), \
161
- "ERR_NAPI_INVALID_TYPEDARRAY_LENGTH", \
162
- "Invalid typed array length"); \
163
- (out) = v8::type::New((buffer), (byte_offset), (length)); \
164
- } while (0)
165
-
166
- #define NAPI_CALL_INTO_MODULE(env, call, handle_exception) \
167
- do { \
168
- int open_handle_scopes = (env)->open_handle_scopes; \
169
- napi_clear_last_error((env)); \
170
- call; \
171
- CHECK_EQ((env)->open_handle_scopes, open_handle_scopes); \
172
- if (!(env)->last_exception.IsEmpty()) { \
173
- handle_exception( \
174
- v8::Local<v8::Value>::New((env)->isolate, (env)->last_exception)); \
175
- (env)->last_exception.Reset(); \
176
- } \
177
- } while (0)
178
-
179
- #define NAPI_CALL_INTO_MODULE_THROW(env, call) \
180
- NAPI_CALL_INTO_MODULE((env), call, (env)->isolate->ThrowException)
181
-
182
- namespace {
183
- namespace v8impl {
184
-
185
- // convert from n-api property attributes to v8::PropertyAttribute
186
- static inline v8::PropertyAttribute V8PropertyAttributesFromDescriptor(
187
- const napi_property_descriptor* descriptor) {
188
- unsigned int attribute_flags = v8::PropertyAttribute::None;
189
-
190
- if (descriptor->getter != nullptr || descriptor->setter != nullptr) {
191
- // The napi_writable attribute is ignored for accessor descriptors, but
192
- // V8 requires the ReadOnly attribute to match nonexistence of a setter.
193
- attribute_flags |= (descriptor->setter == nullptr ?
194
- v8::PropertyAttribute::ReadOnly : v8::PropertyAttribute::None);
195
- } else if ((descriptor->attributes & napi_writable) == 0) {
196
- attribute_flags |= v8::PropertyAttribute::ReadOnly;
197
- }
198
-
199
- if ((descriptor->attributes & napi_enumerable) == 0) {
200
- attribute_flags |= v8::PropertyAttribute::DontEnum;
201
- }
202
- if ((descriptor->attributes & napi_configurable) == 0) {
203
- attribute_flags |= v8::PropertyAttribute::DontDelete;
204
- }
205
-
206
- return static_cast<v8::PropertyAttribute>(attribute_flags);
207
- }
208
-
209
- class HandleScopeWrapper {
210
- public:
211
- explicit HandleScopeWrapper(v8::Isolate* isolate) : scope(isolate) {}
212
-
213
- private:
214
- v8::HandleScope scope;
215
- };
216
-
217
- // In node v0.10 version of v8, there is no EscapableHandleScope and the
218
- // node v0.10 port use HandleScope::Close(Local<T> v) to mimic the behavior
219
- // of a EscapableHandleScope::Escape(Local<T> v), but it is not the same
220
- // semantics. This is an example of where the api abstraction fail to work
221
- // across different versions.
222
- class EscapableHandleScopeWrapper {
223
- public:
224
- explicit EscapableHandleScopeWrapper(v8::Isolate* isolate)
225
- : scope(isolate), escape_called_(false) {}
226
- bool escape_called() const {
227
- return escape_called_;
228
- }
229
- template <typename T>
230
- v8::Local<T> Escape(v8::Local<T> handle) {
231
- escape_called_ = true;
232
- return scope.Escape(handle);
233
- }
234
-
235
- private:
236
- v8::EscapableHandleScope scope;
237
- bool escape_called_;
238
- };
239
-
240
- static
241
- napi_handle_scope JsHandleScopeFromV8HandleScope(HandleScopeWrapper* s) {
242
- return reinterpret_cast<napi_handle_scope>(s);
243
- }
244
-
245
- static
246
- HandleScopeWrapper* V8HandleScopeFromJsHandleScope(napi_handle_scope s) {
247
- return reinterpret_cast<HandleScopeWrapper*>(s);
248
- }
249
-
250
- static
251
- napi_escapable_handle_scope JsEscapableHandleScopeFromV8EscapableHandleScope(
252
- EscapableHandleScopeWrapper* s) {
253
- return reinterpret_cast<napi_escapable_handle_scope>(s);
254
- }
255
-
256
- static
257
- EscapableHandleScopeWrapper*
258
- V8EscapableHandleScopeFromJsEscapableHandleScope(
259
- napi_escapable_handle_scope s) {
260
- return reinterpret_cast<EscapableHandleScopeWrapper*>(s);
261
- }
262
-
263
- //=== Conversion between V8 Handles and napi_value ========================
264
-
265
- // This asserts v8::Local<> will always be implemented with a single
266
- // pointer field so that we can pass it around as a void*.
267
- static_assert(sizeof(v8::Local<v8::Value>) == sizeof(napi_value),
268
- "Cannot convert between v8::Local<v8::Value> and napi_value");
269
-
270
- static
271
- napi_deferred JsDeferredFromV8Persistent(v8::Persistent<v8::Value>* local) {
272
- return reinterpret_cast<napi_deferred>(local);
273
- }
274
-
275
- static
276
- v8::Persistent<v8::Value>* V8PersistentFromJsDeferred(napi_deferred local) {
277
- return reinterpret_cast<v8::Persistent<v8::Value>*>(local);
278
- }
279
-
280
- static
281
- napi_value JsValueFromV8LocalValue(v8::Local<v8::Value> local) {
282
- return reinterpret_cast<napi_value>(*local);
283
- }
284
-
285
- static
286
- v8::Local<v8::Value> V8LocalValueFromJsValue(napi_value v) {
287
- v8::Local<v8::Value> local;
288
- memcpy(&local, &v, sizeof(v));
289
- return local;
290
- }
291
-
292
- static inline void trigger_fatal_exception(
293
- napi_env env, v8::Local<v8::Value> local_err) {
294
- v8::TryCatch try_catch(env->isolate);
295
- env->isolate->ThrowException(local_err);
296
- node::FatalException(env->isolate, try_catch);
297
- }
298
-
299
- static inline napi_status V8NameFromPropertyDescriptor(napi_env env,
300
- const napi_property_descriptor* p,
301
- v8::Local<v8::Name>* result) {
302
- if (p->utf8name != nullptr) {
303
- CHECK_NEW_FROM_UTF8(env, *result, p->utf8name);
304
- } else {
305
- v8::Local<v8::Value> property_value =
306
- v8impl::V8LocalValueFromJsValue(p->name);
307
-
308
- RETURN_STATUS_IF_FALSE(env, property_value->IsName(), napi_name_expected);
309
- *result = property_value.As<v8::Name>();
310
- }
311
-
312
- return napi_ok;
313
- }
314
-
315
- // Adapter for napi_finalize callbacks.
316
- class Finalizer {
317
- protected:
318
- Finalizer(napi_env env,
319
- napi_finalize finalize_callback,
320
- void* finalize_data,
321
- void* finalize_hint)
322
- : _env(env),
323
- _finalize_callback(finalize_callback),
324
- _finalize_data(finalize_data),
325
- _finalize_hint(finalize_hint) {
326
- }
327
-
328
- ~Finalizer() {
329
- }
330
-
331
- public:
332
- static Finalizer* New(napi_env env,
333
- napi_finalize finalize_callback = nullptr,
334
- void* finalize_data = nullptr,
335
- void* finalize_hint = nullptr) {
336
- return new Finalizer(
337
- env, finalize_callback, finalize_data, finalize_hint);
338
- }
339
-
340
- static void Delete(Finalizer* finalizer) {
341
- delete finalizer;
342
- }
343
-
344
- // node::Buffer::FreeCallback
345
- static void FinalizeBufferCallback(char* data, void* hint) {
346
- Finalizer* finalizer = static_cast<Finalizer*>(hint);
347
- if (finalizer->_finalize_callback != nullptr) {
348
- NAPI_CALL_INTO_MODULE_THROW(finalizer->_env,
349
- finalizer->_finalize_callback(
350
- finalizer->_env,
351
- data,
352
- finalizer->_finalize_hint));
353
- }
354
-
355
- Delete(finalizer);
356
- }
357
-
358
- protected:
359
- napi_env _env;
360
- napi_finalize _finalize_callback;
361
- void* _finalize_data;
362
- void* _finalize_hint;
363
- };
364
-
365
- // Wrapper around v8::Persistent that implements reference counting.
366
- class Reference : private Finalizer {
367
- private:
368
- Reference(napi_env env,
369
- v8::Local<v8::Value> value,
370
- uint32_t initial_refcount,
371
- bool delete_self,
372
- napi_finalize finalize_callback,
373
- void* finalize_data,
374
- void* finalize_hint)
375
- : Finalizer(env, finalize_callback, finalize_data, finalize_hint),
376
- _persistent(env->isolate, value),
377
- _refcount(initial_refcount),
378
- _delete_self(delete_self) {
379
- if (initial_refcount == 0) {
380
- _persistent.SetWeak(
381
- this, FinalizeCallback, v8::WeakCallbackType::kParameter);
382
- _persistent.MarkIndependent();
383
- }
384
- }
385
-
386
- ~Reference() {
387
- // The V8 Persistent class currently does not reset in its destructor:
388
- // see NonCopyablePersistentTraits::kResetInDestructor = false.
389
- // (Comments there claim that might change in the future.)
390
- // To avoid memory leaks, it is better to reset at this time, however
391
- // care must be taken to avoid attempting this after the Isolate has
392
- // shut down, for example via a static (atexit) destructor.
393
- _persistent.Reset();
394
- }
395
-
396
- public:
397
- static Reference* New(napi_env env,
398
- v8::Local<v8::Value> value,
399
- uint32_t initial_refcount,
400
- bool delete_self,
401
- napi_finalize finalize_callback = nullptr,
402
- void* finalize_data = nullptr,
403
- void* finalize_hint = nullptr) {
404
- return new Reference(env,
405
- value,
406
- initial_refcount,
407
- delete_self,
408
- finalize_callback,
409
- finalize_data,
410
- finalize_hint);
411
- }
412
-
413
- static void Delete(Reference* reference) {
414
- delete reference;
415
- }
416
-
417
- uint32_t Ref() {
418
- if (++_refcount == 1) {
419
- _persistent.ClearWeak();
420
- }
421
-
422
- return _refcount;
423
- }
424
-
425
- uint32_t Unref() {
426
- if (_refcount == 0) {
427
- return 0;
428
- }
429
- if (--_refcount == 0) {
430
- _persistent.SetWeak(
431
- this, FinalizeCallback, v8::WeakCallbackType::kParameter);
432
- _persistent.MarkIndependent();
433
- }
434
-
435
- return _refcount;
436
- }
437
-
438
- uint32_t RefCount() {
439
- return _refcount;
440
- }
441
-
442
- v8::Local<v8::Value> Get() {
443
- if (_persistent.IsEmpty()) {
444
- return v8::Local<v8::Value>();
445
- } else {
446
- return v8::Local<v8::Value>::New(_env->isolate, _persistent);
447
- }
448
- }
449
-
450
- private:
451
- static void FinalizeCallback(const v8::WeakCallbackInfo<Reference>& data) {
452
- Reference* reference = data.GetParameter();
453
- reference->_persistent.Reset();
454
-
455
- // Check before calling the finalize callback, because the callback might
456
- // delete it.
457
- bool delete_self = reference->_delete_self;
458
- napi_env env = reference->_env;
459
-
460
- if (reference->_finalize_callback != nullptr) {
461
- NAPI_CALL_INTO_MODULE_THROW(env,
462
- reference->_finalize_callback(
463
- reference->_env,
464
- reference->_finalize_data,
465
- reference->_finalize_hint));
466
- }
467
-
468
- if (delete_self) {
469
- Delete(reference);
470
- }
471
- }
472
-
473
- v8::Persistent<v8::Value> _persistent;
474
- uint32_t _refcount;
475
- bool _delete_self;
476
- };
477
-
478
- class TryCatch : public v8::TryCatch {
479
- public:
480
- explicit TryCatch(napi_env env)
481
- : v8::TryCatch(env->isolate), _env(env) {}
482
-
483
- ~TryCatch() {
484
- if (HasCaught()) {
485
- _env->last_exception.Reset(_env->isolate, Exception());
486
- }
487
- }
488
-
489
- private:
490
- napi_env _env;
491
- };
492
-
493
- //=== Function napi_callback wrapper =================================
494
-
495
- // Use this data structure to associate callback data with each N-API function
496
- // exposed to JavaScript. The structure is stored in a v8::External which gets
497
- // passed into our callback wrapper. This reduces the performance impact of
498
- // calling through N-API.
499
- // Ref: benchmark/misc/function_call
500
- // Discussion (incl. perf. data): https://github.com/nodejs/node/pull/21072
501
- struct CallbackBundle {
502
- // Bind the lifecycle of `this` C++ object to a JavaScript object.
503
- // We never delete a CallbackBundle C++ object directly.
504
- void BindLifecycleTo(v8::Isolate* isolate, v8::Local<v8::Value> target) {
505
- handle.Reset(isolate, target);
506
- handle.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
507
- }
508
-
509
- napi_env env; // Necessary to invoke C++ NAPI callback
510
- void* cb_data; // The user provided callback data
511
- napi_callback function_or_getter;
512
- napi_callback setter;
513
- node::Persistent<v8::Value> handle; // Die with this JavaScript object
514
-
515
- private:
516
- static void WeakCallback(v8::WeakCallbackInfo<CallbackBundle> const& info) {
517
- // Use the "WeakCallback mechanism" to delete the C++ `bundle` object.
518
- // This will be called when the v8::External containing `this` pointer
519
- // is being GC-ed.
520
- CallbackBundle* bundle = info.GetParameter();
521
- if (bundle != nullptr) {
522
- delete bundle;
523
- }
524
- }
525
- };
526
-
527
- // Base class extended by classes that wrap V8 function and property callback
528
- // info.
529
- class CallbackWrapper {
530
- public:
531
- CallbackWrapper(napi_value this_arg, size_t args_length, void* data)
532
- : _this(this_arg), _args_length(args_length), _data(data) {}
533
-
534
- virtual napi_value GetNewTarget() = 0;
535
- virtual void Args(napi_value* buffer, size_t bufferlength) = 0;
536
- virtual void SetReturnValue(napi_value value) = 0;
537
-
538
- napi_value This() { return _this; }
539
-
540
- size_t ArgsLength() { return _args_length; }
541
-
542
- void* Data() { return _data; }
543
-
544
- protected:
545
- const napi_value _this;
546
- const size_t _args_length;
547
- void* _data;
548
- };
549
-
550
- template <typename Info, napi_callback CallbackBundle::*FunctionField>
551
- class CallbackWrapperBase : public CallbackWrapper {
552
- public:
553
- CallbackWrapperBase(const Info& cbinfo, const size_t args_length)
554
- : CallbackWrapper(JsValueFromV8LocalValue(cbinfo.This()),
555
- args_length,
556
- nullptr),
557
- _cbinfo(cbinfo) {
558
- _bundle = reinterpret_cast<CallbackBundle*>(
559
- v8::Local<v8::External>::Cast(cbinfo.Data())->Value());
560
- _data = _bundle->cb_data;
561
- }
562
-
563
- napi_value GetNewTarget() override { return nullptr; }
564
-
565
- protected:
566
- void InvokeCallback() {
567
- napi_callback_info cbinfo_wrapper = reinterpret_cast<napi_callback_info>(
568
- static_cast<CallbackWrapper*>(this));
569
-
570
- // All other pointers we need are stored in `_bundle`
571
- napi_env env = _bundle->env;
572
- napi_callback cb = _bundle->*FunctionField;
573
-
574
- napi_value result;
575
- NAPI_CALL_INTO_MODULE_THROW(env, result = cb(env, cbinfo_wrapper));
576
-
577
- if (result != nullptr) {
578
- this->SetReturnValue(result);
579
- }
580
- }
581
-
582
- const Info& _cbinfo;
583
- CallbackBundle* _bundle;
584
- };
585
-
586
- class FunctionCallbackWrapper
587
- : public CallbackWrapperBase<v8::FunctionCallbackInfo<v8::Value>,
588
- &CallbackBundle::function_or_getter> {
589
- public:
590
- static void Invoke(const v8::FunctionCallbackInfo<v8::Value>& info) {
591
- FunctionCallbackWrapper cbwrapper(info);
592
- cbwrapper.InvokeCallback();
593
- }
594
-
595
- explicit FunctionCallbackWrapper(
596
- const v8::FunctionCallbackInfo<v8::Value>& cbinfo)
597
- : CallbackWrapperBase(cbinfo, cbinfo.Length()) {}
598
-
599
- napi_value GetNewTarget() override {
600
- if (_cbinfo.IsConstructCall()) {
601
- return v8impl::JsValueFromV8LocalValue(_cbinfo.NewTarget());
602
- } else {
603
- return nullptr;
604
- }
605
- }
606
-
607
- /*virtual*/
608
- void Args(napi_value* buffer, size_t buffer_length) override {
609
- size_t i = 0;
610
- size_t min = std::min(buffer_length, _args_length);
611
-
612
- for (; i < min; i += 1) {
613
- buffer[i] = v8impl::JsValueFromV8LocalValue(_cbinfo[i]);
614
- }
615
-
616
- if (i < buffer_length) {
617
- napi_value undefined =
618
- v8impl::JsValueFromV8LocalValue(v8::Undefined(_cbinfo.GetIsolate()));
619
- for (; i < buffer_length; i += 1) {
620
- buffer[i] = undefined;
621
- }
622
- }
623
- }
624
-
625
- /*virtual*/
626
- void SetReturnValue(napi_value value) override {
627
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
628
- _cbinfo.GetReturnValue().Set(val);
629
- }
630
- };
631
-
632
- class GetterCallbackWrapper
633
- : public CallbackWrapperBase<v8::PropertyCallbackInfo<v8::Value>,
634
- &CallbackBundle::function_or_getter> {
635
- public:
636
- static void Invoke(v8::Local<v8::Name> property,
637
- const v8::PropertyCallbackInfo<v8::Value>& info) {
638
- GetterCallbackWrapper cbwrapper(info);
639
- cbwrapper.InvokeCallback();
640
- }
641
-
642
- explicit GetterCallbackWrapper(
643
- const v8::PropertyCallbackInfo<v8::Value>& cbinfo)
644
- : CallbackWrapperBase(cbinfo, 0) {}
645
-
646
- /*virtual*/
647
- void Args(napi_value* buffer, size_t buffer_length) override {
648
- if (buffer_length > 0) {
649
- napi_value undefined =
650
- v8impl::JsValueFromV8LocalValue(v8::Undefined(_cbinfo.GetIsolate()));
651
- for (size_t i = 0; i < buffer_length; i += 1) {
652
- buffer[i] = undefined;
653
- }
654
- }
655
- }
656
-
657
- /*virtual*/
658
- void SetReturnValue(napi_value value) override {
659
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
660
- _cbinfo.GetReturnValue().Set(val);
661
- }
662
- };
663
-
664
- class SetterCallbackWrapper
665
- : public CallbackWrapperBase<v8::PropertyCallbackInfo<void>,
666
- &CallbackBundle::setter> {
667
- public:
668
- static void Invoke(v8::Local<v8::Name> property,
669
- v8::Local<v8::Value> value,
670
- const v8::PropertyCallbackInfo<void>& info) {
671
- SetterCallbackWrapper cbwrapper(info, value);
672
- cbwrapper.InvokeCallback();
673
- }
674
-
675
- SetterCallbackWrapper(const v8::PropertyCallbackInfo<void>& cbinfo,
676
- const v8::Local<v8::Value>& value)
677
- : CallbackWrapperBase(cbinfo, 1), _value(value) {}
678
-
679
- /*virtual*/
680
- void Args(napi_value* buffer, size_t buffer_length) override {
681
- if (buffer_length > 0) {
682
- buffer[0] = v8impl::JsValueFromV8LocalValue(_value);
683
-
684
- if (buffer_length > 1) {
685
- napi_value undefined = v8impl::JsValueFromV8LocalValue(
686
- v8::Undefined(_cbinfo.GetIsolate()));
687
- for (size_t i = 1; i < buffer_length; i += 1) {
688
- buffer[i] = undefined;
689
- }
690
- }
691
- }
692
- }
693
-
694
- /*virtual*/
695
- void SetReturnValue(napi_value value) override {
696
- // Ignore any value returned from a setter callback.
697
- }
698
-
699
- private:
700
- const v8::Local<v8::Value>& _value;
701
- };
702
-
703
- // Creates an object to be made available to the static function callback
704
- // wrapper, used to retrieve the native callback function and data pointer.
705
- static
706
- v8::Local<v8::Value> CreateFunctionCallbackData(napi_env env,
707
- napi_callback cb,
708
- void* data) {
709
- CallbackBundle* bundle = new CallbackBundle();
710
- bundle->function_or_getter = cb;
711
- bundle->cb_data = data;
712
- bundle->env = env;
713
- v8::Local<v8::Value> cbdata = v8::External::New(env->isolate, bundle);
714
- bundle->BindLifecycleTo(env->isolate, cbdata);
715
-
716
- return cbdata;
717
- }
718
-
719
- // Creates an object to be made available to the static getter/setter
720
- // callback wrapper, used to retrieve the native getter/setter callback
721
- // function and data pointer.
722
- static
723
- v8::Local<v8::Value> CreateAccessorCallbackData(napi_env env,
724
- napi_callback getter,
725
- napi_callback setter,
726
- void* data) {
727
- CallbackBundle* bundle = new CallbackBundle();
728
- bundle->function_or_getter = getter;
729
- bundle->setter = setter;
730
- bundle->cb_data = data;
731
- bundle->env = env;
732
- v8::Local<v8::Value> cbdata = v8::External::New(env->isolate, bundle);
733
- bundle->BindLifecycleTo(env->isolate, cbdata);
734
-
735
- return cbdata;
736
- }
737
-
738
- int kWrapperFields = 3;
739
-
740
- // Pointer used to identify items wrapped by N-API. Used by FindWrapper and
741
- // napi_wrap().
742
- const char napi_wrap_name[] = "N-API Wrapper";
743
-
744
- // Search the object's prototype chain for the wrapper object. Usually the
745
- // wrapper would be the first in the chain, but it is OK for other objects to
746
- // be inserted in the prototype chain.
747
- static
748
- bool FindWrapper(v8::Local<v8::Object> obj,
749
- v8::Local<v8::Object>* result = nullptr,
750
- v8::Local<v8::Object>* parent = nullptr) {
751
- v8::Local<v8::Object> wrapper = obj;
752
-
753
- do {
754
- v8::Local<v8::Value> proto = wrapper->GetPrototype();
755
- if (proto.IsEmpty() || !proto->IsObject()) {
756
- return false;
757
- }
758
- if (parent != nullptr) {
759
- *parent = wrapper;
760
- }
761
- wrapper = proto.As<v8::Object>();
762
- if (wrapper->InternalFieldCount() == kWrapperFields) {
763
- v8::Local<v8::Value> external = wrapper->GetInternalField(1);
764
- if (external->IsExternal() &&
765
- external.As<v8::External>()->Value() == v8impl::napi_wrap_name) {
766
- break;
767
- }
768
- }
769
- } while (true);
770
-
771
- if (result != nullptr) {
772
- *result = wrapper;
773
- }
774
- return true;
775
- }
776
-
777
- static void DeleteEnv(napi_env env, void* data, void* hint) {
778
- delete env;
779
- }
780
-
781
- static
782
- napi_env GetEnv(v8::Local<v8::Context> context) {
783
- napi_env result;
784
-
785
- auto isolate = context->GetIsolate();
786
- auto global = context->Global();
787
-
788
- // In the case of the string for which we grab the private and the value of
789
- // the private on the global object we can call .ToLocalChecked() directly
790
- // because we need to stop hard if either of them is empty.
791
- //
792
- // Re https://github.com/nodejs/node/pull/14217#discussion_r128775149
793
- auto key = v8::Private::ForApi(isolate,
794
- v8::String::NewFromOneByte(isolate,
795
- reinterpret_cast<const uint8_t*>("N-API Environment"),
796
- v8::NewStringType::kInternalized).ToLocalChecked());
797
- auto value = global->GetPrivate(context, key).ToLocalChecked();
798
-
799
- if (value->IsExternal()) {
800
- result = static_cast<napi_env>(value.As<v8::External>()->Value());
801
- } else {
802
- result = new napi_env__(isolate);
803
- auto external = v8::External::New(isolate, result);
804
-
805
- // We must also stop hard if the result of assigning the env to the global
806
- // is either nothing or false.
807
- CHECK(global->SetPrivate(context, key, external).FromJust());
808
-
809
- // Create a self-destructing reference to external that will get rid of the
810
- // napi_env when external goes out of scope.
811
- Reference::New(result, external, 0, true, DeleteEnv, nullptr, nullptr);
812
- }
813
-
814
- return result;
815
- }
816
-
817
- static
818
- napi_status Unwrap(napi_env env,
819
- napi_value js_object,
820
- void** result,
821
- v8::Local<v8::Object>* wrapper,
822
- v8::Local<v8::Object>* parent = nullptr) {
823
- CHECK_ARG(env, js_object);
824
- CHECK_ARG(env, result);
825
-
826
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(js_object);
827
- RETURN_STATUS_IF_FALSE(env, value->IsObject(), napi_invalid_arg);
828
- v8::Local<v8::Object> obj = value.As<v8::Object>();
829
-
830
- RETURN_STATUS_IF_FALSE(
831
- env, v8impl::FindWrapper(obj, wrapper, parent), napi_invalid_arg);
832
-
833
- v8::Local<v8::Value> unwrappedValue = (*wrapper)->GetInternalField(0);
834
- RETURN_STATUS_IF_FALSE(env, unwrappedValue->IsExternal(), napi_invalid_arg);
835
-
836
- *result = unwrappedValue.As<v8::External>()->Value();
837
-
838
- return napi_ok;
839
- }
840
-
841
- static
842
- napi_status ConcludeDeferred(napi_env env,
843
- napi_deferred deferred,
844
- napi_value result,
845
- bool is_resolved) {
846
- NAPI_PREAMBLE(env);
847
- CHECK_ARG(env, result);
848
-
849
- v8::Local<v8::Context> context = env->isolate->GetCurrentContext();
850
- v8::Persistent<v8::Value>* deferred_ref =
851
- V8PersistentFromJsDeferred(deferred);
852
- v8::Local<v8::Value> v8_deferred =
853
- v8::Local<v8::Value>::New(env->isolate, *deferred_ref);
854
-
855
- auto v8_resolver = v8::Local<v8::Promise::Resolver>::Cast(v8_deferred);
856
-
857
- v8::Maybe<bool> success = is_resolved ?
858
- v8_resolver->Resolve(context, v8impl::V8LocalValueFromJsValue(result)) :
859
- v8_resolver->Reject(context, v8impl::V8LocalValueFromJsValue(result));
860
-
861
- deferred_ref->Reset();
862
- delete deferred_ref;
863
-
864
- RETURN_STATUS_IF_FALSE(env, success.FromMaybe(false), napi_generic_failure);
865
-
866
- return GET_RETURN_STATUS(env);
867
- }
868
-
869
- } // end of namespace v8impl
870
-
871
- // Intercepts the Node-V8 module registration callback. Converts parameters
872
- // to NAPI equivalents and then calls the registration callback specified
873
- // by the NAPI module.
874
- void napi_module_register_cb(v8::Local<v8::Object> exports,
875
- v8::Local<v8::Value> module,
876
- v8::Local<v8::Context> context,
877
- void* priv) {
878
- napi_module* mod = static_cast<napi_module*>(priv);
879
-
880
- // Create a new napi_env for this module or reference one if a pre-existing
881
- // one is found.
882
- napi_env env = v8impl::GetEnv(context);
883
-
884
- napi_value _exports;
885
- NAPI_CALL_INTO_MODULE_THROW(env,
886
- _exports = mod->nm_register_func(env,
887
- v8impl::JsValueFromV8LocalValue(exports)));
888
-
889
- // If register function returned a non-null exports object different from
890
- // the exports object we passed it, set that as the "exports" property of
891
- // the module.
892
- if (_exports != nullptr &&
893
- _exports != v8impl::JsValueFromV8LocalValue(exports)) {
894
- napi_value _module = v8impl::JsValueFromV8LocalValue(module);
895
- napi_set_named_property(env, _module, "exports", _exports);
896
- }
897
- }
898
-
899
- } // end of anonymous namespace
900
-
901
- // Registers a NAPI module.
902
- void napi_module_register(napi_module* mod) {
903
- node::node_module* nm = new node::node_module {
904
- NODE_MODULE_VERSION,
905
- mod->nm_flags,
906
- nullptr,
907
- mod->nm_filename,
908
- nullptr,
909
- napi_module_register_cb,
910
- mod->nm_modname,
911
- mod, // priv
912
- nullptr,
913
- };
914
- node::node_module_register(nm);
915
- }
916
-
917
- // Warning: Keep in-sync with napi_status enum
918
- static
919
- const char* error_messages[] = {nullptr,
920
- "Invalid argument",
921
- "An object was expected",
922
- "A string was expected",
923
- "A string or symbol was expected",
924
- "A function was expected",
925
- "A number was expected",
926
- "A boolean was expected",
927
- "An array was expected",
928
- "Unknown failure",
929
- "An exception is pending",
930
- "The async work item was cancelled",
931
- "napi_escape_handle already called on scope"};
932
-
933
- static inline napi_status napi_clear_last_error(napi_env env) {
934
- env->last_error.error_code = napi_ok;
935
-
936
- // TODO(boingoing): Should this be a callback?
937
- env->last_error.engine_error_code = 0;
938
- env->last_error.engine_reserved = nullptr;
939
- return napi_ok;
940
- }
941
-
942
- static inline
943
- napi_status napi_set_last_error(napi_env env, napi_status error_code,
944
- uint32_t engine_error_code,
945
- void* engine_reserved) {
946
- env->last_error.error_code = error_code;
947
- env->last_error.engine_error_code = engine_error_code;
948
- env->last_error.engine_reserved = engine_reserved;
949
- return error_code;
950
- }
951
-
952
- napi_status napi_get_last_error_info(napi_env env,
953
- const napi_extended_error_info** result) {
954
- CHECK_ENV(env);
955
- CHECK_ARG(env, result);
956
-
957
- // you must update this assert to reference the last message
958
- // in the napi_status enum each time a new error message is added.
959
- // We don't have a napi_status_last as this would result in an ABI
960
- // change each time a message was added.
961
- static_assert(
962
- node::arraysize(error_messages) == napi_escape_called_twice + 1,
963
- "Count of error messages must match count of error values");
964
- CHECK_LE(env->last_error.error_code, napi_escape_called_twice);
965
-
966
- // Wait until someone requests the last error information to fetch the error
967
- // message string
968
- env->last_error.error_message =
969
- error_messages[env->last_error.error_code];
970
-
971
- *result = &(env->last_error);
972
- return napi_ok;
973
- }
974
-
975
- napi_status napi_fatal_exception(napi_env env, napi_value err) {
976
- NAPI_PREAMBLE(env);
977
- CHECK_ARG(env, err);
978
-
979
- v8::Local<v8::Value> local_err = v8impl::V8LocalValueFromJsValue(err);
980
- v8impl::trigger_fatal_exception(env, local_err);
981
-
982
- return napi_clear_last_error(env);
983
- }
984
-
985
- NAPI_NO_RETURN void napi_fatal_error(const char* location,
986
- size_t location_len,
987
- const char* message,
988
- size_t message_len) {
989
- std::string location_string;
990
- std::string message_string;
991
-
992
- if (location_len != NAPI_AUTO_LENGTH) {
993
- location_string.assign(
994
- const_cast<char*>(location), location_len);
995
- } else {
996
- location_string.assign(
997
- const_cast<char*>(location), strlen(location));
998
- }
999
-
1000
- if (message_len != NAPI_AUTO_LENGTH) {
1001
- message_string.assign(
1002
- const_cast<char*>(message), message_len);
1003
- } else {
1004
- message_string.assign(
1005
- const_cast<char*>(message), strlen(message));
1006
- }
1007
-
1008
- node::FatalError(location_string.c_str(), message_string.c_str());
1009
- }
1010
-
1011
- napi_status napi_create_function(napi_env env,
1012
- const char* utf8name,
1013
- size_t length,
1014
- napi_callback cb,
1015
- void* callback_data,
1016
- napi_value* result) {
1017
- NAPI_PREAMBLE(env);
1018
- CHECK_ARG(env, result);
1019
- CHECK_ARG(env, cb);
1020
-
1021
- v8::Isolate* isolate = env->isolate;
1022
- v8::Local<v8::Function> return_value;
1023
- v8::EscapableHandleScope scope(isolate);
1024
- v8::Local<v8::Value> cbdata =
1025
- v8impl::CreateFunctionCallbackData(env, cb, callback_data);
1026
-
1027
- RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure);
1028
-
1029
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1030
- v8::MaybeLocal<v8::Function> maybe_function =
1031
- v8::Function::New(context,
1032
- v8impl::FunctionCallbackWrapper::Invoke,
1033
- cbdata);
1034
- CHECK_MAYBE_EMPTY(env, maybe_function, napi_generic_failure);
1035
-
1036
- return_value = scope.Escape(maybe_function.ToLocalChecked());
1037
-
1038
- if (utf8name != nullptr) {
1039
- v8::Local<v8::String> name_string;
1040
- CHECK_NEW_FROM_UTF8_LEN(env, name_string, utf8name, length);
1041
- return_value->SetName(name_string);
1042
- }
1043
-
1044
- *result = v8impl::JsValueFromV8LocalValue(return_value);
1045
-
1046
- return GET_RETURN_STATUS(env);
1047
- }
1048
-
1049
- napi_status napi_define_class(napi_env env,
1050
- const char* utf8name,
1051
- size_t length,
1052
- napi_callback constructor,
1053
- void* callback_data,
1054
- size_t property_count,
1055
- const napi_property_descriptor* properties,
1056
- napi_value* result) {
1057
- NAPI_PREAMBLE(env);
1058
- CHECK_ARG(env, result);
1059
- CHECK_ARG(env, constructor);
1060
-
1061
- v8::Isolate* isolate = env->isolate;
1062
-
1063
- v8::EscapableHandleScope scope(isolate);
1064
- v8::Local<v8::Value> cbdata =
1065
- v8impl::CreateFunctionCallbackData(env, constructor, callback_data);
1066
-
1067
- RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure);
1068
-
1069
- v8::Local<v8::FunctionTemplate> tpl = v8::FunctionTemplate::New(
1070
- isolate, v8impl::FunctionCallbackWrapper::Invoke, cbdata);
1071
-
1072
- v8::Local<v8::String> name_string;
1073
- CHECK_NEW_FROM_UTF8_LEN(env, name_string, utf8name, length);
1074
- tpl->SetClassName(name_string);
1075
-
1076
- size_t static_property_count = 0;
1077
- for (size_t i = 0; i < property_count; i++) {
1078
- const napi_property_descriptor* p = properties + i;
1079
-
1080
- if ((p->attributes & napi_static) != 0) {
1081
- // Static properties are handled separately below.
1082
- static_property_count++;
1083
- continue;
1084
- }
1085
-
1086
- v8::Local<v8::Name> property_name;
1087
- napi_status status =
1088
- v8impl::V8NameFromPropertyDescriptor(env, p, &property_name);
1089
-
1090
- if (status != napi_ok) {
1091
- return napi_set_last_error(env, status);
1092
- }
1093
-
1094
- v8::PropertyAttribute attributes =
1095
- v8impl::V8PropertyAttributesFromDescriptor(p);
1096
-
1097
- // This code is similar to that in napi_define_properties(); the
1098
- // difference is it applies to a template instead of an object.
1099
- if (p->getter != nullptr || p->setter != nullptr) {
1100
- v8::Local<v8::Value> cbdata = v8impl::CreateAccessorCallbackData(
1101
- env, p->getter, p->setter, p->data);
1102
-
1103
- tpl->PrototypeTemplate()->SetAccessor(
1104
- property_name,
1105
- p->getter ? v8impl::GetterCallbackWrapper::Invoke : nullptr,
1106
- p->setter ? v8impl::SetterCallbackWrapper::Invoke : nullptr,
1107
- cbdata,
1108
- v8::AccessControl::DEFAULT,
1109
- attributes);
1110
- } else if (p->method != nullptr) {
1111
- v8::Local<v8::Value> cbdata =
1112
- v8impl::CreateFunctionCallbackData(env, p->method, p->data);
1113
-
1114
- RETURN_STATUS_IF_FALSE(env, !cbdata.IsEmpty(), napi_generic_failure);
1115
-
1116
- v8::Local<v8::FunctionTemplate> t =
1117
- v8::FunctionTemplate::New(isolate,
1118
- v8impl::FunctionCallbackWrapper::Invoke,
1119
- cbdata,
1120
- v8::Signature::New(isolate, tpl));
1121
-
1122
- tpl->PrototypeTemplate()->Set(property_name, t, attributes);
1123
- } else {
1124
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(p->value);
1125
- tpl->PrototypeTemplate()->Set(property_name, value, attributes);
1126
- }
1127
- }
1128
-
1129
- *result = v8impl::JsValueFromV8LocalValue(scope.Escape(tpl->GetFunction()));
1130
-
1131
- if (static_property_count > 0) {
1132
- std::vector<napi_property_descriptor> static_descriptors;
1133
- static_descriptors.reserve(static_property_count);
1134
-
1135
- for (size_t i = 0; i < property_count; i++) {
1136
- const napi_property_descriptor* p = properties + i;
1137
- if ((p->attributes & napi_static) != 0) {
1138
- static_descriptors.push_back(*p);
1139
- }
1140
- }
1141
-
1142
- napi_status status =
1143
- napi_define_properties(env,
1144
- *result,
1145
- static_descriptors.size(),
1146
- static_descriptors.data());
1147
- if (status != napi_ok) return status;
1148
- }
1149
-
1150
- return GET_RETURN_STATUS(env);
1151
- }
1152
-
1153
- napi_status napi_get_property_names(napi_env env,
1154
- napi_value object,
1155
- napi_value* result) {
1156
- NAPI_PREAMBLE(env);
1157
- CHECK_ARG(env, result);
1158
-
1159
- v8::Isolate* isolate = env->isolate;
1160
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1161
- v8::Local<v8::Object> obj;
1162
- CHECK_TO_OBJECT(env, context, obj, object);
1163
-
1164
- auto maybe_propertynames = obj->GetPropertyNames(context);
1165
-
1166
- CHECK_MAYBE_EMPTY(env, maybe_propertynames, napi_generic_failure);
1167
-
1168
- *result = v8impl::JsValueFromV8LocalValue(
1169
- maybe_propertynames.ToLocalChecked());
1170
- return GET_RETURN_STATUS(env);
1171
- }
1172
-
1173
- napi_status napi_set_property(napi_env env,
1174
- napi_value object,
1175
- napi_value key,
1176
- napi_value value) {
1177
- NAPI_PREAMBLE(env);
1178
- CHECK_ARG(env, key);
1179
- CHECK_ARG(env, value);
1180
-
1181
- v8::Isolate* isolate = env->isolate;
1182
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1183
- v8::Local<v8::Object> obj;
1184
-
1185
- CHECK_TO_OBJECT(env, context, obj, object);
1186
-
1187
- v8::Local<v8::Value> k = v8impl::V8LocalValueFromJsValue(key);
1188
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
1189
-
1190
- v8::Maybe<bool> set_maybe = obj->Set(context, k, val);
1191
-
1192
- RETURN_STATUS_IF_FALSE(env, set_maybe.FromMaybe(false), napi_generic_failure);
1193
- return GET_RETURN_STATUS(env);
1194
- }
1195
-
1196
- napi_status napi_has_property(napi_env env,
1197
- napi_value object,
1198
- napi_value key,
1199
- bool* result) {
1200
- NAPI_PREAMBLE(env);
1201
- CHECK_ARG(env, result);
1202
- CHECK_ARG(env, key);
1203
-
1204
- v8::Isolate* isolate = env->isolate;
1205
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1206
- v8::Local<v8::Object> obj;
1207
-
1208
- CHECK_TO_OBJECT(env, context, obj, object);
1209
-
1210
- v8::Local<v8::Value> k = v8impl::V8LocalValueFromJsValue(key);
1211
- v8::Maybe<bool> has_maybe = obj->Has(context, k);
1212
-
1213
- CHECK_MAYBE_NOTHING(env, has_maybe, napi_generic_failure);
1214
-
1215
- *result = has_maybe.FromMaybe(false);
1216
- return GET_RETURN_STATUS(env);
1217
- }
1218
-
1219
- napi_status napi_get_property(napi_env env,
1220
- napi_value object,
1221
- napi_value key,
1222
- napi_value* result) {
1223
- NAPI_PREAMBLE(env);
1224
- CHECK_ARG(env, key);
1225
- CHECK_ARG(env, result);
1226
-
1227
- v8::Isolate* isolate = env->isolate;
1228
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1229
- v8::Local<v8::Value> k = v8impl::V8LocalValueFromJsValue(key);
1230
- v8::Local<v8::Object> obj;
1231
-
1232
- CHECK_TO_OBJECT(env, context, obj, object);
1233
-
1234
- auto get_maybe = obj->Get(context, k);
1235
-
1236
- CHECK_MAYBE_EMPTY(env, get_maybe, napi_generic_failure);
1237
-
1238
- v8::Local<v8::Value> val = get_maybe.ToLocalChecked();
1239
- *result = v8impl::JsValueFromV8LocalValue(val);
1240
- return GET_RETURN_STATUS(env);
1241
- }
1242
-
1243
- napi_status napi_delete_property(napi_env env,
1244
- napi_value object,
1245
- napi_value key,
1246
- bool* result) {
1247
- NAPI_PREAMBLE(env);
1248
- CHECK_ARG(env, key);
1249
-
1250
- v8::Isolate* isolate = env->isolate;
1251
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1252
- v8::Local<v8::Value> k = v8impl::V8LocalValueFromJsValue(key);
1253
- v8::Local<v8::Object> obj;
1254
-
1255
- CHECK_TO_OBJECT(env, context, obj, object);
1256
- v8::Maybe<bool> delete_maybe = obj->Delete(context, k);
1257
- CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
1258
-
1259
- if (result != NULL)
1260
- *result = delete_maybe.FromMaybe(false);
1261
-
1262
- return GET_RETURN_STATUS(env);
1263
- }
1264
-
1265
- napi_status napi_has_own_property(napi_env env,
1266
- napi_value object,
1267
- napi_value key,
1268
- bool* result) {
1269
- NAPI_PREAMBLE(env);
1270
- CHECK_ARG(env, key);
1271
-
1272
- v8::Isolate* isolate = env->isolate;
1273
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1274
- v8::Local<v8::Object> obj;
1275
-
1276
- CHECK_TO_OBJECT(env, context, obj, object);
1277
- v8::Local<v8::Value> k = v8impl::V8LocalValueFromJsValue(key);
1278
- RETURN_STATUS_IF_FALSE(env, k->IsName(), napi_name_expected);
1279
- v8::Maybe<bool> has_maybe = obj->HasOwnProperty(context, k.As<v8::Name>());
1280
- CHECK_MAYBE_NOTHING(env, has_maybe, napi_generic_failure);
1281
- *result = has_maybe.FromMaybe(false);
1282
-
1283
- return GET_RETURN_STATUS(env);
1284
- }
1285
-
1286
- napi_status napi_set_named_property(napi_env env,
1287
- napi_value object,
1288
- const char* utf8name,
1289
- napi_value value) {
1290
- NAPI_PREAMBLE(env);
1291
- CHECK_ARG(env, value);
1292
-
1293
- v8::Isolate* isolate = env->isolate;
1294
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1295
- v8::Local<v8::Object> obj;
1296
-
1297
- CHECK_TO_OBJECT(env, context, obj, object);
1298
-
1299
- v8::Local<v8::Name> key;
1300
- CHECK_NEW_FROM_UTF8(env, key, utf8name);
1301
-
1302
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
1303
-
1304
- v8::Maybe<bool> set_maybe = obj->Set(context, key, val);
1305
-
1306
- RETURN_STATUS_IF_FALSE(env, set_maybe.FromMaybe(false), napi_generic_failure);
1307
- return GET_RETURN_STATUS(env);
1308
- }
1309
-
1310
- napi_status napi_has_named_property(napi_env env,
1311
- napi_value object,
1312
- const char* utf8name,
1313
- bool* result) {
1314
- NAPI_PREAMBLE(env);
1315
- CHECK_ARG(env, result);
1316
-
1317
- v8::Isolate* isolate = env->isolate;
1318
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1319
- v8::Local<v8::Object> obj;
1320
-
1321
- CHECK_TO_OBJECT(env, context, obj, object);
1322
-
1323
- v8::Local<v8::Name> key;
1324
- CHECK_NEW_FROM_UTF8(env, key, utf8name);
1325
-
1326
- v8::Maybe<bool> has_maybe = obj->Has(context, key);
1327
-
1328
- CHECK_MAYBE_NOTHING(env, has_maybe, napi_generic_failure);
1329
-
1330
- *result = has_maybe.FromMaybe(false);
1331
- return GET_RETURN_STATUS(env);
1332
- }
1333
-
1334
- napi_status napi_get_named_property(napi_env env,
1335
- napi_value object,
1336
- const char* utf8name,
1337
- napi_value* result) {
1338
- NAPI_PREAMBLE(env);
1339
- CHECK_ARG(env, result);
1340
-
1341
- v8::Isolate* isolate = env->isolate;
1342
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1343
-
1344
- v8::Local<v8::Name> key;
1345
- CHECK_NEW_FROM_UTF8(env, key, utf8name);
1346
-
1347
- v8::Local<v8::Object> obj;
1348
-
1349
- CHECK_TO_OBJECT(env, context, obj, object);
1350
-
1351
- auto get_maybe = obj->Get(context, key);
1352
-
1353
- CHECK_MAYBE_EMPTY(env, get_maybe, napi_generic_failure);
1354
-
1355
- v8::Local<v8::Value> val = get_maybe.ToLocalChecked();
1356
- *result = v8impl::JsValueFromV8LocalValue(val);
1357
- return GET_RETURN_STATUS(env);
1358
- }
1359
-
1360
- napi_status napi_set_element(napi_env env,
1361
- napi_value object,
1362
- uint32_t index,
1363
- napi_value value) {
1364
- NAPI_PREAMBLE(env);
1365
- CHECK_ARG(env, value);
1366
-
1367
- v8::Isolate* isolate = env->isolate;
1368
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1369
- v8::Local<v8::Object> obj;
1370
-
1371
- CHECK_TO_OBJECT(env, context, obj, object);
1372
-
1373
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
1374
- auto set_maybe = obj->Set(context, index, val);
1375
-
1376
- RETURN_STATUS_IF_FALSE(env, set_maybe.FromMaybe(false), napi_generic_failure);
1377
-
1378
- return GET_RETURN_STATUS(env);
1379
- }
1380
-
1381
- napi_status napi_has_element(napi_env env,
1382
- napi_value object,
1383
- uint32_t index,
1384
- bool* result) {
1385
- NAPI_PREAMBLE(env);
1386
- CHECK_ARG(env, result);
1387
-
1388
- v8::Isolate* isolate = env->isolate;
1389
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1390
- v8::Local<v8::Object> obj;
1391
-
1392
- CHECK_TO_OBJECT(env, context, obj, object);
1393
-
1394
- v8::Maybe<bool> has_maybe = obj->Has(context, index);
1395
-
1396
- CHECK_MAYBE_NOTHING(env, has_maybe, napi_generic_failure);
1397
-
1398
- *result = has_maybe.FromMaybe(false);
1399
- return GET_RETURN_STATUS(env);
1400
- }
1401
-
1402
- napi_status napi_get_element(napi_env env,
1403
- napi_value object,
1404
- uint32_t index,
1405
- napi_value* result) {
1406
- NAPI_PREAMBLE(env);
1407
- CHECK_ARG(env, result);
1408
-
1409
- v8::Isolate* isolate = env->isolate;
1410
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1411
- v8::Local<v8::Object> obj;
1412
-
1413
- CHECK_TO_OBJECT(env, context, obj, object);
1414
-
1415
- auto get_maybe = obj->Get(context, index);
1416
-
1417
- CHECK_MAYBE_EMPTY(env, get_maybe, napi_generic_failure);
1418
-
1419
- *result = v8impl::JsValueFromV8LocalValue(get_maybe.ToLocalChecked());
1420
- return GET_RETURN_STATUS(env);
1421
- }
1422
-
1423
- napi_status napi_delete_element(napi_env env,
1424
- napi_value object,
1425
- uint32_t index,
1426
- bool* result) {
1427
- NAPI_PREAMBLE(env);
1428
-
1429
- v8::Isolate* isolate = env->isolate;
1430
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1431
- v8::Local<v8::Object> obj;
1432
-
1433
- CHECK_TO_OBJECT(env, context, obj, object);
1434
- v8::Maybe<bool> delete_maybe = obj->Delete(context, index);
1435
- CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
1436
-
1437
- if (result != NULL)
1438
- *result = delete_maybe.FromMaybe(false);
1439
-
1440
- return GET_RETURN_STATUS(env);
1441
- }
1442
-
1443
- napi_status napi_define_properties(napi_env env,
1444
- napi_value object,
1445
- size_t property_count,
1446
- const napi_property_descriptor* properties) {
1447
- NAPI_PREAMBLE(env);
1448
- if (property_count > 0) {
1449
- CHECK_ARG(env, properties);
1450
- }
1451
-
1452
- v8::Isolate* isolate = env->isolate;
1453
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1454
-
1455
- v8::Local<v8::Object> obj;
1456
- CHECK_TO_OBJECT(env, context, obj, object);
1457
-
1458
- for (size_t i = 0; i < property_count; i++) {
1459
- const napi_property_descriptor* p = &properties[i];
1460
-
1461
- v8::Local<v8::Name> property_name;
1462
- napi_status status =
1463
- v8impl::V8NameFromPropertyDescriptor(env, p, &property_name);
1464
-
1465
- if (status != napi_ok) {
1466
- return napi_set_last_error(env, status);
1467
- }
1468
-
1469
- v8::PropertyAttribute attributes =
1470
- v8impl::V8PropertyAttributesFromDescriptor(p);
1471
-
1472
- if (p->getter != nullptr || p->setter != nullptr) {
1473
- v8::Local<v8::Value> cbdata = v8impl::CreateAccessorCallbackData(
1474
- env,
1475
- p->getter,
1476
- p->setter,
1477
- p->data);
1478
-
1479
- auto set_maybe = obj->SetAccessor(
1480
- context,
1481
- property_name,
1482
- p->getter ? v8impl::GetterCallbackWrapper::Invoke : nullptr,
1483
- p->setter ? v8impl::SetterCallbackWrapper::Invoke : nullptr,
1484
- cbdata,
1485
- v8::AccessControl::DEFAULT,
1486
- attributes);
1487
-
1488
- if (!set_maybe.FromMaybe(false)) {
1489
- return napi_set_last_error(env, napi_invalid_arg);
1490
- }
1491
- } else if (p->method != nullptr) {
1492
- v8::Local<v8::Value> cbdata =
1493
- v8impl::CreateFunctionCallbackData(env, p->method, p->data);
1494
-
1495
- CHECK_MAYBE_EMPTY(env, cbdata, napi_generic_failure);
1496
-
1497
- v8::MaybeLocal<v8::Function> maybe_fn =
1498
- v8::Function::New(context,
1499
- v8impl::FunctionCallbackWrapper::Invoke,
1500
- cbdata);
1501
-
1502
- CHECK_MAYBE_EMPTY(env, maybe_fn, napi_generic_failure);
1503
-
1504
- auto define_maybe = obj->DefineOwnProperty(
1505
- context, property_name, maybe_fn.ToLocalChecked(), attributes);
1506
-
1507
- if (!define_maybe.FromMaybe(false)) {
1508
- return napi_set_last_error(env, napi_generic_failure);
1509
- }
1510
- } else {
1511
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(p->value);
1512
-
1513
- auto define_maybe =
1514
- obj->DefineOwnProperty(context, property_name, value, attributes);
1515
-
1516
- if (!define_maybe.FromMaybe(false)) {
1517
- return napi_set_last_error(env, napi_invalid_arg);
1518
- }
1519
- }
1520
- }
1521
-
1522
- return GET_RETURN_STATUS(env);
1523
- }
1524
-
1525
- napi_status napi_is_array(napi_env env, napi_value value, bool* result) {
1526
- CHECK_ENV(env);
1527
- CHECK_ARG(env, value);
1528
- CHECK_ARG(env, result);
1529
-
1530
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
1531
-
1532
- *result = val->IsArray();
1533
- return napi_clear_last_error(env);
1534
- }
1535
-
1536
- napi_status napi_get_array_length(napi_env env,
1537
- napi_value value,
1538
- uint32_t* result) {
1539
- NAPI_PREAMBLE(env);
1540
- CHECK_ARG(env, value);
1541
- CHECK_ARG(env, result);
1542
-
1543
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
1544
- RETURN_STATUS_IF_FALSE(env, val->IsArray(), napi_array_expected);
1545
-
1546
- v8::Local<v8::Array> arr = val.As<v8::Array>();
1547
- *result = arr->Length();
1548
-
1549
- return GET_RETURN_STATUS(env);
1550
- }
1551
-
1552
- napi_status napi_strict_equals(napi_env env,
1553
- napi_value lhs,
1554
- napi_value rhs,
1555
- bool* result) {
1556
- NAPI_PREAMBLE(env);
1557
- CHECK_ARG(env, lhs);
1558
- CHECK_ARG(env, rhs);
1559
- CHECK_ARG(env, result);
1560
-
1561
- v8::Local<v8::Value> a = v8impl::V8LocalValueFromJsValue(lhs);
1562
- v8::Local<v8::Value> b = v8impl::V8LocalValueFromJsValue(rhs);
1563
-
1564
- *result = a->StrictEquals(b);
1565
- return GET_RETURN_STATUS(env);
1566
- }
1567
-
1568
- napi_status napi_get_prototype(napi_env env,
1569
- napi_value object,
1570
- napi_value* result) {
1571
- NAPI_PREAMBLE(env);
1572
- CHECK_ARG(env, result);
1573
-
1574
- v8::Isolate* isolate = env->isolate;
1575
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1576
-
1577
- v8::Local<v8::Object> obj;
1578
- CHECK_TO_OBJECT(env, context, obj, object);
1579
-
1580
- v8::Local<v8::Value> val = obj->GetPrototype();
1581
- *result = v8impl::JsValueFromV8LocalValue(val);
1582
- return GET_RETURN_STATUS(env);
1583
- }
1584
-
1585
- napi_status napi_create_object(napi_env env, napi_value* result) {
1586
- CHECK_ENV(env);
1587
- CHECK_ARG(env, result);
1588
-
1589
- *result = v8impl::JsValueFromV8LocalValue(
1590
- v8::Object::New(env->isolate));
1591
-
1592
- return napi_clear_last_error(env);
1593
- }
1594
-
1595
- napi_status napi_create_array(napi_env env, napi_value* result) {
1596
- CHECK_ENV(env);
1597
- CHECK_ARG(env, result);
1598
-
1599
- *result = v8impl::JsValueFromV8LocalValue(
1600
- v8::Array::New(env->isolate));
1601
-
1602
- return napi_clear_last_error(env);
1603
- }
1604
-
1605
- napi_status napi_create_array_with_length(napi_env env,
1606
- size_t length,
1607
- napi_value* result) {
1608
- CHECK_ENV(env);
1609
- CHECK_ARG(env, result);
1610
-
1611
- *result = v8impl::JsValueFromV8LocalValue(
1612
- v8::Array::New(env->isolate, length));
1613
-
1614
- return napi_clear_last_error(env);
1615
- }
1616
-
1617
- napi_status napi_create_string_latin1(napi_env env,
1618
- const char* str,
1619
- size_t length,
1620
- napi_value* result) {
1621
- CHECK_ENV(env);
1622
- CHECK_ARG(env, result);
1623
-
1624
- auto isolate = env->isolate;
1625
- auto str_maybe =
1626
- v8::String::NewFromOneByte(isolate,
1627
- reinterpret_cast<const uint8_t*>(str),
1628
- v8::NewStringType::kInternalized,
1629
- length);
1630
- CHECK_MAYBE_EMPTY(env, str_maybe, napi_generic_failure);
1631
-
1632
- *result = v8impl::JsValueFromV8LocalValue(str_maybe.ToLocalChecked());
1633
- return napi_clear_last_error(env);
1634
- }
1635
-
1636
- napi_status napi_create_string_utf8(napi_env env,
1637
- const char* str,
1638
- size_t length,
1639
- napi_value* result) {
1640
- CHECK_ENV(env);
1641
- CHECK_ARG(env, result);
1642
-
1643
- v8::Local<v8::String> s;
1644
- CHECK_NEW_FROM_UTF8_LEN(env, s, str, length);
1645
-
1646
- *result = v8impl::JsValueFromV8LocalValue(s);
1647
- return napi_clear_last_error(env);
1648
- }
1649
-
1650
- napi_status napi_create_string_utf16(napi_env env,
1651
- const char16_t* str,
1652
- size_t length,
1653
- napi_value* result) {
1654
- CHECK_ENV(env);
1655
- CHECK_ARG(env, result);
1656
-
1657
- auto isolate = env->isolate;
1658
- auto str_maybe =
1659
- v8::String::NewFromTwoByte(isolate,
1660
- reinterpret_cast<const uint16_t*>(str),
1661
- v8::NewStringType::kInternalized,
1662
- length);
1663
- CHECK_MAYBE_EMPTY(env, str_maybe, napi_generic_failure);
1664
-
1665
- *result = v8impl::JsValueFromV8LocalValue(str_maybe.ToLocalChecked());
1666
- return napi_clear_last_error(env);
1667
- }
1668
-
1669
- napi_status napi_create_double(napi_env env,
1670
- double value,
1671
- napi_value* result) {
1672
- CHECK_ENV(env);
1673
- CHECK_ARG(env, result);
1674
-
1675
- *result = v8impl::JsValueFromV8LocalValue(
1676
- v8::Number::New(env->isolate, value));
1677
-
1678
- return napi_clear_last_error(env);
1679
- }
1680
-
1681
- napi_status napi_create_int32(napi_env env,
1682
- int32_t value,
1683
- napi_value* result) {
1684
- CHECK_ENV(env);
1685
- CHECK_ARG(env, result);
1686
-
1687
- *result = v8impl::JsValueFromV8LocalValue(
1688
- v8::Integer::New(env->isolate, value));
1689
-
1690
- return napi_clear_last_error(env);
1691
- }
1692
-
1693
- napi_status napi_create_uint32(napi_env env,
1694
- uint32_t value,
1695
- napi_value* result) {
1696
- CHECK_ENV(env);
1697
- CHECK_ARG(env, result);
1698
-
1699
- *result = v8impl::JsValueFromV8LocalValue(
1700
- v8::Integer::NewFromUnsigned(env->isolate, value));
1701
-
1702
- return napi_clear_last_error(env);
1703
- }
1704
-
1705
- napi_status napi_create_int64(napi_env env,
1706
- int64_t value,
1707
- napi_value* result) {
1708
- CHECK_ENV(env);
1709
- CHECK_ARG(env, result);
1710
-
1711
- *result = v8impl::JsValueFromV8LocalValue(
1712
- v8::Number::New(env->isolate, static_cast<double>(value)));
1713
-
1714
- return napi_clear_last_error(env);
1715
- }
1716
-
1717
- napi_status napi_get_boolean(napi_env env, bool value, napi_value* result) {
1718
- CHECK_ENV(env);
1719
- CHECK_ARG(env, result);
1720
-
1721
- v8::Isolate* isolate = env->isolate;
1722
-
1723
- if (value) {
1724
- *result = v8impl::JsValueFromV8LocalValue(v8::True(isolate));
1725
- } else {
1726
- *result = v8impl::JsValueFromV8LocalValue(v8::False(isolate));
1727
- }
1728
-
1729
- return napi_clear_last_error(env);
1730
- }
1731
-
1732
- napi_status napi_create_symbol(napi_env env,
1733
- napi_value description,
1734
- napi_value* result) {
1735
- CHECK_ENV(env);
1736
- CHECK_ARG(env, result);
1737
-
1738
- v8::Isolate* isolate = env->isolate;
1739
-
1740
- if (description == nullptr) {
1741
- *result = v8impl::JsValueFromV8LocalValue(v8::Symbol::New(isolate));
1742
- } else {
1743
- v8::Local<v8::Value> desc = v8impl::V8LocalValueFromJsValue(description);
1744
- RETURN_STATUS_IF_FALSE(env, desc->IsString(), napi_string_expected);
1745
-
1746
- *result = v8impl::JsValueFromV8LocalValue(
1747
- v8::Symbol::New(isolate, desc.As<v8::String>()));
1748
- }
1749
-
1750
- return napi_clear_last_error(env);
1751
- }
1752
-
1753
- static napi_status set_error_code(napi_env env,
1754
- v8::Local<v8::Value> error,
1755
- napi_value code,
1756
- const char* code_cstring) {
1757
- if ((code != nullptr) || (code_cstring != nullptr)) {
1758
- v8::Isolate* isolate = env->isolate;
1759
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1760
- v8::Local<v8::Object> err_object = error.As<v8::Object>();
1761
-
1762
- v8::Local<v8::Value> code_value = v8impl::V8LocalValueFromJsValue(code);
1763
- if (code != nullptr) {
1764
- code_value = v8impl::V8LocalValueFromJsValue(code);
1765
- RETURN_STATUS_IF_FALSE(env, code_value->IsString(), napi_string_expected);
1766
- } else {
1767
- CHECK_NEW_FROM_UTF8(env, code_value, code_cstring);
1768
- }
1769
-
1770
- v8::Local<v8::Name> code_key;
1771
- CHECK_NEW_FROM_UTF8(env, code_key, "code");
1772
-
1773
- v8::Maybe<bool> set_maybe = err_object->Set(context, code_key, code_value);
1774
- RETURN_STATUS_IF_FALSE(env,
1775
- set_maybe.FromMaybe(false),
1776
- napi_generic_failure);
1777
-
1778
- // now update the name to be "name [code]" where name is the
1779
- // original name and code is the code associated with the Error
1780
- v8::Local<v8::String> name_string;
1781
- CHECK_NEW_FROM_UTF8(env, name_string, "");
1782
- v8::Local<v8::Name> name_key;
1783
- CHECK_NEW_FROM_UTF8(env, name_key, "name");
1784
-
1785
- auto maybe_name = err_object->Get(context, name_key);
1786
- if (!maybe_name.IsEmpty()) {
1787
- v8::Local<v8::Value> name = maybe_name.ToLocalChecked();
1788
- if (name->IsString()) {
1789
- name_string = v8::String::Concat(name_string, name.As<v8::String>());
1790
- }
1791
- }
1792
- name_string = v8::String::Concat(name_string,
1793
- FIXED_ONE_BYTE_STRING(isolate, " ["));
1794
- name_string = v8::String::Concat(name_string, code_value.As<v8::String>());
1795
- name_string = v8::String::Concat(name_string,
1796
- FIXED_ONE_BYTE_STRING(isolate, "]"));
1797
-
1798
- set_maybe = err_object->Set(context, name_key, name_string);
1799
- RETURN_STATUS_IF_FALSE(env,
1800
- set_maybe.FromMaybe(false),
1801
- napi_generic_failure);
1802
- }
1803
- return napi_ok;
1804
- }
1805
-
1806
- napi_status napi_create_error(napi_env env,
1807
- napi_value code,
1808
- napi_value msg,
1809
- napi_value* result) {
1810
- CHECK_ENV(env);
1811
- CHECK_ARG(env, msg);
1812
- CHECK_ARG(env, result);
1813
-
1814
- v8::Local<v8::Value> message_value = v8impl::V8LocalValueFromJsValue(msg);
1815
- RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected);
1816
-
1817
- v8::Local<v8::Value> error_obj =
1818
- v8::Exception::Error(message_value.As<v8::String>());
1819
- napi_status status = set_error_code(env, error_obj, code, nullptr);
1820
- if (status != napi_ok) return status;
1821
-
1822
- *result = v8impl::JsValueFromV8LocalValue(error_obj);
1823
-
1824
- return napi_clear_last_error(env);
1825
- }
1826
-
1827
- napi_status napi_create_type_error(napi_env env,
1828
- napi_value code,
1829
- napi_value msg,
1830
- napi_value* result) {
1831
- CHECK_ENV(env);
1832
- CHECK_ARG(env, msg);
1833
- CHECK_ARG(env, result);
1834
-
1835
- v8::Local<v8::Value> message_value = v8impl::V8LocalValueFromJsValue(msg);
1836
- RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected);
1837
-
1838
- v8::Local<v8::Value> error_obj =
1839
- v8::Exception::TypeError(message_value.As<v8::String>());
1840
- napi_status status = set_error_code(env, error_obj, code, nullptr);
1841
- if (status != napi_ok) return status;
1842
-
1843
- *result = v8impl::JsValueFromV8LocalValue(error_obj);
1844
-
1845
- return napi_clear_last_error(env);
1846
- }
1847
-
1848
- napi_status napi_create_range_error(napi_env env,
1849
- napi_value code,
1850
- napi_value msg,
1851
- napi_value* result) {
1852
- CHECK_ENV(env);
1853
- CHECK_ARG(env, msg);
1854
- CHECK_ARG(env, result);
1855
-
1856
- v8::Local<v8::Value> message_value = v8impl::V8LocalValueFromJsValue(msg);
1857
- RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected);
1858
-
1859
- v8::Local<v8::Value> error_obj =
1860
- v8::Exception::RangeError(message_value.As<v8::String>());
1861
- napi_status status = set_error_code(env, error_obj, code, nullptr);
1862
- if (status != napi_ok) return status;
1863
-
1864
- *result = v8impl::JsValueFromV8LocalValue(error_obj);
1865
-
1866
- return napi_clear_last_error(env);
1867
- }
1868
-
1869
- napi_status napi_typeof(napi_env env,
1870
- napi_value value,
1871
- napi_valuetype* result) {
1872
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
1873
- // JS exceptions.
1874
- CHECK_ENV(env);
1875
- CHECK_ARG(env, value);
1876
- CHECK_ARG(env, result);
1877
-
1878
- v8::Local<v8::Value> v = v8impl::V8LocalValueFromJsValue(value);
1879
-
1880
- if (v->IsNumber()) {
1881
- *result = napi_number;
1882
- } else if (v->IsString()) {
1883
- *result = napi_string;
1884
- } else if (v->IsFunction()) {
1885
- // This test has to come before IsObject because IsFunction
1886
- // implies IsObject
1887
- *result = napi_function;
1888
- } else if (v->IsExternal()) {
1889
- // This test has to come before IsObject because IsExternal
1890
- // implies IsObject
1891
- *result = napi_external;
1892
- } else if (v->IsObject()) {
1893
- *result = napi_object;
1894
- } else if (v->IsBoolean()) {
1895
- *result = napi_boolean;
1896
- } else if (v->IsUndefined()) {
1897
- *result = napi_undefined;
1898
- } else if (v->IsSymbol()) {
1899
- *result = napi_symbol;
1900
- } else if (v->IsNull()) {
1901
- *result = napi_null;
1902
- } else {
1903
- // Should not get here unless V8 has added some new kind of value.
1904
- return napi_set_last_error(env, napi_invalid_arg);
1905
- }
1906
-
1907
- return napi_clear_last_error(env);
1908
- }
1909
-
1910
- napi_status napi_get_undefined(napi_env env, napi_value* result) {
1911
- CHECK_ENV(env);
1912
- CHECK_ARG(env, result);
1913
-
1914
- *result = v8impl::JsValueFromV8LocalValue(
1915
- v8::Undefined(env->isolate));
1916
-
1917
- return napi_clear_last_error(env);
1918
- }
1919
-
1920
- napi_status napi_get_null(napi_env env, napi_value* result) {
1921
- CHECK_ENV(env);
1922
- CHECK_ARG(env, result);
1923
-
1924
- *result = v8impl::JsValueFromV8LocalValue(
1925
- v8::Null(env->isolate));
1926
-
1927
- return napi_clear_last_error(env);
1928
- }
1929
-
1930
- // Gets all callback info in a single call. (Ugly, but faster.)
1931
- napi_status napi_get_cb_info(
1932
- napi_env env, // [in] NAPI environment handle
1933
- napi_callback_info cbinfo, // [in] Opaque callback-info handle
1934
- size_t* argc, // [in-out] Specifies the size of the provided argv array
1935
- // and receives the actual count of args.
1936
- napi_value* argv, // [out] Array of values
1937
- napi_value* this_arg, // [out] Receives the JS 'this' arg for the call
1938
- void** data) { // [out] Receives the data pointer for the callback.
1939
- CHECK_ENV(env);
1940
- CHECK_ARG(env, cbinfo);
1941
-
1942
- v8impl::CallbackWrapper* info =
1943
- reinterpret_cast<v8impl::CallbackWrapper*>(cbinfo);
1944
-
1945
- if (argv != nullptr) {
1946
- CHECK_ARG(env, argc);
1947
- info->Args(argv, *argc);
1948
- }
1949
- if (argc != nullptr) {
1950
- *argc = info->ArgsLength();
1951
- }
1952
- if (this_arg != nullptr) {
1953
- *this_arg = info->This();
1954
- }
1955
- if (data != nullptr) {
1956
- *data = info->Data();
1957
- }
1958
-
1959
- return napi_clear_last_error(env);
1960
- }
1961
-
1962
- napi_status napi_get_new_target(napi_env env,
1963
- napi_callback_info cbinfo,
1964
- napi_value* result) {
1965
- CHECK_ENV(env);
1966
- CHECK_ARG(env, cbinfo);
1967
- CHECK_ARG(env, result);
1968
-
1969
- v8impl::CallbackWrapper* info =
1970
- reinterpret_cast<v8impl::CallbackWrapper*>(cbinfo);
1971
-
1972
- *result = info->GetNewTarget();
1973
- return napi_clear_last_error(env);
1974
- }
1975
-
1976
- napi_status napi_call_function(napi_env env,
1977
- napi_value recv,
1978
- napi_value func,
1979
- size_t argc,
1980
- const napi_value* argv,
1981
- napi_value* result) {
1982
- NAPI_PREAMBLE(env);
1983
- CHECK_ARG(env, recv);
1984
- if (argc > 0) {
1985
- CHECK_ARG(env, argv);
1986
- }
1987
-
1988
- v8::Isolate* isolate = env->isolate;
1989
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
1990
-
1991
- v8::Local<v8::Value> v8recv = v8impl::V8LocalValueFromJsValue(recv);
1992
-
1993
- v8::Local<v8::Function> v8func;
1994
- CHECK_TO_FUNCTION(env, v8func, func);
1995
-
1996
- auto maybe = v8func->Call(context, v8recv, argc,
1997
- reinterpret_cast<v8::Local<v8::Value>*>(const_cast<napi_value*>(argv)));
1998
-
1999
- if (try_catch.HasCaught()) {
2000
- return napi_set_last_error(env, napi_pending_exception);
2001
- } else {
2002
- if (result != nullptr) {
2003
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
2004
- *result = v8impl::JsValueFromV8LocalValue(maybe.ToLocalChecked());
2005
- }
2006
- return napi_clear_last_error(env);
2007
- }
2008
- }
2009
-
2010
- napi_status napi_get_global(napi_env env, napi_value* result) {
2011
- CHECK_ENV(env);
2012
- CHECK_ARG(env, result);
2013
-
2014
- v8::Isolate* isolate = env->isolate;
2015
- // TODO(ianhall): what if we need the global object from a different
2016
- // context in the same isolate?
2017
- // Should napi_env be the current context rather than the current isolate?
2018
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2019
- *result = v8impl::JsValueFromV8LocalValue(context->Global());
2020
-
2021
- return napi_clear_last_error(env);
2022
- }
2023
-
2024
- napi_status napi_throw(napi_env env, napi_value error) {
2025
- NAPI_PREAMBLE(env);
2026
- CHECK_ARG(env, error);
2027
-
2028
- v8::Isolate* isolate = env->isolate;
2029
-
2030
- isolate->ThrowException(v8impl::V8LocalValueFromJsValue(error));
2031
- // any VM calls after this point and before returning
2032
- // to the javascript invoker will fail
2033
- return napi_clear_last_error(env);
2034
- }
2035
-
2036
- napi_status napi_throw_error(napi_env env,
2037
- const char* code,
2038
- const char* msg) {
2039
- NAPI_PREAMBLE(env);
2040
-
2041
- v8::Isolate* isolate = env->isolate;
2042
- v8::Local<v8::String> str;
2043
- CHECK_NEW_FROM_UTF8(env, str, msg);
2044
-
2045
- v8::Local<v8::Value> error_obj = v8::Exception::Error(str);
2046
- napi_status status = set_error_code(env, error_obj, nullptr, code);
2047
- if (status != napi_ok) return status;
2048
-
2049
- isolate->ThrowException(error_obj);
2050
- // any VM calls after this point and before returning
2051
- // to the javascript invoker will fail
2052
- return napi_clear_last_error(env);
2053
- }
2054
-
2055
- napi_status napi_throw_type_error(napi_env env,
2056
- const char* code,
2057
- const char* msg) {
2058
- NAPI_PREAMBLE(env);
2059
-
2060
- v8::Isolate* isolate = env->isolate;
2061
- v8::Local<v8::String> str;
2062
- CHECK_NEW_FROM_UTF8(env, str, msg);
2063
-
2064
- v8::Local<v8::Value> error_obj = v8::Exception::TypeError(str);
2065
- napi_status status = set_error_code(env, error_obj, nullptr, code);
2066
- if (status != napi_ok) return status;
2067
-
2068
- isolate->ThrowException(error_obj);
2069
- // any VM calls after this point and before returning
2070
- // to the javascript invoker will fail
2071
- return napi_clear_last_error(env);
2072
- }
2073
-
2074
- napi_status napi_throw_range_error(napi_env env,
2075
- const char* code,
2076
- const char* msg) {
2077
- NAPI_PREAMBLE(env);
2078
-
2079
- v8::Isolate* isolate = env->isolate;
2080
- v8::Local<v8::String> str;
2081
- CHECK_NEW_FROM_UTF8(env, str, msg);
2082
-
2083
- v8::Local<v8::Value> error_obj = v8::Exception::RangeError(str);
2084
- napi_status status = set_error_code(env, error_obj, nullptr, code);
2085
- if (status != napi_ok) return status;
2086
-
2087
- isolate->ThrowException(error_obj);
2088
- // any VM calls after this point and before returning
2089
- // to the javascript invoker will fail
2090
- return napi_clear_last_error(env);
2091
- }
2092
-
2093
- napi_status napi_is_error(napi_env env, napi_value value, bool* result) {
2094
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot
2095
- // throw JS exceptions.
2096
- CHECK_ENV(env);
2097
- CHECK_ARG(env, value);
2098
- CHECK_ARG(env, result);
2099
-
2100
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2101
- *result = val->IsNativeError();
2102
-
2103
- return napi_clear_last_error(env);
2104
- }
2105
-
2106
- napi_status napi_get_value_double(napi_env env,
2107
- napi_value value,
2108
- double* result) {
2109
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2110
- // JS exceptions.
2111
- CHECK_ENV(env);
2112
- CHECK_ARG(env, value);
2113
- CHECK_ARG(env, result);
2114
-
2115
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2116
- RETURN_STATUS_IF_FALSE(env, val->IsNumber(), napi_number_expected);
2117
-
2118
- *result = val.As<v8::Number>()->Value();
2119
-
2120
- return napi_clear_last_error(env);
2121
- }
2122
-
2123
- napi_status napi_get_value_int32(napi_env env,
2124
- napi_value value,
2125
- int32_t* result) {
2126
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2127
- // JS exceptions.
2128
- CHECK_ENV(env);
2129
- CHECK_ARG(env, value);
2130
- CHECK_ARG(env, result);
2131
-
2132
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2133
-
2134
- if (val->IsInt32()) {
2135
- *result = val.As<v8::Int32>()->Value();
2136
- } else {
2137
- RETURN_STATUS_IF_FALSE(env, val->IsNumber(), napi_number_expected);
2138
-
2139
- // Empty context: https://github.com/nodejs/node/issues/14379
2140
- v8::Local<v8::Context> context;
2141
- *result = val->Int32Value(context).FromJust();
2142
- }
2143
-
2144
- return napi_clear_last_error(env);
2145
- }
2146
-
2147
- napi_status napi_get_value_uint32(napi_env env,
2148
- napi_value value,
2149
- uint32_t* result) {
2150
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2151
- // JS exceptions.
2152
- CHECK_ENV(env);
2153
- CHECK_ARG(env, value);
2154
- CHECK_ARG(env, result);
2155
-
2156
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2157
-
2158
- if (val->IsUint32()) {
2159
- *result = val.As<v8::Uint32>()->Value();
2160
- } else {
2161
- RETURN_STATUS_IF_FALSE(env, val->IsNumber(), napi_number_expected);
2162
-
2163
- // Empty context: https://github.com/nodejs/node/issues/14379
2164
- v8::Local<v8::Context> context;
2165
- *result = val->Uint32Value(context).FromJust();
2166
- }
2167
-
2168
- return napi_clear_last_error(env);
2169
- }
2170
-
2171
- napi_status napi_get_value_int64(napi_env env,
2172
- napi_value value,
2173
- int64_t* result) {
2174
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2175
- // JS exceptions.
2176
- CHECK_ENV(env);
2177
- CHECK_ARG(env, value);
2178
- CHECK_ARG(env, result);
2179
-
2180
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2181
-
2182
- // This is still a fast path very likely to be taken.
2183
- if (val->IsInt32()) {
2184
- *result = val.As<v8::Int32>()->Value();
2185
- return napi_clear_last_error(env);
2186
- }
2187
-
2188
- RETURN_STATUS_IF_FALSE(env, val->IsNumber(), napi_number_expected);
2189
-
2190
- // v8::Value::IntegerValue() converts NaN to INT64_MIN, inconsistent with
2191
- // v8::Value::Int32Value() that converts NaN to 0. So special-case NaN here.
2192
- double doubleValue = val.As<v8::Number>()->Value();
2193
- if (std::isnan(doubleValue)) {
2194
- *result = 0;
2195
- } else {
2196
- // Empty context: https://github.com/nodejs/node/issues/14379
2197
- v8::Local<v8::Context> context;
2198
- *result = val->IntegerValue(context).FromJust();
2199
- }
2200
-
2201
- return napi_clear_last_error(env);
2202
- }
2203
-
2204
- napi_status napi_get_value_bool(napi_env env, napi_value value, bool* result) {
2205
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2206
- // JS exceptions.
2207
- CHECK_ENV(env);
2208
- CHECK_ARG(env, value);
2209
- CHECK_ARG(env, result);
2210
-
2211
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2212
- RETURN_STATUS_IF_FALSE(env, val->IsBoolean(), napi_boolean_expected);
2213
-
2214
- *result = val.As<v8::Boolean>()->Value();
2215
-
2216
- return napi_clear_last_error(env);
2217
- }
2218
-
2219
- // Copies a JavaScript string into a LATIN-1 string buffer. The result is the
2220
- // number of bytes (excluding the null terminator) copied into buf.
2221
- // A sufficient buffer size should be greater than the length of string,
2222
- // reserving space for null terminator.
2223
- // If bufsize is insufficient, the string will be truncated and null terminated.
2224
- // If buf is NULL, this method returns the length of the string (in bytes)
2225
- // via the result parameter.
2226
- // The result argument is optional unless buf is NULL.
2227
- napi_status napi_get_value_string_latin1(napi_env env,
2228
- napi_value value,
2229
- char* buf,
2230
- size_t bufsize,
2231
- size_t* result) {
2232
- CHECK_ENV(env);
2233
- CHECK_ARG(env, value);
2234
-
2235
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2236
- RETURN_STATUS_IF_FALSE(env, val->IsString(), napi_string_expected);
2237
-
2238
- if (!buf) {
2239
- CHECK_ARG(env, result);
2240
- *result = val.As<v8::String>()->Length();
2241
- } else if (bufsize != 0) {
2242
- int copied = val.As<v8::String>()->WriteOneByte(
2243
- reinterpret_cast<uint8_t*>(buf), 0, bufsize - 1,
2244
- v8::String::NO_NULL_TERMINATION);
2245
-
2246
- buf[copied] = '\0';
2247
- if (result != nullptr) {
2248
- *result = copied;
2249
- }
2250
- } else if (result != nullptr) {
2251
- *result = 0;
2252
- }
2253
-
2254
- return napi_clear_last_error(env);
2255
- }
2256
-
2257
- // Copies a JavaScript string into a UTF-8 string buffer. The result is the
2258
- // number of bytes (excluding the null terminator) copied into buf.
2259
- // A sufficient buffer size should be greater than the length of string,
2260
- // reserving space for null terminator.
2261
- // If bufsize is insufficient, the string will be truncated and null terminated.
2262
- // If buf is NULL, this method returns the length of the string (in bytes)
2263
- // via the result parameter.
2264
- // The result argument is optional unless buf is NULL.
2265
- napi_status napi_get_value_string_utf8(napi_env env,
2266
- napi_value value,
2267
- char* buf,
2268
- size_t bufsize,
2269
- size_t* result) {
2270
- CHECK_ENV(env);
2271
- CHECK_ARG(env, value);
2272
-
2273
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2274
- RETURN_STATUS_IF_FALSE(env, val->IsString(), napi_string_expected);
2275
-
2276
- if (!buf) {
2277
- CHECK_ARG(env, result);
2278
- *result = val.As<v8::String>()->Utf8Length();
2279
- } else if (bufsize != 0) {
2280
- int copied = val.As<v8::String>()->WriteUtf8(
2281
- buf, bufsize - 1, nullptr, v8::String::REPLACE_INVALID_UTF8 |
2282
- v8::String::NO_NULL_TERMINATION);
2283
-
2284
- buf[copied] = '\0';
2285
- if (result != nullptr) {
2286
- *result = copied;
2287
- }
2288
- } else if (result != nullptr) {
2289
- *result = 0;
2290
- }
2291
-
2292
- return napi_clear_last_error(env);
2293
- }
2294
-
2295
- // Copies a JavaScript string into a UTF-16 string buffer. The result is the
2296
- // number of 2-byte code units (excluding the null terminator) copied into buf.
2297
- // A sufficient buffer size should be greater than the length of string,
2298
- // reserving space for null terminator.
2299
- // If bufsize is insufficient, the string will be truncated and null terminated.
2300
- // If buf is NULL, this method returns the length of the string (in 2-byte
2301
- // code units) via the result parameter.
2302
- // The result argument is optional unless buf is NULL.
2303
- napi_status napi_get_value_string_utf16(napi_env env,
2304
- napi_value value,
2305
- char16_t* buf,
2306
- size_t bufsize,
2307
- size_t* result) {
2308
- CHECK_ENV(env);
2309
- CHECK_ARG(env, value);
2310
-
2311
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2312
- RETURN_STATUS_IF_FALSE(env, val->IsString(), napi_string_expected);
2313
-
2314
- if (!buf) {
2315
- CHECK_ARG(env, result);
2316
- // V8 assumes UTF-16 length is the same as the number of characters.
2317
- *result = val.As<v8::String>()->Length();
2318
- } else if (bufsize != 0) {
2319
- int copied = val.As<v8::String>()->Write(
2320
- reinterpret_cast<uint16_t*>(buf), 0, bufsize - 1,
2321
- v8::String::NO_NULL_TERMINATION);
2322
-
2323
- buf[copied] = '\0';
2324
- if (result != nullptr) {
2325
- *result = copied;
2326
- }
2327
- } else if (result != nullptr) {
2328
- *result = 0;
2329
- }
2330
-
2331
- return napi_clear_last_error(env);
2332
- }
2333
-
2334
- napi_status napi_coerce_to_object(napi_env env,
2335
- napi_value value,
2336
- napi_value* result) {
2337
- NAPI_PREAMBLE(env);
2338
- CHECK_ARG(env, value);
2339
- CHECK_ARG(env, result);
2340
-
2341
- v8::Isolate* isolate = env->isolate;
2342
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2343
- v8::Local<v8::Object> obj;
2344
- CHECK_TO_OBJECT(env, context, obj, value);
2345
-
2346
- *result = v8impl::JsValueFromV8LocalValue(obj);
2347
- return GET_RETURN_STATUS(env);
2348
- }
2349
-
2350
- napi_status napi_coerce_to_bool(napi_env env,
2351
- napi_value value,
2352
- napi_value* result) {
2353
- NAPI_PREAMBLE(env);
2354
- CHECK_ARG(env, value);
2355
- CHECK_ARG(env, result);
2356
-
2357
- v8::Isolate* isolate = env->isolate;
2358
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2359
- v8::Local<v8::Boolean> b;
2360
-
2361
- CHECK_TO_BOOL(env, context, b, value);
2362
-
2363
- *result = v8impl::JsValueFromV8LocalValue(b);
2364
- return GET_RETURN_STATUS(env);
2365
- }
2366
-
2367
- napi_status napi_coerce_to_number(napi_env env,
2368
- napi_value value,
2369
- napi_value* result) {
2370
- NAPI_PREAMBLE(env);
2371
- CHECK_ARG(env, value);
2372
- CHECK_ARG(env, result);
2373
-
2374
- v8::Isolate* isolate = env->isolate;
2375
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2376
- v8::Local<v8::Number> num;
2377
-
2378
- CHECK_TO_NUMBER(env, context, num, value);
2379
-
2380
- *result = v8impl::JsValueFromV8LocalValue(num);
2381
- return GET_RETURN_STATUS(env);
2382
- }
2383
-
2384
- napi_status napi_coerce_to_string(napi_env env,
2385
- napi_value value,
2386
- napi_value* result) {
2387
- NAPI_PREAMBLE(env);
2388
- CHECK_ARG(env, value);
2389
- CHECK_ARG(env, result);
2390
-
2391
- v8::Isolate* isolate = env->isolate;
2392
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2393
- v8::Local<v8::String> str;
2394
-
2395
- CHECK_TO_STRING(env, context, str, value);
2396
-
2397
- *result = v8impl::JsValueFromV8LocalValue(str);
2398
- return GET_RETURN_STATUS(env);
2399
- }
2400
-
2401
- napi_status napi_wrap(napi_env env,
2402
- napi_value js_object,
2403
- void* native_object,
2404
- napi_finalize finalize_cb,
2405
- void* finalize_hint,
2406
- napi_ref* result) {
2407
- NAPI_PREAMBLE(env);
2408
- CHECK_ARG(env, js_object);
2409
-
2410
- v8::Isolate* isolate = env->isolate;
2411
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2412
-
2413
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(js_object);
2414
- RETURN_STATUS_IF_FALSE(env, value->IsObject(), napi_invalid_arg);
2415
- v8::Local<v8::Object> obj = value.As<v8::Object>();
2416
-
2417
- // If we've already wrapped this object, we error out.
2418
- RETURN_STATUS_IF_FALSE(env, !v8impl::FindWrapper(obj), napi_invalid_arg);
2419
-
2420
- // Create a wrapper object with an internal field to hold the wrapped pointer
2421
- // and a second internal field to identify the owner as N-API.
2422
- v8::Local<v8::ObjectTemplate> wrapper_template;
2423
- ENV_OBJECT_TEMPLATE(env, wrap, wrapper_template, v8impl::kWrapperFields);
2424
-
2425
- auto maybe_object = wrapper_template->NewInstance(context);
2426
- CHECK_MAYBE_EMPTY(env, maybe_object, napi_generic_failure);
2427
- v8::Local<v8::Object> wrapper = maybe_object.ToLocalChecked();
2428
-
2429
- // Store the pointer as an external in the wrapper.
2430
- wrapper->SetInternalField(0, v8::External::New(isolate, native_object));
2431
- wrapper->SetInternalField(1, v8::External::New(isolate,
2432
- reinterpret_cast<void*>(const_cast<char*>(v8impl::napi_wrap_name))));
2433
-
2434
- // Insert the wrapper into the object's prototype chain.
2435
- v8::Local<v8::Value> proto = obj->GetPrototype();
2436
- CHECK(wrapper->SetPrototype(context, proto).FromJust());
2437
- CHECK(obj->SetPrototype(context, wrapper).FromJust());
2438
-
2439
- v8impl::Reference* reference = nullptr;
2440
- if (result != nullptr) {
2441
- // The returned reference should be deleted via napi_delete_reference()
2442
- // ONLY in response to the finalize callback invocation. (If it is deleted
2443
- // before then, then the finalize callback will never be invoked.)
2444
- // Therefore a finalize callback is required when returning a reference.
2445
- CHECK_ARG(env, finalize_cb);
2446
- reference = v8impl::Reference::New(
2447
- env, obj, 0, false, finalize_cb, native_object, finalize_hint);
2448
- *result = reinterpret_cast<napi_ref>(reference);
2449
- } else if (finalize_cb != nullptr) {
2450
- // Create a self-deleting reference just for the finalize callback.
2451
- reference = v8impl::Reference::New(
2452
- env, obj, 0, true, finalize_cb, native_object, finalize_hint);
2453
- }
2454
-
2455
- if (reference != nullptr) {
2456
- wrapper->SetInternalField(2, v8::External::New(isolate, reference));
2457
- }
2458
-
2459
- return GET_RETURN_STATUS(env);
2460
- }
2461
-
2462
- napi_status napi_unwrap(napi_env env, napi_value obj, void** result) {
2463
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2464
- // JS exceptions.
2465
- CHECK_ENV(env);
2466
- v8::Local<v8::Object> wrapper;
2467
- return napi_set_last_error(env, v8impl::Unwrap(env, obj, result, &wrapper));
2468
- }
2469
-
2470
- napi_status napi_remove_wrap(napi_env env, napi_value obj, void** result) {
2471
- NAPI_PREAMBLE(env);
2472
- v8::Local<v8::Object> wrapper;
2473
- v8::Local<v8::Object> parent;
2474
- napi_status status = v8impl::Unwrap(env, obj, result, &wrapper, &parent);
2475
- if (status != napi_ok) {
2476
- return napi_set_last_error(env, status);
2477
- }
2478
-
2479
- v8::Local<v8::Value> external = wrapper->GetInternalField(2);
2480
- if (external->IsExternal()) {
2481
- v8impl::Reference::Delete(
2482
- static_cast<v8impl::Reference*>(external.As<v8::External>()->Value()));
2483
- }
2484
-
2485
- if (!parent.IsEmpty()) {
2486
- v8::Maybe<bool> maybe = parent->SetPrototype(
2487
- env->isolate->GetCurrentContext(), wrapper->GetPrototype());
2488
- CHECK_MAYBE_NOTHING(env, maybe, napi_generic_failure);
2489
- if (!maybe.FromMaybe(false)) {
2490
- return napi_set_last_error(env, napi_generic_failure);
2491
- }
2492
- }
2493
-
2494
- return GET_RETURN_STATUS(env);
2495
- }
2496
-
2497
- napi_status napi_create_external(napi_env env,
2498
- void* data,
2499
- napi_finalize finalize_cb,
2500
- void* finalize_hint,
2501
- napi_value* result) {
2502
- NAPI_PREAMBLE(env);
2503
- CHECK_ARG(env, result);
2504
-
2505
- v8::Isolate* isolate = env->isolate;
2506
-
2507
- v8::Local<v8::Value> external_value = v8::External::New(isolate, data);
2508
-
2509
- // The Reference object will delete itself after invoking the finalizer
2510
- // callback.
2511
- v8impl::Reference::New(env,
2512
- external_value,
2513
- 0,
2514
- true,
2515
- finalize_cb,
2516
- data,
2517
- finalize_hint);
2518
-
2519
- *result = v8impl::JsValueFromV8LocalValue(external_value);
2520
-
2521
- return napi_clear_last_error(env);
2522
- }
2523
-
2524
- napi_status napi_get_value_external(napi_env env,
2525
- napi_value value,
2526
- void** result) {
2527
- CHECK_ENV(env);
2528
- CHECK_ARG(env, value);
2529
- CHECK_ARG(env, result);
2530
-
2531
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
2532
- RETURN_STATUS_IF_FALSE(env, val->IsExternal(), napi_invalid_arg);
2533
-
2534
- v8::Local<v8::External> external_value = val.As<v8::External>();
2535
- *result = external_value->Value();
2536
-
2537
- return napi_clear_last_error(env);
2538
- }
2539
-
2540
- // Set initial_refcount to 0 for a weak reference, >0 for a strong reference.
2541
- napi_status napi_create_reference(napi_env env,
2542
- napi_value value,
2543
- uint32_t initial_refcount,
2544
- napi_ref* result) {
2545
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2546
- // JS exceptions.
2547
- CHECK_ENV(env);
2548
- CHECK_ARG(env, value);
2549
- CHECK_ARG(env, result);
2550
-
2551
- v8::Local<v8::Value> v8_value = v8impl::V8LocalValueFromJsValue(value);
2552
-
2553
- if (!(v8_value->IsObject() || v8_value->IsFunction())) {
2554
- return napi_set_last_error(env, napi_object_expected);
2555
- }
2556
-
2557
- v8impl::Reference* reference =
2558
- v8impl::Reference::New(env, v8_value, initial_refcount, false);
2559
-
2560
- *result = reinterpret_cast<napi_ref>(reference);
2561
- return napi_clear_last_error(env);
2562
- }
2563
-
2564
- // Deletes a reference. The referenced value is released, and may be GC'd unless
2565
- // there are other references to it.
2566
- napi_status napi_delete_reference(napi_env env, napi_ref ref) {
2567
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2568
- // JS exceptions.
2569
- CHECK_ENV(env);
2570
- CHECK_ARG(env, ref);
2571
-
2572
- v8impl::Reference::Delete(reinterpret_cast<v8impl::Reference*>(ref));
2573
-
2574
- return napi_clear_last_error(env);
2575
- }
2576
-
2577
- // Increments the reference count, optionally returning the resulting count.
2578
- // After this call the reference will be a strong reference because its
2579
- // refcount is >0, and the referenced object is effectively "pinned".
2580
- // Calling this when the refcount is 0 and the object is unavailable
2581
- // results in an error.
2582
- napi_status napi_reference_ref(napi_env env, napi_ref ref, uint32_t* result) {
2583
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2584
- // JS exceptions.
2585
- CHECK_ENV(env);
2586
- CHECK_ARG(env, ref);
2587
-
2588
- v8impl::Reference* reference = reinterpret_cast<v8impl::Reference*>(ref);
2589
- uint32_t count = reference->Ref();
2590
-
2591
- if (result != nullptr) {
2592
- *result = count;
2593
- }
2594
-
2595
- return napi_clear_last_error(env);
2596
- }
2597
-
2598
- // Decrements the reference count, optionally returning the resulting count. If
2599
- // the result is 0 the reference is now weak and the object may be GC'd at any
2600
- // time if there are no other references. Calling this when the refcount is
2601
- // already 0 results in an error.
2602
- napi_status napi_reference_unref(napi_env env, napi_ref ref, uint32_t* result) {
2603
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2604
- // JS exceptions.
2605
- CHECK_ENV(env);
2606
- CHECK_ARG(env, ref);
2607
-
2608
- v8impl::Reference* reference = reinterpret_cast<v8impl::Reference*>(ref);
2609
-
2610
- if (reference->RefCount() == 0) {
2611
- return napi_set_last_error(env, napi_generic_failure);
2612
- }
2613
-
2614
- uint32_t count = reference->Unref();
2615
-
2616
- if (result != nullptr) {
2617
- *result = count;
2618
- }
2619
-
2620
- return napi_clear_last_error(env);
2621
- }
2622
-
2623
- // Attempts to get a referenced value. If the reference is weak, the value might
2624
- // no longer be available, in that case the call is still successful but the
2625
- // result is NULL.
2626
- napi_status napi_get_reference_value(napi_env env,
2627
- napi_ref ref,
2628
- napi_value* result) {
2629
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2630
- // JS exceptions.
2631
- CHECK_ENV(env);
2632
- CHECK_ARG(env, ref);
2633
- CHECK_ARG(env, result);
2634
-
2635
- v8impl::Reference* reference = reinterpret_cast<v8impl::Reference*>(ref);
2636
- *result = v8impl::JsValueFromV8LocalValue(reference->Get());
2637
-
2638
- return napi_clear_last_error(env);
2639
- }
2640
-
2641
- napi_status napi_open_handle_scope(napi_env env, napi_handle_scope* result) {
2642
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2643
- // JS exceptions.
2644
- CHECK_ENV(env);
2645
- CHECK_ARG(env, result);
2646
-
2647
- *result = v8impl::JsHandleScopeFromV8HandleScope(
2648
- new v8impl::HandleScopeWrapper(env->isolate));
2649
- env->open_handle_scopes++;
2650
- return napi_clear_last_error(env);
2651
- }
2652
-
2653
- napi_status napi_close_handle_scope(napi_env env, napi_handle_scope scope) {
2654
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2655
- // JS exceptions.
2656
- CHECK_ENV(env);
2657
- CHECK_ARG(env, scope);
2658
- if (env->open_handle_scopes == 0) {
2659
- return napi_handle_scope_mismatch;
2660
- }
2661
-
2662
- env->open_handle_scopes--;
2663
- delete v8impl::V8HandleScopeFromJsHandleScope(scope);
2664
- return napi_clear_last_error(env);
2665
- }
2666
-
2667
- napi_status napi_open_escapable_handle_scope(
2668
- napi_env env,
2669
- napi_escapable_handle_scope* result) {
2670
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2671
- // JS exceptions.
2672
- CHECK_ENV(env);
2673
- CHECK_ARG(env, result);
2674
-
2675
- *result = v8impl::JsEscapableHandleScopeFromV8EscapableHandleScope(
2676
- new v8impl::EscapableHandleScopeWrapper(env->isolate));
2677
- env->open_handle_scopes++;
2678
- return napi_clear_last_error(env);
2679
- }
2680
-
2681
- napi_status napi_close_escapable_handle_scope(
2682
- napi_env env,
2683
- napi_escapable_handle_scope scope) {
2684
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2685
- // JS exceptions.
2686
- CHECK_ENV(env);
2687
- CHECK_ARG(env, scope);
2688
- if (env->open_handle_scopes == 0) {
2689
- return napi_handle_scope_mismatch;
2690
- }
2691
-
2692
- delete v8impl::V8EscapableHandleScopeFromJsEscapableHandleScope(scope);
2693
- env->open_handle_scopes--;
2694
- return napi_clear_last_error(env);
2695
- }
2696
-
2697
- napi_status napi_escape_handle(napi_env env,
2698
- napi_escapable_handle_scope scope,
2699
- napi_value escapee,
2700
- napi_value* result) {
2701
- // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
2702
- // JS exceptions.
2703
- CHECK_ENV(env);
2704
- CHECK_ARG(env, scope);
2705
- CHECK_ARG(env, escapee);
2706
- CHECK_ARG(env, result);
2707
-
2708
- v8impl::EscapableHandleScopeWrapper* s =
2709
- v8impl::V8EscapableHandleScopeFromJsEscapableHandleScope(scope);
2710
- if (!s->escape_called()) {
2711
- *result = v8impl::JsValueFromV8LocalValue(
2712
- s->Escape(v8impl::V8LocalValueFromJsValue(escapee)));
2713
- return napi_clear_last_error(env);
2714
- }
2715
- return napi_set_last_error(env, napi_escape_called_twice);
2716
- }
2717
-
2718
- napi_status napi_new_instance(napi_env env,
2719
- napi_value constructor,
2720
- size_t argc,
2721
- const napi_value* argv,
2722
- napi_value* result) {
2723
- NAPI_PREAMBLE(env);
2724
- CHECK_ARG(env, constructor);
2725
- if (argc > 0) {
2726
- CHECK_ARG(env, argv);
2727
- }
2728
- CHECK_ARG(env, result);
2729
-
2730
- v8::Isolate* isolate = env->isolate;
2731
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2732
-
2733
- v8::Local<v8::Function> ctor;
2734
- CHECK_TO_FUNCTION(env, ctor, constructor);
2735
-
2736
- auto maybe = ctor->NewInstance(context, argc,
2737
- reinterpret_cast<v8::Local<v8::Value>*>(const_cast<napi_value*>(argv)));
2738
-
2739
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
2740
-
2741
- *result = v8impl::JsValueFromV8LocalValue(maybe.ToLocalChecked());
2742
- return GET_RETURN_STATUS(env);
2743
- }
2744
-
2745
- napi_status napi_instanceof(napi_env env,
2746
- napi_value object,
2747
- napi_value constructor,
2748
- bool* result) {
2749
- NAPI_PREAMBLE(env);
2750
- CHECK_ARG(env, object);
2751
- CHECK_ARG(env, result);
2752
-
2753
- *result = false;
2754
-
2755
- v8::Local<v8::Object> ctor;
2756
- v8::Isolate* isolate = env->isolate;
2757
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2758
-
2759
- CHECK_TO_OBJECT(env, context, ctor, constructor);
2760
-
2761
- if (!ctor->IsFunction()) {
2762
- napi_throw_type_error(env,
2763
- "ERR_NAPI_CONS_FUNCTION",
2764
- "Constructor must be a function");
2765
-
2766
- return napi_set_last_error(env, napi_function_expected);
2767
- }
2768
-
2769
- if (env->has_instance_available) {
2770
- napi_value value, js_result = nullptr, has_instance = nullptr;
2771
- napi_status status = napi_generic_failure;
2772
- napi_valuetype value_type;
2773
-
2774
- // Get "Symbol" from the global object
2775
- if (env->has_instance.IsEmpty()) {
2776
- status = napi_get_global(env, &value);
2777
- if (status != napi_ok) return status;
2778
- status = napi_get_named_property(env, value, "Symbol", &value);
2779
- if (status != napi_ok) return status;
2780
- status = napi_typeof(env, value, &value_type);
2781
- if (status != napi_ok) return status;
2782
-
2783
- // Get "hasInstance" from Symbol
2784
- if (value_type == napi_function) {
2785
- status = napi_get_named_property(env, value, "hasInstance", &value);
2786
- if (status != napi_ok) return status;
2787
- status = napi_typeof(env, value, &value_type);
2788
- if (status != napi_ok) return status;
2789
-
2790
- // Store Symbol.hasInstance in a global persistent reference
2791
- if (value_type == napi_symbol) {
2792
- env->has_instance.Reset(env->isolate,
2793
- v8impl::V8LocalValueFromJsValue(value));
2794
- has_instance = value;
2795
- }
2796
- }
2797
- } else {
2798
- has_instance = v8impl::JsValueFromV8LocalValue(
2799
- v8::Local<v8::Value>::New(env->isolate, env->has_instance));
2800
- }
2801
-
2802
- if (has_instance) {
2803
- status = napi_get_property(env, constructor, has_instance, &value);
2804
- if (status != napi_ok) return status;
2805
- status = napi_typeof(env, value, &value_type);
2806
- if (status != napi_ok) return status;
2807
-
2808
- // Call the function to determine whether the object is an instance of the
2809
- // constructor
2810
- if (value_type == napi_function) {
2811
- status = napi_call_function(env, constructor, value, 1, &object,
2812
- &js_result);
2813
- if (status != napi_ok) return status;
2814
- return napi_get_value_bool(env, js_result, result);
2815
- }
2816
- }
2817
-
2818
- env->has_instance_available = false;
2819
- }
2820
-
2821
- // If running constructor[Symbol.hasInstance](object) did not work, we perform
2822
- // a traditional instanceof (early Node.js 6.x).
2823
-
2824
- v8::Local<v8::String> prototype_string;
2825
- CHECK_NEW_FROM_UTF8(env, prototype_string, "prototype");
2826
-
2827
- auto maybe_prototype = ctor->Get(context, prototype_string);
2828
- CHECK_MAYBE_EMPTY(env, maybe_prototype, napi_generic_failure);
2829
-
2830
- v8::Local<v8::Value> prototype_property = maybe_prototype.ToLocalChecked();
2831
- if (!prototype_property->IsObject()) {
2832
- napi_throw_type_error(
2833
- env,
2834
- "ERR_NAPI_CONS_PROTOTYPE_OBJECT",
2835
- "Constructor.prototype must be an object");
2836
-
2837
- return napi_set_last_error(env, napi_object_expected);
2838
- }
2839
-
2840
- auto maybe_ctor = prototype_property->ToObject(context);
2841
- CHECK_MAYBE_EMPTY(env, maybe_ctor, napi_generic_failure);
2842
- ctor = maybe_ctor.ToLocalChecked();
2843
-
2844
- v8::Local<v8::Value> current_obj = v8impl::V8LocalValueFromJsValue(object);
2845
- if (!current_obj->StrictEquals(ctor)) {
2846
- for (v8::Local<v8::Value> original_obj = current_obj;
2847
- !(current_obj->IsNull() || current_obj->IsUndefined());) {
2848
- if (current_obj->StrictEquals(ctor)) {
2849
- *result = !(original_obj->IsNumber() ||
2850
- original_obj->IsBoolean() ||
2851
- original_obj->IsString());
2852
- break;
2853
- }
2854
- v8::Local<v8::Object> obj;
2855
- CHECK_TO_OBJECT(env, context, obj, v8impl::JsValueFromV8LocalValue(
2856
- current_obj));
2857
- current_obj = obj->GetPrototype();
2858
- }
2859
- }
2860
-
2861
- return GET_RETURN_STATUS(env);
2862
- }
2863
-
2864
- napi_status napi_async_init(napi_env env,
2865
- napi_value async_resource,
2866
- napi_value async_resource_name,
2867
- napi_async_context* result) {
2868
- CHECK_ENV(env);
2869
- CHECK_ARG(env, async_resource_name);
2870
- CHECK_ARG(env, result);
2871
-
2872
- v8::Isolate* isolate = env->isolate;
2873
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2874
-
2875
- v8::Local<v8::Object> v8_resource;
2876
- if (async_resource != nullptr) {
2877
- CHECK_TO_OBJECT(env, context, v8_resource, async_resource);
2878
- } else {
2879
- v8_resource = v8::Object::New(isolate);
2880
- }
2881
-
2882
- v8::Local<v8::String> v8_resource_name;
2883
- CHECK_TO_STRING(env, context, v8_resource_name, async_resource_name);
2884
-
2885
- // TODO(jasongin): Consider avoiding allocation here by using
2886
- // a tagged pointer with 2×31 bit fields instead.
2887
- node::async_context* async_context = new node::async_context();
2888
-
2889
- *async_context = node::EmitAsyncInit(isolate, v8_resource, v8_resource_name);
2890
- *result = reinterpret_cast<napi_async_context>(async_context);
2891
-
2892
- return napi_clear_last_error(env);
2893
- }
2894
-
2895
- napi_status napi_async_destroy(napi_env env,
2896
- napi_async_context async_context) {
2897
- CHECK_ENV(env);
2898
- CHECK_ARG(env, async_context);
2899
-
2900
- v8::Isolate* isolate = env->isolate;
2901
- node::async_context* node_async_context =
2902
- reinterpret_cast<node::async_context*>(async_context);
2903
- node::EmitAsyncDestroy(isolate, *node_async_context);
2904
-
2905
- delete node_async_context;
2906
-
2907
- return napi_clear_last_error(env);
2908
- }
2909
-
2910
- napi_status napi_make_callback(napi_env env,
2911
- napi_async_context async_context,
2912
- napi_value recv,
2913
- napi_value func,
2914
- size_t argc,
2915
- const napi_value* argv,
2916
- napi_value* result) {
2917
- NAPI_PREAMBLE(env);
2918
- CHECK_ARG(env, recv);
2919
- if (argc > 0) {
2920
- CHECK_ARG(env, argv);
2921
- }
2922
-
2923
- v8::Isolate* isolate = env->isolate;
2924
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
2925
-
2926
- v8::Local<v8::Object> v8recv;
2927
- CHECK_TO_OBJECT(env, context, v8recv, recv);
2928
-
2929
- v8::Local<v8::Function> v8func;
2930
- CHECK_TO_FUNCTION(env, v8func, func);
2931
-
2932
- node::async_context* node_async_context =
2933
- reinterpret_cast<node::async_context*>(async_context);
2934
- if (node_async_context == nullptr) {
2935
- static node::async_context empty_context = { 0, 0 };
2936
- node_async_context = &empty_context;
2937
- }
2938
-
2939
- v8::MaybeLocal<v8::Value> callback_result = node::MakeCallback(
2940
- isolate, v8recv, v8func, argc,
2941
- reinterpret_cast<v8::Local<v8::Value>*>(const_cast<napi_value*>(argv)),
2942
- *node_async_context);
2943
- CHECK_MAYBE_EMPTY(env, callback_result, napi_generic_failure);
2944
-
2945
- if (result != nullptr) {
2946
- *result = v8impl::JsValueFromV8LocalValue(
2947
- callback_result.ToLocalChecked());
2948
- }
2949
-
2950
- return GET_RETURN_STATUS(env);
2951
- }
2952
-
2953
- // Methods to support catching exceptions
2954
- napi_status napi_is_exception_pending(napi_env env, bool* result) {
2955
- // NAPI_PREAMBLE is not used here: this function must execute when there is a
2956
- // pending exception.
2957
- CHECK_ENV(env);
2958
- CHECK_ARG(env, result);
2959
-
2960
- *result = !env->last_exception.IsEmpty();
2961
- return napi_clear_last_error(env);
2962
- }
2963
-
2964
- napi_status napi_get_and_clear_last_exception(napi_env env,
2965
- napi_value* result) {
2966
- // NAPI_PREAMBLE is not used here: this function must execute when there is a
2967
- // pending exception.
2968
- CHECK_ENV(env);
2969
- CHECK_ARG(env, result);
2970
-
2971
- if (env->last_exception.IsEmpty()) {
2972
- return napi_get_undefined(env, result);
2973
- } else {
2974
- *result = v8impl::JsValueFromV8LocalValue(
2975
- v8::Local<v8::Value>::New(env->isolate, env->last_exception));
2976
- env->last_exception.Reset();
2977
- }
2978
-
2979
- return napi_clear_last_error(env);
2980
- }
2981
-
2982
- napi_status napi_create_buffer(napi_env env,
2983
- size_t length,
2984
- void** data,
2985
- napi_value* result) {
2986
- NAPI_PREAMBLE(env);
2987
- CHECK_ARG(env, result);
2988
-
2989
- auto maybe = node::Buffer::New(env->isolate, length);
2990
-
2991
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
2992
-
2993
- v8::Local<v8::Object> buffer = maybe.ToLocalChecked();
2994
-
2995
- *result = v8impl::JsValueFromV8LocalValue(buffer);
2996
-
2997
- if (data != nullptr) {
2998
- *data = node::Buffer::Data(buffer);
2999
- }
3000
-
3001
- return GET_RETURN_STATUS(env);
3002
- }
3003
-
3004
- napi_status napi_create_external_buffer(napi_env env,
3005
- size_t length,
3006
- void* data,
3007
- napi_finalize finalize_cb,
3008
- void* finalize_hint,
3009
- napi_value* result) {
3010
- NAPI_PREAMBLE(env);
3011
- CHECK_ARG(env, result);
3012
-
3013
- v8::Isolate* isolate = env->isolate;
3014
-
3015
- // The finalizer object will delete itself after invoking the callback.
3016
- v8impl::Finalizer* finalizer = v8impl::Finalizer::New(
3017
- env, finalize_cb, nullptr, finalize_hint);
3018
-
3019
- auto maybe = node::Buffer::New(isolate,
3020
- static_cast<char*>(data),
3021
- length,
3022
- v8impl::Finalizer::FinalizeBufferCallback,
3023
- finalizer);
3024
-
3025
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
3026
-
3027
- *result = v8impl::JsValueFromV8LocalValue(maybe.ToLocalChecked());
3028
- return GET_RETURN_STATUS(env);
3029
- // Tell coverity that 'finalizer' should not be freed when we return
3030
- // as it will be deleted when the buffer to which it is associated
3031
- // is finalized.
3032
- // coverity[leaked_storage]
3033
- }
3034
-
3035
- napi_status napi_create_buffer_copy(napi_env env,
3036
- size_t length,
3037
- const void* data,
3038
- void** result_data,
3039
- napi_value* result) {
3040
- NAPI_PREAMBLE(env);
3041
- CHECK_ARG(env, result);
3042
-
3043
- auto maybe = node::Buffer::Copy(env->isolate,
3044
- static_cast<const char*>(data), length);
3045
-
3046
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
3047
-
3048
- v8::Local<v8::Object> buffer = maybe.ToLocalChecked();
3049
- *result = v8impl::JsValueFromV8LocalValue(buffer);
3050
-
3051
- if (result_data != nullptr) {
3052
- *result_data = node::Buffer::Data(buffer);
3053
- }
3054
-
3055
- return GET_RETURN_STATUS(env);
3056
- }
3057
-
3058
- napi_status napi_is_buffer(napi_env env, napi_value value, bool* result) {
3059
- CHECK_ENV(env);
3060
- CHECK_ARG(env, value);
3061
- CHECK_ARG(env, result);
3062
-
3063
- *result = node::Buffer::HasInstance(v8impl::V8LocalValueFromJsValue(value));
3064
- return napi_clear_last_error(env);
3065
- }
3066
-
3067
- napi_status napi_get_buffer_info(napi_env env,
3068
- napi_value value,
3069
- void** data,
3070
- size_t* length) {
3071
- CHECK_ENV(env);
3072
- CHECK_ARG(env, value);
3073
-
3074
- v8::Local<v8::Value> buffer = v8impl::V8LocalValueFromJsValue(value);
3075
-
3076
- if (data != nullptr) {
3077
- *data = node::Buffer::Data(buffer);
3078
- }
3079
- if (length != nullptr) {
3080
- *length = node::Buffer::Length(buffer);
3081
- }
3082
-
3083
- return napi_clear_last_error(env);
3084
- }
3085
-
3086
- napi_status napi_is_arraybuffer(napi_env env, napi_value value, bool* result) {
3087
- CHECK_ENV(env);
3088
- CHECK_ARG(env, value);
3089
- CHECK_ARG(env, result);
3090
-
3091
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
3092
- *result = val->IsArrayBuffer();
3093
-
3094
- return napi_clear_last_error(env);
3095
- }
3096
-
3097
- napi_status napi_create_arraybuffer(napi_env env,
3098
- size_t byte_length,
3099
- void** data,
3100
- napi_value* result) {
3101
- NAPI_PREAMBLE(env);
3102
- CHECK_ARG(env, result);
3103
-
3104
- v8::Isolate* isolate = env->isolate;
3105
- v8::Local<v8::ArrayBuffer> buffer =
3106
- v8::ArrayBuffer::New(isolate, byte_length);
3107
-
3108
- // Optionally return a pointer to the buffer's data, to avoid another call to
3109
- // retrieve it.
3110
- if (data != nullptr) {
3111
- *data = buffer->GetContents().Data();
3112
- }
3113
-
3114
- *result = v8impl::JsValueFromV8LocalValue(buffer);
3115
- return GET_RETURN_STATUS(env);
3116
- }
3117
-
3118
- napi_status napi_create_external_arraybuffer(napi_env env,
3119
- void* external_data,
3120
- size_t byte_length,
3121
- napi_finalize finalize_cb,
3122
- void* finalize_hint,
3123
- napi_value* result) {
3124
- NAPI_PREAMBLE(env);
3125
- CHECK_ARG(env, result);
3126
-
3127
- v8::Isolate* isolate = env->isolate;
3128
- v8::Local<v8::ArrayBuffer> buffer =
3129
- v8::ArrayBuffer::New(isolate, external_data, byte_length);
3130
-
3131
- if (finalize_cb != nullptr) {
3132
- // Create a self-deleting weak reference that invokes the finalizer
3133
- // callback.
3134
- v8impl::Reference::New(env,
3135
- buffer,
3136
- 0,
3137
- true,
3138
- finalize_cb,
3139
- external_data,
3140
- finalize_hint);
3141
- }
3142
-
3143
- *result = v8impl::JsValueFromV8LocalValue(buffer);
3144
- return GET_RETURN_STATUS(env);
3145
- }
3146
-
3147
- napi_status napi_get_arraybuffer_info(napi_env env,
3148
- napi_value arraybuffer,
3149
- void** data,
3150
- size_t* byte_length) {
3151
- CHECK_ENV(env);
3152
- CHECK_ARG(env, arraybuffer);
3153
-
3154
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer);
3155
- RETURN_STATUS_IF_FALSE(env, value->IsArrayBuffer(), napi_invalid_arg);
3156
-
3157
- v8::ArrayBuffer::Contents contents =
3158
- value.As<v8::ArrayBuffer>()->GetContents();
3159
-
3160
- if (data != nullptr) {
3161
- *data = contents.Data();
3162
- }
3163
-
3164
- if (byte_length != nullptr) {
3165
- *byte_length = contents.ByteLength();
3166
- }
3167
-
3168
- return napi_clear_last_error(env);
3169
- }
3170
-
3171
- napi_status napi_is_typedarray(napi_env env, napi_value value, bool* result) {
3172
- CHECK_ENV(env);
3173
- CHECK_ARG(env, value);
3174
- CHECK_ARG(env, result);
3175
-
3176
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
3177
- *result = val->IsTypedArray();
3178
-
3179
- return napi_clear_last_error(env);
3180
- }
3181
-
3182
- napi_status napi_create_typedarray(napi_env env,
3183
- napi_typedarray_type type,
3184
- size_t length,
3185
- napi_value arraybuffer,
3186
- size_t byte_offset,
3187
- napi_value* result) {
3188
- NAPI_PREAMBLE(env);
3189
- CHECK_ARG(env, arraybuffer);
3190
- CHECK_ARG(env, result);
3191
-
3192
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer);
3193
- RETURN_STATUS_IF_FALSE(env, value->IsArrayBuffer(), napi_invalid_arg);
3194
-
3195
- v8::Local<v8::ArrayBuffer> buffer = value.As<v8::ArrayBuffer>();
3196
- v8::Local<v8::TypedArray> typedArray;
3197
-
3198
- switch (type) {
3199
- case napi_int8_array:
3200
- CREATE_TYPED_ARRAY(
3201
- env, Int8Array, 1, buffer, byte_offset, length, typedArray);
3202
- break;
3203
- case napi_uint8_array:
3204
- CREATE_TYPED_ARRAY(
3205
- env, Uint8Array, 1, buffer, byte_offset, length, typedArray);
3206
- break;
3207
- case napi_uint8_clamped_array:
3208
- CREATE_TYPED_ARRAY(
3209
- env, Uint8ClampedArray, 1, buffer, byte_offset, length, typedArray);
3210
- break;
3211
- case napi_int16_array:
3212
- CREATE_TYPED_ARRAY(
3213
- env, Int16Array, 2, buffer, byte_offset, length, typedArray);
3214
- break;
3215
- case napi_uint16_array:
3216
- CREATE_TYPED_ARRAY(
3217
- env, Uint16Array, 2, buffer, byte_offset, length, typedArray);
3218
- break;
3219
- case napi_int32_array:
3220
- CREATE_TYPED_ARRAY(
3221
- env, Int32Array, 4, buffer, byte_offset, length, typedArray);
3222
- break;
3223
- case napi_uint32_array:
3224
- CREATE_TYPED_ARRAY(
3225
- env, Uint32Array, 4, buffer, byte_offset, length, typedArray);
3226
- break;
3227
- case napi_float32_array:
3228
- CREATE_TYPED_ARRAY(
3229
- env, Float32Array, 4, buffer, byte_offset, length, typedArray);
3230
- break;
3231
- case napi_float64_array:
3232
- CREATE_TYPED_ARRAY(
3233
- env, Float64Array, 8, buffer, byte_offset, length, typedArray);
3234
- break;
3235
- default:
3236
- return napi_set_last_error(env, napi_invalid_arg);
3237
- }
3238
-
3239
- *result = v8impl::JsValueFromV8LocalValue(typedArray);
3240
- return GET_RETURN_STATUS(env);
3241
- }
3242
-
3243
- napi_status napi_get_typedarray_info(napi_env env,
3244
- napi_value typedarray,
3245
- napi_typedarray_type* type,
3246
- size_t* length,
3247
- void** data,
3248
- napi_value* arraybuffer,
3249
- size_t* byte_offset) {
3250
- CHECK_ENV(env);
3251
- CHECK_ARG(env, typedarray);
3252
-
3253
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(typedarray);
3254
- RETURN_STATUS_IF_FALSE(env, value->IsTypedArray(), napi_invalid_arg);
3255
-
3256
- v8::Local<v8::TypedArray> array = value.As<v8::TypedArray>();
3257
-
3258
- if (type != nullptr) {
3259
- if (value->IsInt8Array()) {
3260
- *type = napi_int8_array;
3261
- } else if (value->IsUint8Array()) {
3262
- *type = napi_uint8_array;
3263
- } else if (value->IsUint8ClampedArray()) {
3264
- *type = napi_uint8_clamped_array;
3265
- } else if (value->IsInt16Array()) {
3266
- *type = napi_int16_array;
3267
- } else if (value->IsUint16Array()) {
3268
- *type = napi_uint16_array;
3269
- } else if (value->IsInt32Array()) {
3270
- *type = napi_int32_array;
3271
- } else if (value->IsUint32Array()) {
3272
- *type = napi_uint32_array;
3273
- } else if (value->IsFloat32Array()) {
3274
- *type = napi_float32_array;
3275
- } else if (value->IsFloat64Array()) {
3276
- *type = napi_float64_array;
3277
- }
3278
- }
3279
-
3280
- if (length != nullptr) {
3281
- *length = array->Length();
3282
- }
3283
-
3284
- v8::Local<v8::ArrayBuffer> buffer = array->Buffer();
3285
- if (data != nullptr) {
3286
- *data = static_cast<uint8_t*>(buffer->GetContents().Data()) +
3287
- array->ByteOffset();
3288
- }
3289
-
3290
- if (arraybuffer != nullptr) {
3291
- *arraybuffer = v8impl::JsValueFromV8LocalValue(buffer);
3292
- }
3293
-
3294
- if (byte_offset != nullptr) {
3295
- *byte_offset = array->ByteOffset();
3296
- }
3297
-
3298
- return napi_clear_last_error(env);
3299
- }
3300
-
3301
- napi_status napi_create_dataview(napi_env env,
3302
- size_t byte_length,
3303
- napi_value arraybuffer,
3304
- size_t byte_offset,
3305
- napi_value* result) {
3306
- NAPI_PREAMBLE(env);
3307
- CHECK_ARG(env, arraybuffer);
3308
- CHECK_ARG(env, result);
3309
-
3310
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer);
3311
- RETURN_STATUS_IF_FALSE(env, value->IsArrayBuffer(), napi_invalid_arg);
3312
-
3313
- v8::Local<v8::ArrayBuffer> buffer = value.As<v8::ArrayBuffer>();
3314
- if (byte_length + byte_offset > buffer->ByteLength()) {
3315
- napi_throw_range_error(
3316
- env,
3317
- "ERR_NAPI_INVALID_DATAVIEW_ARGS",
3318
- "byte_offset + byte_length should be less than or "
3319
- "equal to the size in bytes of the array passed in");
3320
- return napi_set_last_error(env, napi_generic_failure);
3321
- }
3322
- v8::Local<v8::DataView> DataView = v8::DataView::New(buffer, byte_offset,
3323
- byte_length);
3324
-
3325
- *result = v8impl::JsValueFromV8LocalValue(DataView);
3326
- return GET_RETURN_STATUS(env);
3327
- }
3328
-
3329
- napi_status napi_is_dataview(napi_env env, napi_value value, bool* result) {
3330
- CHECK_ENV(env);
3331
- CHECK_ARG(env, value);
3332
- CHECK_ARG(env, result);
3333
-
3334
- v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
3335
- *result = val->IsDataView();
3336
-
3337
- return napi_clear_last_error(env);
3338
- }
3339
-
3340
- napi_status napi_get_dataview_info(napi_env env,
3341
- napi_value dataview,
3342
- size_t* byte_length,
3343
- void** data,
3344
- napi_value* arraybuffer,
3345
- size_t* byte_offset) {
3346
- CHECK_ENV(env);
3347
- CHECK_ARG(env, dataview);
3348
-
3349
- v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(dataview);
3350
- RETURN_STATUS_IF_FALSE(env, value->IsDataView(), napi_invalid_arg);
3351
-
3352
- v8::Local<v8::DataView> array = value.As<v8::DataView>();
3353
-
3354
- if (byte_length != nullptr) {
3355
- *byte_length = array->ByteLength();
3356
- }
3357
-
3358
- v8::Local<v8::ArrayBuffer> buffer = array->Buffer();
3359
- if (data != nullptr) {
3360
- *data = static_cast<uint8_t*>(buffer->GetContents().Data()) +
3361
- array->ByteOffset();
3362
- }
3363
-
3364
- if (arraybuffer != nullptr) {
3365
- *arraybuffer = v8impl::JsValueFromV8LocalValue(buffer);
3366
- }
3367
-
3368
- if (byte_offset != nullptr) {
3369
- *byte_offset = array->ByteOffset();
3370
- }
3371
-
3372
- return napi_clear_last_error(env);
3373
- }
3374
-
3375
- napi_status napi_get_version(napi_env env, uint32_t* result) {
3376
- CHECK_ENV(env);
3377
- CHECK_ARG(env, result);
3378
- *result = NAPI_VERSION;
3379
- return napi_clear_last_error(env);
3380
- }
3381
-
3382
- napi_status napi_get_node_version(napi_env env,
3383
- const napi_node_version** result) {
3384
- CHECK_ENV(env);
3385
- CHECK_ARG(env, result);
3386
- static const napi_node_version version = {
3387
- NODE_MAJOR_VERSION,
3388
- NODE_MINOR_VERSION,
3389
- NODE_PATCH_VERSION,
3390
- NODE_RELEASE
3391
- };
3392
- *result = &version;
3393
- return napi_clear_last_error(env);
3394
- }
3395
-
3396
- napi_status napi_adjust_external_memory(napi_env env,
3397
- int64_t change_in_bytes,
3398
- int64_t* adjusted_value) {
3399
- CHECK_ENV(env);
3400
- CHECK_ARG(env, adjusted_value);
3401
-
3402
- *adjusted_value = env->isolate->AdjustAmountOfExternalAllocatedMemory(
3403
- change_in_bytes);
3404
-
3405
- return napi_clear_last_error(env);
3406
- }
3407
-
3408
- namespace {
3409
- namespace uvimpl {
3410
-
3411
- static napi_status ConvertUVErrorCode(int code) {
3412
- switch (code) {
3413
- case 0:
3414
- return napi_ok;
3415
- case UV_EINVAL:
3416
- return napi_invalid_arg;
3417
- case UV_ECANCELED:
3418
- return napi_cancelled;
3419
- }
3420
-
3421
- return napi_generic_failure;
3422
- }
3423
-
3424
- // Wrapper around uv_work_t which calls user-provided callbacks.
3425
- class Work : public node::AsyncResource {
3426
- private:
3427
- explicit Work(napi_env env,
3428
- v8::Local<v8::Object> async_resource,
3429
- v8::Local<v8::String> async_resource_name,
3430
- napi_async_execute_callback execute,
3431
- napi_async_complete_callback complete = nullptr,
3432
- void* data = nullptr)
3433
- : AsyncResource(env->isolate,
3434
- async_resource,
3435
- *v8::String::Utf8Value(async_resource_name)),
3436
- _env(env),
3437
- _data(data),
3438
- _execute(execute),
3439
- _complete(complete) {
3440
- memset(&_request, 0, sizeof(_request));
3441
- _request.data = this;
3442
- }
3443
-
3444
- ~Work() { }
3445
-
3446
- public:
3447
- static Work* New(napi_env env,
3448
- v8::Local<v8::Object> async_resource,
3449
- v8::Local<v8::String> async_resource_name,
3450
- napi_async_execute_callback execute,
3451
- napi_async_complete_callback complete,
3452
- void* data) {
3453
- return new Work(env, async_resource, async_resource_name,
3454
- execute, complete, data);
3455
- }
3456
-
3457
- static void Delete(Work* work) {
3458
- delete work;
3459
- }
3460
-
3461
- static void ExecuteCallback(uv_work_t* req) {
3462
- Work* work = static_cast<Work*>(req->data);
3463
- work->_execute(work->_env, work->_data);
3464
- }
3465
-
3466
- static void CompleteCallback(uv_work_t* req, int status) {
3467
- Work* work = static_cast<Work*>(req->data);
3468
-
3469
- if (work->_complete != nullptr) {
3470
- napi_env env = work->_env;
3471
-
3472
- // Establish a handle scope here so that every callback doesn't have to.
3473
- // Also it is needed for the exception-handling below.
3474
- v8::HandleScope scope(env->isolate);
3475
- CallbackScope callback_scope(work);
3476
-
3477
- NAPI_CALL_INTO_MODULE(env,
3478
- work->_complete(env, ConvertUVErrorCode(status), work->_data),
3479
- [env] (v8::Local<v8::Value> local_err) {
3480
- // If there was an unhandled exception in the complete callback,
3481
- // report it as a fatal exception. (There is no JavaScript on the
3482
- // callstack that can possibly handle it.)
3483
- v8impl::trigger_fatal_exception(env, local_err);
3484
- });
3485
-
3486
- // Note: Don't access `work` after this point because it was
3487
- // likely deleted by the complete callback.
3488
- }
3489
- }
3490
-
3491
- uv_work_t* Request() {
3492
- return &_request;
3493
- }
3494
-
3495
- private:
3496
- napi_env _env;
3497
- void* _data;
3498
- uv_work_t _request;
3499
- napi_async_execute_callback _execute;
3500
- napi_async_complete_callback _complete;
3501
- };
3502
-
3503
- } // end of namespace uvimpl
3504
- } // end of anonymous namespace
3505
-
3506
- #define CALL_UV(env, condition) \
3507
- do { \
3508
- int result = (condition); \
3509
- napi_status status = uvimpl::ConvertUVErrorCode(result); \
3510
- if (status != napi_ok) { \
3511
- return napi_set_last_error(env, status, result); \
3512
- } \
3513
- } while (0)
3514
-
3515
- napi_status napi_create_async_work(napi_env env,
3516
- napi_value async_resource,
3517
- napi_value async_resource_name,
3518
- napi_async_execute_callback execute,
3519
- napi_async_complete_callback complete,
3520
- void* data,
3521
- napi_async_work* result) {
3522
- CHECK_ENV(env);
3523
- CHECK_ARG(env, execute);
3524
- CHECK_ARG(env, result);
3525
-
3526
- v8::Local<v8::Context> context = env->isolate->GetCurrentContext();
3527
-
3528
- v8::Local<v8::Object> resource;
3529
- if (async_resource != nullptr) {
3530
- CHECK_TO_OBJECT(env, context, resource, async_resource);
3531
- } else {
3532
- resource = v8::Object::New(env->isolate);
3533
- }
3534
-
3535
- v8::Local<v8::String> resource_name;
3536
- CHECK_TO_STRING(env, context, resource_name, async_resource_name);
3537
-
3538
- uvimpl::Work* work =
3539
- uvimpl::Work::New(env, resource, resource_name,
3540
- execute, complete, data);
3541
-
3542
- *result = reinterpret_cast<napi_async_work>(work);
3543
-
3544
- return napi_clear_last_error(env);
3545
- }
3546
-
3547
- napi_status napi_delete_async_work(napi_env env, napi_async_work work) {
3548
- CHECK_ENV(env);
3549
- CHECK_ARG(env, work);
3550
-
3551
- uvimpl::Work::Delete(reinterpret_cast<uvimpl::Work*>(work));
3552
-
3553
- return napi_clear_last_error(env);
3554
- }
3555
-
3556
- napi_status napi_queue_async_work(napi_env env, napi_async_work work) {
3557
- CHECK_ENV(env);
3558
- CHECK_ARG(env, work);
3559
-
3560
- // Consider: Encapsulate the uv_loop_t into an opaque pointer parameter.
3561
- // Currently the environment event loop is the same as the UV default loop.
3562
- // Someday (if node ever supports multiple isolates), it may be better to get
3563
- // the loop from node::Environment::GetCurrent(env->isolate)->event_loop();
3564
- uv_loop_t* event_loop = uv_default_loop();
3565
-
3566
- uvimpl::Work* w = reinterpret_cast<uvimpl::Work*>(work);
3567
-
3568
- CALL_UV(env, uv_queue_work(event_loop,
3569
- w->Request(),
3570
- uvimpl::Work::ExecuteCallback,
3571
- uvimpl::Work::CompleteCallback));
3572
-
3573
- return napi_clear_last_error(env);
3574
- }
3575
-
3576
- napi_status napi_cancel_async_work(napi_env env, napi_async_work work) {
3577
- CHECK_ENV(env);
3578
- CHECK_ARG(env, work);
3579
-
3580
- uvimpl::Work* w = reinterpret_cast<uvimpl::Work*>(work);
3581
-
3582
- CALL_UV(env, uv_cancel(reinterpret_cast<uv_req_t*>(w->Request())));
3583
-
3584
- return napi_clear_last_error(env);
3585
- }
3586
-
3587
- napi_status napi_create_promise(napi_env env,
3588
- napi_deferred* deferred,
3589
- napi_value* promise) {
3590
- NAPI_PREAMBLE(env);
3591
- CHECK_ARG(env, deferred);
3592
- CHECK_ARG(env, promise);
3593
-
3594
- auto maybe = v8::Promise::Resolver::New(env->isolate->GetCurrentContext());
3595
- CHECK_MAYBE_EMPTY(env, maybe, napi_generic_failure);
3596
-
3597
- auto v8_resolver = maybe.ToLocalChecked();
3598
- auto v8_deferred = new v8::Persistent<v8::Value>();
3599
- v8_deferred->Reset(env->isolate, v8_resolver);
3600
-
3601
- *deferred = v8impl::JsDeferredFromV8Persistent(v8_deferred);
3602
- *promise = v8impl::JsValueFromV8LocalValue(v8_resolver->GetPromise());
3603
- return GET_RETURN_STATUS(env);
3604
- }
3605
-
3606
- napi_status napi_resolve_deferred(napi_env env,
3607
- napi_deferred deferred,
3608
- napi_value resolution) {
3609
- return v8impl::ConcludeDeferred(env, deferred, resolution, true);
3610
- }
3611
-
3612
- napi_status napi_reject_deferred(napi_env env,
3613
- napi_deferred deferred,
3614
- napi_value resolution) {
3615
- return v8impl::ConcludeDeferred(env, deferred, resolution, false);
3616
- }
3617
-
3618
- napi_status napi_is_promise(napi_env env,
3619
- napi_value promise,
3620
- bool* is_promise) {
3621
- CHECK_ENV(env);
3622
- CHECK_ARG(env, promise);
3623
- CHECK_ARG(env, is_promise);
3624
-
3625
- *is_promise = v8impl::V8LocalValueFromJsValue(promise)->IsPromise();
3626
-
3627
- return napi_clear_last_error(env);
3628
- }
3629
-
3630
- napi_status napi_run_script(napi_env env,
3631
- napi_value script,
3632
- napi_value* result) {
3633
- NAPI_PREAMBLE(env);
3634
- CHECK_ARG(env, script);
3635
- CHECK_ARG(env, result);
3636
-
3637
- v8::Local<v8::Value> v8_script = v8impl::V8LocalValueFromJsValue(script);
3638
-
3639
- if (!v8_script->IsString()) {
3640
- return napi_set_last_error(env, napi_string_expected);
3641
- }
3642
-
3643
- v8::Local<v8::Context> context = env->isolate->GetCurrentContext();
3644
-
3645
- auto maybe_script = v8::Script::Compile(context,
3646
- v8::Local<v8::String>::Cast(v8_script));
3647
- CHECK_MAYBE_EMPTY(env, maybe_script, napi_generic_failure);
3648
-
3649
- auto script_result =
3650
- maybe_script.ToLocalChecked()->Run(context);
3651
- CHECK_MAYBE_EMPTY(env, script_result, napi_generic_failure);
3652
-
3653
- *result = v8impl::JsValueFromV8LocalValue(script_result.ToLocalChecked());
3654
- return GET_RETURN_STATUS(env);
3655
- }