@quatrain/worker 1.1.16 → 1.1.18

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/lib/FileSystem.js CHANGED
@@ -169,7 +169,7 @@ class FileSystem {
169
169
  resolve({
170
170
  width,
171
171
  height,
172
- framerate: framerate.toFixed(0),
172
+ framerate: parseInt(framerate.toFixed(0)),
173
173
  duration: parseInt(duration),
174
174
  bitrate,
175
175
  });
package/lib/Worker.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Core } from '@quatrain/core';
2
2
  export declare class Worker extends Core {
3
3
  static endpoint: string;
4
+ static logger: any;
4
5
  /**
5
6
  * Execute an external command in a promise
6
7
  * @see https://stackoverflow.com/questions/46289682/how-to-wait-for-child-process-spawn-execution-with-async-await
package/lib/Worker.js CHANGED
@@ -10,6 +10,7 @@ const axios_1 = __importDefault(require("axios"));
10
10
  const child_process_1 = require("child_process");
11
11
  class Worker extends core_1.Core {
12
12
  static endpoint = '';
13
+ static logger = this.addLogger('Worker');
13
14
  /**
14
15
  * Execute an external command in a promise
15
16
  * @see https://stackoverflow.com/questions/46289682/how-to-wait-for-child-process-spawn-execution-with-async-await
@@ -19,7 +20,7 @@ class Worker extends core_1.Core {
19
20
  * @return Promise
20
21
  */
21
22
  static execPromise = (command, args = [], cwd = process.cwd()) => {
22
- Worker.log(`Executing command ${command} in ${cwd} with arguments:`);
23
+ Worker.info(`Executing command ${command} in ${cwd} with arguments:`);
23
24
  args.forEach((arg) => console.log(`\t${arg}`));
24
25
  return new Promise((resolve, reject) => {
25
26
  const child = (0, child_process_1.spawn)(command, args, { cwd });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/worker",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Container Worker helpers",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "typescript": "^5.1.5"
26
26
  },
27
27
  "dependencies": {
28
- "@quatrain/core": "^1.1.14",
28
+ "@quatrain/core": "^1.1.16",
29
29
  "axios": "^1.7.7",
30
30
  "fluent-ffmpeg": "^2.1.2",
31
31
  "fs-extra": "^11.2.0",