react-native-mmkv-dz 2.5.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 (138) hide show
  1. package/LICENSE +219 -0
  2. package/MMKV/CHANGELOG.md +553 -0
  3. package/MMKV/Core/CMakeLists.txt +153 -0
  4. package/MMKV/Core/CodedInputData.cpp +228 -0
  5. package/MMKV/Core/CodedInputData.h +83 -0
  6. package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
  7. package/MMKV/Core/CodedInputDataCrypt.h +87 -0
  8. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  9. package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  10. package/MMKV/Core/CodedOutputData.cpp +174 -0
  11. package/MMKV/Core/CodedOutputData.h +82 -0
  12. package/MMKV/Core/Core.xcodeproj/project.pbxproj +702 -0
  13. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  14. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  15. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  16. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  17. package/MMKV/Core/InterProcessLock.cpp +186 -0
  18. package/MMKV/Core/InterProcessLock.h +119 -0
  19. package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
  20. package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  21. package/MMKV/Core/KeyValueHolder.cpp +236 -0
  22. package/MMKV/Core/KeyValueHolder.h +118 -0
  23. package/MMKV/Core/MMBuffer.cpp +185 -0
  24. package/MMKV/Core/MMBuffer.h +107 -0
  25. package/MMKV/Core/MMKV.cpp +1418 -0
  26. package/MMKV/Core/MMKV.h +386 -0
  27. package/MMKV/Core/MMKVLog.cpp +127 -0
  28. package/MMKV/Core/MMKVLog.h +86 -0
  29. package/MMKV/Core/MMKVLog_Android.cpp +79 -0
  30. package/MMKV/Core/MMKVMetaInfo.hpp +81 -0
  31. package/MMKV/Core/MMKVPredef.h +245 -0
  32. package/MMKV/Core/MMKV_Android.cpp +259 -0
  33. package/MMKV/Core/MMKV_IO.cpp +1119 -0
  34. package/MMKV/Core/MMKV_IO.h +57 -0
  35. package/MMKV/Core/MMKV_OSX.cpp +347 -0
  36. package/MMKV/Core/MMKV_OSX.h +51 -0
  37. package/MMKV/Core/MemoryFile.cpp +537 -0
  38. package/MMKV/Core/MemoryFile.h +182 -0
  39. package/MMKV/Core/MemoryFile_Android.cpp +211 -0
  40. package/MMKV/Core/MemoryFile_Linux.cpp +120 -0
  41. package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
  42. package/MMKV/Core/MemoryFile_Win32.cpp +536 -0
  43. package/MMKV/Core/MiniPBCoder.cpp +366 -0
  44. package/MMKV/Core/MiniPBCoder.h +129 -0
  45. package/MMKV/Core/MiniPBCoder_OSX.cpp +228 -0
  46. package/MMKV/Core/PBEncodeItem.hpp +86 -0
  47. package/MMKV/Core/PBUtility.cpp +61 -0
  48. package/MMKV/Core/PBUtility.h +153 -0
  49. package/MMKV/Core/ScopedLock.hpp +69 -0
  50. package/MMKV/Core/ThreadLock.cpp +68 -0
  51. package/MMKV/Core/ThreadLock.h +78 -0
  52. package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  53. package/MMKV/Core/aes/AESCrypt.cpp +256 -0
  54. package/MMKV/Core/aes/AESCrypt.h +107 -0
  55. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1231 -0
  56. package/MMKV/Core/aes/openssl/openssl_aes.h +118 -0
  57. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  58. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  59. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  60. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  61. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  62. package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  63. package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  64. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  65. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  66. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  67. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  68. package/MMKV/Core/core.vcxproj +186 -0
  69. package/MMKV/Core/core.vcxproj.filters +150 -0
  70. package/MMKV/Core/crc32/Checksum.h +67 -0
  71. package/MMKV/Core/crc32/crc32_armv8.cpp +132 -0
  72. package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  73. package/MMKV/Core/crc32/zlib/crc32.h +48 -0
  74. package/MMKV/Core/crc32/zlib/zconf.h +380 -0
  75. package/MMKV/Core/crc32/zlib/zutil.h +25 -0
  76. package/MMKV/LICENSE.TXT +193 -0
  77. package/MMKV/README.md +288 -0
  78. package/README.md +221 -0
  79. package/android/CMakeLists.txt +71 -0
  80. package/android/build.gradle +371 -0
  81. package/android/gradle.properties +4 -0
  82. package/android/src/main/AndroidManifest.xml +4 -0
  83. package/android/src/main/cpp/MmkvHostObject.cpp +302 -0
  84. package/android/src/main/cpp/MmkvHostObject.h +26 -0
  85. package/android/src/main/cpp/cpp-adapter.cpp +65 -0
  86. package/android/src/main/java/com/reactnativemmkv/MmkvModule.java +49 -0
  87. package/android/src/main/java/com/reactnativemmkv/MmkvPackage.java +26 -0
  88. package/cpp/TypedArray.cpp +341 -0
  89. package/cpp/TypedArray.h +175 -0
  90. package/ios/JSIUtils.h +50 -0
  91. package/ios/JSIUtils.mm +194 -0
  92. package/ios/Mmkv.xcodeproj/project.pbxproj +291 -0
  93. package/ios/MmkvHostObject.h +27 -0
  94. package/ios/MmkvHostObject.mm +299 -0
  95. package/ios/MmkvModule.h +5 -0
  96. package/ios/MmkvModule.mm +73 -0
  97. package/lib/commonjs/MMKV.js +146 -0
  98. package/lib/commonjs/MMKV.js.map +1 -0
  99. package/lib/commonjs/PlatformChecker.js +16 -0
  100. package/lib/commonjs/PlatformChecker.js.map +1 -0
  101. package/lib/commonjs/createMMKV.js +66 -0
  102. package/lib/commonjs/createMMKV.js.map +1 -0
  103. package/lib/commonjs/createMMKV.mock.js +40 -0
  104. package/lib/commonjs/createMMKV.mock.js.map +1 -0
  105. package/lib/commonjs/createMMKV.web.js +77 -0
  106. package/lib/commonjs/createMMKV.web.js.map +1 -0
  107. package/lib/commonjs/createTextEncoder.js +24 -0
  108. package/lib/commonjs/createTextEncoder.js.map +1 -0
  109. package/lib/commonjs/hooks.js +200 -0
  110. package/lib/commonjs/hooks.js.map +1 -0
  111. package/lib/commonjs/index.js +32 -0
  112. package/lib/commonjs/index.js.map +1 -0
  113. package/lib/module/MMKV.js +134 -0
  114. package/lib/module/MMKV.js.map +1 -0
  115. package/lib/module/PlatformChecker.js +9 -0
  116. package/lib/module/PlatformChecker.js.map +1 -0
  117. package/lib/module/createMMKV.js +55 -0
  118. package/lib/module/createMMKV.js.map +1 -0
  119. package/lib/module/createMMKV.mock.js +31 -0
  120. package/lib/module/createMMKV.mock.js.map +1 -0
  121. package/lib/module/createMMKV.web.js +67 -0
  122. package/lib/module/createMMKV.web.js.map +1 -0
  123. package/lib/module/createTextEncoder.js +17 -0
  124. package/lib/module/createTextEncoder.js.map +1 -0
  125. package/lib/module/hooks.js +181 -0
  126. package/lib/module/hooks.js.map +1 -0
  127. package/lib/module/index.js +3 -0
  128. package/lib/module/index.js.map +1 -0
  129. package/lib/typescript/MMKV.d.ts +137 -0
  130. package/lib/typescript/PlatformChecker.d.ts +1 -0
  131. package/lib/typescript/createMMKV.d.ts +6 -0
  132. package/lib/typescript/createMMKV.mock.d.ts +2 -0
  133. package/lib/typescript/createMMKV.web.d.ts +2 -0
  134. package/lib/typescript/createTextEncoder.d.ts +1 -0
  135. package/lib/typescript/hooks.d.ts +81 -0
  136. package/lib/typescript/index.d.ts +2 -0
  137. package/package.json +168 -0
  138. package/react-native-mmkv.podspec +32 -0
