@elastic/synthetics 1.0.0-beta.3 → 1.0.0-beta.32

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.
Files changed (202) hide show
  1. package/README.md +4 -3
  2. package/dist/cli.js +123 -161
  3. package/dist/cli.js.map +1 -1
  4. package/dist/common_types.d.ts +159 -34
  5. package/dist/common_types.d.ts.map +1 -1
  6. package/dist/config.d.ts +2 -5
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/config.js +5 -5
  9. package/dist/config.js.map +1 -1
  10. package/dist/core/browser-service.js +5 -5
  11. package/dist/core/browser-service.js.map +1 -1
  12. package/dist/core/expect.d.ts +25 -25
  13. package/dist/core/expect.d.ts.map +1 -1
  14. package/dist/core/expect.js.map +1 -1
  15. package/dist/core/gatherer.d.ts +4 -8
  16. package/dist/core/gatherer.d.ts.map +1 -1
  17. package/dist/core/gatherer.js +49 -15
  18. package/dist/core/gatherer.js.map +1 -1
  19. package/dist/core/index.d.ts +5 -1
  20. package/dist/core/index.d.ts.map +1 -1
  21. package/dist/core/index.js +23 -11
  22. package/dist/core/index.js.map +1 -1
  23. package/dist/core/logger.d.ts +0 -1
  24. package/dist/core/logger.d.ts.map +1 -1
  25. package/dist/core/logger.js +3 -16
  26. package/dist/core/logger.js.map +1 -1
  27. package/dist/core/runner.d.ts +21 -65
  28. package/dist/core/runner.d.ts.map +1 -1
  29. package/dist/core/runner.js +212 -93
  30. package/dist/core/runner.js.map +1 -1
  31. package/dist/dsl/index.js +5 -1
  32. package/dist/dsl/index.js.map +1 -1
  33. package/dist/dsl/journey.d.ts +9 -4
  34. package/dist/dsl/journey.d.ts.map +1 -1
  35. package/dist/dsl/journey.js +27 -7
  36. package/dist/dsl/journey.js.map +1 -1
  37. package/dist/dsl/monitor.d.ts +66 -0
  38. package/dist/dsl/monitor.d.ts.map +1 -0
  39. package/dist/dsl/monitor.js +63 -0
  40. package/dist/dsl/monitor.js.map +1 -0
  41. package/dist/dsl/step.d.ts +3 -2
  42. package/dist/dsl/step.d.ts.map +1 -1
  43. package/dist/dsl/step.js +2 -1
  44. package/dist/dsl/step.js.map +1 -1
  45. package/dist/formatter/javascript.d.ts +98 -0
  46. package/dist/formatter/javascript.d.ts.map +1 -0
  47. package/dist/formatter/javascript.js +295 -0
  48. package/dist/formatter/javascript.js.map +1 -0
  49. package/dist/generator/index.d.ts +29 -0
  50. package/dist/generator/index.d.ts.map +1 -0
  51. package/dist/generator/index.js +240 -0
  52. package/dist/generator/index.js.map +1 -0
  53. package/dist/{reporters/reporter.js → generator/utils.d.ts} +5 -3
  54. package/dist/generator/utils.d.ts.map +1 -0
  55. package/dist/generator/utils.js +80 -0
  56. package/dist/generator/utils.js.map +1 -0
  57. package/dist/helpers.d.ts +24 -1
  58. package/dist/helpers.d.ts.map +1 -1
  59. package/dist/helpers.js +126 -19
  60. package/dist/helpers.js.map +1 -1
  61. package/dist/index.d.ts +6 -7
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +5 -26
  64. package/dist/index.js.map +1 -1
  65. package/dist/{parse_args.d.ts → loader.d.ts} +2 -5
  66. package/dist/loader.d.ts.map +1 -0
  67. package/dist/loader.js +152 -0
  68. package/dist/loader.js.map +1 -0
  69. package/dist/locations/index.d.ts +45 -0
  70. package/dist/locations/index.d.ts.map +1 -0
  71. package/dist/locations/index.js +90 -0
  72. package/dist/locations/index.js.map +1 -0
  73. package/dist/{reporters/reporter.d.ts → locations/public-locations.d.ts} +12 -8
  74. package/dist/locations/public-locations.d.ts.map +1 -0
  75. package/dist/locations/public-locations.js +41 -0
  76. package/dist/locations/public-locations.js.map +1 -0
  77. package/dist/options.d.ts +41 -0
  78. package/dist/options.d.ts.map +1 -0
  79. package/dist/options.js +182 -0
  80. package/dist/options.js.map +1 -0
  81. package/dist/plugins/browser-console.d.ts +5 -4
  82. package/dist/plugins/browser-console.d.ts.map +1 -1
  83. package/dist/plugins/browser-console.js +27 -8
  84. package/dist/plugins/browser-console.js.map +1 -1
  85. package/dist/plugins/index.js +5 -1
  86. package/dist/plugins/index.js.map +1 -1
  87. package/dist/plugins/network.d.ts +20 -33
  88. package/dist/plugins/network.d.ts.map +1 -1
  89. package/dist/plugins/network.js +173 -214
  90. package/dist/plugins/network.js.map +1 -1
  91. package/dist/plugins/performance.d.ts +4 -19
  92. package/dist/plugins/performance.d.ts.map +1 -1
  93. package/dist/plugins/performance.js +5 -5
  94. package/dist/plugins/performance.js.map +1 -1
  95. package/dist/plugins/plugin-manager.d.ts +9 -5
  96. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  97. package/dist/plugins/plugin-manager.js +44 -29
  98. package/dist/plugins/plugin-manager.js.map +1 -1
  99. package/dist/plugins/tracing.d.ts +6 -6
  100. package/dist/plugins/tracing.d.ts.map +1 -1
  101. package/dist/plugins/tracing.js +8 -7
  102. package/dist/plugins/tracing.js.map +1 -1
  103. package/dist/push/bundler.d.ts +34 -0
  104. package/dist/push/bundler.d.ts.map +1 -0
  105. package/dist/push/bundler.js +123 -0
  106. package/dist/push/bundler.js.map +1 -0
  107. package/dist/push/index.d.ts +33 -0
  108. package/dist/push/index.d.ts.map +1 -0
  109. package/dist/push/index.js +174 -0
  110. package/dist/push/index.js.map +1 -0
  111. package/dist/push/monitor.d.ts +34 -0
  112. package/dist/push/monitor.d.ts.map +1 -0
  113. package/dist/push/monitor.js +78 -0
  114. package/dist/push/monitor.js.map +1 -0
  115. package/{src/reporters/reporter.ts → dist/push/plugin.d.ts} +8 -10
  116. package/dist/push/plugin.d.ts.map +1 -0
  117. package/dist/push/plugin.js +133 -0
  118. package/dist/push/plugin.js.map +1 -0
  119. package/dist/push/request.d.ts +43 -0
  120. package/dist/push/request.d.ts.map +1 -0
  121. package/dist/push/request.js +83 -0
  122. package/dist/push/request.js.map +1 -0
  123. package/dist/reporters/base.d.ts +14 -6
  124. package/dist/reporters/base.d.ts.map +1 -1
  125. package/dist/reporters/base.js +54 -48
  126. package/dist/reporters/base.js.map +1 -1
  127. package/dist/reporters/index.d.ts +18 -8
  128. package/dist/reporters/index.d.ts.map +1 -1
  129. package/dist/reporters/index.js.map +1 -1
  130. package/dist/reporters/json.d.ts +18 -67
  131. package/dist/reporters/json.d.ts.map +1 -1
  132. package/dist/reporters/json.js +153 -175
  133. package/dist/reporters/json.js.map +1 -1
  134. package/dist/reporters/junit.d.ts +7 -1
  135. package/dist/reporters/junit.d.ts.map +1 -1
  136. package/dist/reporters/junit.js +94 -89
  137. package/dist/reporters/junit.js.map +1 -1
  138. package/dist/sdk/lh-trace-processor.d.ts +35 -9
  139. package/dist/sdk/lh-trace-processor.d.ts.map +1 -1
  140. package/dist/sdk/lh-trace-processor.js +114 -53
  141. package/dist/sdk/lh-trace-processor.js.map +1 -1
  142. package/dist/sdk/trace-metrics.d.ts +4 -4
  143. package/dist/sdk/trace-metrics.d.ts.map +1 -1
  144. package/dist/sdk/trace-metrics.js +5 -6
  145. package/dist/sdk/trace-metrics.js.map +1 -1
  146. package/dist/sdk/trace-processor.d.ts +11 -3
  147. package/dist/sdk/trace-processor.d.ts.map +1 -1
  148. package/dist/sdk/trace-processor.js +17 -9
  149. package/dist/sdk/trace-processor.js.map +1 -1
  150. package/dist/tsconfig.tsbuildinfo +1 -1888
  151. package/package.json +32 -20
  152. package/src/cli.ts +205 -152
  153. package/src/common_types.ts +192 -34
  154. package/src/config.ts +2 -5
  155. package/src/core/expect.ts +58 -24
  156. package/src/core/gatherer.ts +59 -24
  157. package/src/core/index.ts +36 -15
  158. package/src/core/logger.ts +1 -12
  159. package/src/core/runner.ts +215 -152
  160. package/src/dsl/journey.ts +37 -6
  161. package/src/dsl/monitor.ts +88 -0
  162. package/src/dsl/step.ts +9 -2
  163. package/src/formatter/javascript.ts +367 -0
  164. package/src/generator/index.ts +316 -0
  165. package/src/generator/utils.ts +80 -0
  166. package/src/helpers.ts +132 -12
  167. package/src/index.ts +22 -22
  168. package/src/loader.ts +171 -0
  169. package/src/locations/index.ts +108 -0
  170. package/src/locations/public-locations.ts +38 -0
  171. package/src/options.ts +211 -0
  172. package/src/plugins/browser-console.ts +30 -8
  173. package/src/plugins/network.ts +208 -267
  174. package/src/plugins/performance.ts +6 -22
  175. package/src/plugins/plugin-manager.ts +49 -31
  176. package/src/plugins/tracing.ts +8 -9
  177. package/src/push/bundler.ts +100 -0
  178. package/src/push/index.ts +202 -0
  179. package/src/push/monitor.ts +96 -0
  180. package/src/push/plugin.ts +119 -0
  181. package/src/push/request.ts +103 -0
  182. package/src/reporters/base.ts +63 -52
  183. package/src/reporters/index.ts +26 -3
  184. package/src/reporters/json.ts +203 -206
  185. package/src/reporters/junit.ts +98 -93
  186. package/src/sdk/lh-trace-processor.ts +132 -68
  187. package/src/sdk/trace-metrics.ts +10 -6
  188. package/src/sdk/trace-processor.ts +28 -13
  189. package/templates/.github/workflows/run-synthetics.yml +26 -0
  190. package/templates/README.md +21 -0
  191. package/templates/journeys/advanced-example-helpers.ts +54 -0
  192. package/templates/journeys/advanced-example.journey.ts +43 -0
  193. package/templates/journeys/example.journey.ts +18 -0
  194. package/templates/synthetics.config.ts +27 -0
  195. package/CHANGELOG.md +0 -102
  196. package/NOTICE.txt +0 -221
  197. package/dist/parse_args.d.ts.map +0 -1
  198. package/dist/parse_args.js +0 -89
  199. package/dist/parse_args.js.map +0 -1
  200. package/dist/reporters/reporter.d.ts.map +0 -1
  201. package/dist/reporters/reporter.js.map +0 -1
  202. package/src/parse_args.ts +0 -127
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2020-present, Elastic NV
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.createMonitors = exports.buildMonitorSchema = void 0;
28
+ const promises_1 = require("fs/promises");
29
+ const path_1 = require("path");
30
+ const bundler_1 = require("./bundler");
31
+ const request_1 = require("./request");
32
+ const helpers_1 = require("../helpers");
33
+ const public_locations_1 = require("../locations/public-locations");
34
+ function translateLocation(locations) {
35
+ if (!locations)
36
+ return [];
37
+ return locations.map(loc => public_locations_1.LocationsMap[loc] || loc).filter(Boolean);
38
+ }
39
+ async function buildMonitorSchema(monitors) {
40
+ /**
41
+ * Set up the bundle artifacts path which can be used to
42
+ * create the bundles required for uploading journeys
43
+ */
44
+ const bundlePath = (0, path_1.join)(helpers_1.SYNTHETICS_PATH, 'bundles');
45
+ await (0, promises_1.mkdir)(bundlePath, { recursive: true });
46
+ const bundler = new bundler_1.Bundler();
47
+ const schemas = [];
48
+ for (const monitor of monitors) {
49
+ const { source, config, filter } = monitor;
50
+ const outPath = (0, path_1.join)(bundlePath, config.name + '.zip');
51
+ const content = await bundler.build(source.file, outPath);
52
+ schemas.push({
53
+ ...config,
54
+ content,
55
+ locations: translateLocation(config.locations),
56
+ filter: filter,
57
+ });
58
+ }
59
+ await (0, promises_1.rm)(bundlePath, { recursive: true });
60
+ return schemas;
61
+ }
62
+ exports.buildMonitorSchema = buildMonitorSchema;
63
+ async function createMonitors(monitors, options) {
64
+ const schema = {
65
+ project: options.project,
66
+ keep_stale: false,
67
+ monitors,
68
+ };
69
+ return await (0, request_1.sendRequest)({
70
+ url: (0, helpers_1.removeTrailingSlash)(options.url) +
71
+ `/s/${options.space}/api/synthetics/service/project/monitors`,
72
+ method: 'PUT',
73
+ auth: options.auth,
74
+ body: JSON.stringify(schema),
75
+ });
76
+ }
77
+ exports.createMonitors = createMonitors;
78
+ //# sourceMappingURL=monitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../src/push/monitor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,0CAAwC;AACxC,+BAA4B;AAC5B,uCAAoC;AACpC,uCAAwC;AACxC,wCAAkE;AAClE,oEAA6D;AAgB7D,SAAS,iBAAiB,CAAC,SAAsC;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,+BAAY,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACxE,CAAC;AAEM,KAAK,UAAU,kBAAkB,CAAC,QAAmB;IAC1D;;;OAGG;IACH,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,yBAAe,EAAE,SAAS,CAAC,CAAC;IACpD,MAAM,IAAA,gBAAK,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAoB,EAAE,CAAC;IAEpC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC3C,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC;YACX,GAAG,MAAM;YACT,OAAO;YACP,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC;YAC9C,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;KACJ;IAED,MAAM,IAAA,aAAE,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC;AACjB,CAAC;AAxBD,gDAwBC;AAEM,KAAK,UAAU,cAAc,CAClC,QAAyB,EACzB,OAAoB;IAEpB,MAAM,MAAM,GAAc;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,UAAU,EAAE,KAAK;QACjB,QAAQ;KACT,CAAC;IAEF,OAAO,MAAM,IAAA,qBAAW,EAAC;QACvB,GAAG,EACD,IAAA,6BAAmB,EAAC,OAAO,CAAC,GAAG,CAAC;YAChC,MAAM,OAAO,CAAC,KAAK,0CAA0C;QAC/D,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAC;AACL,CAAC;AAlBD,wCAkBC"}
@@ -22,14 +22,12 @@
22
22
  * THE SOFTWARE.
