Skip to content

Commit

Permalink
Merge pull request #90 from linkedconnections/development
Browse files Browse the repository at this point in the history
v1.3.4
  • Loading branch information
julianrojas87 authored May 9, 2023
2 parents e004a48 + e5f4795 commit afa9d8e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
12 changes: 8 additions & 4 deletions lib/manager/pageWriterStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ module.exports = class pageWriterStream extends Writable {
}

_final(done) {
this._wstream.on('finish', () => {
done();
});
this._gzip.end();
if (this._wstream) {
this._wstream.on('finish', () => {
done();
});
}
if (this._gzip) {
this._gzip.end();
}
}

initWriter() {
Expand Down
4 changes: 3 additions & 1 deletion lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ module.exports = new class Utils {
return new Promise(async (resolve, reject) => {
try {
const res = await this.download(url, headers);
const lastModified = res.headers['last-modified'] ? new Date(res.headers['last-modified']).toISOString() : new Date().toISOString();
const lastModified = res.headers['last-modified']
? new Date(res.headers['last-modified']).toISOString()
: new Date().toISOString();
const fileName = `${path}/${lastModified}.zip`;
const writer = fs.createWriteStream(fileName, { encoding: 'base64' });

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linked-connections-server",
"version": "1.3.3",
"version": "1.3.4",
"author": "Julian Rojas",
"license": "MIT",
"repository": {
Expand All @@ -11,7 +11,7 @@
"url": "https://github.com/linkedconnections/linked-connections-server/issues"
},
"scripts": {
"test": "jest",
"test": "jest --coverage",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls"
},
"dependencies": {
Expand All @@ -24,9 +24,9 @@
"del": "^5.1.0",
"express": "^4.17.1",
"fast-csv": "^4.1.1",
"gtfs2lc": "^2.1.9",
"gtfsrt2lc": "^2.0.5",
"jsonld": "^5.2.0",
"gtfs2lc": "^2.2.0",
"gtfsrt2lc": "^2.1.3",
"jsonld": "^8.1.1",
"md5": "^2.2.1",
"morgan": "^1.9.1",
"n3": "^1.3.5",
Expand Down

0 comments on commit afa9d8e

Please sign in to comment.