buzzcasting-storage 2.10.7 → 2.10.8

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.
@@ -1,7 +1,7 @@
1
1
  var Ei = Object.defineProperty;
2
2
  var Oi = (v, o, l) => o in v ? Ei(v, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : v[o] = l;
3
3
  var P = (v, o, l) => (Oi(v, typeof o != "symbol" ? o + "" : o, l), l);
4
- const xi = "2.10.6";
4
+ const xi = "2.10.7";
5
5
  class ki {
6
6
  constructor(o) {
7
7
  P(this, "options");
@@ -3273,15 +3273,17 @@ class Tr {
3273
3273
  * @returns IResponse
3274
3274
  */
3275
3275
  P(this, "getCloud", async (o) => {
3276
- const l = await this.db.table(K.CLOUD).where({ id: o.widget }).last().catch(() => (console.warn(
3277
- "%capi%C %ccloud",
3278
- x.API,
3279
- x.NONE,
3280
- x.CLOUD,
3281
- o.slide,
3282
- o.widget
3283
- ), { data: null, message: "Series Data error", success: !1 }));
3284
- return l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l;
3276
+ const l = await this.db.table(K.CLOUD).where({ id: o.widget }).last().catch(() => {
3277
+ console.warn(
3278
+ "%capi%C %ccloud",
3279
+ x.API,
3280
+ x.NONE,
3281
+ x.CLOUD,
3282
+ o.slide,
3283
+ o.widget
3284
+ );
3285
+ });
3286
+ return l === void 0 ? { data: null, message: "Cloud Data error", success: !1 } : (l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l);
3285
3287
  });
3286
3288
  /**
3287
3289
  * Retrieve Cloud Data
@@ -3289,15 +3291,17 @@ class Tr {
3289
3291
  * @returns IResponse
3290
3292
  */
3291
3293
  P(this, "getSeries", async (o) => {
3292
- const l = await this.db.table(K.SERIES).where({ id: o.widget }).last().catch(() => (console.warn(
3293
- "%capi%c %cseries",
3294
- x.API,
3295
- x.NONE,
3296
- x.SERIES,
3297
- o.slide,
3298
- o.widget
3299
- ), { data: null, message: "Series Data error", success: !1 }));
3300
- return l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l;
3294
+ const l = await this.db.table(K.SERIES).where({ id: o.widget }).last().catch(() => {
3295
+ console.warn(
3296
+ "%capi%c %cseries",
3297
+ x.API,
3298
+ x.NONE,
3299
+ x.SERIES,
3300
+ o.slide,
3301
+ o.widget
3302
+ );
3303
+ });
3304
+ return l === void 0 ? { data: null, message: "Series Data error", success: !1 } : (l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l);
3301
3305
  });
3302
3306
  /**
3303
3307
  * Retrieve Cloud Data
@@ -3307,14 +3311,19 @@ class Tr {
3307
3311
  P(this, "getMessages", async (o) => {
3308
3312
  const l = (j) => j.widget_id === o.widget, y = (j) => j.utc > ((o == null ? void 0 : o.since) || 0), I = (j) => (j == null ? void 0 : j.visible) !== 0;
3309
3313
  try {
3310
- const j = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(I).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() => (console.warn(
3311
- "%capi%c %cmessages",
3312
- x.API,
3313
- x.NONE,
3314
- x.MESSAGES,
3315
- o.slide,
3316
- o.widget
3317
- ), { data: null, message: "Messages Data error", success: !1 })), M = j[0] ? j[0].title : "No title", N = j.map(
3314
+ const j = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(I).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() => {
3315
+ console.warn(
3316
+ "%capi%c %cmessages",
3317
+ x.API,
3318
+ x.NONE,
3319
+ x.MESSAGES,
3320
+ o.slide,
3321
+ o.widget
3322
+ );
3323
+ });
3324
+ if (j.length === 0)
3325
+ return { data: null, message: "No Messages error", success: !1 };
3326
+ const M = j[0] ? j[0].title : "No title", N = j.map(
3318
3327
  (be) => be.message_id
3319
3328
  ), te = (await this.db.table(K.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3320
3329
  (be) => be.data
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "2.10.7",
4
+ "version": "2.10.8",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",