@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 +1 -1
- package/server/bootstrap.js +13 -2
package/package.json
CHANGED
package/server/bootstrap.js
CHANGED
|
@@ -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
|
|
11
|
-
|
|
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;
|