ssqch 0.11.0 → 0.13.0

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 (138) hide show
  1. package/bundled/completions/bash +67 -9
  2. package/bundled/completions/elvish +24 -4
  3. package/bundled/completions/fish +37 -25
  4. package/bundled/completions/powershell +26 -4
  5. package/bundled/completions/zsh +45 -10
  6. package/bundled/docs/agents.md +2 -2
  7. package/bundled/docs/build-summary.md +1 -1
  8. package/bundled/docs/comparing-builds.md +7 -4
  9. package/bundled/docs/configuring.md +7 -12
  10. package/bundled/docs/deploying.md +1 -1
  11. package/bundled/docs/field-guide.md +4 -4
  12. package/bundled/docs/github-pages.md +2 -1
  13. package/bundled/docs/index.md +1 -1
  14. package/bundled/docs/install.md +1 -1
  15. package/bundled/docs/known-gaps.md +1 -1
  16. package/bundled/docs/markdown.md +11 -13
  17. package/bundled/docs/nav.yml +6 -1
  18. package/bundled/docs/netlify.md +4 -2
  19. package/bundled/docs/patrol.md +48 -0
  20. package/bundled/docs/plugins.md +6 -4
  21. package/bundled/docs/robots.md +72 -0
  22. package/bundled/docs/seo.md +2 -38
  23. package/bundled/docs/serving-markdown.md +142 -0
  24. package/bundled/docs/template-languages.md +2 -1
  25. package/bundled/docs/templates.md +2 -1
  26. package/bundled/docs/trailheads/from-component-frameworks.md +9 -10
  27. package/bundled/docs/trailheads/from-hugo.md +5 -3
  28. package/bundled/docs/trailheads/from-jekyll.md +54 -13
  29. package/bundled/docs/trailheads/from-mkdocs.md +15 -12
  30. package/bundled/docs/trailheads/from-vitepress.md +142 -0
  31. package/bundled/docs/trailheads.md +5 -5
  32. package/bundled/docs/where-values-come-from.md +5 -5
  33. package/bundled/docs/writing-plugins.md +69 -0
  34. package/bundled/ssqch.d.ts +150 -34
  35. package/bundled/starter/engines/index.edge +1 -0
  36. package/bundled/starter/engines/index.ejs +1 -0
  37. package/bundled/starter/engines/index.hbs +1 -0
  38. package/bundled/starter/engines/index.liquid +1 -0
  39. package/bundled/starter/engines/layout.edge +7 -0
  40. package/bundled/starter/engines/layout.ejs +4 -0
  41. package/bundled/starter/engines/layout.hbs +4 -0
  42. package/bundled/starter/engines/layout.liquid +4 -0
  43. package/bundled/starter/src/_data/site.json +1 -0
  44. package/bundled/starter/src/_includes/layout.jinja +4 -0
  45. package/bundled/starter/src/index.jinja +1 -0
  46. package/bundled/starter/ssqch.config.js +14 -1
  47. package/bundled/starter-docs/engines/edge/base.edge +7 -0
  48. package/bundled/starter-docs/engines/edge/doc.edge +4 -0
  49. package/bundled/starter-docs/engines/ejs/base.ejs +4 -0
  50. package/bundled/starter-docs/engines/ejs/doc.ejs +4 -0
  51. package/bundled/starter-docs/engines/hbs/base.hbs +4 -0
  52. package/bundled/starter-docs/engines/hbs/doc.hbs +3 -0
  53. package/bundled/starter-docs/engines/liquid/base.liquid +4 -0
  54. package/bundled/starter-docs/engines/liquid/doc.liquid +4 -0
  55. package/bundled/starter-docs/src/_data/site.json +1 -0
  56. package/bundled/starter-docs/src/_includes/base.jinja +4 -0
  57. package/bundled/starter-docs/src/_includes/doc.jinja +4 -0
  58. package/bundled/starter-docs/src/assets/docs.css +4 -0
  59. package/bundled/starter-docs/src/assets/docs.js +17 -0
  60. package/bundled/starter-docs/ssqch.config.js +14 -1
  61. package/lib/assets.js +13 -11
  62. package/lib/chunk-25WERNDD.js +112 -0
  63. package/lib/{chunk-H5K2ZE7B.js → chunk-2BJFGKOE.js} +13 -5
  64. package/lib/chunk-2FKYWYAB.js +268 -0
  65. package/lib/{chunk-LJOURBYT.js → chunk-3ZTRIO6O.js} +21 -19
  66. package/lib/{chunk-IOBC665M.js → chunk-4AZFCSGJ.js} +5 -3
  67. package/lib/{chunk-HWW5NCVJ.js → chunk-4Q6WMTER.js} +1 -1
  68. package/lib/{chunk-V2FSMOFX.js → chunk-55WXDGO4.js} +3 -3
  69. package/lib/{chunk-ZR3JYLFB.js → chunk-6FY77I4M.js} +331 -58
  70. package/lib/{chunk-JC54PHIT.js → chunk-6OUCRDYI.js} +514 -141
  71. package/lib/{chunk-ERAIEV3O.js → chunk-6U5VIQVY.js} +9 -7
  72. package/lib/{chunk-Z5OP43HU.js → chunk-7U5GWTEH.js} +455 -94
  73. package/lib/{chunk-CMJ7X5WW.js → chunk-AIJNG6MJ.js} +3 -2
  74. package/lib/{chunk-3K237XAX.js → chunk-C2Q7JKFI.js} +12 -10
  75. package/lib/{chunk-GS5B3CBW.js → chunk-DDV6JEC2.js} +1 -1
  76. package/lib/{chunk-A75EVUJX.js → chunk-DFJFHULZ.js} +47 -20
  77. package/lib/{chunk-KZZS4W2V.js → chunk-ENWDM2RW.js} +45 -42
  78. package/lib/{chunk-I3HYKEEW.js → chunk-ER72RPD6.js} +3 -3
  79. package/lib/chunk-F3JPNFCZ.js +23 -0
  80. package/lib/{chunk-B5E27PLU.js → chunk-FENJHLNM.js} +6 -3
  81. package/lib/{chunk-UU43WIZG.js → chunk-FJML7INB.js} +4 -2
  82. package/lib/{chunk-KCF2Z6N7.js → chunk-FQZDUDFK.js} +5 -3
  83. package/lib/{chunk-GJNIQAIH.js → chunk-GSNRAGKQ.js} +13 -6
  84. package/lib/{chunk-443ZQLVX.js → chunk-GU7BBYWB.js} +5 -4
  85. package/lib/{chunk-X2GAVYV2.js → chunk-HDKU6LRI.js} +110 -748
  86. package/lib/chunk-J3C2LEW7.js +121 -0
  87. package/lib/{chunk-XS4EJSEK.js → chunk-K5WZ2VYK.js} +7 -5
  88. package/lib/{chunk-3HZZY3Y7.js → chunk-OOKBXQAY.js} +7 -6
  89. package/lib/chunk-P2WS4RM4.js +707 -0
  90. package/lib/{chunk-RBNPBTDP.js → chunk-SNQOHNXE.js} +1 -1
  91. package/lib/{chunk-HFSWUTXX.js → chunk-SPIFZBIW.js} +1 -1
  92. package/lib/{chunk-QLUTNR37.js → chunk-T5IUI7W7.js} +12 -11
  93. package/lib/{chunk-ZINLHOX4.js → chunk-TGSVSG2G.js} +3 -2
  94. package/lib/{chunk-2L3HR67O.js → chunk-U2KEMVXO.js} +24 -16
  95. package/lib/{chunk-RYIWYWRQ.js → chunk-UHRBPZ4A.js} +7 -5
  96. package/lib/{chunk-2QTJTEBV.js → chunk-ULCT3PAV.js} +1 -1
  97. package/lib/{chunk-FCM3NYFR.js → chunk-UZNUS7RP.js} +12 -9
  98. package/lib/{chunk-GLJQ4C76.js → chunk-V3G2QGL3.js} +13 -106
  99. package/lib/{chunk-Z44IAMNG.js → chunk-VILOEVK7.js} +60 -28
  100. package/lib/chunk-VJWQSYEG.js +119 -0
  101. package/lib/{chunk-5ELAUHRL.js → chunk-WGAIE3DD.js} +23 -19
  102. package/lib/{chunk-OQGXZYZS.js → chunk-WUCRAV36.js} +13 -7
  103. package/lib/{chunk-RZYAIX2R.js → chunk-XYAWJTHM.js} +11 -10
  104. package/lib/{chunk-OSBEH67S.js → chunk-YA23NDMW.js} +5 -3
  105. package/lib/{chunk-AIMEXBTK.js → chunk-YNJNMQWU.js} +37 -142
  106. package/lib/{chunk-QJ5ZFTML.js → chunk-ZMG25MXF.js} +20 -18
  107. package/lib/cli.js +72 -35
  108. package/lib/elements.js +13 -11
  109. package/lib/from-hugo.js +36 -0
  110. package/lib/from-jekyll.js +41 -0
  111. package/lib/from-mkdocs.js +49 -0
  112. package/lib/from-vitepress.js +49 -0
  113. package/lib/image.js +12 -11
  114. package/lib/links.js +13 -11
  115. package/lib/llms.js +613 -0
  116. package/lib/minify.js +14 -12
  117. package/lib/redirects.js +13 -11
  118. package/lib/robots.js +87 -0
  119. package/lib/rss.js +24 -13
  120. package/lib/sass.js +12 -11
  121. package/lib/sitemap.js +23 -18
  122. package/lib/ssqch.js +6 -5
  123. package/lib/vue.js +400 -0
  124. package/package.json +29 -1
  125. package/types/from-hugo.d.ts +5 -0
  126. package/types/from-jekyll.d.ts +11 -0
  127. package/types/from-mkdocs.d.ts +11 -0
  128. package/types/from-vitepress.d.ts +5 -0
  129. package/types/index.d.ts +51 -31
  130. package/types/llms.d.ts +27 -0
  131. package/types/robots.d.ts +13 -0
  132. package/types/sass.d.ts +1 -1
  133. package/types/sitemap.d.ts +2 -2
  134. package/types/vue.d.ts +17 -0
  135. package/wasm/markdown.wasm +0 -0
  136. package/lib/chunk-RVXGUMFI.js +0 -21
  137. /package/lib/{chunk-ZR3JYLFB.js.LEGAL.txt → chunk-6FY77I4M.js.LEGAL.txt} +0 -0
  138. /package/lib/{chunk-AIMEXBTK.js.LEGAL.txt → chunk-YNJNMQWU.js.LEGAL.txt} +0 -0
