checkly 9.5.0 → 10.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/dist/ai-context/context.js +1 -0
  2. package/dist/ai-context/context.js.map +1 -1
  3. package/dist/ai-context/onboarding-boilerplate/checkly-config-template.ts +2 -0
  4. package/dist/ai-context/public-skills/checkly/SKILL.md +18 -5
  5. package/dist/ai-context/skills-command/references/communicate.md +6 -3
  6. package/dist/ai-context/skills-command/references/configure-api-checks.md +1 -9
  7. package/dist/ai-context/skills-command/references/configure-browser-checks.md +1 -8
  8. package/dist/ai-context/skills-command/references/configure-check-groups.md +1 -0
  9. package/dist/ai-context/skills-command/references/configure-dns-monitors.md +1 -9
  10. package/dist/ai-context/skills-command/references/configure-grpc-monitors.md +24 -0
  11. package/dist/ai-context/skills-command/references/configure-heartbeat-monitors.md +1 -9
  12. package/dist/ai-context/skills-command/references/configure-icmp-monitors.md +1 -9
  13. package/dist/ai-context/skills-command/references/configure-multistep-checks.md +1 -9
  14. package/dist/ai-context/skills-command/references/configure-playwright-checks.md +1 -1
  15. package/dist/ai-context/skills-command/references/configure-supporting-constructs.md +6 -2
  16. package/dist/ai-context/skills-command/references/configure-tcp-monitors.md +1 -10
  17. package/dist/ai-context/skills-command/references/configure-url-monitors.md +1 -10
  18. package/dist/ai-context/skills-command/references/configure.md +16 -5
  19. package/dist/ai-context/skills-command/references/initialize.md +11 -3
  20. package/dist/ai-context/skills-command/references/investigate-checks.md +1 -1
  21. package/dist/auth/api-key.d.ts +24 -0
  22. package/dist/auth/api-key.js +104 -0
  23. package/dist/auth/api-key.js.map +1 -0
  24. package/dist/auth/device-flow.d.ts +57 -0
  25. package/dist/auth/device-flow.js +221 -0
  26. package/dist/auth/device-flow.js.map +1 -0
  27. package/dist/auth/index.d.ts +6 -6
  28. package/dist/auth/index.js +64 -64
  29. package/dist/auth/index.js.map +1 -1
  30. package/dist/commands/api.js +43 -10
  31. package/dist/commands/api.js.map +1 -1
  32. package/dist/commands/authCommand.d.ts +2 -0
  33. package/dist/commands/authCommand.js +77 -7
  34. package/dist/commands/authCommand.js.map +1 -1
  35. package/dist/commands/debug/parse-project.d.ts +1 -0
  36. package/dist/commands/debug/parse-project.js +5 -2
  37. package/dist/commands/debug/parse-project.js.map +1 -1
  38. package/dist/commands/deploy.d.ts +7 -1
  39. package/dist/commands/deploy.js +627 -271
  40. package/dist/commands/deploy.js.map +1 -1
  41. package/dist/commands/import/plan.js +18 -4
  42. package/dist/commands/import/plan.js.map +1 -1
  43. package/dist/commands/init.js +29 -13
  44. package/dist/commands/init.js.map +1 -1
  45. package/dist/commands/login.d.ts +18 -2
  46. package/dist/commands/login.js +681 -48
  47. package/dist/commands/login.js.map +1 -1
  48. package/dist/commands/logout.js +7 -1
  49. package/dist/commands/logout.js.map +1 -1
  50. package/dist/commands/pw-test.js +3 -2
  51. package/dist/commands/pw-test.js.map +1 -1
  52. package/dist/commands/switch.js +23 -10
  53. package/dist/commands/switch.js.map +1 -1
  54. package/dist/commands/test.js +16 -17
  55. package/dist/commands/test.js.map +1 -1
  56. package/dist/commands/trigger.js +4 -3
  57. package/dist/commands/trigger.js.map +1 -1
  58. package/dist/commands/validate.js +1 -0
  59. package/dist/commands/validate.js.map +1 -1
  60. package/dist/constants.d.ts +1 -2
  61. package/dist/constants.js +0 -1
  62. package/dist/constants.js.map +1 -1
  63. package/dist/constructs/alert-channel-codegen.d.ts +6 -1
  64. package/dist/constructs/alert-channel-codegen.js +12 -6
  65. package/dist/constructs/alert-channel-codegen.js.map +1 -1
  66. package/dist/constructs/alert-escalation-policy-codegen.d.ts +7 -0
  67. package/dist/constructs/alert-escalation-policy-codegen.js +25 -8
  68. package/dist/constructs/alert-escalation-policy-codegen.js.map +1 -1
  69. package/dist/constructs/api-assertion.d.ts +0 -2
  70. package/dist/constructs/api-assertion.js +0 -4
  71. package/dist/constructs/api-assertion.js.map +1 -1
  72. package/dist/constructs/api-check-codegen.js +1 -1
  73. package/dist/constructs/api-check-codegen.js.map +1 -1
  74. package/dist/constructs/api-check.d.ts +4 -22
  75. package/dist/constructs/api-check.js +15 -17
  76. package/dist/constructs/api-check.js.map +1 -1
  77. package/dist/constructs/api-request-codegen.js +10 -8
  78. package/dist/constructs/api-request-codegen.js.map +1 -1
  79. package/dist/constructs/browser-check-bundle.d.ts +19 -13
  80. package/dist/constructs/browser-check-bundle.js +5 -1
  81. package/dist/constructs/browser-check-bundle.js.map +1 -1
  82. package/dist/constructs/browser-check.d.ts +1 -4
  83. package/dist/constructs/browser-check.js +1 -1
  84. package/dist/constructs/browser-check.js.map +1 -1
  85. package/dist/constructs/check-codegen.d.ts +39 -14
  86. package/dist/constructs/check-codegen.js +101 -23
  87. package/dist/constructs/check-codegen.js.map +1 -1
  88. package/dist/constructs/check-group-codegen.js +23 -9
  89. package/dist/constructs/check-group-codegen.js.map +1 -1
  90. package/dist/constructs/check-group-v1.d.ts +19 -14
  91. package/dist/constructs/check-group-v1.js +39 -14
  92. package/dist/constructs/check-group-v1.js.map +1 -1
  93. package/dist/constructs/check-group-v2.d.ts +0 -20
  94. package/dist/constructs/check-group-v2.js +0 -4
  95. package/dist/constructs/check-group-v2.js.map +1 -1
  96. package/dist/constructs/check.d.ts +45 -32
  97. package/dist/constructs/check.js +78 -17
  98. package/dist/constructs/check.js.map +1 -1
  99. package/dist/constructs/construct-codegen.d.ts +1 -2
  100. package/dist/constructs/construct-diagnostics.d.ts +3 -0
  101. package/dist/constructs/construct-diagnostics.js +11 -0
  102. package/dist/constructs/construct-diagnostics.js.map +1 -1
  103. package/dist/constructs/construct.d.ts +25 -4
  104. package/dist/constructs/construct.js +41 -5
  105. package/dist/constructs/construct.js.map +1 -1
  106. package/dist/constructs/dns-request-codegen.js +1 -1
  107. package/dist/constructs/dns-request-codegen.js.map +1 -1
  108. package/dist/constructs/email-alert-channel-codegen.js +1 -1
  109. package/dist/constructs/email-alert-channel-codegen.js.map +1 -1
  110. package/dist/constructs/frequency-codegen.js +10 -2
  111. package/dist/constructs/frequency-codegen.js.map +1 -1
  112. package/dist/constructs/frequency.d.ts +8 -3
  113. package/dist/constructs/frequency.js +7 -2
  114. package/dist/constructs/frequency.js.map +1 -1
  115. package/dist/constructs/grpc-monitor.js +19 -0
  116. package/dist/constructs/grpc-monitor.js.map +1 -1
  117. package/dist/constructs/grpc-request-codegen.js +13 -4
  118. package/dist/constructs/grpc-request-codegen.js.map +1 -1
  119. package/dist/constructs/grpc-request.d.ts +23 -0
  120. package/dist/constructs/heartbeat-monitor.d.ts +2 -1
  121. package/dist/constructs/heartbeat-monitor.js +2 -2
  122. package/dist/constructs/heartbeat-monitor.js.map +1 -1
  123. package/dist/constructs/icmp-request-codegen.js +1 -1
  124. package/dist/constructs/icmp-request-codegen.js.map +1 -1
  125. package/dist/constructs/incidentio-alert-channel-codegen.d.ts +1 -1
  126. package/dist/constructs/incidentio-alert-channel-codegen.js +14 -8
  127. package/dist/constructs/incidentio-alert-channel-codegen.js.map +1 -1
  128. package/dist/constructs/index.d.ts +1 -1
  129. package/dist/constructs/index.js +1 -1
  130. package/dist/constructs/index.js.map +1 -1
  131. package/dist/constructs/internal/assertion-validation.js +1 -2
  132. package/dist/constructs/internal/assertion-validation.js.map +1 -1
  133. package/dist/constructs/internal/codegen/context.d.ts +73 -6
  134. package/dist/constructs/internal/codegen/context.js +78 -6
  135. package/dist/constructs/internal/codegen/context.js.map +1 -1
  136. package/dist/constructs/internal/codegen/index.d.ts +3 -1
  137. package/dist/constructs/internal/codegen/index.js +2 -1
  138. package/dist/constructs/internal/codegen/index.js.map +1 -1
  139. package/dist/constructs/internal/codegen/render.d.ts +68 -0
  140. package/dist/constructs/internal/codegen/render.js +75 -0
  141. package/dist/constructs/internal/codegen/render.js.map +1 -0
  142. package/dist/constructs/internal/common-diagnostics.d.ts +1 -2
  143. package/dist/constructs/internal/common-diagnostics.js +6 -14
  144. package/dist/constructs/internal/common-diagnostics.js.map +1 -1
  145. package/dist/constructs/internal/declaring-file.d.ts +39 -0
  146. package/dist/constructs/internal/declaring-file.js +139 -0
  147. package/dist/constructs/internal/declaring-file.js.map +1 -0
  148. package/dist/constructs/internal/retry-strategy-defaults.d.ts +13 -0
  149. package/dist/constructs/internal/retry-strategy-defaults.js +14 -0
  150. package/dist/constructs/internal/retry-strategy-defaults.js.map +1 -0
  151. package/dist/constructs/key-value-pair-codegen.d.ts +6 -1
  152. package/dist/constructs/key-value-pair-codegen.js +24 -3
  153. package/dist/constructs/key-value-pair-codegen.js.map +1 -1
  154. package/dist/constructs/maintenance-window-codegen.d.ts +7 -0
  155. package/dist/constructs/maintenance-window-codegen.js +36 -19
  156. package/dist/constructs/maintenance-window-codegen.js.map +1 -1
  157. package/dist/constructs/maintenance-window.d.ts +35 -3
  158. package/dist/constructs/maintenance-window.js +35 -1
  159. package/dist/constructs/maintenance-window.js.map +1 -1
  160. package/dist/constructs/monitor.d.ts +1 -1
  161. package/dist/constructs/msteams-alert-channel-codegen.d.ts +1 -1
  162. package/dist/constructs/msteams-alert-channel-codegen.js +8 -18
  163. package/dist/constructs/msteams-alert-channel-codegen.js.map +1 -1
  164. package/dist/constructs/opsgenie-alert-channel-codegen.js +1 -1
  165. package/dist/constructs/opsgenie-alert-channel-codegen.js.map +1 -1
  166. package/dist/constructs/pagerduty-alert-channel-codegen.js +1 -1
  167. package/dist/constructs/pagerduty-alert-channel-codegen.js.map +1 -1
  168. package/dist/constructs/phone-call-alert-channel-codegen.js +1 -1
  169. package/dist/constructs/phone-call-alert-channel-codegen.js.map +1 -1
  170. package/dist/constructs/playwright-check-bundle.d.ts +7 -1
  171. package/dist/constructs/playwright-check-bundle.js +3 -0
  172. package/dist/constructs/playwright-check-bundle.js.map +1 -1
  173. package/dist/constructs/playwright-check-codegen.d.ts +85 -0
  174. package/dist/constructs/playwright-check-codegen.js +212 -0
  175. package/dist/constructs/playwright-check-codegen.js.map +1 -0
  176. package/dist/constructs/playwright-check.d.ts +14 -24
  177. package/dist/constructs/playwright-check.js +16 -52
  178. package/dist/constructs/playwright-check.js.map +1 -1
  179. package/dist/constructs/retry-strategy-codegen.d.ts +7 -1
  180. package/dist/constructs/retry-strategy-codegen.js +41 -32
  181. package/dist/constructs/retry-strategy-codegen.js.map +1 -1
  182. package/dist/constructs/retry-strategy.d.ts +0 -4
  183. package/dist/constructs/retry-strategy.js +5 -8
  184. package/dist/constructs/retry-strategy.js.map +1 -1
  185. package/dist/constructs/session.d.ts +26 -1
  186. package/dist/constructs/session.js +33 -2
  187. package/dist/constructs/session.js.map +1 -1
  188. package/dist/constructs/slack-alert-channel-codegen.js +1 -1
  189. package/dist/constructs/slack-alert-channel-codegen.js.map +1 -1
  190. package/dist/constructs/slack-app-alert-channel-codegen.js +1 -1
  191. package/dist/constructs/slack-app-alert-channel-codegen.js.map +1 -1
  192. package/dist/constructs/sms-alert-channel-codegen.js +1 -1
  193. package/dist/constructs/sms-alert-channel-codegen.js.map +1 -1
  194. package/dist/constructs/ssl-request-codegen.js +4 -3
  195. package/dist/constructs/ssl-request-codegen.js.map +1 -1
  196. package/dist/constructs/status-page-v3-automation-rule-codegen.js +5 -4
  197. package/dist/constructs/status-page-v3-automation-rule-codegen.js.map +1 -1
  198. package/dist/constructs/status-page-v3-codegen.js +3 -2
  199. package/dist/constructs/status-page-v3-codegen.js.map +1 -1
  200. package/dist/constructs/status-page-v3-component-codegen.js +8 -7
  201. package/dist/constructs/status-page-v3-component-codegen.js.map +1 -1
  202. package/dist/constructs/tcp-monitor-codegen.js +3 -2
  203. package/dist/constructs/tcp-monitor-codegen.js.map +1 -1
  204. package/dist/constructs/tcp-monitor.d.ts +4 -3
  205. package/dist/constructs/tcp-monitor.js +3 -2
  206. package/dist/constructs/tcp-monitor.js.map +1 -1
  207. package/dist/constructs/telegram-alert-channel-codegen.d.ts +1 -1
  208. package/dist/constructs/telegram-alert-channel-codegen.js +14 -8
  209. package/dist/constructs/telegram-alert-channel-codegen.js.map +1 -1
  210. package/dist/constructs/time-zone.d.ts +24 -0
  211. package/dist/constructs/time-zone.js +455 -0
  212. package/dist/constructs/time-zone.js.map +1 -0
  213. package/dist/constructs/traceroute-request-codegen.js +2 -2
  214. package/dist/constructs/traceroute-request-codegen.js.map +1 -1
  215. package/dist/constructs/url-monitor-codegen.js +1 -1
  216. package/dist/constructs/url-monitor-codegen.js.map +1 -1
  217. package/dist/constructs/url-monitor.d.ts +3 -2
  218. package/dist/constructs/url-monitor.js +3 -0
  219. package/dist/constructs/url-monitor.js.map +1 -1
  220. package/dist/constructs/url-request-codegen.js +4 -3
  221. package/dist/constructs/url-request-codegen.js.map +1 -1
  222. package/dist/constructs/webhook-alert-channel-codegen.js +3 -3
  223. package/dist/constructs/webhook-alert-channel-codegen.js.map +1 -1
  224. package/dist/formatters/check-result-detail.js +0 -185
  225. package/dist/formatters/check-result-detail.js.map +1 -1
  226. package/dist/helpers/activate-account.d.ts +14 -0
  227. package/dist/helpers/activate-account.js +25 -0
  228. package/dist/helpers/activate-account.js.map +1 -0
  229. package/dist/helpers/cli-mode.d.ts +18 -0
  230. package/dist/helpers/cli-mode.js +41 -2
  231. package/dist/helpers/cli-mode.js.map +1 -1
  232. package/dist/helpers/command-preview.d.ts +44 -0
  233. package/dist/helpers/command-preview.js +29 -9
  234. package/dist/helpers/command-preview.js.map +1 -1
  235. package/dist/helpers/flags.d.ts +10 -0
  236. package/dist/helpers/flags.js +17 -0
  237. package/dist/helpers/flags.js.map +1 -1
  238. package/dist/helpers/onboarding/boilerplate.js +13 -1
  239. package/dist/helpers/onboarding/boilerplate.js.map +1 -1
  240. package/dist/helpers/onboarding/index.d.ts +1 -1
  241. package/dist/helpers/onboarding/index.js +1 -1
  242. package/dist/helpers/onboarding/index.js.map +1 -1
  243. package/dist/helpers/onboarding/messages.d.ts +6 -0
  244. package/dist/helpers/onboarding/messages.js +14 -0
  245. package/dist/helpers/onboarding/messages.js.map +1 -1
  246. package/dist/helpers/onboarding/skill-install.js +2 -2
  247. package/dist/helpers/onboarding/skill-install.js.map +1 -1
  248. package/dist/helpers/wrap.js +1 -1
  249. package/dist/helpers/wrap.js.map +1 -1
  250. package/dist/reporters/abstract-list.js +11 -2
  251. package/dist/reporters/abstract-list.js.map +1 -1
  252. package/dist/reporters/github.js +3 -2
  253. package/dist/reporters/github.js.map +1 -1
  254. package/dist/reporters/util.d.ts +1 -0
  255. package/dist/reporters/util.js +5 -58
  256. package/dist/reporters/util.js.map +1 -1
  257. package/dist/rest/analytics.js +0 -4
  258. package/dist/rest/analytics.js.map +1 -1
  259. package/dist/rest/api.d.ts +8 -1
  260. package/dist/rest/api.js +21 -3
  261. package/dist/rest/api.js.map +1 -1
  262. package/dist/rest/check-results.d.ts +1 -50
  263. package/dist/rest/check-results.js.map +1 -1
  264. package/dist/rest/checkly-storage.d.ts +6 -1
  265. package/dist/rest/checkly-storage.js +13 -2
  266. package/dist/rest/checkly-storage.js.map +1 -1
  267. package/dist/rest/errors.d.ts +13 -0
  268. package/dist/rest/errors.js +5 -1
  269. package/dist/rest/errors.js.map +1 -1
  270. package/dist/rest/projects.d.ts +254 -4
  271. package/dist/rest/projects.js +184 -12
  272. package/dist/rest/projects.js.map +1 -1
  273. package/dist/services/abstract-check-runner.d.ts +11 -0
  274. package/dist/services/abstract-check-runner.js +98 -46
  275. package/dist/services/abstract-check-runner.js.map +1 -1
  276. package/dist/services/check-parser/bundler.d.ts +26 -0
  277. package/dist/services/check-parser/bundler.js +81 -7
  278. package/dist/services/check-parser/bundler.js.map +1 -1
  279. package/dist/services/check-parser/cache-hash.d.ts +1 -4
  280. package/dist/services/check-parser/cache-hash.js.map +1 -1
  281. package/dist/services/checkly-config-codegen.js +1 -4
  282. package/dist/services/checkly-config-codegen.js.map +1 -1
  283. package/dist/services/checkly-config-loader.d.ts +7 -33
  284. package/dist/services/checkly-config-loader.js +50 -47
  285. package/dist/services/checkly-config-loader.js.map +1 -1
  286. package/dist/services/config.d.ts +2 -0
  287. package/dist/services/config.js +14 -0
  288. package/dist/services/config.js.map +1 -1
  289. package/dist/services/content-hash.d.ts +14 -0
  290. package/dist/services/content-hash.js +22 -0
  291. package/dist/services/content-hash.js.map +1 -0
  292. package/dist/services/deploy-diff/diff-lines.d.ts +38 -0
  293. package/dist/services/deploy-diff/diff-lines.js +191 -0
  294. package/dist/services/deploy-diff/diff-lines.js.map +1 -0
  295. package/dist/services/deploy-diff/import-shape.d.ts +171 -0
  296. package/dist/services/deploy-diff/import-shape.js +633 -0
  297. package/dist/services/deploy-diff/import-shape.js.map +1 -0
  298. package/dist/services/deploy-diff/legacy-payload.d.ts +22 -0
  299. package/dist/services/deploy-diff/legacy-payload.js +51 -0
  300. package/dist/services/deploy-diff/legacy-payload.js.map +1 -0
  301. package/dist/services/deploy-diff/plan-summary.d.ts +37 -0
  302. package/dist/services/deploy-diff/plan-summary.js +154 -0
  303. package/dist/services/deploy-diff/plan-summary.js.map +1 -0
  304. package/dist/services/deploy-diff/preview-output.d.ts +61 -0
  305. package/dist/services/deploy-diff/preview-output.js +394 -0
  306. package/dist/services/deploy-diff/preview-output.js.map +1 -0
  307. package/dist/services/deploy-diff/render.d.ts +53 -0
  308. package/dist/services/deploy-diff/render.js +317 -0
  309. package/dist/services/deploy-diff/render.js.map +1 -0
  310. package/dist/services/deploy-diff/shape-changes.d.ts +2 -0
  311. package/dist/services/deploy-diff/shape-changes.js +35 -0
  312. package/dist/services/deploy-diff/shape-changes.js.map +1 -0
  313. package/dist/services/deploy-diff/source-index.d.ts +18 -0
  314. package/dist/services/deploy-diff/source-index.js +48 -0
  315. package/dist/services/deploy-diff/source-index.js.map +1 -0
  316. package/dist/services/deploy-diff/variable-names.d.ts +30 -0
  317. package/dist/services/deploy-diff/variable-names.js +64 -0
  318. package/dist/services/deploy-diff/variable-names.js.map +1 -0
  319. package/dist/services/project-parser.d.ts +5 -0
  320. package/dist/services/project-parser.js +25 -13
  321. package/dist/services/project-parser.js.map +1 -1
  322. package/dist/services/snapshot-service.d.ts +25 -8
  323. package/dist/services/snapshot-service.js +46 -4
  324. package/dist/services/snapshot-service.js.map +1 -1
  325. package/dist/services/test-filters.d.ts +18 -0
  326. package/dist/services/test-filters.js +10 -0
  327. package/dist/services/test-filters.js.map +1 -1
  328. package/dist/services/test-runner.js +7 -3
  329. package/dist/services/test-runner.js.map +1 -1
  330. package/dist/services/test-session-cancel.js +1 -1
  331. package/dist/services/test-session-cancel.js.map +1 -1
  332. package/dist/services/util.d.ts +17 -2
  333. package/dist/services/util.js +118 -11
  334. package/dist/services/util.js.map +1 -1
  335. package/dist/services/write-back/apply-edits.d.ts +29 -0
  336. package/dist/services/write-back/apply-edits.js +255 -0
  337. package/dist/services/write-back/apply-edits.js.map +1 -0
  338. package/dist/services/write-back/helper-edit.d.ts +135 -0
  339. package/dist/services/write-back/helper-edit.js +343 -0
  340. package/dist/services/write-back/helper-edit.js.map +1 -0
  341. package/dist/services/write-back/imports.d.ts +30 -0
  342. package/dist/services/write-back/imports.js +82 -0
  343. package/dist/services/write-back/imports.js.map +1 -0
  344. package/dist/services/write-back/literal-edit.d.ts +183 -0
  345. package/dist/services/write-back/literal-edit.js +359 -0
  346. package/dist/services/write-back/literal-edit.js.map +1 -0
  347. package/dist/services/write-back/output.d.ts +26 -0
  348. package/dist/services/write-back/output.js +110 -0
  349. package/dist/services/write-back/output.js.map +1 -0
  350. package/dist/services/write-back/plan.d.ts +173 -0
  351. package/dist/services/write-back/plan.js +968 -0
  352. package/dist/services/write-back/plan.js.map +1 -0
  353. package/dist/services/write-back/source-file.d.ts +118 -0
  354. package/dist/services/write-back/source-file.js +432 -0
  355. package/dist/services/write-back/source-file.js.map +1 -0
  356. package/dist/sourcegen/index.d.ts +1 -1
  357. package/dist/sourcegen/index.js +1 -1
  358. package/dist/sourcegen/index.js.map +1 -1
  359. package/dist/sourcegen/program.d.ts +19 -1
  360. package/dist/sourcegen/program.js +32 -7
  361. package/dist/sourcegen/program.js.map +1 -1
  362. package/oclif.manifest.json +676 -635
  363. package/package.json +13 -13
  364. package/dist/commands/rules.d.ts +0 -9
  365. package/dist/commands/rules.js +0 -13
  366. package/dist/commands/rules.js.map +0 -1
  367. package/dist/constructs/agentic-check-codegen.d.ts +0 -22
  368. package/dist/constructs/agentic-check-codegen.js +0 -59
  369. package/dist/constructs/agentic-check-codegen.js.map +0 -1
  370. package/dist/constructs/agentic-check.d.ts +0 -237
  371. package/dist/constructs/agentic-check.js +0 -100
  372. package/dist/constructs/agentic-check.js.map +0 -1
