@easy-cms/plugin-ecommerce 1.14.0 → 1.15.1

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.
@@ -783,7 +783,7 @@ var INFO = {
783
783
  name: "@easy-cms/plugin-ecommerce",
784
784
  // The plugin API it is written for (`PLUGIN_API_VERSION` of @easy-cms/core).
785
785
  apiVersion: 1,
786
- ...true ? { version: "1.14.0" } : {}
786
+ ...true ? { version: "1.15.1" } : {}
787
787
  };
788
788
 
789
789
  // src/shop.ts
@@ -794,6 +794,7 @@ import {
794
794
  QueryError,
795
795
  ValidationError as ValidationError2
796
796
  } from "@easy-cms/core";
797
+ import { isEmail } from "@easy-cms/core/internal";
797
798
  var MAX_QUANTITY = 999;
798
799
  var hash = (secret) => createHash("sha256").update(secret).digest("hex");
799
800
  var sameSecret = (secret, stored) => {
@@ -1110,7 +1111,6 @@ var orderRef = (order) => order ? {
1110
1111
  orderNumber: String(order.orderNumber),
1111
1112
  status: order.status
1112
1113
  } : null;
1113
- var EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1114
1114
  function plainContext(context) {
1115
1115
  const plain = {};
1116
1116
  for (const [key, value] of Object.entries(context))
@@ -1139,7 +1139,7 @@ var Orders = class {
1139
1139
  const adapter = this.adapter(input.method);
1140
1140
  const cart = await this.carts.require(who, ref);
1141
1141
  const email = (who.user?.email ?? (typeof input.email === "string" ? input.email.trim() : "")).toString().toLowerCase();
1142
- if (!EMAIL.test(email)) throw invalid(ORDERS, "email", "must be a valid email address");
1142
+ if (!isEmail(email)) throw invalid(ORDERS, "email", "must be a valid email address");
1143
1143
  const shippingAddress = await this.address(who, input);
1144
1144
  const view = await this.carts.view(cart, who, shippingAddress ?? void 0);
1145
1145
  if (view.lines.length === 0) throw invalid(CARTS, "items", "the cart is empty");
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  paymentSucceeded,
13
13
  price,
14
14
  priceField
15
- } from "./chunk-2Z7XGA4Z.js";
15
+ } from "./chunk-5HUNRF7Q.js";
16
16
 
17
17
  // src/payments.ts
18
18
  var definePaymentAdapter = (adapter) => adapter;
package/dist/stripe.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paymentFailed,
3
3
  paymentSucceeded
4
- } from "./chunk-2Z7XGA4Z.js";
4
+ } from "./chunk-5HUNRF7Q.js";
5
5
 
6
6
  // src/stripe-client.ts
7
7
  var STRIPE_API_VERSION = "2026-09-30.endive";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/plugin-ecommerce",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "description": "A shop for Easy CMS: products and variants, prices in several currencies, carts (guests too), checkout with Stripe or bank transfer, orders, stock, customer accounts, and React and Vue hooks (experimental)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "react": ">=18.0.0",
37
37
  "stripe": ">=17.0.0 <24.0.0",
38
38
  "vue": "^3.4.0",
39
- "@easy-cms/core": "^1.14.0"
39
+ "@easy-cms/core": "^1.15.1"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "react": {
@@ -58,9 +58,9 @@
58
58
  "stripe": "^23.0.0",
59
59
  "stripe-17": "npm:stripe@^17.7.0",
60
60
  "vue": "^3.5.43",
61
- "@easy-cms/core": "^1.14.0",
62
- "@easy-cms/db-sqlite": "^1.14.0",
63
- "@easy-cms/plugin-multi-tenant": "^1.14.0"
61
+ "@easy-cms/core": "^1.15.1",
62
+ "@easy-cms/db-sqlite": "^1.15.1",
63
+ "@easy-cms/plugin-multi-tenant": "^1.15.1"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=22.12"