distats-cli 0.0.1 → 0.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "distats-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -3,6 +3,8 @@ import chalk from "chalk";
3
3
  import ora from "ora";
4
4
  import crypto from "crypto";
5
5
  import { getDatabase, runQuery } from "../utils/database.js";
6
+ import { showWelcome } from "./utils/logger.js";
7
+
6
8
 
7
9
  /**
8
10
  * Hash a password using scrypt (Node.js native).
@@ -17,6 +19,8 @@ function hashPassword(password) {
17
19
  }
18
20
 
19
21
  export async function createUser() {
22
+ showWelcome();
23
+
20
24
  const spinner = ora("Opening local database...").start();
21
25
  let db;
22
26
 
@@ -3,8 +3,12 @@ import fs from "fs";
3
3
  import inquirer from "inquirer";
4
4
  import chalk from "chalk";
5
5
  import { createLoader } from "../utils/loader.js";
6
+ import { showWelcome } from "./utils/logger.js";
7
+
8
+
6
9
 
7
10
  export async function init() {
11
+ showWelcome();
8
12
  const getVisibleLength = (str) => str.replace(/\u001b\[\d+m/g, "").length;
9
13
  const noteWidth = 55;
10
14
  const borderCol = chalk.yellow;
package/src/index.js CHANGED
@@ -1,13 +1,10 @@
1
1
  import { init } from "./commands/init.js";
2
2
  import { createUser } from "./commands/create-user.js";
3
- import { getEnvVariables, GetEnvVaribels } from "./utils/config.js";
4
- import { showWelcome } from "./utils/logger.js";
3
+ import { getEnvVariables } from "./utils/config.js";
5
4
 
6
- // Always show the welcome banner
7
- showWelcome();
8
5
 
9
6
  // Export the utility functions for use as a library
10
- export { getEnvVariables, GetEnvVaribels };
7
+ export { getEnvVariables };
11
8
 
12
9
  const command = process.argv[2];
13
10
 
@@ -2,7 +2,7 @@ import path from "path";
2
2
  import fs from "fs";
3
3
 
4
4
  /**
5
- * Get configuration value(s) from the @prism_panel/config.json file in the current workspace.
5
+ * Get configuration value(s) from the @distats_panel/config.json file in the current workspace.
6
6
  *
7
7
  * @param {string} [key] - The key to look for in the config file. If not provided, returns all config.
8
8
  * @returns {any|null} - The value of the key, the entire config object, or null if not found.