distats-cli 0.0.3 → 0.0.4
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
package/src/commands/init.js
CHANGED
|
@@ -2,6 +2,7 @@ import path from "path";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import inquirer from "inquirer";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
+
import crypto from "crypto";
|
|
5
6
|
import { execSync } from "child_process";
|
|
6
7
|
import { createLoader } from "../utils/loader.js";
|
|
7
8
|
import { showWelcome } from "../utils/logger.js";
|
|
@@ -54,6 +55,7 @@ export async function init() {
|
|
|
54
55
|
const configPath = path.join(configDir, "config.json");
|
|
55
56
|
const configData = {
|
|
56
57
|
bot_token: promptAnswers.bot_token,
|
|
58
|
+
session_secret: crypto.randomBytes(64).toString("hex"),
|
|
57
59
|
database_type: "sqlite",
|
|
58
60
|
db_path: "./@distats_panel/database.sqlite",
|
|
59
61
|
installed_at: new Date().toISOString(),
|