typerighter 0.38.1 → 0.40.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/{app-Bnln5XCo.js → app-GI_8rzn8.js} +339 -338
- package/dist/{cli-DEOw0tox.js → cli-CPY9dpTQ.js} +28 -26
- package/dist/cli.js +1 -1
- package/dist/client/app/index.d.ts +8 -0
- package/dist/client/app/index.d.ts.map +1 -1
- package/dist/client/theme-default.js +174 -174
- package/dist/client.js +1 -1
- package/dist/context-CNTdcpo4.js +192 -0
- package/dist/index.js +3 -3
- package/dist/{init-BhEVxNbG.js → init-YypOGdjI.js} +9 -6
- package/dist/jsonld-e_0GNJdS.js +84 -0
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/build/prerender.d.ts +21 -0
- package/dist/node/build/prerender.d.ts.map +1 -1
- package/dist/node/build/prerenderWorker.d.ts +2 -0
- package/dist/node/build/prerenderWorker.d.ts.map +1 -0
- package/dist/node/build/seo/feed.d.ts +3 -0
- package/dist/node/build/seo/feed.d.ts.map +1 -0
- package/dist/node/build/seo/index.d.ts +5 -0
- package/dist/node/build/seo/index.d.ts.map +1 -0
- package/dist/node/build/seo/jsonld.d.ts +10 -0
- package/dist/node/build/seo/jsonld.d.ts.map +1 -0
- package/dist/node/build/seo/page.d.ts +6 -0
- package/dist/node/build/seo/page.d.ts.map +1 -0
- package/dist/node/build/seo/sitemap.d.ts +3 -0
- package/dist/node/build/seo/sitemap.d.ts.map +1 -0
- package/dist/node/cli/index.d.ts.map +1 -1
- package/dist/node/lib/htmlTemplate.d.ts +30 -0
- package/dist/node/lib/htmlTemplate.d.ts.map +1 -0
- package/dist/node/lib/render/vue.d.ts.map +1 -1
- package/dist/node/lib/worker-pool/index.d.ts +21 -0
- package/dist/node/lib/worker-pool/index.d.ts.map +1 -0
- package/dist/node/plugin/vite/virtual/app.d.ts +2 -0
- package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
- package/dist/prerenderWorker.js +39 -0
- package/dist/rolldown-runtime-B0aSnxlc.js +20 -0
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/types/ssg.d.ts +6 -0
- package/dist/shared/types/ssg.d.ts.map +1 -1
- package/dist/shared/utils/time.d.ts +1 -0
- package/dist/shared/utils/time.d.ts.map +1 -1
- package/dist/shared/utils/url.d.ts +1 -0
- package/dist/shared/utils/url.d.ts.map +1 -1
- package/dist/{shared-l3GF0JOc.js → shared-LPNgvigl.js} +111 -120
- package/dist/shared.js +2 -2
- package/dist/{vite-DACnySpv.js → vite-Djs3IU9Y.js} +508 -587
- package/dist/vite.js +1 -1
- package/package.json +7 -7
- package/dist/node/lib/html-template.d.ts +0 -22
- package/dist/node/lib/html-template.d.ts.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as e, t } from "./vite-Djs3IU9Y.js";
|
|
2
|
+
import { n } from "./context-CNTdcpo4.js";
|
|
2
3
|
import r from "node:path";
|
|
3
4
|
import i from "picocolors";
|
|
4
5
|
import { createServer as a } from "vite";
|
|
@@ -361,21 +362,21 @@ function k() {
|
|
|
361
362
|
A("runtime", e);
|
|
362
363
|
}), process.on("unhandledRejection", (e) => {
|
|
363
364
|
A("runtime", e instanceof Error ? e : Error(String(e)));
|
|
364
|
-
}), i.command("[root]", "Start dev server").alias("dev").option("--port <port>", "Port to listen on").option("--host", "Expose to network").option("--fresh", "Start fresh, ignore cache from previous session").option("--verbose", "Print version and build info").action(async (e,
|
|
365
|
-
|
|
365
|
+
}), i.command("[root]", "Start dev server").alias("dev").option("--port <port>", "Port to listen on").option("--host", "Expose to network").option("--fresh", "Start fresh, ignore cache from previous session").option("--verbose", "Print version and build info").action(async (e, n) => {
|
|
366
|
+
n.verbose && console.log(`${O} cli v0.40.1 (built 9/24/2026, 5:24:01 AM)\n`), n.fresh && (process.env.TYPEDOWN_NO_CACHE = "1");
|
|
366
367
|
let r = await a({
|
|
367
368
|
root: M(e),
|
|
368
369
|
configFile: !1,
|
|
369
|
-
plugins: [
|
|
370
|
+
plugins: [t()],
|
|
370
371
|
server: {
|
|
371
|
-
port:
|
|
372
|
-
strictPort:
|
|
373
|
-
host:
|
|
372
|
+
port: n.port === void 0 ? void 0 : Number(n.port),
|
|
373
|
+
strictPort: n.port !== void 0,
|
|
374
|
+
host: n.host
|
|
374
375
|
}
|
|
375
376
|
});
|
|
376
377
|
await r.listen(), r.printUrls();
|
|
377
|
-
}), i.command("build [root]", "Build for production").option("--outDir <dir>", "Output directory", { default: "dist" }).option("--base <path>", "Base public path").option("--verbose", "Print version and build info").action(async (
|
|
378
|
-
let i =
|
|
378
|
+
}), i.command("build [root]", "Build for production").option("--outDir <dir>", "Output directory", { default: "dist" }).option("--base <path>", "Base public path").option("--verbose", "Print version and build info").action(async (t, r) => {
|
|
379
|
+
let i = n(M(t));
|
|
379
380
|
r.verbose && await j(i);
|
|
380
381
|
try {
|
|
381
382
|
await e(i, {
|
|
@@ -385,30 +386,31 @@ function k() {
|
|
|
385
386
|
} finally {
|
|
386
387
|
i.dispose();
|
|
387
388
|
}
|
|
389
|
+
process.exit(0);
|
|
388
390
|
}), i.command("init [root]", "Scaffold a new project").option("--name <name>", "Project name").option("--title <title>", "Site title").option("--description <description>", "Site description").option("--yes", "Skip confirmation for existing projects").action(async (e, t) => {
|
|
389
|
-
let { initialize: n } = await import("./init-
|
|
391
|
+
let { initialize: n } = await import("./init-YypOGdjI.js");
|
|
390
392
|
await n(M(e), t);
|
|
391
|
-
}), i.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e,
|
|
392
|
-
let r = M(e), i =
|
|
393
|
+
}), i.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
|
|
394
|
+
let r = M(e), i = n(r);
|
|
393
395
|
try {
|
|
394
|
-
let e = (await (await i.getTdContext()).getConfig()).basePath, { preview:
|
|
395
|
-
(await
|
|
396
|
+
let e = (await (await i.getTdContext()).getConfig()).basePath, { preview: n } = await import("vite");
|
|
397
|
+
(await n({
|
|
396
398
|
root: r,
|
|
397
399
|
base: e,
|
|
398
|
-
preview: { port:
|
|
400
|
+
preview: { port: t.port === void 0 ? void 0 : Number(t.port) }
|
|
399
401
|
})).printUrls();
|
|
400
402
|
} finally {
|
|
401
403
|
i.dispose();
|
|
402
404
|
}
|
|
403
|
-
}), i.command("check [root]", "Check vault for errors").option("--fix", "Auto-fix formatting issues").option("--verbose", "Print version and build info").action(async (e,
|
|
404
|
-
let i =
|
|
405
|
-
|
|
405
|
+
}), i.command("check [root]", "Check vault for errors").option("--fix", "Auto-fix formatting issues").option("--verbose", "Print version and build info").action(async (e, t) => {
|
|
406
|
+
let i = n(M(e));
|
|
407
|
+
t.verbose && await j(i);
|
|
406
408
|
let { logger: a } = i;
|
|
407
409
|
try {
|
|
408
410
|
a.start("Checking vault...");
|
|
409
|
-
let e = await i.getTdContext(),
|
|
410
|
-
for (let e of
|
|
411
|
-
if (
|
|
411
|
+
let e = await i.getTdContext(), n = await e.checkVault();
|
|
412
|
+
for (let e of n.diagnostics) e.severity === "error" ? a.error(`${e.filepath}:${e.line}:${e.column} ${e.message} (${e.code})`) : a.warn(`${e.filepath}:${e.line}:${e.column} ${e.message} (${e.code})`);
|
|
413
|
+
if (t.fix && 0 < n.warningCount) {
|
|
412
414
|
let t = await e.getConfig(), n = await e.listFiles(), i = 0;
|
|
413
415
|
for (let a of n) {
|
|
414
416
|
let n = await e.formatFile(a);
|
|
@@ -419,20 +421,20 @@ function k() {
|
|
|
419
421
|
}
|
|
420
422
|
0 < i && a.success(`Fixed ${i} file(s)`);
|
|
421
423
|
}
|
|
422
|
-
let s = `${
|
|
423
|
-
0 <
|
|
424
|
+
let s = `${n.fileCount} files checked, ${n.errorCount} error(s), ${n.warningCount} warning(s)`;
|
|
425
|
+
0 < n.errorCount ? (a.error(s), process.exit(1)) : a.success(s);
|
|
424
426
|
} finally {
|
|
425
427
|
i.dispose();
|
|
426
428
|
}
|
|
427
|
-
}), i.help(), i.version("0.
|
|
429
|
+
}), i.help(), i.version("0.40.1"), i.parse();
|
|
428
430
|
}
|
|
429
431
|
function A(e, t) {
|
|
430
432
|
let n = t instanceof Error ? t.message : String(t);
|
|
431
|
-
console.error(`\n${O} ${i.red(`${e} failed`)}\n`), console.error(i.red(n)), console.error(""), process.exit(1);
|
|
433
|
+
console.error(`\n${O} ${i.red(`${e} failed`)}\n`), console.error(i.red(n)), t instanceof Error && t.stack && console.error(i.red(t.stack)), console.error(""), process.exit(1);
|
|
432
434
|
}
|
|
433
435
|
async function j(e) {
|
|
434
436
|
let t = await (await e.getTdContext()).rpc.getVersion();
|
|
435
|
-
console.log(`${O} cli v0.
|
|
437
|
+
console.log(`${O} cli v0.40.1 (built 9/24/2026, 5:24:01 AM)`), console.log(`${O} rpc v${t}`), console.log("");
|
|
436
438
|
}
|
|
437
439
|
function M(e) {
|
|
438
440
|
return r.resolve(e ?? process.cwd());
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./cli-
|
|
1
|
+
import { t as e } from "./cli-CPY9dpTQ.js";
|
|
2
2
|
export { e as cli };
|
|
@@ -11,6 +11,10 @@ export interface TypedownSiteConfig {
|
|
|
11
11
|
description: string;
|
|
12
12
|
/** URL base path (e.g. "/" or "/blog") */
|
|
13
13
|
basePath: string;
|
|
14
|
+
/** Absolute site URL (e.g. "https://example.com") */
|
|
15
|
+
origin?: string;
|
|
16
|
+
/** HTML lang attribute */
|
|
17
|
+
lang?: string;
|
|
14
18
|
/** Repository URL */
|
|
15
19
|
repo?: string;
|
|
16
20
|
/** Site author */
|
|
@@ -53,6 +57,10 @@ export declare function useSiteConfig(): {
|
|
|
53
57
|
description: string;
|
|
54
58
|
/** URL base path (e.g. "/" or "/blog") */
|
|
55
59
|
basePath: string;
|
|
60
|
+
/** Absolute site URL (e.g. "https://example.com") */
|
|
61
|
+
origin?: string;
|
|
62
|
+
/** HTML lang attribute */
|
|
63
|
+
lang?: string;
|
|
56
64
|
/** Repository URL */
|
|
57
65
|
repo?: string;
|
|
58
66
|
/** Site author */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,GAAG,EACR,KAAK,SAAS,EAEd,KAAK,GAAG,EACR,KAAK,UAAU,EAChB,MAAM,KAAK,CAAC;AAWb,OAAO,EACuB,KAAK,MAAM,EACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EAAE,QAAQ,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,GACR,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,kDAAkD;IAClD,WAAW,EAAE,WAAW,CAAC;IACzB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC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