fca-orion-api 1.0.1 → 1.0.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/data/fcaVersion.json +1 -1
- package/index.js +12 -4
- package/package.json +7 -2
package/data/fcaVersion.json
CHANGED
package/index.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
const utils = require("./utils");
|
4
4
|
const log = require("npmlog");
|
5
5
|
const fs = require('fs');
|
6
|
+
const Server = require("@igorkowalczyk/repl-uptime");
|
6
7
|
const gradient = require("gradient-string");
|
7
8
|
|
8
9
|
const checkVerified = null;
|
@@ -23,13 +24,13 @@ module.exports = {
|
|
23
24
|
};
|
24
25
|
`;
|
25
26
|
|
26
|
-
const configPath = '
|
27
|
+
const configPath = 'config.js';
|
27
28
|
|
28
29
|
if (!fs.existsSync(configPath)) {
|
29
30
|
fs.writeFileSync(configPath, configContent);
|
30
31
|
}
|
31
32
|
|
32
|
-
const { MainName } =
|
33
|
+
const { MainName } = "/../../config.js";
|
33
34
|
const InstantUpdate = require('./instantUpdate.js');
|
34
35
|
|
35
36
|
function setOptions(globalOptions, options) {
|
@@ -121,7 +122,7 @@ function buildAPI(globalOptions, html, jar) {
|
|
121
122
|
|
122
123
|
const userID = maybeCookie[0].cookieString().split("=")[1].toString();
|
123
124
|
const i_userID = objCookie.i_user || null;
|
124
|
-
const localVersion = require('
|
125
|
+
const localVersion = require('./package.json').version;
|
125
126
|
console.log(gradient('orange', 'yellow')(`${MainName || "[ FCA-ORION ]"}`) + chalk.white(` Logged in as ${userID}`));
|
126
127
|
console.log(gradient('orange', 'yellow')(`${MainName || "[ FCA-ORION ]"}`) + chalk.white(` The version of FCA-ORION you currently have is`) + chalk.greenBright(` ${localVersion}`));
|
127
128
|
|
@@ -413,5 +414,12 @@ function login(loginData, options, callback) {
|
|
413
414
|
return returnPromise;
|
414
415
|
}
|
415
416
|
|
417
|
+
new Server({
|
418
|
+
port: 8080,
|
419
|
+
path: "/",
|
420
|
+
message: "🤙 Don't let your repl go to sleep!",
|
421
|
+
debug: true,
|
422
|
+
});
|
423
|
+
|
416
424
|
InstantUpdate();
|
417
|
-
module.exports = login;
|
425
|
+
module.exports = login;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "fca-orion-api",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.3",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -22,9 +22,14 @@
|
|
22
22
|
"author": "Avery, David, Maude, Benjamin, UIRI",
|
23
23
|
"license": "MIT",
|
24
24
|
"dependencies": {
|
25
|
+
"@igorkowalczyk/repl-uptime": "^1.5.2",
|
26
|
+
"chalk": "^4.1.2",
|
25
27
|
"got": "^11.8.6",
|
26
28
|
"gradient-string": "^2.0.2",
|
29
|
+
"https-proxy-agent": "^7.0.2",
|
30
|
+
"mqtt": "^4.3.7",
|
27
31
|
"npmlog": "^1.2.0",
|
28
|
-
"request": "^2.53.0"
|
32
|
+
"request": "^2.53.0",
|
33
|
+
"websocket-stream": "^5.5.2"
|
29
34
|
}
|
30
35
|
}
|