@x12i/docify-export 1.1.0 → 1.1.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/dist/harden-web.d.ts +51 -0
- package/dist/harden-web.d.ts.map +1 -0
- package/dist/harden-web.js +138 -0
- package/dist/harden-web.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds the file:// serve notice to every page in a built web tree, including
|
|
3
|
+
* static shells that are copied in rather than rendered. Pages whose assets are
|
|
4
|
+
* all relative (book documents) load correctly from disk and are left alone.
|
|
5
|
+
*/
|
|
6
|
+
export declare function injectServeGuard(webDir: string, opts?: {
|
|
7
|
+
serveCommand?: string;
|
|
8
|
+
projectDir?: string;
|
|
9
|
+
}): {
|
|
10
|
+
injected: string[];
|
|
11
|
+
skipped: string[];
|
|
12
|
+
};
|
|
13
|
+
export type AssetKind = "style" | "script" | "image";
|
|
14
|
+
export type AssetIssue = {
|
|
15
|
+
page: string;
|
|
16
|
+
ref: string;
|
|
17
|
+
kind: AssetKind;
|
|
18
|
+
reason: "missing" | "empty";
|
|
19
|
+
};
|
|
20
|
+
export type WebAssetReport = {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
pages: number;
|
|
23
|
+
checked: number;
|
|
24
|
+
/** Missing stylesheets and scripts — these produce an unstyled, dead site. */
|
|
25
|
+
issues: AssetIssue[];
|
|
26
|
+
/** Missing images — reported, but the site still renders and works. */
|
|
27
|
+
warnings: AssetIssue[];
|
|
28
|
+
/** Local asset refs that were found, deduplicated. */
|
|
29
|
+
assets: string[];
|
|
30
|
+
/** Pages that need the file:// notice but do not carry it. */
|
|
31
|
+
unguarded: string[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Fails when a page references CSS/JS that the build did not emit — the failure
|
|
35
|
+
* mode that silently produces an unstyled site.
|
|
36
|
+
*/
|
|
37
|
+
export declare function verifyWebAssets(webDir: string): WebAssetReport;
|
|
38
|
+
export type SmokeResult = {
|
|
39
|
+
ok: boolean;
|
|
40
|
+
failures: {
|
|
41
|
+
path: string;
|
|
42
|
+
status?: number;
|
|
43
|
+
reason: string;
|
|
44
|
+
}[];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Requests the critical shell assets from a running server. Catches build trees
|
|
48
|
+
* that look complete on disk but are not reachable through the served routes.
|
|
49
|
+
*/
|
|
50
|
+
export declare function smokeTestServedSite(baseUrl: string, paths?: string[]): Promise<SmokeResult>;
|
|
51
|
+
//# sourceMappingURL=harden-web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harden-web.d.ts","sourceRoot":"","sources":["../src/harden-web.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,IAAI,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GACxD;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CA0B3C;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,uEAAuE;IACvE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,sDAAsD;IACtD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAuBF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CA4C9D;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/D,CAAC;AAEF;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAM,EAA+D,GAC3E,OAAO,CAAC,WAAW,CAAC,CAsBtB"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join, posix, relative, resolve } from "node:path";
|
|
3
|
+
import { fileProtocolGuardScript, SERVE_GUARD_MARKER } from "@x12i/docify-render";
|
|
4
|
+
function htmlFiles(dir, acc = []) {
|
|
5
|
+
if (!existsSync(dir))
|
|
6
|
+
return acc;
|
|
7
|
+
for (const name of readdirSync(dir)) {
|
|
8
|
+
const abs = join(dir, name);
|
|
9
|
+
if (statSync(abs).isDirectory())
|
|
10
|
+
htmlFiles(abs, acc);
|
|
11
|
+
else if (name.endsWith(".html"))
|
|
12
|
+
acc.push(abs);
|
|
13
|
+
}
|
|
14
|
+
return acc;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Adds the file:// serve notice to every page in a built web tree, including
|
|
18
|
+
* static shells that are copied in rather than rendered. Pages whose assets are
|
|
19
|
+
* all relative (book documents) load correctly from disk and are left alone.
|
|
20
|
+
*/
|
|
21
|
+
export function injectServeGuard(webDir, opts = {}) {
|
|
22
|
+
const guard = fileProtocolGuardScript(opts);
|
|
23
|
+
const injected = [];
|
|
24
|
+
const skipped = [];
|
|
25
|
+
const existing = new RegExp(`<script data-docify-guard="${SERVE_GUARD_MARKER}">[\\s\\S]*?</script>`);
|
|
26
|
+
for (const file of htmlFiles(webDir)) {
|
|
27
|
+
const html = readFileSync(file, "utf8");
|
|
28
|
+
const rel = relative(webDir, file);
|
|
29
|
+
const needsGuard = refsFrom(html).some((r) => r.ref.startsWith("/"));
|
|
30
|
+
if (!needsGuard || !html.includes("</head>") || html.includes(guard)) {
|
|
31
|
+
skipped.push(rel);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
// Render-time guards carry no product context; restamp them with this build's.
|
|
35
|
+
const next = existing.test(html)
|
|
36
|
+
? html.replace(existing, guard)
|
|
37
|
+
: html.replace("</head>", `${guard}\n</head>`);
|
|
38
|
+
writeFileSync(file, next);
|
|
39
|
+
injected.push(rel);
|
|
40
|
+
}
|
|
41
|
+
return { injected, skipped };
|
|
42
|
+
}
|
|
43
|
+
const EXTERNAL = /^(?:[a-z]+:)?\/\/|^data:|^mailto:|^tel:|^#/i;
|
|
44
|
+
function refsFrom(html) {
|
|
45
|
+
const refs = [];
|
|
46
|
+
for (const tag of html.match(/<link[^>]+rel=["'][^"']*stylesheet[^"']*["'][^>]*>/gi) ?? []) {
|
|
47
|
+
const href = tag.match(/href=["']([^"']+)["']/i)?.[1];
|
|
48
|
+
if (href)
|
|
49
|
+
refs.push({ ref: href, kind: "style" });
|
|
50
|
+
}
|
|
51
|
+
for (const m of html.matchAll(/<script[^>]+src=["']([^"']+)["'][^>]*>/gi)) {
|
|
52
|
+
if (m[1])
|
|
53
|
+
refs.push({ ref: m[1], kind: "script" });
|
|
54
|
+
}
|
|
55
|
+
for (const m of html.matchAll(/<img[^>]+src=["']([^"']+)["'][^>]*>/gi)) {
|
|
56
|
+
if (m[1])
|
|
57
|
+
refs.push({ ref: m[1], kind: "image" });
|
|
58
|
+
}
|
|
59
|
+
return refs.filter((r) => r.ref && !EXTERNAL.test(r.ref));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Fails when a page references CSS/JS that the build did not emit — the failure
|
|
63
|
+
* mode that silently produces an unstyled site.
|
|
64
|
+
*/
|
|
65
|
+
export function verifyWebAssets(webDir) {
|
|
66
|
+
const issues = [];
|
|
67
|
+
const warnings = [];
|
|
68
|
+
const assets = new Set();
|
|
69
|
+
const unguarded = [];
|
|
70
|
+
const pages = htmlFiles(webDir);
|
|
71
|
+
let checked = 0;
|
|
72
|
+
for (const file of pages) {
|
|
73
|
+
const html = readFileSync(file, "utf8");
|
|
74
|
+
const pageRel = relative(webDir, file);
|
|
75
|
+
const refs = refsFrom(html);
|
|
76
|
+
if (refs.some((r) => r.ref.startsWith("/")) && !html.includes(SERVE_GUARD_MARKER)) {
|
|
77
|
+
unguarded.push(pageRel);
|
|
78
|
+
}
|
|
79
|
+
for (const { ref, kind } of refs) {
|
|
80
|
+
const clean = ref.split("?")[0].split("#")[0];
|
|
81
|
+
if (!clean)
|
|
82
|
+
continue;
|
|
83
|
+
const abs = clean.startsWith("/")
|
|
84
|
+
? join(webDir, clean.replace(/^\/+/, ""))
|
|
85
|
+
: resolve(dirname(file), clean);
|
|
86
|
+
assets.add(posix.normalize(clean));
|
|
87
|
+
checked += 1;
|
|
88
|
+
let reason = null;
|
|
89
|
+
if (!existsSync(abs))
|
|
90
|
+
reason = "missing";
|
|
91
|
+
else if (statSync(abs).size === 0)
|
|
92
|
+
reason = "empty";
|
|
93
|
+
if (!reason)
|
|
94
|
+
continue;
|
|
95
|
+
const issue = { page: pageRel, ref: clean, kind, reason };
|
|
96
|
+
if (kind === "image")
|
|
97
|
+
warnings.push(issue);
|
|
98
|
+
else
|
|
99
|
+
issues.push(issue);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
ok: issues.length === 0 && unguarded.length === 0,
|
|
104
|
+
pages: pages.length,
|
|
105
|
+
checked,
|
|
106
|
+
issues,
|
|
107
|
+
warnings,
|
|
108
|
+
assets: [...assets].sort(),
|
|
109
|
+
unguarded,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Requests the critical shell assets from a running server. Catches build trees
|
|
114
|
+
* that look complete on disk but are not reachable through the served routes.
|
|
115
|
+
*/
|
|
116
|
+
export async function smokeTestServedSite(baseUrl, paths = ["/", "/assets/site.css", "/assets/extras.css", "/app.js"]) {
|
|
117
|
+
const failures = [];
|
|
118
|
+
const base = baseUrl.replace(/\/+$/, "");
|
|
119
|
+
for (const p of paths) {
|
|
120
|
+
const url = `${base}${p.startsWith("/") ? p : `/${p}`}`;
|
|
121
|
+
try {
|
|
122
|
+
const res = await fetch(url);
|
|
123
|
+
if (!res.ok) {
|
|
124
|
+
failures.push({ path: p, status: res.status, reason: `HTTP ${res.status}` });
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const body = await res.text();
|
|
128
|
+
if (body.trim().length === 0) {
|
|
129
|
+
failures.push({ path: p, status: res.status, reason: "empty response" });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
failures.push({ path: p, reason: String(err.message ?? err) });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return { ok: failures.length === 0, failures };
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=harden-web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harden-web.js","sourceRoot":"","sources":["../src/harden-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAA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AE,MAAM,CAAE,GAAa,CAAC,OAAO,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;AACjD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { assembleUseCaseMarkdown, buildContentBundle, copyBundleInto, type BuildBundleOptions, } from "./build-bundle.js";
|
|
2
2
|
export { buildDocifyLibrary, type BuildDocifyLibraryInput, } from "./build-library.js";
|
|
3
3
|
export { emitOpenKnowledge, type EmitKnowledgeOptions, type EmitKnowledgeResult, } from "./emit-knowledge.js";
|
|
4
|
+
export { injectServeGuard, smokeTestServedSite, verifyWebAssets, type AssetIssue, type SmokeResult, type WebAssetReport, } from "./harden-web.js";
|
|
4
5
|
export { createDocifyPublisher, publishDocifySite, type Publisher, type PublishResult, type PublisherDeps, } from "./publish.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { assembleUseCaseMarkdown, buildContentBundle, copyBundleInto, } from "./build-bundle.js";
|
|
2
2
|
export { buildDocifyLibrary, } from "./build-library.js";
|
|
3
3
|
export { emitOpenKnowledge, } from "./emit-knowledge.js";
|
|
4
|
+
export { injectServeGuard, smokeTestServedSite, verifyWebAssets, } from "./harden-web.js";
|
|
4
5
|
export { createDocifyPublisher, publishDocifySite, } from "./publish.js";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,GAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAIlB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,GAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAIhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAIlB,MAAM,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x12i/docify-export",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Build content bundles, open Markdown/indexes/packs, and Cloudflare Pages publishing for x12i docify.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"node": ">=18.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
"@x12i/docify-core": "^1.1.0",
|
|
29
|
+
"@x12i/docify-render": "^1.1.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@x12i/docify-screenshots": "^1.0.1"
|