node-consul-service 1.0.63 → 1.0.64
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/index.cjs.js +2 -3
- package/dist/index.esm.js +2 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19100,6 +19100,7 @@ function applyResolvedValues(item, field, cacheMap) {
|
|
|
19100
19100
|
}
|
|
19101
19101
|
else {
|
|
19102
19102
|
const id = normalizeId(value);
|
|
19103
|
+
console.log("🚀 ~ applyResolvedValues ~ id:", id);
|
|
19103
19104
|
if (cacheMap.has(id))
|
|
19104
19105
|
setValueByPath(item, field, cacheMap.get(id));
|
|
19105
19106
|
}
|
|
@@ -19107,6 +19108,7 @@ function applyResolvedValues(item, field, cacheMap) {
|
|
|
19107
19108
|
else if (Array.isArray(value)) {
|
|
19108
19109
|
setValueByPath(item, field, value.map((id) => {
|
|
19109
19110
|
var _a;
|
|
19111
|
+
console.log("🚀 ~ applyResolvedValues ~ id:", id);
|
|
19110
19112
|
const key = normalizeId(id);
|
|
19111
19113
|
return (_a = cacheMap.get(key)) !== null && _a !== void 0 ? _a : id;
|
|
19112
19114
|
}));
|
|
@@ -19194,9 +19196,7 @@ async function getCachedAndUncachedItems(ids, cacheGetter) {
|
|
|
19194
19196
|
async function dataLink(data, schema) {
|
|
19195
19197
|
const isArray = Array.isArray(data);
|
|
19196
19198
|
const sourceData = isArray ? data : [data];
|
|
19197
|
-
console.log("🚀 ~ dataLink ~ sourceData:", sourceData);
|
|
19198
19199
|
const result = sourceData.map((item) => ({ ...item }));
|
|
19199
|
-
console.log("🚀 ~ dataLink ~ result:", result);
|
|
19200
19200
|
for (const { field, service, path, headers, cacheGetter } of schema) {
|
|
19201
19201
|
const allIds = Array.from(new Set(sourceData.flatMap((item) => extractIdsFromField(item, field))));
|
|
19202
19202
|
if (allIds.length === 0)
|
|
@@ -19210,7 +19210,6 @@ async function dataLink(data, schema) {
|
|
|
19210
19210
|
}
|
|
19211
19211
|
}
|
|
19212
19212
|
}
|
|
19213
|
-
console.log("🚀 ~ dataLink ~ result:", result);
|
|
19214
19213
|
for (const item of result) {
|
|
19215
19214
|
applyResolvedValues(item, field, cacheMap);
|
|
19216
19215
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -19098,6 +19098,7 @@ function applyResolvedValues(item, field, cacheMap) {
|
|
|
19098
19098
|
}
|
|
19099
19099
|
else {
|
|
19100
19100
|
const id = normalizeId(value);
|
|
19101
|
+
console.log("🚀 ~ applyResolvedValues ~ id:", id);
|
|
19101
19102
|
if (cacheMap.has(id))
|
|
19102
19103
|
setValueByPath(item, field, cacheMap.get(id));
|
|
19103
19104
|
}
|
|
@@ -19105,6 +19106,7 @@ function applyResolvedValues(item, field, cacheMap) {
|
|
|
19105
19106
|
else if (Array.isArray(value)) {
|
|
19106
19107
|
setValueByPath(item, field, value.map((id) => {
|
|
19107
19108
|
var _a;
|
|
19109
|
+
console.log("🚀 ~ applyResolvedValues ~ id:", id);
|
|
19108
19110
|
const key = normalizeId(id);
|
|
19109
19111
|
return (_a = cacheMap.get(key)) !== null && _a !== void 0 ? _a : id;
|
|
19110
19112
|
}));
|
|
@@ -19192,9 +19194,7 @@ async function getCachedAndUncachedItems(ids, cacheGetter) {
|
|
|
19192
19194
|
async function dataLink(data, schema) {
|
|
19193
19195
|
const isArray = Array.isArray(data);
|
|
19194
19196
|
const sourceData = isArray ? data : [data];
|
|
19195
|
-
console.log("🚀 ~ dataLink ~ sourceData:", sourceData);
|
|
19196
19197
|
const result = sourceData.map((item) => ({ ...item }));
|
|
19197
|
-
console.log("🚀 ~ dataLink ~ result:", result);
|
|
19198
19198
|
for (const { field, service, path, headers, cacheGetter } of schema) {
|
|
19199
19199
|
const allIds = Array.from(new Set(sourceData.flatMap((item) => extractIdsFromField(item, field))));
|
|
19200
19200
|
if (allIds.length === 0)
|
|
@@ -19208,7 +19208,6 @@ async function dataLink(data, schema) {
|
|
|
19208
19208
|
}
|
|
19209
19209
|
}
|
|
19210
19210
|
}
|
|
19211
|
-
console.log("🚀 ~ dataLink ~ result:", result);
|
|
19212
19211
|
for (const item of result) {
|
|
19213
19212
|
applyResolvedValues(item, field, cacheMap);
|
|
19214
19213
|
}
|