strapi-plugin-magic-link-v5 5.5.3 → 5.5.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.5.4](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.3...v5.5.4) (2026-04-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **build:** avoid destructured requires that pack-up rewrites into undefined ([7aea267](https://github.com/Schero94/strapi-plugin-magic-link-v5/commit/7aea2671686a2c0ea7d6a5f1293d7a830628c98e))
7
+
1
8
  ## [5.5.3](https://github.com/Schero94/strapi-plugin-magic-link-v5/compare/v5.5.2...v5.5.3) (2026-04-21)
2
9
 
3
10
 
@@ -1109,9 +1109,8 @@ async function appendJwtSession$1(strapi2, record) {
1109
1109
  var jwtSessionStore = {
1110
1110
  appendJwtSession: appendJwtSession$1
1111
1111
  };
1112
- const { z } = require$$0__default$2.default;
1113
- const { errors: errors$1 } = require$$1__default$1.default;
1114
- const { ValidationError } = errors$1;
1112
+ const z = require$$0__default$2.default;
1113
+ const { ValidationError } = require$$1__default$1.default.errors;
1115
1114
  const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1116
1115
  const emailSchema = z.string().trim().min(3).max(320).regex(EMAIL_REGEX, "Invalid email").transform((v) => v.toLowerCase());
1117
1116
  const tokenSchema = z.string().min(1).max(512);
@@ -1939,13 +1938,13 @@ const createPlainTextVersion = (html, variables = {}) => {
1939
1938
  return text;
1940
1939
  };
1941
1940
  const validateEmailConfig = (emailConfig) => {
1942
- const errors2 = [];
1941
+ const errors = [];
1943
1942
  const warnings = [];
1944
1943
  if (!emailConfig.to || !emailConfig.to.includes("@")) {
1945
- errors2.push("Invalid recipient email address");
1944
+ errors.push("Invalid recipient email address");
1946
1945
  }
1947
1946
  if (!emailConfig.from || !emailConfig.from.includes("@")) {
1948
- errors2.push("Invalid sender email address");
1947
+ errors.push("Invalid sender email address");
1949
1948
  }
1950
1949
  if (!emailConfig.subject || emailConfig.subject.trim().length === 0) {
1951
1950
  warnings.push("Empty subject line may trigger spam filters");
@@ -1957,8 +1956,8 @@ const validateEmailConfig = (emailConfig) => {
1957
1956
  warnings.push("No HTML version provided");
1958
1957
  }
1959
1958
  return {
1960
- valid: errors2.length === 0,
1961
- errors: errors2,
1959
+ valid: errors.length === 0,
1960
+ errors,
1962
1961
  warnings
1963
1962
  };
1964
1963
  };
@@ -3762,8 +3761,7 @@ const passwordlessCompat = passwordlessCompat$2;
3762
3761
  var middlewares$1 = {
3763
3762
  "passwordless-compat": passwordlessCompat
3764
3763
  };
3765
- const { errors } = require$$1__default$1.default;
3766
- const { PolicyError } = errors;
3764
+ const { PolicyError } = require$$1__default$1.default.errors;
3767
3765
  var licenseCheck$1 = async (policyContext, config2, { strapi: strapi2 }) => {
3768
3766
  try {
3769
3767
  const licenseGuard2 = strapi2.plugin("magic-link").service("license-guard");
@@ -4249,7 +4247,7 @@ var service$1 = ({ strapi: strapi2 }) => ({
4249
4247
  });
4250
4248
  const _ = require$$0__default$3.default;
4251
4249
  const { nanoid } = require$$1__default$2.default;
4252
- const { sanitize } = require$$1__default$1.default;
4250
+ require$$1__default$1.default.sanitize;
4253
4251
  const emailHelpers$1 = emailHelpers$3;
4254
4252
  const cryptoUtils$1 = crypto_1;
4255
4253
  const { normalizeEmail } = email;
@@ -1096,9 +1096,8 @@ async function appendJwtSession$1(strapi2, record) {
1096
1096
  var jwtSessionStore = {
1097
1097
  appendJwtSession: appendJwtSession$1
1098
1098
  };
1099
- const { z } = require$$0$5;
1100
- const { errors: errors$1 } = require$$1$1;
1101
- const { ValidationError } = errors$1;
1099
+ const z = require$$0$5;
1100
+ const { ValidationError } = require$$1$1.errors;
1102
1101
  const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1103
1102
  const emailSchema = z.string().trim().min(3).max(320).regex(EMAIL_REGEX, "Invalid email").transform((v) => v.toLowerCase());
1104
1103
  const tokenSchema = z.string().min(1).max(512);
@@ -1926,13 +1925,13 @@ const createPlainTextVersion = (html, variables = {}) => {
1926
1925
  return text;
1927
1926
  };
1928
1927
  const validateEmailConfig = (emailConfig) => {
1929
- const errors2 = [];
1928
+ const errors = [];
1930
1929
  const warnings = [];
1931
1930
  if (!emailConfig.to || !emailConfig.to.includes("@")) {
1932
- errors2.push("Invalid recipient email address");
1931
+ errors.push("Invalid recipient email address");
1933
1932
  }
1934
1933
  if (!emailConfig.from || !emailConfig.from.includes("@")) {
1935
- errors2.push("Invalid sender email address");
1934
+ errors.push("Invalid sender email address");
1936
1935
  }
1937
1936
  if (!emailConfig.subject || emailConfig.subject.trim().length === 0) {
1938
1937
  warnings.push("Empty subject line may trigger spam filters");
@@ -1944,8 +1943,8 @@ const validateEmailConfig = (emailConfig) => {
1944
1943
  warnings.push("No HTML version provided");
1945
1944
  }
1946
1945
  return {
1947
- valid: errors2.length === 0,
1948
- errors: errors2,
1946
+ valid: errors.length === 0,
1947
+ errors,
1949
1948
  warnings
1950
1949
  };
1951
1950
  };
@@ -3749,8 +3748,7 @@ const passwordlessCompat = passwordlessCompat$2;
3749
3748
  var middlewares$1 = {
3750
3749
  "passwordless-compat": passwordlessCompat
3751
3750
  };
3752
- const { errors } = require$$1$1;
3753
- const { PolicyError } = errors;
3751
+ const { PolicyError } = require$$1$1.errors;
3754
3752
  var licenseCheck$1 = async (policyContext, config2, { strapi: strapi2 }) => {
3755
3753
  try {
3756
3754
  const licenseGuard2 = strapi2.plugin("magic-link").service("license-guard");
@@ -4236,7 +4234,7 @@ var service$1 = ({ strapi: strapi2 }) => ({
4236
4234
  });
4237
4235
  const _ = require$$0$6;
4238
4236
  const { nanoid } = require$$1$2;
4239
- const { sanitize } = require$$1$1;
4237
+ require$$1$1.sanitize;
4240
4238
  const emailHelpers$1 = emailHelpers$3;
4241
4239
  const cryptoUtils$1 = crypto_1;
4242
4240
  const { normalizeEmail } = email;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.5.3",
2
+ "version": "5.5.4",
3
3
  "keywords": [
4
4
  "strapi",
5
5
  "plugin",