@@ -0,0 +1,22 @@
1
+ import type { ProjectSync } from '../../rest/projects.js';
2
+ /**
3
+ * The deploy payload as a Checkly API without the preview endpoint accepts it.
4
+ *
5
+ * `sourceFile`, each snapshot's `sha256` and a Playwright check's
6
+ * `codeBundleSha256` were all added alongside that endpoint. Older deploy
7
+ * schemas reject a key they do not know rather than ignoring it, so a CLI
8
+ * talking to one has to take them back out — otherwise every deploy against
9
+ * such an API fails validation.
10
+ *
11
+ * A snapshot with no storage key is dropped: it describes a file that has not
12
+ * been uploaded, which only a preview accepts, and an older API has no
13
+ * preview. Dropping the entry leaves the check's snapshots as they are rather
14
+ * than failing the deploy.
15
+ *
16
+ * Returns a copy, so the caller can still send the full payload to an API that
17
+ * does support the endpoint.
18
+ *
19
+ * Temporary by design: once every API a supported CLI talks to accepts these
20
+ * fields, this function and its call site go away.
21
+ */
22
+ export declare function stripUnsupportedDeployFields(payload: ProjectSync): ProjectSync;
@@ -0,0 +1,51 @@
1
+ import { stripContentHashes } from '../snapshot-service.js';
2
+ /**
3
+ * The deploy payload as a Checkly API without the preview endpoint accepts it.
4
+ *
5
+ * `sourceFile`, each snapshot's `sha256` and a Playwright check's
6
+ * `codeBundleSha256` were all added alongside that endpoint. Older deploy
7
+ * schemas reject a key they do not know rather than ignoring it, so a CLI
8
+ * talking to one has to take them back out — otherwise every deploy against
9
+ * such an API fails validation.
10
+ *
11
+ * A snapshot with no storage key is dropped: it describes a file that has not
12
+ * been uploaded, which only a preview accepts, and an older API has no
13
+ * preview. Dropping the entry leaves the check's snapshots as they are rather
14
+ * than failing the deploy.
15
+ *
16
+ * Returns a copy, so the caller can still send the full payload to an API that
17
+ * does support the endpoint.
18
+ *
19
+ * Temporary by design: once every API a supported CLI talks to accepts these
20
+ * fields, this function and its call site go away.
21
+ */
22
+ export function stripUnsupportedDeployFields(payload) {
23
+ return {
24
+ ...payload,
25
+ resources: payload.resources.map(resource => {
26
+ const stripped = { ...resource };
27
+ delete stripped.sourceFile;
28
+ if (stripped.payload === null || typeof stripped.payload !== 'object') {
29
+ return stripped;
30
+ }
31
+ // The content hashes go the same way they do on a run request.
32
+ stripped.payload = stripContentHashes(stripped.payload);
33
+ const snapshots = stripped.payload.snapshots;
34
+ if (Array.isArray(snapshots)) {
35
+ const uploaded = snapshots.filter((snapshot) => typeof snapshot.key === 'string');
36
+ if (uploaded.length || snapshots.length === 0) {
37
+ // An empty array is meaningful — "this check has no snapshots" — and
38
+ // has always been sent, so it is kept as it is. The key is dropped
39
+ // only when every entry had to go, which would otherwise turn "none
40
+ // of these are uploaded yet" into "this check has none".
41
+ stripped.payload.snapshots = uploaded;
42
+ }
43
+ else {
44
+ delete stripped.payload.snapshots;
45
+ }
46
+ }
47
+ return stripped;
48
+ }),
49
+ };
50
+ }
51
+ //# sourceMappingURL=legacy-payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-payload.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/legacy-payload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,4BAA4B,CAAE,OAAoB;IAChE,OAAO;QACL,GAAG,OAAO;QACV,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YAC1C,MAAM,QAAQ,GAAuB,EAAE,GAAG,QAAQ,EAAE,CAAA;YACpD,OAAO,QAAQ,CAAC,UAAU,CAAA;YAE1B,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACtE,OAAO,QAAQ,CAAA;YACjB,CAAC;YAED,+DAA+D;YAC/D,QAAQ,CAAC,OAAO,GAAG,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAEvD,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAA;YAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC7B,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,QAA0B,EAAE,EAAE,CAAC,OAAO,QAAQ,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAA;gBACnG,IAAI,QAAQ,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC9C,qEAAqE;oBACrE,mEAAmE;oBACnE,oEAAoE;oBACpE,yDAAyD;oBACzD,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAA;gBACvC,CAAC;qBAAM,CAAC;oBACN,OAAO,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAA;gBACnC,CAAC;YACH,CAAC;YAED,OAAO,QAAQ,CAAA;QACjB,CAAC,CAAC;KACH,CAAA;AACH,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { DiffEntry } from '../../rest/projects.js';
2
+ export interface PlanSummaryOptions {
3
+ /** Display names per resource type, for the types a user declares. */
4
+ prettyTypes: Record<string, string>;
5
+ /** Types reported as part of their owning check or group rather than on their own. */
6
+ foldedTypes: readonly string[];
7
+ }
8
+ /** A relation the project does not manage, which this deploy will delete. */
9
+ export declare function isPrunedRelation(entry: DiffEntry): boolean;
10
+ /**
11
+ * True when every change reported on a resource is a relation the project does
12
+ * not manage. Checkly reports those on the owning check or group whether or not
13
+ * the deploy would delete them, and without `--prune-relations` it deletes
14
+ * nothing — so the resource itself is untouched and naming it as an update
15
+ * would describe a write that never happens.
16
+ */
17
+ export declare function onlyUnmanagedChanges(entry: DiffEntry): boolean;
18
+ /**
19
+ * True when the plan gives the deploy nothing to write: no resource to create,
20
+ * update, delete or detach, and no relation to prune. Relations the project
21
+ * does not manage and is not pruning do not count, since the deploy leaves
22
+ * them alone.
23
+ */
24
+ export declare function planHasNoChanges(diff: DiffEntry[], options: PlanSummaryOptions): boolean;
25
+ /**
26
+ * One line per resource the deploy would touch, deletions first and in full,
27
+ * for the confirmation prompt and the agent envelope.
28
+ */
29
+ export declare function planChangeLines(diff: DiffEntry[], options: PlanSummaryOptions): string[];
30
+ /**
31
+ * The plan as the agent envelope carries it: every entry and every changed
32
+ * property, but without the resources' full current state and without the
33
+ * large values the rendered diff needs. Rendering happens in the terminal
34
+ * output; the envelope is there to be read, and it is the same plan, pinned by
35
+ * the same `planToken`.
36
+ */
37
+ export declare function reducePlanForAgent(diff: DiffEntry[]): DiffEntry[];
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Turns a deploy plan into the two forms `confirmOrAbort` needs: the
3
+ * human-readable `changes` lines of its preview, and the machine-readable plan
4
+ * that goes into the agent envelope next to them.
5
+ */
6
+ /**
7
+ * How many create/update lines the confirmation prompt lists before summing up
8
+ * the rest. A first deploy of a large project would otherwise scroll its own
9
+ * question off the screen. Deletions are never summarized away: they are the
10
+ * part of a plan that loses data, so every one of them is named.
11
+ */
12
+ const MAX_LISTED_CHANGES = 20;
13
+ /**
14
+ * Largest value the agent envelope carries inline, serialized. Repeating a
15
+ * whole script, response body or environment-variable list in a confirmation
16
+ * envelope helps nobody and can be megabytes; what is left in its place says
17
+ * how long it was.
18
+ */
19
+ const MAX_INLINE_VALUE = 256;
20
+ /** A relation the project does not manage, which this deploy will delete. */
21
+ export function isPrunedRelation(entry) {
22
+ return entry.action === 'DELETE' && entry.origin === 'unmanaged';
23
+ }
24
+ /**
25
+ * True when every change reported on a resource is a relation the project does
26
+ * not manage. Checkly reports those on the owning check or group whether or not
27
+ * the deploy would delete them, and without `--prune-relations` it deletes
28
+ * nothing — so the resource itself is untouched and naming it as an update
29
+ * would describe a write that never happens.
30
+ */
31
+ export function onlyUnmanagedChanges(entry) {
32
+ return (entry.changes?.length ?? 0) > 0 && entry.changes.every(change => change.origin === 'unmanaged');
33
+ }
34
+ /**
35
+ * Entries worth showing: a resource the deploy touches. An `UNCHANGED` entry
36
+ * with no changes of its own is the converged case and says nothing, a relation
37
+ * folded into its parent is already reported there, and a resource whose only
38
+ * reported changes are unmanaged relations is not written either, unless the
39
+ * deploy writes it to set the baseline for later plans.
40
+ */
41
+ function reportable(entry, { foldedTypes }) {
42
+ // A relation the deploy would delete is reported on its own entry, folded
43
+ // into its parent for display. It is the one folded entry worth a line of its
44
+ // own: nothing else in the plan says which relations are about to go.
45
+ if (isPrunedRelation(entry)) {
46
+ return true;
47
+ }
48
+ if (entry.foldedInto !== undefined || foldedTypes.includes(entry.type)) {
49
+ return false;
50
+ }
51
+ // Whether or not the relations are pruned, the resource they hang off is not
52
+ // written: with `--prune-relations` the relation's own entry carries the line.
53
+ // Except when Checkly had no usable state from an earlier planned deploy and
54
+ // compared the resource with what is deployed (`basis: 'live'`): the deploy
55
+ // writes it whatever was found, so it is never "nothing to apply".
56
+ if (onlyUnmanagedChanges(entry) && entry.basis !== 'live') {
57
+ return false;
58
+ }
59
+ return entry.action !== 'UNCHANGED' || (entry.changes?.length ?? 0) > 0;
60
+ }
61
+ /**
62
+ * True when the plan gives the deploy nothing to write: no resource to create,
63
+ * update, delete or detach, and no relation to prune. Relations the project
64
+ * does not manage and is not pruning do not count, since the deploy leaves
65
+ * them alone.
66
+ */
67
+ export function planHasNoChanges(diff, options) {
68
+ return !diff.some(entry => reportable(entry, options));
69
+ }
70
+ function label(entry, { prettyTypes }) {
71
+ return `${prettyTypes[entry.type] ?? entry.type}: ${entry.logicalId}`;
72
+ }
73
+ /**
74
+ * One line per resource the deploy would touch, deletions first and in full,
75
+ * for the confirmation prompt and the agent envelope.
76
+ */
77
+ export function planChangeLines(diff, options) {
78
+ const shown = diff.filter(entry => reportable(entry, options));
79
+ const deletions = shown.filter(entry => entry.action === 'DELETE');
80
+ // `DETACHED` is what an API older than the deploy diff calls the same thing.
81
+ const detached = (entry) => entry.action === 'DETACH' || entry.action === 'DETACHED';
82
+ const detachments = shown.filter(detached);
83
+ const rest = shown.filter(entry => entry.action !== 'DELETE' && !detached(entry));
84
+ const lines = [
85
+ ...deletions.map(entry => (isPrunedRelation(entry)
86
+ // Not a resource the project declared, so it has no run history to lose;
87
+ // what it names is the check or group it hangs off, when the plan says.
88
+ ? `Delete the ${options.prettyTypes[entry.type] ?? entry.type} `
89
+ + (entry.foldedInto
90
+ ? `on ${options.prettyTypes[entry.foldedInto.type] ?? entry.foldedInto.type}: `
91
+ + `${entry.foldedInto.logicalId}, `
92
+ : `${entry.logicalId}, `)
93
+ + 'which this project does not manage'
94
+ : `Permanently delete ${label(entry, options)}, losing its run history`)),
95
+ ...detachments.map(entry => `Keep ${label(entry, options)} in your Checkly account, managed from the web app`),
96
+ ...rest.slice(0, MAX_LISTED_CHANGES).map(entry => {
97
+ const verb = entry.action === 'CREATE' ? 'Create' : 'Update';
98
+ return `${verb} ${label(entry, options)}`;
99
+ }),
100
+ ];
101
+ const hidden = rest.length - Math.min(rest.length, MAX_LISTED_CHANGES);
102
+ if (hidden > 0) {
103
+ lines.push(`Create or update ${hidden} more resource(s); run with --preview to see them all`);
104
+ }
105
+ return lines;
106
+ }
107
+ /**
108
+ * A value small enough to carry, or `{ $omitted: <length> }` in its place.
109
+ */
110
+ function reduceValue(value) {
111
+ if (value === null || value === undefined || typeof value === 'boolean' || typeof value === 'number') {
112
+ return value;
113
+ }
114
+ // Not only strings: a leaf can be a whole collection (a check group's
115
+ // environment variables, a status page's cards), and one of those holding a
116
+ // large value would otherwise go into the envelope in full.
117
+ const size = typeof value === 'string' ? value.length : JSON.stringify(value)?.length ?? 0;
118
+ return size > MAX_INLINE_VALUE ? { $omitted: size } : value;
119
+ }
120
+ function reduceChange(change) {
121
+ return {
122
+ ...change,
123
+ ...'before' in change ? { before: reduceValue(change.before) } : {},
124
+ ...'after' in change ? { after: reduceValue(change.after) } : {},
125
+ ...change.remote !== undefined
126
+ ? {
127
+ remote: {
128
+ ...'before' in change.remote ? { before: reduceValue(change.remote.before) } : {},
129
+ ...'after' in change.remote ? { after: reduceValue(change.remote.after) } : {},
130
+ },
131
+ }
132
+ : {},
133
+ };
134
+ }
135
+ /**
136
+ * The plan as the agent envelope carries it: every entry and every changed
137
+ * property, but without the resources' full current state and without the
138
+ * large values the rendered diff needs. Rendering happens in the terminal
139
+ * output; the envelope is there to be read, and it is the same plan, pinned by
140
+ * the same `planToken`.
141
+ */
142
+ export function reducePlanForAgent(diff) {
143
+ return diff.map(entry => {
144
+ const reduced = { ...entry };
145
+ // The rule table is applied to `before`; without the state, it is dead weight.
146
+ delete reduced.before;
147
+ delete reduced.redactions;
148
+ if (entry.changes !== undefined) {
149
+ reduced.changes = entry.changes.map(reduceChange);
150
+ }
151
+ return reduced;
152
+ });
153
+ }
154
+ //# sourceMappingURL=plan-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-summary.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/plan-summary.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,EAAE,CAAA;AAE7B;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAS5B,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAAE,KAAgB;IAChD,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,CAAA;AAClE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAE,KAAgB;IACpD,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,OAAQ,CAAC,KAAK,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61 @@
1
+ import { Project } from '../../constructs/index.js';
2
+ import type { DeployResourceSync, DiffEntry } from '../../rest/projects.js';
3
+ import { type RenderedLine } from './render.js';
4
+ /**
5
+ * The text `checkly deploy` prints for a plan: what `--preview` shows, what
6
+ * `--output` prints after a deploy, and what a deploy refused for a stale plan
7
+ * prints in its place. Shaped like a plan: an overview of every touched
8
+ * resource with a marker per action, the construct diff of each updated
9
+ * resource, and the totals. The markers carry the meaning; colour is for a
10
+ * terminal and chalk drops it for a pipe or under `NO_COLOR`.
11
+ */
12
+ export declare enum ResourceDeployStatus {
13
+ UPDATE = "UPDATE",
14
+ CREATE = "CREATE",
15
+ DELETE = "DELETE",
16
+ DETACH = "DETACH",
17
+ DETACHED = "DETACHED",
18
+ UNCHANGED = "UNCHANGED"
19
+ }
20
+ /** How a resource type reads when there is no construct to name it by (a deleted resource, a relation). */
21
+ export declare const PRETTY_RESOURCE_TYPES: Record<string, string>;
22
+ export declare const NON_REPORTED_TYPES: string[];
23
+ export interface PreviewOutputInput {
24
+ /** The heading line; none when the lines that follow name the deploy already. */
25
+ heading?: {
26
+ title: string;
27
+ projectName: string;
28
+ accountName?: string;
29
+ };
30
+ diff: DiffEntry[];
31
+ /** The plan was carried out: the totals read as what happened, not what would. */
32
+ done?: boolean;
33
+ project: Project;
34
+ /** Print each resource's name and id under its row. */
35
+ verbose?: boolean;
36
+ /** Whether this deploy deletes the relations it does not manage. */
37
+ pruneRelations?: boolean;
38
+ /**
39
+ * The preview plan with each changed resource's deployed state, and the
40
+ * local payload it was computed for: with these, every updated resource
41
+ * prints the diff of its construct as deployed against as in code.
42
+ */
43
+ rendering?: {
44
+ plan: DiffEntry[];
45
+ local: DeployResourceSync[];
46
+ };
47
+ /** Printed with the command that deploys exactly this plan. */
48
+ planToken?: string;
49
+ }
50
+ export declare const MARKER: {
51
+ create: string;
52
+ update: string;
53
+ delete: string;
54
+ detach: string;
55
+ prune: string;
56
+ warn: string;
57
+ skip: string;
58
+ };
59
+ export declare function formatPreview(input: PreviewOutputInput): string;
60
+ /** One rendered line with its marker and colour; a nested line sits two columns further in. */
61
+ export declare function styled(line: RenderedLine): string;