Dragonfly full support #199
@ -2,6 +2,7 @@ const { join, resolve, basename } = require("path");
|
||||
const { existsSync, writeFileSync, mkdirSync, readFileSync } = require("fs");
|
||||
const { homedir } = require("os");
|
||||
const yaml = require("js-yaml");
|
||||
const deepmerge = require("deepmerge");
|
||||
|
||||
// PATHs
|
||||
const home = homedir();
|
||||
@ -37,6 +38,7 @@ var Config = {
|
||||
java: null,
|
||||
pocketmine: null,
|
||||
spigot: null,
|
||||
dragonfly: null
|
||||
},
|
||||
Settings: {
|
||||
java: {
|
||||
@ -105,7 +107,7 @@ const ConfigPath = join(resolve(homedir(), "bds_core"), "BdsConfig.yaml")
|
||||
const SaveConfig = () => writeFileSync(ConfigPath, yaml.dump(Config));
|
||||
process.on("exit", () => SaveConfig());
|
||||
|
||||
if (existsSync(ConfigPath)) Config = yaml.load(readFileSync(ConfigPath, "utf8"));
|
||||
if (existsSync(ConfigPath)) Config = deepmerge(Config, yaml.load(readFileSync(ConfigPath, "utf8")));
|
||||
else writeFileSync(ConfigPath, yaml.dump(Config))
|
||||
|
||||
// Paths
|
||||
|
25
package-lock.json
generated
25
package-lock.json
generated
@ -16,11 +16,13 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@azure/storage-blob": "^12.6.0",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"adm-zip": "^0.5.1",
|
||||
"body-parser": "^1.19.0",
|
||||
"cli-color": "^2.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"cron": "^1.8.2",
|
||||
"deepmerge": "^4.2.2",
|
||||
"express": "^4.17.1",
|
||||
"express-fileupload": "^1.2.1",
|
||||
"express-prettify": "^0.1.1",
|
||||
@ -395,6 +397,11 @@
|
||||
"integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@iarna/toml": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
|
||||
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz",
|
||||
@ -1350,6 +1357,14 @@
|
||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/defaults": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
|
||||
@ -5983,6 +5998,11 @@
|
||||
"integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==",
|
||||
"dev": true
|
||||
},
|
||||
"@iarna/toml": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
|
||||
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
|
||||
},
|
||||
"@opentelemetry/api": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz",
|
||||
@ -6714,6 +6734,11 @@
|
||||
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
|
||||
"dev": true
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
|
||||
},
|
||||
"defaults": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
|
||||
|
@ -54,11 +54,13 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@azure/storage-blob": "^12.6.0",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"adm-zip": "^0.5.1",
|
||||
"body-parser": "^1.19.0",
|
||||
"cli-color": "^2.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"cron": "^1.8.2",
|
||||
"deepmerge": "^4.2.2",
|
||||
"express": "^4.17.1",
|
||||
"express-fileupload": "^1.2.1",
|
||||
"express-prettify": "^0.1.1",
|
||||
|
Reference in New Issue
Block a user