@better-auth/stripe 1.6.11 → 1.6.12

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/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-B-Nnhrp7.mjs";
1
+ import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-Ca5UYTwV.mjs";
2
2
  //#region src/client.ts
3
3
  const stripeClient = (options) => {
4
4
  return {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-B-Nnhrp7.mjs";
1
+ import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-Ca5UYTwV.mjs";
2
2
  import { APIError, HIDE_METADATA } from "better-auth";
3
3
  import { defu } from "defu";
4
4
  import { createAuthEndpoint, createAuthMiddleware } from "@better-auth/core/api";
@@ -91,13 +91,13 @@ function isStripePendingCancel(stripeSub) {
91
91
  }
92
92
  /**
93
93
  * Escapes a value for use in Stripe search queries.
94
- * Stripe search query uses double quotes for string values,
95
- * and double quotes within the value need to be escaped with backslash.
94
+ * Stripe search query uses backslash escaping inside double-quoted
95
+ * string values, so literal backslashes must be escaped before quotes.
96
96
  *
97
97
  * @see https://docs.stripe.com/search#search-query-language
98
98
  */
99
99
  function escapeStripeSearchValue(value) {
100
- return value.replace(/"/g, "\\\"");
100
+ return value.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"");
101
101
  }
102
102
  /**
103
103
  * Resolve the quantity for a subscription by checking the seat item first,
@@ -27,6 +27,6 @@ const STRIPE_ERROR_CODES = defineErrorCodes({
27
27
  });
28
28
  //#endregion
29
29
  //#region src/version.ts
30
- const PACKAGE_VERSION = "1.6.11";
30
+ const PACKAGE_VERSION = "1.6.12";
31
31
  //#endregion
32
32
  export { STRIPE_ERROR_CODES as n, PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/stripe",
3
- "version": "1.6.11",
3
+ "version": "1.6.12",
4
4
  "description": "Stripe plugin for Better Auth",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,14 +58,14 @@
58
58
  "better-call": "1.3.5",
59
59
  "stripe": "^22.0.1",
60
60
  "tsdown": "0.21.1",
61
- "@better-auth/core": "1.6.11",
62
- "better-auth": "1.6.11"
61
+ "@better-auth/core": "1.6.12",
62
+ "better-auth": "1.6.12"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "better-call": "1.3.5",
66
66
  "stripe": "^18 || ^19 || ^20 || ^21 || ^22",
67
- "@better-auth/core": "^1.6.11",
68
- "better-auth": "^1.6.11"
67
+ "@better-auth/core": "^1.6.12",
68
+ "better-auth": "^1.6.12"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "tsdown",