comty.js 0.62.0 → 0.62.1

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.js CHANGED
@@ -77,7 +77,9 @@ if (globalThis.isServerMode) {
77
77
 
78
78
  if (typeof ws === "object") {
79
79
  if (ws.enable === true) {
80
- __comty_shared_state.ws = new (0, _ws2.default)()
80
+ __comty_shared_state.ws = new (0, _ws2.default)({
81
+ origin: origin,
82
+ })
81
83
 
82
84
  if (ws.autoConnect === true) {
83
85
  sharedState.ws.connectAll()
package/dist/ws.js CHANGED
@@ -5,7 +5,11 @@ var _socketioclient = require('socket.io-client');
5
5
  var _src = require('linebridge-client/src');
6
6
  //import { RTEngineClient } from "../../linebridge/client/src"
7
7
 
8
- class WebsocketManager {constructor() { WebsocketManager.prototype.__init.call(this); }
8
+ class WebsocketManager {
9
+ constructor({ origin }) {;WebsocketManager.prototype.__init.call(this);
10
+ this.origin = origin
11
+ }
12
+
9
13
  __init() {this.sockets = new Map()}
10
14
 
11
15
  async connect(remote) {
@@ -23,7 +27,7 @@ class WebsocketManager {constructor() { WebsocketManager.prototype.__init.call(t
23
27
  }
24
28
  }
25
29
 
26
- const socket = _socketioclient.io.call(void 0, _remotes2.default.origin, opts)
30
+ const socket = _socketioclient.io.call(void 0, this.origin, opts)
27
31
 
28
32
  socket.on("connect", () => {
29
33
  globalThis.__comty_shared_state.eventBus.emit(
@@ -57,7 +61,7 @@ class WebsocketManager {constructor() { WebsocketManager.prototype.__init.call(t
57
61
 
58
62
  const client = new (0, _src.RTEngineClient)({
59
63
  refName: remote.namespace,
60
- url: `${_remotes2.default.origin}/${remote.namespace}`,
64
+ url: `${this.origin}/${remote.namespace}`,
61
65
  token: _withStorage2.default.engine.get("token"),
62
66
  })
63
67
 
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "comty.js",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "main": "./dist/index.js",
5
+ "description": "Official Comty API for JavaScript",
6
+ "homepage": "https://github.com/ragestudio/comty.js",
5
7
  "author": "RageStudio <support@ragestudio.net>",
6
8
  "scripts": {
7
9
  "build": "hermes build"