@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +1 -1
- package/dist/client.d.mts +1 -1
- package/dist/{index-aXzLoFtK.d.mts → index-DWLbLcL6.d.mts} +6 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
- package/src/index.ts +2 -2
- package/src/stripe.test.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/stripe@1.4.
|
|
2
|
+
> @better-auth/stripe@1.4.5 build /home/runner/work/better-auth/better-auth/packages/stripe
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
|
-
[34mℹ[39m tsdown [2mv0.16.
|
|
5
|
+
[34mℹ[39m tsdown [2mv0.16.6[22m powered by rolldown [2mv1.0.0-beta.51[22m
|
|
6
6
|
[34mℹ[39m Using tsdown config: [4m/home/runner/work/better-auth/better-auth/packages/stripe/tsdown.config.ts[24m
|
|
7
7
|
[34mℹ[39m entry: [34msrc/index.ts, src/client.ts[39m
|
|
8
8
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m37.60 kB[22m [2m│ gzip: 7.24 kB[22m
|
|
11
11
|
[34mℹ[39m [2mdist/[22m[1mclient.mjs[22m [2m 0.26 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[32m[1mclient.d.mts[22m[39m [2m 0.62 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 0.
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
15
|
-
[34mℹ[39m 5 files, total: 64.
|
|
16
|
-
[32m✔[39m Build complete in [
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m 0.21 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[32mindex-DWLbLcL6.d.mts[39m [2m26.10 kB[22m [2m│ gzip: 5.04 kB[22m
|
|
15
|
+
[34mℹ[39m 5 files, total: 64.79 kB
|
|
16
|
+
[32m✔[39m Build complete in [32m11730ms[39m
|
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
|
|
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
|
@@ -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
|
|
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-
|
|
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
|
-
*
|
|
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
|
+
"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.
|
|
53
|
-
"better-auth": "1.4.
|
|
52
|
+
"@better-auth/core": "1.4.5",
|
|
53
|
+
"better-auth": "1.4.5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"better-call": "1.1.
|
|
56
|
+
"better-call": "1.1.4",
|
|
57
57
|
"stripe": "^20.0.0",
|
|
58
58
|
"tsdown": "^0.16.0",
|
|
59
|
-
"better-auth": "1.4.
|
|
60
|
-
"@better-auth/core": "1.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
|
-
*
|
|
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 };
|
package/src/stripe.test.ts
CHANGED
|
@@ -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 = {
|