steamutils 1.4.30 → 1.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SteamClient.js +7 -0
- package/axios.js +59 -66
- package/index.js +7785 -7791
- package/package.json +8 -8
- package/utils.js +12 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steamutils",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.32",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"alpha-common-utils": "^1.0.6",
|
|
7
|
-
"axios": "^1.
|
|
7
|
+
"axios": "^1.7.3",
|
|
8
8
|
"bytebuffer": "^5.0.1",
|
|
9
|
-
"cheerio": "^1.0.0
|
|
9
|
+
"cheerio": "^1.0.0",
|
|
10
10
|
"crypto-js": "^4.2.0",
|
|
11
11
|
"csgo-friendcode": "^3.0.3",
|
|
12
12
|
"form-data": "^4.0.0",
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"moment": "^2.30.1",
|
|
16
16
|
"moment-timezone": "^0.5.45",
|
|
17
17
|
"node-bignumber": "^1.2.2",
|
|
18
|
-
"qs": "^6.
|
|
18
|
+
"qs": "^6.13.0",
|
|
19
19
|
"steam-session": "^1.7.2",
|
|
20
20
|
"steam-totp": "^2.1.2",
|
|
21
|
-
"steam-user": "^5.0.
|
|
22
|
-
"steamcommunity": "^3.48.
|
|
21
|
+
"steam-user": "^5.0.10",
|
|
22
|
+
"steamcommunity": "^3.48.3",
|
|
23
23
|
"steamid": "^2.0.0",
|
|
24
24
|
"url-parse": "^1.5.10",
|
|
25
|
-
"uuid": "^
|
|
25
|
+
"uuid": "^10.0.0",
|
|
26
26
|
"xml-js": "^1.6.11",
|
|
27
27
|
"xml2js": "^0.6.2"
|
|
28
28
|
},
|
|
29
29
|
"type": "module",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"eslint-config-prettier": "^9.1.0",
|
|
32
|
-
"eslint-plugin-prettier": "^5.1
|
|
32
|
+
"eslint-plugin-prettier": "^5.2.1"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/utils.js
CHANGED
|
@@ -180,7 +180,7 @@ export function decodeJwt(jwt) {
|
|
|
180
180
|
const standardBase64 = parts[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
181
181
|
return JSON.parse(Buffer.from(standardBase64, "base64").toString("utf8"));
|
|
182
182
|
} catch (e) {
|
|
183
|
-
console.
|
|
183
|
+
console.error("decodeJwt Error", e);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -236,3 +236,14 @@ export async function approveLogin({ steamId, url, sharedSecret, accessToken, sh
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
+
|
|
240
|
+
export function getBonusXpTimeRefresh() {
|
|
241
|
+
let resetDay = moment.utc().startOf("isoWeek").add(2, "days").add(1, "hours");
|
|
242
|
+
while (moment().isAfter(resetDay)) {
|
|
243
|
+
resetDay = resetDay.add(7, "days");
|
|
244
|
+
}
|
|
245
|
+
if (moment().isBefore(resetDay)) {
|
|
246
|
+
resetDay = resetDay.subtract(7, "days");
|
|
247
|
+
}
|
|
248
|
+
return resetDay;
|
|
249
|
+
}
|