@venos-inc/venos 0.1.3 → 0.1.5

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 (70) hide show
  1. package/dist/index.js +82 -55
  2. package/etc/mcp-server/client.js +25 -2
  3. package/etc/mcp-server/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml +2 -2
  4. package/etc/mcp-server/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint +2 -2
  5. package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/eslint +2 -2
  6. package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/tsc +2 -2
  7. package/etc/mcp-server/node_modules/@typescript-eslint/eslint-plugin/node_modules/.bin/tsserver +2 -2
  8. package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/eslint +2 -2
  9. package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/tsc +2 -2
  10. package/etc/mcp-server/node_modules/@typescript-eslint/parser/node_modules/.bin/tsserver +2 -2
  11. package/etc/mcp-server/node_modules/@typescript-eslint/project-service/node_modules/.bin/tsc +2 -2
  12. package/etc/mcp-server/node_modules/@typescript-eslint/project-service/node_modules/.bin/tsserver +2 -2
  13. package/etc/mcp-server/node_modules/@typescript-eslint/tsconfig-utils/node_modules/.bin/tsc +2 -2
  14. package/etc/mcp-server/node_modules/@typescript-eslint/tsconfig-utils/node_modules/.bin/tsserver +2 -2
  15. package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/eslint +2 -2
  16. package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/tsc +2 -2
  17. package/etc/mcp-server/node_modules/@typescript-eslint/type-utils/node_modules/.bin/tsserver +2 -2
  18. package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/semver +2 -2
  19. package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/tsc +2 -2
  20. package/etc/mcp-server/node_modules/@typescript-eslint/typescript-estree/node_modules/.bin/tsserver +2 -2
  21. package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/eslint +2 -2
  22. package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/tsc +2 -2
  23. package/etc/mcp-server/node_modules/@typescript-eslint/utils/node_modules/.bin/tsserver +2 -2
  24. package/etc/mcp-server/node_modules/@vitest/mocker/node_modules/.bin/vite +4 -4
  25. package/etc/mcp-server/node_modules/acorn-jsx/node_modules/.bin/acorn +2 -2
  26. package/etc/mcp-server/node_modules/cross-spawn/node_modules/.bin/node-which +2 -2
  27. package/etc/mcp-server/node_modules/espree/node_modules/.bin/acorn +2 -2
  28. package/etc/mcp-server/node_modules/node-addon-api/LICENSE.md +6 -2
  29. package/etc/mcp-server/node_modules/node-addon-api/README.md +10 -12
  30. package/etc/mcp-server/node_modules/node-addon-api/common.gypi +2 -1
  31. package/etc/mcp-server/node_modules/node-addon-api/index.js +1 -2
  32. package/etc/mcp-server/node_modules/node-addon-api/napi-inl.h +72 -91
  33. package/etc/mcp-server/node_modules/node-addon-api/napi.h +5 -15
  34. package/etc/mcp-server/node_modules/node-addon-api/package.json +2 -18
  35. package/etc/mcp-server/node_modules/postcss/node_modules/.bin/nanoid +2 -2
  36. package/etc/mcp-server/node_modules/sharp/node_modules/.bin/semver +2 -2
  37. package/etc/mcp-server/node_modules/source-map/LICENSE +28 -0
  38. package/etc/mcp-server/node_modules/source-map/README.md +837 -0
  39. package/etc/mcp-server/node_modules/source-map/lib/array-set.js +100 -0
  40. package/etc/mcp-server/node_modules/source-map/lib/base64-vlq.js +94 -0
  41. package/etc/mcp-server/node_modules/source-map/lib/base64.js +19 -0
  42. package/etc/mcp-server/node_modules/source-map/lib/binary-search.js +113 -0
  43. package/etc/mcp-server/node_modules/source-map/lib/mapping-list.js +83 -0
  44. package/etc/mcp-server/node_modules/source-map/lib/mappings.wasm +0 -0
  45. package/etc/mcp-server/node_modules/source-map/lib/read-wasm-browser.js +23 -0
  46. package/etc/mcp-server/node_modules/source-map/lib/read-wasm.js +27 -0
  47. package/etc/mcp-server/node_modules/source-map/lib/source-map-consumer.js +1081 -0
  48. package/etc/mcp-server/node_modules/source-map/lib/source-map-generator.js +439 -0
  49. package/etc/mcp-server/node_modules/source-map/lib/source-node.js +430 -0
  50. package/etc/mcp-server/node_modules/source-map/lib/url.js +13 -0
  51. package/etc/mcp-server/node_modules/source-map/lib/util.js +444 -0
  52. package/etc/mcp-server/node_modules/source-map/lib/wasm.js +138 -0
  53. package/etc/mcp-server/node_modules/source-map/package.json +79 -0
  54. package/etc/mcp-server/node_modules/source-map/source-map.d.ts +423 -0
  55. package/etc/mcp-server/node_modules/source-map/source-map.js +10 -0
  56. package/etc/mcp-server/node_modules/ts-api-utils/node_modules/.bin/tsc +2 -2
  57. package/etc/mcp-server/node_modules/ts-api-utils/node_modules/.bin/tsserver +2 -2
  58. package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/eslint +2 -2
  59. package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/tsc +2 -2
  60. package/etc/mcp-server/node_modules/typescript-eslint/node_modules/.bin/tsserver +2 -2
  61. package/etc/mcp-server/node_modules/vite/node_modules/.bin/esbuild +2 -2
  62. package/etc/mcp-server/node_modules/vite/node_modules/.bin/rollup +2 -2
  63. package/etc/mcp-server/node_modules/vite-node/node_modules/.bin/vite +2 -2
  64. package/etc/mcp-server/node_modules/vitest/node_modules/.bin/vite +2 -2
  65. package/etc/mcp-server/node_modules/vitest/node_modules/.bin/vite-node +2 -2
  66. package/etc/mcp-server/node_modules/vitest/node_modules/.bin/why-is-node-running +2 -2
  67. package/etc/mcp-server/skill-spector.js +104 -0
  68. package/etc/mcp-server/tools.js +157 -2
  69. package/package.json +1 -1
  70. package/etc/mcp-server/node_modules/node-addon-api/node_addon_api.gyp +0 -32
