Skip to content

Commit

Permalink
2.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Razviar committed Oct 9, 2021
1 parent 2cbab13 commit 9523d42
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 45 deletions.
90 changes: 52 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mtgaprotracker",
"productName": "mtgaprotracker",
"version": "2.2.5",
"version": "2.2.6",
"description": "MTG Arena Pro Tracker",
"main": "./.webpack/main",
"scripts": {
Expand All @@ -26,8 +26,8 @@
"dependencies": {
"@types/find": "0.2.1",
"auto-launch": "5.0.5",
"axios": "0.21.4",
"date-fns": "2.24.0",
"axios": "0.22.0",
"date-fns": "2.25.0",
"electron-is-dev": "2.0.0",
"error-stack-parser": "2.0.6",
"find-process": "1.4.5",
Expand Down Expand Up @@ -56,9 +56,9 @@
"csp-html-webpack-plugin": "5.1.0",
"css-loader": "5.2.6",
"dotenv-webpack": "7.0.3",
"electron": "15.0.0",
"electron": "15.1.2",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "6.3.3",
"fork-ts-checker-webpack-plugin": "6.3.4",
"node-loader": "2.0.0",
"prettier": "2.4.1",
"style-loader": "3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/getindicators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ParsingMetadata} from 'root/app/log-parser/model';
import {Request} from 'root/app/request';

export async function getParsingMetadata(): Promise<ParsingMetadata> {
const res = await Request.get(`/mtg/json/parsing_metadata_new.json`);
const res = await Request.get(`/mtg/json/parsing_metadata_new2.json`);
if (typeof res === 'string') {
throw new Error('Cannot parse remote metadata');
}
Expand Down
6 changes: 5 additions & 1 deletion src/app/log-parser/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,16 @@ export function postProcessEvent(rawEvent: RawLogEvent, options: ParsingMetadata

if (parsingOptions.constraint !== undefined) {
const value = extractValue(rawEvent.data, parsingOptions.constraint.attributesPath);
//console.log(rawEvent.data);
if (Array.isArray(parsingOptions.constraint.value)) {
if (!parsingOptions.constraint.value.includes(value)) {
return [];
}
} else {
if (value !== parsingOptions.constraint.value) {
if (
(parsingOptions.constraint.value !== 'defined' && value !== parsingOptions.constraint.value) ||
(parsingOptions.constraint.value === 'defined' && value === undefined)
) {
return [];
}
}
Expand Down

0 comments on commit 9523d42

Please sign in to comment.