@pixlcore/xyrun 1.0.5 → 1.0.7

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 +7 -2
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -100,6 +100,7 @@ const app = {
100
100
  if (err) {
101
101
  return callback( new Error("Failed to download job file: " + file.filename + ": " + (err.message || err)) );
102
102
  }
103
+ delete file.path;
103
104
  callback();
104
105
  } ); // request.get
105
106
  },
@@ -275,7 +276,7 @@ const app = {
275
276
  stream.on('json', function(data) {
276
277
  // received data from child
277
278
  if (!self.handleChildResponse(job, worker, data)) {
278
- // unrecognized json, emit as raw text
279
+ // json should be passed to parent
279
280
  stream.emit('text', JSON.stringify(data) + "\n");
280
281
  }
281
282
  } );
@@ -490,6 +491,10 @@ const app = {
490
491
 
491
492
  if (!job.files || !job.files.length || !Tools.isaArray(job.files)) return callback();
492
493
 
494
+ // make sure original (pre-upload) file refs never get into final job
495
+ var job_files = job.files;
496
+ delete job.files;
497
+
493
498
  if (!job.base_url) {
494
499
  console.error("Error: Cannot upload files: Missing 'base_url' property in job data.");
495
500
  return callback();
@@ -499,7 +504,7 @@ const app = {
499
504
  return callback();
500
505
  }
501
506
 
502
- async.eachSeries( job.files,
507
+ async.eachSeries( job_files,
503
508
  function(file, callback) {
504
509
  var filename = Path.basename(file.filename || file.path).replace(/[^\w\-\+\.\,\s\(\)\[\]\{\}\'\"\!\&\^\%\$\#\@\*\?\~]+/g, '_');
505
510
  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.7",
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",