@azure/web-pubsub 1.0.1-alpha.20211215.2 → 1.0.1-alpha.20220103.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1524,7 +1524,7 @@ class GeneratedClient extends GeneratedClientContext {
1524
1524
  /** @internal */
1525
1525
  const createSpan = coreTracing.createSpanFunction({
1526
1526
  namespace: "Microsoft.WebPubSub",
1527
- packagePrefix: "Azure.Messaging.WebPubSub"
1527
+ packagePrefix: "Azure.Messaging.WebPubSub",
1528
1528
  });
1529
1529
 
1530
1530
  // Copyright (c) Microsoft Corporation.
@@ -1590,7 +1590,7 @@ class WebPubSubGroupImpl {
1590
1590
  throw new coreRestPipeline.RestError(`Connection id '${connectionId}' doesn't exist`, {
1591
1591
  statusCode: response === null || response === void 0 ? void 0 : response.status,
1592
1592
  request: response === null || response === void 0 ? void 0 : response.request,
1593
- response: response
1593
+ response: response,
1594
1594
  });
1595
1595
  }
1596
1596
  }
@@ -1686,11 +1686,11 @@ function webPubSubKeyCredentialPolicy(credential) {
1686
1686
  const bearerToken = jwt.sign({}, credential.key, {
1687
1687
  audience: request.url,
1688
1688
  expiresIn: "1h",
1689
- algorithm: "HS256"
1689
+ algorithm: "HS256",
1690
1690
  });
1691
1691
  request.headers.set("Authorization", `Bearer ${bearerToken}`);
1692
1692
  return next(request);
1693
- }
1693
+ },
1694
1694
  };
1695
1695
  }
1696
1696
 
@@ -1746,7 +1746,7 @@ function webPubSubReverseProxyPolicy(endpoint) {
1746
1746
  parsedUrl.host = rpEndpointUrl.host;
1747
1747
  request.url = parsedUrl.toString();
1748
1748
  return next(request);
1749
- }
1749
+ },
1750
1750
  };
1751
1751
  }
1752
1752
 
@@ -1778,12 +1778,12 @@ class WebPubSubServiceClient {
1778
1778
  const internalPipelineOptions = Object.assign(Object.assign(Object.assign({}, this.clientOptions), {
1779
1779
  apiVersion: this.apiVersion,
1780
1780
  loggingOptions: {
1781
- logger: logger.info
1782
- }
1781
+ logger: logger.info,
1782
+ },
1783
1783
  }), (coreAuth.isTokenCredential(this.credential)
1784
1784
  ? {
1785
1785
  credential: this.credential,
1786
- credentialScopes: ["https://webpubsub.azure.com/.default"]
1786
+ credentialScopes: ["https://webpubsub.azure.com/.default"],
1787
1787
  }
1788
1788
  : {}));
1789
1789
  this.client = new GeneratedClient(this.endpoint, internalPipelineOptions);
@@ -1859,7 +1859,7 @@ class WebPubSubServiceClient {
1859
1859
  throw new coreRestPipeline.RestError(response.bodyAsText, {
1860
1860
  statusCode: response === null || response === void 0 ? void 0 : response.status,
1861
1861
  request: response === null || response === void 0 ? void 0 : response.request,
1862
- response: response
1862
+ response: response,
1863
1863
  });
1864
1864
  }
1865
1865
  }
@@ -1952,7 +1952,7 @@ class WebPubSubServiceClient {
1952
1952
  throw new coreRestPipeline.RestError(response.bodyAsText, {
1953
1953
  statusCode: response === null || response === void 0 ? void 0 : response.status,
1954
1954
  request: response === null || response === void 0 ? void 0 : response.request,
1955
- response: response
1955
+ response: response,
1956
1956
  });
1957
1957
  }
1958
1958
  }
@@ -1988,7 +1988,7 @@ class WebPubSubServiceClient {
1988
1988
  throw new coreRestPipeline.RestError(response.bodyAsText, {
1989
1989
  statusCode: response === null || response === void 0 ? void 0 : response.status,
1990
1990
  request: response === null || response === void 0 ? void 0 : response.request,
1991
- response: response
1991
+ response: response,
1992
1992
  });
1993
1993
  }
1994
1994
  }
@@ -2057,7 +2057,7 @@ class WebPubSubServiceClient {
2057
2057
  throw new coreRestPipeline.RestError(response.bodyAsText, {
2058
2058
  statusCode: response === null || response === void 0 ? void 0 : response.status,
2059
2059
  request: response === null || response === void 0 ? void 0 : response.request,
2060
- response: response
2060
+ response: response,
2061
2061
  });
2062
2062
  }
2063
2063
  }
@@ -2090,7 +2090,7 @@ class WebPubSubServiceClient {
2090
2090
  expiresIn: (options === null || options === void 0 ? void 0 : options.expirationTimeInMinutes) === undefined
2091
2091
  ? "1h"
2092
2092
  : `${options.expirationTimeInMinutes}m`,
2093
- algorithm: "HS256"
2093
+ algorithm: "HS256",
2094
2094
  };
2095
2095
  if (options === null || options === void 0 ? void 0 : options.userId) {
2096
2096
  signOptions.subject = options === null || options === void 0 ? void 0 : options.userId;
@@ -2100,7 +2100,7 @@ class WebPubSubServiceClient {
2100
2100
  return {
2101
2101
  token,
2102
2102
  baseUrl,
2103
- url: `${baseUrl}?access_token=${token}`
2103
+ url: `${baseUrl}?access_token=${token}`,
2104
2104
  };
2105
2105
  }
2106
2106
  finally {