Skip to content

Commit

Permalink
Enable declarative mode in terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
canmingir committed May 5, 2023
1 parent 75e799d commit 4119dad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ terminal.use(logs);
terminal.use(metrics);

terminal.post("/", (req, res) => {
const details = runtime.process(req.body, { details: true });
const mode = req.headers["x-nuc-mode"];
const declarative = mode?.toLowerCase() === "declarative";
const details = runtime.process(req.body, { declarative, details: true });
res.send(details);
});

Expand Down

0 comments on commit 4119dad

Please sign in to comment.