@better-auth/stripe 1.4.4 → 1.4.5

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,8 +1,8 @@
1
1
 
2
- > @better-auth/stripe@1.4.4 build /home/runner/work/better-auth/better-auth/packages/stripe
2
+ > @better-auth/stripe@1.4.5 build /home/runner/work/better-auth/better-auth/packages/stripe
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.16.5 powered by rolldown v1.0.0-beta.50
5
+ ℹ tsdown v0.16.6 powered by rolldown v1.0.0-beta.51
6
6
  ℹ Using tsdown config: /home/runner/work/better-auth/better-auth/packages/stripe/tsdown.config.ts
7
7
  ℹ entry: src/index.ts, src/client.ts
8
8
  ℹ tsconfig: tsconfig.json
@@ -10,7 +10,7 @@
10
10
  ℹ dist/index.mjs 37.60 kB │ gzip: 7.24 kB
11
11
  ℹ dist/client.mjs  0.26 kB │ gzip: 0.20 kB
12
12
  ℹ dist/client.d.mts  0.62 kB │ gzip: 0.35 kB
13
- ℹ dist/index.d.mts  0.17 kB │ gzip: 0.13 kB
14
- ℹ dist/index-aXzLoFtK.d.mts 26.02 kB │ gzip: 5.01 kB
15
- ℹ 5 files, total: 64.67 kB
16
- ✔ Build complete in 12463ms
13
+ ℹ dist/index.d.mts  0.21 kB │ gzip: 0.14 kB
14
+ ℹ dist/index-DWLbLcL6.d.mts 26.10 kB │ gzip: 5.04 kB
15
+ ℹ 5 files, total: 64.79 kB
16
+ ✔ Build complete in 11730ms
package/CHANGELOG.md CHANGED
@@ -16,7 +16,7 @@
16
16
  - Bug Fixes
17
17
  - Fixed date handling by casting DB values to Date objects before using date methods.
18
18
  - Fixed Notion OAuth to extract user info correctly.
19
- - Ensured session is set in context when reading from cookie cach
19
+ - Ensured session is set in context when reading from cookie cache
20
20
 
21
21
  - Updated dependencies [2bd2fa9]
22
22
  - better-auth@1.3.4
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as stripe } from "./index-aXzLoFtK.mjs";
1
+ import { n as stripe } from "./index-DWLbLcL6.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  declare const stripeClient: <O extends {
@@ -707,7 +707,11 @@ declare const stripe: <O extends StripeOptions>(options: O) => {
707
707
  }, {
708
708
  status: ("NOT_FOUND" | "FOUND" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call0.Status;
709
709
  body: ({
710
- message?: string;
710
+ message?
711
+ /**
712
+ * Return URL
713
+ */
714
+ : string;
711
715
  code?: string;
712
716
  cause?: unknown;
713
717
  } & Record<string, any>) | undefined;
@@ -804,4 +808,4 @@ declare const stripe: <O extends StripeOptions>(options: O) => {
804
808
  };
805
809
  type StripePlugin<O extends StripeOptions> = ReturnType<typeof stripe<O>>;
806
810
  //#endregion
807
- export { Subscription as i, stripe as n, StripePlan as r, StripePlugin as t };
811
+ export { SubscriptionOptions as a, Subscription as i, stripe as n, StripePlan as r, StripePlugin as t };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as Subscription, n as stripe, r as StripePlan, t as StripePlugin } from "./index-aXzLoFtK.mjs";
2
- export { StripePlan, StripePlugin, Subscription, stripe };
1
+ import { a as SubscriptionOptions, i as Subscription, n as stripe, r as StripePlan, t as StripePlugin } from "./index-DWLbLcL6.mjs";
2
+ export { StripePlan, StripePlugin, Subscription, SubscriptionOptions, stripe };
package/dist/index.mjs CHANGED
@@ -630,7 +630,7 @@ const stripe = (options) => {
630
630
  }).catch(async (e) => {
631
631
  if (e.message.includes("already set to be cancel")) {
632
632
  /**
633
- * incase we missed the event from stripe, we set it manually
633
+ * in case we missed the event from stripe, we set it manually
634
634
  * this is a rare case and should not happen
635
635
  */
636
636
  if (!subscription.cancelAtPeriodEnd) await ctx.context.adapter.updateMany({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@better-auth/stripe",
3
3
  "author": "Bereket Engida",
4
- "version": "1.4.4",
4
+ "version": "1.4.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
7
7
  "license": "MIT",
@@ -49,18 +49,19 @@
49
49
  },
50
50
  "peerDependencies": {
51
51
  "stripe": "^18 || ^19 || ^20",
52
- "@better-auth/core": "1.4.4",
53
- "better-auth": "1.4.4"
52
+ "@better-auth/core": "1.4.5",
53
+ "better-auth": "1.4.5"
54
54
  },
55
55
  "devDependencies": {
56
- "better-call": "1.1.3",
56
+ "better-call": "1.1.4",
57
57
  "stripe": "^20.0.0",
58
58
  "tsdown": "^0.16.0",
59
- "better-auth": "1.4.4",
60
- "@better-auth/core": "1.4.4"
59
+ "better-auth": "1.4.5",
60
+ "@better-auth/core": "1.4.5"
61
61
  },
62
62
  "scripts": {
63
63
  "test": "vitest",
64
+ "lint:package": "publint run --strict",
64
65
  "build": "tsdown",
65
66
  "dev": "tsdown --watch",
66
67
  "typecheck": "tsc --project tsconfig.json"
package/src/index.ts CHANGED
@@ -854,7 +854,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
854
854
  .catch(async (e) => {
855
855
  if (e.message.includes("already set to be cancel")) {
856
856
  /**
857
- * incase we missed the event from stripe, we set it manually
857
+ * in case we missed the event from stripe, we set it manually
858
858
  * this is a rare case and should not happen
859
859
  */
860
860
  if (!subscription.cancelAtPeriodEnd) {
@@ -1509,4 +1509,4 @@ export type StripePlugin<O extends StripeOptions> = ReturnType<
1509
1509
  typeof stripe<O>
1510
1510
  >;
1511
1511
 
1512
- export type { Subscription, StripePlan };
1512
+ export type { Subscription, SubscriptionOptions, StripePlan };
@@ -1156,6 +1156,7 @@ describe("stripe", async () => {
1156
1156
  });
1157
1157
 
1158
1158
  it("should not update personal subscription when upgrading with an org referenceId", async () => {
1159
+ /* cspell:disable-next-line */
1159
1160
  const orgId = "org_b67GF32Cljh7u588AuEblmLVobclDRcP";
1160
1161
 
1161
1162
  const testOptions = {