axios-annotations 1.1.9 → 1.1.10
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=RequestMapping;var _config=_interopRequireDefault(require("../core/config")),_common=require("../core/common");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function RequestMapping(p){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return function(e,s,r){var h;r?(l=l||"GET",h=r.value,r.value=function(){for(var a=this,e=arguments.length,u=new Array(e),r=0;r<e;r++)u[r]=arguments[r];var t=h.apply(this,u)||{};if("function"!=typeof this.for)throw new Error('Make sure your service inherited "core/Service".');var o,i,n,f=this.for(s),c=f?_config.default.forName(f):null;return t&&
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=RequestMapping;var _config=_interopRequireDefault(require("../core/config")),_common=require("../core/common");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function RequestMapping(p){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return function(e,s,r){var h;r?(l=l||"GET",h=r.value,r.value=function(){for(var a=this,e=arguments.length,u=new Array(e),r=0;r<e;r++)u[r]=arguments[r];var t=h.apply(this,u)||{};if("function"!=typeof this.for)throw new Error('Make sure your service inherited "core/Service".');var o,i,n,f=this.for(s),c=f?_config.default.forName(f):null;return t&&t.then&&"function"==typeof t.then?new Promise(function(i,n){t.then(function(e){var e=a.createRequestConfig(s,a.pathVariable(p||"",e),e,u,u),r=e.path,t=e.body,o=e.config,e=e.query;(c?(0,_common.forward)(c.axios,c.origin,c.prefix,a.path,p,l,e,t,o):a.request(l,r,t,o)).then(i).catch(n)})}):(o=(f=this.createRequestConfig(s,this.pathVariable(p||"",t),t,u,u)).path,i=f.body,n=f.config,f=f.query,c?(0,_common.forward)(c.axios,c.origin,c.prefix,this.path,p,l,f,i,n):this.request(l,o,i,n))}):e.prototype._path=p}}
|