react-native-nitro-storage 0.1.3 → 0.3.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.
- package/README.md +320 -391
- package/android/src/main/cpp/AndroidStorageAdapterCpp.cpp +101 -0
- package/android/src/main/cpp/AndroidStorageAdapterCpp.hpp +6 -41
- package/android/src/main/java/com/nitrostorage/AndroidStorageAdapter.kt +125 -37
- package/app.plugin.js +9 -7
- package/cpp/bindings/HybridStorage.cpp +214 -19
- package/cpp/bindings/HybridStorage.hpp +1 -0
- package/cpp/core/NativeStorageAdapter.hpp +7 -0
- package/ios/IOSStorageAdapterCpp.hpp +6 -0
- package/ios/IOSStorageAdapterCpp.mm +90 -7
- package/lib/commonjs/index.js +537 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +558 -130
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/internal.js +102 -0
- package/lib/commonjs/internal.js.map +1 -0
- package/lib/module/index.js +528 -67
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +536 -122
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/internal.js +92 -0
- package/lib/module/internal.js.map +1 -0
- package/lib/typescript/index.d.ts +42 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/index.web.d.ts +45 -12
- package/lib/typescript/index.web.d.ts.map +1 -1
- package/lib/typescript/internal.d.ts +19 -0
- package/lib/typescript/internal.d.ts.map +1 -0
- package/lib/typescript/migration.d.ts +2 -3
- package/lib/typescript/migration.d.ts.map +1 -1
- package/nitrogen/generated/android/NitroStorage+autolinking.cmake +1 -1
- package/nitrogen/generated/android/NitroStorage+autolinking.gradle +1 -1
- package/nitrogen/generated/android/NitroStorageOnLoad.cpp +1 -1
- package/nitrogen/generated/android/NitroStorageOnLoad.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/com/nitrostorage/NitroStorageOnLoad.kt +1 -1
- package/nitrogen/generated/ios/NitroStorage+autolinking.rb +1 -1
- package/nitrogen/generated/ios/NitroStorage-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/NitroStorage-Swift-Cxx-Bridge.hpp +1 -1
- package/nitrogen/generated/ios/NitroStorage-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/NitroStorageAutolinking.mm +1 -1
- package/nitrogen/generated/ios/NitroStorageAutolinking.swift +5 -1
- package/nitrogen/generated/shared/c++/HybridStorageSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridStorageSpec.hpp +1 -1
- package/package.json +19 -8
- package/src/index.ts +734 -74
- package/src/index.web.ts +732 -128
- package/src/internal.ts +134 -0
- package/src/migration.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The fastest, most complete storage solution for React Native. Synchronous Memory, Disk, and Secure storage in one unified API. Built with Nitro Modules.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
"browser": "src/index.web.ts",
|
|
10
10
|
"source": "src/index.ts",
|
|
11
11
|
"app": "app.plugin.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./lib/typescript/index.d.ts",
|
|
15
|
+
"react-native": "./src/index.ts",
|
|
16
|
+
"browser": "./src/index.web.ts",
|
|
17
|
+
"default": "./lib/commonjs/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./app.plugin": "./app.plugin.js",
|
|
20
|
+
"./app.plugin.js": "./app.plugin.js",
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
12
23
|
"files": [
|
|
13
24
|
"src",
|
|
14
25
|
"lib",
|
|
@@ -29,15 +40,15 @@
|
|
|
29
40
|
"!scripts"
|
|
30
41
|
],
|
|
31
42
|
"scripts": {
|
|
32
|
-
"prebuild": "npm run codegen",
|
|
33
43
|
"build": "bob build",
|
|
34
44
|
"clean": "rimraf lib nitrogen/generated",
|
|
35
45
|
"codegen": "nitrogen --logLevel=\"debug\"",
|
|
36
46
|
"typecheck": "tsc --noEmit",
|
|
37
47
|
"test": "jest",
|
|
38
48
|
"test:coverage": "jest --coverage",
|
|
49
|
+
"benchmark": "node scripts/benchmark-check.js",
|
|
39
50
|
"test:cpp": "node scripts/test-cpp.js",
|
|
40
|
-
"prepublishOnly": "
|
|
51
|
+
"prepublishOnly": "bun run clean && bun run codegen && bun run build && bun run benchmark",
|
|
41
52
|
"prepack": "node -e \"const fs=require('fs'); fs.copyFileSync('../../README.md','./README.md'); try{fs.copyFileSync('../../LICENSE','./LICENSE')}catch(e){}\"",
|
|
42
53
|
"postpack": "node -e \"const fs=require('fs'); ['./README.md','./LICENSE'].forEach(f=>fs.existsSync(f)&&fs.unlinkSync(f))\""
|
|
43
54
|
},
|
|
@@ -76,16 +87,16 @@
|
|
|
76
87
|
},
|
|
77
88
|
"devDependencies": {
|
|
78
89
|
"@expo/config-plugins": "^54.0.4",
|
|
79
|
-
"@react-native/babel-preset": "^0.83.
|
|
90
|
+
"@react-native/babel-preset": "^0.83.2",
|
|
80
91
|
"@testing-library/react-hooks": "^8.0.1",
|
|
81
92
|
"@testing-library/react-native": "^13.3.3",
|
|
82
|
-
"@types/react": "
|
|
83
|
-
"typescript": "^5.
|
|
93
|
+
"@types/react": "~19.1.10",
|
|
94
|
+
"typescript": "^5.9.3"
|
|
84
95
|
},
|
|
85
96
|
"peerDependencies": {
|
|
86
|
-
"react": "
|
|
97
|
+
"react": ">=18.2.0",
|
|
87
98
|
"react-native": ">=0.75.0",
|
|
88
|
-
"react-native-nitro-modules": ">=0.
|
|
99
|
+
"react-native-nitro-modules": ">=0.33.9"
|
|
89
100
|
},
|
|
90
101
|
"react-native-builder-bob": {
|
|
91
102
|
"source": "src",
|