@entitlehub/react-native 0.1.2 → 0.1.3
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +23 -8
package/dist/index.cjs
CHANGED
|
@@ -143,7 +143,7 @@ function addCustomerInfoUpdateListener(fn) {
|
|
|
143
143
|
return eh().addCustomerInfoUpdateListener(fn);
|
|
144
144
|
}
|
|
145
145
|
async function reportToEntitleHub(purchase, productId, isSubscription) {
|
|
146
|
-
const jws = purchase?.jwsRepresentation ?? purchase?.jwsRepresentationIos;
|
|
146
|
+
const jws = purchase?.jwsRepresentation ?? purchase?.jwsRepresentationIos ?? (String(purchase?.platform).toLowerCase() === "ios" ? purchase?.purchaseToken : void 0);
|
|
147
147
|
if (jws) return eh().reportPurchase({ signedTransaction: jws });
|
|
148
148
|
const token = purchase?.purchaseTokenAndroid ?? purchase?.purchaseToken;
|
|
149
149
|
if (token) {
|
package/dist/index.js
CHANGED
|
@@ -118,7 +118,7 @@ function addCustomerInfoUpdateListener(fn) {
|
|
|
118
118
|
return eh().addCustomerInfoUpdateListener(fn);
|
|
119
119
|
}
|
|
120
120
|
async function reportToEntitleHub(purchase, productId, isSubscription) {
|
|
121
|
-
const jws = purchase?.jwsRepresentation ?? purchase?.jwsRepresentationIos;
|
|
121
|
+
const jws = purchase?.jwsRepresentation ?? purchase?.jwsRepresentationIos ?? (String(purchase?.platform).toLowerCase() === "ios" ? purchase?.purchaseToken : void 0);
|
|
122
122
|
if (jws) return eh().reportPurchase({ signedTransaction: jws });
|
|
123
123
|
const token = purchase?.purchaseTokenAndroid ?? purchase?.purchaseToken;
|
|
124
124
|
if (token) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entitlehub/react-native",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "EntitleHub for React Native & Expo
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "EntitleHub for React Native & Expo \u2014 one call to purchase and unlock entitlements. Wraps expo-iap for the native store sheet and validates receipts via EntitleHub.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"entitlehub",
|
|
7
7
|
"react-native",
|
|
@@ -14,10 +14,18 @@
|
|
|
14
14
|
"entitlements"
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://entitlehub.com/docs/purchases",
|
|
17
|
-
"repository": {
|
|
18
|
-
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/DanCue44/entitlehub-sdk.git",
|
|
20
|
+
"directory": "react-native"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/DanCue44/entitlehub-sdk/issues"
|
|
24
|
+
},
|
|
19
25
|
"license": "MIT",
|
|
20
|
-
"publishConfig": {
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
21
29
|
"type": "module",
|
|
22
30
|
"main": "./dist/index.cjs",
|
|
23
31
|
"module": "./dist/index.js",
|
|
@@ -29,14 +37,21 @@
|
|
|
29
37
|
"require": "./dist/index.cjs"
|
|
30
38
|
}
|
|
31
39
|
},
|
|
32
|
-
"files": [
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"README.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
33
46
|
"sideEffects": false,
|
|
34
47
|
"scripts": {
|
|
35
48
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
36
49
|
"typecheck": "tsc --noEmit",
|
|
37
50
|
"prepublishOnly": "npm run build"
|
|
38
51
|
},
|
|
39
|
-
"engines": {
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18"
|
|
54
|
+
},
|
|
40
55
|
"peerDependencies": {
|
|
41
56
|
"@entitlehub/sdk": ">=0.2.0",
|
|
42
57
|
"expo-iap": "*",
|
|
@@ -47,4 +62,4 @@
|
|
|
47
62
|
"tsup": "^8.0.0",
|
|
48
63
|
"typescript": "^5.9.3"
|
|
49
64
|
}
|
|
50
|
-
}
|
|
65
|
+
}
|