@ferchy/n8n-nodes-aimc-toolkit 0.1.35 → 0.1.37

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.
Files changed (2) hide show
  1. package/README.md +83 -48
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -145,6 +145,21 @@ return rows.map((row, index) => ({
145
145
  }));
146
146
  ```
147
147
 
148
+ **Prompt starter (for GPT/Claude)**
149
+ If you want AI to generate your node code, paste this prompt into ChatGPT, Claude, or any GPT-style tool and fill in your task:
150
+ ```text
151
+ You are writing code for an n8n AIMC Code node.
152
+ Goal: <describe what you want to do>
153
+ Execution mode: <Run Once for Each Item OR Run Once for All Items>
154
+ Inputs: items are available as `items` (all) or `item` (single)
155
+ Return: return a plain object or array of objects (JSON-safe)
156
+ Libraries (globals): axios, lodash (_), zod (z), joi (Joi), yup, Ajv, validator, dayjs, dateFns, dateFnsTz, moment,
157
+ cheerio, papaparse (Papa), yaml (YAML), xml2js, XMLParser, qs, FormData, uuid, nanoid, bytes, cronParser, ms,
158
+ fuzzy, stringSimilarity, slug, pluralize, jsonDiff, htmlToText, marked, qrcode/QRCode, ytdl, ffmpeg, ffmpegStatic, ffprobeStatic.
159
+ Helpers: utils.now(), utils.safeJson(), utils.toArray()
160
+ Please return only the JavaScript code for the AIMC Code node.
161
+ ```
162
+
148
163
  ### AIMC Media
149
164
 
150
165
  **Operations**
@@ -176,58 +191,78 @@ Social media scraping functionality is currently under development.
176
191
 
177
192
  ## Library Reference (AIMC Code)
178
193
 
179
- Libraries are available as globals or via libs.name.
194
+ Libraries are available as globals or via `libs.<name>`. Examples below are minimal and meant to be copy-paste friendly.
180
195
 
181
196
  ### HTTP and Networking
182
- - axios: HTTP client
183
- - qs: querystring parsing
184
- - FormData: multipart form uploads
185
- - httpProxyAgent: HTTP proxy support
186
- - socksProxyAgent: SOCKS proxy support
187
-
188
- ### Data Parsing
189
- - yaml (YAML): parse/stringify YAML
190
- - toml: parse TOML
191
- - xml2js: XML to JS objects
192
- - XMLParser: fast XML parsing
193
- - papaparse (Papa): CSV parsing
194
- - protobufjs: Protobuf messages
195
-
196
- ### Validation
197
- - zod (z): schema validation
198
- - joi (Joi): expressive validation
199
- - yup: object schema validation
200
- - Ajv: JSON Schema validator
201
- - validator: common validators
202
-
203
- ### Dates and Time
204
- - dayjs: lightweight dates
205
- - dateFns: functional date utilities
206
- - dateFnsTz: timezone helpers
207
- - moment: timezone-aware dates
208
- - cronParser: cron expressions
209
- - ms: duration parsing
210
-
211
- ### Text and Search
212
- - fuzzy (Fuse.js): fuzzy search
213
- - stringSimilarity: string comparison
214
- - marked: Markdown to HTML
215
- - slug: slugify strings
216
- - pluralize: pluralization
217
- - htmlToText: HTML to text
218
- - cheerio: jQuery-like HTML parser
197
+ - `axios`: HTTP client. Example: `const { data } = await axios.get('https://api.example.com');`
198
+ - `qs`: querystring builder/parser. Example: `qs.stringify({ filter: { status: 'open' } })`.
199
+ - `FormData`: multipart uploads. Example: `const form = new FormData(); form.append('file', $binary.data);`
200
+ - `httpProxyAgent`: route HTTP(S) via proxy. Example: `axios.get(url, { httpAgent: new httpProxyAgent('http://user:pass@host:8080') });`
201
+ - `socksProxyAgent`: SOCKS proxy support. Example: `axios.get(url, { httpAgent: new socksProxyAgent('socks5://host:1080') });`
202
+
203
+ ### Data Parsing and Templates
204
+ - `YAML`: parse/stringify YAML. Example: `const obj = YAML.parse(text);`
205
+ - `toml`: parse TOML. Example: `const obj = toml.parse(text);`
206
+ - `ini`: parse INI files. Example: `const cfg = ini.parse(text);`
207
+ - `xml2js`: XML to JS objects. Example: `const obj = await xml2js.parseStringPromise(xml);`
208
+ - `XMLParser`: fast XML parsing. Example: `const obj = new XMLParser().parse(xml);`
209
+ - `papaparse` / `Papa`: CSV parsing. Example: `papaparse.parse(csv, { header: true }).data;`
210
+ - `Handlebars`: templates. Example: `const tpl = Handlebars.compile('Hi {{name}}'); tpl({ name: 'AIMC' });`
211
+ - `protobufjs` / `protobuf`: Protobuf support. Example: `const root = await protobuf.load('schema.proto');`
212
+
213
+ ### Validation and Schema
214
+ - `zod` / `z`: schema validation. Example: `z.object({ id: z.string() }).parse(input);`
215
+ - `joi` / `Joi`: expressive validation. Example: `Joi.object({ id: Joi.string().required() }).validate(input);`
216
+ - `yup`: object schema validation. Example: `await yup.object({ email: yup.string().email() }).validate(input);`
217
+ - `Ajv`: JSON Schema validator. Example: `const validate = new Ajv().compile(schema); validate(input);`
218
+ - `validator`: common validators. Example: `validator.isEmail(email);`
219
+
220
+ ### Dates, Time, and Scheduling
221
+ - `dayjs`: date formatting/math. Example: `dayjs().add(1, 'day').format('YYYY-MM-DD');`
222
+ - `dateFns`: functional date utils. Example: `dateFns.addDays(new Date(), 7);`
223
+ - `dateFnsTz`: timezone helpers. Example: `dateFnsTz.formatInTimeZone(new Date(), 'UTC', 'yyyy-MM-dd');`
224
+ - `moment`: timezone-aware dates. Example: `moment().tz('America/New_York').format();`
225
+ - `cronParser`: cron schedule parsing. Example: `cronParser.parseExpression('0 * * * *').next().toString();`
226
+ - `ms`: duration parsing. Example: `ms('2h');`
227
+
228
+ ### Text, Search, and Similarity
229
+ - `cheerio`: HTML parsing. Example: `const $ = cheerio.load(html); $('title').text();`
230
+ - `fuzzy` (Fuse.js): fuzzy search. Example: `const fuse = new fuzzy(list, { keys: ['title'] }); fuse.search('term');`
231
+ - `stringSimilarity`: string similarity score. Example: `stringSimilarity.compareTwoStrings(a, b);`
232
+ - `marked`: Markdown to HTML. Example: `marked.parse('# Title');`
233
+ - `slug`: slugify strings. Example: `slug('My Title');`
234
+ - `pluralize`: pluralization. Example: `pluralize('person', 2);`
235
+ - `htmlToText`: HTML to text. Example: `htmlToText.convert('<b>hi</b>');`
219
236
 
220
237
  ### IDs and Utilities
221
- - uuid: UUID generation
222
- - nanoid: compact IDs
223
- - bytes: byte size formatting
224
-
225
- ### Media
226
- - ytdl: YouTube downloads
227
- - ffmpeg (fluent-ffmpeg): FFmpeg pipelines
228
- - ffmpegStatic: FFmpeg binary path
229
- - ffprobeStatic: ffprobe binary path
230
- - QRCode: QR code generation
238
+ - `_` / `lodash`: utility helpers. Example: `_.uniqBy(items, 'id');`
239
+ - `uuid`: UUID generation. Example: `uuid.v4();`
240
+ - `nanoid`: compact IDs. Example: `nanoid();`
241
+ - `bytes`: parse/format bytes. Example: `bytes(1024);` or `bytes('1MB');`
242
+ - `jsonDiff`: JSON diffing. Example: `jsonDiff.diff(a, b);`
243
+ - `pRetry`: retry helper. Example: `await pRetry(() => axios.get(url), { retries: 3 });`
244
+
245
+ ### Language and NLP
246
+ - `franc`: language detection. Example: `franc('This is English');`
247
+ - `compromise`: NLP utilities. Example: `compromise('Hello world').nouns().out('array');`
248
+
249
+ ### Media and Files
250
+ - `QRCode` / `qrcode`: QR generation. Example: `await QRCode.toDataURL('hello');`
251
+ - `ytdl`: media downloads. Example: `const stream = ytdl(url, { quality: 'highest' });`
252
+ - `ffmpeg` (fluent-ffmpeg): build FFmpeg pipelines. Example: `ffmpeg('in.mp4').size('1280x?').save('out.mp4');`
253
+ - `ffmpegStatic`: FFmpeg binary path. Example: `ffmpeg.setFfmpegPath(ffmpegStatic);`
254
+ - `ffprobeStatic`: ffprobe binary path. Example: `ffmpeg.setFfprobePath(ffprobeStatic);`
255
+
256
+ ### Database
257
+ - `knex`: SQL query builder. Example: `const db = knex({ client: 'pg', connection: process.env.DB_URL });`
258
+
259
+ ### Other Utilities
260
+ - `phoneNumber` (libphonenumber-js): phone parsing. Example: `phoneNumber.parsePhoneNumber('+14155552671').formatInternational();`
261
+ - `iban`: IBAN validation. Example: `iban.isValid('GB82WEST12345698765432');`
262
+
263
+ ### Optional Native Helpers
264
+ - `bufferutil`: optional native buffer helpers (if installed).
265
+ - `utf8Validate`: optional UTF-8 validation (if installed).
231
266
 
232
267
  ## Configuration
233
268
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferchy/n8n-nodes-aimc-toolkit",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "AIMC Toolkit nodes for n8n: code execution and media operations.",
5
5
  "license": "MIT",
6
6
  "author": "Ferchy",