@pinwheel/react-native-pinwheel 2.3.10 → 2.3.12
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 +17 -27
- package/lib/constants.d.ts +6 -0
- package/lib/constants.js +6 -0
- package/lib/index.js +2 -7
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# react-native-pinwheel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Pinwheel SDK for React Native
|
|
4
|
+
|
|
5
|
+
## Running The Example App Locally
|
|
6
|
+
|
|
7
|
+
You may want to run the example app locally to get started.
|
|
8
|
+
|
|
9
|
+
#### Dependencies
|
|
10
|
+
|
|
11
|
+
- Node 16.7.0 (check with `node -v` and upgrade versions using `nvm`)
|
|
12
|
+
- iPhone 14 simulator (open your Simulator app and check the available versions)
|
|
13
|
+
- iOS 16 running on the simulator (open your Simulator app and check the available versions)
|
|
14
|
+
- `pod` version 1.11.3 (check with `pod --version`)
|
|
15
|
+
|
|
16
|
+
#### Directions
|
|
17
|
+
|
|
18
|
+
- `npm run dev`
|
|
19
|
+
|
|
4
20
|
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
@@ -93,29 +109,3 @@ Callback for all significant events that happen during the modal flow. See all p
|
|
|
93
109
|
| Type | Required |
|
|
94
110
|
| -------- | -------- |
|
|
95
111
|
| function | No |
|
|
96
|
-
|
|
97
|
-
# Testing Locally
|
|
98
|
-
|
|
99
|
-
## Dependencies
|
|
100
|
-
|
|
101
|
-
- Node 16.7.0 (check with `node -v` and upgrade versions using `nvm`)
|
|
102
|
-
- iPhone 14 simulator (open your Simulator app and check the available versions)
|
|
103
|
-
- iOS 16 running on the simulator (open your Simulator app and check the available versions)
|
|
104
|
-
- `pod` version 1.11.3 (check with `pod --version`)
|
|
105
|
-
|
|
106
|
-
## Directions
|
|
107
|
-
|
|
108
|
-
- `npm i`
|
|
109
|
-
- Bump the version number in `package.json`: `"version": "2.x.x",`
|
|
110
|
-
- Bump the version number in `src/index.tsx`: `const version = '2.x.x';`
|
|
111
|
-
- `npm run build`
|
|
112
|
-
- `npm pack`
|
|
113
|
-
- `cd example`
|
|
114
|
-
- Update the version of the tgz file in `package.json`: `"@pinwheel/react-native-pinwheel": "../pinwheel-react-native-pinwheel-2.x.x.tgz"`
|
|
115
|
-
- Update version number in `package.json`: `"version": "2.x.x"`
|
|
116
|
-
- `npm install`
|
|
117
|
-
- `npx react-native start --reset-cache`
|
|
118
|
-
- Open a new terminal window `cd ios` from the `example` directory and `pod install`
|
|
119
|
-
- Add production sandbox key for testing purposes only to `example/App.js`: `const API_SECRET = "";`
|
|
120
|
-
- Navigate back to the root directory of this repo and `npm run ios`
|
|
121
|
-
- **IMPORTANT: Remove production sandbox key when finished with testing**
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing package.json here causes a problem with the folder structure when we npm pack and publish.
|
|
3
|
+
*/
|
|
4
|
+
export declare const VERSION = "2.3.12";
|
|
5
|
+
export declare const LINK_PAGE_URL = "https://cdn.getpinwheel.com/link-v2.3.0.html";
|
|
6
|
+
export declare const PINWHEEL_DOMAIN = "getpinwheel.com";
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing package.json here causes a problem with the folder structure when we npm pack and publish.
|
|
3
|
+
*/
|
|
4
|
+
export const VERSION = '2.3.12';
|
|
5
|
+
export const LINK_PAGE_URL = 'https://cdn.getpinwheel.com/link-v2.3.0.html';
|
|
6
|
+
export const PINWHEEL_DOMAIN = 'getpinwheel.com';
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WebView } from 'react-native-webview';
|
|
3
3
|
import { Linking, Platform, SafeAreaView, StyleSheet } from 'react-native';
|
|
4
|
-
|
|
5
|
-
* Importing package.json here causes a problem with the folder structure when we npm pack and publish.
|
|
6
|
-
*/
|
|
7
|
-
const version = '2.3.10';
|
|
4
|
+
import { LINK_PAGE_URL, PINWHEEL_DOMAIN, VERSION } from './constants';
|
|
8
5
|
const styles = StyleSheet.create({
|
|
9
6
|
container: {
|
|
10
7
|
flex: 1,
|
|
@@ -17,8 +14,6 @@ export const PINWHEEL_MESSAGE_TYPES = {
|
|
|
17
14
|
PINWHEEL_SUCCESS: 'PINWHEEL_SUCCESS',
|
|
18
15
|
PINWHEEL_EVENT: 'PINWHEEL_EVENT',
|
|
19
16
|
};
|
|
20
|
-
const LINK_PAGE_URL = 'https://cdn.getpinwheel.com/link-v2.3.0.html';
|
|
21
|
-
const PINWHEEL_DOMAIN = 'getpinwheel.com';
|
|
22
17
|
export default ({ linkToken, onLogin, onLoginAttempt, onSuccess, onError, onExit, onEvent }) => {
|
|
23
18
|
const handleEvent = (event) => {
|
|
24
19
|
if (!event) {
|
|
@@ -61,7 +56,7 @@ export default ({ linkToken, onLogin, onLoginAttempt, onSuccess, onError, onExit
|
|
|
61
56
|
}
|
|
62
57
|
};
|
|
63
58
|
const now = Date.now();
|
|
64
|
-
const [major, minor, patch] =
|
|
59
|
+
const [major, minor, patch] = VERSION.split('.').map(x => Number(x));
|
|
65
60
|
const runFirst = `
|
|
66
61
|
const uuidKey = 'pinwheel-uuid';
|
|
67
62
|
const localStorage = window.localStorage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinwheel/react-native-pinwheel",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pinwheel React Native SDK",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
-
"
|
|
13
|
+
"bump-pkg-version": "./scripts/bump-pkg-version.sh",
|
|
14
|
+
"dev": "./scripts/dev.sh"
|
|
14
15
|
},
|
|
15
16
|
"author": "Pinwheel",
|
|
16
17
|
"license": "MIT",
|
|
@@ -23,5 +24,9 @@
|
|
|
23
24
|
"@types/react-native": "^0.63.29",
|
|
24
25
|
"react-native-webview": "^11.0.0",
|
|
25
26
|
"typescript": "^4.0.3"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"hermes-engine": "^0.11.0",
|
|
30
|
+
"shell-quote": "^1.7.4"
|
|
26
31
|
}
|
|
27
32
|
}
|