@sasjs/adapter 3.9.3 → 3.10.1
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/.git-hooks/pre-commit +12 -0
- package/SASjsApiClient.d.ts +0 -7
- package/auth/AuthManager.d.ts +0 -9
- package/index.js +2 -2
- package/node/SASjsApiClient.d.ts +0 -7
- package/node/auth/AuthManager.d.ts +0 -9
- package/node/index.js +2 -2
- package/node/index.js.LICENSE.txt +1 -0
- package/node/types/errors/InvalidCsrfError.d.ts +3 -0
- package/package.json +12 -5
- package/src/SASjs.ts +0 -9
- package/src/SASjsApiClient.ts +0 -15
- package/src/auth/AuthManager.ts +30 -53
- package/src/job-execution/WebJobExecutor.ts +12 -8
- package/src/request/RequestClient.ts +28 -1
- package/src/types/errors/InvalidCsrfError.ts +9 -0
- package/src/utils/convertToCsv.ts +1 -1
- package/types/errors/InvalidCsrfError.d.ts +3 -0
- package/.gitpod.yml +0 -2
- package/.prettierrc +0 -6
- package/auth/getAuthCodeForSasjs.d.ts +0 -9
- package/jest.config.js +0 -184
- package/node/auth/getAuthCodeForSasjs.d.ts +0 -9
- package/src/auth/getAuthCodeForSasjs.ts +0 -31
- package/tsconfig.json +0 -14
- package/tslint.json +0 -9
- package/typedoc.json +0 -13
- package/webpack.config.js +0 -79
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Using `--silent` helps for showing any errs in the first line of the response
|
|
4
|
+
# The first line is picked up by the VS Code GIT UI popup when rc is not 0
|
|
5
|
+
|
|
6
|
+
if npm run --silent lint:silent ; then
|
|
7
|
+
exit 0
|
|
8
|
+
else
|
|
9
|
+
npm run --silent lint:fix
|
|
10
|
+
echo "❌ Prettier check failed! We ran lint:fix for you. Please add & commit again."
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
package/SASjsApiClient.d.ts
CHANGED
|
@@ -35,13 +35,6 @@ export declare class SASjsApiClient {
|
|
|
35
35
|
* @param refreshToken - the refresh token received from the server.
|
|
36
36
|
*/
|
|
37
37
|
refreshTokens(refreshToken: string): Promise<SASjsAuthResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* Performs a login authenticate and returns an auth code for the given client.
|
|
40
|
-
* @param username - a string representing the username.
|
|
41
|
-
* @param password - a string representing the password.
|
|
42
|
-
* @param clientId - the client ID to authenticate with.
|
|
43
|
-
*/
|
|
44
|
-
getAuthCode(username: string, password: string, clientId: string): Promise<string>;
|
|
45
38
|
}
|
|
46
39
|
export interface SASjsAuthResponse {
|
|
47
40
|
access_token: string;
|
package/auth/AuthManager.d.ts
CHANGED
|
@@ -16,14 +16,6 @@ export declare class AuthManager {
|
|
|
16
16
|
* And checks if user has finished login process.
|
|
17
17
|
*/
|
|
18
18
|
redirectedLogIn({ onLoggedOut }: LoginOptions): Promise<LoginResult>;
|
|
19
|
-
/**
|
|
20
|
-
* Logs into the SAS server with the supplied credentials.
|
|
21
|
-
* @param userName - a string representing the username.
|
|
22
|
-
* @param password - a string representing the password.
|
|
23
|
-
* @param clientId - a string representing the client ID.
|
|
24
|
-
* @returns - a boolean `isLoggedin` and a string `username`
|
|
25
|
-
*/
|
|
26
|
-
logInSasjs(username: string, password: string, clientId: string): Promise<LoginResult>;
|
|
27
19
|
/**
|
|
28
20
|
* Logs into the SAS server with the supplied credentials.
|
|
29
21
|
* @param username - a string representing the username.
|
|
@@ -33,7 +25,6 @@ export declare class AuthManager {
|
|
|
33
25
|
logIn(username: string, password: string): Promise<LoginResult>;
|
|
34
26
|
private performCASSecurityCheck;
|
|
35
27
|
private sendLoginRequest;
|
|
36
|
-
private sendLoginRequestSasjs;
|
|
37
28
|
/**
|
|
38
29
|
* Checks whether a session is active, or login is required.
|
|
39
30
|
* @returns - a promise which resolves with an object containing three values
|