package/package.json ADDED
@@ -0,0 +1,168 @@
1
+ {
2
+ "name": "react-native-mmkv-dz",
3
+ "version": "2.5.1",
4
+ "description": "The fastest key/value storage for React Native. ~30x faster than AsyncStorage! Works on Android, iOS and Web.",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "lib/module/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "android/src",
12
+ "android/build.gradle",
13
+ "android/gradle.properties",
14
+ "android/CMakeLists.txt",
15
+ "cpp",
16
+ "MMKV/Core",
17
+ "lib/commonjs",
18
+ "lib/module",
19
+ "lib/typescript",
20
+ "ios/**/*.h",
21
+ "ios/**/*.m",
22
+ "ios/**/*.mm",
23
+ "ios/**/*.cpp",
24
+ "ios/Mmkv.xcodeproj/project.pbxproj",
25
+ "react-native-mmkv.podspec",
26
+ "README.md"
27
+ ],
28
+ "scripts": {
29
+ "typescript": "tsc --noEmit",
30
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
31
+ "lint-ci": "yarn lint -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js",
32
+ "prepare": "git submodule update --init --recursive",
33
+ "build": "bob build",
34
+ "prepack": "bob build",
35
+ "update-submodule": "git submodule update --remote --merge",
36
+ "release": "release-it",
37
+ "example": "yarn --cwd example",
38
+ "pods": "cd example && yarn pods",
39
+ "bootstrap": "git submodule update --init --recursive && yarn && cd example && yarn bootstrap"
40
+ },
41
+ "keywords": [
42
+ "react-native",
43
+ "ios",
44
+ "android"
45
+ ],
46
+ "repository": "https://github.com/mrousavy/react-native-mmkv",
47
+ "author": "Marc Rousavy <marcrousavy@hotmail.com> (https://github.com/mrousavy)",
48
+ "license": "(MIT AND BSD-3-Clause)",
49
+ "bugs": {
50
+ "url": "https://github.com/mrousavy/react-native-mmkv/issues"
51
+ },
52
+ "homepage": "https://github.com/mrousavy/react-native-mmkv#readme",
53
+ "publishConfig": {
54
+ "registry": "https://registry.npmjs.org/"
55
+ },
56
+ "devDependencies": {
57
+ "@jamesacarr/eslint-formatter-github-actions": "^0.1.0",
58
+ "@react-native-community/eslint-config": "^3.0.1",
59
+ "@react-native-community/eslint-plugin": "^1.1.0",
60
+ "@release-it/conventional-changelog": "^3.3.0",
61
+ "@types/react": "^17.0.21",
62
+ "@types/react-native": "^0.65.5",
63
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
64
+ "eslint": "^7.32.0",
65
+ "prettier": "^2.4.0",
66
+ "react": "^17.0.2",
67
+ "react-native": "^0.66.0",
68
+ "react-native-builder-bob": "^0.18.1",
69
+ "release-it": "^14.11.5",
70
+ "typescript": "^4.4.3"
71
+ },
72
+ "peerDependencies": {
73
+ "react": "*",
74
+ "react-native": "*"
75
+ },
76
+ "jest": {
77
+ "preset": "react-native",
78
+ "modulePathIgnorePatterns": [
79
+ "<rootDir>/example/node_modules",
80
+ "<rootDir>/lib/"
81
+ ]
82
+ },
83
+ "release-it": {
84
+ "git": {
85
+ "commitMessage": "chore: release ${version}",
86
+ "tagName": "v${version}"
87
+ },
88
+ "npm": {
89
+ "publish": true
90
+ },
91
+ "github": {
92
+ "release": true
93
+ },
94
+ "plugins": {
95
+ "@release-it/conventional-changelog": {
96
+ "preset": {
97
+ "name": "conventionalcommits",
98
+ "types": [
99
+ {
100
+ "type": "feat",
101
+ "section": "✨ Features"
102
+ },
103
+ {
104
+ "type": "fix",
105
+ "section": "🐛 Bug Fixes"
106
+ },
107
+ {
108
+ "type": "perf",
109
+ "section": "💨 Performance Improvements"
110
+ },
111
+ {
112
+ "type": "chore(deps)",
113
+ "section": "🛠️ Dependency Upgrades"
114
+ },
115
+ {
116
+ "type": "docs",
117
+ "section": "📚 Documentation"
118
+ }
119
+ ]
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "eslintConfig": {
125
+ "root": true,
126
+ "extends": [
127
+ "@react-native-community",
128
+ "prettier"
129
+ ],
130
+ "rules": {
131
+ "prettier/prettier": [
132
+ "error",
133
+ {
134
+ "quoteProps": "consistent",
135
+ "singleQuote": true,
136
+ "tabWidth": 2,
137
+ "trailingComma": "es5",
138
+ "useTabs": false
139
+ }
140
+ ]
141
+ }
142
+ },
143
+ "eslintIgnore": [
144
+ "node_modules/",
145
+ "lib/"
146
+ ],
147
+ "prettier": {
148
+ "quoteProps": "consistent",
149
+ "singleQuote": true,
150
+ "tabWidth": 2,
151
+ "trailingComma": "es5",
152
+ "useTabs": false
153
+ },
154
+ "react-native-builder-bob": {
155
+ "source": "src",
156
+ "output": "lib",
157
+ "targets": [
158
+ "commonjs",
159
+ "module",
160
+ [
161
+ "typescript",
162
+ {
163
+ "project": "tsconfig.json"
164
+ }
165
+ ]
166
+ ]
167
+ }
168
+ }
@@ -0,0 +1,32 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native-mmkv"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "11.0", :tvos => "12.0", :osx => "10.14" }
14
+ s.source = { :git => "https://github.com/mrousavy/react-native-mmkv.git", :tag => "#{s.version}" }
15
+
16
+ # All source files that should be publicly visible
17
+ # Note how this does not include headers, since those can nameclash.
18
+ s.source_files = [
19
+ "ios/**/*.{m,mm}",
20
+ "ios/MmkvModule.h",
21
+ "cpp/**/*.{h,cpp}"
22
+ ]
23
+ # Any private headers that are not globally unique should be mentioned here.
24
+ # Otherwise there will be a nameclash, since CocoaPods flattens out any header directories
25
+ # See https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details.
26
+ s.preserve_paths = [
27
+ 'ios/**/*.h'
28
+ ]
29
+
30
+ s.dependency "MMKV", "1.3.4"
31
+ s.dependency "React-Core"
32
+ end