node-consul-service 1.0.36 → 1.0.38
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 +4 -6
- package/dist/index.esm.js +4 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19458,6 +19458,10 @@ async function dataLink(data, schema) {
|
|
|
19458
19458
|
const result = sourceData.map((item) => ({ ...item }));
|
|
19459
19459
|
await Promise.all(schema.map(async ({ filed, service, path, headers, cacheGetter }) => {
|
|
19460
19460
|
var _a;
|
|
19461
|
+
if (!path.startsWith("/")) {
|
|
19462
|
+
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, !path.startsWith("/"));
|
|
19463
|
+
throw new DataLinkError(service, path, new Error(`Invalid path: "${path}". Path must start with "/"`));
|
|
19464
|
+
}
|
|
19461
19465
|
const uniqueIds = Array.from(new Set(sourceData.flatMap((item) => {
|
|
19462
19466
|
const value = item[filed];
|
|
19463
19467
|
if (typeof value === "string" ||
|
|
@@ -19494,13 +19498,7 @@ async function dataLink(data, schema) {
|
|
|
19494
19498
|
}
|
|
19495
19499
|
});
|
|
19496
19500
|
}
|
|
19497
|
-
// ✅ Validate path
|
|
19498
|
-
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, !path.startsWith("/"));
|
|
19499
|
-
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, path);
|
|
19500
19501
|
if (idsToFetch.length > 0) {
|
|
19501
|
-
if (!path.startsWith("/")) {
|
|
19502
|
-
throw new DataLinkError(service, path, new Error(`Invalid path: "${path}". Path must start with "/"`));
|
|
19503
|
-
}
|
|
19504
19502
|
// ✅ Fetch remaining from service
|
|
19505
19503
|
try {
|
|
19506
19504
|
const response = await callService(service, {
|
package/dist/index.esm.js
CHANGED
|
@@ -19456,6 +19456,10 @@ async function dataLink(data, schema) {
|
|
|
19456
19456
|
const result = sourceData.map((item) => ({ ...item }));
|
|
19457
19457
|
await Promise.all(schema.map(async ({ filed, service, path, headers, cacheGetter }) => {
|
|
19458
19458
|
var _a;
|
|
19459
|
+
if (!path.startsWith("/")) {
|
|
19460
|
+
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, !path.startsWith("/"));
|
|
19461
|
+
throw new DataLinkError(service, path, new Error(`Invalid path: "${path}". Path must start with "/"`));
|
|
19462
|
+
}
|
|
19459
19463
|
const uniqueIds = Array.from(new Set(sourceData.flatMap((item) => {
|
|
19460
19464
|
const value = item[filed];
|
|
19461
19465
|
if (typeof value === "string" ||
|
|
@@ -19492,13 +19496,7 @@ async function dataLink(data, schema) {
|
|
|
19492
19496
|
}
|
|
19493
19497
|
});
|
|
19494
19498
|
}
|
|
19495
|
-
// ✅ Validate path
|
|
19496
|
-
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, !path.startsWith("/"));
|
|
19497
|
-
console.log(`🚀 ~ schema.map ~ !path.startsWith("/"):`, path);
|
|
19498
19499
|
if (idsToFetch.length > 0) {
|
|
19499
|
-
if (!path.startsWith("/")) {
|
|
19500
|
-
throw new DataLinkError(service, path, new Error(`Invalid path: "${path}". Path must start with "/"`));
|
|
19501
|
-
}
|
|
19502
19500
|
// ✅ Fetch remaining from service
|
|
19503
19501
|
try {
|
|
19504
19502
|
const response = await callService(service, {
|