@wdio/sumologic-reporter 7.20.7 → 8.0.0-alpha.213

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 CHANGED
@@ -22,7 +22,7 @@ export default class SumoLogicReporter extends WDIOReporter {
22
22
  onRunnerEnd(runner: RunnerStats): void;
23
23
  sync(): Promise<void>;
24
24
  }
25
- export * from './types';
25
+ export * from './types.js';
26
26
  declare global {
27
27
  namespace WebdriverIO {
28
28
  interface ReporterOption extends Options {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAOtC;;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,SAAS,CAAA;AAEvB,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,WAAW,CAAC;QAClB,UAAU,cAAe,SAAQ,OAAO;SAAG;KAC9C;CACJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAOtC;;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
@@ -1,34 +1,15 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- const got_1 = __importDefault(require("got"));
21
- const dateformat_1 = __importDefault(require("dateformat"));
22
- const json_stringify_safe_1 = __importDefault(require("json-stringify-safe"));
23
- const reporter_1 = __importDefault(require("@wdio/reporter"));
24
- const logger_1 = __importDefault(require("@wdio/logger"));
25
- const log = (0, logger_1.default)('@wdio/sumologic-reporter');
1
+ import got from 'got';
2
+ import dateFormat from 'dateformat';
3
+ import stringify from 'json-stringify-safe';
4
+ import WDIOReporter from '@wdio/reporter';
5
+ import logger from '@wdio/logger';
6
+ const log = logger('@wdio/sumologic-reporter');
26
7
  const MAX_LINES = 100;
27
8
  const DATE_FORMAT = 'yyyy-mm-dd HH:mm:ss,l o';
28
9
  /**
29
10
  * Initialize a new sumologic test reporter.
30
11
  */
31
- class SumoLogicReporter extends reporter_1.default {
12
+ export default class SumoLogicReporter extends WDIOReporter {
32
13
  constructor(options) {
33
14
  super(options);
34
15
  this._unsynced = [];
@@ -52,65 +33,65 @@ class SumoLogicReporter extends reporter_1.default {
52
33
  return this._unsynced.length === 0;
53
34
  }
54
35
  onRunnerStart(runner) {
55
- this._unsynced.push((0, json_stringify_safe_1.default)({
56
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
36
+ this._unsynced.push(stringify({
37
+ time: dateFormat(new Date(), DATE_FORMAT),
57
38
  event: 'runner:start',
58
39
  data: runner
59
40
  }));
60
41
  }
61
42
  onSuiteStart(suite) {
62
- this._unsynced.push((0, json_stringify_safe_1.default)({
63
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
43
+ this._unsynced.push(stringify({
44
+ time: dateFormat(new Date(), DATE_FORMAT),
64
45
  event: 'suite:start',
65
46
  data: suite
66
47
  }));
67
48
  }
68
49
  onTestStart(test) {
69
- this._unsynced.push((0, json_stringify_safe_1.default)({
70
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
50
+ this._unsynced.push(stringify({
51
+ time: dateFormat(new Date(), DATE_FORMAT),
71
52
  event: 'test:start',
72
53
  data: test
73
54
  }));
74
55
  }
75
56
  onTestSkip(test) {
76
- this._unsynced.push((0, json_stringify_safe_1.default)({
77
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
57
+ this._unsynced.push(stringify({
58
+ time: dateFormat(new Date(), DATE_FORMAT),
78
59
  event: 'test:skip',
79
60
  data: test
80
61
  }));
81
62
  }
82
63
  onTestPass(test) {
83
- this._unsynced.push((0, json_stringify_safe_1.default)({
84
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
64
+ this._unsynced.push(stringify({
65
+ time: dateFormat(new Date(), DATE_FORMAT),
85
66
  event: 'test:pass',
86
67
  data: test
87
68
  }));
88
69
  }
89
70
  onTestFail(test) {
90
- this._unsynced.push((0, json_stringify_safe_1.default)({
91
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
71
+ this._unsynced.push(stringify({
72
+ time: dateFormat(new Date(), DATE_FORMAT),
92
73
  event: 'test:fail',
93
74
  data: test
94
75
  }));
95
76
  }
96
77
  onTestEnd(test) {
97
- this._unsynced.push((0, json_stringify_safe_1.default)({
98
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
78
+ this._unsynced.push(stringify({
79
+ time: dateFormat(new Date(), DATE_FORMAT),
99
80
  event: 'test:end',
100
81
  data: test
101
82
  }));
102
83
  }
103
84
  onSuiteEnd(suite) {
104
- this._unsynced.push((0, json_stringify_safe_1.default)({
105
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
85
+ this._unsynced.push(stringify({
86
+ time: dateFormat(new Date(), DATE_FORMAT),
106
87
  event: 'suite:end',
107
88
  data: suite
108
89
  }));
109
90
  }
110
91
  onRunnerEnd(runner) {
111
92
  this._hasRunnerEnd = true;
112
- this._unsynced.push((0, json_stringify_safe_1.default)({
113
- time: (0, dateformat_1.default)(new Date(), DATE_FORMAT),
93
+ this._unsynced.push(stringify({
94
+ time: dateFormat(new Date(), DATE_FORMAT),
114
95
  event: 'runner:end',
115
96
  data: runner
116
97
  }));
@@ -138,7 +119,7 @@ class SumoLogicReporter extends reporter_1.default {
138
119
  this._isSynchronising = true;
139
120
  log.debug('start synchronization');
140
121
  try {
141
- const resp = await (0, got_1.default)(this._options.sourceAddress, {
122
+ const resp = await got(this._options.sourceAddress, {
142
123
  method: 'POST',
143
124
  json: logLines
144
125
  });
@@ -157,5 +138,4 @@ class SumoLogicReporter extends reporter_1.default {
157
138
  }
158
139
  }
159
140
  }
160
- exports.default = SumoLogicReporter;
161
- __exportStar(require("./types"), exports);
141
+ export * from './types.js';
package/build/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Reporters } from '@wdio/types';
1
+ import type { Reporters } from '@wdio/types';
2
2
  export interface Options extends Partial<Reporters.Options> {
3
3
  /**
4
4
  * define sync interval how often logs get pushed to Sumologic
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,WAAW,OAAQ,SAAQ,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;IACvD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,OAAQ,SAAQ,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;IACvD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB"}
package/build/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@wdio/sumologic-reporter",
3
- "version": "7.20.7",
3
+ "version": "8.0.0-alpha.213+c5fb6d57e",
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",
7
7
  "license": "MIT",
8
- "main": "./build/index",
9
8
  "engines": {
10
- "node": ">=12.0.0"
9
+ "node": "^16.13 || >=18"
11
10
  },
12
11
  "repository": {
13
12
  "type": "git",
@@ -21,14 +20,18 @@
21
20
  "bugs": {
22
21
  "url": "https://github.com/webdriverio/webdriverio/issues"
23
22
  },
23
+ "type": "module",
24
+ "exports": "./build/index.js",
25
+ "types": "./build/index.d.ts",
26
+ "typeScriptVersion": "3.8.3",
24
27
  "dependencies": {
25
28
  "@types/dateformat": "^5.0.0",
26
29
  "@types/json-stringify-safe": "^5.0.0",
27
- "@wdio/logger": "7.19.0",
28
- "@wdio/reporter": "7.20.7",
29
- "@wdio/types": "7.20.7",
30
+ "@wdio/logger": "8.0.0-alpha.213+c5fb6d57e",
31
+ "@wdio/reporter": "8.0.0-alpha.213+c5fb6d57e",
32
+ "@wdio/types": "8.0.0-alpha.213+c5fb6d57e",
30
33
  "dateformat": "4.5.1",
31
- "got": "^11.0.2",
34
+ "got": "^12.1.0",
32
35
  "json-stringify-safe": "^5.0.1"
33
36
  },
34
37
  "peerDependencies": {
@@ -37,6 +40,5 @@
37
40
  "publishConfig": {
38
41
  "access": "public"
39
42
  },
40
- "types": "./build/index.d.ts",
41
- "gitHead": "21b8b61453f4749d87eca3e4d7d6e5e2cb60f043"
43
+ "gitHead": "c5fb6d57e168d8bf939a5aa5c2ada5abaceec5eb"
42
44
  }