blume 1.7.1 → 1.7.2
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/CHANGELOG.md +8 -0
- package/dist/cli/{chunk-mfm4sjwx.js → chunk-12dxjqk7.js} +32 -43
- package/dist/cli/{chunk-mfm4sjwx.js.map → chunk-12dxjqk7.js.map} +2 -2
- package/dist/cli/{chunk-vyqj481z.js → chunk-196vjxp9.js} +64 -64
- package/dist/cli/chunk-196vjxp9.js.map +13 -0
- package/dist/cli/{chunk-27gtm2ym.js → chunk-2mzebbbz.js} +1 -1
- package/dist/cli/{chunk-s5e5jt53.js → chunk-2z47ypj8.js} +1 -1
- package/dist/cli/{chunk-52cwcqvp.js → chunk-30e87n55.js} +15 -24
- package/dist/cli/{chunk-52cwcqvp.js.map → chunk-30e87n55.js.map} +2 -2
- package/dist/cli/{chunk-4trphnvy.js → chunk-3w7b2vcx.js} +10 -13
- package/dist/cli/{chunk-4trphnvy.js.map → chunk-3w7b2vcx.js.map} +2 -2
- package/dist/cli/{chunk-kmx2mydj.js → chunk-450a7rcr.js} +8 -8
- package/dist/cli/{chunk-kmx2mydj.js.map → chunk-450a7rcr.js.map} +1 -1
- package/dist/cli/{chunk-x1wvw7a8.js → chunk-5n7t497w.js} +129 -131
- package/dist/cli/{chunk-x1wvw7a8.js.map → chunk-5n7t497w.js.map} +4 -4
- package/dist/cli/{chunk-r99hynxh.js → chunk-61j18dwk.js} +36 -9
- package/dist/cli/{chunk-r99hynxh.js.map → chunk-61j18dwk.js.map} +3 -3
- package/dist/cli/{chunk-3r94j3tc.js → chunk-688e0dde.js} +2 -2
- package/dist/cli/{chunk-vxv4x1n8.js → chunk-88by27n5.js} +2 -2
- package/dist/cli/{chunk-h9ekmtz7.js → chunk-8cd8tj54.js} +28 -35
- package/dist/cli/{chunk-h9ekmtz7.js.map → chunk-8cd8tj54.js.map} +2 -2
- package/dist/cli/{chunk-8gnpdsn1.js → chunk-9bkjd11x.js} +2 -2
- package/dist/cli/{chunk-k0v1f8bb.js → chunk-9he6crym.js} +21 -28
- package/dist/cli/{chunk-k0v1f8bb.js.map → chunk-9he6crym.js.map} +2 -2
- package/dist/cli/{chunk-aqjvpd03.js → chunk-aztttvb3.js} +27 -33
- package/dist/cli/{chunk-aqjvpd03.js.map → chunk-aztttvb3.js.map} +2 -2
- package/dist/cli/{chunk-6mq7qkve.js → chunk-cvky9gb2.js} +18 -24
- package/dist/cli/{chunk-6mq7qkve.js.map → chunk-cvky9gb2.js.map} +2 -2
- package/dist/cli/{chunk-90pdhkpm.js → chunk-eevwt1sc.js} +23 -32
- package/dist/cli/{chunk-90pdhkpm.js.map → chunk-eevwt1sc.js.map} +2 -2
- package/dist/cli/{chunk-4ae4f395.js → chunk-ejjx8znq.js} +53 -34
- package/dist/cli/chunk-ejjx8znq.js.map +15 -0
- package/dist/cli/{chunk-8p3xe5jv.js → chunk-exeeb35e.js} +3 -3
- package/dist/cli/{chunk-q56730e0.js → chunk-fmceyezb.js} +41 -50
- package/dist/cli/{chunk-q56730e0.js.map → chunk-fmceyezb.js.map} +2 -2
- package/dist/cli/{chunk-12dzsn9b.js → chunk-hdm2dkd2.js} +72 -77
- package/dist/cli/{chunk-12dzsn9b.js.map → chunk-hdm2dkd2.js.map} +2 -2
- package/dist/cli/{chunk-j5f2wrj5.js → chunk-hs3gbh8p.js} +10 -15
- package/dist/cli/{chunk-j5f2wrj5.js.map → chunk-hs3gbh8p.js.map} +2 -2
- package/dist/cli/{chunk-ywn7t0pb.js → chunk-jbj4qhfw.js} +3 -3
- package/dist/cli/{chunk-ev67ycx0.js → chunk-jq5n4avg.js} +1 -1
- package/dist/cli/{chunk-he2zfgah.js → chunk-mqb2ka8m.js} +22 -30
- package/dist/cli/{chunk-he2zfgah.js.map → chunk-mqb2ka8m.js.map} +2 -2
- package/dist/cli/{chunk-5gfw0q4j.js → chunk-mt76t7dj.js} +26 -34
- package/dist/cli/{chunk-5gfw0q4j.js.map → chunk-mt76t7dj.js.map} +2 -2
- package/dist/cli/{chunk-jtb45atp.js → chunk-n9sra6sy.js} +13 -13
- package/dist/cli/{chunk-jtb45atp.js.map → chunk-n9sra6sy.js.map} +1 -1
- package/dist/cli/{chunk-x66c5yjn.js → chunk-ppfvdcd4.js} +2 -2
- package/dist/cli/{chunk-wd27zjcz.js → chunk-q4rae3bg.js} +1 -1
- package/dist/cli/{chunk-pxj10x8y.js → chunk-ra1v2nc2.js} +1 -1
- package/dist/cli/{chunk-np8dmfb0.js → chunk-t3tj0dgr.js} +26 -33
- package/dist/cli/{chunk-np8dmfb0.js.map → chunk-t3tj0dgr.js.map} +2 -2
- package/dist/cli/{chunk-qvvpnwaz.js → chunk-tqa1s0k8.js} +4 -4
- package/dist/cli/{chunk-cbjnx4s8.js → chunk-vh9w1sgp.js} +1 -1
- package/dist/cli/{chunk-82atea4k.js → chunk-vkrsvbr5.js} +13 -17
- package/dist/cli/{chunk-82atea4k.js.map → chunk-vkrsvbr5.js.map} +2 -2
- package/dist/cli/{chunk-sbdqrjbb.js → chunk-vrfp10qk.js} +1 -1
- package/dist/cli/{chunk-ka5k7cz9.js → chunk-wjt80jps.js} +27 -27
- package/dist/cli/{chunk-ka5k7cz9.js.map → chunk-wjt80jps.js.map} +2 -2
- package/dist/cli/{chunk-pdwg3q9g.js → chunk-xhtpx3ff.js} +21 -30
- package/dist/cli/{chunk-pdwg3q9g.js.map → chunk-xhtpx3ff.js.map} +2 -2
- package/dist/cli/{chunk-5hs6gb7n.js → chunk-yzhm0j9q.js} +1 -1
- package/dist/cli/index.js +397 -34
- package/dist/cli/index.js.map +12 -4
- package/dist/types/core/config-input.d.ts +26 -0
- package/dist/types/core/schema.d.ts +27 -3
- package/docs/configuration/ask-ai.mdx +47 -0
- package/package.json +1 -1
- package/src/ai/cors.ts +87 -0
- package/src/astro/generate.ts +2 -0
- package/src/astro/templates.ts +88 -23
- package/src/components/layout/NavTree.astro +75 -66
- package/src/components/layout/RootLayout.astro +4 -1
- package/src/components/layout/nav-utils.ts +17 -3
- package/src/core/adapter.ts +61 -0
- package/src/core/config-input.ts +26 -0
- package/src/core/schema.ts +56 -0
- package/src/registry/eject.ts +2 -0
- package/dist/cli/chunk-2aj8ddew.js +0 -72
- package/dist/cli/chunk-2aj8ddew.js.map +0 -10
- package/dist/cli/chunk-4ae4f395.js.map +0 -15
- package/dist/cli/chunk-4xyggvgf.js +0 -21
- package/dist/cli/chunk-4xyggvgf.js.map +0 -10
- package/dist/cli/chunk-6kzzpsx8.js +0 -26
- package/dist/cli/chunk-6kzzpsx8.js.map +0 -10
- package/dist/cli/chunk-bcy492zc.js +0 -16
- package/dist/cli/chunk-bcy492zc.js.map +0 -10
- package/dist/cli/chunk-btfr9yvw.js +0 -41
- package/dist/cli/chunk-btfr9yvw.js.map +0 -10
- package/dist/cli/chunk-ey89bjj1.js +0 -209
- package/dist/cli/chunk-ey89bjj1.js.map +0 -11
- package/dist/cli/chunk-vt8fgygt.js +0 -23
- package/dist/cli/chunk-vt8fgygt.js.map +0 -10
- package/dist/cli/chunk-vyqj481z.js.map +0 -13
- /package/dist/cli/{chunk-27gtm2ym.js.map → chunk-2mzebbbz.js.map} +0 -0
- /package/dist/cli/{chunk-s5e5jt53.js.map → chunk-2z47ypj8.js.map} +0 -0
- /package/dist/cli/{chunk-3r94j3tc.js.map → chunk-688e0dde.js.map} +0 -0
- /package/dist/cli/{chunk-vxv4x1n8.js.map → chunk-88by27n5.js.map} +0 -0
- /package/dist/cli/{chunk-8gnpdsn1.js.map → chunk-9bkjd11x.js.map} +0 -0
- /package/dist/cli/{chunk-8p3xe5jv.js.map → chunk-exeeb35e.js.map} +0 -0
- /package/dist/cli/{chunk-ywn7t0pb.js.map → chunk-jbj4qhfw.js.map} +0 -0
- /package/dist/cli/{chunk-ev67ycx0.js.map → chunk-jq5n4avg.js.map} +0 -0
- /package/dist/cli/{chunk-x66c5yjn.js.map → chunk-ppfvdcd4.js.map} +0 -0
- /package/dist/cli/{chunk-wd27zjcz.js.map → chunk-q4rae3bg.js.map} +0 -0
- /package/dist/cli/{chunk-pxj10x8y.js.map → chunk-ra1v2nc2.js.map} +0 -0
- /package/dist/cli/{chunk-qvvpnwaz.js.map → chunk-tqa1s0k8.js.map} +0 -0
- /package/dist/cli/{chunk-cbjnx4s8.js.map → chunk-vh9w1sgp.js.map} +0 -0
- /package/dist/cli/{chunk-sbdqrjbb.js.map → chunk-vrfp10qk.js.map} +0 -0
- /package/dist/cli/{chunk-5hs6gb7n.js.map → chunk-yzhm0j9q.js.map} +0 -0
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
getBlumeVersion,
|
|
4
|
+
BlumeError,
|
|
5
|
+
diagnosticsFromIssues,
|
|
6
|
+
diagnosticsFromZod
|
|
7
|
+
} from "./index.js";
|
|
8
|
+
import {
|
|
5
9
|
applyDeploymentEnv,
|
|
10
|
+
slugify,
|
|
6
11
|
blumeReferences,
|
|
7
12
|
createModuleLoader,
|
|
8
|
-
folderMetaSchema,
|
|
9
|
-
loadConfig,
|
|
10
|
-
pageMetaSchema,
|
|
11
13
|
resolveProjectContext,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
PUBLIC_API_URL,
|
|
15
|
+
UI_PACKS,
|
|
16
|
+
pageMetaSchema,
|
|
17
|
+
folderMetaSchema,
|
|
18
|
+
loadConfig
|
|
19
|
+
} from "./chunk-61j18dwk.js";
|
|
14
20
|
import {
|
|
15
|
-
isInternalPath,
|
|
16
|
-
stripBasePath,
|
|
17
21
|
trimChar,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./chunk-4xyggvgf.js";
|
|
23
|
-
import {
|
|
24
|
-
BlumeError,
|
|
25
|
-
diagnosticsFromIssues,
|
|
26
|
-
diagnosticsFromZod
|
|
27
|
-
} from "./chunk-ey89bjj1.js";
|
|
28
|
-
import {
|
|
29
|
-
__require
|
|
30
|
-
} from "./chunk-2aj8ddew.js";
|
|
22
|
+
isInternalPath,
|
|
23
|
+
withBasePath,
|
|
24
|
+
stripBasePath
|
|
25
|
+
} from "./chunk-2mzebbbz.js";
|
|
31
26
|
|
|
32
27
|
// src/core/i18n.ts
|
|
33
28
|
var KNOWN_LOCALES = new Set([...Object.keys(UI_PACKS), "en"].map((code) => code.toLowerCase()));
|
|
@@ -60,7 +55,7 @@ var localePlacement = (rel, ext, i18n) => {
|
|
|
60
55
|
if (base.endsWith(".$")) {
|
|
61
56
|
const shared = `${base.slice(0, -2)}${ext}`;
|
|
62
57
|
return {
|
|
63
|
-
locales: i18n.locales.map((
|
|
58
|
+
locales: i18n.locales.map((locale) => locale.code),
|
|
64
59
|
navPath: i18n.parser === "dir" ? detectLocale(shared.split("/"), i18n).rest.join("/") : shared
|
|
65
60
|
};
|
|
66
61
|
}
|
|
@@ -68,7 +63,7 @@ var localePlacement = (rel, ext, i18n) => {
|
|
|
68
63
|
const lastDot = base.lastIndexOf(".");
|
|
69
64
|
if (lastDot > base.lastIndexOf("/")) {
|
|
70
65
|
const suffix = base.slice(lastDot + 1).toLowerCase();
|
|
71
|
-
const matched = i18n.locales.find((
|
|
66
|
+
const matched = i18n.locales.find((locale) => locale.code.toLowerCase() === suffix);
|
|
72
67
|
if (matched) {
|
|
73
68
|
return {
|
|
74
69
|
locales: [matched.code],
|
|
@@ -885,15 +880,15 @@ var buildNavigation = (pages, options) => {
|
|
|
885
880
|
const diagnostics = options.diagnostics ?? [];
|
|
886
881
|
diagnostics.push(...sidebarDisplayIgnoredDiagnostics(pages, Boolean(options.sidebar)));
|
|
887
882
|
if (options.sidebar) {
|
|
888
|
-
const
|
|
883
|
+
const sidebar = buildConfigSidebar(options.sidebar, byRoute, display, basePath);
|
|
889
884
|
return {
|
|
890
885
|
actions,
|
|
891
886
|
cta,
|
|
892
887
|
featured,
|
|
893
888
|
root: rootTabPath,
|
|
894
889
|
selectors,
|
|
895
|
-
sidebar
|
|
896
|
-
tabs: withTabHrefs(tabs,
|
|
890
|
+
sidebar,
|
|
891
|
+
tabs: withTabHrefs(tabs, sidebar)
|
|
897
892
|
};
|
|
898
893
|
}
|
|
899
894
|
const sidebar = buildFileSystemSidebar(pages, options.folderMeta, sharedFolderMeta, metaPrefix, sharedMetaPrefix, display, new Set(tabs.flatMap((tab) => isRootTab(tab, rootTabPath) ? [] : [tab.path])), diagnostics);
|
|
@@ -1791,13 +1786,13 @@ var resolveIncludePath = (target, filePath, ctx, line) => {
|
|
|
1791
1786
|
error: includeError("BLUME_INCLUDE_OUTSIDE_ROOT", `Include target ${target} is root-relative, but no content root is configured here.`, filePath, line, "Use a path relative to the including file instead.")
|
|
1792
1787
|
};
|
|
1793
1788
|
}
|
|
1794
|
-
const
|
|
1795
|
-
if (escapesRoot(ctx.contentRoot,
|
|
1789
|
+
const path = join(ctx.contentRoot, target);
|
|
1790
|
+
if (escapesRoot(ctx.contentRoot, path)) {
|
|
1796
1791
|
return {
|
|
1797
1792
|
error: includeError("BLUME_INCLUDE_OUTSIDE_ROOT", `Include target ${target} resolves outside the content root.`, filePath, line, "Root-relative include paths resolve from the content root and cannot climb above it.")
|
|
1798
1793
|
};
|
|
1799
1794
|
}
|
|
1800
|
-
return { path
|
|
1795
|
+
return { path };
|
|
1801
1796
|
}
|
|
1802
1797
|
const path = resolve(dirname(filePath), target);
|
|
1803
1798
|
if (ctx.contentRoot && escapesRoot(ctx.contentRoot, path)) {
|
|
@@ -1871,10 +1866,10 @@ var expandStatement = async (statement, filePath, line, ctx, stack) => {
|
|
|
1871
1866
|
ctx.includes.add(path);
|
|
1872
1867
|
const asContent = !statement.attributes.lang && CONTENT_EXTENSIONS.has(extname3(path).toLowerCase());
|
|
1873
1868
|
if (!asContent) {
|
|
1874
|
-
const
|
|
1869
|
+
const lines = codeBlockLines(content, path, statement.attributes);
|
|
1875
1870
|
return {
|
|
1876
|
-
lines
|
|
1877
|
-
origins:
|
|
1871
|
+
lines,
|
|
1872
|
+
origins: lines.map((_, i) => ({ file: path, line: Math.max(1, i) }))
|
|
1878
1873
|
};
|
|
1879
1874
|
}
|
|
1880
1875
|
const parsed = frontmatter_default(content);
|
|
@@ -2114,7 +2109,7 @@ var discoverFolderMeta = async (sources, options = {}) => {
|
|
|
2114
2109
|
const list = Array.isArray(sources) ? sources : [{ root: sources }];
|
|
2115
2110
|
const localeDirs = new Set(options.localeDirs);
|
|
2116
2111
|
const versionDirs = new Set(options.versionDirs);
|
|
2117
|
-
const
|
|
2112
|
+
const load = createModuleLoader();
|
|
2118
2113
|
const meta = new Map;
|
|
2119
2114
|
const shared = new Map;
|
|
2120
2115
|
const diagnostics = [];
|
|
@@ -2130,7 +2125,7 @@ var discoverFolderMeta = async (sources, options = {}) => {
|
|
|
2130
2125
|
return {
|
|
2131
2126
|
file,
|
|
2132
2127
|
ok: true,
|
|
2133
|
-
value: await resolveMeta(await
|
|
2128
|
+
value: await resolveMeta(await load(file))
|
|
2134
2129
|
};
|
|
2135
2130
|
} catch (error) {
|
|
2136
2131
|
return { error, file, ok: false };
|
|
@@ -2181,7 +2176,7 @@ import { mkdir, readFile as readFile2, writeFile } from "node:fs/promises";
|
|
|
2181
2176
|
import { join as join2 } from "pathe";
|
|
2182
2177
|
var hashText = (text) => createHash("sha256").update(text).digest("hex").slice(0, 16);
|
|
2183
2178
|
var entriesDigest = (entries) => hashText(entries.map((entry) => `${entry.ref}:${entry.hash ?? hashText(entry.body.text)}`).join("|"));
|
|
2184
|
-
var pollingWatch = (
|
|
2179
|
+
var pollingWatch = (load, intervalSeconds, seed) => (onChange) => {
|
|
2185
2180
|
let last = "";
|
|
2186
2181
|
if (seed) {
|
|
2187
2182
|
const seedBaseline = async () => {
|
|
@@ -2194,7 +2189,7 @@ var pollingWatch = (load2, intervalSeconds, seed) => (onChange) => {
|
|
|
2194
2189
|
}
|
|
2195
2190
|
const tick = async () => {
|
|
2196
2191
|
try {
|
|
2197
|
-
const { entries } = await
|
|
2192
|
+
const { entries } = await load();
|
|
2198
2193
|
const next = entriesDigest(entries);
|
|
2199
2194
|
if (last && next !== last) {
|
|
2200
2195
|
onChange();
|
|
@@ -3283,25 +3278,25 @@ var tagFolderMeta = (spec, tags) => {
|
|
|
3283
3278
|
var parseReference = async (reference, ctx) => {
|
|
3284
3279
|
const options = { cacheDir: ctx.cacheDir, refresh: ctx.refresh };
|
|
3285
3280
|
if (reference.kind === "asyncapi") {
|
|
3286
|
-
const { document
|
|
3287
|
-
const
|
|
3281
|
+
const { document, warnings } = await parseAsyncApiSpec(reference.spec, ctx.projectRoot, options);
|
|
3282
|
+
const extracted = extractAsyncApiOperations(document, reference.route);
|
|
3288
3283
|
return {
|
|
3289
|
-
document
|
|
3290
|
-
extractWarnings:
|
|
3291
|
-
operations:
|
|
3292
|
-
tags:
|
|
3293
|
-
warnings
|
|
3284
|
+
document,
|
|
3285
|
+
extractWarnings: extracted.warnings,
|
|
3286
|
+
operations: extracted.operations,
|
|
3287
|
+
tags: extracted.tags,
|
|
3288
|
+
warnings
|
|
3294
3289
|
};
|
|
3295
3290
|
}
|
|
3296
3291
|
if (reference.kind === "graphql") {
|
|
3297
|
-
const { document
|
|
3298
|
-
const
|
|
3292
|
+
const { document, warnings } = await parseGraphqlSpec(reference.spec, ctx.projectRoot, options);
|
|
3293
|
+
const extracted = extractGraphqlOperations(document, reference.route);
|
|
3299
3294
|
return {
|
|
3300
|
-
document
|
|
3301
|
-
extractWarnings:
|
|
3302
|
-
operations:
|
|
3303
|
-
tags:
|
|
3304
|
-
warnings
|
|
3295
|
+
document,
|
|
3296
|
+
extractWarnings: extracted.warnings,
|
|
3297
|
+
operations: extracted.operations,
|
|
3298
|
+
tags: extracted.tags,
|
|
3299
|
+
warnings
|
|
3305
3300
|
};
|
|
3306
3301
|
}
|
|
3307
3302
|
const { document, warnings } = await parseSpec(reference.spec, ctx.projectRoot, options);
|
|
@@ -3388,7 +3383,7 @@ var openApiSource = (references, ctx) => {
|
|
|
3388
3383
|
};
|
|
3389
3384
|
}
|
|
3390
3385
|
};
|
|
3391
|
-
const
|
|
3386
|
+
const load = async () => {
|
|
3392
3387
|
const results = await Promise.all(references.map(loadReference));
|
|
3393
3388
|
const entries = [];
|
|
3394
3389
|
const diagnostics = references.flatMap((reference) => (reference.collisions ?? []).map((message) => ({
|
|
@@ -3413,7 +3408,7 @@ var openApiSource = (references, ctx) => {
|
|
|
3413
3408
|
};
|
|
3414
3409
|
return {
|
|
3415
3410
|
kind: "openapi-source",
|
|
3416
|
-
load
|
|
3411
|
+
load,
|
|
3417
3412
|
name: "openapi",
|
|
3418
3413
|
openApiData: () => parsed,
|
|
3419
3414
|
staged: true
|
|
@@ -3454,7 +3449,7 @@ var ignoringWatchListener = (onChange, ignoreDirs = BLUME_WATCH_IGNORE_DIRS, ign
|
|
|
3454
3449
|
// src/core/sources/filesystem.ts
|
|
3455
3450
|
var filesystemSource = (options) => {
|
|
3456
3451
|
const contentRoot = isAbsolute2(options.root) ? options.root : join4(resolve2(options.projectRoot), options.root);
|
|
3457
|
-
const
|
|
3452
|
+
const load = async () => {
|
|
3458
3453
|
const files = await glob2(options.include, {
|
|
3459
3454
|
absolute: true,
|
|
3460
3455
|
cwd: contentRoot,
|
|
@@ -3501,7 +3496,7 @@ var filesystemSource = (options) => {
|
|
|
3501
3496
|
};
|
|
3502
3497
|
return {
|
|
3503
3498
|
contentRoot,
|
|
3504
|
-
load
|
|
3499
|
+
load,
|
|
3505
3500
|
name: options.name,
|
|
3506
3501
|
prefix: options.prefix,
|
|
3507
3502
|
read: (ref) => readFile4(join4(contentRoot, ref), "utf-8"),
|
|
@@ -3614,7 +3609,7 @@ var githubReleasesSource = (options, ctx) => {
|
|
|
3614
3609
|
}
|
|
3615
3610
|
return collected.slice(0, max);
|
|
3616
3611
|
};
|
|
3617
|
-
const
|
|
3612
|
+
const load = async (refresh = ctx.refresh ?? true) => {
|
|
3618
3613
|
try {
|
|
3619
3614
|
const result = await loadWithCache(options.name, cache, async () => {
|
|
3620
3615
|
const releases = await fetchReleases();
|
|
@@ -3646,12 +3641,12 @@ var githubReleasesSource = (options, ctx) => {
|
|
|
3646
3641
|
return entry?.raw ?? entry?.body.text ?? "";
|
|
3647
3642
|
};
|
|
3648
3643
|
return {
|
|
3649
|
-
load
|
|
3644
|
+
load,
|
|
3650
3645
|
name: options.name,
|
|
3651
3646
|
prefix: options.prefix,
|
|
3652
3647
|
read,
|
|
3653
3648
|
staged: true,
|
|
3654
|
-
watch: options.pollInterval ? pollingWatch(() =>
|
|
3649
|
+
watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
|
|
3655
3650
|
};
|
|
3656
3651
|
};
|
|
3657
3652
|
|
|
@@ -3742,7 +3737,7 @@ var mdxRemoteSource = (options, ctx) => {
|
|
|
3742
3737
|
ref: item.ref
|
|
3743
3738
|
};
|
|
3744
3739
|
};
|
|
3745
|
-
const
|
|
3740
|
+
const load = async (refresh = ctx.refresh ?? true) => {
|
|
3746
3741
|
assertConfigured();
|
|
3747
3742
|
const skipped = [];
|
|
3748
3743
|
const result = await loadWithCache(options.name, cache, async () => {
|
|
@@ -3789,12 +3784,12 @@ var mdxRemoteSource = (options, ctx) => {
|
|
|
3789
3784
|
return entry?.raw ?? entry?.body.text ?? "";
|
|
3790
3785
|
};
|
|
3791
3786
|
return {
|
|
3792
|
-
load
|
|
3787
|
+
load,
|
|
3793
3788
|
name: options.name,
|
|
3794
3789
|
prefix: options.prefix,
|
|
3795
3790
|
read,
|
|
3796
3791
|
staged: true,
|
|
3797
|
-
watch: options.pollInterval ? pollingWatch(() =>
|
|
3792
|
+
watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
|
|
3798
3793
|
};
|
|
3799
3794
|
};
|
|
3800
3795
|
|
|
@@ -4209,7 +4204,7 @@ ${nested}`;
|
|
|
4209
4204
|
const slug = slugifyPath(slugProp || title) || page.id;
|
|
4210
4205
|
return { data, slug };
|
|
4211
4206
|
};
|
|
4212
|
-
const
|
|
4207
|
+
const toEntry = async (client, page) => {
|
|
4213
4208
|
const { data, slug } = frontmatter(page);
|
|
4214
4209
|
const mdx = await renderBlocks(client, await childrenOf(client, page.id));
|
|
4215
4210
|
const assets = await materializeAssets(mdx, {
|
|
@@ -4247,13 +4242,13 @@ ${nested}`;
|
|
|
4247
4242
|
data_source_id: dataSourceId,
|
|
4248
4243
|
start_cursor: cursor
|
|
4249
4244
|
}));
|
|
4250
|
-
const
|
|
4245
|
+
const load = async (refresh = ctx?.refresh ?? true) => {
|
|
4251
4246
|
const assetDiagnostics = [];
|
|
4252
4247
|
const result = await loadWithCache(options.name, cache, async () => {
|
|
4253
4248
|
const client = await resolveClient();
|
|
4254
4249
|
const dataSourceId = await resolveDataSource(client);
|
|
4255
4250
|
const pages = await collectAll((cursor) => queryDataSource(client, dataSourceId, cursor));
|
|
4256
|
-
const built = await Promise.all(pages.map((page) =>
|
|
4251
|
+
const built = await Promise.all(pages.map((page) => toEntry(client, page)));
|
|
4257
4252
|
for (const item of built) {
|
|
4258
4253
|
assetDiagnostics.push(...item.diagnostics);
|
|
4259
4254
|
}
|
|
@@ -4274,12 +4269,12 @@ ${nested}`;
|
|
|
4274
4269
|
return all.find((e) => e.ref === ref)?.raw ?? "";
|
|
4275
4270
|
};
|
|
4276
4271
|
return {
|
|
4277
|
-
load
|
|
4272
|
+
load,
|
|
4278
4273
|
name: options.name,
|
|
4279
4274
|
prefix: options.prefix,
|
|
4280
4275
|
read,
|
|
4281
4276
|
staged: true,
|
|
4282
|
-
watch: options.pollInterval ? pollingWatch(() =>
|
|
4277
|
+
watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
|
|
4283
4278
|
};
|
|
4284
4279
|
};
|
|
4285
4280
|
|
|
@@ -4690,10 +4685,10 @@ var unresolvedDiagnostics = (name, unresolved) => {
|
|
|
4690
4685
|
var obsidianSource = (options, ctx) => {
|
|
4691
4686
|
const vaultDir = resolve3(ctx.projectRoot, options.vault);
|
|
4692
4687
|
const exclude = new Set([...BLUME_IGNORE_DIRS, ...options.exclude ?? []]);
|
|
4693
|
-
const
|
|
4688
|
+
const load = async () => {
|
|
4694
4689
|
const files = await walkVault(vaultDir, vaultDir, exclude);
|
|
4695
|
-
const
|
|
4696
|
-
const notes =
|
|
4690
|
+
const read = await Promise.all(files.map((rel) => readNote(vaultDir, rel, options)));
|
|
4691
|
+
const notes = read.filter((note) => note !== null);
|
|
4697
4692
|
const { index, pairs } = buildLinkIndex(notes, options);
|
|
4698
4693
|
const unresolved = noTargets();
|
|
4699
4694
|
const entries = pairs.map((pair) => noteToEntry(pair, index, options, unresolved));
|
|
@@ -4739,7 +4734,7 @@ var obsidianSource = (options, ctx) => {
|
|
|
4739
4734
|
};
|
|
4740
4735
|
return {
|
|
4741
4736
|
contentRoot: vaultDir,
|
|
4742
|
-
load
|
|
4737
|
+
load,
|
|
4743
4738
|
name: options.name,
|
|
4744
4739
|
prefix: options.prefix,
|
|
4745
4740
|
read,
|
|
@@ -4897,7 +4892,7 @@ var sanitySource = (options, ctx) => {
|
|
|
4897
4892
|
const fields = options.fields ?? {};
|
|
4898
4893
|
const cache = snapshotCache(ctx?.cacheDir ?? join8(".blume", "cache", options.name));
|
|
4899
4894
|
let snapshot = new Map;
|
|
4900
|
-
const
|
|
4895
|
+
const toEntry = (doc) => {
|
|
4901
4896
|
const slugValue = asString(getPath(doc, fields.slug ?? "slug.current")) ?? asString(doc._id) ?? "untitled";
|
|
4902
4897
|
const slug = slugifyPath(slugValue) || slugify2(asString(doc._id) ?? "") || "untitled";
|
|
4903
4898
|
const data = {};
|
|
@@ -4927,11 +4922,11 @@ var sanitySource = (options, ctx) => {
|
|
|
4927
4922
|
ref: `${slug}.md`
|
|
4928
4923
|
};
|
|
4929
4924
|
};
|
|
4930
|
-
const
|
|
4925
|
+
const load = async (refresh = ctx?.refresh ?? true) => {
|
|
4931
4926
|
const result = await loadWithCache(options.name, cache, async () => {
|
|
4932
4927
|
const client = await resolveClient(options, ctx?.preview ?? false);
|
|
4933
4928
|
const docs = await client.fetch(options.query);
|
|
4934
|
-
return docs.map(
|
|
4929
|
+
return docs.map(toEntry);
|
|
4935
4930
|
}, refresh);
|
|
4936
4931
|
snapshot = new Map(result.entries.map((entry) => [entry.ref, entry]));
|
|
4937
4932
|
return result;
|
|
@@ -4945,12 +4940,12 @@ var sanitySource = (options, ctx) => {
|
|
|
4945
4940
|
return all.find((e) => e.ref === ref)?.raw ?? "";
|
|
4946
4941
|
};
|
|
4947
4942
|
return {
|
|
4948
|
-
load
|
|
4943
|
+
load,
|
|
4949
4944
|
name: options.name,
|
|
4950
4945
|
prefix: options.prefix,
|
|
4951
4946
|
read,
|
|
4952
4947
|
staged: true,
|
|
4953
|
-
watch: options.pollInterval ? pollingWatch(() =>
|
|
4948
|
+
watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
|
|
4954
4949
|
};
|
|
4955
4950
|
};
|
|
4956
4951
|
|
|
@@ -5283,5 +5278,5 @@ var scanProject = async (root, options = {}) => {
|
|
|
5283
5278
|
|
|
5284
5279
|
export { YAML_SCHEMA, frontmatter_default, TOC_HIDDEN_KEY, parseHeadingMarkers, BLUME_IGNORE_DIRS, i18nEnabled, localeCodes, resolveFallbackLocale, localePrefix, localizeRoute, localeTargetPath, validateSearchPopularIcons, validateNavTargets, VERSION_LIKE, versionizeRoute, nextFenceState, HTML_COMMENT, INLINE_CODE, scanBody, MD_IMAGE, targetOffsetIn, hasIncludeStatements, expandIncludes, buildIncludeGraph, contentIndexable, buildManifest, hashText, specOf, operationOf, specAddresses, apiNamePhrase, operationSignature, isOpenApiSource, parseYouTubeId, resolveDocsCollection, isWithin, scanProject };
|
|
5285
5280
|
|
|
5286
|
-
//# debugId=
|
|
5287
|
-
//# sourceMappingURL=chunk-
|
|
5281
|
+
//# debugId=FDD686362F0089E964756E2164756E21
|
|
5282
|
+
//# sourceMappingURL=chunk-hdm2dkd2.js.map
|