@digitalshieldfe/react-native-backup-card-sdk 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -1,37 +1,45 @@
1
- # react-native-backup-card-sdk
1
+ # @digitalshieldfe/react-native-backup-card-sdk
2
2
 
3
- ds react-native backup-card sdk
3
+ Digital Shield backup card SDK for React Native (Turbo Module).
4
4
 
5
5
  ## Installation
6
6
 
7
-
8
7
  ```sh
9
- npm install react-native-backup-card-sdk
8
+ yarn add @digitalshieldfe/react-native-backup-card-sdk
9
+ # or
10
+ npm install @digitalshieldfe/react-native-backup-card-sdk
10
11
  ```
11
12
 
13
+ Android native code (`backupcardsdk` AAR) is **bundled inside this npm package**. Host apps do **not** need `mavenLocal()` or `com.ziancube:backupcardsdk` from Maven Central.
12
14
 
13
15
  ## Usage
14
16
 
15
-
16
17
  ```js
17
- import { multiply } from 'react-native-backup-card-sdk';
18
-
19
- // ...
18
+ import BackupCardSdk from '@digitalshieldfe/react-native-backup-card-sdk';
20
19
 
21
- const result = multiply(3, 7);
20
+ const info = await BackupCardSdk.getCardInfo();
22
21
  ```
23
22
 
23
+ ## Android
24
24
 
25
- ## Contributing
25
+ - AAR path: `android/libs/backupcardsdk-1.0.0.aar`
26
+ - Autolinking via React Native / Expo as usual
27
+ - NFC permissions and intent filters must be configured in the host app
26
28
 
27
- - [Development workflow](CONTRIBUTING.md#development-workflow)
28
- - [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
29
- - [Code of conduct](CODE_OF_CONDUCT.md)
29
+ ## Maintainers: update bundled AAR
30
30
 
31
- ## License
31
+ When `android-sdk/backupcardsdk` changes:
32
32
 
33
- MIT
33
+ ```sh
34
+ cd android-sdk
35
+ ./gradlew :backupcardsdk:assembleRelease
34
36
 
35
- ---
37
+ cd ../rn-sdk
38
+ yarn sync:aar
39
+ # bump version in package.json, then publish
40
+ npm publish --access public
41
+ ```
36
42
 
37
- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
43
+ ## License
44
+
45
+ MIT
@@ -15,7 +15,6 @@ buildscript {
15
15
  }
16
16
 
17
17
  repositories {
18
- mavenLocal()
19
18
  google()
20
19
  mavenCentral()
21
20
  }
@@ -64,6 +63,7 @@ android {
64
63
  }
65
64
 
66
65
  dependencies {
67
- implementation("com.ziancube:backupcardsdk:1.0.0")
66
+ // Bundled in npm; update via: yarn sync:aar (after android-sdk release build)
67
+ implementation(files("libs/backupcardsdk-1.0.0.aar"))
68
68
  implementation("com.facebook.react:react-android")
69
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalshieldfe/react-native-backup-card-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "ds react-native backup-card sdk",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -34,7 +34,8 @@
34
34
  "scripts": {
35
35
  "example": "yarn workspace react-native-backup-card-sdk-example",
36
36
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
37
- "prepare": "bob build",
37
+ "sync:aar": "node scripts/sync-backupcardsdk-aar.js",
38
+ "prepare": "node scripts/sync-backupcardsdk-aar.js && bob build",
38
39
  "typecheck": "tsc",
39
40
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
40
41
  "test": "jest",