@magic-xpa/engine 4.1200.0-dev4120.112 → 4.1200.0-dev4120.113
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/fesm2022/magic-xpa-engine.mjs +206 -51
- package/fesm2022/magic-xpa-engine.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/ClientManager.d.ts +1 -0
- package/src/CommandsProcessorBase.d.ts +2 -1
- package/src/CommandsProcessorManager.d.ts +1 -1
- package/src/ConstInterface.d.ts +5 -0
- package/src/bridge/MagicBridge.d.ts +1 -0
- package/src/commands/ClientToServer/CachedFileQueryCommand.d.ts +9 -0
- package/src/commands/ClientToServer/CommandFactory.d.ts +2 -0
- package/src/http/HttpManager.d.ts +2 -1
- package/src/http/client/HttpClientAsync.d.ts +2 -2
- package/src/http/client/HttpClientBase.d.ts +3 -3
- package/src/http/client/HttpClientSync.d.ts +2 -2
- package/src/remote/RemoteCommandsProcessor.d.ts +7 -2
package/index.d.ts
CHANGED
@@ -26,6 +26,7 @@ export * from "./src/commands/ClientToServer/AddUserLocateDataViewCommand";
|
|
26
26
|
export * from "./src/commands/ClientToServer/AddUserRangeDataviewCommand";
|
27
27
|
export * from "./src/commands/ClientToServer/AddUserSortDataViewCommand";
|
28
28
|
export * from "./src/commands/ClientToServer/BrowserEscEventCommand";
|
29
|
+
export * from "./src/commands/ClientToServer/CachedFileQueryCommand";
|
29
30
|
export * from "./src/commands/ClientToServer/ClientOriginatedCommand";
|
30
31
|
export * from "./src/commands/ClientToServer/ClientOriginatedCommandSerializer";
|
31
32
|
export * from "./src/commands/ClientToServer/ColumnSortEventCommand";
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@magic-xpa/engine",
|
3
|
-
"version": "4.1200.0-dev4120.
|
3
|
+
"version": "4.1200.0-dev4120.113",
|
4
4
|
"description": "magic engine package",
|
5
5
|
"license": "SEE LICENSE IN EULA.pdf",
|
6
6
|
"dependencies": {
|
7
|
-
"@magic-xpa/mscorelib": "4.1200.0-dev4120.
|
8
|
-
"@magic-xpa/utils": "4.1200.0-dev4120.
|
9
|
-
"@magic-xpa/gui": "4.1200.0-dev4120.
|
7
|
+
"@magic-xpa/mscorelib": "4.1200.0-dev4120.113",
|
8
|
+
"@magic-xpa/utils": "4.1200.0-dev4120.113",
|
9
|
+
"@magic-xpa/gui": "4.1200.0-dev4120.113",
|
10
10
|
"@angular/common": "^19.1.3",
|
11
11
|
"tslib": "^2.3.0"
|
12
12
|
},
|
package/src/ClientManager.d.ts
CHANGED
@@ -24,6 +24,7 @@ export declare class ClientManager {
|
|
24
24
|
GetGlobalUniqueSessionID(): string;
|
25
25
|
static GetControlPictureMask(taskId: string, controlName: string): PIC;
|
26
26
|
static UploadFileToServer(fileContent: any, serverFileName: string): any;
|
27
|
+
static DownloadFileFromServer(serverFileName: string): Promise<ArrayBuffer>;
|
27
28
|
static GetFormattedValue(taskId: string, controlName: string, value: any, rowId?: string): string;
|
28
29
|
static GetRangedValue(taskId: string, controlName: string, value: string): string;
|
29
30
|
static ValidateControlValue(taskId: string, controlName: string, value: any): string;
|
@@ -17,7 +17,8 @@ export declare abstract class CommandsProcessorBase {
|
|
17
17
|
Execute(sendingInstruction: CommandsProcessorBase_SendingInstruction, sessionStage: CommandsProcessorBase_SessionStage, res: IResultValue): Promise<void>;
|
18
18
|
private Execute_0;
|
19
19
|
Execute_1(sendingInstruction: CommandsProcessorBase_SendingInstruction, sessionStage: CommandsProcessorBase_SessionStage, res: IResultValue): Promise<void>;
|
20
|
-
GetContent(requestedURL: string, useCache: boolean): Promise<
|
20
|
+
GetContent(requestedURL: string, useCache: boolean): Promise<ArrayBuffer>;
|
21
|
+
GetContentAsString(requestedURL: string, useCache: boolean): Promise<string>;
|
21
22
|
abstract SendMonitorOnly(): void;
|
22
23
|
static UnScramble(respBuf: string): string;
|
23
24
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommandsProcessorBase } from "./CommandsProcessorBase";
|
2
2
|
export declare class CommandsProcessorManager {
|
3
3
|
static GetCommandsProcessor(): CommandsProcessorBase;
|
4
|
-
static GetContent(requestedURL: string, useCache: boolean): Promise<string
|
4
|
+
static GetContent(requestedURL: string, useCache: boolean): Promise<string>;
|
5
5
|
static StartSession(): Promise<boolean>;
|
6
6
|
}
|
package/src/ConstInterface.d.ts
CHANGED
@@ -226,6 +226,9 @@ export declare class ConstInterface {
|
|
226
226
|
static MG_ATTR_CPY_GLB_PRMS: string;
|
227
227
|
static MG_TAG_GLOBALPARAMS: string;
|
228
228
|
static MG_TAG_GLOBALPARAMSCHANGES: string;
|
229
|
+
static MG_ATTR_FILE_PATH: string;
|
230
|
+
static MG_TAG_CACHED_FILE: string;
|
231
|
+
static MG_ATTR_CACHE_URL: string;
|
229
232
|
static MG_TAG_PARAM: string;
|
230
233
|
static MG_ATTR_IME_AUTO_OFF: string;
|
231
234
|
static MG_ATTR_LOCAL_AS400SET: string;
|
@@ -498,6 +501,7 @@ export declare class ConstInterface {
|
|
498
501
|
static MG_ATTR_VAL_EVENT: string;
|
499
502
|
static MG_ATTR_VAL_EXEC_OPER: string;
|
500
503
|
static MG_ATTR_VAL_QUERY: string;
|
504
|
+
static MG_ATTR_VAL_QUERY_CACHED_FILE: string;
|
501
505
|
static MG_ATTR_VAL_QUERY_GLOBAL_PARAMS: string;
|
502
506
|
static MG_ATTR_VAL_QUERY_TYPE: string;
|
503
507
|
static MG_ATTR_VAL_RECOMP: string;
|
@@ -514,4 +518,5 @@ export declare class ConstInterface {
|
|
514
518
|
static MG_ATTR_SPECIAL_DOTNET_ALLOW_ZERO_DATE: string;
|
515
519
|
static MG_ATTR_SPECIAL_REUSE_TABLE_EDITOR: string;
|
516
520
|
static MG_TAG_LAST_ROUTE: string;
|
521
|
+
static RC_TOKEN_CACHED_FILE: string;
|
517
522
|
}
|
@@ -8,6 +8,7 @@ export declare class MagicBridge {
|
|
8
8
|
static insertEvent(guiEvent: IGuiEvent): void;
|
9
9
|
static GetControlPictureMask(taskId: string, controlName: string): any;
|
10
10
|
static UploadFileToServer(fileContent: any, serverFileName: string): any;
|
11
|
+
static DownloadFileFromServer(serverFileName: string): Promise<ArrayBuffer>;
|
11
12
|
static GetFormattedValue(taskId: string, controlName: string, value: any, rowId?: string): string;
|
12
13
|
static GetRangedValue(taskId: string, controlName: string, value: string): string;
|
13
14
|
static ValidateControlValue(taskId: string, controlName: string, value: any): string;
|
@@ -31,6 +31,7 @@ import { IniputForceWriteCommand } from './IniputForceWriteCommand';
|
|
31
31
|
import { ContextTerminationEventCommand } from './ContextTerminationEventCommand';
|
32
32
|
import { ContextTimeoutResetCommand } from './ContextTimeoutResetCommand';
|
33
33
|
import { ControlItemsRefreshCommand } from './ControlItemsRefreshCommand';
|
34
|
+
import { CachedFileQueryCommand } from "./CachedFileQueryCommand";
|
34
35
|
export declare class CommandFactory {
|
35
36
|
static CreateEventCommand(taskTag: string, magicEvent: number): EventCommand;
|
36
37
|
static CreateRollbackEventCommand(taskTag: string, rollbackType: RollbackEventCommand_RollbackType): RollbackEventCommand;
|
@@ -61,4 +62,5 @@ export declare class CommandFactory {
|
|
61
62
|
static CreateEvaluateCommand(taskTag: string, expType: StorageAttribute, expIdx: number, expValLen: number, mprgCreator: Task): EvaluateCommand;
|
62
63
|
static CreateQueryGlobalParamsCommand(): GlobalParamsQueryCommand;
|
63
64
|
static CreateIniputForceWriteCommand(param: string): IniputForceWriteCommand;
|
65
|
+
static CreateQueryCachedFileCommand(cachedFileName: string): CachedFileQueryCommand;
|
64
66
|
}
|
@@ -19,7 +19,8 @@ export declare class HttpManager {
|
|
19
19
|
private RegisterBasicDelegates;
|
20
20
|
GetHttpCommunicationTimeoutMS(): number;
|
21
21
|
SetCommunicationsFailureHandler(handler: ICommunicationsFailureHandler): void;
|
22
|
-
GetContent(requestedURL: string, requestContent: string | ArrayBuffer, requestContentType: string, useCache: boolean, isError: RefParam<boolean>): Promise<
|
22
|
+
GetContent(requestedURL: string, requestContent: string | ArrayBuffer, requestContentType: string, useCache: boolean, isError: RefParam<boolean>): Promise<ArrayBuffer>;
|
23
23
|
private static CheckAndGetErrorResponse;
|
24
24
|
private static LogAccessToServer;
|
25
|
+
private static GetRequestContentLength;
|
25
26
|
}
|
@@ -7,8 +7,8 @@ export declare class HttpClientAsync extends HttpClientBase {
|
|
7
7
|
constructor(httpClient: HttpClient);
|
8
8
|
prepareRequest(): void;
|
9
9
|
addHeaders(urlString: string, useCache: boolean, httpHeaders: HttpHeaders, clientID: string): HttpHeaders;
|
10
|
-
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string | ArrayBuffer, contentFromServer: RefParam<
|
11
|
-
logResponse(httpResponse: HttpResponse<
|
10
|
+
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string | ArrayBuffer, contentFromServer: RefParam<ArrayBuffer>): Promise<any>;
|
11
|
+
logResponse(httpResponse: HttpResponse<ArrayBuffer>, clientID: string, urlString: string, contentFromServer: RefParam<any>, timeBeforeRequest: number): void;
|
12
12
|
handleHttpErrorException(ex: any, urlString: string): void;
|
13
13
|
shouldRetry(httpCommunicationTimeoutMS: number, urlString: string, communicationsFailureHandler: ICommunicationsFailureHandler, ex: any, startTimeRef: RefParam<number>): Promise<boolean>;
|
14
14
|
logAndThrowException(ex: any): void;
|
@@ -15,14 +15,14 @@ export declare abstract class HttpClientBase {
|
|
15
15
|
CommunicationsFailureHandler: ICommunicationsFailureHandler;
|
16
16
|
constructor();
|
17
17
|
private DecideOnRequestMethod;
|
18
|
-
GetContent(requestURL: string, requestContent: any, requestContentType: string, useCache: boolean): Promise<
|
18
|
+
GetContent(requestURL: string, requestContent: any, requestContentType: string, useCache: boolean): Promise<ArrayBuffer>;
|
19
19
|
private ExecuteHttpRequest;
|
20
20
|
private LogRequestInfo;
|
21
21
|
private static HeadersToString;
|
22
22
|
abstract prepareRequest(): any;
|
23
23
|
abstract addHeaders(urlString: string, useCache: boolean, httpHeaders: HttpHeaders, clientID: string): HttpHeaders;
|
24
|
-
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string, contentFromServer: RefParam<
|
25
|
-
abstract logResponse(httpResponse: HttpResponse<
|
24
|
+
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string, contentFromServer: RefParam<ArrayBuffer>): Promise<any>;
|
25
|
+
abstract logResponse(httpResponse: HttpResponse<ArrayBuffer>, clientID: string, urlString: string, contentFromServer: RefParam<any>, timeBeforeRequest: number): any;
|
26
26
|
abstract handleHttpErrorException(ex: any, urlString: string): any;
|
27
27
|
shouldRetry(httpCommunicationTimeoutMS: number, urlString: string, communicationsFailureHandler: ICommunicationsFailureHandler, ex: any, startTimeRef: RefParam<number>): Promise<boolean>;
|
28
28
|
abstract logAndThrowException(ex: any): any;
|
@@ -8,8 +8,8 @@ export declare class HttpClientSync extends HttpClientBase {
|
|
8
8
|
constructor();
|
9
9
|
prepareRequest(): void;
|
10
10
|
addHeaders(urlString: string, useCache: boolean, httpHeaders: HttpHeaders, clientID: string): HttpHeaders;
|
11
|
-
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string, contentFromServer: RefParam<
|
12
|
-
logResponse(httpResponse: HttpResponse<
|
11
|
+
sendRequestToServer(httpMethod: RequestMethod, urlString: string, httpHeaders: HttpHeaders, requestContent: string, contentFromServer: RefParam<ArrayBuffer>): Promise<any>;
|
12
|
+
logResponse(httpResponse: HttpResponse<ArrayBuffer>, clientID: string, urlString: string, contentFromServer: RefParam<any>, timeBeforeRequest: number): void;
|
13
13
|
handleHttpErrorException(ex: any, urlString: string): void;
|
14
14
|
shouldRetry(httpCommunicationTimeoutMS: number, urlString: string, communicationsFailureHandler: ICommunicationsFailureHandler, ex: any, startTimeRef: RefParam<number>): Promise<boolean>;
|
15
15
|
logAndThrowException(ex: any): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Logger_LogLevels } from "@magic-xpa/utils";
|
1
|
+
import { Logger_LogLevels, XmlParser } from "@magic-xpa/utils";
|
2
2
|
import { CommandsProcessorBase, CommandsProcessorBase_SendingInstruction, CommandsProcessorBase_SessionStage } from "../CommandsProcessorBase";
|
3
3
|
import { IResultValue } from "../rt/IResultValue";
|
4
4
|
import { OpeningTaskDetails } from "../tasks/TaskBase";
|
@@ -15,6 +15,7 @@ export declare class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
15
15
|
SessionId: string;
|
16
16
|
DelayCommandExecution: boolean;
|
17
17
|
private _requestInfo;
|
18
|
+
serverFilesToClientFiles: Map<string, string>;
|
18
19
|
static GetInstance(): RemoteCommandsProcessor;
|
19
20
|
private constructor();
|
20
21
|
CheckAndSetSessionCounter(newSessionCounter: number): void;
|
@@ -32,11 +33,15 @@ export declare class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
32
33
|
private BuildXMLForMainProgramDataView;
|
33
34
|
Execute_1(sendingInstruction: CommandsProcessorBase_SendingInstruction, sessionStage: CommandsProcessorBase_SessionStage, res: IResultValue): Promise<void>;
|
34
35
|
private DispatchRequest;
|
36
|
+
DownloadFileFromServer(serverFileName: string): Promise<ArrayBuffer>;
|
37
|
+
fillCacheFilesMap(parser: XmlParser): void;
|
35
38
|
clearLocalStorage(): void;
|
36
39
|
private HandleErrorResponse;
|
37
40
|
private ArrayBufferToString;
|
38
41
|
private ExecuteRequest;
|
39
|
-
|
42
|
+
GetContentAsString(requestedURL: string, useCache: boolean, requestContent?: string, requestContentType?: string): Promise<string>;
|
43
|
+
GetContent(requestedURL: string, useCache: boolean, requestContent?: string, requestContentType?: string): Promise<ArrayBuffer>;
|
44
|
+
validateURL(url: string, sessionCounter: number, sessionId: string | null): string;
|
40
45
|
UploadFileToServer(fileContent: any, serverFileName: string): Promise<any>;
|
41
46
|
ClientActivated(): void;
|
42
47
|
private BuildUrlSuffix;
|