blume 1.7.1 → 1.7.3

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.
Files changed (138) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cli/chunk-0qymqwzz.js +164 -0
  3. package/dist/cli/chunk-0qymqwzz.js.map +15 -0
  4. package/dist/cli/{chunk-8gnpdsn1.js → chunk-0xjyb285.js} +2 -2
  5. package/dist/cli/{chunk-12dzsn9b.js → chunk-1jefwnfs.js} +82 -81
  6. package/dist/cli/{chunk-12dzsn9b.js.map → chunk-1jefwnfs.js.map} +3 -3
  7. package/dist/cli/{chunk-27gtm2ym.js → chunk-2mzebbbz.js} +1 -1
  8. package/dist/cli/{chunk-s5e5jt53.js → chunk-2z47ypj8.js} +1 -1
  9. package/dist/cli/{chunk-jtb45atp.js → chunk-3r45185y.js} +10 -12
  10. package/dist/cli/{chunk-jtb45atp.js.map → chunk-3r45185y.js.map} +2 -2
  11. package/dist/cli/{chunk-6mq7qkve.js → chunk-4x36ddpw.js} +18 -24
  12. package/dist/cli/{chunk-6mq7qkve.js.map → chunk-4x36ddpw.js.map} +2 -2
  13. package/dist/cli/{chunk-he2zfgah.js → chunk-5093q3n7.js} +22 -30
  14. package/dist/cli/{chunk-he2zfgah.js.map → chunk-5093q3n7.js.map} +2 -2
  15. package/dist/cli/{chunk-k0v1f8bb.js → chunk-5g0w1e2c.js} +21 -28
  16. package/dist/cli/{chunk-k0v1f8bb.js.map → chunk-5g0w1e2c.js.map} +2 -2
  17. package/dist/cli/{chunk-5gfw0q4j.js → chunk-5qk08vmp.js} +26 -34
  18. package/dist/cli/{chunk-5gfw0q4j.js.map → chunk-5qk08vmp.js.map} +2 -2
  19. package/dist/cli/{chunk-r99hynxh.js → chunk-7s8hm3b6.js} +41 -9
  20. package/dist/cli/{chunk-r99hynxh.js.map → chunk-7s8hm3b6.js.map} +3 -3
  21. package/dist/cli/{chunk-vyqj481z.js → chunk-8cjtbafj.js} +68 -66
  22. package/dist/cli/chunk-8cjtbafj.js.map +13 -0
  23. package/dist/cli/{chunk-aqjvpd03.js → chunk-97r59kpr.js} +27 -33
  24. package/dist/cli/{chunk-aqjvpd03.js.map → chunk-97r59kpr.js.map} +2 -2
  25. package/dist/cli/{chunk-np8dmfb0.js → chunk-ahnw3kxw.js} +26 -33
  26. package/dist/cli/{chunk-np8dmfb0.js.map → chunk-ahnw3kxw.js.map} +2 -2
  27. package/dist/cli/{chunk-j5f2wrj5.js → chunk-b27xqwn9.js} +10 -15
  28. package/dist/cli/{chunk-j5f2wrj5.js.map → chunk-b27xqwn9.js.map} +2 -2
  29. package/dist/cli/{chunk-kmx2mydj.js → chunk-bf6bt1xt.js} +8 -8
  30. package/dist/cli/{chunk-kmx2mydj.js.map → chunk-bf6bt1xt.js.map} +1 -1
  31. package/dist/cli/{chunk-90pdhkpm.js → chunk-bvwwhd84.js} +23 -32
  32. package/dist/cli/{chunk-90pdhkpm.js.map → chunk-bvwwhd84.js.map} +2 -2
  33. package/dist/cli/{chunk-mfm4sjwx.js → chunk-cjtn640a.js} +32 -43
  34. package/dist/cli/{chunk-mfm4sjwx.js.map → chunk-cjtn640a.js.map} +2 -2
  35. package/dist/cli/{chunk-pxj10x8y.js → chunk-ct47dqpx.js} +14 -3
  36. package/dist/cli/{chunk-pxj10x8y.js.map → chunk-ct47dqpx.js.map} +4 -3
  37. package/dist/cli/{chunk-x66c5yjn.js → chunk-dwgcp5sm.js} +2 -2
  38. package/dist/cli/{chunk-4trphnvy.js → chunk-e7f42gdj.js} +10 -13
  39. package/dist/cli/{chunk-4trphnvy.js.map → chunk-e7f42gdj.js.map} +2 -2
  40. package/dist/cli/{chunk-82atea4k.js → chunk-esphfr8p.js} +14 -18
  41. package/dist/cli/{chunk-82atea4k.js.map → chunk-esphfr8p.js.map} +2 -2
  42. package/dist/cli/{chunk-q56730e0.js → chunk-ex56aa81.js} +53 -53
  43. package/dist/cli/chunk-ex56aa81.js.map +13 -0
  44. package/dist/cli/{chunk-ywn7t0pb.js → chunk-garjf5z9.js} +3 -3
  45. package/dist/cli/{chunk-ev67ycx0.js → chunk-jq5n4avg.js} +1 -1
  46. package/dist/cli/{chunk-ka5k7cz9.js → chunk-js7saxwm.js} +35 -39
  47. package/dist/cli/{chunk-ka5k7cz9.js.map → chunk-js7saxwm.js.map} +4 -6
  48. package/dist/cli/{chunk-x1wvw7a8.js → chunk-k79xp7av.js} +168 -208
  49. package/dist/cli/chunk-k79xp7av.js.map +39 -0
  50. package/dist/cli/{chunk-3r94j3tc.js → chunk-nn13znc2.js} +2 -2
  51. package/dist/cli/{chunk-4ae4f395.js → chunk-ps4m1xh4.js} +60 -35
  52. package/dist/cli/chunk-ps4m1xh4.js.map +15 -0
  53. package/dist/cli/{chunk-wd27zjcz.js → chunk-q4rae3bg.js} +1 -1
  54. package/dist/cli/{chunk-pdwg3q9g.js → chunk-rqy0s5wh.js} +21 -30
  55. package/dist/cli/{chunk-pdwg3q9g.js.map → chunk-rqy0s5wh.js.map} +2 -2
  56. package/dist/cli/{chunk-52cwcqvp.js → chunk-rz9jmfhz.js} +15 -24
  57. package/dist/cli/{chunk-52cwcqvp.js.map → chunk-rz9jmfhz.js.map} +2 -2
  58. package/dist/cli/{chunk-8p3xe5jv.js → chunk-vacwm2hv.js} +3 -3
  59. package/dist/cli/{chunk-cbjnx4s8.js → chunk-vh9w1sgp.js} +1 -1
  60. package/dist/cli/{chunk-sbdqrjbb.js → chunk-vrfp10qk.js} +1 -1
  61. package/dist/cli/{chunk-h9ekmtz7.js → chunk-yg63d42r.js} +28 -35
  62. package/dist/cli/{chunk-h9ekmtz7.js.map → chunk-yg63d42r.js.map} +2 -2
  63. package/dist/cli/{chunk-5hs6gb7n.js → chunk-yzhm0j9q.js} +1 -1
  64. package/dist/cli/index.js +397 -34
  65. package/dist/cli/index.js.map +12 -4
  66. package/dist/types/core/config-input.d.ts +59 -0
  67. package/dist/types/core/data.d.ts +2 -0
  68. package/dist/types/core/schema.d.ts +47 -3
  69. package/dist/types/core/types.d.ts +5 -0
  70. package/docs/configuration/ask-ai.mdx +61 -0
  71. package/docs/configuration/index.mdx +3 -1
  72. package/docs/content/navigation.mdx +3 -0
  73. package/docs/content/syntax.mdx +10 -0
  74. package/docs/discoverability/agent-discovery.mdx +82 -1
  75. package/docs/discoverability/index.mdx +1 -1
  76. package/docs/discoverability/llms-txt.mdx +1 -1
  77. package/docs/reference/frontmatter.mdx +2 -0
  78. package/package.json +1 -1
  79. package/src/ai/agent-readability.ts +5 -0
  80. package/src/ai/ai-catalog.ts +241 -0
  81. package/src/ai/cors.ts +87 -0
  82. package/src/ai/link-headers.ts +12 -0
  83. package/src/ai/llms.ts +6 -0
  84. package/src/ai/mcp/discovery.ts +1 -1
  85. package/src/astro/generate.ts +4 -0
  86. package/src/astro/templates.ts +88 -23
  87. package/src/cli/commands/build.ts +3 -1
  88. package/src/components/islands/hooks.ts +50 -1
  89. package/src/components/layout/NavTree.astro +75 -66
  90. package/src/components/layout/RootLayout.astro +28 -2
  91. package/src/components/layout/analytics-client.ts +36 -7
  92. package/src/components/layout/nav-utils.ts +17 -3
  93. package/src/core/adapter.ts +61 -0
  94. package/src/core/config-input.ts +60 -0
  95. package/src/core/data.ts +2 -0
  96. package/src/core/navigation.ts +22 -3
  97. package/src/core/schema.ts +88 -0
  98. package/src/core/types.ts +5 -0
  99. package/src/deploy/artifacts.ts +12 -1
  100. package/src/deploy/headers.ts +6 -0
  101. package/src/deploy/vercel-negotiation.ts +25 -2
  102. package/src/registry/eject.ts +2 -0
  103. package/src/search/build.ts +25 -3
  104. package/src/theme/entry.ts +23 -0
  105. package/dist/cli/chunk-2aj8ddew.js +0 -72
  106. package/dist/cli/chunk-2aj8ddew.js.map +0 -10
  107. package/dist/cli/chunk-4ae4f395.js.map +0 -15
  108. package/dist/cli/chunk-4xyggvgf.js +0 -21
  109. package/dist/cli/chunk-4xyggvgf.js.map +0 -10
  110. package/dist/cli/chunk-6kzzpsx8.js +0 -26
  111. package/dist/cli/chunk-6kzzpsx8.js.map +0 -10
  112. package/dist/cli/chunk-bcy492zc.js +0 -16
  113. package/dist/cli/chunk-bcy492zc.js.map +0 -10
  114. package/dist/cli/chunk-btfr9yvw.js +0 -41
  115. package/dist/cli/chunk-btfr9yvw.js.map +0 -10
  116. package/dist/cli/chunk-ey89bjj1.js +0 -209
  117. package/dist/cli/chunk-ey89bjj1.js.map +0 -11
  118. package/dist/cli/chunk-q56730e0.js.map +0 -13
  119. package/dist/cli/chunk-qvvpnwaz.js +0 -69
  120. package/dist/cli/chunk-qvvpnwaz.js.map +0 -11
  121. package/dist/cli/chunk-vt8fgygt.js +0 -23
  122. package/dist/cli/chunk-vt8fgygt.js.map +0 -10
  123. package/dist/cli/chunk-vxv4x1n8.js +0 -17
  124. package/dist/cli/chunk-vxv4x1n8.js.map +0 -10
  125. package/dist/cli/chunk-vyqj481z.js.map +0 -13
  126. package/dist/cli/chunk-x1wvw7a8.js.map +0 -40
  127. /package/dist/cli/{chunk-8gnpdsn1.js.map → chunk-0xjyb285.js.map} +0 -0
  128. /package/dist/cli/{chunk-27gtm2ym.js.map → chunk-2mzebbbz.js.map} +0 -0
  129. /package/dist/cli/{chunk-s5e5jt53.js.map → chunk-2z47ypj8.js.map} +0 -0
  130. /package/dist/cli/{chunk-x66c5yjn.js.map → chunk-dwgcp5sm.js.map} +0 -0
  131. /package/dist/cli/{chunk-ywn7t0pb.js.map → chunk-garjf5z9.js.map} +0 -0
  132. /package/dist/cli/{chunk-ev67ycx0.js.map → chunk-jq5n4avg.js.map} +0 -0
  133. /package/dist/cli/{chunk-3r94j3tc.js.map → chunk-nn13znc2.js.map} +0 -0
  134. /package/dist/cli/{chunk-wd27zjcz.js.map → chunk-q4rae3bg.js.map} +0 -0
  135. /package/dist/cli/{chunk-8p3xe5jv.js.map → chunk-vacwm2hv.js.map} +0 -0
  136. /package/dist/cli/{chunk-cbjnx4s8.js.map → chunk-vh9w1sgp.js.map} +0 -0
  137. /package/dist/cli/{chunk-sbdqrjbb.js.map → chunk-vrfp10qk.js.map} +0 -0
  138. /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
