@domandigital/craft 0.16.0 → 0.18.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/CHANGELOG.md +17 -0
- package/CHARACTER.md +41 -6
- package/COPY.md +5 -0
- package/README.md +31 -1
- package/REGISTERS.md +163 -0
- package/dist/{audit-UJCUWORL.js → audit-4SFSLCKY.js} +3 -2
- package/dist/audit.cjs +1 -1
- package/dist/audit.d.cts +7 -0
- package/dist/audit.d.ts +7 -0
- package/dist/audit.js +1 -1
- package/dist/chunk-4QWEAL4G.js +1595 -0
- package/dist/{chunk-WAV6AKR4.js → chunk-6TSDYETQ.js} +4 -2
- package/dist/{chunk-TQKDCA4V.js → chunk-DARKHE6A.js} +7 -5
- package/dist/{chunk-LXDNIJFG.js → chunk-O5B5ELJH.js} +28 -20
- package/dist/chunk-QIEDBL4J.js +9 -0
- package/dist/{chunk-CVG5GSMN.js → chunk-RJVG5KA6.js} +8 -6
- package/dist/{chunk-YK2FFL6Z.js → chunk-SL5VZJ2J.js} +1 -1
- package/dist/{chunk-B2MJLGF6.js → chunk-WFB6F3BN.js} +65 -1633
- package/dist/{chunk-LWVGIJ5A.js → chunk-ZUYERAFM.js} +11 -6
- package/dist/{cli-AVYNHBFJ.js → cli-BN4IT6N2.js} +5 -3
- package/dist/{cli-PEATEW57.js → cli-GXIW7F3E.js} +7 -5
- package/dist/cli-JB4X5LAG.js +1573 -0
- package/dist/{cli-52M62QBN.js → cli-JZRQBCD4.js} +7 -5
- package/dist/{cli-3GQROFCB.js → cli-MDW7JTEF.js} +15 -10
- package/dist/{cli-CWORJYOU.js → cli-V44QEVS6.js} +12 -9
- package/dist/{cli-K4LSRYBE.js → cli-Y7Y5IROK.js} +8 -5
- package/dist/cli.js +4 -2
- package/dist/index.cjs +1549 -101
- package/dist/index.d.cts +247 -1
- package/dist/index.d.ts +247 -1
- package/dist/index.js +1529 -101
- package/package.json +3 -2
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
generate
|
|
3
3
|
} from "./chunk-OQXTQQAU.js";
|
|
4
4
|
import {
|
|
5
|
-
parseFlags
|
|
5
|
+
parseFlags
|
|
6
|
+
} from "./chunk-O5B5ELJH.js";
|
|
7
|
+
import {
|
|
6
8
|
toJson
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QIEDBL4J.js";
|
|
8
10
|
import {
|
|
9
11
|
readSnapshot
|
|
10
12
|
} from "./chunk-WUACK2HX.js";
|
|
@@ -15,13 +17,15 @@ import {
|
|
|
15
17
|
auditSnapshot,
|
|
16
18
|
checkCopy,
|
|
17
19
|
extractHtml,
|
|
18
|
-
extractStrings,
|
|
19
20
|
fingerprint,
|
|
20
21
|
harvest,
|
|
21
22
|
hueSwatch,
|
|
22
23
|
nullPrompt,
|
|
23
24
|
scanSource
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WFB6F3BN.js";
|
|
26
|
+
import {
|
|
27
|
+
extractStrings
|
|
28
|
+
} from "./chunk-4QWEAL4G.js";
|
|
25
29
|
|
|
26
30
|
// src/null/cli.ts
|
|
27
31
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "fs";
|
|
@@ -63,6 +67,7 @@ function loadNull(target, cwd) {
|
|
|
63
67
|
}
|
|
64
68
|
function measureRun(id, html, snapshot, styles = []) {
|
|
65
69
|
const file = { path: `${id}.html`, text: html };
|
|
70
|
+
snapshot = { ...snapshot, home: snapshot.home ?? true };
|
|
66
71
|
const tells = new Set([...auditSnapshot(snapshot).findings, ...scanSource([file, ...styles]).findings].map((f) => f.tell));
|
|
67
72
|
let copy = [...new Set(extractStrings(file).filter((b) => !b.literal).map((b) => b.text.replace(/\s+/g, " ").trim()).filter(Boolean))];
|
|
68
73
|
if (copy.length === 0) copy = [...new Set(snapshot.sections.flatMap((s) => s.text ?? []).map((t) => t.replace(/\s+/g, " ").trim()).filter(Boolean))];
|
|
@@ -115,7 +120,7 @@ async function build(flags, io) {
|
|
|
115
120
|
const toShoot = ids.filter((id) => existsSync(join(pages, `${id}.html`)) && !existsSync(join(shots, `${id}.json`)));
|
|
116
121
|
if (toShoot.length) {
|
|
117
122
|
io.out(`craft null: snapshotting ${toShoot.length} page${toShoot.length === 1 ? "" : "s"}`);
|
|
118
|
-
const { snapshotUrls } = await import("./audit-
|
|
123
|
+
const { snapshotUrls } = await import("./audit-4SFSLCKY.js");
|
|
119
124
|
const results = await snapshotUrls(toShoot.map((id) => pathToFileURL(join(pages, `${id}.html`)).href));
|
|
120
125
|
results.forEach((r, i) => {
|
|
121
126
|
const id = toShoot[i];
|
|
@@ -236,7 +241,7 @@ async function importPages(flags, io) {
|
|
|
236
241
|
const toShoot = pages.filter((p) => !existsSync(join(shots, `${p.id}.json`)));
|
|
237
242
|
if (toShoot.length) {
|
|
238
243
|
io.out(`craft null: snapshotting ${toShoot.length} page${toShoot.length === 1 ? "" : "s"} from ${flags.builder}`);
|
|
239
|
-
const { snapshotUrls } = await import("./audit-
|
|
244
|
+
const { snapshotUrls } = await import("./audit-4SFSLCKY.js");
|
|
240
245
|
const servers = /* @__PURE__ */ new Map();
|
|
241
246
|
try {
|
|
242
247
|
for (const p of toShoot) if (!servers.has(p.root)) servers.set(p.root, await serveDir(p.root));
|
|
@@ -9,11 +9,13 @@ import {
|
|
|
9
9
|
runHarvest,
|
|
10
10
|
runNull,
|
|
11
11
|
serveDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZUYERAFM.js";
|
|
13
13
|
import "./chunk-OQXTQQAU.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-O5B5ELJH.js";
|
|
15
|
+
import "./chunk-QIEDBL4J.js";
|
|
15
16
|
import "./chunk-WUACK2HX.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-WFB6F3BN.js";
|
|
18
|
+
import "./chunk-4QWEAL4G.js";
|
|
17
19
|
import "./chunk-QYBAVU3P.js";
|
|
18
20
|
export {
|
|
19
21
|
describeTypicality,
|
|
@@ -4,13 +4,15 @@ import {
|
|
|
4
4
|
formatPairs,
|
|
5
5
|
loadEstate,
|
|
6
6
|
runEstate
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RJVG5KA6.js";
|
|
8
|
+
import "./chunk-6TSDYETQ.js";
|
|
9
|
+
import "./chunk-ZUYERAFM.js";
|
|
10
10
|
import "./chunk-OQXTQQAU.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-O5B5ELJH.js";
|
|
12
|
+
import "./chunk-QIEDBL4J.js";
|
|
12
13
|
import "./chunk-WUACK2HX.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-WFB6F3BN.js";
|
|
15
|
+
import "./chunk-4QWEAL4G.js";
|
|
14
16
|
import "./chunk-QYBAVU3P.js";
|
|
15
17
|
export {
|
|
16
18
|
formatComponentPairs,
|