@@ -31,22 +31,22 @@ namespace details {
31
31
  // Node.js releases. Only necessary when they are used in napi.h and napi-inl.h.
32
32
  constexpr int napi_no_external_buffers_allowed = 22;
33
33
 
34
- template <typename FreeType>
35
- inline void default_finalizer(napi_env /*env*/, void* data, void* /*hint*/) {
36
- delete static_cast<FreeType*>(data);
37
- }
38
-
39
34
  // Attach a data item to an object and delete it when the object gets
40
35
  // garbage-collected.
41
36
  // TODO: Replace this code with `napi_add_finalizer()` whenever it becomes
42
37
  // available on all supported versions of Node.js.
43
- template <typename FreeType,
44
- napi_finalize finalizer = default_finalizer<FreeType>>
38
+ template <typename FreeType>
45
39
  inline napi_status AttachData(napi_env env,
46
40
  napi_value obj,
47
41
  FreeType* data,
42
+ napi_finalize finalizer = nullptr,
48
43
  void* hint = nullptr) {
49
44
  napi_status status;
45
+ if (finalizer == nullptr) {
46
+ finalizer = [](napi_env /*env*/, void* data, void* /*hint*/) {
47
+ delete static_cast<FreeType*>(data);
48
+ };
49
+ }
50
50
  #if (NAPI_VERSION < 5)
51
51
  napi_value symbol, external;
52
52
  status = napi_create_symbol(env, nullptr, &symbol);
@@ -165,7 +165,7 @@ napi_value TemplatedInstanceCallback(napi_env env,
165
165
  return details::WrapCallback([&] {
166
166
  CallbackInfo cbInfo(env, info);
167
167
  T* instance = T::Unwrap(cbInfo.This().As<Object>());
168
- return instance ? (instance->*UnwrapCallback)(cbInfo) : Napi::Value();
168
+ return (instance->*UnwrapCallback)(cbInfo);
169
169
  });
170
170
  }
171
171
 
@@ -175,7 +175,7 @@ napi_value TemplatedInstanceVoidCallback(napi_env env, napi_callback_info info)
175
175
  return details::WrapCallback([&] {
176
176
  CallbackInfo cbInfo(env, info);
177
177
  T* instance = T::Unwrap(cbInfo.This().As<Object>());
178
- if (instance) (instance->*UnwrapCallback)(cbInfo);
178
+ (instance->*UnwrapCallback)(cbInfo);
179
179
  return nullptr;
180
180
  });
181
181
  }
@@ -263,12 +263,10 @@ struct ThreadSafeFinalize {
263
263
  template <typename ContextType, typename DataType, typename CallJs, CallJs call>
264
264
  inline typename std::enable_if<call != static_cast<CallJs>(nullptr)>::type
265
265
  CallJsWrapper(napi_env env, napi_value jsCallback, void* context, void* data) {
266
- details::WrapVoidCallback([&]() {
267
- call(env,
268
- Function(env, jsCallback),
269
- static_cast<ContextType*>(context),
270
- static_cast<DataType*>(data));
271
- });
266
+ call(env,
267
+ Function(env, jsCallback),
268
+ static_cast<ContextType*>(context),
269
+ static_cast<DataType*>(data));
272
270
  }
273
271
 
274
272
  template <typename ContextType, typename DataType, typename CallJs, CallJs call>
@@ -277,11 +275,9 @@ CallJsWrapper(napi_env env,
277
275
  napi_value jsCallback,
278
276
  void* /*context*/,
279
277
  void* /*data*/) {
280
- details::WrapVoidCallback([&]() {
281
- if (jsCallback != nullptr) {
282
- Function(env, jsCallback).Call(0, nullptr);
283
- }
284
- });
278
+ if (jsCallback != nullptr) {
279
+ Function(env, jsCallback).Call(0, nullptr);
280
+ }
285
281
  }
286
282
 
287
283
  #if NAPI_VERSION > 4
@@ -576,14 +572,6 @@ void Env::DefaultFiniWithHint(Env, DataType* data, HintType*) {
576
572
  }
577
573
  #endif // NAPI_VERSION > 5
578
574
 
579
- #if NAPI_VERSION > 8
580
- inline const char* Env::GetModuleFileName() const {
581
- const char* result;
582
- napi_status status = node_api_get_module_file_name(_env, &result);
583
- NAPI_THROW_IF_FAILED(*this, status, nullptr);
584
- return result;
585
- }
586
- #endif // NAPI_VERSION > 8
587
575
  ////////////////////////////////////////////////////////////////////////////////
588
576
  // Value class
589
577
  ////////////////////////////////////////////////////////////////////////////////
@@ -1636,8 +1624,11 @@ inline void Object::AddFinalizer(Finalizer finalizeCallback, T* data) const {
1636
1624
  new details::FinalizeData<T, Finalizer>(
1637
1625
  {std::move(finalizeCallback), nullptr});
1638
1626
  napi_status status =
1639
- details::AttachData<T, details::FinalizeData<T, Finalizer>::Wrapper>(
1640
- _env, *this, data, finalizeData);
1627
+ details::AttachData(_env,
1628
+ *this,
1629
+ data,
1630
+ details::FinalizeData<T, Finalizer>::Wrapper,
1631
+ finalizeData);
1641
1632
  if (status != napi_ok) {
1642
1633
  delete finalizeData;
1643
1634
  NAPI_THROW_IF_FAILED_VOID(_env, status);
@@ -1651,9 +1642,12 @@ inline void Object::AddFinalizer(Finalizer finalizeCallback,
1651
1642
  details::FinalizeData<T, Finalizer, Hint>* finalizeData =
1652
1643
  new details::FinalizeData<T, Finalizer, Hint>(
1653
1644
  {std::move(finalizeCallback), finalizeHint});
1654
- napi_status status = details::
1655
- AttachData<T, details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint>(
1656
- _env, *this, data, finalizeData);
1645
+ napi_status status = details::AttachData(
1646
+ _env,
1647
+ *this,
1648
+ data,
1649
+ details::FinalizeData<T, Finalizer, Hint>::WrapperWithHint,
1650
+ finalizeData);
1657
1651
  if (status != napi_ok) {
1658
1652
  delete finalizeData;
1659
1653
  NAPI_THROW_IF_FAILED_VOID(_env, status);
@@ -2629,7 +2623,7 @@ inline Buffer<T> Buffer<T>::New(napi_env env, size_t length) {
2629
2623
  napi_status status =
2630
2624
  napi_create_buffer(env, length * sizeof(T), &data, &value);
2631
2625
  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
2632
- return Buffer(env, value);
2626
+ return Buffer(env, value, length, static_cast<T*>(data));
2633
2627
  }
2634
2628
 
2635
2629
  #ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
@@ -2639,7 +2633,7 @@ inline Buffer<T> Buffer<T>::New(napi_env env, T* data, size_t length) {
2639
2633
  napi_status status = napi_create_external_buffer(
2640
2634
  env, length * sizeof(T), data, nullptr, nullptr, &value);
2641
2635
  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
2642
- return Buffer(env, value);
2636
+ return Buffer(env, value, length, data);
2643
2637
  }
2644
2638
 
2645
2639
  template <typename T>
@@ -2663,7 +2657,7 @@ inline Buffer<T> Buffer<T>::New(napi_env env,
2663
2657
  delete finalizeData;
2664
2658
  NAPI_THROW_IF_FAILED(env, status, Buffer());
2665
2659
  }
2666
- return Buffer(env, value);
2660
+ return Buffer(env, value, length, data);
2667
2661
  }
2668
2662
 
2669
2663
  template <typename T>
@@ -2688,7 +2682,7 @@ inline Buffer<T> Buffer<T>::New(napi_env env,
2688
2682
  delete finalizeData;
2689
2683
  NAPI_THROW_IF_FAILED(env, status, Buffer());
2690
2684
  }
2691
- return Buffer(env, value);
2685
+ return Buffer(env, value, length, data);
2692
2686
  }
2693
2687
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
2694
2688
 
@@ -2705,7 +2699,7 @@ inline Buffer<T> Buffer<T>::NewOrCopy(napi_env env, T* data, size_t length) {
2705
2699
  #ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
2706
2700
  }
2707
2701
  NAPI_THROW_IF_FAILED(env, status, Buffer<T>());
2708
- return Buffer(env, value);
2702
+ return Buffer(env, value, length, data);
2709
2703
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
2710
2704
  }
2711
2705
 
@@ -2739,7 +2733,7 @@ inline Buffer<T> Buffer<T>::NewOrCopy(napi_env env,
2739
2733
  delete finalizeData;
2740
2734
  NAPI_THROW_IF_FAILED(env, status, Buffer());
2741
2735
  }
2742
- return Buffer(env, value);
2736
+ return Buffer(env, value, length, data);
2743
2737
  #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
2744
2738
  }
2745
2739
 
@@ -2775,7 +2769,7 @@ inline Buffer<T> Buffer<T>::NewOrCopy(napi_env env,
2775
2769
  delete finalizeData;
2776
2770
  NAPI_THROW_IF_FAILED(env, status, Buffer());
2777
2771
  }
2778
- return Buffer(env, value);
2772
+ return Buffer(env, value, length, data);
2779
2773
  #endif
2780
2774
  }
2781
2775
 
@@ -2799,20 +2793,42 @@ inline void Buffer<T>::CheckCast(napi_env env, napi_value value) {
2799
2793
  }
2800
2794
 
2801
2795
  template <typename T>
2802
- inline Buffer<T>::Buffer() : Uint8Array() {}
2796
+ inline Buffer<T>::Buffer() : Uint8Array(), _length(0), _data(nullptr) {}
2803
2797
 
2804
2798
  template <typename T>
2805
2799
  inline Buffer<T>::Buffer(napi_env env, napi_value value)
2806
- : Uint8Array(env, value) {}
2800
+ : Uint8Array(env, value), _length(0), _data(nullptr) {}
2801
+
2802
+ template <typename T>
2803
+ inline Buffer<T>::Buffer(napi_env env, napi_value value, size_t length, T* data)
2804
+ : Uint8Array(env, value), _length(length), _data(data) {}
2807
2805
 
2808
2806
  template <typename T>
2809
2807
  inline size_t Buffer<T>::Length() const {
2810
- return ByteLength() / sizeof(T);
2808
+ EnsureInfo();
2809
+ return _length;
2811
2810
  }
2812
2811
 
2813
2812
  template <typename T>
2814
2813
  inline T* Buffer<T>::Data() const {
2815
- return reinterpret_cast<T*>(const_cast<uint8_t*>(Uint8Array::Data()));
2814
+ EnsureInfo();
2815
+ return _data;
2816
+ }
2817
+
2818
+ template <typename T>
2819
+ inline void Buffer<T>::EnsureInfo() const {
2820
+ // The Buffer instance may have been constructed from a napi_value whose
2821
+ // length/data are not yet known. Fetch and cache these values just once,
2822
+ // since they can never change during the lifetime of the Buffer.
2823
+ if (_data == nullptr) {
2824
+ size_t byteLength;
2825
+ void* voidData;
2826
+ napi_status status =
2827
+ napi_get_buffer_info(_env, _value, &voidData, &byteLength);
2828
+ NAPI_THROW_IF_FAILED_VOID(_env, status);
2829
+ _length = byteLength / sizeof(T);
2830
+ _data = static_cast<T*>(voidData);
2831
+ }
2816
2832
  }
2817
2833
 
2818
2834
  ////////////////////////////////////////////////////////////////////////////////
@@ -2921,22 +2937,6 @@ inline Error::Error(napi_env env, napi_value value)
2921
2937
  nullptr};
