@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.
@@ -72,6 +72,10 @@ var ConfigManager;
72
72
  CONFIG.queryClient = client;
73
73
  }
74
74
  ConfigManager2.setQueryClient = setQueryClient;
75
+ function setPrivateApiHost(host) {
76
+ CONFIG.privateApiHost = host;
77
+ }
78
+ ConfigManager2.setPrivateApiHost = setPrivateApiHost;
75
79
  function analyzeRedosRisk(pattern) {
76
80
  if (/(\([^)]*[*+{][^)]*\))[*+{]/.test(pattern)) {
77
81
  return { safe: false, reason: "nested quantifiers detected" };
@@ -3664,7 +3668,7 @@ function buildQuery(entry, retry = 3) {
3664
3668
  q += ` -dporn type:post`;
3665
3669
  let tags;
3666
3670
  if (json_metadata && json_metadata.tags && Array.isArray(json_metadata.tags)) {
3667
- tags = json_metadata.tags.filter((tag) => tag && tag !== "").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
3671
+ tags = json_metadata.tags.filter((tag) => tag && tag !== "" && typeof tag === "string").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
3668
3672
  }
3669
3673
  if (tags && tags.length > 0) {
3670
3674
  q += ` tag:${tags}`;