pangea-server 3.3.74 → 3.3.75

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.
@@ -55,6 +55,7 @@ function hasInstancesAndTotalCount(obj) {
55
55
  return typeof obj === 'object' && obj !== null && 'instances' in obj && 'totalCount' in obj;
56
56
  }
57
57
  async function setFilesUrls(data) {
58
+ console.log('[setFilesUrls] Iniciando setFilesUrls...');
58
59
  const singularSuffixes = ['Image', 'Video'];
59
60
  const pluralSuffixes = ['Images', 'Videos'];
60
61
  const entries = [];
@@ -83,7 +84,7 @@ async function setFilesUrls(data) {
83
84
  entries.push({ node: payload, field: key, type: 'singular' });
84
85
  }
85
86
  }
86
- else if (Array.isArray(value) && value.length && value.every((v) => typeof v === 'string')) {
87
+ else if (Array.isArray(value) && value.every((v) => typeof v === 'string')) {
87
88
  if (pluralSuffixes.some((s) => key === s.toLowerCase() || (key.length > s.length && key.endsWith(s)))) {
88
89
  entries.push({ node: payload, field: key, type: 'plural' });
89
90
  }
@@ -94,6 +95,7 @@ async function setFilesUrls(data) {
94
95
  }
95
96
  }
96
97
  collect(data);
98
+ console.log(`[setFilesUrls] Entries encontrados: ${entries.length}`, entries.map((e) => e.field));
97
99
  if (!entries.length)
98
100
  return;
99
101
  const allFileKeys = new Set();
@@ -118,4 +120,5 @@ async function setFilesUrls(data) {
118
120
  node[`${field}Urls`] = node[field].map((v) => urlMap.get(v));
119
121
  }
120
122
  }
123
+ console.log(`[setFilesUrls] URLs asignadas exitosamente`);
121
124
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "3.3.74",
4
+ "version": "3.3.75",
5
5
  "files": [
6
6
  "dist"
7
7
  ],