@trawlme/cli 4.0.7 → 4.0.8

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.
@@ -979,6 +979,9 @@ export function attachTriggerCommand(parent, attachOpts = {}) {
979
979
  }
980
980
  body = r.body;
981
981
  }
982
+ else if (scrap?.params?.length && Object.keys(scrap.params[0] ?? {}).length > 0) {
983
+ body = scrap.params[Math.floor(Math.random() * scrap.params.length)];
984
+ }
982
985
  if (scrap && typeof scrap === 'object' && !scrap.cron) {
983
986
  console.error(chalk.yellow(` ⚠ Scrap ${id} has no schedule: nothing runs it unattended after this one-off run, so nothing checks its health. Add one: trawl scraps update ${id} --cron <expr>`));
984
987
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trawlme/cli",
3
- "version": "4.0.7",
3
+ "version": "4.0.8",
4
4
  "description": "Trawl CLI — manage scraps from the terminal",
5
5
  "type": "module",
6
6
  "bin": {