@braedenbuilds/crawl-sim 1.3.0 → 1.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@braedenbuilds/crawl-sim",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Agent-native multi-bot web crawler simulator. See your site through the eyes of Googlebot, GPTBot, ClaudeBot, and PerplexityBot.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"crawl-sim": "bin/install.js"
|
|
@@ -73,9 +73,14 @@ page_type_for_url() {
|
|
|
73
73
|
|
|
74
74
|
# Fetch a URL to a local file and return the HTTP status code on stdout.
|
|
75
75
|
# Usage: status=$(fetch_to_file <url> <output-file> [timeout-seconds])
|
|
76
|
+
# Retries once on transient failure (same SSL/DNS flake that caused #11).
|
|
76
77
|
fetch_to_file() {
|
|
77
78
|
local url="$1"
|
|
78
79
|
local out="$2"
|
|
79
80
|
local timeout="${3:-15}"
|
|
80
|
-
|
|
81
|
+
local status
|
|
82
|
+
status=$(curl -sS -L -o "$out" -w '%{http_code}' --max-time "$timeout" "$url" 2>/dev/null) && echo "$status" && return
|
|
83
|
+
# Retry once on transient failure
|
|
84
|
+
status=$(curl -sS -L -o "$out" -w '%{http_code}' --max-time "$timeout" "$url" 2>/dev/null) && echo "$status" && return
|
|
85
|
+
echo "000"
|
|
81
86
|
}
|
|
@@ -547,13 +547,13 @@ for bot_id in $BOTS; do
|
|
|
547
547
|
|
|
548
548
|
# --- Category 5: AI Readiness (0-100) ---
|
|
549
549
|
AI=0
|
|
550
|
-
# Batch-read llmstxt fields (
|
|
550
|
+
# Batch-read llmstxt fields — use top-level exists (M1) which covers both variants
|
|
551
551
|
read -r LLMS_EXISTS LLMS_HAS_TITLE LLMS_HAS_DESC LLMS_URLS <<< \
|
|
552
552
|
"$(jq -r '[
|
|
553
|
-
(.llmsTxt.exists
|
|
554
|
-
(.llmsTxt.hasTitle // false | tostring),
|
|
555
|
-
(.llmsTxt.hasDescription // false | tostring),
|
|
556
|
-
(.llmsTxt.urlCount // 0)
|
|
553
|
+
(.exists // (.llmsTxt.exists or .llmsFullTxt.exists) | tostring),
|
|
554
|
+
((.llmsTxt.hasTitle // .llmsFullTxt.hasTitle // false) | tostring),
|
|
555
|
+
((.llmsTxt.hasDescription // .llmsFullTxt.hasDescription // false) | tostring),
|
|
556
|
+
((.llmsTxt.urlCount // 0) + (.llmsFullTxt.urlCount // 0))
|
|
557
557
|
] | @tsv' "$LLMSTXT_FILE" 2>/dev/null || echo "false false false 0")"
|
|
558
558
|
|
|
559
559
|
if [ "$LLMS_EXISTS" = "true" ]; then
|