bxo 0.0.5-dev.2 → 0.0.5-dev.3
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/index.ts +29 -2
- package/package.json +1 -1
package/index.ts
CHANGED
@@ -61,6 +61,8 @@ export default class BXO {
|
|
61
61
|
private hotReloadEnabled: boolean = false;
|
62
62
|
private watchedFiles: Set<string> = new Set();
|
63
63
|
private watchedExclude: Set<string> = new Set();
|
64
|
+
private serverPort?: number;
|
65
|
+
private serverHostname?: string;
|
64
66
|
|
65
67
|
constructor() { }
|
66
68
|
|
@@ -501,6 +503,8 @@ export default class BXO {
|
|
501
503
|
});
|
502
504
|
|
503
505
|
this.isRunning = true;
|
506
|
+
this.serverPort = port;
|
507
|
+
this.serverHostname = hostname;
|
504
508
|
|
505
509
|
console.log(`🦊 BXO server running at http://${hostname}:${port}`);
|
506
510
|
|
@@ -545,6 +549,8 @@ export default class BXO {
|
|
545
549
|
}
|
546
550
|
|
547
551
|
this.isRunning = false;
|
552
|
+
this.serverPort = undefined;
|
553
|
+
this.serverHostname = undefined;
|
548
554
|
|
549
555
|
console.log('🛑 BXO server stopped');
|
550
556
|
|
@@ -608,10 +614,31 @@ export default class BXO {
|
|
608
614
|
// Get server information (alias for getServerInfo)
|
609
615
|
get info() {
|
610
616
|
return {
|
611
|
-
|
617
|
+
// Server status
|
618
|
+
running: this.isRunning,
|
619
|
+
server: this.server ? 'Bun' : null,
|
620
|
+
|
621
|
+
// Connection details
|
622
|
+
hostname: this.serverHostname,
|
623
|
+
port: this.serverPort,
|
624
|
+
url: this.isRunning && this.serverHostname && this.serverPort
|
625
|
+
? `http://${this.serverHostname}:${this.serverPort}`
|
626
|
+
: null,
|
627
|
+
|
628
|
+
// Application statistics
|
612
629
|
totalRoutes: this._routes.length,
|
613
630
|
totalPlugins: this.plugins.length,
|
614
|
-
|
631
|
+
|
632
|
+
// Hot reload configuration
|
633
|
+
hotReload: this.hotReloadEnabled,
|
634
|
+
watchedFiles: Array.from(this.watchedFiles),
|
635
|
+
excludePatterns: Array.from(this.watchedExclude),
|
636
|
+
|
637
|
+
// System information
|
638
|
+
runtime: 'Bun',
|
639
|
+
version: typeof Bun !== 'undefined' ? Bun.version : 'unknown',
|
640
|
+
pid: process.pid,
|
641
|
+
uptime: this.isRunning ? process.uptime() : 0
|
615
642
|
};
|
616
643
|
}
|
617
644
|
|