steamutils 1.0.41 → 1.0.43

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.
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
+ </state>
5
+ </component>
@@ -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
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
4
+ <mapping directory="" vcs="Git" />
5
5
  </component>
6
6
  </project>
package/SteamClient.js CHANGED
@@ -736,10 +736,10 @@ function SteamClient({
736
736
  async function autoRequestFreeLicense(log = false, max = 10) {
737
737
  const steamUtils = new SteamUtils(getCookie())
738
738
 
739
- const ownedAppsCount = log ? (await steamUtils.getDynamicStoreUserData()).rgOwnedApps.length : 0
740
- let recommendedApps = _.shuffle((await steamUtils.getDynamicStoreUserData())?.rgRecommendedApps)
739
+ const ownedAppsCount = log ? ((await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0) : 0
740
+ let recommendedApps = _.shuffle((await steamUtils.getDynamicStoreUserData())?.rgRecommendedApps || [])
741
741
  if (!recommendedApps.length) {
742
- recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages
742
+ recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages || []
743
743
  }
744
744
  if (max) {
745
745
  recommendedApps.length = Math.min(recommendedApps.length, max)
@@ -761,7 +761,7 @@ function SteamClient({
761
761
  }
762
762
  if (log) {
763
763
  await sleep(20000)
764
- const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData()).rgOwnedApps.length
764
+ const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0
765
765
  const increaseNumber = ownedAppsCount2 - ownedAppsCount;
766
766
  console.log(getAccountInfoName(), `OwnedApps length ${ownedAppsCount2}, increase ${increaseNumber}`)
767
767
  }
package/axios.js CHANGED
@@ -59,12 +59,12 @@ const axios = _axios.default.create({
59
59
  })
60
60
 
61
61
  //debug
62
- axios.interceptors.request.use(function (config) {
63
- console_log(`[axios]`, config.method, config.url)
64
- return config
65
- }, function (error) {
66
- return Promise.reject(error)
67
- })
62
+ // axios.interceptors.request.use(function (config) {
63
+ // console_log(`[axios]`, config.method, config.url)
64
+ // return config
65
+ // }, function (error) {
66
+ // return Promise.reject(error)
67
+ // })
68
68
 
69
69
  export async function request(config) {
70
70
  try {