@feathersjs/client 4.5.18 → 4.5.19
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/CHANGELOG.md +11 -0
- package/dist/authentication.js +147 -96
- package/dist/authentication.js.map +1 -1
- package/dist/authentication.min.js +1 -1
- package/dist/core.js +292 -237
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/feathers.js +1828 -826
- package/dist/feathers.js.map +1 -1
- package/dist/feathers.min.js +1 -1
- package/dist/primus.js +120 -67
- package/dist/primus.js.map +1 -1
- package/dist/primus.min.js +1 -1
- package/dist/rest.js +1809 -804
- package/dist/rest.js.map +1 -1
- package/dist/rest.min.js +1 -1
- package/dist/socketio.js +120 -67
- package/dist/socketio.js.map +1 -1
- package/dist/socketio.min.js +1 -1
- package/package.json +23 -23
package/dist/socketio.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return e={898:function(e,t,n){var o;t.formatArgs=function(t){var n,o,r;t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors&&(n="color: "+this.color,t.splice(1,0,n,"color: inherit"),t[r=o=0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e)&&(r=o)})),t.splice(r,0,n))},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(o=!1,function(){o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(604)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},604:function(e,t,n){function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}e.exports=function(e){function t(e){var n,o,i,s=null;function a(){for(var e,o,r,i,s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];a.enabled&&(e=a,r=(o=Number(new Date))-(n||o),e.diff=r,e.prev=n,e.curr=o,n=o,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[i=0]=c[0].replace(/%([a-zA-Z%])/g,(function(n,o){return"%%"===n?"%":(i++,"function"==typeof(o=t.formatters[o])&&(r=c[i],n=o.call(e,r),c.splice(i,1),i--),n);var r})),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){return(n=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(o(t.names.map(i)),o(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n,o=("string"==typeof e?e:"").split(/[\s,]+/),r=o.length;for(n=0;n<r;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,o=0;o<e.length;o++)n=(n<<5)-n+e.charCodeAt(o),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},315:function(e,t,n){e.exports=n(105)},441:function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=n(898)("@feathersjs/errors");function i(e,t,n,s,a){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===o(e)?(u=e.message||"Error",a=e):u=e,a&&((l=JSON.parse(JSON.stringify(a))).errors?(c=l.errors,delete l.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=s,this.data=l,this.errors=c||{},r("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),r(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,i):this.stack=(new Error).stack}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){i.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){i.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){i.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){i.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){i.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function p(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function m(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function y(e,t){i(this,e,"Gone",410,"gone")}function C(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function v(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function F(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function S(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}s(i,Error),Object.defineProperty(i.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),s(a,i),s(c,i),s(u,i),s(l,i),s(f,i),s(d,i),s(h,i),s(p,i),s(m,i),s(y,i),s(C,i),s(g,i),s(v,i),s(b,i),s(F,i),s(w,i),s(S,i);var E={FeathersError:i,BadRequest:a,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:p,Conflict:m,Gone:y,LengthRequired:C,Unprocessable:g,TooManyRequests:v,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:S,400:a,401:c,402:u,403:l,404:f,405:d,406:h,408:p,409:m,410:y,411:C,422:g,429:v,500:b,501:F,502:w,503:S};e.exports=Object.assign({convert:function(e){var t;return e&&(t=(t=E[e.name])?new t(e.message,e.data):new Error(e.message||e),"object"===o(e)&&Object.assign(t,e),t)}},E)},105:function(e,t,n){var o=n(910);function r(e,t){if(!e)throw new Error("Socket.io connection needs to be provided");if(e&&e.io&&e.io.engine&&e.io.engine.transport&&e.io.engine.transport.query&&3<e.io.engine.transport.query.EIO)throw console.error("You are trying to use the Socket.io client version 3 or later with Feathers v4 which only supports Socket.io version 2. Please use socket.io-client version 2 instead."),new Error("socket.io-client must be version 2.x");function n(n){var r=this,i=Object.keys(this.eventMappings||{}).map((function(e){return r.eventMappings[e]}));return i=Object.assign({},t,{events:i,name:n,connection:e,method:"emit"}),new o(i)}function r(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.io=e,t.defaultService=n}return r.Service=o,r.service=n,r}e.exports=r,e.exports.default=r},910:function(e,t,n){e.exports=n(4).Service},4:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,r=r(n(898)),n(441)),s=(0,r.default)("@feathersjs/transport-commons/client"),a=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],c=["eventNames","getMaxListeners","setMaxListeners"];n=function(){function e(t){var n;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,c.forEach((function(e){n[e]=function(){var t;if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));return(t=this.connection)[e].apply(t,arguments)}})),a.forEach((function(e){n[e]=function(t){if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));t="".concat(this.path," ").concat(t),s("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(t,"'"));for(var n=arguments.length,o=new Array(1<n?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];var i=(i=this.connection)[e].apply(i,[t].concat(o));return i===this.connection?this:i}}))}var t,n;return t=e,(n=[{key:"send",value:function(e){for(var t=this,n=arguments.length,o=new Array(1<n?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return new Promise((function(n,r){var a,c=setTimeout((function(){return r(new i.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))}),t.timeout);o.unshift(e,t.path),o.push((function(e,t){return e=(0,i.convert)(e),clearTimeout(c),e?r(e):n(t)})),s("Sending socket.".concat(t.method),o),(a=t.connection)[t.method].apply(a,o)}))}},{key:"find",value:function(){return this.send("find",(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).query||{})}},{key:"get",value:function(e){return this.send("get",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"create",value:function(e){return this.send("create",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"update",value:function(e,t){return this.send("update",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"patch",value:function(e,t){return this.send("patch",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"remove",value:function(e){return this.send("remove",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"off",value:function(e){for(var t,n=arguments.length,o=new Array(1<n?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return"function"==typeof this.connection.off?(t=(t=this.connection).off.apply(t,["".concat(this.path," ").concat(e)].concat(o)))===this.connection?this:t:0===o.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(o))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return String(e);if("object"!==o(n=n.call(e,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===o(e)?e:String(e)}(r.key),r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),t.Service=n},378:function(e){var t=36e5,n=864e5;function o(e,t,n,o){return t=1.5*n<=t,Math.round(e/n)+" "+o+(t?"s":"")}e.exports=function(e,r){r=r||{};var i=typeof e;if(!("string"==i&&0<e.length)){if("number"==i&&isFinite(e))return(r.long?function(e){var r=Math.abs(e);return n<=r?o(e,r,n,"day"):t<=r?o(e,r,t,"hour"):6e4<=r?o(e,r,6e4,"minute"):1e3<=r?o(e,r,1e3,"second"):e+" ms"}:function(e){var o=Math.abs(e);return n<=o?Math.round(e/n)+"d":t<=o?Math.round(e/t)+"h":6e4<=o?Math.round(e/6e4)+"m":1e3<=o?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}if(i=e,!(100<(i=String(i)).length)&&(i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i))){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*s;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}},t={},function n(o){var r=t[o];return void 0===r&&(r=t[o]={exports:{}},e[o].call(r.exports,r,r.exports,n)),r.exports}(315);var e,t}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,function(){return e={500:function(e,t,n){var r;t.formatArgs=function(t){var n,r,o;t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors&&(n="color: "+this.color,t.splice(1,0,n,"color: inherit"),t[o=r=0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e)&&(o=r)}),t.splice(o,0,n))},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(e[1],10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));var e},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=n(451)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},451:function(e,t,n){function r(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n,r,o,s,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return o=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(a=i(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),s=0,{s:t=function(){},n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){var n;if(e)return"string"==typeof e?s(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){function t(e){var n,r,o,s=null;function a(){for(var e,r,o,i,s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];a.enabled&&(e=a,o=(r=Number(new Date))-(n||r),e.diff=o,e.prev=n,e.curr=r,n=r,c[0]=t.coerce(c[0]),"string"!=typeof c[0]&&c.unshift("%O"),c[i=0]=c[0].replace(/%([a-zA-Z%])/g,function(n,r){return"%%"===n?"%":(i++,"function"==typeof(r=t.formatters[r])&&(o=c[i],n=r.call(e,o),c.splice(i,1),i--),n);var o}),t.formatArgs.call(e,c),(e.log||t.log).apply(e,c))}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=i,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function i(e,n){return(n=t(this.namespace+(void 0===n?":":n)+e)).log=this.log,n}function s(e,t){for(var n=0,r=0,o=-1,i=0;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(o=r,i=n):n++,r++;else{if(-1===o)return;r=o+1,n=++i}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(r(t.names),r(t.skips.map(function(e){return"-"+e}))).join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n,r=o(("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean));try{for(r.s();!(n=r.n()).done;){var i=n.value;"-"===i[0]?t.skips.push(i.slice(1)):t.names.push(i)}}catch(e){r.e(e)}finally{r.f()}},t.enabled=function(e){var n,r=o(t.skips);try{for(r.s();!(n=r.n()).done;)if(s(e,n.value))return!1}catch(e){r.e(e)}finally{r.f()}var i,a=o(t.names);try{for(a.s();!(i=a.n()).done;)if(s(e,i.value))return!0}catch(e){a.e(e)}finally{a.f()}return!1},t.humanize=n(437),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(function(n){t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},293:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(500)("@feathersjs/errors");function i(e,t,n,s,a){var c,u,l;(e=e||"Error")instanceof Error?(u=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(u=e.message||"Error",a=e):u=e,a&&((l=JSON.parse(JSON.stringify(a))).errors?(c=l.errors,delete l.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=u,this.code=n,this.className=s,this.data=l,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,i):this.stack=(new Error).stack}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){i.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function u(e,t){i.call(this,e,"PaymentError",402,"payment-error",t)}function l(e,t){i.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){i.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){i.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function m(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function p(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function y(e,t){i(this,e,"Gone",410,"gone")}function C(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function v(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function g(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function F(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function S(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}s(i,Error),Object.defineProperty(i.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),s(a,i),s(c,i),s(u,i),s(l,i),s(f,i),s(d,i),s(h,i),s(m,i),s(p,i),s(y,i),s(C,i),s(v,i),s(g,i),s(b,i),s(F,i),s(w,i),s(S,i);var E={FeathersError:i,BadRequest:a,NotAuthenticated:c,PaymentError:u,Forbidden:l,NotFound:f,MethodNotAllowed:d,NotAcceptable:h,Timeout:m,Conflict:p,Gone:y,LengthRequired:C,Unprocessable:v,TooManyRequests:g,GeneralError:b,NotImplemented:F,BadGateway:w,Unavailable:S,400:a,401:c,402:u,403:l,404:f,405:d,406:h,408:m,409:p,410:y,411:C,422:v,429:g,500:b,501:F,502:w,503:S};e.exports=Object.assign({convert:function(e){var t;return e&&(t=(t=E[e.name])?new t(e.message,e.data):new Error(e.message||e),"object"===r(e)&&Object.assign(t,e),t)}},E)},769:function(e,t,n){var r=n(637);function o(e,t){if(!e)throw new Error("Socket.io connection needs to be provided");if(e&&e.io&&e.io.engine&&e.io.engine.transport&&e.io.engine.transport.query&&3<e.io.engine.transport.query.EIO)throw console.error("You are trying to use the Socket.io client version 3 or later with Feathers v4 which only supports Socket.io version 2. Please use socket.io-client version 2 instead."),new Error("socket.io-client must be version 2.x");function n(n){var o=this,i=Object.keys(this.eventMappings||{}).map(function(e){return o.eventMappings[e]});return i=Object.assign({},t,{events:i,name:n,connection:e,method:"emit"}),new r(i)}function o(t){if("function"==typeof t.defaultService)throw new Error("Only one default client provider can be configured");t.io=e,t.defaultService=n}return o.Service=r,o.service=n,o}e.exports=o,e.exports.default=o},637:function(e,t,n){e.exports=n(969).Service},969:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Service=void 0,o=o(n(500)),n(293)),s=(0,o.default)("@feathersjs/transport-commons/client"),a=["addListener","emit","listenerCount","listeners","on","once","prependListener","prependOnceListener","removeAllListeners","removeListener"],c=["eventNames","getMaxListeners","setMaxListeners"];n=function(){return e=function e(t){var n;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.events=t.events,this.path=t.name,this.connection=t.connection,this.method=t.method,this.timeout=t.timeout||5e3,n=this,c.forEach(function(e){n[e]=function(){var t;if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));return(t=this.connection)[e].apply(t,arguments)}}),a.forEach(function(e){n[e]=function(t){if("function"!=typeof this.connection[e])throw new Error("Can not call '".concat(e,"' on the client service connection"));t="".concat(this.path," ").concat(t),s("Calling emitter method ".concat(e," with ")+"namespaced event '".concat(t,"'"));for(var n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(i=this.connection)[e].apply(i,[t].concat(r));return i===this.connection?this:i}})},(t=[{key:"send",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new Promise(function(n,o){var a,c=setTimeout(function(){return o(new i.Timeout("Timeout of ".concat(t.timeout,"ms exceeded calling ").concat(e," on ").concat(t.path),{timeout:t.timeout,method:e,path:t.path}))},t.timeout);r.unshift(e,t.path),r.push(function(e,t){return e=(0,i.convert)(e),clearTimeout(c),e?o(e):n(t)}),s("Sending socket.".concat(t.method),r),(a=t.connection)[t.method].apply(a,r)})}},{key:"find",value:function(){return this.send("find",(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).query||{})}},{key:"get",value:function(e){return this.send("get",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"create",value:function(e){return this.send("create",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"update",value:function(e,t){return this.send("update",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"patch",value:function(e,t){return this.send("patch",e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).query||{})}},{key:"remove",value:function(e){return this.send("remove",e,(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).query||{})}},{key:"off",value:function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return"function"==typeof this.connection.off?(t=(t=this.connection).off.apply(t,["".concat(this.path," ").concat(e)].concat(r)))===this.connection?this:t:0===r.length?this.removeAllListeners(e):this.removeListener.apply(this,[e].concat(r))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){return e=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=r(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"==r(e)?e:e+""}(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),t.Service=n},323:function(e,t,n){e.exports=n(769)},437:function(e){var t=36e5,n=864e5;function r(e,t,n,r){return t=1.5*n<=t,Math.round(e/n)+" "+r+(t?"s":"")}e.exports=function(e,o){o=o||{};var i=typeof e;if(!("string"==i&&0<e.length)){if("number"==i&&isFinite(e))return(o.long?function(e){var o=Math.abs(e);return n<=o?r(e,o,n,"day"):t<=o?r(e,o,t,"hour"):6e4<=o?r(e,o,6e4,"minute"):1e3<=o?r(e,o,1e3,"second"):e+" ms"}:function(e){var r=Math.abs(e);return n<=r?Math.round(e/n)+"d":t<=r?Math.round(e/t)+"h":6e4<=r?Math.round(e/6e4)+"m":1e3<=r?Math.round(e/1e3)+"s":e+"ms"})(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}if(i=e,!(100<(i=String(i)).length)&&(i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i))){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*s;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}},t={},function n(r){var o=t[r];return void 0===o&&(o=t[r]={exports:{}},e[r].call(o.exports,o,o.exports,n)),o.exports}(323);var e,t});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/client",
|
|
3
3
|
"description": "A module that consolidates Feathers client modules for REST (jQuery, Request, Superagent) and Websocket (Socket.io, Primus) connections",
|
|
4
|
-
"version": "4.5.
|
|
4
|
+
"version": "4.5.19",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/feathersjs/feathers.git"
|
|
@@ -49,35 +49,35 @@
|
|
|
49
49
|
"IE 10"
|
|
50
50
|
],
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@babel/core": "^7.
|
|
53
|
-
"@babel/preset-env": "^7.
|
|
54
|
-
"@feathersjs/authentication-client": "^4.5.
|
|
55
|
-
"@feathersjs/errors": "^4.5.
|
|
56
|
-
"@feathersjs/express": "^4.5.
|
|
57
|
-
"@feathersjs/feathers": "^4.5.
|
|
58
|
-
"@feathersjs/primus": "^4.5.
|
|
59
|
-
"@feathersjs/primus-client": "^4.5.
|
|
60
|
-
"@feathersjs/rest-client": "^4.5.
|
|
61
|
-
"@feathersjs/socketio": "^4.5.
|
|
62
|
-
"@feathersjs/socketio-client": "^4.5.
|
|
63
|
-
"@feathersjs/tests": "^4.5.
|
|
64
|
-
"babel-loader": "^8.
|
|
65
|
-
"body-parser": "^1.
|
|
52
|
+
"@babel/core": "^7.29.0",
|
|
53
|
+
"@babel/preset-env": "^7.29.0",
|
|
54
|
+
"@feathersjs/authentication-client": "^4.5.19",
|
|
55
|
+
"@feathersjs/errors": "^4.5.19",
|
|
56
|
+
"@feathersjs/express": "^4.5.19",
|
|
57
|
+
"@feathersjs/feathers": "^4.5.19",
|
|
58
|
+
"@feathersjs/primus": "^4.5.19",
|
|
59
|
+
"@feathersjs/primus-client": "^4.5.19",
|
|
60
|
+
"@feathersjs/rest-client": "^4.5.19",
|
|
61
|
+
"@feathersjs/socketio": "^4.5.19",
|
|
62
|
+
"@feathersjs/socketio-client": "^4.5.19",
|
|
63
|
+
"@feathersjs/tests": "^4.5.19",
|
|
64
|
+
"babel-loader": "^8.4.1",
|
|
65
|
+
"body-parser": "^1.20.4",
|
|
66
66
|
"feathers-memory": "^4.1.0",
|
|
67
|
-
"jquery": "^3.
|
|
68
|
-
"jsdom": "^16.
|
|
69
|
-
"mocha": "^9.
|
|
67
|
+
"jquery": "^3.7.1",
|
|
68
|
+
"jsdom": "^16.7.0",
|
|
69
|
+
"mocha": "^9.2.2",
|
|
70
70
|
"mocha-puppeteer": "^0.14.0",
|
|
71
|
-
"node-fetch": "^2.
|
|
71
|
+
"node-fetch": "^2.7.0",
|
|
72
72
|
"parallel-webpack": "^2.6.0",
|
|
73
73
|
"request": "^2.88.2",
|
|
74
74
|
"socket.io-client": "^2.3.1",
|
|
75
75
|
"superagent": "^6.1.0",
|
|
76
76
|
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
77
|
-
"webpack": "^5.
|
|
78
|
-
"webpack-merge": "^5.
|
|
79
|
-
"ws": "^7.
|
|
77
|
+
"webpack": "^5.105.0",
|
|
78
|
+
"webpack-merge": "^5.10.0",
|
|
79
|
+
"ws": "^7.5.10",
|
|
80
80
|
"xhr2": "^0.2.1"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "f3bf30f6c7f7da6b71dc805525db4e425a7f479b"
|
|
83
83
|
}
|