2922
2938
 
2923
2939
  status = napi_define_properties(env, wrappedErrorObj, 1, &wrapObjFlag);
2924
- #ifdef NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS
2925
- if (status == napi_pending_exception) {
2926
- // Test if the pending exception was reported because the environment is
2927
- // shutting down. We assume that a status of napi_pending_exception
2928
- // coupled with the absence of an actual pending exception means that
2929
- // the environment is shutting down. If so, we replace the
2930
- // napi_pending_exception status with napi_ok.
2931
- bool is_exception_pending = false;
2932
- status = napi_is_exception_pending(env, &is_exception_pending);
2933
- if (status == napi_ok && !is_exception_pending) {
2934
- status = napi_ok;
2935
- } else {
2936
- status = napi_pending_exception;
2937
- }
2938
- }
2939
- #endif // NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS
2940
2940
  NAPI_FATAL_IF_FAILED(status, "Error::Error", "napi_define_properties");
2941
2941
 
2942
2942
  // Create a reference on the newly wrapped object
@@ -3141,23 +3141,6 @@ inline RangeError::RangeError() : Error() {}
3141
3141
  inline RangeError::RangeError(napi_env env, napi_value value)
3142
3142
  : Error(env, value) {}
3143
3143
 
3144
- #if NAPI_VERSION > 8
3145
- inline SyntaxError SyntaxError::New(napi_env env, const char* message) {
3146
- return Error::New<SyntaxError>(
3147
- env, message, std::strlen(message), node_api_create_syntax_error);
3148
- }
3149
-
3150
- inline SyntaxError SyntaxError::New(napi_env env, const std::string& message) {
3151
- return Error::New<SyntaxError>(
3152
- env, message.c_str(), message.size(), node_api_create_syntax_error);
3153
- }
3154
-
3155
- inline SyntaxError::SyntaxError() : Error() {}
3156
-
3157
- inline SyntaxError::SyntaxError(napi_env env, napi_value value)
3158
- : Error(env, value) {}
3159
- #endif // NAPI_VERSION > 8
3160
-
3161
3144
  ////////////////////////////////////////////////////////////////////////////////
