@azure/web-pubsub 1.1.4-alpha.20241031.1 → 1.1.4-alpha.20241111.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist-esm/src/hubClient.js +8 -3
- package/dist-esm/src/hubClient.js.map +1 -1
- package/dist-esm/test/hubs.spec.js +22 -0
- package/dist-esm/test/hubs.spec.js.map +1 -1
- package/dist-esm/test/testEnv.js +10 -0
- package/dist-esm/test/testEnv.js.map +1 -1
- package/package.json +1 -2
- package/types/web-pubsub.d.ts +1 -1
package/dist/index.js
CHANGED
@@ -2390,9 +2390,14 @@ class WebPubSubServiceClient {
|
|
2390
2390
|
const endpoint = this.endpoint.endsWith("/") ? this.endpoint : this.endpoint + "/";
|
2391
2391
|
const clientEndpoint = endpoint.replace(/(http)(s?:\/\/)/gi, "ws$2");
|
2392
2392
|
const clientProtocol = updatedOptions.clientProtocol;
|
2393
|
-
|
2394
|
-
|
2395
|
-
:
|
2393
|
+
let clientPath = `client/hubs/${this.hubName}`;
|
2394
|
+
switch (clientProtocol) {
|
2395
|
+
case "mqtt":
|
2396
|
+
clientPath = `clients/mqtt/hubs/${this.hubName}`;
|
2397
|
+
break;
|
2398
|
+
case "socketio":
|
2399
|
+
clientPath = `clients/socketio/hubs/${this.hubName}`;
|
2400
|
+
}
|
2396
2401
|
const baseUrl = clientEndpoint + clientPath;
|
2397
2402
|
let token;
|
2398
2403
|
if (coreAuth.isTokenCredential(this.credential)) {
|