refactor codebase + add cli

This commit is contained in:
ZXMushroom63 2025-04-11 20:39:00 +08:00
parent a4c5769acf
commit 94ba73c990
13 changed files with 742 additions and 103 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules
EaglercraftX_1.8_Offline_en_US.html
processed.html

50
browser.js Normal file
View File

@ -0,0 +1,50 @@
document.querySelector("title").innerText = `EaglerForge Injector ${EFIConfig.ModAPIVersion}`;
document.querySelector("h1").innerText = `EaglerForge Injector ${EFIConfig.ModAPIVersion}`;
document.querySelector("#giveme").addEventListener("click", () => {
if (
!document.querySelector("input").files ||
!document.querySelector("input").files[0]
) {
return;
}
// @type File
var file = document.querySelector("input").files[0];
var fileType = file.name.split(".");
fileType = fileType[fileType.length - 1];
file.text().then(async (string) => {
var patchedFile = string;
EFIConfig.doServerExtras = false;
patchedFile = patchClient(string, new DOMParser());
var blob = new Blob([patchedFile], { type: file.type });
saveAs(blob, "processed." + fileType);
backgroundLog("Saving file...", true);
});
});
document.querySelector("#givemeserver").addEventListener("click", () => {
if (
!document.querySelector("input").files ||
!document.querySelector("input").files[0]
) {
return;
}
// @type File
var file = document.querySelector("input").files[0];
var fileType = file.name.split(".");
fileType = fileType[fileType.length - 1];
file.text().then(async (string) => {
var patchedFile = string;
EFIConfig.doServerExtras = true;
patchedFile = patchClient(string, new DOMParser());
var blob = new Blob([patchedFile], { type: file.type });
saveAs(blob, "efserver." + fileType);
backgroundLog("Saving file...", true);
});
});

46
cli.js Normal file
View File

@ -0,0 +1,46 @@
const { DOMParser } = require("@xmldom/xmldom");
const fs = require("fs/promises");
const EFI = require("./core/core");
async function main() {
const args = process.argv.slice(2);
if (args.includes("/help") || args.length === 0) {
console.log("***************************");
console.log("* EaglerForgeInjector CLI *");
console.log("***************************");
console.log("");
console.log("> npm run efi /help #shows this help text");
console.log("> npm run efi my_unminified_file.html #does nothing");
console.log("> npm run efi my_unminified_file.html /eaglerforge #injects eaglerforge");
console.log("> npm run efi my_unminified_file.html /minify #minifies file");
console.log("> npm run efi my_unminified_file.html /minify /minify_extras #minifies file with extra optimisations");
console.log("> npm run efi my_unminified_file.html /eaglerforge /minify #minifies file and injects eaglerforge");
console.log("> npm run efi my_unminified_file.html /server_extras #inject server hosting stuff");
console.log("> npm run efi my_unminified_file.html output.html /eaglerforge /minify #minifies file and injects eaglerforge, write to file named output.html");
console.log("> npm run efi my_unminified_file.html /verbose #much logging");
console.log("By default, output is written to processed.html");
return;
}
const inputFile = args[0];
if (!inputFile) {
return console.error("No file provided!");
}
EFI.conf.doMinify = args.includes("/minify");
EFI.conf.doEaglerforge = args.includes("/eaglerforge");
EFI.conf.doServerExtras = args.includes("/server_extras");
EFI.conf.doMinifyPlus = args.includes("/minify_extras");
EFI.conf.verbose = args.includes("/verbose");
const string = await fs.readFile(inputFile, {encoding: 'utf-8'});
const res = await EFI.patchClient(string, new DOMParser());
if (res) {
var output = args[1];
if (!output || !output.endsWith(".html")) {
output = "processed.html";
}
console.log("Writing to " + output);
await fs.writeFile(output, res);
console.log("Done!");
}
}
main();

View File

