Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
[CI] Automated merge stage->master
Browse files Browse the repository at this point in the history
  • Loading branch information
arcauto committed Oct 7, 2016
2 parents 7ab6fbd + ce8087a commit c0624a1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="1.0.65"></a>
## [1.0.65](https://github.com/advanced-rest-client/socket-fetch/compare/1.0.64...v1.0.65) (2016-10-07)


### New

* Added log messages to the response object ([0a481222a8ede7fee3c25d0a7d8ca4187ad6f038](https://github.com/advanced-rest-client/socket-fetch/commit/0a481222a8ede7fee3c25d0a7d8ca4187ad6f038))



<a name="1.0.64"></a>
## [1.0.64](https://github.com/advanced-rest-client/socket-fetch/compare/1.0.63...v1.0.64) (2016-09-29)

Expand Down
13 changes: 9 additions & 4 deletions app.fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class SocketFetch extends ArcEventSource {
*/
constructor(url, opts) {
super();
this._logs = [];
/**
* A original request object.
* This will contain data passed to the constructor.
Expand Down Expand Up @@ -567,12 +568,12 @@ class SocketFetch extends ArcEventSource {
return new Promise((resolve) => {
chrome.sockets.tcp.disconnect(this._connection.socketId, () => {
if (chrome.runtime.lastError) {
console.warn(chrome.runtime.lastError);
this.log(chrome.runtime.lastError, 'warn');
}
this._readyState = 0;
chrome.sockets.tcp.close(this._connection.socketId, () => {
if (chrome.runtime.lastError) {
console.warn(chrome.runtime.lastError);
this.log(chrome.runtime.lastError, 'warn');
}
this._connection.socketId = undefined;
resolve();
Expand All @@ -585,6 +586,7 @@ class SocketFetch extends ArcEventSource {
if (this.debug) {
console.log.apply(console, entry);
}
this._logs.push(entry);
}
/**
* Calling abort function will immidietly result with Promise rejection.
Expand Down Expand Up @@ -694,6 +696,8 @@ class SocketFetch extends ArcEventSource {
}
}
this._response = new ArcResponse(body, options);
this._response.logs = this._logs;
this._logs = [];
});
}
/**
Expand Down Expand Up @@ -1244,7 +1248,7 @@ class SocketFetch extends ArcEventSource {
// It may happen that chrome's buffer cuts the data
// just before the chunk size.
// It should proceed it in next portion of the data.
console.warn('The chunk size was null!');
this.log('The chunk size was null!', 'warn');
return;
}
if (!this._connection.chunkSize) {
Expand All @@ -1270,7 +1274,7 @@ class SocketFetch extends ArcEventSource {
this._connection.chunkSize);
// debugger;
if (data.length === 0) {
console.warn('Next chunk will start with CRLF!');
this.log('Next chunk will start with CRLF!', 'warn');
}
data = data.subarray(size + 2); // + CR
if (data.length === 0) {
Expand Down Expand Up @@ -1628,6 +1632,7 @@ class SocketFetch extends ArcEventSource {
this._connection._readFn = undefined;
this._connection._errorFn = undefined;
this.redirects = undefined;
this._logs = [];
this._cancelTimer();
}
/** Clean up for redirect */
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket-fetch",
"version": "1.0.64",
"version": "1.0.65",
"license": "LICENSE.txt",
"description": "A HTTP transport based on chrome.socket.tcp API.",
"authors": [
Expand Down
4 changes: 4 additions & 0 deletions dependencyci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type:
development:
tests:
unlicensed: skip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket-fetch",
"version": "1.0.64",
"version": "1.0.65",
"license": "LICENSE",
"description": "A HTTP transport based on chrome.socket.tcp API.",
"repository": {
Expand Down
19 changes: 5 additions & 14 deletions socket-fetch.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,8 @@
[chrome.sockets.tcp]: https://developer.chrome.com/apps/sockets_tcp
[Advanced Rest Client]: https://github.com/jarrodek/ChromeRestClient
-->
<dom-module id="socket-fetch">
<template>
<style>
:host {
display: none;
}
</style>
</template>
<script>
Polymer({
is: 'socket-fetch'
});
</script>
</dom-module>
<script>
Polymer({
is: 'socket-fetch'
});
</script>

0 comments on commit c0624a1

Please sign in to comment.