ssqch 0.10.0 → 0.10.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/bundled/completions/bash +1 -1
- package/bundled/completions/elvish +1 -0
- package/bundled/completions/fish +1 -0
- package/bundled/completions/powershell +1 -0
- package/bundled/completions/zsh +1 -0
- package/bundled/docs/agents.md +1 -1
- package/bundled/docs/build-summary.md +31 -1
- package/bundled/docs/configuring.md +1 -1
- package/bundled/docs/netlify.md +2 -2
- package/bundled/ssqch.d.ts +7 -2
- package/lib/assets.js +10 -12
- package/lib/{chunk-HDQ4SRWM.js → chunk-26SHWRC6.js} +6 -8
- package/lib/{chunk-2LEOPLTZ.js → chunk-3BQJY6GF.js} +3 -5
- package/lib/{chunk-JXZT5L7W.js → chunk-3LODFCCH.js} +2 -3
- package/lib/{chunk-7HXCQEGA.js → chunk-3NDFUMV2.js} +3 -3
- package/lib/{chunk-Y2ESFAAD.js → chunk-6OUT5VFK.js} +2 -4
- package/lib/{chunk-HXCLCXRT.js → chunk-6RSZV5O2.js} +5 -3
- package/lib/{chunk-4Q6WMTER.js → chunk-7JGYYAKI.js} +1 -1
- package/lib/{chunk-LAV3DEY4.js → chunk-BT3NVQOD.js} +1 -1
- package/lib/{chunk-DDV6JEC2.js → chunk-BXARVN5Z.js} +1 -1
- package/lib/{chunk-RVBNVGZV.js → chunk-CXRHH5P5.js} +5 -6
- package/lib/{chunk-NFJJKDRI.js → chunk-DNWA7WNO.js} +1 -1
- package/lib/{chunk-E5UB2YY7.js → chunk-DTSTCVRX.js} +8 -9
- package/lib/{chunk-HGJ5VWUR.js → chunk-DUGGZ4EE.js} +1 -1
- package/lib/{chunk-LCPSKHAV.js → chunk-ERNVEZOK.js} +1 -1
- package/lib/{chunk-CB6YFUXU.js → chunk-FYRC2HBU.js} +4 -6
- package/lib/{chunk-DW7VMJEZ.js → chunk-FYU22VDK.js} +12 -13
- package/lib/{chunk-N4O5MDIB.js → chunk-FZGJUJAL.js} +5 -7
- package/lib/{chunk-RKFZSVNF.js → chunk-G67W2FTJ.js} +9 -11
- package/lib/{chunk-DMVJ53SM.js → chunk-HMVYNV6M.js} +13 -15
- package/lib/{chunk-SRNLKWXL.js → chunk-HNG372DW.js} +91 -47
- package/lib/{chunk-ZM6TU2JB.js → chunk-II7ZRIAC.js} +11 -13
- package/lib/{chunk-5DNDSNTP.js → chunk-IOXCGMSF.js} +5 -7
- package/lib/{chunk-BGCBSQ4A.js → chunk-JFPLNHEQ.js} +136 -25
- package/lib/{chunk-NUUEOGLZ.js → chunk-LU73FTIR.js} +10 -11
- package/lib/{chunk-EEJDLCD3.js → chunk-LYPKL524.js} +9 -10
- package/lib/{chunk-NKXEPHRZ.js → chunk-MDB3D3LP.js} +106 -4
- package/lib/{chunk-SA5KSJ4Y.js → chunk-MDG5A4NI.js} +10 -12
- package/lib/{chunk-3HHRKG33.js → chunk-MUYWL4ZX.js} +11 -12
- package/lib/{chunk-QMA7CK7B.js → chunk-P2TRR6XK.js} +59 -23
- package/lib/{chunk-RJFWTW2Y.js → chunk-R2YGC3VE.js} +2 -3
- package/lib/{chunk-JWCCVTTR.js → chunk-RFNLZM7W.js} +2 -4
- package/lib/{chunk-3EPHKJEG.js → chunk-X7C6GFUM.js} +4 -4
- package/lib/{chunk-RM5Q3KFB.js → chunk-XR7GFL4B.js} +12 -13
- package/lib/{chunk-Q4LFTYK2.js → chunk-ZZBHBLDB.js} +16 -18
- package/lib/cli.js +25 -25
- package/lib/elements.js +10 -12
- package/lib/image.js +10 -11
- package/lib/links.js +10 -12
- package/lib/minify.js +9 -10
- package/lib/redirects.js +10 -12
- package/lib/rss.js +10 -11
- package/lib/sass.js +10 -12
- package/lib/sitemap.js +10 -12
- package/lib/ssqch.js +4 -5
- package/package.json +1 -1
- package/types/index.d.ts +7 -2
- package/lib/chunk-VJWQSYEG.js +0 -119
- /package/lib/{chunk-SRNLKWXL.js.LEGAL.txt → chunk-HNG372DW.js.LEGAL.txt} +0 -0
- /package/lib/{chunk-BGCBSQ4A.js.LEGAL.txt → chunk-JFPLNHEQ.js.LEGAL.txt} +0 -0
|
@@ -2,17 +2,17 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
budget
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ERNVEZOK.js";
|
|
6
6
|
import {
|
|
7
7
|
bytes,
|
|
8
8
|
count
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MDB3D3LP.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
12
|
} from "./chunk-AD3HAW3W.js";
|
|
13
13
|
import {
|
|
14
14
|
CONFIG_FILES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BXARVN5Z.js";
|
|
16
16
|
import {
|
|
17
17
|
WebAssembly,
|
|
18
18
|
applyMarkdownOptions,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
probeFile,
|
|
23
23
|
site,
|
|
24
24
|
undecodable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IOXCGMSF.js";
|
|
26
26
|
import {
|
|
27
27
|
closest
|
|
28
28
|
} from "./chunk-FVZ5JBRI.js";
|
|
29
29
|
import {
|
|
30
30
|
globProblem,
|
|
31
31
|
globToRegExp
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DNWA7WNO.js";
|
|
33
33
|
import {
|
|
34
34
|
describeThrown,
|
|
35
35
|
hookModules,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
loadedFiles,
|
|
38
38
|
settle,
|
|
39
39
|
watchSettle
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RFNLZM7W.js";
|
|
41
41
|
import {
|
|
42
42
|
charCount,
|
|
43
43
|
firstChars,
|
|
@@ -51,7 +51,9 @@ import {
|
|
|
51
51
|
TomlError,
|
|
52
52
|
aliasUsed,
|
|
53
53
|
bail,
|
|
54
|
+
compareText,
|
|
54
55
|
context,
|
|
56
|
+
displayPath,
|
|
55
57
|
error,
|
|
56
58
|
find,
|
|
57
59
|
isPlainObject,
|
|
@@ -59,17 +61,13 @@ import {
|
|
|
59
61
|
otherGenerator,
|
|
60
62
|
progress,
|
|
61
63
|
readToml,
|
|
64
|
+
realPath,
|
|
65
|
+
shown,
|
|
62
66
|
toDate,
|
|
63
67
|
tomlReason,
|
|
64
68
|
warn,
|
|
65
69
|
warning
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import {
|
|
68
|
-
compareText,
|
|
69
|
-
displayPath,
|
|
70
|
-
realPath,
|
|
71
|
-
shown
|
|
72
|
-
} from "./chunk-VJWQSYEG.js";
|
|
70
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
73
71
|
import {
|
|
74
72
|
__require
|
|
75
73
|
} from "./chunk-I3PS26CI.js";
|
|
@@ -1992,6 +1990,20 @@ function publish(cache, out, a = statOf(cache)) {
|
|
|
1992
1990
|
linkOrCopy(cache, out);
|
|
1993
1991
|
return Number(a?.size ?? statOf(out)?.size ?? 0);
|
|
1994
1992
|
}
|
|
1993
|
+
async function publishLater(cache, out) {
|
|
1994
|
+
try {
|
|
1995
|
+
await fs4.promises.link(cache, out);
|
|
1996
|
+
} catch {
|
|
1997
|
+
const [there, source] = [statOf(out), statOf(cache)];
|
|
1998
|
+
if (there && source && there.size === source.size) return void 0;
|
|
1999
|
+
try {
|
|
2000
|
+
await fs4.promises.copyFile(cache, out);
|
|
2001
|
+
} catch (e) {
|
|
2002
|
+
return new Error(`copying ${out} into the output: ${e.message}`);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
return void 0;
|
|
2006
|
+
}
|
|
1995
2007
|
function linkOrCopy(from, to) {
|
|
1996
2008
|
try {
|
|
1997
2009
|
fs4.linkSync(from, to);
|
|
@@ -2059,9 +2071,13 @@ var ImageProcessor = class {
|
|
|
2059
2071
|
sizes = /* @__PURE__ */ new Map();
|
|
2060
2072
|
/** Everything this build is still waiting for, settled or not. */
|
|
2061
2073
|
pending = [];
|
|
2074
|
+
/** Cached files being linked into the output (publishLater), each resolving to its error if it failed. */
|
|
2075
|
+
placing = [];
|
|
2062
2076
|
/** Each source with files still to make that something points at, by its path: one that fails fails the build. */
|
|
2063
2077
|
watched = /* @__PURE__ */ new Map();
|
|
2064
2078
|
generated = 0;
|
|
2079
|
+
/** GIFs and SVGs copied as they are (no encode, and no cache), apart from `generated`. */
|
|
2080
|
+
copied = 0;
|
|
2065
2081
|
pruned = 0;
|
|
2066
2082
|
converted = /* @__PURE__ */ new Set();
|
|
2067
2083
|
used = /* @__PURE__ */ new Set();
|
|
@@ -2111,6 +2127,7 @@ var ImageProcessor = class {
|
|
|
2111
2127
|
this.made.clear();
|
|
2112
2128
|
this.sizes.clear();
|
|
2113
2129
|
this.pending = [];
|
|
2130
|
+
this.placing = [];
|
|
2114
2131
|
this.watched.clear();
|
|
2115
2132
|
this.used.clear();
|
|
2116
2133
|
this.sources.clear();
|
|
@@ -2118,6 +2135,7 @@ var ImageProcessor = class {
|
|
|
2118
2135
|
this.timings = [];
|
|
2119
2136
|
if (this.options.hashCache) this.hashes.load(path4.join(root, CACHE_FILE));
|
|
2120
2137
|
this.generated = 0;
|
|
2138
|
+
this.copied = 0;
|
|
2121
2139
|
this.pruned = 0;
|
|
2122
2140
|
}
|
|
2123
2141
|
/**
|
|
@@ -2133,6 +2151,10 @@ var ImageProcessor = class {
|
|
|
2133
2151
|
this.pending = [];
|
|
2134
2152
|
await Promise.all(waiting2);
|
|
2135
2153
|
}
|
|
2154
|
+
const placing = this.placing;
|
|
2155
|
+
this.placing = [];
|
|
2156
|
+
const failed2 = (await Promise.all(placing)).find((e) => e !== void 0);
|
|
2157
|
+
if (failed2) throw new BuildError(`images: ${failed2.message}`);
|
|
2136
2158
|
const root = this.context().root;
|
|
2137
2159
|
const failures = [...this.watched.values()].filter((w) => w.error !== void 0).map((w) => ({ ...w, file: shown(root, w.src) })).sort((a, b) => a.file < b.file ? -1 : a.file > b.file ? 1 : 0);
|
|
2138
2160
|
if (!failures.length) return;
|
|
@@ -2328,8 +2350,9 @@ var ImageProcessor = class {
|
|
|
2328
2350
|
const e = entry(srcFormat, w, h, w > 0 ? `${id}-${w}.${srcFormat}` : `${id}.${srcFormat}`);
|
|
2329
2351
|
const t = mtimeOf(e.path);
|
|
2330
2352
|
if (!(t !== void 0 && (sourceTime === void 0 || t >= sourceTime)) && !this.files.has(e.path)) {
|
|
2331
|
-
|
|
2332
|
-
this.
|
|
2353
|
+
const out = e.path;
|
|
2354
|
+
this.placing.push(fs4.promises.copyFile(src, out).then(() => void 0, (err) => new Error(`copying ${src} to ${out}: ${err.message}`)));
|
|
2355
|
+
this.copied++;
|
|
2333
2356
|
}
|
|
2334
2357
|
this.files.set(e.path, "reused");
|
|
2335
2358
|
return { formats: /* @__PURE__ */ new Map([[srcFormat, [e]]]), auto: formats.includes("auto") ? srcFormat : void 0, ready: READY };
|
|
@@ -2375,11 +2398,18 @@ var ImageProcessor = class {
|
|
|
2375
2398
|
const cached = s.file !== s.e.path;
|
|
2376
2399
|
if (s.found === "cache") {
|
|
2377
2400
|
if (cached) {
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2401
|
+
const [a, b] = [s.stat, statOf(s.e.path)];
|
|
2402
|
+
if (!(a && b && a.size === b.size && b.mtimeNs >= a.mtimeNs)) {
|
|
2403
|
+
if (b) {
|
|
2404
|
+
try {
|
|
2405
|
+
fs4.rmSync(s.e.path, { force: true });
|
|
2406
|
+
} catch (e) {
|
|
2407
|
+
throw new Error(`copying ${s.e.path} into the output: ${e.message}`);
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
this.placing.push(publishLater(s.file, s.e.path));
|
|
2382
2411
|
}
|
|
2412
|
+
this.sizes.set(s.e.path, Number(a?.size ?? 0));
|
|
2383
2413
|
} else this.sizes.set(s.e.path, Number(s.stat.size));
|
|
2384
2414
|
} else {
|
|
2385
2415
|
try {
|
|
@@ -2573,8 +2603,9 @@ var ImageProcessor = class {
|
|
|
2573
2603
|
let size = 0;
|
|
2574
2604
|
for (const p of this.used) size += this.sizes.get(p) ?? fs4.statSync(p, { throwIfNoEntry: false })?.size ?? 0;
|
|
2575
2605
|
const sources = this.sources.size;
|
|
2576
|
-
const
|
|
2577
|
-
|
|
2606
|
+
const copied = Math.min(this.copied, this.used.size);
|
|
2607
|
+
const encoded = Math.min(this.generated, this.used.size - copied);
|
|
2608
|
+
let line = `${count(this.used.size)} file${this.used.size === 1 ? "" : "s"} from ${count(sources)} source${sources === 1 ? "" : "s"}, ${bytes(size)}: ${count(encoded)} encoded, ${copied > 0 ? `${count(copied)} copied, ` : ""}${count(this.used.size - encoded - copied)} reused`;
|
|
2578
2609
|
if (this.converted.size > 0) line += ` (${count(this.converted.size)} source${this.converted.size === 1 ? "" : "s"} converted to sRGB)`;
|
|
2579
2610
|
if (this.options.prune) line += `, ${count(this.pruned)} pruned`;
|
|
2580
2611
|
return line;
|
|
@@ -3304,6 +3335,8 @@ function emptyConfig(options) {
|
|
|
3304
3335
|
serving: options.serving ?? false,
|
|
3305
3336
|
quiet: options.quiet ?? false,
|
|
3306
3337
|
verbose: options.verbose ?? false,
|
|
3338
|
+
profile: options.profile ?? false,
|
|
3339
|
+
definedIn: /* @__PURE__ */ new Map(),
|
|
3307
3340
|
input: ".",
|
|
3308
3341
|
output: "_site",
|
|
3309
3342
|
includes: "_includes",
|
|
@@ -3500,6 +3533,9 @@ async function loadJs(config, file) {
|
|
|
3500
3533
|
const earlier = names[kind].get(key);
|
|
3501
3534
|
if (earlier) fail(`${where}: ${singular} "${key}" is already defined by ${earlier}`);
|
|
3502
3535
|
names[kind].set(key, where);
|
|
3536
|
+
ops.push(() => {
|
|
3537
|
+
config.definedIn.set(`${kind}.${key}`, where);
|
|
3538
|
+
});
|
|
3503
3539
|
};
|
|
3504
3540
|
const functions = (kind, singular, value, where, add) => {
|
|
3505
3541
|
if (value === void 0) return;
|
|
@@ -3658,8 +3694,8 @@ async function loadJs(config, file) {
|
|
|
3658
3694
|
if (typeof out !== "string") throw new TypeError(`engine "${key}" returned ${out === void 0 ? "undefined" : typeof out} for ${inputPath}; return the rendered text`);
|
|
3659
3695
|
return out;
|
|
3660
3696
|
};
|
|
3661
|
-
const run = (source, data, inputPath) => {
|
|
3662
|
-
const out = render.call(engine, source, data);
|
|
3697
|
+
const run = (source, data, inputPath, context2) => {
|
|
3698
|
+
const out = render.call(engine, source, data, context2);
|
|
3663
3699
|
return out instanceof Promise ? watchSettle(out).then((v) => checked(v, inputPath)) : checked(out, inputPath);
|
|
3664
3700
|
};
|
|
3665
3701
|
ops.push(() => {
|
|
@@ -9,9 +9,8 @@ import {
|
|
|
9
9
|
starterEngines,
|
|
10
10
|
starterFiles,
|
|
11
11
|
write
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-VJWQSYEG.js";
|
|
12
|
+
} from "./chunk-6OUT5VFK.js";
|
|
13
|
+
import "./chunk-JFPLNHEQ.js";
|
|
15
14
|
import "./chunk-I3PS26CI.js";
|
|
16
15
|
export {
|
|
17
16
|
DEFAULT_ENGINE,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
BuildError
|
|
5
|
-
} from "./chunk-BGCBSQ4A.js";
|
|
6
|
-
import {
|
|
4
|
+
BuildError,
|
|
7
5
|
realPath
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
9
7
|
|
|
10
8
|
// src/modules.ts
|
|
11
9
|
import fs from "node:fs";
|
|
@@ -2,20 +2,20 @@ 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-6OUT5VFK.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULTS,
|
|
8
8
|
configOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-P2TRR6XK.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
12
|
} from "./chunk-AD3HAW3W.js";
|
|
13
13
|
import {
|
|
14
14
|
CONFIG_FILES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BXARVN5Z.js";
|
|
16
16
|
import {
|
|
17
17
|
red
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/capabilities.ts
|
|
21
21
|
var MODULE_EXPORTS = [
|
|
@@ -2,25 +2,24 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
OUTPUT_LIST
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-HNG372DW.js";
|
|
6
|
+
import "./chunk-7JGYYAKI.js";
|
|
7
|
+
import "./chunk-FYRC2HBU.js";
|
|
8
|
+
import "./chunk-FZGJUJAL.js";
|
|
9
|
+
import "./chunk-P2TRR6XK.js";
|
|
10
|
+
import "./chunk-ERNVEZOK.js";
|
|
11
11
|
import {
|
|
12
12
|
count
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MDB3D3LP.js";
|
|
14
14
|
import "./chunk-AD3HAW3W.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-BXARVN5Z.js";
|
|
16
|
+
import "./chunk-IOXCGMSF.js";
|
|
17
17
|
import "./chunk-FVZ5JBRI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-DNWA7WNO.js";
|
|
19
19
|
import "./chunk-UU43WIZG.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-RFNLZM7W.js";
|
|
21
21
|
import "./chunk-CMUWRPSQ.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-VJWQSYEG.js";
|
|
22
|
+
import "./chunk-JFPLNHEQ.js";
|
|
24
23
|
import "./chunk-I3PS26CI.js";
|
|
25
24
|
|
|
26
25
|
// src/commands/sighting.ts
|
|
@@ -2,36 +2,36 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isAsset
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3BQJY6GF.js";
|
|
6
6
|
import {
|
|
7
7
|
build
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-HNG372DW.js";
|
|
9
|
+
import "./chunk-7JGYYAKI.js";
|
|
10
|
+
import "./chunk-FYRC2HBU.js";
|
|
11
|
+
import "./chunk-FZGJUJAL.js";
|
|
12
12
|
import {
|
|
13
13
|
filesRead
|
|
14
14
|
} from "./chunk-3NYSSA2C.js";
|
|
15
15
|
import {
|
|
16
16
|
fileHash
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-BT3NVQOD.js";
|
|
18
|
+
import "./chunk-P2TRR6XK.js";
|
|
19
|
+
import "./chunk-ERNVEZOK.js";
|
|
20
20
|
import {
|
|
21
21
|
summary
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MDB3D3LP.js";
|
|
23
23
|
import "./chunk-AD3HAW3W.js";
|
|
24
24
|
import {
|
|
25
25
|
dirsOf
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-BXARVN5Z.js";
|
|
27
|
+
import "./chunk-IOXCGMSF.js";
|
|
28
28
|
import "./chunk-FVZ5JBRI.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-DNWA7WNO.js";
|
|
30
30
|
import "./chunk-UU43WIZG.js";
|
|
31
31
|
import {
|
|
32
32
|
describeThrown,
|
|
33
33
|
loadedFiles
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RFNLZM7W.js";
|
|
35
35
|
import "./chunk-CMUWRPSQ.js";
|
|
36
36
|
import {
|
|
37
37
|
BuildError,
|
|
@@ -40,16 +40,14 @@ import {
|
|
|
40
40
|
aliasesKnown,
|
|
41
41
|
aliasesUsed,
|
|
42
42
|
describe,
|
|
43
|
+
isInside,
|
|
43
44
|
messageOf,
|
|
44
45
|
printError,
|
|
45
|
-
red
|
|
46
|
-
} from "./chunk-BGCBSQ4A.js";
|
|
47
|
-
import {
|
|
48
|
-
isInside,
|
|
49
46
|
realPath,
|
|
47
|
+
red,
|
|
50
48
|
relative,
|
|
51
49
|
slashes
|
|
52
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
53
51
|
import "./chunk-I3PS26CI.js";
|
|
54
52
|
|
|
55
53
|
// src/serve/build-process.ts
|
package/lib/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire as __ssqchCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __ssqchCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
BUILDER
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BT3NVQOD.js";
|
|
6
6
|
import {
|
|
7
7
|
Printed,
|
|
8
8
|
UsageError,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_ENGINE,
|
|
13
13
|
bundled
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6OUT5VFK.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
17
|
} from "./chunk-AD3HAW3W.js";
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
parseEnvironment,
|
|
21
21
|
shownDir,
|
|
22
22
|
shownOutput
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BXARVN5Z.js";
|
|
24
24
|
import {
|
|
25
25
|
describeThrown
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RFNLZM7W.js";
|
|
27
27
|
import {
|
|
28
28
|
prettyJson,
|
|
29
29
|
quoted
|
|
@@ -42,16 +42,14 @@ import {
|
|
|
42
42
|
printError,
|
|
43
43
|
progress,
|
|
44
44
|
red,
|
|
45
|
+
relative,
|
|
45
46
|
setQuiet,
|
|
46
47
|
takeWarnings,
|
|
47
48
|
toJson,
|
|
48
49
|
toJson2,
|
|
49
50
|
warn,
|
|
50
51
|
warning
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import {
|
|
53
|
-
relative
|
|
54
|
-
} from "./chunk-VJWQSYEG.js";
|
|
52
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
55
53
|
import "./chunk-I3PS26CI.js";
|
|
56
54
|
|
|
57
55
|
// src/cli.ts
|
|
@@ -75,7 +73,7 @@ var COMMANDS = [
|
|
|
75
73
|
{
|
|
76
74
|
name: "build",
|
|
77
75
|
about: "Build the site (default)",
|
|
78
|
-
options: [FORMAT],
|
|
76
|
+
options: [FORMAT, { long: "profile", help: "Also time every page, template, layout, engine, filter, transform, data file, collection and hook, and list the slowest" }],
|
|
79
77
|
positionals: [],
|
|
80
78
|
afterHelp: "With --format json, standard output is one JSON report: whether the build worked, what it wrote, and its\nwarnings and errors, each with a code, the file, the line when it's known, and the field for a content error.\nProgress lines and `console.log` go to standard error."
|
|
81
79
|
},
|
|
@@ -318,23 +316,23 @@ async function main(argv) {
|
|
|
318
316
|
`);
|
|
319
317
|
return 1;
|
|
320
318
|
}
|
|
321
|
-
if (command === "import") return (await import("./chunk-
|
|
319
|
+
if (command === "import") return (await import("./chunk-II7ZRIAC.js")).runImport(cli.positionals[0], cli.positionals[1] ?? ".", flag("write"));
|
|
322
320
|
switch (command) {
|
|
323
321
|
case "init":
|
|
324
|
-
return (await import("./chunk-
|
|
322
|
+
return (await import("./chunk-R2YGC3VE.js")).runInit({ dir: cli.positionals[0] ?? ".", starter: value("starter") ?? "site", engine: value("engine") ?? DEFAULT_ENGINE, quiet: flag("quiet") });
|
|
325
323
|
case "capabilities":
|
|
326
|
-
return (await import("./chunk-
|
|
324
|
+
return (await import("./chunk-LU73FTIR.js")).runCapabilities(format, CAPABILITY_ORDER);
|
|
327
325
|
case "docs":
|
|
328
|
-
return (await import("./chunk-
|
|
326
|
+
return (await import("./chunk-MUYWL4ZX.js")).runDocs(GRAMMAR, { query: cli.positionals, from: value("from"), format });
|
|
329
327
|
case "sighting":
|
|
330
|
-
return (await import("./chunk-
|
|
328
|
+
return (await import("./chunk-XR7GFL4B.js")).runSighting(path.resolve(value("root") ?? "."));
|
|
331
329
|
case "completions": {
|
|
332
330
|
process.stdout.write(bundled(`completions/${cli.positionals[0]}`));
|
|
333
331
|
return 0;
|
|
334
332
|
}
|
|
335
333
|
case "types": {
|
|
336
334
|
routeConsole();
|
|
337
|
-
return (await import("./chunk-
|
|
335
|
+
return (await import("./chunk-LYPKL524.js")).runTypes({ root: value("root"), out: value("out") ?? "ssqch.d.ts" });
|
|
338
336
|
}
|
|
339
337
|
}
|
|
340
338
|
const many = (name) => Array.isArray(cli.options[name]) ? cli.options[name] : typeof cli.options[name] === "string" ? [cli.options[name]] : [];
|
|
@@ -360,15 +358,15 @@ async function main(argv) {
|
|
|
360
358
|
const root = path.resolve(value("root") ?? ".");
|
|
361
359
|
siteRoot = root;
|
|
362
360
|
routeConsole();
|
|
363
|
-
const makeConfig = async () => (await import("./chunk-
|
|
361
|
+
const makeConfig = async () => (await import("./chunk-DTSTCVRX.js")).loadConfig({ root, rootGiven: value("root") ?? ".", env, serving, quiet: flag("quiet") || inspecting, verbose: flag("verbose"), profile: command === "build" && flag("profile"), output: value("output"), base: value("base") });
|
|
364
362
|
if (command === "new") return newPage(makeConfig, root, { path: cli.positionals[0], title: value("title"), date: value("date"), blueprint: value("blueprint"), set: cli.options.set ?? [], format });
|
|
365
363
|
if (serving) {
|
|
366
|
-
if (building) return (await import("./chunk-
|
|
364
|
+
if (building) return (await import("./chunk-ZZBHBLDB.js")).runBuilder(building, makeConfig, root);
|
|
367
365
|
const readyFile = value("ready-file") === void 0 ? void 0 : path.resolve(value("ready-file"));
|
|
368
366
|
const options = { port: Number(value("port") ?? "8080"), readyFile, quiet: flag("quiet") };
|
|
369
367
|
if (!flag("built")) {
|
|
370
368
|
try {
|
|
371
|
-
return await (await import("./chunk-
|
|
369
|
+
return await (await import("./chunk-MDG5A4NI.js")).serve(argv, options);
|
|
372
370
|
} catch (e) {
|
|
373
371
|
printError("error:", e, "build", new Locator(root));
|
|
374
372
|
return 1;
|
|
@@ -382,7 +380,7 @@ async function main(argv) {
|
|
|
382
380
|
return 1;
|
|
383
381
|
}
|
|
384
382
|
try {
|
|
385
|
-
return await (await import("./chunk-
|
|
383
|
+
return await (await import("./chunk-MDG5A4NI.js")).serveBuilt(config2, options);
|
|
386
384
|
} catch (e) {
|
|
387
385
|
printError("error:", e, "build", locatorOf(config2));
|
|
388
386
|
return 1;
|
|
@@ -411,9 +409,10 @@ async function main(argv) {
|
|
|
411
409
|
await runFootprint(shownDir(config, config.output), shownOutput(config), top, format);
|
|
412
410
|
return 0;
|
|
413
411
|
}
|
|
414
|
-
const [{ build }, { summary }] = await Promise.all([import("./chunk-
|
|
412
|
+
const [{ build }, { summary, profileText }] = await Promise.all([import("./chunk-FYU22VDK.js"), import("./chunk-6RSZV5O2.js")]);
|
|
415
413
|
const report = await build(config);
|
|
416
414
|
if (!config.quiet) process.stdout.write(summary(config, report));
|
|
415
|
+
if (report.profile) process.stdout.write(profileText(report.profile));
|
|
417
416
|
return 0;
|
|
418
417
|
} catch (e) {
|
|
419
418
|
printError("error:", e, "build", locatorOf(config));
|
|
@@ -429,7 +428,7 @@ async function newPage(makeConfig, root, command) {
|
|
|
429
428
|
return 1;
|
|
430
429
|
}
|
|
431
430
|
try {
|
|
432
|
-
(await import("./chunk-
|
|
431
|
+
(await import("./chunk-G67W2FTJ.js")).runNew(config, command);
|
|
433
432
|
return 0;
|
|
434
433
|
} catch (e) {
|
|
435
434
|
printError("error:", e, "build", locatorOf(config));
|
|
@@ -441,7 +440,7 @@ var checkFormat = (format) => {
|
|
|
441
440
|
};
|
|
442
441
|
async function runInspect(config, target, name, format) {
|
|
443
442
|
checkFormat(format);
|
|
444
|
-
const { field, fieldText, inspect, inspectionJson, inspectionText } = await import("./chunk-
|
|
443
|
+
const { field, fieldText, inspect, inspectionJson, inspectionText } = await import("./chunk-HMVYNV6M.js");
|
|
445
444
|
let report;
|
|
446
445
|
try {
|
|
447
446
|
report = await inspect(config, target);
|
|
@@ -461,7 +460,7 @@ async function runDiff(dirs, options) {
|
|
|
461
460
|
const [before, after] = dirs;
|
|
462
461
|
try {
|
|
463
462
|
checkFormat(options.format);
|
|
464
|
-
const [{ rustRegExp }, { globProblem, globToRegExp }, { compare, compareRuns, diffJson, diffText, isSame, runsJson, runsText }] = await Promise.all([import("./chunk-IAFM5ITE.js"), import("./chunk-
|
|
463
|
+
const [{ rustRegExp }, { globProblem, globToRegExp }, { compare, compareRuns, diffJson, diffText, isSame, runsJson, runsText }] = await Promise.all([import("./chunk-IAFM5ITE.js"), import("./chunk-3LODFCCH.js"), import("./chunk-26SHWRC6.js")]);
|
|
465
464
|
const ignore = options.ignore.map((pattern) => {
|
|
466
465
|
try {
|
|
467
466
|
return rustRegExp(pattern, "g");
|
|
@@ -493,7 +492,7 @@ async function runDiff(dirs, options) {
|
|
|
493
492
|
}
|
|
494
493
|
async function runFootprint(dir, shown, top, format) {
|
|
495
494
|
checkFormat(format);
|
|
496
|
-
const { footprintJson, footprintText, measure } = await import("./chunk-
|
|
495
|
+
const { footprintJson, footprintText, measure } = await import("./chunk-CXRHH5P5.js");
|
|
497
496
|
const measured = await measure(dir);
|
|
498
497
|
if (format === "json") process.stdout.write(JSON.stringify(footprintJson(measured, shown, top), null, 2) + "\n");
|
|
499
498
|
else process.stdout.write(footprintText(measured, shown, top));
|
|
@@ -517,7 +516,7 @@ async function buildJson(makeConfig, root, env) {
|
|
|
517
516
|
const dirs = dirsOf(config);
|
|
518
517
|
out.output = shownOutput(config);
|
|
519
518
|
try {
|
|
520
|
-
const report = await (await import("./chunk-
|
|
519
|
+
const report = await (await import("./chunk-FYU22VDK.js")).build(config);
|
|
521
520
|
out.durationMs = ms(report.durationMs);
|
|
522
521
|
out.pages = { written: report.pagesWritten, templates: report.templates, bytes: report.pageBytes, new: report.pagesNew ?? null, gone: report.pagesGone ?? null };
|
|
523
522
|
out.copied = { files: report.filesCopied, unchanged: report.filesUnchanged, bytes: report.passthroughBytes };
|
|
@@ -526,6 +525,7 @@ async function buildJson(makeConfig, root, env) {
|
|
|
526
525
|
out.written = report.written.map((file) => relative(dirs.output, file));
|
|
527
526
|
out.summary = report.summary.map(([label, text]) => ({ label, value: text }));
|
|
528
527
|
out.timings = report.timings.map(([phase, time]) => ({ phase, ms: ms(time) }));
|
|
528
|
+
if (report.profile) out.profile = Object.fromEntries(Object.entries(report.profile).map(([kind, list]) => [kind, list.map((e) => ({ name: e.name, calls: e.calls, ms: ms(e.ms), async: e.async }))]));
|
|
529
529
|
errors = [];
|
|
530
530
|
} catch (e) {
|
|
531
531
|
errors = fromError(e, "build", locatorOf(config));
|
package/lib/elements.js
CHANGED
|
@@ -2,36 +2,34 @@ 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-DUGGZ4EE.js";
|
|
6
6
|
import {
|
|
7
7
|
BUILTINS,
|
|
8
8
|
debugString,
|
|
9
9
|
rewriteHtml,
|
|
10
10
|
withBase
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-P2TRR6XK.js";
|
|
12
|
+
import "./chunk-ERNVEZOK.js";
|
|
13
13
|
import {
|
|
14
14
|
count
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MDB3D3LP.js";
|
|
16
16
|
import "./chunk-AD3HAW3W.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BXARVN5Z.js";
|
|
18
|
+
import "./chunk-IOXCGMSF.js";
|
|
19
19
|
import "./chunk-FVZ5JBRI.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-DNWA7WNO.js";
|
|
21
21
|
import "./chunk-UU43WIZG.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-RFNLZM7W.js";
|
|
23
23
|
import "./chunk-CMUWRPSQ.js";
|
|
24
24
|
import {
|
|
25
25
|
bail,
|
|
26
|
-
context
|
|
27
|
-
} from "./chunk-BGCBSQ4A.js";
|
|
28
|
-
import {
|
|
29
26
|
compareText,
|
|
27
|
+
context,
|
|
30
28
|
displayPath,
|
|
31
29
|
isDir,
|
|
32
30
|
isFile,
|
|
33
31
|
slashes
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JFPLNHEQ.js";
|
|
35
33
|
import "./chunk-I3PS26CI.js";
|
|
36
34
|
|
|
37
35
|
// src/modules/elements.ts
|
package/lib/image.js
CHANGED
|
@@ -4,21 +4,20 @@ import {
|
|
|
4
4
|
image,
|
|
5
5
|
imagePlugin,
|
|
6
6
|
imageUrl
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-3NDFUMV2.js";
|
|
8
|
+
import "./chunk-DUGGZ4EE.js";
|
|
9
|
+
import "./chunk-P2TRR6XK.js";
|
|
10
|
+
import "./chunk-ERNVEZOK.js";
|
|
11
|
+
import "./chunk-MDB3D3LP.js";
|
|
12
12
|
import "./chunk-AD3HAW3W.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-BXARVN5Z.js";
|
|
14
|
+
import "./chunk-IOXCGMSF.js";
|
|
15
15
|
import "./chunk-FVZ5JBRI.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-DNWA7WNO.js";
|
|
17
17
|
import "./chunk-UU43WIZG.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-RFNLZM7W.js";
|
|
19
19
|
import "./chunk-CMUWRPSQ.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-VJWQSYEG.js";
|
|
20
|
+
import "./chunk-JFPLNHEQ.js";
|
|
22
21
|
import "./chunk-I3PS26CI.js";
|
|
23
22
|
export {
|
|
24
23
|
image,
|