Comparing version 2.0.1 to 2.0.2
const { Worker, isMainThread, parentPort, workerData } = require('worker_threads'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const ChildProcess = require('child_process'); | ||
@@ -124,14 +125,9 @@ const del = require('del'); | ||
function cleanUpSources(path) { | ||
return new Promise((resolve, reject) => { | ||
const child = ChildProcess.spawn('./bin/gtfs2lc-clean.sh', [path]); | ||
child.on('close', (code, signal) => { | ||
if (signal === 'SIGTERM') { | ||
reject(new Error('Process gtfs2lc-clean.sh exit with code: ' + code)); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
async function cleanUpSources(sources) { | ||
try { | ||
await exec(`${path.resolve(`${__dirname}/../bin/gtfs2lc-clean.sh`)} ${sources}`); | ||
} catch(err) { | ||
console.error(err); | ||
throw new Error('Process gtfs2lc-clean.sh exit with code: ' + code); | ||
} | ||
} | ||
@@ -138,0 +134,0 @@ |
{ | ||
"name": "gtfs2lc", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Mapping script from gtfs to (linked) connections", | ||
@@ -5,0 +5,0 @@ "main": "lib/gtfs2lc.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
376533
1880