forked from svrjs/svrjs
Dropped support for svrmodpack; SVR.JS LTS versions will still have svrmodpack support.
This commit is contained in:
parent
7e73cb68d3
commit
4179e4020c
1 changed files with 2 additions and 14 deletions
16
svr.js
16
svr.js
|
@ -400,14 +400,6 @@ try {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Don't use hexstrbase64
|
// Don't use hexstrbase64
|
||||||
}
|
}
|
||||||
var svrmodpack = undefined;
|
|
||||||
try {
|
|
||||||
svrmodpack = require("svrmodpack");
|
|
||||||
} catch (err) {
|
|
||||||
svrmodpack = {
|
|
||||||
_errored: err
|
|
||||||
};
|
|
||||||
}
|
|
||||||
var zlib = require("zlib");
|
var zlib = require("zlib");
|
||||||
var tar = undefined;
|
var tar = undefined;
|
||||||
try {
|
try {
|
||||||
|
@ -1452,7 +1444,6 @@ process.exit = function (code) {
|
||||||
|
|
||||||
var modLoadingErrors = [];
|
var modLoadingErrors = [];
|
||||||
var SSJSError = undefined;
|
var SSJSError = undefined;
|
||||||
var svrmodpackUsed = false;
|
|
||||||
|
|
||||||
// Load mods if the `disableMods` flag is not set
|
// Load mods if the `disableMods` flag is not set
|
||||||
if (!disableMods) {
|
if (!disableMods) {
|
||||||
|
@ -1514,10 +1505,8 @@ if (!disableMods) {
|
||||||
C: __dirname + "/temp/" + modloaderFolderName + "/" + modFileRaw
|
C: __dirname + "/temp/" + modloaderFolderName + "/" + modFileRaw
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// If it's not a ".tar.gz" file, unpack it using `svrmodpack`
|
// If it's not a ".tar.gz" file, throw an error about `svrmodpack` support being dropped
|
||||||
if (svrmodpack._errored) throw svrmodpack._errored;
|
throw new Error("This version of SVR.JS no longer supports \"svrmodpack\" library for SVR.JS mods. Please consider using newer mods with .tar.gz format.")
|
||||||
svrmodpack.unpack(modFile, __dirname + "/temp/" + modloaderFolderName + "/" + modFileRaw);
|
|
||||||
svrmodpackUsed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize variables for mod loading
|
// Initialize variables for mod loading
|
||||||
|
@ -4867,7 +4856,6 @@ function start(init) {
|
||||||
console.log("Welcome to SVR.JS - a web server running on Node.JS");
|
console.log("Welcome to SVR.JS - a web server running on Node.JS");
|
||||||
// Print warnings
|
// Print warnings
|
||||||
if (version.indexOf("Nightly-") === 0) serverconsole.locwarnmessage("This version is only for test purposes and may be unstable.");
|
if (version.indexOf("Nightly-") === 0) serverconsole.locwarnmessage("This version is only for test purposes and may be unstable.");
|
||||||
if (svrmodpackUsed) serverconsole.locwarnmessage("The \"svrmodpack\" library is deprecated. Mods using svrmodpack format may not work in future SVR.JS versions.");
|
|
||||||
if (configJSON.enableHTTP2 && !secure) serverconsole.locwarnmessage("HTTP/2 without HTTPS may not work in web browsers. Web browsers only support HTTP/2 with HTTPS!");
|
if (configJSON.enableHTTP2 && !secure) serverconsole.locwarnmessage("HTTP/2 without HTTPS may not work in web browsers. Web browsers only support HTTP/2 with HTTPS!");
|
||||||
if (process.isBun) {
|
if (process.isBun) {
|
||||||
serverconsole.locwarnmessage("Bun support is experimental. Some features of SVR.JS, SVR.JS mods and SVR.JS server-side JavaScript may not work as expected.");
|
serverconsole.locwarnmessage("Bun support is experimental. Some features of SVR.JS, SVR.JS mods and SVR.JS server-side JavaScript may not work as expected.");
|
||||||
|
|
Reference in a new issue