strapi-plugin-magic-link-v5 5.5.5 → 5.5.6

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.
@@ -4810,271 +4810,265 @@ var store$1 = ({ strapi: strapi2 }) => ({
4810
4810
  return pluginStore.set({ key: "settings", value: settings });
4811
4811
  }
4812
4812
  });
4813
- var features$1;
4814
- var hasRequiredFeatures;
4815
- function requireFeatures() {
4816
- if (hasRequiredFeatures) return features$1;
4817
- hasRequiredFeatures = 1;
4818
- features$1 = {
4819
- // FREE/DEMO Features
4820
- free: {
4821
- maxTokens: 100,
4822
- // 100 aktive Tokens gleichzeitig
4823
- maxSessions: 50,
4824
- // 50 aktive JWT Sessions
4825
- maxIPBans: 10,
4826
- // 10 gebannte IPs
4827
- features: [
4828
- "basic-magic-link",
4829
- // Basis Magic Link Auth
4830
- "email-templates",
4831
- // Basis Email Templates
4832
- "jwt-sessions",
4833
- // JWT Session Management
4834
- "ip-tracking",
4835
- // IP Tracking für Security
4836
- "rate-limiting",
4837
- // Basis Rate Limiting
4838
- "auto-user-creation",
4839
- // Auto User Creation
4840
- "token-management",
4841
- // Token Dashboard
4842
- "ip-bans"
4843
- // IP Ban Management
4844
- ]
4845
- },
4846
- // PREMIUM Features
4847
- premium: {
4848
- maxTokens: 1e3,
4849
- // 1000 aktive Tokens
4850
- maxSessions: 500,
4851
- // 500 aktive Sessions
4852
- maxIPBans: 100,
4853
- // 100 gebannte IPs
4854
- features: [
4855
- "basic-magic-link",
4856
- "email-templates",
4857
- "jwt-sessions",
4858
- "ip-tracking",
4859
- "rate-limiting",
4860
- "auto-user-creation",
4861
- "token-management",
4862
- "ip-bans",
4863
- "otp-email",
4864
- // Email OTP (6-digit code)
4865
- "mfa-totp",
4866
- // MFA: Magic Link + TOTP (Szenario 1)
4867
- "custom-email-templates",
4868
- // Custom HTML/Text Templates
4869
- "email-designer-integration",
4870
- // Email Designer 5 Support
4871
- "magic-mail-integration",
4872
- // MagicMail Integration
4873
- "advanced-rate-limiting",
4874
- // Custom Rate Limits
4875
- "session-management",
4876
- // Erweiterte Session Verwaltung
4877
- "bulk-operations",
4878
- // Bulk Token/Session Operations
4879
- "extended-logging",
4880
- // Erweiterte Login-Info Logs
4881
- "custom-redirect-urls"
4882
- // Custom Redirect URLs per Token
4883
- ]
4884
- },
4885
- // ADVANCED Features
4886
- advanced: {
4887
- maxTokens: -1,
4888
- // Unlimited
4889
- maxSessions: -1,
4890
- // Unlimited
4891
- maxIPBans: -1,
4892
- // Unlimited
4893
- features: [
4894
- "basic-magic-link",
4895
- "email-templates",
4896
- "jwt-sessions",
4897
- "ip-tracking",
4898
- "rate-limiting",
4899
- "auto-user-creation",
4900
- "token-management",
4901
- "ip-bans",
4902
- "otp-email",
4903
- "mfa-totp",
4904
- // MFA: Magic Link + TOTP (Szenario 1)
4905
- "otp-sms",
4906
- // SMS OTP via Twilio/Vonage
4907
- "otp-totp",
4908
- // TOTP (Authenticator Apps)
4909
- "totp-primary-login",
4910
- // Login with Email + TOTP only (Szenario 2)
4911
- "custom-email-templates",
4912
- "email-designer-integration",
4913
- "magic-mail-integration",
4914
- "advanced-rate-limiting",
4915
- "session-management",
4916
- "bulk-operations",
4917
- "extended-logging",
4918
- "custom-redirect-urls",
4919
- "webhook-notifications",
4920
- // Webhooks für Events
4921
- "api-access-tokens",
4922
- // API Tokens für Programmatic Access
4923
- "advanced-analytics",
4924
- // Analytics Dashboard
4925
- "custom-token-context",
4926
- // Custom Context Data in Tokens
4927
- "geolocation-tracking",
4928
- // GeoIP Tracking
4929
- "device-fingerprinting",
4930
- // Device Fingerprinting
4931
- "suspicious-login-alerts"
4932
- // Alerts für verdächtige Logins
4933
- ]
4934
- },
4935
- // ENTERPRISE Features
4936
- enterprise: {
4937
- maxTokens: -1,
4938
- maxSessions: -1,
4939
- maxIPBans: -1,
4940
- features: [
4941
- "basic-magic-link",
4942
- "email-templates",
4943
- "jwt-sessions",
4944
- "ip-tracking",
4945
- "rate-limiting",
4946
- "auto-user-creation",
4947
- "token-management",
4948
- "ip-bans",
4949
- "otp-email",
4950
- "mfa-totp",
4951
- // MFA: Magic Link + TOTP (Szenario 1)
4952
- "otp-sms",
4953
- "otp-totp",
4954
- "totp-primary-login",
4955
- // Login with Email + TOTP only (Szenario 2)
4956
- "otp-backup-codes",
4957
- // Backup Recovery Codes
4958
- "biometric-support",
4959
- // WebAuthn/FIDO2
4960
- "custom-email-templates",
4961
- "email-designer-integration",
4962
- "magic-mail-integration",
4963
- "advanced-rate-limiting",
4964
- "session-management",
4965
- "bulk-operations",
4966
- "extended-logging",
4967
- "custom-redirect-urls",
4968
- "webhook-notifications",
4969
- "api-access-tokens",
4970
- "advanced-analytics",
4971
- "custom-token-context",
4972
- "geolocation-tracking",
4973
- "device-fingerprinting",
4974
- "suspicious-login-alerts",
4975
- "sso-integration",
4976
- // SSO/SAML Integration
4977
- "ldap-sync",
4978
- // LDAP/AD Sync
4979
- "audit-logs",
4980
- // Vollständige Audit Logs
4981
- "compliance-reports",
4982
- // GDPR/SOC2 Reports
4983
- "priority-support",
4984
- // 24/7 Priority Support
4985
- "custom-security-rules",
4986
- // Custom Security Rules
4987
- "multi-tenant",
4988
- // Multi-Tenant Support
4989
- "white-label"
4990
- // White-Label Branding
4991
- ]
4992
- },
4993
- /**
4994
- * Check if a feature is available for given license tier
4995
- */
4996
- hasFeature(licenseData, featureName) {
4997
- if (!licenseData) {
4998
- return this.free.features.includes(featureName);
4999
- }
5000
- let isEnterprise = false;
5001
- let isAdvanced = false;
5002
- let isPremium = false;
5003
- if (licenseData.tier) {
5004
- isEnterprise = licenseData.tier === "enterprise";
5005
- isAdvanced = licenseData.tier === "advanced";
5006
- isPremium = licenseData.tier === "premium";
5007
- }
5008
- if (licenseData.features) {
5009
- isEnterprise = isEnterprise || licenseData.features.enterprise === true;
5010
- isAdvanced = isAdvanced || licenseData.features.advanced === true;
5011
- isPremium = isPremium || licenseData.features.premium === true;
5012
- }
5013
- if (licenseData.featureEnterprise === true) {
5014
- isEnterprise = true;
5015
- }
5016
- if (licenseData.featureAdvanced === true) {
5017
- isAdvanced = true;
5018
- }
5019
- if (licenseData.featurePremium === true) {
5020
- isPremium = true;
5021
- }
5022
- if (isEnterprise && this.enterprise.features.includes(featureName)) {
5023
- return true;
5024
- }
5025
- if (isAdvanced && this.advanced.features.includes(featureName)) {
5026
- return true;
5027
- }
5028
- if (isPremium && this.premium.features.includes(featureName)) {
5029
- return true;
5030
- }
4813
+ var features$1 = {
4814
+ // FREE/DEMO Features
4815
+ free: {
4816
+ maxTokens: 100,
4817
+ // 100 aktive Tokens gleichzeitig
4818
+ maxSessions: 50,
4819
+ // 50 aktive JWT Sessions
4820
+ maxIPBans: 10,
4821
+ // 10 gebannte IPs
4822
+ features: [
4823
+ "basic-magic-link",
4824
+ // Basis Magic Link Auth
4825
+ "email-templates",
4826
+ // Basis Email Templates
4827
+ "jwt-sessions",
4828
+ // JWT Session Management
4829
+ "ip-tracking",
4830
+ // IP Tracking für Security
4831
+ "rate-limiting",
4832
+ // Basis Rate Limiting
4833
+ "auto-user-creation",
4834
+ // Auto User Creation
4835
+ "token-management",
4836
+ // Token Dashboard
4837
+ "ip-bans"
4838
+ // IP Ban Management
4839
+ ]
4840
+ },
4841
+ // PREMIUM Features
4842
+ premium: {
4843
+ maxTokens: 1e3,
4844
+ // 1000 aktive Tokens
4845
+ maxSessions: 500,
4846
+ // 500 aktive Sessions
4847
+ maxIPBans: 100,
4848
+ // 100 gebannte IPs
4849
+ features: [
4850
+ "basic-magic-link",
4851
+ "email-templates",
4852
+ "jwt-sessions",
4853
+ "ip-tracking",
4854
+ "rate-limiting",
4855
+ "auto-user-creation",
4856
+ "token-management",
4857
+ "ip-bans",
4858
+ "otp-email",
4859
+ // Email OTP (6-digit code)
4860
+ "mfa-totp",
4861
+ // MFA: Magic Link + TOTP (Szenario 1)
4862
+ "custom-email-templates",
4863
+ // Custom HTML/Text Templates
4864
+ "email-designer-integration",
4865
+ // Email Designer 5 Support
4866
+ "magic-mail-integration",
4867
+ // MagicMail Integration
4868
+ "advanced-rate-limiting",
4869
+ // Custom Rate Limits
4870
+ "session-management",
4871
+ // Erweiterte Session Verwaltung
4872
+ "bulk-operations",
4873
+ // Bulk Token/Session Operations
4874
+ "extended-logging",
4875
+ // Erweiterte Login-Info Logs
4876
+ "custom-redirect-urls"
4877
+ // Custom Redirect URLs per Token
4878
+ ]
4879
+ },
4880
+ // ADVANCED Features
4881
+ advanced: {
4882
+ maxTokens: -1,
4883
+ // Unlimited
4884
+ maxSessions: -1,
4885
+ // Unlimited
4886
+ maxIPBans: -1,
4887
+ // Unlimited
4888
+ features: [
4889
+ "basic-magic-link",
4890
+ "email-templates",
4891
+ "jwt-sessions",
4892
+ "ip-tracking",
4893
+ "rate-limiting",
4894
+ "auto-user-creation",
4895
+ "token-management",
4896
+ "ip-bans",
4897
+ "otp-email",
4898
+ "mfa-totp",
4899
+ // MFA: Magic Link + TOTP (Szenario 1)
4900
+ "otp-sms",
4901
+ // SMS OTP via Twilio/Vonage
4902
+ "otp-totp",
4903
+ // TOTP (Authenticator Apps)
4904
+ "totp-primary-login",
4905
+ // Login with Email + TOTP only (Szenario 2)
4906
+ "custom-email-templates",
4907
+ "email-designer-integration",
4908
+ "magic-mail-integration",
4909
+ "advanced-rate-limiting",
4910
+ "session-management",
4911
+ "bulk-operations",
4912
+ "extended-logging",
4913
+ "custom-redirect-urls",
4914
+ "webhook-notifications",
4915
+ // Webhooks für Events
4916
+ "api-access-tokens",
4917
+ // API Tokens für Programmatic Access
4918
+ "advanced-analytics",
4919
+ // Analytics Dashboard
4920
+ "custom-token-context",
4921
+ // Custom Context Data in Tokens
4922
+ "geolocation-tracking",
4923
+ // GeoIP Tracking
4924
+ "device-fingerprinting",
4925
+ // Device Fingerprinting
4926
+ "suspicious-login-alerts"
4927
+ // Alerts für verdächtige Logins
4928
+ ]
4929
+ },
4930
+ // ENTERPRISE Features
4931
+ enterprise: {
4932
+ maxTokens: -1,
4933
+ maxSessions: -1,
4934
+ maxIPBans: -1,
4935
+ features: [
4936
+ "basic-magic-link",
4937
+ "email-templates",
4938
+ "jwt-sessions",
4939
+ "ip-tracking",
4940
+ "rate-limiting",
4941
+ "auto-user-creation",
4942
+ "token-management",
4943
+ "ip-bans",
4944
+ "otp-email",
4945
+ "mfa-totp",
4946
+ // MFA: Magic Link + TOTP (Szenario 1)
4947
+ "otp-sms",
4948
+ "otp-totp",
4949
+ "totp-primary-login",
4950
+ // Login with Email + TOTP only (Szenario 2)
4951
+ "otp-backup-codes",
4952
+ // Backup Recovery Codes
4953
+ "biometric-support",
4954
+ // WebAuthn/FIDO2
4955
+ "custom-email-templates",
4956
+ "email-designer-integration",
4957
+ "magic-mail-integration",
4958
+ "advanced-rate-limiting",
4959
+ "session-management",
4960
+ "bulk-operations",
4961
+ "extended-logging",
4962
+ "custom-redirect-urls",
4963
+ "webhook-notifications",
4964
+ "api-access-tokens",
4965
+ "advanced-analytics",
4966
+ "custom-token-context",
4967
+ "geolocation-tracking",
4968
+ "device-fingerprinting",
4969
+ "suspicious-login-alerts",
4970
+ "sso-integration",
4971
+ // SSO/SAML Integration
4972
+ "ldap-sync",
4973
+ // LDAP/AD Sync
4974
+ "audit-logs",
4975
+ // Vollständige Audit Logs
4976
+ "compliance-reports",
4977
+ // GDPR/SOC2 Reports
4978
+ "priority-support",
4979
+ // 24/7 Priority Support
4980
+ "custom-security-rules",
4981
+ // Custom Security Rules
4982
+ "multi-tenant",
4983
+ // Multi-Tenant Support
4984
+ "white-label"
4985
+ // White-Label Branding
4986
+ ]
4987
+ },
4988
+ /**
4989
+ * Check if a feature is available for given license tier
4990
+ */
4991
+ hasFeature(licenseData, featureName) {
4992
+ if (!licenseData) {
5031
4993
  return this.free.features.includes(featureName);
5032
- },
5033
- /**
5034
- * Get max allowed tokens for license tier
5035
- */
5036
- getMaxTokens(licenseData) {
5037
- if (!licenseData) return this.free.maxTokens;
5038
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxTokens;
5039
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxTokens;
5040
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxTokens;
5041
- return this.free.maxTokens;
5042
- },
5043
- /**
5044
- * Get max allowed sessions for license tier
5045
- */
5046
- getMaxSessions(licenseData) {
5047
- if (!licenseData) return this.free.maxSessions;
5048
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxSessions;
5049
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxSessions;
5050
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxSessions;
5051
- return this.free.maxSessions;
5052
- },
5053
- /**
5054
- * Get max allowed IP bans for license tier
5055
- */
5056
- getMaxIPBans(licenseData) {
5057
- if (!licenseData) return this.free.maxIPBans;
5058
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxIPBans;
5059
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxIPBans;
5060
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxIPBans;
5061
- return this.free.maxIPBans;
5062
- },
5063
- /**
5064
- * Get tier name from license data
5065
- */
5066
- getTierName(licenseData) {
5067
- if (!licenseData) return "free";
5068
- if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return "enterprise";
5069
- if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return "advanced";
5070
- if (licenseData.featurePremium === true || licenseData.features?.premium === true) return "premium";
5071
- return "free";
5072
4994
  }
5073
- };
5074
- return features$1;
5075
- }
4995
+ let isEnterprise = false;
4996
+ let isAdvanced = false;
4997
+ let isPremium = false;
4998
+ if (licenseData.tier) {
4999
+ isEnterprise = licenseData.tier === "enterprise";
5000
+ isAdvanced = licenseData.tier === "advanced";
5001
+ isPremium = licenseData.tier === "premium";
5002
+ }
5003
+ if (licenseData.features) {
5004
+ isEnterprise = isEnterprise || licenseData.features.enterprise === true;
5005
+ isAdvanced = isAdvanced || licenseData.features.advanced === true;
5006
+ isPremium = isPremium || licenseData.features.premium === true;
5007
+ }
5008
+ if (licenseData.featureEnterprise === true) {
5009
+ isEnterprise = true;
5010
+ }
5011
+ if (licenseData.featureAdvanced === true) {
5012
+ isAdvanced = true;
5013
+ }
5014
+ if (licenseData.featurePremium === true) {
5015
+ isPremium = true;
5016
+ }
5017
+ if (isEnterprise && this.enterprise.features.includes(featureName)) {
5018
+ return true;
5019
+ }
5020
+ if (isAdvanced && this.advanced.features.includes(featureName)) {
5021
+ return true;
5022
+ }
5023
+ if (isPremium && this.premium.features.includes(featureName)) {
5024
+ return true;
5025
+ }
5026
+ return this.free.features.includes(featureName);
5027
+ },
5028
+ /**
5029
+ * Get max allowed tokens for license tier
5030
+ */
5031
+ getMaxTokens(licenseData) {
5032
+ if (!licenseData) return this.free.maxTokens;
5033
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxTokens;
5034
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxTokens;
5035
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxTokens;
5036
+ return this.free.maxTokens;
5037
+ },
5038
+ /**
5039
+ * Get max allowed sessions for license tier
5040
+ */
5041
+ getMaxSessions(licenseData) {
5042
+ if (!licenseData) return this.free.maxSessions;
5043
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxSessions;
5044
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxSessions;
5045
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxSessions;
5046
+ return this.free.maxSessions;
5047
+ },
5048
+ /**
5049
+ * Get max allowed IP bans for license tier
5050
+ */
5051
+ getMaxIPBans(licenseData) {
5052
+ if (!licenseData) return this.free.maxIPBans;
5053
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return this.enterprise.maxIPBans;
5054
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return this.advanced.maxIPBans;
5055
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return this.premium.maxIPBans;
5056
+ return this.free.maxIPBans;
5057
+ },
5058
+ /**
5059
+ * Get tier name from license data
5060
+ */
5061
+ getTierName(licenseData) {
5062
+ if (!licenseData) return "free";
5063
+ if (licenseData.featureEnterprise === true || licenseData.features?.enterprise === true) return "enterprise";
5064
+ if (licenseData.featureAdvanced === true || licenseData.features?.advanced === true) return "advanced";
5065
+ if (licenseData.featurePremium === true || licenseData.features?.premium === true) return "premium";
5066
+ return "free";
5067
+ }
5068
+ };
5076
5069
  const crypto$1 = require$$0$3;
5077
5070
  const os = require$$1$3;
5071
+ const features = features$1;
5078
5072
  const LICENSE_SERVER_URL = "https://magicapi.fitlex.me";
5079
5073
  const envTimeout = Number(process.env.MAGIC_LICENSE_TIMEOUT_MS);
5080
5074
  const DEFAULT_FETCH_TIMEOUT_MS = Number.isFinite(envTimeout) && envTimeout > 0 ? envTimeout : 12e3;
@@ -5456,14 +5450,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5456
5450
  */
5457
5451
  async hasFeature(featureName) {
5458
5452
  try {
5459
- const features2 = requireFeatures();
5460
5453
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5461
5454
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5462
5455
  if (!licenseKey) {
5463
- return features2.hasFeature(null, featureName);
5456
+ return features.hasFeature(null, featureName);
5464
5457
  }
5465
5458
  const licenseData = await this.getLicenseByKey(licenseKey);
5466
- return features2.hasFeature(licenseData, featureName);
5459
+ return features.hasFeature(licenseData, featureName);
5467
5460
  } catch (error) {
5468
5461
  strapi2.log.error("Error checking feature:", error);
5469
5462
  return false;
@@ -5475,14 +5468,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5475
5468
  */
5476
5469
  async getMaxTokens() {
5477
5470
  try {
5478
- const features2 = requireFeatures();
5479
5471
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5480
5472
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5481
5473
  if (!licenseKey) {
5482
- return features2.getMaxTokens(null);
5474
+ return features.getMaxTokens(null);
5483
5475
  }
5484
5476
  const licenseData = await this.getLicenseByKey(licenseKey);
5485
- return features2.getMaxTokens(licenseData);
5477
+ return features.getMaxTokens(licenseData);
5486
5478
  } catch (error) {
5487
5479
  strapi2.log.error("Error getting max tokens:", error);
5488
5480
  return features.free.maxTokens;
@@ -5494,14 +5486,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5494
5486
  */
5495
5487
  async getMaxSessions() {
5496
5488
  try {
5497
- const features2 = requireFeatures();
5498
5489
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5499
5490
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5500
5491
  if (!licenseKey) {
5501
- return features2.getMaxSessions(null);
5492
+ return features.getMaxSessions(null);
5502
5493
  }
5503
5494
  const licenseData = await this.getLicenseByKey(licenseKey);
5504
- return features2.getMaxSessions(licenseData);
5495
+ return features.getMaxSessions(licenseData);
5505
5496
  } catch (error) {
5506
5497
  strapi2.log.error("Error getting max sessions:", error);
5507
5498
  return features.free.maxSessions;
@@ -5513,14 +5504,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5513
5504
  */
5514
5505
  async getMaxIPBans() {
5515
5506
  try {
5516
- const features2 = requireFeatures();
5517
5507
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5518
5508
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5519
5509
  if (!licenseKey) {
5520
- return features2.getMaxIPBans(null);
5510
+ return features.getMaxIPBans(null);
5521
5511
  }
5522
5512
  const licenseData = await this.getLicenseByKey(licenseKey);
5523
- return features2.getMaxIPBans(licenseData);
5513
+ return features.getMaxIPBans(licenseData);
5524
5514
  } catch (error) {
5525
5515
  strapi2.log.error("Error getting max IP bans:", error);
5526
5516
  return features.free.maxIPBans;
@@ -5532,14 +5522,13 @@ var licenseGuard$1 = ({ strapi: strapi2 }) => ({
5532
5522
  */
5533
5523
  async getAvailableOTPTypes() {
5534
5524
  try {
5535
- const features2 = requireFeatures();
5536
5525
  const pluginStore = strapi2.store({ type: "plugin", name: "magic-link" });
5537
5526
  const licenseKey = await pluginStore.get({ key: "licenseKey" });
5538
5527
  if (!licenseKey) {
5539
- return features2.getAvailableOTPTypes(null);
5528
+ return features.getAvailableOTPTypes(null);
5540
5529
  }
5541
5530
  const licenseData = await this.getLicenseByKey(licenseKey);
5542
- return features2.getAvailableOTPTypes(licenseData);
5531
+ return features.getAvailableOTPTypes(licenseData);
5543
5532
  } catch (error) {
5544
5533
  strapi2.log.error("Error getting available OTP types:", error);
5545
5534
  return [];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.5.5",
2
+ "version": "5.5.6",
3
3
  "keywords": [
4
4
  "strapi",
5
5
  "plugin",
@@ -46,11 +46,13 @@
46
46
  "npm": ">=6.0.0"
47
47
  },
48
48
  "scripts": {
49
+ "prebuild": "npm run lint",
49
50
  "build": "strapi-plugin build && npm run copy:i18n",
50
51
  "copy:i18n": "mkdir -p dist/server/i18n && cp -r server/src/i18n/*.json dist/server/i18n/",
51
52
  "watch": "strapi-plugin watch",
52
53
  "watch:link": "strapi-plugin watch:link",
53
- "verify": "strapi-plugin verify"
54
+ "verify": "strapi-plugin verify",
55
+ "lint": "eslint \"admin/**/*.{js,jsx}\" \"server/**/*.js\" \"strapi-server.js\" \"strapi-admin.js\""
54
56
  },
55
57
  "dependencies": {
56
58
  "@whiskeysockets/baileys": "^7.0.0-rc.9",
@@ -71,6 +73,10 @@
71
73
  "@semantic-release/release-notes-generator": "^14.0.1",
72
74
  "@strapi/sdk-plugin": "^5.4.0",
73
75
  "@strapi/strapi": "^5.36.0",
76
+ "eslint": "^9.39.4",
77
+ "eslint-plugin-react": "^7.37.5",
78
+ "eslint-plugin-react-hooks": "^5.2.0",
79
+ "globals": "^15.15.0",
74
80
  "prettier": "^3.8.3",
75
81
  "react": "^18.3.1",
76
82
  "react-dom": "^18.3.1",