@@ -9,9 +9,10 @@ import {
9
9
  starterEngines,
10
10
  starterFiles,
11
11
  write
12
- } from "./chunk-B5E27PLU.js";
12
+ } from "./chunk-FENJHLNM.js";
13
13
  import "./chunk-YCOTX2VM.js";
14
- import "./chunk-AIMEXBTK.js";
14
+ import "./chunk-YNJNMQWU.js";
15
+ import "./chunk-VJWQSYEG.js";
15
16
  import "./chunk-I3PS26CI.js";
16
17
  export {
17
18
  DEFAULT_ENGINE,
@@ -1,36 +1,38 @@
1
1
  import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
- import "./chunk-Z44IAMNG.js";
4
- import "./chunk-2QTJTEBV.js";
5
- import "./chunk-ERAIEV3O.js";
3
+ import "./chunk-VILOEVK7.js";
4
+ import "./chunk-ULCT3PAV.js";
5
+ import "./chunk-6U5VIQVY.js";
6
6
  import "./chunk-AD3HAW3W.js";
7
7
  import "./chunk-YCOTX2VM.js";
8
8
  import {
9
9
  dirsOf,
10
10
  shownDir
11
- } from "./chunk-GS5B3CBW.js";
11
+ } from "./chunk-DDV6JEC2.js";
12
12
  import {
13
13
  slugWith
14
- } from "./chunk-JC54PHIT.js";
15
- import "./chunk-HFSWUTXX.js";
14
+ } from "./chunk-6OUCRDYI.js";
15
+ import "./chunk-SPIFZBIW.js";
16
16
  import "./chunk-FVZ5JBRI.js";
