Remove unused files

Remove left over files that are no longer in use.
This commit is contained in:
Hornwitser committed 2020-04-03 20:51:28 +02:00
1 parent 9a4a535add
commit f05100c94d
9 files changed
-114

No files matched your search

-32
View File
@@ -1,32 +0,0 @@
{
"__comment": "Where factorio folder. Should be in the same folder as this config file.",
"factorioDirectory": "./factorio",
"databaseDirectory": "./database",
"__commentMasterPort": "HTTP port for the master to listen to",
"masterPort": 8080,
"__commentsslPort": "HTTPS port for the master to listen to. Set to 0 or an empty string to not listen for HTTPS.",
"sslPort": 443,
"sslCert": "database/certificates/cert.crt",
"sslPrivKey": "database/certificates/cert.key",
"__commentAuthSecret": "This is a long random string used for generating authentication tokens. Do not share. Regenerates when secret-api-token.txt is deleted.",
"masterAuthSecret": "",
"__comment3": "Your factorio.com username for factorio MP services, also username will be admin on new instances",
"username": "",
"__comment4": "Token from your factorio.com profile page. Required for MP and mod manager services.",
"token": "",
"__comment5": "General user settings",
"verify_user_identity": true,
"auto_pause": false,
"allow_commands": "admins-only",
"game_password": "",
"description": "This server runs Clusterio",
"visibility": {
"public": true,
"lan": true
},
}
-1
View File
@@ -1 +0,0 @@
module.exports = require("./isFactorioCommand");
@@ -1,23 +0,0 @@
const luamin = require("luamin");
function isFactorioCommand(command){
if(typeof command != "string"){
return false;
} else if(!command.includes("/silent-command ") && !command.includes("/c ")){
return false;
} else if(command[0] != "/"){
return false;
} else {
// check that what follows /c is valid LUA
let x = command.replace("/silent-command ", "").replace("/c ","");
let y
try{
y = luamin.minify(x);
} catch (e) {
return false;
}
// by this point it is surely a LUA command
return true;
}
}
module.exports = isFactorioCommand;
-11
View File
@@ -1,11 +0,0 @@
/**
An item with a count specified
@typedef {object} itemStack
@property {string} name The name of the item in the stack
@property {(number|string)} count The amount of items in the stack
@example
itemStack = {name:"iron-plate", count:"12"}
itemStack = {name:"copper-plate", count:972}
*/
-1
View File
@@ -1,6 +1,5 @@
(function (){
ensureSetting("Display offline slaves", "boolean", false);
ensureSetting("Periodically update storage screen", "boolean", true);
}())
-26
View File
@@ -1,26 +0,0 @@
// ask master for slaves and render them nicely on a page with production graphs
setTimeout(function() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var slaveData = JSON.parse(xmlhttp.responseText);
var HTML = "<p>Current connections:</p>"
for(i=0;i<Object.keys(slaveData).length;i++){
var key = Object.keys(slaveData)[i]
// Only show slaves connected last 2 minutes (depending on setting now)
if(JSON.parse(localStorage.settings)["Display offline slaves"]) var displayOffline = true;
if(Date.now() - slaveData[key].time < 120000 || displayOffline) {
let seenDate = moment(Number(slaveData[key].time)).format('DD.MM.YY, hh:mm:ss')
HTML += "<div class='slaveBox'>";
HTML += "<a href='nodeDetails?instanceID="+slaveData[key].unique+"'><h2>" + slaveData[key].instanceName + "</h2></a><p>ID: " + slaveData[key].unique + "</p><p>Last seen: "+seenDate+"</p><p>Online players: "+slaveData[key].playerCount+"</p><p>IP: "+slaveData[key].publicIP +":"+ slaveData[key].serverPort+"</p>"
HTML += "<p>Host: "+slaveData[key].mac+"</p>";
HTML += "</div>";
}
}
document.querySelector("#slaves > #display").innerHTML = HTML
}
}
xmlhttp.open("GET", "api/slaves", true);
xmlhttp.send();
}, 0)
@@ -1,18 +0,0 @@
const isFactorioCommand = require("lib/isFactorioCommand");
const assert = require("assert");
describe("inventoryImports/isFactorioCommand.js()", function(){
it("Returns false if input is not a factorio command", function(){
assert(isFactorioCommand({}) == false, "This is not even a string so should return false");
assert(isFactorioCommand("Howdy boys!") == false, "This is not a command so should return false");
assert(isFactorioCommand("/c this ain't a command because its invalid LUA") == false, "This is not valid LUA so it should return false");
assert(isFactorioCommand("Trying to trick the system /c game.print('Hello world!')") == false, "this is still not a command");
});
it("Returns true if it is a valid command", function(){
assert(isFactorioCommand("/c game.print('hello world')"), "This is a valid command, should output true not false")
});
it("Fails to understand that leading spaces are valid", function(){
assert(isFactorioCommand(" /c game.print('Hello world!')") == false, "This should be true but often returns false unintentionally. If you see this you probably fixed the bug so change this test, OK?")
});
});
-1
View File
@@ -3,4 +3,3 @@
require('lib/manager/modManager');
require('lib/npmPostinstall.js');
require('lib/typedef');
-1
View File
@@ -1,7 +1,6 @@
<!doctype HTML>
<head>
<%- include("head") %>
<!-- <script src="slaveDisplay.js"></script> -->
</head>
<body>