Spaces:
Sleeping
Sleeping
Update app.js
Browse files
app.js
CHANGED
|
@@ -14,7 +14,7 @@ app.use(cors());
|
|
| 14 |
app.use(bodyParser.json({ limit: "50mb" }));
|
| 15 |
|
| 16 |
// Options: 'NONE', 'BUILD_PART', 'FETCH_SCRIPT', 'FETCH_LOGS', 'SCAN_HIERARCHY', 'SCAN_SERVER_SERVICE'
|
| 17 |
-
const DEMO_MODE = '
|
| 18 |
|
| 19 |
app.post("/api/ai-build", async (req, res) => {
|
| 20 |
try {
|
|
@@ -41,7 +41,7 @@ app.post("/api/ai-build", async (req, res) => {
|
|
| 41 |
if (hierarchyContext) {
|
| 42 |
console.log(`🌳 HIERARCHY [${hierarchyContext.rootName}]:`);
|
| 43 |
// Limit log output so terminal doesn't flood
|
| 44 |
-
const treePreview = hierarchyContext.tree
|
| 45 |
console.log(treePreview);
|
| 46 |
//console.log("... (and more)");
|
| 47 |
return res.json({ success: true, message: `Scanned ${hierarchyContext.rootName}.` });
|
|
|
|
| 14 |
app.use(bodyParser.json({ limit: "50mb" }));
|
| 15 |
|
| 16 |
// Options: 'NONE', 'BUILD_PART', 'FETCH_SCRIPT', 'FETCH_LOGS', 'SCAN_HIERARCHY', 'SCAN_SERVER_SERVICE'
|
| 17 |
+
const DEMO_MODE = 'SCAN_HIERARCHY';
|
| 18 |
|
| 19 |
app.post("/api/ai-build", async (req, res) => {
|
| 20 |
try {
|
|
|
|
| 41 |
if (hierarchyContext) {
|
| 42 |
console.log(`🌳 HIERARCHY [${hierarchyContext.rootName}]:`);
|
| 43 |
// Limit log output so terminal doesn't flood
|
| 44 |
+
const treePreview = hierarchyContext.tree;//.split('\n').slice(0, 200).join('\n');
|
| 45 |
console.log(treePreview);
|
| 46 |
//console.log("... (and more)");
|
| 47 |
return res.json({ success: true, message: `Scanned ${hierarchyContext.rootName}.` });
|