@simfinity/constellation-client 1.0.18 → 1.0.19
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 +2 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -303,8 +303,9 @@ var WebClient = class {
|
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
send(type, data = null) {
|
|
306
|
+
var _a;
|
|
306
307
|
if (!this.ws || this.ws.readyState != WebSocket.OPEN) {
|
|
307
|
-
throw new Error(
|
|
308
|
+
throw new Error(`Stream is not opened. State=${(_a = this.ws) == null ? void 0 : _a.readyState}`);
|
|
308
309
|
}
|
|
309
310
|
this.ws.send(JSON.stringify({ type, ...data && { data } }));
|
|
310
311
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -277,8 +277,9 @@ var WebClient = class {
|
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
send(type, data = null) {
|
|
280
|
+
var _a;
|
|
280
281
|
if (!this.ws || this.ws.readyState != WebSocket.OPEN) {
|
|
281
|
-
throw new Error(
|
|
282
|
+
throw new Error(`Stream is not opened. State=${(_a = this.ws) == null ? void 0 : _a.readyState}`);
|
|
282
283
|
}
|
|
283
284
|
this.ws.send(JSON.stringify({ type, ...data && { data } }));
|
|
284
285
|
}
|