This commit is contained in:
J-onasJones 2023-12-31 02:41:46 +01:00
commit b5301f093e
42 changed files with 719 additions and 547 deletions

238
package-lock.json generated
View file

@ -40,9 +40,9 @@
}
},
"node_modules/@cloudflare/workers-types": {
"version": "4.20230904.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20230904.0.tgz",
"integrity": "sha512-IX4oJCe14ctblSPZBlW64BVZ9nYLUo6sD2I5gu3hX0ywByYWm1OuoKm9Xb/Zpbj8Ph18Z7Ryii6u2/ocnncXdA=="
"version": "4.20231121.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20231121.0.tgz",
"integrity": "sha512-+kWfpCkqiepwAKXyHoE0gnkPgkLhz0/9HOBIGhHRsUvUKvhUtm3mbqqoGRWgF1qcjzrDUBbrrOq4MYHfFtc2RA=="
},
"node_modules/@esbuild/android-arm": {
"version": "0.18.20",
@ -374,6 +374,14 @@
"node": ">=12"
}
},
"node_modules/@fastify/busboy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==",
"engines": {
"node": ">=14"
}
},
"node_modules/@fontsource/fira-mono": {
"version": "4.5.10",
"resolved": "https://registry.npmjs.org/@fontsource/fira-mono/-/fira-mono-4.5.10.tgz",
@ -415,9 +423,9 @@
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
"integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
@ -465,26 +473,26 @@
}
},
"node_modules/@polka/url": {
"version": "1.0.0-next.23",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.23.tgz",
"integrity": "sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg=="
"version": "1.0.0-next.24",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz",
"integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ=="
},
"node_modules/@sveltejs/adapter-auto": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.0.tgz",
"integrity": "sha512-o2pZCfATFtA/Gw/BB0Xm7k4EYaekXxaPGER3xGSY3FvzFJGTlJlZjBseaXwYSM94lZ0HniOjTokN3cWaLX6fow==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.1.tgz",
"integrity": "sha512-nzi6x/7/3Axh5VKQ8Eed3pYxastxoa06Y/bFhWb7h3Nu+nGRVxKAy3+hBJgmPCwWScy8n0TsstZjSVKfyrIHkg==",
"dev": true,
"dependencies": {
"import-meta-resolve": "^3.0.0"
"import-meta-resolve": "^4.0.0"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0"
}
},
"node_modules/@sveltejs/adapter-cloudflare": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-cloudflare/-/adapter-cloudflare-2.3.3.tgz",
"integrity": "sha512-bbcm6kq4dEluFtFJZed3KSRG4f5GUElYkVfOmnPruTqZ29nTElPJTomAu5QCp7GLkwA26O3h1Dk7+d9yLTQEXg==",
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-cloudflare/-/adapter-cloudflare-2.3.4.tgz",
"integrity": "sha512-+5Msbm7svrZjaBt0KapNh2zEaMRfrhbTRBWRXrFa+w+KFRQnHjFIPvWz/NQ11XKVu7dRe7mkzqvqieL2b0hpJw==",
"dependencies": {
"@cloudflare/workers-types": "^4.20230404.0",
"esbuild": "^0.18.11",
@ -503,24 +511,24 @@
}
},
"node_modules/@sveltejs/kit": {
"version": "1.25.0",
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.25.0.tgz",
"integrity": "sha512-+VqMWJJYtcLoF8hYkdqY2qs/MPaawrMwA/gNBJW2o2UrcuYdNiy0ZZnjQQuPD33df/VcAulnoeyzF5ZtaajFEw==",
"version": "1.29.1",
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.29.1.tgz",
"integrity": "sha512-zbHS6hy2OZLWTmkTktx7jpPaE5Qg9tk3li+wh06ISSLEYeiPrLlPMuhzmI2gM5d6ParNfDx7YCiPTeRr23IpMw==",
"hasInstallScript": true,
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@sveltejs/vite-plugin-svelte": "^2.5.0",
"@types/cookie": "^0.5.1",
"cookie": "^0.5.0",
"devalue": "^4.3.1",
"esm-env": "^1.0.0",
"kleur": "^4.1.5",
"magic-string": "^0.30.0",
"mime": "^3.0.0",
"mrmime": "^1.0.1",
"sade": "^1.8.1",
"set-cookie-parser": "^2.6.0",
"sirv": "^2.0.2",
"tiny-glob": "^0.2.9",
"undici": "~5.23.0"
"undici": "~5.26.2"
},
"bin": {
"svelte-kit": "svelte-kit.js"
@ -529,20 +537,20 @@
"node": "^16.14 || >=18"
},
"peerDependencies": {
"svelte": "^3.54.0 || ^4.0.0-next.0",
"svelte": "^3.54.0 || ^4.0.0-next.0 || ^5.0.0-next.0",
"vite": "^4.0.0"
}
},
"node_modules/@sveltejs/vite-plugin-svelte": {
"version": "2.4.5",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.5.tgz",
"integrity": "sha512-UJKsFNwhzCVuiZd06jM/psscyNJNDwjQC+qIeb7GBJK9iWeQCcIyfcPWDvbCudfcJggY9jtxJeeaZH7uny93FQ==",
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.5.3.tgz",
"integrity": "sha512-erhNtXxE5/6xGZz/M9eXsmI7Pxa6MS7jyTy06zN3Ck++ldrppOnOlJwHHTsMC7DHDQdgUp4NAc4cDNQ9eGdB/w==",
"dependencies": {
"@sveltejs/vite-plugin-svelte-inspector": "^1.0.3",
"@sveltejs/vite-plugin-svelte-inspector": "^1.0.4",
"debug": "^4.3.4",
"deepmerge": "^4.3.1",
"kleur": "^4.1.5",
"magic-string": "^0.30.2",
"magic-string": "^0.30.3",
"svelte-hmr": "^0.15.3",
"vitefu": "^0.2.4"
},
@ -550,7 +558,7 @@
"node": "^14.18.0 || >= 16"
},
"peerDependencies": {
"svelte": "^3.54.0 || ^4.0.0",
"svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0",
"vite": "^4.0.0"
}
},
@ -571,31 +579,31 @@
}
},
"node_modules/@types/cookie": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.2.tgz",
"integrity": "sha512-DBpRoJGKJZn7RY92dPrgoMew8xCWc2P71beqsjyhEI/Ds9mOyVmBwtekyfhpwFIVt1WrxTonFifiOZ62V8CnNA=="
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.4.tgz",
"integrity": "sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA=="
},
"node_modules/@types/estree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz",
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA=="
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw=="
},
"node_modules/@types/pug": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.6.tgz",
"integrity": "sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==",
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.10.tgz",
"integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==",
"dev": true
},
"node_modules/@types/unist": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz",
"integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==",
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==",
"dev": true
},
"node_modules/acorn": {
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"version": "8.11.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
"bin": {
"acorn": "bin/acorn"
},
@ -678,17 +686,6 @@
"node": "*"
}
},
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"dependencies": {
"streamsearch": "^1.1.0"
},
"engines": {
"node": ">=10.16.0"
}
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@ -865,9 +862,9 @@
}
},
"node_modules/fast-glob": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
"integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
@ -991,9 +988,9 @@
}
},
"node_modules/import-meta-resolve": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-3.0.0.tgz",
"integrity": "sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz",
"integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==",
"dev": true,
"funding": {
"type": "github",
@ -1080,9 +1077,9 @@
"integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="
},
"node_modules/magic-string": {
"version": "0.30.3",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.3.tgz",
"integrity": "sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==",
"version": "0.30.5",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
"integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
},
@ -1091,9 +1088,9 @@
}
},
"node_modules/marked": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.0.0.tgz",
"integrity": "sha512-37yoTpjU+TSXb9OBYY5n78z/CqXh76KiQj9xsKxEdztzU9fRLmbWO5YqKxgCVGKlNdexppnbKTkwB3RipVri8w==",
"version": "9.1.6",
"resolved": "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz",
"integrity": "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==",
"bin": {
"marked": "bin/marked.js"
},
@ -1143,17 +1140,6 @@
"node": ">=8.6"
}
},
"node_modules/mime": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
"integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/min-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
@ -1218,9 +1204,9 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
@ -1301,9 +1287,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.29",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz",
"integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==",
"version": "8.4.32",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz",
"integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",
"funding": [
{
"type": "opencollective",
@ -1319,7 +1305,7 @@
}
],
"dependencies": {
"nanoid": "^3.3.6",
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
@ -1375,9 +1361,9 @@
}
},
"node_modules/regexparam": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/regexparam/-/regexparam-2.0.1.tgz",
"integrity": "sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/regexparam/-/regexparam-2.0.2.tgz",
"integrity": "sha512-A1PeDEYMrkLrfyOwv2jwihXbo9qxdGD3atBYQA9JJgreAx8/7rC6IUkWOw2NQlOxLp2wL0ifQbh1HuidDfYA6w==",
"engines": {
"node": ">=8"
}
@ -1414,9 +1400,9 @@
}
},
"node_modules/rollup": {
"version": "3.29.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.1.tgz",
"integrity": "sha512-c+ebvQz0VIH4KhhCpDsI+Bik0eT8ZFEVZEYw0cGMVqIP8zc+gnwl7iXCamTw7vzv2MeuZFZfdx5JJIq+ehzDlg==",
"version": "3.29.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
"bin": {
"rollup": "dist/bin/rollup"
},
@ -1475,9 +1461,9 @@
}
},
"node_modules/sass": {
"version": "1.67.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz",
"integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==",
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz",
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
"devOptional": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@ -1532,14 +1518,6 @@
"node": ">=0.10.0"
}
},
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/strip-indent": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
@ -1553,9 +1531,9 @@
}
},
"node_modules/svelte": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.0.tgz",
"integrity": "sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ==",
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.8.tgz",
"integrity": "sha512-hU6dh1MPl8gh6klQZwK/n73GiAHiR95IkFsesLPbMeEZi36ydaXL/ZAb4g9sayT0MXzpxyZjR28yderJHxcmYA==",
"dependencies": {
"@ampproject/remapping": "^2.2.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
@ -1568,7 +1546,7 @@
"estree-walker": "^3.0.3",
"is-reference": "^3.0.1",
"locate-character": "^3.0.0",
"magic-string": "^0.30.0",
"magic-string": "^0.30.4",
"periscopic": "^3.1.0"
},
"engines": {
@ -1576,9 +1554,9 @@
}
},
"node_modules/svelte-check": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.5.1.tgz",
"integrity": "sha512-+Zb4iHxAhdUtcUg/WJPRjlS1RJalIsWAe9Mz6G1zyznSs7dDkT7VUBdXc3q7Iwg49O/VrZgyJRvOJkjuBfKjFA==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.6.2.tgz",
"integrity": "sha512-E6iFh4aUCGJLRz6QZXH3gcN/VFfkzwtruWSRmlKrLWQTiO6VzLsivR6q02WYLGNAGecV3EocqZuCDrC2uttZ0g==",
"dev": true,
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.17",
@ -1587,14 +1565,14 @@
"import-fresh": "^3.2.1",
"picocolors": "^1.0.0",
"sade": "^1.7.4",
"svelte-preprocess": "^5.0.4",
"svelte-preprocess": "^5.1.0",
"typescript": "^5.0.3"
},
"bin": {
"svelte-check": "bin/svelte-check"
},
"peerDependencies": {
"svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0"
"svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0"
}
},
"node_modules/svelte-hmr": {
@ -1609,9 +1587,9 @@
}
},
"node_modules/svelte-preprocess": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.4.tgz",
"integrity": "sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==",
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.2.tgz",
"integrity": "sha512-XF0aliMAcYnP4hLETvB6HRAMnaL09ASYT1Z2I1Gwu0nz6xbdg/dSgAEthtFZJA4AKrNhFDFdmUDO+H9d/6xg5g==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@ -1629,12 +1607,12 @@
"coffeescript": "^2.5.1",
"less": "^3.11.3 || ^4.0.0",
"postcss": "^7 || ^8",
"postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
"postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
"pug": "^3.0.0",
"sass": "^1.26.8",
"stylus": "^0.55.0",
"sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0",
"svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0",
"svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0",
"typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0"
},
"peerDependenciesMeta": {
@ -1712,9 +1690,9 @@
}
},
"node_modules/typescript": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@ -1725,11 +1703,11 @@
}
},
"node_modules/undici": {
"version": "5.23.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.23.0.tgz",
"integrity": "sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg==",
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz",
"integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==",
"dependencies": {
"busboy": "^1.6.0"
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
@ -1763,9 +1741,9 @@
}
},
"node_modules/vite": {
"version": "4.4.9",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz",
"integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==",
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
"integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
"dependencies": {
"esbuild": "^0.18.10",
"postcss": "^8.4.27",
@ -1817,11 +1795,11 @@
}
},
"node_modules/vitefu": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz",
"integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==",
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
"integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==",
"peerDependencies": {
"vite": "^3.0.0 || ^4.0.0"
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"vite": {

View file

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="darkreader-lock">
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />

View file

@ -3,37 +3,42 @@
</script>
<!-- Footer.svelte -->
<footer>
<a href="/">Home</a>
<footer class="box-shadow">
<div class="footer-flex">
<a href="/">Home</a>
<nav>
<ul>
<li>
<a href="https://jonasjones.dev/">Homepage</a>
</li>
<li>
<a href="/about">About</a>
</li>
<li>
<a href="/contact">Contact</a>
</li>
</ul>
</nav>
</div>
<div class="footer">
<p>Website by Jonas_Jones 2021 - 2024</p>
</div>
<nav>
<ul>
<li>
<a href="https://jonasjones.dev/">Homepage</a>
</li>
<li>
<a href="/about">About</a>
</li>
<li>
<a href="/contact">Contact</a>
</li>
</ul>
</nav>
</footer>
<style>
footer {
padding: 1rem;
margin: 2rem;
margin-bottom: 0;
margin-bottom: 2rem;
margin-top: 0;
background: var(--container-background-color);
border-radius: 0.5rem;
}
.footer-flex {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
border-radius: 0.5rem;
}
ul {
@ -49,9 +54,14 @@
}
.footer {
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
text-align: center;
}
@media (max-width: 550px) {
footer {
margin: 0;
border-radius: 0;
}
}
</style>

View file

@ -3,13 +3,20 @@
<div class="header-title">
<a href="/"
><img src="/favicon.png" alt="logo" width="50" height="50" />
<h1 style="">wiki.jonasjones.dev</h1></a
<h1 style="">Jonas_Jones Wiki</h1></a
>
</div>
<nav>
<ul>
<li>
<a href="https://jonasjones.dev/"><img style="padding-top: 7px;" src="/homepage.png" height="30px" alt="Homepage"></a>
<a href="https://jonasjones.dev/"
><img
style="padding-top: 7px;"
src="/homepage.png"
height="30px"
alt="Homepage"
/></a
>
</li>
</ul>
</nav>
@ -19,13 +26,14 @@
header {
padding: 1rem;
margin: 2rem;
margin-top: 0;
margin-top: 2rem;
margin-bottom: 0;
background: rgb(0, 255, 0);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
border-radius: 0.5rem;
box-shadow: 2px 2px rgb(0, 180, 0);
}
ul {
@ -61,4 +69,18 @@
float: left;
clear: both;
}
@media screen and (max-width: 550px) {
header h1 {
font-size: 20px;
float:none;
padding-left: 40px;
}
header {
margin: 0;
border-radius: 0;
text-align: left;
}
}
</style>

View file

@ -1,96 +1,18 @@
<script>
// @ts-nocheck
import NavbarList from "./NavbarList.svelte";
let data = import.meta.glob("/src/routes/**/+page.md");
let paths = data;
export let items;
/**
* @param {Record<string, () => Promise<unknown>>} paths
*/
function buildHierarchy(paths) {
const nestedList = {};
let fixedpaths = [];
/**
* @type {string[]}
*/
let fixedpaths2 = [];
fixedpaths = Object.keys(paths);
fixedpaths.forEach((path) => {
const fixedpath = path
.replace("/+page.md", "")
.replace("/src/routes", "");
fixedpaths2.push(fixedpath);
});
fixedpaths2.forEach((folder) => {
const parts = folder.split("/").filter(Boolean);
let currentNode = nestedList;
parts.forEach((part) => {
if (!currentNode[part]) {
currentNode[part] = {};
}
currentNode = currentNode[part];
});
});
return nestedList;
}
const nestedFolders = buildHierarchy(paths);
console.log(nestedFolders)
// Helper function to recursively render the nested list
/**
* @param {{ [x: string]: any; }} node
*/
// function renderNestedList(node, prefix = "") {
// return Object.keys(node)
// .map((key) => {
// const fullPath = `${prefix}/${key}`;
// return `<li><a href="${fullPath}">${key}</a><ul>${renderNestedList(
// node[key],
// fullPath
// )}</ul></li>`;
// })
// .join("");
// }
function createHtmlList(obj, parentPath = '') {
let html = '';
for (const key in obj) {
const currentPath = parentPath ? `${parentPath}/${key}` : key;
if (typeof obj[key] === 'object' && Object.keys(obj[key]).length > 0) {
// If the value is an object and not empty, create a nested div
html += `
<details>
<summary><a href="/${currentPath}">${key}</a></summary>
<ul>
${createHtmlList(obj[key], currentPath)}
</ul>
</details>
`;
} else {
// If the value is not an object or empty, create a clickable list item
html += `<li><a href="/${currentPath}">${key}</a></li>`;
}
}
return html;
}
//const renderedList = `<ul>${renderNestedList(nestedFolders)}</ul>`;
const renderedList = createHtmlList(nestedFolders);
let searchterm = "";
</script>
<div class="container navbar">
<div class="row">
<input class="box-shadow-inverted" type="text" bind:value={searchterm} placeholder="Search Pages (Alpha)..." />
<div class="col-md-12">
<h2>Pages</h2>
{@html renderedList}
<div class="navbar-links">
<NavbarList {searchterm} />
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,99 @@
<script>
// @ts-nocheck
let data = import.meta.glob("/src/routes/**/+page.md");
let paths = data;
/**
* @param {Record<string, () => Promise<unknown>>} paths
*/
function buildHierarchy(paths) {
const nestedList = {};
let fixedpaths = [];
/**
* @type {string[]}
*/
let fixedpaths2 = [];
fixedpaths = Object.keys(paths);
fixedpaths.forEach((path) => {
const fixedpath = path
.replace("/+page.md", "")
.replace("/src/routes", "");
fixedpaths2.push(fixedpath);
});
fixedpaths2.forEach((folder) => {
const parts = folder.split("/").filter(Boolean);
let currentNode = nestedList;
parts.forEach((part) => {
if (!currentNode[part]) {
currentNode[part] = {};
}
currentNode = currentNode[part];
});
});
return nestedList;
}
let nestedFolders = buildHierarchy(paths);
console.log(nestedFolders);
function createHtmlList(obj, parentPath = "", depth = 0) {
let html = "";
for (const key in obj) {
const currentPath = parentPath ? `${parentPath}/${key}` : key;
if (
typeof obj[key] === "object" &&
Object.keys(obj[key]).length > 0
) {
// If the value is an object and not empty, create a nested div
html += `
<li><h3 style='margin:0;font-size:${(1/(depth)+10)*2}px'><a href="/${currentPath}">${key}</a></h3></li>
<ul>
${createHtmlList(obj[key], currentPath, depth + 1)}
</ul>
`;
} else {
// If the value is not an object or empty, create a clickable list item
html += `<li><a href="/${currentPath}">${key}</a></li>`;
}
}
return html;
}
//const renderedList = `<ul>${renderNestedList(nestedFolders)}</ul>`;
let renderedList = createHtmlList(nestedFolders);
function filterObject(obj, filterString) {
if (filterString === "") {
return obj; // If filterString is empty, return the original object
}
for (const key in obj) {
if (
typeof obj[key] === "object" &&
Object.keys(obj[key]).length > 0
) {
obj[key] = filterObject(obj[key], filterString);
if (Object.keys(obj[key]).length === 0) {
delete obj[key]; // Remove the branch if it becomes empty after filtering
}
} else if (!key.includes(filterString)) {
delete obj[key];
}
}
return obj;
}
export let searchterm;
$: {
nestedFolders = buildHierarchy(paths);
nestedFolders = filterObject(nestedFolders, searchterm);
renderedList = createHtmlList(nestedFolders);
}
</script>
{@html renderedList}

View file

@ -15,6 +15,7 @@
--text-color: #fff;
--link-text-color: #afb9c4;
--collapsed-background-color: #414753;
--box-shadow-color: #111316;
}
@media (prefers-color-scheme: light) {
@ -23,6 +24,8 @@
--container-background-color: #d9d6d0;
--text-color: #000;
--link-text-color: #50463b;
--collapsed-background-color: #c4c4c4;
--box-shadow-color: #aaa;
}
}
@ -73,7 +76,7 @@ main {
.navbar {
float: left;
padding: 2rem;
min-width: 300px;
min-width: 200px;
margin-right: 2rem;
font-size: 1.2rem;
}
@ -87,6 +90,14 @@ ul {
display: flex;
}
.box-shadow {
box-shadow: 2px 2px var(--box-shadow-color);
}
.box-shadow-inverted {
box-shadow: inset 2px 2px var(--box-shadow-color);
}
.row:after {
content: "";
display: table;
@ -124,4 +135,45 @@ details {
details a {
padding-left: 0.5rem;
}
.content {
margin-left: 0;
overflow: scroll;
white-space: initial;
}
input {
background-color: var(--container-background-color);
border: 1px solid var(--container-background-color);
border-radius: 0.5rem;
padding: 0.5rem;
color: var(--text-color);
border: 3px solid var(--background-color);
}
@media screen and (max-width: 900px) {
.container {
flex-direction: column;
}
.content {
margin-left: 32px;
margin-top: 0;
}
}
@media screen and (max-width: 550px) {
.column {
margin: 0;
margin-bottom: 1rem;
border-radius: 0;
}
main {
margin: 0;
padding: 15px;
margin-bottom: 1rem;
border-radius: 0;
}
}

View file

@ -4,24 +4,14 @@
import Navbar from "$lib/components/Navbar.svelte";
</script>
<div style="height:2rem" />
<Header />
<div class="container">
<div class="column"><Navbar /></div>
<div class="column content flex_grow" style="margin-left: 0;">
<div class="column box-shadow"><Navbar /></div>
<div class="column box-shadow content flex_grow">
<main>
<slot />
<!-- Please god forgive me -->
<h1
style="color: var(--container-background-color);margin:0;padding:0"
class="unselectable"
>
YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT SEE THIS YOU CANT
SEE THIS
</h1>
</main>
</div>
</div>
<Footer />
<div style="height:2rem" />

View file

@ -3,4 +3,6 @@
This is the documentation on the public part of the Jonas_Jones API.
Part of the API is opensource and can be found on [GitHub](https://github.com/J-onasJones/api-worker). That part of the API is a Couldflare worker and acts as a front-end of the different API endpoints that it serves. Only few commands are currently available since the API is in an early stage and most planned publically available commands haven't been implemented yet.
Part of the API is a Couldflare worker and acts as a front-end of the different API endpoints that it serves. Only few commands are currently available since the API is in an early stage and most planned publically available commands haven't been implemented yet.
View the [References](Api/References/)

View file

@ -8,7 +8,7 @@ Get the link to the documentation.
/v1/help
```
### Response
### Example Response
*text/plain*
```
Please refer to the wiki at https://wiki.jonasjones.dev/Api/

View file

@ -8,7 +8,7 @@ Test the API connection.
/v1/ping
```
### Response
### Example Response
*text/plain*
```
pong

View file

@ -8,7 +8,7 @@ Get the API version
/v1/version
```
### Response
### Example Response
*application/json*
```json
["0.0.1+alpha-build01"]

View file

@ -0,0 +1,38 @@
# BetterConsoleMC
<a href="https://github.com/J-onasJones/BetterConsoleMC/blob/master/LICENSE"><img src="https://img.shields.io/github/license/J-onasJones/McWebserver?style=flat&color=900c3f" alt="License"></a>
<a href="https://discord.gg/V2EsuUVmWh"><img src="https://img.shields.io/discord/702180921234817135?color=5865f2&label=Discord&style=flat" alt="Discord"></a>
<a href="https://modrinth.com/mod/betterconsolemc"><img src="https://img.shields.io/modrinth/dt/betterconsolemc?logo=modrinth&label=&style=flat&color=242629&labelColor=00AF5C&logoColor=white" alt="Modrinth"></a>
<a href="https://modrinth.com/mod/betterconsolemc"><img src="https://img.shields.io/modrinth/game-versions/betterconsolemc?logo=modrinth&color=242629&labelColor=00AF5C&logoColor=white"></a>
<a align="center"><img src="http://cdn.jonasjones.dev/mod-badges/fabric-api.png" width="250px">
<img src="http://cdn.jonasjones.dev/mod-badges/no-support-forge.png" width="250px">
<img src="http://cdn.jonasjones.dev/mod-badges/available-modrinth.png" width="250px"><img src="http://cdn.jonasjones.dev/mod-badges/support-fabric.png" width="250px"><img src="http://cdn.jonasjones.dev/mod-badges/support-quilt.png" width="250px"></a>
### About the mod
This mod allows for simple ingame command creation to allow for system command execution trough a player on the server.
This mod can be looked at as version 2.0 of [ConsoleMC](https://github.com/J-onasJones/ConsoleMC) which while being powerful enough, has a big security flaw whe used on big and/or public servers in a way that everyone (that is OP) can run any command on the MC server's host system, giving anyone access to the entire machine and allowing for bad actions to be taken by people who shouldn't have access to it.
A detailed documentation with examples is available [here](BetterConsoleMC/Mod-Configuration)
### Fabric/Quilt support goes back to 1.17 Pre-release 1
Forge support isn't part of any of my plans.
### Warning
If used wrongly this mod can be a security risk for your server and all devices connected to the network that your server is in.
Beware that anyone who has write access to the MC server's files is able to edit the config files and therefore the commands at any time.
**Use at your own risk!**
<img src="https://cdn.jonasjones.dev/mod-badges/fabric-api.png" width="250px">
<img src="https://cdn.jonasjones.dev/mod-badges/available-modrinth.png" width="250px">
### Setup
1. Download the correct version of the mod **including the fabric api if you're using fabric** into your mods folder.
2. Restart Your Minecraft Server and let the mod create the config file. The webserver will be offline by default.
3. In the config file, enable the webserver and adjust all settings if needed.
4. Edit the command config file and add your desired commands!
5. Restart your Minecraft server and You're good to go!

View file

@ -0,0 +1,44 @@
# Mod Configuartion
---
# betterconsolemc-config.properties
This config file features the overall mod configs
### bettercmd.enable
- This setting, which is true by default, enables or disables the mod
# betterconsolemc-commands_config.properties
This config file features the ingame command configuration
### Syntax
- Command Mode
- `SIMPLE`: the command will just be ran
- `RETURN`: the command will be ran and the input will be returned and sent in chat
- Permission Level
- `1` -`4`, indicates what permission is required to run the command
- Execute Timeout
- `0`: the command can run forever and will not be terminated at any point - stopping the server will terminate the process
- `>0`: the command will be terminated after the given amount of seconds
- Broadcast to OP
- `true`: server operators will be notified that the command was ran by a user and can see who ran it
- `false`: server operators will not be notified; the action will still appear in the server logs
- Ingame command name
- The name of the ingame command
- Command to execute
- (In double quotes) the command that will be ran on the system
Combined, this will give the following one-liner:
`[Command Mode] [Permissione Level] [Execution Timeout] [Broadcast to OP] [Ingame Command name] [command to execute]`
### NOTICE: In version 0.0.1+alpha04 and below, there was an unused ExecutionBlockTimeout property. To update to newer versions, migrate the config file by removing the last number before the `true`/`false`.
### Examples
1. Update the system packages (linux):
`SIMPLE 4 0 true update "sudo apt update && sudo apt upgrade --force-yes"`
This creates a command `/update` that automatically updates a debian based linux system. The command is only available to operators, will, at no point, be terminated and can therefore finish without any errors. This aproach requires the server to be ran with elevated permissions (sudo)
2. launch a second minecraft server (linux):
`SIMPLE 1 300 true start-server "sudo systemctl start minecraft-server.service"`
This creates a command `/start-server` that automatically starts a minecraft server using the `systemctl` utility. This requires a setup of the service file in `/etc/systemd/system/`
There can only be a single command per line.

View file

@ -20,7 +20,7 @@ This mod runs a simple HTTP server alongside the minecraft server.
The mod allows You to host websites and share files and Server Backups directly from your server without the need of a seperate server setup. Adjust the port and design your website.
### API
It also has a powerful API allowing you to fetch server info about players and the server itself. More info on the [API's Wiki page](https://github.com/J-onasJones/McWebserver/wiki/3.-Web%E2%80%90API)
It also has a powerful API allowing you to fetch server info about players and the server itself. More info on the [API's Wiki page](/McWebserver/Web-API)
The http server has up to no performance impact on the server
@ -35,4 +35,4 @@ Do **only** put files into your webservers root directory that you want to be ac
<img src="https://cdn.jonasjones.dev/mod-badges/available-modrinth.png" width="250px">
### Setup
For Setup and further Info, please refer to the [setup page](http://localhost:5173/McWebserver/1.Setup)
For Setup and further Info, please refer to the [setup page](/McWebserver/Setup)

View file

@ -1,286 +0,0 @@
# Web-API
---
*This feature exists as of version 0.3.0 of McWebserver*
The API is split into two parts. the Simple API and the Advanced API.
# What is an API?
An API allows you to get information from the server in form of `json` code.
As an example we can fetch ourselves the server MOTD to display it on our website.
This API call will get you the following response:
- API call (replace `localhost` with your IP and the port with your actual webserver port from the config file):
```
http://localhost:8080/api/v1/motd
```
- Result:
```json
["A Minecraft Server"]
```
# Simple API
This API allows you to gather the most surface-level information about your server.
**All API calls have the prefix `/api/v1/`.**
The supported API calls are
## Server MOTD
- Returns the Server MOTD
```
http://localhost:8080/api/v1/motd
```
- Response:
```json
["A Minecraft Server"]
```
## Server IP address
- Returns the Server's IP address, if set in the server's `server.properties` file, or else returns an empty string
```
http://localhost:8080/api/v1/serverip
```
- Response:
```json
[""]
```
## Server Port
- Returns the Server's port
```
http://localhost:8080/api/v1/serverport
```
- Response:
```json
["25565"]
```
## Server Name
- Returns the Server's Name, if set in the server's `server.properties` file, or else returns an empty string
```
http://localhost:8080/api/v1/servername
```
- Response:
```json
["Server"]
```
## Server MC Version
- Returns the Server's Minecraft Version
```
http://localhost:8080/api/v1/serverversion
```
- Response:
```json
["1.20.1"]
```
## Fabric/Quilt Loader Version
- Returns the Mod-loader version
```
http://localhost:8080/api/v1/loaderversion
```
- Response:
```json
["0.14.22"]
```
## Server Player Count
- Returns the current player count.
```
http://localhost:8080/api/v1/currentplayercount
```
- Response:
```json
["0"]
```
## Server Default Gamemode
- Returns the Server's default gamemode
```
http://localhost:8080/api/v1/defaultgamemode
```
- Responses:
```json
["SURVIVAL"]
```
or
```json
["CREATIVE"]
```
or
```json
["SPECTATOR"]
```
## Server Max Player Count
- Returns the Server's maximum player allowance
```
http://localhost:8080/api/v1/maxplayercount
```
- Response:
```json
["20"]
```
## Server Current Player Names
- Returns the Server's currently online players
```
http://localhost:8080/api/v1/playernames
```
- Response:
```json
[
{
"ID": "c888eef5-edb7-4ceb-bbf3-987731de9747",
"NAME": "Jonas_Jones"
}
]
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*
## Server Ticks
- Returns the Server's tick count
```
http://localhost:8080/api/v1/ticks
```
- Response:
```json
["20456"]
```
## Server Ticktime
- Returns the Server's time it takes to process a single tick in Milliseconds
```
http://localhost:8080/api/v1/ticktime
```
- Response:
```json
["0.1235235"]
```
## Server Time-reference
- Returns the Server's in-game time of the day of the overworld
```
http://localhost:8080/api/v1/timereference
```
- Response:
```json
["20"]
```
## Server Metadata
- Returns the Server's Metadata. This includes all the information that is also being sent to a Minecraft client when pinging the server.
```
http://localhost:8080/api/v1/servermetadata
```
- Response:
```json
{
"DESCRIPTION": "A Minecraft Server",
"PLAYERS": {
"MAX":20,
"ONLINE":1,
"SAMPLE": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"NAME": "Anonymous Player"
}
]
},
"VERSION": {
"version": "1.20.1",
"protocol": 763
},
"FAVICON": "/api/v1/servericon",
"SECURE_CHAT_EINFORCED":true
}
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*
## Server All-Info
- Returns the Server's entire data of the Simple API
```
http://localhost:8080/api/v1/getall
```
- Response:
```json
{
"SERVER_IP": "",
"SERVER_PORT": 25565,
"SERVER_NAME": "Server",
"DEFAULT_GAME_MODE": "SURVIVAL",
"LOADER_VERSION": "0.14.22",
"METADATA": {
"DESCRIPTION": "A Minecraft Server",
"PLAYERS": {
"MAX": 20,
"ONLINE": 1,
"SAMPLE": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"NAME": "Anonymous Player"
}
]
},
"VERSION": {
"version": "1.20.1",
"protocol": 763
},
"FAVICON": "/api/v1/servericon",
"SECURE_CHAT_EINFORCED": true
},
"TICKS": 29066,
"TICK_TIME": 4.6665154,
"TIME_REFERENCE": 29606414
}
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*
## Server Favicon
- Returns the server icon image in form of a png
```
http://localhost:8080/api/v1/favicon
```
- Response
[image/png]
## Errors
When interacting with the API some errors can occur.
## Bad Request
- Occurs when a request doesn't exist
```
http://localhost:8080/api/v1/getmotd
```
In this example the request is wrong. `getmotd` isn't a valid request.
- Response
```json
{
"error": {
"status": 400,
"message": "Bad Request"
}
}
```
## Internal Server Error
- Occurs when something unexpected happens internally while handling the request. This most likely has nothing to do with you.
One possible way of getting the error message is to send the request before the server has fully started, more precise while loading the world.
- Response
```json
{
"error": {
"status": 500,
"message": "Internal Server Error"
}
}
```
# Advanced API
This is still WIP and is unreleased.
In the future it will be possible to get more information about players, their ingame coordinates, inventory, etc.
Stay tuned for updates!

View file

@ -34,5 +34,5 @@ The config file consists of the following entries:
- accepts: any path with `[filename].html` at the end
### logger.verbose
- enables/disables the verbose logger (more info at [5. Loggers](/McWebserver/5.Loggers))
- enables/disables the verbose logger (more info at [Loggers](/McWebserver/Loggers))
- accepts: `true`/`false`

View file

@ -2,9 +2,9 @@
---
McWebserver attempts to be as lightweight as possible.
An experiment shows that this is clearly the case. Even when the server is getting DDOS'ed and the website might not be available due to the high demand of the DDOS, the server still runs perfectly fine.
An experiment shows that this is clearly the case. Even when the server is getting DDOS'd and the website might not be available due to the high demand of the DDOS, the server still runs perfectly fine.
The following gif shows a ddos script using 300 threads (300 simultaneous requests at a time) and the server's MSPT (Milliseconds per Tick) only rising my about 2ms while under the DDOS attack.
The following gif shows a DDOS script using 300 threads (300 simultaneous requests at the same time) and the server's MSPT (Milliseconds per Tick) only rises by about 2ms while under the DDOS attack.
Notice: This isn't a scientific test and I wouldn't claim that the server can withstand a real DDOS attack. The results only give an idea of the performance impact under elevated load and medium demand.

View file

@ -2,11 +2,11 @@
---
1. Download the latest version of McWebserver from [modrinth](https://modrinth.com/mod/mcwebserver) or [curseforge](https://www.curseforge.com/minecraft/mc-mods/mcwebserver) as well as the Fabric API into your mods folder
2. Start the Minecraft Server and let the mod create the config file
3. Open the Config File, enable the webserver and configure the mod further. View [Mod Configuration (config-file)](/McWebserver/2.Mod-Configuration-(config-file)) for more information
3. Open the Config File, enable the webserver and configure the mod further. View [Mod Configuration (config-file)](/McWebserver/Mod-Configuration) for more information
4. Use the example html files or create your own:
- index.html
- 404.html
- not_supported.html
- favicon.ico
5. Port forward the webserver port if you plan on using it publicly
6. Take a look at how to [configure the loggers](/McWebserver/5.Loggers) to prevent unnecessary spam.
6. Take a look at how to [configure the loggers](/McWebserver/Loggers) to prevent unnecessary spam.

View file

@ -0,0 +1,16 @@
# Web-API
---
*This feature exists as of version 0.3.0 of McWebserver*
The API is split into two parts:
- [Simple API](/McWebserver/Web-API/Simple-API)
- [Advanced API](/McWebserver/Web-API/Advanced-API)
# What is an API?
An API allows you to get information from the server in form of `json` code.
As an example we can fetch ourselves the server MOTD to display it on our website.
This API call will get you the following response:
- API call (replace `localhost` with your IP and the port with your actual webserver port from the config file):

View file

@ -0,0 +1,5 @@
# Advanced API
---
This is still WIP and is unreleased.
In the future it will be possible to get more information about players, their ingame coordinates, inventory, etc.
Stay tuned for updates!

View file

@ -0,0 +1,7 @@
# Simple API
---
This API allows you to gather the most surface-level information about your server.
**All API calls have the prefix `/api/v1/`.**
The supported API calls are listed in the [Reference List](/McWebserver/Web-API/Simple-API/References).

View file

@ -0,0 +1,34 @@
# Errors
---
When interacting with the API some errors can occur.
## Bad Request
- Occurs when a request doesn't exist
```
http://localhost:8080/api/v1/getmotd
```
In this example the request is wrong. `getmotd` isn't a valid request.
- Response
```json
{
"error": {
"status": 400,
"message": "Bad Request"
}
}
```
## Internal Server Error
- Occurs when something unexpected happens internally while handling the request. This most likely has nothing to do with you.
One possible way of getting the error message is to send the request before the server has fully started, e.g. while it's still loading the world.
- Response
```json
{
"error": {
"status": 500,
"message": "Internal Server Error"
}
}
```

View file

@ -0,0 +1,18 @@
# References
---
- [Current-Player-Names](/McWebserver/Web-API/Simple-API/References/Current-Player-Names)
- [Default-Gamemode](/McWebserver/Web-API/Simple-API/References/Default-Gamemode)
- [Favicon](/McWebserver/Web-API/Simple-API/References/Favicon)
- [Get-All](/McWebserver/Web-API/Simple-API/References/Get-All)
- [IP-Address](/McWebserver/Web-API/Simple-API/References/IP-Address)
- [Loader-Version](/McWebserver/Web-API/Simple-API/References/Loader-Version)
- [MC-Version](/McWebserver/Web-API/Simple-API/References/MC-Version)
- [MOTD](/McWebserver/Web-API/Simple-API/References/MOTD)
- [Max-Player-Count](/McWebserver/Web-API/Simple-API/References/Max-Player-Count)
- [Metadata](/McWebserver/Web-API/Simple-API/References/Metadata)
- [Name](/McWebserver/Web-API/Simple-API/References/Name)
- [Player-Count](/McWebserver/Web-API/Simple-API/References/Player-Count)
- [Port](/McWebserver/Web-API/Simple-API/References/Port)
- [Ticks](/McWebserver/Web-API/Simple-API/References/Ticks)
- [Ticktime](/McWebserver/Web-API/Simple-API/References/Ticktime)
- [Time-Reference](/McWebserver/Web-API/Simple-API/References/Time-Reference)

View file

@ -0,0 +1,16 @@
## Server Current Player Names
---
- Returns the Server's currently online players
```
http://localhost:8080/api/v1/playernames
```
- Response:
```json
[
{
"ID": "c888eef5-edb7-4ceb-bbf3-987731de9747",
"NAME": "Jonas_Jones"
}
]
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*

View file

@ -0,0 +1,18 @@
## Server Default Gamemode
---
- Returns the Server's default gamemode
```
http://localhost:8080/api/v1/defaultgamemode
```
- Responses:
```json
["SURVIVAL"]
```
or
```json
["CREATIVE"]
```
or
```json
["SPECTATOR"]
```

View file

@ -0,0 +1,8 @@
## Server Favicon
---
- Returns the server icon image in form of a png
```
http://localhost:8080/api/v1/favicon
```
- Response
[image/png]

View file

@ -0,0 +1,39 @@
## Server Get All
---
- Returns the Server's entire data of the Simple API
```
http://localhost:8080/api/v1/getall
```
- Response:
```json
{
"SERVER_IP": "",
"SERVER_PORT": 25565,
"SERVER_NAME": "Server",
"DEFAULT_GAME_MODE": "SURVIVAL",
"LOADER_VERSION": "0.14.22",
"METADATA": {
"DESCRIPTION": "A Minecraft Server",
"PLAYERS": {
"MAX": 20,
"ONLINE": 1,
"SAMPLE": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"NAME": "Anonymous Player"
}
]
},
"VERSION": {
"version": "1.20.1",
"protocol": 763
},
"FAVICON": "/api/v1/servericon",
"SECURE_CHAT_EINFORCED": true
},
"TICKS": 29066,
"TICK_TIME": 4.6665154,
"TIME_REFERENCE": 29606414
}
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*

View file

@ -0,0 +1,10 @@
## Server IP Address
---
- Returns the Server's port
```
http://localhost:8080/api/v1/serverport
```
- Response:
```json
["25565"]
```

View file

@ -0,0 +1,10 @@
## Server Loader Version
---
- Returns the Mod-loader version
```
http://localhost:8080/api/v1/loaderversion
```
- Response:
```json
["0.14.22"]
```

View file

@ -0,0 +1,10 @@
## Server MC Version
---
- Returns the Server's Minecraft Version
```
http://localhost:8080/api/v1/serverversion
```
- Response:
```json
["1.20.1"]
```

View file

@ -0,0 +1,10 @@
## Server MOTD
---
- Returns the Server MOTD
```
http://localhost:8080/api/v1/motd
```
- Response:
```json
["A Minecraft Server"]
```

View file

@ -0,0 +1,10 @@
## Server Max Player Count
---
- Returns the Server's maximum player allowance
```
http://localhost:8080/api/v1/maxplayercount
```
- Response:
```json
["20"]
```

View file

@ -0,0 +1,29 @@
## Server Metadata
---
- Returns the Server's Metadata. This includes all the information that is also being sent to a Minecraft client when pinging the server.
```
http://localhost:8080/api/v1/servermetadata
```
- Response:
```json
{
"DESCRIPTION": "A Minecraft Server",
"PLAYERS": {
"MAX":20,
"ONLINE":1,
"SAMPLE": [
{
"ID": "00000000-0000-0000-0000-000000000000",
"NAME": "Anonymous Player"
}
]
},
"VERSION": {
"version": "1.20.1",
"protocol": 763
},
"FAVICON": "/api/v1/servericon",
"SECURE_CHAT_EINFORCED":true
}
```
NOTE: *v0.3.0 returns an additional property* `LEGACY` *for every player that states whether or not the account is a legacy account or not. Since mc 1.20.2 and the mod release 0.3.1 this was removed due to the end of the account migration period, where all legacy accounts were migrated to microsoft accounts. (This property is now always false and thus redundant)*

View file

@ -0,0 +1,10 @@
## Server Name
---
- Returns the Server's Name, if set in the server's `server.properties` file, or else returns an empty string
```
http://localhost:8080/api/v1/servername
```
- Response:
```json
["Server"]
```

View file

@ -0,0 +1,10 @@
## Server Player Count
---
- Returns the current player count.
```
http://localhost:8080/api/v1/currentplayercount
```
- Response:
```json
["0"]
```

View file

@ -0,0 +1,10 @@
## Server Port
---
- Returns the Server MOTD
```
http://localhost:8080/api/v1/motd
```
- Response:
```json
["A Minecraft Server"]
```

View file

@ -0,0 +1,10 @@
## Server Ticks
---
- Returns the Server's tick count
```
http://localhost:8080/api/v1/ticks
```
- Response:
```json
["20456"]
```

View file

@ -0,0 +1,10 @@
## Server Ticktime
---
- Returns the Server's time it takes to process a single tick in Milliseconds
```
http://localhost:8080/api/v1/ticktime
```
- Response:
```json
["0.1235235"]
```

View file

@ -0,0 +1,10 @@
## Server Time Reference
---
- Returns the Server's in-game time of the day of the overworld
```
http://localhost:8080/api/v1/timereference
```
- Response:
```json
["20"]
```