checkly 0.0.0-pr.1006.2fb1ffc

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 (317) hide show
  1. package/README.md +102 -0
  2. package/bin/run +5 -0
  3. package/bin/run.cmd +3 -0
  4. package/constructs.d.ts +1 -0
  5. package/constructs.js +2 -0
  6. package/dist/auth/index.d.ts +15 -0
  7. package/dist/auth/index.js +262 -0
  8. package/dist/auth/index.js.map +1 -0
  9. package/dist/commands/authCommand.d.ts +5 -0
  10. package/dist/commands/authCommand.js +37 -0
  11. package/dist/commands/authCommand.js.map +1 -0
  12. package/dist/commands/baseCommand.d.ts +13 -0
  13. package/dist/commands/baseCommand.js +48 -0
  14. package/dist/commands/baseCommand.js.map +1 -0
  15. package/dist/commands/deploy.d.ts +18 -0
  16. package/dist/commands/deploy.js +289 -0
  17. package/dist/commands/deploy.js.map +1 -0
  18. package/dist/commands/destroy.d.ts +10 -0
  19. package/dist/commands/destroy.js +84 -0
  20. package/dist/commands/destroy.js.map +1 -0
  21. package/dist/commands/env/add.d.ts +14 -0
  22. package/dist/commands/env/add.js +85 -0
  23. package/dist/commands/env/add.js.map +1 -0
  24. package/dist/commands/env/ls.d.ts +6 -0
  25. package/dist/commands/env/ls.js +44 -0
  26. package/dist/commands/env/ls.js.map +1 -0
  27. package/dist/commands/env/pull.d.ts +12 -0
  28. package/dist/commands/env/pull.js +99 -0
  29. package/dist/commands/env/pull.js.map +1 -0
  30. package/dist/commands/env/rm.d.ts +12 -0
  31. package/dist/commands/env/rm.js +82 -0
  32. package/dist/commands/env/rm.js.map +1 -0
  33. package/dist/commands/env/update.d.ts +14 -0
  34. package/dist/commands/env/update.js +88 -0
  35. package/dist/commands/env/update.js.map +1 -0
  36. package/dist/commands/help.d.ts +6 -0
  37. package/dist/commands/help.js +17 -0
  38. package/dist/commands/help.js.map +1 -0
  39. package/dist/commands/login.d.ts +13 -0
  40. package/dist/commands/login.js +134 -0
  41. package/dist/commands/login.js.map +1 -0
  42. package/dist/commands/logout.d.ts +9 -0
  43. package/dist/commands/logout.js +43 -0
  44. package/dist/commands/logout.js.map +1 -0
  45. package/dist/commands/runtimes.d.ts +6 -0
  46. package/dist/commands/runtimes.js +49 -0
  47. package/dist/commands/runtimes.js.map +1 -0
  48. package/dist/commands/switch.d.ts +9 -0
  49. package/dist/commands/switch.js +81 -0
  50. package/dist/commands/switch.js.map +1 -0
  51. package/dist/commands/sync-playwright.d.ts +10 -0
  52. package/dist/commands/sync-playwright.js +98 -0
  53. package/dist/commands/sync-playwright.js.map +1 -0
  54. package/dist/commands/test.d.ts +45 -0
  55. package/dist/commands/test.js +366 -0
  56. package/dist/commands/test.js.map +1 -0
  57. package/dist/commands/trigger.d.ts +37 -0
  58. package/dist/commands/trigger.js +242 -0
  59. package/dist/commands/trigger.js.map +1 -0
  60. package/dist/commands/whoami.d.ts +6 -0
  61. package/dist/commands/whoami.js +42 -0
  62. package/dist/commands/whoami.js.map +1 -0
  63. package/dist/config.d.ts +31 -0
  64. package/dist/config.js +8 -0
  65. package/dist/config.js.map +1 -0
  66. package/dist/constants.d.ts +7 -0
  67. package/dist/constants.js +10 -0
  68. package/dist/constants.js.map +1 -0
  69. package/dist/constructs/alert-channel-subscription.d.ts +44 -0
  70. package/dist/constructs/alert-channel-subscription.js +39 -0
  71. package/dist/constructs/alert-channel-subscription.js.map +1 -0
  72. package/dist/constructs/alert-channel.d.ts +53 -0
  73. package/dist/constructs/alert-channel.js +55 -0
  74. package/dist/constructs/alert-channel.js.map +1 -0
  75. package/dist/constructs/alert-escalation-policy.d.ts +34 -0
  76. package/dist/constructs/alert-escalation-policy.js +47 -0
  77. package/dist/constructs/alert-escalation-policy.js.map +1 -0
  78. package/dist/constructs/api-check.d.ts +187 -0
  79. package/dist/constructs/api-check.js +279 -0
  80. package/dist/constructs/api-check.js.map +1 -0
  81. package/dist/constructs/browser-check.d.ts +90 -0
  82. package/dist/constructs/browser-check.js +151 -0
  83. package/dist/constructs/browser-check.js.map +1 -0
  84. package/dist/constructs/check-group.d.ts +162 -0
  85. package/dist/constructs/check-group.js +208 -0
  86. package/dist/constructs/check-group.js.map +1 -0
  87. package/dist/constructs/check.d.ts +144 -0
  88. package/dist/constructs/check.js +133 -0
  89. package/dist/constructs/check.js.map +1 -0
  90. package/dist/constructs/construct.d.ts +17 -0
  91. package/dist/constructs/construct.js +22 -0
  92. package/dist/constructs/construct.js.map +1 -0
  93. package/dist/constructs/dashboard.d.ts +138 -0
  94. package/dist/constructs/dashboard.js +126 -0
  95. package/dist/constructs/dashboard.js.map +1 -0
  96. package/dist/constructs/email-alert-channel.d.ts +26 -0
  97. package/dist/constructs/email-alert-channel.js +37 -0
  98. package/dist/constructs/email-alert-channel.js.map +1 -0
  99. package/dist/constructs/environment-variable.d.ts +2 -0
  100. package/dist/constructs/environment-variable.js +3 -0
  101. package/dist/constructs/environment-variable.js.map +1 -0
  102. package/dist/constructs/frequency.d.ts +20 -0
  103. package/dist/constructs/frequency.js +26 -0
  104. package/dist/constructs/frequency.js.map +1 -0
  105. package/dist/constructs/heartbeat-check.d.ts +43 -0
  106. package/dist/constructs/heartbeat-check.js +61 -0
  107. package/dist/constructs/heartbeat-check.js.map +1 -0
  108. package/dist/constructs/http-header.d.ts +2 -0
  109. package/dist/constructs/http-header.js +3 -0
  110. package/dist/constructs/http-header.js.map +1 -0
  111. package/dist/constructs/index.d.ts +27 -0
  112. package/dist/constructs/index.js +44 -0
  113. package/dist/constructs/index.js.map +1 -0
  114. package/dist/constructs/key-value-pair.d.ts +6 -0
  115. package/dist/constructs/key-value-pair.js +3 -0
  116. package/dist/constructs/key-value-pair.js.map +1 -0
  117. package/dist/constructs/maintenance-window.d.ts +61 -0
  118. package/dist/constructs/maintenance-window.js +47 -0
  119. package/dist/constructs/maintenance-window.js.map +1 -0
  120. package/dist/constructs/multi-step-check.d.ts +65 -0
  121. package/dist/constructs/multi-step-check.js +153 -0
  122. package/dist/constructs/multi-step-check.js.map +1 -0
  123. package/dist/constructs/opsgenie-alert-channel.d.ts +45 -0
  124. package/dist/constructs/opsgenie-alert-channel.js +44 -0
  125. package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
  126. package/dist/constructs/pagerduty-alert-channel.d.ts +39 -0
  127. package/dist/constructs/pagerduty-alert-channel.js +42 -0
  128. package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
  129. package/dist/constructs/phone-call-alert-channel.d.ts +34 -0
  130. package/dist/constructs/phone-call-alert-channel.js +42 -0
  131. package/dist/constructs/phone-call-alert-channel.js.map +1 -0
  132. package/dist/constructs/playwright-config.d.ts +52 -0
  133. package/dist/constructs/playwright-config.js +3 -0
  134. package/dist/constructs/playwright-config.js.map +1 -0
  135. package/dist/constructs/private-location-check-assignment.d.ts +29 -0
  136. package/dist/constructs/private-location-check-assignment.js +35 -0
  137. package/dist/constructs/private-location-check-assignment.js.map +1 -0
  138. package/dist/constructs/private-location-group-assignment.d.ts +29 -0
  139. package/dist/constructs/private-location-group-assignment.js +35 -0
  140. package/dist/constructs/private-location-group-assignment.js.map +1 -0
  141. package/dist/constructs/private-location.d.ts +51 -0
  142. package/dist/constructs/private-location.js +61 -0
  143. package/dist/constructs/private-location.js.map +1 -0
  144. package/dist/constructs/project.d.ts +66 -0
  145. package/dist/constructs/project.js +155 -0
  146. package/dist/constructs/project.js.map +1 -0
  147. package/dist/constructs/query-param.d.ts +2 -0
  148. package/dist/constructs/query-param.js +3 -0
  149. package/dist/constructs/query-param.js.map +1 -0
  150. package/dist/constructs/ref.d.ts +5 -0
  151. package/dist/constructs/ref.js +13 -0
  152. package/dist/constructs/ref.js.map +1 -0
  153. package/dist/constructs/retry-strategy.d.ts +50 -0
  154. package/dist/constructs/retry-strategy.js +51 -0
  155. package/dist/constructs/retry-strategy.js.map +1 -0
  156. package/dist/constructs/slack-alert-channel.d.ts +26 -0
  157. package/dist/constructs/slack-alert-channel.js +40 -0
  158. package/dist/constructs/slack-alert-channel.js.map +1 -0
  159. package/dist/constructs/sms-alert-channel.d.ts +32 -0
  160. package/dist/constructs/sms-alert-channel.js +40 -0
  161. package/dist/constructs/sms-alert-channel.js.map +1 -0
  162. package/dist/constructs/validator-error.d.ts +2 -0
  163. package/dist/constructs/validator-error.js +7 -0
  164. package/dist/constructs/validator-error.js.map +1 -0
  165. package/dist/constructs/webhook-alert-channel.d.ts +67 -0
  166. package/dist/constructs/webhook-alert-channel.js +52 -0
  167. package/dist/constructs/webhook-alert-channel.js.map +1 -0
  168. package/dist/help/examples.d.ts +6 -0
  169. package/dist/help/examples.js +22 -0
  170. package/dist/help/examples.js.map +1 -0
  171. package/dist/help/help-extension.d.ts +7 -0
  172. package/dist/help/help-extension.js +59 -0
  173. package/dist/help/help-extension.js.map +1 -0
  174. package/dist/index.d.ts +3 -0
  175. package/dist/index.js +30 -0
  176. package/dist/index.js.map +1 -0
  177. package/dist/messages/common-messages.d.ts +5 -0
  178. package/dist/messages/common-messages.js +9 -0
  179. package/dist/messages/common-messages.js.map +1 -0
  180. package/dist/playwright/playwright-config-loader.d.ts +1 -0
  181. package/dist/playwright/playwright-config-loader.js +26 -0
  182. package/dist/playwright/playwright-config-loader.js.map +1 -0
  183. package/dist/playwright/playwright-config-template.d.ts +8 -0
  184. package/dist/playwright/playwright-config-template.js +78 -0
  185. package/dist/playwright/playwright-config-template.js.map +1 -0
  186. package/dist/reporters/abstract-list.d.ts +41 -0
  187. package/dist/reporters/abstract-list.js +171 -0
  188. package/dist/reporters/abstract-list.js.map +1 -0
  189. package/dist/reporters/ci.d.ts +12 -0
  190. package/dist/reporters/ci.js +34 -0
  191. package/dist/reporters/ci.js.map +1 -0
  192. package/dist/reporters/dot.d.ts +10 -0
  193. package/dist/reporters/dot.js +29 -0
  194. package/dist/reporters/dot.js.map +1 -0
  195. package/dist/reporters/github.d.ts +32 -0
  196. package/dist/reporters/github.js +119 -0
  197. package/dist/reporters/github.js.map +1 -0
  198. package/dist/reporters/json.d.ts +26 -0
  199. package/dist/reporters/json.js +101 -0
  200. package/dist/reporters/json.js.map +1 -0
  201. package/dist/reporters/list.d.ts +15 -0
  202. package/dist/reporters/list.js +85 -0
  203. package/dist/reporters/list.js.map +1 -0
  204. package/dist/reporters/reporter.d.ts +16 -0
  205. package/dist/reporters/reporter.js +29 -0
  206. package/dist/reporters/reporter.js.map +1 -0
  207. package/dist/reporters/util.d.ts +18 -0
  208. package/dist/reporters/util.js +325 -0
  209. package/dist/reporters/util.js.map +1 -0
  210. package/dist/rest/accounts.d.ts +12 -0
  211. package/dist/rest/accounts.js +15 -0
  212. package/dist/rest/accounts.js.map +1 -0
  213. package/dist/rest/api.d.ts +33 -0
  214. package/dist/rest/api.js +98 -0
  215. package/dist/rest/api.js.map +1 -0
  216. package/dist/rest/assets.d.ts +13 -0
  217. package/dist/rest/assets.js +30 -0
  218. package/dist/rest/assets.js.map +1 -0
  219. package/dist/rest/checkly-storage.d.ts +12 -0
  220. package/dist/rest/checkly-storage.js +15 -0
  221. package/dist/rest/checkly-storage.js.map +1 -0
  222. package/dist/rest/environment-variables.d.ts +17 -0
  223. package/dist/rest/environment-variables.js +25 -0
  224. package/dist/rest/environment-variables.js.map +1 -0
  225. package/dist/rest/heartbeat-checks.d.ts +11 -0
  226. package/dist/rest/heartbeat-checks.js +17 -0
  227. package/dist/rest/heartbeat-checks.js.map +1 -0
  228. package/dist/rest/locations.d.ts +11 -0
  229. package/dist/rest/locations.js +12 -0
  230. package/dist/rest/locations.js.map +1 -0
  231. package/dist/rest/private-locations.d.ts +10 -0
  232. package/dist/rest/private-locations.js +12 -0
  233. package/dist/rest/private-locations.js.map +1 -0
  234. package/dist/rest/projects.d.ts +46 -0
  235. package/dist/rest/projects.js +25 -0
  236. package/dist/rest/projects.js.map +1 -0
  237. package/dist/rest/runtimes.d.ts +16 -0
  238. package/dist/rest/runtimes.js +15 -0
  239. package/dist/rest/runtimes.js.map +1 -0
  240. package/dist/rest/test-sessions.d.ts +59 -0
  241. package/dist/rest/test-sessions.js +24 -0
  242. package/dist/rest/test-sessions.js.map +1 -0
  243. package/dist/rest/users.d.ts +12 -0
  244. package/dist/rest/users.js +12 -0
  245. package/dist/rest/users.js.map +1 -0
  246. package/dist/rest/util.d.ts +4 -0
  247. package/dist/rest/util.js +17 -0
  248. package/dist/rest/util.js.map +1 -0
  249. package/dist/services/abstract-check-runner.d.ts +60 -0
  250. package/dist/services/abstract-check-runner.js +225 -0
  251. package/dist/services/abstract-check-runner.js.map +1 -0
  252. package/dist/services/check-parser/collector.d.ts +33 -0
  253. package/dist/services/check-parser/collector.js +48 -0
  254. package/dist/services/check-parser/collector.js.map +1 -0
  255. package/dist/services/check-parser/errors.d.ts +8 -0
  256. package/dist/services/check-parser/errors.js +45 -0
  257. package/dist/services/check-parser/errors.js.map +1 -0
  258. package/dist/services/check-parser/package-files/index.d.ts +1 -0
  259. package/dist/services/check-parser/package-files/index.js +6 -0
  260. package/dist/services/check-parser/package-files/index.js.map +1 -0
  261. package/dist/services/check-parser/package-files/jsconfig-json-file.d.ts +17 -0
  262. package/dist/services/check-parser/package-files/jsconfig-json-file.js +46 -0
  263. package/dist/services/check-parser/package-files/jsconfig-json-file.js.map +1 -0
  264. package/dist/services/check-parser/package-files/json-source-file.d.ts +10 -0
  265. package/dist/services/check-parser/package-files/json-source-file.js +38 -0
  266. package/dist/services/check-parser/package-files/json-source-file.js.map +1 -0
  267. package/dist/services/check-parser/package-files/loader.d.ts +7 -0
  268. package/dist/services/check-parser/package-files/loader.js +19 -0
  269. package/dist/services/check-parser/package-files/loader.js.map +1 -0
  270. package/dist/services/check-parser/package-files/package-json-file.d.ts +20 -0
  271. package/dist/services/check-parser/package-files/package-json-file.js +48 -0
  272. package/dist/services/check-parser/package-files/package-json-file.js.map +1 -0
  273. package/dist/services/check-parser/package-files/paths.d.ts +80 -0
  274. package/dist/services/check-parser/package-files/paths.js +177 -0
  275. package/dist/services/check-parser/package-files/paths.js.map +1 -0
  276. package/dist/services/check-parser/package-files/resolver.d.ts +70 -0
  277. package/dist/services/check-parser/package-files/resolver.js +290 -0
  278. package/dist/services/check-parser/package-files/resolver.js.map +1 -0
  279. package/dist/services/check-parser/package-files/source-file.d.ts +15 -0
  280. package/dist/services/check-parser/package-files/source-file.js +54 -0
  281. package/dist/services/check-parser/package-files/source-file.js.map +1 -0
  282. package/dist/services/check-parser/package-files/tsconfig-json-file.d.ts +68 -0
  283. package/dist/services/check-parser/package-files/tsconfig-json-file.js +127 -0
  284. package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -0
  285. package/dist/services/check-parser/parser.d.ts +32 -0
  286. package/dist/services/check-parser/parser.js +313 -0
  287. package/dist/services/check-parser/parser.js.map +1 -0
  288. package/dist/services/checkly-config-loader.d.ts +72 -0
  289. package/dist/services/checkly-config-loader.js +103 -0
  290. package/dist/services/checkly-config-loader.js.map +1 -0
  291. package/dist/services/config.d.ts +28 -0
  292. package/dist/services/config.js +99 -0
  293. package/dist/services/config.js.map +1 -0
  294. package/dist/services/project-parser.d.ts +21 -0
  295. package/dist/services/project-parser.js +192 -0
  296. package/dist/services/project-parser.js.map +1 -0
  297. package/dist/services/snapshot-service.d.ts +13 -0
  298. package/dist/services/snapshot-service.js +85 -0
  299. package/dist/services/snapshot-service.js.map +1 -0
  300. package/dist/services/socket-client.d.ts +4 -0
  301. package/dist/services/socket-client.js +88 -0
  302. package/dist/services/socket-client.js.map +1 -0
  303. package/dist/services/test-filters.d.ts +3 -0
  304. package/dist/services/test-filters.js +27 -0
  305. package/dist/services/test-filters.js.map +1 -0
  306. package/dist/services/test-runner.d.ts +24 -0
  307. package/dist/services/test-runner.js +91 -0
  308. package/dist/services/test-runner.js.map +1 -0
  309. package/dist/services/trigger-runner.d.ts +29 -0
  310. package/dist/services/trigger-runner.js +59 -0
  311. package/dist/services/trigger-runner.js.map +1 -0
  312. package/dist/services/util.d.ts +32 -0
  313. package/dist/services/util.js +244 -0
  314. package/dist/services/util.js.map +1 -0
  315. package/dist/tsconfig.tsbuildinfo +1 -0
  316. package/oclif.manifest.json +635 -0
  317. package/package.json +151 -0
