bonzai-tree 1.0.141 → 1.0.142

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 (2) hide show
  1. package/dist/index.js +7 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -206,16 +206,12 @@ var __dirname2 = dirname(__filename2);
206
206
  var BONZAI_DIR = "bonzai";
207
207
  var TEMPLATE_DIR2 = join(__dirname2, "payload-bonzai");
208
208
  function showHelp() {
209
- let help = `
209
+ console.log(`
210
210
  Usage: npx bonzai-tree [option]
211
211
 
212
212
  Options:
213
- (no option) Initialize bonzai in current directory
214
- --help Show this help message`;
215
- if (ENABLED_LOOPS.includes("visualization") || ENABLED_LOOPS.includes("backend")) {
216
- help = help.replace("--help", "-v, --visualize Launch visualization server\n --help");
217
- }
218
- console.log(help);
213
+ (no option) Initialize and launch bonzai
214
+ --help Show this help message`);
219
215
  }
220
216
  function init() {
221
217
  const currentDir = process.cwd();
@@ -227,25 +223,19 @@ function init() {
227
223
  mkdirSync(bonzaiPath, { recursive: true });
228
224
  copyFileSync(join(TEMPLATE_DIR2, "config.json"), join(bonzaiPath, "config.json"));
229
225
  console.log(`Created ${BONZAI_DIR}/ folder with config.json`);
230
- console.log("");
231
- console.log(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
232
- console.log(" \u2502 npx bonzai-tree -v Launch visualization server \u2502");
233
- console.log(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
234
226
  }
235
227
  async function main2() {
236
228
  const args = process.argv.slice(2);
237
229
  const flag = args[0];
238
- if (ENABLED_LOOPS.includes("visualization") || ENABLED_LOOPS.includes("backend")) {
239
- if (flag === "-v" || flag === "--visualize") {
240
- const { main: configMain } = await Promise.resolve().then(() => (init_bconfig(), bconfig_exports));
241
- return configMain == null ? void 0 : configMain();
242
- }
243
- }
244
230
  if (flag === "--help") {
245
231
  showHelp();
246
232
  return;
247
233
  }
248
234
  init();
235
+ if (ENABLED_LOOPS.includes("visualization") || ENABLED_LOOPS.includes("backend")) {
236
+ const { main: configMain } = await Promise.resolve().then(() => (init_bconfig(), bconfig_exports));
237
+ return configMain == null ? void 0 : configMain();
238
+ }
249
239
  }
250
240
  main2().catch((error) => {
251
241
  console.error("Error:", error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-tree",
3
- "version": "1.0.141",
3
+ "version": "1.0.142",
4
4
  "description": "Visualization and file management tools for codebases",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",