steamutils 1.2.6 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
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
@@ -995,7 +995,7 @@ function SteamClient({
995
995
  if(!response){
996
996
  return
997
997
  }
998
- while (Array.isArray(response.headers?.["set-cookie"])) {
998
+ while (Array.isArray(response?.headers?.["set-cookie"])) {
999
999
  const cookieObj = cookie.split(';').reduce(function (accumulator, currentValue) {
1000
1000
  accumulator[currentValue.trim().split('=')[0].trim()] = currentValue.trim().split('=')[1].trim()
1001
1001
  return accumulator
@@ -1044,6 +1044,9 @@ function SteamClient({
1044
1044
  return null
1045
1045
  } else {
1046
1046
  const newCookie = await getNewCookie(cookie)
1047
+ if(!newCookie){
1048
+ console.log("Cannot get new cookie")
1049
+ }
1047
1050
  return newCookie && await loginWithCookie(newCookie, true)
1048
1051
  }
1049
1052
  }
package/index.js CHANGED
@@ -2888,7 +2888,7 @@ class SteamUser {
2888
2888
  }
2889
2889
 
2890
2890
  async setupProfile () {
2891
- const profile = await this._httpRequest(`/edit?welcomed=1`)
2891
+ const profile = await this._httpRequest(`${this._myProfile}/edit?welcomed=1`)
2892
2892
  if (!profile.data) {
2893
2893
  return false
2894
2894
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.06",
3
+ "version": "1.2.08",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",