3162
3145
  // Reference<T> class
3163
3146
  ////////////////////////////////////////////////////////////////////////////////
@@ -4357,7 +4340,7 @@ inline napi_value InstanceWrap<T>::InstanceVoidMethodCallbackWrapper(
4357
4340
  callbackInfo.SetData(callbackData->data);
4358
4341
  T* instance = T::Unwrap(callbackInfo.This().As<Object>());
4359
4342
  auto cb = callbackData->callback;
4360
- if (instance) (instance->*cb)(callbackInfo);
4343
+ (instance->*cb)(callbackInfo);
4361
4344
  return nullptr;
4362
4345
  });
4363
4346
  }
@@ -4372,7 +4355,7 @@ inline napi_value InstanceWrap<T>::InstanceMethodCallbackWrapper(
4372
4355
  callbackInfo.SetData(callbackData->data);
4373
4356
  T* instance = T::Unwrap(callbackInfo.This().As<Object>());
4374
4357
  auto cb = callbackData->callback;
4375
- return instance ? (instance->*cb)(callbackInfo) : Napi::Value();
4358
+ return (instance->*cb)(callbackInfo);
4376
4359
  });
4377
4360
  }
4378
4361
 
@@ -4386,7 +4369,7 @@ inline napi_value InstanceWrap<T>::InstanceGetterCallbackWrapper(
4386
4369
  callbackInfo.SetData(callbackData->data);
4387
4370
  T* instance = T::Unwrap(callbackInfo.This().As<Object>());
4388
4371
  auto cb = callbackData->getterCallback;
4389
- return instance ? (instance->*cb)(callbackInfo) : Napi::Value();
4372
+ return (instance->*cb)(callbackInfo);
4390
4373
  });
