n8n-nodes-sb-render 1.1.0 → 1.1.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-sb-render",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "n8n community node for video rendering with customizable subtitles, BGM, and narration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -28,11 +28,13 @@
|
|
|
28
28
|
"format": "prettier nodes --write",
|
|
29
29
|
"lint": "eslint nodes --ext .ts",
|
|
30
30
|
"lintfix": "eslint nodes --ext .ts --fix",
|
|
31
|
-
"prepublishOnly": "npm run build && npm run lint"
|
|
31
|
+
"prepublishOnly": "npm run build && npm run lint",
|
|
32
|
+
"postinstall": "node scripts/fix-ffprobe-permissions.js"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"dist",
|
|
35
|
-
"fonts"
|
|
36
|
+
"fonts",
|
|
37
|
+
"scripts"
|
|
36
38
|
],
|
|
37
39
|
"n8n": {
|
|
38
40
|
"n8nNodesApiVersion": 1,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Automatically set execute permissions on ffprobe binary after npm install
|
|
5
|
+
* This is required for @ffprobe-installer package to work correctly
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { chmodSync, existsSync } = require('fs');
|
|
9
|
+
const { resolve, join } = require('path');
|
|
10
|
+
|
|
11
|
+
// Try multiple possible paths where ffprobe might be installed
|
|
12
|
+
const possiblePaths = [
|
|
13
|
+
// Direct dependency path
|
|
14
|
+
resolve(__dirname, '../node_modules/@ffprobe-installer/linux-x64/ffprobe'),
|
|
15
|
+
// Nested dependency path (when installed as part of another package)
|
|
16
|
+
resolve(__dirname, '../node_modules/@ffprobe-installer/ffprobe/node_modules/@ffprobe-installer/linux-x64/ffprobe'),
|
|
17
|
+
// Platform-agnostic approach - check all platform binaries
|
|
18
|
+
resolve(__dirname, '../node_modules/@ffprobe-installer/darwin-x64/ffprobe'),
|
|
19
|
+
resolve(__dirname, '../node_modules/@ffprobe-installer/darwin-arm64/ffprobe'),
|
|
20
|
+
resolve(__dirname, '../node_modules/@ffprobe-installer/win32-x64/ffprobe.exe'),
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
let successCount = 0;
|
|
24
|
+
let errorCount = 0;
|
|
25
|
+
|
|
26
|
+
console.log('🔧 Fixing ffprobe permissions...');
|
|
27
|
+
|
|
28
|
+
for (const ffprobePath of possiblePaths) {
|
|
29
|
+
if (existsSync(ffprobePath)) {
|
|
30
|
+
try {
|
|
31
|
+
// Set execute permissions (755 = rwxr-xr-x)
|
|
32
|
+
chmodSync(ffprobePath, 0o755);
|
|
33
|
+
console.log(` ✅ Set permissions: ${ffprobePath}`);
|
|
34
|
+
successCount++;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.warn(` ⚠️ Could not set permissions for ${ffprobePath}:`, error.message);
|
|
37
|
+
errorCount++;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (successCount === 0 && errorCount === 0) {
|
|
43
|
+
console.warn('⚠️ No ffprobe binaries found. This is normal if @ffprobe-installer is not yet installed.');
|
|
44
|
+
console.warn(' If you encounter "EACCES" errors when running SB Render, try:');
|
|
45
|
+
console.warn(' chmod +x node_modules/@ffprobe-installer/linux-x64/ffprobe');
|
|
46
|
+
} else if (successCount > 0) {
|
|
47
|
+
console.log(`✅ Successfully set permissions on ${successCount} ffprobe binary(ies)`);
|
|
48
|
+
} else {
|
|
49
|
+
console.error('❌ Failed to set permissions on any ffprobe binaries');
|
|
50
|
+
console.error(' You may need to manually run:');
|
|
51
|
+
console.error(' chmod +x node_modules/@ffprobe-installer/linux-x64/ffprobe');
|
|
52
|
+
}
|