Skip to content

Commit

Permalink
fixed issue with undefined job #92
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Feb 8, 2019
1 parent a80eb97 commit 048fd39
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/nexrender-action-copy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (job, settings, { output }, type) => {
return new Promise(function(resolve, reject) {
rd.on('error', reject)
wr.on('error', reject)
wr.on('finish', resolve)
wr.on('finish', () => resolve(job))
rd.pipe(wr);
}).catch((error) => {
rd.destroy()
Expand Down
2 changes: 1 addition & 1 deletion packages/nexrender-action-copy/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions packages/nexrender-core/test/manual.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ const job = {
value: 'Hello world',
}
],
// actions: {
// prerender: [
// { module: __dirname + '/mytest.js' }
// ],
// postrender: [
// { module: __dirname + '/mytest.js' }
// ]
// },
actions: {
// prerender: [
// { module: __dirname + '/mytest.js' }
// ],
postrender: [
{
module: '@nexrender/action-copy',
output: '/Users/inlife/output.mov',
}
]
},
// onChange: (job, state) => console.log('new job state', state)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/nexrender-provider-s3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/nexrender-types/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const validate = job => {
assert(job.actions);

[].concat(
job.actions.prerender,
job.actions.postrender
job.actions.prerender || [],
job.actions.postrender || []
).map(action => {
assert(action, `job action must be defined`);
assert(action.module, `job action must have module defined`);
Expand Down

0 comments on commit 048fd39

Please sign in to comment.