typerighter 0.10.2 → 0.11.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-C-qfoH4a.js → app-C35j_dTB.js} +1 -1
- package/dist/{cli-FgtQJMSj.js → cli-CfUKa6Fr.js} +27 -27
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +519 -421
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-6uYexfQu.js → init-WIepteR4.js} +6 -6
- package/dist/{shared-BIdsxcZ2.js → shared-xivlz-gA.js} +1 -1
- package/dist/shared.js +2 -2
- package/dist/typerighter.css +1 -1
- package/dist/{vite-8CV23ALg.js → vite-rQslY59S.js} +1 -1
- package/dist/vite.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as e, _ as t, v as n, w as r } from "./shared-
|
|
1
|
+
import { E as e, _ as t, v as n, w as r } from "./shared-xivlz-gA.js";
|
|
2
2
|
import { Fragment as i, computed as a, createApp as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, h as f, inject as p, markRaw as m, mergeProps as h, nextTick as g, openBlock as _, provide as v, reactive as ee, readonly as y, ref as b, renderList as x, renderSlot as S, shallowRef as C, toDisplayString as w, unref as T, watch as te, withKeys as E, withModifiers as D } from "vue";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.30.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/isEmptyString.mjs
|
|
4
4
|
var O = (e) => e === "", ne = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), k = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), re = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ie = (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { a as s, n as c, t as l } from "./vite-
|
|
1
|
+
import { A as e, I as t, L as n, M as r, d as i, f as a, s as o } from "./shared-xivlz-gA.js";
|
|
2
|
+
import { a as s, n as c, t as l } from "./vite-rQslY59S.js";
|
|
3
3
|
import u from "node:path";
|
|
4
4
|
import d from "picocolors";
|
|
5
5
|
import { build as f, createServer as p } from "vite";
|
|
@@ -92,13 +92,13 @@ function b(e) {
|
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/node/build/index.ts
|
|
94
94
|
var x = "typerighter/client/theme-default";
|
|
95
|
-
async function S(
|
|
96
|
-
let { root:
|
|
95
|
+
async function S(e, t = {}) {
|
|
96
|
+
let { root: n, logger: a } = e, o = u.resolve(n, t.outDir ?? "dist"), s = t.base ?? "/", d = u.join(o, ".client"), p = u.join(o, ".server");
|
|
97
97
|
await h.rm(o, {
|
|
98
98
|
recursive: !0,
|
|
99
99
|
force: !0
|
|
100
100
|
});
|
|
101
|
-
let m = await
|
|
101
|
+
let m = await e.getTdContext(), [_, v, b, S] = await Promise.all([
|
|
102
102
|
m.getConfig(),
|
|
103
103
|
m.listFiles(),
|
|
104
104
|
m.listFilesGroupedBySchema(),
|
|
@@ -106,7 +106,7 @@ async function S(t, n = {}) {
|
|
|
106
106
|
]), D = await Promise.all(S.map(async (e) => [e, (await m.getSchema(e)).properties])), O = Object.fromEntries(D), k = i(Object.values(b).flat()), A = JSON.stringify({
|
|
107
107
|
title: _.siteTitle,
|
|
108
108
|
description: _.siteDescription
|
|
109
|
-
}), j = JSON.stringify({ contentTree: k }), M = u.join(
|
|
109
|
+
}), j = JSON.stringify({ contentTree: k }), M = u.join(n, "node_modules", ".typerighter");
|
|
110
110
|
await h.mkdir(M, { recursive: !0 });
|
|
111
111
|
let N = u.join(M, "client-entry.js"), P = u.join(M, "ssr-entry.js");
|
|
112
112
|
await Promise.all([h.writeFile(N, l({
|
|
@@ -123,21 +123,21 @@ async function S(t, n = {}) {
|
|
|
123
123
|
siteData: j
|
|
124
124
|
}))]);
|
|
125
125
|
try {
|
|
126
|
-
let i = c({ context:
|
|
126
|
+
let i = c({ context: e }), l = e.createViteLogger(), m = new y(a, "Building client bundle...");
|
|
127
127
|
await f({
|
|
128
|
-
...
|
|
129
|
-
root:
|
|
128
|
+
...t.viteConfig,
|
|
129
|
+
root: n,
|
|
130
130
|
base: s,
|
|
131
131
|
plugins: i,
|
|
132
132
|
customLogger: l,
|
|
133
133
|
logLevel: "silent",
|
|
134
134
|
build: {
|
|
135
|
-
...
|
|
135
|
+
...t.viteConfig?.build,
|
|
136
136
|
outDir: d,
|
|
137
137
|
manifest: !0,
|
|
138
138
|
emptyOutDir: !0,
|
|
139
139
|
rollupOptions: {
|
|
140
|
-
...
|
|
140
|
+
...t.viteConfig?.build?.rollupOptions,
|
|
141
141
|
input: N
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -146,22 +146,22 @@ async function S(t, n = {}) {
|
|
|
146
146
|
m.done(`Client bundle (${b.length} chunks)`);
|
|
147
147
|
let x = new y(a, "Building SSR bundle...");
|
|
148
148
|
await f({
|
|
149
|
-
...
|
|
150
|
-
root:
|
|
149
|
+
...t.viteConfig,
|
|
150
|
+
root: n,
|
|
151
151
|
base: s,
|
|
152
152
|
plugins: i,
|
|
153
153
|
customLogger: l,
|
|
154
154
|
logLevel: "silent",
|
|
155
155
|
build: {
|
|
156
|
-
...
|
|
156
|
+
...t.viteConfig?.build,
|
|
157
157
|
outDir: p,
|
|
158
158
|
ssr: P,
|
|
159
159
|
emptyOutDir: !0
|
|
160
160
|
}
|
|
161
161
|
}), x.done("SSR bundle");
|
|
162
|
-
let S = v.map((
|
|
163
|
-
let
|
|
164
|
-
return
|
|
162
|
+
let S = v.map((e) => {
|
|
163
|
+
let t = r(e);
|
|
164
|
+
return t === "index" ? "/" : `/${t}`;
|
|
165
165
|
});
|
|
166
166
|
S.push("/"), E(k.children, "", S);
|
|
167
167
|
let C = new y(a, "Pre-rendering pages...");
|
|
@@ -177,7 +177,7 @@ async function S(t, n = {}) {
|
|
|
177
177
|
let D = T(S, s);
|
|
178
178
|
await h.writeFile(u.join(o, "sitemap.xml"), D);
|
|
179
179
|
let O = u.join(d, "assets"), A = u.join(o, "assets");
|
|
180
|
-
await h.cp(O, A, { recursive: !0 }).catch(() => {}), await w(u.join(
|
|
180
|
+
await h.cp(O, A, { recursive: !0 }).catch(() => {}), await w(u.join(n, _.contentDir), o);
|
|
181
181
|
} finally {
|
|
182
182
|
await Promise.all([
|
|
183
183
|
h.rm(M, {
|
|
@@ -197,7 +197,7 @@ async function S(t, n = {}) {
|
|
|
197
197
|
a.log(`\nBuild complete. Output: ${o}`);
|
|
198
198
|
}
|
|
199
199
|
function C(e) {
|
|
200
|
-
let
|
|
200
|
+
let r = `/${e.contentDir}/${n}`, i = JSON.parse(e.siteConfig), o = JSON.parse(e.siteData), s = a((o.contentTree ?? {
|
|
201
201
|
rootItems: [],
|
|
202
202
|
children: []
|
|
203
203
|
}).children ?? [], i.title ?? ""), c = JSON.stringify({
|
|
@@ -212,8 +212,8 @@ import { renderToString } from 'vue/server-renderer';
|
|
|
212
212
|
import { h } from 'vue';
|
|
213
213
|
import theme from '${e.layoutImport}';
|
|
214
214
|
|
|
215
|
-
const pages = import.meta.glob('${
|
|
216
|
-
const contentExts = ${JSON.stringify(
|
|
215
|
+
const pages = import.meta.glob('${r}', { eager: true });
|
|
216
|
+
const contentExts = ${JSON.stringify(t)};
|
|
217
217
|
const siteData = ${c};
|
|
218
218
|
|
|
219
219
|
function findPage(base) {
|
|
@@ -248,12 +248,12 @@ export async function render(url) {
|
|
|
248
248
|
}
|
|
249
249
|
`;
|
|
250
250
|
}
|
|
251
|
-
async function w(
|
|
252
|
-
let r = (await h.readdir(
|
|
251
|
+
async function w(t, n) {
|
|
252
|
+
let r = (await h.readdir(t, {
|
|
253
253
|
recursive: !0,
|
|
254
254
|
withFileTypes: !0
|
|
255
|
-
})).filter((
|
|
256
|
-
let r = u.join(
|
|
255
|
+
})).filter((t) => t.isFile() && !e(t.name)).map(async (e) => {
|
|
256
|
+
let r = u.join(e.parentPath, e.name), i = u.relative(t, r), a = u.join(n, i);
|
|
257
257
|
return h.mkdir(u.dirname(a), { recursive: !0 }).then(() => h.copyFile(r, a));
|
|
258
258
|
});
|
|
259
259
|
await Promise.all(r);
|
|
@@ -652,7 +652,7 @@ function Y() {
|
|
|
652
652
|
n.dispose();
|
|
653
653
|
}
|
|
654
654
|
}), e.command("init [root]", "Scaffold a new project").action(async (e) => {
|
|
655
|
-
let { initialize: t } = await import("./init-
|
|
655
|
+
let { initialize: t } = await import("./init-WIepteR4.js");
|
|
656
656
|
await t(Z(e));
|
|
657
657
|
}), e.command("preview [root]", "Preview production build").option("--port <port>", "Port to listen on").action(async (e, t) => {
|
|
658
658
|
let { preview: n } = await import("vite");
|
|
@@ -682,7 +682,7 @@ function Y() {
|
|
|
682
682
|
} finally {
|
|
683
683
|
n.dispose();
|
|
684
684
|
}
|
|
685
|
-
}), e.help(), e.version("0.
|
|
685
|
+
}), e.help(), e.version("0.11.1"), e.parse();
|
|
686
686
|
}
|
|
687
687
|
function X(e, t) {
|
|
688
688
|
let n = t instanceof Error ? t.message : String(t);
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./cli-
|
|
1
|
+
import { t as e } from "./cli-CfUKa6Fr.js";
|
|
2
2
|
export { e as cli };
|