@better-auth/stripe 1.2.3 → 1.2.4-beta.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.
@@ -1,17 +1,17 @@
1
1
 
2
- > @better-auth/stripe@1.2.3 build /home/runner/work/better-auth/better-auth/packages/stripe
2
+ > @better-auth/stripe@1.2.4-beta.2 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: 30.6 kB, chunk size: 30.6 kB, exports: stripe)
8
+ [log] dist/index.cjs (total size: 30.7 kB, chunk size: 30.7 kB, exports: stripe)
9
9
 
10
10
  [log] dist/client.cjs (total size: 160 B, chunk size: 160 B, exports: stripeClient)
11
11
 
12
- [log] dist/index.mjs (total size: 30.3 kB, chunk size: 30.3 kB, exports: stripe)
12
+ [log] dist/index.mjs (total size: 30.5 kB, chunk size: 30.5 kB, exports: stripe)
13
13
 
14
14
  [log] dist/client.mjs (total size: 133 B, chunk size: 133 B, exports: stripeClient)
15
15
 
16
- Σ Total dist size (byte size): 170 kB
16
+ Σ Total dist size (byte size): 171 kB
17
17
  [log]
package/dist/index.cjs CHANGED
@@ -797,8 +797,12 @@ const stripe = (options) => {
797
797
  status: stripeSubscription.status,
798
798
  seats: stripeSubscription.items.data[0]?.quantity || 1,
799
799
  plan: plan.name.toLowerCase(),
800
- periodEnd: stripeSubscription.current_period_end,
801
- periodStart: stripeSubscription.current_period_start,
800
+ periodEnd: new Date(
801
+ stripeSubscription.current_period_end * 1e3
802
+ ),
803
+ periodStart: new Date(
804
+ stripeSubscription.current_period_start * 1e3
805
+ ),
802
806
  stripeSubscriptionId: stripeSubscription.id
803
807
  },
804
808
  where: [
package/dist/index.mjs CHANGED
@@ -795,8 +795,12 @@ const stripe = (options) => {
795
795
  status: stripeSubscription.status,
796
796
  seats: stripeSubscription.items.data[0]?.quantity || 1,
797
797
  plan: plan.name.toLowerCase(),
798
- periodEnd: stripeSubscription.current_period_end,
799
- periodStart: stripeSubscription.current_period_start,
798
+ periodEnd: new Date(
799
+ stripeSubscription.current_period_end * 1e3
800
+ ),
801
+ periodStart: new Date(
802
+ stripeSubscription.current_period_start * 1e3
803
+ ),
800
804
  stripeSubscriptionId: stripeSubscription.id
801
805
  },
802
806
  where: [
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.3",
4
+ "version": "1.2.4-beta.2",
5
5
  "main": "dist/index.cjs",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "zod": "^3.24.1",
38
- "better-auth": "^1.2.3"
38
+ "better-auth": "^1.2.4-beta.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/better-sqlite3": "^7.6.12",
package/src/index.ts CHANGED
@@ -642,8 +642,12 @@ export const stripe = <O extends StripeOptions>(options: O) => {
642
642
  status: stripeSubscription.status,
643
643
  seats: stripeSubscription.items.data[0]?.quantity || 1,
644
644
  plan: plan.name.toLowerCase(),
645
- periodEnd: stripeSubscription.current_period_end,
646
- periodStart: stripeSubscription.current_period_start,
645
+ periodEnd: new Date(
646
+ stripeSubscription.current_period_end * 1000,
647
+ ),
648
+ periodStart: new Date(
649
+ stripeSubscription.current_period_start * 1000,
650
+ ),
647
651
  stripeSubscriptionId: stripeSubscription.id,
648
652
  },
649
653
  where: [