@backendsuraj/offline-ffprobe 8.0.0 → 8.0.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/index.d.ts +9 -0
- package/index.js +18 -19
- package/package.json +4 -3
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
var os = require('os');
|
|
2
2
|
var path = require('path');
|
|
3
|
+
var fs = require('fs');
|
|
3
4
|
|
|
4
5
|
var platform = os.platform();
|
|
5
6
|
var arch = os.arch();
|
|
6
7
|
|
|
7
|
-
if (platform
|
|
8
|
+
if (platform === 'darwin') {
|
|
9
|
+
console.error('MacOS support coming soon.');
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (platform !== 'linux' && platform !== 'win32') {
|
|
8
14
|
console.error('Unsupported platform: ' + platform);
|
|
9
|
-
console.error('ffprobe
|
|
15
|
+
console.error('offline-ffprobe only supports linux and win32 systems');
|
|
10
16
|
process.exit(1);
|
|
11
17
|
}
|
|
12
18
|
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
var packageName = 'offline-ffprobe-' + platform + '-' + arch;
|
|
20
|
+
var binaryName = platform === 'win32' ? 'ffprobe.exe' : 'ffprobe';
|
|
21
|
+
|
|
22
|
+
var ffprobePath = path.resolve(__dirname, 'node_modules', '@backendsuraj', packageName, 'bin', binaryName);
|
|
23
|
+
|
|
24
|
+
if (!fs.existsSync(ffprobePath)) {
|
|
25
|
+
ffprobePath = path.resolve(__dirname, '..', packageName, 'bin', binaryName);
|
|
26
|
+
}
|
|
21
27
|
|
|
22
|
-
var fs = require('fs');
|
|
23
28
|
if (!fs.existsSync(ffprobePath)) {
|
|
24
|
-
ffprobePath = path.
|
|
25
|
-
__dirname,
|
|
26
|
-
'..',
|
|
27
|
-
'offline-ffprobe-' + platform + '-' + arch,
|
|
28
|
-
'bin',
|
|
29
|
-
platform === 'win32' ? 'ffprobe.exe' : 'ffprobe'
|
|
30
|
-
);
|
|
29
|
+
ffprobePath = path.resolve(__dirname, '..', '..', packageName, 'bin', binaryName);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
exports.path = ffprobePath;
|
|
34
|
-
exports.version = '8.0.
|
|
33
|
+
exports.version = '8.0.1';
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backendsuraj/offline-ffprobe",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Platform independent binary installer of FFprobe for node projects (Offline Friendly)",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"author": "Suraj",
|
|
7
8
|
"license": "LGPL-3.0",
|
|
8
9
|
"repository": {
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
"url": "https://github.com/backendsuraj/offline-ffmpeg"
|
|
11
12
|
},
|
|
12
13
|
"optionalDependencies": {
|
|
13
|
-
"@backendsuraj/offline-ffprobe-win32-x64": "8.0.
|
|
14
|
-
"@backendsuraj/offline-ffprobe-linux-x64": "8.0.
|
|
14
|
+
"@backendsuraj/offline-ffprobe-win32-x64": "8.0.1",
|
|
15
|
+
"@backendsuraj/offline-ffprobe-linux-x64": "8.0.1"
|
|
15
16
|
}
|
|
16
17
|
}
|