Skip to content

Commit

Permalink
update vdf parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Jan 21, 2025
1 parent 8d5a7ec commit 2efa6e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"pg-query-stream": "^4.7.1",
"pm2": "^5.4.3",
"protobufjs": "^7.2.5",
"simple-vdf": "^1.1.1",
"steam-user": "^5.2.0",
"stripe": "^9.16.0",
"vdf-parser": "^1.2.1",
"ws": "^8.18.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions svc/cosmetics.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Updates game cosmetic items in the database
import vdf from 'simple-vdf';
import vdfparser from 'vdf-parser';
import db from '../store/db';
import { upsert } from '../util/insert';
import { invokeIntervalAsync } from '../util/utility';
Expand All @@ -15,7 +15,7 @@ async function doCosmetics() {
'https://raw.githubusercontent.com/builder-247/node-dota2-cdn/main/build/icons.json',
);
const icons = iconsResp.data;
const itemData = vdf.parse(items);
const itemData = vdfparser.parse<any>(items);

async function processItem(itemId: string) {
const item = itemData.items_game.items[itemId];
Expand Down

0 comments on commit 2efa6e2

Please sign in to comment.