@trawlme/cli 1.10.0 → 1.11.0
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 +6 -0
- package/package.json +1 -1
package/dist/commands/scraps.js
CHANGED
|
@@ -122,6 +122,8 @@ scraps
|
|
|
122
122
|
.option('--no-cron', 'Disable cron (set to null)')
|
|
123
123
|
.option('--alert <email>', 'Failure alert email (empty string to clear)')
|
|
124
124
|
.option('--no-alert', 'Disable failure alert email (set to null)')
|
|
125
|
+
.option('--autofix', 'Enable AI Fix (auto-recovery on selector breakage)')
|
|
126
|
+
.option('--no-autofix', 'Disable AI Fix')
|
|
125
127
|
.option('-p, --params <json>', 'Runtime params as JSON array of objects (e.g. \'[{"TRAWL.paramName":"value"}]\')')
|
|
126
128
|
.option('--params-file <path>', 'Runtime params from a JSON file')
|
|
127
129
|
.action(async (id, opts) => {
|
|
@@ -143,6 +145,10 @@ scraps
|
|
|
143
145
|
body.alert = null;
|
|
144
146
|
else if (typeof opts.alert === 'string')
|
|
145
147
|
body.alert = opts.alert === '' ? null : opts.alert;
|
|
148
|
+
if (opts.autofix === true)
|
|
149
|
+
body.autoFix = true;
|
|
150
|
+
else if (opts.autofix === false)
|
|
151
|
+
body.autoFix = false;
|
|
146
152
|
if (opts.params !== undefined || opts.paramsFile !== undefined) {
|
|
147
153
|
let raw;
|
|
148
154
|
if (opts.paramsFile) {
|