@dogsbay/ssg-cli 0.2.0-beta.182 → 0.2.0-beta.186
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/THIRD-PARTY-NOTICES.txt +17 -17
- package/chunks/{build-command-HIL2YZTZ.mjs → build-command-X76EICE4.mjs} +8 -6
- package/chunks/{check-command-N6UDUIQI.mjs → check-command-SXDUKSAZ.mjs} +45 -7
- package/chunks/chunk-AOHGXC4D.mjs +2012 -0
- package/chunks/{chunk-LNWQN7K7.mjs → chunk-FNP5PNJW.mjs} +1 -1
- package/chunks/{chunk-E3FODT5J.mjs → chunk-TRECVC6H.mjs} +247 -69
- package/chunks/{chunk-BN7J5H3S.mjs → chunk-XQORVEL6.mjs} +8 -6
- package/chunks/{chunk-IERF2DNL.mjs → chunk-YA6TJOAM.mjs} +8888 -9563
- package/chunks/{chunk-KFYMG4VB.mjs → chunk-YQ2K646L.mjs} +4 -1
- package/chunks/{dev-VKRNKGO4.mjs → dev-DXMZPST7.mjs} +4 -3
- package/chunks/{menu-N2AZSZKS.mjs → menu-W7ZXME4A.mjs} +7 -5
- package/chunks/{publish-command-PM4D37FB.mjs → publish-command-AVMRM4UZ.mjs} +5 -4
- package/chunks/{release-diff-ULY6YVSH.mjs → release-diff-3OZOYBXR.mjs} +5 -4
- package/chunks/{serve-WGWRM7JQ.mjs → serve-U2YV7AQH.mjs} +3 -1
- package/cli.mjs +8 -8
- package/package.json +2 -2
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
Third-party software in dist/cli.mjs and its chunks
|
|
2
2
|
|
|
3
3
|
========================================================================
|
|
4
|
-
@dogsbay/corpus@0.2.0-beta.
|
|
4
|
+
@dogsbay/corpus@0.2.0-beta.186 (MIT)
|
|
5
5
|
https://github.com/dogsbay/dogsbay.git
|
|
6
6
|
|
|
7
7
|
Licensed under MIT; the package ships no licence file.
|
|
8
8
|
|
|
9
9
|
========================================================================
|
|
10
|
-
@dogsbay/detect@0.2.0-beta.
|
|
10
|
+
@dogsbay/detect@0.2.0-beta.186 (MIT)
|
|
11
11
|
https://github.com/dogsbay/dogsbay.git
|
|
12
12
|
|
|
13
13
|
Licensed under MIT; the package ships no licence file.
|
|
14
14
|
|
|
15
15
|
========================================================================
|
|
16
|
-
@dogsbay/elements@0.2.0-beta.
|
|
16
|
+
@dogsbay/elements@0.2.0-beta.186 (MIT)
|
|
17
17
|
https://github.com/dogsbay/dogsbay.git
|
|
18
18
|
|
|
19
19
|
Licensed under MIT; the package ships no licence file.
|
|
20
20
|
|
|
21
21
|
========================================================================
|
|
22
|
-
@dogsbay/format-dogsbay-md@0.2.0-beta.
|
|
22
|
+
@dogsbay/format-dogsbay-md@0.2.0-beta.186 (MIT)
|
|
23
23
|
https://github.com/dogsbay/dogsbay.git
|
|
24
24
|
|
|
25
25
|
Licensed under MIT; the package ships no licence file.
|
|
26
26
|
|
|
27
27
|
========================================================================
|
|
28
|
-
@dogsbay/format-openapi@0.2.0-beta.
|
|
28
|
+
@dogsbay/format-openapi@0.2.0-beta.186 (MIT)
|
|
29
29
|
https://github.com/dogsbay/dogsbay.git
|
|
30
30
|
|
|
31
31
|
Licensed under MIT; the package ships no licence file.
|
|
32
32
|
|
|
33
33
|
========================================================================
|
|
34
|
-
@dogsbay/format-topicmap@0.2.0-beta.
|
|
34
|
+
@dogsbay/format-topicmap@0.2.0-beta.186 (MIT)
|
|
35
35
|
https://github.com/dogsbay/dogsbay.git
|
|
36
36
|
|
|
37
37
|
Licensed under MIT; the package ships no licence file.
|
|
38
38
|
|
|
39
39
|
========================================================================
|
|
40
|
-
@dogsbay/highlight@0.2.0-beta.
|
|
40
|
+
@dogsbay/highlight@0.2.0-beta.186 (MIT)
|
|
41
41
|
https://github.com/dogsbay/dogsbay.git
|
|
42
42
|
|
|
43
43
|
Licensed under MIT; the package ships no licence file.
|
|
44
44
|
|
|
45
45
|
========================================================================
|
|
46
|
-
@dogsbay/icons@0.2.0-beta.
|
|
46
|
+
@dogsbay/icons@0.2.0-beta.186 (MIT)
|
|
47
47
|
https://github.com/dogsbay/dogsbay.git
|
|
48
48
|
|
|
49
49
|
Licensed under MIT; the package ships no licence file.
|
|
50
50
|
|
|
51
51
|
========================================================================
|
|
52
|
-
@dogsbay/minja@0.2.0-beta.
|
|
52
|
+
@dogsbay/minja@0.2.0-beta.186 (MIT)
|
|
53
53
|
|
|
54
54
|
MIT License
|
|
55
55
|
|
|
@@ -74,49 +74,49 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
74
74
|
SOFTWARE.
|
|
75
75
|
|
|
76
76
|
========================================================================
|
|
77
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
77
|
+
@dogsbay/primitives@0.2.0-beta.186 (MIT)
|
|
78
78
|
https://github.com/dogsbay/dogsbay.git
|
|
79
79
|
|
|
80
80
|
Licensed under MIT; the package ships no licence file.
|
|
81
81
|
|
|
82
82
|
========================================================================
|
|
83
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
83
|
+
@dogsbay/render-html@0.2.0-beta.186 (MIT)
|
|
84
84
|
https://github.com/dogsbay/dogsbay.git
|
|
85
85
|
|
|
86
86
|
Licensed under MIT; the package ships no licence file.
|
|
87
87
|
|
|
88
88
|
========================================================================
|
|
89
|
-
@dogsbay/search@0.2.0-beta.
|
|
89
|
+
@dogsbay/search@0.2.0-beta.186 (MIT)
|
|
90
90
|
https://github.com/dogsbay/dogsbay.git
|
|
91
91
|
|
|
92
92
|
Licensed under MIT; the package ships no licence file.
|
|
93
93
|
|
|
94
94
|
========================================================================
|
|
95
|
-
@dogsbay/serialize-core@0.2.0-beta.
|
|
95
|
+
@dogsbay/serialize-core@0.2.0-beta.186 (MIT)
|
|
96
96
|
https://github.com/dogsbay/dogsbay.git
|
|
97
97
|
|
|
98
98
|
Licensed under MIT; the package ships no licence file.
|
|
99
99
|
|
|
100
100
|
========================================================================
|
|
101
|
-
@dogsbay/site-check@0.2.0-beta.
|
|
101
|
+
@dogsbay/site-check@0.2.0-beta.186 (MIT)
|
|
102
102
|
https://github.com/dogsbay/dogsbay.git
|
|
103
103
|
|
|
104
104
|
Licensed under MIT; the package ships no licence file.
|
|
105
105
|
|
|
106
106
|
========================================================================
|
|
107
|
-
@dogsbay/site-files@0.2.0-beta.
|
|
107
|
+
@dogsbay/site-files@0.2.0-beta.186 (MIT)
|
|
108
108
|
https://github.com/dogsbay/dogsbay.git
|
|
109
109
|
|
|
110
110
|
Licensed under MIT; the package ships no licence file.
|
|
111
111
|
|
|
112
112
|
========================================================================
|
|
113
|
-
@dogsbay/types@0.2.0-beta.
|
|
113
|
+
@dogsbay/types@0.2.0-beta.186 (MIT)
|
|
114
114
|
https://github.com/dogsbay/dogsbay.git
|
|
115
115
|
|
|
116
116
|
Licensed under MIT; the package ships no licence file.
|
|
117
117
|
|
|
118
118
|
========================================================================
|
|
119
|
-
@dogsbay/ui@0.2.0-beta.
|
|
119
|
+
@dogsbay/ui@0.2.0-beta.186 (MIT)
|
|
120
120
|
https://github.com/dogsbay/dogsbay.git
|
|
121
121
|
|
|
122
122
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -17,11 +17,12 @@ import {
|
|
|
17
17
|
removeStaleUnitFiles,
|
|
18
18
|
selectUnits,
|
|
19
19
|
unitFilesOf
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-TRECVC6H.mjs";
|
|
21
|
+
import "./chunk-YQ2K646L.mjs";
|
|
22
|
+
import "./chunk-AOHGXC4D.mjs";
|
|
22
23
|
import {
|
|
23
24
|
UNTRUSTED_DATA_LIMITS
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YA6TJOAM.mjs";
|
|
25
26
|
import {
|
|
26
27
|
FAILING_CODES,
|
|
27
28
|
UsageError,
|
|
@@ -29,7 +30,7 @@ import {
|
|
|
29
30
|
flag,
|
|
30
31
|
option,
|
|
31
32
|
positional
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FNP5PNJW.mjs";
|
|
33
34
|
import "./chunk-YVSP26OS.mjs";
|
|
34
35
|
import "./chunk-O3R3MASP.mjs";
|
|
35
36
|
import "./chunk-JABACD5T.mjs";
|
|
@@ -401,8 +402,9 @@ async function runBuild(args, highlightWorker, mode = {}) {
|
|
|
401
402
|
template parse cache: ${s.parseCache.hits} hits, ${s.parseCache.misses} misses, ${s.parseCache.entries} includes, ${(s.parseCache.bytes / 1e6).toFixed(1)} of ${(s.parseCache.maxBytes / 1e6).toFixed(1)} MB` : "")
|
|
402
403
|
);
|
|
403
404
|
if (errors.length) {
|
|
404
|
-
const
|
|
405
|
-
|
|
405
|
+
const count = (code) => result.problems.filter((p) => p.code === code).length;
|
|
406
|
+
const kinds = [["data", count("data")], ["example", count("example")], ["reader-choice", count("choice")]];
|
|
407
|
+
console.error(`build failed: ${kinds.filter(([, n]) => n).map(([k, n]) => `${n} ${k} problem(s)`).join(", ")}`);
|
|
406
408
|
process.exitCode = 1;
|
|
407
409
|
}
|
|
408
410
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
releaseCollector,
|
|
12
12
|
reportExitCode,
|
|
13
13
|
toReport
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XQORVEL6.mjs";
|
|
15
15
|
import {
|
|
16
16
|
cliMemorySettings,
|
|
17
17
|
diagramRenderers,
|
|
@@ -20,23 +20,25 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
ConfigError,
|
|
22
22
|
build,
|
|
23
|
+
htmlIsText,
|
|
23
24
|
loadYaml,
|
|
24
25
|
parseConfig,
|
|
25
26
|
readBuildFiles,
|
|
26
27
|
siteBase
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-TRECVC6H.mjs";
|
|
29
|
+
import "./chunk-YQ2K646L.mjs";
|
|
30
|
+
import "./chunk-AOHGXC4D.mjs";
|
|
29
31
|
import {
|
|
30
32
|
DATA_DIRECTIVES,
|
|
31
33
|
frontmatterPolicyFromConfig
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YA6TJOAM.mjs";
|
|
33
35
|
import {
|
|
34
36
|
FAILING_CODES,
|
|
35
37
|
UsageError,
|
|
36
38
|
flag,
|
|
37
39
|
option,
|
|
38
40
|
positional
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-FNP5PNJW.mjs";
|
|
40
42
|
import "./chunk-YVSP26OS.mjs";
|
|
41
43
|
import "./chunk-O3R3MASP.mjs";
|
|
42
44
|
import {
|
|
@@ -51,7 +53,7 @@ import { join, resolve } from "node:path";
|
|
|
51
53
|
|
|
52
54
|
// src/core/check.ts
|
|
53
55
|
var KEPT = /(^|\/)(robots\.txt|sitemap[^/]*\.xml)$/;
|
|
54
|
-
var BUILD_DIAGNOSTICS = /* @__PURE__ */ new Set(["front-matter", "template", "template-tag", "data", "example", "parse"]);
|
|
56
|
+
var BUILD_DIAGNOSTICS = /* @__PURE__ */ new Set(["front-matter", "template", "template-tag", "data", "example", "choice", "parse"]);
|
|
55
57
|
var DATA_NODES = new Set(DATA_DIRECTIVES);
|
|
56
58
|
function withoutDataNodes(tree) {
|
|
57
59
|
let changed = false;
|
|
@@ -67,6 +69,41 @@ function withoutDataNodes(tree) {
|
|
|
67
69
|
}
|
|
68
70
|
return changed ? out : tree;
|
|
69
71
|
}
|
|
72
|
+
function refsOf(tree, visit) {
|
|
73
|
+
const inline = (nodes) => {
|
|
74
|
+
if (!Array.isArray(nodes)) return;
|
|
75
|
+
for (const n of nodes) {
|
|
76
|
+
if (n.type === "link" && typeof n.href === "string") visit(`l ${n.href}`, { type: "paragraph", inline: [{ type: "link", href: n.href, children: [] }] });
|
|
77
|
+
else if (n.type === "image" && typeof n.src === "string") visit(`i ${n.src}`, { type: "paragraph", inline: [{ type: "image", src: n.src, alt: "" }] });
|
|
78
|
+
inline(n.children);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const blocks = (nodes) => {
|
|
82
|
+
for (const n of nodes ?? []) {
|
|
83
|
+
const o = n;
|
|
84
|
+
inline(o.inline);
|
|
85
|
+
if (typeof o.html === "string" && !htmlIsText(n)) visit(`h ${o.html}`, { type: "html", html: o.html });
|
|
86
|
+
for (const k of ["href", "src"]) {
|
|
87
|
+
const v = n.props?.[k];
|
|
88
|
+
if (typeof v === "string") visit(`${k} ${v}`, { type: "div", props: { [k]: v }, children: [] });
|
|
89
|
+
}
|
|
90
|
+
blocks(n.children);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
blocks(tree);
|
|
94
|
+
}
|
|
95
|
+
function withAgentsRefs(tree, agents) {
|
|
96
|
+
if (!agents) return tree;
|
|
97
|
+
const seen = /* @__PURE__ */ new Set();
|
|
98
|
+
refsOf(tree, (k) => seen.add(k));
|
|
99
|
+
const extra = [];
|
|
100
|
+
refsOf(agents, (k, n) => {
|
|
101
|
+
if (seen.has(k)) return;
|
|
102
|
+
seen.add(k);
|
|
103
|
+
extra.push(n);
|
|
104
|
+
});
|
|
105
|
+
return extra.length ? [...tree, ...extra] : tree;
|
|
106
|
+
}
|
|
70
107
|
var markdownSyntax = {
|
|
71
108
|
id: "markdown/syntax",
|
|
72
109
|
category: "markdown",
|
|
@@ -124,7 +161,7 @@ async function check(input) {
|
|
|
124
161
|
onPageBuilt: (p) => {
|
|
125
162
|
release?.onPage(p);
|
|
126
163
|
const local = p.unit && p.slug.startsWith(p.unit) ? p.slug.slice(p.unit.length).replace(/^\//, "") : p.slug;
|
|
127
|
-
const page = { slug: p.slug, title: p.title, tree: withoutDataNodes(p.tree), headings: [], frontmatter: p.frontmatter };
|
|
164
|
+
const page = { slug: p.slug, title: p.title, tree: withAgentsRefs(withoutDataNodes(p.tree), p.agentsTree && withoutDataNodes(p.agentsTree)), headings: [], frontmatter: p.frontmatter };
|
|
128
165
|
session.page({ ...page, slug: [p.unit, named(local)].filter(Boolean).join("/") }, { path: p.source, text: p.text });
|
|
129
166
|
if (corpusRules.length) unitOf(p.unit).session.page({ ...page, slug: named(local), sourcePath: p.contentPath });
|
|
130
167
|
},
|
|
@@ -147,6 +184,7 @@ async function check(input) {
|
|
|
147
184
|
for (const p of result.problems) {
|
|
148
185
|
if (p.code === "data") issues.push({ ruleId: "data/files", severity: "error", file: p.file ?? "dogsbay.config.yml", ...p.line ? { line: p.line } : {}, message: p.message });
|
|
149
186
|
if (p.code === "example") issues.push({ ruleId: "examples/files", severity: "error", file: p.file ?? "dogsbay.config.yml", ...p.line ? { line: p.line } : {}, message: p.message });
|
|
187
|
+
if (p.code === "choice") issues.push({ ruleId: "choices/valid", severity: "error", file: p.file ?? "dogsbay.config.yml", ...p.line ? { line: p.line } : {}, message: p.message });
|
|
150
188
|
if (p.code === "menu") issues.push({ ruleId: "structure/menu-valid", severity: "warning", file: p.file ?? "dogsbay.config.yml", ...p.line ? { line: p.line } : {}, message: p.message });
|
|
151
189
|
}
|
|
152
190
|
if (releaseRule && release) issues.push(...releaseRule.run({ pages: [], nav: [], config: auditConfig, release: release.finish() }));
|