@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.
- package/dist/commands/scraps.js +3 -0
- package/package.json +1 -1
package/dist/commands/scraps.js
CHANGED
|
@@ -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
|
}
|