@pixlcore/xyrun 1.0.5 → 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.
Files changed (2) hide show
  1. package/main.js +6 -2
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -275,7 +275,7 @@ const app = {
275
275
  stream.on('json', function(data) {
276
276
  // received data from child
277
277
  if (!self.handleChildResponse(job, worker, data)) {
278
- // unrecognized json, emit as raw text
278
+ // json should be passed to parent
279
279
  stream.emit('text', JSON.stringify(data) + "\n");
280
280
  }
281
281
  } );
@@ -490,6 +490,10 @@ const app = {
490
490
 
491
491
  if (!job.files || !job.files.length || !Tools.isaArray(job.files)) return callback();
492
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
+
493
497
  if (!job.base_url) {
494
498
  console.error("Error: Cannot upload files: Missing 'base_url' property in job data.");
495
499
  return callback();
@@ -499,7 +503,7 @@ const app = {
499
503
  return callback();
500
504
  }
501
505
 
502
- async.eachSeries( job.files,
506
+ async.eachSeries( job_files,
503
507
  function(file, callback) {
504
508
  var filename = Path.basename(file.filename || file.path).replace(/[^\w\-\+\.\,\s\(\)\[\]\{\}\'\"\!\&\^\%\$\#\@\*\?\~]+/g, '_');
505
509
  console.log( "Uploading file: " + filename );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixlcore/xyrun",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Remote job runner script for xyOps.",
5
5
  "author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
6
6
  "homepage": "https://github.com/pixlcore/xyrun",