ssqch 0.9.0 → 0.10.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.
- package/README.md +1 -1
- package/bundled/docs/agents.md +70 -0
- package/bundled/docs/benchmarks.md +29 -0
- package/bundled/docs/build-summary.md +27 -0
- package/bundled/docs/comparing-builds.md +51 -0
- package/bundled/docs/configuring.md +138 -0
- package/bundled/docs/content-schemas.md +54 -0
- package/bundled/docs/css-and-javascript.md +33 -0
- package/bundled/docs/data-files.md +55 -0
- package/bundled/docs/deploying.md +47 -0
- package/bundled/docs/field-guide.md +144 -0
- package/bundled/docs/footprint.md +27 -0
- package/bundled/docs/github-pages.md +41 -0
- package/bundled/docs/index.md +26 -0
- package/bundled/docs/install.md +27 -0
- package/bundled/docs/known-gaps.md +18 -0
- package/bundled/docs/markdown.md +114 -0
- package/bundled/docs/multilingual.md +14 -0
- package/bundled/docs/nav.yml +50 -0
- package/bundled/docs/netlify.md +30 -0
- package/bundled/docs/new-pages.md +42 -0
- package/bundled/docs/plugins.md +13 -0
- package/bundled/docs/rust-plugins.md +32 -0
- package/bundled/docs/seo.md +19 -0
- package/bundled/docs/template-languages.md +106 -0
- package/bundled/docs/templates.md +37 -0
- package/bundled/docs/themes.md +31 -0
- package/bundled/{trailheads → docs/trailheads}/from-component-frameworks.md +7 -3
- package/bundled/{trailheads → docs/trailheads}/from-docusaurus.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-eleventy.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-hexo.md +7 -4
- package/bundled/{trailheads → docs/trailheads}/from-jekyll.md +6 -3
- package/bundled/{trailheads → docs/trailheads}/from-mkdocs.md +8 -5
- package/bundled/{trailheads → docs/trailheads}/from-zola.md +6 -3
- package/bundled/docs/trailheads.md +38 -0
- package/bundled/docs/where-values-come-from.md +57 -0
- package/bundled/ssqch.d.ts +3 -1
- package/lib/assets.js +15 -7
- package/lib/{chunk-GUKSZ2XM.js → chunk-2LEOPLTZ.js} +2 -2
- package/lib/{chunk-3K3ANWZ2.js → chunk-3EPHKJEG.js} +3 -3
- package/lib/{chunk-SXMJ52IK.js → chunk-3HHRKG33.js} +56 -16
- package/lib/{chunk-NCWFYT74.js → chunk-5DNDSNTP.js} +3 -3
- package/lib/{chunk-TVU3OPPK.js → chunk-7HXCQEGA.js} +3 -3
- package/lib/{chunk-GRWMGC7D.js → chunk-BGCBSQ4A.js} +3054 -3053
- package/lib/{chunk-3A647I3N.js → chunk-CB6YFUXU.js} +3 -3
- package/lib/{chunk-7RDRZHJD.js → chunk-DMVJ53SM.js} +9 -9
- package/lib/{chunk-IJWHOFRP.js → chunk-DW7VMJEZ.js} +9 -9
- package/lib/{chunk-SURPOAW7.js → chunk-E5UB2YY7.js} +6 -6
- package/lib/{chunk-D2XE2GTY.js → chunk-EEJDLCD3.js} +7 -7
- package/lib/{chunk-7PWCYHTJ.js → chunk-HDQ4SRWM.js} +3 -3
- package/lib/{chunk-7SD7K567.js → chunk-HGJ5VWUR.js} +1 -1
- package/lib/{chunk-76NTVE34.js → chunk-JWCCVTTR.js} +1 -1
- package/lib/{chunk-TICWN55Z.js → chunk-JXZT5L7W.js} +2 -2
- package/lib/{chunk-MI6EJWA2.js → chunk-LAV3DEY4.js} +1 -1
- package/lib/{chunk-7XLK2GEG.js → chunk-LCPSKHAV.js} +1 -1
- package/lib/{chunk-II5DEH3Q.js → chunk-N4O5MDIB.js} +2 -2
- package/lib/{chunk-HPXAZ2HU.js → chunk-NFJJKDRI.js} +1 -1
- package/lib/{chunk-LPHNACE4.js → chunk-NUUEOGLZ.js} +8 -8
- package/lib/{chunk-NNUKIGOO.js → chunk-Q4LFTYK2.js} +11 -11
- package/lib/{chunk-R7K3D5W5.js → chunk-QMA7CK7B.js} +29 -6
- package/lib/{chunk-SF4I6Z7S.js → chunk-RJFWTW2Y.js} +2 -2
- package/lib/{chunk-BEGC7YP6.js → chunk-RKFZSVNF.js} +6 -6
- package/lib/{chunk-XMXBHXZR.js → chunk-RM5Q3KFB.js} +9 -9
- package/lib/{chunk-RNJFPFXE.js → chunk-RVBNVGZV.js} +3 -3
- package/lib/{chunk-CZ4XQC56.js → chunk-SA5KSJ4Y.js} +8 -4
- package/lib/{chunk-DELWRJAO.js → chunk-SRNLKWXL.js} +60 -35
- package/lib/{chunk-YTHQBMDJ.js → chunk-Y2ESFAAD.js} +2 -3
- package/lib/{chunk-47P4YREZ.js → chunk-ZM6TU2JB.js} +6 -6
- package/lib/cli.js +20 -20
- package/lib/elements.js +7 -7
- package/lib/image.js +8 -8
- package/lib/links.js +10 -10
- package/lib/minify.js +7 -7
- package/lib/redirects.js +8 -8
- package/lib/rss.js +20 -19
- package/lib/sass.js +7 -7
- package/lib/sitemap.js +7 -7
- package/lib/ssqch.js +4 -4
- package/package.json +2 -2
- package/types/index.d.ts +2 -0
- package/types/rss.d.ts +1 -1
- package/bundled/README.md +0 -1314
- package/lib/{chunk-GRWMGC7D.js.LEGAL.txt → chunk-BGCBSQ4A.js.LEGAL.txt} +3 -3
- /package/lib/{chunk-DELWRJAO.js.LEGAL.txt → chunk-SRNLKWXL.js.LEGAL.txt} +0 -0
|
@@ -3,7 +3,7 @@ const require = __ssqchCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
warn,
|
|
5
5
|
warning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
7
7
|
import {
|
|
8
8
|
compareText,
|
|
9
9
|
realPath
|
|
@@ -84,7 +84,7 @@ async function settled(files) {
|
|
|
84
84
|
return last;
|
|
85
85
|
}
|
|
86
86
|
function missingMessage(url, tools, output) {
|
|
87
|
-
if (tools.length === 0) return `${url} is linked but nothing wrote it to ${output}. If a tool makes it, run its watcher with \`serve.run\` (
|
|
87
|
+
if (tools.length === 0) return `${url} is linked but nothing wrote it to ${output}. If a tool makes it, run its watcher with \`serve.run\` (\`ssqch docs "CSS and JavaScript"\`)`;
|
|
88
88
|
if (tools.length === 1) return `${url} is linked but isn't in ${output}: serve.run's ${tools[0]} hasn't written it (its output is in the terminal)`;
|
|
89
89
|
return `${url} is linked but isn't in ${output}: none of serve.run's ${tools.slice(0, -1).join(", ")} or ${tools[tools.length - 1]} has written it (their output is in the terminal)`;
|
|
90
90
|
}
|
|
@@ -2,11 +2,11 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
starterEngines
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Y2ESFAAD.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULTS,
|
|
8
8
|
configOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QMA7CK7B.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
12
|
} from "./chunk-AD3HAW3W.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-DDV6JEC2.js";
|
|
16
16
|
import {
|
|
17
17
|
red
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/capabilities.ts
|
|
21
21
|
var MODULE_EXPORTS = [
|
|
@@ -2,10 +2,10 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
modules
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3EPHKJEG.js";
|
|
6
6
|
import {
|
|
7
7
|
BUILTIN_FILTERS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CB6YFUXU.js";
|
|
9
9
|
import {
|
|
10
10
|
longHelp
|
|
11
11
|
} from "./chunk-F65YUXZ7.js";
|
|
@@ -14,39 +14,72 @@ import {
|
|
|
14
14
|
bundled,
|
|
15
15
|
bundledNames,
|
|
16
16
|
types
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Y2ESFAAD.js";
|
|
18
18
|
import {
|
|
19
19
|
configOptions
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-QMA7CK7B.js";
|
|
21
|
+
import "./chunk-LCPSKHAV.js";
|
|
22
22
|
import "./chunk-NKXEPHRZ.js";
|
|
23
23
|
import {
|
|
24
24
|
VERSION
|
|
25
25
|
} from "./chunk-AD3HAW3W.js";
|
|
26
26
|
import "./chunk-DDV6JEC2.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-5DNDSNTP.js";
|
|
28
28
|
import {
|
|
29
29
|
closest
|
|
30
30
|
} from "./chunk-FVZ5JBRI.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-NFJJKDRI.js";
|
|
32
32
|
import "./chunk-UU43WIZG.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-JWCCVTTR.js";
|
|
34
34
|
import "./chunk-CMUWRPSQ.js";
|
|
35
35
|
import {
|
|
36
36
|
OTHER_CONFIGS,
|
|
37
37
|
TABLE,
|
|
38
|
+
jsYaml,
|
|
38
39
|
red,
|
|
39
40
|
toJson
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
41
42
|
import "./chunk-VJWQSYEG.js";
|
|
42
43
|
import "./chunk-I3PS26CI.js";
|
|
43
44
|
|
|
44
45
|
// src/commands/docs.ts
|
|
45
|
-
var
|
|
46
|
+
var SITE_URL = "https://sitesquatch.dev";
|
|
47
|
+
function docsPage(text) {
|
|
48
|
+
const front = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(text);
|
|
49
|
+
const data = front ? jsYaml.load(front[1]) ?? {} : {};
|
|
50
|
+
return { title: String(data.title ?? ""), body: front ? text.slice(front[0].length) : text };
|
|
51
|
+
}
|
|
52
|
+
function headingsDown(body) {
|
|
53
|
+
let fence = null;
|
|
54
|
+
return body.split(/\r?\n/).map((line) => {
|
|
55
|
+
const trimmed = line.trimStart();
|
|
56
|
+
const marker = ["```", "~~~"].find((m) => trimmed.startsWith(m));
|
|
57
|
+
if (marker !== void 0) {
|
|
58
|
+
if (fence === null) fence = marker;
|
|
59
|
+
else if (fence === marker && trimmed.trimEnd().replace(new RegExp(`^\\${marker[0]}+`), "") === "") fence = null;
|
|
60
|
+
return line;
|
|
61
|
+
}
|
|
62
|
+
return fence === null && /^#{1,5} /.test(line) ? `#${line}` : line;
|
|
63
|
+
}).join("\n");
|
|
64
|
+
}
|
|
65
|
+
function docsText() {
|
|
66
|
+
const nav = jsYaml.load(bundled("docs/nav.yml")) ?? [];
|
|
67
|
+
const files = nav.flatMap((group) => group.pages).filter((p) => typeof p === "string" && !p.startsWith("trailheads/"));
|
|
68
|
+
return files.map((file, i) => {
|
|
69
|
+
const { title, body } = docsPage(bundled(`docs/${file}`));
|
|
70
|
+
return i === 0 ? `# ${title}
|
|
71
|
+
|
|
72
|
+
${body.trim()}
|
|
73
|
+
` : `## ${title}
|
|
74
|
+
|
|
75
|
+
${headingsDown(body).trim()}
|
|
76
|
+
`;
|
|
77
|
+
}).join("\n");
|
|
78
|
+
}
|
|
46
79
|
var byteLength = (text) => Buffer.byteLength(text);
|
|
47
80
|
var ALNUM = /[\p{Alphabetic}\p{N}]/u;
|
|
48
81
|
var IMAGE_LINE = /^\s*(<p\b[^>]*>\s*)?<img\b[^>]*>(\s*<\/p>)?\s*$/i;
|
|
49
|
-
function sections(readme =
|
|
82
|
+
function sections(readme = docsText()) {
|
|
50
83
|
const out = [];
|
|
51
84
|
let fence = null;
|
|
52
85
|
for (const line of readme.split(/\r?\n/)) {
|
|
@@ -468,12 +501,17 @@ function nextStep(grammar, all, known, query) {
|
|
|
468
501
|
}
|
|
469
502
|
function guide(generator) {
|
|
470
503
|
const configured = OTHER_CONFIGS.find(([, g]) => g === generator)?.[3] ?? null;
|
|
471
|
-
const available = bundledNames("trailheads");
|
|
504
|
+
const available = bundledNames("docs/trailheads");
|
|
472
505
|
const file = configured ?? (available.includes(`from-${generator.toLowerCase()}.md`) ? `from-${generator.toLowerCase()}.md` : void 0);
|
|
473
506
|
if (file === void 0) return void 0;
|
|
474
|
-
|
|
507
|
+
if (!available.includes(file)) return { file, text: null };
|
|
508
|
+
const { title, body } = docsPage(bundled(`docs/trailheads/${file}`));
|
|
509
|
+
return { file, text: `# ${title}
|
|
510
|
+
|
|
511
|
+
${body.trim()}
|
|
512
|
+
` };
|
|
475
513
|
}
|
|
476
|
-
var guideUrl = (file) => `${
|
|
514
|
+
var guideUrl = (file) => `${SITE_URL}/docs/trailheads/${file.replace(/\.md$/, "")}/`;
|
|
477
515
|
function from(generator, json) {
|
|
478
516
|
const known = generators();
|
|
479
517
|
const found = known.find((g2) => g2.toLowerCase() === generator.toLowerCase() || g2.replace(/\./g, "").toLowerCase() === generator.toLowerCase());
|
|
@@ -486,7 +524,7 @@ function from(generator, json) {
|
|
|
486
524
|
const g = guide(found);
|
|
487
525
|
if (json) {
|
|
488
526
|
const rows2 = (list) => list.map((e) => ({ ...toJson(e), say: e.say }));
|
|
489
|
-
const value = { generator: found, words: rows2(theirs), common: rows2(everyone), trailhead: g ? { file: `docs/trailheads/${g.file}`, url: guideUrl(g.file), text: g.text } : null };
|
|
527
|
+
const value = { generator: found, words: rows2(theirs), common: rows2(everyone), trailhead: g ? { file: `site/src/docs/trailheads/${g.file}`, url: guideUrl(g.file), text: g.text } : null };
|
|
490
528
|
return JSON.stringify(value, null, 2) + "\n";
|
|
491
529
|
}
|
|
492
530
|
let out = `${found}'s words, and ssqch's names for them. The ones marked (works) are aliases: they do the same as ssqch's name, and say it once. The others are refused with this hint.
|
|
@@ -511,7 +549,7 @@ ${rows(list)}`;
|
|
|
511
549
|
Words most generators use
|
|
512
550
|
${rows(everyone)}`;
|
|
513
551
|
if (g && g.text !== null) out += `
|
|
514
|
-
The trailhead (
|
|
552
|
+
The trailhead (${guideUrl(g.file)}):
|
|
515
553
|
|
|
516
554
|
${g.text.trimEnd()}
|
|
517
555
|
`;
|
|
@@ -564,6 +602,8 @@ function runDocs(grammar, command) {
|
|
|
564
602
|
}
|
|
565
603
|
export {
|
|
566
604
|
answer,
|
|
605
|
+
docsPage,
|
|
606
|
+
docsText,
|
|
567
607
|
names,
|
|
568
608
|
runDocs,
|
|
569
609
|
sections,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
globProblem,
|
|
9
9
|
globToRegExp,
|
|
10
10
|
isGlob
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NFJJKDRI.js";
|
|
12
12
|
import {
|
|
13
13
|
ISSUES_URL,
|
|
14
14
|
SOMETHING_LARGE
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
describeThrown,
|
|
18
18
|
settle
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JWCCVTTR.js";
|
|
20
20
|
import {
|
|
21
21
|
BuildError,
|
|
22
22
|
Diagnostics,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
readText,
|
|
30
30
|
warn,
|
|
31
31
|
warning
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
33
33
|
import {
|
|
34
34
|
comparePaths
|
|
35
35
|
} from "./chunk-VJWQSYEG.js";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
Options
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HGJ5VWUR.js";
|
|
6
6
|
import {
|
|
7
7
|
BUILTINS,
|
|
8
8
|
addImagePlugin,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
imageOptionsFor,
|
|
12
12
|
meant,
|
|
13
13
|
parseFormat
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QMA7CK7B.js";
|
|
15
15
|
import {
|
|
16
16
|
bail
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BGCBSQ4A.js";
|
|
18
18
|
|
|
19
19
|
// src/modules/image.ts
|
|
20
20
|
import fs from "node:fs";
|