react-native-nitro-storage 0.3.2 → 0.4.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 +141 -30
- package/android/src/main/cpp/AndroidStorageAdapterCpp.cpp +22 -2
- package/android/src/main/cpp/AndroidStorageAdapterCpp.hpp +3 -0
- package/android/src/main/java/com/nitrostorage/AndroidStorageAdapter.kt +54 -5
- package/cpp/bindings/HybridStorage.cpp +167 -22
- package/cpp/bindings/HybridStorage.hpp +12 -1
- package/cpp/core/NativeStorageAdapter.hpp +3 -0
- package/ios/IOSStorageAdapterCpp.hpp +16 -0
- package/ios/IOSStorageAdapterCpp.mm +135 -11
- package/lib/commonjs/index.js +466 -275
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +564 -270
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/internal.js +25 -0
- package/lib/commonjs/internal.js.map +1 -1
- package/lib/module/index.js +466 -277
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +564 -272
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/internal.js +24 -0
- package/lib/module/internal.js.map +1 -1
- package/lib/typescript/Storage.nitro.d.ts +2 -0
- package/lib/typescript/Storage.nitro.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +38 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/index.web.d.ts +40 -1
- package/lib/typescript/index.web.d.ts.map +1 -1
- package/lib/typescript/internal.d.ts +1 -0
- package/lib/typescript/internal.d.ts.map +1 -1
- package/nitrogen/generated/shared/c++/HybridStorageSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridStorageSpec.hpp +2 -0
- package/package.json +1 -1
- package/src/Storage.nitro.ts +2 -0
- package/src/index.ts +616 -296
- package/src/index.web.ts +728 -288
- package/src/internal.ts +28 -0
|
@@ -57,6 +57,7 @@ namespace margelo::nitro::NitroStorage {
|
|
|
57
57
|
virtual void clear(double scope) = 0;
|
|
58
58
|
virtual bool has(const std::string& key, double scope) = 0;
|
|
59
59
|
virtual std::vector<std::string> getAllKeys(double scope) = 0;
|
|
60
|
+
virtual std::vector<std::string> getKeysByPrefix(const std::string& prefix, double scope) = 0;
|
|
60
61
|
virtual double size(double scope) = 0;
|
|
61
62
|
virtual void setBatch(const std::vector<std::string>& keys, const std::vector<std::string>& values, double scope) = 0;
|
|
62
63
|
virtual std::vector<std::string> getBatch(const std::vector<std::string>& keys, double scope) = 0;
|
|
@@ -67,6 +68,7 @@ namespace margelo::nitro::NitroStorage {
|
|
|
67
68
|
virtual void setSecureWritesAsync(bool enabled) = 0;
|
|
68
69
|
virtual void setKeychainAccessGroup(const std::string& group) = 0;
|
|
69
70
|
virtual void setSecureBiometric(const std::string& key, const std::string& value) = 0;
|
|
71
|
+
virtual void setSecureBiometricWithLevel(const std::string& key, const std::string& value, double level) = 0;
|
|
70
72
|
virtual std::optional<std::string> getSecureBiometric(const std::string& key) = 0;
|
|
71
73
|
virtual void deleteSecureBiometric(const std::string& key) = 0;
|
|
72
74
|
virtual bool hasSecureBiometric(const std::string& key) = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
package/src/Storage.nitro.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface Storage extends HybridObject<{ ios: "c++"; android: "c++" }> {
|
|
|
7
7
|
clear(scope: number): void;
|
|
8
8
|
has(key: string, scope: number): boolean;
|
|
9
9
|
getAllKeys(scope: number): string[];
|
|
10
|
+
getKeysByPrefix(prefix: string, scope: number): string[];
|
|
10
11
|
size(scope: number): number;
|
|
11
12
|
setBatch(keys: string[], values: string[], scope: number): void;
|
|
12
13
|
getBatch(keys: string[], scope: number): (string | undefined)[];
|
|
@@ -20,6 +21,7 @@ export interface Storage extends HybridObject<{ ios: "c++"; android: "c++" }> {
|
|
|
20
21
|
setSecureWritesAsync(enabled: boolean): void;
|
|
21
22
|
setKeychainAccessGroup(group: string): void;
|
|
22
23
|
setSecureBiometric(key: string, value: string): void;
|
|
24
|
+
setSecureBiometricWithLevel(key: string, value: string, level: number): void;
|
|
23
25
|
getSecureBiometric(key: string): string | undefined;
|
|
24
26
|
deleteSecureBiometric(key: string): void;
|
|
25
27
|
hasSecureBiometric(key: string): boolean;
|