steamutils 1.2.19 → 1.2.21
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +2 -2
- package/index.js +27 -1
- package/package.json +1 -1
- package/.idea/deployment.xml +0 -21
package/.idea/steamutils.iml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager">
|
4
4
|
<content url="file://$MODULE_DIR$">
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
8
|
</content>
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/SteamClient.js
CHANGED
@@ -385,7 +385,7 @@ function SteamClient({
|
|
385
385
|
|
386
386
|
callEvent(events.disconnected, {eresult, msg})
|
387
387
|
|
388
|
-
if (
|
388
|
+
if (['ServiceUnavailable', 'NoConnection'].includes(msg) && autoReconnect && !isLogOff) {
|
389
389
|
async function relogin(retry) {
|
390
390
|
if (retry <= 0) {
|
391
391
|
console.error("Cannot relogin")
|
@@ -411,7 +411,7 @@ function SteamClient({
|
|
411
411
|
}
|
412
412
|
|
413
413
|
await sleep(60000)
|
414
|
-
const isSuccess = await relogin(
|
414
|
+
const isSuccess = await relogin(50)
|
415
415
|
if (!isSuccess) {
|
416
416
|
doClearIntervals()
|
417
417
|
}
|
package/index.js
CHANGED
@@ -5579,6 +5579,9 @@ class SteamUser {
|
|
5579
5579
|
case "Earned an item due to ownership of another game": {
|
5580
5580
|
break
|
5581
5581
|
}
|
5582
|
+
case "Sticker applied": {
|
5583
|
+
break
|
5584
|
+
}
|
5582
5585
|
default: {
|
5583
5586
|
if (description.startsWith("You traded with ")) {
|
5584
5587
|
const peopleEl = tradehistory_event_description_el.find('a[href]')
|
@@ -5604,9 +5607,12 @@ class SteamUser {
|
|
5604
5607
|
} else if (description.startsWith("You listed an item on the Community Market. The listing was placed on hold until")) {
|
5605
5608
|
//You listed an item on the Community Market. The listing was placed on hold until 24 Jan @ 3:06am.
|
5606
5609
|
description = "You listed an item on the Community Market. The listing was placed on hold until"
|
5607
|
-
}
|
5610
|
+
} else if (description.startsWith("Earned in ")) {
|
5608
5611
|
//Earned in PUBG: BATTLEGROUNDS
|
5609
5612
|
description = "Earned in game"
|
5613
|
+
} else if (description.startsWith("Refunded a gift because the recipient,") && description.startsWith("declined")) {
|
5614
|
+
//Refunded a gift because the recipient, Ava, declined
|
5615
|
+
description = "Refunded a gift because the recipient declined"
|
5610
5616
|
} else {
|
5611
5617
|
console.log(description);
|
5612
5618
|
}
|
@@ -5954,6 +5960,26 @@ class SteamUser {
|
|
5954
5960
|
const example = {
|
5955
5961
|
}
|
5956
5962
|
}
|
5963
|
+
|
5964
|
+
async getMarketUnavailable(){
|
5965
|
+
const response = (await this._httpRequest({
|
5966
|
+
url: `market`,
|
5967
|
+
}))?.data
|
5968
|
+
const $ = cheerio.load(response || '')
|
5969
|
+
const market_headertip_container_warning_el = $('.market_headertip_container_warning')
|
5970
|
+
const market_warning_header_el = market_headertip_container_warning_el.find('#market_warning_header')
|
5971
|
+
if (market_headertip_container_warning_el.length && market_warning_header_el.length) {
|
5972
|
+
const market_warning_header = market_warning_header_el.text()
|
5973
|
+
const market_restrictions = []
|
5974
|
+
market_headertip_container_warning_el.find('ul.market_restrictions > li').each(function () {
|
5975
|
+
market_restrictions.push($(this).text()?.trim())
|
5976
|
+
})
|
5977
|
+
return {
|
5978
|
+
market_warning_header,
|
5979
|
+
market_restrictions,
|
5980
|
+
}
|
5981
|
+
}
|
5982
|
+
}
|
5957
5983
|
}
|
5958
5984
|
|
5959
5985
|
export default SteamUser
|
package/package.json
CHANGED
package/.idea/deployment.xml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
4
|
-
<serverData>
|
5
|
-
<paths name="steamsupport">
|
6
|
-
<serverdata>
|
7
|
-
<mappings>
|
8
|
-
<mapping local="$PROJECT_DIR$" web="/" />
|
9
|
-
</mappings>
|
10
|
-
</serverdata>
|
11
|
-
</paths>
|
12
|
-
<paths name="steamsupportui">
|
13
|
-
<serverdata>
|
14
|
-
<mappings>
|
15
|
-
<mapping local="$PROJECT_DIR$" web="/" />
|
16
|
-
</mappings>
|
17
|
-
</serverdata>
|
18
|
-
</paths>
|
19
|
-
</serverData>
|
20
|
-
</component>
|
21
|
-
</project>
|