@ -1,13 +1,44 @@
globalThis.ModAPIVersion = "v2.7.3";
globalThis.doEaglerforge = true;
document.querySelector("title").innerText = `EaglerForge Injector ${ModAPIVersion}`;
document.querySelector("h1").innerText = `EaglerForge Injector ${ModAPIVersion}`;
var modapi_preinit = `globalThis.ModAPI ||= {};
ModAPI.hooks ||= {};
ModAPI.hooks.freezeCallstack = false;
ModAPI.hooks._rippedData ||= [];
ModAPI.hooks._rippedInterfaceMap ||= {};
ModAPI.hooks._teavm ||= {};
ModAPI.hooks._rippedConstructors ||= {};
ModAPI.hooks._rippedInternalConstructors ||= {};
ModAPI.hooks.methods ||= {};
ModAPI.hooks._rippedMethodTypeMap ||= {};
ModAPI.hooks._postInit ||= ()=>{};
ModAPI.hooks._rippedStaticProperties ||= {};
ModAPI.hooks._rippedStaticIndexer ||= {};
`;
var freezeCallstack = `if(ModAPI.hooks.freezeCallstack){return false};`;
const EFIConfig = {
ModAPIVersion: "v2.7.3",
doEaglerforge: true,
verbose: false,
doServerExtras: false,
doMinify: false,
doMinifyPlus: false
}
if (globalThis.process) {
var backgroundLog = (x) => {
if (EFIConfig.verbose) {
console.log(x);
}
};
var alert = console.error;
var confirm = console.warn;
}
function wait(ms) {
return new Promise((resolve, reject) => {
setTimeout(() => { resolve(); }, ms);
});
}
function _status(x) {
if (globalThis.process) {
return console.log(x);
}
backgroundLog(x, true);
document.querySelector("#status").innerText = x;
}
@ -73,7 +104,15 @@ function entriesToStaticVariableProxy(entries, prefix, clinitList) {
});`;
return proxy;
}
async function processClasses(string) {
async function processClasses(string, parser) {
if (globalThis.process) {
var { modapi_guikit } = require("./modgui");
var { modapi_postinit } = require("./postinit");
var { modapi_modloader } = require("./modloader");
var { PatchesRegistry } = require("./patches");
var { EFServer } = require("./efserver");
var { minify } = require("./minify");
}
if (string.includes("__eaglerforgeinjector_installation_flag__")) {
backgroundLog("Detected input containing EFI installation flag.", true);
return alert("this file already has EaglerForge injected in it, you nonce.\nif you're trying to update, you need a vanilla file.")
@ -82,11 +121,14 @@ async function processClasses(string) {
backgroundLog("Detected invalid input.\nPlease ensure file is unsigned, unminified and unobfuscated.", true);
return alert("This file does not match the requirements for EaglerForgeInjector. (not unminified & unobfuscated). Check info.")
}
if (globalThis.doShronk) {
if (!confirm("The minify step is extremely slow, especially on lower-end devices, and can take upwards of 15 minutes.")) {
if (EFIConfig.doMinify) {
if (!confirm("The minify step is extremely slow, especially on lower-end devices, and can take upwards of 15 minutes.") && !module) {
return;
}
backgroundLog("[MINIFY] Minify warning bypassed.");
if (globalThis.process) {
await wait(1000);
}
}
_status("Beginning patch process...");
await wait(50);
@ -308,11 +350,11 @@ var main;(function(){`
await wait(50);
patchedFile = PatchesRegistry.patchFile(patchedFile);
if (globalThis.doShronk) {
if (EFIConfig.doMinify) {
_status("Shrinking file...");
await wait(50);
patchedFile = await shronk(patchedFile);
patchedFile = await minify(patchedFile, parser, EFIConfig);
}
@ -322,15 +364,15 @@ var main;(function(){`
` id="game_frame">`,
` id="game_frame">
\<script id="modapi_patchesreg_events"\>${PatchesRegistry.getEventInjectorCode()};\<\/script\>
\<script id="modapi_postinit"\>${globalThis.modapi_postinit.replace("__modapi_version_code__", ModAPIVersion)}\<\/script\>
\<script id="modapi_modloader"\>${globalThis.modapi_modloader}\<\/script\>
\<script id="modapi_guikit"\>${globalThis.modapi_guikit}\<\/script\>
\<script id="modapi_postinit_data"\>globalThis.modapi_postinit = \`${globalThis.modapi_postinit.replaceAll("\\", "\\\\")}\`\<\/script\>
\<script id="modapi_postinit"\>${modapi_postinit.replace("__modapi_version_code__", EFIConfig.ModAPIVersion)}\<\/script\>
\<script id="modapi_modloader"\>${modapi_modloader}\<\/script\>
\<script id="modapi_guikit"\>${modapi_guikit}\<\/script\>
\<script id="modapi_postinit_data"\>globalThis.modapi_postinit = \`${modapi_postinit.replaceAll("\\", "\\\\")}\`\<\/script\>
\<script id="libserverside"\>{"._|_libserverside_|_."}\<\/script\>
\<script id="__eaglerforgeinjector_installation_flag__"\>console.log("Thank you for using EaglerForge!");\<\/script\>`
);
backgroundLog("[HTML] Injecting script files");
patchedFile = patchedFile.replace(`<title>EaglercraftX`, `<title>EFI ${globalThis.ModAPIVersion} on`);
patchedFile = patchedFile.replace(`<title>EaglercraftX`, `<title>EFI ${EFIConfig.ModAPIVersion} on`);
backgroundLog("[HTML] Injecting title");
patchedFile = patchedFile.replaceAll(/main\(\);\s*?}/gm, (match) => {
return match.replace("main();", "main();ModAPI.hooks._postInit();");
@ -341,62 +383,35 @@ var main;(function(){`
await wait(50);
return patchedFile;
}
async function patchClient(string, parser) {
var patchedFile = string;
if (EFIConfig.doEaglerforge) {
patchedFile = await processClasses(patchedFile, parser);
} else if (EFIConfig.doMinify) {
patchedFile = await minify(patchedFile, parser, EFIConfig);
}
document.querySelector("#giveme").addEventListener("click", () => {
if (
!document.querySelector("input").files ||
!document.querySelector("input").files[0]
) {
if (!patchedFile) {
return;
}
// @type File
var file = document.querySelector("input").files[0];
var fileType = file.name.split(".");
fileType = fileType[fileType.length - 1];
file.text().then(async (string) => {
var patchedFile = string;
if (globalThis.doEaglerforge) {
patchedFile = await processClasses(patchedFile);
} else if (globalThis.doShronk) {
patchedFile = await shronk(patchedFile);
if (EFIConfig.doServerExtras) {
if (!EFServer) {
var { EFServer } = require("./efserver");
}
patchedFile.replace(`{"._|_libserverside_|_."}`, "");
var blob = new Blob([patchedFile], { type: file.type });
saveAs(blob, "processed." + fileType);
backgroundLog("Saving file...", true);
});
});
document.querySelector("#givemeserver").addEventListener("click", () => {
if (
!document.querySelector("input").files ||
!document.querySelector("input").files[0]
) {
return;
}
// @type File
var file = document.querySelector("input").files[0];
var fileType = file.name.split(".");
fileType = fileType[fileType.length - 1];
file.text().then(async (string) => {
var patchedFile = string;
if (globalThis.doEaglerforge) {
patchedFile = await processClasses(patchedFile);
} else if (globalThis.doShronk) {
patchedFile = await shronk(patchedFile);
}
patchedFile = patchedFile.replace(`{"._|_libserverside_|_."}`, `(${EFServer.toString()})()`);
backgroundLog("[EFSERVER] Injecting libserverside corelib");
patchedFile = patchedFile.replace("<title>EFI", "<title>EF Server");
backgroundLog("[EFSERVER] Patching title");
var blob = new Blob([patchedFile], { type: file.type });
saveAs(blob, "efserver." + fileType);
backgroundLog("Saving file...", true);
});
});
} else {
patchedFile.replace(`{"._|_libserverside_|_."}`, "");
}
return patchedFile;
}
if (globalThis.process) {
module.exports = {
patchClient: patchClient,
conf: EFIConfig
}
}

View File

@ -281,4 +281,10 @@ function EFServer() {
// disable rendering
ModAPI.hooks.methods.nmcr_EntityRenderer_renderWorld = () => { };
}
if (globalThis.process) {
module.exports = {
EFServer: EFServer
}
}

View File

@ -1,3 +1,11 @@
if (!globalThis.Babel) {
globalThis.Babel = require("@babel/core");
}
function wait(ms) {
return new Promise((resolve, reject) => {
setTimeout(() => { resolve(); }, ms);
});
}
const MINIFY = function () {
return {
visitor: {
@ -15,11 +23,13 @@ const MINIFY = function () {
}
};
};
async function shronk(input) {
async function minify(input, parser, EFIConfig) {
if (globalThis.process) {
var _status = console.log;
}
let isHtml = true;
let inputHtml = input;
// Check if the input is raw JavaScript
if (!input.trim().startsWith('<')) {
isHtml = false;
inputHtml = `<script>${input}</script>`;
@ -27,10 +37,9 @@ async function shronk(input) {
_status("[MINIFY] Parsing html...");
await wait(50);
const parser = new DOMParser();
const doc = parser.parseFromString(inputHtml, 'text/html');
const scriptTags = doc.querySelectorAll('script');
await wait(100); //trying to get chrome to gc
const scriptTags = doc.getElementsByTagName('script');
await wait(200); //trying to get chrome to gc
for (let i = 0; i < scriptTags.length; i++) {
const scriptTag = scriptTags[i];
const code = scriptTag.textContent;
@ -39,7 +48,7 @@ async function shronk(input) {
const output = Babel.transform(code, {
plugins: globalThis.doShronkPlus ? [
plugins: EFIConfig.doMinifyPlus ? [
MINIFY()
] : []
});
@ -51,8 +60,14 @@ async function shronk(input) {
await wait(50);
if (isHtml) {
return doc.documentElement.outerHTML;
return globalThis.process ? doc.toString() : doc.documentElement.outerHTML;
} else {
return doc.querySelector('script').textContent;
}
}
if (globalThis.process) {
module.exports = {
minify: minify
}
}

View File

@ -1,5 +1,5 @@
globalThis.modapi_guikit = "(" + (() => {
const modapi_guikit = "(" + (() => {
// ModAPI GUI made by TheIdiotPlays
// https://github.com/TheIdiotPlays
var splashes = [
@ -316,4 +316,10 @@ globalThis.modapi_guikit = "(" + (() => {
});
f.click();
}
}).toString() + ")();";
}).toString() + ")();";
if (globalThis.process) {
module.exports = {
modapi_guikit: modapi_guikit
}
}

View File

@ -1,4 +1,4 @@
globalThis.modapi_modloader = "(" + (() => {
const modapi_modloader = "(" + (() => {
globalThis.promisifyIDBRequest = function promisifyIDBRequest(request) {
return new Promise((resolve, reject) => {
request.onsuccess = () => resolve(request.result);
@ -252,4 +252,10 @@ globalThis.modapi_modloader = "(" + (() => {
return totalLoaded;
};
};
}).toString() + ")();"
}).toString() + ")();"
if (globalThis.process) {
module.exports = {
modapi_modloader: modapi_modloader
}
}

View File

@ -35,4 +35,10 @@ PatchesRegistry.addPatch(function (input) {
if (!$this.$renderHand)`
);
return output;
});
});
if (globalThis.process) {
module.exports = {
PatchesRegistry: PatchesRegistry
}
}

