@sasjs/adapter 4.7.0 → 4.8.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/README.md +6 -1
- package/SASjs.d.ts +11 -0
- package/index-dev.js +2 -2
- package/index.js +1 -1
- package/minified_sas9.js +1 -1
- package/node/SASjs.d.ts +11 -0
- package/node/index.js +1 -1
- package/node/request/RequestClient.d.ts +1 -1
- package/node/types/SASjsConfig.d.ts +4 -0
- package/package.json +1 -1
- package/request/RequestClient.d.ts +1 -1
- package/src/SASjs.ts +23 -2
- package/src/minified/sas9/SASjs.ts +2 -1
- package/src/minified/sas9/WebJobExecutor.ts +0 -1
- package/src/request/RequestClient.ts +4 -1
- package/src/types/SASjsConfig.ts +4 -0
- package/types/SASjsConfig.d.ts +4 -0
package/README.md
CHANGED
|
@@ -151,7 +151,11 @@ The `request()` method also has optional parameters such as a config object and
|
|
|
151
151
|
|
|
152
152
|
The response object will contain returned tables and columns. Table names are always lowercase, and column names uppercase.
|
|
153
153
|
|
|
154
|
-
The adapter will also cache the logs (if debug enabled) and even the work tables.
|
|
154
|
+
The adapter will also cache the logs (if debug enabled) and even the work tables. For performance, it is best to keep debug mode off.
|
|
155
|
+
|
|
156
|
+
### Verbose Mode
|
|
157
|
+
|
|
158
|
+
Set `verbose` to `true` to enable verbose mode that logs a summary of every HTTP response. Verbose mode can be disabled by calling `disableVerboseMode` method or enabled by `enableVerboseMode` method. Verbose mode can also be enabled/disabled by `startComputeJob` method.
|
|
155
159
|
|
|
156
160
|
### Session Manager
|
|
157
161
|
|
|
@@ -273,6 +277,7 @@ Configuration on the client side involves passing an object on startup, which ca
|
|
|
273
277
|
* `serverType` - either `SAS9`, `SASVIYA` or `SASJS`. The `SASJS` server type is for use with [sasjs/server](https://github.com/sasjs/server).
|
|
274
278
|
* `serverUrl` - the location (including http protocol and port) of the SAS Server. Can be omitted, eg if serving directly from the SAS Web Server, or in streaming mode.
|
|
275
279
|
* `debug` - if `true` then SAS Logs and extra debug information is returned.
|
|
280
|
+
* `verbose` - optional, if `true` then a summary of every HTTP response is logged.
|
|
276
281
|
* `loginMechanism` - either `Default` or `Redirected`. See [SAS Logon](#sas-logon) section.
|
|
277
282
|
* `useComputeApi` - Only relevant when the serverType is `SASVIYA`. If `true` the [Compute API](#using-the-compute-api) is used. If `false` the [JES API](#using-the-jes-api) is used. If `null` or `undefined` the [Web](#using-jes-web-app) approach is used.
|
|
278
283
|
* `contextName` - Compute context on which the requests will be called. If missing or not provided, defaults to `Job Execution Compute context`.
|
package/SASjs.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { SASViyaApiClient } from './SASViyaApiClient';
|
|
|
4
4
|
import { SASjsAuthResponse } from './SASjsApiClient';
|
|
5
5
|
import { MacroVar, AuthConfig, ExtraResponseAttributes, SasAuthResponse, AuthConfigSas9 } from '@sasjs/utils/types';
|
|
6
6
|
import { LoginOptions, LoginResult } from './types/Login';
|
|
7
|
+
import { AxiosResponse } from 'axios';
|
|
7
8
|
interface ExecuteScriptParams {
|
|
8
9
|
linesOfCode: string[];
|
|
9
10
|
fileName?: string;
|
|
@@ -327,5 +328,15 @@ export default class SASjs {
|
|
|
327
328
|
private setupConfiguration;
|
|
328
329
|
private createFoldersAndServices;
|
|
329
330
|
private isMethodSupported;
|
|
331
|
+
/**
|
|
332
|
+
* Enables verbose mode that will log a summary of every HTTP response.
|
|
333
|
+
* @param successCallBack - function that should be triggered on every HTTP response with the status 2**.
|
|
334
|
+
* @param errorCallBack - function that should be triggered on every HTTP response with the status different from 2**.
|
|
335
|
+
*/
|
|
336
|
+
enableVerboseMode(successCallBack?: (response: AxiosResponse) => AxiosResponse, errorCallBack?: (response: AxiosResponse) => AxiosResponse): void;
|
|
337
|
+
/**
|
|
338
|
+
* Turns off verbose mode to log every HTTP response.
|
|
339
|
+
*/
|
|
340
|
+
disableVerboseMode(): void;
|
|
330
341
|
}
|
|
331
342
|
export {};
|