reciple 3.1.1 → 3.1.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/bin/bin.js +13 -1
- package/package.json +1 -1
- package/resource/reciple.yml +1 -1
package/bin/bin.js
CHANGED
|
@@ -9,12 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
12
15
|
var _a, _b;
|
|
13
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
17
|
const RecipleClient_1 = require("./reciple/classes/RecipleClient");
|
|
15
18
|
const RecipleConfig_1 = require("./reciple/classes/RecipleConfig");
|
|
16
19
|
const flags_1 = require("./reciple/flags");
|
|
17
20
|
const version_1 = require("./reciple/version");
|
|
21
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
18
22
|
const fallout_utility_1 = require("fallout-utility");
|
|
19
23
|
const fs_1 = require("fs");
|
|
20
24
|
require("dotenv/config");
|
|
@@ -28,7 +32,15 @@ if ((0, fs_1.readdirSync)('./').filter(f => !f.startsWith('.') && allowedFiles.i
|
|
|
28
32
|
if (ask.toString().toLowerCase() !== 'y')
|
|
29
33
|
process.exit(0);
|
|
30
34
|
}
|
|
31
|
-
|
|
35
|
+
let configParser;
|
|
36
|
+
try {
|
|
37
|
+
configParser = new RecipleConfig_1.RecipleConfig((_b = flags_1.flags.config) !== null && _b !== void 0 ? _b : './reciple.yml').parseConfig();
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
console.error(`${chalk_1.default.bold.red('Config Error')}: ${chalk_1.default.white(err.message)}`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
const config = configParser.getConfig();
|
|
32
44
|
const client = new RecipleClient_1.RecipleClient(Object.assign({ config: config }, config.client));
|
|
33
45
|
if (config.fileLogging.clientLogs)
|
|
34
46
|
client.logger.info('Reciple Client v' + version_1.version + ' is starting...');
|
package/package.json
CHANGED
package/resource/reciple.yml
CHANGED