bonzai-burn 1.0.77 → 1.0.79

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.
@@ -1,7 +1,7 @@
1
1
  const path = require('path');
2
2
 
3
- // Root directory (one level up from templates/)
4
- const ROOT = path.join(__dirname, '..');
3
+ // Root directory - use BONZAI_REPO_DIR env var (set by bconfig.js when server starts)
4
+ const ROOT = process.env.BONZAI_REPO_DIR || path.join(__dirname, '..');
5
5
 
6
6
  // Initialize babelParser (optional dependency)
7
7
  let babelParser = null;
@@ -1,3 +1,5 @@
1
+ const { ROOT } = require('../config');
2
+
1
3
  let pty;
2
4
  try {
3
5
  pty = require('node-pty');
@@ -27,7 +29,7 @@ function createTerminal(sessionId, cols = 80, rows = 24) {
27
29
  }
28
30
 
29
31
  const shell = getDefaultShell();
30
- const cwd = process.env.BONZAI_REPO_DIR || process.cwd();
32
+ const cwd = ROOT;
31
33
 
32
34
  let ptyProcess;
33
35
  try {
@@ -5,6 +5,7 @@ const cors = require('./node_modules/cors');
5
5
  const http = require('http');
6
6
  const fs = require('fs');
7
7
  const path = require('path');
8
+ const { ROOT } = require('./config');
8
9
 
9
10
  const app = express();
10
11
  const server = http.createServer(app);
@@ -14,7 +15,7 @@ app.use(express.json());
14
15
 
15
16
  // Root route
16
17
  app.get('/', (req, res) => {
17
- const repoName = path.basename(process.env.BONZAI_REPO_DIR || process.cwd());
18
+ const repoName = path.basename(ROOT);
18
19
  res.json({ message: 'Bonzai Server', status: 'running', repoName });
19
20
  });
20
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.77",
3
+ "version": "1.0.79",
4
4
  "description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",