- PUBLIC_API_URL,
4
- UI_PACKS,
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
- slugify
13
- } from "./chunk-r99hynxh.js";
14
+ PUBLIC_API_URL,
15
+ UI_PACKS,
16
+ pageMetaSchema,
17
+ folderMetaSchema,
18
+ loadConfig
19
+ } from "./chunk-7s8hm3b6.js";
14
20
  import {
15
- isInternalPath,
16
- stripBasePath,
17
21
  trimChar,
18
- withBasePath
19
- } from "./chunk-27gtm2ym.js";
20
- import {
21
- getBlumeVersion
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((locale2) => locale2.code),
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((locale2) => locale2.code.toLowerCase() === suffix);
66
+ const matched = i18n.locales.find((locale) => locale.code.toLowerCase() === suffix);
72
67
  if (matched) {
73
68
  return {
74
69
  locales: [matched.code],
@@ -491,7 +486,8 @@ var metaKey = (path, metaPrefix) => {
491
486
  }
492
487
  return path ? `${metaPrefix}/${path}` : metaPrefix;
493
488
  };
494
- var applyFolderMeta = (group, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay) => {
489
+ var applyFolderMeta = (group, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay, indexRoute) => {
490
+ group.route = indexRoute.get(group.path);
495
491
  const meta = folderMeta.get(metaKey(group.path, metaPrefix)) ?? sharedMeta.get(metaKey(group.path, sharedMetaPrefix));
496
492
  group.display = indexDisplay.get(group.path) ?? meta?.display;
497
493
  if (meta) {
@@ -514,7 +510,7 @@ var applyFolderMeta = (group, folderMeta, sharedMeta, metaPrefix, sharedMetaPref
514
510
  }
515
511
  for (const child of group.children) {
516
512
  if (child.kind === "group") {
517
- applyFolderMeta(child, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay);
513
+ applyFolderMeta(child, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay, indexRoute);
518
514
  }
519
515
  }
520
516
  };
@@ -661,12 +657,14 @@ var toNavNode = (node, display) => {
661
657
  icon: node.icon,
662
658
  kind: "group",
663
659
  label: node.label,
664
- path: node.routePath
660
+ path: node.routePath,
661
+ route: node.route
665
662
  };
666
663
  };
667
664
  var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, display, tabPaths, diagnostics = []) => {
668
665
  const root = createGroup("", "", "", 0);
669
666
  const indexDisplay = new Map;
667
+ const indexRoute = new Map;
670
668
  for (const page of pages) {
671
669
  const parts = page.navPath.split("/");
672
670
  const filename = parts.at(-1) ?? page.navPath;
@@ -680,6 +678,9 @@ var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, sharedM
680
678
  if (page.meta.sidebar.display && !page.fallback) {
681
679
  indexDisplay.set(dirs.join("/"), page.meta.sidebar.display);
682
680
  }
681
+ if (dirs.length > 0) {
682
+ indexRoute.set(dirs.join("/"), page.route);
683
+ }
683
684
  }
684
685
  if (page.meta.sidebar.hidden) {
685
686
  continue;
@@ -713,7 +714,7 @@ var buildFileSystemSidebar = (pages, folderMeta, sharedMeta, metaPrefix, sharedM
713
714
  route: page.route
714
715
  });
715
716
  }
716
- applyFolderMeta(root, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay);
717
+ applyFolderMeta(root, folderMeta, sharedMeta, metaPrefix, sharedMetaPrefix, indexDisplay, indexRoute);
717
718
  sortNodes(root.children, diagnostics);
718
719
  hoistPages(root.children, display, true);
719
720
  hoistTabSections(root.children, tabPaths, display);
@@ -885,15 +886,15 @@ var buildNavigation = (pages, options) => {
885
886
  const diagnostics = options.diagnostics ?? [];
886
887
  diagnostics.push(...sidebarDisplayIgnoredDiagnostics(pages, Boolean(options.sidebar)));
887
888
  if (options.sidebar) {
888
- const sidebar2 = buildConfigSidebar(options.sidebar, byRoute, display, basePath);
889
+ const sidebar = buildConfigSidebar(options.sidebar, byRoute, display, basePath);
889
890
  return {
890
891
  actions,
891
892
  cta,
892
893
  featured,
893
894
  root: rootTabPath,
894
895
  selectors,
895
- sidebar: sidebar2,
896
- tabs: withTabHrefs(tabs, sidebar2)
896
+ sidebar,
897
+ tabs: withTabHrefs(tabs, sidebar)
897
898
  };
898
899
  }
899
900
  const sidebar = buildFileSystemSidebar(pages, options.folderMeta, sharedFolderMeta, metaPrefix, sharedMetaPrefix, display, new Set(tabs.flatMap((tab) => isRootTab(tab, rootTabPath) ? [] : [tab.path])), diagnostics);
@@ -1791,13 +1792,13 @@ var resolveIncludePath = (target, filePath, ctx, line) => {
1791
1792
  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
1793
  };
1793
1794
  }
1794
- const path2 = join(ctx.contentRoot, target);
1795
- if (escapesRoot(ctx.contentRoot, path2)) {
1795
+ const path = join(ctx.contentRoot, target);
1796
+ if (escapesRoot(ctx.contentRoot, path)) {
1796
1797
  return {
1797
1798
  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
1799
  };
1799
1800
  }
1800
- return { path: path2 };
1801
+ return { path };
1801
1802
  }
1802
1803
  const path = resolve(dirname(filePath), target);
1803
1804
  if (ctx.contentRoot && escapesRoot(ctx.contentRoot, path)) {
@@ -1871,10 +1872,10 @@ var expandStatement = async (statement, filePath, line, ctx, stack) => {
1871
1872
  ctx.includes.add(path);
1872
1873
  const asContent = !statement.attributes.lang && CONTENT_EXTENSIONS.has(extname3(path).toLowerCase());
1873
1874
  if (!asContent) {
1874
- const lines2 = codeBlockLines(content, path, statement.attributes);
1875
+ const lines = codeBlockLines(content, path, statement.attributes);
1875
1876
  return {
1876
- lines: lines2,
1877
- origins: lines2.map((_, i) => ({ file: path, line: Math.max(1, i) }))
1877
+ lines,
1878
+ origins: lines.map((_, i) => ({ file: path, line: Math.max(1, i) }))
1878
1879
  };
1879
1880
  }
1880
1881
  const parsed = frontmatter_default(content);
@@ -2114,7 +2115,7 @@ var discoverFolderMeta = async (sources, options = {}) => {
2114
2115
  const list = Array.isArray(sources) ? sources : [{ root: sources }];
2115
2116
  const localeDirs = new Set(options.localeDirs);
2116
2117
  const versionDirs = new Set(options.versionDirs);
2117
- const load2 = createModuleLoader();
2118
+ const load = createModuleLoader();
2118
2119
  const meta = new Map;
2119
2120
  const shared = new Map;
2120
2121
  const diagnostics = [];
@@ -2130,7 +2131,7 @@ var discoverFolderMeta = async (sources, options = {}) => {
2130
2131
  return {
2131
2132
  file,
2132
2133
  ok: true,
2133
- value: await resolveMeta(await load2(file))
2134
+ value: await resolveMeta(await load(file))
2134
2135
  };
2135
2136
  } catch (error) {
2136
2137
  return { error, file, ok: false };
@@ -2181,7 +2182,7 @@ import { mkdir, readFile as readFile2, writeFile } from "node:fs/promises";
2181
2182
  import { join as join2 } from "pathe";
2182
2183
  var hashText = (text) => createHash("sha256").update(text).digest("hex").slice(0, 16);
2183
2184
  var entriesDigest = (entries) => hashText(entries.map((entry) => `${entry.ref}:${entry.hash ?? hashText(entry.body.text)}`).join("|"));
2184
- var pollingWatch = (load2, intervalSeconds, seed) => (onChange) => {
2185
+ var pollingWatch = (load, intervalSeconds, seed) => (onChange) => {
2185
2186
  let last = "";
2186
2187
  if (seed) {
2187
2188
  const seedBaseline = async () => {
@@ -2194,7 +2195,7 @@ var pollingWatch = (load2, intervalSeconds, seed) => (onChange) => {
2194
2195
  }
2195
2196
  const tick = async () => {
2196
2197
  try {
2197
- const { entries } = await load2();
2198
+ const { entries } = await load();
2198
2199
  const next = entriesDigest(entries);
2199
2200
  if (last && next !== last) {
2200
2201
  onChange();
@@ -3283,25 +3284,25 @@ var tagFolderMeta = (spec, tags) => {
3283
3284
  var parseReference = async (reference, ctx) => {
3284
3285
  const options = { cacheDir: ctx.cacheDir, refresh: ctx.refresh };
3285
3286
  if (reference.kind === "asyncapi") {
3286
- const { document: document2, warnings: warnings2 } = await parseAsyncApiSpec(reference.spec, ctx.projectRoot, options);
3287
- const extracted2 = extractAsyncApiOperations(document2, reference.route);
3287
+ const { document, warnings } = await parseAsyncApiSpec(reference.spec, ctx.projectRoot, options);
3288
+ const extracted = extractAsyncApiOperations(document, reference.route);
3288
3289
  return {
3289
- document: document2,
3290
- extractWarnings: extracted2.warnings,
3291
- operations: extracted2.operations,
3292
- tags: extracted2.tags,
3293
- warnings: warnings2
3290
+ document,
3291
+ extractWarnings: extracted.warnings,
3292
+ operations: extracted.operations,
3293
+ tags: extracted.tags,
3294
+ warnings
3294
3295
  };
3295
3296
  }
3296
3297
  if (reference.kind === "graphql") {
3297
- const { document: document2, warnings: warnings2 } = await parseGraphqlSpec(reference.spec, ctx.projectRoot, options);
3298
- const extracted2 = extractGraphqlOperations(document2, reference.route);
3298
+ const { document, warnings } = await parseGraphqlSpec(reference.spec, ctx.projectRoot, options);
3299
+ const extracted = extractGraphqlOperations(document, reference.route);
3299
3300
  return {
3300
- document: document2,
3301
- extractWarnings: extracted2.warnings,
3302
- operations: extracted2.operations,
3303
- tags: extracted2.tags,
3304
- warnings: warnings2
3301
+ document,
3302
+ extractWarnings: extracted.warnings,
3303
+ operations: extracted.operations,
3304
+ tags: extracted.tags,
3305
+ warnings
3305
3306
  };
3306
3307
  }
3307
3308
  const { document, warnings } = await parseSpec(reference.spec, ctx.projectRoot, options);
@@ -3388,7 +3389,7 @@ var openApiSource = (references, ctx) => {
3388
3389
  };
3389
3390
  }
3390
3391
  };
3391
- const load2 = async () => {
3392
+ const load = async () => {
3392
3393
  const results = await Promise.all(references.map(loadReference));
3393
3394
  const entries = [];
3394
3395
  const diagnostics = references.flatMap((reference) => (reference.collisions ?? []).map((message) => ({
@@ -3413,7 +3414,7 @@ var openApiSource = (references, ctx) => {
3413
3414
  };
3414
3415
  return {
3415
3416
  kind: "openapi-source",
3416
- load: load2,
3417
+ load,
3417
3418
  name: "openapi",
3418
3419
  openApiData: () => parsed,
3419
3420
  staged: true
@@ -3454,7 +3455,7 @@ var ignoringWatchListener = (onChange, ignoreDirs = BLUME_WATCH_IGNORE_DIRS, ign
3454
3455
  // src/core/sources/filesystem.ts
3455
3456
  var filesystemSource = (options) => {
3456
3457
  const contentRoot = isAbsolute2(options.root) ? options.root : join4(resolve2(options.projectRoot), options.root);
3457
- const load2 = async () => {
3458
+ const load = async () => {
3458
3459
  const files = await glob2(options.include, {
3459
3460
  absolute: true,
3460
3461
  cwd: contentRoot,
@@ -3501,7 +3502,7 @@ var filesystemSource = (options) => {
3501
3502
  };
3502
3503
  return {
3503
3504
  contentRoot,
3504
- load: load2,
3505
+ load,
3505
3506
  name: options.name,
3506
3507
  prefix: options.prefix,
3507
3508
  read: (ref) => readFile4(join4(contentRoot, ref), "utf-8"),
@@ -3614,7 +3615,7 @@ var githubReleasesSource = (options, ctx) => {
3614
3615
  }
3615
3616
  return collected.slice(0, max);
3616
3617
  };
3617
- const load2 = async (refresh = ctx.refresh ?? true) => {
3618
+ const load = async (refresh = ctx.refresh ?? true) => {
3618
3619
  try {
3619
3620
  const result = await loadWithCache(options.name, cache, async () => {
3620
3621
  const releases = await fetchReleases();
@@ -3646,12 +3647,12 @@ var githubReleasesSource = (options, ctx) => {
3646
3647
  return entry?.raw ?? entry?.body.text ?? "";
3647
3648
  };
3648
3649
  return {
3649
- load: load2,
3650
+ load,
3650
3651
  name: options.name,
3651
3652
  prefix: options.prefix,
3652
3653
  read,
3653
3654
  staged: true,
3654
- watch: options.pollInterval ? pollingWatch(() => load2(true), options.pollInterval, () => load2()) : undefined
3655
+ watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
3655
3656
  };
3656
3657
  };
3657
3658
 
@@ -3742,7 +3743,7 @@ var mdxRemoteSource = (options, ctx) => {
3742
3743
  ref: item.ref
3743
3744
  };
3744
3745
  };
3745
- const load2 = async (refresh = ctx.refresh ?? true) => {
3746
+ const load = async (refresh = ctx.refresh ?? true) => {
3746
3747
  assertConfigured();
3747
3748
  const skipped = [];
3748
3749
  const result = await loadWithCache(options.name, cache, async () => {
@@ -3789,12 +3790,12 @@ var mdxRemoteSource = (options, ctx) => {
3789
3790
  return entry?.raw ?? entry?.body.text ?? "";
3790
3791
  };
3791
3792
  return {
3792
- load: load2,
3793
+ load,
3793
3794
  name: options.name,
3794
3795
  prefix: options.prefix,
3795
3796
  read,
3796
3797
  staged: true,
3797
- watch: options.pollInterval ? pollingWatch(() => load2(true), options.pollInterval, () => load2()) : undefined
3798
+ watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
3798
3799
  };
3799
3800
  };
3800
3801
 
@@ -4209,7 +4210,7 @@ ${nested}`;
4209
4210
  const slug = slugifyPath(slugProp || title) || page.id;
4210
4211
  return { data, slug };
4211
4212
  };
4212
- const toEntry2 = async (client, page) => {
4213
+ const toEntry = async (client, page) => {
4213
4214
  const { data, slug } = frontmatter(page);
4214
4215
  const mdx = await renderBlocks(client, await childrenOf(client, page.id));
4215
4216
  const assets = await materializeAssets(mdx, {
@@ -4247,13 +4248,13 @@ ${nested}`;
4247
4248
  data_source_id: dataSourceId,
4248
4249
  start_cursor: cursor
4249
4250
  }));
4250
- const load2 = async (refresh = ctx?.refresh ?? true) => {
4251
+ const load = async (refresh = ctx?.refresh ?? true) => {
4251
4252
  const assetDiagnostics = [];
4252
4253
  const result = await loadWithCache(options.name, cache, async () => {
4253
4254
  const client = await resolveClient();
4254
4255
  const dataSourceId = await resolveDataSource(client);
4255
4256
  const pages = await collectAll((cursor) => queryDataSource(client, dataSourceId, cursor));
4256
- const built = await Promise.all(pages.map((page) => toEntry2(client, page)));
4257
+ const built = await Promise.all(pages.map((page) => toEntry(client, page)));
4257
4258
  for (const item of built) {
4258
4259
  assetDiagnostics.push(...item.diagnostics);
4259
4260
  }
@@ -4274,12 +4275,12 @@ ${nested}`;
4274
4275
  return all.find((e) => e.ref === ref)?.raw ?? "";
4275
4276
  };
4276
4277
  return {
4277
- load: load2,
4278
+ load,
4278
4279
  name: options.name,
4279
4280
  prefix: options.prefix,
4280
4281
  read,
4281
4282
  staged: true,
4282
- watch: options.pollInterval ? pollingWatch(() => load2(true), options.pollInterval, () => load2()) : undefined
4283
+ watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
4283
4284
  };
4284
4285
  };
4285
4286
 
@@ -4690,10 +4691,10 @@ var unresolvedDiagnostics = (name, unresolved) => {
4690
4691
  var obsidianSource = (options, ctx) => {
4691
4692
  const vaultDir = resolve3(ctx.projectRoot, options.vault);
4692
4693
  const exclude = new Set([...BLUME_IGNORE_DIRS, ...options.exclude ?? []]);
4693
- const load2 = async () => {
4694
+ const load = async () => {
4694
4695
  const files = await walkVault(vaultDir, vaultDir, exclude);
4695
- const read2 = await Promise.all(files.map((rel) => readNote(vaultDir, rel, options)));
4696
- const notes = read2.filter((note) => note !== null);
4696
+ const read = await Promise.all(files.map((rel) => readNote(vaultDir, rel, options)));
4697
+ const notes = read.filter((note) => note !== null);
4697
4698
  const { index, pairs } = buildLinkIndex(notes, options);
4698
4699
  const unresolved = noTargets();
4699
4700
  const entries = pairs.map((pair) => noteToEntry(pair, index, options, unresolved));
@@ -4739,7 +4740,7 @@ var obsidianSource = (options, ctx) => {
4739
4740
  };
4740
4741
  return {
4741
4742
  contentRoot: vaultDir,
4742
- load: load2,
4743
+ load,
4743
4744
  name: options.name,
4744
4745
  prefix: options.prefix,
4745
4746
  read,
@@ -4897,7 +4898,7 @@ var sanitySource = (options, ctx) => {
4897
4898
  const fields = options.fields ?? {};
4898
4899
  const cache = snapshotCache(ctx?.cacheDir ?? join8(".blume", "cache", options.name));
4899
4900
  let snapshot = new Map;
4900
- const toEntry2 = (doc) => {
4901
+ const toEntry = (doc) => {
4901
4902
  const slugValue = asString(getPath(doc, fields.slug ?? "slug.current")) ?? asString(doc._id) ?? "untitled";
4902
4903
  const slug = slugifyPath(slugValue) || slugify2(asString(doc._id) ?? "") || "untitled";
4903
4904
  const data = {};
@@ -4927,11 +4928,11 @@ var sanitySource = (options, ctx) => {
4927
4928
  ref: `${slug}.md`
4928
4929
  };
4929
4930
  };
4930
- const load2 = async (refresh = ctx?.refresh ?? true) => {
4931
+ const load = async (refresh = ctx?.refresh ?? true) => {
4931
4932
  const result = await loadWithCache(options.name, cache, async () => {
4932
4933
  const client = await resolveClient(options, ctx?.preview ?? false);
4933
4934
  const docs = await client.fetch(options.query);
4934
- return docs.map(toEntry2);
4935
+ return docs.map(toEntry);
4935
4936
  }, refresh);
4936
4937
  snapshot = new Map(result.entries.map((entry) => [entry.ref, entry]));
4937
4938
  return result;
@@ -4945,12 +4946,12 @@ var sanitySource = (options, ctx) => {
4945
4946
  return all.find((e) => e.ref === ref)?.raw ?? "";
4946
4947
  };
4947
4948
  return {
4948
- load: load2,
4949
+ load,
4949
4950
  name: options.name,
4950
4951
  prefix: options.prefix,
4951
4952
  read,
4952
4953
  staged: true,
4953
- watch: options.pollInterval ? pollingWatch(() => load2(true), options.pollInterval, () => load2()) : undefined
4954
+ watch: options.pollInterval ? pollingWatch(() => load(true), options.pollInterval, () => load()) : undefined
4954
4955
  };
4955
4956
  };
4956
4957
 
@@ -5283,5 +5284,5 @@ var scanProject = async (root, options = {}) => {
5283
5284
 
5284
5285
  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
5286
 
5286
- //# debugId=A3A6EEB99D149F0C64756E2164756E21
5287
- //# sourceMappingURL=chunk-12dzsn9b.js.map
5287
+ //# debugId=9C98B15F280A03E064756E2164756E21
5288
+ //# sourceMappingURL=chunk-1jefwnfs.js.map