steamutils 1.4.72 → 1.4.74
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +3071 -3063
- package/create_remote_file.js +74 -66
- package/index.js +8 -0
- package/package.json +4 -4
- package/remote.js +8378 -6784
package/create_remote_file.js
CHANGED
@@ -1,66 +1,74 @@
|
|
1
|
-
import SteamUser from "./index.js";
|
2
|
-
import _ from "lodash";
|
3
|
-
|
4
|
-
(async function () {
|
5
|
-
const xx = SteamUser;
|
6
|
-
|
7
|
-
let json = "";
|
8
|
-
|
9
|
-
function doWrite(user, is_static) {
|
10
|
-
for (const methodName of Object.getOwnPropertyNames(user)) {
|
11
|
-
if (methodName === "constructor" || methodName === "length" || methodName === "name" || methodName === "prototype" || methodName === "RequestXML_TooManyRequests" || methodName === "MAX_RETRY") {
|
12
|
-
continue;
|
13
|
-
}
|
14
|
-
const fnString = user[methodName].toString().trim();
|
15
|
-
const async = "async";
|
16
|
-
// const async = fnString.startsWith("async") ? "async" : "";
|
17
|
-
let params = fnString.split("(")[1].split(")")[0];
|
18
|
-
const paramsList = params.split(",");
|
19
|
-
for (let i = 0; i < paramsList.length; i++) {
|
20
|
-
if (paramsList[i].includes("=")) {
|
21
|
-
paramsList[i] = paramsList[i].split("=")[0].trim();
|
22
|
-
}
|
23
|
-
}
|
24
|
-
params = paramsList.join(", ").trim();
|
25
|
-
if (params.startsWith("{") && !params.endsWith("}")) {
|
26
|
-
params = `${params}}`;
|
27
|
-
}
|
28
|
-
|
29
|
-
json += `${`
|
30
|
-
${is_static ? "static " : ""} ${async} ${methodName}(${params}){
|
31
|
-
const __params = [${params}];
|
32
|
-
if(__params.length === 1 && __params[0] === undefined){
|
33
|
-
__params.length = 0
|
34
|
-
}
|
35
|
-
let __cookies = this._cookies;
|
36
|
-
if (__cookies) {
|
37
|
-
if (!Array.isArray(__cookies)) {
|
38
|
-
__cookies = [__cookies];
|
39
|
-
}
|
40
|
-
__cookies = __cookies.map(function (cookie) {
|
41
|
-
return cookie.toString();
|
42
|
-
});
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
1
|
+
import SteamUser from "./index.js";
|
2
|
+
import _ from "lodash";
|
3
|
+
|
4
|
+
(async function () {
|
5
|
+
const xx = SteamUser;
|
6
|
+
|
7
|
+
let json = "";
|
8
|
+
|
9
|
+
function doWrite(user, is_static) {
|
10
|
+
for (const methodName of Object.getOwnPropertyNames(user)) {
|
11
|
+
if (methodName === "constructor" || methodName === "length" || methodName === "name" || methodName === "prototype" || methodName === "RequestXML_TooManyRequests" || methodName === "MAX_RETRY") {
|
12
|
+
continue;
|
13
|
+
}
|
14
|
+
const fnString = user[methodName].toString().trim();
|
15
|
+
const async = "async";
|
16
|
+
// const async = fnString.startsWith("async") ? "async" : "";
|
17
|
+
let params = fnString.split("(")[1].split(")")[0];
|
18
|
+
const paramsList = params.split(",");
|
19
|
+
for (let i = 0; i < paramsList.length; i++) {
|
20
|
+
if (paramsList[i].includes("=")) {
|
21
|
+
paramsList[i] = paramsList[i].split("=")[0].trim();
|
22
|
+
}
|
23
|
+
}
|
24
|
+
params = paramsList.join(", ").trim();
|
25
|
+
if (params.startsWith("{") && !params.endsWith("}")) {
|
26
|
+
params = `${params}}`;
|
27
|
+
}
|
28
|
+
|
29
|
+
json += `${`
|
30
|
+
${is_static ? "static " : ""} ${async} ${methodName}(${params}){
|
31
|
+
const __params = [${params}];
|
32
|
+
if(__params.length === 1 && __params[0] === undefined){
|
33
|
+
__params.length = 0
|
34
|
+
}
|
35
|
+
let __cookies = this._cookies;
|
36
|
+
if (__cookies) {
|
37
|
+
if (!Array.isArray(__cookies)) {
|
38
|
+
__cookies = [__cookies];
|
39
|
+
}
|
40
|
+
__cookies = __cookies.map(function (cookie) {
|
41
|
+
return cookie.toString();
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
for (let i = 0; i < 5; i++) {
|
46
|
+
try {
|
47
|
+
const response = await axios.post(getAppURL(), {
|
48
|
+
method: "${methodName}",
|
49
|
+
params: __params,
|
50
|
+
cookies: __cookies,
|
51
|
+
is_static: ${!!is_static}
|
52
|
+
});
|
53
|
+
|
54
|
+
if (!response || response.error) {
|
55
|
+
if (response?.message) {
|
56
|
+
console.error(response?.message);
|
57
|
+
}
|
58
|
+
continue;
|
59
|
+
}
|
60
|
+
|
61
|
+
return response.data?.result;
|
62
|
+
} catch (e) {
|
63
|
+
/* empty */
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}`.trim()}\n`;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
doWrite(SteamUser.prototype, false);
|
71
|
+
doWrite(SteamUser, true);
|
72
|
+
|
73
|
+
console.log("");
|
74
|
+
})();
|
package/index.js
CHANGED
@@ -5589,6 +5589,7 @@ export default class SteamUser {
|
|
5589
5589
|
"Sticker removed",
|
5590
5590
|
"Subscription/Seasonal Item Grant",
|
5591
5591
|
"Earned from unlocking an achievement",
|
5592
|
+
"Moved to Storage Unit",
|
5592
5593
|
];
|
5593
5594
|
|
5594
5595
|
const peopleEl = tradehistory_event_description_el.find("a[href]");
|
@@ -7110,6 +7111,13 @@ export default class SteamUser {
|
|
7110
7111
|
return result;
|
7111
7112
|
}
|
7112
7113
|
|
7114
|
+
try {
|
7115
|
+
new SteamProto(SteamProtoType.CPlayer_GetFriendsGameplayInfo_Response).protoDecode(result.data);
|
7116
|
+
} catch (e) {
|
7117
|
+
console.error(e);
|
7118
|
+
console.error(result);
|
7119
|
+
}
|
7120
|
+
|
7113
7121
|
const data = new SteamProto(SteamProtoType.CPlayer_GetFriendsGameplayInfo_Response).protoDecode(result.data);
|
7114
7122
|
if (!data) return;
|
7115
7123
|
const { in_game, played_recently, played_ever, owns, your_info } = data;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "steamutils",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.74",
|
4
4
|
"main": "index.js",
|
5
5
|
"dependencies": {
|
6
6
|
"alpha-common-utils": "^1.0.6",
|
@@ -9,18 +9,18 @@
|
|
9
9
|
"cheerio": "^1.0.0",
|
10
10
|
"crypto-js": "^4.2.0",
|
11
11
|
"csgo-friendcode": "^3.0.3",
|
12
|
-
"form-data": "^4.0.
|
12
|
+
"form-data": "^4.0.1",
|
13
13
|
"jimp": "^1.6.0",
|
14
14
|
"lodash": "^4.17.21",
|
15
15
|
"moment": "^2.30.1",
|
16
|
-
"moment-timezone": "^0.5.
|
16
|
+
"moment-timezone": "^0.5.46",
|
17
17
|
"node-bignumber": "^1.2.2",
|
18
18
|
"protobufjs": "^7.4.0",
|
19
19
|
"qs": "^6.13.0",
|
20
20
|
"steam-session": "^1.9.0",
|
21
21
|
"steam-totp": "^2.1.2",
|
22
22
|
"steam-user": "^5.2.0",
|
23
|
-
"steamcommunity": "^3.48.
|
23
|
+
"steamcommunity": "^3.48.4",
|
24
24
|
"steamid": "^2.1.0",
|
25
25
|
"url-parse": "^1.5.10",
|
26
26
|
"uuid": "^10.0.0",
|