react-native-mmkv 3.2.0 → 4.0.0-beta.0

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 (104) hide show
  1. package/android/CMakeLists.txt +18 -9
  2. package/android/build.gradle +6 -2
  3. package/cpp/{MMKVManagedBuffer.h → ManagedMMBuffer.h} +6 -6
  4. package/cpp/MmkvHostObject.cpp +22 -17
  5. package/cpp/MmkvHostObject.h +1 -2
  6. package/cpp/MmkvTypes.h +50 -0
  7. package/cpp/NativeMmkvModule.cpp +3 -3
  8. package/cpp/NativeMmkvModule.h +1 -8
  9. package/lib/commonjs/MMKV.js.map +1 -1
  10. package/lib/commonjs/Types.js.map +1 -1
  11. package/lib/commonjs/createMMKV.web.js +1 -1
  12. package/lib/commonjs/createMMKV.web.js.map +1 -1
  13. package/lib/module/MMKV.js.map +1 -1
  14. package/lib/module/Types.js.map +1 -1
  15. package/lib/module/createMMKV.web.js +1 -1
  16. package/lib/module/createMMKV.web.js.map +1 -1
  17. package/lib/typescript/src/MMKV.d.ts +1 -1
  18. package/lib/typescript/src/MMKV.d.ts.map +1 -1
  19. package/lib/typescript/src/Types.d.ts +7 -1
  20. package/lib/typescript/src/Types.d.ts.map +1 -1
  21. package/lib/typescript/src/hooks.d.ts +1 -1
  22. package/lib/typescript/src/hooks.d.ts.map +1 -1
  23. package/package.json +22 -27
  24. package/react-native-mmkv.podspec +4 -10
  25. package/react-native.config.js +9 -0
  26. package/src/MMKV.ts +1 -1
  27. package/src/Types.ts +7 -1
  28. package/src/createMMKV.web.ts +1 -1
  29. package/src/hooks.ts +1 -1
  30. package/MMKV/Core/CMakeLists.txt +0 -172
  31. package/MMKV/Core/CodedInputData.cpp +0 -252
  32. package/MMKV/Core/CodedInputData.h +0 -87
  33. package/MMKV/Core/CodedInputDataCrypt.cpp +0 -280
  34. package/MMKV/Core/CodedInputDataCrypt.h +0 -87
  35. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +0 -62
  36. package/MMKV/Core/CodedInputData_OSX.cpp +0 -92
  37. package/MMKV/Core/CodedOutputData.cpp +0 -186
  38. package/MMKV/Core/CodedOutputData.h +0 -88
  39. package/MMKV/Core/Core.xcodeproj/project.pbxproj +0 -707
  40. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  41. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  42. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +0 -67
  43. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +0 -67
  44. package/MMKV/Core/InterProcessLock.cpp +0 -186
  45. package/MMKV/Core/InterProcessLock.h +0 -119
  46. package/MMKV/Core/InterProcessLock_Android.cpp +0 -103
  47. package/MMKV/Core/InterProcessLock_Win32.cpp +0 -108
  48. package/MMKV/Core/KeyValueHolder.cpp +0 -236
  49. package/MMKV/Core/KeyValueHolder.h +0 -122
  50. package/MMKV/Core/MMBuffer.cpp +0 -210
  51. package/MMKV/Core/MMBuffer.h +0 -111
  52. package/MMKV/Core/MMKV.cpp +0 -1702
  53. package/MMKV/Core/MMKV.h +0 -595
  54. package/MMKV/Core/MMKVLog.cpp +0 -127
  55. package/MMKV/Core/MMKVLog.h +0 -86
  56. package/MMKV/Core/MMKVLog_Android.cpp +0 -134
  57. package/MMKV/Core/MMKVMetaInfo.hpp +0 -99
  58. package/MMKV/Core/MMKVPredef.h +0 -293
  59. package/MMKV/Core/MMKV_Android.cpp +0 -261
  60. package/MMKV/Core/MMKV_IO.cpp +0 -1905
  61. package/MMKV/Core/MMKV_IO.h +0 -57
  62. package/MMKV/Core/MMKV_OSX.cpp +0 -423
  63. package/MMKV/Core/MMKV_OSX.h +0 -57
  64. package/MMKV/Core/MemoryFile.cpp +0 -603
  65. package/MMKV/Core/MemoryFile.h +0 -194
  66. package/MMKV/Core/MemoryFile_Android.cpp +0 -236
  67. package/MMKV/Core/MemoryFile_Linux.cpp +0 -125
  68. package/MMKV/Core/MemoryFile_OSX.cpp +0 -142
  69. package/MMKV/Core/MemoryFile_Win32.cpp +0 -554
  70. package/MMKV/Core/MiniPBCoder.cpp +0 -672
  71. package/MMKV/Core/MiniPBCoder.h +0 -151
  72. package/MMKV/Core/MiniPBCoder_OSX.cpp +0 -237
  73. package/MMKV/Core/PBEncodeItem.hpp +0 -104
  74. package/MMKV/Core/PBUtility.cpp +0 -61
  75. package/MMKV/Core/PBUtility.h +0 -148
  76. package/MMKV/Core/ScopedLock.hpp +0 -69
  77. package/MMKV/Core/ThreadLock.cpp +0 -75
  78. package/MMKV/Core/ThreadLock.h +0 -81
  79. package/MMKV/Core/ThreadLock_Win32.cpp +0 -89
  80. package/MMKV/Core/aes/AESCrypt.cpp +0 -273
  81. package/MMKV/Core/aes/AESCrypt.h +0 -112
  82. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +0 -1243
  83. package/MMKV/Core/aes/openssl/openssl_aes.h +0 -130
  84. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +0 -1044
  85. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +0 -38
  86. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +0 -308
  87. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +0 -84
  88. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +0 -97
  89. package/MMKV/Core/aes/openssl/openssl_md32_common.h +0 -254
  90. package/MMKV/Core/aes/openssl/openssl_md5.h +0 -49
  91. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +0 -166
  92. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +0 -75
  93. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +0 -30
  94. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +0 -271
  95. package/MMKV/Core/core.vcxproj +0 -288
  96. package/MMKV/Core/core.vcxproj.filters +0 -150
  97. package/MMKV/Core/crc32/Checksum.h +0 -75
  98. package/MMKV/Core/crc32/crc32_armv8.cpp +0 -134
  99. package/MMKV/Core/crc32/zlib/CMakeLists.txt +0 -60
  100. package/MMKV/Core/crc32/zlib/crc32.cpp +0 -55
  101. package/MMKV/Core/crc32/zlib/crc32.h +0 -48
  102. package/MMKV/Core/crc32/zlib/zconf.h +0 -380
  103. package/MMKV/Core/crc32/zlib/zutil.h +0 -25
  104. package/MMKV/README.md +0 -354
