@revenuecat/purchases-js 0.0.2 → 0.0.4
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/.eslintrc.cjs +1 -0
- package/.prettierignore +2 -0
- package/CHANGELOG +27 -0
- package/README.md +1 -0
- package/dist/entities/offerings.d.ts +1 -3
- package/package.json +6 -6
- package/revenuecat-purchases-js-0.0.4.tgz +0 -0
- package/test.html +28 -24
- package/tsconfig.json +1 -1
- package/revenuecat-purchases-js-0.0.2.tgz +0 -0
package/.eslintrc.cjs
CHANGED
package/.prettierignore
ADDED
package/CHANGELOG
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# 0.0.4
|
|
2
|
+
|
|
3
|
+
- Fix bug in 0.0.3 that didn't include the dist/ folder in the NPM package
|
|
4
|
+
|
|
5
|
+
# 0.0.3
|
|
6
|
+
|
|
7
|
+
- Add prettier by @francocorreasosa in #13
|
|
8
|
+
- Bug: fix some types by @alfondotnet in #14
|
|
9
|
+
|
|
10
|
+
# 0.0.2
|
|
11
|
+
|
|
12
|
+
- Fix publishing to NPM by @alfondotnet in # 10
|
|
13
|
+
- BIL-40: Add subscribe method by @francocorreasosa in #11
|
|
14
|
+
- Only build ES modules by @alfondotnet in #12
|
|
15
|
+
|
|
16
|
+
# 0.0.1
|
|
17
|
+
|
|
18
|
+
Initial release 🐱🚀
|
|
19
|
+
|
|
20
|
+
- Add Vite by @alfondotnet in #1
|
|
21
|
+
- add README by @alfondotnet in #2
|
|
22
|
+
- Fon/add entrypoint by @alfondotnet in #3
|
|
23
|
+
- Simplify existing methods + MSW by @alfondotnet in #5
|
|
24
|
+
- Added the listOfferings method by @nicfix in #4
|
|
25
|
+
- Migrated to the new price naming by @nicfix in #6
|
|
26
|
+
- BIL-15: isEntitledTo method! by @nicfix in #7
|
|
27
|
+
- Rename / Clean up package prior to publishing to NPM by @alfondotnet in #9
|
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ npm test
|
|
|
30
30
|
# Publishing a new version
|
|
31
31
|
|
|
32
32
|
- Update the version in `package.json`
|
|
33
|
+
- Add a new entry in `CHANGELOG.md` including all the PR merged and crediting the authors
|
|
33
34
|
- Commit the changes in main
|
|
34
35
|
- Create a new tag with the version number and push:
|
|
35
36
|
|
|
@@ -6,6 +6,7 @@ export interface Price {
|
|
|
6
6
|
export interface Product {
|
|
7
7
|
id: string;
|
|
8
8
|
displayName: string;
|
|
9
|
+
identifier: string;
|
|
9
10
|
currentPrice: Price | null;
|
|
10
11
|
normalPeriodDuration: string | null;
|
|
11
12
|
}
|
|
@@ -19,9 +20,6 @@ export interface Offering {
|
|
|
19
20
|
id: string;
|
|
20
21
|
identifier: string;
|
|
21
22
|
displayName: string;
|
|
22
|
-
createdAt: Date;
|
|
23
|
-
isCurrent: boolean;
|
|
24
|
-
metadata: never;
|
|
25
23
|
packages: Package[];
|
|
26
24
|
}
|
|
27
25
|
export interface OfferingsPage {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-js",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
7
7
|
"main": "dist/purchases-js.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"preview": "vite preview",
|
|
14
14
|
"lint": "eslint . --ext .ts",
|
|
15
15
|
"format": "eslint . --ext .ts --fix",
|
|
16
|
-
"test": "vitest"
|
|
16
|
+
"test": "vitest",
|
|
17
|
+
"prettier": "prettier --write .",
|
|
18
|
+
"prettier:ci": "prettier --check ."
|
|
17
19
|
},
|
|
18
20
|
"devDependencies": {
|
|
19
21
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
@@ -26,12 +28,10 @@
|
|
|
26
28
|
"eslint-plugin-promise": "^6.1.1",
|
|
27
29
|
"jsdom": "^22.1.0",
|
|
28
30
|
"msw": "^2.0.4",
|
|
31
|
+
"prettier": "^3.1.0",
|
|
29
32
|
"typescript": "^5.2.2",
|
|
30
33
|
"vite": "^4.4.5",
|
|
34
|
+
"vite-plugin-dts": "^3.6.3",
|
|
31
35
|
"vitest": "^0.34.6"
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"prettier": "^3.0.3",
|
|
35
|
-
"vite-plugin-dts": "^3.6.3"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
Binary file
|
package/test.html
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8"
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>RCBilling Example</title>
|
|
7
7
|
<script src="./dist/rcbilling-js.iife.js"></script>
|
|
8
8
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/* Some basic styling for our Stripe form */
|
|
10
|
+
#payment-form {
|
|
11
|
+
width: 300px;
|
|
12
|
+
margin: 50px auto;
|
|
13
|
+
padding: 20px;
|
|
14
|
+
border: 1px solid #ddd;
|
|
15
|
+
border-radius: 5px;
|
|
16
|
+
}
|
|
17
17
|
</style>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="payment-form"></div>
|
|
20
21
|
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
<script>
|
|
23
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
24
|
+
var billing = new RCBilling(
|
|
25
|
+
"web_tFpmIVwEGKNprbMOyiRRzZAbzIHX",
|
|
26
|
+
"test_rcbilling",
|
|
27
|
+
);
|
|
26
28
|
|
|
27
29
|
setTimeout(() => {
|
|
28
|
-
|
|
30
|
+
billing.renderForm(
|
|
31
|
+
document.getElementById("payment-form"),
|
|
32
|
+
"monthly.product_1234",
|
|
33
|
+
);
|
|
29
34
|
}, 3000);
|
|
30
|
-
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
</body>
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
</body>
|
|
34
38
|
</html>
|
package/tsconfig.json
CHANGED
|
Binary file
|