steamutils 1.0.29 → 1.0.30
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 -5
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -694,10 +694,10 @@ function SteamClient({
|
|
694
694
|
}
|
695
695
|
|
696
696
|
async function autoRequestFreeLicense(log = false, max = 10) {
|
697
|
-
const steamUtils = new SteamUtils(
|
697
|
+
const steamUtils = new SteamUtils(getCookie())
|
698
698
|
|
699
699
|
const ownedAppsCount = log ? (await steamUtils.getDynamicStoreUserData()).rgOwnedApps.length : 0
|
700
|
-
|
700
|
+
let recommendedApps = _.shuffle((await steamUtils.getDynamicStoreUserData())?.rgRecommendedApps)
|
701
701
|
if (!recommendedApps.length) {
|
702
702
|
recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages
|
703
703
|
}
|
@@ -727,6 +727,10 @@ function SteamClient({
|
|
727
727
|
}
|
728
728
|
}
|
729
729
|
|
730
|
+
function getCookie() {
|
731
|
+
return cookie || steamClient?.webSession?.cookies?.join?.(';')
|
732
|
+
}
|
733
|
+
|
730
734
|
return {
|
731
735
|
init,
|
732
736
|
partySearch,
|
@@ -736,9 +740,7 @@ function SteamClient({
|
|
736
740
|
getUsername() {
|
737
741
|
return username
|
738
742
|
},
|
739
|
-
getCookie
|
740
|
-
return cookie
|
741
|
-
},
|
743
|
+
getCookie,
|
742
744
|
getLogOnDetails() {
|
743
745
|
return steamClient?._logOnDetails
|
744
746
|
},
|