@ferchy/n8n-nodes-aimc-toolkit 0.1.10 → 0.1.12
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/README.md +20 -5
- package/dist/nodes/AimcCode/AimcCode.node.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,25 +42,37 @@ npm install @ferchy/n8n-nodes-aimc-toolkit
|
|
|
42
42
|
|
|
43
43
|
## FFmpeg Setup
|
|
44
44
|
|
|
45
|
-
AIMC Media
|
|
45
|
+
AIMC Media runs inside your n8n host/container, so FFmpeg must be available there.
|
|
46
|
+
It will use the first available option:
|
|
46
47
|
|
|
47
48
|
1. `FFMPEG_PATH` / `FFPROBE_PATH` environment variables
|
|
48
49
|
2. Bundled `ffmpeg-static` / `ffprobe-static`
|
|
49
50
|
3. System FFmpeg on `PATH`
|
|
50
51
|
|
|
51
|
-
If `ffmpeg-static` cannot install in your environment, install system FFmpeg.
|
|
52
|
+
If `ffmpeg-static` cannot install in your environment, install system FFmpeg on the same machine/container where n8n runs.
|
|
52
53
|
|
|
53
|
-
### Docker (n8n official image)
|
|
54
|
+
### Docker (n8n official image, run inside the container)
|
|
54
55
|
```bash
|
|
55
56
|
docker exec <container> apk add --no-cache ffmpeg
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
###
|
|
59
|
+
### Coolify (recommended: custom Dockerfile)
|
|
60
|
+
If you deploy n8n via Coolify, install FFmpeg in the container image.
|
|
61
|
+
|
|
62
|
+
Example `Dockerfile`:
|
|
63
|
+
```dockerfile
|
|
64
|
+
FROM n8nio/n8n:latest
|
|
65
|
+
RUN apk add --no-cache ffmpeg
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then point Coolify to the Dockerfile (or use its "Custom Dockerfile" option) and redeploy.
|
|
69
|
+
|
|
70
|
+
### Debian/Ubuntu (server/VM running n8n)
|
|
59
71
|
```bash
|
|
60
72
|
apt-get update && apt-get install -y ffmpeg
|
|
61
73
|
```
|
|
62
74
|
|
|
63
|
-
### macOS (
|
|
75
|
+
### macOS (local dev only)
|
|
64
76
|
```bash
|
|
65
77
|
brew install ffmpeg
|
|
66
78
|
```
|
|
@@ -236,6 +248,9 @@ Provide Python code and set a variable named `result` to return output.
|
|
|
236
248
|
### Media Helpers
|
|
237
249
|
- `qrcode` (global `QRCode` or `qrcode`): generate QR codes as data URLs or images.
|
|
238
250
|
- `@distube/ytdl-core` (global `ytdl`): download media from supported sources. Use for media ingestion flows.
|
|
251
|
+
- `fluent-ffmpeg` (global `ffmpeg`): build FFmpeg pipelines in JS when you need custom media logic.
|
|
252
|
+
- `ffmpeg-static` (global `ffmpegStatic`): path to a bundled FFmpeg binary (if available).
|
|
253
|
+
- `ffprobe-static` (global `ffprobeStatic`): path to a bundled ffprobe binary (if available).
|
|
239
254
|
|
|
240
255
|
### Database and Query Helpers
|
|
241
256
|
- `knex` (global `knex`): SQL query builder. Use for lightweight DB queries when allowed by your environment.
|
|
@@ -107,6 +107,9 @@ const libraryLoaders = {
|
|
|
107
107
|
ytdl: () => require('@distube/ytdl-core'),
|
|
108
108
|
httpProxyAgent: () => require('http-proxy-agent'),
|
|
109
109
|
socksProxyAgent: () => require('socks-proxy-agent'),
|
|
110
|
+
ffmpeg: () => require('fluent-ffmpeg'),
|
|
111
|
+
ffmpegStatic: () => require('ffmpeg-static'),
|
|
112
|
+
ffprobeStatic: () => require('ffprobe-static'),
|
|
110
113
|
bufferutil: optionalRequire('bufferutil'),
|
|
111
114
|
utf8Validate: optionalRequire('utf-8-validate'),
|
|
112
115
|
};
|
|
@@ -442,7 +445,7 @@ class AimcCode {
|
|
|
442
445
|
language: ['javascript'],
|
|
443
446
|
},
|
|
444
447
|
},
|
|
445
|
-
default: `// AIMC Code
|
|
448
|
+
default: `// AIMC Code (JavaScript)\n// Libraries are globals or available via libs.<name>\n// HTTP: axios, qs, FormData, httpProxyAgent, socksProxyAgent\n// Parse: YAML, toml, xml2js, XMLParser, papaparse/Papa, protobufjs\n// Validate: zod (z), joi (Joi), yup, Ajv, validator\n// Dates: dayjs, dateFns, dateFnsTz, moment, cronParser, ms\n// Text: cheerio, htmlToText, marked, slug, pluralize, fuzzy, stringSimilarity, compromise, franc\n// Utils: lodash (_), uuid, nanoid, bytes, jsonDiff, pRetry\n// Media: qrcode/QRCode, ytdl, ffmpeg, ffmpegStatic, ffprobeStatic\n// DB: knex\n// Other: phoneNumber, iban\n// Optional native: bufferutil, utf8Validate\n//\n// AIMC Connect Mode (AI) gives you:\n// ai, aiModel, aiTools, aiMemory, aiVectorStore, aiChain, aiDocument, aiEmbedding, aiOutputParser, aiTextSplitter\n\n// Run Once for Each Item\nif (typeof item !== 'undefined') {\n return {\n mode: 'runOnceForEachItem',\n item: item.json,\n id: nanoid(),\n receivedAt: utils.now(),\n };\n}\n\n// Run Once for All Items\nconst rows = $input.all().map((entry) => entry.json);\nreturn rows.map((row) => ({\n ...row,\n id: nanoid(),\n processedAt: utils.now(),\n}));\n`,
|
|
446
449
|
description: 'Write JavaScript to transform data.',
|
|
447
450
|
noDataExpression: true,
|
|
448
451
|
},
|