pusher-js 8.0.0 → 8.0.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Pusher JavaScript Library v8.0.0
2
+ * Pusher JavaScript Library v8.0.2
3
3
  * https://pusher.com/
4
4
  *
5
5
  * Copyright 2020, Pusher
@@ -897,7 +897,7 @@ function safeJSONStringify(source) {
897
897
 
898
898
  // CONCATENATED MODULE: ./src/core/defaults.ts
899
899
  var Defaults = {
900
- VERSION: "8.0.0",
900
+ VERSION: "8.0.2",
901
901
  PROTOCOL: 7,
902
902
  wsPort: 80,
903
903
  wssPort: 443,
@@ -3644,7 +3644,7 @@ var fetchAuth = function (context, query, authOptions, authRequestType, callback
3644
3644
  if (status === 200) {
3645
3645
  return response.text();
3646
3646
  }
3647
- throw new HTTPAuthError(200, "Could not get " + authRequestType.toString() + " info from your auth endpoint, status: " + status);
3647
+ throw new HTTPAuthError(status, "Could not get " + authRequestType.toString() + " info from your auth endpoint, status: " + status);
3648
3648
  })
3649
3649
  .then(function (data) {
3650
3650
  var parsedData;
@@ -3728,7 +3728,7 @@ var Worker = {
3728
3728
  },
3729
3729
  randomInt: function (max) {
3730
3730
  var random = function () {
3731
- var crypto = window.crypto || window['msCrypto'];
3731
+ var crypto = globalThis.crypto || globalThis['msCrypto'];
3732
3732
  var random = crypto.getRandomValues(new Uint32Array(1))[0];
3733
3733
  return random / Math.pow(2, 32);
3734
3734
  };