@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
|
@@ -30,55 +30,70 @@ class PluginManager {
|
|
|
30
30
|
constructor(driver) {
|
|
31
31
|
this.driver = driver;
|
|
32
32
|
this.plugins = new Map();
|
|
33
|
+
this.PLUGIN_TYPES = [
|
|
34
|
+
'network',
|
|
35
|
+
'trace',
|
|
36
|
+
'performance',
|
|
37
|
+
'browserconsole',
|
|
38
|
+
];
|
|
33
39
|
}
|
|
34
|
-
|
|
40
|
+
register(type, options) {
|
|
35
41
|
let instance;
|
|
36
42
|
switch (type) {
|
|
37
43
|
case 'network':
|
|
38
|
-
instance = new _1.NetworkManager();
|
|
39
|
-
await instance.start(this.driver.client);
|
|
44
|
+
instance = new _1.NetworkManager(this.driver);
|
|
40
45
|
break;
|
|
41
46
|
case 'trace':
|
|
42
|
-
instance = new _1.Tracing(options);
|
|
43
|
-
await instance.start(this.driver.client);
|
|
47
|
+
instance = new _1.Tracing(this.driver, options);
|
|
44
48
|
break;
|
|
45
49
|
case 'performance':
|
|
46
|
-
instance = new _1.PerformanceManager(this.driver
|
|
47
|
-
instance.start();
|
|
50
|
+
instance = new _1.PerformanceManager(this.driver);
|
|
48
51
|
break;
|
|
49
52
|
case 'browserconsole':
|
|
50
|
-
instance = new _1.BrowserConsole(this.driver
|
|
51
|
-
instance.start();
|
|
53
|
+
instance = new _1.BrowserConsole(this.driver);
|
|
52
54
|
break;
|
|
53
55
|
}
|
|
54
|
-
this.plugins.set(
|
|
56
|
+
instance && this.plugins.set(type, instance);
|
|
55
57
|
return instance;
|
|
56
58
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
registerAll(options) {
|
|
60
|
+
for (const type of this.PLUGIN_TYPES) {
|
|
61
|
+
this.register(type, options);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
unregisterAll() {
|
|
65
|
+
for (const type of this.PLUGIN_TYPES) {
|
|
66
|
+
this.plugins.delete(type);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async stop(type) {
|
|
70
|
+
const instance = this.plugins.get(type);
|
|
71
|
+
if (instance) {
|
|
72
|
+
return await instance.stop();
|
|
73
|
+
}
|
|
74
|
+
return {};
|
|
75
|
+
}
|
|
76
|
+
async start(type) {
|
|
77
|
+
const instance = this.plugins.get(type);
|
|
78
|
+
instance && (await instance.start());
|
|
79
|
+
return instance;
|
|
80
|
+
}
|
|
81
|
+
get(type) {
|
|
82
|
+
return this.plugins.get(type);
|
|
59
83
|
}
|
|
60
84
|
onStep(step) {
|
|
61
|
-
this.get(
|
|
62
|
-
this.get(
|
|
85
|
+
this.get('browserconsole')._currentStep = step;
|
|
86
|
+
this.get('network')._currentStep = step;
|
|
63
87
|
}
|
|
64
88
|
async output() {
|
|
65
89
|
const data = {};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const result = await plugin.stop(this.driver.client);
|
|
73
|
-
Object.assign(data, { ...result });
|
|
74
|
-
}
|
|
75
|
-
else if (plugin instanceof _1.BrowserConsole) {
|
|
76
|
-
data.browserconsole = plugin.stop();
|
|
77
|
-
}
|
|
90
|
+
for (const [, plugin] of this.plugins) {
|
|
91
|
+
if (plugin instanceof _1.NetworkManager) {
|
|
92
|
+
data.networkinfo = await plugin.stop();
|
|
93
|
+
}
|
|
94
|
+
else if (plugin instanceof _1.BrowserConsole) {
|
|
95
|
+
data.browserconsole = plugin.stop();
|
|
78
96
|
}
|
|
79
|
-
}
|
|
80
|
-
catch (e) {
|
|
81
|
-
console.error('Error capturing data', e.message);
|
|
82
97
|
}
|
|
83
98
|
return data;
|
|
84
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.js","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAGH,yBAMY;
|
|
1
|
+
{"version":3,"file":"plugin-manager.js","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAGH,yBAMY;AAOZ,MAAa,aAAa;IAQxB,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAPxB,YAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;QAC3C,iBAAY,GAAsB;YACvC,SAAS;YACT,OAAO;YACP,aAAa;YACb,gBAAgB;SACjB,CAAC;IACmC,CAAC;IAEtC,QAAQ,CAAC,IAAgB,EAAE,OAAsB;QAC/C,IAAI,QAAgB,CAAC;QACrB,QAAQ,IAAI,EAAE;YACZ,KAAK,SAAS;gBACZ,QAAQ,GAAG,IAAI,iBAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3C,MAAM;YACR,KAAK,OAAO;gBACV,QAAQ,GAAG,IAAI,UAAO,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC7C,MAAM;YACR,KAAK,aAAa;gBAChB,QAAQ,GAAG,IAAI,qBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC/C,MAAM;YACR,KAAK,gBAAgB;gBACnB,QAAQ,GAAG,IAAI,iBAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3C,MAAM;SACT;QACD,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CA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C,OAAO,EAAE;YACrC,IAAI,MAAM,YAAY,iBAAc,EAAE;gBACpC,IAAI,CAAC,WAAW,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;aACxC;iBAAM,IAAI,MAAM,YAAY,iBAAc,EAAE;gBAC3C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;aACrC;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ED,sCA4EC"}
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
* THE SOFTWARE.
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
26
|
-
import { PluginOutput } from '../common_types';
|
|
25
|
+
import { Driver, PluginOutput } from '../common_types';
|
|
27
26
|
export declare type TraceOptions = {
|
|
28
27
|
filmstrips?: boolean;
|
|
29
28
|
trace?: boolean;
|
|
@@ -33,9 +32,10 @@ export declare type TraceOptions = {
|
|
|
33
32
|
* https://chromedevtools.github.io/devtools-protocol/tot/Tracing/
|
|
34
33
|
*/
|
|
35
34
|
export declare class Tracing {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
private driver;
|
|
36
|
+
private options;
|
|
37
|
+
constructor(driver: Driver, options: TraceOptions);
|
|
38
|
+
start(): Promise<void>;
|
|
39
|
+
stop(): Promise<Partial<PluginOutput>>;
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/plugins/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/plugins/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIvD,oBAAY,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,qBAAa,OAAO;IACN,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,OAAO;gBAA/B,MAAM,EAAE,MAAM,EAAU,OAAO,EAAE,YAAY;IAE3D,KAAK;IAkCL,IAAI;CA0BX"}
|
package/dist/plugins/tracing.js
CHANGED
|
@@ -32,10 +32,11 @@ const trace_processor_1 = require("../sdk/trace-processor");
|
|
|
32
32
|
* https://chromedevtools.github.io/devtools-protocol/tot/Tracing/
|
|
33
33
|
*/
|
|
34
34
|
class Tracing {
|
|
35
|
-
constructor(options) {
|
|
35
|
+
constructor(driver, options) {
|
|
36
|
+
this.driver = driver;
|
|
36
37
|
this.options = options;
|
|
37
38
|
}
|
|
38
|
-
async start(
|
|
39
|
+
async start() {
|
|
39
40
|
const includedCategories = [
|
|
40
41
|
// exclude all default categories
|
|
41
42
|
'-*',
|
|
@@ -56,20 +57,20 @@ class Tracing {
|
|
|
56
57
|
// Includes FCP, LCP, Main thread frames, process, etc.
|
|
57
58
|
'devtools.timeline', 'disabled-by-default-devtools.timeline');
|
|
58
59
|
}
|
|
59
|
-
await client.send('Tracing.start', {
|
|
60
|
+
await this.driver.client.send('Tracing.start', {
|
|
60
61
|
/**
|
|
61
62
|
* Using `ReportEvents` makes gathering trace events
|
|
62
63
|
* much faster as opposed to using `ReturnAsStream` mode
|
|
63
64
|
*/
|
|
64
65
|
transferMode: 'ReportEvents',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
66
|
+
categories: includedCategories.join(','),
|
|
67
|
+
options: 'sampling-frequency=10000', // 1000 is default
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
async stop(
|
|
70
|
+
async stop() {
|
|
71
71
|
const events = [];
|
|
72
72
|
const collectListener = payload => events.push(...payload.value);
|
|
73
|
+
const { client } = this.driver;
|
|
73
74
|
client.on('Tracing.dataCollected', collectListener);
|
|
74
75
|
const [traceEvents] = await Promise.all([
|
|
75
76
|
new Promise(resolve => client.once('Tracing.tracingComplete', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/plugins/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/plugins/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAGH,wDAAkD;AAClD,4DAAoE;AAOpE;;;GAGG;AACH,MAAa,OAAO;IAClB,YAAoB,MAAc,EAAU,OAAqB;QAA7C,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAErE,KAAK,CAAC,KAAK;QACT,MAAM,kBAAkB,GAAG;YACzB,iCAAiC;YACjC,IAAI;SACL,CAAC;QACF,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,6EAA6E;YAC7E,kBAAkB,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;SACpE;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YACtB,kBAAkB,CAAC,IAAI;YACrB,2CAA2C;YAC3C,gCAAgC;YAChC,iCAAiC;YACjC,SAAS;YACT,4BAA4B;YAC5B,mBAAmB;YACnB,2DAA2D;YAC3D,uDAAuD;YACvD,mBAAmB,EACnB,uCAAuC,CACxC,CAAC;SACH;QACD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE;YAC7C;;;eAGG;YACH,YAAY,EAAE,cAAc;YAC5B,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;YACxC,OAAO,EAAE,0BAA0B,EAAE,kBAAkB;SACxD,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,MAAM,eAAe,GAAG,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QACjE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QAC/B,MAAM,CAAC,EAAE,CAAC,uBAAuB,EAAE,eAAe,CAAC,CAAC;QAEpD,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACtC,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CACpB,MAAM,CAAC,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;gBAC1C,MAAM,CAAC,GAAG,CAAC,uBAAuB,EAAE,eAAe,CAAC,CAAC;gBACrD,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CACH;YACD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;SAC3B,CAAC,CAAC;QACH,MAAM,MAAM,GAA0B,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,MAAM,CAAC,UAAU,GAAG,0BAAU,CAAC,OAAO,CAAC,WAAgC,CAAC,CAAC;SAC1E;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YACtB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;gBACpB,GAAG,gCAAc,CAAC,YAAY,CAAC,WAAgC,CAAC;aACjE,CAAC,CAAC;SACJ;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA/DD,0BA+DC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
export declare class Bundler {
|
|
26
|
+
moduleMap: Map<string, string>;
|
|
27
|
+
constructor();
|
|
28
|
+
prepare(absPath: string): Promise<void>;
|
|
29
|
+
zip(outputPath: string): Promise<unknown>;
|
|
30
|
+
build(entry: string, output: string): Promise<string>;
|
|
31
|
+
encode(outputPath: string): Promise<string>;
|
|
32
|
+
cleanup(outputPath: string): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../src/push/bundler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH,qBAAa,OAAO;IAClB,SAAS,sBAA6B;;IAGhC,OAAO,CAAC,OAAO,EAAE,MAAM;IAqBvB,GAAG,CAAC,UAAU,EAAE,MAAM;IAsBtB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAQnC,MAAM,CAAC,UAAU,EAAE,MAAM;IAIzB,OAAO,CAAC,UAAU,EAAE,MAAM;CAIjC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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.Bundler = void 0;
|
|
54
|
+
const path_1 = __importDefault(require("path"));
|
|
55
|
+
const promises_1 = require("fs/promises");
|
|
56
|
+
const fs_1 = require("fs");
|
|
57
|
+
const esbuild = __importStar(require("esbuild"));
|
|
58
|
+
const archiver_1 = __importDefault(require("archiver"));
|
|
59
|
+
const plugin_1 = require("./plugin");
|
|
60
|
+
function relativeToCwd(entry) {
|
|
61
|
+
return path_1.default.relative(process.cwd(), entry);
|
|
62
|
+
}
|
|
63
|
+
class Bundler {
|
|
64
|
+
constructor() {
|
|
65
|
+
this.moduleMap = new Map();
|
|
66
|
+
}
|
|
67
|
+
async prepare(absPath) {
|
|
68
|
+
const addToMap = (data) => {
|
|
69
|
+
this.moduleMap.set(data.path, data.contents);
|
|
70
|
+
};
|
|
71
|
+
const options = {
|
|
72
|
+
...(0, plugin_1.commonOptions)(),
|
|
73
|
+
...{
|
|
74
|
+
entryPoints: {
|
|
75
|
+
[absPath]: absPath,
|
|
76
|
+
},
|
|
77
|
+
plugins: [(0, plugin_1.MultiAssetPlugin)(addToMap)],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
const result = await esbuild.build(options);
|
|
81
|
+
if (result.errors.length > 0) {
|
|
82
|
+
throw result.errors;
|
|
83
|
+
}
|
|
84
|
+
this.moduleMap.set(absPath, result.outputFiles[0].text);
|
|
85
|
+
}
|
|
86
|
+
async zip(outputPath) {
|
|
87
|
+
return new Promise((fulfill, reject) => {
|
|
88
|
+
const output = (0, fs_1.createWriteStream)(outputPath);
|
|
89
|
+
const archive = (0, archiver_1.default)('zip', {
|
|
90
|
+
zlib: { level: 9 },
|
|
91
|
+
});
|
|
92
|
+
archive.on('error', reject);
|
|
93
|
+
output.on('close', fulfill);
|
|
94
|
+
archive.pipe(output);
|
|
95
|
+
for (const [path, content] of this.moduleMap.entries()) {
|
|
96
|
+
const relativePath = relativeToCwd(path);
|
|
97
|
+
// Date is fixed to Unix epoch so the file metadata is
|
|
98
|
+
// not modified everytime when files are bundled
|
|
99
|
+
archive.append(content, {
|
|
100
|
+
name: relativePath,
|
|
101
|
+
date: new Date('1970-01-01'),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
archive.finalize();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async build(entry, output) {
|
|
108
|
+
await this.prepare(entry);
|
|
109
|
+
await this.zip(output);
|
|
110
|
+
const data = await this.encode(output);
|
|
111
|
+
await this.cleanup(output);
|
|
112
|
+
return data;
|
|
113
|
+
}
|
|
114
|
+
async encode(outputPath) {
|
|
115
|
+
return await (0, promises_1.readFile)(outputPath, 'base64');
|
|
116
|
+
}
|
|
117
|
+
async cleanup(outputPath) {
|
|
118
|
+
this.moduleMap = new Map();
|
|
119
|
+
await (0, promises_1.unlink)(outputPath);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.Bundler = Bundler;
|
|
123
|
+
//# sourceMappingURL=bundler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../src/push/bundler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAwB;AACxB,0CAA+C;AAC/C,2BAAuC;AACvC,iDAAmC;AACnC,wDAAgC;AAChC,qCAAuE;AAEvE,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,MAAa,OAAO;IAElB;QADA,cAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IACvB,CAAC;IAEhB,KAAK,CAAC,OAAO,CAAC,OAAe;QAC3B,MAAM,QAAQ,GAAG,CAAC,IAAgB,EAAE,EAAE;YACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC,CAAC;QAEF,MAAM,OAAO,GAAyB;YACpC,GAAG,IAAA,sBAAa,GAAE;YAClB,GAAG;gBACD,WAAW,EAAE;oBACX,CAAC,OAAO,CAAC,EAAE,OAAO;iBACnB;gBACD,OAAO,EAAE,CAAC,IAAA,yBAAgB,EAAC,QAAQ,CAAC,CAAC;aACtC;SACF,CAAC;QACF,MAAM,MAAM,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K,CAAC,CAAC;QAC1B,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC7B,OAAO,MAAM,IAAA,mBAAQ,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,UAAkB;QAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;QAC3C,MAAM,IAAA,iBAAM,EAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;CACF;AA/DD,0BA+DC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ProjectSettings } from '../generator';
|
|
26
|
+
import { Monitor } from '../dsl/monitor';
|
|
27
|
+
import type { PushOptions } from '../common_types';
|
|
28
|
+
export declare function push(monitors: Monitor[], options: PushOptions): Promise<void>;
|
|
29
|
+
export declare function formatDuplicateError(monitors: Set<Monitor>): string;
|
|
30
|
+
export declare function loadSettings(): Promise<ProjectSettings>;
|
|
31
|
+
export declare function validateSettings(opts: PushOptions): void;
|
|
32
|
+
export declare function catchIncorrectSettings(settings: ProjectSettings, options: PushOptions): Promise<void>;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/push/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAeH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAWzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAsB,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,iBA8CnE;AAgBD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,UAU1D;AAKD,wBAAsB,YAAY,6BASjC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,QAuBjD;AAaD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,WAAW,iBAuBrB"}
|
|
@@ -0,0 +1,174 @@
|
|
|
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.catchIncorrectSettings = exports.validateSettings = exports.loadSettings = exports.formatDuplicateError = exports.push = void 0;
|
|
28
|
+
const path_1 = require("path");
|
|
29
|
+
const fs_1 = require("fs");
|
|
30
|
+
const promises_1 = require("fs/promises");
|
|
31
|
+
const enquirer_1 = require("enquirer");
|
|
32
|
+
const colors_1 = require("kleur/colors");
|
|
33
|
+
const request_1 = require("./request");
|
|
34
|
+
const monitor_1 = require("./monitor");
|
|
35
|
+
const helpers_1 = require("../helpers");
|
|
36
|
+
async function push(monitors, options) {
|
|
37
|
+
if (monitors.length === 0) {
|
|
38
|
+
throw 'No Monitors found';
|
|
39
|
+
}
|
|
40
|
+
const duplicates = trackDuplicates(monitors);
|
|
41
|
+
if (duplicates.size > 0) {
|
|
42
|
+
throw (0, helpers_1.error)(formatDuplicateError(duplicates));
|
|
43
|
+
}
|
|
44
|
+
(0, helpers_1.progress)(`preparing all monitors`);
|
|
45
|
+
const schemas = await (0, monitor_1.buildMonitorSchema)(monitors);
|
|
46
|
+
try {
|
|
47
|
+
(0, helpers_1.progress)(`creating all monitors`);
|
|
48
|
+
const { body, statusCode } = await (0, monitor_1.createMonitors)(schemas, options);
|
|
49
|
+
if (statusCode === 404) {
|
|
50
|
+
throw (0, request_1.formatNotFoundError)(await body.text());
|
|
51
|
+
}
|
|
52
|
+
if (!(0, request_1.ok)(statusCode)) {
|
|
53
|
+
const { error, message } = await body.json();
|
|
54
|
+
throw (0, request_1.formatAPIError)(statusCode, error, message);
|
|
55
|
+
}
|
|
56
|
+
body.setEncoding('utf-8');
|
|
57
|
+
for await (const data of body) {
|
|
58
|
+
// Its kind of hacky for now where Kibana streams the response by
|
|
59
|
+
// writing the data as NDJSON events (data can be interleaved), we
|
|
60
|
+
// distinguish the final data by checking if the event was a progress vs complete event
|
|
61
|
+
const chunks = (0, helpers_1.safeNDJSONParse)(data);
|
|
62
|
+
for (const chunk of chunks) {
|
|
63
|
+
if (typeof chunk === 'string') {
|
|
64
|
+
(0, helpers_1.progress)(chunk);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const { failedMonitors, failedStaleMonitors } = chunk;
|
|
68
|
+
if (failedMonitors && failedMonitors.length > 0) {
|
|
69
|
+
throw (0, request_1.formatFailedMonitors)(failedMonitors);
|
|
70
|
+
}
|
|
71
|
+
if (failedStaleMonitors.length > 0) {
|
|
72
|
+
(0, helpers_1.write)((0, colors_1.yellow)((0, request_1.formatStaleMonitors)(failedStaleMonitors)));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
(0, helpers_1.done)('Pushed');
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
(0, helpers_1.error)(e);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.push = push;
|
|
83
|
+
function trackDuplicates(monitors) {
|
|
84
|
+
const monitorMap = new Map();
|
|
85
|
+
const duplicates = new Set();
|
|
86
|
+
for (const monitor of monitors) {
|
|
87
|
+
const id = monitor.config.id;
|
|
88
|
+
if (monitorMap.has(id)) {
|
|
89
|
+
duplicates.add(monitorMap.get(id));
|
|
90
|
+
duplicates.add(monitor);
|
|
91
|
+
}
|
|
92
|
+
monitorMap.set(id, monitor);
|
|
93
|
+
}
|
|
94
|
+
return duplicates;
|
|
95
|
+
}
|
|
96
|
+
function formatDuplicateError(monitors) {
|
|
97
|
+
let outer = (0, colors_1.bold)(`Aborted: Duplicate monitors found\n`);
|
|
98
|
+
let inner = '';
|
|
99
|
+
for (const monitor of monitors) {
|
|
100
|
+
const { config, source } = monitor;
|
|
101
|
+
inner += `* ${config.id} - ${source.file}:${source.line}:${source.column}\n`;
|
|
102
|
+
}
|
|
103
|
+
outer += (0, helpers_1.indent)(inner);
|
|
104
|
+
return outer;
|
|
105
|
+
}
|
|
106
|
+
exports.formatDuplicateError = formatDuplicateError;
|
|
107
|
+
const PROJECT_SETTINGS_PATH = (0, path_1.join)(helpers_1.SYNTHETICS_PATH, 'project.json');
|
|
108
|
+
const INSTALLATION_HELP = `Run 'npx @elastic/synthetics init' to create project with default settings.`;
|
|
109
|
+
async function loadSettings() {
|
|
110
|
+
if (!(0, fs_1.existsSync)(PROJECT_SETTINGS_PATH)) {
|
|
111
|
+
throw (0, helpers_1.error)(`Aborted. Synthetics project not set up.
|
|
112
|
+
|
|
113
|
+
${INSTALLATION_HELP}`);
|
|
114
|
+
}
|
|
115
|
+
const contents = await (0, promises_1.readFile)(PROJECT_SETTINGS_PATH, 'utf-8');
|
|
116
|
+
return JSON.parse(contents);
|
|
117
|
+
}
|
|
118
|
+
exports.loadSettings = loadSettings;
|
|
119
|
+
function validateSettings(opts) {
|
|
120
|
+
const INVALID = 'Aborted. Invalid synthetics project settings.';
|
|
121
|
+
let reason = '';
|
|
122
|
+
if (!opts.project) {
|
|
123
|
+
reason = 'Set project id via CLI as `--project <id>`';
|
|
124
|
+
}
|
|
125
|
+
else if (!opts.locations && !opts.privateLocations) {
|
|
126
|
+
reason = `Set default location for all monitors via
|
|
127
|
+
- CLI as '--locations <values...> or --privateLocations <values...>'
|
|
128
|
+
- Synthetics config file 'monitors.locations' | 'monitors.privateLocations' field`;
|
|
129
|
+
}
|
|
130
|
+
else if (!opts.schedule) {
|
|
131
|
+
reason = `Set default schedule in minutes for all monitors via
|
|
132
|
+
- CLI as '--schedule <mins>'
|
|
133
|
+
- Synthetics config file 'monitors.schedule' field`;
|
|
134
|
+
}
|
|
135
|
+
if (!reason)
|
|
136
|
+
return;
|
|
137
|
+
throw (0, helpers_1.error)(`${INVALID}
|
|
138
|
+
|
|
139
|
+
${reason}
|
|
140
|
+
|
|
141
|
+
${INSTALLATION_HELP}`);
|
|
142
|
+
}
|
|
143
|
+
exports.validateSettings = validateSettings;
|
|
144
|
+
async function overrideSettings(project) {
|
|
145
|
+
const settings = JSON.parse(await (0, promises_1.readFile)(PROJECT_SETTINGS_PATH, 'utf-8'));
|
|
146
|
+
settings.project = project;
|
|
147
|
+
await (0, promises_1.writeFile)(PROJECT_SETTINGS_PATH, JSON.stringify(settings, null, 2), 'utf-8');
|
|
148
|
+
}
|
|
149
|
+
async function catchIncorrectSettings(settings, options) {
|
|
150
|
+
let override = !settings.project;
|
|
151
|
+
if (settings.project && settings.project !== options.project) {
|
|
152
|
+
if (typeof process.env.TEST_OVERRIDE != null) {
|
|
153
|
+
override = Boolean(process.env.TEST_OVERRIDE);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
// Add an extra line to make it easier to read the prompt
|
|
157
|
+
(0, helpers_1.write)('');
|
|
158
|
+
({ override } = await (0, enquirer_1.prompt)({
|
|
159
|
+
type: 'confirm',
|
|
160
|
+
name: 'override',
|
|
161
|
+
message: `Monitors were pushed under the '${settings.project}' project. Are you sure you want to push them under the new '${options.project}' (note that this will duplicate the monitors, the old ones being orphaned)`,
|
|
162
|
+
initial: false,
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
if (!override) {
|
|
166
|
+
throw (0, helpers_1.aborted)('Push command Aborted');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (override) {
|
|
170
|
+
await overrideSettings(options.project);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.catchIncorrectSettings = catchIncorrectSettings;
|
|
174
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/push/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,+BAA4B;AAC5B,2BAAgC;AAChC,0CAAkD;AAClD,uCAAkC;AAClC,yCAA4C;AAC5C,uCAMmB;AACnB,uCAA+D;AAG/D,wCASoB;AAGb,KAAK,UAAU,IAAI,CAAC,QAAmB,EAAE,OAAoB;IAClE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,MAAM,mBAAmB,CAAC;KAC3B;IAED,MAAM,UAAU,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE;QACvB,MAAM,IAAA,eAAK,EAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC;KAC/C;IAED,IAAA,kBAAQ,EAAC,wB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AE,CAAC,CAAC,EACjC,OAAO,CACR,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,sBAAsB,CAC1C,QAAyB,EACzB,OAAoB;IAEpB,IAAI,QAAQ,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;IACjC,IAAI,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,EAAE;QAC5D,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,EAAE;YAC5C,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;SAC/C;aAAM;YACL,yDAAyD;YACzD,IAAA,eAAK,EAAC,EAAE,CAAC,CAAC;YACV,CAAC,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,iBAAM,EAAwB;gBAClD,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,mCAAmC,QAAQ,CAAC,OAAO,gEAAgE,OAAO,CAAC,OAAO,6EAA6E;gBACxN,OAAO,EAAE,KAAK;aACf,CAAC,CAAC,CAAC;SACL;QACD,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAA,iBAAO,EAAC,sBAAsB,CAAC,CAAC;SACvC;KACF;IACD,IAAI,QAAQ,EAAE;QACZ,MAAM,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACzC;AACH,CAAC;AAzBD,wDAyBC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { Monitor, MonitorConfig } from '../dsl/monitor';
|
|
26
|
+
import { PushOptions } from '../common_types';
|
|
27
|
+
export declare type MonitorSchema = Omit<MonitorConfig, 'locations'> & {
|
|
28
|
+
content: string;
|
|
29
|
+
locations: string[];
|
|
30
|
+
filter: Monitor['filter'];
|
|
31
|
+
};
|
|
32
|
+
export declare function buildMonitorSchema(monitors: Monitor[]): Promise<MonitorSchema[]>;
|
|
33
|
+
export declare function createMonitors(monitors: MonitorSchema[], options: PushOptions): Promise<import("undici/types/dispatcher").ResponseData>;
|
|
34
|
+
//# sourceMappingURL=monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/push/monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,oBAAY,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B,CAAC;AAaF,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,4BAwB3D;AAED,wBAAsB,cAAc,CAClC,QAAQ,EAAE,aAAa,EAAE,EACzB,OAAO,EAAE,WAAW,2DAgBrB"}
|