steamutils 1.0.23 → 1.0.25
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/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +6 -0
- package/index.js +4 -3
- package/package.json +1 -1
- package/.idea/jsLibraryMappings.xml +0 -6
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
@@ -697,6 +697,12 @@ function SteamClient({
|
|
697
697
|
getUsername() {
|
698
698
|
return username
|
699
699
|
},
|
700
|
+
getCookie() {
|
701
|
+
return cookie
|
702
|
+
},
|
703
|
+
getLogOnDetails() {
|
704
|
+
return steamClient?._logOnDetails
|
705
|
+
},
|
700
706
|
onEvent(name, cb) {
|
701
707
|
if (!events[name]) {
|
702
708
|
events[name] = []
|
package/index.js
CHANGED
@@ -1094,11 +1094,12 @@ class SteamUser {
|
|
1094
1094
|
baseURL: SteamcommunityURL, ...params,
|
1095
1095
|
data: typeof params.data === 'object' && !Object.keys(params.data).length ? undefined : params.data,
|
1096
1096
|
headers: params.headers.get(),
|
1097
|
-
beforeRedirect: (options
|
1098
|
-
|
1097
|
+
beforeRedirect: (options) => {
|
1098
|
+
options.headers = options.headers || {}
|
1099
|
+
if (options?.hostname === 'steamcommunity.com') {
|
1099
1100
|
options.headers.cookie = this._cookies
|
1100
1101
|
}
|
1101
|
-
if(headers.location
|
1102
|
+
if (options.headers.location?.startsWith('https://login.steampowered.com/jwt/refresh')) {
|
1102
1103
|
//should login first
|
1103
1104
|
}
|
1104
1105
|
},
|
package/package.json
CHANGED