checkly 5.3.1 → 5.4.0-prerelease-6249ef2

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 (443) hide show
  1. package/dist/auth/index.js +125 -132
  2. package/dist/auth/index.js.map +1 -1
  3. package/dist/commands/authCommand.js +1 -1
  4. package/dist/commands/authCommand.js.map +1 -1
  5. package/dist/commands/baseCommand.d.ts +2 -0
  6. package/dist/commands/baseCommand.js +7 -9
  7. package/dist/commands/baseCommand.js.map +1 -1
  8. package/dist/commands/deploy.js +55 -57
  9. package/dist/commands/deploy.js.map +1 -1
  10. package/dist/commands/destroy.js +15 -16
  11. package/dist/commands/destroy.js.map +1 -1
  12. package/dist/commands/env/add.js +28 -29
  13. package/dist/commands/env/add.js.map +1 -1
  14. package/dist/commands/env/ls.js +2 -2
  15. package/dist/commands/env/ls.js.map +1 -1
  16. package/dist/commands/env/pull.js +17 -17
  17. package/dist/commands/env/pull.js.map +1 -1
  18. package/dist/commands/env/rm.js +17 -18
  19. package/dist/commands/env/rm.js.map +1 -1
  20. package/dist/commands/env/update.js +29 -30
  21. package/dist/commands/env/update.js.map +1 -1
  22. package/dist/commands/help.js +2 -2
  23. package/dist/commands/help.js.map +1 -1
  24. package/dist/commands/import/apply.d.ts +14 -0
  25. package/dist/commands/import/apply.js +157 -0
  26. package/dist/commands/import/apply.js.map +1 -0
  27. package/dist/commands/import/cancel.d.ts +11 -0
  28. package/dist/commands/import/cancel.js +119 -0
  29. package/dist/commands/import/cancel.js.map +1 -0
  30. package/dist/commands/import/commit.d.ts +14 -0
  31. package/dist/commands/import/commit.js +141 -0
  32. package/dist/commands/import/commit.js.map +1 -0
  33. package/dist/commands/import/plan.d.ts +20 -0
  34. package/dist/commands/import/plan.js +1237 -0
  35. package/dist/commands/import/plan.js.map +1 -0
  36. package/dist/commands/login.js +38 -48
  37. package/dist/commands/login.js.map +1 -1
  38. package/dist/commands/logout.js +9 -9
  39. package/dist/commands/logout.js.map +1 -1
  40. package/dist/commands/runtimes.js +2 -2
  41. package/dist/commands/runtimes.js.map +1 -1
  42. package/dist/commands/switch.js +9 -9
  43. package/dist/commands/switch.js.map +1 -1
  44. package/dist/commands/sync-playwright.js +7 -7
  45. package/dist/commands/sync-playwright.js.map +1 -1
  46. package/dist/commands/test.js +107 -111
  47. package/dist/commands/test.js.map +1 -1
  48. package/dist/commands/trigger.js +74 -78
  49. package/dist/commands/trigger.js.map +1 -1
  50. package/dist/commands/whoami.js +2 -2
  51. package/dist/commands/whoami.js.map +1 -1
  52. package/dist/constructs/alert-channel-codegen.d.ts +35 -0
  53. package/dist/constructs/alert-channel-codegen.js +98 -0
  54. package/dist/constructs/alert-channel-codegen.js.map +1 -0
  55. package/dist/constructs/alert-channel-subscription-codegen.d.ts +11 -0
  56. package/dist/constructs/alert-channel-subscription-codegen.js +23 -0
  57. package/dist/constructs/alert-channel-subscription-codegen.js.map +1 -0
  58. package/dist/constructs/alert-channel-subscription.js +5 -1
  59. package/dist/constructs/alert-channel-subscription.js.map +1 -1
  60. package/dist/constructs/alert-channel.d.ts +17 -3
  61. package/dist/constructs/alert-channel.js +15 -4
  62. package/dist/constructs/alert-channel.js.map +1 -1
  63. package/dist/constructs/alert-escalation-policy-codegen.d.ts +4 -0
  64. package/dist/constructs/alert-escalation-policy-codegen.js +59 -0
  65. package/dist/constructs/alert-escalation-policy-codegen.js.map +1 -0
  66. package/dist/constructs/alert-escalation-policy.js +8 -9
  67. package/dist/constructs/alert-escalation-policy.js.map +1 -1
  68. package/dist/constructs/api-check-codegen.d.ts +21 -0
  69. package/dist/constructs/api-check-codegen.js +163 -0
  70. package/dist/constructs/api-check-codegen.js.map +1 -0
  71. package/dist/constructs/api-check.js +9 -0
  72. package/dist/constructs/api-check.js.map +1 -1
  73. package/dist/constructs/browser-check-codegen.d.ts +14 -0
  74. package/dist/constructs/browser-check-codegen.js +48 -0
  75. package/dist/constructs/browser-check-codegen.js.map +1 -0
  76. package/dist/constructs/browser-check.js +12 -6
  77. package/dist/constructs/browser-check.js.map +1 -1
  78. package/dist/constructs/check-codegen.d.ts +42 -0
  79. package/dist/constructs/check-codegen.js +208 -0
  80. package/dist/constructs/check-codegen.js.map +1 -0
  81. package/dist/constructs/check-group-codegen.d.ts +45 -0
  82. package/dist/constructs/check-group-codegen.js +266 -0
  83. package/dist/constructs/check-group-codegen.js.map +1 -0
  84. package/dist/constructs/check-group.d.ts +21 -8
  85. package/dist/constructs/check-group.js +65 -15
  86. package/dist/constructs/check-group.js.map +1 -1
  87. package/dist/constructs/check.d.ts +8 -8
  88. package/dist/constructs/check.js +31 -14
  89. package/dist/constructs/check.js.map +1 -1
  90. package/dist/constructs/construct-codegen.d.ts +39 -0
  91. package/dist/constructs/construct-codegen.js +100 -0
  92. package/dist/constructs/construct-codegen.js.map +1 -0
  93. package/dist/constructs/construct.js +5 -1
  94. package/dist/constructs/construct.js.map +1 -1
  95. package/dist/constructs/dashboard-codegen.d.ts +29 -0
  96. package/dist/constructs/dashboard-codegen.js +108 -0
  97. package/dist/constructs/dashboard-codegen.js.map +1 -0
  98. package/dist/constructs/dashboard.js +23 -1
  99. package/dist/constructs/dashboard.js.map +1 -1
  100. package/dist/constructs/email-alert-channel-codegen.d.ts +13 -0
  101. package/dist/constructs/email-alert-channel-codegen.js +38 -0
  102. package/dist/constructs/email-alert-channel-codegen.js.map +1 -0
  103. package/dist/constructs/email-alert-channel.js +1 -0
  104. package/dist/constructs/email-alert-channel.js.map +1 -1
  105. package/dist/constructs/frequency-codegen.d.ts +4 -0
  106. package/dist/constructs/frequency-codegen.js +49 -0
  107. package/dist/constructs/frequency-codegen.js.map +1 -0
  108. package/dist/constructs/frequency.js +17 -15
  109. package/dist/constructs/frequency.js.map +1 -1
  110. package/dist/constructs/heartbeat-check-codegen.d.ts +11 -0
  111. package/dist/constructs/heartbeat-check-codegen.js +33 -0
  112. package/dist/constructs/heartbeat-check-codegen.js.map +1 -0
  113. package/dist/constructs/heartbeat-check.js +1 -0
  114. package/dist/constructs/heartbeat-check.js.map +1 -1
  115. package/dist/constructs/incidentio-alert-channel-codegen.d.ts +13 -0
  116. package/dist/constructs/incidentio-alert-channel-codegen.js +89 -0
  117. package/dist/constructs/incidentio-alert-channel-codegen.js.map +1 -0
  118. package/dist/constructs/incidentio-alert-channel.d.ts +6 -0
  119. package/dist/constructs/incidentio-alert-channel.js +17 -16
  120. package/dist/constructs/incidentio-alert-channel.js.map +1 -1
  121. package/dist/constructs/internal/assertion-codegen.d.ts +4 -0
  122. package/dist/constructs/internal/assertion-codegen.js +141 -0
  123. package/dist/constructs/internal/assertion-codegen.js.map +1 -0
  124. package/dist/constructs/internal/assertion.js +7 -4
  125. package/dist/constructs/internal/assertion.js.map +1 -1
  126. package/dist/constructs/internal/codegen/codegen.d.ts +9 -0
  127. package/dist/constructs/internal/codegen/codegen.js +14 -0
  128. package/dist/constructs/internal/codegen/codegen.js.map +1 -0
  129. package/dist/constructs/internal/codegen/context.d.ts +62 -0
  130. package/dist/constructs/internal/codegen/context.js +445 -0
  131. package/dist/constructs/internal/codegen/context.js.map +1 -0
  132. package/dist/constructs/internal/codegen/index.d.ts +4 -0
  133. package/dist/constructs/internal/codegen/index.js +13 -0
  134. package/dist/constructs/internal/codegen/index.js.map +1 -0
  135. package/dist/constructs/internal/codegen/safety.d.ts +2 -0
  136. package/dist/constructs/internal/codegen/safety.js +7 -0
  137. package/dist/constructs/internal/codegen/safety.js.map +1 -0
  138. package/dist/constructs/internal/codegen/snippet.d.ts +12 -0
  139. package/dist/constructs/internal/codegen/snippet.js +48 -0
  140. package/dist/constructs/internal/codegen/snippet.js.map +1 -0
  141. package/dist/constructs/key-value-pair-codegen.d.ts +4 -0
  142. package/dist/constructs/key-value-pair-codegen.js +39 -0
  143. package/dist/constructs/key-value-pair-codegen.js.map +1 -0
  144. package/dist/constructs/maintenance-window-codegen.d.ts +14 -0
  145. package/dist/constructs/maintenance-window-codegen.js +57 -0
  146. package/dist/constructs/maintenance-window-codegen.js.map +1 -0
  147. package/dist/constructs/maintenance-window.js +8 -1
  148. package/dist/constructs/maintenance-window.js.map +1 -1
  149. package/dist/constructs/msteams-alert-channel-codegen.d.ts +13 -0
  150. package/dist/constructs/msteams-alert-channel-codegen.js +75 -0
  151. package/dist/constructs/msteams-alert-channel-codegen.js.map +1 -0
  152. package/dist/constructs/msteams-alert-channel.d.ts +6 -0
  153. package/dist/constructs/msteams-alert-channel.js +14 -13
  154. package/dist/constructs/msteams-alert-channel.js.map +1 -1
  155. package/dist/constructs/multi-step-check-codegen.d.ts +13 -0
  156. package/dist/constructs/multi-step-check-codegen.js +39 -0
  157. package/dist/constructs/multi-step-check-codegen.js.map +1 -0
  158. package/dist/constructs/multi-step-check.js +8 -8
  159. package/dist/constructs/multi-step-check.js.map +1 -1
  160. package/dist/constructs/opsgenie-alert-channel-codegen.d.ts +16 -0
  161. package/dist/constructs/opsgenie-alert-channel-codegen.js +41 -0
  162. package/dist/constructs/opsgenie-alert-channel-codegen.js.map +1 -0
  163. package/dist/constructs/opsgenie-alert-channel.js +4 -0
  164. package/dist/constructs/opsgenie-alert-channel.js.map +1 -1
  165. package/dist/constructs/pagerduty-alert-channel-codegen.d.ts +15 -0
  166. package/dist/constructs/pagerduty-alert-channel-codegen.js +53 -0
  167. package/dist/constructs/pagerduty-alert-channel-codegen.js.map +1 -0
  168. package/dist/constructs/pagerduty-alert-channel.js +3 -0
  169. package/dist/constructs/pagerduty-alert-channel.js.map +1 -1
  170. package/dist/constructs/phone-call-alert-channel-codegen.d.ts +14 -0
  171. package/dist/constructs/phone-call-alert-channel-codegen.js +46 -0
  172. package/dist/constructs/phone-call-alert-channel-codegen.js.map +1 -0
  173. package/dist/constructs/phone-call-alert-channel.js +2 -0
  174. package/dist/constructs/phone-call-alert-channel.js.map +1 -1
  175. package/dist/constructs/playwright-config-codegen.d.ts +4 -0
  176. package/dist/constructs/playwright-config-codegen.js +9 -0
  177. package/dist/constructs/playwright-config-codegen.js.map +1 -0
  178. package/dist/constructs/private-location-check-assignment-codegen.d.ts +10 -0
  179. package/dist/constructs/private-location-check-assignment-codegen.js +18 -0
  180. package/dist/constructs/private-location-check-assignment-codegen.js.map +1 -0
  181. package/dist/constructs/private-location-check-assignment.js +3 -1
  182. package/dist/constructs/private-location-check-assignment.js.map +1 -1
  183. package/dist/constructs/private-location-codegen.d.ts +15 -0
  184. package/dist/constructs/private-location-codegen.js +51 -0
  185. package/dist/constructs/private-location-codegen.js.map +1 -0
  186. package/dist/constructs/private-location-group-assignment-codegen.d.ts +10 -0
  187. package/dist/constructs/private-location-group-assignment-codegen.js +18 -0
  188. package/dist/constructs/private-location-group-assignment-codegen.js.map +1 -0
  189. package/dist/constructs/private-location-group-assignment.js +3 -1
  190. package/dist/constructs/private-location-group-assignment.js.map +1 -1
  191. package/dist/constructs/private-location.d.ts +8 -4
  192. package/dist/constructs/private-location.js +14 -4
  193. package/dist/constructs/private-location.js.map +1 -1
  194. package/dist/constructs/project.d.ts +10 -0
  195. package/dist/constructs/project.js +74 -18
  196. package/dist/constructs/project.js.map +1 -1
  197. package/dist/constructs/ref-codegen.d.ts +3 -0
  198. package/dist/constructs/ref-codegen.js +15 -0
  199. package/dist/constructs/ref-codegen.js.map +1 -0
  200. package/dist/constructs/ref.js +1 -0
  201. package/dist/constructs/ref.js.map +1 -1
  202. package/dist/constructs/retry-strategy-codegen.d.ts +4 -0
  203. package/dist/constructs/retry-strategy-codegen.js +69 -0
  204. package/dist/constructs/retry-strategy-codegen.js.map +1 -0
  205. package/dist/constructs/retry-strategy.js +8 -9
  206. package/dist/constructs/retry-strategy.js.map +1 -1
  207. package/dist/constructs/slack-alert-channel-codegen.d.ts +14 -0
  208. package/dist/constructs/slack-alert-channel-codegen.js +46 -0
  209. package/dist/constructs/slack-alert-channel-codegen.js.map +1 -0
  210. package/dist/constructs/slack-alert-channel.js +2 -0
  211. package/dist/constructs/slack-alert-channel.js.map +1 -1
  212. package/dist/constructs/sms-alert-channel-codegen.d.ts +14 -0
  213. package/dist/constructs/sms-alert-channel-codegen.js +46 -0
  214. package/dist/constructs/sms-alert-channel-codegen.js.map +1 -0
  215. package/dist/constructs/sms-alert-channel.js +2 -0
  216. package/dist/constructs/sms-alert-channel.js.map +1 -1
  217. package/dist/constructs/status-page-codegen.d.ts +23 -0
  218. package/dist/constructs/status-page-codegen.js +71 -0
  219. package/dist/constructs/status-page-codegen.js.map +1 -0
  220. package/dist/constructs/status-page-service-codegen.d.ts +12 -0
  221. package/dist/constructs/status-page-service-codegen.js +44 -0
  222. package/dist/constructs/status-page-service-codegen.js.map +1 -0
  223. package/dist/constructs/status-page-service.d.ts +10 -0
  224. package/dist/constructs/status-page-service.js +21 -2
  225. package/dist/constructs/status-page-service.js.map +1 -1
  226. package/dist/constructs/status-page.js +15 -9
  227. package/dist/constructs/status-page.js.map +1 -1
  228. package/dist/constructs/tcp-check-codegen.d.ts +15 -0
  229. package/dist/constructs/tcp-check-codegen.js +69 -0
  230. package/dist/constructs/tcp-check-codegen.js.map +1 -0
  231. package/dist/constructs/tcp-check.js +3 -0
  232. package/dist/constructs/tcp-check.js.map +1 -1
  233. package/dist/constructs/telegram-alert-channel-codegen.d.ts +13 -0
  234. package/dist/constructs/telegram-alert-channel-codegen.js +105 -0
  235. package/dist/constructs/telegram-alert-channel-codegen.js.map +1 -0
  236. package/dist/constructs/telegram-alert-channel.d.ts +6 -0
  237. package/dist/constructs/telegram-alert-channel.js +8 -4
  238. package/dist/constructs/telegram-alert-channel.js.map +1 -1
  239. package/dist/constructs/webhook-alert-channel-codegen.d.ts +34 -0
  240. package/dist/constructs/webhook-alert-channel-codegen.js +152 -0
  241. package/dist/constructs/webhook-alert-channel-codegen.js.map +1 -0
  242. package/dist/constructs/webhook-alert-channel.js +8 -0
  243. package/dist/constructs/webhook-alert-channel.js.map +1 -1
  244. package/dist/help/help-extension.js +1 -2
  245. package/dist/help/help-extension.js.map +1 -1
  246. package/dist/helpers/command-style.d.ts +18 -0
  247. package/dist/helpers/command-style.js +87 -0
  248. package/dist/helpers/command-style.js.map +1 -0
  249. package/dist/helpers/wrap.d.ts +6 -0
  250. package/dist/helpers/wrap.js +53 -0
  251. package/dist/helpers/wrap.js.map +1 -0
  252. package/dist/loader/index.d.ts +6 -0
  253. package/dist/loader/index.js +21 -0
  254. package/dist/loader/index.js.map +1 -0
  255. package/dist/loader/jiti.d.ts +27 -0
  256. package/dist/loader/jiti.js +63 -0
  257. package/dist/loader/jiti.js.map +1 -0
  258. package/dist/loader/loader.d.ts +29 -0
  259. package/dist/loader/loader.js +32 -0
  260. package/dist/loader/loader.js.map +1 -0
  261. package/dist/loader/match.d.ts +15 -0
  262. package/dist/loader/match.js +47 -0
  263. package/dist/loader/match.js.map +1 -0
  264. package/dist/loader/mixed.d.ts +7 -0
  265. package/dist/loader/mixed.js +39 -0
  266. package/dist/loader/mixed.js.map +1 -0
  267. package/dist/loader/native.d.ts +10 -0
  268. package/dist/loader/native.js +36 -0
  269. package/dist/loader/native.js.map +1 -0
  270. package/dist/loader/ts-node.d.ts +25 -0
  271. package/dist/loader/ts-node.js +85 -0
  272. package/dist/loader/ts-node.js.map +1 -0
  273. package/dist/playwright/playwright-config-loader.d.ts +1 -1
  274. package/dist/playwright/playwright-config-loader.js +7 -4
  275. package/dist/playwright/playwright-config-loader.js.map +1 -1
  276. package/dist/playwright/playwright-config-template.js +1 -0
  277. package/dist/playwright/playwright-config-template.js.map +1 -1
  278. package/dist/reporters/abstract-list.js +10 -6
  279. package/dist/reporters/abstract-list.js.map +1 -1
  280. package/dist/reporters/github.js +13 -6
  281. package/dist/reporters/github.js.map +1 -1
  282. package/dist/reporters/json.js +7 -4
  283. package/dist/reporters/json.js.map +1 -1
  284. package/dist/reporters/list.js +4 -6
  285. package/dist/reporters/list.js.map +1 -1
  286. package/dist/reporters/util.js +15 -20
  287. package/dist/reporters/util.js.map +1 -1
  288. package/dist/rest/accounts.js +1 -0
  289. package/dist/rest/accounts.js.map +1 -1
  290. package/dist/rest/api.js +3 -5
  291. package/dist/rest/api.js.map +1 -1
  292. package/dist/rest/assets.js +1 -0
  293. package/dist/rest/assets.js.map +1 -1
  294. package/dist/rest/checkly-storage.js +1 -0
  295. package/dist/rest/checkly-storage.js.map +1 -1
  296. package/dist/rest/environment-variables.js +1 -0
  297. package/dist/rest/environment-variables.js.map +1 -1
  298. package/dist/rest/heartbeat-checks.js +1 -0
  299. package/dist/rest/heartbeat-checks.js.map +1 -1
  300. package/dist/rest/locations.js +1 -0
  301. package/dist/rest/locations.js.map +1 -1
  302. package/dist/rest/private-locations.js +1 -0
  303. package/dist/rest/private-locations.js.map +1 -1
  304. package/dist/rest/projects.d.ts +69 -1
  305. package/dist/rest/projects.js +76 -4
  306. package/dist/rest/projects.js.map +1 -1
  307. package/dist/rest/runtimes.js +1 -0
  308. package/dist/rest/runtimes.js.map +1 -1
  309. package/dist/rest/test-sessions.js +1 -0
  310. package/dist/rest/test-sessions.js.map +1 -1
  311. package/dist/rest/users.js +1 -0
  312. package/dist/rest/users.js.map +1 -1
  313. package/dist/services/abstract-check-runner.js +10 -0
  314. package/dist/services/abstract-check-runner.js.map +1 -1
  315. package/dist/services/check-parser/collector.js +6 -4
  316. package/dist/services/check-parser/collector.js.map +1 -1
  317. package/dist/services/check-parser/errors.js +4 -0
  318. package/dist/services/check-parser/errors.js.map +1 -1
  319. package/dist/services/check-parser/package-files/extension.js +2 -0
  320. package/dist/services/check-parser/package-files/extension.js.map +1 -1
  321. package/dist/services/check-parser/package-files/jsconfig-json-file.js +5 -22
  322. package/dist/services/check-parser/package-files/jsconfig-json-file.js.map +1 -1
  323. package/dist/services/check-parser/package-files/json-source-file.d.ts +1 -1
  324. package/dist/services/check-parser/package-files/json-source-file.js +5 -17
  325. package/dist/services/check-parser/package-files/json-source-file.js.map +1 -1
  326. package/dist/services/check-parser/package-files/loader.js +2 -1
  327. package/dist/services/check-parser/package-files/loader.js.map +1 -1
  328. package/dist/services/check-parser/package-files/lookup.js +3 -17
  329. package/dist/services/check-parser/package-files/lookup.js.map +1 -1
  330. package/dist/services/check-parser/package-files/package-json-file.d.ts +14 -1
  331. package/dist/services/check-parser/package-files/package-json-file.js +87 -19
  332. package/dist/services/check-parser/package-files/package-json-file.js.map +1 -1
  333. package/dist/services/check-parser/package-files/package-manager.d.ts +91 -0
  334. package/dist/services/check-parser/package-files/package-manager.js +321 -0
  335. package/dist/services/check-parser/package-files/package-manager.js.map +1 -0
  336. package/dist/services/check-parser/package-files/paths.js +39 -0
  337. package/dist/services/check-parser/package-files/paths.js.map +1 -1
  338. package/dist/services/check-parser/package-files/resolver.d.ts +6 -3
  339. package/dist/services/check-parser/package-files/resolver.js +58 -50
  340. package/dist/services/check-parser/package-files/resolver.js.map +1 -1
  341. package/dist/services/check-parser/package-files/source-file.d.ts +1 -1
  342. package/dist/services/check-parser/package-files/source-file.js +8 -17
  343. package/dist/services/check-parser/package-files/source-file.js.map +1 -1
  344. package/dist/services/check-parser/package-files/tsconfig-json-file.js +16 -27
  345. package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -1
  346. package/dist/services/check-parser/parser.js +18 -11
  347. package/dist/services/check-parser/parser.js.map +1 -1
  348. package/dist/services/checkly-config-codegen.d.ts +4 -0
  349. package/dist/services/checkly-config-codegen.js +196 -0
  350. package/dist/services/checkly-config-codegen.js.map +1 -0
  351. package/dist/services/checkly-config-loader.d.ts +6 -2
  352. package/dist/services/checkly-config-loader.js +27 -12
  353. package/dist/services/checkly-config-loader.js.map +1 -1
  354. package/dist/services/config.js +5 -6
  355. package/dist/services/config.js.map +1 -1
  356. package/dist/services/project-parser.js +5 -12
  357. package/dist/services/project-parser.js.map +1 -1
  358. package/dist/services/snapshot-service.js +2 -2
  359. package/dist/services/snapshot-service.js.map +1 -1
  360. package/dist/services/test-filters.js +1 -1
  361. package/dist/services/test-filters.js.map +1 -1
  362. package/dist/services/test-runner.js +12 -5
  363. package/dist/services/test-runner.js.map +1 -1
  364. package/dist/services/trigger-runner.js +12 -5
  365. package/dist/services/trigger-runner.js.map +1 -1
  366. package/dist/services/util.d.ts +0 -1
  367. package/dist/services/util.js +12 -107
  368. package/dist/services/util.js.map +1 -1
  369. package/dist/sourcegen/args.d.ts +7 -0
  370. package/dist/sourcegen/args.js +26 -0
  371. package/dist/sourcegen/args.js.map +1 -0
  372. package/dist/sourcegen/argsbuilder.d.ts +22 -0
  373. package/dist/sourcegen/argsbuilder.js +111 -0
  374. package/dist/sourcegen/argsbuilder.js.map +1 -0
  375. package/dist/sourcegen/array.d.ts +8 -0
  376. package/dist/sourcegen/array.js +32 -0
  377. package/dist/sourcegen/array.js.map +1 -0
  378. package/dist/sourcegen/arraybuilder.d.ts +21 -0
  379. package/dist/sourcegen/arraybuilder.js +109 -0
  380. package/dist/sourcegen/arraybuilder.js.map +1 -0
  381. package/dist/sourcegen/boolean.d.ts +7 -0
  382. package/dist/sourcegen/boolean.js +22 -0
  383. package/dist/sourcegen/boolean.js.map +1 -0
  384. package/dist/sourcegen/case.d.ts +9 -0
  385. package/dist/sourcegen/case.js +107 -0
  386. package/dist/sourcegen/case.js.map +1 -0
  387. package/dist/sourcegen/comment.d.ts +32 -0
  388. package/dist/sourcegen/comment.js +124 -0
  389. package/dist/sourcegen/comment.js.map +1 -0
  390. package/dist/sourcegen/decl.d.ts +43 -0
  391. package/dist/sourcegen/decl.js +95 -0
  392. package/dist/sourcegen/decl.js.map +1 -0
  393. package/dist/sourcegen/declbuilder.d.ts +14 -0
  394. package/dist/sourcegen/declbuilder.js +39 -0
  395. package/dist/sourcegen/declbuilder.js.map +1 -0
  396. package/dist/sourcegen/expr.d.ts +39 -0
  397. package/dist/sourcegen/expr.js +86 -0
  398. package/dist/sourcegen/expr.js.map +1 -0
  399. package/dist/sourcegen/exprbuilder.d.ts +13 -0
  400. package/dist/sourcegen/exprbuilder.js +54 -0
  401. package/dist/sourcegen/exprbuilder.js.map +1 -0
  402. package/dist/sourcegen/identifier.d.ts +12 -0
  403. package/dist/sourcegen/identifier.js +27 -0
  404. package/dist/sourcegen/identifier.js.map +1 -0
  405. package/dist/sourcegen/index.d.ts +22 -0
  406. package/dist/sourcegen/index.js +76 -0
  407. package/dist/sourcegen/index.js.map +1 -0
  408. package/dist/sourcegen/null.d.ts +5 -0
  409. package/dist/sourcegen/null.js +11 -0
  410. package/dist/sourcegen/null.js.map +1 -0
  411. package/dist/sourcegen/number.d.ts +7 -0
  412. package/dist/sourcegen/number.js +22 -0
  413. package/dist/sourcegen/number.js.map +1 -0
  414. package/dist/sourcegen/object.d.ts +28 -0
  415. package/dist/sourcegen/object.js +88 -0
  416. package/dist/sourcegen/object.js.map +1 -0
  417. package/dist/sourcegen/objectbuilder.d.ts +25 -0
  418. package/dist/sourcegen/objectbuilder.js +127 -0
  419. package/dist/sourcegen/objectbuilder.js.map +1 -0
  420. package/dist/sourcegen/output.d.ts +14 -0
  421. package/dist/sourcegen/output.js +85 -0
  422. package/dist/sourcegen/output.js.map +1 -0
  423. package/dist/sourcegen/program.d.ts +55 -0
  424. package/dist/sourcegen/program.js +284 -0
  425. package/dist/sourcegen/program.js.map +1 -0
  426. package/dist/sourcegen/string.d.ts +8 -0
  427. package/dist/sourcegen/string.js +28 -0
  428. package/dist/sourcegen/string.js.map +1 -0
  429. package/dist/sourcegen/undefined.d.ts +5 -0
  430. package/dist/sourcegen/undefined.js +11 -0
  431. package/dist/sourcegen/undefined.js.map +1 -0
  432. package/dist/sourcegen/unknown.d.ts +2 -0
  433. package/dist/sourcegen/unknown.js +40 -0
  434. package/dist/sourcegen/unknown.js.map +1 -0
  435. package/dist/sourcegen/value.d.ts +4 -0
  436. package/dist/sourcegen/value.js +7 -0
  437. package/dist/sourcegen/value.js.map +1 -0
  438. package/dist/tsconfig.tsbuildinfo +1 -1
  439. package/dist/util/index.d.ts +9 -0
  440. package/dist/util/index.js +27 -0
  441. package/dist/util/index.js.map +1 -0
  442. package/oclif.manifest.json +173 -1
  443. package/package.json +14 -37
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PhoneCallAlertChannelCodegen = void 0;
4
+ const codegen_1 = require("./internal/codegen");
5
+ const sourcegen_1 = require("../sourcegen");
6
+ const alert_channel_codegen_1 = require("./alert-channel-codegen");
7
+ const construct = 'PhoneCallAlertChannel';
8
+ class PhoneCallAlertChannelCodegen extends codegen_1.Codegen {
9
+ describe(resource) {
10
+ if (resource.config.name) {
11
+ return `Phone Call Alert Channel: ${resource.config.name}`;
12
+ }
13
+ return `Phone Call Alert Channel: ${resource.config.number}`;
14
+ }
15
+ prepare(logicalId, resource, context) {
16
+ const { name, number } = resource.config;
17
+ const last4Digits = number.slice(-4);
18
+ const fallbackName = `phone-call-${last4Digits}`;
19
+ const filename = context.filePath('resources/alert-channels/phone-call', name || fallbackName, {
20
+ unique: true,
21
+ });
22
+ context.registerAlertChannel(resource.id, name ? `${name} phone call` : fallbackName, this.program.generatedConstructFile(filename.fullPath));
23
+ }
24
+ gencode(logicalId, resource, context) {
25
+ const { id, file } = context.lookupAlertChannel(resource.id);
26
+ file.namedImport(construct, 'checkly/constructs');
27
+ const { config } = resource;
28
+ file.section((0, sourcegen_1.decl)(id, builder => {
29
+ builder.variable((0, sourcegen_1.expr)((0, sourcegen_1.ident)(construct), builder => {
30
+ builder.new(builder => {
31
+ builder.string(logicalId);
32
+ builder.object(builder => {
33
+ if (config.name) {
34
+ builder.string('name', config.name);
35
+ }
36
+ builder.string('phoneNumber', config.number);
37
+ (0, alert_channel_codegen_1.buildAlertChannelProps)(builder, resource);
38
+ });
39
+ });
40
+ }));
41
+ builder.export();
42
+ }));
43
+ }
44
+ }
45
+ exports.PhoneCallAlertChannelCodegen = PhoneCallAlertChannelCodegen;
46
+ //# sourceMappingURL=phone-call-alert-channel-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-call-alert-channel-codegen.js","sourceRoot":"","sources":["../../src/constructs/phone-call-alert-channel-codegen.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AACrD,4CAAgD;AAChD,m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AAC,EAAE,EAAE,OAAO,CAAC,EAAE;YAC9B,OAAO,CAAC,QAAQ,CAAC,IAAA,gBAAI,EAAC,IAAA,iBAAK,EAAC,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE;gBAChD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;oBACpB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;oBACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;wBACvB,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;4BAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;wBACrC,CAAC;wBAED,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;wBAE5C,IAAA,8CAAsB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;oBAC3C,CAAC,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAC,CAAA;YAEH,OAAO,CAAC,MAAM,EAAE,CAAA;QAClB,CAAC,CAAC,CAAC,CAAA;IACL,CAAC;CACF;AApDD,oEAoDC"}
@@ -11,6 +11,8 @@ const project_1 = require("./project");
11
11
  * This class make use of the Alert Channel endpoints.