17
17
  import {
18
18
  FIELD_NOTES
19
- } from "./chunk-UU43WIZG.js";
20
- import "./chunk-IOBC665M.js";
19
+ } from "./chunk-FJML7INB.js";
20
+ import "./chunk-4AZFCSGJ.js";
21
21
  import {
22
22
  serdeFloat
23
23
  } from "./chunk-CMUWRPSQ.js";
24
24
  import {
25
25
  bail,
26
26
  context,
27
+ parseFrontMatter
28
+ } from "./chunk-YNJNMQWU.js";
29
+ import {
27
30
  isDir,
28
31
  isFile,
29
32
  isInside,
30
- parseFrontMatter,
31
33
  realPath,
32
34
  slashes
33
- } from "./chunk-AIMEXBTK.js";
35
+ } from "./chunk-VJWQSYEG.js";
34
36
  import "./chunk-I3PS26CI.js";
35
37
 
36
38
  // src/commands/new.ts
@@ -2,7 +2,7 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  slashes
5
- } from "./chunk-AIMEXBTK.js";
5
+ } from "./chunk-VJWQSYEG.js";
6
6
 
7
7
  // src/dirs.ts
8
8
  import fs from "node:fs";
@@ -6,18 +6,18 @@ import {
6
6
  fingerprint,
7
7
  isAsset,
8
8
  sameStamps
9
- } from "./chunk-KCF2Z6N7.js";
9
+ } from "./chunk-FQZDUDFK.js";
10
10
  import {
11
11
  commandLine
12
- } from "./chunk-HWW5NCVJ.js";
12
+ } from "./chunk-4Q6WMTER.js";
13
13
  import {
14
14
  Builder,
15
15
  stopBuilders
16
- } from "./chunk-I3HYKEEW.js";
16
+ } from "./chunk-ER72RPD6.js";
17
17
  import {
18
18
  CONFIG_FILES,
19
19
  dirsOf
20
- } from "./chunk-GS5B3CBW.js";
20
+ } from "./chunk-DDV6JEC2.js";
21
21
  import {
22
22
  closestPath
23
23
  } from "./chunk-FVZ5JBRI.js";
@@ -25,21 +25,23 @@ import {
25
25
  CAMPSITE_DISTURBED,
26
26
  FRESH_TRACKS,
27
27
  SQUATCH_WATCH
28
- } from "./chunk-UU43WIZG.js";
28
+ } from "./chunk-FJML7INB.js";
29
29
  import {
30
30
  BuildError,
31
31
  aliasesUsed,
32
- isInside,
33
32
  messageOf,
34
33
  progress,
35
- realPath,
36
34
  red,
37
- relative,
38
- slashes,
39
- walkFiles,
40
35
  warn,
41
36
  warning
42
- } from "./chunk-AIMEXBTK.js";
37
+ } from "./chunk-YNJNMQWU.js";
38
+ import {
39
+ isInside,
40
+ realPath,
41
+ relative,
42
+ slashes,
43
+ walkFiles
44
+ } from "./chunk-VJWQSYEG.js";
43
45
  import "./chunk-I3PS26CI.js";