23
23
  *
24
24
  */
25
-
26
- import Runner from '../core/runner';
27
-
28
- export type ReporterOptions = {
29
- fd?: number;
30
- colors?: boolean;
25
+ import * as esbuild from 'esbuild';
26
+ export declare function commonOptions(): esbuild.BuildOptions;
27
+ export declare type PluginData = {
28
+ path: string;
29
+ contents: string;
31
30
  };
32
-
33
- export default interface Reporter {
34
- new (runner: Runner, options: ReporterOptions): any;
35
- }
31
+ export declare type PluginCallback = (data: PluginData) => void;
32
+ export declare function MultiAssetPlugin(callback: PluginCallback): esbuild.Plugin;
33
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/push/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,wBAAgB,aAAa,IAAI,OAAO,CAAC,YAAY,CAapD;AAED,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,oBAAY,cAAc,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAoEzE"}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2020-present, Elastic NV
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ */
26
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
+ if (k2 === undefined) k2 = k;
28
+ var desc = Object.getOwnPropertyDescriptor(m, k);
29
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
30
+ desc = { enumerable: true, get: function() { return m[k]; } };
31
+ }
32
+ Object.defineProperty(o, k2, desc);
33
+ }) : (function(o, m, k, k2) {
34
+ if (k2 === undefined) k2 = k;
35
+ o[k2] = m[k];
36
+ }));
37
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
38
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
39
+ }) : function(o, v) {
40
+ o["default"] = v;
41
+ });
42
+ var __importStar = (this && this.__importStar) || function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ var __importDefault = (this && this.__importDefault) || function (mod) {
50
+ return (mod && mod.__esModule) ? mod : { "default": mod };
51
+ };
52
+ Object.defineProperty(exports, "__esModule", { value: true });
53
+ exports.MultiAssetPlugin = exports.commonOptions = void 0;
54
+ const path_1 = __importDefault(require("path"));
55
+ const promises_1 = __importDefault(require("fs/promises"));
56
+ const esbuild = __importStar(require("esbuild"));
57
+ function commonOptions() {
58
+ return {
59
+ bundle: true,
60
+ external: ['node_modules', '@elastic/synthetics'],
61
+ minify: false,
62
+ platform: 'node',
63
+ logLevel: 'silent',
64
+ format: 'esm',
65
+ write: false,
66
+ outExtension: {
67
+ '.js': '.js',
68
+ },
69
+ };
70
+ }
71
+ exports.commonOptions = commonOptions;
72
+ function MultiAssetPlugin(callback) {
73
+ // Check that the path isn't in an external package by making sure it's at a standard
74
+ // local filesystem location
75
+ const isBare = (str) => {
76
+ // Note that we use `isAbsolute` to handle UNC/windows style paths like C:\path\to\thing
77
+ // This is not necessary for relative directories since `.\file` is not supported as an import
78
+ // nor is `~/path/to/file`.
79
+ if (path_1.default.isAbsolute(str) || str.startsWith('./') || str.startsWith('../')) {
80
+ return true;
81
+ }
82
+ return false;
83
+ };
84
+ return {
85
+ name: 'esbuild-multiasset-plugin',
86
+ setup(build) {
87
+ build.onResolve({ filter: /.*?/ }, async (args) => {
88
+ // External and other packages need be marked external to
89
+ // be removed from the bundle
90
+ if (build.initialOptions.external?.includes(args.path) ||
91
+ !isBare(args.path)) {
92
+ return {
93
+ external: true,
94
+ };
95
+ }
96
+ if (args.kind === 'entry-point') {
97
+ return {
98
+ path: args.path,
99
+ namespace: 'asset',
100
+ };
101
+ }
102
+ // If the modules are resolved locally, then
103
+ // use the imported path to get full path
104
+ const entryPath = path_1.default.join(path_1.default.dirname(args.importer), args.path) +
105
+ path_1.default.extname(args.importer);
106
+ // Spin off another build to copy over the imported modules without bundling
107
+ const result = await esbuild.build({
108
+ ...commonOptions(),
109
+ entryPoints: {
110
+ [entryPath]: entryPath,
111
+ },
112
+ bundle: false,
113
+ external: [],
114
+ });
115
+ callback({
116
+ path: entryPath,
117
+ contents: result.outputFiles[0].text,
118
+ });
119
+ return {
120
+ errors: result.errors,
121
+ external: true,
122
+ };
123
+ });
124
+ build.onLoad({ filter: /.*?/, namespace: 'asset' }, async (args) => {
125
+ const contents = await promises_1.default.readFile(args.path, 'utf-8');
126
+ callback({ path: args.path, contents });
127
+ return { contents };
128
+ });
129
+ },
130
+ };
131
+ }
132
+ exports.MultiAssetPlugin = MultiAssetPlugin;
133
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/push/plugin.ts"],"names":[],"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@@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2020-present, Elastic NV
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ */
25
+ import { Dispatcher } from 'undici';
26
+ export declare type APIRequestOptions = {
27
+ url: string;
28
+ method: Dispatcher.HttpMethod;
29
+ auth: string;
30
+ body?: string;
31
+ };
32
+ export declare function sendRequest(options: APIRequestOptions): Promise<Dispatcher.ResponseData>;
33
+ export declare function ok(statusCode: number): boolean;
34
+ export declare type APIMonitorError = {
35
+ id?: string;
36
+ reason: string;
37
+ details: string;
38
+ };
39
+ export declare function formatNotFoundError(message: string): string;
40
+ export declare function formatAPIError(statuCode: number, error: string, message: string): string;
41
+ export declare function formatFailedMonitors(errors: APIMonitorError[]): string;
42
+ export declare function formatStaleMonitors(errors: APIMonitorError[]): string;
43
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/push/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,UAAU,EAAW,MAAM,QAAQ,CAAC;AAM7C,oBAAY,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAsB,WAAW,CAAC,OAAO,EAAE,iBAAiB,oCAW3D;AAED,wBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,WAEpC;AAED,oBAAY,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAIlD;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,UAShB;AAcD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,EAAE,UAG7D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,EAAE,UAG5D"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2020-present, Elastic NV
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ *
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.formatStaleMonitors = exports.formatFailedMonitors = exports.formatAPIError = exports.formatNotFoundError = exports.ok = exports.sendRequest = void 0;
28
+ const colors_1 = require("kleur/colors");
29
+ const undici_1 = require("undici");
30
+ const helpers_1 = require("../helpers");
31
+ /* eslint-disable @typescript-eslint/no-var-requires */
32
+ const { version } = require('../../package.json');
33
+ async function sendRequest(options) {
34
+ return await (0, undici_1.request)(options.url, {
35
+ method: options.method,
36
+ body: options.body,
37
+ headers: {
38
+ authorization: `ApiKey ${options.auth}`,
39
+ 'content-type': 'application/json',
40
+ 'user-agent': `Elastic/Synthetics ${version}`,
41
+ 'kbn-xsrf': 'true',
42
+ },
43
+ });
44
+ }
45
+ exports.sendRequest = sendRequest;
46
+ function ok(statusCode) {
47
+ return statusCode >= 200 && statusCode <= 299;
48
+ }
49
+ exports.ok = ok;
50
+ function formatNotFoundError(message) {
51
+ return (0, colors_1.bold)(`${helpers_1.symbols['failed']} Please check your kibana url and try again - 404:${message}`);
52
+ }
53
+ exports.formatNotFoundError = formatNotFoundError;
54
+ function formatAPIError(statuCode, error, message) {
55
+ let outer = (0, colors_1.bold)(`${helpers_1.symbols['failed']} Error\n`);
56
+ let inner = (0, colors_1.bold)(`${helpers_1.symbols['failed']} monitor creation failed - ${statuCode}:${error}\n`);
57
+ inner += (0, helpers_1.indent)(message, ' ');
58
+ outer += (0, helpers_1.indent)(inner);
59
+ return outer;
60
+ }
61
+ exports.formatAPIError = formatAPIError;
62
+ function formatMonitorError(errors) {
63
+ let outer = '';
64
+ for (const error of errors) {
65
+ const monitorId = error.id ? `: monitor(${error.id})` : '';
66
+ let inner = (0, colors_1.bold)(`> ${error.reason}${monitorId}\n`);
67
+ inner += (0, helpers_1.indent)(error.details, ' ');
68
+ outer += (0, helpers_1.indent)(inner) + '\n';
69
+ outer += '\n';
70
+ }
71
+ return outer;
72
+ }
73
+ function formatFailedMonitors(errors) {
74
+ const heading = (0, colors_1.bold)(`${helpers_1.symbols['failed']} Error\n`);
75
+ return heading + formatMonitorError(errors);
76
+ }
77
+ exports.formatFailedMonitors = formatFailedMonitors;
78
+ function formatStaleMonitors(errors) {
79
+ const heading = (0, colors_1.bold)(`${helpers_1.symbols['warning']} Warnings\n`);
80
+ return heading + formatMonitorError(errors);
81
+ }
82
+ exports.formatStaleMonitors = formatStaleMonitors;
83
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/push/request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,yCAAoC;AACpC,mCAA6C;AAC7C,wCAA6C;AAE7C,uDAAuD;AACvD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAS3C,KAAK,UAAU,WAAW,CAAC,OAA0B;IAC1D,OAAO,MAAM,IAAA,gBAAO,EAAC,OAAO,CAAC,GAAG,EAAE;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,OAAO,CAAC,IAAI,EAAE;YACvC,cAAc,EAAE,kBAAkB;YAClC,YAAY,EAAE,sBAAsB,OAAO,EAAE;YAC7C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G,IAAI,CAAC;QAC9B,KAAK,IAAI,IAAI,CAAC;KACf;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAAyB;IAC5D,MAAM,OAAO,GAAG,IAAA,aAAI,EAAC,GAAG,iBAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrD,OAAO,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAHD,oDAGC;AAED,SAAgB,mBAAmB,CAAC,MAAyB;IAC3D,MAAM,OAAO,GAAG,IAAA,aAAI,EAAC,GAAG,iBAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACzD,OAAO,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAHD,kDAGC"}
@@ -23,14 +23,22 @@
23
23
  *
