@zerodensity/realityhub-api 1.7.0 → 1.7.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.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Publish Package to NPM (tag next)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
publish-npm:
|
|
8
|
+
name: Publish Job
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
- uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: '18'
|
|
15
|
+
registry-url: https://registry.npmjs.org/
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npm publish --tag next
|
|
18
|
+
env:
|
|
19
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -10,12 +10,13 @@ jobs:
|
|
|
10
10
|
name: Publish Job
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
14
|
-
- uses: actions/setup-node@
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
- uses: actions/setup-node@v3
|
|
15
15
|
with:
|
|
16
|
-
node-version:
|
|
16
|
+
node-version: '18'
|
|
17
17
|
registry-url: https://registry.npmjs.org/
|
|
18
18
|
- run: npm ci
|
|
19
19
|
- run: npm publish
|
|
20
|
+
- run: npm publish --tag latest
|
|
20
21
|
env:
|
|
21
22
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/README.md
CHANGED
package/package.json
CHANGED
package/src/lib/BrokerClient.js
CHANGED
|
@@ -113,6 +113,7 @@ module.exports = class BrokerClient extends BrokerBase {
|
|
|
113
113
|
* @param {object} options Options
|
|
114
114
|
* @param {string} options.host Hostname or IP of the target server.
|
|
115
115
|
* @param {number} options.port WebSocket port of the target server.
|
|
116
|
+
* @param {string} options.url A full URL of the websocket router (alternative to host and port options)
|
|
116
117
|
*/
|
|
117
118
|
connect(options) {
|
|
118
119
|
if (this.isDuplicate) return;
|
|
@@ -122,6 +123,8 @@ module.exports = class BrokerClient extends BrokerBase {
|
|
|
122
123
|
|
|
123
124
|
if (!options) {
|
|
124
125
|
url = new URL(location.href);
|
|
126
|
+
} else if (options.url) {
|
|
127
|
+
url = new URL(options.url);
|
|
125
128
|
} else {
|
|
126
129
|
url = { hostname: options.host, port: options.port };
|
|
127
130
|
}
|
|
@@ -733,6 +736,7 @@ module.exports = class BrokerClient extends BrokerBase {
|
|
|
733
736
|
* @param {{ host: string, port: number }} params.hub RealityHub connection parameters
|
|
734
737
|
* @param {string} params.hub.host RealityHub hostname or IP address
|
|
735
738
|
* @param {string} params.hub.port RealityHub port
|
|
739
|
+
* @param {string} params.hub.url RealityHub websocket URL (alternative to host and port)
|
|
736
740
|
* @param {ErrorCallback} [params.onError] Error handler callback, BrokerClient will catch the errors if not specified
|
|
737
741
|
* @returns {Promise<BrokerClient, Error>} A BrokerClient instance.
|
|
738
742
|
*/
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Publish Package to Github Packages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
publish-gpr:
|
|
8
|
-
name: Publish Job
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v2
|
|
12
|
-
- uses: actions/setup-node@v1
|
|
13
|
-
with:
|
|
14
|
-
node-version: 14
|
|
15
|
-
registry-url: https://npm.pkg.github.com/
|
|
16
|
-
- run: npm ci
|
|
17
|
-
- run: npm publish
|
|
18
|
-
env:
|
|
19
|
-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|