@@ -0,0 +1,155 @@
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.Session = exports.Project = void 0;
27
+ const api = __importStar(require("../rest/api"));
28
+ const construct_1 = require("./construct");
29
+ const validator_error_1 = require("./validator-error");
30
+ const _1 = require("./");
31
+ class Project extends construct_1.Construct {
32
+ /**
33
+ * Constructs the Project instance
34
+ *
35
+ * @param logicalId unique project identifier
36
+ * @param props project configuration properties
37
+ */
38
+ constructor(logicalId, props) {
39
+ super(Project.__checklyType, logicalId);
40
+ this.data = {
41
+ check: {},
42
+ 'check-group': {},
43
+ 'alert-channel': {},
44
+ 'alert-channel-subscription': {},
45
+ 'maintenance-window': {},
46
+ 'private-location': {},
47
+ 'private-location-check-assignment': {},
48
+ 'private-location-group-assignment': {},
49
+ dashboard: {},
50
+ };
51
+ if (!props.name) {
52
+ // TODO: Can we collect a list of validation errors and return them all at once? This might be better UX.
53
+ throw new validator_error_1.ValidationError('Please give your project a name in the "name" property.');
54
+ }
55
+ this.name = props.name;
56
+ this.repoUrl = props.repoUrl;
57
+ this.logicalId = logicalId;
58
+ }
59
+ addResource(type, logicalId, resource) {
60
+ if (this.data[type][logicalId]) {
61
+ throw new Error(`Resource of type '${type}' with logical id '${logicalId}' already exists.`);
62
+ }
63
+ this.data[type][logicalId] = resource;
64
+ }
65
+ synthesize(addTestOnly = true) {
66
+ const project = {
67
+ logicalId: this.logicalId,
68
+ name: this.name,
69
+ repoUrl: this.repoUrl,
70
+ };
71
+ return {
72
+ project,
73
+ resources: [
74
+ ...this.synthesizeRecord(this.data.check, addTestOnly),
75
+ ...this.synthesizeRecord(this.data['check-group']),
76
+ ...this.synthesizeRecord(this.data['alert-channel']),
77
+ ...this.synthesizeRecord(this.data['alert-channel-subscription']),
78
+ ...this.synthesizeRecord(this.data['maintenance-window']),
79
+ ...this.synthesizeRecord(this.data['private-location']),
80
+ ...this.synthesizeRecord(this.data['private-location-check-assignment']),
81
+ ...this.synthesizeRecord(this.data['private-location-group-assignment']),
82
+ ...this.synthesizeRecord(this.data.dashboard),
83
+ ],
84
+ };
85
+ }
86
+ getTestOnlyConstructs() {
87
+ return Object
88
+ .values(this.data)
89
+ .flatMap((record) => Object
90
+ .values(record)
91
+ .filter((construct) => construct instanceof _1.Check && construct.testOnly));
92
+ }
93
+ getHeartbeatLogicalIds() {
94
+ return Object
95
+ .values(this.data.check)
96
+ .filter((construct) => construct instanceof _1.HeartbeatCheck)
97
+ .map((construct) => construct.logicalId);
98
+ }
99
+ synthesizeRecord(record, addTestOnly = true) {
100
+ return Object.entries(record)
101
+ .filter(([, construct]) => construct instanceof _1.Check ? !construct.testOnly || addTestOnly : true)
102
+ .map(([key, construct]) => ({
103
+ logicalId: key,
104
+ type: construct.type,
105
+ physicalId: construct.physicalId,
106
+ member: construct.member,
107
+ payload: construct.synthesize(),
108
+ }));
109
+ }
110
+ }
111
+ exports.Project = Project;
112
+ Project.__checklyType = 'project';
113
+ class Session {
114
+ static registerConstruct(construct) {
115
+ if (Session.project) {
116
+ Session.project.addResource(construct.type, construct.logicalId, construct);
117
+ }
118
+ else if (Session.loadingChecklyConfigFile && construct.allowInChecklyConfig()) {
119
+ Session.checklyConfigFileConstructs.push(construct);
120
+ }
121
+ else {
122
+ throw new Error('Internal Error: Session is not properly configured for using a construct. Please contact Checkly support on support@checklyhq.com');
123
+ }
124
+ }
125
+ static validateCreateConstruct(construct) {
126
+ if (!/^[A-Za-z0-9_\-/#.]+$/.test(construct.logicalId)) {
127
+ throw new validator_error_1.ValidationError(`The "logicalId" can only include the following characters: [A-Za-z0-9_-/#.]. (logicalId='${construct.logicalId}')`);
128
+ }
129
+ if (construct.type === Project.__checklyType) {
130
+ // Creating the construct is allowed - We're creating the project.
131
+ }
132
+ else if (Session.project) {
133
+ // Creating the construct is allowed - We're in the process of parsing the project.
134
+ }
135
+ else if (Session.loadingChecklyConfigFile && construct.allowInChecklyConfig()) {
136
+ // Creating the construct is allowed - We're in the process of parsing the Checkly config.
137
+ }
138
+ else if (Session.loadingChecklyConfigFile) {
139
+ throw new Error(`Creating a ${construct.constructor.name} construct in the Checkly config file isn't supported.`);
140
+ }
141
+ else {
142
+ throw new Error(`Unable to create a construct '${construct.constructor.name}' outside a Checkly CLI project.`);
143
+ }
144
+ }
145
+ static async getPrivateLocations() {
146
+ if (!Session.privateLocations) {
147
+ const { data: privateLocations } = await api.privateLocations.getAll();
148
+ Session.privateLocations = privateLocations;
149
+ }
150
+ return Session.privateLocations;
151
+ }
152
+ }
153
+ exports.Session = Session;
154
+ Session.verifyRuntimeDependencies = true;
155
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/constructs/project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAElC,2CAAuC;AACvC,uDAAmD;AAGnD,yBAGW;AA2BX,MAAa,OAAQ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C,EAAE,CAAC;YACtD,MAAM,IAAI,iCAAe,CAAC,4FAA4F,SAAS,CAAC,SAAS,IAAI,CAAC,CAAA;QAChJ,CAAC;QAED,IAAI,SAAS,CAAC,IAAI,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC;YAC7C,kEAAkE;QACpE,CAAC;aAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAC3B,mFAAmF;QACrF,CAAC;aAAM,IAAI,OAAO,CAAC,wBAAwB,IAAI,SAAS,CAAC,oBAAoB,EAAE,EAAE,CAAC;YAChF,0FAA0F;QAC5F,CAAC;aAAM,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,cAAc,SAAS,CAAC,WAAW,CAAC,IAAI,wDAAwD,CAAC,CAAA;QACnH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,iCAAiC,SAAS,CAAC,WAAW,CAAC,IAAI,kCAAkC,CAAC,CAAA;QAChH,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,mBAAmB;QAC9B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC9B,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAA;YACtE,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QAC7C,CAAC;QACD,OAAO,OAAO,CAAC,gBAAgB,CAAA;IACjC,CAAC;;AAhDH,0BAiDC;AAxCQ,iCAAyB,GAAG,IAAI,CAAA"}
@@ -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,50 @@
1
+ export type RetryStrategyType = 'LINEAR' | 'EXPONENTIAL' | 'FIXED' | 'NO_RETRIES';
2
+ export interface RetryStrategy {
3
+ type: RetryStrategyType;
4
+ /**
5
+ * The number of seconds to wait before the first retry attempt.
6
+ */
7
+ baseBackoffSeconds?: number;
8
+ /**
9
+ * The maximum number of attempts to retry the check. Value must be between 1 and 10.
10
+ */
11
+ maxRetries?: number;
12
+ /**
13
+ * The total amount of time to continue retrying the check (maximum 600 seconds).
14
+ */
15
+ maxDurationSeconds?: number;
16
+ /**
17
+ * Whether retries should be run in the same region as the initial check run.
18
+ */
19
+ sameRegion?: boolean;
20
+ }
21
+ export type RetryStrategyOptions = Pick<RetryStrategy, 'baseBackoffSeconds' | 'maxRetries' | 'maxDurationSeconds' | 'sameRegion'>;
22
+ export declare class RetryStrategyBuilder {
23
+ private static readonly DEFAULT_BASE_BACKOFF_SECONDS;
24
+ private static readonly DEFAULT_MAX_RETRIES;
25
+ private static readonly DEFAULT_MAX_DURATION_SECONDS;
26
+ private static readonly DEFAULT_SAME_REGION;
27
+ /**
28
+ * Each retry is run with the same backoff between attempts.
29
+ */
30
+ static fixedStrategy(options?: RetryStrategyOptions): RetryStrategy;
31
+ /**
32
+ * The delay between retries increases linearly
33
+ *
34
+ * The delay between retries is calculated using `baseBackoffSeconds * attempt`.
35
+ * For example, retries will be run with a backoff of 10s, 20s, 30s, and so on.
36
+ */
37
+ static linearStrategy(options?: RetryStrategyOptions): RetryStrategy;
38
+ /**
39
+ * The delay between retries increases exponentially
40
+ *
41
+ * The delay between retries is calculated using `baseBackoffSeconds ^ attempt`.
42
+ * For example, retries will be run with a backoff of 10s, 100s, 1000s, and so on.
43
+ */
44
+ static exponentialStrategy(options?: RetryStrategyOptions): RetryStrategy;
45
+ /**
46
+ * No retries are performed.
47
+ */
48
+ static noRetries(): RetryStrategy;
49
+ private static retryStrategy;
50
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryStrategyBuilder = void 0;
4
+ class RetryStrategyBuilder {
5
+ /**
6
+ * Each retry is run with the same backoff between attempts.
7
+ */
8
+ static fixedStrategy(options) {
9
+ return RetryStrategyBuilder.retryStrategy('FIXED', options);
10
+ }
11
+ /**
12
+ * The delay between retries increases linearly
13
+ *
14
+ * The delay between retries is calculated using `baseBackoffSeconds * attempt`.
15
+ * For example, retries will be run with a backoff of 10s, 20s, 30s, and so on.
16
+ */
17
+ static linearStrategy(options) {
18
+ return RetryStrategyBuilder.retryStrategy('LINEAR', options);
19
+ }
20
+ /**
21
+ * The delay between retries increases exponentially
22
+ *
23
+ * The delay between retries is calculated using `baseBackoffSeconds ^ attempt`.
24
+ * For example, retries will be run with a backoff of 10s, 100s, 1000s, and so on.
25
+ */
26
+ static exponentialStrategy(options) {
27
+ return RetryStrategyBuilder.retryStrategy('EXPONENTIAL', options);
28
+ }
29
+ /**
30
+ * No retries are performed.
31
+ */
32
+ static noRetries() {
33
+ return RetryStrategyBuilder.retryStrategy('NO_RETRIES');
34
+ }
35
+ static retryStrategy(type, options) {
36
+ var _a, _b, _c, _d;
37
+ return {
38
+ type,
39
+ baseBackoffSeconds: (_a = options === null || options === void 0 ? void 0 : options.baseBackoffSeconds) !== null && _a !== void 0 ? _a : RetryStrategyBuilder.DEFAULT_BASE_BACKOFF_SECONDS,
40
+ maxRetries: (_b = options === null || options === void 0 ? void 0 : options.maxRetries) !== null && _b !== void 0 ? _b : RetryStrategyBuilder.DEFAULT_MAX_RETRIES,
41
+ maxDurationSeconds: (_c = options === null || options === void 0 ? void 0 : options.maxDurationSeconds) !== null && _c !== void 0 ? _c : RetryStrategyBuilder.DEFAULT_MAX_DURATION_SECONDS,
42
+ sameRegion: (_d = options === null || options === void 0 ? void 0 : options.sameRegion) !== null && _d !== void 0 ? _d : RetryStrategyBuilder.DEFAULT_SAME_REGION,
43
+ };
44
+ }
45
+ }
46
+ exports.RetryStrategyBuilder = RetryStrategyBuilder;
47
+ RetryStrategyBuilder.DEFAULT_BASE_BACKOFF_SECONDS = 60;
48
+ RetryStrategyBuilder.DEFAULT_MAX_RETRIES = 2;
49
+ RetryStrategyBuilder.DEFAULT_MAX_DURATION_SECONDS = 60 * 10;
50
+ RetryStrategyBuilder.DEFAULT_SAME_REGION = true;
51
+ //# sourceMappingURL=retry-strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry-strategy.js","sourceRoot":"","sources":["../../src/constructs/retry-strategy.ts"],"names":[],"mappings":";;;AAwBA,MAAa,oBAAoB;IAM/B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAE,OAA8B;QAClD,OAAO,oBAAoB,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAE,OAA8B;QACnD,OAAO,oBAAoB,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC9D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAE,OAA8B;QACxD,OAAO,oBAAoB,CAAC,aAAa,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;IACnE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS;QACd,OAAO,oBAAoB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IACzD,CAAC;IAEO,MAAM,CAAC,aAAa,CAAE,IAAuB,EAAE,OAA8B;;QACnF,OAAO;YACL,IAAI;YACJ,kBAAkB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,kBAAkB,mCAAI,oBAAoB,CAAC,4BAA4B;YACpG,UAAU,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,oBAAoB,CAAC,mBAAmB;YAC3E,kBAAkB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,kBAAkB,mCAAI,oBAAoB,CAAC,4BAA4B;YACpG,UAAU,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,oBAAoB,CAAC,mBAAmB;SAC5E,CAAA;IACH,CAAC;;AAhDH,oDAiDC;AAhDyB,iDAA4B,GAAG,EAAE,CAAA;AACjC,wCAAmB,GAAG,CAAC,CAAA;AACvB,iDAA4B,GAAG,EAAE,GAAG,EAAE,CAAA;AACtC,wCAAmB,GAAG,IAAI,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { AlertChannel, AlertChannelProps } from './alert-channel';
2
+ export interface SlackAlertChannelProps extends AlertChannelProps {
3
+ url: URL | string;
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 | string;
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-reference/#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-reference/#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,32 @@
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
+ * The name of the alert channel.
9
+ */
10
+ name?: string;
11
+ }
12
+ /**
13
+ * Creates a SMS Alert Channel
14
+ *
15
+ * @remarks
16
+ *
17
+ * This class make use of the Alert Channel endpoints.
18
+ */
19
+ export declare class SmsAlertChannel extends AlertChannel {
20
+ phoneNumber: string;
21
+ name?: string;
22
+ /**
23
+ * Constructs the SMS Alert Channel instance
24
+ *
25
+ * @param logicalId unique project-scoped resource name identification
26
+ * @param props SMS alert channel configuration properties
27
+ *
28
+ * {@link https://checklyhq.com/docs/cli/constructs-reference/#smsalertchannel Read more in the docs}
29
+ */
30
+ constructor(logicalId: string, props: SmsAlertChannelProps);
31
+ synthesize(): any;
32
+ }
@@ -0,0 +1,40 @@
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-reference/#smsalertchannel Read more in the docs}
21
+ */
22
+ constructor(logicalId, props) {
23
+ super(logicalId, props);
24
+ this.phoneNumber = props.phoneNumber;
25
+ this.name = props.name;
26
+ project_1.Session.registerConstruct(this);
27
+ }
28
+ synthesize() {
29
+ return {
30
+ ...super.synthesize(),
31
+ type: 'SMS',
32
+ config: {
33
+ number: this.phoneNumber,
34
+ name: this.name,
35
+ },
36
+ };
37
+ }
38
+ }
39
+ exports.SmsAlertChannel = SmsAlertChannel;
40
+ //# 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;AAanC;;;;;;GAMG;AACH,MAAa,eAAgB,SAAQ,4BAAY;IAG/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,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,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;gBACxB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;SACF,CAAA;IACH,CAAC;CACF;AA5BD,0CA4BC"}
@@ -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,67 @@
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 | string;
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
+ * An optional value to use as the
35
+ * {@link https://www.checklyhq.com/docs/alerting-and-retries/webhooks/#webhook-secrets secret for the webhook}.
36
+ *
37
+ * You may specify any value that meets your security criteria.
38
+ */
39
+ webhookSecret?: string;
40
+ }
41
+ /**
42
+ * Creates an Webhook Alert Channel
43
+ *
44
+ * @remarks
45
+ *
46
+ * This class make use of the Alert Channel endpoints.
47
+ */
48
+ export declare class WebhookAlertChannel extends AlertChannel {
49
+ name: string;
50
+ webhookType?: string;
51
+ url: URL | string;
52
+ template?: string;
53
+ method?: HttpRequestMethod;
54
+ headers?: Array<HttpHeader>;
55
+ queryParameters?: Array<QueryParam>;
56
+ webhookSecret?: string;
57
+ /**
58
+ * Constructs the Webhook Alert Channel instance
59
+ *
60
+ * @param logicalId unique project-scoped resource name identification
61
+ * @param props Webhook alert channel configuration properties
62
+ *
63
+ * {@link https://checklyhq.com/docs/cli/constructs-reference/#webhookalertchannel Read more in the docs}
64
+ */
65
+ constructor(logicalId: string, props: WebhookAlertChannelProps);
66
+ synthesize(): any;
67
+ }
@@ -0,0 +1,52 @@
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-reference/#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
+ this.webhookSecret = props.webhookSecret;
32
+ project_1.Session.registerConstruct(this);
33
+ }
34
+ synthesize() {
35
+ return {
36
+ ...super.synthesize(),
37
+ type: 'WEBHOOK',
38
+ config: {
39
+ name: this.name,
40
+ webhookType: this.webhookType,
41
+ url: this.url,
42
+ template: this.template,
43
+ method: this.method,
44
+ headers: this.headers,
45
+ queryParameters: this.queryParameters,
46
+ webhookSecret: this.webhookSecret,
47
+ },
48
+ };
49
+ }
50
+ }
51
+ exports.WebhookAlertChannel = WebhookAlertChannel;
52
+ //# 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;AAuCnC;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,4BAAY;IASnD;;;;;;;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,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAA;QACxC,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;gBACrC,aAAa,EAAE,IAAI,CAAC,aAAa;aAClC;SACF,CAAA;IACH,CAAC;CACF;AA9CD,kDA8CC"}
@@ -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,7 @@
1
+ import { Command, Help } from '@oclif/core';
2
+ import { BaseCommandClass } from '../commands/baseCommand';
3
+ import { Topic } from '@oclif/core/lib/interfaces';
4
+ export default class ChecklyHelpClass extends Help {
5
+ protected formatAllCommands(commands: Array<BaseCommandClass | Command.Loadable | Command.Cached>, topics: Array<Topic>): string;
6
+ showRootHelp(): Promise<void>;
7
+ }