24
24
  */
25
25
  import SonicBoom from 'sonic-boom';
26
- import Runner from '../core/runner';
27
- import { ReporterOptions } from './reporter';
28
- export default class BaseReporter {
29
- runner: Runner;
26
+ import { Reporter, ReporterOptions } from '.';
27
+ import { JourneyEndResult, JourneyStartResult, StepEndResult } from '../common_types';
28
+ import { Journey, Step } from '../dsl';
29
+ export default class BaseReporter implements Reporter {
30
30
  stream: SonicBoom;
31
31
  fd: number;
32
- constructor(runner: Runner, options?: ReporterOptions);
33
- _registerListeners(): void;
32
+ metrics: {
33
+ succeeded: number;
34
+ failed: number;
35
+ skipped: number;
36
+ };
37
+ constructor(options?: ReporterOptions);
38
+ onJourneyStart(journey: Journey, {}: JourneyStartResult): void;
39
+ onStepEnd(journey: Journey, step: Step, result: StepEndResult): void;
40
+ onJourneyEnd(journey: Journey, { error }: JourneyEndResult): void;
41
+ onEnd(): void;
34
42
  write(message: any): void;
35
43
  }
36
44
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/reporters/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAQpC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyB7C,MAAM,CAAC,OAAO,OAAO,YAAY;IAIZ,MAAM,EAAE,MAAM;IAHjC,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;gBAEQ,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB;IAOhE,kBAAkB;IAqDlB,KAAK,CAAC,OAAO,KAAA;CAMd"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/reporters/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,SAAS,MAAM,YAAY,CAAC;AASnC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAyBvC,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;IACnD,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO;;;;MAIL;gBAEU,OAAO,GAAE,eAAoB;IAUzC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,kBAAkB;IAIvD,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa;IAW7D,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,gBAAgB;IAY1D,KAAK;IAwBL,KAAK,CAAC,OAAO,KAAA;CAMd"}
@@ -32,75 +32,81 @@ const colors_1 = require("kleur/colors");
32
32
  const helpers_1 = require("../helpers");
