From 69e09ad16eeef427faa83f7572c0a0ca04d7a05e Mon Sep 17 00:00:00 2001 From: Steffan Date: Thu, 8 Jun 2017 10:18:43 +0200 Subject: [PATCH] v1.3.4 --- README.md | 4 ++-- bower.json | 2 +- dist/vue-resource.common.js | 8 ++++---- dist/vue-resource.es2015.js | 8 ++++---- dist/vue-resource.js | 8 ++++---- dist/vue-resource.min.js | 4 ++-- package.json | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ff993e85..5b063c46 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ $ npm install vue-resource ``` ### CDN -Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.3.3), [unpkg](https://unpkg.com/vue-resource@1.3.3) or [cdnjs](https://cdnjs.com/libraries/vue-resource). +Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.3.4), [unpkg](https://unpkg.com/vue-resource@1.3.4) or [cdnjs](https://cdnjs.com/libraries/vue-resource). ```html - + ``` ## Example diff --git a/bower.json b/bower.json index 306992f9..1fe6ddeb 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "vue-resource", "main": "dist/vue-resource.js", - "version": "1.3.3", + "version": "1.3.4", "description": "The HTTP client for Vue.js", "homepage": "https://github.com/pagekit/vue-resource", "license": "MIT", diff --git a/dist/vue-resource.common.js b/dist/vue-resource.common.js index 8ebfee84..4ef216cd 100644 --- a/dist/vue-resource.common.js +++ b/dist/vue-resource.common.js @@ -1,5 +1,5 @@ /*! - * vue-resource v1.3.3 + * vue-resource v1.3.4 * https://github.com/pagekit/vue-resource * Released under the MIT License. */ @@ -1138,7 +1138,7 @@ var Client = function (context) { } function Client(request) { - return new PromiseObj(function (resolve) { + return new PromiseObj(function (resolve, reject) { function exec() { @@ -1163,10 +1163,10 @@ var Client = function (context) { resHandlers.forEach(function (handler) { response = when(response, function (response) { return handler.call(context, response) || response; - }); + }, reject); }); - when(response, resolve); + when(response, resolve, reject); return; } diff --git a/dist/vue-resource.es2015.js b/dist/vue-resource.es2015.js index 705139cf..963ad5e9 100644 --- a/dist/vue-resource.es2015.js +++ b/dist/vue-resource.es2015.js @@ -1,5 +1,5 @@ /*! - * vue-resource v1.3.3 + * vue-resource v1.3.4 * https://github.com/pagekit/vue-resource * Released under the MIT License. */ @@ -1136,7 +1136,7 @@ var Client = function (context) { } function Client(request) { - return new PromiseObj(function (resolve) { + return new PromiseObj(function (resolve, reject) { function exec() { @@ -1161,10 +1161,10 @@ var Client = function (context) { resHandlers.forEach(function (handler) { response = when(response, function (response) { return handler.call(context, response) || response; - }); + }, reject); }); - when(response, resolve); + when(response, resolve, reject); return; } diff --git a/dist/vue-resource.js b/dist/vue-resource.js index 7fcc67ce..c3ebb9ac 100644 --- a/dist/vue-resource.js +++ b/dist/vue-resource.js @@ -1,5 +1,5 @@ /*! - * vue-resource v1.3.3 + * vue-resource v1.3.4 * https://github.com/pagekit/vue-resource * Released under the MIT License. */ @@ -1142,7 +1142,7 @@ var Client = function (context) { } function Client(request) { - return new PromiseObj(function (resolve) { + return new PromiseObj(function (resolve, reject) { function exec() { @@ -1167,10 +1167,10 @@ var Client = function (context) { resHandlers.forEach(function (handler) { response = when(response, function (response) { return handler.call(context, response) || response; - }); + }, reject); }); - when(response, resolve); + when(response, resolve, reject); return; } diff --git a/dist/vue-resource.min.js b/dist/vue-resource.min.js index 01ccddd1..5d2e09bb 100644 --- a/dist/vue-resource.min.js +++ b/dist/vue-resource.min.js @@ -1,7 +1,7 @@ /*! - * vue-resource v1.3.3 + * vue-resource v1.3.4 * https://github.com/pagekit/vue-resource * Released under the MIT License. */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueResource=e()}(this,function(){"use strict";function t(t){this.state=J,this.value=void 0,this.deferred=[];var e=this;try{t(function(t){e.resolve(t)},function(t){e.reject(t)})}catch(t){e.reject(t)}}function e(t,e){t instanceof Promise?this.promise=t:this.promise=new Promise(t.bind(e)),this.context=e}function n(t){"undefined"!=typeof console&&K&&console.warn("[VueResource warn]: "+t)}function o(t){"undefined"!=typeof console&&console.error(t)}function r(t,e){return F(t,e)}function i(t){return t?t.replace(/^\s*|\s*$/g,""):""}function u(t,e){return t&&void 0===e?t.replace(/\s+$/,""):t&&e?t.replace(new RegExp("["+e+"]+$"),""):t}function s(t){return t?t.toLowerCase():""}function a(t){return t?t.toUpperCase():""}function c(t){return"string"==typeof t}function f(t){return"function"==typeof t}function p(t){return null!==t&&"object"==typeof t}function h(t){return p(t)&&Object.getPrototypeOf(t)==Object.prototype}function d(t){return"undefined"!=typeof Blob&&t instanceof Blob}function l(t){return"undefined"!=typeof FormData&&t instanceof FormData}function m(t,n,o){var r=e.resolve(t);return arguments.length<2?r:r.then(n,o)}function y(t,e,n){return n=n||{},f(n)&&(n=n.call(e)),b(t.bind({$vm:e,$options:n}),t,{$options:n})}function v(t,e){var n,o;if(Z(t))for(n=0;n=200&&r<300,this.status=r||0,this.statusText=i||"",this.headers=new vt(o),this.body=t,c(t)?this.bodyText=t:d(t)&&(this.bodyBlob=t,L(t)&&(this.bodyText=H(t)))};bt.prototype.blob=function(){return m(this.bodyBlob)},bt.prototype.text=function(){return m(this.bodyText)},bt.prototype.json=function(){return m(this.text(),function(t){return JSON.parse(t)})},Object.defineProperty(bt.prototype,"data",{get:function(){return this.body},set:function(t){this.body=t}});var gt=function(t){this.body=null,this.params={},tt(this,t,{method:a(t.method||"GET")}),this.headers instanceof vt||(this.headers=new vt(this.headers))};gt.prototype.getUrl=function(){return U(this)},gt.prototype.getBody=function(){return this.body},gt.prototype.respondWith=function(t,e){return new bt(t,tt(e||{},{url:this.getUrl()}))};var wt={Accept:"application/json, text/plain, */*"},Tt={"Content-Type":"application/json;charset=utf-8"};return B.options={},B.headers={put:Tt,post:Tt,patch:Tt,delete:Tt,common:wt,custom:{}},B.interceptor={before:pt,method:ht,jsonp:ft,json:at,form:st,header:dt,cors:ut},B.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach(function(t){B[t]=function(e,n){return this(tt(n||{},{url:e,method:t}))}}),["post","put","patch"].forEach(function(t){B[t]=function(e,n,o){return this(tt(o||{},{url:e,method:t,body:n}))}}),M.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&window.Vue.use(D),D}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueResource=e()}(this,function(){"use strict";function t(t){this.state=J,this.value=void 0,this.deferred=[];var e=this;try{t(function(t){e.resolve(t)},function(t){e.reject(t)})}catch(t){e.reject(t)}}function e(t,e){t instanceof Promise?this.promise=t:this.promise=new Promise(t.bind(e)),this.context=e}function n(t){"undefined"!=typeof console&&_&&console.warn("[VueResource warn]: "+t)}function o(t){"undefined"!=typeof console&&console.error(t)}function r(t,e){return F(t,e)}function i(t){return t?t.replace(/^\s*|\s*$/g,""):""}function u(t,e){return t&&void 0===e?t.replace(/\s+$/,""):t&&e?t.replace(new RegExp("["+e+"]+$"),""):t}function s(t){return t?t.toLowerCase():""}function a(t){return t?t.toUpperCase():""}function c(t){return"string"==typeof t}function f(t){return"function"==typeof t}function p(t){return null!==t&&"object"==typeof t}function h(t){return p(t)&&Object.getPrototypeOf(t)==Object.prototype}function d(t){return"undefined"!=typeof Blob&&t instanceof Blob}function l(t){return"undefined"!=typeof FormData&&t instanceof FormData}function m(t,n,o){var r=e.resolve(t);return arguments.length<2?r:r.then(n,o)}function y(t,e,n){return n=n||{},f(n)&&(n=n.call(e)),b(t.bind({$vm:e,$options:n}),t,{$options:n})}function v(t,e){var n,o;if(Q(t))for(n=0;n=200&&r<300,this.status=r||0,this.statusText=i||"",this.headers=new mt(o),this.body=t,c(t)?this.bodyText=t:d(t)&&(this.bodyBlob=t,L(t)&&(this.bodyText=H(t)))};yt.prototype.blob=function(){return m(this.bodyBlob)},yt.prototype.text=function(){return m(this.bodyText)},yt.prototype.json=function(){return m(this.text(),function(t){return JSON.parse(t)})},Object.defineProperty(yt.prototype,"data",{get:function(){return this.body},set:function(t){this.body=t}});var vt=function(t){this.body=null,this.params={},Y(this,t,{method:a(t.method||"GET")}),this.headers instanceof mt||(this.headers=new mt(this.headers))};vt.prototype.getUrl=function(){return U(this)},vt.prototype.getBody=function(){return this.body},vt.prototype.respondWith=function(t,e){return new yt(t,Y(e||{},{url:this.getUrl()}))};var bt={Accept:"application/json, text/plain, */*"},gt={"Content-Type":"application/json;charset=utf-8"};return B.options={},B.headers={put:gt,post:gt,patch:gt,delete:gt,common:bt,custom:{}},B.interceptor={before:ct,method:ft,jsonp:at,json:ut,form:it,header:pt,cors:rt},B.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach(function(t){B[t]=function(e,n){return this(Y(n||{},{url:e,method:t}))}}),["post","put","patch"].forEach(function(t){B[t]=function(e,n,o){return this(Y(o||{},{url:e,method:t,body:n}))}}),M.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&window.Vue.use(D),D}); \ No newline at end of file diff --git a/package.json b/package.json index 516b7cfb..98ab15c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-resource", - "version": "1.3.3", + "version": "1.3.4", "main": "dist/vue-resource.common.js", "module": "dist/vue-resource.es2015.js", "unpkg": "dist/vue-resource.min.js",