You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flagon.apache.org by po...@apache.org on 2021/04/03 00:32:59 UTC
[incubator-flagon-useralejs] 02/02: removed sendOnRefresh from src
for testing sendOnClose
This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch UncleGedd-sendOnClose
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git
commit b5d9674712f3b3837079947c773653f9894b16fc
Author: poorejc <po...@apache.org>
AuthorDate: Fri Apr 2 20:32:37 2021 -0400
removed sendOnRefresh from src for testing sendOnClose
---
build/UserALEWebExtension/content.js | 20 --------------------
build/userale-2.1.1.js | 20 --------------------
build/userale-2.1.1.min.js | 2 +-
package-lock.json | 12 +++++++++++-
src/attachHandlers.js | 1 -
src/sendLogs.js | 18 ------------------
6 files changed, 12 insertions(+), 61 deletions(-)
diff --git a/build/UserALEWebExtension/content.js b/build/UserALEWebExtension/content.js
index 5a52c22..edd2857 100644
--- a/build/UserALEWebExtension/content.js
+++ b/build/UserALEWebExtension/content.js
@@ -819,25 +819,6 @@ function sendOnInterval(logs, config) {
}, config.transmitInterval);
}
/**
- * Provides a simplified send function that can be called before events that would
- * refresh page can resolve so that log queue ('logs) can be shipped immediately. This
- * is different than sendOnClose because browser security practices prevent you from
- * listening the process responsible for window navigation actions, in action (e.g., refresh;
- * you can only detect, after the fact, the process responsible for the current window state.
- * @param {Array} logs Array of logs to read from.
- * @param {Object} config Configuration object to be read from.
- */
-
-function sendOnRefresh(logs, config) {
- if (!config.on) {
- return;
- }
-
- if (logs.length > 0) {
- sendLogs(logs, config, 1);
- }
-}
-/**
* Attempts to flush the remaining logs when the window is closed.
* @param {Array} logs Array of logs to be flushed.
* @param {Object} config Configuration object to be read from.
@@ -1030,7 +1011,6 @@ function attachHandlers(config) {
Object.keys(refreshEvents).forEach(function (ev) {
document.addEventListener(ev, function (e) {
packageLog(e, events[ev]);
- sendOnRefresh(logs$1, config);
}, true);
});
windowEvents.forEach(function (ev) {
diff --git a/build/userale-2.1.1.js b/build/userale-2.1.1.js
index f82cbe3..80f8247 100644
--- a/build/userale-2.1.1.js
+++ b/build/userale-2.1.1.js
@@ -821,25 +821,6 @@
}, config.transmitInterval);
}
/**
- * Provides a simplified send function that can be called before events that would
- * refresh page can resolve so that log queue ('logs) can be shipped immediately. This
- * is different than sendOnClose because browser security practices prevent you from
- * listening the process responsible for window navigation actions, in action (e.g., refresh;
- * you can only detect, after the fact, the process responsible for the current window state.
- * @param {Array} logs Array of logs to read from.
- * @param {Object} config Configuration object to be read from.
- */
-
- function sendOnRefresh(logs, config) {
- if (!config.on) {
- return;
- }
-
- if (logs.length > 0) {
- sendLogs(logs, config, 1);
- }
- }
- /**
* Attempts to flush the remaining logs when the window is closed.
* @param {Array} logs Array of logs to be flushed.
* @param {Object} config Configuration object to be read from.
@@ -1097,7 +1078,6 @@
Object.keys(refreshEvents).forEach(function (ev) {
document.addEventListener(ev, function (e) {
packageLog(e, events[ev]);
- sendOnRefresh(logs$1, config);
}, true);
});
windowEvents.forEach(function (ev) {
diff --git a/build/userale-2.1.1.min.js b/build/userale-2.1.1.min.js
index 1c9fee5..13323fd 100644
--- a/build/userale-2.1.1.min.js
+++ b/build/userale-2.1.1.min.js
@@ -16,4 +16,4 @@
* @preserved
*/
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).userale={})}(this,(function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t="2.1.1",o=null;fun [...]
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).userale={})}(this,(function(e){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t="2.1.1",o=null;fun [...]
diff --git a/package-lock.json b/package-lock.json
index 5bca08c..bbdac23 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2542,6 +2542,7 @@
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
+ "fsevents": "~2.3.1",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
@@ -2591,6 +2592,7 @@
"integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==",
"dev": true,
"dependencies": {
+ "colors": "^1.1.2",
"object-assign": "^4.1.0",
"string-width": "^4.2.0"
},
@@ -3500,7 +3502,8 @@
"esprima": "^4.0.1",
"estraverse": "^5.2.0",
"esutils": "^2.0.2",
- "optionator": "^0.8.1"
+ "optionator": "^0.8.1",
+ "source-map": "~0.6.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
@@ -5349,6 +5352,7 @@
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"dependencies": {
+ "graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
},
"optionalDependencies": {
@@ -7350,6 +7354,9 @@
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.44.0.tgz",
"integrity": "sha512-rGSF4pLwvuaH/x4nAS+zP6UNn5YUDWf/TeEU5IoXSZKBbKRNTCI3qMnYXKZgrC0D2KzS2baiOZt1OlqhMu5rnQ==",
"dev": true,
+ "dependencies": {
+ "fsevents": "~2.3.1"
+ },
"bin": {
"rollup": "dist/bin/rollup"
},
@@ -7395,6 +7402,9 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.1.6"
+ },
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
diff --git a/src/attachHandlers.js b/src/attachHandlers.js
index 5baa201..1981629 100644
--- a/src/attachHandlers.js
+++ b/src/attachHandlers.js
@@ -149,7 +149,6 @@ export function attachHandlers(config) {
Object.keys(refreshEvents).forEach(function(ev) {
document.addEventListener(ev, function(e) {
packageLog(e, events[ev]);
- sendOnRefresh(logs,config);
}, true);
});
diff --git a/src/sendLogs.js b/src/sendLogs.js
index 1680461..2891c72 100644
--- a/src/sendLogs.js
+++ b/src/sendLogs.js
@@ -54,24 +54,6 @@ export function sendOnInterval(logs, config) {
}
/**
- * Provides a simplified send function that can be called before events that would
- * refresh page can resolve so that log queue ('logs) can be shipped immediately. This
- * is different than sendOnClose because browser security practices prevent you from
- * listening the process responsible for window navigation actions, in action (e.g., refresh;
- * you can only detect, after the fact, the process responsible for the current window state.
- * @param {Array} logs Array of logs to read from.
- * @param {Object} config Configuration object to be read from.
- */
-export function sendOnRefresh(logs, config) {
- if (!config.on) {
- return;
- }
- if (logs.length > 0) {
- sendLogs(logs, config, 1);
- }
-}
-
-/**
* Attempts to flush the remaining logs when the window is closed.
* @param {Array} logs Array of logs to be flushed.
* @param {Object} config Configuration object to be read from.