checkly 3.1.1 → 4.0.1

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.
Files changed (233) hide show
  1. package/README.md +42 -110
  2. package/bin/dev +17 -0
  3. package/bin/run +5 -0
  4. package/bin/run.cmd +3 -0
  5. package/constructs.d.ts +1 -0
  6. package/constructs.js +1 -0
  7. package/dist/auth/index.d.ts +15 -0
  8. package/dist/auth/index.js +228 -0
  9. package/dist/auth/index.js.map +1 -0
  10. package/dist/commands/authCommand.d.ts +5 -0
  11. package/dist/commands/authCommand.js +14 -0
  12. package/dist/commands/authCommand.js.map +1 -0
  13. package/dist/commands/baseCommand.d.ts +9 -0
  14. package/dist/commands/baseCommand.js +21 -0
  15. package/dist/commands/baseCommand.js.map +1 -0
  16. package/dist/commands/deploy.d.ts +13 -0
  17. package/dist/commands/deploy.js +171 -0
  18. package/dist/commands/deploy.js.map +1 -0
  19. package/dist/commands/destroy.d.ts +10 -0
  20. package/dist/commands/destroy.js +47 -0
  21. package/dist/commands/destroy.js.map +1 -0
  22. package/dist/commands/env/add.d.ts +13 -0
  23. package/dist/commands/env/add.js +54 -0
  24. package/dist/commands/env/add.js.map +1 -0
  25. package/dist/commands/env/ls.d.ts +6 -0
  26. package/dist/commands/env/ls.js +21 -0
  27. package/dist/commands/env/ls.js.map +1 -0
  28. package/dist/commands/env/pull.d.ts +12 -0
  29. package/dist/commands/env/pull.js +63 -0
  30. package/dist/commands/env/pull.js.map +1 -0
  31. package/dist/commands/env/rm.d.ts +12 -0
  32. package/dist/commands/env/rm.js +56 -0
  33. package/dist/commands/env/rm.js.map +1 -0
  34. package/dist/commands/env/update.d.ts +13 -0
  35. package/dist/commands/env/update.js +54 -0
  36. package/dist/commands/env/update.js.map +1 -0
  37. package/dist/commands/login.d.ts +13 -0
  38. package/dist/commands/login.js +129 -0
  39. package/dist/commands/login.js.map +1 -0
  40. package/dist/commands/logout.d.ts +9 -0
  41. package/dist/commands/logout.js +40 -0
  42. package/dist/commands/logout.js.map +1 -0
  43. package/dist/commands/runtimes.d.ts +6 -0
  44. package/dist/commands/runtimes.js +26 -0
  45. package/dist/commands/runtimes.js.map +1 -0
  46. package/dist/commands/switch.d.ts +9 -0
  47. package/dist/commands/switch.js +59 -0
  48. package/dist/commands/switch.js.map +1 -0
  49. package/dist/commands/test.d.ts +36 -0
  50. package/dist/commands/test.js +237 -0
  51. package/dist/commands/test.js.map +1 -0
  52. package/dist/commands/trigger.d.ts +32 -0
  53. package/dist/commands/trigger.js +173 -0
  54. package/dist/commands/trigger.js.map +1 -0
  55. package/dist/commands/whoami.d.ts +6 -0
  56. package/dist/commands/whoami.js +16 -0
  57. package/dist/commands/whoami.js.map +1 -0
  58. package/dist/config.d.ts +31 -0
  59. package/dist/config.js +8 -0
  60. package/dist/config.js.map +1 -0
  61. package/dist/constructs/alert-channel-subscription.d.ts +44 -0
  62. package/dist/constructs/alert-channel-subscription.js +39 -0
  63. package/dist/constructs/alert-channel-subscription.js.map +1 -0
  64. package/dist/constructs/alert-channel.d.ts +53 -0
  65. package/dist/constructs/alert-channel.js +55 -0
  66. package/dist/constructs/alert-channel.js.map +1 -0
  67. package/dist/constructs/api-check.d.ts +179 -0
  68. package/dist/constructs/api-check.js +248 -0
  69. package/dist/constructs/api-check.js.map +1 -0
  70. package/dist/constructs/browser-check.d.ts +59 -0
  71. package/dist/constructs/browser-check.js +102 -0
  72. package/dist/constructs/browser-check.js.map +1 -0
  73. package/dist/constructs/check-group.d.ts +116 -0
  74. package/dist/constructs/check-group.js +113 -0
  75. package/dist/constructs/check-group.js.map +1 -0
  76. package/dist/constructs/check.d.ts +111 -0
  77. package/dist/constructs/check.js +88 -0
  78. package/dist/constructs/check.js.map +1 -0
  79. package/dist/constructs/construct.d.ts +17 -0
  80. package/dist/constructs/construct.js +22 -0
  81. package/dist/constructs/construct.js.map +1 -0
  82. package/dist/constructs/email-alert-channel.d.ts +26 -0
  83. package/dist/constructs/email-alert-channel.js +37 -0
  84. package/dist/constructs/email-alert-channel.js.map +1 -0
  85. package/dist/constructs/environment-variable.d.ts +2 -0
  86. package/dist/constructs/environment-variable.js +3 -0
  87. package/dist/constructs/environment-variable.js.map +1 -0
  88. package/dist/constructs/frequency.d.ts +20 -0
  89. package/dist/constructs/frequency.js +26 -0
  90. package/dist/constructs/frequency.js.map +1 -0
  91. package/dist/constructs/http-header.d.ts +2 -0
  92. package/dist/constructs/http-header.js +3 -0
  93. package/dist/constructs/http-header.js.map +1 -0
  94. package/dist/constructs/index.d.ts +15 -0
  95. package/dist/constructs/index.js +32 -0
  96. package/dist/constructs/index.js.map +1 -0
  97. package/dist/constructs/key-value-pair.d.ts +5 -0
  98. package/dist/constructs/key-value-pair.js +3 -0
  99. package/dist/constructs/key-value-pair.js.map +1 -0
  100. package/dist/constructs/opsgenie-alert-channel.d.ts +45 -0
  101. package/dist/constructs/opsgenie-alert-channel.js +44 -0
  102. package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
  103. package/dist/constructs/pagerduty-alert-channel.d.ts +39 -0
  104. package/dist/constructs/pagerduty-alert-channel.js +42 -0
  105. package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
  106. package/dist/constructs/project.d.ts +57 -0
  107. package/dist/constructs/project.js +100 -0
  108. package/dist/constructs/project.js.map +1 -0
  109. package/dist/constructs/query-param.d.ts +2 -0
  110. package/dist/constructs/query-param.js +3 -0
  111. package/dist/constructs/query-param.js.map +1 -0
  112. package/dist/constructs/ref.d.ts +5 -0
  113. package/dist/constructs/ref.js +13 -0
  114. package/dist/constructs/ref.js.map +1 -0
  115. package/dist/constructs/slack-alert-channel.d.ts +26 -0
  116. package/dist/constructs/slack-alert-channel.js +40 -0
  117. package/dist/constructs/slack-alert-channel.js.map +1 -0
  118. package/dist/constructs/sms-alert-channel.d.ts +27 -0
  119. package/dist/constructs/sms-alert-channel.js +38 -0
  120. package/dist/constructs/sms-alert-channel.js.map +1 -0
  121. package/dist/constructs/validator-error.d.ts +2 -0
  122. package/dist/constructs/validator-error.js +7 -0
  123. package/dist/constructs/validator-error.js.map +1 -0
  124. package/dist/constructs/webhook-alert-channel.d.ts +59 -0
  125. package/dist/constructs/webhook-alert-channel.js +50 -0
  126. package/dist/constructs/webhook-alert-channel.js.map +1 -0
  127. package/dist/help/examples.d.ts +6 -0
  128. package/dist/help/examples.js +22 -0
  129. package/dist/help/examples.js.map +1 -0
  130. package/dist/help/help-extension.d.ts +4 -0
  131. package/dist/help/help-extension.js +41 -0
  132. package/dist/help/help-extension.js.map +1 -0
  133. package/dist/index.d.ts +3 -0
  134. package/dist/index.js +7 -0
  135. package/dist/index.js.map +1 -0
  136. package/dist/messages/common-messages.d.ts +5 -0
  137. package/dist/messages/common-messages.js +9 -0
  138. package/dist/messages/common-messages.js.map +1 -0
  139. package/dist/reporters/abstract-list.d.ts +34 -0
  140. package/dist/reporters/abstract-list.js +128 -0
  141. package/dist/reporters/abstract-list.js.map +1 -0
  142. package/dist/reporters/ci.d.ts +12 -0
  143. package/dist/reporters/ci.js +29 -0
  144. package/dist/reporters/ci.js.map +1 -0
  145. package/dist/reporters/dot.d.ts +12 -0
  146. package/dist/reporters/dot.js +28 -0
  147. package/dist/reporters/dot.js.map +1 -0
  148. package/dist/reporters/github.d.ts +34 -0
  149. package/dist/reporters/github.js +103 -0
  150. package/dist/reporters/github.js.map +1 -0
  151. package/dist/reporters/list.d.ts +13 -0
  152. package/dist/reporters/list.js +57 -0
  153. package/dist/reporters/list.js.map +1 -0
  154. package/dist/reporters/reporter.d.ts +14 -0
  155. package/dist/reporters/reporter.js +23 -0
  156. package/dist/reporters/reporter.js.map +1 -0
  157. package/dist/reporters/util.d.ts +15 -0
  158. package/dist/reporters/util.js +283 -0
  159. package/dist/reporters/util.js.map +1 -0
  160. package/dist/rest/accounts.d.ts +12 -0
  161. package/dist/rest/accounts.js +15 -0
  162. package/dist/rest/accounts.js.map +1 -0
  163. package/dist/rest/api.d.ts +27 -0
  164. package/dist/rest/api.js +90 -0
  165. package/dist/rest/api.js.map +1 -0
  166. package/dist/rest/assets.d.ts +13 -0
  167. package/dist/rest/assets.js +30 -0
  168. package/dist/rest/assets.js.map +1 -0
  169. package/dist/rest/environment-variables.d.ts +16 -0
  170. package/dist/rest/environment-variables.js +25 -0
  171. package/dist/rest/environment-variables.js.map +1 -0
  172. package/dist/rest/locations.d.ts +11 -0
  173. package/dist/rest/locations.js +12 -0
  174. package/dist/rest/locations.js.map +1 -0
  175. package/dist/rest/private-locations.d.ts +11 -0
  176. package/dist/rest/private-locations.js +12 -0
  177. package/dist/rest/private-locations.js.map +1 -0
  178. package/dist/rest/projects.d.ts +43 -0
  179. package/dist/rest/projects.js +24 -0
  180. package/dist/rest/projects.js.map +1 -0
  181. package/dist/rest/runtimes.d.ts +15 -0
  182. package/dist/rest/runtimes.js +15 -0
  183. package/dist/rest/runtimes.js.map +1 -0
  184. package/dist/rest/test-sessions.d.ts +47 -0
  185. package/dist/rest/test-sessions.js +15 -0
  186. package/dist/rest/test-sessions.js.map +1 -0
  187. package/dist/rest/users.d.ts +12 -0
  188. package/dist/rest/users.js +12 -0
  189. package/dist/rest/users.js.map +1 -0
  190. package/dist/services/abstract-check-runner.d.ts +50 -0
  191. package/dist/services/abstract-check-runner.js +151 -0
  192. package/dist/services/abstract-check-runner.js.map +1 -0
  193. package/dist/services/check-parser/collector.d.ts +33 -0
  194. package/dist/services/check-parser/collector.js +48 -0
  195. package/dist/services/check-parser/collector.js.map +1 -0
  196. package/dist/services/check-parser/errors.d.ts +8 -0
  197. package/dist/services/check-parser/errors.js +45 -0
  198. package/dist/services/check-parser/errors.js.map +1 -0
  199. package/dist/services/check-parser/parser.d.ts +39 -0
  200. package/dist/services/check-parser/parser.js +296 -0
  201. package/dist/services/check-parser/parser.js.map +1 -0
  202. package/dist/services/checkly-config-loader.d.ts +54 -0
  203. package/dist/services/checkly-config-loader.js +55 -0
  204. package/dist/services/checkly-config-loader.js.map +1 -0
  205. package/dist/services/config.d.ts +24 -0
  206. package/dist/services/config.js +75 -0
  207. package/dist/services/config.js.map +1 -0
  208. package/dist/services/project-parser.d.ts +19 -0
  209. package/dist/services/project-parser.js +87 -0
  210. package/dist/services/project-parser.js.map +1 -0
  211. package/dist/services/socket-client.d.ts +4 -0
  212. package/dist/services/socket-client.js +20 -0
  213. package/dist/services/socket-client.js.map +1 -0
  214. package/dist/services/test-filters.d.ts +2 -0
  215. package/dist/services/test-filters.js +16 -0
  216. package/dist/services/test-filters.js.map +1 -0
  217. package/dist/services/test-runner.d.ts +21 -0
  218. package/dist/services/test-runner.js +50 -0
  219. package/dist/services/test-runner.js.map +1 -0
  220. package/dist/services/trigger-runner.d.ts +26 -0
  221. package/dist/services/trigger-runner.js +47 -0
  222. package/dist/services/trigger-runner.js.map +1 -0
  223. package/dist/services/util.d.ts +30 -0
  224. package/dist/services/util.js +157 -0
  225. package/dist/services/util.js.map +1 -0
  226. package/dist/tsconfig.tsbuildinfo +1 -0
  227. package/oclif.manifest.json +527 -0
  228. package/package.json +163 -18
  229. package/LICENSE +0 -121
  230. package/dist/checkly.min.js +0 -1
  231. package/index.js +0 -285
  232. package/logo.png +0 -0
  233. package/test.js +0 -183
