mftsccs-browser 2.1.88-beta → 2.1.89-beta

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.
@@ -25936,45 +25936,44 @@ function checkIfExecutingProcess(messageId, type) {
25936
25936
  }
25937
25937
  });
25938
25938
  }
25939
- const myCacheServer = sessionStorage.getItem("myCacheServer");
25940
- function getCacheServer(data) {
25941
- return __awaiter(this, void 0, void 0, function* () {
25942
- try {
25943
- const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.getMyCacheServer(), {
25944
- method: "POST",
25945
- headers: {
25946
- "Content-Type": "application/json",
25947
- },
25948
- body: JSON.stringify({
25949
- "my-coords": data ? data.coords : "location denied",
25950
- }),
25951
- });
25952
- if (!response.ok) {
25953
- throw new Error("Failed to sync data to the server.");
25954
- }
25955
- const cacheRes = yield response.json();
25956
- if (cacheRes.success) {
25957
- sessionStorage.setItem("myCacheServer", cacheRes.nearestServer);
25958
- _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_CACHE_URL = cacheRes.nearestServer;
25959
- }
25960
- }
25961
- catch (error) {
25962
- console.error("error getting cache server", error.message);
25963
- }
25964
- });
25965
- }
25966
- if (!myCacheServer) {
25967
- navigator.geolocation.getCurrentPosition((data) => __awaiter(void 0, void 0, void 0, function* () {
25968
- yield getCacheServer(data);
25969
- }), (error) => __awaiter(void 0, void 0, void 0, function* () {
25970
- if (error.code === error.PERMISSION_DENIED) {
25971
- yield getCacheServer();
25972
- }
25973
- }));
25974
- }
25975
- else {
25976
- _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_CACHE_URL = myCacheServer;
25977
- }
25939
+ // const myCacheServer = sessionStorage.getItem("myCacheServer")
25940
+ // async function getCacheServer(data?: any) {
25941
+ // try {
25942
+ // const response = await fetch(BaseUrl.getMyCacheServer(), {
25943
+ // method: "POST",
25944
+ // headers: {
25945
+ // "Content-Type": "application/json",
25946
+ // },
25947
+ // body: JSON.stringify({
25948
+ // "my-coords": data ? data.coords : "location denied",
25949
+ // }),
25950
+ // });
25951
+ // if (!response.ok) {
25952
+ // throw new Error("Failed to sync data to the server.");
25953
+ // }
25954
+ // const cacheRes = await response.json();
25955
+ // if (cacheRes.success) {
25956
+ // sessionStorage.setItem("myCacheServer", cacheRes.nearestServer);
25957
+ // BaseUrl.NODE_CACHE_URL = cacheRes.nearestServer;
25958
+ // }
25959
+ // } catch (error: any) {
25960
+ // console.error("error getting cache server", error.message);
25961
+ // }
25962
+ // }
25963
+ // if (!myCacheServer) {
25964
+ // navigator.geolocation.getCurrentPosition(
25965
+ // async (data) => {
25966
+ // await getCacheServer(data);
25967
+ // },
25968
+ // async (error) => {
25969
+ // if (error.code === error.PERMISSION_DENIED) {
25970
+ // await getCacheServer();
25971
+ // }
25972
+ // }
25973
+ // );
25974
+ // } else {
25975
+ // BaseUrl.NODE_CACHE_URL = myCacheServer;
25976
+ // }
25978
25977
 
25979
25978
 
25980
25979
  /***/ })