checkly 0.0.0-pr.686.4c0f5e3
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 +43 -0
- package/bin/dev +17 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/constructs.d.ts +1 -0
- package/constructs.js +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +228 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/commands/authCommand.d.ts +5 -0
- package/dist/commands/authCommand.js +14 -0
- package/dist/commands/authCommand.js.map +1 -0
- package/dist/commands/baseCommand.d.ts +9 -0
- package/dist/commands/baseCommand.js +21 -0
- package/dist/commands/baseCommand.js.map +1 -0
- package/dist/commands/deploy.d.ts +13 -0
- package/dist/commands/deploy.js +171 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +10 -0
- package/dist/commands/destroy.js +47 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/env/add.d.ts +13 -0
- package/dist/commands/env/add.js +54 -0
- package/dist/commands/env/add.js.map +1 -0
- package/dist/commands/env/ls.d.ts +6 -0
- package/dist/commands/env/ls.js +21 -0
- package/dist/commands/env/ls.js.map +1 -0
- package/dist/commands/env/pull.d.ts +12 -0
- package/dist/commands/env/pull.js +63 -0
- package/dist/commands/env/pull.js.map +1 -0
- package/dist/commands/env/rm.d.ts +12 -0
- package/dist/commands/env/rm.js +56 -0
- package/dist/commands/env/rm.js.map +1 -0
- package/dist/commands/env/update.d.ts +13 -0
- package/dist/commands/env/update.js +54 -0
- package/dist/commands/env/update.js.map +1 -0
- package/dist/commands/login.d.ts +13 -0
- package/dist/commands/login.js +129 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +9 -0
- package/dist/commands/logout.js +40 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/runtimes.d.ts +6 -0
- package/dist/commands/runtimes.js +26 -0
- package/dist/commands/runtimes.js.map +1 -0
- package/dist/commands/switch.d.ts +9 -0
- package/dist/commands/switch.js +59 -0
- package/dist/commands/switch.js.map +1 -0
- package/dist/commands/test.d.ts +36 -0
- package/dist/commands/test.js +237 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/trigger.d.ts +32 -0
- package/dist/commands/trigger.js +173 -0
- package/dist/commands/trigger.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +16 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -0
- package/dist/constructs/alert-channel-subscription.d.ts +44 -0
- package/dist/constructs/alert-channel-subscription.js +39 -0
- package/dist/constructs/alert-channel-subscription.js.map +1 -0
- package/dist/constructs/alert-channel.d.ts +53 -0
- package/dist/constructs/alert-channel.js +55 -0
- package/dist/constructs/alert-channel.js.map +1 -0
- package/dist/constructs/api-check.d.ts +179 -0
- package/dist/constructs/api-check.js +248 -0
- package/dist/constructs/api-check.js.map +1 -0
- package/dist/constructs/browser-check.d.ts +59 -0
- package/dist/constructs/browser-check.js +102 -0
- package/dist/constructs/browser-check.js.map +1 -0
- package/dist/constructs/check-group.d.ts +116 -0
- package/dist/constructs/check-group.js +113 -0
- package/dist/constructs/check-group.js.map +1 -0
- package/dist/constructs/check.d.ts +111 -0
- package/dist/constructs/check.js +88 -0
- package/dist/constructs/check.js.map +1 -0
- package/dist/constructs/construct.d.ts +17 -0
- package/dist/constructs/construct.js +22 -0
- package/dist/constructs/construct.js.map +1 -0
- package/dist/constructs/email-alert-channel.d.ts +26 -0
- package/dist/constructs/email-alert-channel.js +37 -0
- package/dist/constructs/email-alert-channel.js.map +1 -0
- package/dist/constructs/environment-variable.d.ts +2 -0
- package/dist/constructs/environment-variable.js +3 -0
- package/dist/constructs/environment-variable.js.map +1 -0
- package/dist/constructs/frequency.d.ts +20 -0
- package/dist/constructs/frequency.js +26 -0
- package/dist/constructs/frequency.js.map +1 -0
- package/dist/constructs/http-header.d.ts +2 -0
- package/dist/constructs/http-header.js +3 -0
- package/dist/constructs/http-header.js.map +1 -0
- package/dist/constructs/index.d.ts +15 -0
- package/dist/constructs/index.js +32 -0
- package/dist/constructs/index.js.map +1 -0
- package/dist/constructs/key-value-pair.d.ts +5 -0
- package/dist/constructs/key-value-pair.js +3 -0
- package/dist/constructs/key-value-pair.js.map +1 -0
- package/dist/constructs/opsgenie-alert-channel.d.ts +45 -0
- package/dist/constructs/opsgenie-alert-channel.js +44 -0
- package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
- package/dist/constructs/pagerduty-alert-channel.d.ts +39 -0
- package/dist/constructs/pagerduty-alert-channel.js +42 -0
- package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
- package/dist/constructs/project.d.ts +57 -0
- package/dist/constructs/project.js +100 -0
- package/dist/constructs/project.js.map +1 -0
- package/dist/constructs/query-param.d.ts +2 -0
- package/dist/constructs/query-param.js +3 -0
- package/dist/constructs/query-param.js.map +1 -0
- package/dist/constructs/ref.d.ts +5 -0
- package/dist/constructs/ref.js +13 -0
- package/dist/constructs/ref.js.map +1 -0
- package/dist/constructs/slack-alert-channel.d.ts +26 -0
- package/dist/constructs/slack-alert-channel.js +40 -0
- package/dist/constructs/slack-alert-channel.js.map +1 -0
- package/dist/constructs/sms-alert-channel.d.ts +27 -0
- package/dist/constructs/sms-alert-channel.js +38 -0
- package/dist/constructs/sms-alert-channel.js.map +1 -0
- package/dist/constructs/validator-error.d.ts +2 -0
- package/dist/constructs/validator-error.js +7 -0
- package/dist/constructs/validator-error.js.map +1 -0
- package/dist/constructs/webhook-alert-channel.d.ts +59 -0
- package/dist/constructs/webhook-alert-channel.js +50 -0
- package/dist/constructs/webhook-alert-channel.js.map +1 -0
- package/dist/help/examples.d.ts +6 -0
- package/dist/help/examples.js +22 -0
- package/dist/help/examples.js.map +1 -0
- package/dist/help/help-extension.d.ts +4 -0
- package/dist/help/help-extension.js +41 -0
- package/dist/help/help-extension.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/messages/common-messages.d.ts +5 -0
- package/dist/messages/common-messages.js +9 -0
- package/dist/messages/common-messages.js.map +1 -0
- package/dist/reporters/abstract-list.d.ts +35 -0
- package/dist/reporters/abstract-list.js +135 -0
- package/dist/reporters/abstract-list.js.map +1 -0
- package/dist/reporters/ci.d.ts +12 -0
- package/dist/reporters/ci.js +29 -0
- package/dist/reporters/ci.js.map +1 -0
- package/dist/reporters/dot.d.ts +12 -0
- package/dist/reporters/dot.js +28 -0
- package/dist/reporters/dot.js.map +1 -0
- package/dist/reporters/github.d.ts +34 -0
- package/dist/reporters/github.js +95 -0
- package/dist/reporters/github.js.map +1 -0
- package/dist/reporters/list.d.ts +14 -0
- package/dist/reporters/list.js +56 -0
- package/dist/reporters/list.js.map +1 -0
- package/dist/reporters/reporter.d.ts +15 -0
- package/dist/reporters/reporter.js +23 -0
- package/dist/reporters/reporter.js.map +1 -0
- package/dist/reporters/util.d.ts +15 -0
- package/dist/reporters/util.js +283 -0
- package/dist/reporters/util.js.map +1 -0
- package/dist/rest/accounts.d.ts +12 -0
- package/dist/rest/accounts.js +15 -0
- package/dist/rest/accounts.js.map +1 -0
- package/dist/rest/api.d.ts +27 -0
- package/dist/rest/api.js +90 -0
- package/dist/rest/api.js.map +1 -0
- package/dist/rest/assets.d.ts +13 -0
- package/dist/rest/assets.js +30 -0
- package/dist/rest/assets.js.map +1 -0
- package/dist/rest/environment-variables.d.ts +16 -0
- package/dist/rest/environment-variables.js +25 -0
- package/dist/rest/environment-variables.js.map +1 -0
- package/dist/rest/locations.d.ts +11 -0
- package/dist/rest/locations.js +12 -0
- package/dist/rest/locations.js.map +1 -0
- package/dist/rest/private-locations.d.ts +11 -0
- package/dist/rest/private-locations.js +12 -0
- package/dist/rest/private-locations.js.map +1 -0
- package/dist/rest/projects.d.ts +43 -0
- package/dist/rest/projects.js +24 -0
- package/dist/rest/projects.js.map +1 -0
- package/dist/rest/runtimes.d.ts +15 -0
- package/dist/rest/runtimes.js +15 -0
- package/dist/rest/runtimes.js.map +1 -0
- package/dist/rest/test-sessions.d.ts +57 -0
- package/dist/rest/test-sessions.js +21 -0
- package/dist/rest/test-sessions.js.map +1 -0
- package/dist/rest/users.d.ts +12 -0
- package/dist/rest/users.js +12 -0
- package/dist/rest/users.js.map +1 -0
- package/dist/services/abstract-check-runner.d.ts +55 -0
- package/dist/services/abstract-check-runner.js +154 -0
- package/dist/services/abstract-check-runner.js.map +1 -0
- package/dist/services/check-parser/collector.d.ts +33 -0
- package/dist/services/check-parser/collector.js +48 -0
- package/dist/services/check-parser/collector.js.map +1 -0
- package/dist/services/check-parser/errors.d.ts +8 -0
- package/dist/services/check-parser/errors.js +45 -0
- package/dist/services/check-parser/errors.js.map +1 -0
- package/dist/services/check-parser/parser.d.ts +39 -0
- package/dist/services/check-parser/parser.js +296 -0
- package/dist/services/check-parser/parser.js.map +1 -0
- package/dist/services/checkly-config-loader.d.ts +54 -0
- package/dist/services/checkly-config-loader.js +55 -0
- package/dist/services/checkly-config-loader.js.map +1 -0
- package/dist/services/config.d.ts +24 -0
- package/dist/services/config.js +75 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/project-parser.d.ts +19 -0
- package/dist/services/project-parser.js +87 -0
- package/dist/services/project-parser.js.map +1 -0
- package/dist/services/socket-client.d.ts +4 -0
- package/dist/services/socket-client.js +20 -0
- package/dist/services/socket-client.js.map +1 -0
- package/dist/services/test-filters.d.ts +2 -0
- package/dist/services/test-filters.js +16 -0
- package/dist/services/test-filters.js.map +1 -0
- package/dist/services/test-runner.d.ts +21 -0
- package/dist/services/test-runner.js +50 -0
- package/dist/services/test-runner.js.map +1 -0
- package/dist/services/trigger-runner.d.ts +26 -0
- package/dist/services/trigger-runner.js +47 -0
- package/dist/services/trigger-runner.js.map +1 -0
- package/dist/services/util.d.ts +30 -0
- package/dist/services/util.js +157 -0
- package/dist/services/util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +527 -0
- package/package.json +174 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlackAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Slack Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class SlackAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Slack Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Slack alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#slackalertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.url = props.url;
|
|
25
|
+
this.channel = props.channel;
|
|
26
|
+
project_1.Session.registerConstruct(this);
|
|
27
|
+
}
|
|
28
|
+
synthesize() {
|
|
29
|
+
return {
|
|
30
|
+
...super.synthesize(),
|
|
31
|
+
type: 'SLACK',
|
|
32
|
+
config: {
|
|
33
|
+
url: this.url,
|
|
34
|
+
channel: this.channel,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SlackAlertChannel = SlackAlertChannel;
|
|
40
|
+
//# sourceMappingURL=slack-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/slack-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,4BAAY;IAGjD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAA6B;QAC3D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACN,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB;SACF,CAAA;IACH,CAAC;CACF;AA5BD,8CA4BC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface SmsAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The phone number where to send the alert notifications.
|
|
5
|
+
*/
|
|
6
|
+
phoneNumber: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates a SMS Alert Channel
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* This class make use of the Alert Channel endpoints.
|
|
14
|
+
*/
|
|
15
|
+
export declare class SmsAlertChannel extends AlertChannel {
|
|
16
|
+
phoneNumber: string;
|
|
17
|
+
/**
|
|
18
|
+
* Constructs the SMS Alert Channel instance
|
|
19
|
+
*
|
|
20
|
+
* @param logicalId unique project-scoped resource name identification
|
|
21
|
+
* @param props SMS alert channel configuration properties
|
|
22
|
+
*
|
|
23
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#smsalertchannel Read more in the docs}
|
|
24
|
+
*/
|
|
25
|
+
constructor(logicalId: string, props: SmsAlertChannelProps);
|
|
26
|
+
synthesize(): any;
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SmsAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates a SMS Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class SmsAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the SMS Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props SMS alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#smsalertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.phoneNumber = props.phoneNumber;
|
|
25
|
+
project_1.Session.registerConstruct(this);
|
|
26
|
+
}
|
|
27
|
+
synthesize() {
|
|
28
|
+
return {
|
|
29
|
+
...super.synthesize(),
|
|
30
|
+
type: 'SMS',
|
|
31
|
+
config: {
|
|
32
|
+
number: this.phoneNumber,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SmsAlertChannel = SmsAlertChannel;
|
|
38
|
+
//# sourceMappingURL=sms-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/sms-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AASnC;;;;;;GAMG;AACH,MAAa,eAAgB,SAAQ,4BAAY;IAE/C;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAA2B;QACzD,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,KAAK;YACX,MAAM,EAAE;gBACN,MAAM,EAAE,IAAI,CAAC,WAAW;aACzB;SACF,CAAA;IACH,CAAC;CACF;AAzBD,0CAyBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-error.js","sourceRoot":"","sources":["../../src/constructs/validator-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAgB,SAAQ,KAAK;CAAG;AAA7C,0CAA6C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
import { HttpHeader } from './http-header';
|
|
3
|
+
import { HttpRequestMethod } from './api-check';
|
|
4
|
+
import { QueryParam } from './query-param';
|
|
5
|
+
export interface WebhookAlertChannelProps extends AlertChannelProps {
|
|
6
|
+
/**
|
|
7
|
+
* Friendly name to recognise the integration.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
webhookType?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The URL where to send the webhook HTTP request.
|
|
13
|
+
*/
|
|
14
|
+
url: URL;
|
|
15
|
+
/**
|
|
16
|
+
* This is commonly a JSON body. You can
|
|
17
|
+
* use {@link https://www.checklyhq.com/docs/alerting/webhooks/#using-variables Handlebars-style template variables}
|
|
18
|
+
* to add custom data to the template.
|
|
19
|
+
*/
|
|
20
|
+
template?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Either `GET`, `POST`, `PUT`, `PATCH`, `HEAD`, `DELETE` or 'OPTIONS' just like an API check.
|
|
23
|
+
*/
|
|
24
|
+
method?: HttpRequestMethod;
|
|
25
|
+
/**
|
|
26
|
+
* Key-value elements array with the headers to send in the webhook HTTP request.
|
|
27
|
+
*/
|
|
28
|
+
headers?: Array<HttpHeader>;
|
|
29
|
+
/**
|
|
30
|
+
* Key-value elements array with the query parameters to include in the URL for the webhook HTTP request.
|
|
31
|
+
*/
|
|
32
|
+
queryParameters?: Array<QueryParam>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates an Webhook Alert Channel
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
*
|
|
39
|
+
* This class make use of the Alert Channel endpoints.
|
|
40
|
+
*/
|
|
41
|
+
export declare class WebhookAlertChannel extends AlertChannel {
|
|
42
|
+
name: string;
|
|
43
|
+
webhookType?: string;
|
|
44
|
+
url: URL;
|
|
45
|
+
template?: string;
|
|
46
|
+
method?: HttpRequestMethod;
|
|
47
|
+
headers?: Array<HttpHeader>;
|
|
48
|
+
queryParameters?: Array<QueryParam>;
|
|
49
|
+
/**
|
|
50
|
+
* Constructs the Webhook Alert Channel instance
|
|
51
|
+
*
|
|
52
|
+
* @param logicalId unique project-scoped resource name identification
|
|
53
|
+
* @param props Webhook alert channel configuration properties
|
|
54
|
+
*
|
|
55
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#webhookalertchannel Read more in the docs}
|
|
56
|
+
*/
|
|
57
|
+
constructor(logicalId: string, props: WebhookAlertChannelProps);
|
|
58
|
+
synthesize(): any;
|
|
59
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Webhook Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class WebhookAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Webhook Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Webhook alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#webhookalertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.name = props.name;
|
|
25
|
+
this.webhookType = props.webhookType;
|
|
26
|
+
this.url = props.url;
|
|
27
|
+
this.template = props.template;
|
|
28
|
+
this.method = props.method;
|
|
29
|
+
this.headers = props.headers;
|
|
30
|
+
this.queryParameters = props.queryParameters;
|
|
31
|
+
project_1.Session.registerConstruct(this);
|
|
32
|
+
}
|
|
33
|
+
synthesize() {
|
|
34
|
+
return {
|
|
35
|
+
...super.synthesize(),
|
|
36
|
+
type: 'WEBHOOK',
|
|
37
|
+
config: {
|
|
38
|
+
name: this.name,
|
|
39
|
+
webhookType: this.webhookType,
|
|
40
|
+
url: this.url,
|
|
41
|
+
template: this.template,
|
|
42
|
+
method: this.method,
|
|
43
|
+
headers: this.headers,
|
|
44
|
+
queryParameters: this.queryParameters,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.WebhookAlertChannel = WebhookAlertChannel;
|
|
50
|
+
//# sourceMappingURL=webhook-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/webhook-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AAIjE,uCAAmC;AAgCnC;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,4BAAY;IAQnD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAA+B;QAC7D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAA;QAC5C,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC;SACF,CAAA;IACH,CAAC;CACF;AA3CD,kDA2CC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const examples = [
|
|
4
|
+
{
|
|
5
|
+
description: 'Test your checks on Checkly with full logging.',
|
|
6
|
+
command: 'npx checkly test -v',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
description: 'Pass environment variables to your checks.',
|
|
10
|
+
command: 'npx checkly test -e SECRET=my-password',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
description: 'Record your test session in Checkly with logs, traces and videos.',
|
|
14
|
+
command: 'npx checkly test --record',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
description: 'Deploy your project to your Checkly account.',
|
|
18
|
+
command: 'npx checkly deploy',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
exports.default = examples;
|
|
22
|
+
//# sourceMappingURL=examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../../src/help/examples.ts"],"names":[],"mappings":";;AAKA,MAAM,QAAQ,GAAmB;IAC/B;QACE,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,qBAAqB;KAC/B;IACD;QACE,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,wCAAwC;KAClD;IACD;QACE,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,2BAA2B;KACrC;IACD;QACE,WAAW,EAAE,8CAA8C;QAC3D,OAAO,EAAE,oBAAoB;KAC9B;CACF,CAAA;AACD,kBAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const examples_1 = require("./examples");
|
|
5
|
+
class ChecklyHelpClass extends core_1.Help {
|
|
6
|
+
showRootHelp() {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
// start copy & paste from standard showRootHelp implementation
|
|
9
|
+
let rootTopics = this.sortedTopics;
|
|
10
|
+
let rootCommands = this.sortedCommands;
|
|
11
|
+
const state = (_b = (_a = this.config.pjson) === null || _a === void 0 ? void 0 : _a.oclif) === null || _b === void 0 ? void 0 : _b.state;
|
|
12
|
+
if (state) {
|
|
13
|
+
this.log(state === 'deprecated'
|
|
14
|
+
? `${this.config.bin} is deprecated`
|
|
15
|
+
: `${this.config.bin} is in ${state}.\n`);
|
|
16
|
+
}
|
|
17
|
+
this.log(this.formatRoot());
|
|
18
|
+
this.log('');
|
|
19
|
+
if (!this.opts.all) {
|
|
20
|
+
rootTopics = rootTopics.filter(t => !t.name.includes(':'));
|
|
21
|
+
rootCommands = rootCommands.filter(c => !c.id.includes(':'));
|
|
22
|
+
}
|
|
23
|
+
if (rootTopics.length > 0) {
|
|
24
|
+
this.log(this.formatTopics(rootTopics));
|
|
25
|
+
this.log('');
|
|
26
|
+
}
|
|
27
|
+
if (rootCommands.length > 0) {
|
|
28
|
+
rootCommands = rootCommands.filter(c => c.id);
|
|
29
|
+
this.log(this.formatCommands(rootCommands));
|
|
30
|
+
this.log('');
|
|
31
|
+
}
|
|
32
|
+
// end
|
|
33
|
+
const examplesString = examples_1.default.reduce((accumulator, example) => {
|
|
34
|
+
return accumulator + `\n- ${example.description}\n\n${this.indent('$ ' + example.command)}\n`;
|
|
35
|
+
}, '');
|
|
36
|
+
this.log(this.section('EXAMPLES', examplesString));
|
|
37
|
+
return Promise.resolve();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = ChecklyHelpClass;
|
|
41
|
+
//# sourceMappingURL=help-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-extension.js","sourceRoot":"","sources":["../../src/help/help-extension.ts"],"names":[],"mappings":";;AAAA,sCAAkC;AAElC,yCAAiC;AAEjC,MAAqB,gBAAiB,SAAQ,WAAI;IACzC,YAAY;;QACjB,+DAA+D;QAC/D,IAAI,UAAU,GAAG,IAAI,CAAC,YAAY,CAAA;QAClC,IAAI,YAAY,GAAG,IAAI,CAAC,cAAc,CAAA;QAEtC,MAAM,KAAK,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,KAAK,0CAAE,KAAK,0CAAE,KAAK,CAAA;QAC7C,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,GAAG,CACN,KAAK,KAAK,YAAY;gBACpB,CAA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G,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;QAC/F,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAA;QAClD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF;AA1CD,mCA0CC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineConfig = exports.constructs = void 0;
|
|
4
|
+
exports.constructs = require("./constructs");
|
|
5
|
+
var config_1 = require("./config");
|
|
6
|
+
Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return config_1.defineConfig; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,mCAAuC;AAA9B,sGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commonMessages = {
|
|
4
|
+
forceMode: 'Force mode. Skips the confirmation dialog.',
|
|
5
|
+
configFile: 'The Checkly CLI configuration file. If not passed, uses the checkly.config.ts|js file in the current' +
|
|
6
|
+
' directory.',
|
|
7
|
+
};
|
|
8
|
+
exports.default = commonMessages;
|
|
9
|
+
//# sourceMappingURL=common-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-messages.js","sourceRoot":"","sources":["../../src/messages/common-messages.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE,4CAA4C;IACvD,UAAU,EAAE,sGAAsG;QAC9G,aAAa;CAClB,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Reporter } from './reporter';
|
|
2
|
+
import type { RunLocation, CheckRunId } from '../services/abstract-check-runner';
|
|
3
|
+
import { Check } from '../constructs/check';
|
|
4
|
+
import { TestResultsShortLinks } from '../rest/test-sessions';
|
|
5
|
+
export type checkFilesMap = Map<string | undefined, Map<CheckRunId, {
|
|
6
|
+
check?: Check;
|
|
7
|
+
result?: any;
|
|
8
|
+
titleString: string;
|
|
9
|
+
testResultId?: string;
|
|
10
|
+
}>>;
|
|
11
|
+
export default abstract class AbstractListReporter implements Reporter {
|
|
12
|
+
_clearString: string;
|
|
13
|
+
runLocation: RunLocation;
|
|
14
|
+
checkFilesMap?: checkFilesMap;
|
|
15
|
+
numChecks?: number;
|
|
16
|
+
verbose: boolean;
|
|
17
|
+
testSessionId?: string;
|
|
18
|
+
constructor(runLocation: RunLocation, verbose: boolean);
|
|
19
|
+
abstract onBeginStatic(): void;
|
|
20
|
+
onBegin(checks: Array<{
|
|
21
|
+
check: any;
|
|
22
|
+
checkRunId: CheckRunId;
|
|
23
|
+
testResultId?: string;
|
|
24
|
+
}>, testSessionId?: string): void;
|
|
25
|
+
abstract onEnd(): void;
|
|
26
|
+
onCheckEnd(checkRunId: CheckRunId, checkResult: any, links?: TestResultsShortLinks): void;
|
|
27
|
+
onError(err: Error): void;
|
|
28
|
+
_clearSummary(): void;
|
|
29
|
+
_printSummary(opts?: {
|
|
30
|
+
skipCheckCount?: boolean;
|
|
31
|
+
}): void;
|
|
32
|
+
_printBriefSummary(): void;
|
|
33
|
+
_printTestSessionsUrl(): Promise<void>;
|
|
34
|
+
_runLocationString(): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chalk = require("chalk");
|
|
4
|
+
const indentString = require("indent-string");
|
|
5
|
+
const util_1 = require("./util");
|
|
6
|
+
const api_1 = require("../rest/api");
|
|
7
|
+
class AbstractListReporter {
|
|
8
|
+
constructor(runLocation, verbose) {
|
|
9
|
+
this._clearString = '';
|
|
10
|
+
this.runLocation = runLocation;
|
|
11
|
+
this.verbose = verbose;
|
|
12
|
+
}
|
|
13
|
+
onBegin(checks, testSessionId) {
|
|
14
|
+
this.testSessionId = testSessionId;
|
|
15
|
+
this.numChecks = checks.length;
|
|
16
|
+
// Sort the check files and checks alphabetically. This makes sure that there's a consistent order between runs.
|
|
17
|
+
// For `checkly trigger`, getSourceFile() is not defined so we use optional chaining.
|
|
18
|
+
const sortedCheckFiles = [...new Set(checks.map(({ check }) => { var _a; return (_a = check.getSourceFile) === null || _a === void 0 ? void 0 : _a.call(check); }))].sort();
|
|
19
|
+
const sortedChecks = checks.sort(({ check: a }, { check: b }) => a.name.localeCompare(b.name));
|
|
20
|
+
this.checkFilesMap = new Map(sortedCheckFiles.map((file) => [file, new Map()]));
|
|
21
|
+
sortedChecks.forEach(({ check, testResultId, checkRunId }) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const fileMap = this.checkFilesMap.get((_a = check.getSourceFile) === null || _a === void 0 ? void 0 : _a.call(check));
|
|
24
|
+
fileMap.set(checkRunId, {
|
|
25
|
+
check,
|
|
26
|
+
titleString: (0, util_1.formatCheckTitle)(util_1.CheckStatus.PENDING, check),
|
|
27
|
+
testResultId,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
onCheckEnd(checkRunId, checkResult, links) {
|
|
32
|
+
const checkStatus = this.checkFilesMap.get(checkResult.sourceFile).get(checkRunId);
|
|
33
|
+
checkStatus.result = checkResult;
|
|
34
|
+
const status = checkResult.hasFailures ? util_1.CheckStatus.FAILED : util_1.CheckStatus.SUCCESSFUL;
|
|
35
|
+
checkStatus.titleString = (0, util_1.formatCheckTitle)(status, checkResult, {
|
|
36
|
+
includeSourceFile: false,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
onError(err) {
|
|
40
|
+
(0, util_1.printLn)(chalk.red('Unable to run checks: ') + err.message);
|
|
41
|
+
}
|
|
42
|
+
// Clear the summary which was printed by _printStatus from stdout
|
|
43
|
+
// TODO: Rather than clearing the whole status bar, we could overwrite the exact lines that changed.
|
|
44
|
+
// This might look a bit smoother and reduce the flickering effects.
|
|
45
|
+
_clearSummary() {
|
|
46
|
+
(0, util_1.printLn)(this._clearString);
|
|
47
|
+
}
|
|
48
|
+
_printSummary(opts = {}) {
|
|
49
|
+
const counts = { numFailed: 0, numPassed: 0, numPending: 0 };
|
|
50
|
+
const status = [];
|
|
51
|
+
if (this.checkFilesMap.size === 1 && this.checkFilesMap.has(undefined)) {
|
|
52
|
+
status.push(chalk.bold('Summary:'));
|
|
53
|
+
}
|
|
54
|
+
for (const [sourceFile, checkMap] of this.checkFilesMap.entries()) {
|
|
55
|
+
if (sourceFile)
|
|
56
|
+
status.push(sourceFile);
|
|
57
|
+
for (const [_, { titleString, result }] of checkMap.entries()) {
|
|
58
|
+
if (!result) {
|
|
59
|
+
counts.numPending++;
|
|
60
|
+
}
|
|
61
|
+
else if (result.hasFailures) {
|
|
62
|
+
counts.numFailed++;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
counts.numPassed++;
|
|
66
|
+
}
|
|
67
|
+
status.push(sourceFile ? indentString(titleString, 2) : titleString);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (!opts.skipCheckCount) {
|
|
71
|
+
status.push('');
|
|
72
|
+
status.push([
|
|
73
|
+
counts.numFailed ? chalk.bold.red(`${counts.numFailed} failed`) : undefined,
|
|
74
|
+
counts.numPassed ? chalk.bold.green(`${counts.numPassed} passed`) : undefined,
|
|
75
|
+
counts.numPending ? chalk.bold.magenta(`${counts.numPending} pending`) : undefined,
|
|
76
|
+
`${this.numChecks} total`,
|
|
77
|
+
].filter(Boolean).join(', '));
|
|
78
|
+
}
|
|
79
|
+
status.push('');
|
|
80
|
+
const statusString = status.join('\n');
|
|
81
|
+
(0, util_1.printLn)(statusString);
|
|
82
|
+
// Ansi escape code for erasing the line and moving the cursor up
|
|
83
|
+
this._clearString = '\r\x1B[K\r\x1B[1A'.repeat(statusString.split('\n').length + 1);
|
|
84
|
+
}
|
|
85
|
+
_printBriefSummary() {
|
|
86
|
+
const counts = { numFailed: 0, numPassed: 0, numPending: 0 };
|
|
87
|
+
const status = [];
|
|
88
|
+
for (const [, checkMap] of this.checkFilesMap.entries()) {
|
|
89
|
+
for (const [_, { result }] of checkMap.entries()) {
|
|
90
|
+
if (!result) {
|
|
91
|
+
counts.numPending++;
|
|
92
|
+
}
|
|
93
|
+
else if (result.hasFailures) {
|
|
94
|
+
counts.numFailed++;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
counts.numPassed++;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
status.push('');
|
|
102
|
+
status.push([
|
|
103
|
+
counts.numFailed ? chalk.bold.red(`${counts.numFailed} failed`) : undefined,
|
|
104
|
+
counts.numPassed ? chalk.bold.green(`${counts.numPassed} passed`) : undefined,
|
|
105
|
+
counts.numPending ? chalk.bold.magenta(`${counts.numPending} pending`) : undefined,
|
|
106
|
+
`${this.numChecks} total`,
|
|
107
|
+
].filter(Boolean).join(', '));
|
|
108
|
+
status.push('');
|
|
109
|
+
const statusString = status.join('\n');
|
|
110
|
+
(0, util_1.printLn)(statusString);
|
|
111
|
+
// Ansi escape code for erasing the line and moving the cursor up
|
|
112
|
+
this._clearString = '\r\x1B[K\r\x1B[1A'.repeat(statusString.split('\n').length + 1);
|
|
113
|
+
}
|
|
114
|
+
async _printTestSessionsUrl() {
|
|
115
|
+
if (this.testSessionId) {
|
|
116
|
+
try {
|
|
117
|
+
const { data: { link } } = await api_1.testSessions.getShortLink(this.testSessionId);
|
|
118
|
+
(0, util_1.printLn)(`${chalk.white('Detailed session summary at:')} ${chalk.underline.cyan(link)}`, 2);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
(0, util_1.printLn)(`${chalk.white('Detailed session summary at:')} ${chalk.underline.cyan((0, util_1.getTestSessionUrl)(this.testSessionId))}`, 2);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
_runLocationString() {
|
|
126
|
+
if (this.runLocation.type === 'PUBLIC') {
|
|
127
|
+
return this.runLocation.region;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return `private location ${this.runLocation.slugName}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.default = AbstractListReporter;
|
|
135
|
+
//# sourceMappingURL=abstract-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-list.js","sourceRoot":"","sources":["../../src/reporters/abstract-list.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,8CAA6C;AAG7C,iCAAkF;AAIlF,qCAA0C;AAa1C,MAA8B,oBAAoB;IAQhD,YACE,WAAwB,EACxB,OAAgB;QATlB,iBAAY,GAAG,EAAE,CAAA;QAWf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAID,OAAO,CAAE,MAA4E,EAAE,aAAsB;QAC3G,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAA;QAC9B,gHAAgH;QAChH,qFAAqF;QACrF,MAAM,gBAAgB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,aAAa,qDAAI,CAAA,EAAA,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAChG,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,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,EAAE;YACtB,IAAI;gBACF,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,kBAAY,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;gBAC9E,IAAA,cAAO,EAAC,GAAG,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;aAC3F;YAAC,MAAM;gBACN,IAAA,cAAO,EAAC,GAAG,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAA,wBAAiB,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;aAC5H;SACF;IACH,CAAC;IAED,kBAAkB;QAChB,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,EAAE;YACtC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAA;SAC/B;aAAM;YACL,OAAO,oBAAoB,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAA;SACvD;IACH,CAAC;CACF;AA3ID,uCA2IC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AbstractListReporter from './abstract-list';
|
|
2
|
+
import { CheckRunId } from '../services/abstract-check-runner';
|
|
3
|
+
export default class CiReporter extends AbstractListReporter {
|
|
4
|
+
onBeginStatic(): void;
|
|
5
|
+
onBegin(checks: Array<{
|
|
6
|
+
check: any;
|
|
7
|
+
checkRunId: CheckRunId;
|
|
8
|
+
testResultId?: string;
|
|
9
|
+
}>, testSessionId?: string): void;
|
|
10
|
+
onEnd(): void;
|
|
11
|
+
onCheckEnd(checkRunId: CheckRunId, checkResult: any): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const indentString = require("indent-string");
|
|
4
|
+
const abstract_list_1 = require("./abstract-list");
|
|
5
|
+
const util_1 = require("./util");
|
|
6
|
+
class CiReporter extends abstract_list_1.default {
|
|
7
|
+
onBeginStatic() {
|
|
8
|
+
(0, util_1.printLn)('Listing all checks:', 2, 1);
|
|
9
|
+
this._printSummary({ skipCheckCount: true });
|
|
10
|
+
}
|
|
11
|
+
onBegin(checks, testSessionId) {
|
|
12
|
+
super.onBegin(checks, testSessionId);
|
|
13
|
+
(0, util_1.printLn)(`Running ${this.numChecks} checks in ${this._runLocationString()}:`, 2, 1);
|
|
14
|
+
this._printSummary({ skipCheckCount: true });
|
|
15
|
+
}
|
|
16
|
+
onEnd() {
|
|
17
|
+
(0, util_1.printLn)('Finished running all checks:', 2);
|
|
18
|
+
this._printSummary();
|
|
19
|
+
}
|
|
20
|
+
onCheckEnd(checkRunId, checkResult) {
|
|
21
|
+
super.onCheckEnd(checkRunId, checkResult);
|
|
22
|
+
(0, util_1.printLn)((0, util_1.formatCheckTitle)(checkResult.hasFailures ? util_1.CheckStatus.FAILED : util_1.CheckStatus.SUCCESSFUL, checkResult));
|
|
23
|
+
if (this.verbose || checkResult.hasFailures) {
|
|
24
|
+
(0, util_1.printLn)(indentString((0, util_1.formatCheckResult)(checkResult), 4), 2, 1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = CiReporter;
|
|
29
|
+
//# sourceMappingURL=ci.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/reporters/ci.ts"],"names":[],"mappings":";;AAAA,8CAA6C;AAE7C,mDAAkD;AAClD,iCAAkF;AAGlF,MAAqB,UAAW,SAAQ,uBAAoB;IAC1D,aAAa;QACX,IAAA,cAAO,EAAC,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,IAAI,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,CAAE,MAA4E,EAAE,aAAsB;QAC3G,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;QACpC,IAAA,cAAO,EAAC,WAAW,IAAI,CAAC,SAAS,cAAc,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QAClF,IAAI,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;IAED,KAAK;QACH,IAAA,cAAO,EAAC,8BAA8B,EAAE,CAAC,CAAC,CAAA;QAC1C,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;IAED,UAAU,CAAE,UAAsB,EAAE,WAAgB;QAClD,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,WAAW,CAAC,CAAA;QACzC,IAAA,cAAO,EAAC,IAAA,uBAAgB,EAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAW,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAA;QAE7G,IAAI,IAAI,CAAC,OAAO,IAAI,WAAW,CAAC,WAAW,EAAE;YAC3C,IAAA,cAAO,EAAC,YAAY,CAAC,IAAA,wBAAiB,EAAC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;SAC/D;IACH,CAAC;CACF;AAzBD,6BAyBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AbstractListReporter from './abstract-list';
|
|
2
|
+
import { CheckRunId } from '../services/abstract-check-runner';
|
|
3
|
+
export default class DotReporter extends AbstractListReporter {
|
|
4
|
+
onBeginStatic(): void;
|
|
5
|
+
onBegin(checks: Array<{
|
|
6
|
+
check: any;
|
|
7
|
+
checkRunId: CheckRunId;
|
|
8
|
+
testResultId?: string;
|
|
9
|
+
}>, testSessionId?: string): void;
|
|
10
|
+
onEnd(): void;
|
|
11
|
+
onCheckEnd(checkRunId: CheckRunId, checkResult: any): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chalk = require("chalk");
|
|
4
|
+
const abstract_list_1 = require("./abstract-list");
|
|
5
|
+
const util_1 = require("./util");
|
|
6
|
+
class DotReporter extends abstract_list_1.default {
|
|
7
|
+
onBeginStatic() {
|
|
8
|
+
(0, util_1.printLn)(`Running ${this.numChecks} checks in ${this._runLocationString()}.`, 2, 1);
|
|
9
|
+
}
|
|
10
|
+
onBegin(checks, testSessionId) {
|
|
11
|
+
super.onBegin(checks, testSessionId);
|
|
12
|
+
this.onBeginStatic();
|
|
13
|
+
}
|
|
14
|
+
onEnd() {
|
|
15
|
+
this._printBriefSummary();
|
|
16
|
+
}
|
|
17
|
+
onCheckEnd(checkRunId, checkResult) {
|
|
18
|
+
super.onCheckEnd(checkRunId, checkResult);
|
|
19
|
+
if (checkResult.hasFailures) {
|
|
20
|
+
(0, util_1.print)(`${chalk.red('F')}`);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
(0, util_1.print)(`${chalk.green('.')}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = DotReporter;
|
|
28
|
+
//# sourceMappingURL=dot.js.map
|