@sasjs/adapter 2.11.3 → 2.11.4
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
|
@@ -48,33 +48,33 @@
|
|
|
48
48
|
"copyfiles": "^2.4.1",
|
|
49
49
|
"cp": "^0.2.0",
|
|
50
50
|
"dotenv": "^10.0.0",
|
|
51
|
-
"jest": "^27.
|
|
51
|
+
"jest": "^27.2.0",
|
|
52
52
|
"jest-extended": "^0.11.5",
|
|
53
53
|
"node-polyfill-webpack-plugin": "^1.1.4",
|
|
54
54
|
"path": "^0.12.7",
|
|
55
55
|
"process": "^0.11.10",
|
|
56
56
|
"rimraf": "^3.0.2",
|
|
57
57
|
"semantic-release": "^17.4.7",
|
|
58
|
-
"terser-webpack-plugin": "^5.2.
|
|
58
|
+
"terser-webpack-plugin": "^5.2.4",
|
|
59
59
|
"ts-jest": "^27.0.3",
|
|
60
60
|
"ts-loader": "^9.2.2",
|
|
61
61
|
"tslint": "^6.1.3",
|
|
62
62
|
"tslint-config-prettier": "^1.18.0",
|
|
63
|
-
"typedoc": "^0.
|
|
63
|
+
"typedoc": "^0.22.3",
|
|
64
64
|
"typedoc-neo-theme": "^1.1.1",
|
|
65
65
|
"typedoc-plugin-external-module-name": "^4.0.6",
|
|
66
66
|
"typescript": "4.3.5",
|
|
67
|
-
"webpack": "^5.
|
|
67
|
+
"webpack": "^5.52.1",
|
|
68
68
|
"webpack-cli": "^4.7.2"
|
|
69
69
|
},
|
|
70
70
|
"main": "index.js",
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@sasjs/utils": "^2.30.0",
|
|
73
|
-
"axios": "^0.21.
|
|
73
|
+
"axios": "^0.21.4",
|
|
74
74
|
"axios-cookiejar-support": "^1.0.1",
|
|
75
75
|
"form-data": "^4.0.0",
|
|
76
76
|
"https": "^1.0.0",
|
|
77
77
|
"tough-cookie": "^4.0.0"
|
|
78
78
|
},
|
|
79
|
-
"version": "2.11.
|
|
79
|
+
"version": "2.11.4"
|
|
80
80
|
}
|
|
@@ -45,7 +45,6 @@ export class ComputeJobExecutor extends BaseJobExecutor {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (e instanceof LoginRequiredError) {
|
|
48
|
-
await loginCallback()
|
|
49
48
|
this.appendWaitingRequest(() => {
|
|
50
49
|
return this.execute(
|
|
51
50
|
sasJob,
|
|
@@ -61,6 +60,8 @@ export class ComputeJobExecutor extends BaseJobExecutor {
|
|
|
61
60
|
}
|
|
62
61
|
)
|
|
63
62
|
})
|
|
63
|
+
|
|
64
|
+
await loginCallback()
|
|
64
65
|
} else {
|
|
65
66
|
reject(new ErrorResponse(e?.message, e))
|
|
66
67
|
}
|
|
@@ -45,8 +45,6 @@ export class JesJobExecutor extends BaseJobExecutor {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (e instanceof LoginRequiredError) {
|
|
48
|
-
await loginCallback()
|
|
49
|
-
|
|
50
48
|
this.appendWaitingRequest(() => {
|
|
51
49
|
return this.execute(
|
|
52
50
|
sasJob,
|
|
@@ -64,6 +62,8 @@ export class JesJobExecutor extends BaseJobExecutor {
|
|
|
64
62
|
}
|
|
65
63
|
)
|
|
66
64
|
})
|
|
65
|
+
|
|
66
|
+
await loginCallback()
|
|
67
67
|
} else {
|
|
68
68
|
reject(new ErrorResponse(e?.message, e))
|
|
69
69
|
}
|
|
@@ -53,7 +53,36 @@ export class WebJobExecutor extends BaseJobExecutor {
|
|
|
53
53
|
let apiUrl = `${config.serverUrl}${this.jobsPath}/?${'_program=' + program}`
|
|
54
54
|
|
|
55
55
|
if (config.serverType === ServerType.SasViya) {
|
|
56
|
-
|
|
56
|
+
let jobUri
|
|
57
|
+
try {
|
|
58
|
+
jobUri = await this.getJobUri(sasJob)
|
|
59
|
+
} catch (e: any) {
|
|
60
|
+
return new Promise(async (resolve, reject) => {
|
|
61
|
+
if (e instanceof LoginRequiredError) {
|
|
62
|
+
this.appendWaitingRequest(() => {
|
|
63
|
+
return this.execute(
|
|
64
|
+
sasJob,
|
|
65
|
+
data,
|
|
66
|
+
config,
|
|
67
|
+
loginRequiredCallback,
|
|
68
|
+
authConfig,
|
|
69
|
+
extraResponseAttributes
|
|
70
|
+
).then(
|
|
71
|
+
(res: any) => {
|
|
72
|
+
resolve(res)
|
|
73
|
+
},
|
|
74
|
+
(err: any) => {
|
|
75
|
+
reject(err)
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
await loginCallback()
|
|
81
|
+
} else {
|
|
82
|
+
reject(new ErrorResponse(e?.message, e))
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}
|
|
57
86
|
|
|
58
87
|
apiUrl += jobUri.length > 0 ? '&_job=' + jobUri : ''
|
|
59
88
|
|
|
@@ -281,7 +281,11 @@ export class RequestClient implements HttpClient {
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
try {
|
|
284
|
-
const response = await this.httpClient.post(url, content, {
|
|
284
|
+
const response = await this.httpClient.post(url, content, {
|
|
285
|
+
headers,
|
|
286
|
+
transformRequest: (requestBody) => requestBody
|
|
287
|
+
})
|
|
288
|
+
|
|
285
289
|
return {
|
|
286
290
|
result: response.data,
|
|
287
291
|
etag: response.headers['etag'] as string
|