gscdump 5.2.0 → 5.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/dist/bing/client.d.mts +6 -0
- package/dist/bing/client.mjs +10 -3
- package/dist/bing/index.d.mts +2 -2
- package/dist/bing/index.mjs +2 -2
- package/dist/bing/types.d.mts +1 -0
- package/dist/indexnow.mjs +2 -2
- package/package.json +2 -2
package/dist/bing/client.d.mts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { BingWebmasterClient, BingWebmasterOptions } from "./types.mjs";
|
|
2
2
|
export declare const DEFAULT_BING_WEBMASTER_API_URL = "https://www.bing.com/webmaster/api.svc/json";
|
|
3
3
|
export declare const DEFAULT_BING_CHILD_PAGE_LIMIT = 100;
|
|
4
|
+
/**
|
|
5
|
+
* Bing's `ErrorCode` 17, `ThrottleIP`. Bing refuses every call from the caller's
|
|
6
|
+
* IP and answers with HTTP 400. Waiting does not lift the block, so a
|
|
7
|
+
* `Throttled` error with this code has no retry delay.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BING_THROTTLE_IP_ERROR_CODE = 17;
|
|
4
10
|
export declare function bingWebmaster(options: BingWebmasterOptions): BingWebmasterClient;
|
package/dist/bing/client.mjs
CHANGED
|
@@ -3,6 +3,12 @@ import { normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, no
|
|
|
3
3
|
const DEFAULT_BING_WEBMASTER_API_URL = "https://www.bing.com/webmaster/api.svc/json";
|
|
4
4
|
const DEFAULT_BING_API_KEY_URL = "https://ssl.bing.com/webmaster/api.svc/json";
|
|
5
5
|
const DEFAULT_BING_CHILD_PAGE_LIMIT = 100;
|
|
6
|
+
const BING_THROTTLE_IP_ERROR_CODE = 17;
|
|
7
|
+
const BING_THROTTLE_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
8
|
+
4,
|
|
9
|
+
5,
|
|
10
|
+
17
|
|
11
|
+
]);
|
|
6
12
|
const BING_MAX_CHILD_PAGE_COUNT = 65536;
|
|
7
13
|
function isRecord(value) {
|
|
8
14
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -28,10 +34,11 @@ function mapResponseError(response, payload, now) {
|
|
|
28
34
|
if (response.status === 401 || apiError.ErrorCode === 3) return { _tag: "AuthenticationRequired" };
|
|
29
35
|
if (apiError.ErrorCode === 6) return { _tag: "UserBlocked" };
|
|
30
36
|
if (response.status === 403 || apiError.ErrorCode === 14) return { _tag: "PermissionDenied" };
|
|
31
|
-
if (response.status === 429 || apiError.ErrorCode
|
|
32
|
-
const delay = retryAfterMs(response, now);
|
|
37
|
+
if (response.status === 429 || apiError.ErrorCode !== void 0 && BING_THROTTLE_ERROR_CODES.has(apiError.ErrorCode)) {
|
|
38
|
+
const delay = apiError.ErrorCode === 17 ? void 0 : retryAfterMs(response, now);
|
|
33
39
|
return {
|
|
34
40
|
_tag: "Throttled",
|
|
41
|
+
...apiError.ErrorCode === void 0 ? {} : { errorCode: apiError.ErrorCode },
|
|
35
42
|
...delay === void 0 ? {} : { retryAfterMs: delay }
|
|
36
43
|
};
|
|
37
44
|
}
|
|
@@ -258,4 +265,4 @@ function bingWebmaster(options) {
|
|
|
258
265
|
})
|
|
259
266
|
};
|
|
260
267
|
}
|
|
261
|
-
export { DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster };
|
|
268
|
+
export { BING_THROTTLE_IP_ERROR_CODE, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster };
|
package/dist/bing/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BingCallOptions, BingChildrenFilters, BingChildrenOptions, BingCrawlDateFilter, BingCrawlEvidence, BingCrawlIssue, BingCrawlIssueWire, BingCrawlStats, BingCrawlStatsWire, BingDiscoveredDateFilter, BingDocumentFilter, BingEvidenceError, BingFeed, BingFeedWire, BingFetch, BingHttpCodeFilter, BingIndexingEvidence, BingOperation, BingPageStats, BingProviderError, BingQueryStats, BingQueryStatsWire, BingRankAndTrafficStats, BingRankAndTrafficStatsWire, BingSite, BingSiteWire, BingUnknownEvidence, BingUnverifiedSite, BingUrlInfo, BingUrlInfoWire, BingUrlTrafficInfo, BingUrlTrafficInfoWire, BingUrlWithCrawlIssues, BingVerifiedSite, BingWebmasterClient, BingWebmasterOptions, BingWireResponse } from "./types.mjs";
|
|
2
|
-
import { DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster } from "./client.mjs";
|
|
2
|
+
import { BING_THROTTLE_IP_ERROR_CODE, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster } from "./client.mjs";
|
|
3
3
|
import { normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo } from "./normalize.mjs";
|
|
4
|
-
export { type BingCallOptions, type BingChildrenFilters, type BingChildrenOptions, type BingCrawlDateFilter, type BingCrawlEvidence, type BingCrawlIssue, type BingCrawlIssueWire, type BingCrawlStats, type BingCrawlStatsWire, type BingDiscoveredDateFilter, type BingDocumentFilter, type BingEvidenceError, type BingFeed, type BingFeedWire, type BingFetch, type BingHttpCodeFilter, type BingIndexingEvidence, type BingOperation, type BingPageStats, type BingProviderError, type BingQueryStats, type BingQueryStatsWire, type BingRankAndTrafficStats, type BingRankAndTrafficStatsWire, type BingSite, type BingSiteWire, type BingUnknownEvidence, type BingUnverifiedSite, type BingUrlInfo, type BingUrlInfoWire, type BingUrlTrafficInfo, type BingUrlTrafficInfoWire, type BingUrlWithCrawlIssues, type BingVerifiedSite, type BingWebmasterClient, type BingWebmasterOptions, type BingWireResponse, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster, normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo };
|
|
4
|
+
export { BING_THROTTLE_IP_ERROR_CODE, type BingCallOptions, type BingChildrenFilters, type BingChildrenOptions, type BingCrawlDateFilter, type BingCrawlEvidence, type BingCrawlIssue, type BingCrawlIssueWire, type BingCrawlStats, type BingCrawlStatsWire, type BingDiscoveredDateFilter, type BingDocumentFilter, type BingEvidenceError, type BingFeed, type BingFeedWire, type BingFetch, type BingHttpCodeFilter, type BingIndexingEvidence, type BingOperation, type BingPageStats, type BingProviderError, type BingQueryStats, type BingQueryStatsWire, type BingRankAndTrafficStats, type BingRankAndTrafficStatsWire, type BingSite, type BingSiteWire, type BingUnknownEvidence, type BingUnverifiedSite, type BingUrlInfo, type BingUrlInfoWire, type BingUrlTrafficInfo, type BingUrlTrafficInfoWire, type BingUrlWithCrawlIssues, type BingVerifiedSite, type BingWebmasterClient, type BingWebmasterOptions, type BingWireResponse, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster, normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo };
|
package/dist/bing/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo } from "./normalize.mjs";
|
|
2
|
-
import { DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster } from "./client.mjs";
|
|
3
|
-
export { DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster, normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo };
|
|
2
|
+
import { BING_THROTTLE_IP_ERROR_CODE, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster } from "./client.mjs";
|
|
3
|
+
export { BING_THROTTLE_IP_ERROR_CODE, DEFAULT_BING_CHILD_PAGE_LIMIT, DEFAULT_BING_WEBMASTER_API_URL, bingWebmaster, normalizeBingCrawlIssue, normalizeBingCrawlStats, normalizeBingFeed, normalizeBingIndexingEvidence, normalizeBingPageStats, normalizeBingQueryStats, normalizeBingRankAndTrafficStats, normalizeBingSite, normalizeBingUrlInfo, normalizeBingUrlTrafficInfo };
|
package/dist/bing/types.d.mts
CHANGED
package/dist/indexnow.mjs
CHANGED
|
@@ -23,7 +23,7 @@ function indexNow(options = {}) {
|
|
|
23
23
|
const parsed = parseInput(input);
|
|
24
24
|
if (!parsed.ok) return parsed;
|
|
25
25
|
const response = await fetch(input.keyLocation, {
|
|
26
|
-
redirect: "
|
|
26
|
+
redirect: "manual",
|
|
27
27
|
signal: AbortSignal.timeout(timeoutMs)
|
|
28
28
|
});
|
|
29
29
|
if (response.status !== 200) return ok({
|
|
@@ -78,7 +78,7 @@ function indexNow(options = {}) {
|
|
|
78
78
|
}
|
|
79
79
|
const response = await fetch("https://api.indexnow.org/indexnow", {
|
|
80
80
|
method: "POST",
|
|
81
|
-
redirect: "
|
|
81
|
+
redirect: "manual",
|
|
82
82
|
signal: AbortSignal.timeout(timeoutMs),
|
|
83
83
|
headers: { "content-type": "application/json; charset=utf-8" },
|
|
84
84
|
body: JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscdump",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.3.1",
|
|
5
5
|
"description": "Direct Google Search Console and Bing Webmaster clients with typed queries and Indexing Evidence",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"node": ">=22.13.0"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@gscdump/contracts": "^5.
|
|
121
|
+
"@gscdump/contracts": "^5.3.0",
|
|
122
122
|
"ofetch": "^1.5.1"
|
|
123
123
|
},
|
|
124
124
|
"scripts": {
|