@sasjs/adapter 3.4.1 → 3.4.2
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/SASjs.d.ts +11 -12
- package/SASjsApiClient.d.ts +3 -2
- package/api/viya/spec/writeStream.spec.d.ts +1 -1
- package/index.js +2 -2
- package/jest.config.js +1 -1
- package/node/SASjs.d.ts +11 -12
- package/node/SASjsApiClient.d.ts +3 -2
- package/node/index.js +2 -2
- package/node/utils/createAxiosInstance.d.ts +0 -1
- package/package.json +10 -10
- package/src/SASjs.ts +18 -5
- package/src/SASjsApiClient.ts +17 -3
- package/src/api/viya/executeScript.ts +8 -2
- package/src/api/viya/writeStream.ts +5 -9
- package/src/request/Sas9RequestClient.ts +2 -2
- package/src/types/system/global.d.ts +1 -0
- package/tsconfig.json +2 -1
- package/utils/createAxiosInstance.d.ts +0 -1
package/jest.config.js
CHANGED
|
@@ -127,7 +127,7 @@ module.exports = {
|
|
|
127
127
|
setupFiles: [],
|
|
128
128
|
|
|
129
129
|
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
|
130
|
-
setupFilesAfterEnv: ['jest-extended'],
|
|
130
|
+
setupFilesAfterEnv: ['jest-extended/all'],
|
|
131
131
|
|
|
132
132
|
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
|
133
133
|
// snapshotSerializers: [],
|
package/node/SASjs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { SASjsConfig, UploadFile, EditContextInput, PollOptions,
|
|
2
|
+
import { SASjsConfig, UploadFile, EditContextInput, PollOptions, ExecutionQuery, FileTree } from './types';
|
|
3
3
|
import { SASViyaApiClient } from './SASViyaApiClient';
|
|
4
4
|
import { SASjsAuthResponse } from './SASjsApiClient';
|
|
5
5
|
import { MacroVar, AuthConfig, ExtraResponseAttributes, SasAuthResponse } from '@sasjs/utils/types';
|
|
@@ -89,11 +89,7 @@ export default class SASjs {
|
|
|
89
89
|
* @param accessToken - an access token for an authorized user.
|
|
90
90
|
*/
|
|
91
91
|
deleteComputeContext(contextName: string, accessToken?: string): Promise<{
|
|
92
|
-
result: import("./types").Context;
|
|
93
|
-
* Returns a JSON representation of a compute context.
|
|
94
|
-
* @param contextId - an id of the context to return.
|
|
95
|
-
* @param accessToken - an access token for an authorized user.
|
|
96
|
-
*/
|
|
92
|
+
result: import("./types").Context;
|
|
97
93
|
etag: string;
|
|
98
94
|
}>;
|
|
99
95
|
/**
|
|
@@ -225,11 +221,7 @@ export default class SASjs {
|
|
|
225
221
|
* Logs out of the configured SAS server.
|
|
226
222
|
*/
|
|
227
223
|
logOut(): Promise<boolean | {
|
|
228
|
-
result: unknown;
|
|
229
|
-
* Returns a JSON representation of a compute context.
|
|
230
|
-
* @param contextId - an id of the context to return.
|
|
231
|
-
* @param accessToken - an access token for an authorized user.
|
|
232
|
-
*/
|
|
224
|
+
result: unknown;
|
|
233
225
|
etag: string;
|
|
234
226
|
}>;
|
|
235
227
|
/**
|
|
@@ -307,7 +299,14 @@ export default class SASjs {
|
|
|
307
299
|
* @param isForced - flag that indicates if target folder already exists, it and all subfolders have to be deleted.
|
|
308
300
|
*/
|
|
309
301
|
deployServicePack(serviceJson: any, appLoc?: string, serverUrl?: string, accessToken?: string, isForced?: boolean): Promise<void>;
|
|
310
|
-
|
|
302
|
+
/**
|
|
303
|
+
* Creates the folders and services at the given location `appLoc` on the given server `serverUrl`.
|
|
304
|
+
* @param members - the JSON specifying the folders and services to be created.
|
|
305
|
+
* @param appLoc - the base folder in which to create the new folders and
|
|
306
|
+
* services. If not provided, is taken from SASjsConfig.
|
|
307
|
+
* @param authConfig - a valid client, secret, refresh and access tokens that are authorised to execute compute jobs.
|
|
308
|
+
*/
|
|
309
|
+
deployToSASjs(members: FileTree, appLoc?: string, authConfig?: AuthConfig): Promise<{
|
|
311
310
|
status: string;
|
|
312
311
|
message: string;
|
|
313
312
|
example?: {} | undefined;
|
package/node/SASjsApiClient.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthConfig } from '@sasjs/utils/types';
|
|
2
|
+
import { FileTree, ExecutionQuery } from './types';
|
|
2
3
|
import { RequestClient } from './request/RequestClient';
|
|
3
4
|
export declare class SASjsApiClient {
|
|
4
5
|
private serverUrl;
|
|
5
6
|
private requestClient;
|
|
6
7
|
constructor(serverUrl: string, requestClient: RequestClient);
|
|
7
8
|
setConfig(serverUrl: string): void;
|
|
8
|
-
deploy(members:
|
|
9
|
+
deploy(members: FileTree, appLoc: string, authConfig?: AuthConfig): Promise<{
|
|
9
10
|
status: string;
|
|
10
11
|
message: string;
|
|
11
12
|
example?: {} | undefined;
|