@scrappycoco/cli 0.8.0 → 0.8.2

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 CHANGED
@@ -73,6 +73,20 @@ Use `--json` for machine-readable responses. Execution commands support
73
73
  poll for completion. When `--output` is used, records go to the file and a
74
74
  compact execution summary remains on stdout.
75
75
 
76
+ Canonical Run request files use `providers` as a top-level array and
77
+ `provider_options` keyed by provider ID:
78
+
79
+ ```json
80
+ {
81
+ "input": {"query": "unified API for scraping"},
82
+ "providers": ["exa"],
83
+ "provider_options": {"exa": {}}
84
+ }
85
+ ```
86
+
87
+ Do not use a singular `provider` field. With flags, use repeatable
88
+ `--provider <id>` instead.
89
+
76
90
  For a long run, add `--detach` to return a job ID immediately, then finish with
77
91
  `scrappycoco jobs wait <job-id> --output results.json`. Use
78
92
  `scrappycoco jobs get <job-id>` for a single status check or
package/dist/index.js CHANGED
@@ -1119,6 +1119,12 @@ function splitScraperId(value) {
1119
1119
  }
1120
1120
  async function requestPayload(options, scraperId) {
1121
1121
  const fromFile = options.file ? await readJsonFile(options.file) : {};
1122
+ if ("provider" in fromFile) {
1123
+ throw new CliError(
1124
+ 'Run request files use "providers": ["provider_id"] (plural), or pass the repeatable --provider flag.',
1125
+ EXIT.usage
1126
+ );
1127
+ }
1122
1128
  const { source, capability } = splitScraperId(scraperId);
1123
1129
  const input = options.input ? parseJsonObject(options.input, "input JSON") : fromFile.input;
1124
1130
  if (!input) throw new CliError("Provide input through --file or --input.", EXIT.usage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrappycoco/cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "CLI for Scrappycoco scraper discovery and execution",
5
5
  "type": "module",
6
6
  "bin": {