@react-native-ohos/react-native-mmkv 3.3.1-rc.1

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 (1114) hide show
  1. package/MMKV/Core/CMakeLists.txt +172 -0
  2. package/MMKV/Core/CodedInputData.cpp +252 -0
  3. package/MMKV/Core/CodedInputData.h +87 -0
  4. package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
  5. package/MMKV/Core/CodedInputDataCrypt.h +87 -0
  6. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  7. package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  8. package/MMKV/Core/CodedOutputData.cpp +186 -0
  9. package/MMKV/Core/CodedOutputData.h +88 -0
  10. package/MMKV/Core/Core.xcodeproj/project.pbxproj +707 -0
  11. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  12. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  13. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  14. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  15. package/MMKV/Core/InterProcessLock.cpp +186 -0
  16. package/MMKV/Core/InterProcessLock.h +119 -0
  17. package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
  18. package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  19. package/MMKV/Core/KeyValueHolder.cpp +236 -0
  20. package/MMKV/Core/KeyValueHolder.h +122 -0
  21. package/MMKV/Core/MMBuffer.cpp +210 -0
  22. package/MMKV/Core/MMBuffer.h +111 -0
  23. package/MMKV/Core/MMKV.cpp +1702 -0
  24. package/MMKV/Core/MMKV.h +595 -0
  25. package/MMKV/Core/MMKVLog.cpp +127 -0
  26. package/MMKV/Core/MMKVLog.h +86 -0
  27. package/MMKV/Core/MMKVLog_Android.cpp +134 -0
  28. package/MMKV/Core/MMKVMetaInfo.hpp +99 -0
  29. package/MMKV/Core/MMKVPredef.h +293 -0
  30. package/MMKV/Core/MMKV_Android.cpp +261 -0
  31. package/MMKV/Core/MMKV_IO.cpp +1905 -0
  32. package/MMKV/Core/MMKV_IO.h +57 -0
  33. package/MMKV/Core/MMKV_OSX.cpp +423 -0
  34. package/MMKV/Core/MMKV_OSX.h +57 -0
  35. package/MMKV/Core/MemoryFile.cpp +603 -0
  36. package/MMKV/Core/MemoryFile.h +194 -0
  37. package/MMKV/Core/MemoryFile_Android.cpp +236 -0
  38. package/MMKV/Core/MemoryFile_Linux.cpp +125 -0
  39. package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
  40. package/MMKV/Core/MemoryFile_Win32.cpp +554 -0
  41. package/MMKV/Core/MiniPBCoder.cpp +672 -0
  42. package/MMKV/Core/MiniPBCoder.h +151 -0
  43. package/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
  44. package/MMKV/Core/PBEncodeItem.hpp +104 -0
  45. package/MMKV/Core/PBUtility.cpp +61 -0
  46. package/MMKV/Core/PBUtility.h +148 -0
  47. package/MMKV/Core/ScopedLock.hpp +69 -0
  48. package/MMKV/Core/ThreadLock.cpp +75 -0
  49. package/MMKV/Core/ThreadLock.h +81 -0
  50. package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  51. package/MMKV/Core/aes/AESCrypt.cpp +273 -0
  52. package/MMKV/Core/aes/AESCrypt.h +112 -0
  53. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1243 -0
  54. package/MMKV/Core/aes/openssl/openssl_aes.h +130 -0
  55. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  56. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  57. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  58. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  59. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  60. package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  61. package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  62. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  63. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  64. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  65. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  66. package/MMKV/Core/core.vcxproj +288 -0
  67. package/MMKV/Core/core.vcxproj.filters +150 -0
  68. package/MMKV/Core/crc32/Checksum.h +75 -0
  69. package/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
  70. package/MMKV/Core/crc32/zlib/CMakeLists.txt +60 -0
  71. package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  72. package/MMKV/Core/crc32/zlib/crc32.h +48 -0
  73. package/MMKV/Core/crc32/zlib/zconf.h +380 -0
  74. package/MMKV/Core/crc32/zlib/zutil.h +25 -0
  75. package/MMKV/README.md +354 -0
  76. package/README.md +5 -0
  77. package/cpp/MMKVManagedBuffer.h +32 -0
  78. package/cpp/MmkvHostObject.cpp +355 -0
  79. package/cpp/MmkvHostObject.h +32 -0
  80. package/cpp/MmkvLogger.h +35 -0
  81. package/cpp/NativeMmkvModule.cpp +43 -0
  82. package/cpp/NativeMmkvModule.h +38 -0
  83. package/harmony/reactNativeMMKV/BuildProfile.ets +17 -0
  84. package/harmony/reactNativeMMKV/LICENSE +20 -0
  85. package/harmony/reactNativeMMKV/NOTICE +34 -0
  86. package/harmony/reactNativeMMKV/README.OpenSource +11 -0
  87. package/harmony/reactNativeMMKV/build-profile.json5 +9 -0
  88. package/harmony/reactNativeMMKV/hvigorfile.ts +6 -0
  89. package/harmony/reactNativeMMKV/index.ets +24 -0
  90. package/harmony/reactNativeMMKV/oh-package.json5 +15 -0
  91. package/harmony/reactNativeMMKV/src/main/cpp/CMakeLists.txt +15 -0
  92. package/harmony/reactNativeMMKV/src/main/cpp/ComponentDescriptors.h +39 -0
  93. package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.cpp +41 -0
  94. package/harmony/reactNativeMMKV/src/main/cpp/EventEmitters.h +182 -0
  95. package/harmony/reactNativeMMKV/src/main/cpp/HarmonyLogger.cpp +32 -0
  96. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.clang-format +36 -0
  97. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.dockerignore +2 -0
  98. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/FUNDING.yml +14 -0
  99. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.github/ISSUE_TEMPLATE/bug_report.md +45 -0
  100. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/.gitmodules +3 -0
  101. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/build.gradle +54 -0
  102. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/checkstyle.xml +156 -0
  103. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/debug.keystore +0 -0
  104. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish-private.gradle +207 -0
  105. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/android-publish.gradle +276 -0
  106. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/build_library.gradle +62 -0
  107. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/check.gradle +76 -0
  108. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.jar +0 -0
  109. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle/wrapper/gradle-wrapper.properties +6 -0
  110. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradle.properties +25 -0
  111. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew +172 -0
  112. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/gradlew.bat +84 -0
  113. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/CMakeLists.txt +56 -0
  114. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/build.gradle +238 -0
  115. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/gradle.properties +2 -0
  116. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/proguard-rules.pro +9 -0
  117. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/AndroidManifest.xml +11 -0
  118. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTest.java +270 -0
  119. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/androidTest/java/com/tencent/mmkv/MMKVTestService.java +79 -0
  120. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/AndroidManifest.xml +3 -0
  121. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/aidl/com/tencent/mmkv/ParcelableMMKV.aidl +4 -0
  122. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/flutter-bridge.cpp +706 -0
  123. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/cpp/native-bridge.cpp +1244 -0
  124. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKV.java +2024 -0
  125. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentChangeNotification.java +34 -0
  126. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVContentProvider.java +174 -0
  127. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVHandler.java +63 -0
  128. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVLogLevel.java +52 -0
  129. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVProcessUtil.java +100 -0
  130. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/MMKVRecoverStrategic.java +36 -0
  131. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NameSpace.java +214 -0
  132. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/NativeBuffer.java +36 -0
  133. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/ParcelableMMKV.java +108 -0
  134. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkv/src/main/java/com/tencent/mmkv/UnsupportedArchitectureException.java +27 -0
  135. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/build.gradle +34 -0
  136. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/AndroidManifest.xml +3 -0
  137. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvannotation/src/main/java/dalvik/annotation/optimization/FastNative.java +104 -0
  138. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/build.gradle +116 -0
  139. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/proguard-rules.pro +24 -0
  140. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/AndroidManifest.xml +54 -0
  141. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/aidl/com/tencent/mmkvdemo/IAshmemMMKV.aidl +8 -0
  142. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/CMakeLists.txt +50 -0
  143. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/cpp/mmkvdemo.cpp +245 -0
  144. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Baseline.java +297 -0
  145. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/BenchMarkBaseService.java +363 -0
  146. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/FakeInfo.java +67 -0
  147. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/Info.java +69 -0
  148. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MainActivity.java +1029 -0
  149. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MultiProcessSharedPreferences.java +710 -0
  150. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyApplication.java +130 -0
  151. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService.java +105 -0
  152. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/MyService_1.java +92 -0
  153. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/SQLiteKV.java +143 -0
  154. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/java/com/tencent/mmkvdemo/TestParcelable.java +70 -0
  155. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/kotlin/KotlinUsecase.kt +67 -0
  156. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable/ic_launcher_background.xml +170 -0
  157. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
  158. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/layout/activity_main.xml +76 -0
  159. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  160. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  161. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  162. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  163. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  164. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  165. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  166. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  167. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  168. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  169. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  170. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  171. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/colors.xml +6 -0
  172. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/strings.xml +3 -0
  173. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/mmkvdemo/src/main/res/values/styles.xml +11 -0
  174. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/pmd-ruleset.xml +44 -0
  175. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-android-lib.pro +54 -0
  176. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/proguard-rules/proguard-rules-test.pro +6 -0
  177. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Android/MMKV/settings.gradle +3 -0
  178. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CHANGELOG.md +979 -0
  179. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CODE_OF_CONDUCT.md +76 -0
  180. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/CONTRIBUTING.md +61 -0
  181. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CMakeLists.txt +207 -0
  182. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.cpp +248 -0
  183. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData.h +86 -0
  184. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.cpp +276 -0
  185. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt.h +86 -0
  186. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  187. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  188. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.cpp +182 -0
  189. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/CodedOutputData.h +86 -0
  190. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.pbxproj +703 -0
  191. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  192. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  193. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  194. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  195. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.cpp +211 -0
  196. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock.h +124 -0
  197. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Android.cpp +104 -0
  198. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  199. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.cpp +237 -0
  200. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/KeyValueHolder.h +122 -0
  201. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.cpp +207 -0
  202. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMBuffer.h +119 -0
  203. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.cpp +1791 -0
  204. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV.h +781 -0
  205. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.cpp +127 -0
  206. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog.h +86 -0
  207. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVLog_Android.cpp +134 -0
  208. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVMetaInfo.hpp +99 -0
  209. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKVPredef.h +310 -0
  210. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_Android.cpp +365 -0
  211. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.cpp +2049 -0
  212. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_IO.h +85 -0
  213. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.cpp +589 -0
  214. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MMKV_OSX.h +30 -0
  215. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.cpp +716 -0
  216. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile.h +212 -0
  217. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Android.cpp +247 -0
  218. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Linux.cpp +126 -0
  219. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_OSX.cpp +173 -0
  220. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MemoryFile_Win32.cpp +655 -0
  221. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.cpp +668 -0
  222. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder.h +150 -0
  223. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/MiniPBCoder_OSX.cpp +237 -0
  224. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBEncodeItem.hpp +102 -0
  225. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.cpp +61 -0
  226. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/PBUtility.h +148 -0
  227. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ScopedLock.hpp +69 -0
  228. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.cpp +75 -0
  229. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock.h +81 -0
  230. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  231. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.cpp +293 -0
  232. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/AESCrypt.h +117 -0
  233. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes.h +98 -0
  234. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  235. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  236. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  237. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  238. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  239. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  240. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  241. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  242. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  243. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  244. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  245. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj +288 -0
  246. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/core.vcxproj.filters +150 -0
  247. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/CMakeLists.txt +60 -0
  248. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/Checksum.h +76 -0
  249. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/crc32_armv8.cpp +134 -0
  250. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  251. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/crc32.h +48 -0
  252. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zconf.h +380 -0
  253. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Core/crc32/zlib/zutil.h +25 -0
  254. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Dockerfile +25 -0
  255. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/LICENSE.TXT +193 -0
  256. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.podspec +40 -0
  257. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/contents.xcworkspacedata +10 -0
  258. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKV.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  259. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVAppExtension.podspec +37 -0
  260. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVCore.podspec +47 -0
  261. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/MMKVWatchExtension.podspec +38 -0
  262. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Makefile +10 -0
  263. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/app.json5 +10 -0
  264. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/element/string.json +8 -0
  265. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/AppScope/resources/base/media/app_icon.png +0 -0
  266. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/BuildProfile.ets +17 -0
  267. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/CHANGELOG.md +75 -0
  268. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/Index.ets +4 -0
  269. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/LICENSE +193 -0
  270. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/README.md +208 -0
  271. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/build-profile.json5 +40 -0
  272. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/consumer-rules.txt +61 -0
  273. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Index.ets +686 -0
  274. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/example/Util.ets +31 -0
  275. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/hvigorfile.ts +6 -0
  276. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/obfuscation-rules.txt +18 -0
  277. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/oh-package.json5 +22 -0
  278. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/CMakeLists.txt +43 -0
  279. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/flutter-bridge.cpp +703 -0
  280. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp +1840 -0
  281. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/index.d.ts +80 -0
  282. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/cpp/types/libmmkv/oh-package.json5 +6 -0
  283. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKV.ets +1073 -0
  284. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVHandler.ets +111 -0
  285. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/MMKVLogLevel.ets +50 -0
  286. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/NativeBuffer.ets +34 -0
  287. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/ets/utils/Util.ts +24 -0
  288. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/MMKV/src/main/module.json5 +12 -0
  289. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/build-profile.json5 +62 -0
  290. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-4.3.0.tgz +0 -0
  291. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/dependencies/hvigor-ohos-plugin-4.3.0.tgz +0 -0
  292. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/build-profile.json5 +39 -0
  293. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/hvigorfile.ts +6 -0
  294. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/obfuscation-rules.txt +25 -0
  295. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/oh-package.json5 +13 -0
  296. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/CMakeLists.txt +54 -0
  297. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/napi_init.cpp +233 -0
  298. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/index.d.ts +1 -0
  299. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/cpp/types/libentry/oh-package.json5 +6 -0
  300. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Baseline.ets +188 -0
  301. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/MyMMKVHandler.ets +76 -0
  302. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/Util/Util.ets +220 -0
  303. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/entryability/EntryAbility.ets +107 -0
  304. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/pages/Index.ets +766 -0
  305. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/ets/process/DemoProcess.ets +31 -0
  306. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/module.json5 +38 -0
  307. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/color.json +8 -0
  308. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/element/string.json +16 -0
  309. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/background.png +0 -0
  310. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/foreground.png +0 -0
  311. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/layered_image.json +7 -0
  312. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/media/startIcon.png +0 -0
  313. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
  314. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/en_US/element/string.json +16 -0
  315. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/main/resources/zh_CN/element/string.json +16 -0
  316. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/mock/mock-config.json5 +2 -0
  317. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/Ability.test.ets +55 -0
  318. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/test/List.test.ets +25 -0
  319. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/TestAbility.ets +67 -0
  320. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testability/pages/Index.ets +37 -0
  321. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +110 -0
  322. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/module.json5 +38 -0
  323. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/color.json +8 -0
  324. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/element/string.json +16 -0
  325. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/media/icon.png +0 -0
  326. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
  327. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/List.test.ets +25 -0
  328. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/entry/src/test/LocalUnit.test.ets +53 -0
  329. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigor/hvigor-config.json5 +21 -0
  330. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/hvigorfile.ts +6 -0
  331. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/OpenHarmony/oh-package.json5 +15 -0
  332. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/CMakeLists.txt +27 -0
  333. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/CMakeLists.txt +65 -0
  334. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/TestInterProcessLock.cpp +130 -0
  335. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/UnitTest.cpp +272 -0
  336. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/demo.cpp +1431 -0
  337. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/demo/process.cpp +78 -0
  338. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/CMakeLists.txt +87 -0
  339. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/callback.go +121 -0
  340. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/go.mod +3 -0
  341. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.cpp +731 -0
  342. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/golang-bridge.h +131 -0
  343. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv.go +817 -0
  344. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/mmkv_test.go +33 -0
  345. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/go.mod +7 -0
  346. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/golang/test/main.go +455 -0
  347. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/CMakeLists.txt +83 -0
  348. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/POSIX/src/libmmkv.cpp +21 -0
  349. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/CMakeLists.txt +62 -0
  350. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/README.md +6 -0
  351. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/demo.py +368 -0
  352. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/libmmkv_python.cpp +454 -0
  353. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.appveyor.yml +35 -0
  354. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-format +38 -0
  355. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.clang-tidy +77 -0
  356. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.cmake-format.yaml +73 -0
  357. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.codespell-ignore-lines +24 -0
  358. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.gitattributes +1 -0
  359. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CODEOWNERS +9 -0
  360. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/CONTRIBUTING.md +388 -0
  361. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +61 -0
  362. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/ISSUE_TEMPLATE/config.yml +8 -0
  363. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/dependabot.yml +15 -0
  364. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler.yml +13 -0
  365. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/labeler_merged.yml +8 -0
  366. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/matchers/pylint.json +32 -0
  367. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/pull_request_template.md +19 -0
  368. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/ci.yml +1233 -0
  369. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/configure.yml +92 -0
  370. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/format.yml +60 -0
  371. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/labeler.yml +25 -0
  372. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/pip.yml +117 -0
  373. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.github/workflows/upstream.yml +116 -0
  374. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.pre-commit-config.yaml +156 -0
  375. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/.readthedocs.yml +20 -0
  376. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/CMakeLists.txt +375 -0
  377. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/LICENSE +29 -0
  378. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/MANIFEST.in +6 -0
  379. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/README.rst +181 -0
  380. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/SECURITY.md +13 -0
  381. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/Doxyfile +21 -0
  382. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/_static/css/custom.css +3 -0
  383. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/chrono.rst +81 -0
  384. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/custom.rst +93 -0
  385. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/eigen.rst +310 -0
  386. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/functional.rst +109 -0
  387. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/index.rst +43 -0
  388. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/overview.rst +170 -0
  389. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/stl.rst +249 -0
  390. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/cast/strings.rst +296 -0
  391. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/classes.rst +1335 -0
  392. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/embedding.rst +262 -0
  393. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/exceptions.rst +401 -0
  394. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/functions.rst +614 -0
  395. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/misc.rst +429 -0
  396. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/index.rst +13 -0
  397. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/numpy.rst +453 -0
  398. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/object.rst +286 -0
  399. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/pycpp/utilities.rst +155 -0
  400. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/advanced/smart_ptrs.rst +174 -0
  401. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/basics.rst +307 -0
  402. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.py +89 -0
  403. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/benchmark.rst +95 -0
  404. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/changelog.rst +3121 -0
  405. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/classes.rst +555 -0
  406. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/cmake/index.rst +8 -0
  407. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/compiling.rst +726 -0
  408. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/conf.py +369 -0
  409. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/faq.rst +308 -0
  410. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/index.rst +48 -0
  411. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/installing.rst +105 -0
  412. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/limitations.rst +72 -0
  413. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11-logo.png +0 -0
  414. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  415. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python1.svg +427 -0
  416. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  417. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/pybind11_vs_boost_python2.svg +427 -0
  418. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/reference.rst +130 -0
  419. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/release.rst +143 -0
  420. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.in +6 -0
  421. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/requirements.txt +275 -0
  422. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/docs/upgrade.rst +594 -0
  423. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/attr.h +690 -0
  424. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/buffer_info.h +208 -0
  425. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/cast.h +1848 -0
  426. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/chrono.h +225 -0
  427. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/common.h +2 -0
  428. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/complex.h +74 -0
  429. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/class.h +754 -0
  430. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/common.h +1268 -0
  431. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/descr.h +172 -0
  432. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/init.h +434 -0
  433. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/internals.h +749 -0
  434. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/type_caster_base.h +1214 -0
  435. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/detail/typeid.h +65 -0
  436. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/common.h +9 -0
  437. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/matrix.h +714 -0
  438. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen/tensor.h +517 -0
  439. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eigen.h +12 -0
  440. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/embed.h +313 -0
  441. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/eval.h +156 -0
  442. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/functional.h +138 -0
  443. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil.h +219 -0
  444. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/gil_safe_call_once.h +91 -0
  445. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/iostream.h +265 -0
  446. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/numpy.h +2135 -0
  447. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/operators.h +202 -0
  448. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/options.h +92 -0
  449. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pybind11.h +3026 -0
  450. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/pytypes.h +2604 -0
  451. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl/filesystem.h +115 -0
  452. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl.h +448 -0
  453. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/stl_bind.h +822 -0
  454. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
  455. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/include/pybind11/typing.h +239 -0
  456. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/noxfile.py +107 -0
  457. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__init__.py +19 -0
  458. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/__main__.py +63 -0
  459. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/_version.py +12 -0
  460. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/commands.py +39 -0
  461. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/py.typed +0 -0
  462. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pybind11/setup_helpers.py +500 -0
  463. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/pyproject.toml +87 -0
  464. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.cfg +43 -0
  465. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/setup.py +149 -0
  466. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/CMakeLists.txt +589 -0
  467. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/conftest.py +224 -0
  468. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/constructor_stats.h +322 -0
  469. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_gil_utils.cpp +111 -0
  470. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/cross_module_interleaved_error_already_set.cpp +54 -0
  471. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
  472. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/env.py +31 -0
  473. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/pytest.ini +0 -0
  474. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_python_package/test_files.py +296 -0
  475. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  476. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/extra_setuptools/test_setuphelper.py +153 -0
  477. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/local_bindings.h +92 -0
  478. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/object.h +205 -0
  479. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_cross_module_tests.cpp +149 -0
  480. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.cpp +131 -0
  481. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pybind11_tests.h +98 -0
  482. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/pytest.ini +23 -0
  483. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/requirements.txt +13 -0
  484. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.cpp +25 -0
  485. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_async.py +26 -0
  486. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.cpp +259 -0
  487. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_buffers.py +230 -0
  488. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.cpp +387 -0
  489. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_builtin_casters.py +530 -0
  490. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.cpp +113 -0
  491. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_call_policies.py +249 -0
  492. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.cpp +280 -0
  493. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_callbacks.py +227 -0
  494. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.cpp +81 -0
  495. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_chrono.py +207 -0
  496. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.cpp +656 -0
  497. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_class.py +503 -0
  498. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/CMakeLists.txt +80 -0
  499. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/embed.cpp +23 -0
  500. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +28 -0
  501. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +39 -0
  502. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +46 -0
  503. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/main.cpp +6 -0
  504. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +47 -0
  505. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +41 -0
  506. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +47 -0
  507. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_cmake_build/test.py +10 -0
  508. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.cpp +55 -0
  509. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_const_name.py +31 -0
  510. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.cpp +158 -0
  511. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_constants_and_functions.py +58 -0
  512. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.cpp +544 -0
  513. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_copy_move.py +140 -0
  514. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.cpp +217 -0
  515. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_casters.py +124 -0
  516. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.cpp +41 -0
  517. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_custom_type_setup.py +50 -0
  518. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.cpp +129 -0
  519. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_docstring_options.py +66 -0
  520. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.cpp +443 -0
  521. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_matrix.py +816 -0
  522. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.cpp +18 -0
  523. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.inl +332 -0
  524. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eigen_tensor.py +290 -0
  525. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/CMakeLists.txt +54 -0
  526. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/catch.cpp +43 -0
  527. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/external_module.cpp +20 -0
  528. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.cpp +488 -0
  529. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_interpreter.py +16 -0
  530. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_embed/test_trampoline.py +18 -0
  531. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.cpp +133 -0
  532. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_enum.py +270 -0
  533. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.cpp +118 -0
  534. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval.py +52 -0
  535. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_eval_call.py +5 -0
  536. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.cpp +388 -0
  537. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.h +13 -0
  538. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_exceptions.py +434 -0
  539. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.cpp +430 -0
  540. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_factory_constructors.py +518 -0
  541. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.cpp +144 -0
  542. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_gil_scoped.py +244 -0
  543. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.cpp +126 -0
  544. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_iostream.py +293 -0
  545. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.cpp +325 -0
  546. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_kwargs_and_defaults.py +428 -0
  547. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.cpp +106 -0
  548. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_local_bindings.py +259 -0
  549. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.cpp +492 -0
  550. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_methods_and_attributes.py +539 -0
  551. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.cpp +125 -0
  552. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_modules.py +118 -0
  553. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.cpp +341 -0
  554. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_multiple_inheritance.py +495 -0
  555. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.cpp +547 -0
  556. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_array.py +672 -0
  557. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.cpp +639 -0
  558. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_dtypes.py +448 -0
  559. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.cpp +107 -0
  560. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_numpy_vectorize.py +268 -0
  561. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.cpp +77 -0
  562. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_opaque_types.py +60 -0
  563. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.cpp +281 -0
  564. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_operator_overloading.py +153 -0
  565. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.cpp +194 -0
  566. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pickling.py +95 -0
  567. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.cpp +45 -0
  568. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_python_multiple_inheritance.py +36 -0
  569. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.cpp +926 -0
  570. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_pytypes.py +1050 -0
  571. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.cpp +600 -0
  572. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_sequences_and_iterators.py +267 -0
  573. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.cpp +473 -0
  574. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_smart_ptr.py +317 -0
  575. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.cpp +549 -0
  576. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl.py +383 -0
  577. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.cpp +275 -0
  578. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_stl_binders.py +395 -0
  579. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.cpp +147 -0
  580. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_tagbased_polymorphic.py +30 -0
  581. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.cpp +66 -0
  582. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_thread.py +44 -0
  583. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.cpp +167 -0
  584. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_type_caster_pyobject_ptr.py +122 -0
  585. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.cpp +22 -0
  586. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_union.py +10 -0
  587. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.cpp +38 -0
  588. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_a.py +36 -0
  589. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.cpp +13 -0
  590. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_unnamed_namespace_b.py +7 -0
  591. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.cpp +54 -0
  592. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_vector_unique_ptr_member.py +16 -0
  593. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.cpp +592 -0
  594. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/test_virtual_functions.py +460 -0
  595. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-numpy-scipy.supp +140 -0
  596. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tests/valgrind-python.supp +117 -0
  597. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindCatch.cmake +76 -0
  598. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindEigen3.cmake +86 -0
  599. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/FindPythonLibsNew.cmake +310 -0
  600. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/JoinPaths.cmake +23 -0
  601. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/check-style.sh +44 -0
  602. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/cmake_uninstall.cmake.in +23 -0
  603. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
  604. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/libsize.py +38 -0
  605. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/make_changelog.py +92 -0
  606. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11.pc.in +7 -0
  607. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Common.cmake +429 -0
  608. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Config.cmake.in +233 -0
  609. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +86 -0
  610. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11NewTools.cmake +341 -0
  611. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pybind11Tools.cmake +239 -0
  612. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/pyproject.toml +3 -0
  613. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_global.py.in +63 -0
  614. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/setup_main.py.in +44 -0
  615. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
  616. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/setup.py +76 -0
  617. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Python/unit_test.py +209 -0
  618. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README.md +357 -0
  619. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/README_CN.md +301 -0
  620. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/SECURITY.md +15 -0
  621. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/dumpJavaSignature.py +144 -0
  622. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Script/formatCode.py +17 -0
  623. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/.clang-format +35 -0
  624. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32.sln +58 -0
  625. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.cpp +548 -0
  626. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj +190 -0
  627. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/Win32Demo.vcxproj.filters +30 -0
  628. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.cpp +23 -0
  629. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32Demo/pch.h +28 -0
  630. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.cpp +88 -0
  631. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj +188 -0
  632. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/Win32DemoProcess.vcxproj.filters +30 -0
  633. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.cpp +21 -0
  634. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/Win32/Win32DemoProcess/pch.h +24 -0
  635. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.metadata +10 -0
  636. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/launch.json +162 -0
  637. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/.vscode/settings.json +12 -0
  638. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/CHANGELOG.md +196 -0
  639. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/LICENSE +193 -0
  640. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/README.md +217 -0
  641. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/analysis_options.yaml +49 -0
  642. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/README.md +16 -0
  643. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/build.gradle +79 -0
  644. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/AndroidManifest.xml +41 -0
  645. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/java/com/tencent/mmkv_example/MainActivity.java +25 -0
  646. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/drawable/launch_background.xml +12 -0
  647. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  648. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  649. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  650. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  651. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  652. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/main/res/values/styles.xml +18 -0
  653. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/app/src/profile/AndroidManifest.xml +7 -0
  654. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/build.gradle +29 -0
  655. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  656. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/gradle.properties +4 -0
  657. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings.gradle +25 -0
  658. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/android/settings_aar.gradle +1 -0
  659. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/AppFrameworkInfo.plist +26 -0
  660. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Debug.xcconfig +2 -0
  661. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/Release.xcconfig +2 -0
  662. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldb_helper.py +32 -0
  663. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Flutter/ephemeral/flutter_lldbinit +5 -0
  664. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Podfile +49 -0
  665. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.h +26 -0
  666. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/AppDelegate.m +33 -0
  667. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  668. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  669. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  670. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  671. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  672. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  673. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  674. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  675. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  676. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  677. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  678. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  679. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  680. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  681. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  682. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  683. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  684. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  685. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  686. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  687. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  688. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  689. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Base.lproj/Main.storyboard +29 -0
  690. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Info.plist +49 -0
  691. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/Runner.entitlements +10 -0
  692. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner/main.m +29 -0
  693. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.pbxproj +612 -0
  694. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  695. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  696. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  697. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +90 -0
  698. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  699. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  700. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  701. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/lib/main.dart +565 -0
  702. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/CMakeLists.txt +128 -0
  703. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/CMakeLists.txt +88 -0
  704. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.cc +15 -0
  705. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugin_registrant.h +15 -0
  706. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/flutter/generated_plugins.cmake +24 -0
  707. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/CMakeLists.txt +26 -0
  708. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/main.cc +6 -0
  709. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.cc +130 -0
  710. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/linux/runner/my_application.h +18 -0
  711. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Debug.xcconfig +2 -0
  712. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/Flutter-Release.xcconfig +2 -0
  713. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Flutter/GeneratedPluginRegistrant.swift +14 -0
  714. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Podfile +47 -0
  715. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/AppDelegate.swift +13 -0
  716. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  717. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  718. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  719. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  720. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  721. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  722. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  723. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  724. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  725. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  726. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Debug.xcconfig +2 -0
  727. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Release.xcconfig +2 -0
  728. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Configs/Warnings.xcconfig +13 -0
  729. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/DebugProfile.entitlements +12 -0
  730. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Info.plist +32 -0
  731. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/MainFlutterWindow.swift +15 -0
  732. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner/Release.entitlements +8 -0
  733. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.pbxproj +800 -0
  734. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  735. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
  736. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/contents.xcworkspacedata +10 -0
  737. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  738. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +5 -0
  739. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/macos/RunnerTests/RunnerTests.swift +12 -0
  740. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/app.json5 +10 -0
  741. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/element/string.json +8 -0
  742. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/AppScope/resources/base/media/app_icon.png +0 -0
  743. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/build-profile.json5 +41 -0
  744. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/build-profile.json5 +34 -0
  745. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/hvigorfile.ts +17 -0
  746. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/oh-package.json5 +13 -0
  747. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +36 -0
  748. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/pages/Index.ets +38 -0
  749. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets +28 -0
  750. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/module.json5 +53 -0
  751. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/color.json +8 -0
  752. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/element/string.json +16 -0
  753. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/media/icon.png +0 -0
  754. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/base/profile/main_pages.json +5 -0
  755. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/en_US/element/string.json +16 -0
  756. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/main/resources/zh_CN/element/string.json +16 -0
  757. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/Ability.test.ets +50 -0
  758. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/test/List.test.ets +20 -0
  759. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/TestAbility.ets +63 -0
  760. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets +49 -0
  761. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts +64 -0
  762. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/module.json5 +51 -0
  763. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/color.json +8 -0
  764. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/element/string.json +16 -0
  765. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/media/icon.png +0 -0
  766. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/entry/src/ohosTest/resources/base/profile/test_pages.json +5 -0
  767. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigor/hvigor-config.json5 +20 -0
  768. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/hvigorfile.ts +21 -0
  769. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/ohos/oh-package.json5 +21 -0
  770. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/pubspec.yaml +75 -0
  771. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/CMakeLists.txt +108 -0
  772. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/CMakeLists.txt +109 -0
  773. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.cc +14 -0
  774. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugin_registrant.h +15 -0
  775. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/flutter/generated_plugins.cmake +24 -0
  776. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/CMakeLists.txt +40 -0
  777. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/Runner.rc +121 -0
  778. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.cpp +71 -0
  779. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/flutter_window.h +33 -0
  780. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/main.cpp +43 -0
  781. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resource.h +16 -0
  782. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/resources/app_icon.ico +0 -0
  783. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/runner.exe.manifest +14 -0
  784. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.cpp +65 -0
  785. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/utils.h +19 -0
  786. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.cpp +288 -0
  787. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/example/windows/runner/win32_window.h +102 -0
  788. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/lib/mmkv.dart +1052 -0
  789. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/mmkv.iml +17 -0
  790. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/pubspec.yaml +62 -0
  791. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/test/mmkv_test.dart +48 -0
  792. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/fix_mmkv_plugin_name.rb +4 -0
  793. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv/tool/mmkvpodhelper.rb +23 -0
  794. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv.iml +25 -0
  795. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/CHANGELOG.md +48 -0
  796. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/LICENSE +193 -0
  797. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/README.md +17 -0
  798. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/build.gradle +39 -0
  799. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  800. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  801. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradle.properties +4 -0
  802. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew +160 -0
  803. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/gradlew.bat +90 -0
  804. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/settings.gradle +1 -0
  805. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/AndroidManifest.xml +1 -0
  806. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/android/src/main/java/com/tencent/mmkv/MMKVPlugin.java +82 -0
  807. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/lib/mmkv_android.dart +76 -0
  808. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_android/pubspec.yaml +40 -0
  809. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/.metadata +33 -0
  810. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/CHANGELOG.md +52 -0
  811. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/LICENSE +193 -0
  812. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/README.md +17 -0
  813. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.h +28 -0
  814. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/MMKVPlugin.mm +39 -0
  815. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.h +32 -0
  816. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/Classes/flutter-bridge.mm +693 -0
  817. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/darwin/mmkv_ios.podspec +35 -0
  818. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/lib/mmkv_ios.dart +78 -0
  819. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ios/pubspec.yaml +44 -0
  820. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/.metadata +30 -0
  821. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/CHANGELOG.md +9 -0
  822. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/LICENSE +193 -0
  823. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/README.md +17 -0
  824. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/analysis_options.yaml +4 -0
  825. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/lib/mmkv_linux.dart +69 -0
  826. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/CMakeLists.txt +63 -0
  827. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/flutter-bridge.cpp +694 -0
  828. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/include/mmkv_linux/mmkv_linux_plugin.h +46 -0
  829. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/linux/mmkv_linux_plugin.cc +97 -0
  830. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_linux/pubspec.yaml +47 -0
  831. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/.metadata +30 -0
  832. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/CHANGELOG.md +42 -0
  833. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/LICENSE +193 -0
  834. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/README.md +17 -0
  835. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/analysis_options.yaml +4 -0
  836. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/lib/mmkv_ohos.dart +84 -0
  837. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/build-profile.json5 +10 -0
  838. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/hvigorfile.ts +2 -0
  839. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/index.ets +17 -0
  840. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/oh-package.json5 +15 -0
  841. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/ets/components/plugin/MMKVPlugin.ets +78 -0
  842. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/ohos/src/main/module.json5 +10 -0
  843. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_ohos/pubspec.yaml +50 -0
  844. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/CHANGELOG.md +38 -0
  845. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/LICENSE +193 -0
  846. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/README.md +30 -0
  847. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_ffi.dart +363 -0
  848. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/lib/mmkv_platform_interface.dart +363 -0
  849. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_platform_interface/pubspec.yaml +23 -0
  850. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/.metadata +30 -0
  851. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/CHANGELOG.md +9 -0
  852. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/LICENSE +193 -0
  853. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/README.md +17 -0
  854. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/analysis_options.yaml +4 -0
  855. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/lib/mmkv_win32.dart +69 -0
  856. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/pubspec.yaml +47 -0
  857. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/CMakeLists.txt +71 -0
  858. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/flutter-bridge.cpp +721 -0
  859. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/include/mmkv_win32/mmkv_win32_plugin.h +43 -0
  860. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/flutter/mmkv_win32/windows/mmkv_win32_plugin.cpp +88 -0
  861. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/AutoCleanInfo.hpp +65 -0
  862. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKV.h +552 -0
  863. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/MMKVHandler.h +60 -0
  864. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/Resources/Info.plist +24 -0
  865. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV/libMMKV.mm +1361 -0
  866. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +967 -0
  867. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  868. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  869. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV For App Extension.xcscheme +67 -0
  870. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV Static.xcscheme +76 -0
  871. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKV.xcscheme +76 -0
  872. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKV/MMKV.xcodeproj/xcshareddata/xcschemes/MMKVWatchExtension.xcscheme +67 -0
  873. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/Config.xcconfig +10 -0
  874. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.h +15 -0
  875. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/AppDelegate.m +43 -0
  876. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  877. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
  878. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Assets.xcassets/Contents.json +6 -0
  879. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/LaunchScreen.storyboard +25 -0
  880. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Base.lproj/Main.storyboard +42 -0
  881. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/Info.plist +25 -0
  882. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/MMKVCatalystDemo.entitlements +12 -0
  883. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.h +16 -0
  884. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/SceneDelegate.m +58 -0
  885. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.h +15 -0
  886. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/ViewController.mm +85 -0
  887. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVCatalystDemo/main.m +19 -0
  888. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.h +27 -0
  889. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/AppDelegate.m +135 -0
  890. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/DemoSwiftUsage.swift +82 -0
  891. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/MMKVDemo-Bridging-Header.h +22 -0
  892. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
  893. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/LaunchScreen.storyboard +25 -0
  894. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Base.lproj/Main.storyboard +48 -0
  895. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/Info.plist +49 -0
  896. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/MMKVDemo.entitlements +10 -0
  897. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly +0 -0
  898. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/Resources/testReadOnly.crc +0 -0
  899. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.cpp +204 -0
  900. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/TestMMKVCpp.hpp +18 -0
  901. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.h +39 -0
  902. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController+TestCaseBad.mm +200 -0
  903. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.h +32 -0
  904. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/ViewController.mm +1245 -0
  905. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo/main.m +28 -0
  906. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.pbxproj +1944 -0
  907. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  908. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  909. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  910. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVDemo.xcscheme +88 -0
  911. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVMacDemo.xcscheme +78 -0
  912. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/MMKVTodayExtensionDemo.xcscheme +116 -0
  913. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp (Notification).xcscheme +106 -0
  914. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme +102 -0
  915. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemo.xcodeproj/xcshareddata/xcschemes/kvdemo.xcscheme +78 -0
  916. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/Info.plist +22 -0
  917. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVDemoTests.mm +554 -0
  918. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVDemoTests/MMKVPerformanceTest.mm +118 -0
  919. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.h +13 -0
  920. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/AppDelegate.m +27 -0
  921. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
  922. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Assets.xcassets/Contents.json +6 -0
  923. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Base.lproj/Main.storyboard +718 -0
  924. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/Info.plist +32 -0
  925. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/MMKVMacDemo.entitlements +10 -0
  926. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.h +13 -0
  927. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/ViewController.mm +352 -0
  928. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVMacDemo/main.m +15 -0
  929. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Base.lproj/MainInterface.storyboard +45 -0
  930. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/Info.plist +31 -0
  931. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/MMKVTodayExtensionDemo.entitlements +10 -0
  932. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.h +25 -0
  933. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVTodayExtensionDemo/TodayViewController.m +106 -0
  934. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  935. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json +6 -0
  936. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Contents.json +17 -0
  937. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  938. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json +6 -0
  939. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json +12 -0
  940. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json +6 -0
  941. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Assets.xcassets/Contents.json +6 -0
  942. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/ContentView.swift +71 -0
  943. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Info.plist +15 -0
  944. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/MMKVVisionDemoApp.swift +22 -0
  945. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/MMKVVisionDemo/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
  946. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/AppIcon.appiconset/Contents.json +81 -0
  947. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Assets.xcassets/Contents.json +6 -0
  948. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Base.lproj/Interface.storyboard +47 -0
  949. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp/Info.plist +33 -0
  950. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +28 -0
  951. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Contents.json +48 -0
  952. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +28 -0
  953. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +28 -0
  954. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +28 -0
  955. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +28 -0
  956. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +28 -0
  957. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +28 -0
  958. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +28 -0
  959. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Assets.xcassets/Contents.json +6 -0
  960. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.h +25 -0
  961. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/ExtensionDelegate.mm +135 -0
  962. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/Info.plist +36 -0
  963. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.h +26 -0
  964. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/InterfaceController.m +50 -0
  965. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.h +26 -0
  966. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/NotificationController.m +60 -0
  967. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/WatchApp Extension/PushNotificationPayload.apns +20 -0
  968. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.h +15 -0
  969. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/AppDelegate.m +49 -0
  970. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  971. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
  972. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Assets.xcassets/Contents.json +6 -0
  973. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/LaunchScreen.storyboard +25 -0
  974. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Base.lproj/Main.storyboard +45 -0
  975. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/Info.plist +25 -0
  976. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.h +16 -0
  977. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/SceneDelegate.m +58 -0
  978. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.h +15 -0
  979. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/ViewController.m +38 -0
  980. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/kvdemo.entitlements +10 -0
  981. package/harmony/reactNativeMMKV/src/main/cpp/MMKV/iOS/MMKVDemo/kvdemo/main.m +19 -0
  982. package/harmony/reactNativeMMKV/src/main/cpp/MMKVManagedBuffer.h +49 -0
  983. package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.cpp +152 -0
  984. package/harmony/reactNativeMMKV/src/main/cpp/MmkvCxx.h +36 -0
  985. package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.cpp +357 -0
  986. package/harmony/reactNativeMMKV/src/main/cpp/MmkvHostObject.h +66 -0
  987. package/harmony/reactNativeMMKV/src/main/cpp/MmkvLogger.h +52 -0
  988. package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.cpp +37 -0
  989. package/harmony/reactNativeMMKV/src/main/cpp/MmkvPlatformContext.h +36 -0
  990. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVComponentDescriptor.h +65 -0
  991. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVJSIBinder.h +55 -0
  992. package/harmony/reactNativeMMKV/src/main/cpp/NativeMMKVPackage.h +67 -0
  993. package/harmony/reactNativeMMKV/src/main/cpp/Props.cpp +37 -0
  994. package/harmony/reactNativeMMKV/src/main/cpp/Props.h +42 -0
  995. package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.cpp +39 -0
  996. package/harmony/reactNativeMMKV/src/main/cpp/ShadowNodes.h +41 -0
  997. package/harmony/reactNativeMMKV/src/main/cpp/States.cpp +40 -0
  998. package/harmony/reactNativeMMKV/src/main/cpp/States.h +45 -0
  999. package/harmony/reactNativeMMKV/src/main/ets/Logger.ts +65 -0
  1000. package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxPackage.ts +46 -0
  1001. package/harmony/reactNativeMMKV/src/main/ets/MmkvCxxTurboModule.ts +60 -0
  1002. package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextPackage.ts +46 -0
  1003. package/harmony/reactNativeMMKV/src/main/ets/MmkvPlatformContextTurboModule.ts +48 -0
  1004. package/harmony/reactNativeMMKV/src/main/module.json5 +7 -0
  1005. package/harmony/reactNativeMMKV/src/main/resources/base/element/string.json +8 -0
  1006. package/harmony/reactNativeMMKV/src/main/resources/en_US/element/string.json +8 -0
  1007. package/harmony/reactNativeMMKV/src/main/resources/zh_CN/element/string.json +8 -0
  1008. package/harmony/reactNativeMMKV/ts.ts +27 -0
  1009. package/harmony/reactNativeMMKV.har +0 -0
  1010. package/lib/commonjs/MMKV.js +124 -0
  1011. package/lib/commonjs/MMKV.js.map +1 -0
  1012. package/lib/commonjs/MemoryWarningListener.js +31 -0
  1013. package/lib/commonjs/MemoryWarningListener.js.map +1 -0
  1014. package/lib/commonjs/MemoryWarningListener.web.js +11 -0
  1015. package/lib/commonjs/MemoryWarningListener.web.js.map +1 -0
  1016. package/lib/commonjs/ModuleNotFoundError.js +75 -0
  1017. package/lib/commonjs/ModuleNotFoundError.js.map +1 -0
  1018. package/lib/commonjs/NativeMmkv.js +53 -0
  1019. package/lib/commonjs/NativeMmkv.js.map +1 -0
  1020. package/lib/commonjs/NativeMmkvPlatformContext.js +22 -0
  1021. package/lib/commonjs/NativeMmkvPlatformContext.js.map +1 -0
  1022. package/lib/commonjs/PlatformChecker.js +14 -0
  1023. package/lib/commonjs/PlatformChecker.js.map +1 -0
  1024. package/lib/commonjs/Types.js +32 -0
  1025. package/lib/commonjs/Types.js.map +1 -0
  1026. package/lib/commonjs/createMMKV.js +43 -0
  1027. package/lib/commonjs/createMMKV.js.map +1 -0
  1028. package/lib/commonjs/createMMKV.mock.js +43 -0
  1029. package/lib/commonjs/createMMKV.mock.js.map +1 -0
  1030. package/lib/commonjs/createMMKV.web.js +110 -0
  1031. package/lib/commonjs/createMMKV.web.js.map +1 -0
  1032. package/lib/commonjs/createTextEncoder.js +23 -0
  1033. package/lib/commonjs/createTextEncoder.js.map +1 -0
  1034. package/lib/commonjs/hooks.js +198 -0
  1035. package/lib/commonjs/hooks.js.map +1 -0
  1036. package/lib/commonjs/index.js +40 -0
  1037. package/lib/commonjs/index.js.map +1 -0
  1038. package/lib/commonjs/package.json +1 -0
  1039. package/lib/module/MMKV.js +119 -0
  1040. package/lib/module/MMKV.js.map +1 -0
  1041. package/lib/module/MemoryWarningListener.js +27 -0
  1042. package/lib/module/MemoryWarningListener.js.map +1 -0
  1043. package/lib/module/MemoryWarningListener.web.js +6 -0
  1044. package/lib/module/MemoryWarningListener.web.js.map +1 -0
  1045. package/lib/module/ModuleNotFoundError.js +70 -0
  1046. package/lib/module/ModuleNotFoundError.js.map +1 -0
  1047. package/lib/module/NativeMmkv.js +51 -0
  1048. package/lib/module/NativeMmkv.js.map +1 -0
  1049. package/lib/module/NativeMmkvPlatformContext.js +18 -0
  1050. package/lib/module/NativeMmkvPlatformContext.js.map +1 -0
  1051. package/lib/module/PlatformChecker.js +10 -0
  1052. package/lib/module/PlatformChecker.js.map +1 -0
  1053. package/lib/module/Types.js +31 -0
  1054. package/lib/module/Types.js.map +1 -0
  1055. package/lib/module/createMMKV.js +38 -0
  1056. package/lib/module/createMMKV.js.map +1 -0
  1057. package/lib/module/createMMKV.mock.js +38 -0
  1058. package/lib/module/createMMKV.mock.js.map +1 -0
  1059. package/lib/module/createMMKV.web.js +105 -0
  1060. package/lib/module/createMMKV.web.js.map +1 -0
  1061. package/lib/module/createTextEncoder.js +19 -0
  1062. package/lib/module/createTextEncoder.js.map +1 -0
  1063. package/lib/module/hooks.js +189 -0
  1064. package/lib/module/hooks.js.map +1 -0
  1065. package/lib/module/index.js +6 -0
  1066. package/lib/module/index.js.map +1 -0
  1067. package/lib/typescript/src/MMKV.d.ts +34 -0
  1068. package/lib/typescript/src/MMKV.d.ts.map +1 -0
  1069. package/lib/typescript/src/MemoryWarningListener.d.ts +3 -0
  1070. package/lib/typescript/src/MemoryWarningListener.d.ts.map +1 -0
  1071. package/lib/typescript/src/MemoryWarningListener.web.d.ts +3 -0
  1072. package/lib/typescript/src/MemoryWarningListener.web.d.ts.map +1 -0
  1073. package/lib/typescript/src/ModuleNotFoundError.d.ts +7 -0
  1074. package/lib/typescript/src/ModuleNotFoundError.d.ts.map +1 -0
  1075. package/lib/typescript/src/NativeMmkv.d.ts +91 -0
  1076. package/lib/typescript/src/NativeMmkv.d.ts.map +1 -0
  1077. package/lib/typescript/src/NativeMmkvPlatformContext.d.ts +20 -0
  1078. package/lib/typescript/src/NativeMmkvPlatformContext.d.ts.map +1 -0
  1079. package/lib/typescript/src/PlatformChecker.d.ts +2 -0
  1080. package/lib/typescript/src/PlatformChecker.d.ts.map +1 -0
  1081. package/lib/typescript/src/Types.d.ts +172 -0
  1082. package/lib/typescript/src/Types.d.ts.map +1 -0
  1083. package/lib/typescript/src/__tests__/hooks.test.d.ts +2 -0
  1084. package/lib/typescript/src/__tests__/hooks.test.d.ts.map +1 -0
  1085. package/lib/typescript/src/createMMKV.d.ts +3 -0
  1086. package/lib/typescript/src/createMMKV.d.ts.map +1 -0
  1087. package/lib/typescript/src/createMMKV.mock.d.ts +3 -0
  1088. package/lib/typescript/src/createMMKV.mock.d.ts.map +1 -0
  1089. package/lib/typescript/src/createMMKV.web.d.ts +3 -0
  1090. package/lib/typescript/src/createMMKV.web.d.ts.map +1 -0
  1091. package/lib/typescript/src/createTextEncoder.d.ts +2 -0
  1092. package/lib/typescript/src/createTextEncoder.d.ts.map +1 -0
  1093. package/lib/typescript/src/hooks.d.ts +86 -0
  1094. package/lib/typescript/src/hooks.d.ts.map +1 -0
  1095. package/lib/typescript/src/index.d.ts +4 -0
  1096. package/lib/typescript/src/index.d.ts.map +1 -0
  1097. package/package.json +187 -0
  1098. package/react-native-mmkv.podspec +38 -0
  1099. package/react-native.config.js +20 -0
  1100. package/src/MMKV.ts +142 -0
  1101. package/src/MemoryWarningListener.ts +29 -0
  1102. package/src/MemoryWarningListener.web.ts +5 -0
  1103. package/src/ModuleNotFoundError.ts +95 -0
  1104. package/src/NativeMmkv.ts +118 -0
  1105. package/src/NativeMmkvPlatformContext.ts +38 -0
  1106. package/src/PlatformChecker.ts +9 -0
  1107. package/src/Types.ts +178 -0
  1108. package/src/__tests__/hooks.test.tsx +89 -0
  1109. package/src/createMMKV.mock.ts +38 -0
  1110. package/src/createMMKV.ts +42 -0
  1111. package/src/createMMKV.web.ts +127 -0
  1112. package/src/createTextEncoder.ts +16 -0
  1113. package/src/hooks.ts +247 -0
  1114. package/src/index.ts +4 -0
