@nexrender/core 1.50.3 → 1.50.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/package.json +3 -4
- package/src/helpers/analytics.js +26 -27
- package/src/helpers/license.js +34 -6
- package/src/index.js +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrender/core",
|
|
3
|
-
"version": "1.50.
|
|
3
|
+
"version": "1.50.6",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"author": "Inlife",
|
|
6
6
|
"homepage": "https://www.nexrender.com",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"nanoid": "^3.2.0",
|
|
22
22
|
"requireg": "^0.2.1",
|
|
23
23
|
"rimraf": "^3.0.2",
|
|
24
|
-
"strip-comments": "^2.0.1"
|
|
25
|
-
"systeminformation": "^5.18.3"
|
|
24
|
+
"strip-comments": "^2.0.1"
|
|
26
25
|
},
|
|
27
26
|
"peerDependencies": {
|
|
28
27
|
"@nexrender/action-copy": "^1.0.0",
|
|
@@ -38,5 +37,5 @@
|
|
|
38
37
|
"publishConfig": {
|
|
39
38
|
"access": "public"
|
|
40
39
|
},
|
|
41
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1ce7a7b0736385a8cd661b702e7b05832046e295"
|
|
42
41
|
}
|
package/src/helpers/analytics.js
CHANGED
|
@@ -3,7 +3,6 @@ const os = require('os')
|
|
|
3
3
|
const path = require('path')
|
|
4
4
|
const crypto = require('crypto')
|
|
5
5
|
|
|
6
|
-
const si = require('systeminformation')
|
|
7
6
|
const { nanoid } = require('nanoid')
|
|
8
7
|
const childProcess = require('child_process')
|
|
9
8
|
|
|
@@ -96,32 +95,32 @@ const track = async (settings, event, properties = {}) => {
|
|
|
96
95
|
return;
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
// collect system info
|
|
100
|
-
if (!settings.systemInfo) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
98
|
+
// // collect system info
|
|
99
|
+
// if (!settings.systemInfo) {
|
|
100
|
+
// // if (isRemote) console.log('collecting systeminfo')
|
|
101
|
+
|
|
102
|
+
// settings.systemInfo = await si.get({
|
|
103
|
+
// cpu: 'manufacturer,brand,cores',
|
|
104
|
+
// mem: 'total',
|
|
105
|
+
// graphics: '*',
|
|
106
|
+
// osInfo: 'platform,arch,distro,release',
|
|
107
|
+
// dockerInfo: 'id',
|
|
108
|
+
// })
|
|
109
|
+
|
|
110
|
+
// properties.$set_once = {
|
|
111
|
+
// sys_cpu_manufacturer: settings.systemInfo.cpu.manufacturer,
|
|
112
|
+
// sys_cpu_brand: settings.systemInfo.cpu.brand,
|
|
113
|
+
// sys_cpu_cores: settings.systemInfo.cpu.cores,
|
|
114
|
+
// sys_mem_total: settings.systemInfo.mem.total,
|
|
115
|
+
// sys_graphics_vendor: (settings.systemInfo.graphics.controllers[0] || []).vendor,
|
|
116
|
+
// sys_graphics_model: (settings.systemInfo.graphics.controllers[0] || []).model,
|
|
117
|
+
// sys_os_platform: settings.systemInfo.osInfo.platform,
|
|
118
|
+
// sys_os_arch: settings.systemInfo.osInfo.arch,
|
|
119
|
+
// sys_os_distro: settings.systemInfo.osInfo.distro,
|
|
120
|
+
// sys_os_release: settings.systemInfo.osInfo.release,
|
|
121
|
+
// sys_docker: !!settings.systemInfo.dockerInfo.id,
|
|
122
|
+
// }
|
|
123
|
+
// }
|
|
125
124
|
|
|
126
125
|
if (event == 'Job Cleanup') {
|
|
127
126
|
const events = Object.keys(cache.data)
|
package/src/helpers/license.js
CHANGED
|
@@ -2,12 +2,16 @@ const fs = require('fs')
|
|
|
2
2
|
const os = require('os')
|
|
3
3
|
const path = require('path')
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const filename = 'ae_render_only_node.txt'
|
|
6
|
+
const documents = path.join(os.homedir(), 'Documents')
|
|
7
|
+
const adobe = path.join(documents, 'Adobe')
|
|
8
|
+
const nodefile1 = path.join(documents, filename)
|
|
9
|
+
const nodefile2 = path.join(adobe, filename)
|
|
10
|
+
|
|
11
|
+
const add = (settings) => {
|
|
12
|
+
if (!settings.addLicense) {
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
11
15
|
|
|
12
16
|
settings.logger.log('adding default render-only-node licenses for After Effects at:')
|
|
13
17
|
settings.logger.log(' - ' + nodefile1)
|
|
@@ -33,4 +37,28 @@ module.exports = (settings) => {
|
|
|
33
37
|
settings.track('Init Render License Added')
|
|
34
38
|
settings.logger.log('added render-only-node licenses for After Effects')
|
|
35
39
|
}
|
|
40
|
+
|
|
41
|
+
return applied
|
|
36
42
|
}
|
|
43
|
+
|
|
44
|
+
const remove = (settings) => {
|
|
45
|
+
let removed = false
|
|
46
|
+
|
|
47
|
+
if (fs.existsSync(nodefile1)) {
|
|
48
|
+
fs.unlinkSync(nodefile1)
|
|
49
|
+
removed = true
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (fs.existsSync(nodefile2)) {
|
|
53
|
+
fs.unlinkSync(nodefile2)
|
|
54
|
+
removed = true
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (removed) {
|
|
58
|
+
settings.logger.log('removed render-only-node licenses for After Effects')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return removed
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
module.exports = { add, remove }
|
package/src/index.js
CHANGED