@cloudbase/manager-node 4.3.2 → 4.3.4

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 (223) hide show
  1. package/lib/agent/index.js +70 -0
  2. package/lib/agent/type.js +2 -0
  3. package/lib/cloudrun/index.js +4 -36
  4. package/lib/environment.js +5 -0
  5. package/lib/function/index.js +9 -1
  6. package/lib/index.js +3 -0
  7. package/lib/utils/index.js +60 -3
  8. package/package.json +1 -1
  9. package/types/agent/index.d.ts +20 -0
  10. package/types/agent/type.d.ts +22 -0
  11. package/types/cloudrun/index.d.ts +3 -0
  12. package/types/environment.d.ts +3 -0
  13. package/types/index.d.ts +2 -0
  14. package/types/utils/index.d.ts +26 -2
  15. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/.ready +0 -0
  16. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/.travis.yml +0 -103
  17. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/ISSUE_TEMPLATE.md +0 -8
  18. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/LICENSE +0 -22
  19. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/Readme.md +0 -78
  20. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/binding.gyp +0 -21
  21. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/fsevents.cc +0 -88
  22. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/fsevents.js +0 -108
  23. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/install.js +0 -13
  24. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/package.json +0 -34
  25. package/.yarn/unplugged/fsevents-patch-61ccaa93a2/node_modules/fsevents/vfs.js +0 -76
  26. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/.eslintrc.js +0 -20
  27. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/.prettierrc +0 -4
  28. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/.ready +0 -0
  29. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/CHANGELOG.md +0 -310
  30. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/LICENSE +0 -21
  31. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/README.md +0 -344
  32. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/husky.js +0 -15
  33. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/checkGitDirEnv.js +0 -13
  34. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/debug.js +0 -8
  35. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/getConf.js +0 -15
  36. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/installer/bin.js +0 -48
  37. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/installer/getScript.js +0 -106
  38. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/installer/gitRevParse.js +0 -29
  39. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/installer/index.js +0 -151
  40. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/installer/is.js +0 -24
  41. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/runner/bin.js +0 -16
  42. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/runner/index.js +0 -84
  43. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/upgrader/bin.js +0 -8
  44. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/lib/upgrader/index.js +0 -65
  45. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/package.json +0 -114
  46. package/.yarn/unplugged/husky-npm-3.1.0-5cc13e4e34/node_modules/husky/run.js +0 -14
  47. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/.github/workflows/ci.yml +0 -52
  48. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/.ready +0 -0
  49. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/CHANGELOG.md +0 -577
  50. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/CMakeLists.txt +0 -138
  51. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/LICENSE.md +0 -9
  52. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/README.md +0 -455
  53. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/asyncworker.md +0 -146
  54. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/buffers.md +0 -54
  55. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/callback.md +0 -76
  56. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/converters.md +0 -41
  57. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/errors.md +0 -226
  58. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/json.md +0 -62
  59. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/maybe_types.md +0 -583
  60. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/methods.md +0 -672
  61. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/new.md +0 -147
  62. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/node_misc.md +0 -123
  63. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/object_wrappers.md +0 -263
  64. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/persistent.md +0 -296
  65. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/scopes.md +0 -73
  66. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/script.md +0 -58
  67. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/string_bytes.md +0 -62
  68. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/v8_internals.md +0 -199
  69. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/doc/v8_misc.md +0 -85
  70. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/include_dirs.js +0 -1
  71. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan.h +0 -3049
  72. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_callbacks.h +0 -128
  73. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_callbacks_12_inl.h +0 -676
  74. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
  75. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_converters.h +0 -72
  76. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_converters_43_inl.h +0 -68
  77. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  78. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_define_own_property_helper.h +0 -29
  79. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_implementation_12_inl.h +0 -430
  80. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  81. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_json.h +0 -166
  82. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_maybe_43_inl.h +0 -356
  83. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  84. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_new.h +0 -340
  85. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_object_wrap.h +0 -156
  86. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_persistent_12_inl.h +0 -132
  87. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  88. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_private.h +0 -73
  89. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_scriptorigin.h +0 -95
  90. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_string_bytes.h +0 -305
  91. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_typedarray_contents.h +0 -96
  92. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/nan_weak.h +0 -437
  93. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/package.json +0 -38
  94. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/tools/1to2.js +0 -412
  95. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/tools/README.md +0 -14
  96. package/.yarn/unplugged/nan-npm-2.22.2-bb092bb459/node_modules/nan/tools/package.json +0 -19
  97. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/.ready +0 -0
  98. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/.release-please-manifest.json +0 -3
  99. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/CHANGELOG.md +0 -1053
  100. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/CODE_OF_CONDUCT.md +0 -4
  101. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/CONTRIBUTING.md +0 -34
  102. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/LICENSE +0 -24
  103. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/README.md +0 -273
  104. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/SECURITY.md +0 -2
  105. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/addon.gypi +0 -204
  106. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/bin/node-gyp.js +0 -138
  107. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/eslint.config.js +0 -3
  108. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/.release-please-manifest.json +0 -3
  109. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/LICENSE +0 -28
  110. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/data/ninja/build.ninja +0 -4
  111. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +0 -12
  112. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/gyp +0 -8
  113. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/gyp.bat +0 -5
  114. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/gyp_main.py +0 -45
  115. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -365
  116. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
  117. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1272
  118. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
  119. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
  120. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -152
  121. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -270
  122. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
  123. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -704
  124. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -709
  125. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -173
  126. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -169
  127. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -113
  128. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
  129. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
  130. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -805
  131. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1172
  132. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1319
  133. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -128
  134. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -104
  135. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -462
  136. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
  137. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -56
  138. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2745
  139. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3976
  140. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
  141. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2965
  142. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -67
  143. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1391
  144. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -26
  145. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3112
  146. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -99
  147. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -767
  148. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1260
  149. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
  150. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
  151. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -373
  152. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1939
  153. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +0 -54
  154. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -303
  155. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3196
  156. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
  157. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +0 -3
  158. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +0 -177
  159. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +0 -23
  160. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +0 -15
  161. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +0 -108
  162. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +0 -252
  163. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +0 -83
  164. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +0 -359
  165. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +0 -61
  166. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +0 -192
  167. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/markers.py +0 -252
  168. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +0 -825
  169. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  170. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +0 -90
  171. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +0 -1030
  172. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/tags.py +0 -553
  173. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/utils.py +0 -172
  174. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pylib/packaging/version.py +0 -563
  175. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/pyproject.toml +0 -115
  176. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/release-please-config.json +0 -11
  177. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/gyp/test_gyp.py +0 -261
  178. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/Find-VisualStudio.cs +0 -250
  179. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/build.js +0 -230
  180. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/clean.js +0 -15
  181. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/configure.js +0 -328
  182. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/create-config-gypi.js +0 -153
  183. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/download.js +0 -39
  184. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/find-node-directory.js +0 -63
  185. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/find-python.js +0 -310
  186. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/find-visualstudio.js +0 -600
  187. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/install.js +0 -415
  188. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/list.js +0 -26
  189. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/log.js +0 -168
  190. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/node-gyp.js +0 -188
  191. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/process-release.js +0 -146
  192. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/rebuild.js +0 -12
  193. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/remove.js +0 -43
  194. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/lib/util.js +0 -81
  195. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/macOS_Catalina_acid_test.sh +0 -21
  196. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/package.json +0 -52
  197. package/.yarn/unplugged/node-gyp-npm-11.2.0-36aeb0fa50/node_modules/node-gyp/release-please-config.json +0 -40
  198. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/.prettierrc +0 -4
  199. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/.ready +0 -0
  200. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/CHANGELOG.md +0 -286
  201. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/LICENSE +0 -21
  202. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/README.md +0 -457
  203. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/index.js +0 -52
  204. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/lib/checkGrowl.js +0 -24
  205. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/lib/utils.js +0 -515
  206. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/notifiers/balloon.js +0 -156
  207. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/notifiers/growl.js +0 -76
  208. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/notifiers/notificationcenter.js +0 -100
  209. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/notifiers/notifysend.js +0 -94
  210. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/notifiers/toaster.js +0 -100
  211. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/package.json +0 -72
  212. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist +0 -63
  213. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier +0 -0
  214. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/PkgInfo +0 -1
  215. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/Terminal.icns +0 -0
  216. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf +0 -29
  217. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/InfoPlist.strings +0 -0
  218. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib +0 -0
  219. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/notifu/notifu.exe +0 -0
  220. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/notifu/notifu64.exe +0 -0
  221. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/snoreToast/LICENSE +0 -165
  222. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe +0 -0
  223. package/.yarn/unplugged/node-notifier-npm-5.4.5-0ff6280985/node_modules/node-notifier/vendor/terminal-notifier-LICENSE +0 -9