@@ -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,2 @@
1
+ import KeyValuePair from './key-value-pair';
2
+ export type QueryParam = KeyValuePair;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query-param.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-param.js","sourceRoot":"","sources":["../../src/constructs/query-param.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export declare class Ref {
2
+ ref: string;
3
+ private constructor();
4
+ static from(ref: string): Ref;
5
+ }
@@ -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
+ }
@@ -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,2 @@
1
+ export declare class ValidationError extends Error {
2
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationError = void 0;
4
+ class ValidationError extends Error {
5
+ }
6
+ exports.ValidationError = ValidationError;
7
+ //# sourceMappingURL=validator-error.js.map
@@ -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,6 @@
1
+ type Example = {
2
+ description: string;
3
+ command: string;
4
+ };
5
+ declare const examples: Array<Example>;
6
+ export default examples;
@@ -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,4 @@
1
+ import { Help } from '@oclif/core';
2
+ export default class ChecklyHelpClass extends Help {
3
+ showRootHelp(): Promise<void>;
4
+ }
@@ -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,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,gBAAgB;gBACpC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,UAAU,KAAK,KAAK,CAC3C,CAAA;SACF;QAED,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAEZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;YAC1D,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;SAC7D;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAA;YACvC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;SACb;QAED,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;YAC7C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAA;YAC3C,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;SACb;QACD,MAAM;QAEN,MAAM,cAAc,GAAG,kBAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE;YAC9D,OAAO,WAAW,GAAG,OAAO,OAAO,CAAC,WAAW,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,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"}
@@ -0,0 +1,3 @@
1
+ export * as constructs from './constructs';
2
+ export { defineConfig } from './config';
3
+ export type { ChecklyConfig } from './services/checkly-config-loader';
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,5 @@
1
+ declare const commonMessages: {
2
+ forceMode: string;
3
+ configFile: string;
4
+ };
5
+ export default commonMessages;
@@ -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,34 @@
1
+ import { Reporter } from './reporter';
2
+ import type { RunLocation, CheckRunId } from '../services/abstract-check-runner';
3
+ import { Check } from '../constructs/check';
4
+ export type checkFilesMap = Map<string | undefined, Map<CheckRunId, {
5
+ check?: Check;
6
+ result?: any;
7
+ titleString: string;
8
+ testResultId?: string;
9
+ }>>;
10
+ export default abstract class AbstractListReporter implements Reporter {
11
+ _clearString: string;
12
+ runLocation: RunLocation;
13
+ checkFilesMap?: checkFilesMap;
14
+ numChecks?: number;
15
+ verbose: boolean;
16
+ testSessionId?: string;
17
+ constructor(runLocation: RunLocation, verbose: boolean);
18
+ abstract onBeginStatic(): void;
19
+ onBegin(checks: Array<{
20
+ check: any;
21
+ checkRunId: CheckRunId;
22
+ testResultId?: string;
23
+ }>, testSessionId?: string): void;
24
+ abstract onEnd(): void;
25
+ onCheckEnd(checkRunId: CheckRunId, checkResult: any): void;
26
+ onError(err: Error): void;
27
+ _clearSummary(): void;
28
+ _printSummary(opts?: {
29
+ skipCheckCount?: boolean;
30
+ }): void;
31
+ _printBriefSummary(): void;
32
+ _printTestSessionsUrl(): void;
33
+ _runLocationString(): string;
34
+ }