@growy/strapi-plugin-encrypted-field 1.8.0 → 1.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growy/strapi-plugin-encrypted-field",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Campo personalizado de texto cifrado para Strapi",
5
5
  "strapi": {
6
6
  "name": "encrypted-field",
@@ -113,8 +113,9 @@ module.exports = ({ strapi }) => {
113
113
  if (Object.prototype.hasOwnProperty.call(result, key)) {
114
114
  const value = result[key];
115
115
  if (typeof value === 'string' && value) {
116
- strapi.log.info(`Descifrando campo ${key} en ${event.model.uid}`);
117
- result[key] = decrypt(value, strapi);
116
+ const decrypted = decrypt(value, strapi);
117
+ strapi.log.info(`Descifrando campo ${key} en ${event.model.uid}: ${value.substring(0, 20)}... -> ${decrypted}`);
118
+ result[key] = decrypted;
118
119
  }
119
120
  }
120
121
  }
@@ -135,7 +136,9 @@ module.exports = ({ strapi }) => {
135
136
  if (Object.prototype.hasOwnProperty.call(item, key)) {
136
137
  const value = item[key];
137
138
  if (typeof value === 'string' && value) {
138
- item[key] = decrypt(value, strapi);
139
+ const decrypted = decrypt(value, strapi);
140
+ strapi.log.info(`Descifrando campo ${key}: ${value.substring(0, 20)}... -> ${decrypted}`);
141
+ item[key] = decrypted;
139
142
  }
140
143
  }
141
144
  }