@magic-xpa/engine 4.1101.0-dev4111.331 → 4.1101.0-dev4111.333
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/env/MirrorString.mjs +4 -2
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +3 -3
- package/esm2022/src/util/IMirrorXML.mjs +1 -1
- package/esm2022/src/util/PrmMap.mjs +8 -7
- package/fesm2022/magic-xpa-engine.mjs +13 -10
- package/fesm2022/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
- package/src/env/MirrorString.d.ts +1 -1
- package/src/util/IMirrorXML.d.ts +1 -1
- package/src/util/PrmMap.d.ts +3 -3
@@ -393,8 +393,8 @@ export class RemoteCommandsProcessor extends CommandsProcessorBase {
|
|
393
393
|
FlowMonitorQueue.Instance.enable(false);
|
394
394
|
await this.ProcessResponse(respBuf, AccessHelper.mgDataTable.currMgdID, null, res);
|
395
395
|
if (RemoteCommandsProcessor.IsSessionReInitializing) {
|
396
|
-
AccessHelper.globalParams.RestoreParams(globalParamsString);
|
397
|
-
AccessHelper.envParamsTable.RestoreParams(envVarsString);
|
396
|
+
AccessHelper.globalParams.RestoreParams(globalParamsString, true);
|
397
|
+
AccessHelper.envParamsTable.RestoreParams(envVarsString, true);
|
398
398
|
let dataStorage = window.localStorage;
|
399
399
|
let ctxRemoved = dataStorage.getItem(ConstInterface.CTX_REMOVED_FROM_SRVR);
|
400
400
|
if (ctxRemoved === "1") {
|
@@ -880,4 +880,4 @@ class ErrorMessageXml {
|
|
880
880
|
return expired;
|
881
881
|
}
|
882
882
|
}
|
883
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlQ29tbWFuZHNQcm9jZXNzb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3JlbW90ZS9SZW1vdGVDb21tYW5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RhdGljIGxhc3RFeGNlcHRpb25NZXNzYWdlID0gbnVsbDtcclxuICBwcml2YXRlIHN0YXRpYyBJbml0aWFsVXJsOiBzdHJpbmcgPSBudWxsO1xyXG5cclxuXHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gIC8vICoqKioqKioqIFdoZW4gY2hhbmdpbmcgV0VCX0NPTU1VTklDQVRJT05fUFJPVE9DT0xfVkVSU0lPTiwgcGxlYXNlIGNoYW5nZSBvbiBtb2JpbGUgcGxhdGZvcm1zIGFzIHdlbGw6XHJcbiAgLy8gKioqKioqKiogVzEwTTogUmVtb3RlQ29tbWFuZHNQcm9jZXNzb3IuY3NcclxuICBwcml2YXRlIHN0YXRpYyByZWFkb25seSBXRUJfQ09NTVVOSUNBVElPTl9QUk9UT0NPTF9WRVJTSU9OOiBzdHJpbmcgPSBcIjE0MDAyXCI7XHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5cclxuICAvLyBUT0RPOiBDaGVjayBpZiB3ZSBuZWVkIF9sb2dBY2N1bXVsYXRvci5cclxuICAvLyBwcml2YXRlIF9sb2dBY2N1bXVsYXRvcjogQ2xpZW50TG9nQWNjdW11bGF0b3IgPSBudWxsO1xyXG5cclxuICBw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bW90ZUNvbW1hbmRzUHJvY2Vzc29yIGV4dGVuZHMgQ29tbWFuZHNQcm9jZXNzb3JCYXNlIHtcclxuICBzdGF0aWMgcmVhZG9ubHkgUkNfTk9fQ09OVEVYVF9JRDogc3RyaW5nID0gJy0xJztcclxuICBwcml2YXRlIHN0YXRpYyBfaW5zdGFuY2U6IFJlbW90ZUNvbW1hbmRzUHJvY2Vzc29yID0gbnVsbDtcclxuICBwdWJsaWMgc3RhdGljIElzU2Vzc2lvblJlSW5pdGlhbGl6aW5nID0gZmFsc2U7XHJcbiAgcHJpdmF0ZSBzdGF0aWMgbGFzdEV4Y2VwdGlvbk1lc3NhZ2UgPSBudWxsO1xyXG4gIHByaXZhdGUgc3RhdGljIEluaXRpYWxVcmw6IHN0cmluZyA9IG51bGw7XHJcblxyXG5cclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gIC8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAgLy8gKioqKioqKiogV2hlbiBjaGFuZ2luZyBXRUJfQ09NTVVOSUNBVElPTl9QUk9UT0NPTF9WRVJTSU9OLCBwbGVhc2UgY2hhbmdlIG9uIG1vYmlsZSBwbGF0Zm9ybXMgYXMgd2VsbDpcclxuICAvLyAqKioqKioqKiBXMTBNOiBSZW1vdGVDb21tYW5kc1Byb2Nlc3Nvci5jc1xyXG4gIHByaXZhdGUgc3RhdGljIHJlYWRvbmx5IFdFQl9DT01NVU5JQ0FUSU9OX1BST1RPQ09MX1ZFUlNJT046IHN0cmluZyA9IFwiMTQwMDJcIjtcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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AgICAgIHJlcXVlc3RTdGF0dXMudmFsdWUgPSBSZXF1ZXN0U3RhdHVzLlJldHJ5O1xyXG4gICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIGNhc2UgJ0EnOlxyXG4gICAgICAgICAgICAgICAgICBsZXQgcmV0dmFsID0gYXdhaXQgR1VJTWFuYWdlci5JbnN0YW5jZS5NZXNzYWdlQm94KFwiRXJyb3JcIiwgXCJVbmtub3duIGVycm9yIG9jY3VycmVkIGF0IHNlcnZlci1zaWRlLlwiICtcclxuICAgICAgICAgICAgICAgICAgICBcIiBXb3VsZCB5b3UgbGlrZSB0byByZWluaXRpYWxpemUgdGhlIHNlc3Npb24/XCIsIFN0eWxlcy5NU0dCT1hfQlVUVE9OX1lFU19OTyk7XHJcbiAgICAgICAgICAgICAgICAgIHJlcXVlc3RTdGF0dXMudmFsdWUgPSAocmV0dmFsID09IFN0eWxlcy5NU0dCT1hfUkVTVUxUX1lFUykgPyBSZXF1ZXN0U3RhdHVzLlJldHJ5IDogUmVxdWVzdFN0YXR1cy5BYm9ydDtcclxuICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdOJzpcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgIHJlcXVlc3RTdGF0dXMudmFsdWUgPSBSZXF1ZXN0U3RhdHVzLkFib3J0O1xyXG4gICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHJlcXVlc3RTdGF0dXMudmFsdWUgPT0gUmVxdWVzdFN0YXR1cy5BYm9ydCkge1xyXG4gICAgICAgICAgICAgIEVudmlyb25tZW50Lkluc3RhbmNlLnNldFdlYkNsaWVudFJlaW5pdFNlc3Npb24oJ04nKTtcclxuICAgICAgICAgICAgICB0aHJvdyAgZXg7XHJcbiAgICAgICAgICAgIH0gZWxzZS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