@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
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
- [![Build Status](https://apm-ci.elastic.co/job/apm-agent-rum/job/elastic-synthetics/job/master/badge/icon)](https://apm-ci.elastic.co/job/apm-agent-rum/job/elastic-synthetics/job/master/)
1
+ [![Build Status](https://apm-ci.elastic.co/job/apm-agent-rum/job/elastic-synthetics/job/main/badge/icon)](https://apm-ci.elastic.co/job/apm-agent-rum/job/elastic-synthetics/job/main/)
2
+
2
3
  # Experimental Synthetics Agent
3
4
 
4
5
  Synthetic Monitoring with Real Browsers.
5
- **Please note this is an unsupported experimental project. Expect things to break and change!**
6
+ **Please note this is project is in beta status. Expect things to break and change!**
6
7
 
7
8
  ## Usage
8
9
 
@@ -20,7 +21,7 @@ npx @elastic/synthetics [options] [dir] [files] file
20
21
 
21
22
  ## Documentation
22
23
 
23
- - [Introduction](https://www.elastic.co/guide/en/observability/current/synthetic-monitoring.html)
24
+ - [Introduction](https://www.elastic.co/guide/en/observability/current/monitor-uptime-synthetics.html#monitoring-synthetics)
24
25
  - [CLI Options](https://www.elastic.co/guide/en/observability/current/synthetics-command-reference.html#elastic-synthetics-command)
25
26
  - [Syntax](https://www.elastic.co/guide/en/observability/current/synthetics-create-test.html#synthetics-syntax)
26
27
  - [Creating a Journey](https://www.elastic.co/guide/en/observability/current/synthetics-create-test.html#synthetics-create-journey)
package/dist/cli.js CHANGED
@@ -24,180 +24,142 @@
24
24
  * THE SOFTWARE.
25
25
  *
26
26
  */
27
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
28
- if (k2 === undefined) k2 = k;
29
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
30
- }) : (function(o, m, k, k2) {
31
- if (k2 === undefined) k2 = k;
32
- o[k2] = m[k];
33
- }));
34
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
- Object.defineProperty(o, "default", { enumerable: true, value: v });
36
- }) : function(o, v) {
37
- o["default"] = v;
38
- });
39
- var __importStar = (this && this.__importStar) || function (mod) {
40
- if (mod && mod.__esModule) return mod;
41
- var result = {};
42
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43
- __setModuleDefault(result, mod);
44
- return result;
45
- };
46
- var __importDefault = (this && this.__importDefault) || function (mod) {
47
- return (mod && mod.__esModule) ? mod : { "default": mod };
48
- };
49
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ const commander_1 = require("commander");
50
29
  const process_1 = require("process");
51
- const path_1 = require("path");
52
- const deepmerge_1 = __importDefault(require("deepmerge"));
30
+ const reporters_1 = require("./reporters");
31
+ const options_1 = require("./options");
32
+ const loader_1 = require("./loader");
33
+ const _1 = require("./");
53
34
  const core_1 = require("./core");
54
- const logger_1 = require("./core/logger");
55
- const parse_args_1 = __importStar(require("./parse_args"));
35
+ const monitor_1 = require("./dsl/monitor");
36
+ const push_1 = require("./push");
37
+ const locations_1 = require("./locations");
38
+ const path_1 = require("path");
39
+ const generator_1 = require("./generator");
56
40
  const helpers_1 = require("./helpers");
57
- const _1 = require("./");
58
- const config_1 = require("./config");
59
- const resolvedCwd = process_1.cwd();
60
- /**
61
- * Set debug based on DEBUG ENV and -d flags
62
- * namespace - synthetics
63
- */
64
- const namespace = 'synthetics';
65
- if (process.env.DEBUG === namespace || Boolean(parse_args_1.options.debug)) {
66
- process.env.DEBUG = '1';
67
- }
68
- const loadInlineScript = source => {
69
- const scriptFn = new Function('step', 'page', 'browser', 'params', source);
70
- core_1.journey('inline', async ({ page, browser, params }) => {
71
- scriptFn.apply(null, [core_1.step, page, browser, params]);
72
- });
73
- };
74
- async function readStdin() {
75
- const chunks = [];
76
- process_1.stdin.resume();
77
- process_1.stdin.setEncoding('utf-8');
78
- for await (const chunk of process_1.stdin) {
79
- chunks.push(chunk);
80
- }
81
- return chunks.join();
82
- }
83
- function requireSuites(suites) {
84
- for (const suite of suites) {
85
- require(suite);
86
- }
87
- }
88
- /**
89
- * Handle both directory and files that are passed through TTY
90
- * and add them to suites
91
- */
92
- async function prepareSuites(inputs) {
93
- const suites = new Set();
94
- const addSuite = absPath => {
95
- logger_1.log(`Processing file: ${absPath}`);
96
- suites.add(require.resolve(absPath));
97
- };
98
- /**
99
- * Match all files inside the directory with the
100
- * .journey.{mjs|cjs|js|ts) extensions
101
- */
102
- const pattern = parse_args_1.options.pattern
103
- ? new RegExp(parse_args_1.options.pattern, 'i')
104
- : /.+\.journey\.([mc]js|[jt]s?)$/;
105
- /**
106
- * Ignore node_modules by default when running suites
107
- */
108
- const ignored = /node_modules/i;
109
- for (const input of inputs) {
110
- const absPath = path_1.resolve(resolvedCwd, input);
41
+ const public_locations_1 = require("./locations/public-locations");
42
+ /* eslint-disable-next-line @typescript-eslint/no-var-requires */
43
+ const { name, version } = require('../package.json');
44
+ const { params, pattern, tags, match, playwrightOpts } = (0, options_1.getCommonCommandOpts)();
45
+ commander_1.program
46
+ .name(`npx ${name}`)
47
+ .usage('[options] [dir] [files] file')
48
+ .option('-c, --config <path>', 'configuration path (default: synthetics.config.js)')
49
+ .addOption(pattern)
50
+ .addOption(tags)
51
+ .addOption(match)
52
+ .addOption(params)
53
+ .addOption(new commander_1.Option('--reporter <value>', `output repoter format`).choices(Object.keys(reporters_1.reporters)))
54
+ .option('--inline', 'Run inline journeys from heartbeat')
55
+ .option('-r, --require <modules...>', 'module(s) to preload')
56
+ .option('--no-headless', 'run browser in headful mode')
57
+ .option('--sandbox', 'enable chromium sandboxing')
58
+ .option('--rich-events', 'Mimics a heartbeat run')
59
+ .option('--capability <features...>', 'Enable capabilities through feature flags')
60
+ .addOption(new commander_1.Option('--screenshots [flag]', 'take screenshots at end of each step')
61
+ .choices(['on', 'off', 'only-on-failure'])
62
+ .default('on'))
63
+ .option('--dry-run', "don't actually execute anything, report only registered journeys")
64
+ .option('--outfd <fd>', 'specify a file descriptor for logs. Default is stdout', parseInt)
65
+ .option('--ws-endpoint <endpoint>', 'Browser WebSocket endpoint to connect to')
66
+ .option('--pause-on-error', 'pause on error until a keypress is made in the console. Useful during development')
67
+ .option('--ignore-https-errors', 'ignores any HTTPS errors in sites being tested, including ones related to unrecognized certs or signatures. This can be insecure!')
68
+ .option('--quiet-exit-code', 'always return 0 as an exit code status, regardless of test pass / fail. Only return > 0 exit codes on internal errors where the suite could not be run')
69
+ .option('--throttling <config>', 'JSON object to throttle network conditions for download and upload throughput in megabits/second and latency in milliseconds. Ex: { "download": 10, "upload": 5, "latency": 200 }.', options_1.parseThrottling, {})
70
+ .option('--no-throttling', 'Turns off default network throttling.')
71
+ .addOption(playwrightOpts)
72
+ .version(version)
73
+ .description('Run synthetic tests')
74
+ .action(async (cliArgs) => {
75
+ try {
76
+ await (0, loader_1.loadTestFiles)(cliArgs, commander_1.program.args);
77
+ const options = (0, options_1.normalizeOptions)(cliArgs);
78
+ const results = await (0, _1.run)(options);
111
79
  /**
112
- * Validate for package.json file before running
113
- * the suites
80
+ * Exit with error status if any journey fails
114
81
  */
115
- helpers_1.findPkgJsonByTraversing(absPath, resolvedCwd);
116
- if (helpers_1.isDirectory(absPath)) {
117
- await helpers_1.totalist(absPath, (rel, abs) => {
118
- if (pattern.test(rel) && !ignored.test(rel)) {
119
- addSuite(abs);
82
+ if (!options.quietExitCode) {
83
+ for (const result of Object.values(results)) {
84
+ if (result.status === 'failed') {
85
+ process.exit(1);
120
86
  }
121
- });
122
- }
123
- else {
124
- addSuite(absPath);
87
+ }
125
88
  }
126
89
  }
127
- return suites.values();
128
- }
129
- (async () => {
130
- if (parse_args_1.options.inline) {
131
- const source = await readStdin();
132
- loadInlineScript(source);
90
+ catch (e) {
91
+ console.error(e);
92
+ process.exit(1);
133
93
  }
134
- else {
135
- /**
136
- * Preload modules before running the suites
137
- */
138
- const modules = [].concat(parse_args_1.options.require || []).filter(Boolean);
139
- for (const name of modules) {
140
- if (helpers_1.isDepInstalled(name)) {
141
- require(name);
142
- }
143
- else {
144
- throw new Error(`cannot find module '${name}'`);
145
- }
146
- }
147
- /**
148
- * Transform `.ts` files out of the box by invoking
149
- * the `ts-node` via `transpile-only` mode that compiles
150
- * TS files without doing any extensive type checks
151
- */
152
- /* eslint-disable-next-line @typescript-eslint/no-var-requires */
153
- require('ts-node').register({
154
- transpileOnly: true,
155
- compilerOptions: {
156
- esModuleInterop: true,
157
- allowJs: true,
158
- target: 'es2018',
159
- },
94
+ });
95
+ // Push command
96
+ commander_1.program
97
+ .command('push')
98
+ .description('Push all journeys in the current directory to create monitors within the Kibana monitor management UI')
99
+ .requiredOption('--auth <auth>', 'API key used for Kibana authentication(https://www.elastic.co/guide/en/kibana/master/api-keys.html).')
100
+ .option('--schedule <time-in-minutes>', "schedule in minutes for the pushed monitors. Setting `10`, for example, configures monitors which don't have an interval defined to run every 10 minutes.", parseInt)
101
+ .addOption(new commander_1.Option('--locations <locations...>', 'default list of locations from which your monitors will run.').choices(monitor_1.SyntheticsLocations))
102
+ .option('--private-locations <locations...>', 'default list of private locations from which your monitors will run.')
103
+ .option('--url <url>', 'Kibana URL to upload the monitors')
104
+ .option('--project <id>', 'id that will be used for logically grouping monitors')
105
+ .option('--space <space>', 'the target Kibana spaces for the pushed monitors — spaces help you organise pushed monitors.')
106
+ .addOption(pattern)
107
+ .addOption(tags)
108
+ .addOption(match)
109
+ .addOption(params)
110
+ .addOption(playwrightOpts)
111
+ .action(async (cmdOpts) => {
112
+ try {
113
+ const settings = await (0, push_1.loadSettings)();
114
+ await (0, loader_1.loadTestFiles)({ inline: false }, [(0, process_1.cwd)()]);
115
+ const options = (0, options_1.normalizeOptions)({
116
+ ...commander_1.program.opts(),
117
+ ...settings,
118
+ ...cmdOpts,
160
119
  });
161
- /**
162
- * Handle piped files by reading the STDIN
163
- * ex: ls example/suites/*.js | npx @elastic/synthetics
164
- */
165
- const files = parse_args_1.default.args.length > 0
166
- ? parse_args_1.default.args
167
- : (await readStdin()).split('\n').filter(Boolean);
168
- const suites = await prepareSuites(files);
169
- requireSuites(suites);
120
+ (0, push_1.validateSettings)(options);
121
+ await (0, push_1.catchIncorrectSettings)(settings, options);
122
+ const monitors = core_1.runner.buildMonitors(options);
123
+ await (0, push_1.push)(monitors, options);
124
+ }
125
+ catch (e) {
126
+ e && console.error(e);
127
+ process.exit(1);
128
+ }
129
+ });
130
+ // Init command
131
+ commander_1.program
132
+ .command('init [dir]')
133
+ .description('Initialize Elastic synthetics project')
134
+ .action(async (dir = '') => {
135
+ try {
136
+ const generator = await new generator_1.Generator((0, path_1.resolve)(process.cwd(), dir));
137
+ await generator.setup();
170
138
  }
171
- /**
172
- * Use the NODE_ENV variable to control the environment if its not explicity
173
- * passed from either CLI or through the API
174
- */
175
- const environment = parse_args_1.options.environment || process.env['NODE_ENV'];
176
- /**
177
- * Validate and handle configs
178
- */
179
- const config = config_1.readConfig(environment, parse_args_1.options.config);
180
- const params = deepmerge_1.default(config.params, JSON.parse(parse_args_1.options.suiteParams));
181
- /**
182
- * use JSON reporter if json flag is enabled
183
- */
184
- const reporter = parse_args_1.options.json ? 'json' : parse_args_1.options.reporter;
185
- const results = await _1.run({
186
- params: Object.freeze(params),
187
- environment,
188
- reporter,
189
- ...parse_args_1.options,
190
- });
191
- /**
192
- * Exit with error status if any journey fails
193
- */
194
- for (const result of Object.values(results)) {
195
- if (result.status === 'failed') {
196
- process.exit(1);
139
+ catch (e) {
140
+ e && (0, helpers_1.error)(e);
141
+ process.exit(1);
142
+ }
143
+ });
144
+ // Locations command
145
+ commander_1.program
146
+ .command('locations')
147
+ .description(`List all locations to run the synthetics monitors. Pass optional '--url' and '--auth' to list private locations.`)
148
+ .option('--url <url>', 'Kibana URL to fetch all public and private locations')
149
+ .option('--auth <auth>', 'API key used for Kibana authentication(https://www.elastic.co/guide/en/kibana/master/api-keys.html).')
150
+ .action(async (cmdOpts) => {
151
+ try {
152
+ let locations = Object.keys(public_locations_1.LocationsMap);
153
+ if (cmdOpts.auth && cmdOpts.url) {
154
+ const allLocations = await (0, locations_1.getLocations)(cmdOpts);
155
+ locations = (0, locations_1.formatLocations)(allLocations);
197
156
  }
157
+ (0, locations_1.renderLocations)(locations);
158
+ }
159
+ catch (e) {
160
+ e && (0, helpers_1.error)(e);
161
+ process.exit(1);
198
162
  }
199
- })().catch(e => {
200
- console.error(e);
201
- process.exit(1);
202
163
  });
164
+ commander_1.program.parse(process.argv);
203
165
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;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AC,IAAI,IAAA,eAAK,EAAC,CAAC,CAAC,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,CAAC;AAEL,oBAAoB;AACpB,mBAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CACV,kHAAkH,CACnH;KACA,MAAM,CAAC,aAAa,EAAE,sDAAsD,CAAC;KAC7E,MAAM,CACL,eAAe,EACf,sGAAsG,CACvG;KACA,MAAM,CAAC,KAAK,EAAE,OAA2B,EAAE,EAAE;IAC5C,IAAI;QACF,IAAI,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,+BAAY,CAAC,CAAC;QAC1C,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE;YAC/B,MAAM,YAAY,GAAG,MAAM,IAAA,wBAAY,EAAC,OAAO,CAAC,CAAC;YACjD,SAAS,GAAG,IAAA,2BAAe,EAAC,YAAY,CAAC,CAAC;SAC3C;QACD,IAAA,2BAAe,EAAC,SAAS,CAAC,CAAC;KAC5B;IAAC,OAAO,CAAC,EAAE;QACV,CAAC,IAAI,IAAA,eAAK,EAAC,CAAC,CAAC,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,CAAC;AAEL,mBAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -22,23 +22,41 @@
22
22
  * THE SOFTWARE.
23
23
  *
24
24
  */
25
- import { Protocol } from 'playwright-chromium/types/protocol';
25
+ import { BrowserContextOptions, LaunchOptions, CDPSession, ChromiumBrowser, ChromiumBrowserContext, Page, APIRequestContext } from 'playwright-chromium';
26
26
  import { Step } from './dsl';
27
- import { reporters } from './reporters';
27
+ import { BuiltInReporterName, ReporterInstance } from './reporters';
28
+ import { MonitorConfig } from './dsl/monitor';
28
29
  export declare type VoidCallback = () => void;
29
- export declare type Params = Record<string, unknown>;
30
+ export declare type Location = {
31
+ file: string;
32
+ line: number;
33
+ column: number;
34
+ };
35
+ export declare type Params = Record<string, any>;
30
36
  export declare type HooksArgs = {
31
37
  env: string;
32
38
  params: Params;
33
39
  };
34
40
  export declare type HooksCallback = (args: HooksArgs) => void;
35
41
  export declare type StatusValue = 'succeeded' | 'failed' | 'skipped';
36
- export declare type Reporters = keyof typeof reporters;
42
+ export declare type NetworkConditions = {
43
+ offline: boolean;
44
+ downloadThroughput: number;
45
+ uploadThroughput: number;
46
+ latency: number;
47
+ };
48
+ export declare type Driver = {
49
+ browser: ChromiumBrowser;
50
+ context: ChromiumBrowserContext;
51
+ page: Page;
52
+ client: CDPSession;
53
+ request: APIRequestContext;
54
+ };
37
55
  export declare type TraceOutput = {
38
56
  name: string;
39
57
  type: string;
40
58
  start: MetricDuration;
41
- end?: MetricDuration;
59
+ duration?: MetricDuration;
42
60
  score?: number;
43
61
  };
44
62
  declare type MetricDuration = {
@@ -64,26 +82,61 @@ export declare type BrowserInfo = {
64
82
  name: string;
65
83
  version: string;
66
84
  };
85
+ export declare type Screenshot = {
86
+ timestamp: number;
87
+ step: Step;
88
+ data: string;
89
+ };
90
+ export declare type SecurityDetails = {
91
+ issuer?: string;
92
+ protocol?: string;
93
+ subjectName?: string;
94
+ validFrom?: number;
95
+ validTo?: number;
96
+ };
97
+ export declare type Request = {
98
+ method: string;
99
+ url: string;
100
+ headers: Record<string, string>;
101
+ bytes?: number;
102
+ body?: {
103
+ bytes: number;
104
+ };
105
+ referrer?: string;
106
+ };
107
+ export declare type Response = {
108
+ url?: string;
109
+ status: number;
110
+ statusText?: string;
111
+ mimeType?: string;
112
+ headers: Record<string, string>;
113
+ bytes?: number;
114
+ body?: {
115
+ bytes: number;
116
+ };
117
+ transferSize?: number;
118
+ redirectURL?: string;
119
+ securityDetails?: SecurityDetails;
120
+ remoteIPAddress?: string;
121
+ remotePort?: number;
122
+ fromServiceWorker?: boolean;
123
+ };
67
124
  export declare type NetworkInfo = {
68
125
  url: string;
69
126
  browser: BrowserInfo;
70
- method: string;
71
127
  type: string;
72
- request: Protocol.Network.Request;
73
- response?: Protocol.Network.Response;
128
+ request: Request;
129
+ response: Response;
74
130
  isNavigationRequest: boolean;
75
131
  requestSentTime: number;
76
132
  loadEndTime: number;
77
133
  responseReceivedTime: number;
78
- status: number;
79
134
  resourceSize: number;
80
135
  transferSize: number;
81
- timings?: {
136
+ timings: {
82
137
  blocked: number;
83
- queueing: number;
84
138
  dns: number;
85
139
  ssl: number;
86
- proxy: number;
87
140
  connect: number;
88
141
  send: number;
89
142
  wait: number;
@@ -91,9 +144,11 @@ export declare type NetworkInfo = {
91
144
  total: number;
92
145
  };
93
146
  } & DefaultPluginOutput;
147
+ export declare type PageMetrics = Record<string, number>;
94
148
  export declare type BrowserMessage = {
95
149
  text: string;
96
150
  type: string;
151
+ error?: Error;
97
152
  } & DefaultPluginOutput;
98
153
  export declare type PluginOutput = {
99
154
  filmstrips?: Array<Filmstrip>;
@@ -102,32 +157,102 @@ export declare type PluginOutput = {
102
157
  traces?: Array<TraceOutput>;
103
158
  metrics?: PerfMetrics;
104
159
  };
105
- export declare type CliArgs = {
106
- capability?: Array<string>;
107
- config?: string;
108
- environment?: string;
109
- outfd?: number;
110
- headless?: boolean;
111
- screenshots?: boolean;
112
- ssblocks?: boolean;
113
- metrics?: boolean;
114
- filmstrips?: boolean;
115
- trace?: boolean;
160
+ export declare type ScreenshotOptions = 'on' | 'off' | 'only-on-failure';
161
+ export declare type ThrottlingOptions = {
162
+ download?: number;
163
+ upload?: number;
164
+ latency?: number;
165
+ };
166
+ declare type BaseArgs = {
167
+ params?: Params;
168
+ screenshots?: ScreenshotOptions;
116
169
  dryRun?: boolean;
117
- network?: boolean;
118
- pauseOnError?: boolean;
119
- reporter?: Reporters;
120
- wsEndpoint?: string;
121
- sandbox?: boolean;
122
- json?: boolean;
123
- pattern?: string;
124
- inline: boolean;
125
170
  match?: string;
126
171
  tags?: Array<string>;
127
- require: Array<string>;
128
- debug?: boolean;
129
- suiteParams?: string;
172
+ outfd?: number;
173
+ wsEndpoint?: string;
174
+ pauseOnError?: boolean;
175
+ ignoreHttpsErrors?: boolean;
176
+ playwrightOptions?: PlaywrightOptions;
177
+ quietExitCode?: boolean;
178
+ throttling?: ThrottlingOptions;
179
+ schedule?: MonitorConfig['schedule'];
180
+ locations?: MonitorConfig['locations'];
181
+ privateLocations?: MonitorConfig['privateLocations'];
182
+ };
183
+ export declare type CliArgs = BaseArgs & {
184
+ config?: string;
185
+ reporter?: BuiltInReporterName;
186
+ pattern?: string;
187
+ inline?: boolean;
188
+ require?: Array<string>;
189
+ headless?: boolean;
190
+ sandbox?: boolean;
130
191
  richEvents?: boolean;
192
+ capability?: Array<string>;
193
+ ignoreHttpsErrors?: boolean;
194
+ throttling?: boolean | ThrottlingOptions;
195
+ };
196
+ export declare type RunOptions = BaseArgs & {
197
+ metrics?: boolean;
198
+ ssblocks?: boolean;
199
+ network?: boolean;
200
+ trace?: boolean;
201
+ filmstrips?: boolean;
202
+ environment?: string;
203
+ playwrightOptions?: PlaywrightOptions;
204
+ networkConditions?: NetworkConditions;
205
+ reporter?: BuiltInReporterName | ReporterInstance;
206
+ };
207
+ export declare type PushOptions = {
208
+ auth: string;
209
+ url: string;
210
+ project: string;
211
+ space: string;
212
+ schedule?: MonitorConfig['schedule'];
213
+ locations?: MonitorConfig['locations'];
214
+ privateLocations?: MonitorConfig['privateLocations'];
215
+ };
216
+ export declare type PlaywrightOptions = LaunchOptions & BrowserContextOptions;
217
+ export declare type SyntheticsConfig = {
218
+ params?: Params;
219
+ playwrightOptions?: PlaywrightOptions;
220
+ monitor?: MonitorConfig;
221
+ };
222
+ /** Runner Payload types */
223
+ export declare type JourneyResult = {
224
+ status: StatusValue;
225
+ error?: Error;
226
+ networkinfo?: PluginOutput['networkinfo'];
227
+ browserconsole?: PluginOutput['browserconsole'];
228
+ };
229
+ export declare type StepResult = {
230
+ status: StatusValue;
231
+ url?: string;
232
+ error?: Error;
233
+ pagemetrics?: PageMetrics;
234
+ filmstrips?: PluginOutput['filmstrips'];
235
+ metrics?: PluginOutput['metrics'];
236
+ traces?: PluginOutput['traces'];
237
+ };
238
+ /** Reporter and Runner contract */
239
+ export declare type StartEvent = {
240
+ numJourneys: number;
241
+ networkConditions?: NetworkConditions;
242
+ };
243
+ export declare type JourneyStartResult = {
244
+ timestamp: number;
245
+ params?: Params;
246
+ };
247
+ export declare type JourneyEndResult = JourneyStartResult & JourneyResult & {
248
+ start: number;
249
+ end: number;
250
+ options: RunOptions;
251
+ timestamp: number;
252
+ };
253
+ export declare type StepEndResult = StepResult & {
254
+ start: number;
255
+ end: number;
131
256
  };
132
257
  export {};
133
258
  //# sourceMappingURL=common_types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common_types.d.ts","sourceRoot":"","sources":["../src/common_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,oBAAY,YAAY,GAAG,MAAM,IAAI,CAAC;AACtC,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC7C,oBAAY,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,oBAAY,aAAa,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;AACtD,oBAAY,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7D,oBAAY,SAAS,GAAG,MAAM,OAAO,SAAS,CAAC;AAE/C,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,GA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