@doquflow/cli 1.3.1 → 1.4.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.
package/dist/commands/ui.js
CHANGED
|
@@ -202,6 +202,7 @@ async function run(opts = {}) {
|
|
|
202
202
|
const lintWikiTool = loadTool('lint-wiki', 'lintWiki');
|
|
203
203
|
const queryWikiTool = loadTool('query-wiki', 'queryWiki');
|
|
204
204
|
const wikiSearchTool = loadTool('wiki-search', 'wikiSearch');
|
|
205
|
+
const buildGraphTool = loadTool('build-graph', 'buildGraph');
|
|
205
206
|
// ── 3. Express app ──────────────────────────────────────────────────────
|
|
206
207
|
const app = (0, express_1.default)();
|
|
207
208
|
app.use((0, cors_1.default)());
|
|
@@ -296,6 +297,17 @@ async function run(opts = {}) {
|
|
|
296
297
|
}
|
|
297
298
|
return res.status(404).json({ error: `Page not found: ${pageId}` });
|
|
298
299
|
});
|
|
300
|
+
app.get('/api/graph', async (req, res) => {
|
|
301
|
+
const projectPath = req.query.path;
|
|
302
|
+
if (!projectPath)
|
|
303
|
+
return res.status(400).json({ error: 'path required' });
|
|
304
|
+
try {
|
|
305
|
+
return res.json(await buildGraphTool({ project_path: projectPath }));
|
|
306
|
+
}
|
|
307
|
+
catch (e) {
|
|
308
|
+
return res.status(500).json({ error: e.message });
|
|
309
|
+
}
|
|
310
|
+
});
|
|
299
311
|
app.get('/api/health', async (req, res) => {
|
|
300
312
|
const projectPath = req.query.path;
|
|
301
313
|
if (!projectPath)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doquflow/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "CLI for setting up Docuflow in your project",
|
|
5
5
|
"author": "Docuflow <hello@doquflows.dev>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "tsc && node -e \"const fs=require('fs'),p=require('path'),src=p.join(process.cwd(),'../ui/dist'),dst=p.join(process.cwd(),'ui-dist');if(!fs.existsSync(src)){console.log('Warning: packages/ui/dist not found — run npm run build:ui first');process.exit(0)}fs.mkdirSync(dst,{recursive:true});fs.cpSync(src,dst,{recursive:true,force:true});console.log(' ✓ ui-dist synced from packages/ui/dist ('+(fs.readdirSync(dst).length)+' files at root)')\""
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@doquflow/server": "1.
|
|
34
|
+
"@doquflow/server": "1.4.0",
|
|
35
35
|
"cors": "^2.8.5",
|
|
36
36
|
"express": "^4.19.2"
|
|
37
37
|
},
|