@krawlup/cli 1.2.0 → 1.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/CHANGELOG.md +9 -0
- package/dist/entry.js +22 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ All notable changes to `@krawlup/cli` are documented here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/) and the package
|
|
5
5
|
uses [semantic versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 1.2.1 - 2026-11-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`--version` / `-v`** prints the CLI version and exits — read from
|
|
12
|
+
`package.json` at runtime, and the battery's User-Agent string
|
|
13
|
+
(`krawlup-cli/x.y.z`) now derives from the same source so the two can
|
|
14
|
+
never drift.
|
|
15
|
+
|
|
7
16
|
## 1.2.0 - 2026-11-03
|
|
8
17
|
|
|
9
18
|
### Added
|
package/dist/entry.js
CHANGED
|
@@ -41209,7 +41209,7 @@ import { join as join2 } from "node:path";
|
|
|
41209
41209
|
// package.json
|
|
41210
41210
|
var package_default = {
|
|
41211
41211
|
name: "@krawlup/cli",
|
|
41212
|
-
version: "1.2.
|
|
41212
|
+
version: "1.2.1",
|
|
41213
41213
|
description: "Official CLI for krawlup — manage products, insights and analytics from the terminal, with a free no-account site battery.",
|
|
41214
41214
|
license: "MIT",
|
|
41215
41215
|
author: "Nowshad Hossain Rahat",
|
|
@@ -45162,8 +45162,23 @@ function normalizeDomainArg(raw) {
|
|
|
45162
45162
|
// src/commands/local.ts
|
|
45163
45163
|
import { Resolver } from "node:dns/promises";
|
|
45164
45164
|
|
|
45165
|
+
// src/lib/version.ts
|
|
45166
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
45167
|
+
var require2 = createRequire2(import.meta.url);
|
|
45168
|
+
function readVersion() {
|
|
45169
|
+
for (const rel of ["../package.json", "../../package.json"]) {
|
|
45170
|
+
try {
|
|
45171
|
+
const pkg = require2(rel);
|
|
45172
|
+
if (typeof pkg?.version === "string" && pkg.version)
|
|
45173
|
+
return pkg.version;
|
|
45174
|
+
} catch {}
|
|
45175
|
+
}
|
|
45176
|
+
return "0.0.0";
|
|
45177
|
+
}
|
|
45178
|
+
var CLI_VERSION2 = readVersion();
|
|
45179
|
+
|
|
45165
45180
|
// src/checks/net.ts
|
|
45166
|
-
var KRAWLUP_CLI_UA =
|
|
45181
|
+
var KRAWLUP_CLI_UA = `Mozilla/5.0 (compatible; krawlup-cli/${CLI_VERSION2}; +https://krawlup.com/cli)`;
|
|
45167
45182
|
var GPTBOT_UA = "GPTBot/1.0 (+https://openai.com/gptbot)";
|
|
45168
45183
|
var DEFAULT_TIMEOUT_MS = 12000;
|
|
45169
45184
|
var DEFAULT_CAP_BYTES = 2000000;
|
|
@@ -48054,6 +48069,10 @@ var LOCAL_HELP_BLOCK = `
|
|
|
48054
48069
|
krawlup diff <url> snapshot a page; next run reports the drift
|
|
48055
48070
|
`;
|
|
48056
48071
|
var argv = process.argv.slice(2);
|
|
48072
|
+
if (argv.includes("--version") || argv.includes("-v")) {
|
|
48073
|
+
console.log(CLI_VERSION2);
|
|
48074
|
+
process.exit(0);
|
|
48075
|
+
}
|
|
48057
48076
|
var interactive = !!process.stdout.isTTY && !!process.stdin.isTTY && argv.length === 0;
|
|
48058
48077
|
function helpText(cfg) {
|
|
48059
48078
|
const allowance = scanAllowance(cfg);
|
|
@@ -48086,6 +48105,7 @@ function helpText(cfg) {
|
|
|
48086
48105
|
${LOCAL_HELP_BLOCK}
|
|
48087
48106
|
--json machine-readable output on data commands
|
|
48088
48107
|
--help, -h this page
|
|
48108
|
+
--version, -v print the version and exit
|
|
48089
48109
|
|
|
48090
48110
|
'krawlup report' needs no account: your device id (~/.krawlup/device-id)
|
|
48091
48111
|
carries the free quota — ${allowanceText(cfg)} — and every report read
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krawlup/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Official CLI for krawlup — manage products, insights and analytics from the terminal, with a free no-account site battery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nowshad Hossain Rahat",
|