@smplkit/sdk 1.6.14 → 1.6.16
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/index.cjs +19 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19195,32 +19195,33 @@ var LoggingClient = class {
|
|
|
19195
19195
|
debug("websocket", `logger event received: ${JSON.stringify(data)}`);
|
|
19196
19196
|
const id = data.id;
|
|
19197
19197
|
if (id) {
|
|
19198
|
-
const level = data.level ?? null;
|
|
19199
|
-
const event = {
|
|
19200
|
-
id,
|
|
19201
|
-
level,
|
|
19202
|
-
source: "websocket"
|
|
19203
|
-
};
|
|
19204
19198
|
void Promise.all([this.management.list(), this.management.listGroups()]).then(([serverLoggers]) => {
|
|
19205
19199
|
debug("resolution", `resolution pass (trigger: websocket event for logger ${id})`);
|
|
19206
19200
|
this._applyLevels(serverLoggers);
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
}
|
|
19214
|
-
|
|
19215
|
-
const idCallbacks = this._keyListeners.get(id);
|
|
19216
|
-
if (idCallbacks) {
|
|
19217
|
-
for (const cb of idCallbacks) {
|
|
19201
|
+
const logger = serverLoggers.find((l) => l.id === id);
|
|
19202
|
+
const level = logger?.level ?? null;
|
|
19203
|
+
const event = {
|
|
19204
|
+
id,
|
|
19205
|
+
level,
|
|
19206
|
+
source: "websocket"
|
|
19207
|
+
};
|
|
19208
|
+
for (const cb of this._globalListeners) {
|
|
19218
19209
|
try {
|
|
19219
19210
|
cb(event);
|
|
19220
19211
|
} catch {
|
|
19221
19212
|
}
|
|
19222
19213
|
}
|
|
19223
|
-
|
|
19214
|
+
const idCallbacks = this._keyListeners.get(id);
|
|
19215
|
+
if (idCallbacks) {
|
|
19216
|
+
for (const cb of idCallbacks) {
|
|
19217
|
+
try {
|
|
19218
|
+
cb(event);
|
|
19219
|
+
} catch {
|
|
19220
|
+
}
|
|
19221
|
+
}
|
|
19222
|
+
}
|
|
19223
|
+
}).catch(() => {
|
|
19224
|
+
});
|
|
19224
19225
|
}
|
|
19225
19226
|
};
|
|
19226
19227
|
_handleGroupChanged = (data) => {
|