@growy/strapi-plugin-encrypted-field 1.7.2 → 1.7.3

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.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Campo personalizado de texto cifrado para Strapi",
5
5
  "strapi": {
6
6
  "name": "encrypted-field",
@@ -7,8 +7,19 @@ module.exports = ({ strapi }) => {
7
7
  strapi.log.info(`Total de modelos encontrados: ${models.length}`);
8
8
 
9
9
  models.forEach((model) => {
10
- const encryptedFields = Object.entries(model.attributes || {})
11
- .filter(([key, attr]) => isEncryptedField(attr))
10
+ const attributes = model.attributes || {};
11
+
12
+ // Debug: mostrar todos los campos del modelo
13
+ strapi.log.debug(`Modelo ${model.uid}: ${Object.keys(attributes).length} atributos`);
14
+
15
+ const encryptedFields = Object.entries(attributes)
16
+ .filter(([key, attr]) => {
17
+ const isEncrypted = isEncryptedField(attr);
18
+ if (attr.customField) {
19
+ strapi.log.debug(` - ${key}: customField = ${attr.customField}, isEncrypted = ${isEncrypted}`);
20
+ }
21
+ return isEncrypted;
22
+ })
12
23
  .map(([key]) => key);
13
24
 
14
25
  if (encryptedFields.length === 0) return;