steamutils 1.3.49 → 1.3.51

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +8 -8
  2. package/package.json +4 -4
package/SteamClient.js CHANGED
@@ -2300,12 +2300,12 @@ SteamClient.isAccountPlayable = async function isAccountPlayable(params, timeout
2300
2300
  params.clientJsToken = await new SteamUser(typeof params.cookie === "function" ? await params.cookie() : params.cookie).getClientJsToken();
2301
2301
  }
2302
2302
  if (params.clientJsToken?.logged_in !== true) {
2303
- return false;
2303
+ return { invalidClientJsToken: true };
2304
2304
  }
2305
2305
  return await new Promise((resolve) => {
2306
2306
  const timeouts = [
2307
2307
  setTimeout(() => {
2308
- doResolve();
2308
+ doResolve({ timedOut: true });
2309
2309
  }, timeoutMs || 30000),
2310
2310
  ];
2311
2311
 
@@ -2320,25 +2320,25 @@ SteamClient.isAccountPlayable = async function isAccountPlayable(params, timeout
2320
2320
  });
2321
2321
 
2322
2322
  steamClient.onEvent("error", ({ eresult, msg, error }) => {
2323
- doResolve();
2323
+ doResolve({ eresult, msg, error });
2324
2324
  });
2325
2325
 
2326
2326
  steamClient.onEvent("csgoOnline", (ClientWelcome) => {
2327
- doResolve(ClientWelcome);
2327
+ doResolve({ playable: true });
2328
2328
  });
2329
2329
 
2330
2330
  steamClient.onEvent("csgoClientHello", (ClientHello) => {
2331
- doResolve(ClientHello);
2331
+ doResolve({ playable: true });
2332
2332
  });
2333
2333
 
2334
2334
  steamClient.onEvent("playingState", ({ playing_blocked, playing_app }) => {
2335
2335
  if (playing_blocked) {
2336
- doResolve();
2336
+ doResolve({ playable: false });
2337
2337
  } else {
2338
2338
  timeouts.push(
2339
2339
  setTimeout(function () {
2340
2340
  const isBlocked = steamClient.isPlayingBlocked();
2341
- doResolve(!isBlocked);
2341
+ doResolve({ playable: !isBlocked });
2342
2342
  }, 5000),
2343
2343
  );
2344
2344
  }
@@ -2355,7 +2355,7 @@ SteamClient.isAccountPlayable = async function isAccountPlayable(params, timeout
2355
2355
  steamClient.doClearIntervals();
2356
2356
  steamClient.offAllEvent();
2357
2357
  steamClient.logOff();
2358
- return resolve(!!data);
2358
+ return resolve(data);
2359
2359
  }
2360
2360
  });
2361
2361
  };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.49",
3
+ "version": "1.3.51",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.5",
7
- "axios": "^1.6.5",
7
+ "axios": "^1.6.7",
8
8
  "bytebuffer": "^5.0.1",
9
9
  "cheerio": "^1.0.0-rc.12",
10
10
  "crypto-js": "^4.2.0",
@@ -13,10 +13,10 @@
13
13
  "jimp": "^0.22.10",
14
14
  "lodash": "^4.17.21",
15
15
  "moment": "^2.30.1",
16
- "moment-timezone": "^0.5.44",
16
+ "moment-timezone": "^0.5.45",
17
17
  "node-bignumber": "^1.2.2",
18
18
  "steam-session": "^1.7.2",
19
- "steam-user": "^5.0.7",
19
+ "steam-user": "^5.0.8",
20
20
  "steamcommunity": "^3.48.2",
21
21
  "steamid": "^2.0.0",
22
22
  "url-parse": "^1.5.10",