@smplkit/sdk 1.6.13 → 1.6.15
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.js
CHANGED
|
@@ -19154,32 +19154,33 @@ var LoggingClient = class {
|
|
|
19154
19154
|
debug("websocket", `logger event received: ${JSON.stringify(data)}`);
|
|
19155
19155
|
const id = data.id;
|
|
19156
19156
|
if (id) {
|
|
19157
|
-
const level = data.level ?? null;
|
|
19158
|
-
const event = {
|
|
19159
|
-
id,
|
|
19160
|
-
level,
|
|
19161
|
-
source: "websocket"
|
|
19162
|
-
};
|
|
19163
19157
|
void Promise.all([this.management.list(), this.management.listGroups()]).then(([serverLoggers]) => {
|
|
19164
19158
|
debug("resolution", `resolution pass (trigger: websocket event for logger ${id})`);
|
|
19165
19159
|
this._applyLevels(serverLoggers);
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
}
|
|
19173
|
-
|
|
19174
|
-
const idCallbacks = this._keyListeners.get(id);
|
|
19175
|
-
if (idCallbacks) {
|
|
19176
|
-
for (const cb of idCallbacks) {
|
|
19160
|
+
const logger = serverLoggers.find((l) => l.id === id);
|
|
19161
|
+
const level = logger?.level ?? null;
|
|
19162
|
+
const event = {
|
|
19163
|
+
id,
|
|
19164
|
+
level,
|
|
19165
|
+
source: "websocket"
|
|
19166
|
+
};
|
|
19167
|
+
for (const cb of this._globalListeners) {
|
|
19177
19168
|
try {
|
|
19178
19169
|
cb(event);
|
|
19179
19170
|
} catch {
|
|
19180
19171
|
}
|
|
19181
19172
|
}
|
|
19182
|
-
|
|
19173
|
+
const idCallbacks = this._keyListeners.get(id);
|
|
19174
|
+
if (idCallbacks) {
|
|
19175
|
+
for (const cb of idCallbacks) {
|
|
19176
|
+
try {
|
|
19177
|
+
cb(event);
|
|
19178
|
+
} catch {
|
|
19179
|
+
}
|
|
19180
|
+
}
|
|
19181
|
+
}
|
|
19182
|
+
}).catch(() => {
|
|
19183
|
+
});
|
|
19183
19184
|
}
|
|
19184
19185
|
};
|
|
19185
19186
|
_handleGroupChanged = (data) => {
|