@revenuecat/purchases-js 1.18.4 → 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 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
- npm install
47
- npm run build:dev
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 `npm run build:dev` or `npm run build`.
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
- npm run storybook
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
- npm run test
95
+ pnpm run test
96
96
  ```
97
97
 
98
98
  ## Running linters
99
99
 
100
100
  ```bash
101
- npm run test:typecheck
102
- npm run svelte-check
103
- npm run prettier
104
- npm run lint
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
- npm run extract-api
114
+ pnpm run extract-api
115
115
  ```
116
116
 
117
117
  This will update the files in `api-report` with the latest public API.
@@ -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}.