buzzcasting-storage 3.15.9 → 3.15.11
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/buzzcasting-storage.esm.js +37 -80
- package/package.json +2 -2
|
@@ -76,51 +76,8 @@ at(
|
|
|
76
76
|
"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
|
|
77
77
|
);
|
|
78
78
|
at("script,style");
|
|
79
|
-
new
|
|
80
|
-
|
|
81
|
-
`const LOG_LEVELS = new Set([1,2,3,4])
|
|
82
|
-
self.onmessage = function(e) {
|
|
83
|
-
switch(e.data.action){
|
|
84
|
-
case 'add':
|
|
85
|
-
LOG_LEVELS.add(e.data.level);
|
|
86
|
-
break;
|
|
87
|
-
case 'clear':
|
|
88
|
-
LOG_LEVELS.clear();
|
|
89
|
-
break;
|
|
90
|
-
case 'delete':
|
|
91
|
-
LOG_LEVELS.delete(e.data.level);
|
|
92
|
-
break;
|
|
93
|
-
case 'list':
|
|
94
|
-
e.data.message.push([...LOG_LEVELS])
|
|
95
|
-
console.log(...e.data.message);
|
|
96
|
-
break;
|
|
97
|
-
case 'log':
|
|
98
|
-
if(LOG_LEVELS.has(e.data.level)) {
|
|
99
|
-
switch (true) {
|
|
100
|
-
case e.data.level > 3:
|
|
101
|
-
console.debug(...e.data.message);
|
|
102
|
-
break;
|
|
103
|
-
case e.data.level > 2:
|
|
104
|
-
console.info(...e.data.message);
|
|
105
|
-
break;
|
|
106
|
-
case e.data.level > 1:
|
|
107
|
-
console.warn(...e.data.message);
|
|
108
|
-
break;
|
|
109
|
-
case e.data.level > 0:
|
|
110
|
-
console.error(...e.data.message);
|
|
111
|
-
break;
|
|
112
|
-
default:
|
|
113
|
-
console.info(...e.data.message);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
}`
|
|
119
|
-
],
|
|
120
|
-
{ type: "text/javascript" }
|
|
121
|
-
);
|
|
122
|
-
const j = async (f = 0, t) => {
|
|
123
|
-
window.__bc.logger.postMessage({ action: "log", level: f, message: t });
|
|
79
|
+
const Ra = new BroadcastChannel("logging"), j = async (f = 0, t) => {
|
|
80
|
+
Ra.postMessage({ action: "log", level: f, message: t });
|
|
124
81
|
}, wt = (f) => {
|
|
125
82
|
switch (f?.type) {
|
|
126
83
|
case S.MESSAGES:
|
|
@@ -137,7 +94,7 @@ function Y(f) {
|
|
|
137
94
|
let t = `${f.type}.${f.topics}`;
|
|
138
95
|
return f.order && (t += `.${f.order}`), f.period && (t += `.${f.period}`), t;
|
|
139
96
|
}
|
|
140
|
-
function
|
|
97
|
+
function xa(f) {
|
|
141
98
|
if (f.widget === void 0) {
|
|
142
99
|
const t = f.topics?.split("-");
|
|
143
100
|
t && t.length > 1 ? (f.dashboard = t ? t[0] : "", f.widget = t ? t[1] : "") : (f.widget = f.topics, f.dashboard = f.slide);
|
|
@@ -161,8 +118,8 @@ function Ot(f, t) {
|
|
|
161
118
|
}
|
|
162
119
|
return t;
|
|
163
120
|
}
|
|
164
|
-
const
|
|
165
|
-
async function*
|
|
121
|
+
const ka = "3.15.10";
|
|
122
|
+
async function* Ca(f) {
|
|
166
123
|
const t = f.pipeThrough(new TextDecoderStream("utf-8")).getReader();
|
|
167
124
|
let o = "";
|
|
168
125
|
for (; ; ) {
|
|
@@ -176,7 +133,7 @@ async function* ka(f) {
|
|
|
176
133
|
}
|
|
177
134
|
}
|
|
178
135
|
}
|
|
179
|
-
class
|
|
136
|
+
class $a {
|
|
180
137
|
options;
|
|
181
138
|
url;
|
|
182
139
|
constructor(t) {
|
|
@@ -255,7 +212,7 @@ class Ca {
|
|
|
255
212
|
method: "post"
|
|
256
213
|
}
|
|
257
214
|
);
|
|
258
|
-
for await (const y of
|
|
215
|
+
for await (const y of Ca(g.body))
|
|
259
216
|
console.log("Received", y);
|
|
260
217
|
}
|
|
261
218
|
async hideMessage(t) {
|
|
@@ -519,16 +476,16 @@ class Ca {
|
|
|
519
476
|
}).then((y) => y.json()).catch((y) => ({ succes: !1, message: y, data: [] }));
|
|
520
477
|
}
|
|
521
478
|
}
|
|
522
|
-
var
|
|
523
|
-
function
|
|
479
|
+
var ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
480
|
+
function Ga(f) {
|
|
524
481
|
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
525
482
|
}
|
|
526
|
-
var tr = { exports: {} },
|
|
527
|
-
function
|
|
483
|
+
var tr = { exports: {} }, Ma = tr.exports, Cn;
|
|
484
|
+
function Ka() {
|
|
528
485
|
return Cn || (Cn = 1, function(f, t) {
|
|
529
486
|
(function(o, u) {
|
|
530
487
|
f.exports = u();
|
|
531
|
-
})(
|
|
488
|
+
})(Ma, function() {
|
|
532
489
|
var o = function(e, r) {
|
|
533
490
|
return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
|
|
534
491
|
n.__proto__ = a;
|
|
@@ -545,7 +502,7 @@ function Ma() {
|
|
|
545
502
|
for (var a, s = 0, c = r.length; s < c; s++) !a && s in r || ((a = a || Array.prototype.slice.call(r, 0, s))[s] = r[s]);
|
|
546
503
|
return e.concat(a || Array.prototype.slice.call(r));
|
|
547
504
|
}
|
|
548
|
-
var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window :
|
|
505
|
+
var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ja, I = Object.keys, M = Array.isArray;
|
|
549
506
|
function te(e, r) {
|
|
550
507
|
return typeof r != "object" || I(r).forEach(function(n) {
|
|
551
508
|
e[n] = r[n];
|
|
@@ -3534,21 +3491,21 @@ function Ma() {
|
|
|
3534
3491
|
});
|
|
3535
3492
|
}(tr)), tr.exports;
|
|
3536
3493
|
}
|
|
3537
|
-
var
|
|
3538
|
-
const Fr = /* @__PURE__ */
|
|
3494
|
+
var La = Ka();
|
|
3495
|
+
const Fr = /* @__PURE__ */ Ga(La), $n = Symbol.for("Dexie"), St = globalThis[$n] || (globalThis[$n] = Fr);
|
|
3539
3496
|
if (Fr.semVer !== St.semVer)
|
|
3540
3497
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Fr.semVer} and ${St.semVer}`);
|
|
3541
3498
|
const {
|
|
3542
|
-
liveQuery:
|
|
3543
|
-
mergeRanges:
|
|
3544
|
-
rangesOverlap:
|
|
3545
|
-
RangeSet:
|
|
3546
|
-
cmp:
|
|
3547
|
-
Entity:
|
|
3548
|
-
PropModification:
|
|
3549
|
-
replacePrefix:
|
|
3550
|
-
add:
|
|
3551
|
-
remove:
|
|
3499
|
+
liveQuery: Wa,
|
|
3500
|
+
mergeRanges: Fa,
|
|
3501
|
+
rangesOverlap: Ha,
|
|
3502
|
+
RangeSet: Va,
|
|
3503
|
+
cmp: za,
|
|
3504
|
+
Entity: Ya,
|
|
3505
|
+
PropModification: Xa,
|
|
3506
|
+
replacePrefix: Qa,
|
|
3507
|
+
add: Ja,
|
|
3508
|
+
remove: Za
|
|
3552
3509
|
} = St;
|
|
3553
3510
|
class Gn {
|
|
3554
3511
|
db;
|
|
@@ -4093,7 +4050,7 @@ class Gn {
|
|
|
4093
4050
|
* @param query IQuery
|
|
4094
4051
|
* @returns null
|
|
4095
4052
|
*/
|
|
4096
|
-
subscribe = (t) => (t =
|
|
4053
|
+
subscribe = (t) => (t = xa(t), this.subscribers.filter(
|
|
4097
4054
|
(u) => u.widget === t.widget
|
|
4098
4055
|
).length > 0 || (t.type === S.MESSAGES && (t = Ot(this.options, t)), console.info(
|
|
4099
4056
|
"%cstorage%c %csubscribe",
|
|
@@ -4361,7 +4318,7 @@ function Hr(f) {
|
|
|
4361
4318
|
f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => o(f.error);
|
|
4362
4319
|
});
|
|
4363
4320
|
}
|
|
4364
|
-
function
|
|
4321
|
+
function Ba(f, t) {
|
|
4365
4322
|
let o;
|
|
4366
4323
|
const u = () => {
|
|
4367
4324
|
if (o)
|
|
@@ -4376,7 +4333,7 @@ function La(f, t) {
|
|
|
4376
4333
|
}
|
|
4377
4334
|
let Wr;
|
|
4378
4335
|
function Mn() {
|
|
4379
|
-
return Wr || (Wr =
|
|
4336
|
+
return Wr || (Wr = Ba("keyval-store", "keyval")), Wr;
|
|
4380
4337
|
}
|
|
4381
4338
|
function _e(f, t = Mn()) {
|
|
4382
4339
|
return t("readonly", (o) => Hr(o.get(f)));
|
|
@@ -5698,7 +5655,7 @@ class Un {
|
|
|
5698
5655
|
success: !1
|
|
5699
5656
|
});
|
|
5700
5657
|
}
|
|
5701
|
-
class
|
|
5658
|
+
class qa {
|
|
5702
5659
|
sm;
|
|
5703
5660
|
api;
|
|
5704
5661
|
bc;
|
|
@@ -5711,8 +5668,8 @@ class Za {
|
|
|
5711
5668
|
i.PRESENTATION,
|
|
5712
5669
|
t.presentation,
|
|
5713
5670
|
Q.VERSION,
|
|
5714
|
-
|
|
5715
|
-
]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new
|
|
5671
|
+
ka
|
|
5672
|
+
]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new $a(t), t.storage) {
|
|
5716
5673
|
case pe.DEXIE:
|
|
5717
5674
|
this.sm = new Gn(t);
|
|
5718
5675
|
break;
|
|
@@ -6003,7 +5960,7 @@ class Za {
|
|
|
6003
5960
|
getHash = async (t, o) => await this.sm?.getHash(t, o);
|
|
6004
5961
|
setHash = async (t, o) => await this.sm?.setHash(t, o) ?? 400;
|
|
6005
5962
|
}
|
|
6006
|
-
class
|
|
5963
|
+
class Ua {
|
|
6007
5964
|
sm;
|
|
6008
5965
|
constructor(t) {
|
|
6009
5966
|
switch (this.sm = null, t.storage) {
|
|
@@ -6085,7 +6042,7 @@ class Ba {
|
|
|
6085
6042
|
success: !1
|
|
6086
6043
|
}) : await this.sm?.getSeries(t);
|
|
6087
6044
|
}
|
|
6088
|
-
class
|
|
6045
|
+
class es {
|
|
6089
6046
|
storageReader;
|
|
6090
6047
|
broadcastChannel;
|
|
6091
6048
|
element;
|
|
@@ -6103,7 +6060,7 @@ class qa {
|
|
|
6103
6060
|
const g = { ...t.dataset };
|
|
6104
6061
|
delete g.hmr;
|
|
6105
6062
|
const y = window.__bc.opts;
|
|
6106
|
-
g.presentation = y?.presentation ?? `${u} not found`, this.query = g, Na(t), this.storageReader = new
|
|
6063
|
+
g.presentation = y?.presentation ?? `${u} not found`, this.query = g, Na(t), this.storageReader = new Ua(y), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
|
|
6107
6064
|
}
|
|
6108
6065
|
addCallbackListener(t) {
|
|
6109
6066
|
this.callbacks.push(t);
|
|
@@ -6306,7 +6263,7 @@ class qa {
|
|
|
6306
6263
|
}
|
|
6307
6264
|
}
|
|
6308
6265
|
export {
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6266
|
+
qa as BuzzcastingStorageManager,
|
|
6267
|
+
Ua as BuzzcastingStorageReader,
|
|
6268
|
+
es as Widget
|
|
6312
6269
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzcasting-storage",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.15.
|
|
4
|
+
"version": "3.15.11",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mark Tamis, TouchFlows SAS",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
44
44
|
"@typescript-eslint/parser": "^8.46.2",
|
|
45
45
|
"@vitest/coverage-v8": "^4.0.1",
|
|
46
|
-
"buzzcasting-utils": "^1.9.
|
|
46
|
+
"buzzcasting-utils": "^1.9.6",
|
|
47
47
|
"camelcase": "^8.0.0",
|
|
48
48
|
"changelogen": "^0.6.2",
|
|
49
49
|
"eslint": "^9.38.0",
|