@better-auth/stripe 1.2.6 → 1.2.7
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/.turbo/turbo-build.log +6 -6
- package/dist/client.cjs +4 -1
- package/dist/client.d.cts +3 -0
- package/dist/client.d.mts +3 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.mjs +4 -1
- package/dist/index.cjs +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +3 -3
- package/src/client.ts +3 -0
- package/src/index.ts +6 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/stripe@1.2.
|
|
2
|
+
> @better-auth/stripe@1.2.7 build /home/runner/work/better-auth/better-auth/packages/stripe
|
|
3
3
|
> unbuild
|
|
4
4
|
|
|
5
5
|
[info] Automatically detected entries: src/index, src/client [esm] [cjs] [dts]
|
|
6
6
|
[info] Building stripe
|
|
7
7
|
[success] Build succeeded for stripe
|
|
8
|
-
[log] dist/index.cjs (total size:
|
|
8
|
+
[log] dist/index.cjs (total size: 37 kB, chunk size: 37 kB, exports: stripe)
|
|
9
9
|
|
|
10
|
-
[log] dist/client.cjs (total size:
|
|
10
|
+
[log] dist/client.cjs (total size: 224 B, chunk size: 224 B, exports: stripeClient)
|
|
11
11
|
|
|
12
|
-
[log] dist/index.mjs (total size: 36.
|
|
12
|
+
[log] dist/index.mjs (total size: 36.7 kB, chunk size: 36.7 kB, exports: stripe)
|
|
13
13
|
|
|
14
|
-
[log] dist/client.mjs (total size:
|
|
14
|
+
[log] dist/client.mjs (total size: 197 B, chunk size: 197 B, exports: stripeClient)
|
|
15
15
|
|
|
16
|
-
Σ Total dist size (byte size):
|
|
16
|
+
Σ Total dist size (byte size): 200 kB
|
|
17
17
|
[log]
|
package/dist/client.cjs
CHANGED
package/dist/client.d.cts
CHANGED
package/dist/client.d.mts
CHANGED
package/dist/client.d.ts
CHANGED
package/dist/client.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -817,9 +817,12 @@ const stripe = (options) => {
|
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
819
|
const activeSubscription = await client.subscriptions.list({
|
|
820
|
-
customer: subscription.stripeCustomerId
|
|
821
|
-
|
|
822
|
-
|
|
820
|
+
customer: subscription.stripeCustomerId
|
|
821
|
+
}).then(
|
|
822
|
+
(res) => res.data.filter(
|
|
823
|
+
(sub) => sub.status === "active" || sub.status === "trialing"
|
|
824
|
+
)[0]
|
|
825
|
+
);
|
|
823
826
|
if (!activeSubscription) {
|
|
824
827
|
throw ctx.error("BAD_REQUEST", {
|
|
825
828
|
message: STRIPE_ERROR_CODES.SUBSCRIPTION_NOT_FOUND
|
package/dist/index.mjs
CHANGED
|
@@ -815,9 +815,12 @@ const stripe = (options) => {
|
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
817
|
const activeSubscription = await client.subscriptions.list({
|
|
818
|
-
customer: subscription.stripeCustomerId
|
|
819
|
-
|
|
820
|
-
|
|
818
|
+
customer: subscription.stripeCustomerId
|
|
819
|
+
}).then(
|
|
820
|
+
(res) => res.data.filter(
|
|
821
|
+
(sub) => sub.status === "active" || sub.status === "trialing"
|
|
822
|
+
)[0]
|
|
823
|
+
);
|
|
821
824
|
if (!activeSubscription) {
|
|
822
825
|
throw ctx.error("BAD_REQUEST", {
|
|
823
826
|
message: STRIPE_ERROR_CODES.SUBSCRIPTION_NOT_FOUND
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/stripe",
|
|
3
3
|
"author": "Bereket Engida",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.7",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"zod": "^3.24.1",
|
|
38
|
-
"better-auth": "^1.2.
|
|
38
|
+
"better-auth": "^1.2.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/better-sqlite3": "^7.6.12",
|
|
42
42
|
"better-sqlite3": "^11.6.0",
|
|
43
43
|
"vitest": "^1.6.0",
|
|
44
44
|
"stripe": "^17.7.0",
|
|
45
|
-
"better-call": "^1.0.
|
|
45
|
+
"better-call": "^1.0.8"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"test": "vitest",
|
package/src/client.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -681,9 +681,13 @@ export const stripe = <O extends StripeOptions>(options: O) => {
|
|
|
681
681
|
const activeSubscription = await client.subscriptions
|
|
682
682
|
.list({
|
|
683
683
|
customer: subscription.stripeCustomerId,
|
|
684
|
-
status: "active",
|
|
685
684
|
})
|
|
686
|
-
.then(
|
|
685
|
+
.then(
|
|
686
|
+
(res) =>
|
|
687
|
+
res.data.filter(
|
|
688
|
+
(sub) => sub.status === "active" || sub.status === "trialing",
|
|
689
|
+
)[0],
|
|
690
|
+
);
|
|
687
691
|
if (!activeSubscription) {
|
|
688
692
|
throw ctx.error("BAD_REQUEST", {
|
|
689
693
|
message: STRIPE_ERROR_CODES.SUBSCRIPTION_NOT_FOUND,
|