buzzcasting-storage 1.0.11 → 1.0.12

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.
@@ -34,15 +34,13 @@ class hr {
34
34
  };
35
35
  }
36
36
  async get(e) {
37
- let n;
38
- const r = this.auth(), s = this.csrf();
39
- n = { ...r, ...s };
37
+ const n = this.auth(), r = this.csrf(), s = { ...n, ...r };
40
38
  let i = Object.assign({}, e);
41
39
  delete i.type;
42
40
  const o = Object.keys(i).length > 0 ? "?" + new URLSearchParams(i).toString() : "";
43
41
  return await fetch(
44
42
  [this.url, "api", this.options.version, e.type].join("/") + o,
45
- { ...n, method: "get" }
43
+ { ...s, method: "get" }
46
44
  ).then((a) => {
47
45
  if (!a.ok)
48
46
  throw Error(a.statusText);
@@ -2860,7 +2858,9 @@ class rs {
2860
2858
  });
2861
2859
  });
2862
2860
  k(this, "getMessages", async (e) => {
2863
- const n = (l) => l.widget_id === e.widget, r = (l) => l.utc > ((e == null ? void 0 : e.since) || 0), s = (l) => !l.hasOwnProperty("visible") || (l == null ? void 0 : l.visible) !== 0, i = await this.db.table("topics").orderBy("utc").reverse().filter(n).filter(r).filter(s).limit((e == null ? void 0 : e.limit) ?? 25).toArray(), o = i[0].title || "No results", a = i.map((l) => l.message_id), c = await this.db.table("messages").where("id").anyOf(a).toArray().then((l) => l.sort(function(u, d) {
2861
+ const n = (l) => l.widget_id === e.widget, r = (l) => l.utc > ((e == null ? void 0 : e.since) || 0), s = (l) => !l.hasOwnProperty("visible") || (l == null ? void 0 : l.visible) !== 0, i = await this.db.table("topics").orderBy("utc").reverse().filter(n).filter(r).filter(s).limit((e == null ? void 0 : e.limit) ?? 25).toArray(), o = i[0].title || "No results", a = i.map(
2862
+ (l) => l.message_id
2863
+ ), c = await this.db.table("messages").where("id").anyOf(a).toArray().then((l) => l.sort(function(u, d) {
2864
2864
  return d.utc - u.utc;
2865
2865
  }));
2866
2866
  return {
@@ -2886,7 +2886,9 @@ class rs {
2886
2886
  const s = (r = e.topics) == null ? void 0 : r.split("-");
2887
2887
  e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
2888
2888
  }
2889
- this.subscribers.filter((s) => s.widget == e.widget).length > 0 || (e.type === be && (e = Je(this.options, e)), console.log("[storage] subscribe", e), this.subscribers.push(e));
2889
+ this.subscribers.filter(
2890
+ (s) => s.widget == e.widget
2891
+ ).length > 0 || (e.type === be && (e = Je(this.options, e)), console.log("[storage] subscribe", e), this.subscribers.push(e));
2890
2892
  });
2891
2893
  this.options = e, this.db = new me(e.app), this.db.version(2).stores({
2892
2894
  player: "id,title,name,location",
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "mark.tamis@touchflows.com"
6
6
  },
7
7
  "type": "module",
8
- "version": "1.0.11",
8
+ "version": "1.0.12",
9
9
  "private": false,
10
10
  "exports": {
11
11
  ".": {