@revenuecat/purchases-js 1.18.3 → 1.19.0
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 +10 -10
- package/dist/Purchases.es.d.ts +10 -0
- package/dist/Purchases.es.js +6593 -4945
- package/dist/Purchases.umd.js +59 -47
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -43,8 +43,8 @@ See the [RevenueCat docs](https://www.revenuecat.com/docs/web/web-billing) and t
|
|
|
43
43
|
- Build the library
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
pnpm install
|
|
47
|
+
pnpm run build:dev
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
To avoid publishing the package you can use Yarn's link feature:
|
|
@@ -61,12 +61,12 @@ yarn link
|
|
|
61
61
|
yarn link "@revenuecat/purchases-js"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
> **Note:** Any changes you make to the library will be automatically reflected in your testing project after running `
|
|
64
|
+
> **Note:** Any changes you make to the library will be automatically reflected in your testing project after running `pnpm run build:dev` or `pnpm run build`.
|
|
65
65
|
|
|
66
66
|
## Running Storybook
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
|
|
69
|
+
pnpm run storybook
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
### Environment Setup for Purchase Stories
|
|
@@ -92,16 +92,16 @@ VITE_STORYBOOK_ACCOUNT_ID="acct_1234567890"
|
|
|
92
92
|
## Running tests
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
|
|
95
|
+
pnpm run test
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
## Running linters
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
pnpm run test:typecheck
|
|
102
|
+
pnpm run svelte-check
|
|
103
|
+
pnpm run prettier
|
|
104
|
+
pnpm run lint
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
## Running E2E tests
|
|
@@ -111,7 +111,7 @@ Please check the Demo app readme [here](./examples/webbilling-demo/README.md#e2e
|
|
|
111
111
|
## Update API specs
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
|
|
114
|
+
pnpm run extract-api
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
This will update the files in `api-report` with the latest public API.
|
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -1020,6 +1020,16 @@ export declare class Purchases {
|
|
|
1020
1020
|
* @throws {@link PurchasesError} if there is an error while performing the purchase. If the {@link PurchasesError.errorCode} is {@link ErrorCode.UserCancelledError}, the user cancelled the purchase.
|
|
1021
1021
|
*/
|
|
1022
1022
|
purchase(params: PurchaseParams): Promise<PurchaseResult>;
|
|
1023
|
+
private performWebBillingPurchase;
|
|
1024
|
+
private performPaddlePurchase;
|
|
1025
|
+
/**
|
|
1026
|
+
* Uses htmlTarget if provided. Otherwise, looks for an element with id "rcb-ui-root".
|
|
1027
|
+
* If no element is found, creates a new div with className "rcb-ui-root".
|
|
1028
|
+
*/
|
|
1029
|
+
private resolveHTMLTarget;
|
|
1030
|
+
private createCheckoutOnCloseHandler;
|
|
1031
|
+
private createCheckoutOnFinishedHandler;
|
|
1032
|
+
private createCheckoutOnErrorHandler;
|
|
1023
1033
|
/**
|
|
1024
1034
|
* Gets latest available {@link CustomerInfo}.
|
|
1025
1035
|
* @returns The latest {@link CustomerInfo}.
|