scavio 0.39.1 → 0.39.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 +5 -2
- package/dist/cli.js +14 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,8 +40,11 @@ same code, and click Approve. The CLI saves an API key named after your machine
|
|
|
40
40
|
macOS `~/.bash_profile`, fish `conf.d/scavio.fish`, or the Windows user
|
|
41
41
|
environment). Skip this with `--no-profile`.
|
|
42
42
|
|
|
43
|
-
Logging in again on the same machine reuses that machine's key.
|
|
44
|
-
|
|
43
|
+
Logging in again on the same machine reuses that machine's key. A program
|
|
44
|
+
cannot set variables in the shell that started it, so run `source ~/.zshrc`
|
|
45
|
+
(or your shell's file) or open a new terminal to use the key right away, and
|
|
46
|
+
restart any AI agent that was already running. `new Scavio()` reads
|
|
47
|
+
`SCAVIO_API_KEY`.
|
|
45
48
|
|
|
46
49
|
AI coding agents (Claude Code, Codex, Pi, Cursor and others) can run it for you.
|
|
47
50
|
When its output is not a terminal, `login` prints the link and exits at once so
|
package/dist/cli.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli/index.ts
|
|
4
4
|
import { spawn } from "child_process";
|
|
5
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
5
6
|
import { homedir as homedir3 } from "os";
|
|
6
7
|
|
|
7
8
|
// src/http.ts
|
|
8
9
|
var BASE_URL = "https://api.scavio.dev";
|
|
9
|
-
var SDK_VERSION = true ? "0.39.
|
|
10
|
+
var SDK_VERSION = true ? "0.39.2" : "0.0.0";
|
|
10
11
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
11
12
|
|
|
12
13
|
// src/cli/files.ts
|
|
@@ -310,7 +311,12 @@ async function finish(result, dir, args, baseUrl, out) {
|
|
|
310
311
|
out.log(` Key works${check.plan ? `: ${check.plan} plan` : ""}${typeof check.credits === "number" ? `, ${check.credits} credits` : ""}.`);
|
|
311
312
|
}
|
|
312
313
|
if (places.length) {
|
|
313
|
-
|
|
314
|
+
if (process.platform === "win32") {
|
|
315
|
+
out.log("Open a new terminal to use it (setx does not change the one you are in).");
|
|
316
|
+
} else {
|
|
317
|
+
out.log(`To use it in this terminal now, run: source ${places[0]}`);
|
|
318
|
+
}
|
|
319
|
+
out.log("Restart your AI agent so it picks up SCAVIO_API_KEY.");
|
|
314
320
|
} else {
|
|
315
321
|
out.log("SCAVIO_API_KEY was not exported; read the key from the saved file or set it yourself.");
|
|
316
322
|
}
|
|
@@ -401,7 +407,12 @@ async function status(out) {
|
|
|
401
407
|
return EXIT.error;
|
|
402
408
|
}
|
|
403
409
|
out.log(`Logged in via ${source}${check.plan ? `: ${check.plan} plan` : ""}${typeof check.credits === "number" ? `, ${check.credits} credits` : ""}.`);
|
|
404
|
-
if (!fromEnv)
|
|
410
|
+
if (!fromEnv) {
|
|
411
|
+
const t = process.platform === "win32" ? [] : profileTargets().filter((x) => existsSync3(x.path) && readFileSync3(x.path, "utf8").includes(MARKER));
|
|
412
|
+
out.log(
|
|
413
|
+
t.length ? `SCAVIO_API_KEY is not set in this shell yet: run source ${t[0].display}, or restart your agent.` : "SCAVIO_API_KEY is not set in this shell yet: open a new terminal or restart your agent."
|
|
414
|
+
);
|
|
415
|
+
}
|
|
405
416
|
return EXIT.ok;
|
|
406
417
|
}
|
|
407
418
|
function logout(out) {
|
package/dist/index.cjs
CHANGED
|
@@ -265,7 +265,7 @@ function parseRetryAfter(header) {
|
|
|
265
265
|
var BASE_URL = "https://api.scavio.dev";
|
|
266
266
|
var DEFAULT_TIMEOUT = 3e4;
|
|
267
267
|
var DEFAULT_MAX_RETRIES = 2;
|
|
268
|
-
var SDK_VERSION = true ? "0.39.
|
|
268
|
+
var SDK_VERSION = true ? "0.39.2" : "0.0.0";
|
|
269
269
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
270
270
|
function isServerRuntime() {
|
|
271
271
|
const g = globalThis;
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@ function parseRetryAfter(header) {
|
|
|
145
145
|
var BASE_URL = "https://api.scavio.dev";
|
|
146
146
|
var DEFAULT_TIMEOUT = 3e4;
|
|
147
147
|
var DEFAULT_MAX_RETRIES = 2;
|
|
148
|
-
var SDK_VERSION = true ? "0.39.
|
|
148
|
+
var SDK_VERSION = true ? "0.39.2" : "0.0.0";
|
|
149
149
|
var USER_AGENT = `scavio-js/${SDK_VERSION}`;
|
|
150
150
|
function isServerRuntime() {
|
|
151
151
|
const g = globalThis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scavio",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.2",
|
|
4
4
|
"description": "TypeScript SDK for the Scavio API — real-time structured web data across 61 platforms on one API key: Google SERP, ChatGPT, Gemini, Amazon, Walmart, Costco, Nordstrom, Nordstrom Rack, Lowe's, Sam's Club, Canadian Tire, Dollar General, Sephora, Ulta Beauty, ALDI, Micro Center, Walgreens, CVS, Whole Foods, Harbor Freight, PetSmart, Petco, iHerb, Chewy, Menards, HEB, Kroger, Mercado Libre, eBay, Zillow, Redfin, Realtor.com, Rightmove, Booking, Airbnb, Yelp, Trustpilot, Indeed, Glassdoor, G2, App Store, Google Play, SEC EDGAR, Google Ads and Meta Ad Library, YouTube, TikTok, Instagram, X, LinkedIn, Reddit and more, plus extract() to read any URL as clean Markdown and extract.map/crawl/batch to map, crawl and batch-extract whole websites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|