@pixlcore/xyrun 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.js +6 -4
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -177,8 +177,6 @@ const app = {
|
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
console.log( "Running command: " + child_cmd, child_args );
|
|
181
|
-
|
|
182
180
|
// get uid / gid info for child env vars
|
|
183
181
|
if (!this.platform.windows) {
|
|
184
182
|
child_opts.uid = job.uid || process.getuid();
|
|
@@ -277,7 +275,7 @@ const app = {
|
|
|
277
275
|
stream.on('json', function(data) {
|
|
278
276
|
// received data from child
|
|
279
277
|
if (!self.handleChildResponse(job, worker, data)) {
|
|
280
|
-
//
|
|
278
|
+
// json should be passed to parent
|
|
281
279
|
stream.emit('text', JSON.stringify(data) + "\n");
|
|
282
280
|
}
|
|
283
281
|
} );
|
|
@@ -492,6 +490,10 @@ const app = {
|
|
|
492
490
|
|
|
493
491
|
if (!job.files || !job.files.length || !Tools.isaArray(job.files)) return callback();
|
|
494
492
|
|
|
493
|
+
// make sure original (pre-upload) file refs never get into final job
|
|
494
|
+
var job_files = job.files;
|
|
495
|
+
delete job.files;
|
|
496
|
+
|
|
495
497
|
if (!job.base_url) {
|
|
496
498
|
console.error("Error: Cannot upload files: Missing 'base_url' property in job data.");
|
|
497
499
|
return callback();
|
|
@@ -501,7 +503,7 @@ const app = {
|
|
|
501
503
|
return callback();
|
|
502
504
|
}
|
|
503
505
|
|
|
504
|
-
async.eachSeries(
|
|
506
|
+
async.eachSeries( job_files,
|
|
505
507
|
function(file, callback) {
|
|
506
508
|
var filename = Path.basename(file.filename || file.path).replace(/[^\w\-\+\.\,\s\(\)\[\]\{\}\'\"\!\&\^\%\$\#\@\*\?\~]+/g, '_');
|
|
507
509
|
console.log( "Uploading file: " + filename );
|