polite-crawler 0.5.2 → 0.6.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/README.md +39 -0
- package/build/api.d.mts +288 -0
- package/build/api.mjs +203 -0
- package/build/api.mjs.map +1 -0
- package/build/{browser-DCd_d0oU.mjs → browser-C_dFMvO3.mjs} +2 -2
- package/build/{browser-DCd_d0oU.mjs.map → browser-C_dFMvO3.mjs.map} +1 -1
- package/build/classify.d.mts +1 -2
- package/build/{cli-daemon-DS9VW9TE.mjs → cli-daemon-DRI1tL5D.mjs} +2 -2
- package/build/{cli-daemon-DS9VW9TE.mjs.map → cli-daemon-DRI1tL5D.mjs.map} +1 -1
- package/build/{cli-recipes-P-PWShTv.mjs → cli-recipes-B1zg7et3.mjs} +2 -2
- package/build/{cli-recipes-P-PWShTv.mjs.map → cli-recipes-B1zg7et3.mjs.map} +1 -1
- package/build/cli.mjs +19 -19
- package/build/cli.mjs.map +1 -1
- package/build/{daemon-BLROPytu.mjs → daemon-l6FPe6lD.mjs} +5 -5
- package/build/{daemon-BLROPytu.mjs.map → daemon-l6FPe6lD.mjs.map} +1 -1
- package/build/{diff-CIQKMarF.mjs → diff-CSNW27zD.mjs} +3 -3
- package/build/{diff-CIQKMarF.mjs.map → diff-CSNW27zD.mjs.map} +1 -1
- package/build/{extract-D2YmrT0i.mjs → extract-Bn0ueYEx.mjs} +3 -3
- package/build/{extract-D2YmrT0i.mjs.map → extract-Bn0ueYEx.mjs.map} +1 -1
- package/build/hours.d.mts +1 -2
- package/build/hours.mjs +1 -1
- package/build/hours.mjs.map +1 -1
- package/build/html-oS_ueu9U.d.mts +1 -2
- package/build/index.d.mts +2 -3
- package/build/index.mjs +14 -14
- package/build/log-CB5bADmd.mjs.map +1 -1
- package/build/{ollama-BDZjLDOK.mjs → ollama-B7eNmGhl.mjs} +2 -2
- package/build/{ollama-BDZjLDOK.mjs.map → ollama-B7eNmGhl.mjs.map} +1 -1
- package/build/{open-CzT5CxKp.mjs → open-Cq2hknsi.mjs} +11 -11
- package/build/{open-CzT5CxKp.mjs.map → open-Cq2hknsi.mjs.map} +1 -1
- package/build/politeness.d.mts +1 -2
- package/build/politeness.mjs.map +1 -1
- package/build/reaction-BWTIe95J.mjs +82 -0
- package/build/reaction-BWTIe95J.mjs.map +1 -0
- package/build/{recipe-BEVepXSz.mjs → recipe-Bcp8MCvO.mjs} +3 -3
- package/build/{recipe-BEVepXSz.mjs.map → recipe-Bcp8MCvO.mjs.map} +1 -1
- package/build/{recipe-product-Dg65y6rc.mjs → recipe-product-DE-yzyXS.mjs} +4 -4
- package/build/{recipe-product-Dg65y6rc.mjs.map → recipe-product-DE-yzyXS.mjs.map} +1 -1
- package/build/render-B0NrFDkJ.mjs.map +1 -1
- package/build/robots.d.mts +1 -2
- package/build/rolldown-runtime-D3KUYPsf.mjs +12 -0
- package/build/{runtime-ULMw0s6S.mjs → runtime-Cn_acsHC.mjs} +30 -46
- package/build/runtime-Cn_acsHC.mjs.map +1 -0
- package/build/signals.d.mts +1 -2
- package/build/{transformers-C_ziG8yf.mjs → transformers-Cb-KaPge.mjs} +2 -2
- package/build/{transformers-C_ziG8yf.mjs.map → transformers-Cb-KaPge.mjs.map} +1 -1
- package/build/urls.d.mts +1 -2
- package/build/{version-LievpnIo.mjs → version-BwsBOkFU.mjs} +2 -2
- package/build/{version-LievpnIo.mjs.map → version-BwsBOkFU.mjs.map} +1 -1
- package/build/{wacz-NIMFWtd2.mjs → wacz-BkeG0_Pn.mjs} +4 -4
- package/build/{wacz-NIMFWtd2.mjs.map → wacz-BkeG0_Pn.mjs.map} +1 -1
- package/build/{warc-s2-0vLhN.mjs → warc-BPYg_Nzp.mjs} +3 -3
- package/build/{warc-s2-0vLhN.mjs.map → warc-BPYg_Nzp.mjs.map} +1 -1
- package/build/{webbotauth-W3GXY3dy.mjs → webbotauth-DbiWmibz.mjs} +2 -2
- package/build/{webbotauth-W3GXY3dy.mjs.map → webbotauth-DbiWmibz.mjs.map} +1 -1
- package/package.json +6 -2
- package/build/rolldown-runtime-BJohB4LM.mjs +0 -13
- package/build/runtime-ULMw0s6S.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-daemon-
|
|
1
|
+
{"version":3,"file":"cli-daemon-DRI1tL5D.mjs","names":[],"sources":["../src/cli-daemon.ts"],"sourcesContent":["/*\n * The command `daemon` of the command line: `daemon` runs the daemon until `SIGINT` or `SIGTERM`, and\n * `daemon status` prints the state file. `cli.ts` loads this file only for the command `daemon`.\n */\nimport type { DaemonLine } from \"./cli-line.ts\";\nimport { describeDaemonStatus } from \"./cli-line.ts\";\nimport type { OpenOptions } from \"./open.ts\";\n\n/** These are the parts of the command line that the command `daemon` uses. */\nexport interface DaemonIo {\n /** The value true lets `user_provided` work when the MCP client cannot ask the user. */\n readonly allowUserProvided: boolean;\n /** The value true prints the status as JSON. */\n readonly json: boolean;\n /** This function prints a line on the standard output. */\n readonly out: (text: string) => void;\n}\n\n/**\n * This function does the command `daemon`, and gives the exit code. `daemon status` gives 0 when a\n * daemon operates on the store, and 1 when none operates. `daemon` gives 0 after a clean stop. An\n * error at start rejects, so the command exits with 1.\n */\nexport const daemonCommand = async (\n line: DaemonLine,\n options: OpenOptions,\n io: DaemonIo,\n): Promise<number> => {\n const { changeCommand, readDaemonState, startDaemon } = await import(\"./daemon.ts\");\n if (line.action === \"status\") {\n const state = readDaemonState(options.dir);\n io.out(\n io.json ? JSON.stringify(state ?? null, null, 2) : describeDaemonStatus(state, options.dir),\n );\n return state?.alive === true ? 0 : 1;\n }\n const daemon = await startDaemon({\n ...options,\n tick: line.tickMs,\n jitter: line.jitterMs,\n budget: line.budgetMs,\n maxPages: line.maxPages,\n grace: line.graceMs,\n events: line.events,\n onChange: line.onChange === undefined ? undefined : changeCommand(line.onChange),\n mcp:\n line.mcp === undefined\n ? undefined\n : {\n port: line.mcp.port,\n host: line.mcp.host,\n allowRemote: line.mcp.allowRemote,\n tokenFile: line.mcp.tokenFile,\n allowUserProvided: io.allowUserProvided,\n },\n signals: true,\n });\n await daemon.done;\n return 0;\n};\n"],"mappings":";;;;;;;AAuBA,MAAa,gBAAgB,OAC3B,MACA,SACA,OACoB;CACpB,MAAM,EAAE,eAAe,iBAAiB,gBAAgB,MAAM,OAAO,wBAAc,CAAA,MAAA,MAAA,EAAA,CAAA;CACnF,IAAI,KAAK,WAAW,UAAU;EAC5B,MAAM,QAAQ,gBAAgB,QAAQ,GAAG;EACzC,GAAG,IACD,GAAG,OAAO,KAAK,UAAU,SAAS,MAAM,MAAM,CAAC,IAAI,qBAAqB,OAAO,QAAQ,GAAG,CAC5F;EACA,OAAO,OAAO,UAAU,OAAO,IAAI;CACrC;CAsBA,OAAM,MArBe,YAAY;EAC/B,GAAG;EACH,MAAM,KAAK;EACX,QAAQ,KAAK;EACb,QAAQ,KAAK;EACb,UAAU,KAAK;EACf,OAAO,KAAK;EACZ,QAAQ,KAAK;EACb,UAAU,KAAK,aAAa,KAAA,IAAY,KAAA,IAAY,cAAc,KAAK,QAAQ;EAC/E,KACE,KAAK,QAAQ,KAAA,IACT,KAAA,IACA;GACE,MAAM,KAAK,IAAI;GACf,MAAM,KAAK,IAAI;GACf,aAAa,KAAK,IAAI;GACtB,WAAW,KAAK,IAAI;GACpB,mBAAmB,GAAG;EACxB;EACN,SAAS;CACX,CAAC,EAAA,CACY;CACb,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as keptWeekOf, i as describeVenue, o as productCode, r as describeProduct, s as venueCode, t as UsageError } from "./cli.mjs";
|
|
2
2
|
import { compareHours, fromCompact } from "./hours.mjs";
|
|
3
|
-
import { d as readVenue, o as readProduct } from "./recipe-product-
|
|
3
|
+
import { d as readVenue, o as readProduct } from "./recipe-product-DE-yzyXS.mjs";
|
|
4
4
|
// src/cli-recipes.ts
|
|
5
5
|
/**
|
|
6
6
|
* This function checks the parts of `venue` that need a file or a reader, before the store opens.
|
|
@@ -55,4 +55,4 @@ const productCommand = async (target, line, io) => {
|
|
|
55
55
|
};
|
|
56
56
|
export { prepareRecipe, productCommand, venueCommand };
|
|
57
57
|
|
|
58
|
-
//# sourceMappingURL=cli-recipes-
|
|
58
|
+
//# sourceMappingURL=cli-recipes-B1zg7et3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-recipes-
|
|
1
|
+
{"version":3,"file":"cli-recipes-B1zg7et3.mjs","names":[],"sources":["../src/cli-recipes.ts"],"sourcesContent":["/*\n * The commands `venue` and `product` of the command line. They read a venue or a product page with\n * the recipes of the package (`readVenue` and `readProduct`). `cli.ts` loads this file only for these\n * two commands, so the other commands do not load the recipes.\n */\nimport type { KeptWeek, RecipeLine, VenueCompare } from \"./cli-line.ts\";\nimport {\n UsageError,\n describeProduct,\n describeVenue,\n keptWeekOf,\n productCode,\n venueCode,\n} from \"./cli-line.ts\";\nimport { compareHours, fromCompact } from \"./hours.ts\";\nimport type { RecipeTarget } from \"./recipe.ts\";\nimport type { ProductOptions } from \"./recipe-product.ts\";\nimport { readProduct } from \"./recipe-product.ts\";\nimport type { VenueOptions } from \"./recipe-venue.ts\";\nimport { readVenue } from \"./recipe-venue.ts\";\n\n/** These are the parts of the command line that `venue` and `product` use. */\nexport interface RecipeIo {\n /** The value true prints the result as JSON. */\n readonly json: boolean;\n /** This function prints a line on the standard output. */\n readonly out: (text: string) => void;\n /** This text tells why rendering is off, when the computer has no browser. */\n readonly renderOff?: string | undefined;\n}\n\n/** These are the inputs of `venue` that the command reads before the store opens. */\nexport interface RecipeInput {\n /** This value is the kept week of `--compare`, or undefined with no `--compare`. */\n readonly kept: KeptWeek | undefined;\n}\n\n/**\n * This function checks the parts of `venue` that need a file or a reader, before the store opens.\n * They are the kept week of `--compare` and the value of `--osm`. An error is a usage error.\n */\nexport const prepareRecipe = (line: RecipeLine): RecipeInput => {\n if (line.osm !== undefined && fromCompact(line.osm, \"osm\") === undefined) {\n throw new UsageError(\n `--osm: the hours reader cannot read \"${line.osm}\". Write an opening_hours value, such as \"Mo-Fr 08:00-18:00; Sa 09:00-13:00\"`,\n );\n }\n return { kept: line.compare === undefined ? undefined : keptWeekOf(line.compare) };\n};\n\n/** This function gives the options of the recipe that `venue` and `product` share. */\nconst sharedOptions = (line: RecipeLine): ProductOptions => ({\n render: line.render,\n maxAge: line.maxAge,\n budget: line.budget,\n onBehalfOf: line.onBehalfOf,\n userProvided: line.userProvided,\n fallback: line.fallback,\n archiveDespiteRobots: line.archiveDespiteRobots,\n});\n\n/**\n * This function does the command `venue`, and gives the exit code. It reads the hours of the venue\n * with `readVenue`. With `--compare`, it compares the week of the site (`from_site`) with the kept\n * week through `compareHours`.\n */\nexport const venueCommand = async (\n target: RecipeTarget,\n line: RecipeLine,\n input: RecipeInput,\n io: RecipeIo,\n): Promise<number> => {\n const options: VenueOptions = {\n ...sharedOptions(line),\n name: line.name,\n requireName: line.requireName,\n location: line.location,\n osm: line.osm,\n pages: line.pages,\n };\n const result = await readVenue(target, line.url, options);\n const site = result.from_site;\n const compare: VenueCompare | undefined =\n input.kept === undefined\n ? undefined\n : {\n file: input.kept.file,\n kept: input.kept.week,\n comparison: site === null ? null : compareHours(input.kept.week, site.week),\n };\n io.out(\n io.json\n ? JSON.stringify(compare === undefined ? result : { ...result, compare }, null, 2)\n : describeVenue(result, compare, io.renderOff).join(\"\\n\"),\n );\n return venueCode(result);\n};\n\n/** This function does the command `product`, and gives the exit code. It reads the page with `readProduct`. */\nexport const productCommand = async (\n target: RecipeTarget,\n line: RecipeLine,\n io: RecipeIo,\n): Promise<number> => {\n const result = await readProduct(target, line.url, sharedOptions(line));\n io.out(\n io.json ? JSON.stringify(result, null, 2) : describeProduct(result, io.renderOff).join(\"\\n\"),\n );\n return productCode(result);\n};\n"],"mappings":";;;;;;;;AAyCA,MAAa,iBAAiB,SAAkC;CAC9D,IAAI,KAAK,QAAQ,KAAA,KAAa,YAAY,KAAK,KAAK,KAAK,MAAM,KAAA,GAC7D,MAAM,IAAI,WACR,wCAAwC,KAAK,IAAI,6EACnD;CAEF,OAAO,EAAE,MAAM,KAAK,YAAY,KAAA,IAAY,KAAA,IAAY,WAAW,KAAK,OAAO,EAAE;AACnF;;AAGA,MAAM,iBAAiB,UAAsC;CAC3D,QAAQ,KAAK;CACb,QAAQ,KAAK;CACb,QAAQ,KAAK;CACb,YAAY,KAAK;CACjB,cAAc,KAAK;CACnB,UAAU,KAAK;CACf,sBAAsB,KAAK;AAC7B;;;;;;AAOA,MAAa,eAAe,OAC1B,QACA,MACA,OACA,OACoB;CACpB,MAAM,UAAwB;EAC5B,GAAG,cAAc,IAAI;EACrB,MAAM,KAAK;EACX,aAAa,KAAK;EAClB,UAAU,KAAK;EACf,KAAK,KAAK;EACV,OAAO,KAAK;CACd;CACA,MAAM,SAAS,MAAM,UAAU,QAAQ,KAAK,KAAK,OAAO;CACxD,MAAM,OAAO,OAAO;CACpB,MAAM,UACJ,MAAM,SAAS,KAAA,IACX,KAAA,IACA;EACE,MAAM,MAAM,KAAK;EACjB,MAAM,MAAM,KAAK;EACjB,YAAY,SAAS,OAAO,OAAO,aAAa,MAAM,KAAK,MAAM,KAAK,IAAI;CAC5E;CACN,GAAG,IACD,GAAG,OACC,KAAK,UAAU,YAAY,KAAA,IAAY,SAAS;EAAE,GAAG;EAAQ;CAAQ,GAAG,MAAM,CAAC,IAC/E,cAAc,QAAQ,SAAS,GAAG,SAAS,CAAC,CAAC,KAAK,IAAI,CAC5D;CACA,OAAO,UAAU,MAAM;AACzB;;AAGA,MAAa,iBAAiB,OAC5B,QACA,MACA,OACoB;CACpB,MAAM,SAAS,MAAM,YAAY,QAAQ,KAAK,KAAK,cAAc,IAAI,CAAC;CACtE,GAAG,IACD,GAAG,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC,IAAI,gBAAgB,QAAQ,GAAG,SAAS,CAAC,CAAC,KAAK,IAAI,CAC7F;CACA,OAAO,YAAY,MAAM;AAC3B"}
|
package/build/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as durationMs, r as VERSION } from "./version-
|
|
2
|
+
import { i as durationMs, r as VERSION } from "./version-BwsBOkFU.mjs";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { isIP } from "node:net";
|
|
@@ -204,12 +204,12 @@ const OWNER = {
|
|
|
204
204
|
const COMMANDS = {
|
|
205
205
|
fetch: {
|
|
206
206
|
min: 1,
|
|
207
|
-
max:
|
|
207
|
+
max: 1e400,
|
|
208
208
|
wants: "fetch wants at least one URL"
|
|
209
209
|
},
|
|
210
210
|
find: {
|
|
211
211
|
min: 1,
|
|
212
|
-
max:
|
|
212
|
+
max: 1e400,
|
|
213
213
|
wants: "find wants a query"
|
|
214
214
|
},
|
|
215
215
|
read: {
|
|
@@ -219,7 +219,7 @@ const COMMANDS = {
|
|
|
219
219
|
},
|
|
220
220
|
verify: {
|
|
221
221
|
min: 2,
|
|
222
|
-
max:
|
|
222
|
+
max: 1e400,
|
|
223
223
|
wants: "verify wants a document id and a quote"
|
|
224
224
|
},
|
|
225
225
|
reindex: {
|
|
@@ -244,7 +244,7 @@ const COMMANDS = {
|
|
|
244
244
|
},
|
|
245
245
|
crawl: {
|
|
246
246
|
min: 1,
|
|
247
|
-
max:
|
|
247
|
+
max: 1e400,
|
|
248
248
|
wants: "crawl wants at least one URL"
|
|
249
249
|
},
|
|
250
250
|
diff: {
|
|
@@ -254,7 +254,7 @@ const COMMANDS = {
|
|
|
254
254
|
},
|
|
255
255
|
watch: {
|
|
256
256
|
min: 1,
|
|
257
|
-
max:
|
|
257
|
+
max: 1e400,
|
|
258
258
|
wants: "watch wants add, remove, list or run"
|
|
259
259
|
},
|
|
260
260
|
daemon: {
|
|
@@ -442,8 +442,8 @@ const versionOf = (name, text) => {
|
|
|
442
442
|
return DATE_START.test(text) ? { at: timeOf(name, text) } : text;
|
|
443
443
|
};
|
|
444
444
|
const ACTIONS = {
|
|
445
|
-
add: [1,
|
|
446
|
-
remove: [1,
|
|
445
|
+
add: [1, 1e400],
|
|
446
|
+
remove: [1, 1e400],
|
|
447
447
|
list: [0, 0],
|
|
448
448
|
run: [0, 0]
|
|
449
449
|
};
|
|
@@ -1333,13 +1333,13 @@ Exit codes:
|
|
|
1333
1333
|
* command line first. The export only reads the store: it makes no store, and it sends no request.
|
|
1334
1334
|
*/
|
|
1335
1335
|
const exportCommand = async (plan, dir, json) => {
|
|
1336
|
-
const result = plan.format === "wacz" ? await (await import("./wacz-
|
|
1336
|
+
const result = plan.format === "wacz" ? await (await import("./wacz-BkeG0_Pn.mjs").then((n) => n.n)).exportWacz(dir, plan.options) : await (await import("./warc-BPYg_Nzp.mjs").then((n) => n.a)).exportWarc(dir, plan.options);
|
|
1337
1337
|
process.stdout.write(`${json ? JSON.stringify(result, null, 2) : describeExport(result, plan.options.includeRefusals)}\n`);
|
|
1338
1338
|
return 0;
|
|
1339
1339
|
};
|
|
1340
1340
|
/** This function prints the key directory of a key file, and tells where to host it. */
|
|
1341
1341
|
const keyDirectoryCommand = async (key, agent) => {
|
|
1342
|
-
const { KEY_DIRECTORY_PATH, KEY_DIRECTORY_TYPE, keyDirectory } = await import("./webbotauth-
|
|
1342
|
+
const { KEY_DIRECTORY_PATH, KEY_DIRECTORY_TYPE, keyDirectory } = await import("./webbotauth-DbiWmibz.mjs").then((n) => n.s);
|
|
1343
1343
|
let directory;
|
|
1344
1344
|
try {
|
|
1345
1345
|
directory = keyDirectory([key]);
|
|
@@ -1455,7 +1455,7 @@ const runWatchCommand = async (crawler, line, values, limits, json, out) => {
|
|
|
1455
1455
|
};
|
|
1456
1456
|
/** This function gives the text of a diff for a person: the two captures, then the text of `formatDiff`. */
|
|
1457
1457
|
const describeDiff = async (diff) => {
|
|
1458
|
-
const { formatDiff } = await import("./diff-
|
|
1458
|
+
const { formatDiff } = await import("./diff-CSNW27zD.mjs").then((n) => n.i);
|
|
1459
1459
|
return [
|
|
1460
1460
|
`${diff.doc} ${diff.from.capture} (${diff.from.fetched_at}) -> ${diff.to.capture} (${diff.to.fetched_at})`,
|
|
1461
1461
|
formatDiff(diff),
|
|
@@ -1465,7 +1465,7 @@ const describeDiff = async (diff) => {
|
|
|
1465
1465
|
};
|
|
1466
1466
|
/** This function checks the fields against a stored document, and prints a line for each field. The exit code is 0 when each field is verified or normalized. */
|
|
1467
1467
|
const runExtract = async (crawler, doc, fields, options, json, out) => {
|
|
1468
|
-
const { extractDocument } = await import("./extract-
|
|
1468
|
+
const { extractDocument } = await import("./extract-Bn0ueYEx.mjs").then((n) => n.i);
|
|
1469
1469
|
const claims = fields;
|
|
1470
1470
|
const result = crawler.extract === void 0 ? await extractDocument(crawler.runtime, doc, claims, options) : await crawler.extract(doc, claims, options);
|
|
1471
1471
|
if (json) out(JSON.stringify(result, null, 2));
|
|
@@ -1479,14 +1479,14 @@ const runExtract = async (crawler, doc, fields, options, json, out) => {
|
|
|
1479
1479
|
const embedderFor = async (choice, dir) => {
|
|
1480
1480
|
try {
|
|
1481
1481
|
if (choice.kind === "ollama") {
|
|
1482
|
-
const { ollamaEmbedder } = await import("./ollama-
|
|
1482
|
+
const { ollamaEmbedder } = await import("./ollama-B7eNmGhl.mjs").then((n) => n.a);
|
|
1483
1483
|
return ollamaEmbedder({
|
|
1484
1484
|
...choice.model === void 0 ? {} : { model: choice.model },
|
|
1485
1485
|
...choice.url === void 0 ? {} : { baseUrl: choice.url },
|
|
1486
1486
|
allowRemote: choice.allowRemote
|
|
1487
1487
|
});
|
|
1488
1488
|
}
|
|
1489
|
-
const { transformersEmbedder } = await import("./transformers-
|
|
1489
|
+
const { transformersEmbedder } = await import("./transformers-Cb-KaPge.mjs").then((n) => n.i);
|
|
1490
1490
|
return transformersEmbedder({
|
|
1491
1491
|
...choice.model === void 0 ? {} : { model: choice.model },
|
|
1492
1492
|
cacheDir: join(dir, "models")
|
|
@@ -1530,7 +1530,7 @@ const main = async (args) => {
|
|
|
1530
1530
|
if (command === "key-directory") return keyDirectoryCommand(keyFile(signKey), signatureAgent);
|
|
1531
1531
|
let signer;
|
|
1532
1532
|
if (signKey !== void 0 && signatureAgent !== void 0) {
|
|
1533
|
-
const { createWebBotAuthSigner } = await import("./webbotauth-
|
|
1533
|
+
const { createWebBotAuthSigner } = await import("./webbotauth-DbiWmibz.mjs").then((n) => n.s);
|
|
1534
1534
|
const privateKey = keyFile(signKey);
|
|
1535
1535
|
try {
|
|
1536
1536
|
signer = createWebBotAuthSigner({
|
|
@@ -1568,7 +1568,7 @@ const main = async (args) => {
|
|
|
1568
1568
|
return 0;
|
|
1569
1569
|
}
|
|
1570
1570
|
if (command === "daemon") {
|
|
1571
|
-
const { daemonCommand } = await import("./cli-daemon-
|
|
1571
|
+
const { daemonCommand } = await import("./cli-daemon-DRI1tL5D.mjs");
|
|
1572
1572
|
return daemonCommand(line.daemonLine, options, {
|
|
1573
1573
|
allowUserProvided: line.allowUserProvided,
|
|
1574
1574
|
json: values.json === true,
|
|
@@ -1577,14 +1577,14 @@ const main = async (args) => {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
if (line.exportPlan !== void 0) return exportCommand(line.exportPlan, dir, values.json === true);
|
|
1579
1579
|
const recipeLine = line.recipeLine;
|
|
1580
|
-
const recipes = recipeLine === void 0 ? void 0 : await import("./cli-recipes-
|
|
1580
|
+
const recipes = recipeLine === void 0 ? void 0 : await import("./cli-recipes-B1zg7et3.mjs");
|
|
1581
1581
|
const recipeInput = recipes === void 0 || recipeLine === void 0 ? void 0 : recipes.prepareRecipe(recipeLine);
|
|
1582
|
-
const { openCrawler } = await import("./open-
|
|
1582
|
+
const { openCrawler } = await import("./open-Cq2hknsi.mjs").then((n) => n.a);
|
|
1583
1583
|
let renderOff;
|
|
1584
1584
|
let renderer = options.renderer;
|
|
1585
1585
|
if (!(command === "fetch" || command === "crawl" || recipeLine !== void 0 || watchLine?.action === "run") || render === "never") renderer = false;
|
|
1586
1586
|
else if (renderer === void 0) {
|
|
1587
|
-
const { browserMissing } = await import("./browser-
|
|
1587
|
+
const { browserMissing } = await import("./browser-C_dFMvO3.mjs").then((n) => n.n);
|
|
1588
1588
|
renderOff = await browserMissing();
|
|
1589
1589
|
if (renderOff !== void 0) renderer = false;
|
|
1590
1590
|
}
|