@betterdb/monitor 0.4.4 → 0.4.6
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/assets/build-info.json +2 -2
- package/assets/server/index.js +1 -1
- package/dist/index.js +19 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var require_package = __commonJS({
|
|
|
30
30
|
"package.json"(exports2, module2) {
|
|
31
31
|
module2.exports = {
|
|
32
32
|
name: "@betterdb/monitor",
|
|
33
|
-
version: "0.4.
|
|
33
|
+
version: "0.4.6",
|
|
34
34
|
description: "Monitor and observe your Valkey/Redis databases",
|
|
35
35
|
bin: {
|
|
36
36
|
betterdb: "./bin/betterdb.js"
|
|
@@ -348,6 +348,15 @@ function printStartupInfo(config) {
|
|
|
348
348
|
console.log(` ${import_picocolors.default.cyan("Docs:")} ${import_picocolors.default.underline(`http://localhost:${app.port}/api/docs`)}`);
|
|
349
349
|
console.log();
|
|
350
350
|
}
|
|
351
|
+
function printGitHubInfo() {
|
|
352
|
+
console.log(import_picocolors.default.dim(" \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"));
|
|
353
|
+
console.log();
|
|
354
|
+
console.log(` ${import_picocolors.default.yellow("\u2605")} If you find BetterDB Monitor useful, please consider`);
|
|
355
|
+
console.log(` giving us a star on GitHub:`);
|
|
356
|
+
console.log();
|
|
357
|
+
console.log(` ${import_picocolors.default.cyan(import_picocolors.default.underline("https://github.com/BetterDB-Inc/monitor"))}`);
|
|
358
|
+
console.log();
|
|
359
|
+
}
|
|
351
360
|
function printSuccess(message) {
|
|
352
361
|
console.log(import_picocolors.default.green(` \u2713 ${message}`));
|
|
353
362
|
}
|
|
@@ -563,6 +572,8 @@ async function promptConfiguration() {
|
|
|
563
572
|
// src/runner.ts
|
|
564
573
|
var import_child_process = require("child_process");
|
|
565
574
|
var import_path3 = require("path");
|
|
575
|
+
var packageJson = require_package();
|
|
576
|
+
var VERSION = packageJson.version;
|
|
566
577
|
var serverProcess = null;
|
|
567
578
|
var isShuttingDown = false;
|
|
568
579
|
function mapConfigToEnv(config, staticDir) {
|
|
@@ -570,6 +581,7 @@ function mapConfigToEnv(config, staticDir) {
|
|
|
570
581
|
// Always set these for CLI mode
|
|
571
582
|
NODE_ENV: "production",
|
|
572
583
|
AI_ENABLED: "false",
|
|
584
|
+
APP_VERSION: VERSION,
|
|
573
585
|
// Static directory for bundled web assets
|
|
574
586
|
BETTERDB_STATIC_DIR: staticDir,
|
|
575
587
|
// Database connection
|
|
@@ -673,16 +685,16 @@ function setupSignalHandlers() {
|
|
|
673
685
|
}
|
|
674
686
|
|
|
675
687
|
// src/index.ts
|
|
676
|
-
var
|
|
677
|
-
var
|
|
688
|
+
var packageJson2 = require_package();
|
|
689
|
+
var VERSION2 = packageJson2.version;
|
|
678
690
|
var program = new import_commander.Command();
|
|
679
|
-
program.name("betterdb").description("Monitor and observe your Valkey/Redis databases").version(
|
|
691
|
+
program.name("betterdb").description("Monitor and observe your Valkey/Redis databases").version(VERSION2, "-v, --version", "Display version number").option("-s, --setup", "Run the setup wizard").option("--no-setup", "Skip setup wizard even if no config exists").option("-p, --port <port>", "Server port", parseInt).option("--db-host <host>", "Database host").option("--db-port <port>", "Database port", parseInt).option("--storage-type <type>", "Storage type (sqlite, postgres, memory)").action(runCli);
|
|
680
692
|
program.command("setup").description("Run the interactive setup wizard (without starting server)").action(async () => {
|
|
681
|
-
printBanner(
|
|
693
|
+
printBanner(VERSION2);
|
|
682
694
|
await runSetupWizard();
|
|
683
695
|
});
|
|
684
696
|
async function runCli(options) {
|
|
685
|
-
printBanner(
|
|
697
|
+
printBanner(VERSION2);
|
|
686
698
|
const serverPath = getServerPath();
|
|
687
699
|
if (!(0, import_fs2.existsSync)(serverPath)) {
|
|
688
700
|
printError("Bundled server not found.");
|
|
@@ -717,6 +729,7 @@ async function runCli(options) {
|
|
|
717
729
|
}
|
|
718
730
|
config = applyCliOverrides(config, options);
|
|
719
731
|
printStartupInfo(config);
|
|
732
|
+
printGitHubInfo();
|
|
720
733
|
setupSignalHandlers();
|
|
721
734
|
printInfo("Starting server...");
|
|
722
735
|
console.log();
|