polite-crawler 0.7.0 → 0.7.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.
Files changed (31) hide show
  1. package/build/{cli-daemon-Bke7kU1e.mjs → cli-daemon-CZ-vmYE1.mjs} +2 -2
  2. package/build/{cli-daemon-Bke7kU1e.mjs.map → cli-daemon-CZ-vmYE1.mjs.map} +1 -1
  3. package/build/{cli-recipes-CUFd9ORK.mjs → cli-recipes-CkbbzByr.mjs} +2 -2
  4. package/build/{cli-recipes-CUFd9ORK.mjs.map → cli-recipes-CkbbzByr.mjs.map} +1 -1
  5. package/build/cli.mjs +7 -7
  6. package/build/{daemon-Dh32XlZq.mjs → daemon-IZ91wnyJ.mjs} +3 -3
  7. package/build/{daemon-Dh32XlZq.mjs.map → daemon-IZ91wnyJ.mjs.map} +1 -1
  8. package/build/{diff-ZEIt8xv3.mjs → diff-BYzp68Pl.mjs} +2 -2
  9. package/build/{diff-ZEIt8xv3.mjs.map → diff-BYzp68Pl.mjs.map} +1 -1
  10. package/build/{extract-B_Tsv1UC.mjs → extract-D2VKh3He.mjs} +2 -2
  11. package/build/{extract-B_Tsv1UC.mjs.map → extract-D2VKh3He.mjs.map} +1 -1
  12. package/build/index.d.mts +7 -3
  13. package/build/index.mjs +10 -10
  14. package/build/{open-Dx1gCR6l.mjs → open-ChtVn0WK.mjs} +86 -900
  15. package/build/open-ChtVn0WK.mjs.map +1 -0
  16. package/build/{recipe-BO3V_1Kr.mjs → recipe-BweJp7jV.mjs} +3 -3
  17. package/build/{recipe-BO3V_1Kr.mjs.map → recipe-BweJp7jV.mjs.map} +1 -1
  18. package/build/{recipe-product-BOQMCTGh.mjs → recipe-product-Dj-SHWXm.mjs} +35 -8
  19. package/build/recipe-product-Dj-SHWXm.mjs.map +1 -0
  20. package/build/{runtime-BVC7iOG4.mjs → runtime-CM4YRvnW.mjs} +803 -16
  21. package/build/runtime-CM4YRvnW.mjs.map +1 -0
  22. package/build/{version-DxUGcHQr.mjs → version-GyHkLzZY.mjs} +2 -2
  23. package/build/{version-DxUGcHQr.mjs.map → version-GyHkLzZY.mjs.map} +1 -1
  24. package/build/{wacz-DjgklRod.mjs → wacz-Cwfn0sH4.mjs} +3 -3
  25. package/build/{wacz-DjgklRod.mjs.map → wacz-Cwfn0sH4.mjs.map} +1 -1
  26. package/build/{warc-CgkNdXyG.mjs → warc-6-zIJFSL.mjs} +2 -2
  27. package/build/{warc-CgkNdXyG.mjs.map → warc-6-zIJFSL.mjs.map} +1 -1
  28. package/package.json +2 -2
  29. package/build/open-Dx1gCR6l.mjs.map +0 -1
  30. package/build/recipe-product-BOQMCTGh.mjs.map +0 -1
  31. package/build/runtime-BVC7iOG4.mjs.map +0 -1
