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,317 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { ConstructCodegen } from '../../constructs/construct-codegen.js';
3
+ import { Context, renderConstruct } from '../../constructs/internal/codegen/index.js';
4
+ import { Program } from '../../sourcegen/index.js';
5
+ import { blankRedacted, carriesMarker, fillUnchangedFromBefore, isMaskedMarker, markChanged, MASK, nodeAt, pointerSegments, UNRENDERED_KEYS, registerProject, registerUnderCodeName, relationResourcesForAfter, relationResourcesFromBefore, toImportResource, UnshapeableError, } from './import-shape.js';
6
+ import { isShapeChangePath } from './shape-changes.js';
7
+ import { diffLines } from './diff-lines.js';
8
+ const note = (text) => ({ kind: 'note', text });
9
+ /** The line with its text transformed, whichever kind it is. */
10
+ function mapText(line, fn) {
11
+ if (line.kind === 'nested') {
12
+ return { kind: 'nested', line: { ...line.line, text: fn(line.line.text) } };
13
+ }
14
+ return { ...line, text: fn(line.text) };
15
+ }
16
+ const textOf = (line) => line.kind === 'nested' ? line.line.text : line.text;
17
+ const INLINE_VALUE_CAP = 256;
18
+ /**
19
+ * Properties a codegen writes to a file of its own rather than into the
20
+ * construct — a browser or multi-step check's script to a spec file, an API
21
+ * check's setup and teardown scripts to support files, a dashboard's CSS to
22
+ * a style file — leaving an `entrypoint` path behind. A change to one is
23
+ * invisible in the construct diff and is shown as a text diff of its own,
24
+ * whether or not the constructs differ too.
25
+ */
26
+ const OUTSIDE_CONSTRUCT = {
27
+ check: new Set(['/script', '/localSetupScript', '/localTearDownScript']),
28
+ dashboard: new Set(['/customCSS']),
29
+ };
30
+ function isOutsideConstruct(type, path) {
31
+ return OUTSIDE_CONSTRUCT[type]?.has(path) ?? false;
32
+ }
33
+ /**
34
+ * Whether a redaction rule reaches the path a secret change names: the two
35
+ * agree segment for segment as far as the shorter goes, a rule's `*` standing
36
+ * for any one segment. A rule under the path blanks inside the list the
37
+ * change reports whole; a rule above it blanks the object that holds it.
38
+ */
39
+ function ruleReaches(rulePath, changePath) {
40
+ const rule = pointerSegments(rulePath);
41
+ const change = pointerSegments(changePath);
42
+ const shared = Math.min(rule.length, change.length);
43
+ for (let index = 0; index < shared; index += 1) {
44
+ if (rule[index] !== '*' && rule[index] !== change[index]) {
45
+ return false;
46
+ }
47
+ }
48
+ return true;
49
+ }
50
+ function isHash(value) {
51
+ return typeof value === 'object' && value !== null && !Array.isArray(value) && '$hash' in value;
52
+ }
53
+ /** A marker spelled the way the construct prints it. */
54
+ const spellMarker = (_key, member) => (isMaskedMarker(member) ? (member.$masked === 'changed' ? `${MASK} (changed)` : MASK) : member);
55
+ function inline(value) {
56
+ if (value === undefined) {
57
+ return '(absent)';
58
+ }
59
+ if (isHash(value)) {
60
+ return '(content)';
61
+ }
62
+ const text = JSON.stringify(value, spellMarker);
63
+ return text.length > INLINE_VALUE_CAP ? `${text.slice(0, INLINE_VALUE_CAP)}…` : text;
64
+ }
65
+ /** The value at an RFC 6901 pointer, or undefined when the path does not resolve. */
66
+ const valueAt = (root, pointer) => nodeAt(root, pointerSegments(pointer));
67
+ function originNote(change) {
68
+ switch (change.origin) {
69
+ case 'remote':
70
+ return ' (changed in Checkly, overwritten by this deploy)';
71
+ case 'both':
72
+ return ' (also changed in Checkly, overwritten by this deploy)';
73
+ case 'unmanaged':
74
+ return ' (not managed by this project)';
75
+ default:
76
+ return '';
77
+ }
78
+ }
79
+ /** One change as a line of the listing: path, values, and where it came from. */
80
+ function listChange(change) {
81
+ if (change.cause !== undefined) {
82
+ return `${change.path}: changed (${change.cause})${originNote(change)}`;
83
+ }
84
+ return `${change.path}: ${inline(change.before)} -> ${inline(change.after)}${originNote(change)}`;
85
+ }
86
+ function listing(changes, reason) {
87
+ const lines = reason === undefined ? [] : [{ kind: 'reason', text: `(${reason})` }];
88
+ for (const change of changes) {
89
+ lines.push(note(listChange(change)));
90
+ }
91
+ return lines;
92
+ }
93
+ /**
94
+ * The import codegen, with the rendered construct's own variable named as in
95
+ * the user's code, or else after its logical id, on both sides.
96
+ */
97
+ class SideCodegen extends ConstructCodegen {
98
+ variableNames;
99
+ constructor(program, variableNames) {
100
+ super(program);
101
+ this.variableNames = variableNames;
102
+ }
103
+ prepare(logicalId, resource, context) {
104
+ super.prepare(logicalId, resource, context);
105
+ registerUnderCodeName(context, resource, this.variableNames);
106
+ }
107
+ }
108
+ /** A side of the comparison rendered to source text, with its relations registered first. */
109
+ function renderSide(resource, relations, project, ids, maskedValues, variableNames, spelledOut) {
110
+ const program = new Program({
111
+ rootDirectory: '.',
112
+ constructFileSuffix: '.check',
113
+ specFileSuffix: '.spec',
114
+ language: 'typescript',
115
+ });
116
+ const context = new Context({ maskedValues, spelledOut });
117
+ const codegen = new SideCodegen(program, variableNames);
118
+ registerProject(context, program, project, ids, variableNames);
119
+ for (const relation of relations) {
120
+ codegen.prepare(relation.logicalId, relation, context);
121
+ }
122
+ return renderConstruct(codegen, resource.logicalId, resource, { context });
123
+ }
124
+ /**
125
+ * The text diff of a change whose values are content (a script, a body): the
126
+ * deployed text read from `before` at the same pointer, the local text from
127
+ * the local payload. Either side missing means the pointer is spelled
128
+ * differently in the two vocabularies, and only the fact is reported.
129
+ */
130
+ function contentDiff(change, before, local, maxLines) {
131
+ const deployed = valueAt(before, change.path);
132
+ const current = valueAt(local, change.path);
133
+ if (typeof deployed !== 'string' || typeof current !== 'string') {
134
+ return [note(`${change.path}: content changed${originNote(change)}`)];
135
+ }
136
+ const lines = diffLines(deployed, current, { maxLines });
137
+ if (lines === undefined) {
138
+ return [note(`${change.path}: content changed (too large to show)${originNote(change)}`)];
139
+ }
140
+ const nested = lines.map((line) => ({ kind: 'nested', line }));
141
+ return [note(`${change.path}:${originNote(change)}`), ...nested];
142
+ }
143
+ export function renderResourceDiff(input) {
144
+ const { entry, local, localResources, diff, project, ids, ...options } = input;
145
+ const { pruneRelations, variableNames, spelledOut, maxLines } = options;
146
+ const lines = [];
147
+ const changes = entry.changes ?? [];
148
+ // A secret is shown inline, masked, with `(changed)` on the element the
149
+ // report marks; a secret change whose mark could not be placed (no
150
+ // markers reported, an element the payload does not hold, a position the
151
+ // rules blank to null) is named after the block instead, so a secret's
152
+ // movement is visible exactly once. The block is rendered for a secret
153
+ // change even when nothing else is reported, since the API reports the
154
+ // list holding a moved secret whole, plain siblings' edits included.
155
+ const shown = changes.filter(change => change.secret !== true);
156
+ const marked = new Set();
157
+ try {
158
+ lines.push(...renderShown(shown, marked, entry, local, localResources, diff, project, ids, { pruneRelations, variableNames, spelledOut, maxLines }));
159
+ }
160
+ catch (cause) {
161
+ // A payload this CLI cannot shape like an import resource, a codegen that
162
+ // does not cover the type, a script it cannot
163
+ // parse, a construct it refuses: the listing says what changed even when
164
+ // the rendering cannot.
165
+ const reason = cause instanceof UnshapeableError
166
+ ? cause.message
167
+ : `could not render this resource: ${cause instanceof Error ? cause.message : cause}`;
168
+ if (shown.length > 0) {
169
+ lines.push(...listing(shown, reason));
170
+ }
171
+ }
172
+ for (const change of changes) {
173
+ if (change.secret !== true) {
174
+ continue;
175
+ }
176
+ if (!marked.has(change)) {
177
+ lines.push(note(`secret changed: ${change.path}${originNote(change)}`));
178
+ }
179
+ else if (originNote(change) !== '') {
180
+ // The inline mark says which secret moved; the note says the deploy overwrites it.
181
+ lines.push(note(`${change.path}:${originNote(change)}`));
182
+ }
183
+ }
184
+ return lines;
185
+ }
186
+ /** The reported side a mark is read from: the local side follows the code's movement, the deployed side the backend's. */
187
+ function reportedFor(change, side) {
188
+ if (side === 'local') {
189
+ return change.origin === 'code' || change.origin === 'both' ? change.after : undefined;
190
+ }
191
+ return change.origin === 'both' ? change.remote?.after : change.origin === 'remote' ? change.after : undefined;
192
+ }
193
+ function renderShown(shown, marked, entry, local, localResources, diff, project, ids, options) {
194
+ const { pruneRelations, variableNames, spelledOut, maxLines } = options;
195
+ // A secret change withholds the list it is in whole, plain siblings' edits
196
+ // included, so the construct diff — both sides blanked — is the only place
197
+ // such an edit shows: an entry with a secret change is rendered even when
198
+ // nothing else is reported, and a cause alone does not stand in for it.
199
+ // Rendered only when a reported rule reaches every secret's path, though:
200
+ // the local side's blanks come from that table, and a gap in it must not
201
+ // print what the API withheld.
202
+ const secrets = (entry.changes ?? []).filter(change => change.secret === true);
203
+ const withSecrets = secrets.length > 0;
204
+ if (shown.length === 0 && !withSecrets) {
205
+ return [];
206
+ }
207
+ if (!withSecrets && shown.every(change => change.cause !== undefined)) {
208
+ return [note(`changed: ${[...new Set(shown.map(change => change.cause))].join(', ')}`)];
209
+ }
210
+ // A change that is secret or carries a marker (a reorder of a list holding
211
+ // one) is rendered only when a reported rule reaches its path.
212
+ const guarded = (entry.changes ?? []).filter(change => change.secret === true
213
+ || carriesMarker(change.before) || carriesMarker(change.after) || carriesMarker(change.remote));
214
+ if (!guarded.every(change => (entry.redactions ?? []).some(rule => ruleReaches(rule.path, change.path)))) {
215
+ return listing(shown);
216
+ }
217
+ if (entry.before === undefined || local === undefined || local.payload === null || local.payload === undefined) {
218
+ return listing(shown);
219
+ }
220
+ const { type, logicalId } = entry;
221
+ // The deployed side is the import format already, straight from the API,
222
+ // less what neither side renders — dropped before the local side is filled
223
+ // from it, so the fill cannot copy it across.
224
+ const before = { ...entry.before };
225
+ for (const key of UNRENDERED_KEYS) {
226
+ delete before[key];
227
+ }
228
+ // Both sides masked by the same rules; the deployed side arrives blanked.
229
+ // A copy, since the marks are written in place and `entry.before` is
230
+ // read again for relations and text diffs.
231
+ const deployed = {
232
+ type: type,
233
+ logicalId,
234
+ payload: blankRedacted(structuredClone(before), entry.redactions),
235
+ };
236
+ // Shaped first, then filled with what the deploy leaves as it is, masked
237
+ // last: the rules are spelled in the import format's vocabulary, which is
238
+ // what the shaped payload is in.
239
+ const shaped = toImportResource(deployed.type, logicalId, local.payload, ids);
240
+ fillUnchangedFromBefore(shaped.payload, before, entry.changes ?? []);
241
+ const after = { ...shaped, payload: blankRedacted(shaped.payload, entry.redactions) };
242
+ // Then the marks: the element whose secret moved reads `(changed)` on the
243
+ // side that moved it, so the diff names the secret beside its key. Each
244
+ // change writes its own sentinel, unguessable by any value the account or
245
+ // the code could hold, so only a change whose sentinel reached the returned
246
+ // lines counts as marked; the sentinels read `(changed)` in the output.
247
+ // The codegen prints a secret only as one of these strings. The two labels
248
+ // end alike (`#<nonce>-<index>)`): a codegen that names a file or variable
249
+ // after the tail of a credential (an unnamed Slack or PagerDuty channel
250
+ // takes the last four characters of its URL or key) then derives the same
251
+ // name on both sides, and the diff stays free of a spurious rename.
252
+ const nonce = randomUUID();
253
+ const sentinels = new Map();
254
+ secrets.forEach((change, index) => {
255
+ const localLabel = `${MASK} (changed#${nonce}-${index})`;
256
+ const deployedLabel = `${MASK} (changed in Checkly#${nonce}-${index})`;
257
+ const onLocal = markChanged(after.payload, change.path, reportedFor(change, 'local'), localLabel);
258
+ const onDeployed = markChanged(deployed.payload, change.path, reportedFor(change, 'deployed'), deployedLabel);
259
+ if (onLocal || onDeployed) {
260
+ sentinels.set(change, { local: localLabel, deployed: deployedLabel });
261
+ }
262
+ });
263
+ const maskedValues = new Set([MASK, ...[...sentinels.values()].flatMap(pair => [pair.local, pair.deployed])]);
264
+ const showing = (lines) => {
265
+ for (const [change, pair] of sentinels) {
266
+ if (lines.some(line => textOf(line).includes(pair.local) || textOf(line).includes(pair.deployed))) {
267
+ marked.add(change);
268
+ }
269
+ }
270
+ const sentinel = new RegExp(` \\(changed( in Checkly)?#${nonce}-\\d+\\)`, 'g');
271
+ return lines.map(line => mapText(line, text => text.replace(sentinel, ' (changed$1)')));
272
+ };
273
+ const afterRelations = relationResourcesForAfter({ ids, local: localResources, entry, diff, pruneRelations });
274
+ const beforeRelations = relationResourcesFromBefore(type, entry.before);
275
+ const beforeText = renderSide(deployed, beforeRelations, project, ids, maskedValues, variableNames, spelledOut);
276
+ const afterText = renderSide(after, afterRelations, project, ids, maskedValues, variableNames, spelledOut);
277
+ const rendered = diffLines(beforeText, afterText, { maxLines });
278
+ if (rendered === undefined) {
279
+ return shown.length > 0 ? listing(shown, 'the construct diff is too large to show') : [];
280
+ }
281
+ if (rendered.length > 0) {
282
+ // The constructs differ. What they cannot show follows: a property kept
283
+ // in a file of its own as a text diff, and a change that is only a cause
284
+ // (a new code bundle, a dependency list) as a line.
285
+ const lines = [...rendered];
286
+ for (const change of shown) {
287
+ if (isOutsideConstruct(type, change.path)) {
288
+ lines.push(...contentDiff(change, entry.before, local.payload, maxLines));
289
+ }
290
+ else if (change.cause !== undefined) {
291
+ lines.push(note(listChange(change)));
292
+ }
293
+ }
294
+ return showing(lines);
295
+ }
296
+ // The renderings agree. When every change is a known shape change, that is
297
+ // the CLI upgrade spelling the same construct differently; the paths alone
298
+ // cannot tell an upgrade from a user editing the same property, so a real
299
+ // edit shows up as construct lines above and never gets here.
300
+ if (shown.length > 0 && shown.every(change => change.origin === 'code' && isShapeChangePath(change.path))) {
301
+ return [note('payload format changed (CLI upgrade)')];
302
+ }
303
+ // Otherwise what changed lives outside the construct (a script in its own
304
+ // file, a request body), or is a value the codegen elides.
305
+ const lines = [];
306
+ for (const change of shown) {
307
+ const hashed = isHash(change.before) || isHash(change.after) || isHash(change.remote?.after);
308
+ if (hashed || isOutsideConstruct(type, change.path)) {
309
+ lines.push(...contentDiff(change, entry.before, local.payload, maxLines));
310
+ }
311
+ else {
312
+ lines.push(note(listChange(change)));
313
+ }
314
+ }
315
+ return lines;
316
+ }
317
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,E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AC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC1G,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC,CAAA;IACvD,CAAC;IACD,0EAA0E;IAC1E,2DAA2D;IAC3D,MAAM,KAAK,GAAmB,EAAE,CAAA;IAChC,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC5F,IAAI,MAAM,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACpD,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAA;QAC3E,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACtC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Whether a reported change path is one of the known shape changes, or lies under one. */
2
+ export declare function isShapeChangePath(path: string): boolean;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Leaf paths whose difference is a CLI upgrade changing how a payload is
3
+ * spelled, not a user editing a construct: private locations moving from an
4
+ * inline list to assignment resources, `doubleCheck` becoming a retry
5
+ * strategy, alert settings and parallel scheduling moving to the v2 group
6
+ * defaults. After such an upgrade every affected resource reports a
7
+ * code-origin change once and rewrites its snapshot; rather than render a
8
+ * property diff of two spellings of the same thing, the preview says so.
9
+ *
10
+ * An enumerated list, extended with each shape change. It carries no copy of
11
+ * any backend default: membership is by path alone, which is why the
12
+ * renderer consults it only once the two renderings agree — a user editing
13
+ * one of these properties differs in the construct, and prints as that.
14
+ */
15
+ const SHAPE_CHANGE_PATHS = new Set([
16
+ '/privateLocations',
17
+ '/doubleCheck',
18
+ '/retryStrategy',
19
+ '/alertSettings',
20
+ '/useGlobalAlertSettings',
21
+ '/runParallel',
22
+ ]);
23
+ /** Whether a reported change path is one of the known shape changes, or lies under one. */
24
+ export function isShapeChangePath(path) {
25
+ if (SHAPE_CHANGE_PATHS.has(path)) {
26
+ return true;
27
+ }
28
+ for (const known of SHAPE_CHANGE_PATHS) {
29
+ if (path.startsWith(`${known}/`)) {
30
+ return true;
31
+ }
32
+ }
33
+ return false;
34
+ }
35
+ //# sourceMappingURL=shape-changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape-changes.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/shape-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IACtD,mBAAmB;IACnB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,yBAAyB;IACzB,cAAc;CACf,CAAC,CAAA;AAEF,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB,CAAE,IAAY;IAC7C,IAAI,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,kBAAkB,EAAE,CAAC;QACvC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { TSESTree } from '@typescript-eslint/typescript-estree';
2
+ import type { Construct } from '../../constructs/construct.js';
3
+ import { type ParsedSource } from '../write-back/source-file.js';
4
+ /**
5
+ * The project's source files as the deploy plan reads them, each parsed
6
+ * once however many constructs it declares. Everything here is best effort:
7
+ * a file that cannot be read or parsed, or a construct whose declaration
8
+ * cannot be found in it, yields `undefined`, and the plan renders without
9
+ * what the source would have told it.
10
+ */
11
+ export declare class SourceIndex {
12
+ #private;
13
+ source(filePath: string): ParsedSource | undefined;
14
+ /** The options literal of the construct's `new <Class>('<logicalId>', { … })` in the file that declares it. */
15
+ options(construct: Construct): TSESTree.ObjectExpression | undefined;
16
+ /** The properties the construct's declaration spells out (`ContextOptions.spelledOut`), when it can be read. */
17
+ spelledOut(construct: Construct): ReadonlySet<string> | undefined;
18
+ }
@@ -0,0 +1,48 @@
1
+ import fs from 'node:fs';
2
+ import { exportedNamesOf, findConstructOptions, parseSource, spelledOutPaths, WriteBackSkipped, } from '../write-back/source-file.js';
3
+ /**
4
+ * The project's source files as the deploy plan reads them, each parsed
5
+ * once however many constructs it declares. Everything here is best effort:
6
+ * a file that cannot be read or parsed, or a construct whose declaration
7
+ * cannot be found in it, yields `undefined`, and the plan renders without
8
+ * what the source would have told it.
9
+ */
10
+ export class SourceIndex {
11
+ #sources = new Map();
12
+ source(filePath) {
13
+ if (!this.#sources.has(filePath)) {
14
+ let source;
15
+ try {
16
+ source = parseSource(filePath, fs.readFileSync(filePath, 'utf8'));
17
+ }
18
+ catch {
19
+ // A file that cannot be read or parsed tells nothing.
20
+ }
21
+ this.#sources.set(filePath, source);
22
+ }
23
+ return this.#sources.get(filePath);
24
+ }
25
+ /** The options literal of the construct's `new <Class>('<logicalId>', { … })` in the file that declares it. */
26
+ options(construct) {
27
+ const filePath = construct.checkFileAbsolutePath;
28
+ const source = filePath !== undefined ? this.source(filePath) : undefined;
29
+ if (source === undefined) {
30
+ return undefined;
31
+ }
32
+ try {
33
+ return findConstructOptions(source, construct.logicalId, exportedNamesOf(construct));
34
+ }
35
+ catch (err) {
36
+ if (err instanceof WriteBackSkipped) {
37
+ return undefined;
38
+ }
39
+ throw err;
40
+ }
41
+ }
42
+ /** The properties the construct's declaration spells out (`ContextOptions.spelledOut`), when it can be read. */
43
+ spelledOut(construct) {
44
+ const options = this.options(construct);
45
+ return options === undefined ? undefined : spelledOutPaths(options);
46
+ }
47
+ }
48
+ //# sourceMappingURL=source-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-index.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/source-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AAKxB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,WAAW,EAEX,eAAe,EACf,gBAAgB,GACjB,MAAM,8BAA8B,CAAA;AAErC;;;;;;GAMG;AACH,MAAM,OAAO,WAAW;IACb,QAAQ,GAAG,IAAI,GAAG,EAAoC,CAAA;IAE/D,MAAM,CAAE,QAAgB;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,IAAI,MAAgC,CAAA;YACpC,IAAI,CAAC;gBACH,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;YACnE,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;YACxD,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QACrC,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC;IAED,+GAA+G;IAC/G,OAAO,CAAE,SAAoB;QAC3B,MAAM,QAAQ,GAAG,SAAS,CAAC,qBAAqB,CAAA;QAChD,MAAM,MAAM,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACzE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,IAAI,CAAC;YACH,OAAO,oBAAoB,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAA;QACtF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,gBAAgB,EAAE,CAAC;gBACpC,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,MAAM,GAAG,CAAA;QACX,CAAC;IACH,CAAC;IAED,gHAAgH;IAChH,UAAU,CAAE,SAAoB;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QACvC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IACrE,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ import type { Project } from '../../constructs/project.js';
2
+ import { type ConstructExport } from '../../constructs/session.js';
3
+ import { SourceIndex } from './source-index.js';
4
+ /** The variable each construct goes by in the user's code, keyed like `PhysicalIds` (`idKey`). */
5
+ export type VariableNames = ReadonlyMap<string, string>;
6
+ /**
7
+ * The name each referenceable construct of the project (a group, an alert
8
+ * channel, a private location, a status page and its parts) has in the
9
+ * user's code, so a deploy preview refers to it the way the code does rather
10
+ * than by a name generated from its logical id.
11
+ *
12
+ * The name the file that creates the construct exports it by comes first: it
13
+ * is what another file imports the construct by, and it is known however the
14
+ * construct was made. A file that exports the construct by several names
15
+ * settles it with the one its declaration uses. Check files are the only
16
+ * files whose exports are seen, so for the rest (a construct declared in a
17
+ * shared module, or one that is not exported) the name is read from the
18
+ * declaration in the file that creates the construct. An export from some
19
+ * other check file, which passes the construct on under a name of its own,
20
+ * comes last. A construct with none of these is left out and keeps its
21
+ * generated name.
22
+ *
23
+ * The name is the one where the construct is made. A file that imports the
24
+ * construct under an alias, or reaches it through a namespace, still calls
25
+ * it something else. And two constructs that go by the same name in
26
+ * different files cannot both have it in one rendered construct: the second
27
+ * one registered gets a counter (`group`, `group2`), the same on both sides
28
+ * of a comparison.
29
+ */
30
+ export declare function constructVariableNames(project: Project, exports?: readonly ConstructExport[], sources?: SourceIndex): VariableNames;
@@ -0,0 +1,64 @@
1
+ import { Session } from '../../constructs/session.js';
2
+ import { exportedNamesOf, findConstructVariable, IDENTIFIER } from '../write-back/source-file.js';
3
+ import { idKey, REFERENCEABLE_TYPES } from './import-shape.js';
4
+ import { SourceIndex } from './source-index.js';
5
+ /**
6
+ * The name each referenceable construct of the project (a group, an alert
7
+ * channel, a private location, a status page and its parts) has in the
8
+ * user's code, so a deploy preview refers to it the way the code does rather
9
+ * than by a name generated from its logical id.
10
+ *
11
+ * The name the file that creates the construct exports it by comes first: it
12
+ * is what another file imports the construct by, and it is known however the
13
+ * construct was made. A file that exports the construct by several names
14
+ * settles it with the one its declaration uses. Check files are the only
15
+ * files whose exports are seen, so for the rest (a construct declared in a
16
+ * shared module, or one that is not exported) the name is read from the
17
+ * declaration in the file that creates the construct. An export from some
18
+ * other check file, which passes the construct on under a name of its own,
19
+ * comes last. A construct with none of these is left out and keeps its
20
+ * generated name.
21
+ *
22
+ * The name is the one where the construct is made. A file that imports the
23
+ * construct under an alias, or reaches it through a namespace, still calls
24
+ * it something else. And two constructs that go by the same name in
25
+ * different files cannot both have it in one rendered construct: the second
26
+ * one registered gets a counter (`group`, `group2`), the same on both sides
27
+ * of a comparison.
28
+ */
29
+ export function constructVariableNames(project, exports = Session.constructExports, sources = new SourceIndex()) {
30
+ const names = new Map();
31
+ for (const type of REFERENCEABLE_TYPES) {
32
+ for (const [logicalId, construct] of Object.entries(project.data[type])) {
33
+ // A reference construct (`fromId(...)`) is rendered as the reference it is.
34
+ if (construct.member === false) {
35
+ continue;
36
+ }
37
+ const declaredIn = construct.checkFileAbsolutePath;
38
+ const exported = exports
39
+ .filter(candidate => candidate.type === type && candidate.logicalId === logicalId
40
+ && candidate.exportName !== 'default' && IDENTIFIER.test(candidate.exportName));
41
+ const own = exported.filter(candidate => candidate.filePath === declaredIn).map(({ exportName }) => exportName);
42
+ const declared = () => {
43
+ const source = declaredIn !== undefined ? sources.source(declaredIn) : undefined;
44
+ return source && findConstructVariable(source, logicalId, exportedNamesOf(construct));
45
+ };
46
+ let name;
47
+ if (own.length === 1) {
48
+ name = own[0];
49
+ }
50
+ else if (own.length > 1) {
51
+ const variable = declared();
52
+ name = variable !== undefined && own.includes(variable) ? variable : own[0];
53
+ }
54
+ else {
55
+ name = declared() ?? exported[0]?.exportName;
56
+ }
57
+ if (name !== undefined) {
58
+ names.set(idKey(type, logicalId), name);
59
+ }
60
+ }
61
+ }
62
+ return names;
63
+ }
64
+ //# sourceMappingURL=variable-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variable-names.js","sourceRoot":"","sources":["../../../src/services/deploy-diff/variable-names.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAK/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAgB,EAChB,UAAsC,OAAO,CAAC,gBAAgB,EAC9D,UAAuB,IAAI,WAAW,EAAE;IAExC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAA;IACvC,KAAK,MAAM,IAAI,IAAI,mBAAmB,EAAE,CAAC;QACvC,KAAK,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACxE,4E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AAC,CAAC,CAAC,CAAA;YAC7E,CAAC;iBAAM,CAAC;gBACN,IAAI,GAAG,QAAQ,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,CAAA;YAC9C,CAAC;YACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,CAAA;YACzC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -26,6 +26,11 @@ type ProjectParseOpts = {
26
26
  loadPlaywrightChecksOnly?: boolean;
27
27
  warnOnWebServerConfig?: boolean;
28
28
  enableWorkspaces?: boolean;
29
+ /**
30
+ * Warn about checks that have no location to run on. Only meaningful for
31
+ * commands that deploy the project, or validate it for deployment.
32
+ */
33
+ warnOnMissingCheckLocations?: boolean;
29
34
  };
30
35
  export declare function parseProject(opts: ProjectParseOpts): Promise<Project>;
31
36
  export {};