valaxy 0.23.3 → 0.23.5
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/client/utils/content.ts +0 -1
- package/dist/{chunk-OXTCPOR5.js → chunk-ZE4AYGG6.js} +82 -78
- package/dist/node/cli/index.js +1 -1
- package/dist/node/index.js +1 -1
- package/package.json +30 -30
- package/types/data.ts +7 -7
package/client/utils/content.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// node/cli/index.ts
|
|
2
|
-
import process15 from "
|
|
2
|
+
import process15 from "process";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.23.
|
|
7
|
+
var version = "0.23.5";
|
|
8
8
|
|
|
9
9
|
// node/modules/fuse.ts
|
|
10
|
-
import path4 from "
|
|
10
|
+
import path4 from "path";
|
|
11
11
|
import { consola as consola9 } from "consola";
|
|
12
12
|
import { colors as colors7 } from "consola/utils";
|
|
13
13
|
import fg2 from "fast-glob";
|
|
@@ -34,8 +34,8 @@ function commonOptions(args) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// node/options.ts
|
|
37
|
-
import { dirname as dirname2 } from "
|
|
38
|
-
import process4 from "
|
|
37
|
+
import { dirname as dirname2 } from "path";
|
|
38
|
+
import process4 from "process";
|
|
39
39
|
import { ensureSuffix, uniq } from "@antfu/utils";
|
|
40
40
|
import { consola as consola7 } from "consola";
|
|
41
41
|
import { colors as colors6 } from "consola/utils";
|
|
@@ -45,7 +45,7 @@ import fs5 from "fs-extra";
|
|
|
45
45
|
import { resolve as resolve4 } from "pathe";
|
|
46
46
|
|
|
47
47
|
// node/build/bundle.ts
|
|
48
|
-
import path from "
|
|
48
|
+
import path from "path";
|
|
49
49
|
var cache = /* @__PURE__ */ new Map();
|
|
50
50
|
var cacheTheme = /* @__PURE__ */ new Map();
|
|
51
51
|
function escapeRegExp(str) {
|
|
@@ -151,11 +151,11 @@ function getRollupOptions(options) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// node/config/addon.ts
|
|
154
|
-
import path2 from "
|
|
154
|
+
import path2 from "path";
|
|
155
155
|
import fs2 from "fs-extra";
|
|
156
156
|
|
|
157
157
|
// node/config/valaxy.ts
|
|
158
|
-
import process2 from "
|
|
158
|
+
import process2 from "process";
|
|
159
159
|
import { isFunction } from "@antfu/utils";
|
|
160
160
|
import { consola as consola4 } from "consola";
|
|
161
161
|
import { colors as colors2 } from "consola/utils";
|
|
@@ -176,13 +176,13 @@ function countPerformanceTime() {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
// node/config/site.ts
|
|
179
|
-
import { webcrypto } from "
|
|
179
|
+
import { webcrypto } from "crypto";
|
|
180
180
|
import { consola as consola3 } from "consola";
|
|
181
181
|
import { colors } from "consola/utils";
|
|
182
182
|
import { options as floatingVueOptions } from "floating-vue";
|
|
183
183
|
|
|
184
184
|
// node/config/utils.ts
|
|
185
|
-
import process from "
|
|
185
|
+
import process from "process";
|
|
186
186
|
import { consola as consola2 } from "consola";
|
|
187
187
|
import fs from "fs-extra";
|
|
188
188
|
import { createJiti } from "jiti";
|
|
@@ -601,7 +601,7 @@ async function resolveImportPath(importName, ensure = false) {
|
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
// node/utils/addons.ts
|
|
604
|
-
import process3 from "
|
|
604
|
+
import process3 from "process";
|
|
605
605
|
import { colors as colors5 } from "consola/utils";
|
|
606
606
|
import defu2 from "defu";
|
|
607
607
|
import fs4 from "fs-extra";
|
|
@@ -609,7 +609,7 @@ import ora2 from "ora";
|
|
|
609
609
|
import { resolve as resolve3 } from "pathe";
|
|
610
610
|
|
|
611
611
|
// node/utils/root.ts
|
|
612
|
-
import { dirname } from "
|
|
612
|
+
import { dirname } from "path";
|
|
613
613
|
import fs3 from "fs-extra";
|
|
614
614
|
import { resolve as resolve2 } from "pathe";
|
|
615
615
|
async function getModuleRoot(name, entry) {
|
|
@@ -677,7 +677,7 @@ async function getAddonRoot(name, entry) {
|
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
// node/utils/clientRedirects.ts
|
|
680
|
-
import { writeFile } from "
|
|
680
|
+
import { writeFile } from "fs/promises";
|
|
681
681
|
import { ensureFile } from "fs-extra";
|
|
682
682
|
function handleRoute(route) {
|
|
683
683
|
if (route === "/")
|
|
@@ -857,8 +857,8 @@ var matterOptions = {
|
|
|
857
857
|
};
|
|
858
858
|
|
|
859
859
|
// node/utils/env.ts
|
|
860
|
-
import path3 from "
|
|
861
|
-
import process5 from "
|
|
860
|
+
import path3 from "path";
|
|
861
|
+
import process5 from "process";
|
|
862
862
|
import { consola as consola8 } from "consola";
|
|
863
863
|
import fs6 from "fs-extra";
|
|
864
864
|
function isProd() {
|
|
@@ -974,19 +974,19 @@ var fuseModule = defineValaxyModule({
|
|
|
974
974
|
});
|
|
975
975
|
|
|
976
976
|
// node/modules/rss/utils.ts
|
|
977
|
-
import { readFile } from "
|
|
978
|
-
import { dirname as dirname3, join, resolve as resolve5 } from "
|
|
977
|
+
import { readFile } from "fs/promises";
|
|
978
|
+
import { dirname as dirname3, join, resolve as resolve5 } from "path";
|
|
979
979
|
import { ensurePrefix as ensurePrefix2 } from "@antfu/utils";
|
|
980
980
|
import { consola as consola10 } from "consola";
|
|
981
981
|
import { colors as colors8 } from "consola/utils";
|
|
982
982
|
import dayjs from "dayjs";
|
|
983
983
|
import fg3 from "fast-glob";
|
|
984
|
-
import { Feed } from "feed";
|
|
985
984
|
import fs9 from "fs-extra";
|
|
986
985
|
import matter2 from "gray-matter";
|
|
987
986
|
import MarkdownIt from "markdown-it";
|
|
988
987
|
import ora3 from "ora";
|
|
989
988
|
import { getBorderCharacters, table } from "table";
|
|
989
|
+
import { createFeed, generateAtom1, generateJson1, generateRss2 } from "zfeed";
|
|
990
990
|
|
|
991
991
|
// node/utils/date.ts
|
|
992
992
|
import fs8 from "fs-extra";
|
|
@@ -1029,11 +1029,10 @@ async function build(options) {
|
|
|
1029
1029
|
id: siteUrl || "valaxy",
|
|
1030
1030
|
link: siteUrl,
|
|
1031
1031
|
copyright: `CC ${siteConfig.license?.type?.toUpperCase()} ${ccVersion} ${(/* @__PURE__ */ new Date()).getFullYear()} \xA9 ${siteConfig.author?.name}`,
|
|
1032
|
-
|
|
1032
|
+
feed: Object.fromEntries(
|
|
1033
|
+
Object.entries(feedNameMap).map(([key, value]) => [key, `${siteUrl}${value}`])
|
|
1034
|
+
)
|
|
1033
1035
|
};
|
|
1034
|
-
Object.keys(feedNameMap).forEach((key) => {
|
|
1035
|
-
feedOptions.feedLinks[key] = `${siteUrl}${feedNameMap[key]}`;
|
|
1036
|
-
});
|
|
1037
1036
|
const DOMAIN = siteConfig.url.slice(0, -1);
|
|
1038
1037
|
const files = await fg3(`${options.userRoot}/pages/posts/**/*.md`);
|
|
1039
1038
|
const posts = await getPosts({
|
|
@@ -1091,22 +1090,23 @@ async function getPosts(params, options) {
|
|
|
1091
1090
|
const link = DOMAIN + path17.replace(`${options.userRoot}/pages`, "").replace(/\.md$/, "");
|
|
1092
1091
|
const tip = `<br/><p>${lang === "zh-CN" ? `\u8BBF\u95EE <a href="${link}" target="_blank">${link}</a> ${fullText ? "\u67E5\u770B\u539F\u6587" : "\u9605\u8BFB\u5168\u6587"}\u3002` : `Visit <a href="${link}" target="_blank">${link}</a> to ${fullText ? "view original article" : "read more"}.`}</p>`;
|
|
1093
1092
|
posts.push({
|
|
1094
|
-
title:
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
published: new Date(data.updated || data.date),
|
|
1093
|
+
title: data.title,
|
|
1094
|
+
updatedAt: new Date(data.date),
|
|
1095
|
+
publishedAt: new Date(data.updated || data.date),
|
|
1098
1096
|
content: html + tip,
|
|
1099
|
-
author
|
|
1100
|
-
id: data.id
|
|
1097
|
+
author,
|
|
1098
|
+
id: data.id || link,
|
|
1101
1099
|
link
|
|
1102
1100
|
});
|
|
1103
1101
|
}
|
|
1104
|
-
posts.sort((a, b) => +
|
|
1102
|
+
posts.sort((a, b) => +(b.publishedAt || b.updatedAt) - +(a.publishedAt || a.updatedAt));
|
|
1105
1103
|
return posts;
|
|
1106
1104
|
}
|
|
1107
1105
|
async function writeFeed(feedOptions, posts, options, feedNameMap) {
|
|
1108
|
-
const feed =
|
|
1109
|
-
|
|
1106
|
+
const feed = createFeed({
|
|
1107
|
+
...feedOptions,
|
|
1108
|
+
items: posts
|
|
1109
|
+
});
|
|
1110
1110
|
await fs9.ensureDir(dirname3(`./dist/${feedNameMap.atom}`));
|
|
1111
1111
|
const path17 = resolve5(options.userRoot, "./dist");
|
|
1112
1112
|
const publicFolder = resolve5(options.userRoot, "public");
|
|
@@ -1123,11 +1123,11 @@ async function writeFeed(feedOptions, posts, options, feedNameMap) {
|
|
|
1123
1123
|
let data = "";
|
|
1124
1124
|
const distFeedPath = `${path17}/${feedNameMap[type]}`;
|
|
1125
1125
|
if (type === "rss")
|
|
1126
|
-
data = feed
|
|
1126
|
+
data = generateRss2(feed);
|
|
1127
1127
|
else if (type === "atom")
|
|
1128
|
-
data = feed
|
|
1128
|
+
data = generateAtom1(feed);
|
|
1129
1129
|
else if (type === "json")
|
|
1130
|
-
data = feed
|
|
1130
|
+
data = generateJson1(feed);
|
|
1131
1131
|
await fs9.writeFile(distFeedPath, data, "utf-8");
|
|
1132
1132
|
consola10.debug(`[${colors8.cyan(type)}] dist: ${colors8.dim(distFeedPath)}`);
|
|
1133
1133
|
tableData.push([colors8.cyan(type), colors8.yellow("dist"), colors8.dim(distFeedPath)]);
|
|
@@ -1194,14 +1194,14 @@ var rssModule = defineValaxyModule({
|
|
|
1194
1194
|
});
|
|
1195
1195
|
|
|
1196
1196
|
// node/cli/build.ts
|
|
1197
|
-
import path13 from "
|
|
1198
|
-
import process9 from "
|
|
1197
|
+
import path13 from "path";
|
|
1198
|
+
import process9 from "process";
|
|
1199
1199
|
import { consola as consola16 } from "consola";
|
|
1200
1200
|
import { colors as colors15 } from "consola/utils";
|
|
1201
1201
|
import { mergeConfig as mergeConfig4 } from "vite";
|
|
1202
1202
|
|
|
1203
1203
|
// node/build.ts
|
|
1204
|
-
import { join as join8, resolve as resolve13 } from "
|
|
1204
|
+
import { join as join8, resolve as resolve13 } from "path";
|
|
1205
1205
|
import { consola as consola14 } from "consola";
|
|
1206
1206
|
import { colors as colors12 } from "consola/utils";
|
|
1207
1207
|
import fs21 from "fs-extra";
|
|
@@ -1218,12 +1218,12 @@ import Components from "unplugin-vue-components/vite";
|
|
|
1218
1218
|
import Layouts from "vite-plugin-vue-layouts";
|
|
1219
1219
|
|
|
1220
1220
|
// node/plugins/extendConfig.ts
|
|
1221
|
-
import { dirname as dirname4, join as join3, resolve as resolve6 } from "
|
|
1221
|
+
import { dirname as dirname4, join as join3, resolve as resolve6 } from "path";
|
|
1222
1222
|
import { uniq as uniq3 } from "@antfu/utils";
|
|
1223
1223
|
import { mergeConfig as mergeConfig2, searchForWorkspaceRoot } from "vite";
|
|
1224
1224
|
|
|
1225
1225
|
// node/common.ts
|
|
1226
|
-
import { join as join2 } from "
|
|
1226
|
+
import { join as join2 } from "path";
|
|
1227
1227
|
import { uniq as uniq2 } from "@antfu/utils";
|
|
1228
1228
|
import fs10 from "fs-extra";
|
|
1229
1229
|
import { loadConfigFromFile as loadConfigFromFile2, mergeConfig } from "vite";
|
|
@@ -1466,7 +1466,7 @@ import {
|
|
|
1466
1466
|
import { colors as colors9 } from "consola/utils";
|
|
1467
1467
|
|
|
1468
1468
|
// ../../node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.js
|
|
1469
|
-
import { webcrypto as crypto } from "
|
|
1469
|
+
import { webcrypto as crypto } from "crypto";
|
|
1470
1470
|
|
|
1471
1471
|
// ../../node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/url-alphabet/index.js
|
|
1472
1472
|
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
@@ -1957,7 +1957,7 @@ import imageFigures from "markdown-it-image-figures";
|
|
|
1957
1957
|
import TaskLists from "markdown-it-task-lists";
|
|
1958
1958
|
|
|
1959
1959
|
// node/plugins/markdown/plugins/link.ts
|
|
1960
|
-
import { URL as URL2 } from "
|
|
1960
|
+
import { URL as URL2 } from "url";
|
|
1961
1961
|
var indexRE = /(^|.*\/)index.md(.*)$/i;
|
|
1962
1962
|
function linkPlugin(md3, externalAttrs, base) {
|
|
1963
1963
|
md3.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
|
@@ -2344,8 +2344,10 @@ function math_plugin(md3, options) {
|
|
|
2344
2344
|
try {
|
|
2345
2345
|
return katex.renderToString(latex, options);
|
|
2346
2346
|
} catch (error) {
|
|
2347
|
-
if (options.throwOnError)
|
|
2348
|
-
|
|
2347
|
+
if (options.throwOnError) {
|
|
2348
|
+
throw error;
|
|
2349
|
+
}
|
|
2350
|
+
console.warn(error);
|
|
2349
2351
|
return latex;
|
|
2350
2352
|
}
|
|
2351
2353
|
};
|
|
@@ -2357,8 +2359,10 @@ function math_plugin(md3, options) {
|
|
|
2357
2359
|
try {
|
|
2358
2360
|
return `<p>${katex.renderToString(latex, options)}</p>`;
|
|
2359
2361
|
} catch (error) {
|
|
2360
|
-
if (options.throwOnError)
|
|
2361
|
-
|
|
2362
|
+
if (options.throwOnError) {
|
|
2363
|
+
throw error;
|
|
2364
|
+
}
|
|
2365
|
+
console.warn(error);
|
|
2362
2366
|
return latex;
|
|
2363
2367
|
}
|
|
2364
2368
|
};
|
|
@@ -2646,7 +2650,7 @@ import { slash as slash2 } from "@antfu/utils";
|
|
|
2646
2650
|
import path7 from "pathe";
|
|
2647
2651
|
|
|
2648
2652
|
// node/plugins/markdown/utils/html.ts
|
|
2649
|
-
import process6 from "
|
|
2653
|
+
import process6 from "process";
|
|
2650
2654
|
var KNOWN_EXTENSIONS = /* @__PURE__ */ new Set();
|
|
2651
2655
|
function treatAsHtml(filename) {
|
|
2652
2656
|
if (KNOWN_EXTENSIONS.size === 0) {
|
|
@@ -2658,7 +2662,7 @@ function treatAsHtml(filename) {
|
|
|
2658
2662
|
}
|
|
2659
2663
|
|
|
2660
2664
|
// node/plugins/markdown/utils/processInclude.ts
|
|
2661
|
-
import path6 from "
|
|
2665
|
+
import path6 from "path";
|
|
2662
2666
|
import fs12 from "fs-extra";
|
|
2663
2667
|
function processIncludes(srcDir, src, file) {
|
|
2664
2668
|
const includesRE = /<!--\s*@include:\s*(.*?)\s*-->/g;
|
|
@@ -2821,8 +2825,8 @@ function createFixPlugins(options) {
|
|
|
2821
2825
|
}
|
|
2822
2826
|
|
|
2823
2827
|
// node/plugins/setupClient.ts
|
|
2824
|
-
import { existsSync } from "
|
|
2825
|
-
import { join as join4, resolve as resolve7 } from "
|
|
2828
|
+
import { existsSync } from "fs";
|
|
2829
|
+
import { join as join4, resolve as resolve7 } from "path";
|
|
2826
2830
|
import { slash as slash3, uniq as uniq4 } from "@antfu/utils";
|
|
2827
2831
|
function createClientSetupPlugin({ clientRoot, themeRoot, userRoot: userRoot2 }) {
|
|
2828
2832
|
const setupEntry = slash3(resolve7(clientRoot, "setup"));
|
|
@@ -2864,7 +2868,7 @@ function createClientSetupPlugin({ clientRoot, themeRoot, userRoot: userRoot2 })
|
|
|
2864
2868
|
}
|
|
2865
2869
|
|
|
2866
2870
|
// node/plugins/unocss.ts
|
|
2867
|
-
import { resolve as resolve9 } from "
|
|
2871
|
+
import { resolve as resolve9 } from "path";
|
|
2868
2872
|
import defu3 from "defu";
|
|
2869
2873
|
import fs14 from "fs-extra";
|
|
2870
2874
|
import { createJiti as createJiti3 } from "jiti";
|
|
@@ -2878,7 +2882,7 @@ import {
|
|
|
2878
2882
|
} from "unocss";
|
|
2879
2883
|
|
|
2880
2884
|
// node/plugins/setupNode.ts
|
|
2881
|
-
import { resolve as resolve8 } from "
|
|
2885
|
+
import { resolve as resolve8 } from "path";
|
|
2882
2886
|
import { isObject } from "@antfu/utils";
|
|
2883
2887
|
import fs13 from "fs-extra";
|
|
2884
2888
|
import { createJiti as createJiti2 } from "jiti";
|
|
@@ -3104,8 +3108,8 @@ var templateLocales = {
|
|
|
3104
3108
|
};
|
|
3105
3109
|
|
|
3106
3110
|
// node/virtual/styles.ts
|
|
3107
|
-
import { existsSync as existsSync2 } from "
|
|
3108
|
-
import { join as join6 } from "
|
|
3111
|
+
import { existsSync as existsSync2 } from "fs";
|
|
3112
|
+
import { join as join6 } from "path";
|
|
3109
3113
|
var templateStyles = {
|
|
3110
3114
|
id: "/@valaxyjs/styles",
|
|
3111
3115
|
async getContent({ clientRoot, roots, config }) {
|
|
@@ -3262,7 +3266,7 @@ function createScanDeadLinks(options) {
|
|
|
3262
3266
|
}
|
|
3263
3267
|
|
|
3264
3268
|
// node/utils/encrypt.ts
|
|
3265
|
-
import { webcrypto as webcrypto2 } from "
|
|
3269
|
+
import { webcrypto as webcrypto2 } from "crypto";
|
|
3266
3270
|
function getKeyMaterial(password) {
|
|
3267
3271
|
const enc = new TextEncoder();
|
|
3268
3272
|
return webcrypto2.subtle.importKey(
|
|
@@ -3408,13 +3412,13 @@ function transformHexoTags(code, id) {
|
|
|
3408
3412
|
`} Please ${colors10.red("remove")} ${colors10.cyan("{% %}")}, because it conflicts with ${colors10.yellow("markdown-it-attrs")}.`
|
|
3409
3413
|
);
|
|
3410
3414
|
}
|
|
3411
|
-
code.
|
|
3412
|
-
code.
|
|
3415
|
+
code = code.replaceAll("{%", "\\{\\%");
|
|
3416
|
+
code = code.replaceAll("%}", "\\%\\}");
|
|
3413
3417
|
return code;
|
|
3414
3418
|
}
|
|
3415
3419
|
|
|
3416
3420
|
// node/plugins/markdown/transform/markdown.ts
|
|
3417
|
-
import path9 from "
|
|
3421
|
+
import path9 from "path";
|
|
3418
3422
|
import fs18 from "fs-extra";
|
|
3419
3423
|
function genProvideCode(name, data) {
|
|
3420
3424
|
return [
|
|
@@ -3766,7 +3770,7 @@ import { resolve as resolve11 } from "pathe";
|
|
|
3766
3770
|
import VueRouter from "unplugin-vue-router/vite";
|
|
3767
3771
|
|
|
3768
3772
|
// node/plugins/presets/statistics.ts
|
|
3769
|
-
import { existsSync as existsSync3, readFileSync } from "
|
|
3773
|
+
import { existsSync as existsSync3, readFileSync } from "fs";
|
|
3770
3774
|
function count(content) {
|
|
3771
3775
|
const cn = (content.match(/[\u4E00-\u9FA5]/g) || []).length;
|
|
3772
3776
|
const en = (content.replace(/[\u4E00-\u9FA5]/g, "").match(/[\w\u0392-\u03C9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+/g) || []).length;
|
|
@@ -4169,7 +4173,7 @@ async function generateClientRedirects(options) {
|
|
|
4169
4173
|
}
|
|
4170
4174
|
|
|
4171
4175
|
// node/server.ts
|
|
4172
|
-
import process7 from "
|
|
4176
|
+
import process7 from "process";
|
|
4173
4177
|
import { colors as colors13 } from "consola/utils";
|
|
4174
4178
|
import { createServer as createViteServer, mergeConfig as mergeViteConfig3 } from "vite";
|
|
4175
4179
|
function getServerInfoText(msg) {
|
|
@@ -4202,9 +4206,9 @@ async function createServer(valaxyApp, viteConfig = {}, serverOptions = {}) {
|
|
|
4202
4206
|
}
|
|
4203
4207
|
|
|
4204
4208
|
// node/cli/utils/cli.ts
|
|
4205
|
-
import os from "
|
|
4206
|
-
import path12 from "
|
|
4207
|
-
import process8 from "
|
|
4209
|
+
import os from "os";
|
|
4210
|
+
import path12 from "path";
|
|
4211
|
+
import process8 from "process";
|
|
4208
4212
|
import { consola as consola15 } from "consola";
|
|
4209
4213
|
import { colors as colors14 } from "consola/utils";
|
|
4210
4214
|
import ora4 from "ora";
|
|
@@ -4382,13 +4386,13 @@ function registerBuildCommand(cli2) {
|
|
|
4382
4386
|
}
|
|
4383
4387
|
|
|
4384
4388
|
// node/cli/clean.ts
|
|
4385
|
-
import path14 from "
|
|
4386
|
-
import process10 from "
|
|
4389
|
+
import path14 from "path";
|
|
4390
|
+
import process10 from "process";
|
|
4387
4391
|
import { consola as consola17 } from "consola";
|
|
4388
4392
|
import fs22 from "fs-extra";
|
|
4389
4393
|
|
|
4390
4394
|
// node/cli/utils/fs.ts
|
|
4391
|
-
import { access } from "
|
|
4395
|
+
import { access } from "fs/promises";
|
|
4392
4396
|
async function exists(path17) {
|
|
4393
4397
|
try {
|
|
4394
4398
|
await access(path17);
|
|
@@ -4449,7 +4453,7 @@ function registerDebugCommand(cli2) {
|
|
|
4449
4453
|
}
|
|
4450
4454
|
|
|
4451
4455
|
// node/cli/deploy.ts
|
|
4452
|
-
import process11 from "
|
|
4456
|
+
import process11 from "process";
|
|
4453
4457
|
import { confirm, intro, outro, select } from "@clack/prompts";
|
|
4454
4458
|
function registerDeployCommand(cli2) {
|
|
4455
4459
|
cli2.command("deploy", "deploy your blog to the cloud", async () => {
|
|
@@ -4497,12 +4501,12 @@ function registerDeployCommand(cli2) {
|
|
|
4497
4501
|
}
|
|
4498
4502
|
|
|
4499
4503
|
// node/cli/dev.ts
|
|
4500
|
-
import path15 from "
|
|
4501
|
-
import process13 from "
|
|
4504
|
+
import path15 from "path";
|
|
4505
|
+
import process13 from "process";
|
|
4502
4506
|
import { mergeConfig as mergeConfig5 } from "vite";
|
|
4503
4507
|
|
|
4504
4508
|
// node/utils/net.ts
|
|
4505
|
-
import net from "
|
|
4509
|
+
import net from "net";
|
|
4506
4510
|
async function findFreePort(start) {
|
|
4507
4511
|
if (await isPortFree(start))
|
|
4508
4512
|
return start;
|
|
@@ -4526,10 +4530,10 @@ function isPortFree(port) {
|
|
|
4526
4530
|
}
|
|
4527
4531
|
|
|
4528
4532
|
// node/cli/utils/shortcuts.ts
|
|
4529
|
-
import { exec } from "
|
|
4530
|
-
import os2 from "
|
|
4531
|
-
import process12 from "
|
|
4532
|
-
import * as readline from "
|
|
4533
|
+
import { exec } from "child_process";
|
|
4534
|
+
import os2 from "os";
|
|
4535
|
+
import process12 from "process";
|
|
4536
|
+
import * as readline from "readline";
|
|
4533
4537
|
import { colors as colors16 } from "consola/utils";
|
|
4534
4538
|
import qrcode from "qrcode";
|
|
4535
4539
|
var SHORTCUTS = [
|
|
@@ -4684,8 +4688,8 @@ function registerDevCommand(cli2) {
|
|
|
4684
4688
|
}
|
|
4685
4689
|
|
|
4686
4690
|
// node/cli/utils/post.ts
|
|
4687
|
-
import { writeFile as writeFile2 } from "
|
|
4688
|
-
import { join as join9, resolve as resolve14 } from "
|
|
4691
|
+
import { writeFile as writeFile2 } from "fs/promises";
|
|
4692
|
+
import { join as join9, resolve as resolve14 } from "path";
|
|
4689
4693
|
import { ensureSuffix as ensureSuffix2 } from "@antfu/utils";
|
|
4690
4694
|
import { consola as consola19 } from "consola";
|
|
4691
4695
|
import { colors as colors17 } from "consola/utils";
|
|
@@ -4693,7 +4697,7 @@ import dayjs2 from "dayjs";
|
|
|
4693
4697
|
import { render } from "ejs";
|
|
4694
4698
|
|
|
4695
4699
|
// node/cli/utils/constants.ts
|
|
4696
|
-
import process14 from "
|
|
4700
|
+
import process14 from "process";
|
|
4697
4701
|
var userRoot = process14.cwd();
|
|
4698
4702
|
var defaultPostTemplate = `---
|
|
4699
4703
|
layout: <%=layout%>
|
|
@@ -4703,8 +4707,8 @@ date: <%=date%>
|
|
|
4703
4707
|
`;
|
|
4704
4708
|
|
|
4705
4709
|
// node/cli/utils/scaffold.ts
|
|
4706
|
-
import { readFile as readFile2 } from "
|
|
4707
|
-
import path16 from "
|
|
4710
|
+
import { readFile as readFile2 } from "fs/promises";
|
|
4711
|
+
import path16 from "path";
|
|
4708
4712
|
async function getTemplate(layout) {
|
|
4709
4713
|
const { clientRoot, themeRoot } = await resolveOptions({ userRoot });
|
|
4710
4714
|
const roots = [userRoot, themeRoot, clientRoot];
|
package/dist/node/cli/index.js
CHANGED
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.23.
|
|
4
|
+
"version": "0.23.5",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -52,32 +52,31 @@
|
|
|
52
52
|
"node": "^14.18.0 || >=16.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@antfu/install-pkg": "^1.
|
|
55
|
+
"@antfu/install-pkg": "^1.1.0",
|
|
56
56
|
"@antfu/utils": "^9.2.0",
|
|
57
|
-
"@clack/prompts": "^0.
|
|
57
|
+
"@clack/prompts": "^0.11.0",
|
|
58
58
|
"@iconify-json/ri": "^1.2.5",
|
|
59
59
|
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
60
|
-
"@shikijs/transformers": "^3.
|
|
60
|
+
"@shikijs/transformers": "^3.6.0",
|
|
61
61
|
"@types/katex": "^0.16.7",
|
|
62
|
-
"@unhead/addons": "^2.0.
|
|
63
|
-
"@unhead/schema-org": "^2.0.
|
|
64
|
-
"@unhead/vue": "^2.0.
|
|
65
|
-
"@vitejs/plugin-vue": "^5.2.
|
|
62
|
+
"@unhead/addons": "^2.0.10",
|
|
63
|
+
"@unhead/schema-org": "^2.0.10",
|
|
64
|
+
"@unhead/vue": "^2.0.10",
|
|
65
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
66
66
|
"@vue/devtools-api": "7.7.2",
|
|
67
|
-
"@vueuse/core": "^13.
|
|
68
|
-
"@vueuse/integrations": "^13.
|
|
69
|
-
"beasties": "^0.3.
|
|
70
|
-
"birpc": "^2.
|
|
67
|
+
"@vueuse/core": "^13.3.0",
|
|
68
|
+
"@vueuse/integrations": "^13.3.0",
|
|
69
|
+
"beasties": "^0.3.4",
|
|
70
|
+
"birpc": "^2.4.0",
|
|
71
71
|
"consola": "^3.4.2",
|
|
72
72
|
"cross-spawn": "^7.0.6",
|
|
73
73
|
"css-i18n": "^0.0.5",
|
|
74
74
|
"dayjs": "^1.11.13",
|
|
75
|
-
"debug": "^4.4.
|
|
75
|
+
"debug": "^4.4.1",
|
|
76
76
|
"defu": "^6.1.4",
|
|
77
77
|
"ejs": "^3.1.10",
|
|
78
78
|
"escape-html": "^1.0.3",
|
|
79
79
|
"fast-glob": "^3.3.3",
|
|
80
|
-
"feed": "^4.2.2",
|
|
81
80
|
"floating-vue": "^5.2.2",
|
|
82
81
|
"fs-extra": "^11.3.0",
|
|
83
82
|
"fuse.js": "^7.1.0",
|
|
@@ -107,32 +106,33 @@
|
|
|
107
106
|
"ora": "^8.2.0",
|
|
108
107
|
"pascalcase": "^2.0.0",
|
|
109
108
|
"pathe": "^2.0.3",
|
|
110
|
-
"pinia": "^3.0.
|
|
109
|
+
"pinia": "^3.0.3",
|
|
111
110
|
"qrcode": "^1.5.4",
|
|
112
111
|
"resolve-global": "^2.0.0",
|
|
113
|
-
"sass": "^1.
|
|
114
|
-
"shiki": "^3.
|
|
112
|
+
"sass": "^1.89.2",
|
|
113
|
+
"shiki": "^3.6.0",
|
|
115
114
|
"star-markdown-css": "^0.5.3",
|
|
116
115
|
"table": "^6.9.0",
|
|
117
|
-
"unhead": "^2.0.
|
|
118
|
-
"unocss": "^66.
|
|
116
|
+
"unhead": "^2.0.10",
|
|
117
|
+
"unocss": "^66.2.0",
|
|
119
118
|
"unplugin-vue-components": "28.0.0",
|
|
120
119
|
"unplugin-vue-markdown": "^28.3.1",
|
|
121
120
|
"unplugin-vue-router": "^0.12.0",
|
|
122
121
|
"vanilla-lazyload": "^19.1.3",
|
|
123
|
-
"vite": "^6.3.
|
|
122
|
+
"vite": "^6.3.5",
|
|
124
123
|
"vite-dev-rpc": "^1.0.7",
|
|
125
|
-
"vite-plugin-vue-devtools": "^7.7.
|
|
124
|
+
"vite-plugin-vue-devtools": "^7.7.7",
|
|
126
125
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
127
|
-
"vite-ssg": "^
|
|
128
|
-
"vite-ssg-sitemap": "^0.
|
|
129
|
-
"vitepress-plugin-group-icons": "^1.
|
|
130
|
-
"vue": "^3.5.
|
|
131
|
-
"vue-i18n": "^11.1.
|
|
126
|
+
"vite-ssg": "^27.0.1",
|
|
127
|
+
"vite-ssg-sitemap": "^0.9.0",
|
|
128
|
+
"vitepress-plugin-group-icons": "^1.6.0",
|
|
129
|
+
"vue": "^3.5.16",
|
|
130
|
+
"vue-i18n": "^11.1.5",
|
|
132
131
|
"vue-router": "^4.5.1",
|
|
133
|
-
"yargs": "^
|
|
134
|
-
"
|
|
135
|
-
"@valaxyjs/
|
|
132
|
+
"yargs": "^18.0.0",
|
|
133
|
+
"zfeed": "^0.2.3",
|
|
134
|
+
"@valaxyjs/devtools": "0.23.5",
|
|
135
|
+
"@valaxyjs/utils": "0.23.5"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@mdit-vue/plugin-component": "^2.1.4",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"diacritics": "^1.3.0",
|
|
158
158
|
"gh-pages": "^6.3.0",
|
|
159
159
|
"https-localhost": "^4.7.1",
|
|
160
|
-
"rollup-plugin-visualizer": "^
|
|
160
|
+
"rollup-plugin-visualizer": "^6.0.3"
|
|
161
161
|
},
|
|
162
162
|
"scripts": {
|
|
163
163
|
"clean": "rimraf dist",
|
package/types/data.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Header } from '@valaxyjs/utils'
|
|
2
2
|
import type { Post } from './posts'
|
|
3
3
|
|
|
4
|
-
export type CleanUrlsMode
|
|
5
|
-
| 'disabled'
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export type CleanUrlsMode
|
|
5
|
+
= | 'disabled'
|
|
6
|
+
| 'without-subfolders'
|
|
7
|
+
| 'with-subfolders'
|
|
8
8
|
|
|
9
9
|
export interface PageData {
|
|
10
10
|
relativePath: string
|
|
@@ -26,6 +26,6 @@ export interface PageDataPayload {
|
|
|
26
26
|
pageData: PageData
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export type HeadConfig
|
|
30
|
-
| [string, Record<string, string>]
|
|
31
|
-
|
|
29
|
+
export type HeadConfig
|
|
30
|
+
= | [string, Record<string, string>]
|
|
31
|
+
| [string, Record<string, string>, string]
|