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.
- package/dist/index.js +7 -17
- 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
|
-
|
|
209
|
+
console.log(`
|
|
210
210
|
Usage: npx bonzai-tree [option]
|
|
211
211
|
|
|
212
212
|
Options:
|
|
213
|
-
(no option) Initialize
|
|
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);
|