4391
4374
  }
4392
4375
 
@@ -4400,7 +4383,7 @@ inline napi_value InstanceWrap<T>::InstanceSetterCallbackWrapper(
4400
4383
  callbackInfo.SetData(callbackData->data);
4401
4384
  T* instance = T::Unwrap(callbackInfo.This().As<Object>());
4402
4385
  auto cb = callbackData->setterCallback;
4403
- if (instance) (instance->*cb)(callbackInfo, callbackInfo[0]);
4386
+ (instance->*cb)(callbackInfo, callbackInfo[0]);
4404
4387
  return nullptr;
4405
4388
  });
4406
4389
  }
@@ -4412,7 +4395,7 @@ inline napi_value InstanceWrap<T>::WrappedMethod(
4412
4395
  return details::WrapCallback([&] {
4413
4396
  const CallbackInfo cbInfo(env, info);
4414
4397
  T* instance = T::Unwrap(cbInfo.This().As<Object>());
4415
- if (instance) (instance->*method)(cbInfo, cbInfo[0]);
4398
+ (instance->*method)(cbInfo, cbInfo[0]);
4416
4399
  return nullptr;
4417
4400
  });
4418
4401
  }
@@ -6111,15 +6094,13 @@ inline void ThreadSafeFunction::CallJS(napi_env env,
6111
6094
  return;
6112
6095
  }
