checkly 0.0.0-pr.1006.b6b3be2
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 +102 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/constructs.d.ts +1 -0
- package/constructs.js +2 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +262 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/commands/authCommand.d.ts +5 -0
- package/dist/commands/authCommand.js +37 -0
- package/dist/commands/authCommand.js.map +1 -0
- package/dist/commands/baseCommand.d.ts +13 -0
- package/dist/commands/baseCommand.js +48 -0
- package/dist/commands/baseCommand.js.map +1 -0
- package/dist/commands/deploy.d.ts +18 -0
- package/dist/commands/deploy.js +289 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +10 -0
- package/dist/commands/destroy.js +84 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/env/add.d.ts +14 -0
- package/dist/commands/env/add.js +85 -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 +44 -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 +99 -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 +82 -0
- package/dist/commands/env/rm.js.map +1 -0
- package/dist/commands/env/update.d.ts +14 -0
- package/dist/commands/env/update.js +88 -0
- package/dist/commands/env/update.js.map +1 -0
- package/dist/commands/help.d.ts +6 -0
- package/dist/commands/help.js +17 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/login.d.ts +13 -0
- package/dist/commands/login.js +134 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +9 -0
- package/dist/commands/logout.js +43 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/runtimes.d.ts +6 -0
- package/dist/commands/runtimes.js +49 -0
- package/dist/commands/runtimes.js.map +1 -0
- package/dist/commands/switch.d.ts +9 -0
- package/dist/commands/switch.js +81 -0
- package/dist/commands/switch.js.map +1 -0
- package/dist/commands/sync-playwright.d.ts +10 -0
- package/dist/commands/sync-playwright.js +98 -0
- package/dist/commands/sync-playwright.js.map +1 -0
- package/dist/commands/test.d.ts +45 -0
- package/dist/commands/test.js +366 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/trigger.d.ts +37 -0
- package/dist/commands/trigger.js +242 -0
- package/dist/commands/trigger.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +42 -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/constants.d.ts +7 -0
- package/dist/constants.js +10 -0
- package/dist/constants.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/alert-escalation-policy.d.ts +34 -0
- package/dist/constructs/alert-escalation-policy.js +47 -0
- package/dist/constructs/alert-escalation-policy.js.map +1 -0
- package/dist/constructs/api-check.d.ts +187 -0
- package/dist/constructs/api-check.js +279 -0
- package/dist/constructs/api-check.js.map +1 -0
- package/dist/constructs/browser-check.d.ts +90 -0
- package/dist/constructs/browser-check.js +151 -0
- package/dist/constructs/browser-check.js.map +1 -0
- package/dist/constructs/check-group.d.ts +162 -0
- package/dist/constructs/check-group.js +208 -0
- package/dist/constructs/check-group.js.map +1 -0
- package/dist/constructs/check.d.ts +144 -0
- package/dist/constructs/check.js +133 -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/dashboard.d.ts +138 -0
- package/dist/constructs/dashboard.js +126 -0
- package/dist/constructs/dashboard.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/heartbeat-check.d.ts +43 -0
- package/dist/constructs/heartbeat-check.js +61 -0
- package/dist/constructs/heartbeat-check.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 +27 -0
- package/dist/constructs/index.js +44 -0
- package/dist/constructs/index.js.map +1 -0
- package/dist/constructs/key-value-pair.d.ts +6 -0
- package/dist/constructs/key-value-pair.js +3 -0
- package/dist/constructs/key-value-pair.js.map +1 -0
- package/dist/constructs/maintenance-window.d.ts +61 -0
- package/dist/constructs/maintenance-window.js +47 -0
- package/dist/constructs/maintenance-window.js.map +1 -0
- package/dist/constructs/multi-step-check.d.ts +65 -0
- package/dist/constructs/multi-step-check.js +153 -0
- package/dist/constructs/multi-step-check.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/phone-call-alert-channel.d.ts +34 -0
- package/dist/constructs/phone-call-alert-channel.js +42 -0
- package/dist/constructs/phone-call-alert-channel.js.map +1 -0
- package/dist/constructs/playwright-config.d.ts +52 -0
- package/dist/constructs/playwright-config.js +3 -0
- package/dist/constructs/playwright-config.js.map +1 -0
- package/dist/constructs/private-location-check-assignment.d.ts +29 -0
- package/dist/constructs/private-location-check-assignment.js +35 -0
- package/dist/constructs/private-location-check-assignment.js.map +1 -0
- package/dist/constructs/private-location-group-assignment.d.ts +29 -0
- package/dist/constructs/private-location-group-assignment.js +35 -0
- package/dist/constructs/private-location-group-assignment.js.map +1 -0
- package/dist/constructs/private-location.d.ts +51 -0
- package/dist/constructs/private-location.js +61 -0
- package/dist/constructs/private-location.js.map +1 -0
- package/dist/constructs/project.d.ts +66 -0
- package/dist/constructs/project.js +155 -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/retry-strategy.d.ts +50 -0
- package/dist/constructs/retry-strategy.js +51 -0
- package/dist/constructs/retry-strategy.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 +32 -0
- package/dist/constructs/sms-alert-channel.js +40 -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 +67 -0
- package/dist/constructs/webhook-alert-channel.js +52 -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 +7 -0
- package/dist/help/help-extension.js +59 -0
- package/dist/help/help-extension.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +30 -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/playwright/playwright-config-loader.d.ts +1 -0
- package/dist/playwright/playwright-config-loader.js +26 -0
- package/dist/playwright/playwright-config-loader.js.map +1 -0
- package/dist/playwright/playwright-config-template.d.ts +8 -0
- package/dist/playwright/playwright-config-template.js +78 -0
- package/dist/playwright/playwright-config-template.js.map +1 -0
- package/dist/reporters/abstract-list.d.ts +41 -0
- package/dist/reporters/abstract-list.js +171 -0
- package/dist/reporters/abstract-list.js.map +1 -0
- package/dist/reporters/ci.d.ts +12 -0
- package/dist/reporters/ci.js +34 -0
- package/dist/reporters/ci.js.map +1 -0
- package/dist/reporters/dot.d.ts +10 -0
- package/dist/reporters/dot.js +29 -0
- package/dist/reporters/dot.js.map +1 -0
- package/dist/reporters/github.d.ts +32 -0
- package/dist/reporters/github.js +119 -0
- package/dist/reporters/github.js.map +1 -0
- package/dist/reporters/json.d.ts +26 -0
- package/dist/reporters/json.js +101 -0
- package/dist/reporters/json.js.map +1 -0
- package/dist/reporters/list.d.ts +15 -0
- package/dist/reporters/list.js +85 -0
- package/dist/reporters/list.js.map +1 -0
- package/dist/reporters/reporter.d.ts +16 -0
- package/dist/reporters/reporter.js +29 -0
- package/dist/reporters/reporter.js.map +1 -0
- package/dist/reporters/util.d.ts +18 -0
- package/dist/reporters/util.js +325 -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 +33 -0
- package/dist/rest/api.js +98 -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/checkly-storage.d.ts +12 -0
- package/dist/rest/checkly-storage.js +15 -0
- package/dist/rest/checkly-storage.js.map +1 -0
- package/dist/rest/environment-variables.d.ts +17 -0
- package/dist/rest/environment-variables.js +25 -0
- package/dist/rest/environment-variables.js.map +1 -0
- package/dist/rest/heartbeat-checks.d.ts +11 -0
- package/dist/rest/heartbeat-checks.js +17 -0
- package/dist/rest/heartbeat-checks.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 +10 -0
- package/dist/rest/private-locations.js +12 -0
- package/dist/rest/private-locations.js.map +1 -0
- package/dist/rest/projects.d.ts +46 -0
- package/dist/rest/projects.js +25 -0
- package/dist/rest/projects.js.map +1 -0
- package/dist/rest/runtimes.d.ts +16 -0
- package/dist/rest/runtimes.js +15 -0
- package/dist/rest/runtimes.js.map +1 -0
- package/dist/rest/test-sessions.d.ts +59 -0
- package/dist/rest/test-sessions.js +24 -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/rest/util.d.ts +4 -0
- package/dist/rest/util.js +17 -0
- package/dist/rest/util.js.map +1 -0
- package/dist/services/abstract-check-runner.d.ts +60 -0
- package/dist/services/abstract-check-runner.js +225 -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/package-files/index.d.ts +1 -0
- package/dist/services/check-parser/package-files/index.js +6 -0
- package/dist/services/check-parser/package-files/index.js.map +1 -0
- package/dist/services/check-parser/package-files/json-source-file.d.ts +13 -0
- package/dist/services/check-parser/package-files/json-source-file.js +34 -0
- package/dist/services/check-parser/package-files/json-source-file.js.map +1 -0
- package/dist/services/check-parser/package-files/loader.d.ts +7 -0
- package/dist/services/check-parser/package-files/loader.js +19 -0
- package/dist/services/check-parser/package-files/loader.js.map +1 -0
- package/dist/services/check-parser/package-files/package-json-file.d.ts +23 -0
- package/dist/services/check-parser/package-files/package-json-file.js +44 -0
- package/dist/services/check-parser/package-files/package-json-file.js.map +1 -0
- package/dist/services/check-parser/package-files/paths.d.ts +22 -0
- package/dist/services/check-parser/package-files/paths.js +108 -0
- package/dist/services/check-parser/package-files/paths.js.map +1 -0
- package/dist/services/check-parser/package-files/resolver.d.ts +32 -0
- package/dist/services/check-parser/package-files/resolver.js +186 -0
- package/dist/services/check-parser/package-files/resolver.js.map +1 -0
- package/dist/services/check-parser/package-files/source-file.d.ts +13 -0
- package/dist/services/check-parser/package-files/source-file.js +41 -0
- package/dist/services/check-parser/package-files/source-file.js.map +1 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.d.ts +68 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.js +119 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -0
- package/dist/services/check-parser/parser.d.ts +32 -0
- package/dist/services/check-parser/parser.js +303 -0
- package/dist/services/check-parser/parser.js.map +1 -0
- package/dist/services/checkly-config-loader.d.ts +72 -0
- package/dist/services/checkly-config-loader.js +103 -0
- package/dist/services/checkly-config-loader.js.map +1 -0
- package/dist/services/config.d.ts +28 -0
- package/dist/services/config.js +99 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/project-parser.d.ts +21 -0
- package/dist/services/project-parser.js +192 -0
- package/dist/services/project-parser.js.map +1 -0
- package/dist/services/snapshot-service.d.ts +13 -0
- package/dist/services/snapshot-service.js +85 -0
- package/dist/services/snapshot-service.js.map +1 -0
- package/dist/services/socket-client.d.ts +4 -0
- package/dist/services/socket-client.js +88 -0
- package/dist/services/socket-client.js.map +1 -0
- package/dist/services/test-filters.d.ts +3 -0
- package/dist/services/test-filters.js +27 -0
- package/dist/services/test-filters.js.map +1 -0
- package/dist/services/test-runner.d.ts +24 -0
- package/dist/services/test-runner.js +91 -0
- package/dist/services/test-runner.js.map +1 -0
- package/dist/services/trigger-runner.d.ts +29 -0
- package/dist/services/trigger-runner.js +59 -0
- package/dist/services/trigger-runner.js.map +1 -0
- package/dist/services/util.d.ts +32 -0
- package/dist/services/util.js +244 -0
- package/dist/services/util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +635 -0
- package/package.json +151 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
import { Frequency } from './frequency';
|
|
3
|
+
import { Construct } from './construct';
|
|
4
|
+
import { AlertChannel } from './alert-channel';
|
|
5
|
+
import { EnvironmentVariable } from './environment-variable';
|
|
6
|
+
import type { Region } from '..';
|
|
7
|
+
import type { CheckGroup } from './check-group';
|
|
8
|
+
import { PrivateLocation } from './private-location';
|
|
9
|
+
import { RetryStrategy } from './retry-strategy';
|
|
10
|
+
import { AlertEscalation } from './alert-escalation-policy';
|
|
11
|
+
export interface CheckProps {
|
|
12
|
+
/**
|
|
13
|
+
* The name of the check.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Determines whether the check will run periodically or not after being deployed.
|
|
18
|
+
*/
|
|
19
|
+
activated?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Determines if any notifications will be sent out when a check fails and/or recovers.
|
|
22
|
+
*/
|
|
23
|
+
muted?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Setting this to "true" will trigger a retry when a check fails from the failing region and another,
|
|
26
|
+
* randomly selected region before marking the check as failed.
|
|
27
|
+
* @deprecated Use {@link CheckProps.retryStrategy} instead.
|
|
28
|
+
*/
|
|
29
|
+
doubleCheck?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Allows to invert the behaviour of when a check is considered to fail. Allows for validating error status like 404.
|
|
32
|
+
* This only applies to API Checks.
|
|
33
|
+
*/
|
|
34
|
+
shouldFail?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The runtime version, i.e. fixed set of runtime dependencies, used to execute this check.
|
|
37
|
+
*/
|
|
38
|
+
runtimeId?: string;
|
|
39
|
+
/**
|
|
40
|
+
* An array of one or more data center locations where to run this check. The supported regions are:
|
|
41
|
+
* us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, sa-east-1,
|
|
42
|
+
* eu-west-1, eu-central-1, eu-west-2, eu-west-3, eu-north-1, eu-south-1, me-south-1,
|
|
43
|
+
* ap-southeast-1, ap-northeast-1, ap-east-1, ap-southeast-2, ap-southeast-3, ap-northeast-2, ap-northeast-3,
|
|
44
|
+
* ap-south-1, af-south-1
|
|
45
|
+
*/
|
|
46
|
+
locations?: Array<keyof Region>;
|
|
47
|
+
/**
|
|
48
|
+
* An array of one or more private locations where to run the check.
|
|
49
|
+
* PrivateLocation instances or slug name strings are allowed.
|
|
50
|
+
*
|
|
51
|
+
* `string` slug names are **only** allowed for private locations that **not** belong to the project. Use
|
|
52
|
+
* PrivateLocation instances references for private locations created within the project.
|
|
53
|
+
*/
|
|
54
|
+
privateLocations?: Array<string | PrivateLocation>;
|
|
55
|
+
/**
|
|
56
|
+
* Tags for organizing and filtering checks.
|
|
57
|
+
*/
|
|
58
|
+
tags?: Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* How often the check should run in minutes.
|
|
61
|
+
*/
|
|
62
|
+
frequency?: number | Frequency;
|
|
63
|
+
environmentVariables?: Array<EnvironmentVariable>;
|
|
64
|
+
/**
|
|
65
|
+
* The id of the check group this check is part of. Set this by calling `someGroup.ref()`
|
|
66
|
+
* @deprecated Use {@link CheckProps.group} instead.
|
|
67
|
+
*/
|
|
68
|
+
groupId?: Ref;
|
|
69
|
+
/**
|
|
70
|
+
* The CheckGroup that this check is part of.
|
|
71
|
+
*/
|
|
72
|
+
group?: CheckGroup;
|
|
73
|
+
/**
|
|
74
|
+
* List of alert channels to notify when the check fails or recovers.
|
|
75
|
+
* If you don't set at least one, we won't be able to alert you in case something goes wrong with your check.
|
|
76
|
+
* @link {https://www.checklyhq.com/docs/alerting-and-retries/alert-channels/#alert-channels Alert channels}
|
|
77
|
+
*/
|
|
78
|
+
alertChannels?: Array<AlertChannel>;
|
|
79
|
+
/**
|
|
80
|
+
* Determines the alert escalation policy for that particular check
|
|
81
|
+
*/
|
|
82
|
+
alertEscalationPolicy?: AlertEscalation;
|
|
83
|
+
/**
|
|
84
|
+
* Determines if the check is available only when 'test' runs (not included when 'deploy' is executed).
|
|
85
|
+
*/
|
|
86
|
+
testOnly?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Sets a retry policy for the check. Use RetryStrategyBuilder to create a retry policy.
|
|
89
|
+
*/
|
|
90
|
+
retryStrategy?: RetryStrategy;
|
|
91
|
+
/**
|
|
92
|
+
* Determines whether the check should run on all selected locations in parallel or round-robin.
|
|
93
|
+
* See https://www.checklyhq.com/docs/monitoring/global-locations/ to learn more about scheduling strategies.
|
|
94
|
+
*/
|
|
95
|
+
runParallel?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export declare abstract class Check extends Construct {
|
|
98
|
+
name: string;
|
|
99
|
+
activated?: boolean;
|
|
100
|
+
muted?: boolean;
|
|
101
|
+
doubleCheck?: boolean;
|
|
102
|
+
shouldFail?: boolean;
|
|
103
|
+
runtimeId?: string;
|
|
104
|
+
locations?: Array<keyof Region>;
|
|
105
|
+
privateLocations?: Array<string | PrivateLocation>;
|
|
106
|
+
tags?: Array<string>;
|
|
107
|
+
frequency?: number;
|
|
108
|
+
frequencyOffset?: number;
|
|
109
|
+
environmentVariables?: Array<EnvironmentVariable>;
|
|
110
|
+
groupId?: Ref;
|
|
111
|
+
alertChannels?: Array<AlertChannel>;
|
|
112
|
+
testOnly?: boolean;
|
|
113
|
+
retryStrategy?: RetryStrategy;
|
|
114
|
+
alertSettings?: AlertEscalation;
|
|
115
|
+
useGlobalAlertSettings?: boolean;
|
|
116
|
+
runParallel?: boolean;
|
|
117
|
+
__checkFilePath?: string;
|
|
118
|
+
static readonly __checklyType = "check";
|
|
119
|
+
constructor(logicalId: string, props: CheckProps);
|
|
120
|
+
private static applyDefaultCheckGroupConfig;
|
|
121
|
+
private static applyDefaultCheckConfig;
|
|
122
|
+
addSubscriptions(): void;
|
|
123
|
+
addPrivateLocationCheckAssignments(): void;
|
|
124
|
+
getSourceFile(): string | undefined;
|
|
125
|
+
synthesize(): {
|
|
126
|
+
name: string;
|
|
127
|
+
activated: boolean | undefined;
|
|
128
|
+
muted: boolean | undefined;
|
|
129
|
+
shouldFail: boolean | undefined;
|
|
130
|
+
runtimeId: string | undefined;
|
|
131
|
+
locations: (keyof Region)[] | undefined;
|
|
132
|
+
privateLocations: undefined;
|
|
133
|
+
tags: string[] | undefined;
|
|
134
|
+
frequency: number | undefined;
|
|
135
|
+
frequencyOffset: number | undefined;
|
|
136
|
+
groupId: Ref | undefined;
|
|
137
|
+
environmentVariables: import("./key-value-pair").default[] | undefined;
|
|
138
|
+
retryStrategy: RetryStrategy | null | undefined;
|
|
139
|
+
doubleCheck: boolean | undefined;
|
|
140
|
+
alertSettings: AlertEscalation | undefined;
|
|
141
|
+
useGlobalAlertSettings: boolean | undefined;
|
|
142
|
+
runParallel: boolean | undefined;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Check = void 0;
|
|
4
|
+
const ref_1 = require("./ref");
|
|
5
|
+
const frequency_1 = require("./frequency");
|
|
6
|
+
const construct_1 = require("./construct");
|
|
7
|
+
const alert_channel_subscription_1 = require("./alert-channel-subscription");
|
|
8
|
+
const project_1 = require("./project");
|
|
9
|
+
const private_location_check_assignment_1 = require("./private-location-check-assignment");
|
|
10
|
+
// This is an abstract class. It shouldn't be used directly.
|
|
11
|
+
class Check extends construct_1.Construct {
|
|
12
|
+
constructor(logicalId, props) {
|
|
13
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14
|
+
super(Check.__checklyType, logicalId);
|
|
15
|
+
if (props.group) {
|
|
16
|
+
Check.applyDefaultCheckGroupConfig(props, props.group.getCheckDefaults());
|
|
17
|
+
}
|
|
18
|
+
Check.applyDefaultCheckConfig(props);
|
|
19
|
+
// TODO: Throw an error if required properties are still missing after applying the defaults.
|
|
20
|
+
this.name = props.name;
|
|
21
|
+
this.activated = props.activated;
|
|
22
|
+
this.muted = props.muted;
|
|
23
|
+
this.doubleCheck = props.doubleCheck;
|
|
24
|
+
this.shouldFail = props.shouldFail;
|
|
25
|
+
this.locations = props.locations;
|
|
26
|
+
this.privateLocations = props.privateLocations;
|
|
27
|
+
this.tags = props.tags;
|
|
28
|
+
if (props.frequency instanceof frequency_1.Frequency) {
|
|
29
|
+
this.frequency = props.frequency.frequency;
|
|
30
|
+
this.frequencyOffset = props.frequency.frequencyOffset;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.frequency = props.frequency;
|
|
34
|
+
}
|
|
35
|
+
this.runtimeId = props.runtimeId;
|
|
36
|
+
this.environmentVariables = (_a = props.environmentVariables) !== null && _a !== void 0 ? _a : [];
|
|
37
|
+
// Alert channel subscriptions will be synthesized separately in the Project construct.
|
|
38
|
+
// This is due to the way things are organized on the BE.
|
|
39
|
+
this.alertChannels = (_b = props.alertChannels) !== null && _b !== void 0 ? _b : [];
|
|
40
|
+
// Prefer the `group` parameter, but support groupId for backwards compatibility.
|
|
41
|
+
this.groupId = (_d = (_c = props.group) === null || _c === void 0 ? void 0 : _c.ref()) !== null && _d !== void 0 ? _d : props.groupId;
|
|
42
|
+
// alertSettings, useGlobalAlertSettings, groupId, groupOrder
|
|
43
|
+
this.testOnly = (_e = props.testOnly) !== null && _e !== void 0 ? _e : false;
|
|
44
|
+
this.retryStrategy = props.retryStrategy;
|
|
45
|
+
this.alertSettings = props.alertEscalationPolicy;
|
|
46
|
+
this.useGlobalAlertSettings = !this.alertSettings;
|
|
47
|
+
this.runParallel = (_f = props.runParallel) !== null && _f !== void 0 ? _f : false;
|
|
48
|
+
this.__checkFilePath = project_1.Session.checkFilePath;
|
|
49
|
+
}
|
|
50
|
+
static applyDefaultCheckGroupConfig(props, groupProps) {
|
|
51
|
+
var _a;
|
|
52
|
+
let configKey;
|
|
53
|
+
for (configKey in groupProps) {
|
|
54
|
+
const newVal = (_a = props[configKey]) !== null && _a !== void 0 ? _a : groupProps[configKey];
|
|
55
|
+
props[configKey] = newVal;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
static applyDefaultCheckConfig(props) {
|
|
59
|
+
var _a;
|
|
60
|
+
if (!project_1.Session.checkDefaults) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
let configKey;
|
|
64
|
+
for (configKey in project_1.Session.checkDefaults) {
|
|
65
|
+
const newVal = (_a = props[configKey]) !== null && _a !== void 0 ? _a : project_1.Session.checkDefaults[configKey];
|
|
66
|
+
props[configKey] = newVal;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
addSubscriptions() {
|
|
70
|
+
if (!this.alertChannels || this.testOnly) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
for (const alertChannel of this.alertChannels) {
|
|
74
|
+
const subscription = new alert_channel_subscription_1.AlertChannelSubscription(`check-alert-channel-subscription#${this.logicalId}#${alertChannel.logicalId}`, {
|
|
75
|
+
alertChannelId: ref_1.Ref.from(alertChannel.logicalId),
|
|
76
|
+
checkId: ref_1.Ref.from(this.logicalId),
|
|
77
|
+
activated: true,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
addPrivateLocationCheckAssignments() {
|
|
82
|
+
if (!this.privateLocations) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
for (const privateLocation of this.privateLocations) {
|
|
86
|
+
// slugName strings are processed in loadAllPrivateLocations()
|
|
87
|
+
if (typeof privateLocation === 'string') {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
// use private location assignment for instances
|
|
91
|
+
const assignment = new private_location_check_assignment_1.PrivateLocationCheckAssignment(`private-location-check-assignment#${this.logicalId}#${privateLocation.logicalId}`, {
|
|
92
|
+
privateLocationId: ref_1.Ref.from(privateLocation.logicalId),
|
|
93
|
+
checkId: ref_1.Ref.from(this.logicalId),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
getSourceFile() {
|
|
98
|
+
return this.__checkFilePath;
|
|
99
|
+
}
|
|
100
|
+
synthesize() {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
return {
|
|
103
|
+
name: this.name,
|
|
104
|
+
activated: this.activated,
|
|
105
|
+
muted: this.muted,
|
|
106
|
+
shouldFail: this.shouldFail,
|
|
107
|
+
runtimeId: this.runtimeId,
|
|
108
|
+
locations: this.locations,
|
|
109
|
+
// private-location instances are assigned with loadAllPrivateLocations()
|
|
110
|
+
privateLocations: undefined,
|
|
111
|
+
tags: this.tags,
|
|
112
|
+
frequency: this.frequency,
|
|
113
|
+
frequencyOffset: this.frequencyOffset,
|
|
114
|
+
groupId: this.groupId,
|
|
115
|
+
environmentVariables: this.environmentVariables,
|
|
116
|
+
// The backend doesn't actually support the `NO_RETRIES` type, it uses `null` instead.
|
|
117
|
+
retryStrategy: ((_a = this.retryStrategy) === null || _a === void 0 ? void 0 : _a.type) === 'NO_RETRIES'
|
|
118
|
+
? null
|
|
119
|
+
: this.retryStrategy,
|
|
120
|
+
// When `retryStrategy: NO_RETRIES` and `doubleCheck: undefined`, we want to let the user disable all retries.
|
|
121
|
+
// The backend has a Joi default of `doubleCheck: true`, though, so we need special handling for this case.
|
|
122
|
+
doubleCheck: this.doubleCheck === undefined && ((_b = this.retryStrategy) === null || _b === void 0 ? void 0 : _b.type) === 'NO_RETRIES'
|
|
123
|
+
? false
|
|
124
|
+
: this.doubleCheck,
|
|
125
|
+
alertSettings: this.alertSettings,
|
|
126
|
+
useGlobalAlertSettings: this.useGlobalAlertSettings,
|
|
127
|
+
runParallel: this.runParallel,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.Check = Check;
|
|
132
|
+
Check.__checklyType = 'check';
|
|
133
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/constructs/check.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,2CAAuC;AACvC,2CAAuC;AAGvC,6EAAuE;AACvE,uCAAmC;AAKnC,2FAAoF;AA2FpF,4DAA4D;AAC5D,MAAsB,KAAM,SAAQ,qBAAS;IAwB3C,YAAa,SAAiB,EAAE,KAAiB;;QAC/C,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QACrC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,KAAK,CAAC,4BAA4B,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAA;QAC3E,CAAC;QACD,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;QACpC,6FAA6F;QAC7F,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;QAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;QAClC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;QAChC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAA;QAC9C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,KAAK,CAA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,CAAA;IACH,CAAC;;AAlJH,sBAmJC;AA7HiB,mBAAa,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
export declare abstract class Construct {
|
|
3
|
+
type: string;
|
|
4
|
+
logicalId: string;
|
|
5
|
+
physicalId?: string | number;
|
|
6
|
+
member: boolean;
|
|
7
|
+
constructor(type: string, logicalId: string, physicalId?: string | number, member?: boolean);
|
|
8
|
+
ref(): Ref;
|
|
9
|
+
allowInChecklyConfig(): boolean;
|
|
10
|
+
abstract synthesize(): any | null;
|
|
11
|
+
}
|
|
12
|
+
export interface Entrypoint {
|
|
13
|
+
entrypoint: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Content {
|
|
16
|
+
content: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Construct = void 0;
|
|
4
|
+
const project_1 = require("./project");
|
|
5
|
+
const ref_1 = require("./ref");
|
|
6
|
+
class Construct {
|
|
7
|
+
constructor(type, logicalId, physicalId, member) {
|
|
8
|
+
this.logicalId = logicalId;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.physicalId = physicalId;
|
|
11
|
+
this.member = member !== null && member !== void 0 ? member : true;
|
|
12
|
+
project_1.Session.validateCreateConstruct(this);
|
|
13
|
+
}
|
|
14
|
+
ref() {
|
|
15
|
+
return ref_1.Ref.from(this.logicalId);
|
|
16
|
+
}
|
|
17
|
+
allowInChecklyConfig() {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Construct = Construct;
|
|
22
|
+
//# sourceMappingURL=construct.js.map
|
|
@@ -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,138 @@
|
|
|
1
|
+
import { Construct, Content, Entrypoint } from './construct';
|
|
2
|
+
export interface DashboardProps {
|
|
3
|
+
/**
|
|
4
|
+
* A list of one or more tags that filter what checks will be shown in the dashboard.
|
|
5
|
+
* All checks are included if no tag is specified.
|
|
6
|
+
*/
|
|
7
|
+
tags?: Array<string>;
|
|
8
|
+
/**
|
|
9
|
+
* A subdomain name under "checklyhq.com". Needs to be unique across all users.
|
|
10
|
+
* This is required if 'customDomain' is not specified.
|
|
11
|
+
*/
|
|
12
|
+
customUrl?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A custom user domain, e.g. "status.example.com". See the docs on updating your DNS and SSL usage.
|
|
15
|
+
* This is required if 'customUrl' is not specified.
|
|
16
|
+
*/
|
|
17
|
+
customDomain?: string;
|
|
18
|
+
/**
|
|
19
|
+
* A URL pointing to an image file.
|
|
20
|
+
*/
|
|
21
|
+
logo?: string;
|
|
22
|
+
/**
|
|
23
|
+
* A URL pointing to an image file used as dashboard favicon.
|
|
24
|
+
*/
|
|
25
|
+
favicon?: string;
|
|
26
|
+
/**
|
|
27
|
+
* A URL link to redirect when dashboard logo is clicked on.
|
|
28
|
+
*/
|
|
29
|
+
link?: string;
|
|
30
|
+
/**
|
|
31
|
+
* A piece of text displayed at the top of your dashboard.
|
|
32
|
+
*/
|
|
33
|
+
header?: string;
|
|
34
|
+
/**
|
|
35
|
+
* A piece of text displayed below the header or title of your dashboard.
|
|
36
|
+
*/
|
|
37
|
+
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Determines whether to use the full screen or focus in the center. Default: 'FULL'.
|
|
40
|
+
*/
|
|
41
|
+
width?: 'FULL' | '960PX';
|
|
42
|
+
/**
|
|
43
|
+
* How often to refresh the dashboard in seconds. Default: 60.
|
|
44
|
+
*/
|
|
45
|
+
refreshRate?: 60 | 300 | 600;
|
|
46
|
+
/**
|
|
47
|
+
* Determines of pagination is on or off. Default: true.
|
|
48
|
+
*/
|
|
49
|
+
paginate?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* How often to trigger pagination in seconds. Default: 60.
|
|
52
|
+
*/
|
|
53
|
+
paginationRate?: 30 | 60 | 300;
|
|
54
|
+
/**
|
|
55
|
+
* Number of checks displayed per page, between 1 and 20. Default: 15.
|
|
56
|
+
*/
|
|
57
|
+
checksPerPage?: number;
|
|
58
|
+
/**
|
|
59
|
+
* When to use AND operator for tags lookup. Default: false.
|
|
60
|
+
*/
|
|
61
|
+
useTagsAndOperator?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Show or hide the tags on the dashboard. Default: false.
|
|
64
|
+
*/
|
|
65
|
+
hideTags?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Enable or disable incidents on the dashboard. Default: false.
|
|
68
|
+
* @description only paid accounts can enable this feature.
|
|
69
|
+
*/
|
|
70
|
+
enableIncidents?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Expand or collapse checks on the dashboard. Default: false.
|
|
73
|
+
*/
|
|
74
|
+
expandChecks?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Show or hide header and description on the dashboard. Default: true.
|
|
77
|
+
*/
|
|
78
|
+
showHeader?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Custom CSS to be applied to the dashboard.
|
|
81
|
+
*/
|
|
82
|
+
customCSS?: Content | Entrypoint;
|
|
83
|
+
/**
|
|
84
|
+
* Determines if the dashboard is public or private. Default: false.
|
|
85
|
+
* @description only paid accounts can enable this feature.
|
|
86
|
+
*/
|
|
87
|
+
isPrivate?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Show or hide the P95 stats on the dashboard. Default: true.
|
|
90
|
+
*/
|
|
91
|
+
showP95?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Show or hide the P99 stats on the dashboard. Default: true.
|
|
94
|
+
*/
|
|
95
|
+
showP99?: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Creates a Dashboard
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
*
|
|
102
|
+
* This class make use of the Dashboard endpoints.
|
|
103
|
+
*/
|
|
104
|
+
export declare class Dashboard extends Construct {
|
|
105
|
+
tags?: Array<string>;
|
|
106
|
+
customUrl?: string;
|
|
107
|
+
customDomain?: string;
|
|
108
|
+
logo?: string;
|
|
109
|
+
favicon?: string;
|
|
110
|
+
link?: string;
|
|
111
|
+
header?: string;
|
|
112
|
+
description?: string;
|
|
113
|
+
width?: 'FULL' | '960PX';
|
|
114
|
+
refreshRate?: 60 | 300 | 600;
|
|
115
|
+
paginate?: boolean;
|
|
116
|
+
paginationRate?: 30 | 60 | 300;
|
|
117
|
+
checksPerPage?: number;
|
|
118
|
+
useTagsAndOperator?: boolean;
|
|
119
|
+
hideTags?: boolean;
|
|
120
|
+
enableIncidents?: boolean;
|
|
121
|
+
expandChecks?: boolean;
|
|
122
|
+
showHeader?: boolean;
|
|
123
|
+
customCSS?: string;
|
|
124
|
+
isPrivate?: boolean;
|
|
125
|
+
showP95?: boolean;
|
|
126
|
+
showP99?: boolean;
|
|
127
|
+
static readonly __checklyType = "dashboard";
|
|
128
|
+
/**
|
|
129
|
+
* Constructs the Dashboard instance
|
|
130
|
+
*
|
|
131
|
+
* @param logicalId unique project-scoped resource name identification
|
|
132
|
+
* @param props dashboard configuration properties
|
|
133
|
+
*
|
|
134
|
+
* {@link https://checklyhq.com/docs/cli/constructs-reference/#dashboard Read more in the docs}
|
|
135
|
+
*/
|
|
136
|
+
constructor(logicalId: string, props: DashboardProps);
|
|
137
|
+
synthesize(): any | null;
|
|
138
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Dashboard = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const construct_1 = require("./construct");
|
|
29
|
+
const project_1 = require("./project");
|
|
30
|
+
const path = __importStar(require("path"));
|
|
31
|
+
/**
|
|
32
|
+
* Creates a Dashboard
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*
|
|
36
|
+
* This class make use of the Dashboard endpoints.
|
|
37
|
+
*/
|
|
38
|
+
class Dashboard extends construct_1.Construct {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs the Dashboard instance
|
|
41
|
+
*
|
|
42
|
+
* @param logicalId unique project-scoped resource name identification
|
|
43
|
+
* @param props dashboard configuration properties
|
|
44
|
+
*
|
|
45
|
+
* {@link https://checklyhq.com/docs/cli/constructs-reference/#dashboard Read more in the docs}
|
|
46
|
+
*/
|
|
47
|
+
constructor(logicalId, props) {
|
|
48
|
+
super(Dashboard.__checklyType, logicalId);
|
|
49
|
+
this.tags = props.tags;
|
|
50
|
+
this.customUrl = props.customUrl;
|
|
51
|
+
this.customDomain = props.customDomain;
|
|
52
|
+
this.logo = props.logo;
|
|
53
|
+
this.favicon = props.favicon;
|
|
54
|
+
this.link = props.link;
|
|
55
|
+
this.header = props.header;
|
|
56
|
+
this.description = props.description;
|
|
57
|
+
this.width = props.width;
|
|
58
|
+
this.refreshRate = props.refreshRate;
|
|
59
|
+
this.paginate = props.paginate;
|
|
60
|
+
this.paginationRate = props.paginationRate;
|
|
61
|
+
this.checksPerPage = props.checksPerPage;
|
|
62
|
+
this.useTagsAndOperator = props.useTagsAndOperator;
|
|
63
|
+
this.hideTags = props.hideTags;
|
|
64
|
+
this.enableIncidents = props.enableIncidents;
|
|
65
|
+
this.expandChecks = props.expandChecks;
|
|
66
|
+
this.showHeader = props.showHeader;
|
|
67
|
+
this.isPrivate = props.isPrivate;
|
|
68
|
+
this.showP95 = props.showP95;
|
|
69
|
+
this.showP99 = props.showP99;
|
|
70
|
+
if (!props.customUrl && !props.customDomain) {
|
|
71
|
+
throw new Error('Either a "customUrl" or "customDomain" must be specified.');
|
|
72
|
+
}
|
|
73
|
+
if (props.customCSS) {
|
|
74
|
+
if ('entrypoint' in props.customCSS) {
|
|
75
|
+
const entrypoint = props.customCSS.entrypoint;
|
|
76
|
+
let absoluteEntrypoint = null;
|
|
77
|
+
if (path.isAbsolute(entrypoint)) {
|
|
78
|
+
absoluteEntrypoint = entrypoint;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (!project_1.Session.checkFileAbsolutePath) {
|
|
82
|
+
throw new Error('You cannot use relative paths without the checkFileAbsolutePath in session');
|
|
83
|
+
}
|
|
84
|
+
absoluteEntrypoint = path.join(path.dirname(project_1.Session.checkFileAbsolutePath), entrypoint);
|
|
85
|
+
}
|
|
86
|
+
if (!fs.existsSync(absoluteEntrypoint)) {
|
|
87
|
+
throw new Error(`Unrecognized CSS code or file not found for 'customCSS' property in dashboard '${logicalId}'.`);
|
|
88
|
+
}
|
|
89
|
+
this.customCSS = String(fs.readFileSync(absoluteEntrypoint));
|
|
90
|
+
}
|
|
91
|
+
else if ('content' in props.customCSS) {
|
|
92
|
+
this.customCSS = props.customCSS.content;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
project_1.Session.registerConstruct(this);
|
|
96
|
+
}
|
|
97
|
+
synthesize() {
|
|
98
|
+
return {
|
|
99
|
+
tags: this.tags,
|
|
100
|
+
customUrl: this.customUrl,
|
|
101
|
+
customDomain: this.customDomain,
|
|
102
|
+
logo: this.logo,
|
|
103
|
+
favicon: this.favicon,
|
|
104
|
+
link: this.link,
|
|
105
|
+
header: this.header,
|
|
106
|
+
description: this.description,
|
|
107
|
+
width: this.width,
|
|
108
|
+
refreshRate: this.refreshRate,
|
|
109
|
+
paginate: this.paginate,
|
|
110
|
+
paginationRate: this.paginationRate,
|
|
111
|
+
checksPerPage: this.checksPerPage,
|
|
112
|
+
useTagsAndOperator: this.useTagsAndOperator,
|
|
113
|
+
hideTags: this.hideTags,
|
|
114
|
+
enableIncidents: this.enableIncidents,
|
|
115
|
+
expandChecks: this.expandChecks,
|
|
116
|
+
showHeader: this.showHeader,
|
|
117
|
+
customCSS: this.customCSS,
|
|
118
|
+
isPrivate: this.isPrivate,
|
|
119
|
+
showP95: this.showP95,
|
|
120
|
+
showP99: this.showP99,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.Dashboard = Dashboard;
|
|
125
|
+
Dashboard.__checklyType = 'dashboard';
|
|
126
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/constructs/dashboard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4D;AAC5D,uCAAmC;AACnC,2CAA4B;AAkG5B;;;;;;GAMG;AACH,MAAa,SAAU,SAAQ,qBAAS;IA0BtC;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAAqB;QACnD,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QACzC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;QAChC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAA;QACtC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,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YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAhHH,8BAiHC;AAzFiB,uBAAa,GAAG,WAAW,CAAA"}
|
|
@@ -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-reference/#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-reference/#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"}
|