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