@sasjs/adapter 3.5.1 → 3.7.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/README.md +1 -0
- package/SASjs.d.ts +16 -9
- package/file/spec/generateFileUploadForm.spec.d.ts +1 -0
- package/index.js +2 -2
- package/job-execution/SasJsJobExecutor.d.ts +10 -0
- package/job-execution/index.d.ts +2 -1
- package/node/SASjs.d.ts +16 -9
- package/node/index.js +2 -2
- package/node/job-execution/SasJsJobExecutor.d.ts +10 -0
- package/node/job-execution/index.d.ts +2 -1
- package/node/request/RequestClient.d.ts +2 -1
- package/node/types/SASjsConfig.d.ts +6 -1
- package/node/utils/convertToCsv.d.ts +1 -1
- package/package.json +1 -1
- package/request/RequestClient.d.ts +2 -1
- package/src/SASjs.ts +59 -34
- package/src/file/generateFileUploadForm.ts +3 -0
- package/src/job-execution/SasJsJobExecutor.ts +127 -0
- package/src/job-execution/WebJobExecutor.ts +6 -1
- package/src/job-execution/index.ts +2 -1
- package/src/request/RequestClient.ts +5 -2
- package/src/types/SASjsConfig.ts +6 -1
- package/src/utils/convertToCsv.ts +2 -2
- package/types/SASjsConfig.d.ts +6 -1
- package/utils/convertToCsv.d.ts +1 -1
package/README.md
CHANGED
|
@@ -254,6 +254,7 @@ Configuration on the client side involves passing an object on startup, which ca
|
|
|
254
254
|
* `LoginMechanism` - either `Default` or `Redirected`. If `Redirected` then authentication occurs through the injection of an additional screen, which contains the SASLogon prompt. This allows for more complex authentication flows (such as 2FA) and avoids the need to handle passwords in the application itself. The styling of the redirect flow can also be modified. If left at "Default" then the developer must capture the username and password and use these with the `.login()` method.
|
|
255
255
|
* `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.
|
|
256
256
|
* `contextName` - Compute context on which the requests will be called. If missing or not provided, defaults to `Job Execution Compute context`.
|
|
257
|
+
* `requestHistoryLimit` - Request history limit. Increasing this limit may affect browser performance, especially with debug (logs) enabled. Default is 10.
|
|
257
258
|
|
|
258
259
|
The adapter supports a number of approaches for interfacing with Viya (`serverType` is `SASVIYA`). For maximum performance, be sure to [configure your compute context](https://sasjs.io/guide-viya/#shared-account-and-server-re-use) with `reuseServerProcesses` as `true` and a system account in `runServerAs`. This functionality is available since Viya 3.5. This configuration is supported when [creating contexts using the CLI](https://sasjs.io/sasjs-cli-context/#sasjs-context-create).
|
|
259
260
|
|
package/SASjs.d.ts
CHANGED
|
@@ -21,9 +21,25 @@ export default class SASjs {
|
|
|
21
21
|
private computeJobExecutor;
|
|
22
22
|
private jesJobExecutor;
|
|
23
23
|
private sas9JobExecutor;
|
|
24
|
+
private sasJsJobExecutor;
|
|
24
25
|
constructor(config?: Partial<SASjsConfig>);
|
|
25
26
|
getCsrfToken(type?: 'general' | 'file'): import("./types").CsrfToken | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Executes the sas code against SAS9 server
|
|
29
|
+
* @param linesOfCode - lines of sas code from the file to run.
|
|
30
|
+
* @param username - a string representing the username.
|
|
31
|
+
* @param password - a string representing the password.
|
|
32
|
+
*/
|
|
26
33
|
executeScriptSAS9(linesOfCode: string[], userName: string, password: string): Promise<string | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Executes the sas code against SASViya server
|
|
36
|
+
* @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
|
|
37
|
+
* @param linesOfCode - lines of sas code from the file to run.
|
|
38
|
+
* @param contextName - context name on which code will be run on the server.
|
|
39
|
+
* @param authConfig - (optional) the access token, refresh token, client and secret for authorizing the request.
|
|
40
|
+
* @param debug - (optional) if true, global debug config will be overriden
|
|
41
|
+
*/
|
|
42
|
+
executeScriptSASViya(fileName: string, linesOfCode: string[], contextName: string, authConfig?: AuthConfig, debug?: boolean): Promise<any>;
|
|
27
43
|
/**
|
|
28
44
|
* Gets compute contexts.
|
|
29
45
|
* @param accessToken - an access token for an authorized user.
|
|
@@ -106,15 +122,6 @@ export default class SASjs {
|
|
|
106
122
|
*/
|
|
107
123
|
getComputeContextById(contextId: string, accessToken?: string): Promise<import("./types").ContextAllAttributes>;
|
|
108
124
|
createSession(contextName: string, accessToken: string): Promise<import("./types").Session>;
|
|
109
|
-
/**
|
|
110
|
-
* Executes the sas code against given sas server
|
|
111
|
-
* @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
|
|
112
|
-
* @param linesOfCode - lines of sas code from the file to run.
|
|
113
|
-
* @param contextName - context name on which code will be run on the server.
|
|
114
|
-
* @param authConfig - (optional) the access token, refresh token, client and secret for authorizing the request.
|
|
115
|
-
* @param debug - (optional) if true, global debug config will be overriden
|
|
116
|
-
*/
|
|
117
|
-
executeScriptSASViya(fileName: string, linesOfCode: string[], contextName: string, authConfig?: AuthConfig, debug?: boolean): Promise<any>;
|
|
118
125
|
/**
|
|
119
126
|
* Creates a folder in the logical SAS folder tree
|
|
120
127
|
* @param folderName - name of the folder to be created.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|