@sasjs/adapter 3.4.2 → 3.5.0

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/package.json CHANGED
@@ -74,11 +74,11 @@
74
74
  "main": "index.js",
75
75
  "dependencies": {
76
76
  "@sasjs/utils": "2.35.0",
77
- "axios": "0.25.0",
77
+ "axios": "0.26.0",
78
78
  "axios-cookiejar-support": "2.0.3",
79
79
  "form-data": "4.0.0",
80
80
  "https": "1.0.0",
81
81
  "tough-cookie": "4.0.0"
82
82
  },
83
- "version": "3.4.2"
83
+ "version": "3.5.0"
84
84
  }
@@ -4,6 +4,7 @@ import { RequestClient } from './request/RequestClient'
4
4
  import { getAccessTokenForSasjs } from './auth/getAccessTokenForSasjs'
5
5
  import { refreshTokensForSasjs } from './auth/refreshTokensForSasjs'
6
6
  import { getAuthCodeForSasjs } from './auth/getAuthCodeForSasjs'
7
+ import { parseWeboutResponse } from './utils'
7
8
  import { getTokens } from './auth/getTokens'
8
9
 
9
10
  export class SASjsApiClient {
@@ -49,8 +50,13 @@ export class SASjsApiClient {
49
50
  log?: string
50
51
  logPath?: string
51
52
  error?: {}
53
+ _webout?: string
52
54
  }>('SASjsApi/stp/execute', query, undefined)
53
55
 
56
+ if (Object.keys(result).includes('_webout')) {
57
+ result._webout = parseWeboutResponse(result._webout!)
58
+ }
59
+
54
60
  return Promise.resolve(result)
55
61
  }
56
62
 
@@ -10,6 +10,7 @@ export const parseWeboutResponse = (response: string, url?: string): string => {
10
10
  .split('>>weboutEND<<')[0]
11
11
  } catch (e) {
12
12
  if (url) throw new WeboutResponseError(url)
13
+
13
14
  sasResponse = ''
14
15
  console.error(e)
15
16
  }