blodemd 0.0.10 → 0.0.12
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/README.md +11 -47
- package/dev-server/app/layout.tsx +1 -1
- package/dist/cli.mjs +1078 -406
- package/dist/cli.mjs.map +1 -1
- package/docs/app/globals.css +15 -1
- package/docs/components/api/api-playground.tsx +2 -2
- package/docs/components/docs/copy-page-menu.tsx +55 -27
- package/docs/components/docs/doc-header.tsx +1 -1
- package/docs/components/docs/doc-shell.tsx +89 -88
- package/docs/components/docs/doc-sidebar.tsx +6 -3
- package/docs/components/docs/doc-toc.tsx +1 -1
- package/docs/components/docs/mobile-nav.tsx +8 -16
- package/docs/components/docs/sidebar-scroll-area.tsx +58 -0
- package/docs/components/git/repo-picker.tsx +526 -0
- package/docs/components/mdx/agent-instructions.tsx +17 -0
- package/docs/components/mdx/code-block.tsx +6 -1
- package/docs/components/mdx/code-group.tsx +1 -1
- package/docs/components/mdx/iframe.tsx +62 -0
- package/docs/components/mdx/index.tsx +4 -0
- package/docs/components/mdx/tabs.tsx +5 -5
- package/docs/components/mdx/video.tsx +45 -12
- package/docs/components/third-parties.tsx +29 -0
- package/docs/components/ui/badge.tsx +61 -0
- package/docs/components/ui/breadcrumb.tsx +61 -41
- package/docs/components/ui/button-group.tsx +83 -0
- package/docs/components/ui/button.tsx +30 -55
- package/docs/components/ui/command.tsx +32 -4
- package/docs/components/ui/copy-button.tsx +12 -19
- package/docs/components/ui/dialog.tsx +50 -1
- package/docs/components/ui/input.tsx +16 -97
- package/docs/components/ui/kbd.tsx +98 -0
- package/docs/components/ui/morph-icon.tsx +79 -0
- package/docs/components/ui/popover.tsx +225 -30
- package/docs/components/ui/search.tsx +0 -9
- package/docs/components/ui/sheet.tsx +30 -1
- package/docs/components/ui/sidebar.tsx +332 -7
- package/docs/components/ui/site-footer.tsx +6 -4
- package/docs/components/ui/skeleton.tsx +11 -0
- package/docs/components/ui/switch.tsx +32 -0
- package/docs/components/ui/tabs.tsx +138 -0
- package/docs/lib/api-client.ts +72 -0
- package/docs/lib/contextual-options.ts +9 -0
- package/docs/lib/dashboard-session.ts +167 -0
- package/docs/lib/db.ts +13 -0
- package/docs/lib/env.ts +4 -3
- package/docs/lib/etag.ts +22 -0
- package/docs/lib/github-install.ts +33 -0
- package/docs/lib/project-authz.ts +46 -0
- package/docs/lib/routes.ts +5 -1
- package/docs/lib/supabase.ts +30 -6
- package/docs/lib/tenancy.ts +1 -0
- package/docs/lib/tenant-static.ts +206 -4
- package/docs/lib/tenants.ts +5 -1
- package/docs/lib/time-ago.ts +24 -0
- package/docs/lib/use-tab-observer.ts +71 -0
- package/package.json +2 -2
- package/packages/@repo/contracts/dist/git.d.ts +28 -0
- package/packages/@repo/contracts/dist/git.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/git.js +24 -0
- package/packages/@repo/contracts/dist/index.d.ts +1 -1
- package/packages/@repo/contracts/dist/index.d.ts.map +1 -1
- package/packages/@repo/contracts/dist/index.js +1 -1
- package/packages/@repo/contracts/src/git.ts +31 -0
- package/packages/@repo/contracts/src/index.ts +1 -1
- package/packages/@repo/models/dist/docs-config.d.ts +9 -0
- package/packages/@repo/models/dist/docs-config.d.ts.map +1 -1
- package/packages/@repo/models/dist/docs-config.js +7 -0
- package/packages/@repo/models/src/docs-config.ts +7 -0
- package/packages/@repo/previewing/dist/index.d.ts +4 -0
- package/packages/@repo/previewing/dist/index.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/index.js +53 -2
- package/packages/@repo/previewing/src/index.ts +64 -2
- package/packages/@repo/validation/src/blodemd-docs-schema.json +8 -1
- package/scripts/prepare-package.mjs +14 -0
- package/packages/@repo/contracts/dist/api-key.d.ts +0 -30
- package/packages/@repo/contracts/dist/api-key.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/api-key.js +0 -20
- package/packages/@repo/contracts/src/api-key.ts +0 -27
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
const UrlOrPathSchema = z.string().min(1);
|
|
4
|
+
const SlugSchema = z
|
|
5
|
+
.string()
|
|
6
|
+
.min(1)
|
|
7
|
+
.regex(/^[a-z0-9-]+$/);
|
|
4
8
|
|
|
5
9
|
export const DocsColorsSchema = z
|
|
6
10
|
.object({
|
|
@@ -364,6 +368,7 @@ export const ContextualBuiltinOptionSchema = z.enum([
|
|
|
364
368
|
"cursor",
|
|
365
369
|
"devin",
|
|
366
370
|
"devin-mcp",
|
|
371
|
+
"gemini",
|
|
367
372
|
"grok",
|
|
368
373
|
"mcp",
|
|
369
374
|
"perplexity",
|
|
@@ -432,6 +437,7 @@ export const DocsConfigSchema = z
|
|
|
432
437
|
navigation: MintlifyNavigationSchema,
|
|
433
438
|
search: MintlifySearchSchema.optional(),
|
|
434
439
|
seo: DocsSeoSchema.optional(),
|
|
440
|
+
slug: SlugSchema.optional(),
|
|
435
441
|
})
|
|
436
442
|
.strict();
|
|
437
443
|
|
|
@@ -610,6 +616,7 @@ export const SiteConfigSchema = z
|
|
|
610
616
|
openapiProxy: DocsOpenApiProxySchema.optional(),
|
|
611
617
|
scripts: DocsScriptsSchema.optional(),
|
|
612
618
|
seo: DocsSeoSchema.optional(),
|
|
619
|
+
slug: SlugSchema.optional(),
|
|
613
620
|
theme: z.string().optional(),
|
|
614
621
|
})
|
|
615
622
|
.strict();
|
|
@@ -12,7 +12,10 @@ export declare const PREBUILT_UTILITY_INDEX_PATH = "_utility-index.json";
|
|
|
12
12
|
export declare const PREBUILT_UTILITY_SITEMAP_PATH = "_utility/sitemap.xml";
|
|
13
13
|
export declare const PREBUILT_UTILITY_LLMS_PATH = "_utility/llms.txt";
|
|
14
14
|
export declare const PREBUILT_UTILITY_LLMS_FULL_PATH = "_utility/llms-full.txt";
|
|
15
|
+
export declare const PREBUILT_UTILITY_SKILLS_INDEX_PATH = "_utility/skills-index.json";
|
|
16
|
+
export declare const PREBUILT_UTILITY_SKILLS_MD_PREFIX = "_utility/skills/";
|
|
15
17
|
export declare const UTILITY_DOCS_ROOT_TOKEN = "__BLODEMD_DOCS_ROOT__";
|
|
18
|
+
export declare const LEGACY_PROJECT_NAME_FALLBACK_WARNING = "docs.json.slug is recommended. Falling back to docs.json.name as the deployment slug is deprecated.";
|
|
16
19
|
export type SiteConfigResult = {
|
|
17
20
|
ok: true;
|
|
18
21
|
config: SiteConfig;
|
|
@@ -81,6 +84,7 @@ export interface UtilityIndex {
|
|
|
81
84
|
description?: string;
|
|
82
85
|
name: string;
|
|
83
86
|
pages: UtilityPage[];
|
|
87
|
+
slug?: string;
|
|
84
88
|
}
|
|
85
89
|
export interface UtilityArtifact {
|
|
86
90
|
content: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,WAAW,EAEX,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,UAAU,EACX,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AACjE,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAC/D,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AACjE,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AACpE,eAAO,MAAM,0BAA0B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,EAAE,GAAG,IAAI,CAYvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,eAAe,EAAE,KAAG,MAI5B,CAAC;AAErC,eAAO,MAAM,uBAAuB,GAClC,QAAQ,aAAa,KACpB,OAAO,CAAC,eAAe,EAAE,GAAG,IAAI,CAYlC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,KAClC,MAI8B,CAAC;AAElC,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,aAAa,KACpB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAYvC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,YAAY,KAAG,MAIvB,CAAC;AAEtC,eAAO,MAAM,wBAAwB,GACnC,QAAQ,aAAa,KACpB,OAAO,CAAC,YAAY,GAAG,IAAI,CAoB7B,CAAC"}
|
|
@@ -14,7 +14,10 @@ export const PREBUILT_UTILITY_INDEX_PATH = "_utility-index.json";
|
|
|
14
14
|
export const PREBUILT_UTILITY_SITEMAP_PATH = "_utility/sitemap.xml";
|
|
15
15
|
export const PREBUILT_UTILITY_LLMS_PATH = "_utility/llms.txt";
|
|
16
16
|
export const PREBUILT_UTILITY_LLMS_FULL_PATH = "_utility/llms-full.txt";
|
|
17
|
+
export const PREBUILT_UTILITY_SKILLS_INDEX_PATH = "_utility/skills-index.json";
|
|
18
|
+
export const PREBUILT_UTILITY_SKILLS_MD_PREFIX = "_utility/skills/";
|
|
17
19
|
export const UTILITY_DOCS_ROOT_TOKEN = "__BLODEMD_DOCS_ROOT__";
|
|
20
|
+
export const LEGACY_PROJECT_NAME_FALLBACK_WARNING = "docs.json.slug is recommended. Falling back to docs.json.name as the deployment slug is deprecated.";
|
|
18
21
|
const validModes = new Set(PageModeSchema.options);
|
|
19
22
|
export const buildPageMetadataMap = (index) => {
|
|
20
23
|
const map = new Map();
|
|
@@ -203,8 +206,10 @@ const mapDocsConfig = (docs) => {
|
|
|
203
206
|
Boolean(docs.api?.openapi || docs.api?.asyncapi),
|
|
204
207
|
},
|
|
205
208
|
seo: docs.seo,
|
|
209
|
+
slug: docs.slug,
|
|
206
210
|
};
|
|
207
211
|
};
|
|
212
|
+
const getProjectWarnings = (config) => config.slug ? [] : [LEGACY_PROJECT_NAME_FALLBACK_WARNING];
|
|
208
213
|
const readJsonConfig = async (source, relativePath) => JSON.parse(await source.readFile(relativePath));
|
|
209
214
|
const normalizeRefPath = (baseDirectory, reference) => {
|
|
210
215
|
if (reference.startsWith("/") ||
|
|
@@ -277,7 +282,7 @@ const loadDocsConfig = async (source) => {
|
|
|
277
282
|
return {
|
|
278
283
|
config: siteResult.data,
|
|
279
284
|
ok: true,
|
|
280
|
-
warnings:
|
|
285
|
+
warnings: getProjectWarnings(siteResult.data),
|
|
281
286
|
};
|
|
282
287
|
}
|
|
283
288
|
// Fall back to DocsConfig format (Mintlify-compatible) and map to SiteConfig
|
|
@@ -286,7 +291,7 @@ const loadDocsConfig = async (source) => {
|
|
|
286
291
|
return {
|
|
287
292
|
config: mapDocsConfig(docsResult.data),
|
|
288
293
|
ok: true,
|
|
289
|
-
warnings:
|
|
294
|
+
warnings: getProjectWarnings(docsResult.data),
|
|
290
295
|
};
|
|
291
296
|
}
|
|
292
297
|
return { errors: docsResult.errors, ok: false };
|
|
@@ -777,6 +782,7 @@ export const buildUtilityIndex = async (index, source, config) => {
|
|
|
777
782
|
description: config.description,
|
|
778
783
|
name: config.name,
|
|
779
784
|
pages: sortedPages,
|
|
785
|
+
slug: config.slug,
|
|
780
786
|
};
|
|
781
787
|
};
|
|
782
788
|
const toUtilityDocPath = (value) => {
|
|
@@ -797,6 +803,7 @@ export const buildUtilityArtifacts = (index) => {
|
|
|
797
803
|
index.description ? `> ${index.description}` : null,
|
|
798
804
|
"",
|
|
799
805
|
`Sitemap: ${toUtilityTemplatedDocUrl("sitemap.xml")}`,
|
|
806
|
+
`Skills: ${UTILITY_DOCS_ROOT_TOKEN}/.well-known/skills/index.json`,
|
|
800
807
|
"",
|
|
801
808
|
"## Docs",
|
|
802
809
|
...index.pages.map((page) => {
|
|
@@ -813,6 +820,40 @@ ${index.pages
|
|
|
813
820
|
const llmsFull = index.pages
|
|
814
821
|
.map((page) => formatMarkdownPageSection(page.title, toUtilityTemplatedDocUrl(page.slug), page.content))
|
|
815
822
|
.join("\n\n");
|
|
823
|
+
const skillSlug = index.slug ?? slugify(index.name);
|
|
824
|
+
const skillDescription = `${index.name} documentation. ${index.description ?? ""}`.trim();
|
|
825
|
+
const skillsIndex = JSON.stringify({
|
|
826
|
+
skills: [
|
|
827
|
+
{
|
|
828
|
+
description: skillDescription,
|
|
829
|
+
files: ["SKILL.md"],
|
|
830
|
+
name: skillSlug,
|
|
831
|
+
},
|
|
832
|
+
],
|
|
833
|
+
}, null, 2);
|
|
834
|
+
const topPages = index.pages.slice(0, 20);
|
|
835
|
+
const skillMdLines = [
|
|
836
|
+
"---",
|
|
837
|
+
`name: ${skillSlug}`,
|
|
838
|
+
`description: ${skillDescription} Use when working with ${index.name}, answering questions about its features, or helping users follow its guides.`,
|
|
839
|
+
"---",
|
|
840
|
+
"",
|
|
841
|
+
`# ${index.name}`,
|
|
842
|
+
"",
|
|
843
|
+
index.description ? `${index.description}\n` : "",
|
|
844
|
+
"## Documentation",
|
|
845
|
+
"",
|
|
846
|
+
`- Full docs index: ${UTILITY_DOCS_ROOT_TOKEN}/llms.txt`,
|
|
847
|
+
`- Complete docs content: ${UTILITY_DOCS_ROOT_TOKEN}/llms-full.txt`,
|
|
848
|
+
"- Append `.md` to any page URL for raw markdown",
|
|
849
|
+
"",
|
|
850
|
+
"## Key Pages",
|
|
851
|
+
"",
|
|
852
|
+
...topPages.map((page) => {
|
|
853
|
+
const desc = page.description ? ` - ${page.description}` : "";
|
|
854
|
+
return `- [${page.title}](${toUtilityTemplatedDocUrl(page.slug)})${desc}`;
|
|
855
|
+
}),
|
|
856
|
+
];
|
|
816
857
|
return [
|
|
817
858
|
{
|
|
818
859
|
content: sitemap,
|
|
@@ -829,6 +870,16 @@ ${index.pages
|
|
|
829
870
|
contentType: "text/plain; charset=utf-8",
|
|
830
871
|
path: PREBUILT_UTILITY_LLMS_FULL_PATH,
|
|
831
872
|
},
|
|
873
|
+
{
|
|
874
|
+
content: skillsIndex,
|
|
875
|
+
contentType: "application/json; charset=utf-8",
|
|
876
|
+
path: PREBUILT_UTILITY_SKILLS_INDEX_PATH,
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
content: skillMdLines.filter((line) => line !== null).join("\n"),
|
|
880
|
+
contentType: "text/markdown; charset=utf-8",
|
|
881
|
+
path: `${PREBUILT_UTILITY_SKILLS_MD_PREFIX}${skillSlug}/SKILL.md`,
|
|
882
|
+
},
|
|
832
883
|
...index.pages.map((page) => ({
|
|
833
884
|
content: formatMarkdownPage(page.title, page.content),
|
|
834
885
|
contentType: "text/markdown; charset=utf-8",
|
|
@@ -39,7 +39,11 @@ export const PREBUILT_UTILITY_INDEX_PATH = "_utility-index.json";
|
|
|
39
39
|
export const PREBUILT_UTILITY_SITEMAP_PATH = "_utility/sitemap.xml";
|
|
40
40
|
export const PREBUILT_UTILITY_LLMS_PATH = "_utility/llms.txt";
|
|
41
41
|
export const PREBUILT_UTILITY_LLMS_FULL_PATH = "_utility/llms-full.txt";
|
|
42
|
+
export const PREBUILT_UTILITY_SKILLS_INDEX_PATH = "_utility/skills-index.json";
|
|
43
|
+
export const PREBUILT_UTILITY_SKILLS_MD_PREFIX = "_utility/skills/";
|
|
42
44
|
export const UTILITY_DOCS_ROOT_TOKEN = "__BLODEMD_DOCS_ROOT__";
|
|
45
|
+
export const LEGACY_PROJECT_NAME_FALLBACK_WARNING =
|
|
46
|
+
"docs.json.slug is recommended. Falling back to docs.json.name as the deployment slug is deprecated.";
|
|
43
47
|
|
|
44
48
|
export type SiteConfigResult =
|
|
45
49
|
| { ok: true; config: SiteConfig; warnings: string[] }
|
|
@@ -113,6 +117,7 @@ export interface UtilityIndex {
|
|
|
113
117
|
description?: string;
|
|
114
118
|
name: string;
|
|
115
119
|
pages: UtilityPage[];
|
|
120
|
+
slug?: string;
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
export interface UtilityArtifact {
|
|
@@ -334,9 +339,13 @@ const mapDocsConfig = (docs: DocsConfig): SiteConfig => {
|
|
|
334
339
|
Boolean(docs.api?.openapi || docs.api?.asyncapi),
|
|
335
340
|
},
|
|
336
341
|
seo: docs.seo,
|
|
342
|
+
slug: docs.slug,
|
|
337
343
|
};
|
|
338
344
|
};
|
|
339
345
|
|
|
346
|
+
const getProjectWarnings = (config: { slug?: string }): string[] =>
|
|
347
|
+
config.slug ? [] : [LEGACY_PROJECT_NAME_FALLBACK_WARNING];
|
|
348
|
+
|
|
340
349
|
const readJsonConfig = async (source: ContentSource, relativePath: string) =>
|
|
341
350
|
JSON.parse(await source.readFile(relativePath)) as unknown;
|
|
342
351
|
|
|
@@ -463,7 +472,7 @@ const loadDocsConfig = async (
|
|
|
463
472
|
return {
|
|
464
473
|
config: siteResult.data,
|
|
465
474
|
ok: true,
|
|
466
|
-
warnings:
|
|
475
|
+
warnings: getProjectWarnings(siteResult.data),
|
|
467
476
|
};
|
|
468
477
|
}
|
|
469
478
|
|
|
@@ -473,7 +482,7 @@ const loadDocsConfig = async (
|
|
|
473
482
|
return {
|
|
474
483
|
config: mapDocsConfig(docsResult.data),
|
|
475
484
|
ok: true,
|
|
476
|
-
warnings:
|
|
485
|
+
warnings: getProjectWarnings(docsResult.data),
|
|
477
486
|
};
|
|
478
487
|
}
|
|
479
488
|
|
|
@@ -1217,6 +1226,7 @@ export const buildUtilityIndex = async (
|
|
|
1217
1226
|
description: config.description,
|
|
1218
1227
|
name: config.name,
|
|
1219
1228
|
pages: sortedPages,
|
|
1229
|
+
slug: config.slug,
|
|
1220
1230
|
};
|
|
1221
1231
|
};
|
|
1222
1232
|
|
|
@@ -1244,6 +1254,7 @@ export const buildUtilityArtifacts = (
|
|
|
1244
1254
|
index.description ? `> ${index.description}` : null,
|
|
1245
1255
|
"",
|
|
1246
1256
|
`Sitemap: ${toUtilityTemplatedDocUrl("sitemap.xml")}`,
|
|
1257
|
+
`Skills: ${UTILITY_DOCS_ROOT_TOKEN}/.well-known/skills/index.json`,
|
|
1247
1258
|
"",
|
|
1248
1259
|
"## Docs",
|
|
1249
1260
|
...index.pages.map((page) => {
|
|
@@ -1271,6 +1282,47 @@ ${index.pages
|
|
|
1271
1282
|
)
|
|
1272
1283
|
.join("\n\n");
|
|
1273
1284
|
|
|
1285
|
+
const skillSlug = index.slug ?? slugify(index.name);
|
|
1286
|
+
const skillDescription =
|
|
1287
|
+
`${index.name} documentation. ${index.description ?? ""}`.trim();
|
|
1288
|
+
const skillsIndex = JSON.stringify(
|
|
1289
|
+
{
|
|
1290
|
+
skills: [
|
|
1291
|
+
{
|
|
1292
|
+
description: skillDescription,
|
|
1293
|
+
files: ["SKILL.md"],
|
|
1294
|
+
name: skillSlug,
|
|
1295
|
+
},
|
|
1296
|
+
],
|
|
1297
|
+
},
|
|
1298
|
+
null,
|
|
1299
|
+
2
|
|
1300
|
+
);
|
|
1301
|
+
|
|
1302
|
+
const topPages = index.pages.slice(0, 20);
|
|
1303
|
+
const skillMdLines = [
|
|
1304
|
+
"---",
|
|
1305
|
+
`name: ${skillSlug}`,
|
|
1306
|
+
`description: ${skillDescription} Use when working with ${index.name}, answering questions about its features, or helping users follow its guides.`,
|
|
1307
|
+
"---",
|
|
1308
|
+
"",
|
|
1309
|
+
`# ${index.name}`,
|
|
1310
|
+
"",
|
|
1311
|
+
index.description ? `${index.description}\n` : "",
|
|
1312
|
+
"## Documentation",
|
|
1313
|
+
"",
|
|
1314
|
+
`- Full docs index: ${UTILITY_DOCS_ROOT_TOKEN}/llms.txt`,
|
|
1315
|
+
`- Complete docs content: ${UTILITY_DOCS_ROOT_TOKEN}/llms-full.txt`,
|
|
1316
|
+
"- Append `.md` to any page URL for raw markdown",
|
|
1317
|
+
"",
|
|
1318
|
+
"## Key Pages",
|
|
1319
|
+
"",
|
|
1320
|
+
...topPages.map((page) => {
|
|
1321
|
+
const desc = page.description ? ` - ${page.description}` : "";
|
|
1322
|
+
return `- [${page.title}](${toUtilityTemplatedDocUrl(page.slug)})${desc}`;
|
|
1323
|
+
}),
|
|
1324
|
+
];
|
|
1325
|
+
|
|
1274
1326
|
return [
|
|
1275
1327
|
{
|
|
1276
1328
|
content: sitemap,
|
|
@@ -1287,6 +1339,16 @@ ${index.pages
|
|
|
1287
1339
|
contentType: "text/plain; charset=utf-8",
|
|
1288
1340
|
path: PREBUILT_UTILITY_LLMS_FULL_PATH,
|
|
1289
1341
|
},
|
|
1342
|
+
{
|
|
1343
|
+
content: skillsIndex,
|
|
1344
|
+
contentType: "application/json; charset=utf-8",
|
|
1345
|
+
path: PREBUILT_UTILITY_SKILLS_INDEX_PATH,
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
content: skillMdLines.filter((line) => line !== null).join("\n"),
|
|
1349
|
+
contentType: "text/markdown; charset=utf-8",
|
|
1350
|
+
path: `${PREBUILT_UTILITY_SKILLS_MD_PREFIX}${skillSlug}/SKILL.md`,
|
|
1351
|
+
},
|
|
1290
1352
|
...index.pages.map((page) => ({
|
|
1291
1353
|
content: formatMarkdownPage(page.title, page.content),
|
|
1292
1354
|
contentType: "text/markdown; charset=utf-8",
|
|
@@ -3233,7 +3233,7 @@
|
|
|
3233
3233
|
"name": {
|
|
3234
3234
|
"type": "string",
|
|
3235
3235
|
"minLength": 1,
|
|
3236
|
-
"description": "
|
|
3236
|
+
"description": "Display name for your site, project, or organization."
|
|
3237
3237
|
},
|
|
3238
3238
|
"description": {
|
|
3239
3239
|
"type": "string",
|
|
@@ -3476,6 +3476,7 @@
|
|
|
3476
3476
|
"cursor",
|
|
3477
3477
|
"devin",
|
|
3478
3478
|
"devin-mcp",
|
|
3479
|
+
"gemini",
|
|
3479
3480
|
"grok",
|
|
3480
3481
|
"mcp",
|
|
3481
3482
|
"perplexity",
|
|
@@ -3561,6 +3562,12 @@
|
|
|
3561
3562
|
},
|
|
3562
3563
|
"additionalProperties": false,
|
|
3563
3564
|
"description": "Metadata configuration for documentation pages"
|
|
3565
|
+
},
|
|
3566
|
+
"slug": {
|
|
3567
|
+
"description": "URL-safe project slug used for deployments and the default `{slug}.blode.md` hostname.",
|
|
3568
|
+
"minLength": 1,
|
|
3569
|
+
"pattern": "^[a-z0-9-]+$",
|
|
3570
|
+
"type": "string"
|
|
3564
3571
|
}
|
|
3565
3572
|
},
|
|
3566
3573
|
"required": ["name", "navigation"],
|
|
@@ -5,6 +5,8 @@ import { existsSync } from "node:fs";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
+
import { REPO_PACKAGES } from "./repo-packages.mjs";
|
|
9
|
+
|
|
8
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
11
|
const cliRoot = path.resolve(__dirname, "..");
|
|
10
12
|
const repoRoot = path.resolve(cliRoot, "../..");
|
|
@@ -28,6 +30,18 @@ if (!shouldPackage && !isGlobalInstall) {
|
|
|
28
30
|
|
|
29
31
|
console.log("Preparing blodemd standalone package...");
|
|
30
32
|
|
|
33
|
+
// Build @repo/* workspace packages first so tsdown can inline their dist/
|
|
34
|
+
// output into the CLI bundle. Without this, tsdown falls back to treating
|
|
35
|
+
// `@repo/common` etc. as external imports and the published tarball ships
|
|
36
|
+
// unresolved imports that break `npx blodemd`.
|
|
37
|
+
console.log("Building @repo packages...");
|
|
38
|
+
for (const pkg of REPO_PACKAGES) {
|
|
39
|
+
execSync("npm run build", {
|
|
40
|
+
cwd: path.join(repoRoot, `packages/${pkg}`),
|
|
41
|
+
stdio: "inherit",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
execSync("npm run build", {
|
|
32
46
|
cwd: cliRoot,
|
|
33
47
|
stdio: "inherit",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const ApiKeySchema: z.ZodObject<{
|
|
3
|
-
createdAt: z.ZodString;
|
|
4
|
-
id: z.ZodString;
|
|
5
|
-
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
6
|
-
name: z.ZodString;
|
|
7
|
-
prefix: z.ZodString;
|
|
8
|
-
projectId: z.ZodString;
|
|
9
|
-
revokedAt: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export type ApiKey = z.infer<typeof ApiKeySchema>;
|
|
12
|
-
export declare const ApiKeyCreateSchema: z.ZodObject<{
|
|
13
|
-
name: z.ZodString;
|
|
14
|
-
projectId: z.ZodString;
|
|
15
|
-
}, z.core.$strip>;
|
|
16
|
-
export type ApiKeyCreateInput = z.infer<typeof ApiKeyCreateSchema>;
|
|
17
|
-
export declare const ApiKeyCreateResponseSchema: z.ZodObject<{
|
|
18
|
-
apiKey: z.ZodObject<{
|
|
19
|
-
createdAt: z.ZodString;
|
|
20
|
-
id: z.ZodString;
|
|
21
|
-
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
22
|
-
name: z.ZodString;
|
|
23
|
-
prefix: z.ZodString;
|
|
24
|
-
projectId: z.ZodString;
|
|
25
|
-
revokedAt: z.ZodOptional<z.ZodString>;
|
|
26
|
-
}, z.core.$strip>;
|
|
27
|
-
token: z.ZodString;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
export type ApiKeyCreateResponse = z.infer<typeof ApiKeyCreateResponseSchema>;
|
|
30
|
-
//# sourceMappingURL=api-key.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-key.d.ts","sourceRoot":"","sources":["../src/api-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,YAAY;;;;;;;;iBAQvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE,eAAO,MAAM,0BAA0B;;;;;;;;;;;iBAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { IsoDateSchema } from "./dates.js";
|
|
3
|
-
import { IdSchema } from "./ids.js";
|
|
4
|
-
export const ApiKeySchema = z.object({
|
|
5
|
-
createdAt: IsoDateSchema,
|
|
6
|
-
id: IdSchema,
|
|
7
|
-
lastUsedAt: IsoDateSchema.optional(),
|
|
8
|
-
name: z.string().min(1),
|
|
9
|
-
prefix: z.string().min(1),
|
|
10
|
-
projectId: IdSchema,
|
|
11
|
-
revokedAt: IsoDateSchema.optional(),
|
|
12
|
-
});
|
|
13
|
-
export const ApiKeyCreateSchema = z.object({
|
|
14
|
-
name: z.string().min(1),
|
|
15
|
-
projectId: IdSchema,
|
|
16
|
-
});
|
|
17
|
-
export const ApiKeyCreateResponseSchema = z.object({
|
|
18
|
-
apiKey: ApiKeySchema,
|
|
19
|
-
token: z.string().min(1),
|
|
20
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
import { IsoDateSchema } from "./dates.js";
|
|
4
|
-
import { IdSchema } from "./ids.js";
|
|
5
|
-
|
|
6
|
-
export const ApiKeySchema = z.object({
|
|
7
|
-
createdAt: IsoDateSchema,
|
|
8
|
-
id: IdSchema,
|
|
9
|
-
lastUsedAt: IsoDateSchema.optional(),
|
|
10
|
-
name: z.string().min(1),
|
|
11
|
-
prefix: z.string().min(1),
|
|
12
|
-
projectId: IdSchema,
|
|
13
|
-
revokedAt: IsoDateSchema.optional(),
|
|
14
|
-
});
|
|
15
|
-
export type ApiKey = z.infer<typeof ApiKeySchema>;
|
|
16
|
-
|
|
17
|
-
export const ApiKeyCreateSchema = z.object({
|
|
18
|
-
name: z.string().min(1),
|
|
19
|
-
projectId: IdSchema,
|
|
20
|
-
});
|
|
21
|
-
export type ApiKeyCreateInput = z.infer<typeof ApiKeyCreateSchema>;
|
|
22
|
-
|
|
23
|
-
export const ApiKeyCreateResponseSchema = z.object({
|
|
24
|
-
apiKey: ApiKeySchema,
|
|
25
|
-
token: z.string().min(1),
|
|
26
|
-
});
|
|
27
|
-
export type ApiKeyCreateResponse = z.infer<typeof ApiKeyCreateResponseSchema>;
|