Skip to content

Commit

Permalink
chore(all): prepare release 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 3, 2015
1 parent 43f3cf4 commit fefeab9
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 183 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-http-client",
"version": "0.4.3",
"version": "0.4.4",
"description": "A simple, restful, message-based wrapper around XMLHttpRequest.",
"keywords": [
"aurelia",
Expand Down
14 changes: 3 additions & 11 deletions dist/amd/headers.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
define(["exports"], function (exports) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var Headers = (function () {
var Headers = exports.Headers = (function () {
function Headers() {
var headers = arguments[0] === undefined ? {} : arguments[0];
this.headers = headers;
Expand All @@ -18,23 +15,20 @@ define(["exports"], function (exports) {
this.headers[key] = value;
},
writable: true,
enumerable: true,
configurable: true
},
get: {
value: function get(key) {
return this.headers[key];
},
writable: true,
enumerable: true,
configurable: true
},
clear: {
value: function clear() {
this.headers = {};
},
writable: true,
enumerable: true,
configurable: true
},
configureXHR: {
Expand All @@ -47,13 +41,11 @@ define(["exports"], function (exports) {
}
},
writable: true,
enumerable: true,
configurable: true
}
});

return Headers;
})();

exports.Headers = Headers;
exports.__esModule = true;
});
24 changes: 5 additions & 19 deletions dist/amd/http-client.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
define(["exports", "aurelia-path", "./http-request-message", "./http-response-message", "./jsonp-request-message", "./headers"], function (exports, _aureliaPath, _httpRequestMessage, _httpResponseMessage, _jsonpRequestMessage, _headers) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var join = _aureliaPath.join;
var HttpRequestMessage = _httpRequestMessage.HttpRequestMessage;
var HttpResponseMessage = _httpResponseMessage.HttpResponseMessage;
var JSONPRequestMessage = _jsonpRequestMessage.JSONPRequestMessage;
var Headers = _headers.Headers;
var HttpClient = (function () {
var HttpClient = exports.HttpClient = (function () {
function HttpClient() {
var _this = this;
var baseUrl = arguments[0] === undefined ? null : arguments[0];
var defaultRequestHeaders = arguments[1] === undefined ? new Headers() : arguments[1];
return (function () {
_this.baseUrl = baseUrl;
_this.defaultRequestHeaders = defaultRequestHeaders;
})();
this.baseUrl = baseUrl;
this.defaultRequestHeaders = defaultRequestHeaders;
}

_prototypeProperties(HttpClient, null, {
Expand All @@ -28,47 +22,41 @@ define(["exports", "aurelia-path", "./http-request-message", "./http-response-me
return requestMessage.send(this, progressCallback);
},
writable: true,
enumerable: true,
configurable: true
},
get: {
value: function get(uri) {
return this.send(new HttpRequestMessage("GET", join(this.baseUrl, uri)).withHeaders(this.defaultRequestHeaders));
},
writable: true,
enumerable: true,
configurable: true
},
put: {
value: function put(uri, content, replacer) {
return this.send(new HttpRequestMessage("PUT", join(this.baseUrl, uri), content, replacer || this.replacer).withHeaders(this.defaultRequestHeaders));
},
writable: true,
enumerable: true,
configurable: true
},
patch: {
value: function patch(uri, content, replacer) {
return this.send(new HttpRequestMessage("PATCH", join(this.baseUrl, uri), content, replacer || this.replacer).withHeaders(this.defaultRequestHeaders));
},
writable: true,
enumerable: true,
configurable: true
},
post: {
value: function post(uri, content, replacer) {
return this.send(new HttpRequestMessage("POST", join(this.baseUrl, uri), content, replacer || this.replacer).withHeaders(this.defaultRequestHeaders));
},
writable: true,
enumerable: true,
configurable: true
},
"delete": {
value: function _delete(uri) {
return this.send(new HttpRequestMessage("DELETE", join(this.baseUrl, uri)).withHeaders(this.defaultRequestHeaders));
},
writable: true,
enumerable: true,
configurable: true
},
jsonp: {
Expand All @@ -77,13 +65,11 @@ define(["exports", "aurelia-path", "./http-request-message", "./http-response-me
return this.send(new JSONPRequestMessage(join(this.baseUrl, uri), callbackParameterName));
},
writable: true,
enumerable: true,
configurable: true
}
});

return HttpClient;
})();

exports.HttpClient = HttpClient;
exports.__esModule = true;
});
26 changes: 13 additions & 13 deletions dist/amd/http-request-message.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
define(["exports", "./headers", "./http-response-message"], function (exports, _headers, _httpResponseMessage) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var Headers = _headers.Headers;
var HttpResponseMessage = _httpResponseMessage.HttpResponseMessage;
var HttpRequestMessage = (function () {
var HttpRequestMessage = exports.HttpRequestMessage = (function () {
function HttpRequestMessage(method, uri, content, replacer) {
this.method = method;
this.uri = uri;
Expand All @@ -25,7 +22,6 @@ define(["exports", "./headers", "./http-response-message"], function (exports, _
return this;
},
writable: true,
enumerable: true,
configurable: true
},
configureXHR: {
Expand All @@ -35,7 +31,6 @@ define(["exports", "./headers", "./http-response-message"], function (exports, _
this.headers.configureXHR(xhr);
},
writable: true,
enumerable: true,
configurable: true
},
formatContent: {
Expand Down Expand Up @@ -65,7 +60,6 @@ define(["exports", "./headers", "./http-response-message"], function (exports, _
return JSON.stringify(content, this.replacer);
},
writable: true,
enumerable: true,
configurable: true
},
send: {
Expand All @@ -90,11 +84,19 @@ define(["exports", "./headers", "./http-response-message"], function (exports, _
};

xhr.ontimeout = function (e) {
reject(new Error(e));
reject(new HttpResponseMessage(_this, {
response: e,
status: xhr.status,
statusText: xhr.statusText
}, "timeout"));
};

xhr.onerror = function (e) {
reject(new Error(e));
reject(new HttpResponseMessage(_this, {
response: e,
status: xhr.status,
statusText: xhr.statusText
}, "error"));
};

if (progressCallback) {
Expand All @@ -105,13 +107,11 @@ define(["exports", "./headers", "./http-response-message"], function (exports, _
});
},
writable: true,
enumerable: true,
configurable: true
}
});

return HttpRequestMessage;
})();

exports.HttpRequestMessage = HttpRequestMessage;
exports.__esModule = true;
});
11 changes: 3 additions & 8 deletions dist/amd/http-response-message.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
define(["exports", "./headers"], function (exports, _headers) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var Headers = _headers.Headers;
function parseResponseHeaders(headerStr) {
Expand All @@ -27,7 +24,7 @@ define(["exports", "./headers"], function (exports, _headers) {
return headers;
}

var HttpResponseMessage = (function () {
var HttpResponseMessage = exports.HttpResponseMessage = (function () {
function HttpResponseMessage(requestMessage, xhr, responseType, reviver) {
this.requestMessage = requestMessage;
this.statusCode = xhr.status;
Expand Down Expand Up @@ -61,13 +58,11 @@ define(["exports", "./headers"], function (exports, _headers) {

return this._content = this.response;
},
enumerable: true,
configurable: true
}
});

return HttpResponseMessage;
})();

exports.HttpResponseMessage = HttpResponseMessage;
exports.__esModule = true;
});
1 change: 1 addition & 0 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ define(["exports", "./http-client", "./http-request-message", "./http-response-m
exports.HttpResponseMessage = _httpResponseMessage.HttpResponseMessage;
exports.JSONPRequestMessage = _jsonpRequestMessage.JSONPRequestMessage;
exports.Headers = _headers.Headers;
exports.__esModule = true;
});
11 changes: 3 additions & 8 deletions dist/amd/jsonp-request-message.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
define(["exports", "./http-response-message"], function (exports, _httpResponseMessage) {
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var HttpResponseMessage = _httpResponseMessage.HttpResponseMessage;
var JSONPRequestMessage = (function () {
var JSONPRequestMessage = exports.JSONPRequestMessage = (function () {
function JSONPRequestMessage(uri, callbackParameterName) {
this.uri = uri;
this.callbackParameterName = callbackParameterName;
Expand Down Expand Up @@ -37,13 +34,11 @@ define(["exports", "./http-response-message"], function (exports, _httpResponseM
});
},
writable: true,
enumerable: true,
configurable: true
}
});

return JSONPRequestMessage;
})();

exports.JSONPRequestMessage = JSONPRequestMessage;
exports.__esModule = true;
});
14 changes: 3 additions & 11 deletions dist/commonjs/headers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"use strict";

var _prototypeProperties = function (child, staticProps, instanceProps) {
if (staticProps) Object.defineProperties(child, staticProps);
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
};
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var Headers = (function () {
var Headers = exports.Headers = (function () {
function Headers() {
var headers = arguments[0] === undefined ? {} : arguments[0];
this.headers = headers;
Expand All @@ -17,23 +14,20 @@ var Headers = (function () {
this.headers[key] = value;
},
writable: true,
enumerable: true,
configurable: true
},
get: {
value: function get(key) {
return this.headers[key];
},
writable: true,
enumerable: true,
configurable: true
},
clear: {
value: function clear() {
this.headers = {};
},
writable: true,
enumerable: true,
configurable: true
},
configureXHR: {
Expand All @@ -46,12 +40,10 @@ var Headers = (function () {
}
},
writable: true,
enumerable: true,
configurable: true
}
});

return Headers;
})();

exports.Headers = Headers;
exports.__esModule = true;
Loading

0 comments on commit fefeab9

Please sign in to comment.