polite-crawler 0.5.1 → 0.5.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/build/{browser-Cp5W-dmj.mjs → browser-DCd_d0oU.mjs} +2 -2
- package/build/{browser-Cp5W-dmj.mjs.map → browser-DCd_d0oU.mjs.map} +1 -1
- package/build/{cli-daemon-oSJWogkA.mjs → cli-daemon-DS9VW9TE.mjs} +2 -2
- package/build/{cli-daemon-oSJWogkA.mjs.map → cli-daemon-DS9VW9TE.mjs.map} +1 -1
- package/build/{cli-recipes-DVTMTQLx.mjs → cli-recipes-P-PWShTv.mjs} +2 -2
- package/build/{cli-recipes-DVTMTQLx.mjs.map → cli-recipes-P-PWShTv.mjs.map} +1 -1
- package/build/cli.mjs +8 -8
- package/build/{daemon-DNGSr4hR.mjs → daemon-BLROPytu.mjs} +4 -4
- package/build/{daemon-DNGSr4hR.mjs.map → daemon-BLROPytu.mjs.map} +1 -1
- package/build/{diff-ChsL3yux.mjs → diff-CIQKMarF.mjs} +2 -2
- package/build/{diff-ChsL3yux.mjs.map → diff-CIQKMarF.mjs.map} +1 -1
- package/build/{extract-DO-NFOmF.mjs → extract-D2YmrT0i.mjs} +2 -2
- package/build/{extract-DO-NFOmF.mjs.map → extract-D2YmrT0i.mjs.map} +1 -1
- package/build/index.d.mts +4 -1
- package/build/index.mjs +12 -12
- package/build/{open-DOgE033K.mjs → open-CzT5CxKp.mjs} +8 -8
- package/build/{open-DOgE033K.mjs.map → open-CzT5CxKp.mjs.map} +1 -1
- package/build/{recipe-BsGOZJyi.mjs → recipe-BEVepXSz.mjs} +3 -3
- package/build/{recipe-BsGOZJyi.mjs.map → recipe-BEVepXSz.mjs.map} +1 -1
- package/build/{recipe-product-DEDPKMY5.mjs → recipe-product-Dg65y6rc.mjs} +4 -4
- package/build/{recipe-product-DEDPKMY5.mjs.map → recipe-product-Dg65y6rc.mjs.map} +1 -1
- package/build/{render-CZaqvjQh.mjs → render-B0NrFDkJ.mjs} +8 -1
- package/build/render-B0NrFDkJ.mjs.map +1 -0
- package/build/{runtime-NyweI69B.mjs → runtime-ULMw0s6S.mjs} +3 -3
- package/build/{runtime-NyweI69B.mjs.map → runtime-ULMw0s6S.mjs.map} +1 -1
- package/build/{version-hVv3n9O6.mjs → version-LievpnIo.mjs} +2 -2
- package/build/{version-hVv3n9O6.mjs.map → version-LievpnIo.mjs.map} +1 -1
- package/build/{wacz-Blvh5qwS.mjs → wacz-NIMFWtd2.mjs} +3 -3
- package/build/{wacz-Blvh5qwS.mjs.map → wacz-NIMFWtd2.mjs.map} +1 -1
- package/build/{warc-DiE1M5le.mjs → warc-s2-0vLhN.mjs} +2 -2
- package/build/{warc-DiE1M5le.mjs.map → warc-s2-0vLhN.mjs.map} +1 -1
- package/package.json +1 -1
- package/build/render-CZaqvjQh.mjs.map +0 -1
package/build/index.d.mts
CHANGED
|
@@ -75,6 +75,9 @@ export declare class FileBlobStore implements BlobStore {
|
|
|
75
75
|
* - A wait until the visible text stops growing, with a limit. Playwright discourages
|
|
76
76
|
* `networkidle`. The text includes open shadow roots and the frames of the same origin.
|
|
77
77
|
* - One deadline for the whole render: the navigation, the wait and the reading of the page.
|
|
78
|
+
* - The page cannot leave its document while it is read. The route stops each later navigation of
|
|
79
|
+
* the page as aborted, and the browser then keeps the document. A page that navigates without
|
|
80
|
+
* end can otherwise replace the document before each read ends.
|
|
78
81
|
* - After a crash or a disconnection, the next page launches a new browser.
|
|
79
82
|
* - The browser closes after two idle minutes. An idle Chromium holds hundreds of megabytes, so
|
|
80
83
|
* it stays open only while pages need it. The open browser keeps the process alive, so a
|
|
@@ -3569,7 +3572,7 @@ export declare class WatchStore {
|
|
|
3569
3572
|
*/
|
|
3570
3573
|
export declare const runWatch: (runtime: CrawlRuntime, source: WatchStore | (() => Promise<WatchStore>), options?: WatchRunnerOptions) => WatchRun;
|
|
3571
3574
|
/** This is the version of the package. A test makes sure that it agrees with `package.json`. */
|
|
3572
|
-
export declare const VERSION = "0.5.
|
|
3575
|
+
export declare const VERSION = "0.5.2";
|
|
3573
3576
|
/** This is the product token that robots.txt rules match when an application gives no token. */
|
|
3574
3577
|
export declare const DEFAULT_TOKEN = "PoliteCrawler";
|
|
3575
3578
|
/** This page tells a site owner what the crawler is and how to control it. */
|
package/build/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { n as FileBlobStore, t as CaptureLog } from "./log-CB5bADmd.mjs";
|
|
2
|
-
import { t as browserMissing } from "./browser-
|
|
3
|
-
import { c as startDaemon, i as daemonStateFile, n as DAEMON_STATE_SCHEMA, o as readDaemonState, r as changeCommand, s as scheduleWatches, t as DAEMON_DEFAULTS } from "./daemon-
|
|
4
|
-
import { A as DEADLINE_NOTE, F as EgressRefused, I as egressLookup, M as makeRecord, O as CAPTURE_SCHEMA, S as readPdf, T as locate, _ as archivedDocId, a as fetchPage, c as isHeldBack, d as recordOverride, f as reindex, h as archiveExtractor, i as fetchAndIndex, j as DEFAULT_SECRET_PARAMS, k as Crawler, l as isoTime, m as versionAtTime, n as HELD_BACK, o as findDocuments, p as verifyQuote, r as catchUpIndex, s as heldBackMeta, t as Extractors, u as readDocument, x as isPdf } from "./runtime-
|
|
5
|
-
import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-
|
|
6
|
-
import { A as NO_EMBEDDER, C as DISCOVER_LIMITS, D as readSitemap, E as feedDate, O as DocIndex, S as crawlSite, T as SITEMAP_LIMITS, _ as estimateTokens, b as SqliteHostStateStore, c as WatchStore, d as VectorStore, f as createHybridSearch, g as chunkTokensOf, h as chunkText, i as openCrawler, k as FAST_RANK_SHARE, l as runWatch, m as HYBRID_DEFAULTS, n as defaultUserAgent, o as WATCH_LIMITS, p as CHUNK_LIMITS, r as isMailbox, s as WATCH_SCHEMA, t as createRuntime, u as VECTORS_SCHEMA, v as fuseRanks, w as discoverSite, x as CRAWL_LIMITS, y as unitVector } from "./open-
|
|
2
|
+
import { t as browserMissing } from "./browser-DCd_d0oU.mjs";
|
|
3
|
+
import { c as startDaemon, i as daemonStateFile, n as DAEMON_STATE_SCHEMA, o as readDaemonState, r as changeCommand, s as scheduleWatches, t as DAEMON_DEFAULTS } from "./daemon-BLROPytu.mjs";
|
|
4
|
+
import { A as DEADLINE_NOTE, F as EgressRefused, I as egressLookup, M as makeRecord, O as CAPTURE_SCHEMA, S as readPdf, T as locate, _ as archivedDocId, a as fetchPage, c as isHeldBack, d as recordOverride, f as reindex, h as archiveExtractor, i as fetchAndIndex, j as DEFAULT_SECRET_PARAMS, k as Crawler, l as isoTime, m as versionAtTime, n as HELD_BACK, o as findDocuments, p as verifyQuote, r as catchUpIndex, s as heldBackMeta, t as Extractors, u as readDocument, x as isPdf } from "./runtime-ULMw0s6S.mjs";
|
|
5
|
+
import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-CIQKMarF.mjs";
|
|
6
|
+
import { A as NO_EMBEDDER, C as DISCOVER_LIMITS, D as readSitemap, E as feedDate, O as DocIndex, S as crawlSite, T as SITEMAP_LIMITS, _ as estimateTokens, b as SqliteHostStateStore, c as WatchStore, d as VectorStore, f as createHybridSearch, g as chunkTokensOf, h as chunkText, i as openCrawler, k as FAST_RANK_SHARE, l as runWatch, m as HYBRID_DEFAULTS, n as defaultUserAgent, o as WATCH_LIMITS, p as CHUNK_LIMITS, r as isMailbox, s as WATCH_SCHEMA, t as createRuntime, u as VECTORS_SCHEMA, v as fuseRanks, w as discoverSite, x as CRAWL_LIMITS, y as unitVector } from "./open-CzT5CxKp.mjs";
|
|
7
7
|
import { i as ollamaEmbedder, n as OLLAMA_MODELS, r as isLoopback, t as NO_OLLAMA } from "./ollama-BDZjLDOK.mjs";
|
|
8
8
|
import { n as TRANSFORMERS_MODELS, r as transformersEmbedder, t as NO_TRANSFORMERS } from "./transformers-C_ziG8yf.mjs";
|
|
9
|
-
import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-
|
|
9
|
+
import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-D2YmrT0i.mjs";
|
|
10
10
|
import { DAYS, compareHours, describeWeek, disagreements, fromCompact, fromSchemaOrg, fromText, toHoursWeek } from "./hours.mjs";
|
|
11
11
|
import { a as bodyEncoding, o as decodeBody, r as typesOf, t as extractPage } from "./html-CawWTgMQ.mjs";
|
|
12
12
|
import { DEFAULT_POLICY, MemoryHostStateStore, VALIDATOR_MEMO, nextValidatorMemo, realClock } from "./politeness.mjs";
|
|
13
|
-
import { a as readJson, i as defineRecipe, n as RESERVED_RECIPES, o as registerRecipe, s as runRecipe, t as RECIPE_LIMITS } from "./recipe-
|
|
14
|
-
import { a as readAmount, c as locationMatches, d as readVenue, f as venueReadingsOf, i as productOf, l as namesVenue, n as pickProduct, o as readProduct, r as pickVariant, s as VENUE_LIMITS, t as PRODUCT_LIMITS, u as rankHoursLinks } from "./recipe-product-
|
|
15
|
-
import { n as RenderRefused, r as playwrightRenderer, t as NO_PLAYWRIGHT } from "./render-
|
|
13
|
+
import { a as readJson, i as defineRecipe, n as RESERVED_RECIPES, o as registerRecipe, s as runRecipe, t as RECIPE_LIMITS } from "./recipe-BEVepXSz.mjs";
|
|
14
|
+
import { a as readAmount, c as locationMatches, d as readVenue, f as venueReadingsOf, i as productOf, l as namesVenue, n as pickProduct, o as readProduct, r as pickVariant, s as VENUE_LIMITS, t as PRODUCT_LIMITS, u as rankHoursLinks } from "./recipe-product-Dg65y6rc.mjs";
|
|
15
|
+
import { n as RenderRefused, r as playwrightRenderer, t as NO_PLAYWRIGHT } from "./render-B0NrFDkJ.mjs";
|
|
16
16
|
import { ALLOW_ALL, decide, parseRobots } from "./robots.mjs";
|
|
17
17
|
import { cacheKeyOf, canonicalUrl, siteOf } from "./urls.mjs";
|
|
18
|
-
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-
|
|
18
|
+
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-LievpnIo.mjs";
|
|
19
19
|
import { i as keyDirectory, n as KEY_DIRECTORY_TYPE, o as verifySignature, r as createWebBotAuthSigner, t as KEY_DIRECTORY_PATH } from "./webbotauth-W3GXY3dy.mjs";
|
|
20
|
-
import { t as exportWacz } from "./wacz-
|
|
21
|
-
import { n as exportWarc } from "./warc-
|
|
20
|
+
import { t as exportWacz } from "./wacz-NIMFWtd2.mjs";
|
|
21
|
+
import { n as exportWarc } from "./warc-s2-0vLhN.mjs";
|
|
22
22
|
export { ALLOW_ALL, BOT_PAGE, CAPTURE_SCHEMA, CHUNK_LIMITS, CRAWL_LIMITS, CaptureLog, Crawler, DAEMON_DEFAULTS, DAEMON_STATE_SCHEMA, DAYS, DEADLINE_NOTE, DEFAULT_POLICY, DEFAULT_SECRET_PARAMS, DEFAULT_TOKEN, DIFF_LIMITS, DISCOVER_LIMITS, DocIndex, EgressRefused, Extractors, FAST_RANK_SHARE, FIELD_KINDS, FileBlobStore, HELD_BACK, HYBRID_DEFAULTS, KEY_DIRECTORY_PATH, KEY_DIRECTORY_TYPE, MemoryHostStateStore, NO_EMBEDDER, NO_OLLAMA, NO_PLAYWRIGHT, NO_TRANSFORMERS, OLLAMA_MODELS, PRODUCT_LIMITS, RECIPE_LIMITS, RESERVED_RECIPES, RenderRefused, SITEMAP_LIMITS, SqliteHostStateStore, TRANSFORMERS_MODELS, VALIDATOR_MEMO, VECTORS_SCHEMA, VENUE_LIMITS, VERSION, VectorStore, WATCH_LIMITS, WATCH_SCHEMA, WatchStore, archiveExtractor, archivedDocId, bodyEncoding, browserMissing, cacheKeyOf, canonicalUrl, catchUpIndex, changeCommand, checkFields, chunkText, chunkTokensOf, compareHours, crawlSite, createHybridSearch, createRuntime, createWebBotAuthSigner, daemonStateFile, decide, decodeBody, defaultUserAgent, defineRecipe, describeWeek, diffDocument, diffTexts, disagreements, discoverSite, durationMs, egressLookup, estimateTokens, exportWacz, exportWarc, extractDocument, extractPage, feedDate, fetchAndIndex, fetchPage, findDocuments, formatDiff, fromCompact, fromSchemaOrg, fromText, fuseRanks, heldBackMeta, isHeldBack, isLoopback, isMailbox, isPdf, isoTime, keyDirectory, locate, locationMatches, makeRecord, namesVenue, nextValidatorMemo, ollamaEmbedder, openCrawler, parseRobots, pickProduct, pickVariant, playwrightRenderer, productOf, rankHoursLinks, readAmount, readDaemonState, readDocument, readJson, readPdf, readProduct, readSitemap, readVenue, realClock, recordOverride, registerRecipe, reindex, runRecipe, runWatch, scheduleWatches, siteOf, startDaemon, toHoursWeek, transformersEmbedder, typesOf, unitVector, venueReadingsOf, verifyQuote, verifySignature, versionAtTime };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.mjs";
|
|
2
|
-
import { r as checkedRenderer } from "./browser-
|
|
3
|
-
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-
|
|
2
|
+
import { r as checkedRenderer } from "./browser-DCd_d0oU.mjs";
|
|
3
|
+
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-LievpnIo.mjs";
|
|
4
4
|
import { n as FileBlobStore, t as CaptureLog } from "./log-CB5bADmd.mjs";
|
|
5
|
-
import { A as DEADLINE_NOTE, C as fold, D as snippetOf, E as parseQuery, N as sha256$1, P as stableStringify, a as fetchPage, c as isHeldBack, f as reindex, i as fetchAndIndex, k as Crawler, l as isoTime, o as findDocuments, p as verifyQuote, r as catchUpIndex, t as Extractors, u as readDocument, y as archivedOf } from "./runtime-
|
|
6
|
-
import { n as diffDocument, r as diffTexts } from "./diff-
|
|
5
|
+
import { A as DEADLINE_NOTE, C as fold, D as snippetOf, E as parseQuery, N as sha256$1, P as stableStringify, a as fetchPage, c as isHeldBack, f as reindex, i as fetchAndIndex, k as Crawler, l as isoTime, o as findDocuments, p as verifyQuote, r as catchUpIndex, t as Extractors, u as readDocument, y as archivedOf } from "./runtime-ULMw0s6S.mjs";
|
|
6
|
+
import { n as diffDocument, r as diffTexts } from "./diff-CIQKMarF.mjs";
|
|
7
7
|
import { o as decodeBody, t as extractPage } from "./html-CawWTgMQ.mjs";
|
|
8
8
|
import { cacheKeyOf, canonicalUrl, scopeTest } from "./urls.mjs";
|
|
9
|
-
import { r as extractDocument } from "./extract-
|
|
9
|
+
import { r as extractDocument } from "./extract-D2YmrT0i.mjs";
|
|
10
10
|
import { matchesPattern } from "./robots.mjs";
|
|
11
11
|
import { MemoryHostStateStore, nextValidatorMemo, realClock } from "./politeness.mjs";
|
|
12
|
-
import { r as playwrightRenderer } from "./render-
|
|
13
|
-
import { o as registerRecipe } from "./recipe-
|
|
12
|
+
import { r as playwrightRenderer } from "./render-B0NrFDkJ.mjs";
|
|
13
|
+
import { o as registerRecipe } from "./recipe-BEVepXSz.mjs";
|
|
14
14
|
import { createHash, randomUUID } from "node:crypto";
|
|
15
15
|
import { dirname, join } from "node:path";
|
|
16
16
|
import { existsSync, lstatSync, mkdirSync, realpathSync, statSync } from "node:fs";
|
|
@@ -4339,4 +4339,4 @@ const openCrawler = (options) => {
|
|
|
4339
4339
|
};
|
|
4340
4340
|
export { NO_EMBEDDER as A, DISCOVER_LIMITS as C, readSitemap as D, feedDate as E, DocIndex as O, crawlSite as S, SITEMAP_LIMITS as T, estimateTokens as _, open_exports as a, SqliteHostStateStore as b, WatchStore as c, VectorStore as d, createHybridSearch as f, chunkTokensOf as g, chunkText as h, openCrawler as i, FAST_RANK_SHARE as k, runWatch as l, HYBRID_DEFAULTS as m, defaultUserAgent as n, WATCH_LIMITS as o, CHUNK_LIMITS as p, isMailbox as r, WATCH_SCHEMA as s, createRuntime as t, VECTORS_SCHEMA as u, fuseRanks as v, discoverSite as w, CRAWL_LIMITS as x, unitVector as y };
|
|
4341
4341
|
|
|
4342
|
-
//# sourceMappingURL=open-
|
|
4342
|
+
//# sourceMappingURL=open-CzT5CxKp.mjs.map
|