6113
6096
 
6114
- details::WrapVoidCallback([&]() {
6115
- if (data != nullptr) {
6116
- auto* callbackWrapper = static_cast<CallbackWrapper*>(data);
6117
- (*callbackWrapper)(env, Function(env, jsCallback));
6118
- delete callbackWrapper;
6119
- } else if (jsCallback != nullptr) {
6120
- Function(env, jsCallback).Call({});
6121
- }
6122
- });
6097
+ if (data != nullptr) {
6098
+ auto* callbackWrapper = static_cast<CallbackWrapper*>(data);
6099
+ (*callbackWrapper)(env, Function(env, jsCallback));
6100
+ delete callbackWrapper;
6101
+ } else if (jsCallback != nullptr) {
6102
+ Function(env, jsCallback).Call({});
6103
+ }
6123
6104
  }
6124
6105
 
6125
6106
  ////////////////////////////////////////////////////////////////////////////////
@@ -367,10 +367,6 @@ class Env {
367
367
  } * data;
368
368
  };
369
369
  #endif // NAPI_VERSION > 2
370
-
371
- #if NAPI_VERSION > 8
372
- const char* GetModuleFileName() const;
373
- #endif // NAPI_VERSION > 8
374
370
  };
375
371
 
376
372
  /// A JavaScript value of unknown type.
