@scrappycoco/cli 0.2.0 → 0.2.1
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 +1 -2
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Discover, run, and compare scraper capabilities from a terminal or automation environment.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`npm view @scrappycoco/cli version`, then run:
|
|
5
|
+
Run the published package directly with `npx`:
|
|
7
6
|
|
|
8
7
|
```sh
|
|
9
8
|
npx @scrappycoco/cli auth login
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
5
|
+
import { readFileSync } from "fs";
|
|
5
6
|
import { Command, CommanderError, Option } from "commander";
|
|
6
7
|
|
|
7
8
|
// src/auth.ts
|
|
@@ -367,8 +368,11 @@ function errorPayload(error) {
|
|
|
367
368
|
}
|
|
368
369
|
|
|
369
370
|
// src/index.ts
|
|
371
|
+
var packageMetadata = JSON.parse(
|
|
372
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
|
373
|
+
);
|
|
370
374
|
var program = new Command();
|
|
371
|
-
program.name("scrappycoco").description("Discover, run, and compare scraper capabilities through one API").version(
|
|
375
|
+
program.name("scrappycoco").description("Discover, run, and compare scraper capabilities through one API").version(packageMetadata.version).option("--json", "emit machine-readable JSON to stdout").option("--api-url <url>", "API base URL", process.env.SCRAPPYCOCO_API_URL || "https://api.scrappycoco.ai").showHelpAfterError().exitOverride();
|
|
372
376
|
function globals(command) {
|
|
373
377
|
return command.optsWithGlobals();
|
|
374
378
|
}
|