@kirby-tools/licensing 0.6.6 → 0.6.7

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/constants.js CHANGED
@@ -1,10 +1,10 @@
1
1
  //#region src/constants.ts
2
2
  const ERROR_KEY_MAP = {
3
- "Unauthorized": "errors.validation.invalidCredentials",
4
- "License key not valid for this plugin": "errors.license.invalid",
5
- "License key not valid for this plugin version": "errors.license.incompatible",
6
- "License key not valid for this plugin version, please upgrade your license": "errors.license.upgradeable",
7
- "License key already activated": "errors.license.alreadyActivated"
3
+ "Unauthorized": "kirby-tools.license.error.invalidCredentials",
4
+ "License key not valid for this plugin": "kirby-tools.license.error.invalid",
5
+ "License key not valid for this plugin version": "kirby-tools.license.error.incompatible",
6
+ "License key not valid for this plugin version, please upgrade your license": "kirby-tools.license.error.upgradeable",
7
+ "License key already activated": "kirby-tools.license.error.alreadyActivated"
8
8
  };
9
9
  const INTEGRITY_ERROR = "The activation buttons appear to be hidden. Please purchase a license.";
10
10
  const I18N_MESSAGES = {
@@ -12,11 +12,6 @@ const I18N_MESSAGES = {
12
12
  "modal.fields.info": "Thanks for purchasing {label}! Please enter your email address and order ID to activate your license.",
13
13
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Find your order number</a> on Lemon Squeezy or <a href=\"mailto:hello@kirby.tools\">contact us</a> if you cannot find it.",
14
14
  "errors.validation.missingFields": "Email address and order ID are required",
15
- "errors.validation.invalidCredentials": "Email address or order ID is incorrect",
16
- "errors.license.invalid": "License key invalid for this plugin",
17
- "errors.license.incompatible": "License key invalid for this plugin version",
18
- "errors.license.upgradeable": "License key invalid for this plugin version. Upgrade now on https://hub.kirby.tools.",
19
- "errors.license.alreadyActivated": "License key already activated",
20
15
  "activate": "Activate",
21
16
  "buy": "Buy a license",
22
17
  "upgrade": "Upgrade",
@@ -26,11 +21,6 @@ const I18N_MESSAGES = {
26
21
  "modal.fields.info": "Dankeschön für den Kauf von {label}! Bitte gib deine E-Mail-Adresse und Bestellnummer ein, um deine Lizenz zu aktivieren.",
27
22
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Finde deine Bestellnummer</a> bei Lemon Squeezy oder <a href=\"mailto:hello@kirby.tools\">kontaktiere uns</a>, wenn du sie nicht finden kannst.",
28
23
  "errors.validation.missingFields": "E-Mail-Adresse und Bestellnummer sind notwendig",
29
- "errors.validation.invalidCredentials": "E-Mail-Adresse oder Bestellnummer ist falsch",
30
- "errors.license.invalid": "Lizenzschlüssel ungültig für dieses Plugin",
31
- "errors.license.incompatible": "Lizenzschlüssel ungültig für diese Plugin-Version",
32
- "errors.license.upgradeable": "Lizenzschlüssel ungültig für diese Plugin-Version. Aktualisiere jetzt auf https://hub.kirby.tools.",
33
- "errors.license.alreadyActivated": "Lizenzschlüssel bereits aktiviert",
34
24
  "activate": "Aktivieren",
35
25
  "buy": "Lizenz kaufen",
36
26
  "upgrade": "Upgrade",
@@ -40,11 +30,6 @@ const I18N_MESSAGES = {
40
30
  "modal.fields.info": "Merci d'avoir acheté {label} ! Veuillez saisir votre adresse e-mail et votre numéro de commande pour activer votre licence.",
41
31
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Trouvez votre numéro de commande</a> sur Lemon Squeezy ou <a href=\"mailto:hello@kirby.tools\">contactez-nous</a> si vous ne le trouvez pas.",
42
32
  "errors.validation.missingFields": "Adresse e-mail et numéro de commande requis",
43
- "errors.validation.invalidCredentials": "Adresse e-mail ou numéro de commande incorrect",
44
- "errors.license.invalid": "Clé de licence invalide pour ce plugin",
45
- "errors.license.incompatible": "Clé de licence invalide pour cette version du plugin",
46
- "errors.license.upgradeable": "Clé de licence invalide pour cette version du plugin. Mettez à niveau maintenant sur https://hub.kirby.tools.",
47
- "errors.license.alreadyActivated": "Clé de licence déjà activée",
48
33
  "activate": "Activer",
49
34
  "buy": "Acheter une licence",
50
35
  "upgrade": "Upgrade",
@@ -54,11 +39,6 @@ const I18N_MESSAGES = {
54
39
  "modal.fields.info": "Bedankt voor het kopen van {label}! Voer je e-mailadres en bestelnummer in om je licentie te activeren.",
55
40
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Vind je bestelnummer</a> op Lemon Squeezy of <a href=\"mailto:hello@kirby.tools\">neem contact met ons op</a> als je het niet kunt vinden.",
56
41
  "errors.validation.missingFields": "E-mailadres en bestelnummer zijn verplicht",
57
- "errors.validation.invalidCredentials": "E-mailadres of bestelnummer is onjuist",
58
- "errors.license.invalid": "Licentiesleutel ongeldig voor deze plugin",
59
- "errors.license.incompatible": "Licentiesleutel ongeldig voor deze pluginversie",
60
- "errors.license.upgradeable": "Licentiesleutel ongeldig voor deze pluginversie. Upgrade nu op https://hub.kirby.tools.",
61
- "errors.license.alreadyActivated": "Licentiesleutel al geactiveerd",
62
42
  "activate": "Activeren",
63
43
  "buy": "Koop een licentie",
64
44
  "upgrade": "Upgrade",
@@ -68,11 +48,6 @@ const I18N_MESSAGES = {
68
48
  "modal.fields.info": "¡Gracias por comprar {label}! Introduce tu dirección de correo electrónico y número de pedido para activar tu licencia.",
69
49
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Encuentra tu número de pedido</a> en Lemon Squeezy o <a href=\"mailto:hello@kirby.tools\">contáctanos</a> si no lo encuentras.",
70
50
  "errors.validation.missingFields": "La dirección de correo electrónico y el número de pedido son obligatorios",
71
- "errors.validation.invalidCredentials": "La dirección de correo electrónico o el número de pedido es incorrecto",
72
- "errors.license.invalid": "Clave de licencia no válida para este plugin",
73
- "errors.license.incompatible": "Clave de licencia no válida para esta versión del plugin",
74
- "errors.license.upgradeable": "Clave de licencia no válida para esta versión del plugin. Actualiza ahora en https://hub.kirby.tools.",
75
- "errors.license.alreadyActivated": "Clave de licencia ya activada",
76
51
  "activate": "Activar",
77
52
  "buy": "Comprar licencia",
78
53
  "upgrade": "Actualizar",
@@ -82,11 +57,6 @@ const I18N_MESSAGES = {
82
57
  "modal.fields.info": "Grazie per aver acquistato {label}! Inserisci il tuo indirizzo email e il numero d'ordine per attivare la licenza.",
83
58
  "modal.fields.orderId.help": "<a href=\"https://app.lemonsqueezy.com/my-orders\" target=\"_blank\">Trova il tuo numero d'ordine</a> su Lemon Squeezy o <a href=\"mailto:hello@kirby.tools\">contattaci</a> se non riesci a trovarlo.",
84
59
  "errors.validation.missingFields": "Indirizzo email e numero d'ordine sono obbligatori",
85
- "errors.validation.invalidCredentials": "Indirizzo email o numero d'ordine non corretto",
86
- "errors.license.invalid": "Chiave di licenza non valida per questo plugin",
87
- "errors.license.incompatible": "Chiave di licenza non valida per questa versione del plugin",
88
- "errors.license.upgradeable": "Chiave di licenza non valida per questa versione del plugin. Aggiorna ora su https://hub.kirby.tools.",
89
- "errors.license.alreadyActivated": "Chiave di licenza già attivata",
90
60
  "activate": "Attiva",
91
61
  "buy": "Acquista licenza",
92
62
  "upgrade": "Aggiorna",
package/dist/license.js CHANGED
@@ -81,7 +81,8 @@ async function activateLicense(event, licenseOptions) {
81
81
  return true;
82
82
  } catch (error) {
83
83
  const message = error.message;
84
- panel.notification.error(ERROR_KEY_MAP[message] ? t(ERROR_KEY_MAP[message]) : message);
84
+ const translationKey = ERROR_KEY_MAP[message];
85
+ panel.notification.error(translationKey ? panel.t(translationKey) : message);
85
86
  return false;
86
87
  }
87
88
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirby-tools/licensing",
3
3
  "type": "module",
4
- "version": "0.6.6",
4
+ "version": "0.6.7",
5
5
  "packageManager": "pnpm@10.28.0",
6
6
  "description": "License system for Kirby Tools plugins within the Kirby Panel",
7
7
  "author": "Johann Schopplich <hello@johannschopplich.com>",