diff --git a/package.json b/package.json index 6731904..05e2cab 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ ] }, "scripts": { - "vscode:prepublish": "npm run compile", + "vscode:prepublish": "npm run compile", "launch": "code --install-extension lua*.*.vsix && code .", "compile": "cp src/utils/*.{json,html} ./dist/ && tsc", "compile-win": "copy src\\utils\\*.json .\\dist\\ && copy src\\utils\\*.html .\\dist\\ && tsc", @@ -125,10 +125,10 @@ "eslint-plugin-prettier": "4.2.1", "glob": "^7.1.6", "mocha": "^10.2.0", + "prettier": "2.8.1", "typescript": "^5.0.4", "vsce": "^2.15.0", - "vscode-test": "^1.3.0", - "prettier": "2.8.1" + "vscode-test": "^1.3.0" }, "__metadata": { "publisherDisplayName": "ferib" diff --git a/src/obfuscate/callObfuscator.ts b/src/obfuscate/callObfuscator.ts index f44f465..66cc021 100644 --- a/src/obfuscate/callObfuscator.ts +++ b/src/obfuscate/callObfuscator.ts @@ -62,7 +62,7 @@ export async function callObfuscator( } const obfsucated: AxiosResponse = await axios - .post(constants.obfuscateUrl + "Obfuscate", config, { + .post(constants.obfuscateUrl + "obfuscate", config, { headers: { "Content-Type": "text/plain", apikey: settings.get("ApiKey"), @@ -91,7 +91,7 @@ export async function callObfuscator( throw Error(); } if (!obfsucated.data || !obfsucated.data.code) { - vscode.window.showErrorMessage("Obfuscation failed!"); + vscode.window.showErrorMessage(`${obfsucated.data.message || "Lua script failed to upload! (unknown error)"}`); throw Error(); } callback(obfsucated.data.code); diff --git a/src/utils/constants.json b/src/utils/constants.json index 3fcb61e..a3c1b49 100644 --- a/src/utils/constants.json +++ b/src/utils/constants.json @@ -1,4 +1,4 @@ { - "obfuscateUrl": "https://luaobfuscator.com/api/obfuscator/", + "obfuscateUrl": "https://api.luaobfuscator.com/v1/obfuscator/", "apiKey":"test" } diff --git a/src/utils/webView.ts b/src/utils/webView.ts index 29c10ca..61cfbe3 100644 --- a/src/utils/webView.ts +++ b/src/utils/webView.ts @@ -3,4 +3,4 @@ import fs from "fs"; export function getWebviewContent() { return fs.readFileSync(__dirname + "/../webView.html", "utf8"); -} +} \ No newline at end of file