blodemd 0.0.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.
package/dist/cli.d.mts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,212 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import fs from "node:fs/promises";
4
+ import path from "node:path";
5
+ import { styleText } from "node:util";
6
+ import { intro, log, outro, spinner } from "@clack/prompts";
7
+ import { Command } from "commander";
8
+ //#region src/cli.ts
9
+ const CONTENT_CONFIG_FILE = "docs.json";
10
+ const TEXT_CONTENT_TYPES = {
11
+ ".css": "text/css; charset=utf-8",
12
+ ".html": "text/html; charset=utf-8",
13
+ ".js": "text/javascript; charset=utf-8",
14
+ ".json": "application/json; charset=utf-8",
15
+ ".md": "text/markdown; charset=utf-8",
16
+ ".mdx": "text/markdown; charset=utf-8",
17
+ ".svg": "image/svg+xml",
18
+ ".txt": "text/plain; charset=utf-8",
19
+ ".yaml": "application/yaml; charset=utf-8",
20
+ ".yml": "application/yaml; charset=utf-8"
21
+ };
22
+ const ensureFile = async (filePath, content) => {
23
+ try {
24
+ await fs.access(filePath);
25
+ } catch {
26
+ await fs.writeFile(filePath, content);
27
+ }
28
+ };
29
+ const isMissingFileError = (error) => error instanceof Error && "code" in error && error.code === "ENOENT";
30
+ const validateConfigFile = async (root) => {
31
+ try {
32
+ const raw = await fs.readFile(path.join(root, CONTENT_CONFIG_FILE), "utf8");
33
+ JSON.parse(raw);
34
+ return CONTENT_CONFIG_FILE;
35
+ } catch (error) {
36
+ if (isMissingFileError(error)) throw new Error(`${CONTENT_CONFIG_FILE} not found.`, { cause: error });
37
+ throw error;
38
+ }
39
+ };
40
+ const readGitValue = (gitArgs) => {
41
+ const result = spawnSync("git", gitArgs, {
42
+ encoding: "utf8",
43
+ stdio: [
44
+ "ignore",
45
+ "pipe",
46
+ "ignore"
47
+ ]
48
+ });
49
+ if (result.status !== 0) return;
50
+ return result.stdout.trim() || void 0;
51
+ };
52
+ const normalizeRelativePath = (root, filePath) => path.relative(root, filePath).split(path.sep).join("/");
53
+ const shouldSkipEntry = (name) => name.startsWith(".") || name === "node_modules";
54
+ const collectFiles = async (root) => {
55
+ const entries = await fs.readdir(root, { withFileTypes: true });
56
+ const files = [];
57
+ for (const entry of entries) {
58
+ if (shouldSkipEntry(entry.name)) continue;
59
+ const absolutePath = path.join(root, entry.name);
60
+ if (entry.isDirectory()) {
61
+ files.push(...await collectFiles(absolutePath));
62
+ continue;
63
+ }
64
+ if (entry.isFile()) files.push(absolutePath);
65
+ }
66
+ return files.toSorted((left, right) => left.localeCompare(right));
67
+ };
68
+ const getContentType = (filePath) => TEXT_CONTENT_TYPES[path.extname(filePath).toLowerCase()] ?? "application/octet-stream";
69
+ const readJson = async (response) => {
70
+ const text = await response.text();
71
+ if (!text) return null;
72
+ try {
73
+ return JSON.parse(text);
74
+ } catch {
75
+ return text;
76
+ }
77
+ };
78
+ const requestJson = async (url, init, message) => {
79
+ const response = await fetch(url, init);
80
+ const data = await readJson(response);
81
+ if (!response.ok) {
82
+ const detail = typeof data === "string" ? data : JSON.stringify(data ?? {}, null, 2);
83
+ throw new Error(`${message}: ${response.status} ${detail}`);
84
+ }
85
+ return data;
86
+ };
87
+ const program = new Command();
88
+ program.name("blode-docs").description("Blode Docs CLI").version("0.0.3");
89
+ program.command("init").description("Scaffold a content folder").argument("[dir]", "target directory", "docs").action(async (dir) => {
90
+ intro(styleText("bold", "blode-docs init"));
91
+ try {
92
+ const root = path.resolve(process.cwd(), dir);
93
+ await fs.mkdir(root, { recursive: true });
94
+ await ensureFile(path.join(root, CONTENT_CONFIG_FILE), `${JSON.stringify({
95
+ $schema: "https://mintlify.com/docs.json",
96
+ colors: { primary: "#0D9373" },
97
+ name: "My Site",
98
+ navigation: { groups: [{
99
+ group: "Getting Started",
100
+ pages: ["index"]
101
+ }] },
102
+ theme: "mint"
103
+ }, null, 2)}\n`);
104
+ await ensureFile(path.join(root, "index.mdx"), "---\ntitle: Welcome\n---\n\nStart writing your docs here.\n");
105
+ log.success(`Docs scaffolded in ${styleText("cyan", root)}`);
106
+ outro("Done");
107
+ } catch (error) {
108
+ log.error(`Init failed: ${error instanceof Error ? error.message : String(error)}`);
109
+ outro("Failed");
110
+ process.exitCode = 1;
111
+ }
112
+ });
113
+ program.command("validate").description("Validate docs.json").argument("[dir]", "target directory", "docs").action(async (dir) => {
114
+ intro(styleText("bold", "blode-docs validate"));
115
+ const root = path.resolve(process.cwd(), dir);
116
+ try {
117
+ const configFile = await validateConfigFile(root);
118
+ log.success(`${styleText("cyan", configFile)} is valid JSON.`);
119
+ outro("Done");
120
+ } catch (error) {
121
+ log.error(`Validation failed: ${error instanceof Error ? error.message : String(error)}`);
122
+ outro("Failed");
123
+ process.exitCode = 1;
124
+ }
125
+ });
126
+ program.command("push").description("Publish docs content").argument("[dir]", "target directory", "docs").option("--project <slug>", "project slug (env: BLODE_DOCS_PROJECT)").option("--api-url <url>", "API endpoint URL (env: BLODE_DOCS_API_URL)").option("--api-key <token>", "API authentication token (env: BLODE_DOCS_API_KEY)").option("--branch <name>", "git branch name (env: BLODE_DOCS_BRANCH)").option("--commit-message <message>", "deployment message (env: BLODE_DOCS_COMMIT_MESSAGE)").action(async (dir, options) => {
127
+ intro(styleText("bold", "blode-docs push"));
128
+ const s = spinner();
129
+ try {
130
+ const root = path.resolve(process.cwd(), dir);
131
+ s.start("Validating configuration");
132
+ await validateConfigFile(root);
133
+ s.stop("Configuration valid");
134
+ const project = options.project ?? process.env.BLODE_DOCS_PROJECT;
135
+ const apiUrl = options.apiUrl ?? process.env.BLODE_DOCS_API_URL ?? process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:4000";
136
+ const apiKey = options.apiKey ?? process.env.BLODE_DOCS_API_KEY;
137
+ const branch = options.branch ?? process.env.BLODE_DOCS_BRANCH ?? process.env.GITHUB_REF_NAME ?? readGitValue([
138
+ "rev-parse",
139
+ "--abbrev-ref",
140
+ "HEAD"
141
+ ]) ?? "main";
142
+ const commitMessage = options.commitMessage ?? process.env.BLODE_DOCS_COMMIT_MESSAGE ?? readGitValue([
143
+ "log",
144
+ "-1",
145
+ "--pretty=%s"
146
+ ]);
147
+ if (!project) throw new Error("Missing project slug. Pass --project or set BLODE_DOCS_PROJECT.");
148
+ if (!apiKey) throw new Error("Missing API key. Pass --api-key or set BLODE_DOCS_API_KEY.");
149
+ s.start("Collecting files");
150
+ const files = await collectFiles(root);
151
+ if (files.length === 0) throw new Error("No files found to publish.");
152
+ s.stop(`Found ${styleText("cyan", String(files.length))} files`);
153
+ const headers = {
154
+ Authorization: `Bearer ${apiKey}`,
155
+ "Content-Type": "application/json"
156
+ };
157
+ const apiPath = (suffix) => new URL(`/projects/slug/${project}/deployments${suffix}`, apiUrl).toString();
158
+ s.start("Creating deployment");
159
+ const deployment = await requestJson(apiPath(""), {
160
+ body: JSON.stringify({
161
+ branch,
162
+ commitMessage
163
+ }),
164
+ headers,
165
+ method: "POST"
166
+ }, "Failed to create deployment");
167
+ s.stop(`Deployment ${styleText("cyan", deployment.id)} created`);
168
+ s.start(`Uploading ${files.length} files`);
169
+ for (const [index, filePath] of files.entries()) {
170
+ const relativePath = normalizeRelativePath(root, filePath);
171
+ const content = await fs.readFile(filePath);
172
+ await requestJson(apiPath(`/${deployment.id}/files`), {
173
+ body: JSON.stringify({
174
+ contentBase64: content.toString("base64"),
175
+ contentType: getContentType(filePath),
176
+ path: relativePath
177
+ }),
178
+ headers,
179
+ method: "POST"
180
+ }, `Failed to upload ${relativePath}`);
181
+ s.message(`Uploading files (${index + 1}/${files.length})`);
182
+ }
183
+ s.stop(`Uploaded ${styleText("cyan", String(files.length))} files`);
184
+ s.start("Finalizing deployment");
185
+ const finalized = await requestJson(apiPath(`/${deployment.id}/finalize`), {
186
+ body: JSON.stringify({ promote: true }),
187
+ headers,
188
+ method: "POST"
189
+ }, "Failed to finalize deployment");
190
+ s.stop("Deployment finalized");
191
+ log.success(`Published deployment ${styleText("cyan", finalized.id)}`);
192
+ if (finalized.manifestUrl) log.info(`Manifest: ${finalized.manifestUrl}`);
193
+ if (typeof finalized.fileCount === "number") log.info(`Files: ${finalized.fileCount}`);
194
+ outro("Done");
195
+ } catch (error) {
196
+ s.stop("Failed");
197
+ log.error(error instanceof Error ? error.message : String(error));
198
+ outro("Failed");
199
+ process.exitCode = 1;
200
+ }
201
+ });
202
+ program.command("dev").description("Start the docs dev server").action(() => {
203
+ intro(styleText("bold", "blode-docs dev"));
204
+ log.info(`Run ${styleText("cyan", "npm run dev --filter=docs")} from the repo root.`);
205
+ log.info(`Then open ${styleText("cyan", "http://localhost:3001")} to view the docs site.`);
206
+ outro("Done");
207
+ });
208
+ program.parse();
209
+ //#endregion
210
+ export {};
211
+
212
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { spawnSync } from \"node:child_process\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { styleText } from \"node:util\";\n\nimport { intro, log, outro, spinner } from \"@clack/prompts\";\nimport { Command } from \"commander\";\n\nimport type { DeploymentResponse } from \"./types.js\";\n\nconst CONTENT_CONFIG_FILE = \"docs.json\";\n\nconst TEXT_CONTENT_TYPES: Record<string, string> = {\n \".css\": \"text/css; charset=utf-8\",\n \".html\": \"text/html; charset=utf-8\",\n \".js\": \"text/javascript; charset=utf-8\",\n \".json\": \"application/json; charset=utf-8\",\n \".md\": \"text/markdown; charset=utf-8\",\n \".mdx\": \"text/markdown; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n \".txt\": \"text/plain; charset=utf-8\",\n \".yaml\": \"application/yaml; charset=utf-8\",\n \".yml\": \"application/yaml; charset=utf-8\",\n};\n\nconst ensureFile = async (filePath: string, content: string): Promise<void> => {\n try {\n await fs.access(filePath);\n } catch {\n await fs.writeFile(filePath, content);\n }\n};\n\nconst isMissingFileError = (error: unknown): boolean =>\n error instanceof Error &&\n \"code\" in error &&\n (error as NodeJS.ErrnoException).code === \"ENOENT\";\n\nconst validateConfigFile = async (root: string): Promise<string> => {\n try {\n const raw = await fs.readFile(path.join(root, CONTENT_CONFIG_FILE), \"utf8\");\n JSON.parse(raw);\n return CONTENT_CONFIG_FILE;\n } catch (error) {\n if (isMissingFileError(error)) {\n throw new Error(`${CONTENT_CONFIG_FILE} not found.`, { cause: error });\n }\n throw error;\n }\n};\n\nconst readGitValue = (gitArgs: string[]): string | undefined => {\n const result = spawnSync(\"git\", gitArgs, {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n });\n\n if (result.status !== 0) {\n return;\n }\n\n const value = result.stdout.trim();\n return value || undefined;\n};\n\nconst normalizeRelativePath = (root: string, filePath: string): string =>\n path.relative(root, filePath).split(path.sep).join(\"/\");\n\nconst shouldSkipEntry = (name: string): boolean =>\n name.startsWith(\".\") || name === \"node_modules\";\n\nconst collectFiles = async (root: string): Promise<string[]> => {\n const entries = await fs.readdir(root, { withFileTypes: true });\n const files: string[] = [];\n\n for (const entry of entries) {\n if (shouldSkipEntry(entry.name)) {\n continue;\n }\n\n const absolutePath = path.join(root, entry.name);\n if (entry.isDirectory()) {\n files.push(...(await collectFiles(absolutePath)));\n continue;\n }\n\n if (entry.isFile()) {\n files.push(absolutePath);\n }\n }\n\n return files.toSorted((left, right) => left.localeCompare(right));\n};\n\nconst getContentType = (filePath: string): string =>\n TEXT_CONTENT_TYPES[path.extname(filePath).toLowerCase()] ??\n \"application/octet-stream\";\n\nconst readJson = async (response: Response): Promise<unknown> => {\n const text = await response.text();\n if (!text) {\n return null;\n }\n\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return text;\n }\n};\n\nconst requestJson = async <T>(\n url: string,\n init: RequestInit,\n message: string\n): Promise<T> => {\n const response = await fetch(url, init);\n const data = await readJson(response);\n if (!response.ok) {\n const detail =\n typeof data === \"string\" ? data : JSON.stringify(data ?? {}, null, 2);\n throw new Error(`${message}: ${response.status} ${detail}`);\n }\n\n return data as T;\n};\n\nconst program = new Command();\n\nprogram.name(\"blode-docs\").description(\"Blode Docs CLI\").version(\"0.0.3\");\n\nprogram\n .command(\"init\")\n .description(\"Scaffold a content folder\")\n .argument(\"[dir]\", \"target directory\", \"docs\")\n .action(async (dir: string) => {\n intro(styleText(\"bold\", \"blode-docs init\"));\n\n try {\n const root = path.resolve(process.cwd(), dir);\n await fs.mkdir(root, { recursive: true });\n\n const docsJson = {\n $schema: \"https://mintlify.com/docs.json\",\n colors: { primary: \"#0D9373\" },\n name: \"My Site\",\n navigation: {\n groups: [{ group: \"Getting Started\", pages: [\"index\"] }],\n },\n theme: \"mint\",\n };\n\n await ensureFile(\n path.join(root, CONTENT_CONFIG_FILE),\n `${JSON.stringify(docsJson, null, 2)}\\n`\n );\n await ensureFile(\n path.join(root, \"index.mdx\"),\n \"---\\ntitle: Welcome\\n---\\n\\nStart writing your docs here.\\n\"\n );\n\n log.success(`Docs scaffolded in ${styleText(\"cyan\", root)}`);\n outro(\"Done\");\n } catch (error: unknown) {\n log.error(\n `Init failed: ${error instanceof Error ? error.message : String(error)}`\n );\n outro(\"Failed\");\n process.exitCode = 1;\n }\n });\n\nprogram\n .command(\"validate\")\n .description(\"Validate docs.json\")\n .argument(\"[dir]\", \"target directory\", \"docs\")\n .action(async (dir: string) => {\n intro(styleText(\"bold\", \"blode-docs validate\"));\n\n const root = path.resolve(process.cwd(), dir);\n\n try {\n const configFile = await validateConfigFile(root);\n log.success(`${styleText(\"cyan\", configFile)} is valid JSON.`);\n outro(\"Done\");\n } catch (error: unknown) {\n log.error(\n `Validation failed: ${error instanceof Error ? error.message : String(error)}`\n );\n outro(\"Failed\");\n process.exitCode = 1;\n }\n });\n\nprogram\n .command(\"push\")\n .description(\"Publish docs content\")\n .argument(\"[dir]\", \"target directory\", \"docs\")\n .option(\"--project <slug>\", \"project slug (env: BLODE_DOCS_PROJECT)\")\n .option(\"--api-url <url>\", \"API endpoint URL (env: BLODE_DOCS_API_URL)\")\n .option(\n \"--api-key <token>\",\n \"API authentication token (env: BLODE_DOCS_API_KEY)\"\n )\n .option(\"--branch <name>\", \"git branch name (env: BLODE_DOCS_BRANCH)\")\n .option(\n \"--commit-message <message>\",\n \"deployment message (env: BLODE_DOCS_COMMIT_MESSAGE)\"\n )\n .action(\n async (\n dir: string,\n options: {\n apiKey?: string;\n apiUrl?: string;\n branch?: string;\n commitMessage?: string;\n project?: string;\n }\n ) => {\n intro(styleText(\"bold\", \"blode-docs push\"));\n const s = spinner();\n\n try {\n const root = path.resolve(process.cwd(), dir);\n\n s.start(\"Validating configuration\");\n await validateConfigFile(root);\n s.stop(\"Configuration valid\");\n\n const project = options.project ?? process.env.BLODE_DOCS_PROJECT;\n const apiUrl =\n options.apiUrl ??\n process.env.BLODE_DOCS_API_URL ??\n process.env.NEXT_PUBLIC_API_URL ??\n \"http://localhost:4000\";\n const apiKey = options.apiKey ?? process.env.BLODE_DOCS_API_KEY;\n const branch =\n options.branch ??\n process.env.BLODE_DOCS_BRANCH ??\n process.env.GITHUB_REF_NAME ??\n readGitValue([\"rev-parse\", \"--abbrev-ref\", \"HEAD\"]) ??\n \"main\";\n const commitMessage =\n options.commitMessage ??\n process.env.BLODE_DOCS_COMMIT_MESSAGE ??\n readGitValue([\"log\", \"-1\", \"--pretty=%s\"]);\n\n if (!project) {\n throw new Error(\n \"Missing project slug. Pass --project or set BLODE_DOCS_PROJECT.\"\n );\n }\n if (!apiKey) {\n throw new Error(\n \"Missing API key. Pass --api-key or set BLODE_DOCS_API_KEY.\"\n );\n }\n\n s.start(\"Collecting files\");\n const files = await collectFiles(root);\n if (files.length === 0) {\n throw new Error(\"No files found to publish.\");\n }\n s.stop(`Found ${styleText(\"cyan\", String(files.length))} files`);\n\n const headers = {\n Authorization: `Bearer ${apiKey}`,\n \"Content-Type\": \"application/json\",\n };\n\n const apiPath = (suffix: string): string =>\n new URL(\n `/projects/slug/${project}/deployments${suffix}`,\n apiUrl\n ).toString();\n\n s.start(\"Creating deployment\");\n const deployment = await requestJson<DeploymentResponse>(\n apiPath(\"\"),\n {\n body: JSON.stringify({ branch, commitMessage }),\n headers,\n method: \"POST\",\n },\n \"Failed to create deployment\"\n );\n s.stop(`Deployment ${styleText(\"cyan\", deployment.id)} created`);\n\n s.start(`Uploading ${files.length} files`);\n for (const [index, filePath] of files.entries()) {\n const relativePath = normalizeRelativePath(root, filePath);\n const content = await fs.readFile(filePath);\n\n await requestJson(\n apiPath(`/${deployment.id}/files`),\n {\n body: JSON.stringify({\n contentBase64: content.toString(\"base64\"),\n contentType: getContentType(filePath),\n path: relativePath,\n }),\n headers,\n method: \"POST\",\n },\n `Failed to upload ${relativePath}`\n );\n\n s.message(`Uploading files (${index + 1}/${files.length})`);\n }\n s.stop(`Uploaded ${styleText(\"cyan\", String(files.length))} files`);\n\n s.start(\"Finalizing deployment\");\n const finalized = await requestJson<DeploymentResponse>(\n apiPath(`/${deployment.id}/finalize`),\n {\n body: JSON.stringify({ promote: true }),\n headers,\n method: \"POST\",\n },\n \"Failed to finalize deployment\"\n );\n s.stop(\"Deployment finalized\");\n\n log.success(`Published deployment ${styleText(\"cyan\", finalized.id)}`);\n if (finalized.manifestUrl) {\n log.info(`Manifest: ${finalized.manifestUrl}`);\n }\n if (typeof finalized.fileCount === \"number\") {\n log.info(`Files: ${finalized.fileCount}`);\n }\n\n outro(\"Done\");\n } catch (error: unknown) {\n s.stop(\"Failed\");\n log.error(error instanceof Error ? error.message : String(error));\n outro(\"Failed\");\n process.exitCode = 1;\n }\n }\n );\n\nprogram\n .command(\"dev\")\n .description(\"Start the docs dev server\")\n .action(() => {\n intro(styleText(\"bold\", \"blode-docs dev\"));\n log.info(\n `Run ${styleText(\"cyan\", \"npm run dev --filter=docs\")} from the repo root.`\n );\n log.info(\n `Then open ${styleText(\"cyan\", \"http://localhost:3001\")} to view the docs site.`\n );\n outro(\"Done\");\n });\n\nprogram.parse();\n"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se {
3
+ fileCount?: number;
4
+ id: string;
5
+ manifestUrl?: string;
6
+ }
7
+ //#endregion
8
+ export { type DeploymentResponse };
9
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";UAAiB,kBAAA;EACf,SAAA;EACA,EAAA;EACA,WAAA;AAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "blodemd",
3
+ "version": "0.0.3",
4
+ "description": "Blode Docs CLI",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/mblode/blode-docs"
8
+ },
9
+ "bin": {
10
+ "blodemd": "./dist/cli.mjs"
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "type": "module",
16
+ "main": "./dist/index.mjs",
17
+ "types": "./dist/index.d.mts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.mts",
21
+ "import": "./dist/index.mjs",
22
+ "default": "./dist/index.mjs"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "tsdown",
27
+ "check-types": "tsc --noEmit -p tsconfig.json",
28
+ "lint": "oxlint .",
29
+ "lint:fix": "oxlint --fix .",
30
+ "format": "oxfmt --write .",
31
+ "format:check": "oxfmt ."
32
+ },
33
+ "dependencies": {
34
+ "@clack/prompts": "^1.0.0",
35
+ "commander": "^14.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@repo/typescript-config": "*",
39
+ "@types/node": "^22.15.3",
40
+ "oxfmt": "^0.42.0",
41
+ "oxlint": "^1.57.0",
42
+ "tsdown": "^0.21.5",
43
+ "ultracite": "^7.3.2"
44
+ }
45
+ }