@wdio/sumologic-reporter 9.31.6 → 9.32.0-alpha.0
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/build/index.d.ts +0 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -13
- package/package.json +5 -5
package/build/index.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ export default class SumoLogicReporter extends WDIOReporter {
|
|
|
10
10
|
private _unsynced;
|
|
11
11
|
private _isSynchronising;
|
|
12
12
|
private _hasRunnerEnd;
|
|
13
|
-
private _retryDelay;
|
|
14
|
-
private _nextRetryAt;
|
|
15
13
|
constructor(options: Options);
|
|
16
14
|
get isSynchronised(): boolean;
|
|
17
15
|
onRunnerStart(runner: RunnerStats): void;
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAGzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAGzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AA4BzC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,YAAY;IACvD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAgB;IAEjC,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,aAAa,CAAQ;gBAEjB,OAAO,EAAE,OAAO;IAmB5B,IAAI,cAAc,YAEjB;IAED,aAAa,CAAC,MAAM,EAAE,WAAW;IAQjC,YAAY,CAAC,KAAK,EAAE,UAAU;IAQ9B,WAAW,CAAC,IAAI,EAAE,SAAS;IAQ3B,UAAU,CAAC,IAAI,EAAE,SAAS;IAQ1B,UAAU,CAAC,IAAI,EAAE,SAAS;IAQ1B,UAAU,CAAC,IAAI,EAAE,SAAS;IAQ1B,SAAS,CAAC,IAAI,EAAE,SAAS;IAQzB,UAAU,CAAC,KAAK,EAAE,UAAU;IAQ5B,WAAW,CAAC,MAAM,EAAE,WAAW;IASzB,IAAI;CA8Cb;AAED,cAAc,YAAY,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,cAAe,SAAQ,OAAO;SAAG;KAC9C;CACJ"}
|
package/build/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import WDIOReporter from "@wdio/reporter";
|
|
|
4
4
|
import logger from "@wdio/logger";
|
|
5
5
|
var log = logger("@wdio/sumologic-reporter");
|
|
6
6
|
var MAX_LINES = 100;
|
|
7
|
-
var MAX_RETRY_DELAY = 1e3;
|
|
8
7
|
function formatDate(date) {
|
|
9
8
|
const year = date.getFullYear();
|
|
10
9
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
@@ -26,8 +25,6 @@ var SumoLogicReporter = class extends WDIOReporter {
|
|
|
26
25
|
_unsynced = [];
|
|
27
26
|
_isSynchronising = false;
|
|
28
27
|
_hasRunnerEnd = false;
|
|
29
|
-
_retryDelay = 0;
|
|
30
|
-
_nextRetryAt = 0;
|
|
31
28
|
constructor(options) {
|
|
32
29
|
super(options);
|
|
33
30
|
this._options = Object.assign({
|
|
@@ -115,7 +112,7 @@ var SumoLogicReporter = class extends WDIOReporter {
|
|
|
115
112
|
if (this._hasRunnerEnd && this._unsynced.length === 0) {
|
|
116
113
|
clearInterval(this._interval);
|
|
117
114
|
}
|
|
118
|
-
if (this._isSynchronising || this._unsynced.length === 0 || typeof this._options.sourceAddress !== "string"
|
|
115
|
+
if (this._isSynchronising || this._unsynced.length === 0 || typeof this._options.sourceAddress !== "string") {
|
|
119
116
|
return;
|
|
120
117
|
}
|
|
121
118
|
const logLines = this._unsynced.slice(0, MAX_LINES).join("\n");
|
|
@@ -126,19 +123,11 @@ var SumoLogicReporter = class extends WDIOReporter {
|
|
|
126
123
|
method: "POST",
|
|
127
124
|
body: JSON.stringify(logLines)
|
|
128
125
|
});
|
|
129
|
-
this._retryDelay = 0;
|
|
130
|
-
this._nextRetryAt = 0;
|
|
131
126
|
this._unsynced.splice(0, MAX_LINES);
|
|
127
|
+
this._isSynchronising = false;
|
|
132
128
|
return log.debug(`synchronised collector data, server status: ${resp.status}`);
|
|
133
129
|
} catch (err) {
|
|
134
|
-
this._retryDelay = Math.min(
|
|
135
|
-
Math.max(this._options.syncInterval ?? 100, this._retryDelay * 2),
|
|
136
|
-
MAX_RETRY_DELAY
|
|
137
|
-
);
|
|
138
|
-
this._nextRetryAt = Date.now() + this._retryDelay;
|
|
139
130
|
return log.error("failed send data to Sumo Logic:\n", err.stack);
|
|
140
|
-
} finally {
|
|
141
|
-
this._isSynchronising = false;
|
|
142
131
|
}
|
|
143
132
|
}
|
|
144
133
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/sumologic-reporter",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.32.0-alpha.0+9114fbe1b",
|
|
4
4
|
"description": "A WebdriverIO reporter that sends test results to Sumologic for data analyses",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-sumologic-reporter",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"typeScriptVersion": "3.8.3",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@wdio/logger": "9.
|
|
36
|
-
"@wdio/reporter": "9.
|
|
37
|
-
"@wdio/types": "9.
|
|
35
|
+
"@wdio/logger": "9.32.0-alpha.0+9114fbe1b",
|
|
36
|
+
"@wdio/reporter": "9.32.0-alpha.0+9114fbe1b",
|
|
37
|
+
"@wdio/types": "9.32.0-alpha.0+9114fbe1b",
|
|
38
38
|
"json-stringify-safe": "^5.0.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9114fbe1b96afa8c06b51187c174487814770318"
|
|
47
47
|
}
|