package/build/index.d.mts CHANGED
@@ -1150,7 +1150,8 @@ export declare class DocIndex implements ReadingIndex {
1150
1150
  private stmt;
1151
1151
  /**
1152
1152
  * This method does a write in one transaction. A transaction in progress takes the write in,
1153
- * also a transaction that the caller opened on the connection.
1153
+ * also a transaction that the caller opened on the connection. The write is then a savepoint of
1154
+ * that transaction.
1154
1155
  */
1155
1156
  private write;
1156
1157
  private generation;
@@ -3229,7 +3230,10 @@ export declare const runRecipe: <Input>(target: RecipeTarget, recipe: Recipe<Inp
3229
3230
  *
3230
3231
  * A scheduler of the operator starts `watch.run`, or the daemon (`startDaemon`) starts it on a schedule.
3231
3232
  */
3232
- /** This value is the version of the schema of `watch.sqlite`. */
3233
+ /**
3234
+ * This value is the version of the schema of `watch.sqlite` (`PRAGMA user_version`): the count of the
3235
+ * steps of the schema. A file of a later version keeps its number, and the store works on it.
3236
+ */
3233
3237
  export declare const WATCH_SCHEMA = 1;
3234
3238
  /** These are the defaults and the limits of the watch list. */
3235
3239
  export declare const WATCH_LIMITS: {
@@ -3573,7 +3577,7 @@ export declare class WatchStore {
3573
3577
  */
3574
3578
  export declare const runWatch: (runtime: CrawlRuntime, source: WatchStore | (() => Promise<WatchStore>), options?: WatchRunnerOptions) => WatchRun;
3575
3579
  /** This is the version of the package. A test makes sure that it agrees with `package.json`. */
3576
- export declare const VERSION = "0.7.0";
3580
+ export declare const VERSION = "0.7.1";
3577
3581
  /** This is the product token that robots.txt rules match when an application gives no token. */
3578
3582
  export declare const DEFAULT_TOKEN = "PoliteCrawler";
3579
3583
  /** This page tells a site owner what the crawler is and how to control it. */
package/build/index.mjs CHANGED
@@ -1,23 +1,23 @@
1
1
  import { n as FileBlobStore, t as CaptureLog } from "./log-CB5bADmd.mjs";
2
2
  import { t as browserMissing } from "./browser-C_dFMvO3.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-Dh32XlZq.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-BVC7iOG4.mjs";
5
- import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-ZEIt8xv3.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-Dx1gCR6l.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-IZ91wnyJ.mjs";
4
+ import { C as DocIndex, F as makeRecord, M as Crawler, N as DEADLINE_NOTE, O as locate, P as DEFAULT_SECRET_PARAMS, R as EgressRefused, S as readPdf, T as NO_EMBEDDER, _ as archivedDocId, a as fetchPage, c as isHeldBack, d as recordOverride, f as reindex, h as archiveExtractor, i as fetchAndIndex, j as CAPTURE_SCHEMA, 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, w as FAST_RANK_SHARE, x as isPdf, z as egressLookup } from "./runtime-CM4YRvnW.mjs";
5
+ import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-BYzp68Pl.mjs";
6
+ import { C as DISCOVER_LIMITS, D as readSitemap, E as feedDate, 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, 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-ChtVn0WK.mjs";
7
7
  import { i as ollamaEmbedder, n as OLLAMA_MODELS, r as isLoopback, t as NO_OLLAMA } from "./ollama-B7eNmGhl.mjs";
8
8
  import { n as TRANSFORMERS_MODELS, r as transformersEmbedder, t as NO_TRANSFORMERS } from "./transformers-Cb-KaPge.mjs";
9
- import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-B_Tsv1UC.mjs";
9
+ import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-D2VKh3He.mjs";
10
10
  import { DAYS, compareHours, describeWeek, disagreements, fromCompact, fromSchemaOrg, fromText, toHoursWeek } from "./hours.mjs";
11
11
  import { extractPage, typesOf } from "./html.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-BO3V_1Kr.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-BOQMCTGh.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-BweJp7jV.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-Dj-SHWXm.mjs";
15
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 { bodyEncoding, decodeBody } from "./text.mjs";
18
18
  import { cacheKeyOf, canonicalUrl, siteOf } from "./urls.mjs";
19
- import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-DxUGcHQr.mjs";
19
+ import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-GyHkLzZY.mjs";
20
20
  import { i as keyDirectory, n as KEY_DIRECTORY_TYPE, o as verifySignature, r as createWebBotAuthSigner, t as KEY_DIRECTORY_PATH } from "./webbotauth-DbiWmibz.mjs";
21
- import { t as exportWacz } from "./wacz-DjgklRod.mjs";
22
- import { n as exportWarc } from "./warc-CgkNdXyG.mjs";
21
+ import { t as exportWacz } from "./wacz-Cwfn0sH4.mjs";
22
+ import { n as exportWarc } from "./warc-6-zIJFSL.mjs";
23
23
  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 };