mftsccs-browser 1.1.65-beta → 1.1.67-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.
package/dist/main.bundle.js
CHANGED
|
@@ -318,6 +318,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
318
318
|
/* harmony export */ Anomaly: () => (/* binding */ Anomaly)
|
|
319
319
|
/* harmony export */ });
|
|
320
320
|
/* harmony import */ var _Validator_constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Validator/constant */ "./src/Validator/constant.ts");
|
|
321
|
+
/* harmony import */ var _src_app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../src/app */ "./src/app.ts");
|
|
321
322
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
322
323
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
323
324
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -328,6 +329,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
328
329
|
});
|
|
329
330
|
};
|
|
330
331
|
|
|
332
|
+
|
|
331
333
|
/**
|
|
332
334
|
* Class representing the Anomaly detection logic for checking data validity based on predefined rules.
|
|
333
335
|
* This class contains methods for initializing, caching, and fetching anomaly parameters from an external API,
|
|
@@ -534,6 +536,21 @@ class Anomaly {
|
|
|
534
536
|
}
|
|
535
537
|
});
|
|
536
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* List all the exported functions of the package
|
|
541
|
+
* @returns Keys of the Object which has exported functions
|
|
542
|
+
*/
|
|
543
|
+
static getExportedFunction() {
|
|
544
|
+
console.log("Main : ", _src_app__WEBPACK_IMPORTED_MODULE_1__);
|
|
545
|
+
const the_exported_list = Object.keys(_src_app__WEBPACK_IMPORTED_MODULE_1__);
|
|
546
|
+
let the_function_s_name = [];
|
|
547
|
+
// the_exported_list.forEach(the_function_name => {
|
|
548
|
+
// if (typeof main[the_function_name] === 'function') {
|
|
549
|
+
// the_function_s_name.push(the_function_name);
|
|
550
|
+
// }
|
|
551
|
+
// });
|
|
552
|
+
return the_function_s_name;
|
|
553
|
+
}
|
|
537
554
|
}
|
|
538
555
|
/**
|
|
539
556
|
* Static cache for storing fetched anomaly parameters.
|
|
@@ -11318,7 +11335,7 @@ class ApplicationMonitor {
|
|
|
11318
11335
|
classes: target.className,
|
|
11319
11336
|
text: (_a = target.innerText) === null || _a === void 0 ? void 0 : _a.slice(0, 50),
|
|
11320
11337
|
};
|
|
11321
|
-
|
|
11338
|
+
// Logger.logApplication("INFO", message, details)
|
|
11322
11339
|
});
|
|
11323
11340
|
document.addEventListener("input", (event) => {
|
|
11324
11341
|
const target = event.target;
|
|
@@ -11328,14 +11345,14 @@ class ApplicationMonitor {
|
|
|
11328
11345
|
id: target.id,
|
|
11329
11346
|
value: target.value,
|
|
11330
11347
|
};
|
|
11331
|
-
|
|
11348
|
+
// Logger.logApplication("INFO", message, details)
|
|
11332
11349
|
});
|
|
11333
11350
|
document.addEventListener("scroll", () => {
|
|
11334
11351
|
const message = "User Scroll";
|
|
11335
11352
|
const details = {
|
|
11336
11353
|
position: window.scrollY,
|
|
11337
11354
|
};
|
|
11338
|
-
|
|
11355
|
+
// Logger.logApplication("INFO", message, details)
|
|
11339
11356
|
});
|
|
11340
11357
|
}
|
|
11341
11358
|
static logNetworkRequests() {
|
|
@@ -11375,7 +11392,7 @@ class ApplicationMonitor {
|
|
|
11375
11392
|
url: urlString,
|
|
11376
11393
|
status: response.status,
|
|
11377
11394
|
};
|
|
11378
|
-
|
|
11395
|
+
// Logger.logApplication("INFO", "Network Request", networkDetails)
|
|
11379
11396
|
return response;
|
|
11380
11397
|
}
|
|
11381
11398
|
catch (error) {
|
|
@@ -11409,7 +11426,7 @@ class ApplicationMonitor {
|
|
|
11409
11426
|
loadTime: timing.loadEventEnd - timing.navigationStart,
|
|
11410
11427
|
domContentLoadedTime: timing.domContentLoadedEventEnd - timing.navigationStart,
|
|
11411
11428
|
};
|
|
11412
|
-
|
|
11429
|
+
// Logger.logApplication("INFO", "Performance Metrics", details)
|
|
11413
11430
|
});
|
|
11414
11431
|
}
|
|
11415
11432
|
// Log route changes (SPAs)
|
|
@@ -11420,14 +11437,14 @@ class ApplicationMonitor {
|
|
|
11420
11437
|
const urlChange = {
|
|
11421
11438
|
url: (_a = args[2]) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
11422
11439
|
};
|
|
11423
|
-
|
|
11440
|
+
// Logger.logApplication("INFO", "Route Change", urlChange )
|
|
11424
11441
|
return pushState.apply(this, args);
|
|
11425
11442
|
};
|
|
11426
11443
|
window === null || window === void 0 ? void 0 : window.addEventListener("popstate", () => {
|
|
11427
11444
|
const urlChange = {
|
|
11428
11445
|
url: location.href
|
|
11429
11446
|
};
|
|
11430
|
-
|
|
11447
|
+
// Logger.logApplication("INFO", "Route Changed (Back/Forward)", urlChange)
|
|
11431
11448
|
});
|
|
11432
11449
|
}
|
|
11433
11450
|
// Log WebSocket events
|
|
@@ -11443,14 +11460,14 @@ class ApplicationMonitor {
|
|
|
11443
11460
|
const data = {
|
|
11444
11461
|
"url": url.toString()
|
|
11445
11462
|
};
|
|
11446
|
-
|
|
11463
|
+
// Logger.logApplication("INFO", message, data)
|
|
11447
11464
|
this.addEventListener("message", (event) => {
|
|
11448
11465
|
const message = "WebSocket Message";
|
|
11449
11466
|
const data = {
|
|
11450
11467
|
"url": url,
|
|
11451
11468
|
"data": event.data
|
|
11452
11469
|
};
|
|
11453
|
-
|
|
11470
|
+
// Logger.logApplication("INFO", message, data)
|
|
11454
11471
|
});
|
|
11455
11472
|
this.addEventListener("error", (error) => {
|
|
11456
11473
|
const message = "WebSocket Error";
|
|
@@ -11458,14 +11475,14 @@ class ApplicationMonitor {
|
|
|
11458
11475
|
"url": url,
|
|
11459
11476
|
"error": error instanceof Error ? error.message : String(error),
|
|
11460
11477
|
};
|
|
11461
|
-
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("
|
|
11478
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("ERROR", message, data);
|
|
11462
11479
|
});
|
|
11463
11480
|
this.addEventListener("close", () => {
|
|
11464
11481
|
const message = "WebSocket Closed";
|
|
11465
11482
|
const data = {
|
|
11466
11483
|
"url": url,
|
|
11467
11484
|
};
|
|
11468
|
-
|
|
11485
|
+
// Logger.logApplication("INFO", message, data)
|
|
11469
11486
|
});
|
|
11470
11487
|
}
|
|
11471
11488
|
};
|
|
@@ -22904,10 +22921,12 @@ function sendMessage(type, payload) {
|
|
|
22904
22921
|
// serviceWorker?.postMessage({ type, payload });
|
|
22905
22922
|
// Send the message to the service worker
|
|
22906
22923
|
if (navigator.serviceWorker.controller) {
|
|
22907
|
-
serviceWorker.postMessage({ type, payload: newPayload });
|
|
22924
|
+
navigator.serviceWorker.controller.postMessage({ type, payload: newPayload });
|
|
22908
22925
|
}
|
|
22909
22926
|
else if (serviceWorker) {
|
|
22910
22927
|
console.warn(`controller not found but serviceWorker is available. messageId: ${messageId}, type: ${type}`);
|
|
22928
|
+
if (serviceWorkerReady)
|
|
22929
|
+
console.warn('service worker was registered already but navigator is empty!!!', serviceWorker);
|
|
22911
22930
|
try {
|
|
22912
22931
|
serviceWorker.postMessage({ type, payload: newPayload });
|
|
22913
22932
|
}
|