checkly 3.1.0 → 4.0.0
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 +42 -108
- 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 +247 -0
- package/dist/commands/test.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 +34 -0
- package/dist/reporters/abstract-list.js +122 -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 +33 -0
- package/dist/reporters/github.js +93 -0
- package/dist/reporters/github.js.map +1 -0
- package/dist/reporters/list.d.ts +13 -0
- package/dist/reporters/list.js +57 -0
- package/dist/reporters/list.js.map +1 -0
- package/dist/reporters/reporter.d.ts +14 -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 +26 -0
- package/dist/rest/test-sessions.js +12 -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 +50 -0
- package/dist/services/abstract-check-runner.js +151 -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 +73 -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/util.d.ts +29 -0
- package/dist/services/util.js +147 -0
- package/dist/services/util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +423 -0
- package/package.json +163 -18
- package/LICENSE +0 -121
- package/dist/checkly.min.js +0 -1
- package/index.js +0 -285
- package/logo.png +0 -0
- package/test.js +0 -183
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,+BAA2B;AAE3B,MAAsB,SAAS;IAK7B,YAAa,IAAY,EAAE,SAAiB,EAAE,UAA0B,EAAE,MAAgB;QACxF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,CAAA;QAC5B,iBAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,GAAG;QACD,OAAO,SAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;CAGF;AAtBD,8BAsBC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface EmailAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The email address where to send the alert notifications.
|
|
5
|
+
*/
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates an Email Alert Channel
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* This class make use of the Alert Channel endpoints.
|
|
14
|
+
*/
|
|
15
|
+
export declare class EmailAlertChannel extends AlertChannel {
|
|
16
|
+
address: string;
|
|
17
|
+
/**
|
|
18
|
+
* Constructs the Email Alert Channel instance
|
|
19
|
+
*
|
|
20
|
+
* @param logicalId unique project-scoped resource name identification
|
|
21
|
+
* @param props email alert channel configuration properties
|
|
22
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#emailalertchannel Read more in the docs}
|
|
23
|
+
*/
|
|
24
|
+
constructor(logicalId: string, props: EmailAlertChannelProps);
|
|
25
|
+
synthesize(): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Email Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class EmailAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Email Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props email alert channel configuration properties
|
|
19
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#emailalertchannel Read more in the docs}
|
|
20
|
+
*/
|
|
21
|
+
constructor(logicalId, props) {
|
|
22
|
+
super(logicalId, props);
|
|
23
|
+
this.address = props.address;
|
|
24
|
+
project_1.Session.registerConstruct(this);
|
|
25
|
+
}
|
|
26
|
+
synthesize() {
|
|
27
|
+
return {
|
|
28
|
+
...super.synthesize(),
|
|
29
|
+
type: 'EMAIL',
|
|
30
|
+
config: {
|
|
31
|
+
address: this.address,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.EmailAlertChannel = EmailAlertChannel;
|
|
37
|
+
//# sourceMappingURL=email-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/email-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AASnC;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,4BAAY;IAEjD;;;;;;OAMG;IACH,YAAa,SAAiB,EAAE,KAA6B;QAC3D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,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,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB;SACF,CAAA;IACH,CAAC;CACF;AAxBD,8CAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-variable.js","sourceRoot":"","sources":["../../src/constructs/environment-variable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class Frequency {
|
|
2
|
+
static EVERY_10S: Frequency;
|
|
3
|
+
static EVERY_20S: Frequency;
|
|
4
|
+
static EVERY_30S: Frequency;
|
|
5
|
+
static EVERY_1M: Frequency;
|
|
6
|
+
static EVERY_2M: Frequency;
|
|
7
|
+
static EVERY_5M: Frequency;
|
|
8
|
+
static EVERY_10M: Frequency;
|
|
9
|
+
static EVERY_15M: Frequency;
|
|
10
|
+
static EVERY_30M: Frequency;
|
|
11
|
+
static EVERY_1H: Frequency;
|
|
12
|
+
static EVERY_2H: Frequency;
|
|
13
|
+
static EVERY_3M: Frequency;
|
|
14
|
+
static EVERY_6H: Frequency;
|
|
15
|
+
static EVERY_12H: Frequency;
|
|
16
|
+
static EVERY_24H: Frequency;
|
|
17
|
+
frequency: number;
|
|
18
|
+
frequencyOffset?: number;
|
|
19
|
+
private constructor();
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Frequency = void 0;
|
|
4
|
+
class Frequency {
|
|
5
|
+
constructor(frequency, frequencyOffset) {
|
|
6
|
+
this.frequency = frequency;
|
|
7
|
+
this.frequencyOffset = frequencyOffset;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.Frequency = Frequency;
|
|
11
|
+
Frequency.EVERY_10S = new Frequency(0, 10);
|
|
12
|
+
Frequency.EVERY_20S = new Frequency(0, 20);
|
|
13
|
+
Frequency.EVERY_30S = new Frequency(0, 30);
|
|
14
|
+
Frequency.EVERY_1M = new Frequency(1);
|
|
15
|
+
Frequency.EVERY_2M = new Frequency(2);
|
|
16
|
+
Frequency.EVERY_5M = new Frequency(5);
|
|
17
|
+
Frequency.EVERY_10M = new Frequency(10);
|
|
18
|
+
Frequency.EVERY_15M = new Frequency(15);
|
|
19
|
+
Frequency.EVERY_30M = new Frequency(30);
|
|
20
|
+
Frequency.EVERY_1H = new Frequency(1 * 60);
|
|
21
|
+
Frequency.EVERY_2H = new Frequency(2 * 60);
|
|
22
|
+
Frequency.EVERY_3M = new Frequency(3 * 60);
|
|
23
|
+
Frequency.EVERY_6H = new Frequency(6 * 60);
|
|
24
|
+
Frequency.EVERY_12H = new Frequency(12 * 60);
|
|
25
|
+
Frequency.EVERY_24H = new Frequency(24 * 60);
|
|
26
|
+
//# sourceMappingURL=frequency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frequency.js","sourceRoot":"","sources":["../../src/constructs/frequency.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;IAqBpB,YAAqB,SAAiB,EAAE,eAAwB;QAC9D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;;AAxBH,8BAyBC;AAxBQ,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEhC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAC7B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAC7B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAE7B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;AAClC,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-header.js","sourceRoot":"","sources":["../../src/constructs/http-header.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './project';
|
|
2
|
+
export * from './sms-alert-channel';
|
|
3
|
+
export * from './email-alert-channel';
|
|
4
|
+
export * from './slack-alert-channel';
|
|
5
|
+
export * from './opsgenie-alert-channel';
|
|
6
|
+
export * from './pagerduty-alert-channel';
|
|
7
|
+
export * from './webhook-alert-channel';
|
|
8
|
+
export * from './api-check';
|
|
9
|
+
export * from './browser-check';
|
|
10
|
+
export * from './check-group';
|
|
11
|
+
export * from './alert-channel-subscription';
|
|
12
|
+
export * from './environment-variable';
|
|
13
|
+
export * from './http-header';
|
|
14
|
+
export * from './query-param';
|
|
15
|
+
export * from './frequency';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./project"), exports);
|
|
18
|
+
__exportStar(require("./sms-alert-channel"), exports);
|
|
19
|
+
__exportStar(require("./email-alert-channel"), exports);
|
|
20
|
+
__exportStar(require("./slack-alert-channel"), exports);
|
|
21
|
+
__exportStar(require("./opsgenie-alert-channel"), exports);
|
|
22
|
+
__exportStar(require("./pagerduty-alert-channel"), exports);
|
|
23
|
+
__exportStar(require("./webhook-alert-channel"), exports);
|
|
24
|
+
__exportStar(require("./api-check"), exports);
|
|
25
|
+
__exportStar(require("./browser-check"), exports);
|
|
26
|
+
__exportStar(require("./check-group"), exports);
|
|
27
|
+
__exportStar(require("./alert-channel-subscription"), exports);
|
|
28
|
+
__exportStar(require("./environment-variable"), exports);
|
|
29
|
+
__exportStar(require("./http-header"), exports);
|
|
30
|
+
__exportStar(require("./query-param"), exports);
|
|
31
|
+
__exportStar(require("./frequency"), exports);
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constructs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,sDAAmC;AACnC,wDAAqC;AACrC,wDAAqC;AACrC,2DAAwC;AACxC,4DAAyC;AACzC,0DAAuC;AACvC,8CAA2B;AAC3B,kDAA+B;AAC/B,gDAA6B;AAC7B,+DAA4C;AAC5C,yDAAsC;AACtC,gDAA6B;AAC7B,gDAA6B;AAC7B,8CAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-value-pair.js","sourceRoot":"","sources":["../../src/constructs/key-value-pair.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export type OpsgeniePriority = 'P1' | 'P2' | 'P3' | 'P4' | 'P5';
|
|
3
|
+
export type OpsgenieRegion = 'EU' | 'US';
|
|
4
|
+
export interface OpsgenieAlertChannelProps extends AlertChannelProps {
|
|
5
|
+
/**
|
|
6
|
+
* Friendly name to recognise the integration.
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* An API key for your Opsgenie account. See our
|
|
11
|
+
* {@link https://www.checklyhq.com/docs/integrations/opsgenie/ docs} on where to create this API key
|
|
12
|
+
*/
|
|
13
|
+
apiKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* Configure the Opsgenie location, either `EU` or `US`.
|
|
16
|
+
*/
|
|
17
|
+
region: OpsgenieRegion;
|
|
18
|
+
/**
|
|
19
|
+
* Configure the severity level, `P1` to `P5`.
|
|
20
|
+
*/
|
|
21
|
+
priority: OpsgeniePriority;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an Opsgenie Alert Channel
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
*
|
|
28
|
+
* This class make use of the Alert Channel endpoints.
|
|
29
|
+
*/
|
|
30
|
+
export declare class OpsgenieAlertChannel extends AlertChannel {
|
|
31
|
+
name: string;
|
|
32
|
+
apiKey: string;
|
|
33
|
+
region: OpsgenieRegion;
|
|
34
|
+
priority: OpsgeniePriority;
|
|
35
|
+
/**
|
|
36
|
+
* Constructs the Opsgenie Alert Channel instance
|
|
37
|
+
*
|
|
38
|
+
* @param logicalId unique project-scoped resource name identification
|
|
39
|
+
* @param props Opsgenie alert channel configuration properties
|
|
40
|
+
*
|
|
41
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#opsgeniealertchannel Read more in the docs}
|
|
42
|
+
*/
|
|
43
|
+
constructor(logicalId: string, props: OpsgenieAlertChannelProps);
|
|
44
|
+
synthesize(): any;
|
|
45
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpsgenieAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Opsgenie Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class OpsgenieAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Opsgenie Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Opsgenie alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#opsgeniealertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.name = props.name;
|
|
25
|
+
this.apiKey = props.apiKey;
|
|
26
|
+
this.region = props.region;
|
|
27
|
+
this.priority = props.priority;
|
|
28
|
+
project_1.Session.registerConstruct(this);
|
|
29
|
+
}
|
|
30
|
+
synthesize() {
|
|
31
|
+
return {
|
|
32
|
+
...super.synthesize(),
|
|
33
|
+
type: 'OPSGENIE',
|
|
34
|
+
config: {
|
|
35
|
+
name: this.name,
|
|
36
|
+
apiKey: this.apiKey,
|
|
37
|
+
region: this.region,
|
|
38
|
+
priority: this.priority,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.OpsgenieAlertChannel = OpsgenieAlertChannel;
|
|
44
|
+
//# sourceMappingURL=opsgenie-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opsgenie-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/opsgenie-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AA0BnC;;;;;;GAMG;AACH,MAAa,oBAAqB,SAAQ,4BAAY;IAKpD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAAgC;QAC9D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAA;IACH,CAAC;CACF;AAlCD,oDAkCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface PagerdutyAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The name of your Pagerduty account.
|
|
5
|
+
*/
|
|
6
|
+
account?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The name of your service defined in Pagerduty under which the alerts should be nested.
|
|
9
|
+
*/
|
|
10
|
+
serviceName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The API key created by installing the Checkly integration in Pagerduty. You
|
|
13
|
+
* can {@link https://app.checklyhq.com/alerts/settings/channels/new/pagerduty install the Pagerduty alert channel}
|
|
14
|
+
* first from our UI to grab the `serviceKey`
|
|
15
|
+
*/
|
|
16
|
+
serviceKey: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates an Pagerduty Alert Channel
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* This class make use of the Alert Channel endpoints.
|
|
24
|
+
*/
|
|
25
|
+
export declare class PagerdutyAlertChannel extends AlertChannel {
|
|
26
|
+
account?: string;
|
|
27
|
+
serviceName?: string;
|
|
28
|
+
serviceKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* Constructs the Pagerduty Alert Channel instance
|
|
31
|
+
*
|
|
32
|
+
* @param logicalId unique project-scoped resource name identification
|
|
33
|
+
* @param props Pagerduty alert channel configuration properties
|
|
34
|
+
*
|
|
35
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#pagerdutyalertchannel Read more in the docs}
|
|
36
|
+
*/
|
|
37
|
+
constructor(logicalId: string, props: PagerdutyAlertChannelProps);
|
|
38
|
+
synthesize(): any;
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PagerdutyAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Pagerduty Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class PagerdutyAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Pagerduty Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Pagerduty alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#pagerdutyalertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.account = props.account;
|
|
25
|
+
this.serviceName = props.serviceName;
|
|
26
|
+
this.serviceKey = props.serviceKey;
|
|
27
|
+
project_1.Session.registerConstruct(this);
|
|
28
|
+
}
|
|
29
|
+
synthesize() {
|
|
30
|
+
return {
|
|
31
|
+
...super.synthesize(),
|
|
32
|
+
type: 'PAGERDUTY',
|
|
33
|
+
config: {
|
|
34
|
+
account: this.account,
|
|
35
|
+
serviceName: this.serviceName,
|
|
36
|
+
serviceKey: this.serviceKey,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.PagerdutyAlertChannel = PagerdutyAlertChannel;
|
|
42
|
+
//# sourceMappingURL=pagerduty-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagerduty-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/pagerduty-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AAmBnC;;;;;;GAMG;AACH,MAAa,qBAAsB,SAAQ,4BAAY;IAIrD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAAiC;QAC/D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;QAClC,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE;gBACN,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B;SACF,CAAA;IACH,CAAC;CACF;AA/BD,sDA+BC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CheckConfigDefaults } from '../services/checkly-config-loader';
|
|
2
|
+
import { Construct } from './construct';
|
|
3
|
+
import type { Runtime } from '../rest/runtimes';
|
|
4
|
+
import { Check } from './check';
|
|
5
|
+
import { CheckGroup } from './check-group';
|
|
6
|
+
import { AlertChannel } from './alert-channel';
|
|
7
|
+
import { AlertChannelSubscription } from './alert-channel-subscription';
|
|
8
|
+
import { ResourceSync } from '../rest/projects';
|
|
9
|
+
export interface ProjectProps {
|
|
10
|
+
/**
|
|
11
|
+
* Friendly name for your project.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Git repository URL.
|
|
16
|
+
*/
|
|
17
|
+
repoUrl?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProjectData {
|
|
20
|
+
check: Record<string, Check>;
|
|
21
|
+
'check-group': Record<string, CheckGroup>;
|
|
22
|
+
'alert-channel': Record<string, AlertChannel>;
|
|
23
|
+
'alert-channel-subscription': Record<string, AlertChannelSubscription>;
|
|
24
|
+
}
|
|
25
|
+
export declare class Project extends Construct {
|
|
26
|
+
name: string;
|
|
27
|
+
repoUrl?: string;
|
|
28
|
+
logicalId: string;
|
|
29
|
+
data: ProjectData;
|
|
30
|
+
static readonly __checklyType = "project";
|
|
31
|
+
/**
|
|
32
|
+
* Constructs the Project instance
|
|
33
|
+
*
|
|
34
|
+
* @param logicalId unique project identifier
|
|
35
|
+
* @param props project configuration properties
|
|
36
|
+
*/
|
|
37
|
+
constructor(logicalId: string, props: ProjectProps);
|
|
38
|
+
addResource(type: string, logicalId: string, resource: Construct): void;
|
|
39
|
+
synthesize(addTestOnly?: boolean): {
|
|
40
|
+
project: Pick<Project, 'logicalId' | 'name' | 'repoUrl'>;
|
|
41
|
+
resources: Array<ResourceSync>;
|
|
42
|
+
};
|
|
43
|
+
private synthesizeRecord;
|
|
44
|
+
}
|
|
45
|
+
export declare class Session {
|
|
46
|
+
static project?: Project;
|
|
47
|
+
static basePath?: string;
|
|
48
|
+
static checkDefaults?: CheckConfigDefaults;
|
|
49
|
+
static browserCheckDefaults?: CheckConfigDefaults;
|
|
50
|
+
static checkFilePath?: string;
|
|
51
|
+
static checkFileAbsolutePath?: string;
|
|
52
|
+
static availableRuntimes: Record<string, Runtime>;
|
|
53
|
+
static loadingChecklyConfigFile: boolean;
|
|
54
|
+
static checklyConfigFileConstructs?: Construct[];
|
|
55
|
+
static registerConstruct(construct: Construct): void;
|
|
56
|
+
static validateCreateConstruct(construct: Construct): void;
|
|
57
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Session = exports.Project = void 0;
|
|
4
|
+
const construct_1 = require("./construct");
|
|
5
|
+
const validator_error_1 = require("./validator-error");
|
|
6
|
+
const check_1 = require("./check");
|
|
7
|
+
class Project extends construct_1.Construct {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs the Project instance
|
|
10
|
+
*
|
|
11
|
+
* @param logicalId unique project identifier
|
|
12
|
+
* @param props project configuration properties
|
|
13
|
+
*/
|
|
14
|
+
constructor(logicalId, props) {
|
|
15
|
+
super(Project.__checklyType, logicalId);
|
|
16
|
+
this.data = {
|
|
17
|
+
check: {},
|
|
18
|
+
'check-group': {},
|
|
19
|
+
'alert-channel': {},
|
|
20
|
+
'alert-channel-subscription': {},
|
|
21
|
+
};
|
|
22
|
+
if (!props.name) {
|
|
23
|
+
// TODO: Can we collect a list of validation errors and return them all at once? This might be better UX.
|
|
24
|
+
throw new validator_error_1.ValidationError('Please give your project a name in the "name" property.');
|
|
25
|
+
}
|
|
26
|
+
this.name = props.name;
|
|
27
|
+
this.repoUrl = props.repoUrl;
|
|
28
|
+
this.logicalId = logicalId;
|
|
29
|
+
}
|
|
30
|
+
addResource(type, logicalId, resource) {
|
|
31
|
+
if (this.data[type][logicalId]) {
|
|
32
|
+
throw new Error(`Resource of type '${type}' with logical id '${logicalId}' already exists.`);
|
|
33
|
+
}
|
|
34
|
+
this.data[type][logicalId] = resource;
|
|
35
|
+
}
|
|
36
|
+
synthesize(addTestOnly = true) {
|
|
37
|
+
const project = {
|
|
38
|
+
logicalId: this.logicalId,
|
|
39
|
+
name: this.name,
|
|
40
|
+
repoUrl: this.repoUrl,
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
project,
|
|
44
|
+
resources: [
|
|
45
|
+
...this.synthesizeRecord(this.data.check, addTestOnly),
|
|
46
|
+
...this.synthesizeRecord(this.data['check-group']),
|
|
47
|
+
...this.synthesizeRecord(this.data['alert-channel']),
|
|
48
|
+
...this.synthesizeRecord(this.data['alert-channel-subscription']),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
synthesizeRecord(record, addTestOnly = true) {
|
|
53
|
+
return Object.entries(record)
|
|
54
|
+
.filter(([, construct]) => construct instanceof check_1.Check ? !construct.testOnly || addTestOnly : true)
|
|
55
|
+
.map(([key, construct]) => ({
|
|
56
|
+
logicalId: key,
|
|
57
|
+
type: construct.type,
|
|
58
|
+
physicalId: construct.physicalId,
|
|
59
|
+
member: construct.member,
|
|
60
|
+
payload: construct.synthesize(),
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.Project = Project;
|
|
65
|
+
Project.__checklyType = 'project';
|
|
66
|
+
class Session {
|
|
67
|
+
static registerConstruct(construct) {
|
|
68
|
+
if (Session.project) {
|
|
69
|
+
Session.project.addResource(construct.type, construct.logicalId, construct);
|
|
70
|
+
}
|
|
71
|
+
else if (Session.loadingChecklyConfigFile && construct.allowInChecklyConfig()) {
|
|
72
|
+
Session.checklyConfigFileConstructs.push(construct);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
throw new Error('Internal Error: Session is not properly configured for using a construct. Please contact Checkly support on support@checklyhq.com');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
static validateCreateConstruct(construct) {
|
|
79
|
+
if (!/^[A-Za-z0-9_\-/#.]+$/.test(construct.logicalId)) {
|
|
80
|
+
throw new validator_error_1.ValidationError(`The "logicalId" can only include the following characters: [A-Za-z0-9_-/#.]. (logicalId='${construct.logicalId}')`);
|
|
81
|
+
}
|
|
82
|
+
if (construct.type === Project.__checklyType) {
|
|
83
|
+
// Creating the construct is allowed - We're creating the project.
|
|
84
|
+
}
|
|
85
|
+
else if (Session.project) {
|
|
86
|
+
// Creating the construct is allowed - We're in the process of parsing the project.
|
|
87
|
+
}
|
|
88
|
+
else if (Session.loadingChecklyConfigFile && construct.allowInChecklyConfig()) {
|
|
89
|
+
// Creating the construct is allowed - We're in the process of parsing the Checkly config.
|
|
90
|
+
}
|
|
91
|
+
else if (Session.loadingChecklyConfigFile) {
|
|
92
|
+
throw new Error(`Creating a ${construct.constructor.name} construct in the Checkly config file isn't supported.`);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
throw new Error(`Unable to create a construct '${construct.constructor.name}' outside a Checkly CLI project.`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Session = Session;
|
|
100
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/constructs/project.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-param.js","sourceRoot":"","sources":["../../src/constructs/query-param.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ref = void 0;
|
|
4
|
+
class Ref {
|
|
5
|
+
constructor(ref) {
|
|
6
|
+
this.ref = ref;
|
|
7
|
+
}
|
|
8
|
+
static from(ref) {
|
|
9
|
+
return new Ref(ref);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Ref = Ref;
|
|
13
|
+
//# sourceMappingURL=ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/constructs/ref.ts"],"names":[],"mappings":";;;AAAA,MAAa,GAAG;IAEd,YAAqB,GAAW;QAC9B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAED,MAAM,CAAC,IAAI,CAAE,GAAW;QACtB,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACrB,CAAC;CACF;AATD,kBASC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface SlackAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
url: URL;
|
|
4
|
+
channel?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Slack Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SlackAlertChannel extends AlertChannel {
|
|
14
|
+
url: URL;
|
|
15
|
+
channel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Constructs the Slack Alert Channel instance
|
|
18
|
+
*
|
|
19
|
+
* @param logicalId unique project-scoped resource name identification
|
|
20
|
+
* @param props Slack alert channel configuration properties
|
|
21
|
+
*
|
|
22
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#slackalertchannel Read more in the docs}
|
|
23
|
+
*/
|
|
24
|
+
constructor(logicalId: string, props: SlackAlertChannelProps);
|
|
25
|
+
synthesize(): any;
|
|
26
|
+
}
|