@dogsbay/ssg-cli 0.2.0-beta.178 → 0.2.0-beta.179
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-6VT3ZZKE.mjs → build-command-6FIW5T7T.mjs} +1 -1
- package/chunks/{check-command-JHIOF55J.mjs → check-command-57FHOWYE.mjs} +2 -2
- package/chunks/{chunk-3O2UA2GP.mjs → chunk-LOCUA7KI.mjs} +778 -132
- package/chunks/{chunk-VZBVWLWQ.mjs → chunk-NWU47LUN.mjs} +1 -1
- package/chunks/{dev-5FQMGMCX.mjs → dev-OX4NVOZ3.mjs} +16 -11
- package/chunks/{publish-command-XYUBSAQD.mjs → publish-command-EPRXQCMM.mjs} +1 -1
- package/chunks/{release-diff-ANIJOQNZ.mjs → release-diff-VEGTEHOM.mjs} +2 -2
- package/cli.mjs +6 -6
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
filePagesIndex,
|
|
18
18
|
insideProject,
|
|
19
19
|
languageTables,
|
|
20
|
-
|
|
20
|
+
memberPaths,
|
|
21
21
|
parseConfig,
|
|
22
22
|
projectFile,
|
|
23
23
|
projectRoots,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
translationTables,
|
|
34
34
|
versionsOf,
|
|
35
35
|
writeTranslationStubs
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LOCUA7KI.mjs";
|
|
37
37
|
import {
|
|
38
38
|
contentType
|
|
39
39
|
} from "./chunk-CMGKSS45.mjs";
|
|
@@ -224,6 +224,7 @@ async function openDevSession(input, o = {}) {
|
|
|
224
224
|
return lazy ?? c;
|
|
225
225
|
};
|
|
226
226
|
const pageFor = (source) => unitOf(source)?.handle.pageForSource(source);
|
|
227
|
+
const pagesFor = (source) => unitOf(source)?.handle.pagesForSource(source) ?? [];
|
|
227
228
|
const fresh = async (path) => {
|
|
228
229
|
try {
|
|
229
230
|
await get(path);
|
|
@@ -241,6 +242,7 @@ async function openDevSession(input, o = {}) {
|
|
|
241
242
|
return buildProblem;
|
|
242
243
|
},
|
|
243
244
|
pageFor,
|
|
245
|
+
pagesFor,
|
|
244
246
|
async record(path) {
|
|
245
247
|
if (!o.dataLines) return void 0;
|
|
246
248
|
const u = [...units.values()].find((x) => x.handle.pageOuts.includes(path));
|
|
@@ -254,8 +256,7 @@ async function openDevSession(input, o = {}) {
|
|
|
254
256
|
const pages = new Set(filePagesIndex([...units.values()].flatMap((u) => u.handle.records()))[file] ?? []);
|
|
255
257
|
if (options?.render === false) {
|
|
256
258
|
for (const u of units.values()) for (const r of u.handle.bodyReaders(file)) pages.add(r);
|
|
257
|
-
const own
|
|
258
|
-
if (own) pages.add(own);
|
|
259
|
+
for (const own of pagesFor(file)) pages.add(own);
|
|
259
260
|
}
|
|
260
261
|
return [...pages].sort();
|
|
261
262
|
},
|
|
@@ -324,6 +325,7 @@ async function openDevSession(input, o = {}) {
|
|
|
324
325
|
const again = /* @__PURE__ */ new Map();
|
|
325
326
|
const markStale = (page, u = unitForSitePath(page), rebuilt = false) => {
|
|
326
327
|
stale.add(page);
|
|
328
|
+
for (const b of u?.handle.booksOf(page) ?? []) stale.add(b);
|
|
327
329
|
const src = u?.handle.sourceForPage(page);
|
|
328
330
|
if (src === void 0) return;
|
|
329
331
|
marked.add(src);
|
|
@@ -415,12 +417,13 @@ async function openDevSession(input, o = {}) {
|
|
|
415
417
|
const text = content === void 0 ? void 0 : await textOf(content);
|
|
416
418
|
const same = page !== void 0 && text !== void 0 && u.handle.sameFrontMatter(p, text);
|
|
417
419
|
const readers2 = (same || !page && u.handle.neverPage(p)) && u.handle.included(p) ? u.handle.includeReaders(p) : void 0;
|
|
420
|
+
const all = u.handle.pagesForSource(p);
|
|
418
421
|
if (same && !u.handle.included(p)) {
|
|
419
|
-
markStale(
|
|
422
|
+
for (const x of all) markStale(x, u);
|
|
420
423
|
mark("page");
|
|
421
424
|
} else if (readers2) {
|
|
422
425
|
u.handle.forget(p);
|
|
423
|
-
|
|
426
|
+
for (const x of all) markStale(x, u);
|
|
424
427
|
for (const r of readers2) markStale(r, u);
|
|
425
428
|
mark("page");
|
|
426
429
|
} else {
|
|
@@ -437,12 +440,14 @@ async function openDevSession(input, o = {}) {
|
|
|
437
440
|
mark("unit");
|
|
438
441
|
} else {
|
|
439
442
|
mark("asset");
|
|
440
|
-
const
|
|
441
|
-
const key = u.unit.prefix ? `${u.unit.prefix}/${at}` : at;
|
|
443
|
+
const held = memberPaths(u.unit, p).map((x) => x.path);
|
|
442
444
|
const sanitizing = (config.html ?? input.defaultHtml ?? "keep") === "sanitize";
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
445
|
+
for (const at of held.length ? held : [p.slice(sourceRoot(u.unit.source).length)]) {
|
|
446
|
+
const key = u.unit.prefix ? `${u.unit.prefix}/${at}` : at;
|
|
447
|
+
if (key === "_headers" || key === "_redirects") continue;
|
|
448
|
+
if (copiedPath(at) && await assetVerdict(at, content, input.untrusted === true, sanitizing) === "copy") out.set(key, content);
|
|
449
|
+
else out.delete(key);
|
|
450
|
+
}
|
|
446
451
|
}
|
|
447
452
|
}
|
|
448
453
|
if (lazy.size) for (const s of ctx.state.stubs) out.delete(s);
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
releaseDiff,
|
|
10
10
|
releaseExitCode,
|
|
11
11
|
releaseRedirects
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NWU47LUN.mjs";
|
|
13
13
|
import {
|
|
14
14
|
buildUnits,
|
|
15
15
|
parseConfig,
|
|
16
16
|
readBuildFiles,
|
|
17
17
|
versionsOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LOCUA7KI.mjs";
|
|
19
19
|
import "./chunk-KFYMG4VB.mjs";
|
|
20
20
|
import "./chunk-5APY2GH6.mjs";
|
|
21
21
|
import "./chunk-YVSP26OS.mjs";
|
package/cli.mjs
CHANGED
|
@@ -37,16 +37,16 @@ async function main() {
|
|
|
37
37
|
usage(1);
|
|
38
38
|
}
|
|
39
39
|
if (wantsHelp(args)) usage(0, cmd);
|
|
40
|
-
if (cmd === "build") return (await import("./chunks/build-command-
|
|
41
|
-
if (cmd === "assemble") return (await import("./chunks/build-command-
|
|
42
|
-
if (cmd === "check") return (await import("./chunks/check-command-
|
|
43
|
-
if (cmd === "publish") return (await import("./chunks/publish-command-
|
|
40
|
+
if (cmd === "build") return (await import("./chunks/build-command-6FIW5T7T.mjs")).runBuild(args, HIGHLIGHT_WORKER);
|
|
41
|
+
if (cmd === "assemble") return (await import("./chunks/build-command-6FIW5T7T.mjs")).runBuild(args, HIGHLIGHT_WORKER, { assemble: true });
|
|
42
|
+
if (cmd === "check") return (await import("./chunks/check-command-57FHOWYE.mjs")).runCheck(args);
|
|
43
|
+
if (cmd === "publish") return (await import("./chunks/publish-command-EPRXQCMM.mjs")).runPublish(args);
|
|
44
44
|
if (cmd === "release-diff") {
|
|
45
45
|
const from = option(args, "--from")[0];
|
|
46
46
|
const gitFrom = option(args, "--git-from")[0];
|
|
47
47
|
const o = { from, gitFrom, json: flag(args, "--json"), write: flag(args, "--write"), candidates: flag(args, "--candidates"), strict: flag(args, "--strict") };
|
|
48
48
|
const project = resolve(positional(args, "."));
|
|
49
|
-
const { runReleaseDiff } = await import("./chunks/release-diff-
|
|
49
|
+
const { runReleaseDiff } = await import("./chunks/release-diff-VEGTEHOM.mjs");
|
|
50
50
|
process.exitCode = await runReleaseDiff(project, o);
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -58,7 +58,7 @@ async function main() {
|
|
|
58
58
|
const llms = flag(args, "--llms");
|
|
59
59
|
const project = resolve(positional(args, "."));
|
|
60
60
|
const t0 = performance.now();
|
|
61
|
-
const { dev, readyLine, serverUrl } = await import("./chunks/dev-
|
|
61
|
+
const { dev, readyLine, serverUrl } = await import("./chunks/dev-OX4NVOZ3.mjs");
|
|
62
62
|
const { server } = await dev(project, port, { diagrams: !noDiagrams, lazy, search: noSearchDev ? false : void 0, llms, token: process.env.DOGSBAY_DEV_TOKEN || void 0, listening: (s) => console.log(readyLine(s)) });
|
|
63
63
|
console.log(`dev server for ${project} at ${serverUrl(server)} (ready in ${Math.round(performance.now() - t0)} ms); watching for changes`);
|
|
64
64
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/ssg-cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.179",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The dogsbay-ssg command: build, check, preview and publish Dogsbay-MD documentation sites that work offline",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"NOTICE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dogsbay/icons": "0.2.0-beta.
|
|
21
|
+
"@dogsbay/icons": "0.2.0-beta.179",
|
|
22
22
|
"@mermanjs/web-render": "0.9.3"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|