This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from emeraldsanto/dev
Version 2.4.4
- Loading branch information
Showing
75 changed files
with
10,474 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,5 @@ buck-out/ | |
# JEST | ||
coverage/ | ||
|
||
# TYPESCRIPT | ||
dist/* | ||
*.prefs | ||
# MISC | ||
*.prefs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export declare type StorageErrorCallback = (error?: Error) => void; | ||
export declare type StorageValueCallback = (error?: Error, value?: string) => void; | ||
export default class EncryptedStorage { | ||
/** | ||
* Writes data to the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that will be associated to the value for later retrieval. | ||
* @param {string} value - The data to store. | ||
*/ | ||
static setItem(key: string, value: string): Promise<void>; | ||
/** | ||
* Writes data to the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that will be associated to the value for later retrieval. | ||
* @param {string} value - The data to store. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static setItem(key: string, value: string, cb: StorageErrorCallback): void; | ||
/** | ||
* Retrieves data from the disk, using SharedPreferences or KeyChain, depending on the platform and returns it as the specified type. | ||
* @param {string} key - A string that is associated to a value. | ||
*/ | ||
static getItem(key: string): Promise<string | null>; | ||
/** | ||
* Retrieves data from the disk, using SharedPreferences or KeyChain, depending on the platform and returns it as the specified type. | ||
* @param {string} key - A string that is associated to a value. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static getItem(key: string, cb: StorageValueCallback): void; | ||
/** | ||
* Deletes data from the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that is associated to a value. | ||
*/ | ||
static removeItem(key: string): Promise<void>; | ||
/** | ||
* Deletes data from the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that is associated to a value. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static removeItem(key: string, cb: StorageErrorCallback): void; | ||
/** | ||
* Clears all data from disk, using SharedPreferences or KeyChain, depending on the platform. | ||
*/ | ||
static clear(): Promise<void>; | ||
/** | ||
* Clears all data from disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static clear(cb: (error?: Error) => void): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const react_native_1 = require("react-native"); | ||
const { RNEncryptedStorage } = react_native_1.NativeModules; | ||
if (!RNEncryptedStorage) { | ||
throw new Error("RNEncryptedStorage is undefined"); | ||
} | ||
class EncryptedStorage { | ||
static setItem(key, value, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.setItem(key, value).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.setItem(key, value); | ||
} | ||
static getItem(key, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.getItem(key).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.getItem(key); | ||
} | ||
static removeItem(key, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.removeItem(key).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.removeItem(key); | ||
} | ||
static clear(cb) { | ||
if (cb) { | ||
RNEncryptedStorage.clear().then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.clear(); | ||
} | ||
} | ||
exports.default = EncryptedStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./EncryptedStorage"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var EncryptedStorage_1 = require("./EncryptedStorage"); | ||
exports.default = EncryptedStorage_1.default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export declare type StorageErrorCallback = (error?: Error) => void; | ||
export declare type StorageValueCallback = (error?: Error, value?: string) => void; | ||
export default class EncryptedStorage { | ||
/** | ||
* Writes data to the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that will be associated to the value for later retrieval. | ||
* @param {string} value - The data to store. | ||
*/ | ||
static setItem(key: string, value: string): Promise<void>; | ||
/** | ||
* Writes data to the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that will be associated to the value for later retrieval. | ||
* @param {string} value - The data to store. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static setItem(key: string, value: string, cb: StorageErrorCallback): void; | ||
/** | ||
* Retrieves data from the disk, using SharedPreferences or KeyChain, depending on the platform and returns it as the specified type. | ||
* @param {string} key - A string that is associated to a value. | ||
*/ | ||
static getItem(key: string): Promise<string | null>; | ||
/** | ||
* Retrieves data from the disk, using SharedPreferences or KeyChain, depending on the platform and returns it as the specified type. | ||
* @param {string} key - A string that is associated to a value. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static getItem(key: string, cb: StorageValueCallback): void; | ||
/** | ||
* Deletes data from the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that is associated to a value. | ||
*/ | ||
static removeItem(key: string): Promise<void>; | ||
/** | ||
* Deletes data from the disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {string} key - A string that is associated to a value. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static removeItem(key: string, cb: StorageErrorCallback): void; | ||
/** | ||
* Clears all data from disk, using SharedPreferences or KeyChain, depending on the platform. | ||
*/ | ||
static clear(): Promise<void>; | ||
/** | ||
* Clears all data from disk, using SharedPreferences or KeyChain, depending on the platform. | ||
* @param {Function} cb - The function to call when the operation completes. | ||
*/ | ||
static clear(cb: (error?: Error) => void): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const react_native_1 = require("react-native"); | ||
const { RNEncryptedStorage } = react_native_1.NativeModules; | ||
if (!RNEncryptedStorage) { | ||
throw new Error("RNEncryptedStorage is undefined"); | ||
} | ||
class EncryptedStorage { | ||
static setItem(key, value, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.setItem(key, value).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.setItem(key, value); | ||
} | ||
static getItem(key, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.getItem(key).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.getItem(key); | ||
} | ||
static removeItem(key, cb) { | ||
if (cb) { | ||
RNEncryptedStorage.removeItem(key).then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.removeItem(key); | ||
} | ||
static clear(cb) { | ||
if (cb) { | ||
RNEncryptedStorage.clear().then(cb).catch(cb); | ||
return; | ||
} | ||
return RNEncryptedStorage.clear(); | ||
} | ||
} | ||
exports.default = EncryptedStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./EncryptedStorage"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var EncryptedStorage_1 = require("./EncryptedStorage"); | ||
exports.default = EncryptedStorage_1.default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[android] | ||
target = Google Inc.:Google APIs:23 | ||
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pbxproj -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
*/fastlane/report.xml | ||
*/fastlane/Preview.html | ||
*/fastlane/screenshots | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# CocoaPods | ||
/ios/Pods/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Oops, something went wrong.