33
33
  function renderError(error) {
34
34
  let output = '';
35
- const outer = helpers_1.indent('');
36
- const inner = helpers_1.indent(outer);
35
+ const outer = (0, helpers_1.indent)('');
36
+ const inner = (0, helpers_1.indent)(outer);
37
37
  const container = outer + '---\n';
38
38
  output += container;
39
39
  let stack = error.stack;
40
40
  if (stack) {
41
41
  output += inner + 'stack: |-\n';
42
- stack = helpers_1.rewriteErrorStack(stack, helpers_1.findPWLogsIndexes(stack));
42
+ stack = (0, helpers_1.rewriteErrorStack)(stack, (0, helpers_1.findPWLogsIndexes)(stack));
43
43
  const lines = String(stack).split('\n');
44
44
  for (const line of lines) {
45
45
  output += inner + ' ' + line + '\n';
46
46
  }
47
47
  }
48
48
  output += container;
49
- return colors_1.red(output);
49
+ return (0, colors_1.red)(output);
50
50
  }
51
51
  function renderDuration(durationMs) {
52
52
  return parseInt(durationMs);
53
53
  }
54
54
  class BaseReporter {
55
- constructor(runner, options = {}) {
56
- this.runner = runner;
57
- this.fd = options.fd || process.stdout.fd;
58
- this.stream = new sonic_boom_1.default({ fd: this.fd, sync: true });
59
- this._registerListeners();
60
- this.runner.on('end', () => this.stream.flush());
61
- }
62
- _registerListeners() {
63
- const result = {
55
+ constructor(options = {}) {
56
+ this.metrics = {
64
57
  succeeded: 0,
65
58
  failed: 0,
66
59
  skipped: 0,
67
60
  };
68
- this.runner.on('journey:start', ({ journey }) => {
69
- this.write(`\nJourney: ${journey.name}`);
70
- });
71
- this.runner.on('step:end', ({ step, start, end, error, status }) => {
72
- const message = `${helpers_1.symbols[status]} Step: '${step.name}' ${status} (${renderDuration((end - start) * 1000)} ms)`;
73
- this.write(helpers_1.indent(message));
74
- error && this.write(renderError(error));
75
- result[status]++;
76
- });
77
- this.runner.on('journey:end', ({ error }) => {
78
- const { failed, succeeded, skipped } = result;
79
- const total = failed + succeeded + skipped;
80
- /**
81
- * Render the error on the terminal only when no steps could
82
- * be executed which means the error happened in one of the hooks
83
- */
84
- if (total === 0 && error) {
85
- this.write(renderError(error));
86
- }
87
- });
88
- this.runner.on('end', () => {
89
- const { failed, succeeded, skipped } = result;
90
- const total = failed + succeeded + skipped;
91
- let message = '\n';
92
- if (total === 0) {
93
- message = 'No tests found!';
94
- message += ` (${renderDuration(helpers_1.now())} ms) \n`;
95
- this.write(message);
96
- return;
97
- }
98
- message += succeeded > 0 ? colors_1.green(` ${succeeded} passed`) : '';
99
- message += failed > 0 ? colors_1.red(` ${failed} failed`) : '';
100
- message += skipped > 0 ? colors_1.cyan(` ${skipped} skipped`) : '';
101
- message += ` (${renderDuration(helpers_1.now())} ms) \n`;
61
+ this.fd = options.fd || process.stdout.fd;
62
+ /**
63
+ * minLength is set to 1 byte to make sure we flush the
64
+ * content even if its the last byte on the stream buffer
65
+ * before destroying the pipe with underlying file descriptor
66
+ */
67
+ this.stream = new sonic_boom_1.default({ fd: this.fd, sync: true, minLength: 1 });
68
+ }
69
+ onJourneyStart(journey, {}) {
70
+ this.write(`\nJourney: ${journey.name}`);
71
+ }
72
+ onStepEnd(journey, step, result) {
73
+ const { status, end, start, error } = result;
74
+ const message = `${helpers_1.symbols[status]} Step: '${step.name}' ${status} (${renderDuration((end - start) * 1000)} ms)`;
75
+ this.write((0, helpers_1.indent)(message));
76
+ error && this.write(renderError(error));
77
+ this.metrics[status]++;
78
+ }
79
+ /* eslint-disable @typescript-eslint/no-unused-vars */
80
+ onJourneyEnd(journey, { error }) {
81
+ const { failed, succeeded, skipped } = this.metrics;
82
+ const total = failed + succeeded + skipped;
83
+ /**
84
+ * Render the error on the terminal only when no steps could
85
+ * be executed which means the error happened in one of the hooks
86
+ */
87
+ if (total === 0 && error) {
88
+ this.write(renderError(error));
89
+ }
90
+ }
91
+ onEnd() {
92
+ const { failed, succeeded, skipped } = this.metrics;
93
+ const total = failed + succeeded + skipped;
94
+ let message = '\n';
95
+ if (total === 0) {
96
+ message = 'No tests found!';
97
+ message += ` (${renderDuration((0, helpers_1.now)())} ms) \n`;
102
98
  this.write(message);
103
- });
99
+ return;
100
+ }
101
+ message += succeeded > 0 ? (0, colors_1.green)(` ${succeeded} passed`) : '';
102
+ message += failed > 0 ? (0, colors_1.red)(` ${failed} failed`) : '';
103
+ message += skipped > 0 ? (0, colors_1.cyan)(` ${skipped} skipped`) : '';
104
+ message += ` (${renderDuration((0, helpers_1.now)())} ms) \n`;
105
+ this.write(message);
106
+ // flushSync is used here to make sure all the data from the underlying
107
+ // SonicBoom stream buffer is completely written to the fd before closing
108
+ // the process
109
+ this.stream.flushSync();
104
110
  }
105
111
  write(message) {
106
112
  if (typeof message == 'object') {
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/reporters/base.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;AAEH,4DAAmC;AACnC,yCAAgD;AAEhD,wCAMoB;AAGpB,SAAS,WAAW,CAAC,KAAK;IACxB,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,KAAK,GAAG,gBAAM,CAAC,EAAE,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,gBAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IAClC,MAAM,IAAI,SAAS,CAAC;IACpB,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IACxB,IAAI,KAAK,EAAE;QACT,MAAM,IAAI,KAAK,GAAG,aAAa,CAAC;QAChC,KAAK,GAAG,2BAAiB,CAAC,KAAK,EAAE,2BAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,MAAM,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;SACtC;KACF;IACD,MAAM,IAAI,SAAS,CAAC;IACpB,OAAO,YAAG,CAAC,MAAM,CA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AAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,OAAO,IAAI,KAAK,cAAc,CAAC,IAAA,aAAG,GAAE,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEpB,uEAAuE;QACvE,yEAAyE;QACzE,cAAc;QACd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,OAAO,OAAO,IAAI,QAAQ,EAAE;YAC9B,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACnC;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AA5ED,+BA4EC"}
@@ -22,14 +22,24 @@
22
22
  * THE SOFTWARE.
23
23
  *
24
24
  */
25
- import BaseReporter from './base';
26
- import JSONReporter from './json';
27
- import JUnitReporter from './junit';
28
- import Reporter, { ReporterOptions } from './reporter';
29
- export { Reporter, ReporterOptions };
25
+ import { Journey, Step } from '../dsl';
26
+ import { StartEvent, JourneyEndResult, JourneyStartResult, StepEndResult } from '../common_types';
27
+ export declare type ReporterOptions = {
28
+ fd?: number;
29
+ colors?: boolean;
30
+ };
31
+ export declare type BuiltInReporterName = 'default' | 'json' | 'junit';
32
+ export declare type ReporterInstance = new (opts: ReporterOptions) => Reporter;
30
33
  export declare const reporters: {
31
- default: typeof BaseReporter;
32
- json: typeof JSONReporter;
33
- junit: typeof JUnitReporter;
34
+ [key in BuiltInReporterName]: ReporterInstance;
34
35
  };
36
+ export interface Reporter {
37
+ onStart?(params: StartEvent): void;
38
+ onJourneyRegister?(journey: Journey): void;
39
+ onJourneyStart?(journey: Journey, result: JourneyStartResult): void;
40
+ onStepStart?(journey: Journey, step: Step): void;
41
+ onStepEnd?(journey: Journey, step: Step, result: StepEndResult): void;
42
+ onJourneyEnd?(journey: Journey, result: JourneyEndResult): void | Promise<void>;
43
+ onEnd?(): void | Promise<void>;
44
+ }
35
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,QAAQ,EAAE,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AACrC,eAAO,MAAM,SAAS;;;;CAIrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,eAAe,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAChE,oBAAY,mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAC/D,oBAAY,gBAAgB,GAAG,KAAK,IAAI,EAAE,eAAe,KAAK,QAAQ,CAAC;AACvE,eAAO,MAAM,SAAS,EAAE;KACrB,GAAG,IAAI,mBAAmB,GAAG,gBAAgB;CAK/C,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,iBAAiB,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3C,cAAc,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpE,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IACjD,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IACtE,YAAY,CAAC,CACX,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,GACvB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;AAEH,kDAAkC;AAClC,kDAAkC;AAClC,oDAAoC;AAIvB,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,cAAY;IACrB,IAAI,EAAE,cAAY;IAClB,KAAK,EAAE,eAAa;CACrB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;AAEH,kDAAkC;AAClC,kDAAkC;AAClC,oDAAoC;AAYvB,QAAA,SAAS,GAElB;IACF,OAAO,EAAE,cAAY;IACrB,IAAI,EAAE,cAAY;IAClB,KAAK,EAAE,eAAa;CACrB,CAAC"}