View File

@ -1,4 +1,4 @@
globalThis.modapi_postinit = "(" + (() => {
const modapi_postinit = "(" + (() => {
//EaglerForge post initialization code.
//This script cannot contain backticks, escape characters, or backslashes in order to inject into the dedicated server code.
var startedModLoader = false;
@ -1187,3 +1187,9 @@ globalThis.modapi_postinit = "(" + (() => {
return qhash(entity, values, 127);
}
}).toString() + ")();";
if (globalThis.process) {
module.exports = {
modapi_postinit: modapi_postinit
}
}

View File

@ -91,11 +91,11 @@
>
<br />
<span>
<label>Minify:&nbsp;</label><input type="checkbox" oninput="globalThis.doShronk = this.checked">
<label>Minify:&nbsp;</label><input type="checkbox" oninput="EFIConfig.doMinify = this.checked">
&nbsp;&nbsp;&nbsp;
<label>MinifyExtras:&nbsp;</label><input type="checkbox" oninput="globalThis.doShronkPlus = this.checked">
<label>MinifyExtras:&nbsp;</label><input type="checkbox" oninput="EFIConfig.doMinifyPlus = this.checked">
&nbsp;&nbsp;&nbsp;
<label>EaglerForge:&nbsp;</label><input checked type="checkbox" oninput="globalThis.doEaglerforge = this.checked">
<label>EaglerForge:&nbsp;</label><input checked type="checkbox" oninput="EFIConfig.doEaglerforge = this.checked">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code id="status">Awaiting input...</code></span>
<br /><br />
<button class="btn btn-primary" id="giveme">Make modded client</button>
@ -151,31 +151,16 @@
e.target.files[0].name;
}
});
var modapi_preinit = `globalThis.ModAPI ||= {};
ModAPI.hooks ||= {};
ModAPI.hooks.freezeCallstack = false;
ModAPI.hooks._rippedData ||= [];
ModAPI.hooks._rippedInterfaceMap ||= {};
ModAPI.hooks._teavm ||= {};
ModAPI.hooks._rippedConstructors ||= {};
ModAPI.hooks._rippedInternalConstructors ||= {};
ModAPI.hooks.methods ||= {};
ModAPI.hooks._rippedMethodTypeMap ||= {};
ModAPI.hooks._postInit ||= ()=>{};
ModAPI.hooks._rippedStaticProperties ||= {};
ModAPI.hooks._rippedStaticIndexer ||= {};
`;
var freezeCallstack = `if(ModAPI.hooks.freezeCallstack){return false};`;
</script>
<script src="backgroundLogger.js"></script>
<script src="patches.js"></script>
<script src="injector.minify.js"></script>
<script src="injector.js"></script>
<!-- Code assets -->
<script src="postinit.js"></script>
<script src="modloader.js"></script>
<script src="modgui.js"></script>
<script src="efserver.js"></script>
<script src="core/postinit.js"></script>
<script src="core/modloader.js"></script>
<script src="core/modgui.js"></script>
<script src="core/efserver.js"></script>
<script src="core/core.js"></script>
<script src="backgroundLogger.js"></script>
<script src="browser.js"></script>
</body>
</html>

