glitch-javascript-sdk 0.4.4 → 0.4.5

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/cjs/index.js CHANGED
@@ -526,7 +526,7 @@ var isTypedArray = (function(TypedArray) {
526
526
  };
527
527
  })(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
528
528
 
529
- var utils$a = {
529
+ var utils$b = {
530
530
  isArray: isArray,
531
531
  isArrayBuffer: isArrayBuffer,
532
532
  isBuffer: isBuffer,
@@ -559,7 +559,7 @@ var utils$a = {
559
559
  isFileList: isFileList
560
560
  };
561
561
 
562
- var utils$9 = utils$a;
562
+ var utils$a = utils$b;
563
563
 
564
564
  function encode(val) {
565
565
  return encodeURIComponent(val).
@@ -587,26 +587,26 @@ var buildURL$1 = function buildURL(url, params, paramsSerializer) {
587
587
  var serializedParams;
588
588
  if (paramsSerializer) {
589
589
  serializedParams = paramsSerializer(params);
590
- } else if (utils$9.isURLSearchParams(params)) {
590
+ } else if (utils$a.isURLSearchParams(params)) {
591
591
  serializedParams = params.toString();
592
592
  } else {
593
593
  var parts = [];
594
594
 
595
- utils$9.forEach(params, function serialize(val, key) {
595
+ utils$a.forEach(params, function serialize(val, key) {
596
596
  if (val === null || typeof val === 'undefined') {
597
597
  return;
598
598
  }
599
599
 
600
- if (utils$9.isArray(val)) {
600
+ if (utils$a.isArray(val)) {
601
601
  key = key + '[]';
602
602
  } else {
603
603
  val = [val];
604
604
  }
605
605
 
606
- utils$9.forEach(val, function parseValue(v) {
607
- if (utils$9.isDate(v)) {
606
+ utils$a.forEach(val, function parseValue(v) {
607
+ if (utils$a.isDate(v)) {
608
608
  v = v.toISOString();
609
- } else if (utils$9.isObject(v)) {
609
+ } else if (utils$a.isObject(v)) {
610
610
  v = JSON.stringify(v);
611
611
  }
612
612
  parts.push(encode(key) + '=' + encode(v));
@@ -628,7 +628,7 @@ var buildURL$1 = function buildURL(url, params, paramsSerializer) {
628
628
  return url;
629
629
  };
630
630
 
631
- var utils$8 = utils$a;
631
+ var utils$9 = utils$b;
632
632
 
633
633
  function InterceptorManager$1() {
634
634
  this.handlers = [];
@@ -672,7 +672,7 @@ InterceptorManager$1.prototype.eject = function eject(id) {
672
672
  * @param {Function} fn The function to call for each interceptor
673
673
  */
674
674
  InterceptorManager$1.prototype.forEach = function forEach(fn) {
675
- utils$8.forEach(this.handlers, function forEachHandler(h) {
675
+ utils$9.forEach(this.handlers, function forEachHandler(h) {
676
676
  if (h !== null) {
677
677
  fn(h);
678
678
  }
@@ -681,10 +681,10 @@ InterceptorManager$1.prototype.forEach = function forEach(fn) {
681
681
 
682
682
  var InterceptorManager_1 = InterceptorManager$1;
683
683
 
684
- var utils$7 = utils$a;
684
+ var utils$8 = utils$b;
685
685
 
686
686
  var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
687
- utils$7.forEach(headers, function processHeader(value, name) {
687
+ utils$8.forEach(headers, function processHeader(value, name) {
688
688
  if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
689
689
  headers[normalizedName] = value;
690
690
  delete headers[name];
@@ -692,99 +692,90 @@ var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName
692
692
  });
693
693
  };
694
694
 
695
- var AxiosError_1;
696
- var hasRequiredAxiosError;
695
+ var utils$7 = utils$b;
697
696
 
698
- function requireAxiosError () {
699
- if (hasRequiredAxiosError) return AxiosError_1;
700
- hasRequiredAxiosError = 1;
701
-
702
- var utils = utils$a;
703
-
704
- /**
705
- * Create an Error with the specified message, config, error code, request and response.
706
- *
707
- * @param {string} message The error message.
708
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
709
- * @param {Object} [config] The config.
710
- * @param {Object} [request] The request.
711
- * @param {Object} [response] The response.
712
- * @returns {Error} The created error.
713
- */
714
- function AxiosError(message, code, config, request, response) {
715
- Error.call(this);
716
- this.message = message;
717
- this.name = 'AxiosError';
718
- code && (this.code = code);
719
- config && (this.config = config);
720
- request && (this.request = request);
721
- response && (this.response = response);
722
- }
723
-
724
- utils.inherits(AxiosError, Error, {
725
- toJSON: function toJSON() {
726
- return {
727
- // Standard
728
- message: this.message,
729
- name: this.name,
730
- // Microsoft
731
- description: this.description,
732
- number: this.number,
733
- // Mozilla
734
- fileName: this.fileName,
735
- lineNumber: this.lineNumber,
736
- columnNumber: this.columnNumber,
737
- stack: this.stack,
738
- // Axios
739
- config: this.config,
740
- code: this.code,
741
- status: this.response && this.response.status ? this.response.status : null
742
- };
743
- }
744
- });
697
+ /**
698
+ * Create an Error with the specified message, config, error code, request and response.
699
+ *
700
+ * @param {string} message The error message.
701
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
702
+ * @param {Object} [config] The config.
703
+ * @param {Object} [request] The request.
704
+ * @param {Object} [response] The response.
705
+ * @returns {Error} The created error.
706
+ */
707
+ function AxiosError$2(message, code, config, request, response) {
708
+ Error.call(this);
709
+ this.message = message;
710
+ this.name = 'AxiosError';
711
+ code && (this.code = code);
712
+ config && (this.config = config);
713
+ request && (this.request = request);
714
+ response && (this.response = response);
715
+ }
745
716
 
746
- var prototype = AxiosError.prototype;
747
- var descriptors = {};
717
+ utils$7.inherits(AxiosError$2, Error, {
718
+ toJSON: function toJSON() {
719
+ return {
720
+ // Standard
721
+ message: this.message,
722
+ name: this.name,
723
+ // Microsoft
724
+ description: this.description,
725
+ number: this.number,
726
+ // Mozilla
727
+ fileName: this.fileName,
728
+ lineNumber: this.lineNumber,
729
+ columnNumber: this.columnNumber,
730
+ stack: this.stack,
731
+ // Axios
732
+ config: this.config,
733
+ code: this.code,
734
+ status: this.response && this.response.status ? this.response.status : null
735
+ };
736
+ }
737
+ });
748
738
 
749
- [
750
- 'ERR_BAD_OPTION_VALUE',
751
- 'ERR_BAD_OPTION',
752
- 'ECONNABORTED',
753
- 'ETIMEDOUT',
754
- 'ERR_NETWORK',
755
- 'ERR_FR_TOO_MANY_REDIRECTS',
756
- 'ERR_DEPRECATED',
757
- 'ERR_BAD_RESPONSE',
758
- 'ERR_BAD_REQUEST',
759
- 'ERR_CANCELED'
760
- // eslint-disable-next-line func-names
761
- ].forEach(function(code) {
762
- descriptors[code] = {value: code};
763
- });
739
+ var prototype = AxiosError$2.prototype;
740
+ var descriptors = {};
741
+
742
+ [
743
+ 'ERR_BAD_OPTION_VALUE',
744
+ 'ERR_BAD_OPTION',
745
+ 'ECONNABORTED',
746
+ 'ETIMEDOUT',
747
+ 'ERR_NETWORK',
748
+ 'ERR_FR_TOO_MANY_REDIRECTS',
749
+ 'ERR_DEPRECATED',
750
+ 'ERR_BAD_RESPONSE',
751
+ 'ERR_BAD_REQUEST',
752
+ 'ERR_CANCELED'
753
+ // eslint-disable-next-line func-names
754
+ ].forEach(function(code) {
755
+ descriptors[code] = {value: code};
756
+ });
764
757
 
765
- Object.defineProperties(AxiosError, descriptors);
766
- Object.defineProperty(prototype, 'isAxiosError', {value: true});
758
+ Object.defineProperties(AxiosError$2, descriptors);
759
+ Object.defineProperty(prototype, 'isAxiosError', {value: true});
767
760
 
768
- // eslint-disable-next-line func-names
769
- AxiosError.from = function(error, code, config, request, response, customProps) {
770
- var axiosError = Object.create(prototype);
761
+ // eslint-disable-next-line func-names
762
+ AxiosError$2.from = function(error, code, config, request, response, customProps) {
763
+ var axiosError = Object.create(prototype);
771
764
 
772
- utils.toFlatObject(error, axiosError, function filter(obj) {
773
- return obj !== Error.prototype;
774
- });
765
+ utils$7.toFlatObject(error, axiosError, function filter(obj) {
766
+ return obj !== Error.prototype;
767
+ });
775
768
 
776
- AxiosError.call(axiosError, error.message, code, config, request, response);
769
+ AxiosError$2.call(axiosError, error.message, code, config, request, response);
777
770
 
778
- axiosError.name = error.name;
771
+ axiosError.name = error.name;
779
772
 
780
- customProps && Object.assign(axiosError, customProps);
773
+ customProps && Object.assign(axiosError, customProps);
781
774
 
782
- return axiosError;
783
- };
775
+ return axiosError;
776
+ };
784
777
 
785
- AxiosError_1 = AxiosError;
786
- return AxiosError_1;
787
- }
778
+ var AxiosError_1 = AxiosError$2;
788
779
 
789
780
  var transitional = {
790
781
  silentJSONParsing: true,
@@ -792,7 +783,7 @@ var transitional = {
792
783
  clarifyTimeoutError: false
793
784
  };
794
785
 
795
- var utils$6 = utils$a;
786
+ var utils$6 = utils$b;
796
787
 
797
788
  /**
798
789
  * Convert a data object to FormData
@@ -870,7 +861,7 @@ function requireSettle () {
870
861
  if (hasRequiredSettle) return settle;
871
862
  hasRequiredSettle = 1;
872
863
 
873
- var AxiosError = requireAxiosError();
864
+ var AxiosError = AxiosError_1;
874
865
 
875
866
  /**
876
867
  * Resolve or reject a Promise based on response status.
@@ -903,7 +894,7 @@ function requireCookies () {
903
894
  if (hasRequiredCookies) return cookies;
904
895
  hasRequiredCookies = 1;
905
896
 
906
- var utils = utils$a;
897
+ var utils = utils$b;
907
898
 
908
899
  cookies = (
909
900
  utils.isStandardBrowserEnv() ?
@@ -1009,7 +1000,7 @@ function requireParseHeaders () {
1009
1000
  if (hasRequiredParseHeaders) return parseHeaders;
1010
1001
  hasRequiredParseHeaders = 1;
1011
1002
 
1012
- var utils = utils$a;
1003
+ var utils = utils$b;
1013
1004
 
1014
1005
  // Headers whose duplicates are ignored by node
1015
1006
  // c.f. https://nodejs.org/api/http.html#http_message_headers
@@ -1070,7 +1061,7 @@ function requireIsURLSameOrigin () {
1070
1061
  if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
1071
1062
  hasRequiredIsURLSameOrigin = 1;
1072
1063
 
1073
- var utils = utils$a;
1064
+ var utils = utils$b;
1074
1065
 
1075
1066
  isURLSameOrigin = (
1076
1067
  utils.isStandardBrowserEnv() ?
@@ -1146,8 +1137,8 @@ function requireCanceledError () {
1146
1137
  if (hasRequiredCanceledError) return CanceledError_1;
1147
1138
  hasRequiredCanceledError = 1;
1148
1139
 
1149
- var AxiosError = requireAxiosError();
1150
- var utils = utils$a;
1140
+ var AxiosError = AxiosError_1;
1141
+ var utils = utils$b;
1151
1142
 
1152
1143
  /**
1153
1144
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -1190,7 +1181,7 @@ function requireXhr () {
1190
1181
  if (hasRequiredXhr) return xhr;
1191
1182
  hasRequiredXhr = 1;
1192
1183
 
1193
- var utils = utils$a;
1184
+ var utils = utils$b;
1194
1185
  var settle = requireSettle();
1195
1186
  var cookies = requireCookies();
1196
1187
  var buildURL = buildURL$1;
@@ -1198,7 +1189,7 @@ function requireXhr () {
1198
1189
  var parseHeaders = requireParseHeaders();
1199
1190
  var isURLSameOrigin = requireIsURLSameOrigin();
1200
1191
  var transitionalDefaults = transitional;
1201
- var AxiosError = requireAxiosError();
1192
+ var AxiosError = AxiosError_1;
1202
1193
  var CanceledError = requireCanceledError();
1203
1194
  var parseProtocol = requireParseProtocol();
1204
1195
 
@@ -2091,7 +2082,7 @@ function requireHttp () {
2091
2082
  if (hasRequiredHttp) return http_1;
2092
2083
  hasRequiredHttp = 1;
2093
2084
 
2094
- var utils = utils$a;
2085
+ var utils = utils$b;
2095
2086
  var settle = requireSettle();
2096
2087
  var buildFullPath = buildFullPath$1;
2097
2088
  var buildURL = buildURL$1;
@@ -2103,7 +2094,7 @@ function requireHttp () {
2103
2094
  var zlib = require$$8;
2104
2095
  var VERSION = requireData().version;
2105
2096
  var transitionalDefaults = transitional;
2106
- var AxiosError = requireAxiosError();
2097
+ var AxiosError = AxiosError_1;
2107
2098
  var CanceledError = requireCanceledError();
2108
2099
 
2109
2100
  var isHttps = /https:?/;
@@ -14790,9 +14781,9 @@ function requireFormData () {
14790
14781
  return FormDataExports;
14791
14782
  }
14792
14783
 
14793
- var utils$5 = utils$a;
14784
+ var utils$5 = utils$b;
14794
14785
  var normalizeHeaderName = normalizeHeaderName$1;
14795
- var AxiosError$1 = requireAxiosError();
14786
+ var AxiosError$1 = AxiosError_1;
14796
14787
  var transitionalDefaults = transitional;
14797
14788
  var toFormData = toFormData_1;
14798
14789
 
@@ -14935,7 +14926,7 @@ utils$5.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
14935
14926
 
14936
14927
  var defaults_1 = defaults$3;
14937
14928
 
14938
- var utils$4 = utils$a;
14929
+ var utils$4 = utils$b;
14939
14930
  var defaults$2 = defaults_1;
14940
14931
 
14941
14932
  /**
@@ -14969,7 +14960,7 @@ function requireIsCancel () {
14969
14960
  return isCancel$1;
14970
14961
  }
14971
14962
 
14972
- var utils$3 = utils$a;
14963
+ var utils$3 = utils$b;
14973
14964
  var transformData = transformData$1;
14974
14965
  var isCancel = requireIsCancel();
14975
14966
  var defaults$1 = defaults_1;
@@ -15055,7 +15046,7 @@ var dispatchRequest$1 = function dispatchRequest(config) {
15055
15046
  });
15056
15047
  };
15057
15048
 
15058
- var utils$2 = utils$a;
15049
+ var utils$2 = utils$b;
15059
15050
 
15060
15051
  /**
15061
15052
  * Config-specific merge-function which creates a new config-object
@@ -15155,7 +15146,7 @@ var mergeConfig$2 = function mergeConfig(config1, config2) {
15155
15146
  };
15156
15147
 
15157
15148
  var VERSION = requireData().version;
15158
- var AxiosError = requireAxiosError();
15149
+ var AxiosError = AxiosError_1;
15159
15150
 
15160
15151
  var validators$1 = {};
15161
15152
 
@@ -15239,7 +15230,7 @@ var validator$1 = {
15239
15230
  validators: validators$1
15240
15231
  };
15241
15232
 
15242
- var utils$1 = utils$a;
15233
+ var utils$1 = utils$b;
15243
15234
  var buildURL = buildURL$1;
15244
15235
  var InterceptorManager = InterceptorManager_1;
15245
15236
  var dispatchRequest = dispatchRequest$1;
@@ -15567,7 +15558,7 @@ function requireIsAxiosError () {
15567
15558
  if (hasRequiredIsAxiosError) return isAxiosError;
15568
15559
  hasRequiredIsAxiosError = 1;
15569
15560
 
15570
- var utils = utils$a;
15561
+ var utils = utils$b;
15571
15562
 
15572
15563
  /**
15573
15564
  * Determines whether the payload is an error thrown by Axios
@@ -15581,7 +15572,7 @@ function requireIsAxiosError () {
15581
15572
  return isAxiosError;
15582
15573
  }
15583
15574
 
15584
- var utils = utils$a;
15575
+ var utils = utils$b;
15585
15576
  var bind = bind$2;
15586
15577
  var Axios = Axios_1;
15587
15578
  var mergeConfig = mergeConfig$2;
@@ -15625,7 +15616,7 @@ axios$1.VERSION = requireData().version;
15625
15616
  axios$1.toFormData = toFormData_1;
15626
15617
 
15627
15618
  // Expose AxiosError class
15628
- axios$1.AxiosError = requireAxiosError();
15619
+ axios$1.AxiosError = AxiosError_1;
15629
15620
 
15630
15621
  // alias for CanceledError for backward compatibility
15631
15622
  axios$1.Cancel = axios$1.CanceledError;
@@ -16156,7 +16147,7 @@ var Auth = /** @class */ (function () {
16156
16147
  * @returns promise
16157
16148
  */
16158
16149
  Auth.resetPassword = function (data) {
16159
- return Requests.processRoute(AuthRoutes.routes.forgot_password, data);
16150
+ return Requests.processRoute(AuthRoutes.routes.reset_password, data);
16160
16151
  };
16161
16152
  return Auth;
16162
16153
  }());