@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.
- package/README.md +4 -3
- package/dist/cli.js +123 -161
- package/dist/cli.js.map +1 -1
- package/dist/common_types.d.ts +159 -34
- package/dist/common_types.d.ts.map +1 -1
- package/dist/config.d.ts +2 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -5
- package/dist/config.js.map +1 -1
- package/dist/core/browser-service.js +5 -5
- package/dist/core/browser-service.js.map +1 -1
- package/dist/core/expect.d.ts +25 -25
- package/dist/core/expect.d.ts.map +1 -1
- package/dist/core/expect.js.map +1 -1
- package/dist/core/gatherer.d.ts +4 -8
- package/dist/core/gatherer.d.ts.map +1 -1
- package/dist/core/gatherer.js +49 -15
- package/dist/core/gatherer.js.map +1 -1
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +23 -11
- package/dist/core/index.js.map +1 -1
- package/dist/core/logger.d.ts +0 -1
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +3 -16
- package/dist/core/logger.js.map +1 -1
- package/dist/core/runner.d.ts +21 -65
- package/dist/core/runner.d.ts.map +1 -1
- package/dist/core/runner.js +212 -93
- package/dist/core/runner.js.map +1 -1
- package/dist/dsl/index.js +5 -1
- package/dist/dsl/index.js.map +1 -1
- package/dist/dsl/journey.d.ts +9 -4
- package/dist/dsl/journey.d.ts.map +1 -1
- package/dist/dsl/journey.js +27 -7
- package/dist/dsl/journey.js.map +1 -1
- package/dist/dsl/monitor.d.ts +66 -0
- package/dist/dsl/monitor.d.ts.map +1 -0
- package/dist/dsl/monitor.js +63 -0
- package/dist/dsl/monitor.js.map +1 -0
- package/dist/dsl/step.d.ts +3 -2
- package/dist/dsl/step.d.ts.map +1 -1
- package/dist/dsl/step.js +2 -1
- package/dist/dsl/step.js.map +1 -1
- package/dist/formatter/javascript.d.ts +98 -0
- package/dist/formatter/javascript.d.ts.map +1 -0
- package/dist/formatter/javascript.js +295 -0
- package/dist/formatter/javascript.js.map +1 -0
- package/dist/generator/index.d.ts +29 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +240 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/{reporters/reporter.js → generator/utils.d.ts} +5 -3
- package/dist/generator/utils.d.ts.map +1 -0
- package/dist/generator/utils.js +80 -0
- package/dist/generator/utils.js.map +1 -0
- package/dist/helpers.d.ts +24 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +126 -19
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -26
- package/dist/index.js.map +1 -1
- package/dist/{parse_args.d.ts → loader.d.ts} +2 -5
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +152 -0
- package/dist/loader.js.map +1 -0
- package/dist/locations/index.d.ts +45 -0
- package/dist/locations/index.d.ts.map +1 -0
- package/dist/locations/index.js +90 -0
- package/dist/locations/index.js.map +1 -0
- package/dist/{reporters/reporter.d.ts → locations/public-locations.d.ts} +12 -8
- package/dist/locations/public-locations.d.ts.map +1 -0
- package/dist/locations/public-locations.js +41 -0
- package/dist/locations/public-locations.js.map +1 -0
- package/dist/options.d.ts +41 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +182 -0
- package/dist/options.js.map +1 -0
- package/dist/plugins/browser-console.d.ts +5 -4
- package/dist/plugins/browser-console.d.ts.map +1 -1
- package/dist/plugins/browser-console.js +27 -8
- package/dist/plugins/browser-console.js.map +1 -1
- package/dist/plugins/index.js +5 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/network.d.ts +20 -33
- package/dist/plugins/network.d.ts.map +1 -1
- package/dist/plugins/network.js +173 -214
- package/dist/plugins/network.js.map +1 -1
- package/dist/plugins/performance.d.ts +4 -19
- package/dist/plugins/performance.d.ts.map +1 -1
- package/dist/plugins/performance.js +5 -5
- package/dist/plugins/performance.js.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +9 -5
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.js +44 -29
- package/dist/plugins/plugin-manager.js.map +1 -1
- package/dist/plugins/tracing.d.ts +6 -6
- package/dist/plugins/tracing.d.ts.map +1 -1
- package/dist/plugins/tracing.js +8 -7
- package/dist/plugins/tracing.js.map +1 -1
- package/dist/push/bundler.d.ts +34 -0
- package/dist/push/bundler.d.ts.map +1 -0
- package/dist/push/bundler.js +123 -0
- package/dist/push/bundler.js.map +1 -0
- package/dist/push/index.d.ts +33 -0
- package/dist/push/index.d.ts.map +1 -0
- package/dist/push/index.js +174 -0
- package/dist/push/index.js.map +1 -0
- package/dist/push/monitor.d.ts +34 -0
- package/dist/push/monitor.d.ts.map +1 -0
- package/dist/push/monitor.js +78 -0
- package/dist/push/monitor.js.map +1 -0
- package/{src/reporters/reporter.ts → dist/push/plugin.d.ts} +8 -10
- package/dist/push/plugin.d.ts.map +1 -0
- package/dist/push/plugin.js +133 -0
- package/dist/push/plugin.js.map +1 -0
- package/dist/push/request.d.ts +43 -0
- package/dist/push/request.d.ts.map +1 -0
- package/dist/push/request.js +83 -0
- package/dist/push/request.js.map +1 -0
- package/dist/reporters/base.d.ts +14 -6
- package/dist/reporters/base.d.ts.map +1 -1
- package/dist/reporters/base.js +54 -48
- package/dist/reporters/base.js.map +1 -1
- package/dist/reporters/index.d.ts +18 -8
- package/dist/reporters/index.d.ts.map +1 -1
- package/dist/reporters/index.js.map +1 -1
- package/dist/reporters/json.d.ts +18 -67
- package/dist/reporters/json.d.ts.map +1 -1
- package/dist/reporters/json.js +153 -175
- package/dist/reporters/json.js.map +1 -1
- package/dist/reporters/junit.d.ts +7 -1
- package/dist/reporters/junit.d.ts.map +1 -1
- package/dist/reporters/junit.js +94 -89
- package/dist/reporters/junit.js.map +1 -1
- package/dist/sdk/lh-trace-processor.d.ts +35 -9
- package/dist/sdk/lh-trace-processor.d.ts.map +1 -1
- package/dist/sdk/lh-trace-processor.js +114 -53
- package/dist/sdk/lh-trace-processor.js.map +1 -1
- package/dist/sdk/trace-metrics.d.ts +4 -4
- package/dist/sdk/trace-metrics.d.ts.map +1 -1
- package/dist/sdk/trace-metrics.js +5 -6
- package/dist/sdk/trace-metrics.js.map +1 -1
- package/dist/sdk/trace-processor.d.ts +11 -3
- package/dist/sdk/trace-processor.d.ts.map +1 -1
- package/dist/sdk/trace-processor.js +17 -9
- package/dist/sdk/trace-processor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1888
- package/package.json +32 -20
- package/src/cli.ts +205 -152
- package/src/common_types.ts +192 -34
- package/src/config.ts +2 -5
- package/src/core/expect.ts +58 -24
- package/src/core/gatherer.ts +59 -24
- package/src/core/index.ts +36 -15
- package/src/core/logger.ts +1 -12
- package/src/core/runner.ts +215 -152
- package/src/dsl/journey.ts +37 -6
- package/src/dsl/monitor.ts +88 -0
- package/src/dsl/step.ts +9 -2
- package/src/formatter/javascript.ts +367 -0
- package/src/generator/index.ts +316 -0
- package/src/generator/utils.ts +80 -0
- package/src/helpers.ts +132 -12
- package/src/index.ts +22 -22
- package/src/loader.ts +171 -0
- package/src/locations/index.ts +108 -0
- package/src/locations/public-locations.ts +38 -0
- package/src/options.ts +211 -0
- package/src/plugins/browser-console.ts +30 -8
- package/src/plugins/network.ts +208 -267
- package/src/plugins/performance.ts +6 -22
- package/src/plugins/plugin-manager.ts +49 -31
- package/src/plugins/tracing.ts +8 -9
- package/src/push/bundler.ts +100 -0
- package/src/push/index.ts +202 -0
- package/src/push/monitor.ts +96 -0
- package/src/push/plugin.ts +119 -0
- package/src/push/request.ts +103 -0
- package/src/reporters/base.ts +63 -52
- package/src/reporters/index.ts +26 -3
- package/src/reporters/json.ts +203 -206
- package/src/reporters/junit.ts +98 -93
- package/src/sdk/lh-trace-processor.ts +132 -68
- package/src/sdk/trace-metrics.ts +10 -6
- package/src/sdk/trace-processor.ts +28 -13
- package/templates/.github/workflows/run-synthetics.yml +26 -0
- package/templates/README.md +21 -0
- package/templates/journeys/advanced-example-helpers.ts +54 -0
- package/templates/journeys/advanced-example.journey.ts +43 -0
- package/templates/journeys/example.journey.ts +18 -0
- package/templates/synthetics.config.ts +27 -0
- package/CHANGELOG.md +0 -102
- package/NOTICE.txt +0 -221
- package/dist/parse_args.d.ts.map +0 -1
- package/dist/parse_args.js +0 -89
- package/dist/parse_args.js.map +0 -1
- package/dist/reporters/reporter.d.ts.map +0 -1
- package/dist/reporters/reporter.js.map +0 -1
- package/src/parse_args.ts +0 -127
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
[](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
|
|
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/
|
|
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
|
|
52
|
-
const
|
|
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
|
|
55
|
-
const
|
|
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
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
*
|
|
113
|
-
* the suites
|
|
80
|
+
* Exit with error status if any journey fails
|
|
114
81
|
*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
(
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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;;;;;;;;;;;;;;;;;;;;;;;GAuBG
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;AAEH,yCAA4C;AAC5C,qCAA8B;AAE9B,2CAAwC;AACxC,uCAImB;AACnB,qCAAyC;AACzC,yBAAyB;AACzB,iCAAgC;AAChC,2CAAoD;AACpD,iCAKgB;AAChB,2CAKqB;AACrB,+BAA+B;AAC/B,2CAAwC;AACxC,uCAAkC;AAClC,mEAA4D;AAE5D,iEAAiE;AACjE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAErD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAA,8BAAoB,GAAE,CAAC;AAEhF,mBAAO;KACJ,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB,KAAK,CAAC,8BAA8B,CAAC;KACrC,MAAM,CACL,qBAAqB,EACrB,oDAAoD,CACrD;KACA,SAAS,CAAC,OAAO,CAAC;KAClB,SAAS,CAAC,IAAI,CAAC;KACf,SAAS,CAAC,KAAK,CAAC;KAChB,SAAS,CAAC,MAAM,CAAC;KACjB,SAAS,CACR,IAAI,kBAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC,OAAO,CAC/D,MAAM,CAAC,IAAI,CAAC,qBAAS,CAAC,CACvB,CACF;KACA,MAAM,CAAC,UAAU,E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M,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"}
|
package/dist/common_types.d.ts
CHANGED
|
@@ -22,23 +22,41 @@
|
|
|
22
22
|
* THE SOFTWARE.
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
25
|
+
import { BrowserContextOptions, LaunchOptions, CDPSession, ChromiumBrowser, ChromiumBrowserContext, Page, APIRequestContext } from 'playwright-chromium';
|
|
26
26
|
import { Step } from './dsl';
|
|
27
|
-
import {
|
|
27
|
+
import { BuiltInReporterName, ReporterInstance } from './reporters';
|
|
28
|
+
import { MonitorConfig } from './dsl/monitor';
|
|
28
29
|
export declare type VoidCallback = () => void;
|
|
29
|
-
export declare type
|
|
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
|
|
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
|
-
|
|
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:
|
|
73
|
-
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
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"common_types.d.ts","sourceRoot":"","sources":["../src/common_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,IAAI,EACJ,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,oBAAY,YAAY,GAAG,MAAM,IAAI,CAAC;AACtC,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACzC,oBAAY,SAAS,GAAG;IACtB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