@@ -1,88 +0,0 @@
1
- /*
2
- * Tencent is pleased to support the open source community by making
3
- * MMKV available.
4
- *
5
- * Copyright (C) 2018 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
- #ifndef MMKV_CODEDOUTPUTDATA_H
22
- #define MMKV_CODEDOUTPUTDATA_H
23
- #ifdef __cplusplus
24
-
25
- #include "MMKVPredef.h"
26
-
27
- #include "MMBuffer.h"
28
- #include <cstdint>
29
-
30
- namespace mmkv {
31
-
32
- class CodedOutputData {
33
- uint8_t *const m_ptr;
34
- size_t m_size;
35
- size_t m_position;
36
-
37
- public:
38
- CodedOutputData(void *ptr, size_t len);
39
-
40
- size_t spaceLeft();
41
-
42
- uint8_t *curWritePointer();
43
-
44
- void seek(size_t addedSize);
45
-
46
- void reset();
47
-
48
- size_t getPosition();
49
-
50
- void setPosition(size_t position);
51
-
52
- void writeRawByte(uint8_t value);
53
-
54
- void writeRawLittleEndian32(int32_t value);
55
-
56
- void writeRawLittleEndian64(int64_t value);
57
-
58
- void writeRawVarint32(int32_t value);
59
-
60
- void writeRawVarint64(int64_t value);
61
-
62
- void writeRawData(const MMBuffer &data);
63
-
64
- void writeDouble(double value);
65
-
66
- void writeFloat(float value);
67
-
68
- void writeInt64(int64_t value);
69
-
70
- void writeUInt64(uint64_t value);
71
-
72
- void writeInt32(int32_t value);
73
-
74
- void writeUInt32(uint32_t value);
75
-
76
- void writeBool(bool value);
77
-
78
- void writeData(const MMBuffer &value);
79
-
80
- #ifndef MMKV_APPLE
81
- void writeString(const std::string &value);
82
- #endif
83
- };
84
-
85
- } // namespace mmkv
86
-
87
- #endif
88
- #endif //MMKV_CODEDOUTPUTDATA_H