@pepshlr/pepdoc 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +129 -0
  2. package/dist/adapters/express.d.ts.map +1 -1
  3. package/dist/adapters/express.js +43 -13
  4. package/dist/adapters/express.js.map +1 -1
  5. package/dist/adapters/fastify.d.ts +36 -0
  6. package/dist/adapters/fastify.d.ts.map +1 -0
  7. package/dist/adapters/fastify.js +121 -0
  8. package/dist/adapters/fastify.js.map +1 -0
  9. package/dist/adapters/hono.d.ts +34 -0
  10. package/dist/adapters/hono.d.ts.map +1 -0
  11. package/dist/adapters/hono.js +122 -0
  12. package/dist/adapters/hono.js.map +1 -0
  13. package/dist/adapters/index.d.ts +2 -0
  14. package/dist/adapters/index.d.ts.map +1 -1
  15. package/dist/adapters/index.js +5 -1
  16. package/dist/adapters/index.js.map +1 -1
  17. package/dist/bin/pepsdoc.js +215 -2
  18. package/dist/bin/pepsdoc.js.map +1 -1
  19. package/dist/bin/postinstall.d.ts +11 -0
  20. package/dist/bin/postinstall.d.ts.map +1 -0
  21. package/dist/bin/postinstall.js +23 -0
  22. package/dist/bin/postinstall.js.map +1 -0
  23. package/dist/core/types.d.ts +137 -0
  24. package/dist/core/types.d.ts.map +1 -0
  25. package/dist/core/types.js +7 -0
  26. package/dist/core/types.js.map +1 -0
  27. package/dist/export/index.d.ts +1 -0
  28. package/dist/export/index.d.ts.map +1 -1
  29. package/dist/export/index.js +3 -1
  30. package/dist/export/index.js.map +1 -1
  31. package/dist/export/openapi.d.ts +22 -0
  32. package/dist/export/openapi.d.ts.map +1 -0
  33. package/dist/export/openapi.js +170 -0
  34. package/dist/export/openapi.js.map +1 -0
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +7 -1
  38. package/dist/index.js.map +1 -1
  39. package/package.json +2 -1
  40. package/ui/build/assets/index-Cu7cwHCl.css +2 -0
  41. package/ui/build/assets/{index-BmHYXQxb.js → index-eB1g7Y3C.js} +2 -2
  42. package/ui/build/favicon.ico +0 -0
  43. package/ui/build/favicon.svg +1 -1
  44. package/ui/build/index.html +4 -4
  45. package/ui/build/logo.png +0 -0
  46. package/ui/build/assets/index-DxKrKvFe.css +0 -2
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ # PepsDoc
2
+
3
+ **API documentation, beautifully automated.**
4
+
5
+ Modern API documentation framework with a beautiful UI, AI-first workflow, and support for any backend language.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i @pepshlr/pepdoc
11
+ ```
12
+
13
+ ## Quick Start (Express)
14
+
15
+ ```typescript
16
+ import express from 'express';
17
+ import { pepsdoc } from '@pepshlr/pepdoc';
18
+
19
+ const app = express();
20
+
21
+ pepsdoc(app, {
22
+ title: 'My API',
23
+ description: 'My awesome API documentation',
24
+ });
25
+
26
+ app.listen(3000);
27
+ // Docs available at http://localhost:3000/docs
28
+ ```
29
+
30
+ ## Quick Start (Any Language)
31
+
32
+ PepsDoc works with **any backend language** — just generate the JSON files and serve the static build.
33
+
34
+ ```bash
35
+ npx pepsdoc init # Creates pepsdoc/ folder with config
36
+ # ... create your JSON doc files in pepsdoc/data/v1/
37
+ npx pepsdoc build # Generates static build
38
+ ```
39
+
40
+ Then serve the `pepsdoc/.build/` folder as static files from your backend (Python, Go, Java, Rust, PHP, etc.).
41
+
42
+ ## AI-Powered Documentation
43
+
44
+ PepsDoc is designed to be documented by AI. After installing, send the AI skill to your AI assistant:
45
+
46
+ ```
47
+ Read the PepsDoc AI skill at: node_modules/@pepshlr/pepdoc/templates/ai-skill.md
48
+ Then document my backend using PepsDoc.
49
+ ```
50
+
51
+ The AI will analyze your code and generate all the documentation automatically.
52
+
53
+ ## Features
54
+
55
+ - **Beautiful UI** — 3-column layout with sidebar, content, and response examples
56
+ - **Dark mode** — Automatic dark theme
57
+ - **API versioning** — Support for v1, v2, v3... with status badges (stable, beta, deprecated)
58
+ - **Method badges** — Color-coded HTTP method indicators (GET, POST, PUT, DELETE, etc.)
59
+ - **Copy for LLM** — One-click copy of endpoint details formatted for AI assistants
60
+ - **Search** — Filter endpoints by name or path
61
+ - **AI-first** — Built-in skill for AI to auto-document your API
62
+ - **Any language** — Works with Node.js, Python, Go, Java, Rust, PHP, and more
63
+ - **Git-friendly** — JSON-based storage, easy to version control
64
+ - **Zero dependencies** — No database needed, everything stored as JSON files
65
+
66
+ ## JSON Schema
67
+
68
+ Each endpoint group is a JSON file in `pepsdoc/data/<version>/`:
69
+
70
+ ```json
71
+ {
72
+ "group": "Users",
73
+ "order": 1,
74
+ "endpoints": [
75
+ {
76
+ "method": "GET",
77
+ "path": "/api/v1/users",
78
+ "summary": "List all users",
79
+ "description": "Returns a paginated list of users.",
80
+ "headers": [
81
+ { "name": "Authorization", "type": "string", "required": true }
82
+ ],
83
+ "queryParams": [
84
+ { "name": "page", "type": "number", "default": "1" }
85
+ ],
86
+ "responses": [
87
+ {
88
+ "status": 200,
89
+ "description": "Success",
90
+ "example": { "data": [{ "id": 1, "name": "John" }] }
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ }
96
+ ```
97
+
98
+ ## CLI
99
+
100
+ ```bash
101
+ npx pepsdoc init # Initialize pepsdoc/ folder
102
+ npx pepsdoc build # Generate static build
103
+ npx pepsdoc export llm # Export docs as markdown for AI
104
+ npx pepsdoc validate # Validate JSON files
105
+ ```
106
+
107
+ ## Configuration
108
+
109
+ Edit `pepsdoc/pepsdoc.config.json`:
110
+
111
+ ```json
112
+ {
113
+ "title": "My API",
114
+ "description": "API documentation",
115
+ "basePath": "/docs",
116
+ "versions": [
117
+ { "name": "v1", "badge": "stable", "default": true },
118
+ { "name": "v2", "badge": "beta" }
119
+ ],
120
+ "tabs": [
121
+ { "name": "REST API", "slug": "rest" },
122
+ { "name": "Webhooks", "slug": "webhooks" }
123
+ ]
124
+ }
125
+ ```
126
+
127
+ ## License
128
+
129
+ MIT
@@ -1 +1 @@
1
- {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,UAAU,UAAU;IAClB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACjD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;CAClD;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAqEzF"}
1
+ {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,UAAU,UAAU;IAClB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACjD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;CAClD;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAuGzF"}
@@ -67,6 +67,12 @@ function expressAdapter(app, userConfig) {
67
67
  app.get(`${basePath}/api/data`, (_req, res) => {
68
68
  try {
69
69
  const data = storage.compile();
70
+ // Merge runtime config on top of stored config so code always wins
71
+ data.config = {
72
+ ...data.config,
73
+ ...config,
74
+ theme: { ...data.config.theme, ...config.theme },
75
+ };
70
76
  res.json(data);
71
77
  }
72
78
  catch {
@@ -74,26 +80,50 @@ function expressAdapter(app, userConfig) {
74
80
  }
75
81
  });
76
82
  // Serve a UI estática
77
- // __dirname will be dist/adapters/ when compiled, so go up 2 levels to package root
78
83
  const uiBuildDir = path.join(__dirname, '..', '..', 'ui', 'build');
84
+ const MIME_TYPES = {
85
+ '.html': 'text/html',
86
+ '.css': 'text/css',
87
+ '.js': 'application/javascript',
88
+ '.json': 'application/json',
89
+ '.png': 'image/png',
90
+ '.jpg': 'image/jpeg',
91
+ '.jpeg': 'image/jpeg',
92
+ '.svg': 'image/svg+xml',
93
+ '.ico': 'image/x-icon',
94
+ '.woff': 'font/woff',
95
+ '.woff2': 'font/woff2',
96
+ '.ttf': 'font/ttf',
97
+ '.map': 'application/json',
98
+ };
79
99
  if (fs.existsSync(uiBuildDir)) {
80
- // Em produção: serve a build estática
81
- app.get(`${basePath}`, (_req, res) => {
82
- res.sendFile(path.join(uiBuildDir, 'index.html'));
83
- });
84
- app.get(`${basePath}/*`, (req, res) => {
85
- const filePath = path.join(uiBuildDir, req.path.replace(basePath, ''));
86
- if (fs.existsSync(filePath)) {
87
- res.sendFile(filePath);
100
+ app.use(basePath, (req, res, next) => {
101
+ // Skip API routes
102
+ if (req.path.startsWith('/api/')) {
103
+ next();
104
+ return;
105
+ }
106
+ // Redirect /docs to /docs/ so relative asset paths (./assets/) resolve correctly
107
+ if (req.originalUrl === basePath) {
108
+ res.redirect(`${basePath}/`);
109
+ return;
88
110
  }
89
- else {
90
- // SPA fallback
91
- res.sendFile(path.join(uiBuildDir, 'index.html'));
111
+ // Serve static file if it exists
112
+ const filePath = path.join(uiBuildDir, req.path);
113
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
114
+ const ext = path.extname(filePath).toLowerCase();
115
+ const mime = MIME_TYPES[ext] || 'application/octet-stream';
116
+ res.set('Content-Type', mime);
117
+ res.send(fs.readFileSync(filePath));
118
+ return;
92
119
  }
120
+ // SPA fallback: serve index.html
121
+ const indexPath = path.join(uiBuildDir, 'index.html');
122
+ res.set('Content-Type', 'text/html');
123
+ res.send(fs.readFileSync(indexPath, 'utf-8'));
93
124
  });
94
125
  }
95
126
  else {
96
- // Em dev: mostra mensagem placeholder
97
127
  app.get(`${basePath}`, (_req, res) => {
98
128
  res.type('html').send(`
99
129
  <!DOCTYPE html>
@@ -1 +1 @@
1
- {"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH,wCAqEC;AAxGD,2CAA6B;AAC7B,uCAAyB;AACzB,6CAA0C;AAE1C,2CAAgD;AAmBhD;;;;;;;;;;;GAWG;AACH,SAAgB,cAAc,CAAC,GAAe,EAAE,UAAmC;IACjF,MAAM,MAAM,GAAkB,EAAE,GAAG,uBAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACnE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC;IAEzC,6CAA6C;IAC7C,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,mCAAmC;IACnC,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,WAAW,EAAE,CAAC,IAAoB,EAAE,GAAoB,EAAE,EAAE;QAC7E,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;YAC/B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC,CAAC;QACrE,CAAC;IACH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C,MAAM,EAAE,EAAE,CAAC;gBAC9D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;gBACjD,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,0BAA0B,CAAC;gBAC3D,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;gBAC9B,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACpC,OAAO;YACT,CAAC;YAED,iCAAiC;YACjC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YACtD,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;YACrC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,EAAE,CAAC,IAAoB,EAAE,GAAoB,EAAE,EAAE;YACpE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;;;;mBAIT,MAAM,CAAC,KAAK;;;;;;;;;;;;;yBAaN,MAAM,CAAC,KAAK;6DACwB,QAAQ;;;;;OAK9D,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * PepsDoc - Fastify Adapter
3
+ * Serve documentation as Fastify plugin
4
+ */
5
+ import type { PepsDocConfig } from '../core/schema';
6
+ interface FastifyRequest {
7
+ url: string;
8
+ raw: {
9
+ url?: string;
10
+ };
11
+ }
12
+ interface FastifyReply {
13
+ type(contentType: string): this;
14
+ code(statusCode: number): this;
15
+ send(payload?: unknown): this;
16
+ header(name: string, value: string): this;
17
+ }
18
+ interface FastifyInstance {
19
+ get(path: string, handler: (request: FastifyRequest, reply: FastifyReply) => void | Promise<void>): void;
20
+ register(plugin: Function, opts?: unknown): void;
21
+ }
22
+ /**
23
+ * Initializes PepsDoc on a Fastify app
24
+ *
25
+ * ```ts
26
+ * import Fastify from 'fastify';
27
+ * import { fastifyAdapter } from '@pepshlr/pepdoc';
28
+ *
29
+ * const app = Fastify();
30
+ * fastifyAdapter(app, { title: 'My API' });
31
+ * app.listen({ port: 3000 });
32
+ * ```
33
+ */
34
+ export declare function fastifyAdapter(app: FastifyInstance, userConfig?: Partial<PepsDocConfig>): void;
35
+ export {};
36
+ //# sourceMappingURL=fastify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../../src/adapters/fastify.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACvB;AAED,UAAU,YAAY;IACpB,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,UAAU,eAAe;IACvB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACzG,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAClD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAkE9F"}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ /**
3
+ * PepsDoc - Fastify Adapter
4
+ * Serve documentation as Fastify plugin
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.fastifyAdapter = fastifyAdapter;
41
+ const path = __importStar(require("path"));
42
+ const fs = __importStar(require("fs"));
43
+ const storage_1 = require("../core/storage");
44
+ const config_1 = require("../core/config");
45
+ /**
46
+ * Initializes PepsDoc on a Fastify app
47
+ *
48
+ * ```ts
49
+ * import Fastify from 'fastify';
50
+ * import { fastifyAdapter } from '@pepshlr/pepdoc';
51
+ *
52
+ * const app = Fastify();
53
+ * fastifyAdapter(app, { title: 'My API' });
54
+ * app.listen({ port: 3000 });
55
+ * ```
56
+ */
57
+ function fastifyAdapter(app, userConfig) {
58
+ const config = { ...config_1.DEFAULT_CONFIG, ...userConfig };
59
+ const basePath = config.basePath || '/docs';
60
+ const projectRoot = process.cwd();
61
+ const storage = new storage_1.Storage(projectRoot);
62
+ if (!storage.isInitialized()) {
63
+ storage.init(config);
64
+ }
65
+ // API: compiled documentation data
66
+ app.get(`${basePath}/api/data`, (_request, reply) => {
67
+ try {
68
+ const data = storage.compile();
69
+ data.config = { ...data.config, ...config, theme: { ...data.config.theme, ...config.theme } };
70
+ reply.type('application/json').send(data);
71
+ }
72
+ catch {
73
+ reply.code(500).send({ error: 'Failed to compile documentation' });
74
+ }
75
+ });
76
+ // Serve static UI
77
+ const uiBuildDir = path.join(__dirname, '..', '..', 'ui', 'build');
78
+ if (fs.existsSync(uiBuildDir)) {
79
+ app.get(`${basePath}`, (_request, reply) => {
80
+ const html = fs.readFileSync(path.join(uiBuildDir, 'index.html'), 'utf-8');
81
+ reply.type('text/html').send(html);
82
+ });
83
+ app.get(`${basePath}/*`, (request, reply) => {
84
+ const reqUrl = request.raw.url || request.url;
85
+ const relativePath = reqUrl.replace(basePath, '').split('?')[0];
86
+ const filePath = path.join(uiBuildDir, relativePath);
87
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
88
+ const content = fs.readFileSync(filePath);
89
+ const ext = path.extname(filePath).toLowerCase();
90
+ const mimes = {
91
+ '.html': 'text/html', '.css': 'text/css', '.js': 'application/javascript',
92
+ '.json': 'application/json', '.png': 'image/png', '.svg': 'image/svg+xml',
93
+ '.ico': 'image/x-icon', '.woff2': 'font/woff2',
94
+ };
95
+ reply.type(mimes[ext] || 'application/octet-stream').send(content);
96
+ }
97
+ else {
98
+ // SPA fallback
99
+ const html = fs.readFileSync(path.join(uiBuildDir, 'index.html'), 'utf-8');
100
+ reply.type('text/html').send(html);
101
+ }
102
+ });
103
+ }
104
+ else {
105
+ app.get(`${basePath}`, (_request, reply) => {
106
+ reply.type('text/html').send(`
107
+ <!DOCTYPE html>
108
+ <html>
109
+ <head><title>${config.title} - PepsDoc</title>
110
+ <style>body{font-family:system-ui,sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;background:#0a0a0a;color:#fff}.c{text-align:center;max-width:500px}code{background:#1a1a2e;padding:2px 8px;border-radius:4px;color:#818cf8}</style>
111
+ </head>
112
+ <body><div class="c">
113
+ <h1>PepsDoc</h1>
114
+ <p><strong>${config.title}</strong></p>
115
+ <p>UI build not found. Run <code>npx pepsdoc build</code> to generate.</p>
116
+ </div></body></html>
117
+ `);
118
+ });
119
+ }
120
+ }
121
+ //# sourceMappingURL=fastify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastify.js","sourceRoot":"","sources":["../../src/adapters/fastify.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH,wCAkEC;AArGD,2CAA6B;AAC7B,uCAAyB;AACzB,6CAA0C;AAE1C,2CAAgD;AAmBhD;;;;;;;;;;;GAWG;AACH,SAAgB,cAAc,CAAC,GAAoB,EAAE,UAAmC;IACtF,MAAM,MAAM,GAAkB,EAAE,GAAG,uBAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACnE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,WAAW,CAAC,CAAC;IAEzC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI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AAC;SAAM,CAAC;QACN,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,EAAE,CAAC,QAAwB,EAAE,KAAmB,EAAE,EAAE;YACvE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;;;uBAGZ,MAAM,CAAC,KAAK;;;;;qBAKd,MAAM,CAAC,KAAK;;;OAG1B,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * PepsDoc - Hono Adapter
3
+ * Serve documentation as Hono middleware
4
+ */
5
+ import type { PepsDocConfig } from '../core/schema';
6
+ interface HonoContext {
7
+ json(data: unknown, status?: number): Response;
8
+ html(html: string, status?: number): Response;
9
+ text(text: string, status?: number): Response;
10
+ body(body: string | ArrayBuffer | ReadableStream | null, status?: number): Response;
11
+ header(name: string, value: string): void;
12
+ req: {
13
+ url: string;
14
+ path: string;
15
+ };
16
+ }
17
+ interface HonoApp {
18
+ get(path: string, handler: (c: HonoContext) => Response | Promise<Response>): void;
19
+ }
20
+ /**
21
+ * Initializes PepsDoc on a Hono app
22
+ *
23
+ * ```ts
24
+ * import { Hono } from 'hono';
25
+ * import { honoAdapter } from '@pepshlr/pepdoc';
26
+ *
27
+ * const app = new Hono();
28
+ * honoAdapter(app, { title: 'My API' });
29
+ * export default app;
30
+ * ```
31
+ */
32
+ export declare function honoAdapter(app: HonoApp, userConfig?: Partial<PepsDocConfig>): void;
33
+ export {};
34
+ //# sourceMappingURL=hono.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hono.d.ts","sourceRoot":"","sources":["../../src/adapters/hono.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,UAAU,WAAW;IACnB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACpF,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,UAAU,OAAO;IACf,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;CACpF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAmEnF"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ /**
3
+ * PepsDoc - Hono Adapter
4
+ * Serve documentation as Hono middleware
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.honoAdapter = honoAdapter;
41
+ const path = __importStar(require("path"));
42
+ const fs = __importStar(require("fs"));
43
+ const storage_1 = require("../core/storage");
44
+ const config_1 = require("../core/config");
45
+ /**
46
+ * Initializes PepsDoc on a Hono app
47
+ *
48
+ * ```ts
49
+ * import { Hono } from 'hono';
50
+ * import { honoAdapter } from '@pepshlr/pepdoc';
51
+ *
52
+ * const app = new Hono();
53
+ * honoAdapter(app, { title: 'My API' });
54
+ * export default app;
55
+ * ```
56
+ */
57
+ function honoAdapter(app, userConfig) {
58
+ const config = { ...config_1.DEFAULT_CONFIG, ...userConfig };
59
+ const basePath = config.basePath || '/docs';
60
+ const projectRoot = process.cwd();
61
+ const storage = new storage_1.Storage(projectRoot);
62
+ if (!storage.isInitialized()) {
63
+ storage.init(config);
64
+ }
65
+ // API: compiled documentation data
66
+ app.get(`${basePath}/api/data`, (c) => {
67
+ try {
68
+ const data = storage.compile();
69
+ data.config = { ...data.config, ...config, theme: { ...data.config.theme, ...config.theme } };
70
+ return c.json(data);
71
+ }
72
+ catch {
73
+ return c.json({ error: 'Failed to compile documentation' }, 500);
74
+ }
75
+ });
76
+ // Serve static UI
77
+ const uiBuildDir = path.join(__dirname, '..', '..', 'ui', 'build');
78
+ if (fs.existsSync(uiBuildDir)) {
79
+ app.get(`${basePath}`, (c) => {
80
+ const html = fs.readFileSync(path.join(uiBuildDir, 'index.html'), 'utf-8');
81
+ return c.html(html);
82
+ });
83
+ app.get(`${basePath}/*`, (c) => {
84
+ const reqPath = c.req.path;
85
+ const relativePath = reqPath.replace(basePath, '').split('?')[0];
86
+ const filePath = path.join(uiBuildDir, relativePath);
87
+ if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
88
+ const content = fs.readFileSync(filePath);
89
+ const ext = path.extname(filePath).toLowerCase();
90
+ const mimes = {
91
+ '.html': 'text/html', '.css': 'text/css', '.js': 'application/javascript',
92
+ '.json': 'application/json', '.png': 'image/png', '.svg': 'image/svg+xml',
93
+ '.ico': 'image/x-icon', '.woff2': 'font/woff2',
94
+ };
95
+ c.header('Content-Type', mimes[ext] || 'application/octet-stream');
96
+ return c.body(new Uint8Array(content).buffer);
97
+ }
98
+ else {
99
+ // SPA fallback
100
+ const html = fs.readFileSync(path.join(uiBuildDir, 'index.html'), 'utf-8');
101
+ return c.html(html);
102
+ }
103
+ });
104
+ }
105
+ else {
106
+ app.get(`${basePath}`, (c) => {
107
+ return c.html(`
108
+ <!DOCTYPE html>
109
+ <html>
110
+ <head><title>${config.title} - PepsDoc</title>
111
+ <style>body{font-family:system-ui,sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;background:#0a0a0a;color:#fff}.c{text-align:center;max-width:500px}code{background:#1a1a2e;padding:2px 8px;border-radius:4px;color:#818cf8}</style>
112
+ </head>
113
+ <body><div class="c">
114
+ <h1>PepsDoc</h1>
115
+ <p><strong>${config.title}</strong></p>
116
+ <p>UI build not found. Run <code>npx pepsdoc build</code> to generate.</p>
117
+ </div></body></html>
118
+ `);
119
+ });
120
+ }
121
+ }
122
+ //# sourceMappingURL=hono.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hono.js","sourceRoot":"","sources":["../../src/adapters/hono.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AAQ,EAAE,YAAY;iBAC/C,CAAC;gBACF,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,0BAA0B,CAAC,CAAC;gBACnE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,MAAqB,CAAC,CAAC;YAC/D,CAAC;iBAAM,CAAC;gBACN,eAAe;gBACf,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;gBAC3E,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,EAAE,CAAC,CAAc,EAAE,EAAE;YACxC,OAAO,CAAC,CAAC,IAAI,CAAC;;;uBAGG,MAAM,CAAC,KAAK;;;;;qBAKd,MAAM,CAAC,KAAK;;;OAG1B,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export { expressAdapter } from './express';
2
+ export { fastifyAdapter } from './fastify';
3
+ export { honoAdapter } from './hono';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.expressAdapter = void 0;
3
+ exports.honoAdapter = exports.fastifyAdapter = exports.expressAdapter = void 0;
4
4
  var express_1 = require("./express");
5
5
  Object.defineProperty(exports, "expressAdapter", { enumerable: true, get: function () { return express_1.expressAdapter; } });
6
+ var fastify_1 = require("./fastify");
7
+ Object.defineProperty(exports, "fastifyAdapter", { enumerable: true, get: function () { return fastify_1.fastifyAdapter; } });
8
+ var hono_1 = require("./hono");
9
+ Object.defineProperty(exports, "honoAdapter", { enumerable: true, get: function () { return hono_1.honoAdapter; } });
6
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAAlC,yGAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAAlC,yGAAA,cAAc,OAAA;AACvB,qCAA2C;AAAlC,yGAAA,cAAc,OAAA;AACvB,+BAAqC;AAA5B,mGAAA,WAAW,OAAA"}