@@ -0,0 +1,1840 @@
1
+ /*
2
+ * Tencent is pleased to support the open source community by making
3
+ * MMKV available.
4
+ *
5
+ * Copyright (C) 2024 THL A29 Limited, a Tencent company.
6
+ * All rights reserved.
7
+ *
8
+ * Licensed under the BSD 3-Clause License (the "License"); you may not use
9
+ * this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * https://opensource.org/licenses/BSD-3-Clause
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ #include <MMKV/MMBuffer.h>
22
+ #include <MMKV/MMKV.h>
23
+ #include <MMKV/MMKVLog.h>
24
+ #include <MMKV/MemoryFile.h>
25
+ #include <MMKV/MiniPBCoder.h>
26
+ #include "napi/native_api.h"
27
+ #include <cstdint>
28
+ #include <string>
29
+
30
+ using namespace std;
31
+ using namespace mmkv;
32
+
33
+ // assuming env is defined
34
+ #define NAPI_CALL_RET(call, return_value) \
35
+ do { \
36
+ napi_status status = (call); \
37
+ if (status != napi_ok) { \
38
+ const napi_extended_error_info *error_info = nullptr; \
39
+ napi_get_last_error_info(env, &error_info); \
40
+ MMKVInfo("NAPI Error: code %d, msg %s", error_info->error_code, error_info->error_message); \
41
+ bool is_pending; \
42
+ napi_is_exception_pending(env, &is_pending); \
43
+ if (!is_pending) { \
44
+ auto message = error_info->error_message ? error_info->error_message : "null"; \
45
+ napi_throw_error(env, nullptr, message); \
46
+ return return_value; \
47
+ } \
48
+ } \
49
+ } while (0)
50
+
51
+ #define NAPI_CALL(call) NAPI_CALL_RET(call, nullptr)
52
+
53
+ bool IsNValueUndefined(napi_env env, napi_value value) {
54
+ napi_valuetype type;
55
+ if (napi_typeof(env, value, &type) == napi_ok && type == napi_undefined) {
56
+ return true;
57
+ }
58
+ return false;
59
+ }
60
+
61
+ static string NValueToString(napi_env env, napi_value value, bool maybeUndefined = false) {
62
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
63
+ return "";
64
+ }
65
+
66
+ size_t size;
67
+ NAPI_CALL_RET(napi_get_value_string_utf8(env, value, nullptr, 0, &size), "");
68
+ string result(size, '\0');
69
+ NAPI_CALL_RET(napi_get_value_string_utf8(env, value, (char *) result.data(), size + 1, nullptr), "");
70
+ return result;
71
+ }
72
+
73
+ static napi_value StringToNValue(napi_env env, const string &value) {
74
+ napi_value result;
75
+ napi_create_string_utf8(env, value.data(), value.size(), &result);
76
+ return result;
77
+ }
78
+
79
+ static vector<string> NValueToStringArray(napi_env env, napi_value value, bool maybeUndefined = false) {
80
+ vector<string> keys;
81
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
82
+ return keys;
83
+ }
84
+
85
+ uint32_t length = 0;
86
+ if (napi_get_array_length(env, value, &length) != napi_ok || length == 0) {
87
+ return keys;
88
+ }
89
+ keys.reserve(length);
90
+
91
+ for (uint32_t index = 0; index < length; index++) {
92
+ napi_value jsKey = nullptr;
93
+ if (napi_get_element(env, value, index, &jsKey) != napi_ok) {
94
+ continue;
95
+ }
96
+ keys.push_back(NValueToString(env, jsKey));
97
+ }
98
+ return keys;
99
+ }
100
+
101
+ static napi_value StringArrayToNValue(napi_env env, const vector<string> &value) {
102
+ napi_value jsArr = nullptr;
103
+ napi_create_array_with_length(env, value.size(), &jsArr);
104
+ for (size_t index = 0; index < value.size(); index++) {
105
+ auto jsKey = StringToNValue(env, value[index]);
106
+ napi_set_element(env, jsArr, index, jsKey);
107
+ }
108
+ return jsArr;
109
+ }
110
+
111
+ static napi_value DoubleToNValue(napi_env env, double value);
112
+ static double NValueToDouble(napi_env env, napi_value value);
113
+
114
+ static vector<double> NValueToDoubleArray(napi_env env, napi_value value, bool maybeUndefined = false) {
115
+ vector<double> vec;
116
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
117
+ return vec;
118
+ }
119
+
120
+ uint32_t length = 0;
121
+ if (napi_get_array_length(env, value, &length) != napi_ok || length == 0) {
122
+ return vec;
123
+ }
124
+ vec.reserve(length);
125
+
126
+ for (uint32_t index = 0; index < length; index++) {
127
+ napi_value jsKey = nullptr;
128
+ if (napi_get_element(env, value, index, &jsKey) != napi_ok) {
129
+ continue;
130
+ }
131
+ vec.push_back(NValueToDouble(env, jsKey));
132
+ }
133
+ return vec;
134
+ }
135
+
136
+ static napi_value DoubleArrayToNValue(napi_env env, const vector<double> &value) {
137
+ napi_value jsArr = nullptr;
138
+ napi_create_array_with_length(env, value.size(), &jsArr);
139
+ for (size_t index = 0; index < value.size(); index++) {
140
+ auto jsKey = DoubleToNValue(env, value[index]);
141
+ napi_set_element(env, jsArr, index, jsKey);
142
+ }
143
+ return jsArr;
144
+ }
145
+
146
+ static napi_value BoolToNValue(napi_env env, bool value);
147
+ static bool NValueToBool(napi_env env, napi_value value, bool maybeUndefined = false);
148
+
149
+ static vector<bool> NValueToBoolArray(napi_env env, napi_value value, bool maybeUndefined = false) {
150
+ vector<bool> keys;
151
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
152
+ return keys;
153
+ }
154
+
155
+ uint32_t length = 0;
156
+ if (napi_get_array_length(env, value, &length) != napi_ok || length == 0) {
157
+ return keys;
158
+ }
159
+ keys.reserve(length);
160
+
161
+ for (uint32_t index = 0; index < length; index++) {
162
+ napi_value jsKey = nullptr;
163
+ if (napi_get_element(env, value, index, &jsKey) != napi_ok) {
164
+ continue;
165
+ }
166
+ keys.push_back(NValueToBool(env, jsKey));
167
+ }
168
+ return keys;
169
+ }
170
+
171
+ static napi_value BoolArrayToNValue(napi_env env, const vector<bool> &value) {
172
+ napi_value jsArr = nullptr;
173
+ napi_create_array_with_length(env, value.size(), &jsArr);
174
+ for (size_t index = 0; index < value.size(); index++) {
175
+ auto jsKey = BoolToNValue(env, value[index]);
176
+ napi_set_element(env, jsArr, index, jsKey);
177
+ }
178
+ return jsArr;
179
+ }
180
+
181
+ static void my_finalizer(napi_env env, void *finalize_data, void *finalize_hint) {
182
+ // MMKVInfo("free %p", finalize_data);
183
+ free(finalize_data);
184
+ }
185
+
186
+ static MMBuffer NValueToMMBuffer(napi_env env, napi_value value, bool maybeUndefined = false) {
187
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
188
+ return MMBuffer();
189
+ }
190
+
191
+ void *data = nullptr;
192
+ size_t length = 0;
193
+ if (napi_get_arraybuffer_info(env, value, &data, &length) == napi_ok) {
194
+ return MMBuffer(data, length, mmkv::MMBufferNoCopy);
195
+ }
196
+ return MMBuffer();
197
+ }
198
+
199
+ static napi_value MMBufferToNValue(napi_env env, const MMBuffer &value) {
200
+ napi_value result = nullptr;
201
+ void *data = nullptr;
202
+ if (napi_create_arraybuffer(env, value.length(), &data, &result) == napi_ok) {
203
+ memcpy(data, value.getPtr(), value.length());
204
+ }
205
+ return result;
206
+ }
207
+
208
+ static napi_value MMBufferToNValue(napi_env env, MMBuffer &&value) {
209
+ if (!value.isStoredOnStack()) {
210
+ napi_value result = nullptr;
211
+ auto ret = napi_create_external_arraybuffer(env, value.getPtr(), value.length(), my_finalizer, nullptr, &result);
212
+ if (ret == napi_ok) {
213
+ // MMKVInfo("using napi_create_external_arraybuffer %p", value.getPtr());
214
+ value.detach();
215
+ return result;
216
+ }
217
+ }
218
+ return MMBufferToNValue(env, (const MMBuffer &) value);
219
+ }
220
+
221
+ // static napi_value MMBufferToTypeArray(napi_env env, const MMBuffer &value, napi_typedarray_type type) {
222
+ // napi_value result = nullptr;
223
+ // void *data = nullptr;
224
+ // if (napi_create_typedarray(env, type, value.length(), &data, &result) == napi_ok) {
225
+ // memcpy(data, value.getPtr(), value.length());
226
+ // }
227
+ // return result;
228
+ // }
229
+ //
230
+ // static napi_value MMBufferToTypeArray(napi_env env, MMBuffer &&value) {
231
+ // if (!value.isStoredOnStack()) {
232
+ // napi_value result = nullptr;
233
+ // auto ret =
234
+ // napi_create_external_arraybuffer(env, value.getPtr(), value.length(), my_finalizer, nullptr, &result);
235
+ // if (ret == napi_ok) {
236
+ // // MMKVInfo("using napi_create_external_arraybuffer %p", value.getPtr());
237
+ // value.detach();
238
+ // return result;
239
+ // }
240
+ // }
241
+ // return MMBufferToNValue(env, (const MMBuffer &)value);
242
+ // }
243
+
244
+ static napi_value NAPIUndefined(napi_env env) {
245
+ napi_value result = nullptr;
246
+ napi_get_undefined(env, &result);
247
+ return result;
248
+ }
249
+
250
+ static napi_value NAPINull(napi_env env) {
251
+ napi_value result;
252
+ napi_get_null(env, &result);
253
+ return result;
254
+ }
255
+
256
+ static napi_value BoolToNValue(napi_env env, bool value) {
257
+ napi_value result;
258
+ napi_value resultBool;
259
+ napi_create_double(env, value, &result);
260
+ napi_coerce_to_bool(env, result, &resultBool);
261
+ return resultBool;
262
+ }
263
+
264
+ static bool NValueToBool(napi_env env, napi_value value, bool maybeUndefined) {
265
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
266
+ return false;
267
+ }
268
+ bool result;
269
+ if (napi_get_value_bool(env, value, &result) == napi_ok) {
270
+ return result;
271
+ }
272
+ return false;
273
+ }
274
+
275
+ static napi_value Int32ToNValue(napi_env env, int32_t value) {
276
+ napi_value result;
277
+ napi_create_int32(env, value, &result);
278
+ return result;
279
+ }
280
+
281
+ static int32_t NValueToInt32(napi_env env, napi_value value) {
282
+ int32_t result;
283
+ napi_get_value_int32(env, value, &result);
284
+ return result;
285
+ }
286
+
287
+ static napi_value UInt32ToNValue(napi_env env, uint32_t value) {
288
+ napi_value result;
289
+ napi_create_uint32(env, value, &result);
290
+ return result;
291
+ }
292
+
293
+ static uint32_t NValueToUInt32(napi_env env, napi_value value) {
294
+ uint32_t result;
295
+ napi_get_value_uint32(env, value, &result);
296
+ return result;
297
+ }
298
+
299
+ static napi_value DoubleToNValue(napi_env env, double value) {
300
+ napi_value result;
301
+ napi_create_double(env, value, &result);
302
+ return result;
303
+ }
304
+
305
+ static double NValueToDouble(napi_env env, napi_value value) {
306
+ double result;
307
+ napi_get_value_double(env, value, &result);
308
+ return result;
309
+ }
310
+
311
+ static napi_value Int64ToNValue(napi_env env, int64_t value) {
312
+ napi_value result;
313
+ napi_create_bigint_int64(env, value, &result);
314
+ return result;
315
+ }
316
+
317
+ static int64_t NValueToInt64(napi_env env, napi_value value) {
318
+ int64_t result;
319
+ bool lossless;
320
+ napi_get_value_bigint_int64(env, value, &result, &lossless);
321
+ return result;
322
+ }
323
+
324
+ static napi_value UInt64ToNValue(napi_env env, uint64_t value) {
325
+ napi_value result;
326
+ napi_create_bigint_uint64(env, value, &result);
327
+ return result;
328
+ }
329
+
330
+ static uint64_t NValueToUInt64(napi_env env, napi_value value, bool maybeUndefined = false) {
331
+ if (maybeUndefined && IsNValueUndefined(env, value)) {
332
+ return 0;
333
+ }
334
+ uint64_t result;
335
+ bool lossless;
336
+ napi_get_value_bigint_uint64(env, value, &result, &lossless);
337
+ return result;
338
+ }
339
+
340
+ struct CallbackInfo {
341
+ napi_ref handlerRef = nullptr;
342
+
343
+ napi_ref callbacks[6] = {};
344
+ napi_ref &wantLogRedirect = callbacks[0];
345
+ napi_ref &mmkvLog = callbacks[1];
346
+ napi_ref &onMMKVCRCCheckFail = callbacks[2];
347
+ napi_ref &onMMKVFileLengthError = callbacks[3];
348
+ napi_ref &wantContentChangeNotification = callbacks[4];
349
+ napi_ref &onContentChangedByOuterProcess = callbacks[5];
350
+ };
351
+
352
+ static const char *g_arrCallbackNames[] = {
353
+ "wantLogRedirect",
354
+ "mmkvLog",
355
+ "onMMKVCRCCheckFail",
356
+ "onMMKVFileLengthError",
357
+ "wantContentChangeNotification",
358
+ "onContentChangedByOuterProcess"
359
+ };
360
+
361
+ static CallbackInfo g_callbackInfo;
362
+
363
+ static std::tuple<bool, bool, bool> initCallbacks(napi_env env, napi_value callbackArg) {
364
+ if (IsNValueUndefined(env, callbackArg)) {
365
+ return {false, false, false};
366
+ }
367
+ napi_valuetype valueType;
368
+ napi_typeof(env, callbackArg, &valueType);
369
+ if (valueType != napi_object) {
370
+ napi_throw_type_error(env, nullptr, "Expected an object as the callback argument");
371
+ return {false, false, false};
372
+ }
373
+
374
+ bool hasCallback = false;
375
+ for (size_t index = 0; index < (sizeof(g_arrCallbackNames) / sizeof(g_arrCallbackNames[0])); index++) {
376
+ auto &name = g_arrCallbackNames[index];
377
+ napi_value callback;
378
+ if (napi_get_named_property(env, callbackArg, name, &callback) != napi_ok) {
379
+ continue;
380
+ }
381
+ napi_valuetype callbackType;
382
+ napi_typeof(env, callback, &callbackType);
383
+ if (callbackType != napi_function) {
384
+ napi_throw_type_error(env, nullptr, "Expected a function as the callback");
385
+ continue;
386
+ }
387
+ hasCallback = true;
388
+
389
+ napi_create_reference(env, callback, 1, &g_callbackInfo.callbacks[index]);
390
+ }
391
+ if (hasCallback) {
392
+ napi_create_reference(env, callbackArg, 1, &g_callbackInfo.handlerRef);
393
+ }
394
+
395
+ bool wantLogRedirect = false;
396
+ if (g_callbackInfo.wantLogRedirect) {
397
+ napi_value callback;
398
+ napi_get_reference_value(env, g_callbackInfo.wantLogRedirect, &callback);
399
+
400
+ napi_value result;
401
+ napi_call_function(env, callbackArg, callback, 0, nullptr, &result);
402
+ wantLogRedirect = NValueToBool(env, result);
403
+ }
404
+
405
+ bool wantContentChangeNotification = false;
406
+ if (g_callbackInfo.wantContentChangeNotification) {
407
+ napi_value callback;
408
+ napi_get_reference_value(env, g_callbackInfo.wantContentChangeNotification, &callback);
409
+
410
+ napi_value result;
411
+ napi_call_function(env, callbackArg, callback, 0, nullptr, &result);
412
+ wantContentChangeNotification = NValueToBool(env, result);
413
+ }
414
+
415
+ return {hasCallback, wantLogRedirect, wantContentChangeNotification};
416
+ }
417
+
418
+ static napi_env g_env = nullptr;
419
+
420
+ void myLogHandler(MMKVLogLevel level, const char *file, int line, const char *function, MMKVLog_t message) {
421
+ if (!g_env) {
422
+ return;
423
+ }
424
+
425
+ napi_value handler;
426
+ napi_get_reference_value(g_env, g_callbackInfo.handlerRef, &handler);
427
+ napi_value callback;
428
+ napi_get_reference_value(g_env, g_callbackInfo.mmkvLog, &callback);
429
+
430
+ napi_value args[] = {
431
+ Int32ToNValue(g_env, level),
432
+ StringToNValue(g_env, file),
433
+ Int32ToNValue(g_env, line),
434
+ StringToNValue(g_env, function),
435
+ StringToNValue(g_env, message)
436
+ };
437
+
438
+ napi_value result;
439
+ napi_call_function(g_env, handler, callback, sizeof(args) / sizeof(args[0]), args, &result);
440
+ }
441
+
442
+ static MMKVRecoverStrategic myErrorHandler(const std::string &mmapID, MMKVErrorType errorType) {
443
+ if (!g_env) {
444
+ return OnErrorDiscard;
445
+ }
446
+
447
+ napi_value handler;
448
+ napi_get_reference_value(g_env, g_callbackInfo.handlerRef, &handler);
449
+ napi_value callback;
450
+ if (errorType == MMKVCRCCheckFail) {
451
+ napi_get_reference_value(g_env, g_callbackInfo.onMMKVCRCCheckFail, &callback);
452
+ } else if (errorType == MMKVFileLength) {
453
+ napi_get_reference_value(g_env, g_callbackInfo.onMMKVFileLengthError, &callback);
454
+ } else {
455
+ return OnErrorDiscard;
456
+ }
457
+
458
+ napi_value args[] = { StringToNValue(g_env, mmapID) };
459
+
460
+ napi_value result;
461
+ if (napi_call_function(g_env, handler, callback, sizeof(args) / sizeof(args[0]), args, &result) == napi_ok) {
462
+ if (!IsNValueUndefined(g_env, result)) {
463
+ return ( MMKVRecoverStrategic ) NValueToInt32(g_env, result);
464
+ }
465
+ }
466
+ return OnErrorDiscard;
467
+ }
468
+
469
+ static void myContentNotificationHandler(const std::string &mmapID) {
470
+ if (!g_env) {
471
+ return;
472
+ }
473
+
474
+ napi_value handler;
475
+ napi_get_reference_value(g_env, g_callbackInfo.handlerRef, &handler);
476
+ napi_value callback;
477
+ napi_get_reference_value(g_env, g_callbackInfo.onContentChangedByOuterProcess, &callback);
478
+
479
+ napi_value args[] = { StringToNValue(g_env, mmapID) };
480
+
481
+ napi_value result;
482
+ napi_call_function(g_env, handler, callback, sizeof(args) / sizeof(args[0]), args, &result);
483
+ }
484
+
485
+ static napi_value initialize(napi_env env, napi_callback_info info) {
486
+ g_env = env;
487
+
488
+ size_t argc = 4;
489
+ napi_value args[4] = {nullptr};
490
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args , nullptr, nullptr));
491
+
492
+ auto rootDir = NValueToString(env, args[0]);
493
+ auto cacheDir = NValueToString(env, args[1]);
494
+
495
+ int32_t logLevel;
496
+ NAPI_CALL(napi_get_value_int32(env, args[2], &logLevel));
497
+
498
+ auto [hasCallback, wantLogRedirect, wantContentChangeNotification] = initCallbacks(env, args[3]);
499
+ auto logHandler = wantLogRedirect ? myLogHandler : nullptr;
500
+
501
+ MMKVInfo("rootDir: %s, cacheDir: %s, log level:%d, has callback: %d, want log redirect: %d",
502
+ rootDir.c_str(), cacheDir.c_str(), logLevel, hasCallback, wantLogRedirect);
503
+
504
+ MMKV::initializeMMKV(rootDir, (MMKVLogLevel) logLevel, logHandler);
505
+ g_android_tmpDir = cacheDir;
506
+
507
+ if (hasCallback) {
508
+ MMKV::registerErrorHandler(myErrorHandler);
509
+ }
510
+ if (wantContentChangeNotification) {
511
+ MMKV::registerContentChangeHandler(myContentNotificationHandler);
512
+ }
513
+
514
+ return StringToNValue(env, MMKV::getRootDir());
515
+ }
516
+
517
+ static napi_value version(napi_env env, napi_callback_info info) {
518
+ napi_value sum;
519
+ NAPI_CALL(napi_create_string_latin1(env, MMKV_VERSION, strlen(MMKV_VERSION), &sum));
520
+ return sum;
521
+ }
522
+
523
+ static napi_value pageSize(napi_env env, napi_callback_info info) {
524
+ napi_value value;
525
+ NAPI_CALL(napi_create_uint32(env, DEFAULT_MMAP_SIZE, &value));
526
+ return value;
527
+ }
528
+
529
+ static napi_value getDefaultMMKV(napi_env env, napi_callback_info info) {
530
+ size_t argc = 3;
531
+ napi_value args[3] = {nullptr};
532
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
533
+
534
+ int32_t mode;
535
+ NAPI_CALL(napi_get_value_int32(env, args[0], &mode));
536
+ auto crypt = NValueToString(env, args[1], true);
537
+ auto aes256 = NValueToBool(env, args[2], true);
538
+
539
+ MMKV *kv = nullptr;
540
+ if (crypt.length() > 0) {
541
+ kv = MMKV::defaultMMKV((MMKVMode)mode, &crypt, aes256);
542
+ }
543
+
544
+ if (!kv) {
545
+ kv = MMKV::defaultMMKV((MMKVMode)mode, nullptr, aes256);
546
+ }
547
+
548
+ return UInt64ToNValue(env,(uint64_t)kv);
549
+ }
550
+
551
+ // mmkvWithID(mmapID: string, mode: number, cryptKey?: string, rootPath?: string, expectedCapacity?: bigint): bigint
552
+ static napi_value mmkvWithID(napi_env env, napi_callback_info info) {
553
+ size_t argc = 6;
554
+ napi_value args[6] = {nullptr};
555
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
556
+
557
+ MMKV *kv = nullptr;
558
+ auto mmapID = NValueToString(env, args[0]);
559
+ if (!mmapID.empty()) {
560
+ int32_t mode = NValueToInt32(env, args[1]);
561
+ auto cryptKey = NValueToString(env, args[2], true);
562
+ auto rootPath = NValueToString(env, args[3], true);
563
+ auto expectedCapacity = NValueToUInt64(env, args[4], true);
564
+ auto aes256 = NValueToBool(env, args[5], true);
565
+
566
+ auto cryptKeyPtr = cryptKey.empty() ? nullptr : &cryptKey;
567
+ auto rootPathPtr = rootPath.empty() ? nullptr : &rootPath;
568
+ // MMKVInfo("rootPath: %p, %s, %s", rootPathPtr, rootPath.c_str(), rootPathPtr ? rootPathPtr->c_str() : "");
569
+ kv = MMKV::mmkvWithID(mmapID, DEFAULT_MMAP_SIZE, (MMKVMode)mode, cryptKeyPtr, rootPathPtr, expectedCapacity, aes256);
570
+ }
571
+
572
+ return UInt64ToNValue(env, (uint64_t) kv);
573
+ }
574
+
575
+ static napi_value mmapID(napi_env env, napi_callback_info info) {
576
+ size_t argc = 1;
577
+ napi_value args[1] = {nullptr};
578
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
579
+
580
+ auto handle = NValueToUInt64(env, args[0]);
581
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
582
+ if (kv) {
583
+ return StringToNValue(env, kv->mmapID());
584
+ }
585
+ return NAPIUndefined(env);
586
+ }
587
+
588
+ static napi_value encodeBool(napi_env env, napi_callback_info info) {
589
+ size_t argc = 4;
590
+ napi_value args[4] = {nullptr};
591
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
592
+
593
+ auto handle = NValueToUInt64(env, args[0]);
594
+ auto key = NValueToString(env, args[1]);
595
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
596
+ if (kv && key.length() > 0) {
597
+ auto value = NValueToBool(env,args[2]);
598
+ if (IsNValueUndefined(env, args[3])) {
599
+ auto ret = kv->set(value, key);
600
+ return BoolToNValue(env, ret);
601
+ }
602
+ uint32_t expiration = NValueToUInt32(env, args[3]);
603
+ auto ret = kv->set(value, key, expiration);
604
+ return BoolToNValue(env, ret);
605
+ }
606
+ return BoolToNValue(env,false);
607
+ }
608
+
609
+ static napi_value decodeBool(napi_env env, napi_callback_info info) {
610
+ size_t argc = 3;
611
+ napi_value args[3] = {nullptr};
612
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
613
+
614
+ auto handle = NValueToUInt64(env, args[0]);
615
+ auto key = NValueToString(env, args[1]);
616
+ auto defaultValue = NValueToBool(env, args[2]);
617
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
618
+ if (kv && key.length() > 0) {
619
+ bool hasValue = false;
620
+ auto ret = kv->getBool(key, defaultValue, &hasValue);
621
+ if(hasValue) {
622
+ return BoolToNValue(env, ret);
623
+ }
624
+ }
625
+ return args[2];
626
+ }
627
+
628
+ static napi_value encodeInt32(napi_env env, napi_callback_info info) {
629
+ size_t argc = 4;
630
+ napi_value args[4] = {nullptr};
631
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
632
+
633
+ auto handle = NValueToUInt64(env, args[0]);
634
+ auto key = NValueToString(env, args[1]);
635
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
636
+ if (kv && key.length() > 0) {
637
+ auto value = NValueToInt32(env, args[2]);
638
+ if (IsNValueUndefined(env, args[3])) {
639
+ auto ret = kv->set(value, key);
640
+ return BoolToNValue(env, ret);
641
+ }
642
+ uint32_t expiration = NValueToUInt32(env, args[3]);
643
+ auto ret = kv->set(value, key, expiration);
644
+ return BoolToNValue(env, ret);
645
+ }
646
+ return BoolToNValue(env, false);
647
+ }
648
+
649
+ static napi_value decodeInt32(napi_env env, napi_callback_info info) {
650
+ size_t argc = 3;
651
+ napi_value args[3] = {nullptr};
652
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
653
+
654
+ auto handle = NValueToUInt64(env, args[0]);
655
+ auto key = NValueToString(env, args[1]);
656
+ auto defaultValue = NValueToInt32(env, args[2]);
657
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
658
+ if (kv && key.length() > 0) {
659
+ bool hasValue = false;
660
+ auto ret = kv->getInt32(key, defaultValue, &hasValue);
661
+ if (hasValue) {
662
+ return Int32ToNValue(env, ret);
663
+ }
664
+ }
665
+ return args[2];
666
+ }
667
+
668
+ static napi_value encodeUInt32(napi_env env, napi_callback_info info) {
669
+ size_t argc = 4;
670
+ napi_value args[4] = {nullptr};
671
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
672
+
673
+ auto handle = NValueToUInt64(env, args[0]);
674
+ auto key = NValueToString(env, args[1]);
675
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
676
+ if (kv && key.length() > 0) {
677
+ auto value = NValueToUInt32(env, args[2]);
678
+ if (IsNValueUndefined(env, args[3])) {
679
+ auto ret = kv->set(value, key);
680
+ return BoolToNValue(env, ret);
681
+ }
682
+ uint32_t expiration = NValueToUInt32(env, args[3]);
683
+ auto ret = kv->set(value, key, expiration);
684
+ return BoolToNValue(env, ret);
685
+ }
686
+ return BoolToNValue(env, false);
687
+ }
688
+
689
+ static napi_value decodeUInt32(napi_env env, napi_callback_info info) {
690
+ size_t argc = 3;
691
+ napi_value args[3] = {nullptr};
692
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
693
+
694
+ auto handle = NValueToUInt64(env, args[0]);
695
+ auto key = NValueToString(env, args[1]);
696
+ auto defaultValue = NValueToUInt32(env, args[2]);
697
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
698
+ if (kv && key.length() > 0) {
699
+ bool hasValue = false;
700
+ auto ret = kv->getUInt32(key, defaultValue, &hasValue);
701
+ if (hasValue) {
702
+ return UInt32ToNValue(env, ret);
703
+ }
704
+ }
705
+ return args[2];
706
+ }
707
+
708
+ static napi_value encodeInt64(napi_env env, napi_callback_info info) {
709
+ size_t argc = 4;
710
+ napi_value args[4] = {nullptr};
711
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
712
+
713
+ auto handle = NValueToUInt64(env, args[0]);
714
+ auto key = NValueToString(env, args[1]);
715
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
716
+ if (kv && key.length() > 0) {
717
+ auto value = NValueToInt64(env, args[2]);
718
+ if (IsNValueUndefined(env, args[3])) {
719
+ auto ret = kv->set(value, key);
720
+ return BoolToNValue(env, ret);
721
+ }
722
+ uint32_t expiration = NValueToUInt32(env, args[3]);
723
+ auto ret = kv->set(value, key, expiration);
724
+ return BoolToNValue(env, ret);
725
+ }
726
+ return BoolToNValue(env, false);
727
+ }
728
+
729
+ static napi_value decodeInt64(napi_env env, napi_callback_info info) {
730
+ size_t argc = 3;
731
+ napi_value args[3] = {nullptr};
732
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
733
+
734
+ auto handle = NValueToUInt64(env, args[0]);
735
+ auto key = NValueToString(env, args[1]);
736
+ auto defaultValue = NValueToInt64(env, args[2]);
737
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
738
+ if (kv && key.length() > 0) {
739
+ bool hasValue = false;
740
+ auto ret = kv->getInt64(key, defaultValue, &hasValue);
741
+ if (hasValue) {
742
+ return Int64ToNValue(env, ret);
743
+ }
744
+ }
745
+ return args[2];
746
+ }
747
+
748
+ static napi_value encodeUInt64(napi_env env, napi_callback_info info) {
749
+ size_t argc = 4;
750
+ napi_value args[4] = {nullptr};
751
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
752
+
753
+ auto handle = NValueToUInt64(env, args[0]);
754
+ auto key = NValueToString(env, args[1]);
755
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
756
+ if (kv && key.length() > 0) {
757
+ auto value = NValueToUInt64(env, args[2]);
758
+ if (IsNValueUndefined(env, args[3])) {
759
+ auto ret = kv->set(value, key);
760
+ return BoolToNValue(env, ret);
761
+ }
762
+ uint32_t expiration = NValueToUInt32(env, args[3]);
763
+ auto ret = kv->set(value, key, expiration);
764
+ return BoolToNValue(env, ret);
765
+ }
766
+ return BoolToNValue(env, false);
767
+ }
768
+
769
+ static napi_value decodeUInt64(napi_env env, napi_callback_info info) {
770
+ size_t argc = 3;
771
+ napi_value args[3] = {nullptr};
772
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
773
+
774
+ auto handle = NValueToUInt64(env, args[0]);
775
+ auto key = NValueToString(env, args[1]);
776
+ auto defaultValue = NValueToUInt64(env, args[2]);
777
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
778
+ if (kv && key.length() > 0) {
779
+ bool hasValue = false;
780
+ auto ret = kv->getUInt64(key, defaultValue, &hasValue);
781
+ if (hasValue) {
782
+ return UInt64ToNValue(env, ret);
783
+ }
784
+ }
785
+ return args[2];
786
+ }
787
+
788
+ static napi_value encodeFloat(napi_env env, napi_callback_info info) {
789
+ size_t argc = 4;
790
+ napi_value args[4] = {nullptr};
791
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
792
+
793
+ auto handle = NValueToUInt64(env, args[0]);
794
+ auto key = NValueToString(env, args[1]);
795
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
796
+ if (kv && key.length() > 0) {
797
+ float value = NValueToDouble(env, args[2]);
798
+ if (IsNValueUndefined(env, args[3])) {
799
+ auto ret = kv->set(value, key);
800
+ return BoolToNValue(env, ret);
801
+ }
802
+ uint32_t expiration = NValueToUInt32(env, args[3]);
803
+ auto ret = kv->set(value, key, expiration);
804
+ return BoolToNValue(env, ret);
805
+ }
806
+ return BoolToNValue(env, false);
807
+ }
808
+
809
+ static napi_value decodeFloat(napi_env env, napi_callback_info info) {
810
+ size_t argc = 3;
811
+ napi_value args[3] = {nullptr};
812
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
813
+
814
+ auto handle = NValueToUInt64(env, args[0]);
815
+ auto key = NValueToString(env, args[1]);
816
+ auto defaultValue = NValueToDouble(env, args[2]);
817
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
818
+ if (kv && key.length() > 0) {
819
+ bool hasValue = false;
820
+ auto ret = kv->getFloat(key, defaultValue, &hasValue);
821
+ if (hasValue) {
822
+ return DoubleToNValue(env, ret);
823
+ }
824
+ }
825
+ return args[2];
826
+ }
827
+
828
+ static napi_value encodeDouble(napi_env env, napi_callback_info info) {
829
+ size_t argc = 4;
830
+ napi_value args[4] = {nullptr};
831
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
832
+
833
+ auto handle = NValueToUInt64(env, args[0]);
834
+ auto key = NValueToString(env, args[1]);
835
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
836
+ if (kv && key.length() > 0) {
837
+ auto value = NValueToDouble(env, args[2]);
838
+ if (IsNValueUndefined(env, args[3])) {
839
+ auto ret = kv->set(value, key);
840
+ return BoolToNValue(env, ret);
841
+ }
842
+ uint32_t expiration = NValueToUInt32(env, args[3]);
843
+ auto ret = kv->set(value, key, expiration);
844
+ return BoolToNValue(env, ret);
845
+ }
846
+ return BoolToNValue(env, false);
847
+ }
848
+
849
+ static napi_value decodeDouble(napi_env env, napi_callback_info info) {
850
+ size_t argc = 3;
851
+ napi_value args[3] = {nullptr};
852
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
853
+
854
+ auto handle = NValueToUInt64(env, args[0]);
855
+ auto key = NValueToString(env, args[1]);
856
+ auto defaultValue = NValueToDouble(env, args[2]);
857
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
858
+ if (kv && key.length() > 0) {
859
+ bool hasValue = false;
860
+ auto ret = kv->getDouble(key, defaultValue, &hasValue);
861
+ if (hasValue) {
862
+ return DoubleToNValue(env, ret);
863
+ }
864
+ }
865
+ return args[2];
866
+ }
867
+
868
+ static napi_value encodeString(napi_env env, napi_callback_info info) {
869
+ size_t argc = 4;
870
+ napi_value args[4] = {nullptr};
871
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
872
+
873
+ auto handle = NValueToUInt64(env, args[0]);
874
+ auto key = NValueToString(env, args[1]);
875
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
876
+ if (kv && key.length() > 0) {
877
+ auto value = NValueToString(env, args[2]);
878
+ if (IsNValueUndefined(env, args[3])) {
879
+ auto ret = kv->set(value, key);
880
+ return BoolToNValue(env, ret);
881
+ }
882
+ uint32_t expiration = NValueToUInt32(env, args[3]);
883
+ auto ret = kv->set(value, key, expiration);
884
+ return BoolToNValue(env, ret);
885
+ }
886
+ return BoolToNValue(env, false);
887
+ }
888
+
889
+ static napi_value decodeString(napi_env env, napi_callback_info info) {
890
+ size_t argc = 3;
891
+ napi_value args[3] = {nullptr};
892
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
893
+
894
+ auto handle = NValueToUInt64(env, args[0]);
895
+ auto key = NValueToString(env, args[1]);
896
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
897
+ if (kv && key.length() > 0) {
898
+ string result;
899
+ if (kv->getString(key, result)) {
900
+ return StringToNValue(env, result);
901
+ }
902
+ }
903
+ return args[2];
904
+ }
905
+
906
+ static napi_value encodeStringSet(napi_env env, napi_callback_info info) {
907
+ size_t argc = 4;
908
+ napi_value args[4] = {nullptr};
909
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
910
+
911
+ auto handle = NValueToUInt64(env, args[0]);
912
+ auto key = NValueToString(env, args[1]);
913
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
914
+ if (kv && key.length() > 0) {
915
+ auto value = NValueToStringArray(env, args[2]);
916
+ if (IsNValueUndefined(env, args[3])) {
917
+ auto ret = kv->set(value, key);
918
+ return BoolToNValue(env, ret);
919
+ }
920
+ uint32_t expiration = NValueToUInt32(env, args[3]);
921
+ auto ret = kv->set(value, key, expiration);
922
+ return BoolToNValue(env, ret);
923
+ }
924
+ return BoolToNValue(env, false);
925
+ }
926
+
927
+ static napi_value decodeStringSet(napi_env env, napi_callback_info info) {
928
+ size_t argc = 3;
929
+ napi_value args[3] = {nullptr};
930
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
931
+
932
+ auto handle = NValueToUInt64(env, args[0]);
933
+ auto key = NValueToString(env, args[1]);
934
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
935
+ if (kv && key.length() > 0) {
936
+ vector<string> result;
937
+ if (kv->getVector(key, result)) {
938
+ return StringArrayToNValue(env, result);
939
+ }
940
+ }
941
+ return args[2];
942
+ }
943
+
944
+ static napi_value encodeNumberSet(napi_env env, napi_callback_info info) {
945
+ size_t argc = 4;
946
+ napi_value args[4] = {nullptr};
947
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
948
+
949
+ auto handle = NValueToUInt64(env, args[0]);
950
+ auto key = NValueToString(env, args[1]);
951
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
952
+ if (kv && key.length() > 0) {
953
+ auto value = NValueToDoubleArray(env, args[2]);
954
+ if (IsNValueUndefined(env, args[3])) {
955
+ auto ret = kv->set(value, key);
956
+ return BoolToNValue(env, ret);
957
+ }
958
+ uint32_t expiration = NValueToUInt32(env, args[3]);
959
+ auto ret = kv->set(value, key, expiration);
960
+ return BoolToNValue(env, ret);
961
+ }
962
+ return BoolToNValue(env, false);
963
+ }
964
+
965
+ static napi_value decodeNumberSet(napi_env env, napi_callback_info info) {
966
+ size_t argc = 3;
967
+ napi_value args[3] = {nullptr};
968
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
969
+
970
+ auto handle = NValueToUInt64(env, args[0]);
971
+ auto key = NValueToString(env, args[1]);
972
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
973
+ if (kv && key.length() > 0) {
974
+ vector<double> result;
975
+ if (kv->getVector(key, result)) {
976
+ return DoubleArrayToNValue(env, result);
977
+ }
978
+ }
979
+ return args[2];
980
+ }
981
+
982
+ static napi_value encodeBoolSet(napi_env env, napi_callback_info info) {
983
+ size_t argc = 4;
984
+ napi_value args[4] = {nullptr};
985
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
986
+
987
+ auto handle = NValueToUInt64(env, args[0]);
988
+ auto key = NValueToString(env, args[1]);
989
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
990
+ if (kv && key.length() > 0) {
991
+ auto value = NValueToBoolArray(env, args[2]);
992
+ if (IsNValueUndefined(env, args[3])) {
993
+ auto ret = kv->set(value, key);
994
+ return BoolToNValue(env, ret);
995
+ }
996
+ uint32_t expiration = NValueToUInt32(env, args[3]);
997
+ auto ret = kv->set(value, key, expiration);
998
+ }
999
+ return BoolToNValue(env, false);
1000
+ }
1001
+
1002
+ static napi_value decodeBoolSet(napi_env env, napi_callback_info info) {
1003
+ size_t argc = 3;
1004
+ napi_value args[3] = {nullptr};
1005
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1006
+
1007
+ auto handle = NValueToUInt64(env, args[0]);
1008
+ auto key = NValueToString(env, args[1]);
1009
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1010
+ if (kv && key.length() > 0) {
1011
+ vector<bool> result;
1012
+ if (kv->getVector(key, result)) {
1013
+ return BoolArrayToNValue(env, result);
1014
+ }
1015
+ }
1016
+ return args[2];
1017
+ }
1018
+
1019
+ static napi_value encodeBytes(napi_env env, napi_callback_info info) {
1020
+ size_t argc = 6;
1021
+ napi_value args[6] = {nullptr};
1022
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1023
+
1024
+ auto handle = NValueToUInt64(env, args[0]);
1025
+ auto key = NValueToString(env, args[1]);
1026
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1027
+ if (kv && key.length() > 0) {
1028
+ auto buffer = NValueToMMBuffer(env, args[2]);
1029
+ auto offset = NValueToUInt32(env, args[3]);
1030
+ auto length = NValueToUInt32(env, args[4]);
1031
+ auto value = MMBuffer((uint8_t *)buffer.getPtr() + offset, length, mmkv::MMBufferNoCopy);
1032
+ if (IsNValueUndefined(env, args[5])) {
1033
+ auto ret = kv->set(value, key);
1034
+ return BoolToNValue(env, ret);
1035
+ }
1036
+ uint32_t expiration = NValueToUInt32(env, args[5]);
1037
+ auto ret = kv->set(value, key, expiration);
1038
+ return BoolToNValue(env, ret);
1039
+ }
1040
+ return BoolToNValue(env, false);
1041
+ }
1042
+
1043
+ static napi_value decodeBytes(napi_env env, napi_callback_info info) {
1044
+ size_t argc = 3;
1045
+ napi_value args[3] = {nullptr};
1046
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1047
+
1048
+ auto handle = NValueToUInt64(env, args[0]);
1049
+ auto key = NValueToString(env, args[1]);
1050
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1051
+ if (kv && key.length() > 0) {
1052
+ MMBuffer result;
1053
+ if (kv->getBytes(key, result)) {
1054
+ return MMBufferToNValue(env, std::move(result));
1055
+ }
1056
+ }
1057
+ return args[2];
1058
+ }
1059
+
1060
+ template <typename T>
1061
+ napi_value encodeArray(napi_env env, napi_callback_info info) {
1062
+ size_t argc = 6;
1063
+ napi_value args[6] = {nullptr};
1064
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1065
+
1066
+ auto handle = NValueToUInt64(env, args[0]);
1067
+ auto key = NValueToString(env, args[1]);
1068
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1069
+ if (kv && key.length() > 0) {
1070
+ auto buffer = NValueToMMBuffer(env, args[2]);
1071
+ auto offset = NValueToUInt32(env, args[3]);
1072
+ auto length = NValueToUInt32(env, args[4]);
1073
+ auto ptr = (uint8_t *)buffer.getPtr() + offset;
1074
+ std::span<T> value((T *)ptr, length / sizeof(T));
1075
+ if (IsNValueUndefined(env, args[5])) {
1076
+ auto ret = kv->set(value, key);
1077
+ return BoolToNValue(env, ret);
1078
+ }
1079
+ uint32_t expiration = NValueToUInt32(env, args[5]);
1080
+ auto ret = kv->set(value, key, expiration);
1081
+ return BoolToNValue(env, ret);
1082
+ }
1083
+ return BoolToNValue(env, false);
1084
+ }
1085
+
1086
+ template <typename T>
1087
+ napi_value decodeArray(napi_env env, napi_callback_info info) {
1088
+ size_t argc = 3;
1089
+ napi_value args[3] = {nullptr};
1090
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1091
+
1092
+ auto handle = NValueToUInt64(env, args[0]);
1093
+ auto key = NValueToString(env, args[1]);
1094
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1095
+ if (kv && key.length() > 0) {
1096
+ std::vector<T> vec;
1097
+ if (kv->getVector(key, vec)) {
1098
+ MMBuffer result(vec.data(), vec.size() * sizeof(T));
1099
+ return MMBufferToNValue(env, std::move(result));
1100
+ }
1101
+ }
1102
+ return args[2];
1103
+ }
1104
+
1105
+ static napi_value encodeInt32Array(napi_env env, napi_callback_info info) {
1106
+ return encodeArray<int32_t>(env, info);
1107
+ }
1108
+
1109
+ static napi_value decodeInt32Array(napi_env env, napi_callback_info info) {
1110
+ return decodeArray<int32_t>(env, info);
1111
+ }
1112
+
1113
+ static napi_value encodeUInt32Array(napi_env env, napi_callback_info info) {
1114
+ return encodeArray<uint32_t>(env, info);
1115
+ }
1116
+
1117
+ static napi_value decodeUInt32Array(napi_env env, napi_callback_info info) {
1118
+ return decodeArray<uint32_t>(env, info);
1119
+ }
1120
+
1121
+ static napi_value encodeInt64Array(napi_env env, napi_callback_info info) {
1122
+ return encodeArray<int64_t>(env, info);
1123
+ }
1124
+
1125
+ static napi_value decodeInt64Array(napi_env env, napi_callback_info info) {
1126
+ return decodeArray<int64_t>(env, info);
1127
+ }
1128
+
1129
+ static napi_value encodeUInt64Array(napi_env env, napi_callback_info info) {
1130
+ return encodeArray<uint64_t>(env, info);
1131
+ }
1132
+
1133
+ static napi_value decodeUInt64Array(napi_env env, napi_callback_info info) {
1134
+ return decodeArray<uint64_t>(env, info);
1135
+ }
1136
+
1137
+ static napi_value containsKey(napi_env env, napi_callback_info info) {
1138
+ size_t argc = 2;
1139
+ napi_value args[2] = {nullptr};
1140
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1141
+
1142
+ auto handle = NValueToUInt64(env, args[0]);
1143
+ auto key = NValueToString(env, args[1]);
1144
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1145
+ if (kv && key.length() > 0) {
1146
+ return BoolToNValue(env, kv->containsKey(key));
1147
+ }
1148
+ return BoolToNValue(env, false);
1149
+ }
1150
+
1151
+ static napi_value removeValueForKey(napi_env env, napi_callback_info info) {
1152
+ size_t argc = 2;
1153
+ napi_value args[2] = {nullptr};
1154
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1155
+
1156
+ auto handle = NValueToUInt64(env, args[0]);
1157
+ auto key = NValueToString(env, args[1]);
1158
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1159
+ if (kv && key.length() > 0) {
1160
+ kv->removeValueForKey(key);
1161
+ }
1162
+ return NAPIUndefined(env);
1163
+ }
1164
+
1165
+ static napi_value removeValuesForKeys(napi_env env, napi_callback_info info) {
1166
+ size_t argc = 2;
1167
+ napi_value args[2] = {nullptr};
1168
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1169
+
1170
+ auto handle = NValueToUInt64(env, args[0]);
1171
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1172
+ if (!kv) {
1173
+ return NAPIUndefined(env);
1174
+ }
1175
+
1176
+ vector<string> keys = NValueToStringArray(env, args[1]);
1177
+ if (keys.size() > 0) {
1178
+ kv->removeValuesForKeys(keys);
1179
+ }
1180
+ return NAPIUndefined(env);
1181
+ }
1182
+
1183
+ static napi_value count(napi_env env, napi_callback_info info) {
1184
+ size_t argc = 2;
1185
+ napi_value args[2] = {nullptr};
1186
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1187
+
1188
+ auto handle = NValueToUInt64(env, args[0]);
1189
+ auto filterExpire = NValueToBool(env, args[1]);
1190
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1191
+ if (kv) {
1192
+ return UInt64ToNValue(env, kv->count(filterExpire));
1193
+ }
1194
+ return NAPIUndefined(env);
1195
+ }
1196
+
1197
+ static napi_value allKeys(napi_env env, napi_callback_info info) {
1198
+ size_t argc = 2;
1199
+ napi_value args[2] = {nullptr};
1200
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1201
+
1202
+ auto handle = NValueToUInt64(env, args[0]);
1203
+ auto filterExpire = NValueToBool(env, args[1]);
1204
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1205
+ if (kv) {
1206
+ auto keys = kv->allKeys(filterExpire);
1207
+ return StringArrayToNValue(env, keys);
1208
+ }
1209
+ return NAPIUndefined(env);
1210
+ }
1211
+
1212
+ static napi_value clearAll(napi_env env, napi_callback_info info) {
1213
+ size_t argc = 2;
1214
+ napi_value args[2] = {nullptr};
1215
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1216
+
1217
+ auto handle = NValueToUInt64(env, args[0]);
1218
+ auto keepSpace = NValueToBool(env, args[1]);
1219
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1220
+ if (kv) {
1221
+ kv->clearAll(keepSpace);
1222
+ }
1223
+ return NAPIUndefined(env);
1224
+ }
1225
+
1226
+ static napi_value sync(napi_env env, napi_callback_info info) {
1227
+ size_t argc = 2;
1228
+ napi_value args[2] = {nullptr};
1229
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1230
+
1231
+ auto handle = NValueToUInt64(env, args[0]);
1232
+ auto needSync = NValueToBool(env, args[1]);
1233
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1234
+ if (kv) {
1235
+ kv->sync(needSync ? MMKV_SYNC : MMKV_ASYNC);
1236
+ }
1237
+ return NAPIUndefined(env);
1238
+ }
1239
+
1240
+ static napi_value clearMemoryCache(napi_env env, napi_callback_info info) {
1241
+ size_t argc = 1;
1242
+ napi_value args[1] = {nullptr};
1243
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1244
+
1245
+ auto handle = NValueToUInt64(env, args[0]);
1246
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1247
+ if (kv) {
1248
+ kv->clearMemoryCache();
1249
+ }
1250
+ return NAPIUndefined(env);
1251
+ }
1252
+
1253
+ static napi_value totalSize(napi_env env, napi_callback_info info) {
1254
+ size_t argc = 1;
1255
+ napi_value args[1] = {nullptr};
1256
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1257
+
1258
+ auto handle = NValueToUInt64(env, args[0]);
1259
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1260
+ if (kv) {
1261
+ return UInt64ToNValue(env, kv->totalSize());
1262
+ }
1263
+ return NAPIUndefined(env);
1264
+ }
1265
+
1266
+ static napi_value actualSize(napi_env env, napi_callback_info info) {
1267
+ size_t argc = 1;
1268
+ napi_value args[1] = {nullptr};
1269
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1270
+
1271
+ auto handle = NValueToUInt64(env, args[0]);
1272
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1273
+ if (kv) {
1274
+ return UInt64ToNValue(env, kv->actualSize());
1275
+ }
1276
+ return NAPIUndefined(env);
1277
+ }
1278
+
1279
+ static napi_value lock(napi_env env, napi_callback_info info) {
1280
+ size_t argc = 1;
1281
+ napi_value args[1] = {nullptr};
1282
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1283
+
1284
+ auto handle = NValueToUInt64(env, args[0]);
1285
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1286
+ if (kv) {
1287
+ kv->lock();
1288
+ }
1289
+ return NAPIUndefined(env);
1290
+ }
1291
+
1292
+ static napi_value unlock(napi_env env, napi_callback_info info) {
1293
+ size_t argc = 1;
1294
+ napi_value args[1] = {nullptr};
1295
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1296
+
1297
+ auto handle = NValueToUInt64(env, args[0]);
1298
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1299
+ if (kv) {
1300
+ kv->unlock();
1301
+ }
1302
+ return NAPIUndefined(env);
1303
+ }
1304
+
1305
+ static napi_value tryLock(napi_env env, napi_callback_info info) {
1306
+ size_t argc = 1;
1307
+ napi_value args[1] = {nullptr};
1308
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1309
+
1310
+ auto handle = NValueToUInt64(env, args[0]);
1311
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1312
+ if (kv) {
1313
+ return BoolToNValue(env, kv->try_lock());
1314
+ }
1315
+ return NAPIUndefined(env);
1316
+ }
1317
+
1318
+ static napi_value getValueSize(napi_env env, napi_callback_info info) {
1319
+ size_t argc = 3;
1320
+ napi_value args[3] = {nullptr};
1321
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1322
+
1323
+ auto handle = NValueToUInt64(env, args[0]);
1324
+ auto key = NValueToString(env, args[1]);
1325
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1326
+ if (kv && key.length() > 0) {
1327
+ auto actualSize = NValueToBool(env, args[2]);
1328
+ return UInt32ToNValue(env, kv->getValueSize(key, actualSize));
1329
+ }
1330
+ return NAPIUndefined(env);
1331
+ }
1332
+
1333
+ static napi_value trim(napi_env env, napi_callback_info info) {
1334
+ size_t argc = 1;
1335
+ napi_value args[1] = {nullptr};
1336
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1337
+
1338
+ auto handle = NValueToUInt64(env, args[0]);
1339
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1340
+ if (kv) {
1341
+ kv->trim();
1342
+ }
1343
+ return NAPIUndefined(env);
1344
+ }
1345
+
1346
+ static napi_value importFrom(napi_env env, napi_callback_info info) {
1347
+ size_t argc = 2;
1348
+ napi_value args[2] = {nullptr};
1349
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1350
+
1351
+ auto handle = NValueToUInt64(env, args[0]);
1352
+ auto srcHandle = NValueToUInt64(env, args[1]);
1353
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1354
+ MMKV *kvSrc = reinterpret_cast<MMKV *>(srcHandle);
1355
+ if (kv && kvSrc) {
1356
+ return UInt64ToNValue(env, kv->importFrom(kvSrc));
1357
+ }
1358
+ return NAPIUndefined(env);
1359
+ }
1360
+
1361
+ static napi_value mmkvClose(napi_env env, napi_callback_info info) {
1362
+ size_t argc = 1;
1363
+ napi_value args[1] = {nullptr};
1364
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1365
+
1366
+ auto handle = NValueToUInt64(env, args[0]);
1367
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1368
+ if (kv) {
1369
+ kv->close();
1370
+ }
1371
+ return NAPIUndefined(env);
1372
+ }
1373
+
1374
+ static napi_value removeStorage(napi_env env, napi_callback_info info) {
1375
+ size_t argc = 2;
1376
+ napi_value args[2] = {nullptr};
1377
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1378
+
1379
+ auto mmapID = NValueToString(env, args[0]);
1380
+ if (!mmapID.empty()) {
1381
+ auto rootPath = NValueToString(env, args[1], true);
1382
+ if (rootPath.empty()) {
1383
+ return BoolToNValue(env, MMKV::removeStorage(mmapID));
1384
+ }
1385
+ return BoolToNValue(env, MMKV::removeStorage(mmapID, &rootPath));
1386
+ }
1387
+ return NAPIUndefined(env);
1388
+ }
1389
+
1390
+ static napi_value isFileValid(napi_env env, napi_callback_info info) {
1391
+ size_t argc = 2;
1392
+ napi_value args[2] = {nullptr};
1393
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1394
+
1395
+ auto mmapID = NValueToString(env, args[0]);
1396
+ if (!mmapID.empty()) {
1397
+ auto rootPath = NValueToString(env, args[1], true);
1398
+ if (rootPath.empty()) {
1399
+ return BoolToNValue(env, MMKV::isFileValid(mmapID));
1400
+ }
1401
+ return BoolToNValue(env, MMKV::isFileValid(mmapID, &rootPath));
1402
+ }
1403
+ return NAPIUndefined(env);
1404
+ }
1405
+
1406
+ #ifndef MMKV_DISABLE_CRYPT
1407
+
1408
+ static napi_value cryptKey(napi_env env, napi_callback_info info) {
1409
+ size_t argc = 1;
1410
+ napi_value args[1] = {nullptr};
1411
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1412
+
1413
+ auto handle = NValueToUInt64(env, args[0]);
1414
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1415
+ if (kv) {
1416
+ return StringToNValue(env, kv->cryptKey());
1417
+ }
1418
+ return NAPIUndefined(env);
1419
+ }
1420
+
1421
+ static napi_value reKey(napi_env env, napi_callback_info info) {
1422
+ size_t argc = 3;
1423
+ napi_value args[3] = {nullptr};
1424
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1425
+
1426
+ auto handle = NValueToUInt64(env, args[0]);
1427
+ auto cryptKey = NValueToString(env, args[1], true);
1428
+ auto aes256 = NValueToBool(env, args[2], true);
1429
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1430
+ if (kv) {
1431
+ return BoolToNValue(env, kv->reKey(cryptKey, aes256));
1432
+ }
1433
+ return BoolToNValue(env, false);
1434
+ }
1435
+
1436
+ static napi_value checkReSetCryptKey(napi_env env, napi_callback_info info) {
1437
+ size_t argc = 3;
1438
+ napi_value args[3] = {nullptr};
1439
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1440
+
1441
+ auto handle = NValueToUInt64(env, args[0]);
1442
+ auto cryptKey = NValueToString(env, args[1], true);
1443
+ auto aes256 = NValueToBool(env, args[2], true);
1444
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1445
+ if (kv) {
1446
+ auto cryptKeyPtr = cryptKey.empty() ? nullptr : &cryptKey;
1447
+ kv->checkReSetCryptKey(cryptKeyPtr, aes256);
1448
+ }
1449
+ return NAPIUndefined(env);
1450
+ }
1451
+
1452
+ #endif
1453
+
1454
+ static napi_value backupOneToDirectory(napi_env env, napi_callback_info info) {
1455
+ size_t argc = 3;
1456
+ napi_value args[3] = {nullptr};
1457
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1458
+
1459
+ auto mmapID = NValueToString(env, args[0]);
1460
+ auto dstDir = NValueToString(env, args[1]);
1461
+ if (!mmapID.empty()) {
1462
+ auto rootPath = NValueToString(env, args[2], true);
1463
+ auto rootPathPtr = rootPath.empty() ? nullptr : &rootPath;
1464
+ return BoolToNValue(env, MMKV::backupOneToDirectory(mmapID, dstDir, rootPathPtr));
1465
+ }
1466
+ return NAPIUndefined(env);
1467
+ }
1468
+
1469
+ static napi_value restoreOneFromDirectory(napi_env env, napi_callback_info info) {
1470
+ size_t argc = 3;
1471
+ napi_value args[3] = {nullptr};
1472
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1473
+
1474
+ auto mmapID = NValueToString(env, args[0]);
1475
+ auto srcDir = NValueToString(env, args[1]);
1476
+ if (!mmapID.empty()) {
1477
+ auto rootPath = NValueToString(env, args[2], true);
1478
+ auto rootPathPtr = rootPath.empty() ? nullptr : &rootPath;
1479
+ return BoolToNValue(env, MMKV::restoreOneFromDirectory(mmapID, srcDir, rootPathPtr));
1480
+ }
1481
+ return NAPIUndefined(env);
1482
+ }
1483
+
1484
+ static napi_value backupAllToDirectory(napi_env env, napi_callback_info info) {
1485
+ size_t argc = 3;
1486
+ napi_value args[3] = {nullptr};
1487
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1488
+
1489
+ auto dstDir = NValueToString(env, args[0]);
1490
+ if (!dstDir.empty()) {
1491
+ return UInt64ToNValue(env, MMKV::backupAllToDirectory(dstDir));
1492
+ }
1493
+ return NAPIUndefined(env);
1494
+ }
1495
+
1496
+ static napi_value restoreAllFromDirectory(napi_env env, napi_callback_info info) {
1497
+ size_t argc = 3;
1498
+ napi_value args[3] = {nullptr};
1499
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1500
+
1501
+ auto srcDir = NValueToString(env, args[0]);
1502
+ if (!srcDir.empty()) {
1503
+ return UInt64ToNValue(env, MMKV::restoreAllFromDirectory(srcDir));
1504
+ }
1505
+ return NAPIUndefined(env);
1506
+ }
1507
+
1508
+ static napi_value enableAutoKeyExpire(napi_env env, napi_callback_info info) {
1509
+ size_t argc = 2;
1510
+ napi_value args[2] = {nullptr};
1511
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1512
+
1513
+ auto handle = NValueToUInt64(env, args[0]);
1514
+ auto expireDuration = NValueToUInt32(env, args[1]);
1515
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1516
+ if (kv) {
1517
+ return BoolToNValue(env, kv->enableAutoKeyExpire(expireDuration));
1518
+ }
1519
+ return NAPIUndefined(env);
1520
+ }
1521
+
1522
+ static napi_value disableAutoKeyExpire(napi_env env, napi_callback_info info) {
1523
+ size_t argc = 1;
1524
+ napi_value args[1] = {nullptr};
1525
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1526
+
1527
+ auto handle = NValueToUInt64(env, args[0]);
1528
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1529
+ if (kv) {
1530
+ return BoolToNValue(env, kv->disableAutoKeyExpire());
1531
+ }
1532
+ return NAPIUndefined(env);
1533
+ }
1534
+
1535
+ static napi_value enableCompareBeforeSet(napi_env env, napi_callback_info info) {
1536
+ size_t argc = 1;
1537
+ napi_value args[1] = {nullptr};
1538
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1539
+
1540
+ auto handle = NValueToUInt64(env, args[0]);
1541
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1542
+ if (kv) {
1543
+ kv->enableCompareBeforeSet();
1544
+ }
1545
+ return NAPIUndefined(env);
1546
+ }
1547
+
1548
+ static napi_value disableCompareBeforeSet(napi_env env, napi_callback_info info) {
1549
+ size_t argc = 1;
1550
+ napi_value args[1] = {nullptr};
1551
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1552
+
1553
+ auto handle = NValueToUInt64(env, args[0]);
1554
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1555
+ if (kv) {
1556
+ kv->disableCompareBeforeSet();
1557
+ }
1558
+ return NAPIUndefined(env);
1559
+ }
1560
+
1561
+ // mmkvWithIDAndSize(mmapID: string, size: number, mode: number, cryptKey?: string): bigint
1562
+ static napi_value mmkvWithIDAndSize(napi_env env, napi_callback_info info) {
1563
+ size_t argc = 5;
1564
+ napi_value args[5] = {nullptr};
1565
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1566
+
1567
+ MMKV *kv = nullptr;
1568
+ auto mmapID = NValueToString(env, args[0]);
1569
+ if (!mmapID.empty()) {
1570
+ int32_t size = NValueToInt32(env, args[1]);
1571
+ int32_t mode = NValueToInt32(env, args[2]);
1572
+ auto cryptKey = NValueToString(env, args[3], true);
1573
+
1574
+ auto cryptKeyPtr = cryptKey.empty() ? nullptr : &cryptKey;
1575
+ kv = MMKV::mmkvWithID(mmapID, size, (MMKVMode)mode, cryptKeyPtr);
1576
+ }
1577
+
1578
+ return UInt64ToNValue(env, (uint64_t)kv);
1579
+ }
1580
+
1581
+ // mmkvWithAshmemFD(mmapID: string, fd: number, metaFD: number, cryptKey?: string): bigint
1582
+ static napi_value mmkvWithAshmemFD(napi_env env, napi_callback_info info) {
1583
+ size_t argc = 5;
1584
+ napi_value args[5] = {nullptr};
1585
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1586
+
1587
+ MMKV *kv = nullptr;
1588
+ auto mmapID = NValueToString(env, args[0]);
1589
+ if (!mmapID.empty()) {
1590
+ int32_t fd = NValueToInt32(env, args[1]);
1591
+ int32_t metaFD = NValueToInt32(env, args[2]);
1592
+ auto cryptKey = NValueToString(env, args[3], true);
1593
+
1594
+ auto cryptKeyPtr = cryptKey.empty() ? nullptr : &cryptKey;
1595
+ kv = MMKV::mmkvWithAshmemFD(mmapID, fd, metaFD, cryptKeyPtr);
1596
+ }
1597
+
1598
+ return UInt64ToNValue(env, (uint64_t)kv);
1599
+ }
1600
+
1601
+ static napi_value ashmemFD(napi_env env, napi_callback_info info) {
1602
+ size_t argc = 1;
1603
+ napi_value args[1] = {nullptr};
1604
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1605
+
1606
+ auto handle = NValueToUInt64(env, args[0]);
1607
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1608
+ if (kv) {
1609
+ return Int32ToNValue(env, kv->ashmemFD());
1610
+ }
1611
+ return NAPIUndefined(env);
1612
+ }
1613
+
1614
+ static napi_value ashmemMetaFD(napi_env env, napi_callback_info info) {
1615
+ size_t argc = 1;
1616
+ napi_value args[1] = {nullptr};
1617
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1618
+
1619
+ auto handle = NValueToUInt64(env, args[0]);
1620
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1621
+ if (kv) {
1622
+ return Int32ToNValue(env, kv->ashmemMetaFD());
1623
+ }
1624
+ return NAPIUndefined(env);
1625
+ }
1626
+
1627
+ static napi_value createNativeBuffer(napi_env env, napi_callback_info info) {
1628
+ size_t argc = 1;
1629
+ napi_value args[1] = {nullptr};
1630
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1631
+
1632
+ auto size = NValueToUInt32(env, args[0]);
1633
+ if (size != 0) {
1634
+ auto ptr = malloc(size);
1635
+ return UInt64ToNValue(env, (uintptr_t) ptr);
1636
+ }
1637
+ return NAPIUndefined(env);
1638
+ }
1639
+
1640
+ static napi_value destroyNativeBuffer(napi_env env, napi_callback_info info) {
1641
+ size_t argc = 2;
1642
+ napi_value args[2] = {nullptr};
1643
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1644
+
1645
+ auto ptr = (void*) NValueToUInt64(env, args[0]);
1646
+ auto size = NValueToUInt32(env, args[1]);
1647
+ if (ptr != nullptr && size != 0) {
1648
+ free(ptr);
1649
+ }
1650
+ return NAPIUndefined(env);
1651
+ }
1652
+
1653
+ static napi_value writeValueToNativeBuffer(napi_env env, napi_callback_info info) {
1654
+ size_t argc = 4;
1655
+ napi_value args[4] = {nullptr};
1656
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1657
+
1658
+ auto handle = NValueToUInt64(env, args[0]);
1659
+ auto key = NValueToString(env, args[1]);
1660
+ auto ptr = (void*) NValueToUInt64(env, args[2]);
1661
+ auto size = NValueToUInt32(env, args[3]);
1662
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1663
+ if (kv && key.length() > 0 && ptr != nullptr && size != 0) {
1664
+ return Int32ToNValue(env, kv->writeValueToBuffer(key, ptr, size));
1665
+ }
1666
+ return NAPIUndefined(env);
1667
+ }
1668
+
1669
+ static napi_value isMultiProcess(napi_env env, napi_callback_info info) {
1670
+ size_t argc = 1;
1671
+ napi_value args[1] = {nullptr};
1672
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1673
+
1674
+ auto handle = NValueToUInt64(env, args[0]);
1675
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1676
+ if (kv) {
1677
+ return BoolToNValue(env, kv->isMultiProcess());
1678
+ }
1679
+ return NAPIUndefined(env);
1680
+ }
1681
+
1682
+ static napi_value isReadOnly(napi_env env, napi_callback_info info) {
1683
+ size_t argc = 1;
1684
+ napi_value args[1] = {nullptr};
1685
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1686
+
1687
+ auto handle = NValueToUInt64(env, args[0]);
1688
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1689
+ if (kv) {
1690
+ return BoolToNValue(env, kv->isReadOnly());
1691
+ }
1692
+ return NAPIUndefined(env);
1693
+ }
1694
+
1695
+ static napi_value checkContentChanged(napi_env env, napi_callback_info info) {
1696
+ size_t argc = 1;
1697
+ napi_value args[1] = {nullptr};
1698
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1699
+
1700
+ auto handle = NValueToUInt64(env, args[0]);
1701
+ MMKV *kv = reinterpret_cast<MMKV *>(handle);
1702
+ if (kv) {
1703
+ kv->checkContentChanged();
1704
+ }
1705
+ return NAPIUndefined(env);
1706
+ }
1707
+
1708
+ static napi_value getNameSpace(napi_env env, napi_callback_info info) {
1709
+ size_t argc = 1;
1710
+ napi_value args[1] = {nullptr};
1711
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1712
+
1713
+ auto rootPath = NValueToString(env, args[0]);
1714
+ if (!rootPath.empty()) {
1715
+ MMKV::nameSpace(rootPath);
1716
+ return BoolToNValue(env, true);
1717
+ }
1718
+ return BoolToNValue(env, false);
1719
+ }
1720
+
1721
+ static napi_value checkExist(napi_env env, napi_callback_info info) {
1722
+ size_t argc = 2;
1723
+ napi_value args[2] = {nullptr};
1724
+ NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1725
+
1726
+ auto mmapID = NValueToString(env, args[0]);
1727
+ if (!mmapID.empty()) {
1728
+ auto rootPath = NValueToString(env, args[1], true);
1729
+ if (rootPath.empty()) {
1730
+ return BoolToNValue(env, MMKV::checkExist(mmapID));
1731
+ }
1732
+ return BoolToNValue(env, MMKV::checkExist(mmapID, &rootPath));
1733
+ }
1734
+ return NAPIUndefined(env);
1735
+ }
1736
+
1737
+ EXTERN_C_START
1738
+ static napi_value Init(napi_env env, napi_value exports) {
1739
+ napi_property_descriptor desc[] = {
1740
+ { "initialize", nullptr, initialize, nullptr, nullptr, nullptr, napi_default, nullptr },
1741
+ { "version", nullptr, version, nullptr, nullptr, nullptr, napi_default, nullptr },
1742
+ { "pageSize", nullptr, pageSize, nullptr, nullptr, nullptr, napi_default, nullptr },
1743
+ { "getDefaultMMKV", nullptr, getDefaultMMKV, nullptr, nullptr, nullptr, napi_default, nullptr },
1744
+ { "mmkvWithID", nullptr, mmkvWithID, nullptr, nullptr, nullptr, napi_default, nullptr },
1745
+ { "mmapID", nullptr, mmapID, nullptr, nullptr, nullptr, napi_default, nullptr },
1746
+ { "encodeBool", nullptr, encodeBool, nullptr, nullptr, nullptr, napi_default, nullptr },
1747
+ { "decodeBool", nullptr, decodeBool, nullptr, nullptr, nullptr, napi_default, nullptr },
1748
+ { "encodeInt32", nullptr, encodeInt32, nullptr, nullptr, nullptr, napi_default, nullptr },
1749
+ { "decodeInt32", nullptr, decodeInt32, nullptr, nullptr, nullptr, napi_default, nullptr },
1750
+ { "encodeUInt32", nullptr, encodeUInt32, nullptr, nullptr, nullptr, napi_default, nullptr },
1751
+ { "decodeUInt32", nullptr, decodeUInt32, nullptr, nullptr, nullptr, napi_default, nullptr },
1752
+ { "encodeInt64", nullptr, encodeInt64, nullptr, nullptr, nullptr, napi_default, nullptr },
1753
+ { "decodeInt64", nullptr, decodeInt64, nullptr, nullptr, nullptr, napi_default, nullptr },
1754
+ { "encodeUInt64", nullptr, encodeUInt64, nullptr, nullptr, nullptr, napi_default, nullptr },
1755
+ { "decodeUInt64", nullptr, decodeUInt64, nullptr, nullptr, nullptr, napi_default, nullptr },
1756
+ { "encodeFloat", nullptr, encodeFloat, nullptr, nullptr, nullptr, napi_default, nullptr },
1757
+ { "decodeFloat", nullptr, decodeFloat, nullptr, nullptr, nullptr, napi_default, nullptr },
1758
+ { "encodeDouble", nullptr, encodeDouble, nullptr, nullptr, nullptr, napi_default, nullptr },
1759
+ { "decodeDouble", nullptr, decodeDouble, nullptr, nullptr, nullptr, napi_default, nullptr },
1760
+ { "encodeString", nullptr, encodeString, nullptr, nullptr, nullptr, napi_default, nullptr },
1761
+ { "decodeString", nullptr, decodeString, nullptr, nullptr, nullptr, napi_default, nullptr },
1762
+ { "encodeStringSet", nullptr, encodeStringSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1763
+ { "decodeStringSet", nullptr, decodeStringSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1764
+ { "encodeNumberSet", nullptr, encodeNumberSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1765
+ { "decodeNumberSet", nullptr, decodeNumberSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1766
+ { "encodeBoolSet", nullptr, encodeBoolSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1767
+ { "decodeBoolSet", nullptr, decodeBoolSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1768
+ { "encodeBytes", nullptr, encodeBytes, nullptr, nullptr, nullptr, napi_default, nullptr },
1769
+ { "decodeBytes", nullptr, decodeBytes, nullptr, nullptr, nullptr, napi_default, nullptr },
1770
+ { "encodeInt32Array", nullptr, encodeInt32Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1771
+ { "decodeInt32Array", nullptr, decodeInt32Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1772
+ { "encodeUInt32Array", nullptr, encodeUInt32Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1773
+ { "decodeUInt32Array", nullptr, decodeUInt32Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1774
+ { "encodeInt64Array", nullptr, encodeInt64Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1775
+ { "decodeInt64Array", nullptr, decodeInt64Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1776
+ { "encodeUInt64Array", nullptr, encodeUInt64Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1777
+ { "decodeUInt64Array", nullptr, decodeUInt64Array, nullptr, nullptr, nullptr, napi_default, nullptr },
1778
+ { "containsKey", nullptr, containsKey, nullptr, nullptr, nullptr, napi_default, nullptr },
1779
+ { "count", nullptr, count, nullptr, nullptr, nullptr, napi_default, nullptr },
1780
+ { "allKeys", nullptr, allKeys, nullptr, nullptr, nullptr, napi_default, nullptr },
1781
+ { "removeValueForKey", nullptr, removeValueForKey, nullptr, nullptr, nullptr, napi_default, nullptr },
1782
+ { "removeValuesForKeys", nullptr, removeValuesForKeys, nullptr, nullptr, nullptr, napi_default, nullptr },
1783
+ { "clearAll", nullptr, clearAll, nullptr, nullptr, nullptr, napi_default, nullptr },
1784
+ { "clearMemoryCache", nullptr, clearMemoryCache, nullptr, nullptr, nullptr, napi_default, nullptr },
1785
+ { "actualSize", nullptr, actualSize, nullptr, nullptr, nullptr, napi_default, nullptr },
1786
+ { "totalSize", nullptr, totalSize, nullptr, nullptr, nullptr, napi_default, nullptr },
1787
+ { "sync", nullptr, sync, nullptr, nullptr, nullptr, napi_default, nullptr },
1788
+ { "lock", nullptr, lock, nullptr, nullptr, nullptr, napi_default, nullptr },
1789
+ { "unlock", nullptr, unlock, nullptr, nullptr, nullptr, napi_default, nullptr },
1790
+ { "tryLock", nullptr, tryLock, nullptr, nullptr, nullptr, napi_default, nullptr },
1791
+ { "getValueSize", nullptr, getValueSize, nullptr, nullptr, nullptr, napi_default, nullptr },
1792
+ { "close", nullptr, mmkvClose, nullptr, nullptr, nullptr, napi_default, nullptr },
1793
+ { "trim", nullptr, trim, nullptr, nullptr, nullptr, napi_default, nullptr },
1794
+ { "removeStorage", nullptr, removeStorage, nullptr, nullptr, nullptr, napi_default, nullptr },
1795
+ { "isFileValid", nullptr, isFileValid, nullptr, nullptr, nullptr, napi_default, nullptr },
1796
+ #ifndef MMKV_DISABLE_CRYPT
1797
+ { "cryptKey", nullptr, cryptKey, nullptr, nullptr, nullptr, napi_default, nullptr },
1798
+ { "reKey", nullptr, reKey, nullptr, nullptr, nullptr, napi_default, nullptr },
1799
+ { "checkReSetCryptKey", nullptr, checkReSetCryptKey, nullptr, nullptr, nullptr, napi_default, nullptr },
1800
+ #endif
1801
+ { "backupOneToDirectory", nullptr, backupOneToDirectory, nullptr, nullptr, nullptr, napi_default, nullptr },
1802
+ { "restoreOneFromDirectory", nullptr, restoreOneFromDirectory, nullptr, nullptr, nullptr, napi_default, nullptr },
1803
+ { "backupAllToDirectory", nullptr, backupAllToDirectory, nullptr, nullptr, nullptr, napi_default, nullptr },
1804
+ { "restoreAllFromDirectory", nullptr, restoreAllFromDirectory, nullptr, nullptr, nullptr, napi_default, nullptr },
1805
+ { "enableAutoKeyExpire", nullptr, enableAutoKeyExpire, nullptr, nullptr, nullptr, napi_default, nullptr },
1806
+ { "disableAutoKeyExpire", nullptr, disableAutoKeyExpire, nullptr, nullptr, nullptr, napi_default, nullptr },
1807
+ { "enableCompareBeforeSet", nullptr, enableCompareBeforeSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1808
+ { "disableCompareBeforeSet", nullptr, disableCompareBeforeSet, nullptr, nullptr, nullptr, napi_default, nullptr },
1809
+ { "mmkvWithIDAndSize", nullptr, mmkvWithIDAndSize, nullptr, nullptr, nullptr, napi_default, nullptr },
1810
+ { "mmkvWithAshmemFD", nullptr, mmkvWithAshmemFD, nullptr, nullptr, nullptr, napi_default, nullptr },
1811
+ { "ashmemFD", nullptr, ashmemFD, nullptr, nullptr, nullptr, napi_default, nullptr },
1812
+ { "ashmemMetaFD", nullptr, ashmemMetaFD, nullptr, nullptr, nullptr, napi_default, nullptr },
1813
+ { "createNativeBuffer", nullptr, createNativeBuffer, nullptr, nullptr, nullptr, napi_default, nullptr },
1814
+ { "destroyNativeBuffer", nullptr, destroyNativeBuffer, nullptr, nullptr, nullptr, napi_default, nullptr },
1815
+ { "writeValueToNativeBuffer", nullptr, writeValueToNativeBuffer, nullptr, nullptr, nullptr, napi_default, nullptr },
1816
+ { "isMultiProcess", nullptr, isMultiProcess, nullptr, nullptr, nullptr, napi_default, nullptr },
1817
+ { "isReadOnly", nullptr, isReadOnly, nullptr, nullptr, nullptr, napi_default, nullptr },
1818
+ { "checkContentChanged", nullptr, checkContentChanged, nullptr, nullptr, nullptr, napi_default, nullptr },
1819
+ { "getNameSpace", nullptr, getNameSpace, nullptr, nullptr, nullptr, napi_default, nullptr },
1820
+ { "checkExist", nullptr, checkExist, nullptr, nullptr, nullptr, napi_default, nullptr },
1821
+ { "importFrom", nullptr, importFrom, nullptr, nullptr, nullptr, napi_default, nullptr },
1822
+ };
1823
+ napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
1824
+ return exports;
1825
+ }
1826
+ EXTERN_C_END
1827
+
1828
+ static napi_module mmkvModule = {
1829
+ .nm_version = 1,
1830
+ .nm_flags = 0,
1831
+ .nm_filename = nullptr,
1832
+ .nm_register_func = Init,
1833
+ .nm_modname = "mmkv",
1834
+ .nm_priv = ((void*)0),
1835
+ .reserved = { 0 },
1836
+ };
1837
+
1838
+ extern "C" __attribute__((constructor)) void RegisterMMKVModule(void) {
1839
+ napi_module_register(&mmkvModule);
1840
+ }