Remove fist API Routes and Modifications to CLI #239

Merged
Sirherobrine23 merged 5 commits from API-And-CLI into main 2021-11-16 02:40:41 +00:00
4 changed files with 7 additions and 115 deletions
Showing only changes of commit 15a6df24fa - Show all commits

View File

@ -40,8 +40,8 @@ fs.readdirSync(path.join(__dirname, "plugins")).map(file => path.resolve(__dirna
}
});
BeforeRun.push(PluginArg);
MoreHelp.push(cli_color.redBright(`${path.basename(Plugin).replace(/\.js$/gi, "")} - ${__module.description}`), "", ...(__module.help || []), "");
});
MoreHelp.push(cli_color.redBright(`Plugin: ${path.basename(Plugin).replace(/\.js$/gi, "")} - ${__module.description}`), "", ...(__module.help || []), "");
} catch (err) {
console.log(cli_color.redBright(`Error loading plugin: ${Plugin}`));
console.log(cli_color.redBright(err));

111
package-lock.json generated
View File

@ -34,11 +34,9 @@
"node-cron": "^3.0.0",
"node-fetch": "^3.0.0",
"oci-sdk": "^2.0.0",
"open": "^8.0.0",
"ora": "^6.0.1",
"properties-to-json": "^0.2.1",
"request-ip": "^2.1.3",
"serverline": "^1.5.0",
"telegraf": "^4.0.0"
},
"bin": {
@ -49,8 +47,7 @@
"chai": "^4.3.4",
"eslint": "^8.0.0",
"mocha": "^9.1.3",
"nodemon": "^2.0.12",
"os-tmpdir": "^2.0.0"
"nodemon": "^2.0.12"
},
"engines": {
"node": ">=15.6.0"
@ -1290,14 +1287,6 @@
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
"node_modules/define-lazy-prop": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
"engines": {
"node": ">=8"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -2650,20 +2639,6 @@
"is-ci": "bin.js"
}
},
"node_modules/is-docker": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"bin": {
"is-docker": "cli.js"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@ -2801,17 +2776,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-wsl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dependencies": {
"is-docker": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-yarn-global": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
@ -4536,22 +4500,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/open": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
"integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
"dependencies": {
"define-lazy-prop": "^2.0.0",
"is-docker": "^2.1.1",
"is-wsl": "^2.2.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/opossum": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/opossum/-/opossum-5.0.1.tgz",
@ -4653,16 +4601,6 @@
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/os-tmpdir": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-2.0.0.tgz",
"integrity": "sha512-wZojVQP1fR3zW/Z9YLGJz4etXiu5d2tm4D6R4w2FTx1BAx9F1T+tEBb4+0deWQoskF1xe9zgBr/9mYwE+KY3xw==",
"deprecated": "This is not needed anymore. `require('os').tmpdir()` in Node.js 4 and up is good.",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@ -5231,14 +5169,6 @@
"node": ">= 0.8.0"
}
},
"node_modules/serverline": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/serverline/-/serverline-1.5.0.tgz",
"integrity": "sha512-QzNBH8omGchv+L5n/irZEeU2IGK3r8EMRh3EKRIlbfTklf9PtNRiRbWcYr8kqdNeWdc5M5jS13VtspDKgFXFFg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
@ -6932,11 +6862,6 @@
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
"define-lazy-prop": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og=="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -7960,11 +7885,6 @@
"ci-info": "^2.0.0"
}
},
"is-docker": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@ -8051,14 +7971,6 @@
"resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.1.0.tgz",
"integrity": "sha512-lDcxivp8TJpLG75/DpatAqNzOpDPSpED8XNtrpBHTdQ2InQ1PbW78jhwSxyxhhu+xbVSast2X38bwj8atwoUQA=="
},
"is-wsl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"requires": {
"is-docker": "^2.0.0"
}
},
"is-yarn-global": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
@ -9600,16 +9512,6 @@
"mimic-fn": "^2.1.0"
}
},
"open": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
"integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
"requires": {
"define-lazy-prop": "^2.0.0",
"is-docker": "^2.1.1",
"is-wsl": "^2.2.0"
}
},
"opossum": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/opossum/-/opossum-5.0.1.tgz",
@ -9677,12 +9579,6 @@
}
}
},
"os-tmpdir": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-2.0.0.tgz",
"integrity": "sha512-wZojVQP1fR3zW/Z9YLGJz4etXiu5d2tm4D6R4w2FTx1BAx9F1T+tEBb4+0deWQoskF1xe9zgBr/9mYwE+KY3xw==",
"dev": true
},
"p-cancelable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
@ -10120,11 +10016,6 @@
"send": "0.17.1"
}
},
"serverline": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/serverline/-/serverline-1.5.0.tgz",
"integrity": "sha512-QzNBH8omGchv+L5n/irZEeU2IGK3r8EMRh3EKRIlbfTklf9PtNRiRbWcYr8kqdNeWdc5M5jS13VtspDKgFXFFg=="
},
"setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",

View File

@ -71,11 +71,9 @@
"node-cron": "^3.0.0",
"node-fetch": "^3.0.0",
"oci-sdk": "^2.0.0",
"open": "^8.0.0",
"ora": "^6.0.1",
"properties-to-json": "^0.2.1",
"request-ip": "^2.1.3",
"serverline": "^1.5.0",
"telegraf": "^4.0.0"
},
"devDependencies": {
@ -83,7 +81,6 @@
"chai": "^4.3.4",
"eslint": "^8.0.0",
"mocha": "^9.1.3",
"nodemon": "^2.0.12",
"os-tmpdir": "^2.0.0"
"nodemon": "^2.0.12"
}
}

View File

@ -28,6 +28,10 @@ app.use(require("request-ip").mw());
// Routes
app.all(["/v2", "/v2/*"], ({res}) => res.status(401).json({
Error: "v2 route moved to root routes"
}));
// ? /bds/
app.get(["/bds/info", "/bds", "/"], ({res}) => {
try {