475
package-lock.json generated Normal file
View File

@ -0,0 +1,475 @@
{
"name": "eaglerforgeinjector",
"version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "eaglerforgeinjector",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.26.10"
},
"devDependencies": {
"@xmldom/xmldom": "^0.9.8"
}
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
"integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.24"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@babel/code-frame": {
"version": "7.26.2",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
"integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
"dependencies": {
"@babel/helper-validator-identifier": "^7.25.9",
"js-tokens": "^4.0.0",
"picocolors": "^1.0.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/compat-data": {
"version": "7.26.8",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz",
"integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
"version": "7.26.10",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz",
"integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==",
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.26.2",
"@babel/generator": "^7.26.10",
"@babel/helper-compilation-targets": "^7.26.5",
"@babel/helper-module-transforms": "^7.26.0",
"@babel/helpers": "^7.26.10",
"@babel/parser": "^7.26.10",
"@babel/template": "^7.26.9",
"@babel/traverse": "^7.26.10",
"@babel/types": "^7.26.10",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/babel"
}
},
"node_modules/@babel/generator": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz",
"integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==",
"dependencies": {
"@babel/parser": "^7.27.0",
"@babel/types": "^7.27.0",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
"jsesc": "^3.0.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-compilation-targets": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz",
"integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==",
"dependencies": {
"@babel/compat-data": "^7.26.8",
"@babel/helper-validator-option": "^7.25.9",
"browserslist": "^4.24.0",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-imports": {
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz",
"integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==",
"dependencies": {
"@babel/traverse": "^7.25.9",
"@babel/types": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-transforms": {
"version": "7.26.0",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz",
"integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==",
"dependencies": {
"@babel/helper-module-imports": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9",
"@babel/traverse": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-option": {
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz",
"integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helpers": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz",
"integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==",
"dependencies": {
"@babel/template": "^7.27.0",
"@babel/types": "^7.27.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/parser": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz",
"integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==",
"dependencies": {
"@babel/types": "^7.27.0"
},
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@babel/template": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz",
"integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==",
"dependencies": {
"@babel/code-frame": "^7.26.2",
"@babel/parser": "^7.27.0",
"@babel/types": "^7.27.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz",
"integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==",
"dependencies": {
"@babel/code-frame": "^7.26.2",
"@babel/generator": "^7.27.0",
"@babel/parser": "^7.27.0",
"@babel/template": "^7.27.0",
"@babel/types": "^7.27.0",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/types": {
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz",
"integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==",
"dependencies": {
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dependencies": {
"@jridgewell/set-array": "^1.2.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.24"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/set-array": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.25",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.9.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.8.tgz",
"integrity": "sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A==",
"dev": true,
"engines": {
"node": ">=14.6"
}
},
"node_modules/browserslist": {
"version": "4.24.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
"integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"caniuse-lite": "^1.0.30001688",
"electron-to-chromium": "^1.5.73",
"node-releases": "^2.0.19",
"update-browserslist-db": "^1.1.1"
},
"bin": {
"browserslist": "cli.js"
},
"engines": {
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001713",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz",
"integrity": "sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="
},
"node_modules/debug": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.136",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.136.tgz",
"integrity": "sha512-kL4+wUTD7RSA5FHx5YwWtjDnEEkIIikFgWHR4P6fqjw1PPLlqYkxeOb++wAauAssat0YClCy8Y3C5SxgSkjibQ=="
},
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"engines": {
"node": ">=6"
}
},
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"engines": {
"node": ">=4"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/jsesc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
"node": ">=6"
}
},
"node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"dependencies": {
"yallist": "^3.0.2"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/node-releases": {
"version": "2.0.19",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="
},
"node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/update-browserslist-db": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"escalade": "^3.2.0",
"picocolors": "^1.1.1"
},
"bin": {
"update-browserslist-db": "cli.js"
},
"peerDependencies": {
"browserslist": ">= 4.21.0"
}
},
"node_modules/yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
}

20
package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "eaglerforgeinjector",
"version": "0.0.0",
"description": "Advanced modding API injector for unminified, unobfuscated, unsigned eaglercraft builds.",
"main": "node.js",
"directories": {
"doc": "docs"
},
"scripts": {
"efi": "node --max-old-space-size=16384 cli.js"
},
"author": "EaglerForge Team",
"license": "MIT",
"devDependencies": {
"@xmldom/xmldom": "^0.9.8"
},
"dependencies": {
"@babel/core": "^7.26.10"
}
}