@ecency/sdk 1.3.8 → 1.4.0
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/node/index.cjs
CHANGED
|
@@ -97,6 +97,10 @@ exports.ConfigManager = void 0;
|
|
|
97
97
|
CONFIG.queryClient = client;
|
|
98
98
|
}
|
|
99
99
|
ConfigManager2.setQueryClient = setQueryClient;
|
|
100
|
+
function setPrivateApiHost(host) {
|
|
101
|
+
CONFIG.privateApiHost = host;
|
|
102
|
+
}
|
|
103
|
+
ConfigManager2.setPrivateApiHost = setPrivateApiHost;
|
|
100
104
|
function analyzeRedosRisk(pattern) {
|
|
101
105
|
if (/(\([^)]*[*+{][^)]*\))[*+{]/.test(pattern)) {
|
|
102
106
|
return { safe: false, reason: "nested quantifiers detected" };
|
|
@@ -3689,7 +3693,7 @@ function buildQuery(entry, retry = 3) {
|
|
|
3689
3693
|
q += ` -dporn type:post`;
|
|
3690
3694
|
let tags;
|
|
3691
3695
|
if (json_metadata && json_metadata.tags && Array.isArray(json_metadata.tags)) {
|
|
3692
|
-
tags = json_metadata.tags.filter((tag) => tag && tag !== "").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
|
|
3696
|
+
tags = json_metadata.tags.filter((tag) => tag && tag !== "" && typeof tag === "string").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
|
|
3693
3697
|
}
|
|
3694
3698
|
if (tags && tags.length > 0) {
|
|
3695
3699
|
q += ` tag:${tags}`;
|