expo-iap 3.0.2-rc.1 → 3.0.2
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/CHANGELOG.md +6 -1
- package/README.md +4 -6
- package/build/useIAP.d.ts.map +1 -1
- package/build/useIAP.js +12 -0
- package/build/useIAP.js.map +1 -1
- package/bun.lock +340 -137
- package/ios/ExpoIapModule.swift +24 -11
- package/package.json +1 -1
- package/plugin/src/withIAP.ts +5 -1
- package/plugin/src/withLocalOpenIAP.ts +3 -1
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/src/useIAP.ts +14 -0
- package/coverage/clover.xml +0 -358
- package/coverage/coverage-final.json +0 -7
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -176
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/ExpoIap.types.ts.html +0 -1396
- package/coverage/lcov-report/src/helpers/index.html +0 -116
- package/coverage/lcov-report/src/helpers/subscription.ts.html +0 -532
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -1945
- package/coverage/lcov-report/src/modules/android.ts.html +0 -496
- package/coverage/lcov-report/src/modules/index.html +0 -131
- package/coverage/lcov-report/src/modules/ios.ts.html +0 -1012
- package/coverage/lcov-report/src/types/ExpoIapAndroid.types.ts.html +0 -502
- package/coverage/lcov-report/src/types/index.html +0 -116
- package/coverage/lcov-report/src/useIAP.ts.html +0 -1654
- package/coverage/lcov-report/src/utils/constants.ts.html +0 -127
- package/coverage/lcov-report/src/utils/errorMapping.ts.html +0 -427
- package/coverage/lcov-report/src/utils/index.html +0 -116
- package/coverage/lcov.info +0 -685
- package/ios/expoiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/expoiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
package/ios/ExpoIapModule.swift
CHANGED
|
@@ -12,6 +12,19 @@ private func logDebug(_ message: String) {
|
|
|
12
12
|
#endif
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// MARK: - Swift helpers for optional dictionary compaction
|
|
16
|
+
private extension Sequence where Element == [String: Any?] {
|
|
17
|
+
func compactingValues() -> [[String: Any]] {
|
|
18
|
+
return self.map { $0.compactMapValues { $0 } }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private extension Dictionary where Key == String, Value == Any? {
|
|
23
|
+
func compactingValues() -> [String: Any] {
|
|
24
|
+
return self.compactMapValues { $0 }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
// Event names
|
|
16
29
|
struct OpenIapEvent {
|
|
17
30
|
static let PurchaseUpdated = "purchase-updated"
|
|
@@ -145,7 +158,7 @@ public class ExpoIapModule: Module {
|
|
|
145
158
|
logDebug("Product: \(product.id) - \(product.title) - \(product.displayPrice)")
|
|
146
159
|
}
|
|
147
160
|
// Ensure non-optional values for Expo bridge
|
|
148
|
-
return OpenIapSerialization.products(products).
|
|
161
|
+
return OpenIapSerialization.products(products).compactingValues()
|
|
149
162
|
}
|
|
150
163
|
|
|
151
164
|
// MARK: - Purchase Operations
|
|
@@ -233,7 +246,7 @@ public class ExpoIapModule: Module {
|
|
|
233
246
|
)
|
|
234
247
|
}
|
|
235
248
|
let purchases = try await OpenIapModule.shared.getAvailablePurchases(purchaseOptions)
|
|
236
|
-
return OpenIapSerialization.purchases(purchases).
|
|
249
|
+
return OpenIapSerialization.purchases(purchases).compactingValues()
|
|
237
250
|
}
|
|
238
251
|
|
|
239
252
|
// Legacy function for backward compatibility
|
|
@@ -246,7 +259,7 @@ public class ExpoIapModule: Module {
|
|
|
246
259
|
onlyIncludeActiveItemsIOS: onlyIncludeActiveItems
|
|
247
260
|
)
|
|
248
261
|
let purchases = try await OpenIapModule.shared.getAvailablePurchases(purchaseOptions)
|
|
249
|
-
return OpenIapSerialization.purchases(purchases).
|
|
262
|
+
return OpenIapSerialization.purchases(purchases).compactingValues()
|
|
250
263
|
}
|
|
251
264
|
|
|
252
265
|
AsyncFunction("getPendingTransactionsIOS") { () async throws -> [[String: Any]] in
|
|
@@ -254,7 +267,7 @@ public class ExpoIapModule: Module {
|
|
|
254
267
|
logDebug("getPendingTransactionsIOS called")
|
|
255
268
|
|
|
256
269
|
let pendingTransactions = try await OpenIapModule.shared.getPendingTransactionsIOS()
|
|
257
|
-
return OpenIapSerialization.purchases(pendingTransactions).
|
|
270
|
+
return OpenIapSerialization.purchases(pendingTransactions).compactingValues()
|
|
258
271
|
}
|
|
259
272
|
|
|
260
273
|
AsyncFunction("clearTransactionIOS") { () async throws -> Bool in
|
|
@@ -299,9 +312,9 @@ public class ExpoIapModule: Module {
|
|
|
299
312
|
"jwsRepresentation": result.jwsRepresentation,
|
|
300
313
|
// Populate unified purchaseToken for iOS as alias of JWS
|
|
301
314
|
"purchaseToken": result.jwsRepresentation,
|
|
302
|
-
"latestTransaction": result.latestTransaction.map { OpenIapSerialization.purchase($0).
|
|
315
|
+
"latestTransaction": result.latestTransaction.map { OpenIapSerialization.purchase($0).compactingValues() },
|
|
303
316
|
]
|
|
304
|
-
return dict.
|
|
317
|
+
return dict.compactingValues()
|
|
305
318
|
} catch {
|
|
306
319
|
throw OpenIapError.make(code: OpenIapError.E_RECEIPT_FAILED)
|
|
307
320
|
}
|
|
@@ -321,7 +334,7 @@ public class ExpoIapModule: Module {
|
|
|
321
334
|
logDebug("showManageSubscriptionsIOS called")
|
|
322
335
|
// OpenIAP 1.1.9 returns already-serialized dictionaries here.
|
|
323
336
|
let purchases = try await OpenIapModule.shared.showManageSubscriptionsIOS()
|
|
324
|
-
return purchases.
|
|
337
|
+
return purchases.compactingValues()
|
|
325
338
|
}
|
|
326
339
|
|
|
327
340
|
AsyncFunction("deepLinkToSubscriptionsIOS") { () async throws in
|
|
@@ -350,7 +363,7 @@ public class ExpoIapModule: Module {
|
|
|
350
363
|
// Fetch full product info by SKU to conform to OpenIapProduct
|
|
351
364
|
let request = OpenIapProductRequest(skus: [promoted.productIdentifier], type: .all)
|
|
352
365
|
let products = try await OpenIapModule.shared.fetchProducts(request)
|
|
353
|
-
let serialized = OpenIapSerialization.products(products).
|
|
366
|
+
let serialized = OpenIapSerialization.products(products).compactingValues()
|
|
354
367
|
return serialized.first
|
|
355
368
|
}
|
|
356
369
|
return nil
|
|
@@ -408,7 +421,7 @@ public class ExpoIapModule: Module {
|
|
|
408
421
|
dict["renewalInfo"] = renewalInfo
|
|
409
422
|
}
|
|
410
423
|
|
|
411
|
-
return dict.
|
|
424
|
+
return dict.compactingValues()
|
|
412
425
|
}
|
|
413
426
|
}
|
|
414
427
|
return nil
|
|
@@ -419,7 +432,7 @@ public class ExpoIapModule: Module {
|
|
|
419
432
|
logDebug("currentEntitlementIOS called for sku: \(sku)")
|
|
420
433
|
do {
|
|
421
434
|
if let entitlement = try await OpenIapModule.shared.currentEntitlementIOS(sku: sku) {
|
|
422
|
-
return OpenIapSerialization.purchase(entitlement).
|
|
435
|
+
return OpenIapSerialization.purchase(entitlement).compactingValues()
|
|
423
436
|
}
|
|
424
437
|
return nil
|
|
425
438
|
} catch {
|
|
@@ -432,7 +445,7 @@ public class ExpoIapModule: Module {
|
|
|
432
445
|
logDebug("latestTransactionIOS called for sku: \(sku)")
|
|
433
446
|
do {
|
|
434
447
|
if let transaction = try await OpenIapModule.shared.latestTransactionIOS(sku: sku) {
|
|
435
|
-
return OpenIapSerialization.purchase(transaction).
|
|
448
|
+
return OpenIapSerialization.purchase(transaction).compactingValues()
|
|
436
449
|
}
|
|
437
450
|
return nil
|
|
438
451
|
} catch {
|
package/package.json
CHANGED
package/plugin/src/withIAP.ts
CHANGED
|
@@ -66,7 +66,11 @@ const modifyAppBuildGradle = (
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// Ensure the desired dependency line is present
|
|
69
|
-
if (
|
|
69
|
+
if (
|
|
70
|
+
!new RegExp(
|
|
71
|
+
String.raw`io\.github\.hyochan\.openiap:openiap-google:1\.1\.0`,
|
|
72
|
+
).test(modified)
|
|
73
|
+
) {
|
|
70
74
|
// Insert just after the opening `dependencies {` line
|
|
71
75
|
modified = addLineToGradle(modified, /dependencies\s*{/, openiapDep, 1);
|
|
72
76
|
logOnce(
|
|
@@ -213,7 +213,9 @@ const withLocalOpenIAP: ConfigPlugin<{localPath?: LocalPathOption} | void> = (
|
|
|
213
213
|
}
|
|
214
214
|
if (removedAny) {
|
|
215
215
|
gradle.contents = contents;
|
|
216
|
-
console.log(
|
|
216
|
+
console.log(
|
|
217
|
+
'🧹 Removed Maven openiap-google to use local :openiap-google',
|
|
218
|
+
);
|
|
217
219
|
}
|
|
218
220
|
if (!gradle.contents.includes(dependencyLine)) {
|
|
219
221
|
const anchor = /dependencies\s*\{/m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/
|
|
1
|
+
{"root":["./src/withIAP.ts","./src/withLocalOpenIAP.ts"],"version":"5.9.2"}
|
package/src/useIAP.ts
CHANGED
|
@@ -42,6 +42,10 @@ import {
|
|
|
42
42
|
isRecoverableError,
|
|
43
43
|
} from './utils/errorMapping';
|
|
44
44
|
|
|
45
|
+
// Deduplicate purchase success events across re-mounts (dev StrictMode, nav returns)
|
|
46
|
+
// Keep minimal in-memory state; safe for subscriptions since renewals use new ids
|
|
47
|
+
const handledPurchaseIds = new Set<string>();
|
|
48
|
+
|
|
45
49
|
type UseIap = {
|
|
46
50
|
connected: boolean;
|
|
47
51
|
products: Product[];
|
|
@@ -355,6 +359,15 @@ export function useIAP(options?: UseIAPOptions): UseIap {
|
|
|
355
359
|
subscriptionsRef.current.purchaseUpdate = purchaseUpdatedListener(
|
|
356
360
|
async (purchase: Purchase) => {
|
|
357
361
|
console.log('[useIAP] Purchase success callback triggered:', purchase);
|
|
362
|
+
|
|
363
|
+
// Guard against duplicate emissions for the same transaction
|
|
364
|
+
const dedupeKey = purchase.id;
|
|
365
|
+
if (dedupeKey && handledPurchaseIds.has(dedupeKey)) {
|
|
366
|
+
console.log('[useIAP] Duplicate purchase event ignored:', dedupeKey);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (dedupeKey) handledPurchaseIds.add(dedupeKey);
|
|
370
|
+
|
|
358
371
|
setCurrentPurchaseError(undefined);
|
|
359
372
|
setCurrentPurchase(purchase);
|
|
360
373
|
|
|
@@ -440,6 +453,7 @@ export function useIAP(options?: UseIAPOptions): UseIap {
|
|
|
440
453
|
currentSubscriptions.promotedProductIOS?.remove();
|
|
441
454
|
endConnection();
|
|
442
455
|
setConnected(false);
|
|
456
|
+
handledPurchaseIds.clear();
|
|
443
457
|
};
|
|
444
458
|
}, [initIapWithSubscriptions]);
|
|
445
459
|
|
package/coverage/clover.xml
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="1757652051948" clover="3.2.0">
|
|
3
|
-
<project timestamp="1757652051948" name="All files">
|
|
4
|
-
<metrics statements="319" coveredstatements="186" conditionals="170" coveredconditionals="71" methods="71" coveredmethods="33" elements="560" coveredelements="290" complexity="0" loc="319" ncloc="319" packages="5" files="6" classes="6"/>
|
|
5
|
-
<package name="src">
|
|
6
|
-
<metrics statements="147" coveredstatements="37" conditionals="79" coveredconditionals="3" methods="36" coveredmethods="1"/>
|
|
7
|
-
<file name="index.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/index.ts">
|
|
8
|
-
<metrics statements="147" coveredstatements="37" conditionals="79" coveredconditionals="3" methods="36" coveredmethods="1"/>
|
|
9
|
-
<line num="2" count="1" type="stmt"/>
|
|
10
|
-
<line num="3" count="1" type="stmt"/>
|
|
11
|
-
<line num="6" count="1" type="stmt"/>
|
|
12
|
-
<line num="7" count="1" type="stmt"/>
|
|
13
|
-
<line num="13" count="1" type="stmt"/>
|
|
14
|
-
<line num="20" count="1" type="stmt"/>
|
|
15
|
-
<line num="35" count="1" type="stmt"/>
|
|
16
|
-
<line num="36" count="1" type="stmt"/>
|
|
17
|
-
<line num="37" count="1" type="stmt"/>
|
|
18
|
-
<line num="40" count="1" type="stmt"/>
|
|
19
|
-
<line num="41" count="1" type="stmt"/>
|
|
20
|
-
<line num="42" count="1" type="stmt"/>
|
|
21
|
-
<line num="47" count="1" type="stmt"/>
|
|
22
|
-
<line num="49" count="1" type="cond" truecount="2" falsecount="0"/>
|
|
23
|
-
<line num="50" count="1" type="stmt"/>
|
|
24
|
-
<line num="51" count="1" type="stmt"/>
|
|
25
|
-
<line num="52" count="1" type="stmt"/>
|
|
26
|
-
<line num="55" count="1" type="stmt"/>
|
|
27
|
-
<line num="56" count="0" type="stmt"/>
|
|
28
|
-
<line num="60" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
29
|
-
<line num="71" count="1" type="stmt"/>
|
|
30
|
-
<line num="74" count="0" type="stmt"/>
|
|
31
|
-
<line num="75" count="0" type="stmt"/>
|
|
32
|
-
<line num="76" count="0" type="stmt"/>
|
|
33
|
-
<line num="77" count="0" type="stmt"/>
|
|
34
|
-
<line num="79" count="0" type="stmt"/>
|
|
35
|
-
<line num="83" count="0" type="stmt"/>
|
|
36
|
-
<line num="84" count="0" type="stmt"/>
|
|
37
|
-
<line num="87" count="1" type="stmt"/>
|
|
38
|
-
<line num="90" count="0" type="stmt"/>
|
|
39
|
-
<line num="91" count="0" type="stmt"/>
|
|
40
|
-
<line num="92" count="0" type="stmt"/>
|
|
41
|
-
<line num="93" count="0" type="stmt"/>
|
|
42
|
-
<line num="95" count="0" type="stmt"/>
|
|
43
|
-
<line num="99" count="0" type="stmt"/>
|
|
44
|
-
<line num="100" count="0" type="stmt"/>
|
|
45
|
-
<line num="123" count="1" type="stmt"/>
|
|
46
|
-
<line num="126" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
47
|
-
<line num="127" count="0" type="stmt"/>
|
|
48
|
-
<line num="130" count="0" type="stmt"/>
|
|
49
|
-
<line num="132" count="0" type="stmt"/>
|
|
50
|
-
<line num="135" count="1" type="stmt"/>
|
|
51
|
-
<line num="136" count="0" type="stmt"/>
|
|
52
|
-
<line num="137" count="0" type="stmt"/>
|
|
53
|
-
<line num="141" count="1" type="stmt"/>
|
|
54
|
-
<line num="142" count="0" type="stmt"/>
|
|
55
|
-
<line num="167" count="1" type="stmt"/>
|
|
56
|
-
<line num="174" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
57
|
-
<line num="175" count="0" type="stmt"/>
|
|
58
|
-
<line num="181" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
59
|
-
<line num="182" count="0" type="stmt"/>
|
|
60
|
-
<line num="184" count="0" type="stmt"/>
|
|
61
|
-
<line num="185" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
62
|
-
<line num="186" count="0" type="stmt"/>
|
|
63
|
-
<line num="189" count="0" type="cond" truecount="0" falsecount="5"/>
|
|
64
|
-
<line num="194" count="0" type="stmt"/>
|
|
65
|
-
<line num="197" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
66
|
-
<line num="202" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
67
|
-
<line num="203" count="0" type="stmt"/>
|
|
68
|
-
<line num="204" count="0" type="stmt"/>
|
|
69
|
-
<line num="205" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
70
|
-
<line num="206" count="0" type="stmt"/>
|
|
71
|
-
<line num="215" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
72
|
-
<line num="220" count="0" type="stmt"/>
|
|
73
|
-
<line num="230" count="1" type="cond" truecount="0" falsecount="1"/>
|
|
74
|
-
<line num="243" count="0" type="stmt"/>
|
|
75
|
-
<line num="246" count="0" type="stmt"/>
|
|
76
|
-
<line num="250" count="0" type="stmt"/>
|
|
77
|
-
<line num="251" count="0" type="stmt"/>
|
|
78
|
-
<line num="267" count="1" type="stmt"/>
|
|
79
|
-
<line num="273" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
80
|
-
<line num="275" count="0" type="stmt"/>
|
|
81
|
-
<line num="279" count="0" type="stmt"/>
|
|
82
|
-
<line num="285" count="0" type="stmt"/>
|
|
83
|
-
<line num="288" count="1" type="stmt"/>
|
|
84
|
-
<line num="291" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
85
|
-
<line num="292" count="0" type="stmt"/>
|
|
86
|
-
<line num="315" count="1" type="stmt"/>
|
|
87
|
-
<line num="320" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
88
|
-
<line num="354" count="1" type="stmt"/>
|
|
89
|
-
<line num="357" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
90
|
-
<line num="359" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
91
|
-
<line num="360" count="0" type="stmt"/>
|
|
92
|
-
<line num="362" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
93
|
-
<line num="363" count="0" type="stmt"/>
|
|
94
|
-
<line num="374" count="0" type="stmt"/>
|
|
95
|
-
<line num="376" count="0" type="stmt"/>
|
|
96
|
-
<line num="377" count="0" type="stmt"/>
|
|
97
|
-
<line num="378" count="0" type="stmt"/>
|
|
98
|
-
<line num="386" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
99
|
-
<line num="390" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
100
|
-
<line num="391" count="0" type="stmt"/>
|
|
101
|
-
<line num="393" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
102
|
-
<line num="394" count="0" type="stmt"/>
|
|
103
|
-
<line num="399" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
104
|
-
<line num="405" count="0" type="stmt"/>
|
|
105
|
-
<line num="407" count="0" type="stmt"/>
|
|
106
|
-
<line num="408" count="0" type="stmt"/>
|
|
107
|
-
<line num="421" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
108
|
-
<line num="430" count="0" type="stmt"/>
|
|
109
|
-
<line num="432" count="0" type="stmt"/>
|
|
110
|
-
<line num="433" count="0" type="stmt"/>
|
|
111
|
-
<line num="440" count="0" type="stmt"/>
|
|
112
|
-
<line num="446" count="0" type="stmt"/>
|
|
113
|
-
<line num="451" count="0" type="stmt"/>
|
|
114
|
-
<line num="455" count="1" type="stmt"/>
|
|
115
|
-
<line num="462" count="0" type="stmt"/>
|
|
116
|
-
<line num="465" count="0" type="stmt"/>
|
|
117
|
-
<line num="466" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
118
|
-
<line num="467" count="0" type="stmt"/>
|
|
119
|
-
<line num="471" count="0" type="stmt"/>
|
|
120
|
-
<line num="472" count="0" type="stmt"/>
|
|
121
|
-
<line num="475" count="0" type="stmt"/>
|
|
122
|
-
<line num="478" count="0" type="stmt"/>
|
|
123
|
-
<line num="480" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
124
|
-
<line num="481" count="0" type="stmt"/>
|
|
125
|
-
<line num="491" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
126
|
-
<line num="492" count="0" type="stmt"/>
|
|
127
|
-
<line num="495" count="0" type="stmt"/>
|
|
128
|
-
<line num="497" count="0" type="stmt"/>
|
|
129
|
-
<line num="515" count="1" type="stmt"/>
|
|
130
|
-
<line num="516" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
131
|
-
<line num="517" count="0" type="stmt"/>
|
|
132
|
-
<line num="518" count="0" type="stmt"/>
|
|
133
|
-
<line num="520" count="0" type="stmt"/>
|
|
134
|
-
<line num="530" count="1" type="stmt"/>
|
|
135
|
-
<line num="532" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
136
|
-
<line num="533" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
137
|
-
<line num="534" count="0" type="stmt"/>
|
|
138
|
-
<line num="536" count="0" type="stmt"/>
|
|
139
|
-
<line num="538" count="0" type="stmt"/>
|
|
140
|
-
<line num="549" count="1" type="stmt"/>
|
|
141
|
-
<line num="558" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
142
|
-
<line num="559" count="0" type="stmt"/>
|
|
143
|
-
<line num="560" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
144
|
-
<line num="561" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
145
|
-
<line num="567" count="0" type="stmt"/>
|
|
146
|
-
<line num="571" count="0" type="stmt"/>
|
|
147
|
-
<line num="579" count="0" type="stmt"/>
|
|
148
|
-
<line num="601" count="1" type="stmt"/>
|
|
149
|
-
<line num="605" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
150
|
-
<line num="606" count="0" type="stmt"/>
|
|
151
|
-
<line num="609" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
152
|
-
<line num="610" count="0" type="stmt"/>
|
|
153
|
-
<line num="616" count="0" type="stmt"/>
|
|
154
|
-
<line num="619" count="1" type="stmt"/>
|
|
155
|
-
<line num="620" count="1" type="stmt"/>
|
|
156
|
-
</file>
|
|
157
|
-
</package>
|
|
158
|
-
<package name="src.helpers">
|
|
159
|
-
<metrics statements="53" coveredstatements="52" conditionals="38" coveredconditionals="35" methods="4" coveredmethods="4"/>
|
|
160
|
-
<file name="subscription.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/helpers/subscription.ts">
|
|
161
|
-
<metrics statements="53" coveredstatements="52" conditionals="38" coveredconditionals="35" methods="4" coveredmethods="4"/>
|
|
162
|
-
<line num="1" count="2" type="stmt"/>
|
|
163
|
-
<line num="2" count="2" type="stmt"/>
|
|
164
|
-
<line num="22" count="2" type="stmt"/>
|
|
165
|
-
<line num="25" count="18" type="stmt"/>
|
|
166
|
-
<line num="26" count="18" type="stmt"/>
|
|
167
|
-
<line num="27" count="17" type="stmt"/>
|
|
168
|
-
<line num="28" count="17" type="stmt"/>
|
|
169
|
-
<line num="31" count="17" type="stmt"/>
|
|
170
|
-
<line num="33" count="18" type="cond" truecount="3" falsecount="0"/>
|
|
171
|
-
<line num="34" count="6" type="cond" truecount="1" falsecount="0"/>
|
|
172
|
-
<line num="35" count="3" type="stmt"/>
|
|
173
|
-
<line num="41" count="15" type="cond" truecount="5" falsecount="0"/>
|
|
174
|
-
<line num="45" count="15" type="cond" truecount="1" falsecount="0"/>
|
|
175
|
-
<line num="46" count="1" type="stmt"/>
|
|
176
|
-
<line num="50" count="14" type="cond" truecount="2" falsecount="0"/>
|
|
177
|
-
<line num="51" count="11" type="cond" truecount="3" falsecount="0"/>
|
|
178
|
-
<line num="52" count="10" type="stmt"/>
|
|
179
|
-
<line num="56" count="1" type="cond" truecount="3" falsecount="0"/>
|
|
180
|
-
<line num="57" count="1" type="stmt"/>
|
|
181
|
-
<line num="59" count="1" type="cond" truecount="1" falsecount="0"/>
|
|
182
|
-
<line num="63" count="1" type="cond" truecount="1" falsecount="0"/>
|
|
183
|
-
<line num="68" count="1" type="stmt"/>
|
|
184
|
-
<line num="72" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
185
|
-
<line num="74" count="3" type="stmt"/>
|
|
186
|
-
<line num="77" count="0" type="stmt"/>
|
|
187
|
-
<line num="81" count="17" type="stmt"/>
|
|
188
|
-
<line num="82" count="17" type="stmt"/>
|
|
189
|
-
<line num="83" count="13" type="stmt"/>
|
|
190
|
-
<line num="88" count="13" type="cond" truecount="0" falsecount="1"/>
|
|
191
|
-
<line num="89" count="13" type="stmt"/>
|
|
192
|
-
<line num="90" count="13" type="stmt"/>
|
|
193
|
-
<line num="94" count="17" type="stmt"/>
|
|
194
|
-
<line num="95" count="13" type="stmt"/>
|
|
195
|
-
<line num="105" count="13" type="cond" truecount="2" falsecount="0"/>
|
|
196
|
-
<line num="106" count="10" type="cond" truecount="3" falsecount="0"/>
|
|
197
|
-
<line num="107" count="9" type="stmt"/>
|
|
198
|
-
<line num="108" count="9" type="stmt"/>
|
|
199
|
-
<line num="111" count="9" type="stmt"/>
|
|
200
|
-
<line num="114" count="9" type="stmt"/>
|
|
201
|
-
<line num="115" count="9" type="stmt"/>
|
|
202
|
-
<line num="118" count="10" type="cond" truecount="1" falsecount="0"/>
|
|
203
|
-
<line num="119" count="2" type="stmt"/>
|
|
204
|
-
<line num="121" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
205
|
-
<line num="122" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
206
|
-
<line num="123" count="3" type="stmt"/>
|
|
207
|
-
<line num="125" count="3" type="stmt"/>
|
|
208
|
-
<line num="129" count="13" type="stmt"/>
|
|
209
|
-
<line num="132" count="17" type="stmt"/>
|
|
210
|
-
<line num="134" count="1" type="stmt"/>
|
|
211
|
-
<line num="135" count="1" type="stmt"/>
|
|
212
|
-
<line num="144" count="2" type="stmt"/>
|
|
213
|
-
<line num="147" count="4" type="stmt"/>
|
|
214
|
-
<line num="148" count="4" type="stmt"/>
|
|
215
|
-
</file>
|
|
216
|
-
</package>
|
|
217
|
-
<package name="src.modules">
|
|
218
|
-
<metrics statements="64" coveredstatements="60" conditionals="15" coveredconditionals="13" methods="24" coveredmethods="21"/>
|
|
219
|
-
<file name="android.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/modules/android.ts">
|
|
220
|
-
<metrics statements="23" coveredstatements="21" conditionals="11" coveredconditionals="9" methods="5" coveredmethods="4"/>
|
|
221
|
-
<line num="2" count="2" type="stmt"/>
|
|
222
|
-
<line num="5" count="2" type="stmt"/>
|
|
223
|
-
<line num="11" count="2" type="stmt"/>
|
|
224
|
-
<line num="14" count="5" type="stmt"/>
|
|
225
|
-
<line num="37" count="2" type="stmt"/>
|
|
226
|
-
<line num="45" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
227
|
-
<line num="46" count="0" type="stmt"/>
|
|
228
|
-
<line num="53" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
229
|
-
<line num="54" count="1" type="stmt"/>
|
|
230
|
-
<line num="58" count="1" type="stmt"/>
|
|
231
|
-
<line num="61" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
232
|
-
<line num="62" count="1" type="stmt"/>
|
|
233
|
-
<line num="77" count="2" type="stmt"/>
|
|
234
|
-
<line num="90" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
235
|
-
<line num="93" count="2" type="stmt"/>
|
|
236
|
-
<line num="97" count="2" type="stmt"/>
|
|
237
|
-
<line num="105" count="2" type="cond" truecount="1" falsecount="0"/>
|
|
238
|
-
<line num="106" count="1" type="stmt"/>
|
|
239
|
-
<line num="111" count="1" type="stmt"/>
|
|
240
|
-
<line num="120" count="2" type="stmt"/>
|
|
241
|
-
<line num="125" count="1" type="stmt"/>
|
|
242
|
-
<line num="135" count="2" type="stmt"/>
|
|
243
|
-
<line num="136" count="0" type="stmt"/>
|
|
244
|
-
</file>
|
|
245
|
-
<file name="ios.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/modules/ios.ts">
|
|
246
|
-
<metrics statements="41" coveredstatements="39" conditionals="4" coveredconditionals="4" methods="19" coveredmethods="17"/>
|
|
247
|
-
<line num="5" count="1" type="stmt"/>
|
|
248
|
-
<line num="15" count="1" type="stmt"/>
|
|
249
|
-
<line num="39" count="1" type="stmt"/>
|
|
250
|
-
<line num="42" count="5" type="stmt"/>
|
|
251
|
-
<line num="60" count="1" type="stmt"/>
|
|
252
|
-
<line num="61" count="1" type="stmt"/>
|
|
253
|
-
<line num="73" count="1" type="stmt"/>
|
|
254
|
-
<line num="76" count="6" type="stmt"/>
|
|
255
|
-
<line num="88" count="1" type="stmt"/>
|
|
256
|
-
<line num="91" count="1" type="stmt"/>
|
|
257
|
-
<line num="103" count="1" type="stmt"/>
|
|
258
|
-
<line num="104" count="1" type="stmt"/>
|
|
259
|
-
<line num="116" count="1" type="stmt"/>
|
|
260
|
-
<line num="117" count="1" type="stmt"/>
|
|
261
|
-
<line num="130" count="1" type="stmt"/>
|
|
262
|
-
<line num="133" count="1" type="stmt"/>
|
|
263
|
-
<line num="145" count="1" type="stmt"/>
|
|
264
|
-
<line num="146" count="1" type="stmt"/>
|
|
265
|
-
<line num="159" count="1" type="stmt"/>
|
|
266
|
-
<line num="160" count="1" type="stmt"/>
|
|
267
|
-
<line num="173" count="1" type="stmt"/>
|
|
268
|
-
<line num="174" count="1" type="stmt"/>
|
|
269
|
-
<line num="187" count="1" type="stmt"/>
|
|
270
|
-
<line num="188" count="1" type="stmt"/>
|
|
271
|
-
<line num="206" count="1" type="stmt"/>
|
|
272
|
-
<line num="214" count="1" type="stmt"/>
|
|
273
|
-
<line num="215" count="1" type="stmt"/>
|
|
274
|
-
<line num="229" count="1" type="stmt"/>
|
|
275
|
-
<line num="230" count="1" type="stmt"/>
|
|
276
|
-
<line num="247" count="1" type="stmt"/>
|
|
277
|
-
<line num="248" count="2" type="stmt"/>
|
|
278
|
-
<line num="261" count="1" type="stmt"/>
|
|
279
|
-
<line num="262" count="1" type="stmt"/>
|
|
280
|
-
<line num="274" count="1" type="stmt"/>
|
|
281
|
-
<line num="275" count="1" type="stmt"/>
|
|
282
|
-
<line num="286" count="1" type="stmt"/>
|
|
283
|
-
<line num="287" count="0" type="stmt"/>
|
|
284
|
-
<line num="296" count="1" type="stmt"/>
|
|
285
|
-
<line num="297" count="0" type="stmt"/>
|
|
286
|
-
<line num="306" count="1" type="stmt"/>
|
|
287
|
-
<line num="307" count="1" type="stmt"/>
|
|
288
|
-
</file>
|
|
289
|
-
</package>
|
|
290
|
-
<package name="src.types">
|
|
291
|
-
<metrics statements="17" coveredstatements="17" conditionals="6" coveredconditionals="6" methods="3" coveredmethods="3"/>
|
|
292
|
-
<file name="ExpoIapAndroid.types.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/types/ExpoIapAndroid.types.ts">
|
|
293
|
-
<metrics statements="17" coveredstatements="17" conditionals="6" coveredconditionals="6" methods="3" coveredmethods="3"/>
|
|
294
|
-
<line num="60" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
295
|
-
<line num="61" count="2" type="stmt"/>
|
|
296
|
-
<line num="62" count="2" type="stmt"/>
|
|
297
|
-
<line num="63" count="2" type="stmt"/>
|
|
298
|
-
<line num="64" count="2" type="stmt"/>
|
|
299
|
-
<line num="65" count="2" type="stmt"/>
|
|
300
|
-
<line num="66" count="2" type="stmt"/>
|
|
301
|
-
<line num="100" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
302
|
-
<line num="102" count="2" type="stmt"/>
|
|
303
|
-
<line num="104" count="2" type="stmt"/>
|
|
304
|
-
<line num="106" count="2" type="stmt"/>
|
|
305
|
-
<line num="108" count="2" type="stmt"/>
|
|
306
|
-
<line num="110" count="2" type="stmt"/>
|
|
307
|
-
<line num="113" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
308
|
-
<line num="114" count="2" type="stmt"/>
|
|
309
|
-
<line num="115" count="2" type="stmt"/>
|
|
310
|
-
<line num="116" count="2" type="stmt"/>
|
|
311
|
-
</file>
|
|
312
|
-
</package>
|
|
313
|
-
<package name="src.utils">
|
|
314
|
-
<metrics statements="38" coveredstatements="20" conditionals="32" coveredconditionals="14" methods="4" coveredmethods="4"/>
|
|
315
|
-
<file name="errorMapping.ts" path="/Users/crossplatformkorea/Github/hyochan/expo-iap/src/utils/errorMapping.ts">
|
|
316
|
-
<metrics statements="38" coveredstatements="20" conditionals="32" coveredconditionals="14" methods="4" coveredmethods="4"/>
|
|
317
|
-
<line num="6" count="2" type="stmt"/>
|
|
318
|
-
<line num="13" count="2" type="stmt"/>
|
|
319
|
-
<line num="14" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
320
|
-
<line num="15" count="2" type="stmt"/>
|
|
321
|
-
<line num="18" count="1" type="cond" truecount="3" falsecount="0"/>
|
|
322
|
-
<line num="19" count="1" type="stmt"/>
|
|
323
|
-
<line num="22" count="0" type="stmt"/>
|
|
324
|
-
<line num="30" count="2" type="stmt"/>
|
|
325
|
-
<line num="31" count="3" type="stmt"/>
|
|
326
|
-
<line num="39" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
327
|
-
<line num="40" count="3" type="stmt"/>
|
|
328
|
-
<line num="48" count="2" type="stmt"/>
|
|
329
|
-
<line num="49" count="3" type="stmt"/>
|
|
330
|
-
<line num="60" count="3" type="cond" truecount="2" falsecount="0"/>
|
|
331
|
-
<line num="61" count="3" type="stmt"/>
|
|
332
|
-
<line num="69" count="2" type="stmt"/>
|
|
333
|
-
<line num="70" count="3" type="cond" truecount="1" falsecount="1"/>
|
|
334
|
-
<line num="72" count="3" type="cond" truecount="3" falsecount="17"/>
|
|
335
|
-
<line num="74" count="1" type="stmt"/>
|
|
336
|
-
<line num="76" count="0" type="stmt"/>
|
|
337
|
-
<line num="78" count="0" type="stmt"/>
|
|
338
|
-
<line num="80" count="0" type="stmt"/>
|
|
339
|
-
<line num="82" count="0" type="stmt"/>
|
|
340
|
-
<line num="84" count="0" type="stmt"/>
|
|
341
|
-
<line num="86" count="0" type="stmt"/>
|
|
342
|
-
<line num="88" count="0" type="stmt"/>
|
|
343
|
-
<line num="90" count="0" type="stmt"/>
|
|
344
|
-
<line num="92" count="0" type="stmt"/>
|
|
345
|
-
<line num="94" count="0" type="stmt"/>
|
|
346
|
-
<line num="96" count="0" type="stmt"/>
|
|
347
|
-
<line num="98" count="0" type="stmt"/>
|
|
348
|
-
<line num="100" count="0" type="stmt"/>
|
|
349
|
-
<line num="102" count="0" type="stmt"/>
|
|
350
|
-
<line num="104" count="0" type="stmt"/>
|
|
351
|
-
<line num="106" count="1" type="stmt"/>
|
|
352
|
-
<line num="108" count="0" type="stmt"/>
|
|
353
|
-
<line num="110" count="0" type="stmt"/>
|
|
354
|
-
<line num="112" count="1" type="cond" truecount="2" falsecount="0"/>
|
|
355
|
-
</file>
|
|
356
|
-
</package>
|
|
357
|
-
</project>
|
|
358
|
-
</coverage>
|