@@ -1535,6 +1531,11 @@ class Buffer : public Uint8Array {
1535
1531
  T* Data() const;
1536
1532
 
1537
1533
  private:
1534
+ mutable size_t _length;
1535
+ mutable T* _data;
1536
+
1537
+ Buffer(napi_env env, napi_value value, size_t length, T* data);
1538
+ void EnsureInfo() const;
1538
1539
  };
1539
1540
 
1540
1541
  /// Holds a counted reference to a value; initially a weak reference unless
@@ -1852,17 +1853,6 @@ class RangeError : public Error {
1852
1853
  RangeError(napi_env env, napi_value value);
1853
1854
  };
1854
1855
 
1855
- #if NAPI_VERSION > 8
1856
- class SyntaxError : public Error {
1857
- public:
1858
- static SyntaxError New(napi_env env, const char* message);
1859
- static SyntaxError New(napi_env env, const std::string& message);
1860
-
1861
- SyntaxError();
1862
- SyntaxError(napi_env env, napi_value value);
1863
- };
1864
- #endif // NAPI_VERSION > 8
1865
-
1866
1856
  class CallbackInfo {
1867
1857
  public:
1868
1858
  CallbackInfo(napi_env env, napi_callback_info info);
@@ -399,22 +399,6 @@
399
399
  {
400
400
  "name": "Feng Yu",
401
401
  "url": "https://github.com/F3n67u"
402
- },
403
- {
404
- "name": "wanlu wang",
405
- "url": "https://github.com/wanlu"
406
- },
407
- {
408
- "name": "Caleb Hearon",
409
- "url": "https://github.com/chearon"
410
- },
411
- {
412
- "name": "Marx",
413
- "url": "https://github.com/MarxJiao"
414
- },
415
- {
416
- "name": "Ömer AKGÜL",
417
- "url": "https://github.com/tuhalf"
418
402
  }
419
403
  ],
420
404
  "description": "Node.js API (Node-API)",
@@ -428,7 +412,7 @@
428
412
  "eslint-plugin-import": "^2.24.2",
429
413
  "eslint-plugin-node": "^11.1.0",
430
414
  "eslint-plugin-promise": "^5.1.0",
431
- "fs-extra": "^11.1.1",
415
+ "fs-extra": "^9.0.1",
432
416
  "path": "^0.12.7",
433
417
  "pre-commit": "^1.2.2",
434
418
  "safe-buffer": "^5.1.1"
@@ -475,6 +459,6 @@
475
459
  "lint:fix": "node tools/clang-format --fix && node tools/eslint-format --fix"
476
460
  },
477
461
  "pre-commit": "lint",
478
- "version": "7.1.1",
462
+ "version": "6.1.0",
479
463
  "support": true
480
464
  }
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/nanoid@3.3.12/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules/nanoid/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/nanoid@3.3.12/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../../../../../nanoid@3.3.12/node_modules/nanoid/bin/nanoid.cjs" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules/semver/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules/semver/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules/semver/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules/semver/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules/semver/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules/semver/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/semver@7.8.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/pixellot-ingest/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules/semver/bin/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules/semver/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/semver@7.8.1/node_modules:/Users/baraklagziel/code/venos/.worktrees/prod-build/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../../../../../semver@7.8.1/node_modules/semver/bin/semver.js" "$@"
@@ -0,0 +1,28 @@
1
+
2
+ Copyright (c) 2009-2011, Mozilla Foundation and contributors
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ * Neither the names of the Mozilla Foundation nor the names of project
16
+ contributors may be used to endorse or promote products derived from this
17
+ software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.