@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.
@@ -1171,6 +1171,11 @@ declare const CONFIG: {
1171
1171
  };
1172
1172
  declare namespace ConfigManager {
1173
1173
  function setQueryClient(client: QueryClient): void;
1174
+ /**
1175
+ * Set the private API host
1176
+ * @param host - The private API host URL (e.g., "https://ecency.com" or "" for relative URLs)
1177
+ */
1178
+ function setPrivateApiHost(host: string): void;
1174
1179
  /**
1175
1180
  * Set DMCA filtering lists
1176
1181
  * @param accounts - List of account usernames to filter (plain strings)
@@ -76,6 +76,10 @@ var ConfigManager;
76
76
  CONFIG.queryClient = client;
77
77
  }
78
78
  ConfigManager2.setQueryClient = setQueryClient;
79
+ function setPrivateApiHost(host) {
80
+ CONFIG.privateApiHost = host;
81
+ }
82
+ ConfigManager2.setPrivateApiHost = setPrivateApiHost;
79
83
  function analyzeRedosRisk(pattern) {
80
84
  if (/(\([^)]*[*+{][^)]*\))[*+{]/.test(pattern)) {
81
85
  return { safe: false, reason: "nested quantifiers detected" };
@@ -3668,7 +3672,7 @@ function buildQuery(entry, retry = 3) {
3668
3672
  q += ` -dporn type:post`;
3669
3673
  let tags;
3670
3674
  if (json_metadata && json_metadata.tags && Array.isArray(json_metadata.tags)) {
3671
- tags = json_metadata.tags.filter((tag) => tag && tag !== "").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
3675
+ tags = json_metadata.tags.filter((tag) => tag && tag !== "" && typeof tag === "string").filter((tag) => !tag.startsWith("hive-")).filter((_tag, ind) => ind < +retry).join(",");
3672
3676
  }
3673
3677
  if (tags && tags.length > 0) {
3674
3678
  q += ` tag:${tags}`;