12
12
  */
13
13
  class PhoneCallAlertChannel extends alert_channel_1.AlertChannel {
14
+ phoneNumber;
15
+ name;
14
16
  /**
15
17
  * Constructs the Phone Call Alert Channel instance
16
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"phone-call-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/phone-call-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AAanC;;;;;;GAMG;AACH,MAAa,qBAAsB,SAAQ,4BAAY;IAGrD;;;;;;;;;OASG;IACH,YAAa,SAAiB,EAAE,KAAiC;QAC/D,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,MAAM;YACZ,MAAM,EAAE;gBACN,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;SACF,CAAA;IACH,CAAC;CACF;AA9BD,sDA8BC"}
1
+ {"version":3,"file":"phone-call-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/phone-call-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AAanC;;;;;;GAMG;AACH,MAAa,qBAAsB,SAAQ,4BAAY;IACrD,WAAW,CAAQ;IACnB,IAAI,CAAS;IACb;;;;;;;;;OASG;IACH,YAAa,SAAiB,EAAE,KAAiC;QAC/D,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,MAAM;YACZ,MAAM,EAAE;gBACN,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;SACF,CAAA;IACH,CAAC;CACF;AA9BD,sDA8BC"}
@@ -0,0 +1,4 @@
1
+ import { Value } from '../sourcegen';
2
+ import { PlaywrightConfig } from './playwright-config';
3
+ export type PlaywrightConfigResource = PlaywrightConfig;
4
+ export declare function valueForPlaywrightConfig(config: PlaywrightConfigResource): Value;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.valueForPlaywrightConfig = void 0;
4
+ const sourcegen_1 = require("../sourcegen");
5
+ function valueForPlaywrightConfig(config) {
6
+ return (0, sourcegen_1.unknown)(config);
7
+ }
8
+ exports.valueForPlaywrightConfig = valueForPlaywrightConfig;
9
+ //# sourceMappingURL=playwright-config-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright-config-codegen.js","sourceRoot":"","sources":["../../src/constructs/playwright-config-codegen.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAK7C,SAAgB,wBAAwB,CAAE,MAAgC;IACxE,OAAO,IAAA,mBAAO,EAAC,MAAM,CAAC,CAAA;AACxB,CAAC;AAFD,4DAEC"}
@@ -0,0 +1,10 @@
1
+ import { Codegen, Context } from './internal/codegen';
2
+ export interface PrivateLocationCheckAssignmentResource {
3
+ privateLocationId: string;
4
+ checkId: string;
5
+ }
6
+ export declare class PrivateLocationCheckAssignmentCodegen extends Codegen<PrivateLocationCheckAssignmentResource> {
7
+ describe(resource: PrivateLocationCheckAssignmentResource): string;
8
+ prepare(logicalId: string, resource: PrivateLocationCheckAssignmentResource, context: Context): void;
9
+ gencode(logicalId: string, resource: PrivateLocationCheckAssignmentResource, context: Context): void;
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrivateLocationCheckAssignmentCodegen = void 0;
4
+ const codegen_1 = require("./internal/codegen");
5
+ class PrivateLocationCheckAssignmentCodegen extends codegen_1.Codegen {
6
+ describe(resource) {
7
+ return 'Private Location Check Assignment';
8
+ }
9
+ prepare(logicalId, resource, context) {
10
+ context.registerPrivateLocationCheckAssignment(resource.privateLocationId, resource.checkId);
11
+ }
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ gencode(logicalId, resource, context) {
14
+ // Nothing to generate for this resource.
15
+ }
16
+ }
17
+ exports.PrivateLocationCheckAssignmentCodegen = PrivateLocationCheckAssignmentCodegen;
18
+ //# sourceMappingURL=private-location-check-assignment-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-location-check-assignment-codegen.js","sourceRoot":"","sources":["../../src/constructs/private-location-check-assignment-codegen.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAOrD,MAAa,qCAAsC,SAAQ,iBAA+C;IACxG,QAAQ,CAAE,QAAgD;QACxD,OAAO,mCAAmC,CAAA;IAC5C,CAAC;IAED,OAAO,CAAE,SAAiB,EAAE,QAAgD,EAAE,OAAgB;QAC5F,OAAO,CAAC,sCAAsC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9F,CAAC;IAED,6DAA6D;IAC7D,OAAO,CAAE,SAAiB,EAAE,QAAgD,EAAE,OAAgB;QAC5F,yCAAyC;IAC3C,CAAC;CACF;AAbD,sFAaC"}
@@ -11,6 +11,9 @@ const project_1 = require("./project");
11
11
  * This class make use of the Private Location Assignment endpoints.
12
12
  */
13
13
  class PrivateLocationCheckAssignment extends construct_1.Construct {
14
+ privateLocationId;
15
+ checkId;
16
+ static __checklyType = 'private-location-check-assignment';
14
17
  /**
15
18
  * Constructs the Private Location Assignment instance
16
19
  *
@@ -31,5 +34,4 @@ class PrivateLocationCheckAssignment extends construct_1.Construct {
31
34
  }
32
35
  }
33
36
  exports.PrivateLocationCheckAssignment = PrivateLocationCheckAssignment;
34
- PrivateLocationCheckAssignment.__checklyType = 'private-location-check-assignment';
35
37
  //# sourceMappingURL=private-location-check-assignment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"private-location-check-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-check-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAM3D;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC;AArBiB,4CAAa,GAAG,mCAAmC,CAAA"}
1
+ {"version":3,"file":"private-location-check-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-check-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAC3D,iBAAiB,CAAK;IACtB,OAAO,CAAM;IAEb,MAAM,CAAU,aAAa,GAAG,mCAAmC,CAAA;IAEnE;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC"}
@@ -0,0 +1,15 @@
1
+ import { Codegen, Context } from './internal/codegen';
2
+ import { GeneratedFile, Value } from '../sourcegen';
3
+ export interface PrivateLocationResource {
4
+ id: string;
5
+ name: string;
6
+ slugName: string;
7
+ icon?: string;
8
+ proxyUrl?: string;
9
+ }
10
+ export declare function valueForPrivateLocationFromId(genfile: GeneratedFile, physicalId: string): Value;
11
+ export declare class PrivateLocationCodegen extends Codegen<PrivateLocationResource> {
12
+ describe(resource: PrivateLocationResource): string;
13
+ prepare(logicalId: string, resource: PrivateLocationResource, context: Context): void;
14
+ gencode(logicalId: string, resource: PrivateLocationResource, context: Context): void;
15
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrivateLocationCodegen = exports.valueForPrivateLocationFromId = void 0;
4
+ const codegen_1 = require("./internal/codegen");
5
+ const sourcegen_1 = require("../sourcegen");
6
+ const construct = 'PrivateLocation';
7
+ function valueForPrivateLocationFromId(genfile, physicalId) {
8
+ genfile.namedImport(construct, 'checkly/constructs');
9
+ return (0, sourcegen_1.expr)((0, sourcegen_1.ident)(construct), builder => {
10
+ builder.member((0, sourcegen_1.ident)('fromId'));
11
+ builder.call(builder => {
12
+ builder.string(physicalId);
13
+ });
14
+ });
15
+ }
16
+ exports.valueForPrivateLocationFromId = valueForPrivateLocationFromId;
17
+ class PrivateLocationCodegen extends codegen_1.Codegen {
18
+ describe(resource) {
19
+ return `Private Location: ${resource.name}`;
20
+ }
21
+ prepare(logicalId, resource, context) {
22
+ const filePath = context.filePath('resources/private-locations', resource.slugName, {
23
+ unique: true,
24
+ });
25
+ context.registerPrivateLocation(resource.id, resource.name, this.program.generatedConstructFile(filePath.fullPath));
26
+ }
27
+ gencode(logicalId, resource, context) {
28
+ const { id, file } = context.lookupPrivateLocation(resource.id);
29
+ file.namedImport(construct, 'checkly/constructs');
30
+ file.section((0, sourcegen_1.decl)(id, builder => {
31
+ builder.variable((0, sourcegen_1.expr)((0, sourcegen_1.ident)(construct), builder => {
32
+ builder.new(builder => {
33
+ builder.string(logicalId);
34
+ builder.object(builder => {
35
+ builder.string('name', resource.name);
36
+ builder.string('slugName', resource.slugName);
37
+ if (resource.icon) {
38
+ builder.string('icon', resource.icon);
39
+ }
40
+ if (resource.proxyUrl) {
41
+ builder.string('proxyUrl', resource.proxyUrl);
42
+ }
43
+ });
44
+ });
45
+ }));
46
+ builder.export();
47
+ }));
48
+ }
49
+ }
50
+ exports.PrivateLocationCodegen = PrivateLocationCodegen;
51
+ //# sourceMappingURL=private-location-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-location-codegen.js","sourceRoot":"","sources":["../../src/constructs/private-location-codegen.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AACrD,4CAAsE;AAUtE,MAAM,SAAS,GAAG,iBAAiB,CAAA;AAEnC,SAAgB,6BAA6B,CAAE,OAAsB,EAAE,UAAkB;IACvF,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;IAEpD,OAAO,IAAA,gBAAI,EAAC,IAAA,iBAAK,EAAC,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE;QACtC,OAAO,CAAC,MAAM,CAAC,IAAA,iBAAK,EAAC,QAAQ,CAAC,CAAC,CAAA;QAC/B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACrB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AATD,sEASC;AAED,MAAa,sBAAuB,SAAQ,iBAAgC;IAC1E,QAAQ,CAAE,QAAiC;QACzC,OAAO,qBAAqB,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,CAAE,SAAiB,EAAE,QAAiC,EAAE,OAAgB;QAC7E,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,6BAA6B,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAClF,MAAM,EAAE,IAAI;SACb,CAAC,CAAA;QAEF,OAAO,CAAC,uBAAuB,CAC7B,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,IAAI,EAC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D,wDA4CC"}
@@ -0,0 +1,10 @@
1
+ import { Codegen, Context } from './internal/codegen';
2
+ export interface PrivateLocationGroupAssignmentResource {
3
+ privateLocationId: string;
4
+ groupId: number;
5
+ }
6
+ export declare class PrivateLocationGroupAssignmentCodegen extends Codegen<PrivateLocationGroupAssignmentResource> {
7
+ describe(resource: PrivateLocationGroupAssignmentResource): string;
8
+ prepare(logicalId: string, resource: PrivateLocationGroupAssignmentResource, context: Context): void;
9
+ gencode(logicalId: string, resource: PrivateLocationGroupAssignmentResource, context: Context): void;
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrivateLocationGroupAssignmentCodegen = void 0;
4
+ const codegen_1 = require("./internal/codegen");
5
+ class PrivateLocationGroupAssignmentCodegen extends codegen_1.Codegen {
6
+ describe(resource) {
7
+ return 'Private Location Group Assignment';
8
+ }
9
+ prepare(logicalId, resource, context) {
10
+ context.registerPrivateLocationGroupAssignment(resource.privateLocationId, resource.groupId);
11
+ }
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ gencode(logicalId, resource, context) {
14
+ // Nothing to generate for this resource.
15
+ }
16
+ }
17
+ exports.PrivateLocationGroupAssignmentCodegen = PrivateLocationGroupAssignmentCodegen;
18
+ //# sourceMappingURL=private-location-group-assignment-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-location-group-assignment-codegen.js","sourceRoot":"","sources":["../../src/constructs/private-location-group-assignment-codegen.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAOrD,MAAa,qCAAsC,SAAQ,iBAA+C;IACxG,QAAQ,CAAE,QAAgD;QACxD,OAAO,mCAAmC,CAAA;IAC5C,CAAC;IAED,OAAO,CAAE,SAAiB,EAAE,QAAgD,EAAE,OAAgB;QAC5F,OAAO,CAAC,sCAAsC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9F,CAAC;IAED,6DAA6D;IAC7D,OAAO,CAAE,SAAiB,EAAE,QAAgD,EAAE,OAAgB;QAC5F,yCAAyC;IAC3C,CAAC;CACF;AAbD,sFAaC"}
@@ -11,6 +11,9 @@ const project_1 = require("./project");
11
11
  * This class make use of the Private Location Group Assignment endpoints.
12
12
  */
13
13
  class PrivateLocationGroupAssignment extends construct_1.Construct {
14
+ privateLocationId;
15
+ groupId;
16
+ static __checklyType = 'private-location-group-assignment';
14
17
  /**
15
18
  * Constructs the Private Location GroupAssignment instance
16
19
  *
@@ -31,5 +34,4 @@ class PrivateLocationGroupAssignment extends construct_1.Construct {
31
34
  }
32
35
  }
33
36
  exports.PrivateLocationGroupAssignment = PrivateLocationGroupAssignment;
34
- PrivateLocationGroupAssignment.__checklyType = 'private-location-group-assignment';
35
37
  //# sourceMappingURL=private-location-group-assignment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"private-location-group-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-group-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAM3D;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC;AArBiB,4CAAa,GAAG,mCAAmC,CAAA"}
1
+ {"version":3,"file":"private-location-group-assignment.js","sourceRoot":"","sources":["../../src/constructs/private-location-group-assignment.ts"],"names":[],"mappings":";;;AACA,2CAAuC;AACvC,uCAAmC;AAOnC;;;;;;GAMG;AACH,MAAa,8BAA+B,SAAQ,qBAAS;IAC3D,iBAAiB,CAAK;IACtB,OAAO,CAAM;IAEb,MAAM,CAAU,aAAa,GAAG,mCAAmC,CAAA;IAEnE;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA0C;QACxE,KAAK,CAAC,8BAA8B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC9D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAA;QAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;;AAxBH,wEAyBC"}
@@ -1,5 +1,5 @@
1
1
  import { Construct } from './construct';
2
- export type PrivateLocationIcon = 'alert' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-small-down' | 'arrow-small-left' | 'arrow-small-right' | 'arrow-small-up' | 'arrow-up' | 'beaker' | 'bell' | 'bold' | 'book' | 'bookmark' | 'briefcase' | 'broadcast' | 'browser' | 'bug' | 'calendar' | 'check' | 'checklist' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-slash' | 'circuit-board' | 'clippy' | 'clock' | 'cloud-download' | 'cloud-upload' | 'code' | 'comment' | 'comment-discussion' | 'credit-card' | 'dash' | 'dashboard' | 'database' | 'desktop-download' | 'device-camera' | 'device-camera-video' | 'device-desktop' | 'device-mobile' | 'diff' | 'diff-added' | 'diff-ignored' | 'diff-modified' | 'diff-removed' | 'diff-renamed' | 'ellipses' | 'ellipsis' | 'eye' | 'file' | 'file-binary' | 'file-code' | 'file-directory' | 'file-media' | 'file-pdf' | 'file-submodule' | 'file-symlink-directory' | 'file-symlink-file' | 'file-text' | 'file-zip' | 'flame' | 'fold' | 'gear' | 'gift' | 'gist' | 'gist-secret' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-pull-request' | 'globe' | 'grabber' | 'graph' | 'heart' | 'history' | 'home' | 'horizontal-rule' | 'hubot' | 'inbox' | 'info' | 'issue-closed' | 'issue-opened' | 'issue-reopened' | 'italic' | 'jersey' | 'key' | 'keyboard' | 'law' | 'light-bulb' | 'link' | 'link-external' | 'list-ordered' | 'list-unordered' | 'location' | 'lock' | 'mail' | 'mail-read' | 'mail-reply' | 'markdown' | 'mark-github' | 'megaphone' | 'mention' | 'milestone' | 'mirror' | 'mortar-board' | 'mute' | 'no-newline' | 'octoface' | 'organization' | 'package' | 'paintcan' | 'pencil' | 'person' | 'pin' | 'plug' | 'plus' | 'plus-small' | 'primitive-dot' | 'primitive-square' | 'pulse' | 'question' | 'quote' | 'radio-tower' | 'reply' | 'repo' | 'repo-clone' | 'repo-force-push' | 'repo-forked' | 'repo-pull' | 'repo-push' | 'rocket' | 'rss' | 'ruby' | 'search' | 'server' | 'settings' | 'shield' | 'sign-in' | 'sign-out' | 'smiley' | 'squirrel' | 'star' | 'stop' | 'sync' | 'tag' | 'tasklist' | 'telescope' | 'terminal' | 'text-size' | 'three-bars' | 'thumbsdown' | 'thumbsup' | 'tools' | 'trashcan' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'unfold' | 'unmute' | 'unverified' | 'verified' | 'versions' | 'watch' | 'x' | 'zap';
2
+ export type PrivateLocationIcon = 'alert' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-small-down' | 'arrow-small-left' | 'arrow-small-right' | 'arrow-small-up' | 'arrow-up' | 'beaker' | 'bell' | 'bold' | 'book' | 'bookmark' | 'briefcase' | 'broadcast' | 'browser' | 'bug' | 'calendar' | 'check' | 'checklist' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-slash' | 'circuit-board' | 'clippy' | 'clock' | 'cloud-download' | 'cloud-upload' | 'code' | 'comment' | 'comment-discussion' | 'credit-card' | 'dash' | 'dashboard' | 'database' | 'desktop-download' | 'device-camera' | 'device-camera-video' | 'device-desktop' | 'device-mobile' | 'diff' | 'diff-added' | 'diff-ignored' | 'diff-modified' | 'diff-removed' | 'diff-renamed' | 'ellipses' | 'ellipsis' | 'eye' | 'file' | 'file-binary' | 'file-code' | 'file-directory' | 'file-media' | 'file-pdf' | 'file-submodule' | 'file-symlink-directory' | 'file-symlink-file' | 'file-text' | 'file-zip' | 'flame' | 'fold' | 'gear' | 'gift' | 'gist' | 'gist-secret' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-pull-request' | 'globe' | 'grabber' | 'graph' | 'heart' | 'history' | 'home' | 'horizontal-rule' | 'hubot' | 'inbox' | 'info' | 'issue-closed' | 'issue-opened' | 'issue-reopened' | 'italic' | 'jersey' | 'key' | 'keyboard' | 'law' | 'light-bulb' | 'link' | 'link-external' | 'list-ordered' | 'list-unordered' | 'location' | 'lock' | 'mail' | 'mail-read' | 'mail-reply' | 'markdown' | 'mark-github' | 'megaphone' | 'mention' | 'milestone' | 'mirror' | 'mortar-board' | 'mute' | 'no-newline' | 'octoface' | 'organization' | 'package' | 'paintcan' | 'pencil' | 'person' | 'pin' | 'plug' | 'plus' | 'plus-small' | 'primitive-dot' | 'primitive-square' | 'pulse' | 'question' | 'quote' | 'radio-tower' | 'reply' | 'repo' | 'repo-clone' | 'repo-force-push' | 'repo-forked' | 'repo-pull' | 'repo-push' | 'rocket' | 'rss' | 'ruby' | 'search' | 'server' | 'settings' | 'shield' | 'sign-in' | 'sign-out' | 'smiley' | 'squirrel' | 'star' | 'stop' | 'sync' | 'tag' | 'tasklist' | 'telescope' | 'terminal' | 'text-size' | 'three-bars' | 'thumbsdown' | 'thumbsup' | 'tools' | 'trashcan' | 'triangle-down' | 'triangle-left' | 'triangle-right' | 'triangle-up' | 'unfold' | 'unmute' | 'unverified' | 'verified' | 'versions' | 'watch' | 'x' | 'zap' | (string & Record<never, never>);
3
3
  export interface PrivateLocationProps {
4
4
  /**
5
5
  * The name assigned to the private location.
@@ -18,7 +18,12 @@ export interface PrivateLocationProps {
18
18
  */
19
19
  proxyUrl?: string;
20
20
  }
21
- declare class PrivateLocationWrapper extends Construct {
21
+ /**
22
+ * Creates a reference to an existing Private Location.
23
+ *
24
+ * References link existing resources to a project without managing them.
25
+ */
26
+ export declare class PrivateLocationRef extends Construct {
22
27
  constructor(logicalId: string, physicalId: string | number);
23
28
  synthesize(): null;
24
29
  }
@@ -44,8 +49,7 @@ export declare class PrivateLocation extends Construct {
44
49
  * @param props private location configuration properties
45
50
  */
46
51
  constructor(logicalId: string, props: PrivateLocationProps);
47
- static fromId(id: string): PrivateLocationWrapper;
52
+ static fromId(id: string): PrivateLocationRef;
48
53
  allowInChecklyConfig(): boolean;
49
54
  synthesize(): any | null;
50
55
  }
51
- export {};
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrivateLocation = void 0;
3
+ exports.PrivateLocation = exports.PrivateLocationRef = void 0;
4
4
  const construct_1 = require("./construct");
5
5
  const project_1 = require("./project");
6
6
  const validator_error_1 = require("./validator-error");
7
- class PrivateLocationWrapper extends construct_1.Construct {
7
+ /**
8
+ * Creates a reference to an existing Private Location.
9
+ *
10
+ * References link existing resources to a project without managing them.
11
+ */
12
+ class PrivateLocationRef extends construct_1.Construct {
8
13
  constructor(logicalId, physicalId) {
9
14
  super(PrivateLocation.__checklyType, logicalId, physicalId, false);
10
15
  project_1.Session.registerConstruct(this);
@@ -13,6 +18,7 @@ class PrivateLocationWrapper extends construct_1.Construct {
13
18
  return null;
14
19
  }
15
20
  }
21
+ exports.PrivateLocationRef = PrivateLocationRef;
16
22
  /**
17
23
  * Creates a Private Location
18
24
  *
@@ -23,6 +29,11 @@ class PrivateLocationWrapper extends construct_1.Construct {
23
29
  * {@link https://www.checklyhq.com/docs/cli/constructs-reference/#privatelocation Read more in the docs}
24
30
  */
25
31
  class PrivateLocation extends construct_1.Construct {
32
+ name;
33
+ slugName;
34
+ icon;
35
+ proxyUrl;
36
+ static __checklyType = 'private-location';
26
37
  /**
27
38
  * Constructs the Private Location instance
28
39
  *
@@ -42,7 +53,7 @@ class PrivateLocation extends construct_1.Construct {
42
53
  project_1.Session.registerConstruct(this);
43
54
  }
44
55
  static fromId(id) {
45
- return new PrivateLocationWrapper(`private-location-${id}`, id);
56
+ return new PrivateLocationRef(`private-location-${id}`, id);
46
57
  }
47
58
  allowInChecklyConfig() {
48
59
  return true;
@@ -57,5 +68,4 @@ class PrivateLocation extends construct_1.Construct {
57
68
  }
58
69
  }
59
70
  exports.PrivateLocation = PrivateLocation;
60
- PrivateLocation.__checklyType = 'private-location';
61
71
  //# sourceMappingURL=private-location.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"private-location.js","sourceRoot":"","sources":["../../src/constructs/private-location.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uCAAmC;AACnC,uDAAmD;AA4CnD,MAAM,sBAAuB,SAAQ,qBAAS;IAC5C,YAAa,SAAiB,EAAE,UAAyB;QACvD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;QAClE,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,qBAAS;IAQ5C;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA2B;QACzD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC/C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAE9B,IAAI,CAAC,uGAAuG;aACzG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,iCAAe,CAAC,iEAAiE,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAA;QAC/G,CAAC;QAED,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,CAAE,EAAU;QACvB,OAAO,IAAI,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IACjE,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAA;IACH,CAAC;;AA5CH,0CA6CC;AAvCiB,6BAAa,GAAG,kBAAkB,CAAA"}
1
+ {"version":3,"file":"private-location.js","sourceRoot":"","sources":["../../src/constructs/private-location.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uCAAmC;AACnC,uDAAmD;AA8CnD;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,qBAAS;IAC/C,YAAa,SAAiB,EAAE,UAAyB;QACvD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAA;QAClE,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AATD,gDASC;AAED;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,qBAAS;IAC5C,IAAI,CAAQ;IACZ,QAAQ,CAAQ;IAChB,IAAI,CAAS;IACb,QAAQ,CAAS;IAEjB,MAAM,CAAU,aAAa,GAAG,kBAAkB,CAAA;IAElD;;;;;OAKG;IACH,YAAa,SAAiB,EAAE,KAA2B;QACzD,KAAK,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,CAAA;QAC/C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAE9B,IAAI,CAAC,uGAAuG;aACzG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,iCAAe,CAAC,iEAAiE,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAA;QAC/G,CAAC;QAED,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,CAAE,EAAU;QACvB,OAAO,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAA;IACH,CAAC;;AA5CH,0CA6CC"}
@@ -5,6 +5,7 @@ import type { Runtime } from '../rest/runtimes';
5
5
  import { Check, AlertChannelSubscription, AlertChannel, CheckGroup, MaintenanceWindow, Dashboard, PrivateLocation, PrivateLocationCheckAssignment, PrivateLocationGroupAssignment, StatusPage, StatusPageService } from './';
6
6
  import { ResourceSync } from '../rest/projects';
7
7
  import { PrivateLocationApi } from '../rest/private-locations';
8
+ import { FileLoader } from '../loader';
8
9
  export interface ProjectProps {
9
10
  /**
10
11
  * Friendly name for your project.
@@ -50,7 +51,14 @@ export declare class Project extends Construct {
50
51
  getHeartbeatLogicalIds(): string[];
51
52
  private synthesizeRecord;
52
53
  }
54
+ export interface ConstructExport {
55
+ type: string;
56
+ logicalId: string;
57
+ filePath: string;
58
+ exportName: string;
59
+ }
53
60
  export declare class Session {
61
+ static loader: FileLoader;
54
62
  static project?: Project;
55
63
  static basePath?: string;
56
64
  static checkDefaults?: CheckConfigDefaults;
@@ -65,6 +73,8 @@ export declare class Session {
65
73
  static checklyConfigFileConstructs?: Construct[];
66
74
  static privateLocations: PrivateLocationApi[];
67
75
  static parsers: Map<string, Parser>;
76
+ static constructExports: ConstructExport[];
77
+ static loadFile<T = unknown>(filePath: string): Promise<T>;
68
78
  static registerConstruct(construct: Construct): void;
69
79
  static validateCreateConstruct(construct: Construct): void;
70
80
  static getPrivateLocations(): Promise<PrivateLocationApi[]>;
@@ -29,7 +29,25 @@ const parser_1 = require("../services/check-parser/parser");
29
29
  const construct_1 = require("./construct");
30
30
  const validator_error_1 = require("./validator-error");
31
31
  const _1 = require("./");
32
+ const loader_1 = require("../loader");
32
33
  class Project extends construct_1.Construct {
34
+ name;
35
+ repoUrl;
36
+ logicalId;
37
+ data = {
38
+ check: {},
39
+ 'check-group': {},
40
+ 'alert-channel': {},
41
+ 'alert-channel-subscription': {},
42
+ 'maintenance-window': {},
43
+ 'private-location': {},
44
+ 'private-location-check-assignment': {},
45
+ 'private-location-group-assignment': {},
46
+ dashboard: {},
47
+ 'status-page': {},
48
+ 'status-page-service': {},
49
+ };
50
+ static __checklyType = 'project';
33
51
  /**
34
52
  * Constructs the Project instance
35
53
  *
@@ -38,19 +56,6 @@ class Project extends construct_1.Construct {
38
56
  */
39
57
  constructor(logicalId, props) {
40
58
  super(Project.__checklyType, logicalId);
41
- this.data = {
42
- check: {},
43
- 'check-group': {},
44
- 'alert-channel': {},
45
- 'alert-channel-subscription': {},
46
- 'maintenance-window': {},
47
- 'private-location': {},
48
- 'private-location-check-assignment': {},
49
- 'private-location-group-assignment': {},
50
- dashboard: {},
51
- 'status-page': {},
52
- 'status-page-service': {},
53
- };
54
59
  if (!props.name) {
55
60
  // TODO: Can we collect a list of validation errors and return them all at once? This might be better UX.
56
61
  throw new validator_error_1.ValidationError('Please give your project a name in the "name" property.');
@@ -60,7 +65,14 @@ class Project extends construct_1.Construct {
60
65
  this.logicalId = logicalId;
61
66
  }
62
67
  addResource(type, logicalId, resource) {
63
- if (this.data[type][logicalId]) {
68
+ const existingResource = this.data[type][logicalId];
69
+ if (existingResource) {
70
+ // Non-member resources (i.e. references) can be used multiple times.
71
+ // Behind the scenes, we'll create a single mapping for them, and the
72
+ // referenced resource isn't managed by the project at all.
73
+ if (!resource.member && !existingResource.member && existingResource.physicalId === resource.physicalId) {
74
+ return;
75
+ }
64
76
  throw new Error(`Resource of type '${type}' with logical id '${logicalId}' already exists.`);
65
77
  }
66
78
  this.data[type][logicalId] = resource;
@@ -116,8 +128,54 @@ class Project extends construct_1.Construct {
116
128
  }
117
129
  }
118
130
  exports.Project = Project;
119
- Project.__checklyType = 'project';
120
131
  class Session {
132
+ static loader = new loader_1.MixedFileLoader(new loader_1.NativeFileLoader(), new loader_1.JitiFileLoader(), new loader_1.TSNodeFileLoader());
133
+ static project;
134
+ static basePath;
135
+ static checkDefaults;
136
+ static browserCheckDefaults;
137
+ static multiStepCheckDefaults;
138
+ static checkFilePath;
139
+ static checkFileAbsolutePath;
140
+ static availableRuntimes;
141
+ static defaultRuntimeId;
142
+ static verifyRuntimeDependencies = true;
143
+ static loadingChecklyConfigFile;
144
+ static checklyConfigFileConstructs;
145
+ static privateLocations;
146
+ static parsers = new Map();
147
+ static constructExports = [];
148
+ static async loadFile(filePath) {
149
+ const loader = this.loader;
150
+ if (loader === undefined) {
151
+ throw new Error(`Session has no loader set`);
152
+ }
153
+ if (!loader.isAuthoritativeFor(filePath)) {
154
+ throw new Error(`Unable to find a compatible loader for file '${filePath}'`);
155
+ }
156
+ try {
157
+ const moduleExports = await loader.loadFile(filePath);
158
+ // Register all exported constructs we find.
159
+ for (const [exportName, value] of Object.entries(moduleExports ?? {})) {
160
+ if (value instanceof construct_1.Construct) {
161
+ this.constructExports.push({
162
+ type: value.type,
163
+ logicalId: value.logicalId,
164
+ filePath,
165
+ exportName,
166
+ });
167
+ }
168
+ }
169
+ const defaultExport = moduleExports?.default ?? moduleExports;
170
+ if (typeof defaultExport === 'function') {
171
+ return await defaultExport();
172
+ }
173
+ return defaultExport;
174
+ }
175
+ catch (err) {
176
+ throw new Error(`Error loading file '${filePath}'\n${err.stack}`);
177
+ }
178
+ }
121
179
  static registerConstruct(construct) {
122
180
  if (Session.project) {
123
181
  Session.project.addResource(construct.type, construct.logicalId, construct);
@@ -157,7 +215,7 @@ class Session {
157
215
  return Session.privateLocations;
158
216
  }
159
217
  static getRuntime(runtimeId) {
160
- const effectiveRuntimeId = runtimeId !== null && runtimeId !== void 0 ? runtimeId : Session.defaultRuntimeId;
218
+ const effectiveRuntimeId = runtimeId ?? Session.defaultRuntimeId;
161
219
  if (effectiveRuntimeId === undefined) {
162
220
  throw new Error('Internal Error: Account default runtime is not set. Please contact Checkly support at support@checklyhq.com.');
163
221
  }
@@ -177,6 +235,4 @@ class Session {
177
235
  }
178
236
  }
179
237
  exports.Session = Session;
180
- Session.verifyRuntimeDependencies = true;
181
- Session.parsers = new Map();
182
238
  //# sourceMappingURL=project.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/constructs/project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAElC,4DAAwD;AACxD,2CAAuC;AACvC,uDAAmD;AAGnD,yBAIW;AA6BX,MAAa,OAAQ,SAAQ,qBAA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YAAY,CAAC;YACtD,uBAAuB,EAAE,OAAO,CAAC,yBAAyB;SAC3D,CAAC,CAAA;QAEF,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAEzC,OAAO,MAAM,CAAA;IACf,CAAC;;AApHH,0BAqHC"}
@@ -0,0 +1,3 @@
1
+ import { GeneratedFile, Value } from '../sourcegen';
2
+ import { Ref } from './ref';
3
+ export declare function valueForRef(genfile: GeneratedFile, ref: Ref): Value;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.valueForRef = void 0;
4
+ const sourcegen_1 = require("../sourcegen");
5
+ function valueForRef(genfile, ref) {
6
+ genfile.namedImport('Ref', 'checkly/constructs');
7
+ return (0, sourcegen_1.expr)((0, sourcegen_1.ident)('Ref'), builder => {
8
+ builder.member((0, sourcegen_1.ident)('from'));
9
+ builder.call(builder => {
10
+ builder.string(ref.ref);
11
+ });
12
+ });
13
+ }
14
+ exports.valueForRef = valueForRef;
15
+ //# sourceMappingURL=ref-codegen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-codegen.js","sourceRoot":"","sources":["../../src/constructs/ref-codegen.ts"],"names":[],"mappings":";;;AAAA,4CAAgE;AAGhE,SAAgB,WAAW,CAAE,OAAsB,EAAE,GAAQ;IAC3D,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;IAEhD,OAAO,IAAA,gBAAI,EAAC,IAAA,iBAAK,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE;QAClC,OAAO,CAAC,MAAM,CAAC,IAAA,iBAAK,EAAC,MAAM,CAAC,CAAC,CAAA;QAC7B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACrB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACzB,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AATD,kCASC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Ref = void 0;
4
4
  class Ref {
5
+ ref;
5
6
  constructor(ref) {
6
7
  this.ref = ref;
7
8
  }
@@ -1 +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"}
1
+ {"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/constructs/ref.ts"],"names":[],"mappings":";;;AAAA,MAAa,GAAG;IACd,GAAG,CAAQ;IACX,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"}