@@ -1,147 +0,0 @@
1
- ## New
2
-
3
- NAN provides a `Nan::New()` helper for the creation of new JavaScript objects in a way that's compatible across the supported versions of V8.
4
-
5
- - <a href="#api_nan_new"><b><code>Nan::New()</code></b></a>
6
- - <a href="#api_nan_undefined"><b><code>Nan::Undefined()</code></b></a>
7
- - <a href="#api_nan_null"><b><code>Nan::Null()</code></b></a>
8
- - <a href="#api_nan_true"><b><code>Nan::True()</code></b></a>
9
- - <a href="#api_nan_false"><b><code>Nan::False()</code></b></a>
10
- - <a href="#api_nan_empty_string"><b><code>Nan::EmptyString()</code></b></a>
11
-
12
-
13
- <a name="api_nan_new"></a>
14
- ### Nan::New()
15
-
16
- `Nan::New()` should be used to instantiate new JavaScript objects.
17
-
18
- Refer to the specific V8 type in the [V8 documentation](https://v8docs.nodesource.com/node-8.16/d1/d83/classv8_1_1_data.html) for information on the types of arguments required for instantiation.
19
-
20
- Signatures:
21
-
22
- Return types are mostly omitted from the signatures for simplicity. In most cases the type will be contained within a `v8::Local<T>`. The following types will be contained within a `Nan::MaybeLocal<T>`: `v8::String`, `v8::Date`, `v8::RegExp`, `v8::Script`, `v8::UnboundScript`.
23
-
24
- Empty objects:
25
-
26
- ```c++
27
- Nan::New<T>();
28
- ```
29
-
30
- Generic single and multiple-argument:
31
-
32
- ```c++
33
- Nan::New<T>(A0 arg0);
34
- Nan::New<T>(A0 arg0, A1 arg1);
35
- Nan::New<T>(A0 arg0, A1 arg1, A2 arg2);
36
- Nan::New<T>(A0 arg0, A1 arg1, A2 arg2, A3 arg3);
37
- ```
38
-
39
- For creating `v8::FunctionTemplate` and `v8::Function` objects:
40
-
41
- _The definition of `Nan::FunctionCallback` can be found in the [Method declaration](./methods.md#api_nan_method) documentation._
42
-
43
- ```c++
44
- Nan::New<T>(Nan::FunctionCallback callback,
45
- v8::Local<v8::Value> data = v8::Local<v8::Value>());
46
- Nan::New<T>(Nan::FunctionCallback callback,
47
- v8::Local<v8::Value> data = v8::Local<v8::Value>(),
48
- A2 a2 = A2());
49
- ```
50
-
51
- Native number types:
52
-
53
- ```c++
54
- v8::Local<v8::Boolean> Nan::New<T>(bool value);
55
- v8::Local<v8::Int32> Nan::New<T>(int32_t value);
56
- v8::Local<v8::Uint32> Nan::New<T>(uint32_t value);
57
- v8::Local<v8::Number> Nan::New<T>(double value);
58
- ```
59
-
60
- String types:
61
-
62
- ```c++
63
- Nan::MaybeLocal<v8::String> Nan::New<T>(std::string const& value);
64
- Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value, int length);
65
- Nan::MaybeLocal<v8::String> Nan::New<T>(const char * value);
66
- Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value);
67
- Nan::MaybeLocal<v8::String> Nan::New<T>(const uint16_t * value, int length);
68
- ```
69
-
70
- Specialized types:
71
-
72
- ```c++
73
- v8::Local<v8::String> Nan::New<T>(v8::String::ExternalStringResource * value);
74
- v8::Local<v8::String> Nan::New<T>(Nan::ExternalOneByteStringResource * value);
75
- v8::Local<v8::RegExp> Nan::New<T>(v8::Local<v8::String> pattern, v8::RegExp::Flags flags);
76
- ```
77
-
78
- Note that `Nan::ExternalOneByteStringResource` maps to [`v8::String::ExternalOneByteStringResource`](https://v8docs.nodesource.com/node-8.16/d9/db3/classv8_1_1_string_1_1_external_one_byte_string_resource.html), and `v8::String::ExternalAsciiStringResource` in older versions of V8.
79
-
80
-
81
- <a name="api_nan_undefined"></a>
82
- ### Nan::Undefined()
83
-
84
- A helper method to reference the `v8::Undefined` object in a way that is compatible across all supported versions of V8.
85
-
86
- Signature:
87
-
88
- ```c++
89
- v8::Local<v8::Primitive> Nan::Undefined()
90
- ```
91
-
92
- <a name="api_nan_null"></a>
93
- ### Nan::Null()
94
-
95
- A helper method to reference the `v8::Null` object in a way that is compatible across all supported versions of V8.
96
-
97
- Signature:
98
-
99
- ```c++
100
- v8::Local<v8::Primitive> Nan::Null()
101
- ```
102
-
103
- <a name="api_nan_true"></a>
104
- ### Nan::True()
105
-
106
- A helper method to reference the `v8::Boolean` object representing the `true` value in a way that is compatible across all supported versions of V8.
107
-
108
- Signature:
109
-
110
- ```c++
111
- v8::Local<v8::Boolean> Nan::True()
112
- ```
113
-
114
- <a name="api_nan_false"></a>
115
- ### Nan::False()
116
-
117
- A helper method to reference the `v8::Boolean` object representing the `false` value in a way that is compatible across all supported versions of V8.
118
-
119
- Signature:
120
-
121
- ```c++
122
- v8::Local<v8::Boolean> Nan::False()
123
- ```
124
-
125
- <a name="api_nan_empty_string"></a>
126
- ### Nan::EmptyString()
127
-
128
- Call [`v8::String::Empty`](https://v8docs.nodesource.com/node-8.16/d2/db3/classv8_1_1_string.html#a7c1bc8886115d7ee46f1d571dd6ebc6d) to reference the empty string in a way that is compatible across all supported versions of V8.
129
-
130
- Signature:
131
-
132
- ```c++
133
- v8::Local<v8::String> Nan::EmptyString()
134
- ```
135
-
136
-
137
- <a name="api_nan_new_one_byte_string"></a>
138
- ### Nan::NewOneByteString()
139
-
140
- An implementation of [`v8::String::NewFromOneByte()`](https://v8docs.nodesource.com/node-8.16/d2/db3/classv8_1_1_string.html#a5264d50b96d2c896ce525a734dc10f09) provided for consistent availability and API across supported versions of V8. Allocates a new string from Latin-1 data.
141
-
142
- Signature:
143
-
144
- ```c++
145
- Nan::MaybeLocal<v8::String> Nan::NewOneByteString(const uint8_t * value,
146
- int length = -1)
147
- ```
@@ -1,123 +0,0 @@
1
- ## Miscellaneous Node Helpers
2
-
3
- - <a href="#api_nan_asyncresource"><b><code>Nan::AsyncResource</code></b></a>
4
- - <a href="#api_nan_make_callback"><b><code>Nan::MakeCallback()</code></b></a>
5
- - <a href="#api_nan_module_init"><b><code>NAN_MODULE_INIT()</code></b></a>
6
- - <a href="#api_nan_export"><b><code>Nan::Export()</code></b></a>
7
-
8
- <a name="api_nan_asyncresource"></a>
9
- ### Nan::AsyncResource
10
-
11
- This class is analogous to the `AsyncResource` JavaScript class exposed by Node's [async_hooks][] API.
12
-
13
- When calling back into JavaScript asynchronously, special care must be taken to ensure that the runtime can properly track
14
- async hops. `Nan::AsyncResource` is a class that provides an RAII wrapper around `node::EmitAsyncInit`, `node::EmitAsyncDestroy`,
15
- and `node::MakeCallback`. Using this mechanism to call back into JavaScript, as opposed to `Nan::MakeCallback` or
16
- `v8::Function::Call` ensures that the callback is executed in the correct async context. This ensures that async mechanisms
17
- such as domains and [async_hooks][] function correctly.
18
-
19
- Definition:
20
-
21
- ```c++
22
- class AsyncResource {
23
- public:
24
- AsyncResource(v8::Local<v8::String> name,
25
- v8::Local<v8::Object> resource = New<v8::Object>());
26
- AsyncResource(const char* name,
27
- v8::Local<v8::Object> resource = New<v8::Object>());
28
- ~AsyncResource();
29
-
30
- v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
31
- v8::Local<v8::Function> func,
32
- int argc,
33
- v8::Local<v8::Value>* argv);
34
- v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
35
- v8::Local<v8::String> symbol,
36
- int argc,
37
- v8::Local<v8::Value>* argv);
38
- v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
39
- const char* method,
40
- int argc,
41
- v8::Local<v8::Value>* argv);
42
- };
43
- ```
44
-
45
- * `name`: Identifier for the kind of resource that is being provided for diagnostics information exposed by the [async_hooks][]
46
- API. This will be passed to the possible `init` hook as the `type`. To avoid name collisions with other modules we recommend
47
- that the name include the name of the owning module as a prefix. For example `mysql` module could use something like
48
- `mysql:batch-db-query-resource`.
49
- * `resource`: An optional object associated with the async work that will be passed to the possible [async_hooks][]
50
- `init` hook. If this parameter is omitted, or an empty handle is provided, this object will be created automatically.
51
- * When calling JS on behalf of this resource, one can use `runInAsyncScope`. This will ensure that the callback runs in the
52
- correct async execution context.
53
- * `AsyncDestroy` is automatically called when an AsyncResource object is destroyed.
54
-
55
- For more details, see the Node [async_hooks][] documentation. You might also want to take a look at the documentation for the
56
- [N-API counterpart][napi]. For example usage, see the `asyncresource.cpp` example in the `test/cpp` directory.
57
-
58
- <a name="api_nan_make_callback"></a>
59
- ### Nan::MakeCallback()
60
-
61
- Deprecated wrappers around the legacy `node::MakeCallback()` APIs. Node.js 10+
62
- has deprecated these legacy APIs as they do not provide a mechanism to preserve
63
- async context.
64
-
65
- We recommend that you use the `AsyncResource` class and `AsyncResource::runInAsyncScope` instead of using `Nan::MakeCallback` or
66
- `v8::Function#Call()` directly. `AsyncResource` properly takes care of running the callback in the correct async execution
67
- context – something that is essential for functionality like domains, async_hooks and async debugging.
68
-
69
- Signatures:
70
-
71
- ```c++
72
- NAN_DEPRECATED
73
- v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
74
- v8::Local<v8::Function> func,
75
- int argc,
76
- v8::Local<v8::Value>* argv);
77
- NAN_DEPRECATED
78
- v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
79
- v8::Local<v8::String> symbol,
80
- int argc,
81
- v8::Local<v8::Value>* argv);
82
- NAN_DEPRECATED
83
- v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object> target,
84
- const char* method,
85
- int argc,
86
- v8::Local<v8::Value>* argv);
87
- ```
88
-
89
-
90
- <a name="api_nan_module_init"></a>
91
- ### NAN_MODULE_INIT()
92
-
93
- Used to define the entry point function to a Node add-on. Creates a function with a given `name` that receives a `target` object representing the equivalent of the JavaScript `exports` object.
94
-
95
- See example below.
96
-
97
- <a name="api_nan_export"></a>
98
- ### Nan::Export()
99
-
100
- A simple helper to register a `v8::FunctionTemplate` from a JavaScript-accessible method (see [Methods](./methods.md)) as a property on an object. Can be used in a way similar to assigning properties to `module.exports` in JavaScript.
101
-
102
- Signature:
103
-
104
- ```c++
105
- void Export(v8::Local<v8::Object> target, const char *name, Nan::FunctionCallback f)
106
- ```
107
-
108
- Also available as the shortcut `NAN_EXPORT` macro.
109
-
110
- Example:
111
-
112
- ```c++
113
- NAN_METHOD(Foo) {
114
- ...
115
- }
116
-
117
- NAN_MODULE_INIT(Init) {
118
- NAN_EXPORT(target, Foo);
119
- }
120
- ```
121
-
122
- [async_hooks]: https://nodejs.org/dist/latest-v9.x/docs/api/async_hooks.html
123
- [napi]: https://nodejs.org/dist/latest-v9.x/docs/api/n-api.html#n_api_custom_asynchronous_operations
@@ -1,263 +0,0 @@
1
- ## Object Wrappers
2
-
3
- The `ObjectWrap` class can be used to make wrapped C++ objects and a factory of wrapped objects.
4
-
5
- - <a href="#api_nan_object_wrap"><b><code>Nan::ObjectWrap</code></b></a>
6
-
7
-
8
- <a name="api_nan_object_wrap"></a>
9
- ### Nan::ObjectWrap()
10
-
11
- A reimplementation of `node::ObjectWrap` that adds some API not present in older versions of Node. Should be preferred over `node::ObjectWrap` in all cases for consistency.
12
-
13
- Definition:
14
-
15
- ```c++
16
- class ObjectWrap {
17
- public:
18
- ObjectWrap();
19
-
20
- virtual ~ObjectWrap();
21
-
22
- template <class T>
23
- static inline T* Unwrap(v8::Local<v8::Object> handle);
24
-
25
- inline v8::Local<v8::Object> handle();
26
-
27
- inline Nan::Persistent<v8::Object>& persistent();
28
-
29
- protected:
30
- inline void Wrap(v8::Local<v8::Object> handle);
31
-
32
- inline void MakeWeak();
33
-
34
- /* Ref() marks the object as being attached to an event loop.
35
- * Refed objects will not be garbage collected, even if
36
- * all references are lost.
37
- */
38
- virtual void Ref();
39
-
40
- /* Unref() marks an object as detached from the event loop. This is its
41
- * default state. When an object with a "weak" reference changes from
42
- * attached to detached state it will be freed. Be careful not to access
43
- * the object after making this call as it might be gone!
44
- * (A "weak reference" means an object that only has a
45
- * persistent handle.)
46
- *
47
- * DO NOT CALL THIS FROM DESTRUCTOR
48
- */
49
- virtual void Unref();
50
-
51
- int refs_; // ro
52
- };
53
- ```
54
-
55
- See the Node documentation on [Wrapping C++ Objects](https://nodejs.org/api/addons.html#addons_wrapping_c_objects) for more details.
56
-
57
- ### This vs. Holder
58
-
59
- When calling `Unwrap`, it is important that the argument is indeed some JavaScript object which got wrapped by a `Wrap` call for this class or any derived class.
60
- The `Signature` installed by [`Nan::SetPrototypeMethod()`](methods.md#api_nan_set_prototype_method) does ensure that `info.Holder()` is just such an instance.
61
- In Node 0.12 and later, `info.This()` will also be of such a type, since otherwise the invocation will get rejected.
62
- However, in Node 0.10 and before it was possible to invoke a method on a JavaScript object which just had the extension type in its prototype chain.
63
- In such a situation, calling `Unwrap` on `info.This()` will likely lead to a failed assertion causing a crash, but could lead to even more serious corruption.
64
-
65
- On the other hand, calling `Unwrap` in an [accessor](methods.md#api_nan_set_accessor) should not use `Holder()` if the accessor is defined on the prototype.
66
- So either define your accessors on the instance template,
67
- or use `This()` after verifying that it is indeed a valid object.
68
-
69
- ### Examples
70
-
71
- #### Basic
72
-
73
- ```c++
74
- class MyObject : public Nan::ObjectWrap {
75
- public:
76
- static NAN_MODULE_INIT(Init) {
77
- v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
78
- tpl->SetClassName(Nan::New("MyObject").ToLocalChecked());
79
- tpl->InstanceTemplate()->SetInternalFieldCount(1);
80
-
81
- Nan::SetPrototypeMethod(tpl, "getHandle", GetHandle);
82
- Nan::SetPrototypeMethod(tpl, "getValue", GetValue);
83
-
84
- constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
85
- Nan::Set(target, Nan::New("MyObject").ToLocalChecked(),
86
- Nan::GetFunction(tpl).ToLocalChecked());
87
- }
88
-
89
- private:
90
- explicit MyObject(double value = 0) : value_(value) {}
91
- ~MyObject() {}
92
-
93
- static NAN_METHOD(New) {
94
- if (info.IsConstructCall()) {
95
- double value = info[0]->IsUndefined() ? 0 : Nan::To<double>(info[0]).FromJust();
96
- MyObject *obj = new MyObject(value);
97
- obj->Wrap(info.This());
98
- info.GetReturnValue().Set(info.This());
99
- } else {
100
- const int argc = 1;
101
- v8::Local<v8::Value> argv[argc] = {info[0]};
102
- v8::Local<v8::Function> cons = Nan::New(constructor());
103
- info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
104
- }
105
- }
106
-
107
- static NAN_METHOD(GetHandle) {
108
- MyObject* obj = Nan::ObjectWrap::Unwrap<MyObject>(info.Holder());
109
- info.GetReturnValue().Set(obj->handle());
110
- }
111
-
112
- static NAN_METHOD(GetValue) {
113
- MyObject* obj = Nan::ObjectWrap::Unwrap<MyObject>(info.Holder());
114
- info.GetReturnValue().Set(obj->value_);
115
- }
116
-
117
- static inline Nan::Persistent<v8::Function> & constructor() {
118
- static Nan::Persistent<v8::Function> my_constructor;
119
- return my_constructor;
120
- }
121
-
122
- double value_;
123
- };
124
-
125
- NODE_MODULE(objectwrapper, MyObject::Init)
126
- ```
127
-
128
- To use in Javascript:
129
-
130
- ```Javascript
131
- var objectwrapper = require('bindings')('objectwrapper');
132
-
133
- var obj = new objectwrapper.MyObject(5);
134
- console.log('Should be 5: ' + obj.getValue());
135
- ```
136
-
137
- #### Factory of wrapped objects
138
-
139
- ```c++
140
- class MyFactoryObject : public Nan::ObjectWrap {
141
- public:
142
- static NAN_MODULE_INIT(Init) {
143
- v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
144
- tpl->InstanceTemplate()->SetInternalFieldCount(1);
145
-
146
- Nan::SetPrototypeMethod(tpl, "getValue", GetValue);
147
-
148
- constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
149
- }
150
-
151
- static NAN_METHOD(NewInstance) {
152
- v8::Local<v8::Function> cons = Nan::New(constructor());
153
- double value = info[0]->IsNumber() ? Nan::To<double>(info[0]).FromJust() : 0;
154
- const int argc = 1;
155
- v8::Local<v8::Value> argv[1] = {Nan::New(value)};
156
- info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
157
- }
158
-
159
- // Needed for the next example:
160
- inline double value() const {
161
- return value_;
162
- }
163
-
164
- private:
165
- explicit MyFactoryObject(double value = 0) : value_(value) {}
166
- ~MyFactoryObject() {}
167
-
168
- static NAN_METHOD(New) {
169
- if (info.IsConstructCall()) {
170
- double value = info[0]->IsNumber() ? Nan::To<double>(info[0]).FromJust() : 0;
171
- MyFactoryObject * obj = new MyFactoryObject(value);
172
- obj->Wrap(info.This());
173
- info.GetReturnValue().Set(info.This());
174
- } else {
175
- const int argc = 1;
176
- v8::Local<v8::Value> argv[argc] = {info[0]};
177
- v8::Local<v8::Function> cons = Nan::New(constructor());
178
- info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
179
- }
180
- }
181
-
182
- static NAN_METHOD(GetValue) {
183
- MyFactoryObject* obj = ObjectWrap::Unwrap<MyFactoryObject>(info.Holder());
184
- info.GetReturnValue().Set(obj->value_);
185
- }
186
-
187
- static inline Nan::Persistent<v8::Function> & constructor() {
188
- static Nan::Persistent<v8::Function> my_constructor;
189
- return my_constructor;
190
- }
191
-
192
- double value_;
193
- };
194
-
195
- NAN_MODULE_INIT(Init) {
196
- MyFactoryObject::Init(target);
197
- Nan::Set(target,
198
- Nan::New<v8::String>("newFactoryObjectInstance").ToLocalChecked(),
199
- Nan::GetFunction(
200
- Nan::New<v8::FunctionTemplate>(MyFactoryObject::NewInstance)).ToLocalChecked()
201
- );
202
- }
203
-
204
- NODE_MODULE(wrappedobjectfactory, Init)
205
- ```
206
-
207
- To use in Javascript:
208
-
209
- ```Javascript
210
- var wrappedobjectfactory = require('bindings')('wrappedobjectfactory');
211
-
212
- var obj = wrappedobjectfactory.newFactoryObjectInstance(10);
213
- console.log('Should be 10: ' + obj.getValue());
214
- ```
215
-
216
- #### Passing wrapped objects around
217
-
218
- Use the `MyFactoryObject` class above along with the following:
219
-
220
- ```c++
221
- static NAN_METHOD(Sum) {
222
- Nan::MaybeLocal<v8::Object> maybe1 = Nan::To<v8::Object>(info[0]);
223
- Nan::MaybeLocal<v8::Object> maybe2 = Nan::To<v8::Object>(info[1]);
224
-
225
- // Quick check:
226
- if (maybe1.IsEmpty() || maybe2.IsEmpty()) {
227
- // return value is undefined by default
228
- return;
229
- }
230
-
231
- MyFactoryObject* obj1 =
232
- Nan::ObjectWrap::Unwrap<MyFactoryObject>(maybe1.ToLocalChecked());
233
- MyFactoryObject* obj2 =
234
- Nan::ObjectWrap::Unwrap<MyFactoryObject>(maybe2.ToLocalChecked());
235
-
236
- info.GetReturnValue().Set(Nan::New<v8::Number>(obj1->value() + obj2->value()));
237
- }
238
-
239
- NAN_MODULE_INIT(Init) {
240
- MyFactoryObject::Init(target);
241
- Nan::Set(target,
242
- Nan::New<v8::String>("newFactoryObjectInstance").ToLocalChecked(),
243
- Nan::GetFunction(
244
- Nan::New<v8::FunctionTemplate>(MyFactoryObject::NewInstance)).ToLocalChecked()
245
- );
246
- Nan::Set(target,
247
- Nan::New<v8::String>("sum").ToLocalChecked(),
248
- Nan::GetFunction(Nan::New<v8::FunctionTemplate>(Sum)).ToLocalChecked()
249
- );
250
- }
251
-
252
- NODE_MODULE(myaddon, Init)
253
- ```
254
-
255
- To use in Javascript:
256
-
257
- ```Javascript
258
- var myaddon = require('bindings')('myaddon');
259
-
260
- var obj1 = myaddon.newFactoryObjectInstance(5);
261
- var obj2 = myaddon.newFactoryObjectInstance(10);
262
- console.log('sum of object values: ' + myaddon.sum(obj1, obj2));
263
- ```