pinia-plugin-subscription 1.0.0-beta.11 → 1.0.0-beta.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.
- package/dist/helpers.js +178 -171
- package/dist/helpers.js.map +1 -1
- package/package.json +1 -1
package/dist/helpers.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { T as
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var C = (s, e, t) => e in s ? O(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var p = (s, e, t) => C(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { T as w, g as T, s as j, i as I, h as z, p as S, a as L } from "./chunks/PluginSubscription-BbN48iuP.js";
|
|
5
5
|
import { P as fe, t as he } from "./chunks/PluginSubscription-BbN48iuP.js";
|
|
6
|
-
import { isRef as b, ref as
|
|
6
|
+
import { isRef as b, ref as k, toRef as P } from "vue";
|
|
7
7
|
class ce {
|
|
8
8
|
constructor(e, t) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
p(this, "_createInstance");
|
|
10
|
+
p(this, "_name");
|
|
11
|
+
p(this, "_pluginOptions");
|
|
12
|
+
p(this, "_storeInstance");
|
|
13
|
+
p(this, "_resetStoreCallback");
|
|
14
|
+
p(this, "_storeOnActionSubscription");
|
|
15
|
+
p(this, "_storeMutationSubscription");
|
|
16
|
+
p(this, "_subscriptions");
|
|
17
|
+
p(this, "pluginCreated");
|
|
18
|
+
p(this, "execution");
|
|
19
|
+
p(this, "hydrationScheduler");
|
|
20
20
|
this._name = e, this._createInstance = t;
|
|
21
21
|
}
|
|
22
22
|
get name() {
|
|
@@ -58,19 +58,19 @@ class ce {
|
|
|
58
58
|
}), this._storeInstance ? (this._subscriptions = this._storeInstance.getSubscriptions(), this._storeMutationSubscription = this._storeInstance.storeSubscribe, this._storeOnActionSubscription = this._storeInstance.onAction, this.pluginCreated && this.pluginCreated(e), !0) : !1;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
class
|
|
61
|
+
class M extends w {
|
|
62
62
|
constructor(t, r) {
|
|
63
63
|
super();
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
p(this, "_className", "Store");
|
|
65
|
+
p(this, "_createTracer");
|
|
66
|
+
p(this, "_onAction");
|
|
67
|
+
p(this, "_options");
|
|
68
|
+
p(this, "_store");
|
|
69
|
+
p(this, "_storeSubscribe");
|
|
70
|
+
p(this, "_subscriptions", {});
|
|
71
71
|
if (this._options = r.storeOptions, this._store = t, this.initializeTracer(r), this.trace("instance:created", t.$id), this._options?.enhancedStore) {
|
|
72
|
-
const o =
|
|
73
|
-
o && (
|
|
72
|
+
const o = T(this.store);
|
|
73
|
+
o && (j(o, this.store), this.trace("setup:enhancedStore:success", this.store.$id));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
get onAction() {
|
|
@@ -109,7 +109,7 @@ class P extends C {
|
|
|
109
109
|
return !this._tracer && this._createTracer && (this._tracer = this._createTracer(), this._tracer.scope = this.store.$id), this._tracer;
|
|
110
110
|
}
|
|
111
111
|
addToState(t, r) {
|
|
112
|
-
this.isOptionApi() || b(r) || (r =
|
|
112
|
+
this.isOptionApi() || b(r) || (r = k(r)), this.state[t] = r, this.store[t] = P(this.state, t);
|
|
113
113
|
}
|
|
114
114
|
addSubscription(t, r, o) {
|
|
115
115
|
this._subscriptions[t] = { subscription: r, ...o ?? {} };
|
|
@@ -127,14 +127,14 @@ class P extends C {
|
|
|
127
127
|
return this.getValue(this.state[t]);
|
|
128
128
|
}
|
|
129
129
|
getSubscriptions() {
|
|
130
|
-
if (!
|
|
130
|
+
if (!I(this._subscriptions))
|
|
131
131
|
return this._subscriptions;
|
|
132
132
|
}
|
|
133
133
|
getValue(t) {
|
|
134
134
|
return t?.__v_isRef ? t.value : t;
|
|
135
135
|
}
|
|
136
136
|
hasDeniedFirstChar(t) {
|
|
137
|
-
return
|
|
137
|
+
return z(t);
|
|
138
138
|
}
|
|
139
139
|
static hasRequiredKeys(t) {
|
|
140
140
|
return this._requiredKeys !== void 0 && this._requiredKeys?.every((r) => !!t[r]);
|
|
@@ -154,7 +154,7 @@ class P extends C {
|
|
|
154
154
|
return Object.prototype.hasOwnProperty.call(this.store, t);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
p(M, "_requiredKeys");
|
|
158
158
|
function ae(s, e, t) {
|
|
159
159
|
return {
|
|
160
160
|
name: s,
|
|
@@ -162,7 +162,7 @@ function ae(s, e, t) {
|
|
|
162
162
|
...t
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function R(s) {
|
|
166
166
|
if (typeof s != "function")
|
|
167
167
|
return s;
|
|
168
168
|
try {
|
|
@@ -171,12 +171,12 @@ function M(s) {
|
|
|
171
171
|
return { __tracePayloadError: e };
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class G {
|
|
175
175
|
constructor(e, t, r = {}) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
p(this, "_listeners", []);
|
|
177
|
+
p(this, "_redactor");
|
|
178
|
+
p(this, "_scope");
|
|
179
|
+
p(this, "_source");
|
|
180
180
|
this._redactor = r.redactor, this._scope = r.scope, this._source = e, this._listeners = t;
|
|
181
181
|
}
|
|
182
182
|
get scope() {
|
|
@@ -195,7 +195,7 @@ class R {
|
|
|
195
195
|
this.emit("error", e, t, o, l, r);
|
|
196
196
|
}
|
|
197
197
|
resolveAndRedact(e) {
|
|
198
|
-
const t =
|
|
198
|
+
const t = R(e);
|
|
199
199
|
if (!this._redactor || t === void 0)
|
|
200
200
|
return t;
|
|
201
201
|
try {
|
|
@@ -215,79 +215,79 @@ class R {
|
|
|
215
215
|
for (const a of this._listeners)
|
|
216
216
|
try {
|
|
217
217
|
a.filter(l) && n.push(a);
|
|
218
|
-
} catch (
|
|
219
|
-
console.error("Error in trace listener filter:",
|
|
218
|
+
} catch (i) {
|
|
219
|
+
console.error("Error in trace listener filter:", i);
|
|
220
220
|
}
|
|
221
221
|
return { matched: n, metadata: l };
|
|
222
222
|
}
|
|
223
223
|
emit(e, t, r, o, l, n) {
|
|
224
|
-
const { matched: a, metadata:
|
|
225
|
-
if (!
|
|
224
|
+
const { matched: a, metadata: i } = this._listeners.length === 0 ? { matched: [], metadata: void 0 } : this.matchListeners(e, t, r, l);
|
|
225
|
+
if (!i || a.length === 0) {
|
|
226
226
|
e === "error" && console.error("Unhandled error trace event:", n);
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
const f = {
|
|
230
|
-
...
|
|
230
|
+
...i,
|
|
231
231
|
...n !== void 0 && { error: n },
|
|
232
232
|
...o !== void 0 && { payload: this.resolveAndRedact(o) },
|
|
233
233
|
timestamp: Date.now()
|
|
234
234
|
};
|
|
235
|
-
for (const
|
|
235
|
+
for (const c of a)
|
|
236
236
|
try {
|
|
237
|
-
|
|
238
|
-
} catch (
|
|
239
|
-
console.error("Error in trace listener:",
|
|
237
|
+
c.handler(f);
|
|
238
|
+
} catch (u) {
|
|
239
|
+
console.error("Error in trace listener:", u);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const
|
|
244
|
-
function
|
|
243
|
+
const y = "#f86f63", D = (s, e = "white") => `background-color: ${s}; color: ${e}; padding: 1px; margin-right: 5px; font-size: 12px`;
|
|
244
|
+
function N(s) {
|
|
245
245
|
const { payload: e } = s;
|
|
246
246
|
if (e && Object.keys(e).length > 0)
|
|
247
247
|
return Object.keys(e).reduce((t, r) => (["groupId", "label", "namespace", "scope", "source"].includes(r) || (t[r] = b(e[r]) ? e[r].value : e[r]), t), {});
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function g(s, e, t = "collapsed", r) {
|
|
250
250
|
if (e instanceof Error) {
|
|
251
251
|
console.groupCollapsed(
|
|
252
252
|
"%c%s",
|
|
253
|
-
`color: ${
|
|
253
|
+
`color: ${y}; padding: 1px; margin-right: 5px; font-size: 11px`,
|
|
254
254
|
`[ ${e.name} ] ${e.message}`
|
|
255
255
|
), e.cause && console.log("cause:", e.cause);
|
|
256
|
-
const
|
|
256
|
+
const i = e.stack?.split(`
|
|
257
257
|
`);
|
|
258
|
-
|
|
259
|
-
const
|
|
260
|
-
Array.isArray(
|
|
258
|
+
i && i.forEach((f) => {
|
|
259
|
+
const c = f.split("@");
|
|
260
|
+
Array.isArray(c) && console.log(c[0], c[1]);
|
|
261
261
|
}), console.groupEnd();
|
|
262
262
|
}
|
|
263
263
|
const o = Array.isArray(e);
|
|
264
264
|
if (o ? e.length === 0 : Object.keys(e).length === 0) {
|
|
265
265
|
console.log(
|
|
266
266
|
"%c%s",
|
|
267
|
-
`color: ${
|
|
267
|
+
`color: ${y}; padding: 1px; margin-right: 5px; font-size: 10px`,
|
|
268
268
|
`[ ${s} ] Empty`
|
|
269
269
|
);
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
const a = {
|
|
273
|
+
options: "📚 ",
|
|
274
|
+
store: "🏪 ",
|
|
275
|
+
subscribers: "🧩 ",
|
|
276
|
+
"hooks subscriptions": "🔗 "
|
|
277
|
+
}[s] ?? "";
|
|
272
278
|
if (t === "none" || o && typeof e[0] != "object") {
|
|
273
279
|
console.log(
|
|
274
280
|
"%c%s",
|
|
275
281
|
"color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px",
|
|
276
|
-
`[ ${s} ]`,
|
|
277
|
-
e
|
|
282
|
+
`[ ${a}${s} ]`,
|
|
283
|
+
o && typeof e[0] == "string" ? e.join(", ") : e
|
|
278
284
|
);
|
|
279
285
|
return;
|
|
280
286
|
}
|
|
281
|
-
const a = {
|
|
282
|
-
options: "📚 ",
|
|
283
|
-
store: "🏪 ",
|
|
284
|
-
subscribers: "🧩 ",
|
|
285
|
-
"hooks subscriptions": "🔗 "
|
|
286
|
-
}[s] ?? "";
|
|
287
287
|
if (t === "collapsed" ? r ? console.groupCollapsed(
|
|
288
288
|
"%c%s",
|
|
289
289
|
"color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px",
|
|
290
|
-
`${a}
|
|
290
|
+
`${a}${s}`,
|
|
291
291
|
r
|
|
292
292
|
) : console.groupCollapsed(
|
|
293
293
|
"%c%s",
|
|
@@ -298,46 +298,49 @@ function d(s, e, t = "collapsed", r) {
|
|
|
298
298
|
"color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px",
|
|
299
299
|
`[ ${a} ${s} ]`
|
|
300
300
|
), o && typeof e[0] == "object")
|
|
301
|
-
e.
|
|
302
|
-
|
|
301
|
+
e[0]?.name ? console.log(e.reduce((i, f) => (i && (i += `\r
|
|
302
|
+
`), i += `- ${f.name}`, i), "")) : e[0]?._id ? console.log(e.reduce((i, f) => (i && (i += `\r
|
|
303
|
+
`), i += `- ${f._id}`, i), "")) : e.forEach((i) => {
|
|
304
|
+
i.name ? g(i.name, i) : i._id ? g(i._id, i) : console.dir(i);
|
|
303
305
|
});
|
|
304
306
|
else {
|
|
305
|
-
let
|
|
307
|
+
let i = [];
|
|
306
308
|
Object.keys(e).forEach((f) => {
|
|
307
309
|
if (f === "groupId")
|
|
308
310
|
return;
|
|
309
|
-
const
|
|
310
|
-
if (typeof
|
|
311
|
-
Array.isArray(
|
|
311
|
+
const c = e[f];
|
|
312
|
+
if (typeof c == "object")
|
|
313
|
+
Array.isArray(c) ? typeof c[0] == "object" ? g(f, c, "expanded") : typeof c[0] == "string" ? g(f, c.map((u) => `\r
|
|
314
|
+
- ${u}`), "expanded") : console.log(
|
|
312
315
|
"%c%s",
|
|
313
316
|
"color: #cae38f; padding: 1px; margin-right: 5px; font-size: 10px",
|
|
314
317
|
`[ ${f} ]`,
|
|
315
|
-
b(
|
|
316
|
-
) :
|
|
317
|
-
else if (!
|
|
318
|
-
|
|
318
|
+
b(c) ? c.value : c
|
|
319
|
+
) : c instanceof Error ? console.log(f, { name: c.name, message: c.message, stack: c.stack }) : g(f, Object.assign({}, c), "expanded");
|
|
320
|
+
else if (!c)
|
|
321
|
+
i.push(f);
|
|
319
322
|
else {
|
|
320
|
-
const
|
|
323
|
+
const u = typeof c;
|
|
321
324
|
console.log(
|
|
322
325
|
"%c%s",
|
|
323
326
|
"color: #b0fa05; padding: 1px; margin-right: 5px; font-size: 10px",
|
|
324
327
|
`[ ${f} ]`,
|
|
325
|
-
|
|
328
|
+
u === "function" ? u : c
|
|
326
329
|
);
|
|
327
330
|
}
|
|
328
|
-
}),
|
|
331
|
+
}), i.length && console.log(
|
|
329
332
|
"%c%s",
|
|
330
333
|
"color: #f86f63; font-size: 9px",
|
|
331
334
|
"[ Empty properties ]",
|
|
332
|
-
|
|
335
|
+
i
|
|
333
336
|
);
|
|
334
337
|
}
|
|
335
338
|
console.groupEnd();
|
|
336
339
|
}
|
|
337
|
-
function
|
|
338
|
-
const e =
|
|
340
|
+
function W(s) {
|
|
341
|
+
const e = N(s);
|
|
339
342
|
if (e && Object.keys(e).length > 0) {
|
|
340
|
-
|
|
343
|
+
g(s.label, e, "collapsed", s.source);
|
|
341
344
|
return;
|
|
342
345
|
}
|
|
343
346
|
console.log(
|
|
@@ -376,19 +379,23 @@ function _(s) {
|
|
|
376
379
|
console.groupCollapsed("[mutation]"), console.dir(t), console.groupEnd();
|
|
377
380
|
break;
|
|
378
381
|
case "options":
|
|
379
|
-
|
|
382
|
+
g(e, t?.storeOptions ?? t);
|
|
380
383
|
break;
|
|
381
384
|
case "payload":
|
|
382
385
|
_(t);
|
|
383
386
|
break;
|
|
384
387
|
case "store":
|
|
385
|
-
|
|
388
|
+
g(e, {
|
|
386
389
|
$state: t.$state,
|
|
387
390
|
$actions: Object.keys(t).reduce((r, o) => (o.startsWith("$") && !["$id", "$state"].includes(o) || o.startsWith("_") || (typeof t[o] != "function" ? (r.computed || (r.computed = []), r.computed.push(o)) : r[o] = t[o]), r), {})
|
|
388
391
|
});
|
|
389
392
|
break;
|
|
393
|
+
case "subscribers":
|
|
394
|
+
g(e, t.map((r) => `\r
|
|
395
|
+
- ${r.name}`));
|
|
396
|
+
break;
|
|
390
397
|
default:
|
|
391
|
-
|
|
398
|
+
g(e, t);
|
|
392
399
|
}
|
|
393
400
|
break;
|
|
394
401
|
case "function":
|
|
@@ -399,7 +406,7 @@ function _(s) {
|
|
|
399
406
|
}
|
|
400
407
|
});
|
|
401
408
|
}
|
|
402
|
-
function
|
|
409
|
+
function q(s, e) {
|
|
403
410
|
if (!s)
|
|
404
411
|
throw new Error("Style instructions are required");
|
|
405
412
|
console.log(
|
|
@@ -409,7 +416,7 @@ function W(s, e) {
|
|
|
409
416
|
...e
|
|
410
417
|
);
|
|
411
418
|
}
|
|
412
|
-
function
|
|
419
|
+
function K(s, e, t) {
|
|
413
420
|
if (!s)
|
|
414
421
|
throw new Error("Style instructions are required");
|
|
415
422
|
const r = e.shift(), o = e[0];
|
|
@@ -444,16 +451,16 @@ function q(s, e, t) {
|
|
|
444
451
|
}
|
|
445
452
|
}), console.groupEnd();
|
|
446
453
|
}
|
|
447
|
-
class
|
|
454
|
+
class V {
|
|
448
455
|
constructor() {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
456
|
+
p(this, "_bgColor", "transparent");
|
|
457
|
+
p(this, "_color", "#f2f286");
|
|
458
|
+
p(this, "_icon", "🍍⚡");
|
|
459
|
+
p(this, "_errorBgColor", "#d24545");
|
|
460
|
+
p(this, "_errorColor", "white");
|
|
461
|
+
p(this, "_errorIcon", "🍍⚠️");
|
|
462
|
+
p(this, "_pluginName");
|
|
463
|
+
p(this, "_styles", {
|
|
457
464
|
error: { bgColor: this._errorBgColor, color: this._errorColor, icon: this._errorIcon },
|
|
458
465
|
info: { bgColor: this._bgColor, color: this._color, icon: this._icon }
|
|
459
466
|
});
|
|
@@ -464,7 +471,7 @@ class K {
|
|
|
464
471
|
` : e;
|
|
465
472
|
}
|
|
466
473
|
generateStyle(e) {
|
|
467
|
-
return
|
|
474
|
+
return D(e.bgColor, e.color);
|
|
468
475
|
}
|
|
469
476
|
getStyleDefinition(e) {
|
|
470
477
|
return this._styles[e ?? "info"];
|
|
@@ -485,16 +492,16 @@ class K {
|
|
|
485
492
|
return typeof e == "string" ? [e] : Array.isArray(e) ? [e.shift(), ...e] : [e];
|
|
486
493
|
}
|
|
487
494
|
useLog(e, t) {
|
|
488
|
-
|
|
495
|
+
q(
|
|
489
496
|
this.generateStyle(e),
|
|
490
497
|
this.rebuildArgs(t)
|
|
491
498
|
);
|
|
492
499
|
}
|
|
493
500
|
}
|
|
494
|
-
class
|
|
501
|
+
class F extends V {
|
|
495
502
|
constructor(t) {
|
|
496
503
|
super();
|
|
497
|
-
|
|
504
|
+
p(this, "_pluginName", S);
|
|
498
505
|
t && (this._pluginName = t);
|
|
499
506
|
}
|
|
500
507
|
logGroup(t) {
|
|
@@ -508,29 +515,29 @@ class V extends K {
|
|
|
508
515
|
"%c%s",
|
|
509
516
|
"color: #f1f6b7; padding: 1px; margin-right: 5px; font-size: 11px",
|
|
510
517
|
"[ ✨ traces ]"
|
|
511
|
-
), t.forEach((l) =>
|
|
518
|
+
), t.forEach((l) => W(l[1])), console.groupEnd(), console.groupEnd();
|
|
512
519
|
}
|
|
513
520
|
useLog(t, r) {
|
|
514
|
-
|
|
521
|
+
K(
|
|
515
522
|
this.generateStyle(t),
|
|
516
523
|
this.rebuildArgs(r),
|
|
517
524
|
this._pluginName
|
|
518
525
|
);
|
|
519
526
|
}
|
|
520
527
|
}
|
|
521
|
-
function
|
|
528
|
+
function $(s) {
|
|
522
529
|
const e = Object.keys(s).reduce((t, r) => (r !== "level" && r !== "timestamp" && (t[r] = s[r]), t), {});
|
|
523
|
-
return [
|
|
530
|
+
return [A(s), e];
|
|
524
531
|
}
|
|
525
|
-
function
|
|
532
|
+
function A(s) {
|
|
526
533
|
return s.scope ? `${s.label} [${s.scope}]` : `${s.label}`;
|
|
527
534
|
}
|
|
528
535
|
function H(s, e) {
|
|
529
536
|
const t = e.level === "error" ? "error" : "log";
|
|
530
|
-
s[t](
|
|
537
|
+
s[t](...$(e));
|
|
531
538
|
}
|
|
532
539
|
function B(s = "scope") {
|
|
533
|
-
const e = new
|
|
540
|
+
const e = new F(), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
534
541
|
function o(n) {
|
|
535
542
|
t.has(n) || t.set(n, []), r.set(n, (r.get(n) ?? 0) + 1);
|
|
536
543
|
}
|
|
@@ -540,9 +547,9 @@ function B(s = "scope") {
|
|
|
540
547
|
e.error(`No group found for key "${n}"`);
|
|
541
548
|
return;
|
|
542
549
|
}
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
545
|
-
r.set(n,
|
|
550
|
+
const i = (r.get(n) ?? 1) - 1;
|
|
551
|
+
if (i > 0) {
|
|
552
|
+
r.set(n, i);
|
|
546
553
|
return;
|
|
547
554
|
}
|
|
548
555
|
a.length && e.logGroup(a), t.delete(n), r.delete(n);
|
|
@@ -556,52 +563,52 @@ function B(s = "scope") {
|
|
|
556
563
|
H(e, n);
|
|
557
564
|
return;
|
|
558
565
|
}
|
|
559
|
-
t.get(a)?.push(
|
|
566
|
+
t.get(a)?.[0]?.[0] !== A(n) && t.get(a)?.push($(n));
|
|
560
567
|
}
|
|
561
568
|
};
|
|
562
569
|
}
|
|
563
570
|
function E(s, e = !0, t) {
|
|
564
571
|
return (r) => s[t](({ comparator: o = "equals", target: l, value: n }) => {
|
|
565
|
-
if (l === "namespace" && e &&
|
|
572
|
+
if (l === "namespace" && e && v(r))
|
|
566
573
|
return !0;
|
|
567
574
|
const a = r[l];
|
|
568
575
|
if (typeof a != "string") return !1;
|
|
569
|
-
let
|
|
576
|
+
let i = !1;
|
|
570
577
|
switch (o) {
|
|
571
578
|
case "equals":
|
|
572
|
-
|
|
579
|
+
i = a === n;
|
|
573
580
|
break;
|
|
574
581
|
case "contains":
|
|
575
|
-
|
|
582
|
+
i = a.includes(n);
|
|
576
583
|
break;
|
|
577
584
|
case "startsWith":
|
|
578
|
-
|
|
585
|
+
i = a.startsWith(n);
|
|
579
586
|
break;
|
|
580
587
|
case "endsWith":
|
|
581
|
-
|
|
588
|
+
i = a.endsWith(n);
|
|
582
589
|
break;
|
|
583
590
|
default:
|
|
584
|
-
|
|
591
|
+
i = !1;
|
|
585
592
|
break;
|
|
586
593
|
}
|
|
587
|
-
return
|
|
594
|
+
return i;
|
|
588
595
|
});
|
|
589
596
|
}
|
|
590
597
|
function U(s, e = !0, t = "every", r = "scope") {
|
|
591
598
|
return {
|
|
592
599
|
groupBy: r,
|
|
593
600
|
...B(r),
|
|
594
|
-
...
|
|
601
|
+
...X(s, e, t)
|
|
595
602
|
};
|
|
596
603
|
}
|
|
597
|
-
function
|
|
604
|
+
function X(s, e = !0, t = "every") {
|
|
598
605
|
return Array.isArray(s) ? { filter: E(s, e, t) } : {
|
|
599
606
|
...s,
|
|
600
607
|
filter: Array.isArray(s.filter) ? E(s.filter, e, t) : s.filter
|
|
601
608
|
};
|
|
602
609
|
}
|
|
603
|
-
function
|
|
604
|
-
return s?.source === S && (!s?.namespace || s.namespace.startsWith(
|
|
610
|
+
function v(s) {
|
|
611
|
+
return s?.source === S && (!s?.namespace || s.namespace.startsWith(L));
|
|
605
612
|
}
|
|
606
613
|
function J() {
|
|
607
614
|
try {
|
|
@@ -632,40 +639,40 @@ function te(s) {
|
|
|
632
639
|
}
|
|
633
640
|
function re(s = !0) {
|
|
634
641
|
const { includeDefaults: e = !0, keys: t = [], replacement: r = Q } = s === !0 ? {} : s, o = ee([...e ? Y : [], ...t]);
|
|
635
|
-
function l(n, a,
|
|
642
|
+
function l(n, a, i) {
|
|
636
643
|
if (!te(n))
|
|
637
644
|
return n;
|
|
638
645
|
const f = a.get(n);
|
|
639
646
|
if (f !== void 0)
|
|
640
647
|
return f;
|
|
641
|
-
if (
|
|
648
|
+
if (i >= Z)
|
|
642
649
|
return "[MaxDepth]";
|
|
643
650
|
if (n instanceof Map) {
|
|
644
|
-
const
|
|
645
|
-
return a.set(n,
|
|
646
|
-
|
|
647
|
-
}),
|
|
651
|
+
const u = /* @__PURE__ */ new Map();
|
|
652
|
+
return a.set(n, u), n.forEach((h, d) => {
|
|
653
|
+
u.set(d, typeof d == "string" && o(d) ? r : l(h, a, i + 1));
|
|
654
|
+
}), u;
|
|
648
655
|
}
|
|
649
656
|
if (n instanceof Set) {
|
|
650
|
-
const
|
|
651
|
-
return a.set(n,
|
|
657
|
+
const u = /* @__PURE__ */ new Set();
|
|
658
|
+
return a.set(n, u), n.forEach((h) => u.add(l(h, a, i + 1))), u;
|
|
652
659
|
}
|
|
653
660
|
if (Array.isArray(n)) {
|
|
654
|
-
const
|
|
655
|
-
return a.set(n,
|
|
661
|
+
const u = [];
|
|
662
|
+
return a.set(n, u), n.forEach((h) => u.push(l(h, a, i + 1))), u;
|
|
656
663
|
}
|
|
657
|
-
const
|
|
658
|
-
a.set(n,
|
|
659
|
-
for (const
|
|
660
|
-
const h = o(
|
|
661
|
-
Object.defineProperty(
|
|
664
|
+
const c = {};
|
|
665
|
+
a.set(n, c);
|
|
666
|
+
for (const u of Object.keys(n)) {
|
|
667
|
+
const h = o(u) ? r : l(n[u], a, i + 1);
|
|
668
|
+
Object.defineProperty(c, u, {
|
|
662
669
|
configurable: !0,
|
|
663
670
|
enumerable: !0,
|
|
664
671
|
value: h,
|
|
665
672
|
writable: !0
|
|
666
673
|
});
|
|
667
674
|
}
|
|
668
|
-
return
|
|
675
|
+
return c;
|
|
669
676
|
}
|
|
670
677
|
return (n) => l(n, /* @__PURE__ */ new WeakMap(), 0);
|
|
671
678
|
}
|
|
@@ -673,47 +680,47 @@ const se = () => {
|
|
|
673
680
|
};
|
|
674
681
|
function ue({ enabled: s = !J(), redact: e = !1 } = {}) {
|
|
675
682
|
const t = e ? re(e === !0 ? !0 : e) : void 0, r = [];
|
|
676
|
-
function o(
|
|
683
|
+
function o(c, { context: u = !0, filterMode: h = "every", groupBy: d = "scope" } = {}) {
|
|
677
684
|
if (!s)
|
|
678
685
|
return se;
|
|
679
686
|
const m = U(
|
|
680
|
-
|
|
681
|
-
!!
|
|
687
|
+
c,
|
|
688
|
+
!!u,
|
|
682
689
|
h ?? "every",
|
|
683
|
-
|
|
690
|
+
d ?? "scope"
|
|
684
691
|
);
|
|
685
692
|
return r.push(m), () => {
|
|
686
|
-
const
|
|
687
|
-
|
|
693
|
+
const x = r.indexOf(m);
|
|
694
|
+
x !== -1 && r.splice(x, 1);
|
|
688
695
|
};
|
|
689
696
|
}
|
|
690
|
-
function l(
|
|
697
|
+
function l(c, u = !0) {
|
|
691
698
|
return o(
|
|
692
|
-
|
|
693
|
-
{ context:
|
|
699
|
+
c.map((h) => ({ target: "scope", value: h })),
|
|
700
|
+
{ context: u, filterMode: "some", groupBy: "scope" }
|
|
694
701
|
);
|
|
695
702
|
}
|
|
696
703
|
function n() {
|
|
697
704
|
r.length = 0;
|
|
698
705
|
}
|
|
699
|
-
function a(
|
|
700
|
-
const
|
|
701
|
-
groupId:
|
|
702
|
-
label:
|
|
703
|
-
level:
|
|
704
|
-
namespace:
|
|
705
|
-
scope:
|
|
706
|
-
source:
|
|
706
|
+
function a(c) {
|
|
707
|
+
const u = {
|
|
708
|
+
groupId: c.groupId,
|
|
709
|
+
label: c.label,
|
|
710
|
+
level: c.level,
|
|
711
|
+
namespace: c.namespace,
|
|
712
|
+
scope: c.scope,
|
|
713
|
+
source: c.source
|
|
707
714
|
};
|
|
708
|
-
return r.filter((h) => h.filter(
|
|
715
|
+
return r.filter((h) => h.filter(u));
|
|
709
716
|
}
|
|
710
|
-
function
|
|
717
|
+
function i() {
|
|
711
718
|
return r.length > 0;
|
|
712
719
|
}
|
|
713
|
-
function f(
|
|
714
|
-
r.length && a(
|
|
715
|
-
const
|
|
716
|
-
typeof
|
|
720
|
+
function f(c, u) {
|
|
721
|
+
r.length && a(u).forEach((h) => {
|
|
722
|
+
const d = u.groupId ?? u[h.groupBy];
|
|
723
|
+
typeof d == "string" && h[c](d);
|
|
717
724
|
});
|
|
718
725
|
}
|
|
719
726
|
return {
|
|
@@ -721,26 +728,26 @@ function ue({ enabled: s = !J(), redact: e = !1 } = {}) {
|
|
|
721
728
|
addScopesListener: l,
|
|
722
729
|
clearTraceListeners: n,
|
|
723
730
|
tracerHandler: {
|
|
724
|
-
closeGroup: (
|
|
725
|
-
createTracer: (
|
|
726
|
-
hasTraceListeners:
|
|
727
|
-
startGroup: (
|
|
731
|
+
closeGroup: (c) => f("logGroup", c),
|
|
732
|
+
createTracer: (c, u = {}) => new G(c, r, { redactor: t, ...u }),
|
|
733
|
+
hasTraceListeners: i,
|
|
734
|
+
startGroup: (c) => f("createGroup", c)
|
|
728
735
|
},
|
|
729
|
-
hasTraceListeners:
|
|
736
|
+
hasTraceListeners: i
|
|
730
737
|
};
|
|
731
738
|
}
|
|
732
739
|
export {
|
|
733
740
|
ce as PluginSubscriber,
|
|
734
741
|
fe as PluginSubscription,
|
|
735
|
-
|
|
736
|
-
|
|
742
|
+
M as Store,
|
|
743
|
+
G as Tracer,
|
|
737
744
|
B as createConsoleGroupTraceListener,
|
|
738
745
|
ae as createPluginSubscriber,
|
|
739
746
|
ue as createTracerRegistry,
|
|
740
747
|
Y as defaultRedactedKeys,
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
748
|
+
T as getDefineAStoreSetupContext,
|
|
749
|
+
I as isEmpty,
|
|
750
|
+
j as setEnhancedStore,
|
|
744
751
|
he as traceGroups
|
|
745
752
|
};
|
|
746
753
|
//# sourceMappingURL=helpers.js.map
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../src/core/PluginSubscriber.ts","../src/core/Store.ts","../src/factories/plugin-subscriber.ts","../src/system/Tracer.ts","../src/system/log.ts","../src/factories/console-trace-listener.ts","../src/factories/trace-listener.ts","../src/utils/environment.ts","../src/utils/redact.ts"],"sourcesContent":["import Store from \"./Store\";\nimport type { PiniaPluginContext, Store as PiniaStore } from \"pinia\";\nimport type {\n PluginExecutionOptions,\n PluginHydrationScheduler,\n PluginSubscriber as PluginSubscriberInterface,\n PluginSubscriptions,\n StoreClassConstructorParams,\n StoreMutationSubscription,\n StoreOnActionSubscription\n} from \"../types/plugin\";\nimport type Tracer from \"../system/Tracer\";\n\n\n\ntype CreateInstance<Instance = Store> = (store: PiniaStore, options: StoreClassConstructorParams) => Instance | undefined\n\n\n/**\n * Type definition for the function used to create an instance of a store.\n * @template Instance The type of the store instance, defaulting to the base Store class.\n * @param store The Pinia store for which the instance is being created.\n * @param options Additional options for creating the store instance.\n * @returns The created store instance or undefined if creation fails.\n */\nexport default abstract class PluginSubscriber<Instance extends Store> implements PluginSubscriberInterface {\n private _createInstance: CreateInstance\n private _name: string\n private _pluginOptions?: StoreClassConstructorParams\n private _storeInstance?: Instance\n /** Callback function to reset the store instance, if needed. */\n protected _resetStoreCallback?: (store?: PiniaStore) => void\n private _storeOnActionSubscription?: StoreOnActionSubscription\n private _storeMutationSubscription?: StoreMutationSubscription\n private _subscriptions?: PluginSubscriptions\n /**\n * Called when the plugin subscriber has been created for a specific store.\n * This callback can be used to perform any initialization or setup required for the plugin subscriber.\n */\n protected pluginCreated?: (store: PiniaStore) => void\n /** Options for the plugin subscriber's execution. */\n public execution?: PluginExecutionOptions\n /** Scheduler for handling the hydration process of the plugin subscriber. */\n public hydrationScheduler?: PluginHydrationScheduler\n\n\n get name(): string {\n return this._name;\n }\n\n get storeInstance(): Instance | undefined {\n return this._storeInstance\n }\n\n get pluginOptions(): StoreClassConstructorParams | undefined {\n return this._pluginOptions;\n }\n\n set pluginOptions(options: StoreClassConstructorParams | undefined) {\n this._pluginOptions = options;\n }\n\n get resetStoreCallback(): ((store?: PiniaStore) => void) | undefined {\n return this._resetStoreCallback as ((store?: PiniaStore) => void) | undefined;\n }\n\n get storeOnActionSubscription(): StoreOnActionSubscription | undefined {\n return this._storeOnActionSubscription;\n }\n\n get storeMutationSubscription(): StoreMutationSubscription | undefined {\n return this._storeMutationSubscription;\n }\n\n get subscriptions(): PluginSubscriptions | undefined {\n return this._subscriptions\n }\n\n set subscriptions(subscriptions: PluginSubscriptions) {\n this._subscriptions = subscriptions\n }\n\n\n constructor(pluginName: string, createInstanceFunction: CreateInstance) {\n this._name = pluginName\n this._createInstance = createInstanceFunction\n }\n\n /**\n * Called after the store has been hydrated.\n * @param context The Pinia plugin context containing the store and options.\n * @returns A promise that resolves when the post-hydration process is complete, or void if synchronous.\n */\n public afterHydration(_context: PiniaPluginContext): void | Promise<void> {\n return\n }\n\n /**\n * Called when the plugin subscriber needs to hydrate its state.\n * @param context The Pinia plugin context containing the store and options.\n * @returns A promise that resolves when the hydration process is complete, or void if synchronous.\n */\n public hydrate(_context: PiniaPluginContext): void | Promise<void> {\n return\n }\n\n /**\n * Invokes the plugin subscriber with the given context and optional tracer creation function.\n * @param context The Pinia plugin context containing the store and options.\n * @param createTracer Optional function to create a tracer for the plugin.\n * @returns True if the plugin was successfully invoked, otherwise false.\n */\n public invoke({ store, options }: PiniaPluginContext, createTracer?: (name: string) => Tracer): boolean {\n this._storeInstance = this._createInstance(store, {\n ...options,\n ...this.pluginOptions,\n createTracer: createTracer ? () => createTracer?.(this.name) : undefined\n }) as Instance\n\n if (!this._storeInstance) {\n return false\n }\n\n this._subscriptions = this._storeInstance.getSubscriptions()\n this._storeMutationSubscription = this._storeInstance.storeSubscribe\n this._storeOnActionSubscription = this._storeInstance.onAction\n\n if (this.pluginCreated) {\n this.pluginCreated(store)\n }\n\n return true\n }\n}","import { isRef, ref, toRef } from \"vue\"\nimport Tracer from \"../system/Tracer\"\nimport TraceEmitter from \"../system/TraceEmitter\"\nimport { getDefineAStoreSetupContext, hasDeniedFirstChar, setEnhancedStore } from \"../utils/store\"\nimport { isEmpty } from \"../utils/validation\"\n\nimport type {\n PluginSubscriptionOptions,\n PluginSubscriptions,\n StoreClassConstructorParams,\n StoreMutationSubscription,\n StoreMutationSubscriptionCallback,\n StoreMutationSubscriptionReturn,\n StoreOnActionSubscription,\n StoreOnActionSubscriptionCallback,\n StoreOnActionSubscriptionReturn\n} from \"../types/plugin\"\nimport type { Store as PiniaStore, StateTree } from \"pinia\"\nimport type { AnyObject, PluginSubscriberInterface } from \"../types\"\nimport type { StoreOptions, StatePropertyValue } from \"../types/store\"\n\n/**\n * Base class for a Pinia store with enhanced capabilities.\n * Provides structured tracing, plugin subscriptions, and state management utilities.\n * @remarks\n * This class is intended to be extended by specific store implementations\n * that require enhanced capabilities such as structured tracing and plugin subscriptions.\n */\nexport default class Store extends TraceEmitter {\n protected _className = 'Store'\n private _createTracer?: () => Tracer\n private _onAction?: StoreOnActionSubscriptionCallback\n private _options: StoreOptions\n private _store: PiniaStore\n private _storeSubscribe?: StoreMutationSubscriptionCallback\n private _subscriptions: PluginSubscriptions = {}\n\n protected static _requiredKeys?: string[]\n\n get onAction(): StoreOnActionSubscription | undefined {\n if (!this._onAction) {\n return\n }\n\n return () => ({\n store: this.store as PiniaStore,\n callback: this._onAction\n }) as StoreOnActionSubscriptionReturn\n }\n\n set onAction(onAction: StoreOnActionSubscriptionCallback) {\n this._onAction = onAction\n }\n\n get options(): StoreOptions { return this._options }\n\n get state(): StateTree { return this._store.$state }\n\n set state(state: StateTree) { this._store.$state = state }\n\n get store(): AnyObject { return this._store }\n\n get storeSubscribe(): StoreMutationSubscription | undefined {\n if (!this._storeSubscribe) {\n return\n }\n\n return () => ({\n store: this.store as PiniaStore,\n callback: this._storeSubscribe\n }) as StoreMutationSubscriptionReturn\n }\n\n set storeSubscribe(storeSubscribe: StoreMutationSubscriptionCallback) {\n this._storeSubscribe = storeSubscribe\n }\n\n /**\n * Returns the structured trace emitter of this store.\n * Built lazily so that subclasses overriding `_className` are reflected.\n */\n protected override get tracer(): Tracer | undefined {\n if (!this._tracer && this._createTracer) {\n this._tracer = this._createTracer()\n this._tracer.scope = this.store.$id\n }\n\n return this._tracer\n }\n\n /**\n * Constructs a new instance of the store.\n * @param store The Pinia store instance.\n * @param options The plugin store options and subscription options.\n * @remarks\n * This constructor is typically called by the `customizeStore` static method\n * to create an instance of the store with the provided Pinia store and options.\n * @see PluginStoreOptions\n * @see PluginSubscriptionOptions\n */\n constructor(store: PiniaStore, options: StoreClassConstructorParams) {\n super()\n this._options = options.storeOptions as StoreOptions\n this._store = store\n this.initializeTracer(options)\n this.trace('instance:created', store.$id)\n\n if (this._options?.enhancedStore) {\n const ctx = getDefineAStoreSetupContext(this.store)\n\n if (ctx) {\n setEnhancedStore(ctx, this.store)\n this.trace('setup:enhancedStore:success', this.store.$id)\n }\n }\n }\n\n /**\n * Adds a property to the state of this store.\n * @param name The name of the property to add.\n * @param value The value of the property to add.\n */\n addToState(name: string, value?: StatePropertyValue): void {\n if (!this.isOptionApi()) {\n if (!isRef(value)) {\n value = ref<StatePropertyValue>(value)\n }\n }\n\n this.state[name] = value\n this.store[name] = toRef(this.state, name)\n }\n\n /**\n * Adds a subscription for a specific plugin to this store.\n * @param pluginName The name of the plugin for which the subscription is being added.\n * @param subscription The subscription callback or object to add.\n * @param options Additional options for the subscription, including subscription options and target stores.\n */\n addSubscription(\n pluginName: string,\n subscription: PluginSubscriberInterface,\n options?: { subscriptionOptions?: StoreOptions, stores?: PiniaStore[] }\n ): void {\n this._subscriptions[pluginName] = { subscription, ...(options ?? {}) }\n }\n\n /**\n * Called after the store has been hydrated.\n * @returns A promise that resolves when the post-hydration process is complete, or void if synchronous.\n */\n afterHydration(): void | Promise<void> {\n return\n }\n\n /**\n * Create and return a class instance\n * @param store \n * @param options \n * @template Instance The type of the store instance being created.\n * @returns The created store instance of type `Instance`, or undefined if the required keys are not present.\n */\n static customizeStore<Instance extends Store>(\n store: PiniaStore,\n options: StoreClassConstructorParams\n ): Instance | undefined {\n if (options.storeOptions && this.hasRequiredKeys(options.storeOptions)) {\n return new this(store, options) as Instance\n }\n }\n\n /**\n * Retrieves the value of a specific store option.\n * @param optionName The name of the store option to retrieve.\n * @returns The value of the specified store option, or undefined if not found.\n */\n getOption(optionName: keyof StoreOptions) {\n return this.options && (this.options as StoreOptions)[optionName]\n }\n\n /**\n * Retrieves the value of a specific state property.\n * @param propertyName The name of the state property to retrieve.\n * @returns The value of the specified state property, or undefined if not found.\n */\n getStatePropertyValue(propertyName: string) {\n return this.getValue(this.state[propertyName])\n }\n\n /**\n * Retrieves all plugin subscriptions for this store.\n * @returns An object containing all plugin subscriptions, or undefined if there are none.\n */\n getSubscriptions(): PluginSubscriptions | undefined {\n if (isEmpty(this._subscriptions)) {\n return\n }\n\n return this._subscriptions\n }\n\n /**\n * Retrieves the actual value from a potentially reactive reference.\n * @param value The value to unwrap.\n * @returns The unwrapped value if it is a reactive reference, otherwise the original value.\n */\n getValue(value: any) {\n return value?.__v_isRef ? value.value : value\n }\n\n /**\n * Checks if the given property name has a denied first character.\n * @param property The property name to check.\n * @returns True if the property name has a denied first character, otherwise false.\n */\n protected hasDeniedFirstChar(property: string): boolean {\n return hasDeniedFirstChar(property)\n }\n\n /**\n * Checks if the given options object has all the required keys.\n * @param options The options object to check.\n * @returns True if all required keys are present, otherwise false.\n */\n protected static hasRequiredKeys(options: AnyObject): boolean {\n return this._requiredKeys !== undefined && this._requiredKeys?.every(requiredKey => !!options[requiredKey])\n }\n\n /**\n * Hydrates the store, potentially performing asynchronous operations.\n * @returns void or a Promise that resolves when hydration is complete.\n */\n hydrate(): void | Promise<void> {\n return\n }\n\n /**\n * Initializes the tracer for plugin subscriptions if the createTracer option is provided.\n * @param options The plugin subscription options containing the createTracer function.\n */\n private initializeTracer(options: Omit<PluginSubscriptionOptions, 'createTracer'> & { createTracer?: () => Tracer }) {\n this._createTracer = options?.createTracer\n }\n\n /**\n * Checks if the store is using the Options API.\n * @returns True if the store is using the Options API, otherwise false.\n */\n isOptionApi(): boolean { return this.store._isOptionsAPI }\n\n /**\n * Checks if the state object has the specified property.\n * @param property The property name to check.\n * @returns True if the state object has the property, otherwise false.\n */\n stateHas(property: string): boolean { return Object.prototype.hasOwnProperty.call(this.state, property) }\n\n /**\n * Checks if the store object has the specified property.\n * @param property The property name to check.\n * @returns True if the store object has the property, otherwise false.\n */\n storeHas(property: string): boolean { return Object.prototype.hasOwnProperty.call(this.store, property) }\n\n}","import type { PluginSubscriber, PluginSubscriberInvoke } from \"../types/plugin\";\n\n\n/**\n * Creates a new plugin subscriber with the given name, invoke function, and optional properties.\n * @param name - plugin name.\n * @param invoke - function to invoke for the plugin subscriber.\n * @param optionalProps - optional additional properties for the plugin subscriber.\n * @param {Function} optionalProps.afterHydration\n * @param {PluginExecutionOptions} optionalProps.execution\n * @param {Function} optionalProps.hydrate\n * @param {PluginHydrationScheduler} optionalProps.hydrationScheduler\n * @param {Function} optionalProps.resetStoreCallback\n * @param {StoreOnActionSubscription} optionalProps.storeOnActionSubscription\n * @param {StoreMutationSubscription} optionalProps.storeMutationSubscription\n * @param {PluginSubscriptions} optionalProps.subscriptions\n * @param \n * @returns A new plugin subscriber object.\n */\nexport function createPluginSubscriber(\n name: string,\n invoke: PluginSubscriberInvoke,\n optionalProps?: Omit<PluginSubscriber, \"name\" | \"invoke\">\n): PluginSubscriber {\n return {\n name,\n invoke,\n ...optionalProps,\n };\n}","import type { AnyObject } from '../types'\nimport type {\n TraceEvent,\n TraceEventMetadata,\n TraceGroupListener,\n TraceLevel,\n TraceListener,\n TracePayload,\n TracerOptions,\n} from '../types/trace'\n\nfunction resolvePayload(payload: TracePayload): AnyObject | undefined {\n if (typeof payload !== 'function') {\n return payload\n }\n\n try {\n return payload()\n } catch (error) {\n return { __tracePayloadError: error }\n }\n}\n\n/**\n * Emits structured trace events.\n *\n * Nothing is allocated when no listener matches:\n * the payload is a factory resolved only once a consumer is known.\n */\nexport default class Tracer {\n private readonly _listeners: Array<TraceListener | TraceGroupListener> = []\n private readonly _redactor?: (payload: AnyObject) => AnyObject\n private _scope?: string\n private readonly _source: string\n\n constructor(source: string, listeners: Array<TraceListener | TraceGroupListener>, options: TracerOptions = {}) {\n this._redactor = options.redactor\n this._scope = options.scope\n this._source = source\n this._listeners = listeners\n }\n\n get scope(): string | undefined {\n return this._scope\n }\n\n set scope(scope: string | undefined) {\n this._scope = scope\n }\n\n get source(): string {\n return this._source\n }\n\n debug(label: string, namespace: string, payload?: TracePayload, scope?: string): void {\n this.emit('debug', label, namespace, payload, scope)\n }\n\n /** Relays the error to matching listeners, or reports it when none match. */\n error(label: string, namespace: string, error: unknown, payload?: TracePayload, scope?: string): void {\n this.emit('error', label, namespace, payload, scope, error)\n }\n\n private resolveAndRedact(payload: TracePayload): AnyObject | undefined {\n const resolved = resolvePayload(payload)\n\n if (!this._redactor || resolved === undefined) {\n return resolved\n }\n\n try {\n return this._redactor(resolved)\n } catch (error) {\n // never leak the raw payload when redaction fails\n return { __traceRedactionError: error instanceof Error ? error.message : String(error) }\n }\n }\n\n private matchListeners(level: TraceLevel, label: string, namespace: string, scope?: string) {\n const metadata: TraceEventMetadata = {\n label,\n level,\n namespace,\n scope: scope ?? this._scope,\n source: this._source\n }\n const matched: Array<TraceListener | TraceGroupListener> = []\n\n for (const listener of this._listeners) {\n try {\n if (listener.filter(metadata)) {\n matched.push(listener)\n }\n } catch (error) {\n console.error('Error in trace listener filter:', error)\n }\n }\n\n return { matched, metadata }\n }\n\n private emit(\n level: TraceLevel,\n label: string,\n namespace: string,\n payload?: TracePayload,\n scope?: string,\n error?: unknown\n ): void {\n const { matched, metadata } = this._listeners.length === 0\n ? { matched: [], metadata: undefined }\n : this.matchListeners(level, label, namespace, scope)\n\n if (!metadata || matched.length === 0) {\n if (level === 'error') {\n console.error('Unhandled error trace event:', error)\n }\n return\n }\n\n const event: TraceEvent = {\n ...metadata,\n ...(error !== undefined && { error }),\n ...(payload !== undefined && { payload: this.resolveAndRedact(payload) }),\n timestamp: Date.now()\n }\n\n for (const listener of matched) {\n try {\n listener.handler(event)\n } catch (error) {\n // a faulty listener must never break the traced code\n console.error('Error in trace listener:', error)\n }\n }\n }\n}\n","import { pluginName } from '../utils/constants'\nimport type { Console, LogType, StyleDefinition, StyleDefinitions } from '../types/log'\nimport type { ConsoleTraceEvent, ConsoleTraceEventArgs, TraceEvent } from '../types/trace'\nimport type { Store } from 'pinia'\nimport { isRef } from 'vue'\n\n\nconst errorColor = '#f86f63'\nconst style = (bgColor: string, color: string = 'white') =>\n `background-color: ${bgColor}; color: ${color}; padding: 1px; margin-right: 5px; font-size: 12px`\n\nfunction getPrintablePayload(trace: TraceEvent) {\n const { payload } = trace\n if (payload && Object.keys(payload).length > 0) {\n return Object.keys(payload).reduce((acc, key) => {\n if (!['groupId', 'label', 'namespace', 'scope', 'source'].includes(key)) {\n acc[key] = isRef(payload[key]) ? payload[key].value : payload[key]\n }\n return acc\n }, {} as Record<string, unknown>)\n }\n return undefined\n}\n\nexport function printObject(label: string, payload: object, groupType: 'collapsed' | 'expanded' | 'none' = 'collapsed', source?: string) {\n if (payload instanceof Error) {\n console.groupCollapsed(\n '%c%s',\n `color: ${errorColor}; padding: 1px; margin-right: 5px; font-size: 11px`,\n `[ ${payload.name} ] ${payload.message}`,\n )\n if (payload.cause) {\n console.log('cause:', payload.cause)\n }\n const stack = payload.stack?.split('\\n')\n if (stack) {\n stack.forEach(line => {\n const trace = line.split('@')\n if (Array.isArray(trace)) {\n console.log(trace[0], trace[1])\n }\n })\n }\n console.groupEnd()\n }\n\n const isArray = Array.isArray(payload)\n const isEmpty = isArray ? payload.length === 0 : Object.keys(payload).length === 0\n if (isEmpty) {\n console.log(\n '%c%s',\n `color: ${errorColor}; padding: 1px; margin-right: 5px; font-size: 10px`,\n `[ ${label} ] Empty`\n )\n return\n }\n if (groupType === 'none' || (isArray && typeof payload[0] !== 'object')) {\n console.log(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${label} ]`, payload\n )\n return\n }\n\n const styles: Record<string, string> = {\n options: '📚 ',\n store: '🏪 ',\n subscribers: '🧩 ',\n 'hooks subscriptions': '🔗 '\n }\n const icon = styles[label] ?? ''\n\n if (groupType === 'collapsed') {\n if (source) {\n console.groupCollapsed(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `${icon} ${label}`, source)\n } else {\n console.groupCollapsed(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${icon}${label} ]`)\n }\n } else if (groupType === 'expanded') {\n console.group(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${icon} ${label} ]`)\n }\n\n if (isArray && typeof payload[0] === 'object') {\n payload.forEach((item: any) => {\n if (item.name) {\n printObject(item.name, item)\n } else if (item._id) {\n printObject(item._id, item)\n } else {\n console.dir(item)\n }\n })\n } else {\n let emptyKeys: string[] = []\n Object.keys(payload).forEach(key => {\n if (key === 'groupId') {\n return\n }\n\n const value = (payload as Record<string, unknown>)[key]\n if (typeof value === 'object') {\n if (Array.isArray(value)) {\n if (typeof value[0] === 'object') {\n printObject(key, value, 'expanded')\n } else {\n console.log(\n '%c%s',\n 'color: #cae38f; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, isRef(value) ? value.value : value)\n }\n } else if (value instanceof Error) {\n console.log(key, { name: value.name, message: value.message, stack: value.stack })\n } else {\n printObject(key, Object.assign({}, value), 'expanded')\n }\n } else {\n if (!value) {\n emptyKeys.push(key)\n } else {\n const typeOfValue = typeof value\n console.log(\n '%c%s',\n 'color: #b0fa05; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, typeOfValue === 'function' ? typeOfValue : value\n )\n }\n }\n })\n if (emptyKeys.length) {\n console.log(\n '%c%s',\n 'color: #f86f63; font-size: 9px',\n `[ Empty properties ]`, emptyKeys\n )\n }\n }\n console.groupEnd()\n}\n\nfunction printTrace(trace: TraceEvent) {\n const payload = getPrintablePayload(trace)\n if (payload && Object.keys(payload).length > 0) {\n printObject(trace.label, payload, 'collapsed', trace.source)\n return\n }\n console.log(\n '%c%s',\n 'color: #f8f89f; padding: 1px; margin-right: 5px; font-size: 11px',\n trace.label, trace.source,\n )\n}\n\nfunction printTracePayload(tracePayload: Record<string, unknown>) {\n Object.keys(tracePayload).forEach((key: string) => {\n if (['groupId', 'label', 'namespace', 'scope', 'source'].includes(key)) {\n return\n }\n const arg = tracePayload[key]\n if (!arg) {\n console.log(\n '%c%s',\n 'color: #f86f63; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ] ${arg}`\n )\n return\n }\n\n switch (typeof arg) {\n case 'string': case 'number':\n console.log(\n '%c%s',\n 'color: #fafa05; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, arg\n )\n break;\n case 'object':\n switch (key) {\n case 'mutation':\n console.groupCollapsed('[mutation]')\n console.dir(arg)\n console.groupEnd()\n break;\n case 'options':\n printObject(key, (arg as { storeOptions?: unknown })?.storeOptions ?? arg)\n break;\n case 'payload':\n printTracePayload(arg as Record<string, unknown>)\n break;\n case 'store':\n printObject(key, {\n $state: (arg as Store)['$state'],\n $actions: Object.keys(arg).reduce((acc, curr) => {\n if ((curr.startsWith('$') && !['$id', '$state'].includes(curr)) || curr.startsWith('_')) {\n return acc\n }\n\n const value = (arg as Record<string, unknown>)[curr]\n\n if (typeof value !== 'function') {\n if (!acc['computed']) {\n acc['computed'] = []\n }\n (acc['computed'] as string[]).push(curr)\n\n } else {\n acc[curr] = (arg as Record<string, unknown>)[curr]\n }\n\n return acc\n }, {} as Record<string, unknown>)\n })\n break;\n default:\n printObject(key, arg)\n }\n break;\n case 'function':\n console.dir(arg)\n break;\n default:\n console.info(key, arg)\n }\n })\n}\nexport function log(logStyle: string, args: any) {\n if (!logStyle) {\n throw new Error('Style instructions are required')\n }\n\n console.log(\n '%c%s',\n logStyle,\n args.shift(),\n ...args\n )\n}\n\n\nexport function logTrace(logStyle: string, args: any, pluginName: string) {\n if (!logStyle) {\n throw new Error('Style instructions are required')\n }\n\n const label = args.shift()\n const event = args[0]\n\n\n if (!event?.payload || Object.keys(event.payload).length === 0) {\n console.log(\n '%c%s',\n logStyle,\n `${event?.source === pluginName ? (event?.label ?? event?.namespace) : label}`,\n event?.source\n )\n return\n }\n\n console.groupCollapsed(\n '%c%s',\n logStyle,\n `${label}\n`, event?.source\n )\n\n args.forEach((arg: any) => {\n switch (typeof arg) {\n case 'string':\n console.info(arg)\n break;\n case 'object':\n if (Array.isArray(arg)) {\n console.table(arg)\n } else {\n printTracePayload(arg)\n }\n break;\n case 'function':\n console.dir(arg)\n break;\n default:\n console.info(arg)\n }\n })\n\n\n\n console.groupEnd()\n}\n\nexport abstract class CustomConsole implements Console {\n protected _bgColor: string = 'transparent'\n protected _color: string = '#f2f286'\n protected _icon: string = '🍍⚡'\n protected _errorBgColor: string = '#d24545'\n protected _errorColor: string = 'white'\n protected _errorIcon: string = '🍍⚠️'\n protected _pluginName?: string\n protected _styles: StyleDefinitions = {\n error: { bgColor: this._errorBgColor, color: this._errorColor, icon: this._errorIcon },\n info: { bgColor: this._bgColor, color: this._color, icon: this._icon }\n }\n\n protected formatMessage(message: string, icon: string): string {\n return this._pluginName ? ` [${icon} ${this._pluginName}] \n ${message} \n` : message\n }\n\n protected generateStyle(styleDefinition: StyleDefinition): string {\n return style(styleDefinition.bgColor, styleDefinition.color)\n }\n\n protected getStyleDefinition(messageType?: LogType): StyleDefinition {\n return this._styles[messageType ?? 'info']\n }\n\n log(...args: any) {\n this.useLog(\n this.getStyleDefinition(),\n args\n )\n }\n\n error(...args: any) {\n const logType = 'error'\n this.useLog(\n this.getStyleDefinition(logType),\n args\n )\n }\n\n protected rebuildArgs(args: string | any[]): any[] {\n if (typeof args === 'string') {\n return [args]\n }\n\n if (Array.isArray(args)) {\n return [args.shift(), ...args]\n }\n\n return [args]\n }\n\n protected useLog(styleDefinition: StyleDefinition, args: any) {\n log(\n this.generateStyle(styleDefinition),\n this.rebuildArgs(args)\n )\n }\n}\n\nexport class TraceConsole extends CustomConsole {\n protected _pluginName: string = pluginName\n\n constructor(pluginName?: string) {\n super()\n if (pluginName) {\n this._pluginName = pluginName\n }\n }\n\n\n logGroup(groups: ConsoleTraceEvent[]) {\n const firstEntry = groups.shift()\n const context = firstEntry?.[1] as ConsoleTraceEventArgs\n\n console.groupCollapsed(\n '%c%s',\n 'color: #87e47f; padding: 1px; margin-right: 5px; font-size: 11px; font-family: arial',\n `🍍 ${context?.label ?? context?.namespace}`, `[${context?.scope}]`\n )\n if (context?.payload) {\n printTracePayload(context.payload)\n }\n console.groupCollapsed(\n '%c%s',\n 'color: #f1f6b7; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ✨ traces ]`\n )\n groups.forEach(group => printTrace(group[1] as TraceEvent))\n console.groupEnd()\n console.groupEnd()\n }\n\n protected useLog(styleDefinition: StyleDefinition, args: any) {\n logTrace(\n this.generateStyle(styleDefinition),\n this.rebuildArgs(args),\n this._pluginName\n )\n }\n}","import { TraceConsole } from '../system/log'\n\nimport type { Console } from '../types/log'\nimport type {\n ConsoleTraceEvent, ConsoleTraceEventArgs, TraceEvent, TraceListenerGroupBy, ConsoleTraceGroupListener\n} from '../types/trace'\n\n\n/**\n * Builds the console arguments from a trace event.\n * @param event The trace event to build console arguments from.\n * @returns An array containing the formatted trace label and the sanitized event data.\n */\nfunction buildConsoleArgsFromEvent(event: TraceEvent): ConsoleTraceEvent {\n const sanitizedEvent = Object.keys(event).reduce((acc, curr) => {\n if (curr !== 'level' && curr !== 'timestamp') {\n acc[curr] = event[curr as keyof ConsoleTraceEventArgs]\n }\n return acc\n }, {} as Record<string, unknown>)\n\n return [formatTraceLabel(event), sanitizedEvent as ConsoleTraceEventArgs]\n}\n\nfunction formatTraceLabel(event: TraceEvent): string {\n return event.scope\n ? `${event.label} [${event.scope}]`\n : `${event.label}`\n}\n\nfunction log(target: Console, event: TraceEvent): void {\n const consoleMethod = event.level === 'error' ? 'error' : 'log'\n target[consoleMethod](...buildConsoleArgsFromEvent(event))\n}\n\n/**\n * Creates a console trace group listener that groups trace events by the specified key.\n * @param groupBy The key of the trace event metadata to group by.\n * @returns A console trace group listener configured to group trace events by the specified key.\n */\nexport function createConsoleGroupTraceListener(groupBy: TraceListenerGroupBy = 'scope'): ConsoleTraceGroupListener {\n const target = new TraceConsole()\n const groups = new Map<string, ConsoleTraceEvent[]>()\n // Overlapping starts for the same key (e.g. concurrent async mutations of a store) share one group\n const openCounts = new Map<string, number>()\n\n\n function createGroup(key: string) {\n if (!groups.has(key)) {\n groups.set(key, [])\n }\n openCounts.set(key, (openCounts.get(key) ?? 0) + 1)\n }\n\n function logGroup(key: string): void {\n const group = groups.get(key)\n\n if (!group) {\n target.error(`No group found for key \"${key}\"`)\n return\n }\n\n const remaining = (openCounts.get(key) ?? 1) - 1\n if (remaining > 0) {\n openCounts.set(key, remaining)\n return\n }\n\n if (group.length) { target.logGroup(group) }\n groups.delete(key)\n openCounts.delete(key)\n }\n\n return {\n createGroup,\n logGroup,\n handler(event): void {\n const groupKey = (event?.payload?.groupId ?? event[groupBy]) as string\n if (!groups.has(groupKey)) {\n log(target, event)\n return\n }\n\n groups.get(groupKey)?.push(buildConsoleArgsFromEvent(event))\n }\n }\n}\n\n\n","import { createConsoleGroupTraceListener } from \"./console-trace-listener\"\nimport { pluginName, pluginSubscriptionNamespace } from \"../utils/constants\"\n\nimport type {\n TraceEventMetadata,\n TraceFilter,\n TraceFilterFactoryCriterion,\n TraceFilterFactoryParam,\n TraceGroupListener\n} from \"../types/trace\"\n\n\nfunction createFilter(criteria: TraceFilterFactoryCriterion[], context: boolean = true, mode: 'every' | 'some') {\n return (event: TraceEventMetadata) => {\n return criteria[mode](({ comparator = 'equals', target, value }) => {\n if (target === 'namespace' && context && isPluginSubscription(event)) {\n return true\n }\n\n const eventValue = event[target]\n if (typeof eventValue !== 'string') return false\n\n let result = false\n switch (comparator) {\n case 'equals':\n result = eventValue === value\n break\n case 'contains':\n result = eventValue.includes(value)\n break\n case 'startsWith':\n result = eventValue.startsWith(value)\n break\n case 'endsWith':\n result = eventValue.endsWith(value)\n break\n default:\n result = false\n break\n }\n return result\n })\n }\n}\n\n/**\n * Creates a trace group listener with optional filtering.\n * @param listenerDef The listener definition or filter criteria for the trace group listener.\n * @param context Print the plugin context (subscribers, store, options, and traces) to the console.. Defaults to true.\n * @param filterMode The mode to apply when evaluating multiple filter criteria: 'every' or 'some'.\n * @param groupBy The key of the trace event metadata to group by.\n * @returns A trace listener configured with group handling and filtering.\n */\nexport function createTraceGroupListener(\n listenerDef: TraceFilterFactoryParam | TraceFilterFactoryCriterion[],\n context: boolean = true,\n filterMode: 'every' | 'some' = 'every',\n groupBy: keyof TraceEventMetadata = 'scope'\n) {\n return {\n groupBy,\n ...createConsoleGroupTraceListener(groupBy),\n ...createTraceFilter(listenerDef, context, filterMode)\n } as TraceGroupListener\n\n}\n\nfunction createTraceFilter(\n listenerDef: TraceFilterFactoryParam | TraceFilterFactoryCriterion[],\n context: boolean = true,\n filterMode: 'every' | 'some' = 'every'\n): TraceFilterFactoryParam & { filter: TraceFilter } {\n if (Array.isArray(listenerDef)) {\n return { filter: createFilter(listenerDef, context, filterMode) }\n }\n\n // Copy: the caller's definition must never be mutated.\n return {\n ...listenerDef,\n filter: Array.isArray(listenerDef.filter)\n ? createFilter(listenerDef.filter, context, filterMode)\n : listenerDef.filter\n }\n}\n\nfunction isPluginSubscription(event: TraceEventMetadata): boolean {\n return event?.source === pluginName && (!event?.namespace || event.namespace.startsWith(pluginSubscriptionNamespace))\n}","declare const process: { env: { NODE_ENV?: string } } | undefined\n\n/**\n * Tells whether the host application is built for production.\n * The literal `process.env.NODE_ENV` expression is kept on purpose: consumer bundlers\n * (Vite, webpack, Nuxt...) replace it statically. Without a bundler `process` may be\n * undefined, in which case the environment is not considered production.\n */\nexport function isProductionEnvironment(): boolean {\n try {\n return process!.env.NODE_ENV === 'production'\n } catch {\n return false\n }\n}\n","import type { AnyObject } from '../types'\nimport type { TraceRedactOptions } from '../types/trace'\n\nexport const DEFAULT_REDACTED_VALUE = '[REDACTED]'\n\n/**\n * Keys masked by default when redaction is enabled.\n * Matching is a case-insensitive \"contains\", so `accessToken` or `user_password` are masked too.\n */\nexport const defaultRedactedKeys: readonly RegExp[] = [\n /pass(word|wd|phrase|code)|^pwd/i,\n /secret/i,\n /token/i,\n /authorization/i,\n /api[-_]?key/i,\n /(private|encryption|signing|secret)[-_]?key/i,\n /credential/i,\n /cookie/i,\n /cipher/i,\n]\n\nconst MAX_DEPTH = 12\n\ntype KeyMatcher = (key: string) => boolean\n\nfunction createKeyMatcher(keys: ReadonlyArray<string | RegExp>): KeyMatcher {\n const exact = new Set<string>()\n const patterns: RegExp[] = []\n\n for (const key of keys) {\n if (typeof key === 'string') {\n exact.add(key.toLowerCase())\n } else {\n // a global/sticky regexp is stateful: rebuild it without those flags\n patterns.push(new RegExp(key.source, key.flags.replace(/[gy]/g, '')))\n }\n }\n\n return (key: string) => exact.has(key.toLowerCase()) || patterns.some(pattern => pattern.test(key))\n}\n\nfunction isTraversable(value: unknown): value is object {\n if (value === null || typeof value !== 'object') {\n return false\n }\n\n return !(\n value instanceof Date\n || value instanceof RegExp\n || value instanceof Error\n || value instanceof Promise\n || value instanceof WeakMap\n || value instanceof WeakSet\n )\n}\n\n/**\n * Creates a function returning a redacted copy of a trace payload.\n * The original value (usually the live store state) is never mutated.\n * @param options Redaction options, or `true` to use the default keys.\n * @returns The redaction function.\n */\nexport function createRedactor(options: TraceRedactOptions | true = true): (payload: AnyObject) => AnyObject {\n const { includeDefaults = true, keys = [], replacement = DEFAULT_REDACTED_VALUE } =\n options === true ? {} : options\n const isSensitive = createKeyMatcher([...(includeDefaults ? defaultRedactedKeys : []), ...keys])\n\n function redact(value: unknown, seen: WeakMap<object, unknown>, depth: number): unknown {\n if (!isTraversable(value)) {\n return value\n }\n\n const cached = seen.get(value)\n if (cached !== undefined) {\n return cached\n }\n\n if (depth >= MAX_DEPTH) {\n return '[MaxDepth]'\n }\n\n if (value instanceof Map) {\n const copy = new Map()\n seen.set(value, copy)\n value.forEach((entry, key) => {\n copy.set(key, typeof key === 'string' && isSensitive(key) ? replacement : redact(entry, seen, depth + 1))\n })\n return copy\n }\n\n if (value instanceof Set) {\n const copy = new Set()\n seen.set(value, copy)\n value.forEach(entry => copy.add(redact(entry, seen, depth + 1)))\n return copy\n }\n\n if (Array.isArray(value)) {\n const copy: unknown[] = []\n seen.set(value, copy)\n value.forEach(entry => copy.push(redact(entry, seen, depth + 1)))\n return copy\n }\n\n const copy: Record<string, unknown> = {}\n seen.set(value, copy)\n for (const key of Object.keys(value)) {\n const redactedValue = isSensitive(key)\n ? replacement\n : redact((value as Record<string, unknown>)[key], seen, depth + 1)\n Object.defineProperty(copy, key, {\n configurable: true,\n enumerable: true,\n value: redactedValue,\n writable: true\n })\n }\n return copy\n }\n\n return payload => redact(payload, new WeakMap(), 0) as AnyObject\n}\n"],"names":["PluginSubscriber","pluginName","createInstanceFunction","__publicField","options","subscriptions","_context","store","createTracer","Store","TraceEmitter","ctx","getDefineAStoreSetupContext","setEnhancedStore","onAction","state","storeSubscribe","name","value","isRef","ref","toRef","subscription","optionName","propertyName","isEmpty","property","hasDeniedFirstChar","requiredKey","createPluginSubscriber","invoke","optionalProps","resolvePayload","payload","error","source","listeners","scope","label","namespace","resolved","level","metadata","matched","listener","event","error2","style","bgColor","color","getPrintablePayload","trace","acc","key","printObject","groupType","errorColor","stack","line","isArray","icon","item","emptyKeys","typeOfValue","printTrace","printTracePayload","tracePayload","arg","curr","log$1","logStyle","args","logTrace","pluginName2","CustomConsole","message","styleDefinition","messageType","log","TraceConsole","groups","context","group","buildConsoleArgsFromEvent","sanitizedEvent","formatTraceLabel","target","consoleMethod","createConsoleGroupTraceListener","groupBy","createGroup","openCounts","logGroup","remaining","groupKey","criteria","mode","comparator","isPluginSubscription","eventValue","result","createTraceGroupListener","filterMode","listenerDef","createTraceFilter","createFilter","pluginSubscriptionNamespace","isProductionEnvironment","DEFAULT_REDACTED_VALUE","defaultRedactedKeys","MAX_DEPTH","createKeyMatcher","keys","exact","patterns","pattern","isTraversable","createRedactor","replacement","isSensitive","includeDefaults","seen","depth","cached","copy2","entry","redact","copy","redactedValue","noop","createTracerRegistry","enabled","redactor","addListener","listenerGroup","index","addScopesListener","scopes","clearTraceListeners","getMatchedListener","listenerGroupAction","actionName","groupLabel","Tracer","hasTraceListeners"],"mappings":";;;;;;AAyBA,MAA8BA,GAA8E;AAAA,EAqDxG,YAAIC,GAAcC,GAAoC;AApD9C,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAEE,IAAAA,EAAA;AACF,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAAA,IAAAA,EAAA;AAAA,IAAAA,EAAA;AAKE,IAAAA,EAAA;AAwCN,SAAK,QAAAF,GACT,KAAA,kBAAAC;AAAA,EAGA;AAAA,EA1CO,IAAA,OAAA;AAAA,WAAA,KAAA;AAAA,EAEA;AAAA,EAGP,IAAI,gBAAe;AACf,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,gBAAsC;AACtC,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,cAAAE,GAAyD;AACzD,SAAA,iBAAYA;AAAA,EAChB;AAAA,EAEA,IAAI,qBAAc;AACd,WAAK,KAAA;AAAA,EACT;AAAA,EAEA,IAAI,4BAAiE;AACjE,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,4BAAmE;AACnE,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI;AACA,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,cAAAC,GAAiD;AACjD,SAAA,iBAAYA;AA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EAAAC,GAAA5G,GAAA;AAEA,IAAIG,EAAS,UACTuG,EAAO1G,CAAA,EAAA,QAAA,CAAAW,MAAA;AACX,YAAAkG,IAAA7G,EAAA,WAAAA,EAAAW,EAAA,OAAA;AAEA,MAAI,YAAsB,YACtBA,EAAMmF,CAAAA,EAAAA;IAEN,CAAA;AAAA,EACI;AAAwG,SAC3G;AAAA,IACD,aAAAM;AAAA,IACJ,mBAAAG;AAAA,IAEA,qBAAAE;AAAA,IACI,eAAMX;AAAAA,MACN,YAAS,CAAA9F,MAAW2G,EAAA,YAAA3G,CAAA;AAAA,MACpB,cAAc,CAAAE,GAAA/B,IAAc,CAAA,UAAW2I,EAAO5G,MAAiB,EAAA,UAAAiG,GAAA,GAAAhI,EAAA,CAAA;AAAA,MAC/D,mBAAA4I;AAAA,MACJ,YAAA,CAAA/G,MAAA2G,EAAA,eAAA3G,CAAA;AAAA,IAEA;AAAA,IACI,mBAAA+G;AAAA,EACA;AACA;"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../src/core/PluginSubscriber.ts","../src/core/Store.ts","../src/factories/plugin-subscriber.ts","../src/system/Tracer.ts","../src/system/log.ts","../src/factories/console-trace-listener.ts","../src/factories/trace-listener.ts","../src/utils/environment.ts","../src/utils/redact.ts"],"sourcesContent":["import Store from \"./Store\";\nimport type { PiniaPluginContext, Store as PiniaStore } from \"pinia\";\nimport type {\n PluginExecutionOptions,\n PluginHydrationScheduler,\n PluginSubscriber as PluginSubscriberInterface,\n PluginSubscriptions,\n StoreClassConstructorParams,\n StoreMutationSubscription,\n StoreOnActionSubscription\n} from \"../types/plugin\";\nimport type Tracer from \"../system/Tracer\";\n\n\n\ntype CreateInstance<Instance = Store> = (store: PiniaStore, options: StoreClassConstructorParams) => Instance | undefined\n\n\n/**\n * Type definition for the function used to create an instance of a store.\n * @template Instance The type of the store instance, defaulting to the base Store class.\n * @param store The Pinia store for which the instance is being created.\n * @param options Additional options for creating the store instance.\n * @returns The created store instance or undefined if creation fails.\n */\nexport default abstract class PluginSubscriber<Instance extends Store> implements PluginSubscriberInterface {\n private _createInstance: CreateInstance\n private _name: string\n private _pluginOptions?: StoreClassConstructorParams\n private _storeInstance?: Instance\n /** Callback function to reset the store instance, if needed. */\n protected _resetStoreCallback?: (store?: PiniaStore) => void\n private _storeOnActionSubscription?: StoreOnActionSubscription\n private _storeMutationSubscription?: StoreMutationSubscription\n private _subscriptions?: PluginSubscriptions\n /**\n * Called when the plugin subscriber has been created for a specific store.\n * This callback can be used to perform any initialization or setup required for the plugin subscriber.\n */\n protected pluginCreated?: (store: PiniaStore) => void\n /** Options for the plugin subscriber's execution. */\n public execution?: PluginExecutionOptions\n /** Scheduler for handling the hydration process of the plugin subscriber. */\n public hydrationScheduler?: PluginHydrationScheduler\n\n\n get name(): string {\n return this._name;\n }\n\n get storeInstance(): Instance | undefined {\n return this._storeInstance\n }\n\n get pluginOptions(): StoreClassConstructorParams | undefined {\n return this._pluginOptions;\n }\n\n set pluginOptions(options: StoreClassConstructorParams | undefined) {\n this._pluginOptions = options;\n }\n\n get resetStoreCallback(): ((store?: PiniaStore) => void) | undefined {\n return this._resetStoreCallback as ((store?: PiniaStore) => void) | undefined;\n }\n\n get storeOnActionSubscription(): StoreOnActionSubscription | undefined {\n return this._storeOnActionSubscription;\n }\n\n get storeMutationSubscription(): StoreMutationSubscription | undefined {\n return this._storeMutationSubscription;\n }\n\n get subscriptions(): PluginSubscriptions | undefined {\n return this._subscriptions\n }\n\n set subscriptions(subscriptions: PluginSubscriptions) {\n this._subscriptions = subscriptions\n }\n\n\n constructor(pluginName: string, createInstanceFunction: CreateInstance) {\n this._name = pluginName\n this._createInstance = createInstanceFunction\n }\n\n /**\n * Called after the store has been hydrated.\n * @param context The Pinia plugin context containing the store and options.\n * @returns A promise that resolves when the post-hydration process is complete, or void if synchronous.\n */\n public afterHydration(_context: PiniaPluginContext): void | Promise<void> {\n return\n }\n\n /**\n * Called when the plugin subscriber needs to hydrate its state.\n * @param context The Pinia plugin context containing the store and options.\n * @returns A promise that resolves when the hydration process is complete, or void if synchronous.\n */\n public hydrate(_context: PiniaPluginContext): void | Promise<void> {\n return\n }\n\n /**\n * Invokes the plugin subscriber with the given context and optional tracer creation function.\n * @param context The Pinia plugin context containing the store and options.\n * @param createTracer Optional function to create a tracer for the plugin.\n * @returns True if the plugin was successfully invoked, otherwise false.\n */\n public invoke({ store, options }: PiniaPluginContext, createTracer?: (name: string) => Tracer): boolean {\n this._storeInstance = this._createInstance(store, {\n ...options,\n ...this.pluginOptions,\n createTracer: createTracer ? () => createTracer?.(this.name) : undefined\n }) as Instance\n\n if (!this._storeInstance) {\n return false\n }\n\n this._subscriptions = this._storeInstance.getSubscriptions()\n this._storeMutationSubscription = this._storeInstance.storeSubscribe\n this._storeOnActionSubscription = this._storeInstance.onAction\n\n if (this.pluginCreated) {\n this.pluginCreated(store)\n }\n\n return true\n }\n}","import { isRef, ref, toRef } from \"vue\"\nimport Tracer from \"../system/Tracer\"\nimport TraceEmitter from \"../system/TraceEmitter\"\nimport { getDefineAStoreSetupContext, hasDeniedFirstChar, setEnhancedStore } from \"../utils/store\"\nimport { isEmpty } from \"../utils/validation\"\n\nimport type {\n PluginSubscriptionOptions,\n PluginSubscriptions,\n StoreClassConstructorParams,\n StoreMutationSubscription,\n StoreMutationSubscriptionCallback,\n StoreMutationSubscriptionReturn,\n StoreOnActionSubscription,\n StoreOnActionSubscriptionCallback,\n StoreOnActionSubscriptionReturn\n} from \"../types/plugin\"\nimport type { Store as PiniaStore, StateTree } from \"pinia\"\nimport type { AnyObject, PluginSubscriberInterface } from \"../types\"\nimport type { StoreOptions, StatePropertyValue } from \"../types/store\"\n\n/**\n * Base class for a Pinia store with enhanced capabilities.\n * Provides structured tracing, plugin subscriptions, and state management utilities.\n * @remarks\n * This class is intended to be extended by specific store implementations\n * that require enhanced capabilities such as structured tracing and plugin subscriptions.\n */\nexport default class Store extends TraceEmitter {\n protected _className = 'Store'\n private _createTracer?: () => Tracer\n private _onAction?: StoreOnActionSubscriptionCallback\n private _options: StoreOptions\n private _store: PiniaStore\n private _storeSubscribe?: StoreMutationSubscriptionCallback\n private _subscriptions: PluginSubscriptions = {}\n\n protected static _requiredKeys?: string[]\n\n get onAction(): StoreOnActionSubscription | undefined {\n if (!this._onAction) {\n return\n }\n\n return () => ({\n store: this.store as PiniaStore,\n callback: this._onAction\n }) as StoreOnActionSubscriptionReturn\n }\n\n set onAction(onAction: StoreOnActionSubscriptionCallback) {\n this._onAction = onAction\n }\n\n get options(): StoreOptions { return this._options }\n\n get state(): StateTree { return this._store.$state }\n\n set state(state: StateTree) { this._store.$state = state }\n\n get store(): AnyObject { return this._store }\n\n get storeSubscribe(): StoreMutationSubscription | undefined {\n if (!this._storeSubscribe) {\n return\n }\n\n return () => ({\n store: this.store as PiniaStore,\n callback: this._storeSubscribe\n }) as StoreMutationSubscriptionReturn\n }\n\n set storeSubscribe(storeSubscribe: StoreMutationSubscriptionCallback) {\n this._storeSubscribe = storeSubscribe\n }\n\n /**\n * Returns the structured trace emitter of this store.\n * Built lazily so that subclasses overriding `_className` are reflected.\n */\n protected override get tracer(): Tracer | undefined {\n if (!this._tracer && this._createTracer) {\n this._tracer = this._createTracer()\n this._tracer.scope = this.store.$id\n }\n\n return this._tracer\n }\n\n /**\n * Constructs a new instance of the store.\n * @param store The Pinia store instance.\n * @param options The plugin store options and subscription options.\n * @remarks\n * This constructor is typically called by the `customizeStore` static method\n * to create an instance of the store with the provided Pinia store and options.\n * @see PluginStoreOptions\n * @see PluginSubscriptionOptions\n */\n constructor(store: PiniaStore, options: StoreClassConstructorParams) {\n super()\n this._options = options.storeOptions as StoreOptions\n this._store = store\n this.initializeTracer(options)\n this.trace('instance:created', store.$id)\n\n if (this._options?.enhancedStore) {\n const ctx = getDefineAStoreSetupContext(this.store)\n\n if (ctx) {\n setEnhancedStore(ctx, this.store)\n this.trace('setup:enhancedStore:success', this.store.$id)\n }\n }\n }\n\n /**\n * Adds a property to the state of this store.\n * @param name The name of the property to add.\n * @param value The value of the property to add.\n */\n addToState(name: string, value?: StatePropertyValue): void {\n if (!this.isOptionApi()) {\n if (!isRef(value)) {\n value = ref<StatePropertyValue>(value)\n }\n }\n\n this.state[name] = value\n this.store[name] = toRef(this.state, name)\n }\n\n /**\n * Adds a subscription for a specific plugin to this store.\n * @param pluginName The name of the plugin for which the subscription is being added.\n * @param subscription The subscription callback or object to add.\n * @param options Additional options for the subscription, including subscription options and target stores.\n */\n addSubscription(\n pluginName: string,\n subscription: PluginSubscriberInterface,\n options?: { subscriptionOptions?: StoreOptions, stores?: PiniaStore[] }\n ): void {\n this._subscriptions[pluginName] = { subscription, ...(options ?? {}) }\n }\n\n /**\n * Called after the store has been hydrated.\n * @returns A promise that resolves when the post-hydration process is complete, or void if synchronous.\n */\n afterHydration(): void | Promise<void> {\n return\n }\n\n /**\n * Create and return a class instance\n * @param store \n * @param options \n * @template Instance The type of the store instance being created.\n * @returns The created store instance of type `Instance`, or undefined if the required keys are not present.\n */\n static customizeStore<Instance extends Store>(\n store: PiniaStore,\n options: StoreClassConstructorParams\n ): Instance | undefined {\n if (options.storeOptions && this.hasRequiredKeys(options.storeOptions)) {\n return new this(store, options) as Instance\n }\n }\n\n /**\n * Retrieves the value of a specific store option.\n * @param optionName The name of the store option to retrieve.\n * @returns The value of the specified store option, or undefined if not found.\n */\n getOption(optionName: keyof StoreOptions) {\n return this.options && (this.options as StoreOptions)[optionName]\n }\n\n /**\n * Retrieves the value of a specific state property.\n * @param propertyName The name of the state property to retrieve.\n * @returns The value of the specified state property, or undefined if not found.\n */\n getStatePropertyValue(propertyName: string) {\n return this.getValue(this.state[propertyName])\n }\n\n /**\n * Retrieves all plugin subscriptions for this store.\n * @returns An object containing all plugin subscriptions, or undefined if there are none.\n */\n getSubscriptions(): PluginSubscriptions | undefined {\n if (isEmpty(this._subscriptions)) {\n return\n }\n\n return this._subscriptions\n }\n\n /**\n * Retrieves the actual value from a potentially reactive reference.\n * @param value The value to unwrap.\n * @returns The unwrapped value if it is a reactive reference, otherwise the original value.\n */\n getValue(value: any) {\n return value?.__v_isRef ? value.value : value\n }\n\n /**\n * Checks if the given property name has a denied first character.\n * @param property The property name to check.\n * @returns True if the property name has a denied first character, otherwise false.\n */\n protected hasDeniedFirstChar(property: string): boolean {\n return hasDeniedFirstChar(property)\n }\n\n /**\n * Checks if the given options object has all the required keys.\n * @param options The options object to check.\n * @returns True if all required keys are present, otherwise false.\n */\n protected static hasRequiredKeys(options: AnyObject): boolean {\n return this._requiredKeys !== undefined && this._requiredKeys?.every(requiredKey => !!options[requiredKey])\n }\n\n /**\n * Hydrates the store, potentially performing asynchronous operations.\n * @returns void or a Promise that resolves when hydration is complete.\n */\n hydrate(): void | Promise<void> {\n return\n }\n\n /**\n * Initializes the tracer for plugin subscriptions if the createTracer option is provided.\n * @param options The plugin subscription options containing the createTracer function.\n */\n private initializeTracer(options: Omit<PluginSubscriptionOptions, 'createTracer'> & { createTracer?: () => Tracer }) {\n this._createTracer = options?.createTracer\n }\n\n /**\n * Checks if the store is using the Options API.\n * @returns True if the store is using the Options API, otherwise false.\n */\n isOptionApi(): boolean { return this.store._isOptionsAPI }\n\n /**\n * Checks if the state object has the specified property.\n * @param property The property name to check.\n * @returns True if the state object has the property, otherwise false.\n */\n stateHas(property: string): boolean { return Object.prototype.hasOwnProperty.call(this.state, property) }\n\n /**\n * Checks if the store object has the specified property.\n * @param property The property name to check.\n * @returns True if the store object has the property, otherwise false.\n */\n storeHas(property: string): boolean { return Object.prototype.hasOwnProperty.call(this.store, property) }\n\n}","import type { PluginSubscriber, PluginSubscriberInvoke } from \"../types/plugin\";\n\n\n/**\n * Creates a new plugin subscriber with the given name, invoke function, and optional properties.\n * @param name - plugin name.\n * @param invoke - function to invoke for the plugin subscriber.\n * @param optionalProps - optional additional properties for the plugin subscriber.\n * @param {Function} optionalProps.afterHydration\n * @param {PluginExecutionOptions} optionalProps.execution\n * @param {Function} optionalProps.hydrate\n * @param {PluginHydrationScheduler} optionalProps.hydrationScheduler\n * @param {Function} optionalProps.resetStoreCallback\n * @param {StoreOnActionSubscription} optionalProps.storeOnActionSubscription\n * @param {StoreMutationSubscription} optionalProps.storeMutationSubscription\n * @param {PluginSubscriptions} optionalProps.subscriptions\n * @param \n * @returns A new plugin subscriber object.\n */\nexport function createPluginSubscriber(\n name: string,\n invoke: PluginSubscriberInvoke,\n optionalProps?: Omit<PluginSubscriber, \"name\" | \"invoke\">\n): PluginSubscriber {\n return {\n name,\n invoke,\n ...optionalProps,\n };\n}","import type { AnyObject } from '../types'\nimport type {\n TraceEvent,\n TraceEventMetadata,\n TraceGroupListener,\n TraceLevel,\n TraceListener,\n TracePayload,\n TracerOptions,\n} from '../types/trace'\n\nfunction resolvePayload(payload: TracePayload): AnyObject | undefined {\n if (typeof payload !== 'function') {\n return payload\n }\n\n try {\n return payload()\n } catch (error) {\n return { __tracePayloadError: error }\n }\n}\n\n/**\n * Emits structured trace events.\n *\n * Nothing is allocated when no listener matches:\n * the payload is a factory resolved only once a consumer is known.\n */\nexport default class Tracer {\n private readonly _listeners: Array<TraceListener | TraceGroupListener> = []\n private readonly _redactor?: (payload: AnyObject) => AnyObject\n private _scope?: string\n private readonly _source: string\n\n constructor(source: string, listeners: Array<TraceListener | TraceGroupListener>, options: TracerOptions = {}) {\n this._redactor = options.redactor\n this._scope = options.scope\n this._source = source\n this._listeners = listeners\n }\n\n get scope(): string | undefined {\n return this._scope\n }\n\n set scope(scope: string | undefined) {\n this._scope = scope\n }\n\n get source(): string {\n return this._source\n }\n\n debug(label: string, namespace: string, payload?: TracePayload, scope?: string): void {\n this.emit('debug', label, namespace, payload, scope)\n }\n\n /** Relays the error to matching listeners, or reports it when none match. */\n error(label: string, namespace: string, error: unknown, payload?: TracePayload, scope?: string): void {\n this.emit('error', label, namespace, payload, scope, error)\n }\n\n private resolveAndRedact(payload: TracePayload): AnyObject | undefined {\n const resolved = resolvePayload(payload)\n\n if (!this._redactor || resolved === undefined) {\n return resolved\n }\n\n try {\n return this._redactor(resolved)\n } catch (error) {\n // never leak the raw payload when redaction fails\n return { __traceRedactionError: error instanceof Error ? error.message : String(error) }\n }\n }\n\n private matchListeners(level: TraceLevel, label: string, namespace: string, scope?: string) {\n const metadata: TraceEventMetadata = {\n label,\n level,\n namespace,\n scope: scope ?? this._scope,\n source: this._source\n }\n const matched: Array<TraceListener | TraceGroupListener> = []\n\n for (const listener of this._listeners) {\n try {\n if (listener.filter(metadata)) {\n matched.push(listener)\n }\n } catch (error) {\n console.error('Error in trace listener filter:', error)\n }\n }\n\n return { matched, metadata }\n }\n\n private emit(\n level: TraceLevel,\n label: string,\n namespace: string,\n payload?: TracePayload,\n scope?: string,\n error?: unknown\n ): void {\n const { matched, metadata } = this._listeners.length === 0\n ? { matched: [], metadata: undefined }\n : this.matchListeners(level, label, namespace, scope)\n\n if (!metadata || matched.length === 0) {\n if (level === 'error') {\n console.error('Unhandled error trace event:', error)\n }\n return\n }\n\n const event: TraceEvent = {\n ...metadata,\n ...(error !== undefined && { error }),\n ...(payload !== undefined && { payload: this.resolveAndRedact(payload) }),\n timestamp: Date.now()\n }\n\n for (const listener of matched) {\n try {\n listener.handler(event)\n } catch (error) {\n // a faulty listener must never break the traced code\n console.error('Error in trace listener:', error)\n }\n }\n }\n}\n","import { isRef } from 'vue'\nimport { hasDeniedFirstChar } from '../utils/store'\nimport { pluginName } from '../utils/constants'\nimport type { Console, LogType, StyleDefinition, StyleDefinitions } from '../types/log'\nimport type { ConsoleTraceEvent, ConsoleTraceEventArgs, TraceEvent } from '../types/trace'\nimport type { Store } from 'pinia'\n\n\nconst errorColor = '#f86f63'\nconst style = (bgColor: string, color: string = 'white') =>\n `background-color: ${bgColor}; color: ${color}; padding: 1px; margin-right: 5px; font-size: 12px`\n\nfunction getPrintablePayload(trace: TraceEvent) {\n const { payload } = trace\n if (payload && Object.keys(payload).length > 0) {\n return Object.keys(payload).reduce((acc, key) => {\n if (!['groupId', 'label', 'namespace', 'scope', 'source'].includes(key)) {\n acc[key] = isRef(payload[key]) ? payload[key].value : payload[key]\n }\n return acc\n }, {} as Record<string, unknown>)\n }\n return undefined\n}\n\nexport function printObject(label: string, payload: object, groupType: 'collapsed' | 'expanded' | 'none' = 'collapsed', source?: string) {\n if (payload instanceof Error) {\n console.groupCollapsed(\n '%c%s',\n `color: ${errorColor}; padding: 1px; margin-right: 5px; font-size: 11px`,\n `[ ${payload.name} ] ${payload.message}`,\n )\n if (payload.cause) {\n console.log('cause:', payload.cause)\n }\n const stack = payload.stack?.split('\\n')\n if (stack) {\n stack.forEach(line => {\n const trace = line.split('@')\n if (Array.isArray(trace)) {\n console.log(trace[0], trace[1])\n }\n })\n }\n console.groupEnd()\n }\n\n const isArray = Array.isArray(payload)\n const isEmpty = isArray ? payload.length === 0 : Object.keys(payload).length === 0\n if (isEmpty) {\n console.log(\n '%c%s',\n `color: ${errorColor}; padding: 1px; margin-right: 5px; font-size: 10px`,\n `[ ${label} ] Empty`\n )\n return\n }\n\n const styles: Record<string, string> = {\n options: '📚 ',\n store: '🏪 ',\n subscribers: '🧩 ',\n 'hooks subscriptions': '🔗 '\n }\n const icon = styles[label] ?? ''\n\n if (groupType === 'none' || (isArray && typeof payload[0] !== 'object')) {\n console.log(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${icon}${label} ]`, (isArray && typeof payload[0] === 'string') ? payload.join(', ') : payload\n )\n return\n }\n\n if (groupType === 'collapsed') {\n if (source) {\n console.groupCollapsed(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `${icon}${label}`, source)\n } else {\n console.groupCollapsed(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${icon}${label} ]`)\n }\n } else if (groupType === 'expanded') {\n console.group(\n '%c%s',\n 'color: #f7f7b0; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ${icon} ${label} ]`)\n }\n\n if (isArray && typeof payload[0] === 'object') {\n if (payload[0]?.name) {\n console.log(payload.reduce((acc, item) => {\n if (acc) { acc += '\\r\\n' }\n acc += `- ${item.name}`\n return acc\n }, ''))\n } else if (payload[0]?._id) {\n console.log(payload.reduce((acc, item) => {\n if (acc) { acc += '\\r\\n' }\n acc += `- ${item._id}`\n return acc\n }, ''))\n } else {\n payload.forEach((item: any) => {\n if (item.name) {\n printObject(item.name, item)\n } else if (item._id) {\n printObject(item._id, item)\n } else {\n console.dir(item)\n }\n })\n }\n } else {\n let emptyKeys: string[] = []\n Object.keys(payload).forEach(key => {\n if (key === 'groupId') {\n return\n }\n\n const value = (payload as Record<string, unknown>)[key]\n if (typeof value === 'object') {\n if (Array.isArray(value)) {\n if (typeof value[0] === 'object') {\n printObject(key, value, 'expanded')\n } else if (typeof value[0] === 'string') {\n printObject(key, value.map((item: string) => `\\r\\n - ${item}`), 'expanded')\n } else {\n console.log(\n '%c%s',\n 'color: #cae38f; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, isRef(value) ? value.value : value)\n }\n } else if (value instanceof Error) {\n console.log(key, { name: value.name, message: value.message, stack: value.stack })\n } else {\n printObject(key, Object.assign({}, value), 'expanded')\n }\n } else {\n if (!value) {\n emptyKeys.push(key)\n } else {\n const typeOfValue = typeof value\n console.log(\n '%c%s',\n 'color: #b0fa05; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, typeOfValue === 'function' ? typeOfValue : value\n )\n }\n }\n })\n if (emptyKeys.length) {\n console.log(\n '%c%s',\n 'color: #f86f63; font-size: 9px',\n `[ Empty properties ]`, emptyKeys\n )\n }\n }\n console.groupEnd()\n}\n\nfunction printTrace(trace: TraceEvent) {\n const payload = getPrintablePayload(trace)\n if (payload && Object.keys(payload).length > 0) {\n printObject(trace.label, payload, 'collapsed', trace.source)\n return\n }\n console.log(\n '%c%s',\n 'color: #f8f89f; padding: 1px; margin-right: 5px; font-size: 11px',\n trace.label, trace.source,\n )\n}\n\nfunction printTracePayload(tracePayload: Record<string, unknown>) {\n Object.keys(tracePayload).forEach((key: string) => {\n if (['groupId', 'label', 'namespace', 'scope', 'source'].includes(key)) {\n return\n }\n const arg = tracePayload[key]\n if (!arg) {\n console.log(\n '%c%s',\n 'color: #f86f63; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ] ${arg}`\n )\n return\n }\n\n switch (typeof arg) {\n case 'string': case 'number':\n console.log(\n '%c%s',\n 'color: #fafa05; padding: 1px; margin-right: 5px; font-size: 10px',\n `[ ${key} ]`, arg\n )\n break;\n case 'object':\n switch (key) {\n case 'mutation':\n console.groupCollapsed('[mutation]')\n console.dir(arg)\n console.groupEnd()\n break;\n case 'options':\n printObject(key, (arg as { storeOptions?: unknown })?.storeOptions ?? arg)\n break;\n case 'payload':\n printTracePayload(arg as Record<string, unknown>)\n break;\n case 'store':\n printObject(key, {\n $state: (arg as Store)['$state'],\n $actions: Object.keys(arg).reduce((acc, curr) => {\n if ((curr.startsWith('$') && !['$id', '$state'].includes(curr)) || curr.startsWith('_')) {\n return acc\n }\n\n const value = (arg as Record<string, unknown>)[curr]\n\n if (typeof value !== 'function') {\n if (!acc['computed']) {\n acc['computed'] = []\n }\n (acc['computed'] as string[]).push(curr)\n\n } else {\n acc[curr] = (arg as Record<string, unknown>)[curr]\n }\n\n return acc\n }, {} as Record<string, unknown>)\n })\n break;\n case 'subscribers':\n printObject(key, (arg as { name: string }[]).map((item) => `\\r\\n - ${item.name}`))\n break;\n default:\n printObject(key, arg)\n }\n break;\n case 'function':\n console.dir(arg)\n break;\n default:\n console.info(key, arg)\n }\n })\n}\nexport function log(logStyle: string, args: any) {\n if (!logStyle) {\n throw new Error('Style instructions are required')\n }\n\n console.log(\n '%c%s',\n logStyle,\n args.shift(),\n ...args\n )\n}\n\n\nexport function logTrace(logStyle: string, args: any, pluginName: string) {\n if (!logStyle) {\n throw new Error('Style instructions are required')\n }\n\n const label = args.shift()\n const event = args[0]\n\n\n if (!event?.payload || Object.keys(event.payload).length === 0) {\n console.log(\n '%c%s',\n logStyle,\n `${event?.source === pluginName ? (event?.label ?? event?.namespace) : label}`,\n event?.source\n )\n return\n }\n\n console.groupCollapsed(\n '%c%s',\n logStyle,\n `${label}\n`, event?.source\n )\n\n args.forEach((arg: any) => {\n switch (typeof arg) {\n case 'string':\n console.info(arg)\n break;\n case 'object':\n if (Array.isArray(arg)) {\n console.table(arg)\n } else {\n printTracePayload(arg)\n }\n break;\n case 'function':\n console.dir(arg)\n break;\n default:\n console.info(arg)\n }\n })\n\n\n\n console.groupEnd()\n}\n\nexport abstract class CustomConsole implements Console {\n protected _bgColor: string = 'transparent'\n protected _color: string = '#f2f286'\n protected _icon: string = '🍍⚡'\n protected _errorBgColor: string = '#d24545'\n protected _errorColor: string = 'white'\n protected _errorIcon: string = '🍍⚠️'\n protected _pluginName?: string\n protected _styles: StyleDefinitions = {\n error: { bgColor: this._errorBgColor, color: this._errorColor, icon: this._errorIcon },\n info: { bgColor: this._bgColor, color: this._color, icon: this._icon }\n }\n\n protected formatMessage(message: string, icon: string): string {\n return this._pluginName ? ` [${icon} ${this._pluginName}] \n ${message} \n` : message\n }\n\n protected generateStyle(styleDefinition: StyleDefinition): string {\n return style(styleDefinition.bgColor, styleDefinition.color)\n }\n\n protected getStyleDefinition(messageType?: LogType): StyleDefinition {\n return this._styles[messageType ?? 'info']\n }\n\n log(...args: any) {\n this.useLog(\n this.getStyleDefinition(),\n args\n )\n }\n\n error(...args: any) {\n const logType = 'error'\n this.useLog(\n this.getStyleDefinition(logType),\n args\n )\n }\n\n protected rebuildArgs(args: string | any[]): any[] {\n if (typeof args === 'string') {\n return [args]\n }\n\n if (Array.isArray(args)) {\n return [args.shift(), ...args]\n }\n\n return [args]\n }\n\n protected useLog(styleDefinition: StyleDefinition, args: any) {\n log(\n this.generateStyle(styleDefinition),\n this.rebuildArgs(args)\n )\n }\n}\n\nexport class TraceConsole extends CustomConsole {\n protected _pluginName: string = pluginName\n\n constructor(pluginName?: string) {\n super()\n if (pluginName) {\n this._pluginName = pluginName\n }\n }\n\n\n logGroup(groups: ConsoleTraceEvent[]) {\n const firstEntry = groups.shift()\n const context = firstEntry?.[1] as ConsoleTraceEventArgs\n\n console.groupCollapsed(\n '%c%s',\n 'color: #87e47f; padding: 1px; margin-right: 5px; font-size: 11px; font-family: arial',\n `🍍 ${context?.label ?? context?.namespace}`, `[${context?.scope}]`\n )\n if (context?.payload) {\n printTracePayload(context.payload)\n }\n console.groupCollapsed(\n '%c%s',\n 'color: #f1f6b7; padding: 1px; margin-right: 5px; font-size: 11px',\n `[ ✨ traces ]`\n )\n groups.forEach(group => printTrace(group[1] as TraceEvent))\n console.groupEnd()\n console.groupEnd()\n }\n\n protected useLog(styleDefinition: StyleDefinition, args: any) {\n logTrace(\n this.generateStyle(styleDefinition),\n this.rebuildArgs(args),\n this._pluginName\n )\n }\n}","import { TraceConsole } from '../system/log'\n\nimport type { Console } from '../types/log'\nimport type {\n ConsoleTraceEvent, ConsoleTraceEventArgs, TraceEvent, TraceListenerGroupBy, ConsoleTraceGroupListener\n} from '../types/trace'\n\n\n/**\n * Builds the console arguments from a trace event.\n * @param event The trace event to build console arguments from.\n * @returns An array containing the formatted trace label and the sanitized event data.\n */\nfunction buildConsoleArgsFromEvent(event: TraceEvent): ConsoleTraceEvent {\n const sanitizedEvent = Object.keys(event).reduce((acc, curr) => {\n if (curr !== 'level' && curr !== 'timestamp') {\n acc[curr] = event[curr as keyof ConsoleTraceEventArgs]\n }\n return acc\n }, {} as Record<string, unknown>)\n\n return [formatTraceLabel(event), sanitizedEvent as ConsoleTraceEventArgs]\n}\n\nfunction formatTraceLabel(event: TraceEvent): string {\n return event.scope\n ? `${event.label} [${event.scope}]`\n : `${event.label}`\n}\n\nfunction log(target: Console, event: TraceEvent): void {\n const consoleMethod = event.level === 'error' ? 'error' : 'log'\n target[consoleMethod](...buildConsoleArgsFromEvent(event))\n}\n\n/**\n * Creates a console trace group listener that groups trace events by the specified key.\n * @param groupBy The key of the trace event metadata to group by.\n * @returns A console trace group listener configured to group trace events by the specified key.\n */\nexport function createConsoleGroupTraceListener(groupBy: TraceListenerGroupBy = 'scope'): ConsoleTraceGroupListener {\n const target = new TraceConsole()\n const groups = new Map<string, ConsoleTraceEvent[]>()\n // Overlapping starts for the same key (e.g. concurrent async mutations of a store) share one group\n const openCounts = new Map<string, number>()\n\n\n function createGroup(key: string) {\n if (!groups.has(key)) {\n groups.set(key, [])\n }\n openCounts.set(key, (openCounts.get(key) ?? 0) + 1)\n }\n\n function logGroup(key: string): void {\n const group = groups.get(key)\n\n if (!group) {\n target.error(`No group found for key \"${key}\"`)\n return\n }\n\n const remaining = (openCounts.get(key) ?? 1) - 1\n if (remaining > 0) {\n openCounts.set(key, remaining)\n return\n }\n\n if (group.length) { target.logGroup(group) }\n groups.delete(key)\n openCounts.delete(key)\n }\n\n return {\n createGroup,\n logGroup,\n handler(event): void {\n const groupKey = (event?.payload?.groupId ?? event[groupBy]) as string\n if (!groups.has(groupKey)) {\n log(target, event)\n return\n }\n\n const group = groups.get(groupKey)\n if (group?.[0]?.[0] === formatTraceLabel(event)) { return }\n\n groups.get(groupKey)?.push(buildConsoleArgsFromEvent(event))\n }\n }\n}\n\n\n","import { createConsoleGroupTraceListener } from \"./console-trace-listener\"\nimport { pluginName, pluginSubscriptionNamespace } from \"../utils/constants\"\n\nimport type {\n TraceEventMetadata,\n TraceFilter,\n TraceFilterFactoryCriterion,\n TraceFilterFactoryParam,\n TraceGroupListener\n} from \"../types/trace\"\n\n\nfunction createFilter(criteria: TraceFilterFactoryCriterion[], context: boolean = true, mode: 'every' | 'some') {\n return (event: TraceEventMetadata) => {\n return criteria[mode](({ comparator = 'equals', target, value }) => {\n if (target === 'namespace' && context && isPluginSubscription(event)) {\n return true\n }\n\n const eventValue = event[target]\n if (typeof eventValue !== 'string') return false\n\n let result = false\n switch (comparator) {\n case 'equals':\n result = eventValue === value\n break\n case 'contains':\n result = eventValue.includes(value)\n break\n case 'startsWith':\n result = eventValue.startsWith(value)\n break\n case 'endsWith':\n result = eventValue.endsWith(value)\n break\n default:\n result = false\n break\n }\n return result\n })\n }\n}\n\n/**\n * Creates a trace group listener with optional filtering.\n * @param listenerDef The listener definition or filter criteria for the trace group listener.\n * @param context Print the plugin context (subscribers, store, options, and traces) to the console.. Defaults to true.\n * @param filterMode The mode to apply when evaluating multiple filter criteria: 'every' or 'some'.\n * @param groupBy The key of the trace event metadata to group by.\n * @returns A trace listener configured with group handling and filtering.\n */\nexport function createTraceGroupListener(\n listenerDef: TraceFilterFactoryParam | TraceFilterFactoryCriterion[],\n context: boolean = true,\n filterMode: 'every' | 'some' = 'every',\n groupBy: keyof TraceEventMetadata = 'scope'\n) {\n return {\n groupBy,\n ...createConsoleGroupTraceListener(groupBy),\n ...createTraceFilter(listenerDef, context, filterMode)\n } as TraceGroupListener\n\n}\n\nfunction createTraceFilter(\n listenerDef: TraceFilterFactoryParam | TraceFilterFactoryCriterion[],\n context: boolean = true,\n filterMode: 'every' | 'some' = 'every'\n): TraceFilterFactoryParam & { filter: TraceFilter } {\n if (Array.isArray(listenerDef)) {\n return { filter: createFilter(listenerDef, context, filterMode) }\n }\n\n // Copy: the caller's definition must never be mutated.\n return {\n ...listenerDef,\n filter: Array.isArray(listenerDef.filter)\n ? createFilter(listenerDef.filter, context, filterMode)\n : listenerDef.filter\n }\n}\n\nfunction isPluginSubscription(event: TraceEventMetadata): boolean {\n return event?.source === pluginName && (!event?.namespace || event.namespace.startsWith(pluginSubscriptionNamespace))\n}","declare const process: { env: { NODE_ENV?: string } } | undefined\n\n/**\n * Tells whether the host application is built for production.\n * The literal `process.env.NODE_ENV` expression is kept on purpose: consumer bundlers\n * (Vite, webpack, Nuxt...) replace it statically. Without a bundler `process` may be\n * undefined, in which case the environment is not considered production.\n */\nexport function isProductionEnvironment(): boolean {\n try {\n return process!.env.NODE_ENV === 'production'\n } catch {\n return false\n }\n}\n","import type { AnyObject } from '../types'\nimport type { TraceRedactOptions } from '../types/trace'\n\nexport const DEFAULT_REDACTED_VALUE = '[REDACTED]'\n\n/**\n * Keys masked by default when redaction is enabled.\n * Matching is a case-insensitive \"contains\", so `accessToken` or `user_password` are masked too.\n */\nexport const defaultRedactedKeys: readonly RegExp[] = [\n /pass(word|wd|phrase|code)|^pwd/i,\n /secret/i,\n /token/i,\n /authorization/i,\n /api[-_]?key/i,\n /(private|encryption|signing|secret)[-_]?key/i,\n /credential/i,\n /cookie/i,\n /cipher/i,\n]\n\nconst MAX_DEPTH = 12\n\ntype KeyMatcher = (key: string) => boolean\n\nfunction createKeyMatcher(keys: ReadonlyArray<string | RegExp>): KeyMatcher {\n const exact = new Set<string>()\n const patterns: RegExp[] = []\n\n for (const key of keys) {\n if (typeof key === 'string') {\n exact.add(key.toLowerCase())\n } else {\n // a global/sticky regexp is stateful: rebuild it without those flags\n patterns.push(new RegExp(key.source, key.flags.replace(/[gy]/g, '')))\n }\n }\n\n return (key: string) => exact.has(key.toLowerCase()) || patterns.some(pattern => pattern.test(key))\n}\n\nfunction isTraversable(value: unknown): value is object {\n if (value === null || typeof value !== 'object') {\n return false\n }\n\n return !(\n value instanceof Date\n || value instanceof RegExp\n || value instanceof Error\n || value instanceof Promise\n || value instanceof WeakMap\n || value instanceof WeakSet\n )\n}\n\n/**\n * Creates a function returning a redacted copy of a trace payload.\n * The original value (usually the live store state) is never mutated.\n * @param options Redaction options, or `true` to use the default keys.\n * @returns The redaction function.\n */\nexport function createRedactor(options: TraceRedactOptions | true = true): (payload: AnyObject) => AnyObject {\n const { includeDefaults = true, keys = [], replacement = DEFAULT_REDACTED_VALUE } =\n options === true ? {} : options\n const isSensitive = createKeyMatcher([...(includeDefaults ? defaultRedactedKeys : []), ...keys])\n\n function redact(value: unknown, seen: WeakMap<object, unknown>, depth: number): unknown {\n if (!isTraversable(value)) {\n return value\n }\n\n const cached = seen.get(value)\n if (cached !== undefined) {\n return cached\n }\n\n if (depth >= MAX_DEPTH) {\n return '[MaxDepth]'\n }\n\n if (value instanceof Map) {\n const copy = new Map()\n seen.set(value, copy)\n value.forEach((entry, key) => {\n copy.set(key, typeof key === 'string' && isSensitive(key) ? replacement : redact(entry, seen, depth + 1))\n })\n return copy\n }\n\n if (value instanceof Set) {\n const copy = new Set()\n seen.set(value, copy)\n value.forEach(entry => copy.add(redact(entry, seen, depth + 1)))\n return copy\n }\n\n if (Array.isArray(value)) {\n const copy: unknown[] = []\n seen.set(value, copy)\n value.forEach(entry => copy.push(redact(entry, seen, depth + 1)))\n return copy\n }\n\n const copy: Record<string, unknown> = {}\n seen.set(value, copy)\n for (const key of Object.keys(value)) {\n const redactedValue = isSensitive(key)\n ? replacement\n : redact((value as Record<string, unknown>)[key], seen, depth + 1)\n Object.defineProperty(copy, key, {\n configurable: true,\n enumerable: true,\n value: redactedValue,\n writable: true\n })\n }\n return copy\n }\n\n return payload => redact(payload, new WeakMap(), 0) as AnyObject\n}\n"],"names":["PluginSubscriber","pluginName","createInstanceFunction","__publicField","options","subscriptions","_context","store","createTracer","Store","TraceEmitter","ctx","getDefineAStoreSetupContext","setEnhancedStore","onAction","state","storeSubscribe","name","value","isRef","ref","toRef","subscription","optionName","propertyName","isEmpty","property","hasDeniedFirstChar","requiredKey","createPluginSubscriber","invoke","optionalProps","resolvePayload","payload","error","source","listeners","scope","label","namespace","resolved","level","metadata","matched","listener","event","error2","style","bgColor","color","getPrintablePayload","trace","acc","key","printObject","groupType","errorColor","stack","line","isArray","icon","item","emptyKeys","typeOfValue","printTrace","tracePayload","arg","printTracePayload","curr","log$1","logStyle","args","logTrace","pluginName2","CustomConsole","message","styleDefinition","messageType","log","TraceConsole","groups","context","group","buildConsoleArgsFromEvent","sanitizedEvent","formatTraceLabel","target","consoleMethod","createConsoleGroupTraceListener","groupBy","createGroup","openCounts","logGroup","remaining","groupKey","createFilter","criteria","mode","comparator","isPluginSubscription","eventValue","result","listenerDef","filterMode","createTraceFilter","pluginSubscriptionNamespace","isProductionEnvironment","DEFAULT_REDACTED_VALUE","defaultRedactedKeys","MAX_DEPTH","createKeyMatcher","keys","exact","patterns","pattern","isTraversable","createRedactor","replacement","isSensitive","includeDefaults","seen","depth","cached","copy2","entry","redact","copy","redactedValue","noop","createTracerRegistry","enabled","redactor","addListener","listenerGroup","createTraceGroupListener","index","addScopesListener","scopes","clearTraceListeners","getMatchedListener","listenerGroupAction","actionName","groupLabel","Tracer","hasTraceListeners"],"mappings":";;;;;;AAyBA,MAA8BA,GAA8E;AAAA,EAqDxG,YAAIC,GAAcC,GAAoC;AApD9C,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAEE,IAAAA,EAAA;AACF,IAAAA,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAAA,IAAAA,EAAA;AAAA,IAAAA,EAAA;AAKE,IAAAA,EAAA;AAwCN,SAAK,QAAAF,GACT,KAAA,kBAAAC;AAAA,EAGA;AAAA,EA1CO,IAAA,OAAA;AAAA,WAAA,KAAA;AAAA,EAEA;AAAA,EAGP,IAAI,gBAAe;AACf,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,gBAAsC;AACtC,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,cAAAE,GAAyD;AACzD,SAAA,iBAAYA;AAAA,EAChB;AAAA,EAEA,IAAI,qBAAc;AACd,WAAK,KAAA;AAAA,EACT;AAAA,EAEA,IAAI,4BAAiE;AACjE,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,4BAAmE;AACnE,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI;AACA,WAAO,KAAK;AAAA,EAChB;AAAA,EAEA,IAAI,cAAAC,GAAiD;AACjD,SAAA,iBAAYA;AAAA,EAChB;AAAA,EASI,eAAKC,GAAkB;AAAA,EAC3B;AAAA,EAAA,QAAAA,GAAA;AAAA,EAAA;AAAA,EAQI,OAAA,EAAA,OAAAC,GAAA,SAAAH,EAAA,GAAAI,GAAA;AACJ,WAAA,KAAA,iBAAA,KAAA,gB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ia plugin for Vue.js that helps building Pinia plugins by centralizing subscriber registration and providing a Store base class for store helpers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|