Skip to content

Commit c007e69

Browse files
mCodexdenissbxvonaburIgor Fernandesajcrites
authored
v6.x (mCodex#227)
* Update README.md * Fix typo in README * mCodex#60 * Update RNSensitiveInfoModule Changes: - changed the getAllItems method error handling to log the error stack trace instead of the `getCause().getMessage()` chain. This was needed because some exceptions caused at decrypt function doesn't have an explicit cause and because of that, the getCause() at the getAllItems' catch was returning null and trying to call the getMessage(). Which is not possible, of course. - added a new argument validation at decrypt method, checking if the encrypted attribute is null; * feature: adding TypeScript typings * Updated keystore branch * Fixed keystore reset each boot * Android <= 5 encryption support * getItem now returns null if item never was set before, README.md cleanup * Fixed Android 8.0 inability to retrive secretKey from the keystore * Build.gradle updated * Androidx support * mCodex#137 * generating project * added initial template and eslint configs * removing example project * added new example project structure using yalc * working on example home page * added permissions in AndroidManifest * Updated example, removed isHardwareDetected * Removed isHardwareDetected in favor of isSensor available (was not working on iOS) * Fixed example android permissions * Improving .npmgitignore * renamed sharedPreferencesName, added typescript and rollup * Renamed sharedPreferencesName to keystoreKey (breaking change) * Added typescript future RNSInfo's future releases will be bundled by TS * Improved example and fixed biometric prompt * Fixed biometric prompt crash when header/title was not provided. Now, the default is: "Unlock with your fingerprint" * Removed cached .DS_Store * v6.0.0-alpha.1 * reverting keystoreKey to sharedPreferencesName * v6.0.0-alpha.2 * updated docs * changing security.md * improving docs * Updated security.md * updated docs * Updated README * Updated README * Updated README * Updated example and updated RNSInfo Xcode to recommended settings * v6.0.0-alpha.3 * Added algolia search & updated docusaurus * Removing website folder Removed website folder * v6.0.0-alpha.4 * Updating android package name Co-authored-by: denissb <[email protected]> Co-authored-by: Ivan Rubanovskiy <[email protected]> Co-authored-by: Igor Fernandes <[email protected]> Co-authored-by: Andrew Crites <[email protected]> Co-authored-by: Victor <[email protected]> Co-authored-by: Pavel Bakharev <[email protected]> Co-authored-by: micha <micha@DESKTOP-PSCMROG> Co-authored-by: michal.pilarek <[email protected]> Co-authored-by: Mateus Andrade <[email protected]>
1 parent 8bac6b8 commit c007e69

File tree

65 files changed

+9386
-4526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9386
-4526
lines changed

.eslintrc.js

+57-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
1-
module.exports = { extends: "@react-native-community" };
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2020: true,
5+
},
6+
extends: [
7+
'plugin:react/recommended',
8+
'airbnb',
9+
'plugin:@typescript-eslint/recommended',
10+
'prettier/@typescript-eslint',
11+
'plugin:prettier/recommended',
12+
],
13+
parser: '@typescript-eslint/parser',
14+
parserOptions: {
15+
ecmaFeatures: {
16+
jsx: true,
17+
},
18+
ecmaVersion: 11,
19+
sourceType: 'module',
20+
},
21+
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
22+
rules: {
23+
'prettier/prettier': 'error',
24+
'react-hooks/rules-of-hooks': 'error',
25+
'react-hooks/exhaustive-deps': 'warn',
26+
'react/jsx-filename-extension': [
27+
1,
28+
{
29+
extensions: ['.tsx'],
30+
},
31+
],
32+
'import/prefer-default-export': 'off',
33+
'react/jsx-one-expression-per-line': 'off',
34+
'react/jsx-props-no-spreading': 'off',
35+
'no-unused-expressions': 'off',
36+
'react/prop-types': 'off',
37+
'@typescript-eslint/explicit-function-return-type': [
38+
'error',
39+
{
40+
allowExpressions: true,
41+
},
42+
],
43+
'import/extensions': [
44+
'error',
45+
'ignorePackages',
46+
{
47+
ts: 'never',
48+
tsx: 'never',
49+
},
50+
],
51+
},
52+
settings: {
53+
'import/resolver': {
54+
typescript: {},
55+
},
56+
},
57+
};

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ android/build/
4141
android/local.properties
4242
android.yml
4343
*.iml
44+
45+
.DS_STORE

.npmignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
example/
2-
website/
3-
cover.png
1+
*
2+
!android/**
3+
!ios/**
4+
!windows/**
5+
!./package.json
6+
!index.d.ts
7+
!react-native-sensitive-info.podspec
8+
!build/**

.prettierrc

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
module.exports = {
2-
bracketSpacing: false,
3-
jsxBracketSameLine: true,
42
singleQuote: true,
53
trailingComma: 'all',
64
};

README.md

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
1-
<img alt="GoStack" src="./cover.png" />
2-
3-
<center>
1+
<img alt="Cover" src="./cover.png" />
42

53
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
64
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
75
[![npm version](https://badge.fury.io/js/react-native-sensitive-info.svg)](https://badge.fury.io/js/react-native-sensitive-info)
6+
[![npm downloads](https://img.shields.io/npm/dm/react-native-sensitive-info)](https://img.shields.io/npm/dm/react-native-sensitive-info)
87
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
98
![npm bundle size](https://img.shields.io/bundlephobia/min/react-native-sensitive-info)
109

11-
</center>
12-
1310
# React Native Sensitive Info
1411

15-
`react-native-sensitive-info` manages all data stored in Android Shared Preferences, iOS Keychain and Windows Credentials. You can set and get all key/value using simple methods.
16-
17-
# Install
18-
19-
Install `react-native-sensitive-info` into your project using:
20-
21-
```bash
22-
npm i -S react-native-sensitive-info
23-
```
24-
25-
```bash
26-
yarn add react-native-sensitive-info
27-
```
12+
`react-native-sensitive-info` manages all data stored in Android Shared Preferences, iOS Keychain and Windows Credentials. You can set and get all key/value using simple methods.
2813

29-
# Docs
14+
## Docs
3015

31-
Check out the [docs](https://mcodex.github.io/react-native-sensitive-info/docs)
16+
Check out the [docs](https://mcodex.github.io/react-native-sensitive-info/docs) for installation and instructions usage.
3217

33-
# Contributors ✨
18+
## Contributors ✨
3419

3520
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
3621

@@ -50,6 +35,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
5035

5136
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
5237

53-
# Contributing
38+
## Contributing
5439

5540
Pull requests are always welcome :)

RNSensitiveInfo.js

-23
This file was deleted.

RNSensitiveInfo.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { NativeModules } from 'react-native';
2+
3+
const { RNSensitiveInfo } = NativeModules;
4+
5+
export default {
6+
...RNSensitiveInfo,
7+
// setInvalidatedByBiometricEnrollment(
8+
// invalidatedByBiometricEnrollment
9+
// ): Function {
10+
// if (RNSensitiveInfo.setInvalidatedByBiometricEnrollment == null) {
11+
// return;
12+
// }
13+
14+
// return RNSensitiveInfo.setInvalidatedByBiometricEnrollment(
15+
// invalidatedByBiometricEnrollment
16+
// );
17+
// },
18+
// cancelFingerprintAuth() {
19+
// if (RNSensitiveInfo.cancelFingerprintAuth == null) {
20+
// return;
21+
// }
22+
23+
// return RNSensitiveInfo.cancelFingerprintAuth();
24+
// },
25+
};

android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

android/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<manifest package="br.com.classapp.RNSensitiveInfo" xmlns:android="http://schemas.android.com/apk/res/android">
1+
<manifest package="dev.mcodex.RNSensitiveInfo" xmlns:android="http://schemas.android.com/apk/res/android">
22
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
33
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
44
</manifest>

0 commit comments

Comments
 (0)