44
46
 
45
47
  // src/serve/server.ts
@@ -305,6 +307,8 @@ function contentType(file) {
305
307
  return "application/xml; charset=utf-8";
306
308
  case "txt":
307
309
  return "text/plain; charset=utf-8";
310
+ case "md":
311
+ return "text/markdown; charset=utf-8";
308
312
  case "svg":
309
313
  return "image/svg+xml";
310
314
  case "png":
@@ -330,6 +334,25 @@ function contentType(file) {
330
334
  return "application/octet-stream";
331
335
  }
332
336
  }
337
+ function prefersMarkdown(accept) {
338
+ if (!accept) return false;
339
+ const q = /* @__PURE__ */ new Map();
340
+ for (const part of accept.split(",")) {
341
+ const [type, ...params] = part.split(";").map((p) => p.trim().toLowerCase());
342
+ if (!type) continue;
343
+ const given = params.find((p) => p.startsWith("q="));
344
+ const value = given === void 0 ? 1 : Number(given.slice(2));
345
+ q.set(type, Number.isFinite(value) ? value : 0);
346
+ }
347
+ const markdown = q.get("text/markdown") ?? 0;
348
+ const html = q.get("text/html") ?? q.get("text/*") ?? q.get("*/*") ?? 0;
349
+ return markdown > 0 && markdown >= html;
350
+ }
351
+ function copyOf(file) {
352
+ if (!/\.html?$/.test(file)) return void 0;
353
+ const copy = file.replace(/\.html?$/, ".md");
354
+ return isFile(copy) ? copy : void 0;
355
+ }
333
356
  function linksAnIcon(html) {
334
357
  return /<link\b[^>]*\brel\s*=\s*["']?[^"'>]*\bicon\b/is.test(html);
335
358
  }
@@ -402,6 +425,8 @@ function handle(req, res, root, live, base) {
402
425
  const url = at.path;
403
426
  const found = locate(res, root, rawUrl, url);
404
427
  if (!found) return;
428
+ const copy = found.status === 200 ? copyOf(found.file) : void 0;
429
+ if (copy && prefersMarkdown(req.headers.accept)) return respond(res, 200, { "Content-Type": "text/markdown; charset=utf-8", Vary: "Accept", ...noCache, "X-Powered-By": "pine cones" }, read(copy) ?? "");
405
430
  let body = read(found.file);
406
431
  let ctype = contentType(found.file);
407
432
  if (!body) {
@@ -418,7 +443,7 @@ function handle(req, res, root, live, base) {
418
443
  const end = html.lastIndexOf("</body>");
419
444
  body = Buffer.from(end === -1 ? `${html}<script>${LIVE_SCRIPT}</script>` : `${html.slice(0, end)}<script>${LIVE_SCRIPT}</script>${html.slice(end)}`);
420
445
  }
421
- respond(res, found.status, { "Content-Type": ctype, ...noCache, "X-Powered-By": "pine cones" }, body);
446
+ respond(res, found.status, { "Content-Type": ctype, ...copy ? { Vary: "Accept" } : {}, ...noCache, "X-Powered-By": "pine cones" }, body);
422
447
  }
423
448
  function takesGzip(req) {
424
449
  return String(req.headers["accept-encoding"] ?? "").split(",").some((encoding) => encoding.trim().split(";")[0] === "gzip");
@@ -431,8 +456,10 @@ function handleBuilt(req, res, root, base) {
431
456
  if ("redirect" in at) return respond(res, 302, { Location: at.redirect });
432
457
  const found = locate(res, root, rawUrl, at.path);
433
458
  if (!found) return;
434
- let body = read(found.file);
435
- let ctype = contentType(found.file);
459
+ const copy = found.status === 200 ? copyOf(found.file) : void 0;
460
+ const markdown = copy !== void 0 && prefersMarkdown(req.headers.accept);
461
+ let body = read(markdown ? copy : found.file);
462
+ let ctype = markdown ? "text/markdown; charset=utf-8" : contentType(found.file);
436
463
  if (!body) {
437
464
  body = Buffer.from(`Not found: ${fullUrl}`);
438
465
  ctype = "text/plain; charset=utf-8";
@@ -440,7 +467,7 @@ function handleBuilt(req, res, root, base) {
440
467
  const compressible = ctype.startsWith("text/") || ctype.startsWith("application/json") || ctype.startsWith("application/xml") || ctype === "image/svg+xml";
441
468
  const gzip = compressible && body.length > 256 && takesGzip(req);
442
469
  const headers = { "Content-Type": ctype };
443
- if (compressible) headers.Vary = "Accept-Encoding";
470
+ if (compressible) headers.Vary = copy ? "Accept, Accept-Encoding" : "Accept-Encoding";
444
471
  if (gzip) headers["Content-Encoding"] = "gzip";
445
472
  respond(res, found.status, headers, gzip ? zlib.gzipSync(body) : body);
446
473
  }
@@ -886,7 +913,7 @@ async function watch({ builder, live, args, quiet, startedTools, firstBuild, say
886
913
  if (!quiet) say(`${FRESH_TRACKS} ${show(source)}`);
887
914
  await runBuild(builder, live, async () => {
888
915
  if (tools) await settle(rx, output, assetStamps(output), QUIET, carried);
889
- });
916
+ }, sources);
890
917
  if (!quiet) sayWhere();
891
918
  watchConfigFiles();
892
919
  } else if (outputs.some((file) => isAsset(file) || !exists(file))) {
@@ -931,16 +958,16 @@ async function recover(rx, gone, restart) {
931
958
  while (performance.now() - started < 15e3 && !gone.every(isFile2)) await sleep2(100);
932
959
  rx.drain();
933
960
  }
934
- async function runBuild(builder, live, hold) {
935
- const { ok } = await buildAndReport(builder, live);
961
+ async function runBuild(builder, live, hold, changed) {
962
+ const { ok } = await buildAndReport(builder, live, changed);
936
963
  if (ok) {
937
964
  await hold();
938
965
  await publish(builder.site, live);
939
966
  }
940
967
  return ok;
941
968
  }
942
- async function buildAndReport(builder, live) {
943
- const built = await builder.build(live.error !== null);
969
+ async function buildAndReport(builder, live, changed) {
970
+ const built = await builder.build(live.error !== null, changed);
944
971
  if (!built.ok) live.failed(built.error ?? "");
945
972
  return built;
946
973
  }
@@ -1,23 +1,24 @@
1
1
  import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
- inspectPages
5
- } from "./chunk-ZR3JYLFB.js";
6
- import "./chunk-OSBEH67S.js";
7
- import "./chunk-HWW5NCVJ.js";
8
- import "./chunk-GLJQ4C76.js";
9
- import "./chunk-RYIWYWRQ.js";
10
- import "./chunk-Z44IAMNG.js";
11
- import "./chunk-2QTJTEBV.js";
12
- import "./chunk-ERAIEV3O.js";
4
+ tracePages
5
+ } from "./chunk-6FY77I4M.js";
6
+ import "./chunk-YA23NDMW.js";
7
+ import "./chunk-V3G2QGL3.js";
8
+ import "./chunk-4Q6WMTER.js";
9
+ import "./chunk-UHRBPZ4A.js";
10
+ import "./chunk-25WERNDD.js";
11
+ import "./chunk-VILOEVK7.js";
12
+ import "./chunk-ULCT3PAV.js";
13
+ import "./chunk-6U5VIQVY.js";
13
14
  import "./chunk-AD3HAW3W.js";
14
15
  import "./chunk-YCOTX2VM.js";
15
- import "./chunk-GS5B3CBW.js";
16
- import "./chunk-JC54PHIT.js";
17
- import "./chunk-HFSWUTXX.js";
16
+ import "./chunk-DDV6JEC2.js";
17
+ import "./chunk-6OUCRDYI.js";
18
+ import "./chunk-SPIFZBIW.js";
18
19
  import "./chunk-FVZ5JBRI.js";
19
- import "./chunk-UU43WIZG.js";
20
- import "./chunk-IOBC665M.js";
20
+ import "./chunk-FJML7INB.js";
21
+ import "./chunk-4AZFCSGJ.js";
21
22
  import {
22
23
  charCount,
23
24
  firstChars,
@@ -29,15 +30,17 @@ import {
29
30
  } from "./chunk-CMUWRPSQ.js";
30
31
  import {
31
32
  bail,
33
+ getPath
34
+ } from "./chunk-YNJNMQWU.js";
35
+ import {
32
36
  comparePaths,
33
37
  compareText,
34
- getPath,
35
38
  realPath,
36
39
  shown
37
- } from "./chunk-AIMEXBTK.js";
40
+ } from "./chunk-VJWQSYEG.js";
38
41
  import "./chunk-I3PS26CI.js";
39
42
 
40
- // src/inspect.ts
43
+ // src/trace.ts
41
44
  import fs from "node:fs";
42
45
  import path from "node:path";
43
46
  var has = (data, key) => data !== null && typeof data === "object" && Object.prototype.hasOwnProperty.call(data, key);
@@ -81,8 +84,8 @@ function fieldsOf(config, dirs, global, page) {
81
84
  }
82
85
  return out;
83
86
  }
84
- async function inspect(config, target) {
85
- const { dirs, global, pages } = await inspectPages(config);
87
+ async function trace(config, target) {
88
+ const { dirs, global, pages } = await tracePages(config);
86
89
  const trim = (u) => {
87
90
  const rest = u.endsWith("index.html") ? u.slice(0, -10) : void 0;
88
91
  return (rest !== void 0 && rest.endsWith("/") ? rest : u).replace(/\/+$/, "");
@@ -149,30 +152,30 @@ function valueAt(value, key) {
149
152
  if (value instanceof Date || typeof value === "function") return void 0;
150
153
  return has(value, key) ? value[key] : void 0;
151
154
  }
152
- function field(inspection, dotted) {
155
+ function field(traced, dotted) {
153
156
  const at = dotted.indexOf(".");
154
157
  const [top, rest] = at === -1 ? [dotted, ""] : [dotted.slice(0, at), dotted.slice(at + 1)];
155
- const found = inspection.fields.find((f) => f.name === top);
158
+ const found = traced.fields.find((f) => f.name === top);
156
159
  if (!found || rest === "") return found;
157
160
  const pathIn = (v) => rest.split(".").reduce(valueAt, v);
158
161
  const setBy = found.setBy.filter((s) => !nullish(pathIn(s.value))).map((s) => ({ from: s.from, value: pathIn(s.value) }));
159
162
  return { name: dotted, value: pathIn(found.value), from: setBy.length ? setBy[setBy.length - 1].from : found.from, setBy };
160
163
  }
161
- function inspectionText(inspection) {
162
- let out = `${inspection.url ?? "(no URL: permalink is false)"}
164
+ function traceText(traced) {
165
+ let out = `${traced.url ?? "(no URL: permalink is false)"}
163
166
  `;
164
167
  const row = (label, value) => {
165
168
  out += ` ${padEnd(label, 12)}${value}
166
169
  `;
167
170
  };
168
- row("From", `${inspection.inputPath} (${inspection.engines.length ? inspection.engines.join(", ") : "as it is"})`);
169
- if (inspection.outputPath !== null) row("Writes", inspection.outputPath);
170
- if (inspection.layouts.length) row("Layouts", inspection.layouts.join(" > "));
171
- row("Date", `${inspection.date} (from ${inspection.dateFrom})`);
172
- row("Collections", inspection.collections.length ? inspection.collections.join(", ") : "none");
171
+ row("From", `${traced.inputPath} (${traced.engines.length ? traced.engines.join(", ") : "as it is"})`);
172
+ if (traced.outputPath !== null) row("Writes", traced.outputPath);
173
+ if (traced.layouts.length) row("Layouts", traced.layouts.join(" > "));
174
+ row("Date", `${traced.date} (from ${traced.dateFrom})`);
175
+ row("Collections", traced.collections.length ? traced.collections.join(", ") : "none");
173
176
  out += "\n Data (name, value, and the level of the cascade that set it)\n";
174
- const width = Math.min(24, Math.max(0, ...inspection.fields.map((f) => charCount(f.name))));
175
- for (const f of inspection.fields) {
177
+ const width = Math.min(24, Math.max(0, ...traced.fields.map((f) => charCount(f.name))));
178
+ for (const f of traced.fields) {
176
179
  const overrides = f.setBy.length > 1 ? ` (over ${f.setBy.slice(0, -1).map((s) => s.from).join(", ")})` : "";
177
180
  out += ` ${padEnd(f.name, width)} ${padEnd(brief(f.value), 52)} ${f.from}${overrides}
178
181
  `;
@@ -193,25 +196,25 @@ function fieldText(f) {
193
196
  return out;
194
197
  }
195
198
  var setByJson = (f) => f.setBy.map((s) => ({ from: s.from, value: toJsonValue(s.value) }));
196
- function inspectionJson(inspection, one) {
199
+ function traceJson(traced, one) {
197
200
  const out = {
198
201
  schemaVersion: 1,
199
- url: inspection.url,
200
- inputPath: inspection.inputPath,
201
- outputPath: inspection.outputPath,
202
- engines: inspection.engines,
203
- layouts: inspection.layouts,
204
- date: { value: inspection.date, from: inspection.dateFrom },
205
- collections: inspection.collections
202
+ url: traced.url,
203
+ inputPath: traced.inputPath,
204
+ outputPath: traced.outputPath,
205
+ engines: traced.engines,
206
+ layouts: traced.layouts,
207
+ date: { value: traced.date, from: traced.dateFrom },
208
+ collections: traced.collections
206
209
  };
207
210
  if (one) out.field = { name: one.name, value: toJsonValue(one.value), from: one.from, setBy: setByJson(one) };
208
- else out.data = Object.fromEntries(inspection.fields.map((f) => [f.name, { value: toJsonValue(f.value), from: f.from, setBy: setByJson(f) }]));
211
+ else out.data = Object.fromEntries(traced.fields.map((f) => [f.name, { value: toJsonValue(f.value), from: f.from, setBy: setByJson(f) }]));
209
212
  return out;
210
213
  }
211
214
  export {
212
215
  field,
213
216
  fieldText,
214
- inspect,
215
- inspectionJson,
216
- inspectionText
217
+ trace,
218
+ traceJson,
219
+ traceText
217
220
  };
@@ -2,7 +2,7 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  red
5
- } from "./chunk-AIMEXBTK.js";
5
+ } from "./chunk-YNJNMQWU.js";
6
6
 
7
7
  // src/serve/builder.ts
8
8
  import { fork } from "node:child_process";
@@ -131,7 +131,7 @@ var Builder = class _Builder {
131
131
  return { ok: false, error, assets: [] };
132
132
  }
133
133
  /** Build, and print the summary or the error. `recovered`: the last build failed, which the summary of one that works says. */
134
- async build(recovered) {
134
+ async build(recovered, changed) {
135
135
  if (stopping) return never();
136
136
  if (this.starting) await this.starting;
137
137
  if (this.crashed !== void 0) {
@@ -145,7 +145,7 @@ var Builder = class _Builder {
145
145
  if (!this.child) return { ok: false, error: "The configuration didn't load: its error is in the terminal.", assets: [] };
146
146
  const child = this.child;
147
147
  const answer = this.next();
148
- child.send({ type: "build", recovered });
148
+ child.send({ type: "build", recovered, ...changed ? { changed } : {} });
149
149
  const message = await answer;
150
150
  if (stopping) return never();
151
151
  if (message?.type === "crashed") {
@@ -0,0 +1,23 @@
1
+ import { createRequire as __ssqchCreateRequire } from "node:module";
2
+ const require = __ssqchCreateRequire(import.meta.url);
3
+ import {
4
+ baselineTime,
5
+ runBaseline
6
+ } from "./chunk-2BJFGKOE.js";
7
+ import "./chunk-4Q6WMTER.js";
8
+ import "./chunk-HDKU6LRI.js";
9
+ import "./chunk-P2WS4RM4.js";
10
+ import "./chunk-UHRBPZ4A.js";
11
+ import "./chunk-ULCT3PAV.js";
12
+ import "./chunk-6U5VIQVY.js";
13
+ import "./chunk-DDV6JEC2.js";
14
+ import "./chunk-FVZ5JBRI.js";
15
+ import "./chunk-FJML7INB.js";
16
+ import "./chunk-CMUWRPSQ.js";
17
+ import "./chunk-YNJNMQWU.js";
18
+ import "./chunk-VJWQSYEG.js";
19
+ import "./chunk-I3PS26CI.js";
20
+ export {
21
+ baselineTime,
22
+ runBaseline
23
+ };
@@ -4,12 +4,14 @@ import {
4
4
  bundled,
5
5
  types
6
6
  } from "./chunk-YCOTX2VM.js";
7
+ import {
8
+ red
9
+ } from "./chunk-YNJNMQWU.js";
7
10
  import {
8
11
  joinAsGiven,
9
12
  parentAsGiven,
10
- red,
11
13
  slashes
12
- } from "./chunk-AIMEXBTK.js";
14
+ } from "./chunk-VJWQSYEG.js";
13
15
 
14
16
  // src/commands/init.ts
15
17
  import fs from "node:fs";
@@ -105,7 +107,8 @@ This site is built with SiteSquatch (\`ssqch\`), a static site generator. ${file
105
107
  - How to use something: \`ssqch docs <name>\` (a config option, template function, command or topic) answers for the installed version, and \`ssqch docs\` lists everything.
106
108
  - What this ssqch supports: \`ssqch capabilities --format json\`.
107
109
  - Check a change: \`ssqch build --format json\`. \`ok\` is the result, and each problem has a \`code\`, a \`file\` and a \`line\`.
108
- - Why a page's value is what it is: \`ssqch inspect <url or file> --format json\`.
110
+ - What agents and crawlers find in the build (robots.txt, the sitemap, llms.txt, each page's Markdown copy): \`ssqch patrol --format json\` after \`ssqch build\`.
111
+ - Why a page's value is what it is: \`ssqch trace <url or file> --format json\`.
109
112
  - Before changing layouts or the config: \`ssqch build --output ${out}-before\`, and afterwards \`ssqch build\` and \`ssqch diff ${out}-before ${out}\`.
110
113
  - A new page: ${newPage}.
111
114
  - \`ssqch serve\` is for a person watching the browser. Check with \`ssqch build\`.
@@ -4,12 +4,13 @@ const require = __ssqchCreateRequire(import.meta.url);
4
4
  // src/voice.ts
5
5
  var SQUATCH_WATCH = "Squatch Watch is on.";
6
6
  var FRESH_TRACKS = "Fresh tracks in";
7
- var FIRST_SITING = "First confirmed siting.";
7
+ var FIRST_SIGHTING = "First confirmed sighting.";
8
8
  var RECOVERED = "Build recovered. Back on the trail.";
9
9
  var FIELD_NOTES = "Field notes started.";
10
10
  var LEFT_NO_TRACE = "left no trace";
11
11
  var CAMPSITE_DISTURBED = "Campsite disturbed:";
12
12
  var PASSED_THIS_TREE = "we've passed this tree before";
13
+ var ACCOUNTS_DIFFER = "The eyewitness accounts differ:";
13
14
  var TRAIL_GOES_COLD = "the trail goes cold";
14
15
  var SOMETHING_LARGE = "something large walked through the build";
15
16
  var ISSUES_URL = "https://github.com/reverentgeek/sitesquatch/issues";
@@ -17,12 +18,13 @@ var ISSUES_URL = "https://github.com/reverentgeek/sitesquatch/issues";
17
18
  export {
18
19
  SQUATCH_WATCH,
19
20
  FRESH_TRACKS,
20
- FIRST_SITING,
21
+ FIRST_SIGHTING,
21
22
  RECOVERED,
22
23
  FIELD_NOTES,
23
24
  LEFT_NO_TRACE,
24
25
  CAMPSITE_DISTURBED,
25
26
  PASSED_THIS_TREE,
27
+ ACCOUNTS_DIFFER,
26
28
  TRAIL_GOES_COLD,
27
29
  SOMETHING_LARGE,
28
30
  ISSUES_URL
@@ -1,11 +1,13 @@
1
1
  import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
- compareText,
5
- realPath,
6
4
  warn,
7
5
  warning
8
- } from "./chunk-AIMEXBTK.js";
6
+ } from "./chunk-YNJNMQWU.js";
7
+ import {
8
+ compareText,
9
+ realPath
10
+ } from "./chunk-VJWQSYEG.js";
9
11
 
10
12
  // src/serve/live.ts
11
13
  import crypto from "node:crypto";
@@ -2,20 +2,20 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
2
2
  const require = __ssqchCreateRequire(import.meta.url);
3
3
  import {
4
4
  starterEngines
5
- } from "./chunk-B5E27PLU.js";
5
+ } from "./chunk-FENJHLNM.js";
6
6
  import {
7
7
  DEFAULTS,
8
8
  configOptions
9
- } from "./chunk-Z44IAMNG.js";
9
+ } from "./chunk-VILOEVK7.js";
10
10
  import {
11
11
  VERSION
12
12
  } from "./chunk-AD3HAW3W.js";
13
13
  import {
14
14
  CONFIG_FILES
15
- } from "./chunk-GS5B3CBW.js";
15
+ } from "./chunk-DDV6JEC2.js";
16
16
  import {
17
17
  red
18
- } from "./chunk-AIMEXBTK.js";
18
+ } from "./chunk-YNJNMQWU.js";
19
19
 
20
20
  // src/commands/capabilities.ts
21
21
  var MODULE_EXPORTS = [
@@ -28,7 +28,14 @@ var MODULE_EXPORTS = [
28
28
  ["ssqch/redirects", ["redirectsPlugin"]],
29
29
  ["ssqch/sass", ["sassPlugin"]],
30
30
  ["ssqch/elements", ["elementsPlugin"]],
31
- ["ssqch/minify", ["minifyPlugin", "minify", "minifyCss"]]
31
+ ["ssqch/minify", ["minifyPlugin", "minify", "minifyCss"]],
32
+ ["ssqch/llms", ["llmsPlugin"]],
33
+ ["ssqch/robots", ["robotsPlugin"]],
34
+ ["ssqch/vue", ["vuePlugin"]],
35
+ ["ssqch/from-vitepress", ["fromVitepress"]],
36
+ ["ssqch/from-mkdocs", ["fromMkdocs"]],
37
+ ["ssqch/from-jekyll", ["fromJekyll"]],
38
+ ["ssqch/from-hugo", ["fromHugo"]]
32
39
  ];
33
40
  var NODE_MODULES = ["fs", "fs/promises", "path", "path/posix", "url", "process", "buffer", "crypto", "module", "util", "events", "os", "assert", "assert/strict", "timers", "timers/promises", "string_decoder", "http", "https", "http2", "net", "tls", "dns", "child_process", "worker_threads", "cluster", "readline", "zlib", "vm", "stream", "tty", "perf_hooks"];
34
41
  function modules() {
@@ -51,7 +58,7 @@ async function capabilities(commands) {
51
58
  schemaVersion: 1,
52
59
  version: VERSION,
53
60
  commands,
54
- json: ["build --format json", "inspect --format json", "diff --format json", "capabilities --format json", "docs --format json", "serve --ready-file"],
61
+ json: ["build --format json", "trace --format json", "diff --format json", "capabilities --format json", "docs --format json", "serve --ready-file"],
55
62
  features,
56
63
  configFiles: [...CONFIG_FILES, "sitesquatch.toml"],
57
64
  configOptions: configOptions(),
@@ -7,10 +7,11 @@ import {
7
7
  fixed,
8
8
  profileText,
9
9
  summary
10
- } from "./chunk-ERAIEV3O.js";
11
- import "./chunk-GS5B3CBW.js";
12
- import "./chunk-UU43WIZG.js";
13
- import "./chunk-AIMEXBTK.js";
10
+ } from "./chunk-6U5VIQVY.js";
11
+ import "./chunk-DDV6JEC2.js";
12
+ import "./chunk-FJML7INB.js";
13
+ import "./chunk-YNJNMQWU.js";
14
+ import "./chunk-VJWQSYEG.js";
14
15
  import "./chunk-I3PS26CI.js";
15
16
  export {
16
17
  bytes,