@@ -28,14 +28,14 @@ Object.defineProperty(exports, "__esModule", {
28
28
exports . default = void 0 ;
29
29
var _utils = require ( "./utils.js" ) ;
30
30
var _request = _interopRequireDefault ( require ( "./request.js" ) ) ;
31
- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
31
+ function _interopRequireDefault ( e ) { return e && e . __esModule ? e : { default : e } ; }
32
32
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
33
33
function ownKeys ( e , r ) { var t = Object . keys ( e ) ; if ( Object . getOwnPropertySymbols ) { var o = Object . getOwnPropertySymbols ( e ) ; r && ( o = o . filter ( function ( r ) { return Object . getOwnPropertyDescriptor ( e , r ) . enumerable ; } ) ) , t . push . apply ( t , o ) ; } return t ; }
34
34
function _objectSpread ( e ) { for ( var r = 1 ; r < arguments . length ; r ++ ) { var t = null != arguments [ r ] ? arguments [ r ] : { } ; r % 2 ? ownKeys ( Object ( t ) , ! 0 ) . forEach ( function ( r ) { _defineProperty ( e , r , t [ r ] ) ; } ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( e , Object . getOwnPropertyDescriptors ( t ) ) : ownKeys ( Object ( t ) ) . forEach ( function ( r ) { Object . defineProperty ( e , r , Object . getOwnPropertyDescriptor ( t , r ) ) ; } ) ; } return e ; }
35
- function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
36
- function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , _toPropertyKey ( descriptor . key ) , descriptor ) ; } }
37
- function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; Object . defineProperty ( Constructor , "prototype" , { writable : false } ) ; return Constructor ; }
38
- function _defineProperty ( obj , key , value ) { key = _toPropertyKey ( key ) ; if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
35
+ function _classCallCheck ( a , n ) { if ( ! ( a instanceof n ) ) throw new TypeError ( "Cannot call a class as a function" ) ; }
36
+ function _defineProperties ( e , r ) { for ( var t = 0 ; t < r . length ; t ++ ) { var o = r [ t ] ; o . enumerable = o . enumerable || ! 1 , o . configurable = ! 0 , "value" in o && ( o . writable = ! 0 ) , Object . defineProperty ( e , _toPropertyKey ( o . key ) , o ) ; } }
37
+ function _createClass ( e , r , t ) { return r && _defineProperties ( e . prototype , r ) , t && _defineProperties ( e , t ) , Object . defineProperty ( e , "prototype" , { writable : ! 1 } ) , e ; }
38
+ function _defineProperty ( e , r , t ) { return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ r ] = t , e ; }
39
39
function _toPropertyKey ( t ) { var i = _toPrimitive ( t , "string" ) ; return "symbol" == _typeof ( i ) ? i : i + "" ; }
40
40
function _toPrimitive ( t , r ) { if ( "object" != _typeof ( t ) || ! t ) return t ; var e = t [ Symbol . toPrimitive ] ; if ( void 0 !== e ) { var i = e . call ( t , r || "default" ) ; if ( "object" != _typeof ( i ) ) return i ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( "string" === r ? String : Number ) ( t ) ; }
41
41
var getDefaults = function getDefaults ( ) {
@@ -131,7 +131,7 @@ var Backend = function () {
131
131
this . options . request ( this . options , url , payload , function ( err , res ) {
132
132
if ( res && ( res . status >= 500 && res . status < 600 || ! res . status ) ) return callback ( 'failed loading ' + url + '; status code: ' + res . status , true ) ;
133
133
if ( res && res . status >= 400 && res . status < 500 ) return callback ( 'failed loading ' + url + '; status code: ' + res . status , false ) ;
134
- if ( ! res && err && err . message && err . message . indexOf ( 'Failed to fetch' ) > - 1 ) return callback ( 'failed loading ' + url + ': ' + err . message , true ) ;
134
+ if ( ! res && err && err . message && ( err . message . indexOf ( 'Failed to fetch' ) > - 1 || err . message . indexOf ( 'failed' ) > - 1 && err . message . indexOf ( 'fetch' ) > - 1 ) ) return callback ( 'failed loading ' + url + ': ' + err . message , true ) ;
135
135
if ( err ) return callback ( err , false ) ;
136
136
var ret , parseErr ;
137
137
try {
@@ -226,7 +226,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
226
226
function _interopRequireWildcard ( e , r ) { if ( ! r && e && e . __esModule ) return e ; if ( null === e || "object" != _typeof ( e ) && "function" != typeof e ) return { default : e } ; var t = _getRequireWildcardCache ( r ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var n = { __proto__ : null } , a = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var u in e ) if ( "default" !== u && { } . hasOwnProperty . call ( e , u ) ) { var i = a ? Object . getOwnPropertyDescriptor ( e , u ) : null ; i && ( i . get || i . set ) ? Object . defineProperty ( n , u , i ) : n [ u ] = e [ u ] ; } return n . default = e , t && t . set ( e , n ) , n ; }
227
227
function ownKeys ( e , r ) { var t = Object . keys ( e ) ; if ( Object . getOwnPropertySymbols ) { var o = Object . getOwnPropertySymbols ( e ) ; r && ( o = o . filter ( function ( r ) { return Object . getOwnPropertyDescriptor ( e , r ) . enumerable ; } ) ) , t . push . apply ( t , o ) ; } return t ; }
228
228
function _objectSpread ( e ) { for ( var r = 1 ; r < arguments . length ; r ++ ) { var t = null != arguments [ r ] ? arguments [ r ] : { } ; r % 2 ? ownKeys ( Object ( t ) , ! 0 ) . forEach ( function ( r ) { _defineProperty ( e , r , t [ r ] ) ; } ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( e , Object . getOwnPropertyDescriptors ( t ) ) : ownKeys ( Object ( t ) ) . forEach ( function ( r ) { Object . defineProperty ( e , r , Object . getOwnPropertyDescriptor ( t , r ) ) ; } ) ; } return e ; }
229
- function _defineProperty ( obj , key , value ) { key = _toPropertyKey ( key ) ; if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
229
+ function _defineProperty ( e , r , t ) { return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ r ] = t , e ; }
230
230
function _toPropertyKey ( t ) { var i = _toPrimitive ( t , "string" ) ; return "symbol" == _typeof ( i ) ? i : i + "" ; }
231
231
function _toPrimitive ( t , r ) { if ( "object" != _typeof ( t ) || ! t ) return t ; var e = t [ Symbol . toPrimitive ] ; if ( void 0 !== e ) { var i = e . call ( t , r || "default" ) ; if ( "object" != _typeof ( i ) ) return i ; throw new TypeError ( "@@toPrimitive must return a primitive value." ) ; } return ( "string" === r ? String : Number ) ( t ) ; }
232
232
function _typeof ( o ) { "@babel/helpers - typeof" ; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o ) { return typeof o ; } : function ( o ) { return o && "function" == typeof Symbol && o . constructor === Symbol && o !== Symbol . prototype ? "symbol" : typeof o ; } , _typeof ( o ) ; }
0 commit comments