blume 0.1.4 → 0.2.0
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/cli/index.js +359 -152
- package/dist/cli/index.js.map +11 -9
- package/dist/types/core/schema.d.ts +110 -6
- package/docs/advanced/changelog.mdx +28 -1
- package/docs/advanced/custom-pages.mdx +0 -1
- package/docs/configuration/index.mdx +12 -11
- package/docs/configuration/search.mdx +13 -1
- package/docs/configuration/theming.mdx +51 -0
- package/docs/content/components.mdx +18 -0
- package/docs/content/navigation.mdx +8 -2
- package/docs/content/sources.mdx +43 -0
- package/docs/content/syntax.mdx +1 -1
- package/docs/index.mdx +1 -1
- package/docs/reference/cli.mdx +7 -1
- package/docs/reference/frontmatter.mdx +9 -1
- package/package.json +1 -1
- package/src/astro/generate.ts +30 -13
- package/src/astro/templates.ts +10 -1
- package/src/cli/env.ts +84 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/prepare.ts +5 -0
- package/src/components/content/CodeBlock.astro +7 -2
- package/src/components/layout/nav-utils.ts +50 -6
- package/src/core/schema.ts +26 -0
- package/src/core/sources/github-releases.ts +200 -0
- package/src/core/sources/resolve.ts +16 -0
- package/src/markdown/index.ts +24 -0
- package/docs/changelog/v0-1-0.mdx +0 -12
- package/docs/changelog/v0-2-0.mdx +0 -16
package/dist/cli/index.js
CHANGED
|
@@ -279,11 +279,11 @@ Next steps:
|
|
|
279
279
|
});
|
|
280
280
|
|
|
281
281
|
// src/cli/commands/build.ts
|
|
282
|
-
import { existsSync as
|
|
282
|
+
import { existsSync as existsSync12 } from "node:fs";
|
|
283
283
|
import { writeFile as writeFile6 } from "node:fs/promises";
|
|
284
284
|
import { build } from "astro";
|
|
285
285
|
import { defineCommand as defineCommand2 } from "citty";
|
|
286
|
-
import { join as
|
|
286
|
+
import { join as join24 } from "pathe";
|
|
287
287
|
|
|
288
288
|
// src/core/frontmatter.ts
|
|
289
289
|
import baseMatter from "gray-matter";
|
|
@@ -3915,6 +3915,8 @@ var changelogIndexTemplate = (options) => {
|
|
|
3915
3915
|
` : "";
|
|
3916
3916
|
const askSlot = options.askEnabled ? `
|
|
3917
3917
|
<AskAI slot="ask" />` : "";
|
|
3918
|
+
const stagedSpread = options.staged ? `
|
|
3919
|
+
...(await getCollection("staged")),` : "";
|
|
3918
3920
|
return `---
|
|
3919
3921
|
// Generated by Blume. Do not edit.
|
|
3920
3922
|
import { getCollection, render } from "astro:content";
|
|
@@ -3953,7 +3955,9 @@ const slugify = (text) =>
|
|
|
3953
3955
|
text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") ||
|
|
3954
3956
|
"update";
|
|
3955
3957
|
|
|
3956
|
-
const changelogEntries =
|
|
3958
|
+
const changelogEntries = [
|
|
3959
|
+
...(await getCollection("docs")),${stagedSpread}
|
|
3960
|
+
]
|
|
3957
3961
|
.filter(
|
|
3958
3962
|
(entry) =>
|
|
3959
3963
|
entry.data.type === "changelog" &&
|
|
@@ -5643,6 +5647,12 @@ var writeNotFoundPage = async (write, srcDir, pages, contentPages) => {
|
|
|
5643
5647
|
}
|
|
5644
5648
|
await write(join11(srcDir, "pages", "404.astro"), notFoundPageTemplate());
|
|
5645
5649
|
};
|
|
5650
|
+
var shouldGenerateChangelog = (project) => {
|
|
5651
|
+
const hasChangelog = project.graph.pages.some((page) => page.contentType === "changelog" && !(page.meta.draft || page.meta.sidebar.hidden));
|
|
5652
|
+
const hasChangelogSource = (project.config.content.sources ?? []).some((source) => source.type === "github-releases");
|
|
5653
|
+
const changelogRouteTaken = project.graph.pages.some((page) => page.route === "/changelog");
|
|
5654
|
+
return (hasChangelog || hasChangelogSource) && !changelogRouteTaken;
|
|
5655
|
+
};
|
|
5646
5656
|
var generateRuntime = async (project) => {
|
|
5647
5657
|
const { context, config } = project;
|
|
5648
5658
|
const out = context.outDir;
|
|
@@ -5726,10 +5736,13 @@ var generateRuntime = async (project) => {
|
|
|
5726
5736
|
if (config.seo.og.enabled) {
|
|
5727
5737
|
await write(join11(srcDir, "pages", "og", "[...slug].png.ts"), ogEndpointTemplate(ogRoutes));
|
|
5728
5738
|
}
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5739
|
+
if (shouldGenerateChangelog(project)) {
|
|
5740
|
+
await write(join11(srcDir, "pages", "changelog.astro"), changelogIndexTemplate({
|
|
5741
|
+
askEnabled,
|
|
5742
|
+
exportEpub,
|
|
5743
|
+
exportPdf,
|
|
5744
|
+
staged: hasStaged
|
|
5745
|
+
}));
|
|
5733
5746
|
}
|
|
5734
5747
|
await writeNotFoundPage(write, srcDir, pages, project.graph.pages);
|
|
5735
5748
|
await write(searchClientPath, searchClientTemplate(config));
|
|
@@ -6855,6 +6868,16 @@ var notionSourceSchema = z2.object({
|
|
|
6855
6868
|
publishedValue: z2.string().optional(),
|
|
6856
6869
|
type: z2.literal("notion")
|
|
6857
6870
|
});
|
|
6871
|
+
var githubReleasesSourceSchema = z2.object({
|
|
6872
|
+
drafts: z2.boolean().optional(),
|
|
6873
|
+
limit: z2.number().positive().optional(),
|
|
6874
|
+
owner: z2.string(),
|
|
6875
|
+
pollInterval: z2.number().positive().optional(),
|
|
6876
|
+
prefix: z2.string().optional(),
|
|
6877
|
+
prereleases: z2.boolean().optional(),
|
|
6878
|
+
repo: z2.string(),
|
|
6879
|
+
type: z2.literal("github-releases")
|
|
6880
|
+
}).strict();
|
|
6858
6881
|
var mintlifySourceSchema = z2.object({
|
|
6859
6882
|
configFile: z2.string().optional(),
|
|
6860
6883
|
exclude: z2.array(z2.string()).default([]),
|
|
@@ -6871,6 +6894,7 @@ var customSourceSchema = z2.object({
|
|
|
6871
6894
|
var contentSourceSchema = z2.discriminatedUnion("type", [
|
|
6872
6895
|
filesystemSourceSchema,
|
|
6873
6896
|
mdxRemoteSourceSchema,
|
|
6897
|
+
githubReleasesSourceSchema,
|
|
6874
6898
|
sanitySourceSchema,
|
|
6875
6899
|
notionSourceSchema,
|
|
6876
6900
|
mintlifySourceSchema,
|
|
@@ -8041,6 +8065,118 @@ var loadWithCache = async (name, cache, fetchEntries, refresh = true) => {
|
|
|
8041
8065
|
}
|
|
8042
8066
|
};
|
|
8043
8067
|
|
|
8068
|
+
// src/core/sources/github-releases.ts
|
|
8069
|
+
var DEFAULT_BASE_URL = "https://api.github.com";
|
|
8070
|
+
var DEFAULT_LIMIT = 100;
|
|
8071
|
+
var PER_PAGE = 100;
|
|
8072
|
+
var LEADING_V = /^v/iu;
|
|
8073
|
+
var NON_SLUG2 = /[^a-z0-9]+/gu;
|
|
8074
|
+
var EDGE_DASHES = /^-+|-+$/gu;
|
|
8075
|
+
var slugifyTag = (tag) => tag.toLowerCase().replaceAll(NON_SLUG2, "-").replaceAll(EDGE_DASHES, "");
|
|
8076
|
+
var githubHeaders = () => {
|
|
8077
|
+
const headers = new Headers({ Accept: "application/vnd.github+json" });
|
|
8078
|
+
const token = process.env.GITHUB_TOKEN;
|
|
8079
|
+
if (token) {
|
|
8080
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
8081
|
+
}
|
|
8082
|
+
return headers;
|
|
8083
|
+
};
|
|
8084
|
+
var releaseToEntry = (release) => {
|
|
8085
|
+
const version = release.tag_name.replace(LEADING_V, "");
|
|
8086
|
+
const title = release.name?.trim() || release.tag_name;
|
|
8087
|
+
const date = release.published_at ?? release.created_at;
|
|
8088
|
+
const category = release.prerelease ? "Prerelease" : "Release";
|
|
8089
|
+
const body = (release.body ?? "").replaceAll(`\r
|
|
8090
|
+
`, `
|
|
8091
|
+
`).trim();
|
|
8092
|
+
const data = {
|
|
8093
|
+
changelog: { category, version },
|
|
8094
|
+
date,
|
|
8095
|
+
title,
|
|
8096
|
+
type: "changelog"
|
|
8097
|
+
};
|
|
8098
|
+
const raw = frontmatter_default.stringify(`${body}
|
|
8099
|
+
`, data);
|
|
8100
|
+
const ref = `${slugifyTag(release.tag_name) || `release-${release.id}`}.md`;
|
|
8101
|
+
return {
|
|
8102
|
+
body: { format: "md", text: body },
|
|
8103
|
+
data,
|
|
8104
|
+
editUrl: release.html_url,
|
|
8105
|
+
hash: hashText(raw),
|
|
8106
|
+
lastModified: date,
|
|
8107
|
+
raw,
|
|
8108
|
+
ref
|
|
8109
|
+
};
|
|
8110
|
+
};
|
|
8111
|
+
var githubReleasesSource = (options, ctx) => {
|
|
8112
|
+
const doFetch = options.fetchImpl ?? globalThis.fetch;
|
|
8113
|
+
const base = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/$/u, "");
|
|
8114
|
+
const max = options.limit ?? DEFAULT_LIMIT;
|
|
8115
|
+
const cache = snapshotCache(ctx.cacheDir);
|
|
8116
|
+
let snapshot = new Map;
|
|
8117
|
+
const include = (release) => (options.drafts || !release.draft) && (options.prereleases || !release.prerelease);
|
|
8118
|
+
const fetchPage = async (page) => {
|
|
8119
|
+
const url = `${base}/repos/${options.owner}/${options.repo}/releases?per_page=${PER_PAGE}&page=${page}`;
|
|
8120
|
+
const res = await doFetch(url, { headers: githubHeaders() });
|
|
8121
|
+
if (!res.ok) {
|
|
8122
|
+
throw new Error(`${url} -> ${res.status}`);
|
|
8123
|
+
}
|
|
8124
|
+
return await res.json();
|
|
8125
|
+
};
|
|
8126
|
+
const fetchReleases = async () => {
|
|
8127
|
+
const collected = [];
|
|
8128
|
+
let page = 1;
|
|
8129
|
+
while (collected.length < max) {
|
|
8130
|
+
const batch = await fetchPage(page);
|
|
8131
|
+
collected.push(...batch.filter(include));
|
|
8132
|
+
if (batch.length < PER_PAGE) {
|
|
8133
|
+
break;
|
|
8134
|
+
}
|
|
8135
|
+
page += 1;
|
|
8136
|
+
}
|
|
8137
|
+
return collected.slice(0, max);
|
|
8138
|
+
};
|
|
8139
|
+
const load2 = async () => {
|
|
8140
|
+
try {
|
|
8141
|
+
const result = await loadWithCache(options.name, cache, async () => {
|
|
8142
|
+
const releases = await fetchReleases();
|
|
8143
|
+
return releases.map(releaseToEntry);
|
|
8144
|
+
}, ctx.refresh ?? true);
|
|
8145
|
+
snapshot = new Map(result.entries.map((entry) => [entry.ref, entry]));
|
|
8146
|
+
return result;
|
|
8147
|
+
} catch (error) {
|
|
8148
|
+
snapshot = new Map;
|
|
8149
|
+
return {
|
|
8150
|
+
diagnostics: [
|
|
8151
|
+
{
|
|
8152
|
+
code: "BLUME_SOURCE_UNAVAILABLE",
|
|
8153
|
+
message: `Source "${options.name}" could not fetch GitHub releases (${error.message}); the changelog will be empty. Set GITHUB_TOKEN to include it (required for a private repository).`,
|
|
8154
|
+
severity: "warning"
|
|
8155
|
+
}
|
|
8156
|
+
],
|
|
8157
|
+
entries: []
|
|
8158
|
+
};
|
|
8159
|
+
}
|
|
8160
|
+
};
|
|
8161
|
+
const read = async (ref) => {
|
|
8162
|
+
const cached3 = snapshot.get(ref);
|
|
8163
|
+
if (cached3) {
|
|
8164
|
+
return cached3.raw ?? cached3.body.text;
|
|
8165
|
+
}
|
|
8166
|
+
const all = await cache.read();
|
|
8167
|
+
const entry = all.find((e) => e.ref === ref);
|
|
8168
|
+
return entry?.raw ?? entry?.body.text ?? "";
|
|
8169
|
+
};
|
|
8170
|
+
return {
|
|
8171
|
+
load: load2,
|
|
8172
|
+
name: options.name,
|
|
8173
|
+
prefix: options.prefix,
|
|
8174
|
+
read,
|
|
8175
|
+
staged: true,
|
|
8176
|
+
watch: options.pollInterval ? pollingWatch(load2, options.pollInterval) : undefined
|
|
8177
|
+
};
|
|
8178
|
+
};
|
|
8179
|
+
|
|
8044
8180
|
// src/core/sources/mdx-remote.ts
|
|
8045
8181
|
var REGEX_SPECIAL = /[.*+?^${}()|[\]\\]/u;
|
|
8046
8182
|
var escapeChar = (char) => REGEX_SPECIAL.test(char) ? `\\${char}` : char;
|
|
@@ -8082,7 +8218,7 @@ var globToRegExp = (pattern) => {
|
|
|
8082
8218
|
return new RegExp(`^${source}$`, "u");
|
|
8083
8219
|
};
|
|
8084
8220
|
var matchesInclude = (ref, patterns) => patterns.some((pattern) => globToRegExp(pattern).test(ref));
|
|
8085
|
-
var
|
|
8221
|
+
var githubHeaders2 = () => {
|
|
8086
8222
|
const token = process.env.GITHUB_TOKEN;
|
|
8087
8223
|
return token ? { authorization: `Bearer ${token}` } : {};
|
|
8088
8224
|
};
|
|
@@ -8090,7 +8226,7 @@ var enumerateGithub = async (github, include, doFetch) => {
|
|
|
8090
8226
|
const { owner, repo, ref } = github;
|
|
8091
8227
|
const base = github.path.replaceAll(/^\/|\/$/gu, "");
|
|
8092
8228
|
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${ref}?recursive=1`;
|
|
8093
|
-
const res = await doFetch(treeUrl, { headers:
|
|
8229
|
+
const res = await doFetch(treeUrl, { headers: githubHeaders2() });
|
|
8094
8230
|
if (!res.ok) {
|
|
8095
8231
|
throw new Error(`${treeUrl} -> ${res.status}`);
|
|
8096
8232
|
}
|
|
@@ -8125,7 +8261,7 @@ var mdxRemoteSource = (options, ctx) => {
|
|
|
8125
8261
|
});
|
|
8126
8262
|
};
|
|
8127
8263
|
const fetchEntry = async (item) => {
|
|
8128
|
-
const res = await doFetch(item.fetchUrl, { headers:
|
|
8264
|
+
const res = await doFetch(item.fetchUrl, { headers: githubHeaders2() });
|
|
8129
8265
|
if (!res.ok) {
|
|
8130
8266
|
throw new Error(`${item.fetchUrl} -> ${res.status}`);
|
|
8131
8267
|
}
|
|
@@ -9737,6 +9873,18 @@ var buildSource = (def, name, context, runtime) => {
|
|
|
9737
9873
|
publishedValue: def.publishedValue
|
|
9738
9874
|
}, sourceContext(context, name, runtime));
|
|
9739
9875
|
}
|
|
9876
|
+
if (def.type === "github-releases") {
|
|
9877
|
+
return githubReleasesSource({
|
|
9878
|
+
drafts: def.drafts,
|
|
9879
|
+
limit: def.limit,
|
|
9880
|
+
name,
|
|
9881
|
+
owner: def.owner,
|
|
9882
|
+
pollInterval: def.pollInterval,
|
|
9883
|
+
prefix: def.prefix,
|
|
9884
|
+
prereleases: def.prereleases,
|
|
9885
|
+
repo: def.repo
|
|
9886
|
+
}, sourceContext(context, name, runtime));
|
|
9887
|
+
}
|
|
9740
9888
|
return mdxRemoteSource({
|
|
9741
9889
|
files: def.files,
|
|
9742
9890
|
github: def.github,
|
|
@@ -9844,8 +9992,66 @@ var scanProject = async (root, options = {}) => {
|
|
|
9844
9992
|
};
|
|
9845
9993
|
};
|
|
9846
9994
|
|
|
9995
|
+
// src/cli/env.ts
|
|
9996
|
+
import { existsSync as existsSync11, readFileSync as readFileSync6 } from "node:fs";
|
|
9997
|
+
import { dirname as dirname11, join as join23, resolve as resolve8 } from "pathe";
|
|
9998
|
+
var ENV_LINE = /^\s*(?:export\s+)?(?<key>[A-Za-z_][A-Za-z0-9_]*)\s*=\s*(?<value>.*?)\s*$/u;
|
|
9999
|
+
var DOUBLE_QUOTED = /^"(?<body>[\s\S]*)"$/u;
|
|
10000
|
+
var SINGLE_QUOTED = /^'(?<body>[\s\S]*)'$/u;
|
|
10001
|
+
var unquote = (raw) => {
|
|
10002
|
+
const double = raw.match(DOUBLE_QUOTED)?.groups?.body;
|
|
10003
|
+
if (double !== undefined) {
|
|
10004
|
+
return double.replaceAll("\\n", `
|
|
10005
|
+
`).replaceAll("\\t", "\t").replaceAll("\\\"", '"').replaceAll("\\\\", "\\");
|
|
10006
|
+
}
|
|
10007
|
+
const single = raw.match(SINGLE_QUOTED)?.groups?.body;
|
|
10008
|
+
if (single !== undefined) {
|
|
10009
|
+
return single;
|
|
10010
|
+
}
|
|
10011
|
+
return raw;
|
|
10012
|
+
};
|
|
10013
|
+
var parseEnv = (content) => {
|
|
10014
|
+
const env = {};
|
|
10015
|
+
for (const line of content.split(/\r?\n/u)) {
|
|
10016
|
+
if (line.trim() === "" || line.trimStart().startsWith("#")) {
|
|
10017
|
+
continue;
|
|
10018
|
+
}
|
|
10019
|
+
const groups = line.match(ENV_LINE)?.groups;
|
|
10020
|
+
if (groups?.key !== undefined && groups.value !== undefined) {
|
|
10021
|
+
env[groups.key] = unquote(groups.value);
|
|
10022
|
+
}
|
|
10023
|
+
}
|
|
10024
|
+
return env;
|
|
10025
|
+
};
|
|
10026
|
+
var applyEnv = (parsed) => {
|
|
10027
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
10028
|
+
if (!(key in process.env)) {
|
|
10029
|
+
process.env[key] = value;
|
|
10030
|
+
}
|
|
10031
|
+
}
|
|
10032
|
+
};
|
|
10033
|
+
var loadFile = (path) => {
|
|
10034
|
+
try {
|
|
10035
|
+
if (existsSync11(path)) {
|
|
10036
|
+
applyEnv(parseEnv(readFileSync6(path, "utf-8")));
|
|
10037
|
+
}
|
|
10038
|
+
} catch {}
|
|
10039
|
+
};
|
|
10040
|
+
var loadEnvFiles = (startDir) => {
|
|
10041
|
+
let dir = resolve8(startDir);
|
|
10042
|
+
let done = false;
|
|
10043
|
+
while (!done) {
|
|
10044
|
+
loadFile(join23(dir, ".env.local"));
|
|
10045
|
+
loadFile(join23(dir, ".env"));
|
|
10046
|
+
const parent = dirname11(dir);
|
|
10047
|
+
done = existsSync11(join23(dir, ".git")) || parent === dir;
|
|
10048
|
+
dir = parent;
|
|
10049
|
+
}
|
|
10050
|
+
};
|
|
10051
|
+
|
|
9847
10052
|
// src/cli/prepare.ts
|
|
9848
10053
|
var prepareProject = async (options) => {
|
|
10054
|
+
loadEnvFiles(options.root);
|
|
9849
10055
|
let project;
|
|
9850
10056
|
try {
|
|
9851
10057
|
project = await scanProject(options.root, {
|
|
@@ -9916,7 +10122,7 @@ var buildCommand = defineCommand2({
|
|
|
9916
10122
|
logLevel: "info",
|
|
9917
10123
|
root: project.context.outDir
|
|
9918
10124
|
});
|
|
9919
|
-
const distDir =
|
|
10125
|
+
const distDir = join24(root, "dist");
|
|
9920
10126
|
if (project.config.search.provider === "pagefind") {
|
|
9921
10127
|
logger.start("Building search index");
|
|
9922
10128
|
const indexed = await buildSearchIndex(distDir);
|
|
@@ -9930,19 +10136,19 @@ var buildCommand = defineCommand2({
|
|
|
9930
10136
|
if (project.config.ai.llmsTxt) {
|
|
9931
10137
|
const { index, full } = await buildLlmsFiles(project);
|
|
9932
10138
|
await Promise.all([
|
|
9933
|
-
writeFile6(
|
|
9934
|
-
writeFile6(
|
|
10139
|
+
writeFile6(join24(distDir, "llms.txt"), index, "utf-8"),
|
|
10140
|
+
writeFile6(join24(distDir, "llms-full.txt"), full, "utf-8")
|
|
9935
10141
|
]);
|
|
9936
10142
|
logger.success("Generated llms.txt and llms-full.txt");
|
|
9937
10143
|
}
|
|
9938
10144
|
const sitemap = buildSitemap(project);
|
|
9939
|
-
if (sitemap && !
|
|
9940
|
-
await writeFile6(
|
|
10145
|
+
if (sitemap && !existsSync12(join24(distDir, "sitemap.xml"))) {
|
|
10146
|
+
await writeFile6(join24(distDir, "sitemap.xml"), sitemap, "utf-8");
|
|
9941
10147
|
logger.success("Generated sitemap.xml");
|
|
9942
10148
|
}
|
|
9943
10149
|
const robots = buildRobots(project);
|
|
9944
|
-
if (robots && !
|
|
9945
|
-
await writeFile6(
|
|
10150
|
+
if (robots && !existsSync12(join24(distDir, "robots.txt"))) {
|
|
10151
|
+
await writeFile6(join24(distDir, "robots.txt"), robots, "utf-8");
|
|
9946
10152
|
logger.success("Generated robots.txt");
|
|
9947
10153
|
}
|
|
9948
10154
|
const { config } = project;
|
|
@@ -10112,18 +10318,18 @@ var doctorCommand = defineCommand4({
|
|
|
10112
10318
|
// src/cli/commands/eject.ts
|
|
10113
10319
|
import { readFile as readFile15, writeFile as writeFile8 } from "node:fs/promises";
|
|
10114
10320
|
import { defineCommand as defineCommand5 } from "citty";
|
|
10115
|
-
import { join as
|
|
10321
|
+
import { join as join26, relative as relative14 } from "pathe";
|
|
10116
10322
|
|
|
10117
10323
|
// src/registry/eject.ts
|
|
10118
|
-
import { existsSync as
|
|
10324
|
+
import { existsSync as existsSync13 } from "node:fs";
|
|
10119
10325
|
import { cp, mkdir as mkdir5, readFile as readFile14, rm as rm2, writeFile as writeFile7 } from "node:fs/promises";
|
|
10120
|
-
import { join as
|
|
10326
|
+
import { join as join25, relative as relative13 } from "pathe";
|
|
10121
10327
|
var POSIX = (path) => path.split("\\").join("/");
|
|
10122
10328
|
var eject = async (root) => {
|
|
10123
10329
|
const project = await scanProject(root, { mode: "build" });
|
|
10124
10330
|
const { context, config } = project;
|
|
10125
|
-
const srcDir =
|
|
10126
|
-
const genDir =
|
|
10331
|
+
const srcDir = join25(root, "src");
|
|
10332
|
+
const genDir = join25(srcDir, "generated");
|
|
10127
10333
|
const askEnabled = config.ai.ask?.enabled ?? false;
|
|
10128
10334
|
const exportPdf = config.export.pdf;
|
|
10129
10335
|
const exportEpub = config.export.epub;
|
|
@@ -10171,13 +10377,13 @@ var eject = async (root) => {
|
|
|
10171
10377
|
searchClientPath: "./src/generated/search-client.ts",
|
|
10172
10378
|
themePath: "./src/generated/app.css"
|
|
10173
10379
|
}),
|
|
10174
|
-
path:
|
|
10380
|
+
path: join25(root, "astro.config.mjs")
|
|
10175
10381
|
},
|
|
10176
10382
|
{
|
|
10177
10383
|
content: runtimeTsconfigTemplate(),
|
|
10178
|
-
path:
|
|
10384
|
+
path: join25(root, "tsconfig.json")
|
|
10179
10385
|
},
|
|
10180
|
-
{ content: envTemplate(), path:
|
|
10386
|
+
{ content: envTemplate(), path: join25(srcDir, "env.d.ts") },
|
|
10181
10387
|
{
|
|
10182
10388
|
content: contentConfigTemplate({
|
|
10183
10389
|
config,
|
|
@@ -10185,7 +10391,7 @@ var eject = async (root) => {
|
|
|
10185
10391
|
staged: hasStaged,
|
|
10186
10392
|
stagedBase: stagedDir
|
|
10187
10393
|
}),
|
|
10188
|
-
path:
|
|
10394
|
+
path: join25(srcDir, "content.config.ts")
|
|
10189
10395
|
},
|
|
10190
10396
|
{
|
|
10191
10397
|
content: catchAllPageTemplate({
|
|
@@ -10194,19 +10400,19 @@ var eject = async (root) => {
|
|
|
10194
10400
|
exportPdf,
|
|
10195
10401
|
mathEnabled: config.markdown.math
|
|
10196
10402
|
}),
|
|
10197
|
-
path:
|
|
10403
|
+
path: join25(srcDir, "pages", "[...slug].astro")
|
|
10198
10404
|
},
|
|
10199
10405
|
{
|
|
10200
10406
|
content: userComponentsTemplate(componentsImport),
|
|
10201
|
-
path:
|
|
10407
|
+
path: join25(genDir, "components.ts")
|
|
10202
10408
|
},
|
|
10203
10409
|
{
|
|
10204
10410
|
content: islandMapTemplate(islands.islands),
|
|
10205
|
-
path:
|
|
10411
|
+
path: join25(genDir, "islands.ts")
|
|
10206
10412
|
},
|
|
10207
10413
|
{
|
|
10208
10414
|
content: exampleMapTemplate(examples.examples),
|
|
10209
|
-
path:
|
|
10415
|
+
path: join25(genDir, "examples.ts")
|
|
10210
10416
|
},
|
|
10211
10417
|
{
|
|
10212
10418
|
content: tailwindEntryTemplate({
|
|
@@ -10218,60 +10424,60 @@ var eject = async (root) => {
|
|
|
10218
10424
|
twoslashCss: twoslashCss(),
|
|
10219
10425
|
userTheme
|
|
10220
10426
|
}),
|
|
10221
|
-
path:
|
|
10427
|
+
path: join25(genDir, "app.css")
|
|
10222
10428
|
},
|
|
10223
|
-
{ content: buildRuntimeData(project), path:
|
|
10429
|
+
{ content: buildRuntimeData(project), path: join25(genDir, "data.json") },
|
|
10224
10430
|
{
|
|
10225
10431
|
content: `${JSON.stringify(rawMarkdown)}
|
|
10226
10432
|
`,
|
|
10227
|
-
path:
|
|
10433
|
+
path: join25(genDir, "raw-markdown.json")
|
|
10228
10434
|
},
|
|
10229
10435
|
{
|
|
10230
10436
|
content: rawMarkdownEndpointTemplate(),
|
|
10231
|
-
path:
|
|
10437
|
+
path: join25(srcDir, "pages", "[...slug].md.ts")
|
|
10232
10438
|
},
|
|
10233
10439
|
{
|
|
10234
10440
|
content: rawMarkdownEndpointTemplate(),
|
|
10235
|
-
path:
|
|
10441
|
+
path: join25(srcDir, "pages", "[...slug].mdx.ts")
|
|
10236
10442
|
}
|
|
10237
10443
|
];
|
|
10238
10444
|
if (askEnabled) {
|
|
10239
10445
|
files.push({
|
|
10240
10446
|
content: askEndpointTemplate(resolveAskBackend(config.ai.ask)),
|
|
10241
|
-
path:
|
|
10447
|
+
path: join25(srcDir, "pages", "api", "ask.ts")
|
|
10242
10448
|
});
|
|
10243
10449
|
}
|
|
10244
10450
|
if (config.seo.og.enabled) {
|
|
10245
10451
|
files.push({
|
|
10246
10452
|
content: ogEndpointTemplate(customOgRoutes(pages, config.title, config.description)),
|
|
10247
|
-
path:
|
|
10453
|
+
path: join25(srcDir, "pages", "og", "[...slug].png.ts")
|
|
10248
10454
|
});
|
|
10249
10455
|
}
|
|
10250
10456
|
if (!routeIsTaken(pages, project.graph.pages, "/404")) {
|
|
10251
10457
|
files.push({
|
|
10252
10458
|
content: notFoundPageTemplate(),
|
|
10253
|
-
path:
|
|
10459
|
+
path: join25(srcDir, "pages", "404.astro")
|
|
10254
10460
|
});
|
|
10255
10461
|
}
|
|
10256
10462
|
files.push({
|
|
10257
10463
|
content: searchClientTemplate(config),
|
|
10258
|
-
path:
|
|
10464
|
+
path: join25(genDir, "search-client.ts")
|
|
10259
10465
|
});
|
|
10260
10466
|
if (servesStaticIndex(config.search.provider)) {
|
|
10261
10467
|
const documents = await buildSearchDocuments(project);
|
|
10262
10468
|
files.push({
|
|
10263
10469
|
content: `${JSON.stringify(documents)}
|
|
10264
10470
|
`,
|
|
10265
|
-
path:
|
|
10471
|
+
path: join25(genDir, "search.json")
|
|
10266
10472
|
}, {
|
|
10267
10473
|
content: searchEndpointTemplate(),
|
|
10268
|
-
path:
|
|
10474
|
+
path: join25(srcDir, "pages", "blume-search.json.ts")
|
|
10269
10475
|
});
|
|
10270
10476
|
}
|
|
10271
10477
|
if (config.search.provider === "mixedbread") {
|
|
10272
10478
|
files.push({
|
|
10273
10479
|
content: mixedbreadSearchEndpointTemplate(config.search.mixedbread?.storeId ?? ""),
|
|
10274
|
-
path:
|
|
10480
|
+
path: join25(srcDir, "pages", "api", "search.ts")
|
|
10275
10481
|
});
|
|
10276
10482
|
}
|
|
10277
10483
|
const feeds = buildRssFeeds(project);
|
|
@@ -10280,10 +10486,10 @@ var eject = async (root) => {
|
|
|
10280
10486
|
files.push({
|
|
10281
10487
|
content: `${JSON.stringify(feedXml)}
|
|
10282
10488
|
`,
|
|
10283
|
-
path:
|
|
10489
|
+
path: join25(genDir, "rss.json")
|
|
10284
10490
|
}, {
|
|
10285
10491
|
content: rssEndpointTemplate(),
|
|
10286
|
-
path:
|
|
10492
|
+
path: join25(srcDir, "pages", "[section]", "rss.xml.ts")
|
|
10287
10493
|
});
|
|
10288
10494
|
}
|
|
10289
10495
|
if (hasReferences(config)) {
|
|
@@ -10295,27 +10501,27 @@ var eject = async (root) => {
|
|
|
10295
10501
|
for (const file of references.files) {
|
|
10296
10502
|
files.push({
|
|
10297
10503
|
content: file.content,
|
|
10298
|
-
path:
|
|
10504
|
+
path: join25(srcDir, "pages", file.pagePath)
|
|
10299
10505
|
});
|
|
10300
10506
|
}
|
|
10301
10507
|
}
|
|
10302
10508
|
files.push(...islands.islands.map((island) => ({
|
|
10303
10509
|
content: islandWrapperTemplate(island),
|
|
10304
|
-
path:
|
|
10510
|
+
path: join25(genDir, "islands", `${island.name}.astro`)
|
|
10305
10511
|
})), ...examples.examples.map((example) => ({
|
|
10306
10512
|
content: exampleWrapperTemplate(example),
|
|
10307
|
-
path:
|
|
10513
|
+
path: join25(genDir, "examples", `${exampleSlug(example.path)}.astro`)
|
|
10308
10514
|
})));
|
|
10309
10515
|
for (const [entryId, content] of staged) {
|
|
10310
|
-
files.push({ content, path:
|
|
10516
|
+
files.push({ content, path: join25(root, stagedDir, entryId) });
|
|
10311
10517
|
}
|
|
10312
10518
|
await Promise.all(files.map(async (file) => {
|
|
10313
|
-
await mkdir5(
|
|
10519
|
+
await mkdir5(join25(file.path, ".."), { recursive: true });
|
|
10314
10520
|
await writeFile7(file.path, file.content, "utf-8");
|
|
10315
10521
|
}));
|
|
10316
|
-
const assetsSrc =
|
|
10317
|
-
if (
|
|
10318
|
-
await cp(assetsSrc,
|
|
10522
|
+
const assetsSrc = join25(context.outDir, "public", "blume-assets");
|
|
10523
|
+
if (existsSync13(assetsSrc)) {
|
|
10524
|
+
await cp(assetsSrc, join25(root, "public", "blume-assets"), {
|
|
10319
10525
|
recursive: true
|
|
10320
10526
|
});
|
|
10321
10527
|
}
|
|
@@ -10325,7 +10531,7 @@ var eject = async (root) => {
|
|
|
10325
10531
|
|
|
10326
10532
|
// src/cli/commands/eject.ts
|
|
10327
10533
|
var updatePackageScripts = async (root) => {
|
|
10328
|
-
const pkgPath =
|
|
10534
|
+
const pkgPath = join26(root, "package.json");
|
|
10329
10535
|
let pkg;
|
|
10330
10536
|
try {
|
|
10331
10537
|
pkg = JSON.parse(await readFile15(pkgPath, "utf-8"));
|
|
@@ -10374,10 +10580,10 @@ The blume package remains importable.`);
|
|
|
10374
10580
|
});
|
|
10375
10581
|
|
|
10376
10582
|
// src/cli/commands/init.ts
|
|
10377
|
-
import { existsSync as
|
|
10583
|
+
import { existsSync as existsSync14 } from "node:fs";
|
|
10378
10584
|
import { mkdir as mkdir6, writeFile as writeFile9 } from "node:fs/promises";
|
|
10379
10585
|
import { defineCommand as defineCommand6 } from "citty";
|
|
10380
|
-
import { basename as basename4, dirname as
|
|
10586
|
+
import { basename as basename4, dirname as dirname12, join as join27 } from "pathe";
|
|
10381
10587
|
var toPackageName = (raw) => raw.toLowerCase().replaceAll(/[^a-z0-9._-]+/gu, "-").replaceAll(/^[-_.]+|[-_.]+$/gu, "") || "docs";
|
|
10382
10588
|
var packageTemplate = (name, version) => `{
|
|
10383
10589
|
"name": ${JSON.stringify(name)},
|
|
@@ -10412,11 +10618,11 @@ Welcome to **Blume** — markdown-first docs powered by Astro and Vite.
|
|
|
10412
10618
|
Edit \`docs/index.mdx\` to get started, then run \`blume dev\`.
|
|
10413
10619
|
`;
|
|
10414
10620
|
var writeFileSafe = async (path, content) => {
|
|
10415
|
-
if (
|
|
10621
|
+
if (existsSync14(path)) {
|
|
10416
10622
|
logger.info(`Skipped existing ${path}`);
|
|
10417
10623
|
return false;
|
|
10418
10624
|
}
|
|
10419
|
-
await mkdir6(
|
|
10625
|
+
await mkdir6(dirname12(path), { recursive: true });
|
|
10420
10626
|
await writeFile9(path, content, "utf-8");
|
|
10421
10627
|
logger.success(`Created ${path}`);
|
|
10422
10628
|
return true;
|
|
@@ -10437,9 +10643,9 @@ var initCommand = defineCommand6({
|
|
|
10437
10643
|
async run({ args }) {
|
|
10438
10644
|
const root = process.cwd();
|
|
10439
10645
|
const contentDir = args["content-dir"] ?? "docs";
|
|
10440
|
-
const createdPackage = await writeFileSafe(
|
|
10441
|
-
await writeFileSafe(
|
|
10442
|
-
await writeFileSafe(
|
|
10646
|
+
const createdPackage = await writeFileSafe(join27(root, "package.json"), packageTemplate(toPackageName(basename4(root)), getBlumeVersion()));
|
|
10647
|
+
await writeFileSafe(join27(root, "blume.config.ts"), CONFIG_TEMPLATE);
|
|
10648
|
+
await writeFileSafe(join27(root, contentDir, "index.mdx"), INDEX_TEMPLATE);
|
|
10443
10649
|
const nextSteps = createdPackage ? `Next steps:
|
|
10444
10650
|
|
|
10445
10651
|
npm install
|
|
@@ -10456,15 +10662,15 @@ var initCommand = defineCommand6({
|
|
|
10456
10662
|
import { defineCommand as defineCommand7 } from "citty";
|
|
10457
10663
|
|
|
10458
10664
|
// src/migrate/fumadocs/index.ts
|
|
10459
|
-
import { existsSync as
|
|
10665
|
+
import { existsSync as existsSync18 } from "node:fs";
|
|
10460
10666
|
import { mkdir as mkdir8, readFile as readFile17, rename as rename3, rm as rm3, writeFile as writeFile11 } from "node:fs/promises";
|
|
10461
|
-
import { dirname as
|
|
10667
|
+
import { dirname as dirname15, join as join30, relative as relative15 } from "pathe";
|
|
10462
10668
|
import { glob as glob8 } from "tinyglobby";
|
|
10463
10669
|
|
|
10464
10670
|
// src/migrate/fumadocs/config.ts
|
|
10465
|
-
import { existsSync as
|
|
10671
|
+
import { existsSync as existsSync15 } from "node:fs";
|
|
10466
10672
|
import { readFile as readFile16 } from "node:fs/promises";
|
|
10467
|
-
import { basename as basename5, dirname as
|
|
10673
|
+
import { basename as basename5, dirname as dirname13, join as join28 } from "pathe";
|
|
10468
10674
|
var SOURCE_FILES = [
|
|
10469
10675
|
"lib/source.ts",
|
|
10470
10676
|
"app/source.ts",
|
|
@@ -10494,10 +10700,10 @@ var GENERIC_NAMES = new Set([
|
|
|
10494
10700
|
var gitRepoRoot = (start) => {
|
|
10495
10701
|
let dir = start;
|
|
10496
10702
|
for (;; ) {
|
|
10497
|
-
if (
|
|
10703
|
+
if (existsSync15(join28(dir, ".git"))) {
|
|
10498
10704
|
return dir;
|
|
10499
10705
|
}
|
|
10500
|
-
const parent =
|
|
10706
|
+
const parent = dirname13(dir);
|
|
10501
10707
|
if (parent === dir) {
|
|
10502
10708
|
return null;
|
|
10503
10709
|
}
|
|
@@ -10506,8 +10712,8 @@ var gitRepoRoot = (start) => {
|
|
|
10506
10712
|
};
|
|
10507
10713
|
var bareName = (name) => name.includes("/") ? name.slice(name.lastIndexOf("/") + 1) : name;
|
|
10508
10714
|
var readTitle = async (root) => {
|
|
10509
|
-
const packageJson =
|
|
10510
|
-
if (!
|
|
10715
|
+
const packageJson = join28(root, "package.json");
|
|
10716
|
+
if (!existsSync15(packageJson)) {
|
|
10511
10717
|
return "Documentation";
|
|
10512
10718
|
}
|
|
10513
10719
|
try {
|
|
@@ -10532,8 +10738,8 @@ var readTitle = async (root) => {
|
|
|
10532
10738
|
};
|
|
10533
10739
|
var scrapeBaseUrl = async (root) => {
|
|
10534
10740
|
for (const candidate of SOURCE_FILES) {
|
|
10535
|
-
const file =
|
|
10536
|
-
if (!
|
|
10741
|
+
const file = join28(root, candidate);
|
|
10742
|
+
if (!existsSync15(file)) {
|
|
10537
10743
|
continue;
|
|
10538
10744
|
}
|
|
10539
10745
|
const base = BASE_URL.exec(await readFile16(file, "utf-8"))?.groups?.base;
|
|
@@ -10565,9 +10771,9 @@ var loadFumadocsConfig = async (root) => {
|
|
|
10565
10771
|
};
|
|
10566
10772
|
|
|
10567
10773
|
// src/migrate/fumadocs/content.ts
|
|
10568
|
-
import { existsSync as
|
|
10774
|
+
import { existsSync as existsSync16 } from "node:fs";
|
|
10569
10775
|
import { readFile as readFileFromDisk2 } from "node:fs/promises";
|
|
10570
|
-
import { dirname as
|
|
10776
|
+
import { dirname as dirname14, resolve as resolve9 } from "pathe";
|
|
10571
10777
|
var FUMADOCS_IMPORT = /^import\s+[\s\S]*?\s+from\s+["']fumadocs-(?:ui|core|mdx)(?:\/[^"']*)?["'];?[ \t]*\n?/gmu;
|
|
10572
10778
|
var stripFumadocsImports = (source) => {
|
|
10573
10779
|
const stripped = source.replace(FUMADOCS_IMPORT, "");
|
|
@@ -10768,12 +10974,12 @@ var inlineFumadocsIncludes = async (source, options) => {
|
|
|
10768
10974
|
if (!rawPath) {
|
|
10769
10975
|
continue;
|
|
10770
10976
|
}
|
|
10771
|
-
const target =
|
|
10977
|
+
const target = resolve9(dirname14(options.filePath), rawPath);
|
|
10772
10978
|
if (seen.has(target)) {
|
|
10773
10979
|
warnings.push(`Circular <include> "${rawPath}" — left as-is.`);
|
|
10774
10980
|
continue;
|
|
10775
10981
|
}
|
|
10776
|
-
if (!
|
|
10982
|
+
if (!existsSync16(target)) {
|
|
10777
10983
|
warnings.push(`<include> target "${rawPath}" not found — left as-is.`);
|
|
10778
10984
|
continue;
|
|
10779
10985
|
}
|
|
@@ -10805,9 +11011,9 @@ var normalizeFumadocsPageMeta = (value) => {
|
|
|
10805
11011
|
};
|
|
10806
11012
|
|
|
10807
11013
|
// src/migrate/fumadocs/groups.ts
|
|
10808
|
-
import { existsSync as
|
|
11014
|
+
import { existsSync as existsSync17, statSync as statSync2 } from "node:fs";
|
|
10809
11015
|
import { mkdir as mkdir7, rename as rename2, writeFile as writeFile10 } from "node:fs/promises";
|
|
10810
|
-
import { basename as basename6, join as
|
|
11016
|
+
import { basename as basename6, join as join29 } from "pathe";
|
|
10811
11017
|
|
|
10812
11018
|
// src/migrate/fumadocs/meta.ts
|
|
10813
11019
|
var SEPARATOR = /^---(?<label>.*)---$/u;
|
|
@@ -10953,12 +11159,12 @@ var isDirectory = (path) => {
|
|
|
10953
11159
|
};
|
|
10954
11160
|
var resolveEntry = (docsDir, name) => {
|
|
10955
11161
|
for (const ext of PAGE_EXTS) {
|
|
10956
|
-
const file =
|
|
10957
|
-
if (
|
|
11162
|
+
const file = join29(docsDir, `${name}${ext}`);
|
|
11163
|
+
if (existsSync17(file)) {
|
|
10958
11164
|
return { kind: "file", path: file };
|
|
10959
11165
|
}
|
|
10960
11166
|
}
|
|
10961
|
-
const folder =
|
|
11167
|
+
const folder = join29(docsDir, name);
|
|
10962
11168
|
return isDirectory(folder) ? { kind: "folder", path: folder } : null;
|
|
10963
11169
|
};
|
|
10964
11170
|
var humanize2 = (name) => name.split(WORD_SPLIT3).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
@@ -10993,8 +11199,8 @@ var moveItemIntoGroup = async (item, docsDir, groupDir, label, warnings) => {
|
|
|
10993
11199
|
warnings.push(`Sidebar entry "${item.name}" in section "${label}" matched no page or folder; skipped.`);
|
|
10994
11200
|
return null;
|
|
10995
11201
|
}
|
|
10996
|
-
const dest =
|
|
10997
|
-
if (
|
|
11202
|
+
const dest = join29(groupDir, basename6(resolved.path));
|
|
11203
|
+
if (existsSync17(dest)) {
|
|
10998
11204
|
warnings.push(`Skipped moving "${item.name}" into section "${label}" (target already exists).`);
|
|
10999
11205
|
return null;
|
|
11000
11206
|
}
|
|
@@ -11021,7 +11227,7 @@ var reshapeSection = async (section, docsDir, order, warnings) => {
|
|
|
11021
11227
|
}
|
|
11022
11228
|
return;
|
|
11023
11229
|
}
|
|
11024
|
-
const groupDir =
|
|
11230
|
+
const groupDir = join29(docsDir, `(${section.label})`);
|
|
11025
11231
|
const sectionKeys = [];
|
|
11026
11232
|
for (const item of section.items) {
|
|
11027
11233
|
const key = await moveItemIntoGroup(item, docsDir, groupDir, section.label, warnings);
|
|
@@ -11034,7 +11240,7 @@ var reshapeSection = async (section, docsDir, order, warnings) => {
|
|
|
11034
11240
|
}
|
|
11035
11241
|
order.push(section.label);
|
|
11036
11242
|
if (sectionKeys.length > 1) {
|
|
11037
|
-
await writeFile10(
|
|
11243
|
+
await writeFile10(join29(groupDir, "meta.ts"), renderMetaModule({ pages: sectionKeys }), "utf-8");
|
|
11038
11244
|
}
|
|
11039
11245
|
};
|
|
11040
11246
|
var reshapeFumadocsGroups = async (structure, docsDir) => {
|
|
@@ -11067,8 +11273,8 @@ var FUMADOCS_LEFTOVERS = [
|
|
|
11067
11273
|
];
|
|
11068
11274
|
var movePage = async (abs, base, root) => {
|
|
11069
11275
|
const rel = relative15(base, abs);
|
|
11070
|
-
const dest =
|
|
11071
|
-
if (
|
|
11276
|
+
const dest = join30(root, "docs", rel);
|
|
11277
|
+
if (existsSync18(dest)) {
|
|
11072
11278
|
return {
|
|
11073
11279
|
includeWarnings: [],
|
|
11074
11280
|
moved: 0,
|
|
@@ -11087,7 +11293,7 @@ var movePage = async (abs, base, root) => {
|
|
|
11087
11293
|
const parsed = frontmatter_default(text);
|
|
11088
11294
|
const { data, removed } = normalizeFumadocsPageMeta(parsed.data);
|
|
11089
11295
|
const content = Object.keys(data).length > 0 ? frontmatter_default.stringify(parsed.content, data) : parsed.content;
|
|
11090
|
-
await mkdir8(
|
|
11296
|
+
await mkdir8(dirname15(dest), { recursive: true });
|
|
11091
11297
|
await writeFile11(dest, content, "utf-8");
|
|
11092
11298
|
await rm3(abs, { force: true });
|
|
11093
11299
|
return {
|
|
@@ -11102,10 +11308,10 @@ var writeMeta = async (dest, meta, rel, warnings) => {
|
|
|
11102
11308
|
if (Object.keys(meta).length === 0) {
|
|
11103
11309
|
return warnings;
|
|
11104
11310
|
}
|
|
11105
|
-
if (
|
|
11311
|
+
if (existsSync18(dest)) {
|
|
11106
11312
|
return [...warnings, `Skipped ${rel} (target already exists)`];
|
|
11107
11313
|
}
|
|
11108
|
-
await mkdir8(
|
|
11314
|
+
await mkdir8(dirname15(dest), { recursive: true });
|
|
11109
11315
|
await writeFile11(dest, renderMetaModule(meta), "utf-8");
|
|
11110
11316
|
return warnings;
|
|
11111
11317
|
};
|
|
@@ -11116,21 +11322,21 @@ var convertMeta = async (abs, base, root) => {
|
|
|
11116
11322
|
try {
|
|
11117
11323
|
parsed = JSON.parse(raw);
|
|
11118
11324
|
} catch {
|
|
11119
|
-
const dest2 =
|
|
11120
|
-
if (
|
|
11325
|
+
const dest2 = join30(root, "docs", rel);
|
|
11326
|
+
if (existsSync18(dest2)) {
|
|
11121
11327
|
return [`Skipped ${rel} (target already exists)`];
|
|
11122
11328
|
}
|
|
11123
|
-
await mkdir8(
|
|
11329
|
+
await mkdir8(dirname15(dest2), { recursive: true });
|
|
11124
11330
|
await rename3(abs, dest2);
|
|
11125
11331
|
return [
|
|
11126
11332
|
`Could not parse ${rel}; moved as-is — convert it to meta.ts by hand.`
|
|
11127
11333
|
];
|
|
11128
11334
|
}
|
|
11129
|
-
const dir =
|
|
11130
|
-
const docsDir =
|
|
11131
|
-
const dest =
|
|
11335
|
+
const dir = dirname15(rel) === "." ? "" : dirname15(rel);
|
|
11336
|
+
const docsDir = join30(root, "docs", dir);
|
|
11337
|
+
const dest = join30(docsDir, "meta.ts");
|
|
11132
11338
|
const structure = parseFumadocsPages(parsed.pages);
|
|
11133
|
-
if (structure.hasSections && !
|
|
11339
|
+
if (structure.hasSections && !existsSync18(dest)) {
|
|
11134
11340
|
const self = translateFumadocsSelfMeta(parsed);
|
|
11135
11341
|
const reshape = await reshapeFumadocsGroups(structure, docsDir);
|
|
11136
11342
|
const meta2 = { ...self.meta };
|
|
@@ -11177,8 +11383,8 @@ var summarizePages = (results) => {
|
|
|
11177
11383
|
};
|
|
11178
11384
|
};
|
|
11179
11385
|
var cleanupSourceDirs = async (root) => {
|
|
11180
|
-
const docs =
|
|
11181
|
-
if (
|
|
11386
|
+
const docs = join30(root, "content", "docs");
|
|
11387
|
+
if (existsSync18(docs)) {
|
|
11182
11388
|
const remaining = await glob8(["**/*"], { cwd: docs, dot: true });
|
|
11183
11389
|
if (remaining.length > 0) {
|
|
11184
11390
|
return [
|
|
@@ -11187,8 +11393,8 @@ var cleanupSourceDirs = async (root) => {
|
|
|
11187
11393
|
}
|
|
11188
11394
|
await rm3(docs, { force: true, recursive: true });
|
|
11189
11395
|
}
|
|
11190
|
-
const content =
|
|
11191
|
-
if (
|
|
11396
|
+
const content = join30(root, "content");
|
|
11397
|
+
if (existsSync18(content)) {
|
|
11192
11398
|
const remaining = await glob8(["**/*"], { cwd: content, dot: true });
|
|
11193
11399
|
if (remaining.length === 0) {
|
|
11194
11400
|
await rm3(content, { force: true, recursive: true });
|
|
@@ -11198,8 +11404,8 @@ var cleanupSourceDirs = async (root) => {
|
|
|
11198
11404
|
};
|
|
11199
11405
|
var migrateFumadocsProject = async (root) => {
|
|
11200
11406
|
const { config, warnings: configWarnings } = await loadFumadocsConfig(root);
|
|
11201
|
-
const base =
|
|
11202
|
-
if (!
|
|
11407
|
+
const base = join30(root, SOURCE_DIR);
|
|
11408
|
+
if (!existsSync18(base)) {
|
|
11203
11409
|
await writeBlumeConfig(root, config);
|
|
11204
11410
|
return {
|
|
11205
11411
|
moved: 0,
|
|
@@ -11257,9 +11463,9 @@ var migrateFumadocsProject = async (root) => {
|
|
|
11257
11463
|
};
|
|
11258
11464
|
|
|
11259
11465
|
// src/migrate/mintlify/index.ts
|
|
11260
|
-
import { existsSync as
|
|
11466
|
+
import { existsSync as existsSync19 } from "node:fs";
|
|
11261
11467
|
import { mkdir as mkdir9, readFile as readFile18, rename as rename4, rm as rm4, writeFile as writeFile12 } from "node:fs/promises";
|
|
11262
|
-
import { dirname as
|
|
11468
|
+
import { dirname as dirname16, join as join31 } from "pathe";
|
|
11263
11469
|
import { glob as glob9 } from "tinyglobby";
|
|
11264
11470
|
var prune = (value) => {
|
|
11265
11471
|
if (Array.isArray(value)) {
|
|
@@ -11289,7 +11495,7 @@ var writeBlumeConfig2 = async (root, config) => {
|
|
|
11289
11495
|
|
|
11290
11496
|
export default defineConfig(${JSON.stringify(prune(config), null, 2)});
|
|
11291
11497
|
`;
|
|
11292
|
-
await writeFile12(
|
|
11498
|
+
await writeFile12(join31(root, "blume.config.ts"), body, "utf-8");
|
|
11293
11499
|
};
|
|
11294
11500
|
var relocateAssets = async (root, refs) => {
|
|
11295
11501
|
const segments = new Set;
|
|
@@ -11304,23 +11510,23 @@ var relocateAssets = async (root, refs) => {
|
|
|
11304
11510
|
}
|
|
11305
11511
|
const moved = [];
|
|
11306
11512
|
for (const segment of segments) {
|
|
11307
|
-
const source =
|
|
11308
|
-
if (!
|
|
11513
|
+
const source = join31(root, segment);
|
|
11514
|
+
if (!existsSync19(source) || segment === "public") {
|
|
11309
11515
|
continue;
|
|
11310
11516
|
}
|
|
11311
|
-
const dest =
|
|
11312
|
-
if (
|
|
11517
|
+
const dest = join31(root, "public", segment);
|
|
11518
|
+
if (existsSync19(dest)) {
|
|
11313
11519
|
continue;
|
|
11314
11520
|
}
|
|
11315
|
-
await mkdir9(
|
|
11521
|
+
await mkdir9(join31(root, "public"), { recursive: true });
|
|
11316
11522
|
await rename4(source, dest);
|
|
11317
11523
|
moved.push(segment);
|
|
11318
11524
|
}
|
|
11319
11525
|
return moved;
|
|
11320
11526
|
};
|
|
11321
11527
|
var cleanupSnippets = async (root, kept, warnings) => {
|
|
11322
|
-
const dir =
|
|
11323
|
-
if (!
|
|
11528
|
+
const dir = join31(root, "snippets");
|
|
11529
|
+
if (!existsSync19(dir)) {
|
|
11324
11530
|
return;
|
|
11325
11531
|
}
|
|
11326
11532
|
const markdown = await glob9(["**/*.{md,mdx}"], { absolute: true, cwd: dir });
|
|
@@ -11357,9 +11563,9 @@ var assetRefs = (config) => {
|
|
|
11357
11563
|
};
|
|
11358
11564
|
var migrateMintlifyProject = async (root) => {
|
|
11359
11565
|
const warnings = [];
|
|
11360
|
-
const configFile =
|
|
11566
|
+
const configFile = existsSync19(join31(root, "docs.json")) ? join31(root, "docs.json") : join31(root, "mint.json");
|
|
11361
11567
|
let config;
|
|
11362
|
-
if (
|
|
11568
|
+
if (existsSync19(configFile)) {
|
|
11363
11569
|
config = await loadMintlifyConfig(root, configFile);
|
|
11364
11570
|
const spec = JSON.parse(await readFile18(configFile, "utf-8"));
|
|
11365
11571
|
const i18n = mintlifyI18n(spec);
|
|
@@ -11399,7 +11605,7 @@ var migrateMintlifyProject = async (root) => {
|
|
|
11399
11605
|
variables
|
|
11400
11606
|
});
|
|
11401
11607
|
if (result.content !== raw) {
|
|
11402
|
-
await mkdir9(
|
|
11608
|
+
await mkdir9(dirname16(file), { recursive: true });
|
|
11403
11609
|
await writeFile12(file, result.content, "utf-8");
|
|
11404
11610
|
}
|
|
11405
11611
|
for (const key of result.removed) {
|
|
@@ -11436,9 +11642,9 @@ var migrateMintlifyProject = async (root) => {
|
|
|
11436
11642
|
};
|
|
11437
11643
|
|
|
11438
11644
|
// src/migrate/nextra/index.ts
|
|
11439
|
-
import { existsSync as
|
|
11645
|
+
import { existsSync as existsSync20 } from "node:fs";
|
|
11440
11646
|
import { mkdir as mkdir10, readFile as readFile19, rename as rename5, rm as rm5, writeFile as writeFile13 } from "node:fs/promises";
|
|
11441
|
-
import { basename as basename7, dirname as
|
|
11647
|
+
import { basename as basename7, dirname as dirname17, extname as extname6, join as join32, relative as relative16 } from "pathe";
|
|
11442
11648
|
import { glob as glob10 } from "tinyglobby";
|
|
11443
11649
|
|
|
11444
11650
|
// src/migrate/nextra/content.ts
|
|
@@ -11668,13 +11874,13 @@ var indexFolders = (base, pageFiles, metaFiles) => {
|
|
|
11668
11874
|
let current = normalizeDir(dir);
|
|
11669
11875
|
allDirs.add(current);
|
|
11670
11876
|
while (current !== "") {
|
|
11671
|
-
current = normalizeDir(
|
|
11877
|
+
current = normalizeDir(dirname17(current));
|
|
11672
11878
|
allDirs.add(current);
|
|
11673
11879
|
}
|
|
11674
11880
|
};
|
|
11675
11881
|
for (const abs of pageFiles) {
|
|
11676
11882
|
const rel = relative16(base, abs);
|
|
11677
|
-
const dir = normalizeDir(
|
|
11883
|
+
const dir = normalizeDir(dirname17(rel));
|
|
11678
11884
|
const slug = basename7(rel).replace(/\.mdx?$/u, "");
|
|
11679
11885
|
const folder = pagesByDir.get(dir) ?? new Map;
|
|
11680
11886
|
folder.set(slug, abs);
|
|
@@ -11682,14 +11888,14 @@ var indexFolders = (base, pageFiles, metaFiles) => {
|
|
|
11682
11888
|
registerDir(dir);
|
|
11683
11889
|
}
|
|
11684
11890
|
for (const abs of metaFiles) {
|
|
11685
|
-
registerDir(normalizeDir(
|
|
11891
|
+
registerDir(normalizeDir(dirname17(relative16(base, abs))));
|
|
11686
11892
|
}
|
|
11687
11893
|
const childDirs = new Map;
|
|
11688
11894
|
for (const dir of allDirs) {
|
|
11689
11895
|
if (dir === "") {
|
|
11690
11896
|
continue;
|
|
11691
11897
|
}
|
|
11692
|
-
const parent = normalizeDir(
|
|
11898
|
+
const parent = normalizeDir(dirname17(dir));
|
|
11693
11899
|
const children = childDirs.get(parent) ?? new Set;
|
|
11694
11900
|
children.add(basename7(dir));
|
|
11695
11901
|
childDirs.set(parent, children);
|
|
@@ -11707,7 +11913,7 @@ var planMetas = (metas, index) => {
|
|
|
11707
11913
|
warnings: []
|
|
11708
11914
|
};
|
|
11709
11915
|
for (const meta of metas) {
|
|
11710
|
-
const dir = normalizeDir(
|
|
11916
|
+
const dir = normalizeDir(dirname17(meta.rel));
|
|
11711
11917
|
const entries = parseNextraMeta(meta.raw, meta.ext);
|
|
11712
11918
|
if (!entries) {
|
|
11713
11919
|
plan.unparseableMetas.push({ abs: meta.abs, rel: meta.rel });
|
|
@@ -11720,7 +11926,7 @@ var planMetas = (metas, index) => {
|
|
|
11720
11926
|
plan.metaByDir.set(dir, conversion.folderMeta);
|
|
11721
11927
|
plan.consumedMetas.push(meta.abs);
|
|
11722
11928
|
for (const [slug, title] of Object.entries(conversion.folderTitles)) {
|
|
11723
|
-
plan.folderTitleByDir.set(normalizeDir(
|
|
11929
|
+
plan.folderTitleByDir.set(normalizeDir(join32(dir, slug)), title);
|
|
11724
11930
|
}
|
|
11725
11931
|
for (const [slug, label] of Object.entries(conversion.pageLabels)) {
|
|
11726
11932
|
const pageAbs = index.pagesByDir.get(dir)?.get(slug);
|
|
@@ -11745,8 +11951,8 @@ var planMetas = (metas, index) => {
|
|
|
11745
11951
|
};
|
|
11746
11952
|
var movePage2 = async (abs, options) => {
|
|
11747
11953
|
const rel = relative16(options.base, abs);
|
|
11748
|
-
const dest =
|
|
11749
|
-
if (
|
|
11954
|
+
const dest = join32(options.root, "docs", rel);
|
|
11955
|
+
if (existsSync20(dest)) {
|
|
11750
11956
|
return { moved: 0, removed: [], skipped: rel, unsupported: [] };
|
|
11751
11957
|
}
|
|
11752
11958
|
const raw = await readFile19(abs, "utf-8");
|
|
@@ -11755,7 +11961,7 @@ var movePage2 = async (abs, options) => {
|
|
|
11755
11961
|
const parsed = frontmatter_default(text);
|
|
11756
11962
|
const { data, removed } = normalizeNextraPageMeta(parsed.data, options.overrides.get(abs) ?? {});
|
|
11757
11963
|
const content = Object.keys(data).length > 0 ? frontmatter_default.stringify(parsed.content, data) : parsed.content;
|
|
11758
|
-
await mkdir10(
|
|
11964
|
+
await mkdir10(dirname17(dest), { recursive: true });
|
|
11759
11965
|
await writeFile13(dest, content, "utf-8");
|
|
11760
11966
|
await rm5(abs, { force: true });
|
|
11761
11967
|
return { moved: 1, removed, skipped: null, unsupported };
|
|
@@ -11798,8 +12004,8 @@ var writeFolderMetas = async (root, plan) => {
|
|
|
11798
12004
|
if (Object.keys(finalMeta).length === 0) {
|
|
11799
12005
|
return;
|
|
11800
12006
|
}
|
|
11801
|
-
const dest =
|
|
11802
|
-
await mkdir10(
|
|
12007
|
+
const dest = join32(root, "docs", dir, "meta.ts");
|
|
12008
|
+
await mkdir10(dirname17(dest), { recursive: true });
|
|
11803
12009
|
await writeFile13(dest, `import { defineMeta } from "blume";
|
|
11804
12010
|
|
|
11805
12011
|
export default defineMeta(${JSON.stringify(finalMeta, null, 2)});
|
|
@@ -11809,12 +12015,12 @@ export default defineMeta(${JSON.stringify(finalMeta, null, 2)});
|
|
|
11809
12015
|
var relocateUnparseableMetas = async (root, metas) => {
|
|
11810
12016
|
const warnings = [];
|
|
11811
12017
|
await Promise.all(metas.map(async ({ abs, rel }) => {
|
|
11812
|
-
const dest =
|
|
11813
|
-
if (
|
|
12018
|
+
const dest = join32(root, "docs", rel);
|
|
12019
|
+
if (existsSync20(dest)) {
|
|
11814
12020
|
warnings.push(`Skipped ${rel} (target already exists)`);
|
|
11815
12021
|
return;
|
|
11816
12022
|
}
|
|
11817
|
-
await mkdir10(
|
|
12023
|
+
await mkdir10(dirname17(dest), { recursive: true });
|
|
11818
12024
|
await rename5(abs, dest);
|
|
11819
12025
|
warnings.push(`Could not parse ${rel}; moved as-is — convert it to meta.ts by hand.`);
|
|
11820
12026
|
}));
|
|
@@ -11822,7 +12028,7 @@ var relocateUnparseableMetas = async (root, metas) => {
|
|
|
11822
12028
|
};
|
|
11823
12029
|
var buildConfig = (tabs) => tabs.length > 0 ? { navigation: { tabs }, title: "Documentation" } : { title: "Documentation" };
|
|
11824
12030
|
var migrateNextraProject = async (root) => {
|
|
11825
|
-
const sourceDir = SOURCE_DIRS.find((dir) =>
|
|
12031
|
+
const sourceDir = SOURCE_DIRS.find((dir) => existsSync20(join32(root, dir)));
|
|
11826
12032
|
if (!sourceDir) {
|
|
11827
12033
|
await writeBlumeConfig(root, { title: "Documentation" });
|
|
11828
12034
|
return {
|
|
@@ -11832,7 +12038,7 @@ var migrateNextraProject = async (root) => {
|
|
|
11832
12038
|
]
|
|
11833
12039
|
};
|
|
11834
12040
|
}
|
|
11835
|
-
const base =
|
|
12041
|
+
const base = join32(root, sourceDir);
|
|
11836
12042
|
const pageFiles = await glob10([PAGE_GLOB2], {
|
|
11837
12043
|
absolute: true,
|
|
11838
12044
|
cwd: base,
|
|
@@ -11873,15 +12079,15 @@ var migrateNextraProject = async (root) => {
|
|
|
11873
12079
|
};
|
|
11874
12080
|
|
|
11875
12081
|
// src/migrate/starlight/index.ts
|
|
11876
|
-
import { existsSync as
|
|
12082
|
+
import { existsSync as existsSync22 } from "node:fs";
|
|
11877
12083
|
import { readFile as readFile21, writeFile as writeFile14 } from "node:fs/promises";
|
|
11878
|
-
import { join as
|
|
12084
|
+
import { join as join34 } from "pathe";
|
|
11879
12085
|
import { glob as glob11 } from "tinyglobby";
|
|
11880
12086
|
|
|
11881
12087
|
// src/migrate/starlight/config.ts
|
|
11882
|
-
import { existsSync as
|
|
12088
|
+
import { existsSync as existsSync21 } from "node:fs";
|
|
11883
12089
|
import { readFile as readFile20 } from "node:fs/promises";
|
|
11884
|
-
import { join as
|
|
12090
|
+
import { join as join33 } from "pathe";
|
|
11885
12091
|
var CONFIG_FILES = [
|
|
11886
12092
|
"astro.config.mjs",
|
|
11887
12093
|
"astro.config.mts",
|
|
@@ -11912,7 +12118,7 @@ var extractStarlightOptions = (source) => {
|
|
|
11912
12118
|
return isLiteralObject(parsed) ? parsed : "unparseable";
|
|
11913
12119
|
};
|
|
11914
12120
|
var loadStarlightConfig = async (root) => {
|
|
11915
|
-
const file = CONFIG_FILES.map((name) =>
|
|
12121
|
+
const file = CONFIG_FILES.map((name) => join33(root, name)).find((path) => existsSync21(path));
|
|
11916
12122
|
if (!file) {
|
|
11917
12123
|
return {
|
|
11918
12124
|
options: {},
|
|
@@ -12344,8 +12550,8 @@ var migrateStarlightProject = async (root) => {
|
|
|
12344
12550
|
config.i18n = i18n;
|
|
12345
12551
|
warnings.push(`Mapped ${i18n.locales.length} locale(s) to i18n (default: ${i18n.defaultLocale}); review the locale labels.`);
|
|
12346
12552
|
}
|
|
12347
|
-
const base =
|
|
12348
|
-
if (!
|
|
12553
|
+
const base = join34(root, CONTENT_DIR);
|
|
12554
|
+
if (!existsSync22(base)) {
|
|
12349
12555
|
await writeBlumeConfig(root, config);
|
|
12350
12556
|
return {
|
|
12351
12557
|
moved: 0,
|
|
@@ -12433,10 +12639,10 @@ var migrateCommand = defineCommand7({
|
|
|
12433
12639
|
});
|
|
12434
12640
|
|
|
12435
12641
|
// src/cli/commands/preview.ts
|
|
12436
|
-
import { existsSync as
|
|
12642
|
+
import { existsSync as existsSync23 } from "node:fs";
|
|
12437
12643
|
import { preview } from "astro";
|
|
12438
12644
|
import { defineCommand as defineCommand8 } from "citty";
|
|
12439
|
-
import { join as
|
|
12645
|
+
import { join as join35 } from "pathe";
|
|
12440
12646
|
var previewCommand = defineCommand8({
|
|
12441
12647
|
args: {
|
|
12442
12648
|
host: { description: "Network host to bind.", type: "string" },
|
|
@@ -12450,7 +12656,7 @@ var previewCommand = defineCommand8({
|
|
|
12450
12656
|
const root = process.cwd();
|
|
12451
12657
|
const { config } = await loadConfig(root);
|
|
12452
12658
|
const context = resolveProjectContext(root, config);
|
|
12453
|
-
if (!
|
|
12659
|
+
if (!existsSync23(join35(context.outDir, "astro.config.mjs"))) {
|
|
12454
12660
|
logger.error("No build found. Run `blume build` first.");
|
|
12455
12661
|
process.exit(1);
|
|
12456
12662
|
}
|
|
@@ -12468,7 +12674,7 @@ var previewCommand = defineCommand8({
|
|
|
12468
12674
|
// src/cli/commands/sync.ts
|
|
12469
12675
|
import { rm as rm6 } from "node:fs/promises";
|
|
12470
12676
|
import { defineCommand as defineCommand9 } from "citty";
|
|
12471
|
-
import { join as
|
|
12677
|
+
import { join as join36 } from "pathe";
|
|
12472
12678
|
var syncCommand = defineCommand9({
|
|
12473
12679
|
args: {
|
|
12474
12680
|
force: {
|
|
@@ -12490,7 +12696,7 @@ var syncCommand = defineCommand9({
|
|
|
12490
12696
|
if (args.force) {
|
|
12491
12697
|
const { config } = await loadConfig(root);
|
|
12492
12698
|
const context = resolveProjectContext(root, config);
|
|
12493
|
-
await rm6(
|
|
12699
|
+
await rm6(join36(context.outDir, "cache"), { force: true, recursive: true });
|
|
12494
12700
|
logger.info("Cleared source cache.");
|
|
12495
12701
|
}
|
|
12496
12702
|
await prepareProject({
|
|
@@ -12505,13 +12711,13 @@ var syncCommand = defineCommand9({
|
|
|
12505
12711
|
});
|
|
12506
12712
|
|
|
12507
12713
|
// src/cli/commands/validate.ts
|
|
12508
|
-
import { existsSync as
|
|
12714
|
+
import { existsSync as existsSync25 } from "node:fs";
|
|
12509
12715
|
import { defineCommand as defineCommand10 } from "citty";
|
|
12510
|
-
import { join as
|
|
12716
|
+
import { join as join38 } from "pathe";
|
|
12511
12717
|
|
|
12512
12718
|
// src/core/links.ts
|
|
12513
|
-
import { existsSync as
|
|
12514
|
-
import { join as
|
|
12719
|
+
import { existsSync as existsSync24 } from "node:fs";
|
|
12720
|
+
import { join as join37 } from "pathe";
|
|
12515
12721
|
var HTTP = /^https?:\/\//iu;
|
|
12516
12722
|
var PROTOCOL_RELATIVE = /^\/\//u;
|
|
12517
12723
|
var SCHEME = /^[a-z][a-z0-9+.-]*:/iu;
|
|
@@ -12571,7 +12777,7 @@ var checkPathLink = (resolved, fragment, target, site, ctx) => {
|
|
|
12571
12777
|
if (ctx.publicDir === null) {
|
|
12572
12778
|
return "asset-unchecked";
|
|
12573
12779
|
}
|
|
12574
|
-
if (
|
|
12780
|
+
if (existsSync24(join37(ctx.publicDir, resolved))) {
|
|
12575
12781
|
return null;
|
|
12576
12782
|
}
|
|
12577
12783
|
return {
|
|
@@ -12755,10 +12961,10 @@ var validateCommand = defineCommand10({
|
|
|
12755
12961
|
try {
|
|
12756
12962
|
const project = await scanProject(root, { mode: "build" });
|
|
12757
12963
|
diagnostics.push(...project.diagnostics);
|
|
12758
|
-
const publicDir =
|
|
12964
|
+
const publicDir = join38(root, "public");
|
|
12759
12965
|
diagnostics.push(...await validateLinks(project.graph, {
|
|
12760
12966
|
checkExternal: Boolean(args.external),
|
|
12761
|
-
publicDir:
|
|
12967
|
+
publicDir: existsSync25(publicDir) ? publicDir : null,
|
|
12762
12968
|
redirects: project.config.redirects
|
|
12763
12969
|
}));
|
|
12764
12970
|
} catch (error) {
|
|
@@ -12798,7 +13004,8 @@ var main = defineCommand11({
|
|
|
12798
13004
|
validate: validateCommand
|
|
12799
13005
|
}
|
|
12800
13006
|
});
|
|
13007
|
+
loadEnvFiles(process.cwd());
|
|
12801
13008
|
runMain(main);
|
|
12802
13009
|
|
|
12803
|
-
//# debugId=
|
|
13010
|
+
//# debugId=1F31417850B615D064756E2164756E21
|
|
12804
13011
|
//# sourceMappingURL=index.js.map
|