diff --git a/package-lock.json b/package-lock.json index 6d223ec1..4014eefa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "loa-details", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "loa-details", - "version": "1.0.1", + "version": "1.0.2", "hasInstallScript": true, "dependencies": { "@electron/remote": "^2.0.8", @@ -247,9 +247,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -6477,7 +6477,7 @@ }, "node_modules/meter-core": { "version": "0.0.0", - "resolved": "git+ssh://git@github.com/lost-ark-dev/meter-core.git#5ad8018a7ecc2d8ef61c3d694964678de9251566", + "resolved": "git+ssh://git@github.com/lost-ark-dev/meter-core.git#091b061ee2a35ad1fd3d6449e5d5048fea2ea4ba", "dependencies": { "cap": "^0.2.1", "lz4-napi": "^2.2.0", @@ -9743,9 +9743,9 @@ "optional": true }, "@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==" + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==" }, "@develar/schema-utils": { "version": "2.6.5", @@ -14330,7 +14330,7 @@ "dev": true }, "meter-core": { - "version": "git+ssh://git@github.com/lost-ark-dev/meter-core.git#5ad8018a7ecc2d8ef61c3d694964678de9251566", + "version": "git+ssh://git@github.com/lost-ark-dev/meter-core.git#091b061ee2a35ad1fd3d6449e5d5048fea2ea4ba", "from": "meter-core@github:lost-ark-dev/meter-core", "requires": { "cap": "^0.2.1", diff --git a/package.json b/package.json index 27425e69..effcaf0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loa-details", - "version": "1.0.1", + "version": "1.0.2", "description": "Damage meter for Lost Ark", "productName": "LOA Details", "author": "Herysia, Mathicha, Eren Kara ", diff --git a/src-electron/electron-main.ts b/src-electron/electron-main.ts index 5adaa687..488cb090 100644 --- a/src-electron/electron-main.ts +++ b/src-electron/electron-main.ts @@ -230,60 +230,57 @@ function startApplication() { mainWindow = createMainWindow(appSettings); damageMeterWindow = createDamageMeterWindow(logParser, appSettings); - damageMeterWindow.on("ready-to-show", () => { - const xorTable = readFileSync("./meter-data/xor.bin"); - const oodle_state = readFileSync("./meter-data/oodle_state.bin"); - const compressor = new Decompressor(oodle_state, xorTable); - const stream = new PKTStream(compressor); - const capture = new PktCaptureAll(); - capture.on("packet", (buf) => stream.read(buf)); - const meterData = new MeterData(); - meterData.processEnumData( - JSON.parse(readFileSync("./meter-data/databases/Enums.json", "utf-8")) - ); - meterData.processNpcData( - JSON.parse(readFileSync("./meter-data/databases/Npc.json", "utf-8")) - ); - meterData.processPCData( - JSON.parse(readFileSync("./meter-data/databases/PCData.json", "utf-8")) - ); - meterData.processSkillData( - JSON.parse(readFileSync("./meter-data/databases/Skill.json", "utf-8")) - ); - meterData.processSkillBuffData( - JSON.parse(readFileSync("./meter-data/databases/SkillBuff.json", "utf-8")) - ); - meterData.processSkillBuffEffectData( - JSON.parse( - readFileSync("./meter-data/databases/SkillEffect.json", "utf-8") - ) - ); - const padTo2Digits = (num: number) => num.toString().padStart(2, "0"); - - const legacyLogger = new LegacyLogger(stream, meterData); - const date = new Date(); - const filename = - "LostArk_" + - [ - date.getFullYear(), - padTo2Digits(date.getMonth() + 1), - padTo2Digits(date.getDate()), - padTo2Digits(date.getHours()), - padTo2Digits(date.getMinutes()), - padTo2Digits(date.getSeconds()), - ].join("-") + - ".log"; - const logfile = createWriteStream(path.join(mainFolder, filename), { - highWaterMark: 0, - encoding: "utf-8", - }); - //TODO: write version to log? - legacyLogger.on("line", (line) => { - logParser.parseLogLine(line); - logfile?.write(line); - logfile?.write("\n"); - }); + const xorTable = readFileSync("./meter-data/xor.bin"); + const oodle_state = readFileSync("./meter-data/oodle_state.bin"); + const compressor = new Decompressor(oodle_state, xorTable); + const stream = new PKTStream(compressor); + const capture = new PktCaptureAll(); + capture.on("packet", (buf) => stream.read(buf)); + const meterData = new MeterData(); + meterData.processEnumData( + JSON.parse(readFileSync("./meter-data/databases/Enums.json", "utf-8")) + ); + meterData.processNpcData( + JSON.parse(readFileSync("./meter-data/databases/Npc.json", "utf-8")) + ); + meterData.processPCData( + JSON.parse(readFileSync("./meter-data/databases/PCData.json", "utf-8")) + ); + meterData.processSkillData( + JSON.parse(readFileSync("./meter-data/databases/Skill.json", "utf-8")) + ); + meterData.processSkillBuffData( + JSON.parse(readFileSync("./meter-data/databases/SkillBuff.json", "utf-8")) + ); + meterData.processSkillBuffEffectData( + JSON.parse(readFileSync("./meter-data/databases/SkillEffect.json", "utf-8")) + ); + const padTo2Digits = (num: number) => num.toString().padStart(2, "0"); + + const legacyLogger = new LegacyLogger(stream, meterData); + const date = new Date(); + const filename = + "LostArk_" + + [ + date.getFullYear(), + padTo2Digits(date.getMonth() + 1), + padTo2Digits(date.getDate()), + padTo2Digits(date.getHours()), + padTo2Digits(date.getMinutes()), + padTo2Digits(date.getSeconds()), + ].join("-") + + ".log"; + const logfile = createWriteStream(path.join(mainFolder, filename), { + highWaterMark: 0, + encoding: "utf-8", + }); + //TODO: write version to log? + + legacyLogger.on("line", (line) => { + logParser.parseLogLine(line); + logfile?.write(line); + logfile?.write("\n"); }); initializeShortcuts(appSettings); diff --git a/src-electron/electron-windows/damage-meter-window.ts b/src-electron/electron-windows/damage-meter-window.ts index 1a7e0e84..17009b35 100644 --- a/src-electron/electron-windows/damage-meter-window.ts +++ b/src-electron/electron-windows/damage-meter-window.ts @@ -29,7 +29,6 @@ export function createDamageMeterWindow( webPreferences: { devTools: process.env.DEBUGGING, contextIsolation: true, - sandbox: false, preload: path.resolve(__dirname, process.env.QUASAR_ELECTRON_PRELOAD), }, }); diff --git a/src-electron/electron-windows/main-window.ts b/src-electron/electron-windows/main-window.ts index 0698d3dd..a3509a0a 100644 --- a/src-electron/electron-windows/main-window.ts +++ b/src-electron/electron-windows/main-window.ts @@ -22,7 +22,6 @@ export function createMainWindow(appSettings: Settings) { webPreferences: { devTools: process.env.DEBUGGING, contextIsolation: true, - sandbox: false, // More info: /quasar-cli/developing-electron-apps/electron-preload-script preload: path.resolve(__dirname, process.env.QUASAR_ELECTRON_PRELOAD), },