polite-crawler 0.2.1 → 0.2.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/{cli-daemon-40TxewuH.mjs → cli-daemon-DkqyVxAI.mjs} +2 -2
- package/build/{cli-daemon-40TxewuH.mjs.map → cli-daemon-DkqyVxAI.mjs.map} +1 -1
- package/build/{cli-recipes-COyH6wo4.mjs → cli-recipes-D96ppgSX.mjs} +2 -2
- package/build/{cli-recipes-COyH6wo4.mjs.map → cli-recipes-D96ppgSX.mjs.map} +1 -1
- package/build/cli.mjs +7 -7
- package/build/{daemon-Cm6Mb8EE.mjs → daemon-Bu1wpAwl.mjs} +3 -3
- package/build/{daemon-Cm6Mb8EE.mjs.map → daemon-Bu1wpAwl.mjs.map} +1 -1
- package/build/{diff-ByOuHmq-.mjs → diff-Dyzr2-Oi.mjs} +2 -2
- package/build/{diff-ByOuHmq-.mjs.map → diff-Dyzr2-Oi.mjs.map} +1 -1
- package/build/{extract-Ccgs1ERp.mjs → extract-DCClsy1y.mjs} +2 -2
- package/build/{extract-Ccgs1ERp.mjs.map → extract-DCClsy1y.mjs.map} +1 -1
- package/build/index.d.mts +1 -1
- package/build/index.mjs +10 -10
- package/build/{open-9oUXhGCK.mjs → open-DXTLJWhU.mjs} +10 -8
- package/build/open-DXTLJWhU.mjs.map +1 -0
- package/build/{recipe-BODo4plI.mjs → recipe-WTgRhbwY.mjs} +3 -3
- package/build/{recipe-BODo4plI.mjs.map → recipe-WTgRhbwY.mjs.map} +1 -1
- package/build/{recipe-product-BrDKmDXb.mjs → recipe-product-CuUlNx4_.mjs} +4 -4
- package/build/{recipe-product-BrDKmDXb.mjs.map → recipe-product-CuUlNx4_.mjs.map} +1 -1
- package/build/{runtime-z6x0pWSN.mjs → runtime-BwOZJ71n.mjs} +2 -2
- package/build/{runtime-z6x0pWSN.mjs.map → runtime-BwOZJ71n.mjs.map} +1 -1
- package/build/{version-cPnAph6k.mjs → version-CHqkjAh1.mjs} +2 -2
- package/build/{version-cPnAph6k.mjs.map → version-CHqkjAh1.mjs.map} +1 -1
- package/build/{wacz-Cog-hnVy.mjs → wacz-CBMk0bzI.mjs} +3 -3
- package/build/{wacz-Cog-hnVy.mjs.map → wacz-CBMk0bzI.mjs.map} +1 -1
- package/build/{warc-FLgjirrM.mjs → warc-D632nC5y.mjs} +2 -2
- package/build/{warc-FLgjirrM.mjs.map → warc-D632nC5y.mjs.map} +1 -1
- package/package.json +1 -1
- package/build/open-9oUXhGCK.mjs.map +0 -1
package/build/index.d.mts
CHANGED
|
@@ -3579,7 +3579,7 @@ export declare const runWatch: (runtime: CrawlRuntime, source: WatchStore | (()
|
|
|
3579
3579
|
//#endregion
|
|
3580
3580
|
//#region src/version.d.ts
|
|
3581
3581
|
/** This is the version of the package. A test makes sure that it agrees with `package.json`. */
|
|
3582
|
-
export declare const VERSION = "0.2.
|
|
3582
|
+
export declare const VERSION = "0.2.2";
|
|
3583
3583
|
/** This is the product token that robots.txt rules match when an application gives no token. */
|
|
3584
3584
|
export declare const DEFAULT_TOKEN = "PoliteCrawler";
|
|
3585
3585
|
/** This page tells a site owner what the crawler is and how to control it. */
|
package/build/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { n as FileBlobStore, t as CaptureLog } from "./log-CmBWcyQm.mjs";
|
|
2
2
|
import { n as RenderRefused, r as playwrightRenderer, t as NO_PLAYWRIGHT } from "./render-CKE2LILH.mjs";
|
|
3
3
|
import { t as browserMissing } from "./browser-56dBBLec.mjs";
|
|
4
|
-
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-
|
|
5
|
-
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-
|
|
4
|
+
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-CHqkjAh1.mjs";
|
|
5
|
+
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-BwOZJ71n.mjs";
|
|
6
6
|
import { DEFAULT_POLICY, MemoryHostStateStore, VALIDATOR_MEMO, nextValidatorMemo, realClock } from "./politeness.mjs";
|
|
7
7
|
import { ALLOW_ALL, decide, parseRobots } from "./robots.mjs";
|
|
8
8
|
import { i as keyDirectory, n as KEY_DIRECTORY_TYPE, o as verifySignature, r as createWebBotAuthSigner, t as KEY_DIRECTORY_PATH } from "./webbotauth-Dq_dA_u3.mjs";
|
|
9
|
-
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-
|
|
9
|
+
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-DXTLJWhU.mjs";
|
|
10
10
|
import { a as bodyEncoding, o as decodeBody, r as typesOf, t as extractPage } from "./html-DkQUAE_d.mjs";
|
|
11
|
-
import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-
|
|
12
|
-
import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-
|
|
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 { 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-
|
|
11
|
+
import { a as formatDiff, n as diffDocument, r as diffTexts, t as DIFF_LIMITS } from "./diff-Dyzr2-Oi.mjs";
|
|
12
|
+
import { n as checkFields, r as extractDocument, t as FIELD_KINDS } from "./extract-DCClsy1y.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-WTgRhbwY.mjs";
|
|
14
|
+
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-Bu1wpAwl.mjs";
|
|
15
15
|
import { i as ollamaEmbedder, n as OLLAMA_MODELS, r as isLoopback, t as NO_OLLAMA } from "./ollama-D1xRh3hY.mjs";
|
|
16
16
|
import { n as TRANSFORMERS_MODELS, r as transformersEmbedder, t as NO_TRANSFORMERS } from "./transformers-BNiuiLxT.mjs";
|
|
17
17
|
import { DAYS, compareHours, describeWeek, disagreements, fromCompact, fromSchemaOrg, fromText, toHoursWeek } from "./hours.mjs";
|
|
18
|
-
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-
|
|
19
|
-
import { t as exportWacz } from "./wacz-
|
|
20
|
-
import { n as exportWarc } from "./warc-
|
|
18
|
+
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-CuUlNx4_.mjs";
|
|
19
|
+
import { t as exportWacz } from "./wacz-CBMk0bzI.mjs";
|
|
20
|
+
import { n as exportWarc } from "./warc-D632nC5y.mjs";
|
|
21
21
|
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, 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, startDaemon, toHoursWeek, transformersEmbedder, typesOf, unitVector, venueReadingsOf, verifyQuote, verifySignature, versionAtTime };
|
|
@@ -2,15 +2,15 @@ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
|
2
2
|
import { n as FileBlobStore, t as CaptureLog } from "./log-CmBWcyQm.mjs";
|
|
3
3
|
import { r as playwrightRenderer } from "./render-CKE2LILH.mjs";
|
|
4
4
|
import { r as checkedRenderer } from "./browser-56dBBLec.mjs";
|
|
5
|
-
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-
|
|
6
|
-
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, o as findDocuments, p as verifyQuote, r as catchUpIndex, t as Extractors, u as readDocument, y as archivedOf } from "./runtime-
|
|
5
|
+
import { i as durationMs, n as DEFAULT_TOKEN, r as VERSION, t as BOT_PAGE } from "./version-CHqkjAh1.mjs";
|
|
6
|
+
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, o as findDocuments, p as verifyQuote, r as catchUpIndex, t as Extractors, u as readDocument, y as archivedOf } from "./runtime-BwOZJ71n.mjs";
|
|
7
7
|
import { MemoryHostStateStore, nextValidatorMemo, realClock } from "./politeness.mjs";
|
|
8
8
|
import { matchesPattern } from "./robots.mjs";
|
|
9
9
|
import { n as canonicalUrl, r as scopeTest, t as cacheKeyOf } from "./urls-BHFeSyEK.mjs";
|
|
10
10
|
import { o as decodeBody, t as extractPage } from "./html-DkQUAE_d.mjs";
|
|
11
|
-
import { n as diffDocument, r as diffTexts } from "./diff-
|
|
12
|
-
import { r as extractDocument } from "./extract-
|
|
13
|
-
import { o as registerRecipe } from "./recipe-
|
|
11
|
+
import { n as diffDocument, r as diffTexts } from "./diff-Dyzr2-Oi.mjs";
|
|
12
|
+
import { r as extractDocument } from "./extract-DCClsy1y.mjs";
|
|
13
|
+
import { o as registerRecipe } from "./recipe-WTgRhbwY.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";
|
|
@@ -2807,10 +2807,12 @@ const createHybridSearch = (runtime, options) => {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
const busy = working.get(sha);
|
|
2809
2809
|
if (busy !== void 0) {
|
|
2810
|
-
|
|
2810
|
+
const after = busy.then((made) => {
|
|
2811
2811
|
store.point(embedder.id, id, sha, now);
|
|
2812
2812
|
return made;
|
|
2813
|
-
})
|
|
2813
|
+
});
|
|
2814
|
+
after.catch(() => void 0);
|
|
2815
|
+
shared.push(after);
|
|
2814
2816
|
continue;
|
|
2815
2817
|
}
|
|
2816
2818
|
waiting.set(sha, {
|
|
@@ -4329,4 +4331,4 @@ const openCrawler = (options) => {
|
|
|
4329
4331
|
//#endregion
|
|
4330
4332
|
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 };
|
|
4331
4333
|
|
|
4332
|
-
//# sourceMappingURL=open-
|
|
4334
|
+
//# sourceMappingURL=open-DXTLJWhU.mjs.map
|