@nexrender/core 1.39.8 → 1.40.1
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/package.json +3 -3
- package/src/helpers/autofind.js +1 -0
- package/src/index.js +5 -1
- package/src/tasks/cleanup.js +4 -3
- package/src/tasks/render.js +7 -0
- package/src/tasks/setup.js +1 -4
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.1",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"author": "Inlife",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"pkg-prelink": "node ../../misc/prelink.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@nexrender/types": "^1.
|
|
10
|
+
"@nexrender/types": "^1.40.0",
|
|
11
11
|
"data-uri-to-buffer": "^3.0.0",
|
|
12
12
|
"file-uri-to-path": "^2.0.0",
|
|
13
13
|
"is-wsl": "^2.2.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "6eac7cdfed90cc8705320f29b4efe239d559707e"
|
|
34
34
|
}
|
package/src/helpers/autofind.js
CHANGED
|
@@ -13,6 +13,7 @@ const defaultPaths = {
|
|
|
13
13
|
'/Applications/Adobe After Effects 2020',
|
|
14
14
|
'/Applications/Adobe After Effects 2021',
|
|
15
15
|
'/Applications/Adobe After Effects 2022',
|
|
16
|
+
'/Applications/Adobe After Effects 2023',
|
|
16
17
|
'/Applications/Adobe After Effects CC 2021',
|
|
17
18
|
'/Applications/Adobe After Effects CC 2022',
|
|
18
19
|
'/Applications/Adobe After Effects CC 2023',
|
package/src/index.js
CHANGED
|
@@ -21,6 +21,8 @@ const dorender = require('./tasks/render')
|
|
|
21
21
|
const postrender = require('./tasks/actions')('postrender')
|
|
22
22
|
const cleanup = require('./tasks/cleanup')
|
|
23
23
|
|
|
24
|
+
const { create } = require('@nexrender/types/job')
|
|
25
|
+
|
|
24
26
|
/* place to register all plugins */
|
|
25
27
|
/* so they will be picked up and resolved by pkg */
|
|
26
28
|
if (process.env.NEXRENDER_REQUIRE_PLUGINS) {
|
|
@@ -103,11 +105,13 @@ const init = (settings) => {
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
|
|
106
|
-
const render = (
|
|
108
|
+
const render = (jobConfig, settings = {}) => {
|
|
107
109
|
if (!settings.__initialized) {
|
|
108
110
|
settings = init(settings)
|
|
109
111
|
}
|
|
110
112
|
|
|
113
|
+
/* fill default job fields */
|
|
114
|
+
const job = create(jobConfig)
|
|
111
115
|
return Promise.resolve(job)
|
|
112
116
|
.then(job => state(job, settings, setup, 'setup'))
|
|
113
117
|
.then(job => state(job, settings, predownload, 'predownload'))
|
package/src/tasks/cleanup.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const rimraf = require('rimraf')
|
|
2
|
+
const path = require('path')
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Clean up all workpath files and remove folder
|
|
@@ -11,12 +12,12 @@ module.exports = function(job, settings) {
|
|
|
11
12
|
|
|
12
13
|
return new Promise((resolve) => {
|
|
13
14
|
settings.logger.log(`[${job.uid}] cleaning up...`);
|
|
14
|
-
|
|
15
|
+
|
|
15
16
|
// sometimes this attribute (workpath) is undefined
|
|
16
17
|
if (!job.workpath) {
|
|
17
|
-
job.workpath = settings.workpath
|
|
18
|
+
job.workpath = path.join(settings.workpath, job.uid)
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
|
|
20
21
|
rimraf(job.workpath, {glob: false}, (err) => {
|
|
21
22
|
if (!err) {
|
|
22
23
|
settings.logger.log(`[${job.uid}] Temporary AfterEffects project deleted. If you want to inspect it for debugging, use "--skip-cleanup"`)
|
package/src/tasks/render.js
CHANGED
|
@@ -190,6 +190,13 @@ module.exports = (job, settings) => {
|
|
|
190
190
|
const existsMovOutputFile = fs.existsSync(movOutputFile)
|
|
191
191
|
if (existsMovOutputFile) {
|
|
192
192
|
job.output = movOutputFile
|
|
193
|
+
} else {
|
|
194
|
+
// AE 2023 use mp4 output files
|
|
195
|
+
const mp4OutputFile = outputFile.replace(/\.avi$/g, '.mp4')
|
|
196
|
+
const existsMp4OutputFile = fs.existsSync(mp4OutputFile)
|
|
197
|
+
if (existsMp4OutputFile) {
|
|
198
|
+
job.output = mp4OutputFile
|
|
199
|
+
}
|
|
193
200
|
}
|
|
194
201
|
|
|
195
202
|
if (!fs.existsSync(job.output)) {
|
package/src/tasks/setup.js
CHANGED
|
@@ -3,15 +3,12 @@ const path = require('path')
|
|
|
3
3
|
const mkdirp = require('mkdirp')
|
|
4
4
|
const assert = require('assert')
|
|
5
5
|
|
|
6
|
-
const {
|
|
6
|
+
const { validate } = require('@nexrender/types/job')
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This task creates working directory for current job
|
|
10
10
|
*/
|
|
11
11
|
module.exports = (job, settings) => {
|
|
12
|
-
/* fill default job fields */
|
|
13
|
-
job = create(job)
|
|
14
|
-
|
|
15
12
|
settings.logger.log(`[${job.uid}] setting up job...`);
|
|
16
13
|
|
|
17
14
|
try {
|