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
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, r as i, s as a, t as o } from "./app-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, r as i, s as a, t as o } from "./app-GI_8rzn8.js";
|
|
2
2
|
export { a as Content, o as createTypedownApp, t as useRoute, r as useRouter, i as useSiteConfig, n as useSiteData, e as useTdContent };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import e from "node:path";
|
|
2
|
+
import t from "picocolors";
|
|
3
|
+
import { createLogger as n } from "vite";
|
|
4
|
+
import r from "node:fs";
|
|
5
|
+
import { RpcServer as i } from "@typerighter/rpc-server";
|
|
6
|
+
import { RPC_CANCELLED_CODE as a, RpcClient as o } from "@typerighter/rpc-client";
|
|
7
|
+
//#region src/node/lib/logger.ts
|
|
8
|
+
var s = /\u001B\[[0-9;]*m/g, c = class {
|
|
9
|
+
logStream;
|
|
10
|
+
constructor(e) {
|
|
11
|
+
e !== void 0 && (this.logStream = r.createWriteStream(e, { flags: "a" }), process.once("exit", () => this.close()));
|
|
12
|
+
}
|
|
13
|
+
info(e) {
|
|
14
|
+
console.log(t.cyan(`ℹ ${e}`)), this.writeToFile("INFO", e);
|
|
15
|
+
}
|
|
16
|
+
warn(e) {
|
|
17
|
+
console.warn(t.yellow(`⚠ ${e}`)), this.writeToFile("WARN", e);
|
|
18
|
+
}
|
|
19
|
+
error(e) {
|
|
20
|
+
console.error(t.red(`✖ ${e}`)), this.writeToFile("ERROR", e);
|
|
21
|
+
}
|
|
22
|
+
success(e) {
|
|
23
|
+
console.log(t.green(`✔ ${e}`)), this.writeToFile("SUCCESS", e);
|
|
24
|
+
}
|
|
25
|
+
start(e) {
|
|
26
|
+
console.log(t.cyan(`◐ ${e}`)), this.writeToFile("START", e);
|
|
27
|
+
}
|
|
28
|
+
log(e) {
|
|
29
|
+
console.log(e), this.writeToFile("LOG", e);
|
|
30
|
+
}
|
|
31
|
+
writeToFile(e, t) {
|
|
32
|
+
if (!this.logStream) return;
|
|
33
|
+
let n = (/* @__PURE__ */ new Date()).toISOString(), r = t.replace(s, "");
|
|
34
|
+
this.logStream.write(`${n} [${e}] ${r}\n`);
|
|
35
|
+
}
|
|
36
|
+
close() {
|
|
37
|
+
this.logStream?.end(), this.logStream = void 0;
|
|
38
|
+
}
|
|
39
|
+
}, l = new c(), u = class {
|
|
40
|
+
client;
|
|
41
|
+
constructor(e) {
|
|
42
|
+
this.client = e, this.registerNotificationHandlers(e);
|
|
43
|
+
}
|
|
44
|
+
cachedConfig;
|
|
45
|
+
cachedFiles;
|
|
46
|
+
cachedSchemas;
|
|
47
|
+
cachedSchemaMap = /* @__PURE__ */ new Map();
|
|
48
|
+
cachedFileMap = /* @__PURE__ */ new Map();
|
|
49
|
+
registerNotificationHandlers(e) {
|
|
50
|
+
e.onConfigChanged((e) => {
|
|
51
|
+
this.cachedConfig = e;
|
|
52
|
+
}), e.onContentUpdated(({ filepath: e, affectedFiles: t = [] }) => {
|
|
53
|
+
this.cachedFiles = void 0, this.cachedFileMap.delete(e);
|
|
54
|
+
for (let e of t) this.cachedFileMap.delete(e);
|
|
55
|
+
}), e.onContentDeleted(({ filepath: e }) => {
|
|
56
|
+
this.cachedFiles = void 0, this.cachedFileMap.delete(e);
|
|
57
|
+
}), e.onSchemaUpdated(({ schema: e }) => {
|
|
58
|
+
this.cachedSchemas = void 0, this.cachedSchemaMap.delete(e);
|
|
59
|
+
}), e.onSchemaDeleted(({ schema: e }) => {
|
|
60
|
+
this.cachedSchemas = void 0, this.cachedSchemaMap.delete(e);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
get rpc() {
|
|
64
|
+
return this.client;
|
|
65
|
+
}
|
|
66
|
+
async getFile(e) {
|
|
67
|
+
let t = this.cachedFileMap.get(e);
|
|
68
|
+
if (t) return t;
|
|
69
|
+
let n = await f(() => this.rpc.requestFile(e));
|
|
70
|
+
return this.cachedFileMap.set(e, n), n;
|
|
71
|
+
}
|
|
72
|
+
async getFiles(e) {
|
|
73
|
+
let t = e.filter((e) => !this.cachedFileMap.has(e));
|
|
74
|
+
if (0 < t.length) {
|
|
75
|
+
let e = await f(() => this.rpc.requestFiles(t));
|
|
76
|
+
for (let [n, r] of t.entries()) this.cachedFileMap.set(r, e[n]);
|
|
77
|
+
}
|
|
78
|
+
return e.map((e) => this.cachedFileMap.get(e));
|
|
79
|
+
}
|
|
80
|
+
async listFiles() {
|
|
81
|
+
return this.cachedFiles ||= await f(() => this.rpc.listVault()), this.cachedFiles;
|
|
82
|
+
}
|
|
83
|
+
async listSidebar() {
|
|
84
|
+
return f(() => this.rpc.listSidebar());
|
|
85
|
+
}
|
|
86
|
+
async getConfig() {
|
|
87
|
+
return this.cachedConfig ||= await f(() => this.rpc.getConfig()), this.cachedConfig;
|
|
88
|
+
}
|
|
89
|
+
async getSchema(e) {
|
|
90
|
+
let t = this.cachedSchemaMap.get(e);
|
|
91
|
+
if (t) return t;
|
|
92
|
+
let n = await f(() => this.rpc.getSchema(e));
|
|
93
|
+
return this.cachedSchemaMap.set(e, n), n;
|
|
94
|
+
}
|
|
95
|
+
async listSchemas() {
|
|
96
|
+
return this.cachedSchemas ||= await f(() => this.rpc.listSchemas()), this.cachedSchemas;
|
|
97
|
+
}
|
|
98
|
+
async checkVault() {
|
|
99
|
+
return f(() => this.rpc.checkVault());
|
|
100
|
+
}
|
|
101
|
+
async formatFile(e) {
|
|
102
|
+
return f(() => this.rpc.formatFile(e));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
function d(e) {
|
|
106
|
+
return e instanceof Error && "code" in e && e.code === a;
|
|
107
|
+
}
|
|
108
|
+
async function f(e, t = 5) {
|
|
109
|
+
for (let n = 0; n < t; n++) try {
|
|
110
|
+
return await e();
|
|
111
|
+
} catch (e) {
|
|
112
|
+
if (!d(e) || n === t - 1) throw e;
|
|
113
|
+
await new Promise((e) => setTimeout(e, 50 * (n + 1)));
|
|
114
|
+
}
|
|
115
|
+
throw Error("unreachable");
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/node/context.ts
|
|
119
|
+
var p = ["typedown.yaml", "typedown.yml"];
|
|
120
|
+
function m(e) {
|
|
121
|
+
let t = new c(_(e));
|
|
122
|
+
function r() {
|
|
123
|
+
let e = n("warn");
|
|
124
|
+
return {
|
|
125
|
+
...e,
|
|
126
|
+
info(e) {
|
|
127
|
+
t.writeToFile("VITE", e);
|
|
128
|
+
},
|
|
129
|
+
warn(n) {
|
|
130
|
+
e.warn(n), t.writeToFile("VITE:WARN", n);
|
|
131
|
+
},
|
|
132
|
+
error(n) {
|
|
133
|
+
e.error(n), t.writeToFile("VITE:ERROR", n);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
let a, s, l, d = !1;
|
|
138
|
+
function f() {
|
|
139
|
+
t.log(""), h(), process.exit(0);
|
|
140
|
+
}
|
|
141
|
+
function p() {
|
|
142
|
+
h();
|
|
143
|
+
}
|
|
144
|
+
async function m() {
|
|
145
|
+
if (a) return a;
|
|
146
|
+
process.on("SIGINT", f), process.on("SIGTERM", f), s = new i({ root: e }), await new Promise((e, t) => {
|
|
147
|
+
s?.once("error", t), s?.listen(() => {
|
|
148
|
+
s?.removeListener("error", t), e();
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
let t = s.host, n = s.port;
|
|
152
|
+
if (t === void 0 || n === void 0) throw Error("RPC server started but host/port not available");
|
|
153
|
+
return l = await o.connectTcp(t, n), a = new u(l), s.unref(), process.on("exit", p), a;
|
|
154
|
+
}
|
|
155
|
+
function h() {
|
|
156
|
+
d || (d = !0, process.removeListener("exit", p), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), l?.dispose(), s?.close(), a = void 0, s = void 0, l = void 0);
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
root: e,
|
|
160
|
+
logger: t,
|
|
161
|
+
getTdContext: m,
|
|
162
|
+
createViteLogger: r,
|
|
163
|
+
dispose: h
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function h(t) {
|
|
167
|
+
let n = e.resolve(t);
|
|
168
|
+
for (;;) {
|
|
169
|
+
if (g(n)) return n;
|
|
170
|
+
let t = e.dirname(n);
|
|
171
|
+
if (t === n) break;
|
|
172
|
+
n = t;
|
|
173
|
+
}
|
|
174
|
+
return e.resolve(t);
|
|
175
|
+
}
|
|
176
|
+
function g(t) {
|
|
177
|
+
return p.some((n) => r.existsSync(e.join(t, n)));
|
|
178
|
+
}
|
|
179
|
+
function _(t) {
|
|
180
|
+
try {
|
|
181
|
+
let n = e.join(t, ".typedown", ".local"), i = e.join(n, "logs");
|
|
182
|
+
r.mkdirSync(i, { recursive: !0 });
|
|
183
|
+
let a = e.join(n, ".gitignore");
|
|
184
|
+
r.existsSync(a) || r.writeFileSync(a, "*\n");
|
|
185
|
+
let o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
186
|
+
return e.join(i, `${o}.log`);
|
|
187
|
+
} catch {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { l as a, d as i, m as n, h as r, p as t };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./cli-
|
|
3
|
-
export {
|
|
1
|
+
import { n as e, r as t, t as n } from "./vite-Djs3IU9Y.js";
|
|
2
|
+
import { t as r } from "./cli-CPY9dpTQ.js";
|
|
3
|
+
export { t as buildSite, r as cli, e as generateClientAppEntry, n as typedown };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./context-CNTdcpo4.js";
|
|
3
3
|
import { a as n, i as r, n as i, r as a, t as o } from "./brand-CG1fQshq.js";
|
|
4
4
|
import s from "node:path";
|
|
5
5
|
import c from "node:fs/promises";
|
|
@@ -697,7 +697,8 @@ async function Re(e, t) {
|
|
|
697
697
|
return {
|
|
698
698
|
projectName: r,
|
|
699
699
|
siteTitle: t.title ?? await Q("Site title", r),
|
|
700
|
-
siteDescription: t.description ?? await Q("Site description", "A typedown site")
|
|
700
|
+
siteDescription: t.description ?? await Q("Site description", "A typedown site"),
|
|
701
|
+
siteOrigin: await Q("Site origin (used for sitemap and robots.txt)", "https://example.com")
|
|
701
702
|
};
|
|
702
703
|
}
|
|
703
704
|
async function ze() {
|
|
@@ -749,7 +750,7 @@ function He(e) {
|
|
|
749
750
|
build: "typerighter build",
|
|
750
751
|
preview: "typerighter preview"
|
|
751
752
|
},
|
|
752
|
-
devDependencies: { typerighter: "^0.
|
|
753
|
+
devDependencies: { typerighter: "^0.40.1" }
|
|
753
754
|
}, void 0, 2) + "\n";
|
|
754
755
|
}
|
|
755
756
|
function Ue() {
|
|
@@ -762,12 +763,13 @@ function Ge() {
|
|
|
762
763
|
return "---\n_type: schema\nproperties:\n title:\n type: string\n tags:\n type: list[string]\n optional: true\n---\n";
|
|
763
764
|
}
|
|
764
765
|
function Ke(e) {
|
|
766
|
+
let t = e.siteOrigin === "" ? "" : `\n origin: "${e.siteOrigin}"`;
|
|
765
767
|
return `version: "1.0.0"
|
|
766
768
|
vault:
|
|
767
769
|
root_dir: "vault"
|
|
768
770
|
site:
|
|
769
771
|
title: "${e.siteTitle}"
|
|
770
|
-
description: "${e.siteDescription}"
|
|
772
|
+
description: "${e.siteDescription}"${t}
|
|
771
773
|
`;
|
|
772
774
|
}
|
|
773
775
|
function qe(e) {
|
|
@@ -806,7 +808,8 @@ function Xe(e) {
|
|
|
806
808
|
return {
|
|
807
809
|
projectName: e.name,
|
|
808
810
|
siteTitle: e.title,
|
|
809
|
-
siteDescription: e.description
|
|
811
|
+
siteDescription: e.description,
|
|
812
|
+
siteOrigin: ""
|
|
810
813
|
};
|
|
811
814
|
}
|
|
812
815
|
async function $(e, t, n, r = {}) {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { U as e, c as t, i as n } from "./shared-LPNgvigl.js";
|
|
2
|
+
//#region src/node/lib/htmlTemplate.ts
|
|
3
|
+
function r(e) {
|
|
4
|
+
let n = t(e.title), r = t(e.description), i = e.siteTitle !== void 0 && e.title !== e.siteTitle ? `${n} - ${t(e.siteTitle)}` : n, a = e.origin ?? "", o = e.canonicalUrl === void 0 ? void 0 : a + e.canonicalUrl, s = o === void 0 ? "" : `\n <link rel="canonical" href="${t(o)}">`, c = o === void 0 ? "" : `\n <meta property="og:url" content="${t(o)}">`, l = e.ogImagePath === void 0 ? `${a}${e.base}og-image.png` : `${a}${e.base}${e.ogImagePath}`, u = e.author === void 0 ? "" : `\n <meta name="author" content="${t(e.author)}">`, d = e.siteTitle === void 0 ? "" : `\n <meta property="og:site_name" content="${t(e.siteTitle)}">`, f = a === "" ? "" : `\n <link rel="alternate" type="application/rss+xml" title="${e.siteTitle === void 0 ? "RSS Feed" : t(e.siteTitle)}" href="${a}${e.base}feed.xml">`, p = (e.jsonLdBlocks ?? []).map((e) => `\n <script type="application/ld+json">${e}<\/script>`).join(""), m = e.headExtra === void 0 ? "" : e.headExtra + "\n";
|
|
5
|
+
return `<!DOCTYPE html>
|
|
6
|
+
<html lang="${e.lang ?? "en"}">
|
|
7
|
+
<head>
|
|
8
|
+
<meta charset="UTF-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
10
|
+
<meta name="generator" content="Typerighter">
|
|
11
|
+
<meta name="robots" content="index, follow">
|
|
12
|
+
<title>${i}</title>
|
|
13
|
+
<meta name="description" content="${r}">${u}${s}
|
|
14
|
+
<link rel="icon" href="${e.base}favicon.svg" type="image/svg+xml">${f}
|
|
15
|
+
<meta property="og:type" content="article">${d}${c}
|
|
16
|
+
<meta property="og:title" content="${n}">
|
|
17
|
+
<meta property="og:description" content="${r}">
|
|
18
|
+
<meta property="og:image" content="${t(l)}">
|
|
19
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
20
|
+
<meta name="twitter:title" content="${n}">
|
|
21
|
+
<meta name="twitter:description" content="${r}">
|
|
22
|
+
<meta name="twitter:image" content="${t(l)}">${p}
|
|
23
|
+
<script>
|
|
24
|
+
(function () {
|
|
25
|
+
var theme = localStorage.getItem('td-theme');
|
|
26
|
+
var isDark = theme === 'dark' || (theme !== 'light' && matchMedia('(prefers-color-scheme: dark)').matches);
|
|
27
|
+
if (isDark) document.documentElement.classList.add('dark');
|
|
28
|
+
})()
|
|
29
|
+
<\/script>
|
|
30
|
+
${m} </head>
|
|
31
|
+
<body>
|
|
32
|
+
<div id="app">${e.appContent ?? ""}</div>
|
|
33
|
+
<script type="module" src="${e.base}${e.entryScript}"><\/script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>`;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/node/build/seo/page.ts
|
|
39
|
+
function i(e) {
|
|
40
|
+
return e.meta?.title ?? e.title;
|
|
41
|
+
}
|
|
42
|
+
function a(e) {
|
|
43
|
+
if (e.meta?.description !== void 0) return e.meta.description;
|
|
44
|
+
let t = e.frontmatter.description;
|
|
45
|
+
return t === void 0 ? "" : String(t);
|
|
46
|
+
}
|
|
47
|
+
function o(e) {
|
|
48
|
+
let t = e.metadata?.mtime;
|
|
49
|
+
return t === void 0 ? void 0 : n(t);
|
|
50
|
+
}
|
|
51
|
+
function s(e) {
|
|
52
|
+
return e.meta?.image;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/node/build/seo/jsonld.ts
|
|
56
|
+
function c(e) {
|
|
57
|
+
return JSON.stringify({
|
|
58
|
+
"@context": "https://schema.org",
|
|
59
|
+
"@type": "Article",
|
|
60
|
+
headline: e.title,
|
|
61
|
+
description: e.description,
|
|
62
|
+
...e.canonicalUrl === void 0 ? {} : { url: e.canonicalUrl },
|
|
63
|
+
...e.author === void 0 ? {} : { author: {
|
|
64
|
+
"@type": "Person",
|
|
65
|
+
name: e.author
|
|
66
|
+
} },
|
|
67
|
+
...e.dateModified === void 0 ? {} : { dateModified: e.dateModified }
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function l(t, n) {
|
|
71
|
+
if (t === "/") return;
|
|
72
|
+
let r = t.split("/").filter(Boolean), i = r.map((t, i) => ({
|
|
73
|
+
"@type": "ListItem",
|
|
74
|
+
position: i + 1,
|
|
75
|
+
name: i === r.length - 1 ? n : e(t)
|
|
76
|
+
}));
|
|
77
|
+
return JSON.stringify({
|
|
78
|
+
"@context": "https://schema.org",
|
|
79
|
+
"@type": "BreadcrumbList",
|
|
80
|
+
itemListElement: i
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { a, s as i, l as n, i as o, o as r, r as s, c as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAcd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0M3F"}
|
|
@@ -8,12 +8,33 @@ export interface PrerenderContext {
|
|
|
8
8
|
outDir: string;
|
|
9
9
|
/** The base path (e.g. "/") */
|
|
10
10
|
base: string;
|
|
11
|
+
/** Absolute site URL for SEO (e.g. "https://example.com") */
|
|
12
|
+
origin?: string;
|
|
13
|
+
/** HTML lang attribute */
|
|
14
|
+
lang?: string;
|
|
11
15
|
/** List of page paths to render (e.g. ["/", "/posts/hello"]) */
|
|
12
16
|
pagePaths: string[];
|
|
13
17
|
/** Site title for SEO title suffix */
|
|
14
18
|
siteTitle: string;
|
|
19
|
+
/** Site author for meta tag */
|
|
20
|
+
author?: string;
|
|
15
21
|
/** Progress logger for reporting render progress */
|
|
16
22
|
progress?: ProgressLogger;
|
|
17
23
|
}
|
|
24
|
+
export interface PrerenderWorkerConfig {
|
|
25
|
+
ssrEntryPath: string;
|
|
26
|
+
base: string;
|
|
27
|
+
origin?: string;
|
|
28
|
+
lang?: string;
|
|
29
|
+
siteTitle: string;
|
|
30
|
+
author?: string;
|
|
31
|
+
clientEntry: string;
|
|
32
|
+
headExtra?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PrerenderWorkerResult {
|
|
35
|
+
pagePath: string;
|
|
36
|
+
fileName: string;
|
|
37
|
+
html: string;
|
|
38
|
+
}
|
|
18
39
|
export declare function prerenderHtmlPages(context: PrerenderContext): Promise<void>;
|
|
19
40
|
//# sourceMappingURL=prerender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../../src/node/build/prerender.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prerender.d.ts","sourceRoot":"","sources":["../../../src/node/build/prerender.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACf,MAAM,iBAAiB,CAAC;AAezB,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,wBAAsB,kBAAkB,CAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prerenderWorker.d.ts","sourceRoot":"","sources":["../../../src/node/build/prerenderWorker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../../src/node/build/seo/feed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,yBAAyB,CAAC;AAMjC,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,MAAM,CAkCR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { resolvePageTitle, resolvePageDescription, extractDateModified, extractOgImagePath } from './page';
|
|
2
|
+
export { buildArticleLd, buildBreadcrumbLd } from './jsonld';
|
|
3
|
+
export { generateSitemap, generateRobotsTxt } from './sitemap';
|
|
4
|
+
export { generateRssFeed } from './feed';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/build/seo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ArticleLdOptions {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
canonicalUrl?: string;
|
|
5
|
+
author?: string;
|
|
6
|
+
dateModified?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildArticleLd(options: ArticleLdOptions): string;
|
|
9
|
+
export declare function buildBreadcrumbLd(pagePath: string, title: string): string | undefined;
|
|
10
|
+
//# sourceMappingURL=jsonld.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonld.d.ts","sourceRoot":"","sources":["../../../../src/node/build/seo/jsonld.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAgB,cAAc,CAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAUjE;AAGD,wBAAgB,iBAAiB,CAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAetF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PageData } from '@/shared/types/ssg';
|
|
2
|
+
export declare function resolvePageTitle(pageData: PageData): string;
|
|
3
|
+
export declare function resolvePageDescription(pageData: PageData): string;
|
|
4
|
+
export declare function extractDateModified(pageData: PageData): string | undefined;
|
|
5
|
+
export declare function extractOgImagePath(pageData: PageData): string | undefined;
|
|
6
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/node/build/seo/page.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAM5B,wBAAgB,gBAAgB,CAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE5D;AAGD,wBAAgB,sBAAsB,CAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAMlE;AAGD,wBAAgB,mBAAmB,CAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAM3E;AAGD,wBAAgB,kBAAkB,CAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAE1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../../../src/node/build/seo/sitemap.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EAAE,EACnB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAmBR;AAGD,wBAAgB,iBAAiB,CAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/cli/index.ts"],"names":[],"mappings":"AAmBA,wBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/cli/index.ts"],"names":[],"mappings":"AAmBA,wBAAgB,GAAG,SAiMlB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface HtmlTemplateOptions {
|
|
2
|
+
/** Page title */
|
|
3
|
+
title: string;
|
|
4
|
+
/** Page description for meta tags */
|
|
5
|
+
description: string;
|
|
6
|
+
/** Site title, appended as suffix when different from page title */
|
|
7
|
+
siteTitle?: string;
|
|
8
|
+
/** Site author for meta and JSON-LD */
|
|
9
|
+
author?: string;
|
|
10
|
+
/** Base path (e.g. "/" or "/docs/") */
|
|
11
|
+
base: string;
|
|
12
|
+
/** Absolute site origin (e.g. "https://example.com") */
|
|
13
|
+
origin?: string;
|
|
14
|
+
/** Module script src (e.g. "assets/app-abc.js") */
|
|
15
|
+
entryScript: string;
|
|
16
|
+
/** HTML lang attribute */
|
|
17
|
+
lang?: string;
|
|
18
|
+
/** Canonical URL path (e.g. "/people/alice") */
|
|
19
|
+
canonicalUrl?: string;
|
|
20
|
+
/** Per-page OG image path, falls back to global og-image.png */
|
|
21
|
+
ogImagePath?: string;
|
|
22
|
+
/** Pre-built JSON-LD blocks to inject into head */
|
|
23
|
+
jsonLdBlocks?: string[];
|
|
24
|
+
/** Extra tags injected into head (CSS links, module preloads) */
|
|
25
|
+
headExtra?: string;
|
|
26
|
+
/** SSR-rendered content inside div#app */
|
|
27
|
+
appContent?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function renderHtmlDocument(options: HtmlTemplateOptions): string;
|
|
30
|
+
//# sourceMappingURL=htmlTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlTemplate.d.ts","sourceRoot":"","sources":["../../../src/node/lib/htmlTemplate.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,wBAAgB,kBAAkB,CAAE,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA4ExE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/render/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAEV,QAAQ,EACT,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAGD,wBAAsB,aAAa,CACjC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/render/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAEV,QAAQ,EACT,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAGD,wBAAsB,aAAa,CACjC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,QAAQ,CAAC,CAgBnB;AAGD,wBAAsB,cAAc,CAClC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAuB1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface WorkerPoolOptions {
|
|
2
|
+
/** Path or URL of the worker module */
|
|
3
|
+
filename: string | URL;
|
|
4
|
+
/** Data passed to each worker via workerData */
|
|
5
|
+
workerData?: unknown;
|
|
6
|
+
/** Number of workers (defaults to half the CPU count) */
|
|
7
|
+
concurrency?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class WorkerPool<TTask = unknown, TResult = unknown> {
|
|
10
|
+
private workers;
|
|
11
|
+
private queue;
|
|
12
|
+
private destroyed;
|
|
13
|
+
private startupError?;
|
|
14
|
+
constructor(options: WorkerPoolOptions);
|
|
15
|
+
run(task: TTask): Promise<TResult>;
|
|
16
|
+
destroy(): Promise<void>;
|
|
17
|
+
private dispatch;
|
|
18
|
+
private rejectAll;
|
|
19
|
+
private destroyAll;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/worker-pool/index.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;IACvB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,UAAU,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IACxD,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,KAAK,CAA8B;IAC3C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAC,CAAQ;gBAEhB,OAAO,EAAE,iBAAiB;IA2CvC,GAAG,CAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAwB7B,OAAO,IAAK,OAAO,CAAC,IAAI,CAAC;IAQ/B,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,UAAU;CAQnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAOd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,qBAAa,UAAW,YAAW,aAAa;IACxC,IAAI,CAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAStD,UAAU,CAAE,MAAM,EAAE,aAAa,GAAG,IAAI;CAGzC;AAGD,wBAAgB,QAAQ,CAAE,OAAO,EAAE,eAAe,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAOd,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,qBAAa,UAAW,YAAW,aAAa;IACxC,IAAI,CAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAStD,UAAU,CAAE,MAAM,EAAE,aAAa,GAAG,IAAI;CAGzC;AAGD,wBAAgB,QAAQ,CAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAkF1D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { N as e } from "./shared-LPNgvigl.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-e_0GNJdS.js";
|
|
3
|
+
import { pathToFileURL as c } from "node:url";
|
|
4
|
+
import { parentPort as l, workerData as u } from "node:worker_threads";
|
|
5
|
+
//#region src/node/build/prerenderWorker.ts
|
|
6
|
+
var d = u, f = await import(c(d.ssrEntryPath).href);
|
|
7
|
+
l.on("message", async (c) => {
|
|
8
|
+
try {
|
|
9
|
+
let u = await f.render(c), p = i(u.pageData), m = t(u.pageData), h = a(u.pageData), g = d.base + e(c), _ = [s({
|
|
10
|
+
title: p,
|
|
11
|
+
description: m,
|
|
12
|
+
canonicalUrl: g,
|
|
13
|
+
author: d.author,
|
|
14
|
+
dateModified: h
|
|
15
|
+
}), r(c, p)].filter((e) => e !== void 0), v = o({
|
|
16
|
+
title: p,
|
|
17
|
+
description: m,
|
|
18
|
+
siteTitle: d.siteTitle,
|
|
19
|
+
author: d.author,
|
|
20
|
+
base: d.base,
|
|
21
|
+
origin: d.origin,
|
|
22
|
+
lang: d.lang,
|
|
23
|
+
entryScript: d.clientEntry,
|
|
24
|
+
canonicalUrl: g,
|
|
25
|
+
ogImagePath: n(u.pageData),
|
|
26
|
+
jsonLdBlocks: _,
|
|
27
|
+
headExtra: d.headExtra,
|
|
28
|
+
appContent: u.html
|
|
29
|
+
}), y = {
|
|
30
|
+
pagePath: c,
|
|
31
|
+
fileName: c === "/" ? "index.html" : `${e(c)}.html`,
|
|
32
|
+
html: v
|
|
33
|
+
};
|
|
34
|
+
l.postMessage({ result: y });
|
|
35
|
+
} catch (e) {
|
|
36
|
+
l.postMessage({ error: e instanceof Error ? e.message : String(e) });
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (n, r, o) => (o = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : o, n));
|
|
19
|
+
//#endregion
|
|
20
|
+
export { s as n, l as r, o as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAC;AACF,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAG3C,eAAO,MAAM,aAAa,EAAE,MAAM,EAGjC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAG/C,CAAC;AACF,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAG3C,eAAO,MAAM,aAAa,EAAE,MAAM,EAGjC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAGvC,CAAC"}
|
|
@@ -22,6 +22,12 @@ export interface PageData {
|
|
|
22
22
|
headings: MarkdownHeading[];
|
|
23
23
|
title: string;
|
|
24
24
|
metadata?: FileMetadata;
|
|
25
|
+
meta?: PageMeta;
|
|
26
|
+
}
|
|
27
|
+
export interface PageMeta {
|
|
28
|
+
title?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
image?: string;
|
|
25
31
|
}
|
|
26
32
|
export interface PageModule {
|
|
27
33
|
pageData: PageData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../../src/shared/types/ssg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,GAAG,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EACV,WAAW,EAAE,YAAY,EAC1B,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ssg.d.ts","sourceRoot":"","sources":["../../../src/shared/types/ssg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,GAAG,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EACV,WAAW,EAAE,YAAY,EAC1B,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpB,yBAAyB;IACzB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,iBAAiB;IACjB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,sBAAsB;IACtB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACtB"}
|
|
@@ -2,5 +2,6 @@ export declare function formatAbsoluteTime(epochSecs: number): string;
|
|
|
2
2
|
export declare function formatEditTime(epochSecs: number, prefix: string): string;
|
|
3
3
|
export declare function formatRelativeTime(epochSecs: number): string;
|
|
4
4
|
export declare function formatDateString(value: string): string;
|
|
5
|
+
export declare function formatIsoDate(epochMs: number): string;
|
|
5
6
|
export declare function formatTime(epochSecs: number): string;
|
|
6
7
|
//# sourceMappingURL=time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/time.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM7D;AAED,wBAAgB,cAAc,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQzE;AAED,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAc7D;AAQD,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,UAAU,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIrD"}
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/time.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAM7D;AAED,wBAAgB,cAAc,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQzE;AAED,wBAAgB,kBAAkB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAc7D;AAQD,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvD;AAGD,wBAAgB,aAAa,CAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,UAAU,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIrD"}
|