orator-conversion 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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orator-conversion",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "File format conversion endpoints for Orator service servers.",
|
|
5
5
|
"main": "source/Orator-File-Translation.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"fable-serviceproviderbase": "^3.0.19",
|
|
45
45
|
"sharp": "^0.34.5",
|
|
46
|
-
"ultravisor-beacon": "^0.0.
|
|
46
|
+
"ultravisor-beacon": "^0.0.8",
|
|
47
47
|
"ws": "^8.20.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -46,6 +46,13 @@ class OratorConversionBeaconProvider extends libBeaconCapabilityProvider
|
|
|
46
46
|
this.Name = 'OratorConversion';
|
|
47
47
|
this.Capability = 'MediaConversion';
|
|
48
48
|
|
|
49
|
+
this.log = (this._ProviderConfig && this._ProviderConfig.Log) || {
|
|
50
|
+
trace: (...pArgs) => { console.log(...pArgs); },
|
|
51
|
+
info: (...pArgs) => { console.log(...pArgs); },
|
|
52
|
+
warn: (...pArgs) => { console.warn(...pArgs); },
|
|
53
|
+
error: (...pArgs) => { console.error(...pArgs); }
|
|
54
|
+
};
|
|
55
|
+
|
|
49
56
|
this._Core = new libConversionCore({
|
|
50
57
|
PdftkPath: this._ProviderConfig.PdftkPath || 'pdftk',
|
|
51
58
|
PdftoppmPath: this._ProviderConfig.PdftoppmPath || 'pdftoppm',
|
|
@@ -233,27 +240,27 @@ class OratorConversionBeaconProvider extends libBeaconCapabilityProvider
|
|
|
233
240
|
return fCallback(new Error(`OratorConversion provider requires Sharp: ${pSharpError.message}`));
|
|
234
241
|
}
|
|
235
242
|
this._SharpAvailable = true;
|
|
236
|
-
|
|
243
|
+
this.log.info(` [OratorConversion] Sharp: available`);
|
|
237
244
|
|
|
238
245
|
this._Core.checkPdftoppm((pPdftoppmError, pPdftoppmAvailable) =>
|
|
239
246
|
{
|
|
240
247
|
this._PdftoppmAvailable = !pPdftoppmError;
|
|
241
|
-
|
|
248
|
+
this.log.info(` [OratorConversion] pdftoppm: ${this._PdftoppmAvailable ? 'available' : 'not found (PDF actions disabled)'}`);
|
|
242
249
|
|
|
243
250
|
this._Core.checkPdftk((pPdftkError, pPdftkAvailable) =>
|
|
244
251
|
{
|
|
245
252
|
this._PdftkAvailable = !pPdftkError;
|
|
246
|
-
|
|
253
|
+
this.log.info(` [OratorConversion] pdftk: ${this._PdftkAvailable ? 'available' : 'not found (PDF extraction disabled)'}`);
|
|
247
254
|
|
|
248
255
|
this._Core.checkFfmpeg((pFfmpegError, pFfmpegAvailable) =>
|
|
249
256
|
{
|
|
250
257
|
this._FfmpegAvailable = !pFfmpegError;
|
|
251
|
-
|
|
258
|
+
this.log.info(` [OratorConversion] ffmpeg: ${this._FfmpegAvailable ? 'available' : 'not found (video/audio actions disabled)'}`);
|
|
252
259
|
|
|
253
260
|
this._Core.checkFfprobe((pFfprobeError, pFfprobeAvailable) =>
|
|
254
261
|
{
|
|
255
262
|
this._FfprobeAvailable = !pFfprobeError;
|
|
256
|
-
|
|
263
|
+
this.log.info(` [OratorConversion] ffprobe: ${this._FfprobeAvailable ? 'available' : 'not found (media probe disabled)'}`);
|
|
257
264
|
|
|
258
265
|
return fCallback(null);
|
|
259
266
|
});
|
|
@@ -268,7 +275,7 @@ class OratorConversionBeaconProvider extends libBeaconCapabilityProvider
|
|
|
268
275
|
*/
|
|
269
276
|
execute(pAction, pWorkItem, pContext, fCallback, fReportProgress)
|
|
270
277
|
{
|
|
271
|
-
let tmpLog = pContext && pContext.log ? pContext.log :
|
|
278
|
+
let tmpLog = pContext && pContext.log ? pContext.log : this.log;
|
|
272
279
|
tmpLog.info(`[OratorConversion] execute: action="${pAction}" workItem=${pWorkItem.WorkItemHash || '?'} settings=${JSON.stringify(pWorkItem.Settings || {}).substring(0, 200)}`);
|
|
273
280
|
let tmpSettings = pWorkItem.Settings || {};
|
|
274
281
|
let tmpStagingPath = pContext.StagingPath || process.cwd();
|