checkly 7.15.0 → 8.0.0
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.
- package/LICENSE +201 -0
- package/bin/run +5 -3
- package/dist/ai-context/checkly.rules.md +15 -8
- package/dist/ai-context/context.js +11 -14
- package/dist/ai-context/context.js.map +1 -1
- package/dist/ai-context/skills-command/references/configure-api-checks.md +11 -6
- package/dist/ai-context/skills-command/references/configure-playwright-checks.md +2 -1
- package/dist/ai-context/skills-command/references/configure-supporting-constructs.md +1 -0
- package/dist/ai-context/skills-command/references/configure.md +1 -1
- package/dist/auth/index.js +17 -56
- package/dist/auth/index.js.map +1 -1
- package/dist/commands/account/members.d.ts +2 -2
- package/dist/commands/account/members.js +21 -60
- package/dist/commands/account/members.js.map +1 -1
- package/dist/commands/account/plan.d.ts +1 -1
- package/dist/commands/account/plan.js +16 -52
- package/dist/commands/account/plan.js.map +1 -1
- package/dist/commands/authCommand.d.ts +3 -3
- package/dist/commands/authCommand.js +11 -51
- package/dist/commands/authCommand.js.map +1 -1
- package/dist/commands/baseCommand.d.ts +2 -2
- package/dist/commands/baseCommand.js +15 -19
- package/dist/commands/baseCommand.js.map +1 -1
- package/dist/commands/checks/get.d.ts +1 -1
- package/dist/commands/checks/get.js +62 -101
- package/dist/commands/checks/get.js.map +1 -1
- package/dist/commands/checks/list.d.ts +1 -1
- package/dist/commands/checks/list.js +25 -64
- package/dist/commands/checks/list.js.map +1 -1
- package/dist/commands/checks/stats.d.ts +1 -1
- package/dist/commands/checks/stats.js +24 -60
- package/dist/commands/checks/stats.js.map +1 -1
- package/dist/commands/debug/parse-file.js +15 -21
- package/dist/commands/debug/parse-file.js.map +1 -1
- package/dist/commands/debug/parse-playwright-config.js +10 -16
- package/dist/commands/debug/parse-playwright-config.js.map +1 -1
- package/dist/commands/debug/parse-project.js +23 -29
- package/dist/commands/debug/parse-project.js.map +1 -1
- package/dist/commands/deploy.d.ts +1 -1
- package/dist/commands/deploy.js +49 -88
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/destroy.d.ts +1 -1
- package/dist/commands/destroy.js +16 -55
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/env/add.d.ts +1 -1
- package/dist/commands/env/add.js +10 -49
- package/dist/commands/env/add.js.map +1 -1
- package/dist/commands/env/ls.d.ts +1 -1
- package/dist/commands/env/ls.js +5 -41
- package/dist/commands/env/ls.js.map +1 -1
- package/dist/commands/env/pull.d.ts +1 -1
- package/dist/commands/env/pull.js +13 -52
- package/dist/commands/env/pull.js.map +1 -1
- package/dist/commands/env/rm.d.ts +1 -1
- package/dist/commands/env/rm.js +7 -43
- package/dist/commands/env/rm.js.map +1 -1
- package/dist/commands/env/update.d.ts +1 -1
- package/dist/commands/env/update.js +10 -49
- package/dist/commands/env/update.js.map +1 -1
- package/dist/commands/help.d.ts +1 -1
- package/dist/commands/help.js +4 -10
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/import/apply.d.ts +3 -3
- package/dist/commands/import/apply.js +28 -69
- package/dist/commands/import/apply.js.map +1 -1
- package/dist/commands/import/cancel.d.ts +1 -1
- package/dist/commands/import/cancel.js +14 -53
- package/dist/commands/import/cancel.js.map +1 -1
- package/dist/commands/import/commit.d.ts +3 -3
- package/dist/commands/import/commit.js +21 -62
- package/dist/commands/import/commit.js.map +1 -1
- package/dist/commands/import/plan.d.ts +1 -1
- package/dist/commands/import/plan.js +107 -147
- package/dist/commands/import/plan.js.map +1 -1
- package/dist/commands/incidents/create.d.ts +1 -1
- package/dist/commands/incidents/create.js +26 -65
- package/dist/commands/incidents/create.js.map +1 -1
- package/dist/commands/incidents/list.d.ts +1 -1
- package/dist/commands/incidents/list.js +19 -58
- package/dist/commands/incidents/list.js.map +1 -1
- package/dist/commands/incidents/resolve.d.ts +1 -1
- package/dist/commands/incidents/resolve.js +18 -57
- package/dist/commands/incidents/resolve.js.map +1 -1
- package/dist/commands/incidents/update.d.ts +1 -1
- package/dist/commands/incidents/update.js +25 -64
- package/dist/commands/incidents/update.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +45 -51
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.js +25 -66
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +1 -1
- package/dist/commands/logout.js +11 -17
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/pw-test.d.ts +4 -3
- package/dist/commands/pw-test.js +99 -126
- package/dist/commands/pw-test.js.map +1 -1
- package/dist/commands/rca/get.d.ts +1 -1
- package/dist/commands/rca/get.js +11 -47
- package/dist/commands/rca/get.js.map +1 -1
- package/dist/commands/rca/run.d.ts +4 -2
- package/dist/commands/rca/run.js +67 -69
- package/dist/commands/rca/run.js.map +1 -1
- package/dist/commands/rules.d.ts +1 -1
- package/dist/commands/rules.js +18 -55
- package/dist/commands/rules.js.map +1 -1
- package/dist/commands/runtimes.d.ts +1 -1
- package/dist/commands/runtimes.js +3 -39
- package/dist/commands/runtimes.js.map +1 -1
- package/dist/commands/skills/index.d.ts +1 -1
- package/dist/commands/skills/index.js +22 -23
- package/dist/commands/skills/index.js.map +1 -1
- package/dist/commands/skills/install.d.ts +1 -1
- package/dist/commands/skills/install.js +40 -49
- package/dist/commands/skills/install.js.map +1 -1
- package/dist/commands/status-pages/get.d.ts +1 -1
- package/dist/commands/status-pages/get.js +12 -51
- package/dist/commands/status-pages/get.js.map +1 -1
- package/dist/commands/status-pages/list.d.ts +1 -1
- package/dist/commands/status-pages/list.js +16 -52
- package/dist/commands/status-pages/list.js.map +1 -1
- package/dist/commands/switch.d.ts +1 -1
- package/dist/commands/switch.js +15 -54
- package/dist/commands/switch.js.map +1 -1
- package/dist/commands/sync-playwright.d.ts +1 -1
- package/dist/commands/sync-playwright.js +21 -60
- package/dist/commands/sync-playwright.js.map +1 -1
- package/dist/commands/test.d.ts +3 -2
- package/dist/commands/test.js +96 -122
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/trigger.d.ts +6 -5
- package/dist/commands/trigger.js +67 -93
- package/dist/commands/trigger.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.js +16 -55
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/whoami.d.ts +1 -1
- package/dist/commands/whoami.js +3 -39
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -4
- package/dist/config.js.map +1 -1
- package/dist/constants.js +3 -6
- package/dist/constants.js.map +1 -1
- package/dist/constructs/agentic-check-codegen.d.ts +2 -2
- package/dist/constructs/agentic-check-codegen.js +6 -10
- package/dist/constructs/agentic-check-codegen.js.map +1 -1
- package/dist/constructs/agentic-check.d.ts +8 -8
- package/dist/constructs/agentic-check.js +10 -14
- package/dist/constructs/agentic-check.js.map +1 -1
- package/dist/constructs/alert-channel-codegen.d.ts +9 -9
- package/dist/constructs/alert-channel-codegen.js +21 -27
- package/dist/constructs/alert-channel-codegen.js.map +1 -1
- package/dist/constructs/alert-channel-subscription-codegen.d.ts +1 -1
- package/dist/constructs/alert-channel-subscription-codegen.js +2 -6
- package/dist/constructs/alert-channel-subscription-codegen.js.map +1 -1
- package/dist/constructs/alert-channel-subscription.d.ts +2 -2
- package/dist/constructs/alert-channel-subscription.js +4 -8
- package/dist/constructs/alert-channel-subscription.js.map +1 -1
- package/dist/constructs/alert-channel.d.ts +2 -2
- package/dist/constructs/alert-channel.js +7 -12
- package/dist/constructs/alert-channel.js.map +1 -1
- package/dist/constructs/alert-escalation-policy-codegen.d.ts +2 -2
- package/dist/constructs/alert-escalation-policy-codegen.js +6 -9
- package/dist/constructs/alert-escalation-policy-codegen.js.map +1 -1
- package/dist/constructs/alert-escalation-policy.js +1 -5
- package/dist/constructs/alert-escalation-policy.js.map +1 -1
- package/dist/constructs/api-assertion-codegen.d.ts +2 -2
- package/dist/constructs/api-assertion-codegen.js +7 -10
- package/dist/constructs/api-assertion-codegen.js.map +1 -1
- package/dist/constructs/api-assertion.d.ts +1 -1
- package/dist/constructs/api-assertion.js +7 -11
- package/dist/constructs/api-assertion.js.map +1 -1
- package/dist/constructs/api-check-bundle.d.ts +10 -10
- package/dist/constructs/api-check-bundle.js +1 -5
- package/dist/constructs/api-check-bundle.js.map +1 -1
- package/dist/constructs/api-check-codegen.d.ts +3 -3
- package/dist/constructs/api-check-codegen.js +10 -14
- package/dist/constructs/api-check-codegen.js.map +1 -1
- package/dist/constructs/api-check.d.ts +15 -15
- package/dist/constructs/api-check.js +36 -43
- package/dist/constructs/api-check.js.map +1 -1
- package/dist/constructs/api-request-codegen.d.ts +3 -3
- package/dist/constructs/api-request-codegen.js +8 -11
- package/dist/constructs/api-request-codegen.js.map +1 -1
- package/dist/constructs/api-request.d.ts +5 -5
- package/dist/constructs/api-request.js +1 -2
- package/dist/constructs/browser-check-bundle.d.ts +11 -11
- package/dist/constructs/browser-check-bundle.js +1 -5
- package/dist/constructs/browser-check-bundle.js.map +1 -1
- package/dist/constructs/browser-check-codegen.d.ts +3 -3
- package/dist/constructs/browser-check-codegen.js +9 -13
- package/dist/constructs/browser-check-codegen.js.map +1 -1
- package/dist/constructs/browser-check.d.ts +14 -14
- package/dist/constructs/browser-check.js +29 -36
- package/dist/constructs/browser-check.js.map +1 -1
- package/dist/constructs/check-codegen.d.ts +16 -16
- package/dist/constructs/check-codegen.js +38 -44
- package/dist/constructs/check-codegen.js.map +1 -1
- package/dist/constructs/check-config.js +1 -4
- package/dist/constructs/check-config.js.map +1 -1
- package/dist/constructs/check-group-codegen.d.ts +7 -7
- package/dist/constructs/check-group-codegen.js +29 -34
- package/dist/constructs/check-group-codegen.js.map +1 -1
- package/dist/constructs/check-group-ref.d.ts +3 -3
- package/dist/constructs/check-group-ref.js +8 -12
- package/dist/constructs/check-group-ref.js.map +1 -1
- package/dist/constructs/check-group-v1.d.ts +15 -15
- package/dist/constructs/check-group-v1.js +37 -44
- package/dist/constructs/check-group-v1.js.map +1 -1
- package/dist/constructs/check-group-v2.d.ts +8 -8
- package/dist/constructs/check-group-v2.js +4 -8
- package/dist/constructs/check-group-v2.js.map +1 -1
- package/dist/constructs/check-group.d.ts +4 -4
- package/dist/constructs/check-group.js +4 -22
- package/dist/constructs/check-group.js.map +1 -1
- package/dist/constructs/check.d.ts +15 -15
- package/dist/constructs/check.js +23 -28
- package/dist/constructs/check.js.map +1 -1
- package/dist/constructs/construct-codegen.d.ts +13 -13
- package/dist/constructs/construct-codegen.js +25 -30
- package/dist/constructs/construct-codegen.js.map +1 -1
- package/dist/constructs/construct-diagnostics.d.ts +2 -2
- package/dist/constructs/construct-diagnostics.js +12 -26
- package/dist/constructs/construct-diagnostics.js.map +1 -1
- package/dist/constructs/construct.d.ts +3 -3
- package/dist/constructs/construct.js +15 -24
- package/dist/constructs/construct.js.map +1 -1
- package/dist/constructs/dashboard-bundle.d.ts +2 -2
- package/dist/constructs/dashboard-bundle.js +1 -5
- package/dist/constructs/dashboard-bundle.js.map +1 -1
- package/dist/constructs/dashboard-codegen.d.ts +1 -1
- package/dist/constructs/dashboard-codegen.js +4 -8
- package/dist/constructs/dashboard-codegen.js.map +1 -1
- package/dist/constructs/dashboard.d.ts +4 -4
- package/dist/constructs/dashboard.js +19 -26
- package/dist/constructs/dashboard.js.map +1 -1
- package/dist/constructs/diagnostics.js +5 -13
- package/dist/constructs/diagnostics.js.map +1 -1
- package/dist/constructs/dns-assertion-codegen.d.ts +2 -2
- package/dist/constructs/dns-assertion-codegen.js +6 -9
- package/dist/constructs/dns-assertion-codegen.js.map +1 -1
- package/dist/constructs/dns-assertion.d.ts +1 -1
- package/dist/constructs/dns-assertion.js +6 -10
- package/dist/constructs/dns-assertion.js.map +1 -1
- package/dist/constructs/dns-monitor-codegen.d.ts +3 -3
- package/dist/constructs/dns-monitor-codegen.js +8 -12
- package/dist/constructs/dns-monitor-codegen.js.map +1 -1
- package/dist/constructs/dns-monitor.d.ts +8 -8
- package/dist/constructs/dns-monitor.js +9 -13
- package/dist/constructs/dns-monitor.js.map +1 -1
- package/dist/constructs/dns-request-codegen.d.ts +3 -3
- package/dist/constructs/dns-request-codegen.js +5 -8
- package/dist/constructs/dns-request-codegen.js.map +1 -1
- package/dist/constructs/dns-request.d.ts +1 -1
- package/dist/constructs/dns-request.js +1 -2
- package/dist/constructs/email-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/email-alert-channel-codegen.js +7 -11
- package/dist/constructs/email-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/email-alert-channel.d.ts +1 -1
- package/dist/constructs/email-alert-channel.js +4 -8
- package/dist/constructs/email-alert-channel.js.map +1 -1
- package/dist/constructs/environment-variable.d.ts +1 -1
- package/dist/constructs/environment-variable.js +1 -2
- package/dist/constructs/frequency-codegen.d.ts +1 -1
- package/dist/constructs/frequency-codegen.js +21 -24
- package/dist/constructs/frequency-codegen.js.map +1 -1
- package/dist/constructs/frequency.js +1 -5
- package/dist/constructs/frequency.js.map +1 -1
- package/dist/constructs/heartbeat-monitor-codegen.d.ts +3 -3
- package/dist/constructs/heartbeat-monitor-codegen.js +6 -10
- package/dist/constructs/heartbeat-monitor-codegen.js.map +1 -1
- package/dist/constructs/heartbeat-monitor.d.ts +1 -1
- package/dist/constructs/heartbeat-monitor.js +10 -13
- package/dist/constructs/heartbeat-monitor.js.map +1 -1
- package/dist/constructs/http-header.d.ts +1 -1
- package/dist/constructs/http-header.js +1 -2
- package/dist/constructs/http-request.js +1 -2
- package/dist/constructs/icmp-assertion-codegen.d.ts +2 -2
- package/dist/constructs/icmp-assertion-codegen.js +4 -7
- package/dist/constructs/icmp-assertion-codegen.js.map +1 -1
- package/dist/constructs/icmp-assertion.d.ts +1 -1
- package/dist/constructs/icmp-assertion.js +4 -8
- package/dist/constructs/icmp-assertion.js.map +1 -1
- package/dist/constructs/icmp-monitor-codegen.d.ts +3 -3
- package/dist/constructs/icmp-monitor-codegen.js +8 -12
- package/dist/constructs/icmp-monitor-codegen.js.map +1 -1
- package/dist/constructs/icmp-monitor.d.ts +8 -8
- package/dist/constructs/icmp-monitor.js +4 -8
- package/dist/constructs/icmp-monitor.js.map +1 -1
- package/dist/constructs/icmp-request-codegen.d.ts +3 -3
- package/dist/constructs/icmp-request-codegen.js +5 -8
- package/dist/constructs/icmp-request-codegen.js.map +1 -1
- package/dist/constructs/icmp-request.d.ts +2 -2
- package/dist/constructs/icmp-request.js +1 -2
- package/dist/constructs/incident.d.ts +1 -1
- package/dist/constructs/incident.js +1 -2
- package/dist/constructs/incidentio-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/incidentio-alert-channel-codegen.js +15 -19
- package/dist/constructs/incidentio-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/incidentio-alert-channel.d.ts +2 -2
- package/dist/constructs/incidentio-alert-channel.js +2 -6
- package/dist/constructs/incidentio-alert-channel.js.map +1 -1
- package/dist/constructs/index.d.ts +51 -51
- package/dist/constructs/index.js +51 -67
- package/dist/constructs/index.js.map +1 -1
- package/dist/constructs/internal/assertion-codegen.d.ts +2 -2
- package/dist/constructs/internal/assertion-codegen.js +25 -29
- package/dist/constructs/internal/assertion-codegen.js.map +1 -1
- package/dist/constructs/internal/assertion.js +2 -7
- package/dist/constructs/internal/assertion.js.map +1 -1
- package/dist/constructs/internal/codegen/codegen.d.ts +2 -2
- package/dist/constructs/internal/codegen/codegen.js +1 -5
- package/dist/constructs/internal/codegen/codegen.js.map +1 -1
- package/dist/constructs/internal/codegen/context.d.ts +3 -3
- package/dist/constructs/internal/codegen/context.js +32 -74
- package/dist/constructs/internal/codegen/context.js.map +1 -1
- package/dist/constructs/internal/codegen/index.d.ts +4 -4
- package/dist/constructs/internal/codegen/index.js +4 -12
- package/dist/constructs/internal/codegen/index.js.map +1 -1
- package/dist/constructs/internal/codegen/safety.js +1 -5
- package/dist/constructs/internal/codegen/safety.js.map +1 -1
- package/dist/constructs/internal/codegen/snippet.js +8 -17
- package/dist/constructs/internal/codegen/snippet.js.map +1 -1
- package/dist/constructs/internal/common-diagnostics.d.ts +2 -2
- package/dist/constructs/internal/common-diagnostics.js +19 -27
- package/dist/constructs/internal/common-diagnostics.js.map +1 -1
- package/dist/constructs/internal/sanitize.d.ts +15 -0
- package/dist/constructs/internal/sanitize.js +36 -0
- package/dist/constructs/internal/sanitize.js.map +1 -0
- package/dist/constructs/ip.js +1 -2
- package/dist/constructs/key-value-pair-codegen.d.ts +3 -3
- package/dist/constructs/key-value-pair-codegen.js +6 -9
- package/dist/constructs/key-value-pair-codegen.js.map +1 -1
- package/dist/constructs/key-value-pair.js +1 -2
- package/dist/constructs/maintenance-window-codegen.d.ts +1 -1
- package/dist/constructs/maintenance-window-codegen.js +7 -11
- package/dist/constructs/maintenance-window-codegen.js.map +1 -1
- package/dist/constructs/maintenance-window.d.ts +1 -1
- package/dist/constructs/maintenance-window.js +4 -8
- package/dist/constructs/maintenance-window.js.map +1 -1
- package/dist/constructs/monitor-codegen.d.ts +1 -1
- package/dist/constructs/monitor-codegen.js +1 -5
- package/dist/constructs/monitor-codegen.js.map +1 -1
- package/dist/constructs/monitor.d.ts +14 -14
- package/dist/constructs/monitor.js +4 -8
- package/dist/constructs/monitor.js.map +1 -1
- package/dist/constructs/msteams-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/msteams-alert-channel-codegen.js +17 -21
- package/dist/constructs/msteams-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/msteams-alert-channel.d.ts +2 -2
- package/dist/constructs/msteams-alert-channel.js +2 -6
- package/dist/constructs/msteams-alert-channel.js.map +1 -1
- package/dist/constructs/multi-step-check-bundle.d.ts +10 -10
- package/dist/constructs/multi-step-check-bundle.js +1 -5
- package/dist/constructs/multi-step-check-bundle.js.map +1 -1
- package/dist/constructs/multi-step-check-codegen.d.ts +3 -3
- package/dist/constructs/multi-step-check-codegen.js +8 -12
- package/dist/constructs/multi-step-check-codegen.js.map +1 -1
- package/dist/constructs/multi-step-check.d.ts +14 -14
- package/dist/constructs/multi-step-check.js +29 -36
- package/dist/constructs/multi-step-check.js.map +1 -1
- package/dist/constructs/opsgenie-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/opsgenie-alert-channel-codegen.js +7 -11
- package/dist/constructs/opsgenie-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/opsgenie-alert-channel.d.ts +1 -1
- package/dist/constructs/opsgenie-alert-channel.js +4 -8
- package/dist/constructs/opsgenie-alert-channel.js.map +1 -1
- package/dist/constructs/pagerduty-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/pagerduty-alert-channel-codegen.js +7 -11
- package/dist/constructs/pagerduty-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/pagerduty-alert-channel.d.ts +1 -1
- package/dist/constructs/pagerduty-alert-channel.js +4 -8
- package/dist/constructs/pagerduty-alert-channel.js.map +1 -1
- package/dist/constructs/phone-call-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/phone-call-alert-channel-codegen.js +7 -11
- package/dist/constructs/phone-call-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/phone-call-alert-channel.d.ts +1 -1
- package/dist/constructs/phone-call-alert-channel.js +4 -8
- package/dist/constructs/phone-call-alert-channel.js.map +1 -1
- package/dist/constructs/playwright-check-bundle.d.ts +8 -8
- package/dist/constructs/playwright-check-bundle.js +1 -5
- package/dist/constructs/playwright-check-bundle.js.map +1 -1
- package/dist/constructs/playwright-check.d.ts +11 -11
- package/dist/constructs/playwright-check.js +40 -47
- package/dist/constructs/playwright-check.js.map +1 -1
- package/dist/constructs/playwright-config-codegen.d.ts +2 -2
- package/dist/constructs/playwright-config-codegen.js +3 -6
- package/dist/constructs/playwright-config-codegen.js.map +1 -1
- package/dist/constructs/playwright-config.js +1 -2
- package/dist/constructs/private-location-check-assignment-codegen.d.ts +1 -1
- package/dist/constructs/private-location-check-assignment-codegen.js +2 -6
- package/dist/constructs/private-location-check-assignment-codegen.js.map +1 -1
- package/dist/constructs/private-location-check-assignment.d.ts +2 -2
- package/dist/constructs/private-location-check-assignment.js +4 -8
- package/dist/constructs/private-location-check-assignment.js.map +1 -1
- package/dist/constructs/private-location-codegen.d.ts +2 -2
- package/dist/constructs/private-location-codegen.js +8 -13
- package/dist/constructs/private-location-codegen.js.map +1 -1
- package/dist/constructs/private-location-group-assignment-codegen.d.ts +1 -1
- package/dist/constructs/private-location-group-assignment-codegen.js +2 -6
- package/dist/constructs/private-location-group-assignment-codegen.js.map +1 -1
- package/dist/constructs/private-location-group-assignment.d.ts +2 -2
- package/dist/constructs/private-location-group-assignment.js +4 -8
- package/dist/constructs/private-location-group-assignment.js.map +1 -1
- package/dist/constructs/private-location.d.ts +2 -2
- package/dist/constructs/private-location.js +10 -15
- package/dist/constructs/private-location.js.map +1 -1
- package/dist/constructs/project-bundle.d.ts +3 -3
- package/dist/constructs/project-bundle.js +1 -5
- package/dist/constructs/project-bundle.js.map +1 -1
- package/dist/constructs/project.d.ts +13 -13
- package/dist/constructs/project.js +32 -87
- package/dist/constructs/project.js.map +1 -1
- package/dist/constructs/query-param.d.ts +1 -1
- package/dist/constructs/query-param.js +1 -2
- package/dist/constructs/ref-codegen.d.ts +2 -2
- package/dist/constructs/ref-codegen.js +4 -7
- package/dist/constructs/ref-codegen.js.map +1 -1
- package/dist/constructs/ref.js +1 -5
- package/dist/constructs/ref.js.map +1 -1
- package/dist/constructs/retry-strategy-codegen.d.ts +2 -2
- package/dist/constructs/retry-strategy-codegen.js +14 -17
- package/dist/constructs/retry-strategy-codegen.js.map +1 -1
- package/dist/constructs/retry-strategy.js +1 -5
- package/dist/constructs/retry-strategy.js.map +1 -1
- package/dist/constructs/slack-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/slack-alert-channel-codegen.js +7 -11
- package/dist/constructs/slack-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/slack-alert-channel.d.ts +1 -1
- package/dist/constructs/slack-alert-channel.js +4 -8
- package/dist/constructs/slack-alert-channel.js.map +1 -1
- package/dist/constructs/sms-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/sms-alert-channel-codegen.js +7 -11
- package/dist/constructs/sms-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/sms-alert-channel.d.ts +1 -1
- package/dist/constructs/sms-alert-channel.js +4 -8
- package/dist/constructs/sms-alert-channel.js.map +1 -1
- package/dist/constructs/status-page-codegen.d.ts +3 -3
- package/dist/constructs/status-page-codegen.js +6 -10
- package/dist/constructs/status-page-codegen.js.map +1 -1
- package/dist/constructs/status-page-service-codegen.d.ts +2 -2
- package/dist/constructs/status-page-service-codegen.js +8 -13
- package/dist/constructs/status-page-service-codegen.js.map +1 -1
- package/dist/constructs/status-page-service.d.ts +2 -2
- package/dist/constructs/status-page-service.js +8 -13
- package/dist/constructs/status-page-service.js.map +1 -1
- package/dist/constructs/status-page.d.ts +2 -2
- package/dist/constructs/status-page.js +6 -10
- package/dist/constructs/status-page.js.map +1 -1
- package/dist/constructs/tcp-monitor-codegen.d.ts +4 -4
- package/dist/constructs/tcp-monitor-codegen.js +10 -15
- package/dist/constructs/tcp-monitor-codegen.js.map +1 -1
- package/dist/constructs/tcp-monitor.d.ts +9 -9
- package/dist/constructs/tcp-monitor.js +12 -16
- package/dist/constructs/tcp-monitor.js.map +1 -1
- package/dist/constructs/telegram-alert-channel-codegen.d.ts +2 -2
- package/dist/constructs/telegram-alert-channel-codegen.js +15 -22
- package/dist/constructs/telegram-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/telegram-alert-channel.d.ts +2 -2
- package/dist/constructs/telegram-alert-channel.js +2 -6
- package/dist/constructs/telegram-alert-channel.js.map +1 -1
- package/dist/constructs/url-assertion-codegen.d.ts +2 -2
- package/dist/constructs/url-assertion-codegen.js +3 -6
- package/dist/constructs/url-assertion-codegen.js.map +1 -1
- package/dist/constructs/url-assertion.d.ts +1 -1
- package/dist/constructs/url-assertion.js +3 -7
- package/dist/constructs/url-assertion.js.map +1 -1
- package/dist/constructs/url-monitor-codegen.d.ts +3 -3
- package/dist/constructs/url-monitor-codegen.js +8 -12
- package/dist/constructs/url-monitor-codegen.js.map +1 -1
- package/dist/constructs/url-monitor.d.ts +10 -10
- package/dist/constructs/url-monitor.js +6 -10
- package/dist/constructs/url-monitor.js.map +1 -1
- package/dist/constructs/url-request-codegen.d.ts +3 -3
- package/dist/constructs/url-request-codegen.js +5 -8
- package/dist/constructs/url-request-codegen.js.map +1 -1
- package/dist/constructs/url-request.d.ts +2 -2
- package/dist/constructs/url-request.js +1 -2
- package/dist/constructs/validator-error.js +1 -5
- package/dist/constructs/validator-error.js.map +1 -1
- package/dist/constructs/webhook-alert-channel-codegen.d.ts +8 -8
- package/dist/constructs/webhook-alert-channel-codegen.js +20 -25
- package/dist/constructs/webhook-alert-channel-codegen.js.map +1 -1
- package/dist/constructs/webhook-alert-channel.d.ts +4 -4
- package/dist/constructs/webhook-alert-channel.js +4 -8
- package/dist/constructs/webhook-alert-channel.js.map +1 -1
- package/dist/formatters/account-members.d.ts +2 -2
- package/dist/formatters/account-members.js +19 -27
- package/dist/formatters/account-members.js.map +1 -1
- package/dist/formatters/account-plan.d.ts +2 -2
- package/dist/formatters/account-plan.js +34 -47
- package/dist/formatters/account-plan.js.map +1 -1
- package/dist/formatters/analytics.d.ts +2 -2
- package/dist/formatters/analytics.js +25 -36
- package/dist/formatters/analytics.js.map +1 -1
- package/dist/formatters/batch-stats.d.ts +3 -3
- package/dist/formatters/batch-stats.js +28 -35
- package/dist/formatters/batch-stats.js.map +1 -1
- package/dist/formatters/check-result-detail.d.ts +2 -2
- package/dist/formatters/check-result-detail.js +73 -80
- package/dist/formatters/check-result-detail.js.map +1 -1
- package/dist/formatters/checks.d.ts +6 -6
- package/dist/formatters/checks.js +69 -86
- package/dist/formatters/checks.js.map +1 -1
- package/dist/formatters/incidents.d.ts +2 -2
- package/dist/formatters/incidents.js +36 -46
- package/dist/formatters/incidents.js.map +1 -1
- package/dist/formatters/rca.d.ts +10 -4
- package/dist/formatters/rca.js +43 -35
- package/dist/formatters/rca.js.map +1 -1
- package/dist/formatters/render.js +27 -47
- package/dist/formatters/render.js.map +1 -1
- package/dist/formatters/status-pages.d.ts +2 -2
- package/dist/formatters/status-pages.js +29 -39
- package/dist/formatters/status-pages.js.map +1 -1
- package/dist/help/examples.js +3 -5
- package/dist/help/examples.js.map +1 -1
- package/dist/help/help-extension.js +13 -17
- package/dist/help/help-extension.js.map +1 -1
- package/dist/help/skills.js +2 -5
- package/dist/help/skills.js.map +1 -1
- package/dist/helpers/cli-mode.js +3 -8
- package/dist/helpers/cli-mode.js.map +1 -1
- package/dist/helpers/command-preview.js +3 -8
- package/dist/helpers/command-preview.js.map +1 -1
- package/dist/helpers/command-style.d.ts +1 -1
- package/dist/helpers/command-style.js +24 -31
- package/dist/helpers/command-style.js.map +1 -1
- package/dist/helpers/constants.js +1 -4
- package/dist/helpers/constants.js.map +1 -1
- package/dist/helpers/flags.d.ts +5 -0
- package/dist/helpers/flags.js +29 -12
- package/dist/helpers/flags.js.map +1 -1
- package/dist/helpers/incidents.d.ts +2 -2
- package/dist/helpers/incidents.js +10 -18
- package/dist/helpers/incidents.js.map +1 -1
- package/dist/helpers/onboarding/boilerplate.js +46 -53
- package/dist/helpers/onboarding/boilerplate.js.map +1 -1
- package/dist/helpers/onboarding/clipboard.js +6 -9
- package/dist/helpers/onboarding/clipboard.js.map +1 -1
- package/dist/helpers/onboarding/detect-project.js +13 -16
- package/dist/helpers/onboarding/detect-project.js.map +1 -1
- package/dist/helpers/onboarding/index.d.ts +7 -7
- package/dist/helpers/onboarding/index.js +7 -25
- package/dist/helpers/onboarding/index.js.map +1 -1
- package/dist/helpers/onboarding/messages.js +47 -57
- package/dist/helpers/onboarding/messages.js.map +1 -1
- package/dist/helpers/onboarding/prompt-display.js +11 -17
- package/dist/helpers/onboarding/prompt-display.js.map +1 -1
- package/dist/helpers/onboarding/prompts-helpers.js +4 -11
- package/dist/helpers/onboarding/prompts-helpers.js.map +1 -1
- package/dist/helpers/onboarding/skill-install.js +28 -35
- package/dist/helpers/onboarding/skill-install.js.map +1 -1
- package/dist/helpers/onboarding/template-prompt.js +8 -9
- package/dist/helpers/onboarding/template-prompt.js.map +1 -1
- package/dist/helpers/recast-acorn-parser.js +2 -38
- package/dist/helpers/recast-acorn-parser.js.map +1 -1
- package/dist/helpers/test-helper.d.ts +3 -3
- package/dist/helpers/test-helper.js +10 -16
- package/dist/helpers/test-helper.js.map +1 -1
- package/dist/helpers/wrap.js +1 -4
- package/dist/helpers/wrap.js.map +1 -1
- package/dist/helpers/write-config-helpers.js +11 -53
- package/dist/helpers/write-config-helpers.js.map +1 -1
- package/dist/hooks/command-not-found.d.ts +3 -0
- package/dist/hooks/command-not-found.js +22 -0
- package/dist/hooks/command-not-found.js.map +1 -0
- package/dist/hooks/parse-error.d.ts +3 -0
- package/dist/hooks/parse-error.js +15 -0
- package/dist/hooks/parse-error.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -39
- package/dist/index.js.map +1 -1
- package/dist/loader/config.js +4 -9
- package/dist/loader/config.js.map +1 -1
- package/dist/loader/index.d.ts +5 -6
- package/dist/loader/index.js +5 -20
- package/dist/loader/index.js.map +1 -1
- package/dist/loader/jiti.d.ts +1 -1
- package/dist/loader/jiti.js +15 -22
- package/dist/loader/jiti.js.map +1 -1
- package/dist/loader/loader.d.ts +1 -1
- package/dist/loader/loader.js +4 -9
- package/dist/loader/loader.js.map +1 -1
- package/dist/loader/match.js +3 -7
- package/dist/loader/match.js.map +1 -1
- package/dist/loader/mixed.d.ts +1 -1
- package/dist/loader/mixed.js +4 -8
- package/dist/loader/mixed.js.map +1 -1
- package/dist/loader/native.d.ts +2 -2
- package/dist/loader/native.js +14 -20
- package/dist/loader/native.js.map +1 -1
- package/dist/messages/common-messages.d.ts +0 -3
- package/dist/messages/common-messages.js +1 -6
- package/dist/messages/common-messages.js.map +1 -1
- package/dist/playwright/playwright-config-loader.js +7 -13
- package/dist/playwright/playwright-config-loader.js.map +1 -1
- package/dist/playwright/playwright-config-template.d.ts +1 -1
- package/dist/playwright/playwright-config-template.js +2 -38
- package/dist/playwright/playwright-config-template.js.map +1 -1
- package/dist/reporters/abstract-list.d.ts +9 -5
- package/dist/reporters/abstract-list.js +76 -48
- package/dist/reporters/abstract-list.js.map +1 -1
- package/dist/reporters/ci.d.ts +3 -3
- package/dist/reporters/ci.js +10 -20
- package/dist/reporters/ci.js.map +1 -1
- package/dist/reporters/dot.d.ts +2 -2
- package/dist/reporters/dot.js +8 -14
- package/dist/reporters/dot.js.map +1 -1
- package/dist/reporters/github.d.ts +2 -2
- package/dist/reporters/github.js +14 -59
- package/dist/reporters/github.js.map +1 -1
- package/dist/reporters/json.d.ts +2 -2
- package/dist/reporters/json.js +11 -52
- package/dist/reporters/json.js.map +1 -1
- package/dist/reporters/list.d.ts +3 -3
- package/dist/reporters/list.js +22 -32
- package/dist/reporters/list.js.map +1 -1
- package/dist/reporters/reporter.d.ts +4 -2
- package/dist/reporters/reporter.js +12 -19
- package/dist/reporters/reporter.js.map +1 -1
- package/dist/reporters/util.d.ts +2 -1
- package/dist/reporters/util.js +56 -95
- package/dist/reporters/util.js.map +1 -1
- package/dist/rest/account-members.js +1 -3
- package/dist/rest/account-members.js.map +1 -1
- package/dist/rest/accounts.js +1 -3
- package/dist/rest/accounts.js.map +1 -1
- package/dist/rest/analytics.js +23 -26
- package/dist/rest/analytics.js.map +1 -1
- package/dist/rest/api.d.ts +30 -26
- package/dist/rest/api.js +76 -82
- package/dist/rest/api.js.map +1 -1
- package/dist/rest/assets.js +6 -15
- package/dist/rest/assets.js.map +1 -1
- package/dist/rest/batch-analytics.js +2 -5
- package/dist/rest/batch-analytics.js.map +1 -1
- package/dist/rest/cancel.d.ts +14 -0
- package/dist/rest/cancel.js +28 -0
- package/dist/rest/cancel.js.map +1 -0
- package/dist/rest/check-groups.js +1 -3
- package/dist/rest/check-groups.js.map +1 -1
- package/dist/rest/check-results.js +1 -3
- package/dist/rest/check-results.js.map +1 -1
- package/dist/rest/check-statuses.js +1 -3
- package/dist/rest/check-statuses.js.map +1 -1
- package/dist/rest/checkly-storage.js +1 -3
- package/dist/rest/checkly-storage.js.map +1 -1
- package/dist/rest/checks.js +1 -3
- package/dist/rest/checks.js.map +1 -1
- package/dist/rest/entitlements.js +1 -3
- package/dist/rest/entitlements.js.map +1 -1
- package/dist/rest/environment-variables.js +8 -13
- package/dist/rest/environment-variables.js.map +1 -1
- package/dist/rest/error-groups.js +1 -3
- package/dist/rest/error-groups.js.map +1 -1
- package/dist/rest/errors.js +15 -31
- package/dist/rest/errors.js.map +1 -1
- package/dist/rest/heartbeat-checks.js +1 -3
- package/dist/rest/heartbeat-checks.js.map +1 -1
- package/dist/rest/incidents.js +1 -3
- package/dist/rest/incidents.js.map +1 -1
- package/dist/rest/locations.js +1 -3
- package/dist/rest/locations.js.map +1 -1
- package/dist/rest/private-locations.js +1 -4
- package/dist/rest/private-locations.js.map +1 -1
- package/dist/rest/projects.d.ts +2 -2
- package/dist/rest/projects.js +20 -28
- package/dist/rest/projects.js.map +1 -1
- package/dist/rest/rca.d.ts +2 -1
- package/dist/rest/rca.js +4 -3
- package/dist/rest/rca.js.map +1 -1
- package/dist/rest/runtimes.d.ts +1 -1
- package/dist/rest/runtimes.js +1 -3
- package/dist/rest/runtimes.js.map +1 -1
- package/dist/rest/status-pages.js +1 -3
- package/dist/rest/status-pages.js.map +1 -1
- package/dist/rest/test-session-error-groups.d.ts +18 -0
- package/dist/rest/test-session-error-groups.js +11 -0
- package/dist/rest/test-session-error-groups.js.map +1 -0
- package/dist/rest/test-sessions.d.ts +3 -3
- package/dist/rest/test-sessions.js +6 -10
- package/dist/rest/test-sessions.js.map +1 -1
- package/dist/rest/users.js +1 -3
- package/dist/rest/users.js.map +1 -1
- package/dist/rest/util.js +5 -11
- package/dist/rest/util.js.map +1 -1
- package/dist/runtimes/index.d.ts +2 -2
- package/dist/runtimes/index.js +1 -5
- package/dist/runtimes/index.js.map +1 -1
- package/dist/runtimes/runtime.js +1 -2
- package/dist/runtimes/snapshot.d.ts +1 -1
- package/dist/runtimes/snapshot.js +7 -11
- package/dist/runtimes/snapshot.js.map +1 -1
- package/dist/services/abstract-check-runner.d.ts +6 -3
- package/dist/services/abstract-check-runner.js +62 -61
- package/dist/services/abstract-check-runner.js.map +1 -1
- package/dist/services/check-parser/bundler.d.ts +2 -2
- package/dist/services/check-parser/bundler.js +24 -68
- package/dist/services/check-parser/bundler.js.map +1 -1
- package/dist/services/check-parser/cache-hash.d.ts +1 -1
- package/dist/services/check-parser/cache-hash.js +15 -25
- package/dist/services/check-parser/cache-hash.js.map +1 -1
- package/dist/services/check-parser/collector.js +3 -7
- package/dist/services/check-parser/collector.js.map +1 -1
- package/dist/services/check-parser/errors.d.ts +1 -1
- package/dist/services/check-parser/errors.js +1 -5
- package/dist/services/check-parser/errors.js.map +1 -1
- package/dist/services/check-parser/faux-package.d.ts +2 -2
- package/dist/services/check-parser/faux-package.js +3 -7
- package/dist/services/check-parser/faux-package.js.map +1 -1
- package/dist/services/check-parser/package-files/extension.js +14 -23
- package/dist/services/check-parser/package-files/extension.js.map +1 -1
- package/dist/services/check-parser/package-files/jsconfig-json-file.d.ts +2 -2
- package/dist/services/check-parser/package-files/jsconfig-json-file.js +4 -11
- package/dist/services/check-parser/package-files/jsconfig-json-file.js.map +1 -1
- package/dist/services/check-parser/package-files/json-source-file.d.ts +2 -2
- package/dist/services/check-parser/package-files/json-source-file.js +3 -7
- package/dist/services/check-parser/package-files/json-source-file.js.map +1 -1
- package/dist/services/check-parser/package-files/json-text-source-file-parser.d.ts +2 -2
- package/dist/services/check-parser/package-files/json-text-source-file-parser.js +7 -11
- package/dist/services/check-parser/package-files/json-text-source-file-parser.js.map +1 -1
- package/dist/services/check-parser/package-files/json-text-source-file.d.ts +2 -2
- package/dist/services/check-parser/package-files/json-text-source-file.js +5 -9
- package/dist/services/check-parser/package-files/json-text-source-file.js.map +1 -1
- package/dist/services/check-parser/package-files/loader.js +1 -5
- package/dist/services/check-parser/package-files/loader.js.map +1 -1
- package/dist/services/check-parser/package-files/lookup.js +10 -14
- package/dist/services/check-parser/package-files/lookup.js.map +1 -1
- package/dist/services/check-parser/package-files/package-json-file.d.ts +3 -3
- package/dist/services/check-parser/package-files/package-json-file.js +16 -23
- package/dist/services/check-parser/package-files/package-json-file.js.map +1 -1
- package/dist/services/check-parser/package-files/package-manager.d.ts +2 -2
- package/dist/services/check-parser/package-files/package-manager.js +65 -88
- package/dist/services/check-parser/package-files/package-manager.js.map +1 -1
- package/dist/services/check-parser/package-files/paths.js +6 -15
- package/dist/services/check-parser/package-files/paths.js.map +1 -1
- package/dist/services/check-parser/package-files/resolver.d.ts +8 -8
- package/dist/services/check-parser/package-files/resolver.js +37 -44
- package/dist/services/check-parser/package-files/resolver.js.map +1 -1
- package/dist/services/check-parser/package-files/result.js +2 -6
- package/dist/services/check-parser/package-files/result.js.map +1 -1
- package/dist/services/check-parser/package-files/source-file-parser.d.ts +1 -1
- package/dist/services/check-parser/package-files/source-file-parser.js +2 -7
- package/dist/services/check-parser/package-files/source-file-parser.js.map +1 -1
- package/dist/services/check-parser/package-files/source-file.js +6 -14
- package/dist/services/check-parser/package-files/source-file.js.map +1 -1
- package/dist/services/check-parser/package-files/tsconfig-json-file.d.ts +4 -4
- package/dist/services/check-parser/package-files/tsconfig-json-file.js +12 -19
- package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -1
- package/dist/services/check-parser/package-files/walk.js +7 -11
- package/dist/services/check-parser/package-files/walk.js.map +1 -1
- package/dist/services/check-parser/package-files/workspace.d.ts +2 -2
- package/dist/services/check-parser/package-files/workspace.js +9 -14
- package/dist/services/check-parser/package-files/workspace.js.map +1 -1
- package/dist/services/check-parser/parser.d.ts +3 -3
- package/dist/services/check-parser/parser.js +31 -70
- package/dist/services/check-parser/parser.js.map +1 -1
- package/dist/services/check-parser/playwright-config-expander.d.ts +1 -1
- package/dist/services/check-parser/playwright-config-expander.js +10 -50
- package/dist/services/check-parser/playwright-config-expander.js.map +1 -1
- package/dist/services/checkly-config-codegen.d.ts +3 -3
- package/dist/services/checkly-config-codegen.js +22 -25
- package/dist/services/checkly-config-codegen.js.map +1 -1
- package/dist/services/checkly-config-loader.d.ts +7 -7
- package/dist/services/checkly-config-loader.js +21 -63
- package/dist/services/checkly-config-loader.js.map +1 -1
- package/dist/services/config.js +4 -9
- package/dist/services/config.js.map +1 -1
- package/dist/services/load-dotenv.d.ts +1 -0
- package/dist/services/load-dotenv.js +44 -0
- package/dist/services/load-dotenv.js.map +1 -0
- package/dist/services/playwright-config.js +3 -41
- package/dist/services/playwright-config.js.map +1 -1
- package/dist/services/project-parser.d.ts +4 -4
- package/dist/services/project-parser.js +61 -100
- package/dist/services/project-parser.js.map +1 -1
- package/dist/services/proxy.js +8 -11
- package/dist/services/proxy.js.map +1 -1
- package/dist/services/shell.js +2 -6
- package/dist/services/shell.js.map +1 -1
- package/dist/services/snapshot-service.js +13 -51
- package/dist/services/snapshot-service.js.map +1 -1
- package/dist/services/socket-client.js +11 -51
- package/dist/services/socket-client.js.map +1 -1
- package/dist/services/test-filters.js +3 -8
- package/dist/services/test-filters.js.map +1 -1
- package/dist/services/test-runner.d.ts +6 -6
- package/dist/services/test-runner.js +11 -50
- package/dist/services/test-runner.js.map +1 -1
- package/dist/services/trigger-runner.d.ts +4 -4
- package/dist/services/trigger-runner.js +6 -12
- package/dist/services/trigger-runner.js.map +1 -1
- package/dist/services/util.d.ts +4 -4
- package/dist/services/util.js +66 -121
- package/dist/services/util.js.map +1 -1
- package/dist/sourcegen/args.d.ts +2 -2
- package/dist/sourcegen/args.js +2 -6
- package/dist/sourcegen/args.js.map +1 -1
- package/dist/sourcegen/argsbuilder.d.ts +5 -5
- package/dist/sourcegen/argsbuilder.js +22 -27
- package/dist/sourcegen/argsbuilder.js.map +1 -1
- package/dist/sourcegen/array.d.ts +2 -2
- package/dist/sourcegen/array.js +2 -6
- package/dist/sourcegen/array.js.map +1 -1
- package/dist/sourcegen/arraybuilder.d.ts +4 -4
- package/dist/sourcegen/arraybuilder.js +20 -25
- package/dist/sourcegen/arraybuilder.js.map +1 -1
- package/dist/sourcegen/boolean.d.ts +2 -2
- package/dist/sourcegen/boolean.js +2 -6
- package/dist/sourcegen/boolean.js.map +1 -1
- package/dist/sourcegen/case.js +8 -18
- package/dist/sourcegen/case.js.map +1 -1
- package/dist/sourcegen/comment.d.ts +2 -2
- package/dist/sourcegen/comment.js +9 -20
- package/dist/sourcegen/comment.js.map +1 -1
- package/dist/sourcegen/decl.d.ts +4 -4
- package/dist/sourcegen/decl.js +6 -15
- package/dist/sourcegen/decl.js.map +1 -1
- package/dist/sourcegen/declbuilder.d.ts +4 -4
- package/dist/sourcegen/declbuilder.js +8 -13
- package/dist/sourcegen/declbuilder.js.map +1 -1
- package/dist/sourcegen/expr.d.ts +3 -3
- package/dist/sourcegen/expr.js +7 -16
- package/dist/sourcegen/expr.js.map +1 -1
- package/dist/sourcegen/exprbuilder.d.ts +3 -3
- package/dist/sourcegen/exprbuilder.js +9 -14
- package/dist/sourcegen/exprbuilder.js.map +1 -1
- package/dist/sourcegen/identifier.d.ts +3 -3
- package/dist/sourcegen/identifier.js +5 -10
- package/dist/sourcegen/identifier.js.map +1 -1
- package/dist/sourcegen/index.d.ts +22 -22
- package/dist/sourcegen/index.js +22 -75
- package/dist/sourcegen/index.js.map +1 -1
- package/dist/sourcegen/null.d.ts +2 -2
- package/dist/sourcegen/null.js +2 -6
- package/dist/sourcegen/null.js.map +1 -1
- package/dist/sourcegen/number.d.ts +2 -2
- package/dist/sourcegen/number.js +2 -6
- package/dist/sourcegen/number.js.map +1 -1
- package/dist/sourcegen/object.d.ts +3 -3
- package/dist/sourcegen/object.js +6 -14
- package/dist/sourcegen/object.js.map +1 -1
- package/dist/sourcegen/objectbuilder.d.ts +4 -4
- package/dist/sourcegen/objectbuilder.js +21 -26
- package/dist/sourcegen/objectbuilder.js.map +1 -1
- package/dist/sourcegen/output.js +1 -5
- package/dist/sourcegen/output.js.map +1 -1
- package/dist/sourcegen/program.d.ts +4 -4
- package/dist/sourcegen/program.js +24 -64
- package/dist/sourcegen/program.js.map +1 -1
- package/dist/sourcegen/string.d.ts +2 -2
- package/dist/sourcegen/string.js +5 -10
- package/dist/sourcegen/string.js.map +1 -1
- package/dist/sourcegen/undefined.d.ts +2 -2
- package/dist/sourcegen/undefined.js +2 -6
- package/dist/sourcegen/undefined.js.map +1 -1
- package/dist/sourcegen/unknown.d.ts +1 -1
- package/dist/sourcegen/unknown.js +15 -18
- package/dist/sourcegen/unknown.js.map +1 -1
- package/dist/sourcegen/value.d.ts +1 -1
- package/dist/sourcegen/value.js +1 -5
- package/dist/sourcegen/value.js.map +1 -1
- package/dist/testing/fixture-sandbox.d.ts +20 -33
- package/dist/testing/fixture-sandbox.js +91 -75
- package/dist/testing/fixture-sandbox.js.map +1 -1
- package/dist/testing/global-setup.d.ts +2 -0
- package/dist/testing/global-setup.js +14 -0
- package/dist/testing/global-setup.js.map +1 -0
- package/dist/util/index.js +1 -4
- package/dist/util/index.js.map +1 -1
- package/oclif.manifest.json +86 -54
- package/package.json +46 -58
- package/dist/loader/ts-node.d.ts +0 -26
- package/dist/loader/ts-node.js +0 -111
- package/dist/loader/ts-node.js.map +0 -1
|
@@ -1,70 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
40
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
41
|
-
const promises_2 = require("node:timers/promises");
|
|
42
|
-
const core_1 = require("@oclif/core");
|
|
43
|
-
const prompts_1 = __importDefault(require("prompts"));
|
|
44
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
45
|
-
const log_symbols_1 = __importDefault(require("log-symbols"));
|
|
46
|
-
const uuid_1 = require("uuid");
|
|
47
|
-
const constants_1 = require("../../constants");
|
|
48
|
-
const api = __importStar(require("../../rest/api"));
|
|
49
|
-
const authCommand_1 = require("../authCommand");
|
|
50
|
-
const common_messages_1 = __importDefault(require("../../messages/common-messages"));
|
|
51
|
-
const util_1 = require("../../services/util");
|
|
52
|
-
const checkly_config_loader_1 = require("../../services/checkly-config-loader");
|
|
53
|
-
const projects_1 = require("../../rest/projects");
|
|
54
|
-
const sourcegen_1 = require("../../sourcegen");
|
|
55
|
-
const construct_codegen_1 = require("../../constructs/construct-codegen");
|
|
56
|
-
const codegen_1 = require("../../constructs/internal/codegen");
|
|
57
|
-
const snippet_1 = require("../../constructs/internal/codegen/snippet");
|
|
58
|
-
const errors_1 = require("@oclif/core/errors");
|
|
59
|
-
const commit_1 = require("./commit");
|
|
60
|
-
const apply_1 = require("./apply");
|
|
61
|
-
const checkly_config_codegen_1 = require("../../services/checkly-config-codegen");
|
|
62
|
-
const package_json_file_1 = require("../../services/check-parser/package-files/package-json-file");
|
|
63
|
-
const package_manager_1 = require("../../services/check-parser/package-files/package-manager");
|
|
64
|
-
const project_parser_1 = require("../../services/project-parser");
|
|
65
|
-
const project_1 = require("../../constructs/project");
|
|
66
|
-
const constructs_1 = require("../../constructs");
|
|
67
|
-
class ImportPlanCommand extends authCommand_1.AuthCommand {
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { setTimeout } from 'node:timers/promises';
|
|
4
|
+
import { Args, Flags } from '@oclif/core';
|
|
5
|
+
import prompts from 'prompts';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
import logSymbols from 'log-symbols';
|
|
8
|
+
import { validate as validateUuid } from 'uuid';
|
|
9
|
+
import { execa } from 'execa';
|
|
10
|
+
import { LOGICAL_ID_PATTERN } from '../../constants.js';
|
|
11
|
+
import * as api from '../../rest/api.js';
|
|
12
|
+
import { AuthCommand } from '../authCommand.js';
|
|
13
|
+
import commonMessages from '../../messages/common-messages.js';
|
|
14
|
+
import { splitConfigFilePath } from '../../services/util.js';
|
|
15
|
+
import { ConfigNotFoundError, loadChecklyConfig } from '../../services/checkly-config-loader.js';
|
|
16
|
+
import { ProjectNotFoundError, NoImportableResourcesFoundError } from '../../rest/projects.js';
|
|
17
|
+
import { cased, docComment, Program } from '../../sourcegen/index.js';
|
|
18
|
+
import { ConstructCodegen, sortResources } from '../../constructs/construct-codegen.js';
|
|
19
|
+
import { Context } from '../../constructs/internal/codegen/index.js';
|
|
20
|
+
import { isSnippet, isSafeSnippetFilename, } from '../../constructs/internal/codegen/snippet.js';
|
|
21
|
+
import { ExitError } from '@oclif/core/errors';
|
|
22
|
+
import { confirmCommit, performCommitAction } from './commit.js';
|
|
23
|
+
import { confirmApply, performApplyAction } from './apply.js';
|
|
24
|
+
import { generateChecklyConfig } from '../../services/checkly-config-codegen.js';
|
|
25
|
+
import { PackageJsonFile } from '../../services/check-parser/package-files/package-json-file.js';
|
|
26
|
+
import { detectNearestPackageJson, detectPackageManager, knownPackageManagers } from '../../services/check-parser/package-files/package-manager.js';
|
|
27
|
+
import { parseProject } from '../../services/project-parser.js';
|
|
28
|
+
import { Session } from '../../constructs/project.js';
|
|
29
|
+
import { Diagnostics } from '../../constructs/index.js';
|
|
30
|
+
export default class ImportPlanCommand extends AuthCommand {
|
|
68
31
|
static hidden = false;
|
|
69
32
|
static readOnly = true;
|
|
70
33
|
static idempotent = true;
|
|
@@ -122,35 +85,35 @@ will result in the underlying resources also getting irrevocably deleted on
|
|
|
122
85
|
the next deploy. You should only commit your plan once you are sure that all
|
|
123
86
|
future deployments include the imported resources.`;
|
|
124
87
|
static flags = {
|
|
125
|
-
'config':
|
|
88
|
+
'config': Flags.string({
|
|
126
89
|
char: 'c',
|
|
127
|
-
description:
|
|
90
|
+
description: commonMessages.configFile,
|
|
128
91
|
}),
|
|
129
|
-
'root':
|
|
92
|
+
'root': Flags.string({
|
|
130
93
|
description: 'The root folder in which to write generated code files.',
|
|
131
94
|
default: '__checks__',
|
|
132
95
|
}),
|
|
133
|
-
'preview':
|
|
96
|
+
'preview': Flags.boolean({
|
|
134
97
|
description: 'Preview generated code without creating an actual import plan.',
|
|
135
98
|
default: false,
|
|
136
99
|
}),
|
|
137
|
-
'debug-import-plan':
|
|
100
|
+
'debug-import-plan': Flags.boolean({
|
|
138
101
|
description: 'Output the import plan to a file.',
|
|
139
102
|
default: false,
|
|
140
103
|
hidden: true,
|
|
141
104
|
}),
|
|
142
|
-
'debug-import-plan-input-file':
|
|
105
|
+
'debug-import-plan-input-file': Flags.string({
|
|
143
106
|
description: 'A file to load an import plan from.',
|
|
144
107
|
hidden: true,
|
|
145
108
|
}),
|
|
146
|
-
'debug-import-plan-output-file':
|
|
109
|
+
'debug-import-plan-output-file': Flags.string({
|
|
147
110
|
description: 'The file to output the import plan to.',
|
|
148
111
|
default: './debug-import-plan.json',
|
|
149
112
|
hidden: true,
|
|
150
113
|
}),
|
|
151
114
|
};
|
|
152
115
|
static args = {
|
|
153
|
-
resource:
|
|
116
|
+
resource: Args.string({
|
|
154
117
|
name: 'resource',
|
|
155
118
|
required: false,
|
|
156
119
|
description: 'A specific resource to import.',
|
|
@@ -167,7 +130,7 @@ future deployments include the imported resources.`;
|
|
|
167
130
|
return parseFilter(value);
|
|
168
131
|
});
|
|
169
132
|
const createProgram = () => {
|
|
170
|
-
return new
|
|
133
|
+
return new Program({
|
|
171
134
|
rootDirectory,
|
|
172
135
|
constructFileSuffix: '.check',
|
|
173
136
|
constructHeaders: preview ? [previewComment()] : undefined,
|
|
@@ -185,7 +148,7 @@ future deployments include the imported resources.`;
|
|
|
185
148
|
const plan = await (async () => {
|
|
186
149
|
this.style.actionStart('Loading debug import plan');
|
|
187
150
|
try {
|
|
188
|
-
const input = await
|
|
151
|
+
const input = await fs.readFile(debugImportPlanInputFile, {
|
|
189
152
|
encoding: 'utf8',
|
|
190
153
|
});
|
|
191
154
|
const plan = JSON.parse(input);
|
|
@@ -199,7 +162,7 @@ future deployments include the imported resources.`;
|
|
|
199
162
|
})();
|
|
200
163
|
this.style.shortSuccess(`Successfully loaded debug import plan from "${debugImportPlanInputFile}".`);
|
|
201
164
|
const program = createProgram();
|
|
202
|
-
const codegen = new
|
|
165
|
+
const codegen = new ConstructCodegen(program);
|
|
203
166
|
const { failures } = this.#generateCode(plan, program, codegen, friendExports);
|
|
204
167
|
if (failures.length) {
|
|
205
168
|
this.#outputFailures(failures, codegen);
|
|
@@ -217,13 +180,13 @@ future deployments include the imported resources.`;
|
|
|
217
180
|
}
|
|
218
181
|
this.style.longSuccess(`Debug import plan has been created!`, `You can find the generated code under the following directory:`
|
|
219
182
|
+ `\n\n`
|
|
220
|
-
+ ` ${
|
|
183
|
+
+ ` ${chalk.green(rootDirectory)}`);
|
|
221
184
|
return;
|
|
222
185
|
}
|
|
223
186
|
this.style.shortInfo(`You are about to import resources from your Checkly account.`);
|
|
224
187
|
this.style.comment(`Please make sure to commit any unsaved changes to avoid having any `
|
|
225
188
|
+ `local changes get overwritten by generated code.`);
|
|
226
|
-
const { configDirectory, configFilenames } =
|
|
189
|
+
const { configDirectory, configFilenames } = splitConfigFilePath(configFilename);
|
|
227
190
|
const checklyConfig = await this.#loadConfig(configDirectory, configFilenames)
|
|
228
191
|
?? await this.#interactiveCreateConfig(configDirectory);
|
|
229
192
|
await this.#initializeProject(checklyConfig);
|
|
@@ -253,7 +216,7 @@ future deployments include the imported resources.`;
|
|
|
253
216
|
// These are needed for the interactive filter creation for now. Ideally
|
|
254
217
|
// we'd remove these.
|
|
255
218
|
const program = createProgram();
|
|
256
|
-
const codegen = new
|
|
219
|
+
const codegen = new ConstructCodegen(program);
|
|
257
220
|
// If the user provided no filter, ask interactively.
|
|
258
221
|
if (filters.length === 0) {
|
|
259
222
|
filters.push(...await this.#interactiveFilter(logicalId, codegen));
|
|
@@ -270,7 +233,7 @@ future deployments include the imported resources.`;
|
|
|
270
233
|
// Recreate program on every attempt as otherwise resources from earlier
|
|
271
234
|
// runs will persist.
|
|
272
235
|
const program = createProgram();
|
|
273
|
-
const codegen = new
|
|
236
|
+
const codegen = new ConstructCodegen(program);
|
|
274
237
|
const plan = await this.#createImportPlan(logicalId, {
|
|
275
238
|
preview,
|
|
276
239
|
filters,
|
|
@@ -281,7 +244,7 @@ future deployments include the imported resources.`;
|
|
|
281
244
|
}
|
|
282
245
|
if (debugImportPlan) {
|
|
283
246
|
const output = JSON.stringify(plan, null, 2);
|
|
284
|
-
await
|
|
247
|
+
await fs.writeFile(debugImportPlanOutputFile, output, 'utf8');
|
|
285
248
|
this.style.shortSuccess(`Successfully wrote debug import plan to "${debugImportPlanOutputFile}".`);
|
|
286
249
|
return;
|
|
287
250
|
}
|
|
@@ -323,56 +286,56 @@ future deployments include the imported resources.`;
|
|
|
323
286
|
this.style.actionFailure();
|
|
324
287
|
throw err;
|
|
325
288
|
}
|
|
326
|
-
this.log(`${
|
|
289
|
+
this.log(`${logSymbols.success} ${chalk.bold('Your import plan has been created!')}`);
|
|
327
290
|
this.log();
|
|
328
291
|
this.log(` You can find the generated code under the following directory:`);
|
|
329
292
|
this.log();
|
|
330
|
-
this.log(` ${
|
|
293
|
+
this.log(` ${chalk.green(rootDirectory)}`);
|
|
331
294
|
this.log();
|
|
332
295
|
this.log(`\
|
|
333
296
|
The imported resources have not been linked to your project yet. Please
|
|
334
297
|
make sure to inspect the generated code. Should you find anything you do
|
|
335
298
|
not like, you can cancel the import plan and no harm will be done.
|
|
336
299
|
|
|
337
|
-
${
|
|
338
|
-
${
|
|
300
|
+
${logSymbols.warning} \
|
|
301
|
+
${chalk.yellow('If you deploy now, you will end up with duplicate resources!')}
|
|
339
302
|
|
|
340
303
|
Once you have inspected the code, the next step will be to apply the plan,
|
|
341
304
|
which links the generated code to the underlying resources, making them
|
|
342
305
|
modifiable. At this point you may still cancel the plan, though any changes
|
|
343
306
|
you've already deployed cannot be undone.
|
|
344
307
|
|
|
345
|
-
${
|
|
346
|
-
${
|
|
308
|
+
${logSymbols.info} \
|
|
309
|
+
${chalk.cyan('For safety, resources are not deletable until the plan has been committed.')}
|
|
347
310
|
|
|
348
311
|
The final step will be to commit your plan, at which point the underlying
|
|
349
312
|
resources will be fully managed by the Checkly CLI in the exact same
|
|
350
313
|
manner as any other CLI-native resource.
|
|
351
314
|
`);
|
|
352
|
-
const apply = await
|
|
315
|
+
const apply = await confirmApply.call(this);
|
|
353
316
|
if (!apply) {
|
|
354
317
|
return;
|
|
355
318
|
}
|
|
356
|
-
await
|
|
357
|
-
const commit = await
|
|
319
|
+
await performApplyAction.call(this, plan);
|
|
320
|
+
const commit = await confirmCommit.call(this);
|
|
358
321
|
if (!commit) {
|
|
359
322
|
return;
|
|
360
323
|
}
|
|
361
|
-
await
|
|
324
|
+
await performCommitAction.call(this, plan);
|
|
362
325
|
return;
|
|
363
326
|
}
|
|
364
327
|
catch (err) {
|
|
365
|
-
if (err instanceof
|
|
328
|
+
if (err instanceof ExitError) {
|
|
366
329
|
throw err;
|
|
367
330
|
}
|
|
368
331
|
try {
|
|
369
332
|
const output = JSON.stringify(plan, null, 2);
|
|
370
|
-
await
|
|
371
|
-
this.log(`${
|
|
333
|
+
await fs.writeFile(debugImportPlanOutputFile, output, 'utf8');
|
|
334
|
+
this.log(`${logSymbols.warning} Please contact Checkly support at support@checklyhq.com and attach the newly created "${debugImportPlanOutputFile}" file.`);
|
|
372
335
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
373
336
|
}
|
|
374
337
|
catch (err) {
|
|
375
|
-
this.log(`${
|
|
338
|
+
this.log(`${logSymbols.warning} Please contact Checkly support at support@checklyhq.com.`);
|
|
376
339
|
}
|
|
377
340
|
throw err;
|
|
378
341
|
}
|
|
@@ -380,7 +343,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
380
343
|
}
|
|
381
344
|
#outputFailures(failures, codegen) {
|
|
382
345
|
const filters = [];
|
|
383
|
-
this.log(`${
|
|
346
|
+
this.log(`${logSymbols.error} ${chalk.red('The following resources could not be imported:')}`);
|
|
384
347
|
this.log();
|
|
385
348
|
for (const { resource, cause } of failures) {
|
|
386
349
|
const spec = `${resource.type}:${resource.physicalId}`;
|
|
@@ -392,9 +355,9 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
392
355
|
return resource.type;
|
|
393
356
|
}
|
|
394
357
|
})();
|
|
395
|
-
this.log(` ${desc} (${
|
|
358
|
+
this.log(` ${desc} (${chalk.gray(spec)})`);
|
|
396
359
|
this.log();
|
|
397
|
-
this.log(` ${
|
|
360
|
+
this.log(` ${chalk.red(cause.toString())}`);
|
|
398
361
|
this.log();
|
|
399
362
|
filters.push({
|
|
400
363
|
type: 'exclude',
|
|
@@ -408,7 +371,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
408
371
|
}
|
|
409
372
|
#outputConfigSection(options) {
|
|
410
373
|
const { title, step: [step, totalSteps], description } = options;
|
|
411
|
-
this.log(` ${title} ${
|
|
374
|
+
this.log(` ${title} ${chalk.grey(`(step ${step}/${totalSteps})`)}`);
|
|
412
375
|
this.log();
|
|
413
376
|
this.style.comment(description);
|
|
414
377
|
}
|
|
@@ -419,7 +382,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
419
382
|
step,
|
|
420
383
|
});
|
|
421
384
|
while (true) {
|
|
422
|
-
const { projectName } = await (
|
|
385
|
+
const { projectName } = await prompts({
|
|
423
386
|
name: 'projectName',
|
|
424
387
|
type: 'text',
|
|
425
388
|
message: 'What should we call your project?',
|
|
@@ -446,13 +409,13 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
446
409
|
step,
|
|
447
410
|
});
|
|
448
411
|
while (true) {
|
|
449
|
-
const { logicalId } = await (
|
|
412
|
+
const { logicalId } = await prompts({
|
|
450
413
|
name: 'logicalId',
|
|
451
414
|
type: 'text',
|
|
452
415
|
message: 'How would you like your project to be identified?',
|
|
453
416
|
initial: suggested,
|
|
454
417
|
validate: input => {
|
|
455
|
-
if (!
|
|
418
|
+
if (!LOGICAL_ID_PATTERN.test(input)) {
|
|
456
419
|
return `Please only use ASCII letters, numbers, and the `
|
|
457
420
|
+ `symbols _, -, /, #, and .`;
|
|
458
421
|
}
|
|
@@ -487,7 +450,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
487
450
|
value: 'exit',
|
|
488
451
|
description: 'No changes will be made.',
|
|
489
452
|
}];
|
|
490
|
-
const { action } = await (
|
|
453
|
+
const { action } = await prompts({
|
|
491
454
|
name: 'action',
|
|
492
455
|
type: 'select',
|
|
493
456
|
message: 'Set up a new Checkly project?',
|
|
@@ -497,7 +460,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
497
460
|
switch (action) {
|
|
498
461
|
case 'init': {
|
|
499
462
|
const projectName = await this.#askProjectName([1, 2]);
|
|
500
|
-
const suggestedLogicalId =
|
|
463
|
+
const suggestedLogicalId = cased(projectName, 'kebab-case');
|
|
501
464
|
const logicalId = await this.#askLogicalId(suggestedLogicalId, [2, 2]);
|
|
502
465
|
try {
|
|
503
466
|
this.style.actionStart('Creating project');
|
|
@@ -511,13 +474,13 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
511
474
|
this.style.actionFailure();
|
|
512
475
|
throw err;
|
|
513
476
|
}
|
|
514
|
-
const program = new
|
|
477
|
+
const program = new Program({
|
|
515
478
|
rootDirectory: configDirectory,
|
|
516
479
|
constructFileSuffix: '.check',
|
|
517
480
|
specFileSuffix: '.spec',
|
|
518
481
|
language: 'typescript',
|
|
519
482
|
});
|
|
520
|
-
const context = new
|
|
483
|
+
const context = new Context();
|
|
521
484
|
const config = {
|
|
522
485
|
projectName,
|
|
523
486
|
logicalId,
|
|
@@ -529,7 +492,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
529
492
|
try {
|
|
530
493
|
this.style.actionStart('Creating Checkly configuration');
|
|
531
494
|
// TODO: Make this less ugly.
|
|
532
|
-
|
|
495
|
+
generateChecklyConfig(program, context, config, 'checkly.config.ts');
|
|
533
496
|
this.style.actionSuccess();
|
|
534
497
|
}
|
|
535
498
|
catch (err) {
|
|
@@ -555,7 +518,6 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
555
518
|
const ownPackageJson = await this.loadPackageJsonOfSelf();
|
|
556
519
|
const updated = packageJson.upsertDevDependencies({
|
|
557
520
|
checkly: `^${ownPackageJson?.version ?? '6'}`,
|
|
558
|
-
jiti: '^2',
|
|
559
521
|
});
|
|
560
522
|
if (updated) {
|
|
561
523
|
this.style.shortSuccess(`Successfully added Checkly devDependencies`);
|
|
@@ -598,25 +560,24 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
598
560
|
}
|
|
599
561
|
async #loadPackageJson() {
|
|
600
562
|
try {
|
|
601
|
-
return await
|
|
563
|
+
return await detectNearestPackageJson(process.cwd());
|
|
602
564
|
}
|
|
603
565
|
catch {
|
|
604
566
|
return;
|
|
605
567
|
}
|
|
606
568
|
}
|
|
607
569
|
#createPackageJson(logicalId) {
|
|
608
|
-
return
|
|
570
|
+
return PackageJsonFile.make(PackageJsonFile.FILENAME, {
|
|
609
571
|
name: logicalId,
|
|
610
572
|
version: '1.0.0',
|
|
611
573
|
private: true,
|
|
612
574
|
});
|
|
613
575
|
}
|
|
614
576
|
async #interactiveNpmInstall(dirPath, forcePackageManager) {
|
|
615
|
-
const { execa } = await import('execa');
|
|
616
577
|
const packageManager = forcePackageManager ?? await (async () => {
|
|
617
578
|
try {
|
|
618
579
|
this.style.actionStart(`Detecting package manager`);
|
|
619
|
-
const packageManager = await
|
|
580
|
+
const packageManager = await detectPackageManager(dirPath);
|
|
620
581
|
this.style.actionSuccess();
|
|
621
582
|
this.style.comment(`It looks like your package manager is ${packageManager.name}.`);
|
|
622
583
|
return packageManager;
|
|
@@ -637,7 +598,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
637
598
|
title: 'I will do it later myself',
|
|
638
599
|
value: 'later',
|
|
639
600
|
}];
|
|
640
|
-
const { action } = await (
|
|
601
|
+
const { action } = await prompts({
|
|
641
602
|
type: 'select',
|
|
642
603
|
name: 'action',
|
|
643
604
|
message: 'Would you like to install dependencies now? (recommended)',
|
|
@@ -665,7 +626,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
665
626
|
+ `\n\n`
|
|
666
627
|
+ `You can still continue the import process and install `
|
|
667
628
|
+ `dependencies later by yourself.`);
|
|
668
|
-
const { action } = await (
|
|
629
|
+
const { action } = await prompts({
|
|
669
630
|
type: 'confirm',
|
|
670
631
|
name: 'action',
|
|
671
632
|
message: 'Continue the import process?',
|
|
@@ -673,7 +634,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
673
634
|
this.log();
|
|
674
635
|
if (action) {
|
|
675
636
|
this.style.comment(`Great, let's proceed to the next step.`);
|
|
676
|
-
await
|
|
637
|
+
await setTimeout(200);
|
|
677
638
|
}
|
|
678
639
|
else {
|
|
679
640
|
this.cancelAndExit();
|
|
@@ -682,10 +643,10 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
682
643
|
break;
|
|
683
644
|
}
|
|
684
645
|
case 'other-manager': {
|
|
685
|
-
const packageManagersByName = Object.fromEntries(
|
|
646
|
+
const packageManagersByName = Object.fromEntries(knownPackageManagers.map(packageManager => {
|
|
686
647
|
return [packageManager.name, packageManager];
|
|
687
648
|
}));
|
|
688
|
-
const choices =
|
|
649
|
+
const choices = knownPackageManagers.map(packageManager => ({
|
|
689
650
|
title: packageManager.name,
|
|
690
651
|
value: packageManager.name,
|
|
691
652
|
}));
|
|
@@ -693,7 +654,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
693
654
|
title: 'None of the above',
|
|
694
655
|
value: 'other',
|
|
695
656
|
});
|
|
696
|
-
const { action } = await (
|
|
657
|
+
const { action } = await prompts({
|
|
697
658
|
type: 'select',
|
|
698
659
|
name: 'action',
|
|
699
660
|
message: 'Which package manager would you like to use?',
|
|
@@ -709,7 +670,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
709
670
|
+ `\n\n`
|
|
710
671
|
+ `You can still continue the import process and install `
|
|
711
672
|
+ `dependencies later by yourself.`);
|
|
712
|
-
const { action } = await (
|
|
673
|
+
const { action } = await prompts({
|
|
713
674
|
type: 'confirm',
|
|
714
675
|
name: 'action',
|
|
715
676
|
message: 'Continue the import process?',
|
|
@@ -717,7 +678,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
717
678
|
this.log();
|
|
718
679
|
if (action) {
|
|
719
680
|
this.style.comment(`Great, let's proceed to the next step.`);
|
|
720
|
-
await
|
|
681
|
+
await setTimeout(200);
|
|
721
682
|
break;
|
|
722
683
|
}
|
|
723
684
|
else {
|
|
@@ -735,7 +696,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
735
696
|
+ `dependencies once you've completed the setup.`
|
|
736
697
|
+ `\n\n`
|
|
737
698
|
+ `If you do not, the Checkly CLI will not function as intended.`);
|
|
738
|
-
await
|
|
699
|
+
await setTimeout(200);
|
|
739
700
|
break;
|
|
740
701
|
}
|
|
741
702
|
default: {
|
|
@@ -745,11 +706,11 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
745
706
|
}
|
|
746
707
|
async #loadConfig(configDirectory, configFilenames) {
|
|
747
708
|
try {
|
|
748
|
-
const { config: checklyConfig, } = await
|
|
709
|
+
const { config: checklyConfig, } = await loadChecklyConfig(configDirectory, configFilenames);
|
|
749
710
|
return checklyConfig;
|
|
750
711
|
}
|
|
751
712
|
catch (err) {
|
|
752
|
-
if (err instanceof
|
|
713
|
+
if (err instanceof ConfigNotFoundError) {
|
|
753
714
|
return;
|
|
754
715
|
}
|
|
755
716
|
throw err;
|
|
@@ -757,7 +718,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
757
718
|
}
|
|
758
719
|
async #validateProject(project) {
|
|
759
720
|
this.style.actionStart('Validating project resources');
|
|
760
|
-
const diagnostics = new
|
|
721
|
+
const diagnostics = new Diagnostics();
|
|
761
722
|
await project.validate(diagnostics);
|
|
762
723
|
for (const diag of diagnostics.observations) {
|
|
763
724
|
if (diag.isFatal()) {
|
|
@@ -783,7 +744,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
783
744
|
try {
|
|
784
745
|
const account = this.account;
|
|
785
746
|
const availableRuntimes = await api.runtimes.getAll();
|
|
786
|
-
project = await
|
|
747
|
+
project = await parseProject({
|
|
787
748
|
directory: configDirectory,
|
|
788
749
|
projectLogicalId: checklyConfig.logicalId,
|
|
789
750
|
projectName: checklyConfig.projectName,
|
|
@@ -809,7 +770,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
809
770
|
}
|
|
810
771
|
await this.#validateProject(project);
|
|
811
772
|
this.style.actionStart('Searching for exported resources');
|
|
812
|
-
const constructExports =
|
|
773
|
+
const constructExports = Session.constructExports;
|
|
813
774
|
this.style.actionSuccess();
|
|
814
775
|
switch (constructExports.length) {
|
|
815
776
|
case 0: {
|
|
@@ -828,12 +789,12 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
828
789
|
// Paths need to be relative to the root directory or our generated
|
|
829
790
|
// imports won't work correctly.
|
|
830
791
|
for (const constructExport of constructExports) {
|
|
831
|
-
constructExport.filePath =
|
|
792
|
+
constructExport.filePath = path.relative(rootDirectory, constructExport.filePath);
|
|
832
793
|
}
|
|
833
794
|
return constructExports;
|
|
834
795
|
}
|
|
835
796
|
async #confirmRetryWithoutFailed() {
|
|
836
|
-
const { action } = await (
|
|
797
|
+
const { action } = await prompts({
|
|
837
798
|
name: 'action',
|
|
838
799
|
type: 'confirm',
|
|
839
800
|
message: 'Would you like to try again without the failed resources?',
|
|
@@ -850,11 +811,11 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
850
811
|
}
|
|
851
812
|
catch (err) {
|
|
852
813
|
this.style.actionFailure();
|
|
853
|
-
if (err instanceof
|
|
814
|
+
if (err instanceof NoImportableResourcesFoundError) {
|
|
854
815
|
this.style.fatal(err.message);
|
|
855
816
|
return;
|
|
856
817
|
}
|
|
857
|
-
if (err instanceof
|
|
818
|
+
if (err instanceof ProjectNotFoundError) {
|
|
858
819
|
this.style.fatal(err.message);
|
|
859
820
|
return;
|
|
860
821
|
}
|
|
@@ -874,7 +835,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
874
835
|
value: 'exit',
|
|
875
836
|
description: 'No changes will be made.',
|
|
876
837
|
}];
|
|
877
|
-
const { action } = await (
|
|
838
|
+
const { action } = await prompts({
|
|
878
839
|
name: 'action',
|
|
879
840
|
type: 'select',
|
|
880
841
|
message: 'Which resources would you like to import?',
|
|
@@ -913,7 +874,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
913
874
|
}
|
|
914
875
|
catch (err) {
|
|
915
876
|
this.style.actionFailure();
|
|
916
|
-
if (err instanceof
|
|
877
|
+
if (err instanceof NoImportableResourcesFoundError) {
|
|
917
878
|
return [];
|
|
918
879
|
}
|
|
919
880
|
throw err;
|
|
@@ -922,7 +883,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
922
883
|
choices.sort((a, b) => {
|
|
923
884
|
return a.title.localeCompare(b.title);
|
|
924
885
|
});
|
|
925
|
-
const { resources } = await (
|
|
886
|
+
const { resources } = await prompts({
|
|
926
887
|
name: 'resources',
|
|
927
888
|
type: 'autocompleteMultiselect',
|
|
928
889
|
message: 'Please select the resources you would like to import',
|
|
@@ -950,7 +911,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
950
911
|
#generateCode(plan, program, codegen, friendExports) {
|
|
951
912
|
this.style.actionStart('Generating Checkly constructs for imported resources');
|
|
952
913
|
try {
|
|
953
|
-
const context = new
|
|
914
|
+
const context = new Context();
|
|
954
915
|
const failures = new Map();
|
|
955
916
|
if (plan.changes) {
|
|
956
917
|
const { resources, friends, auxiliary } = plan.changes;
|
|
@@ -991,13 +952,13 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
991
952
|
switch (resource.type) {
|
|
992
953
|
case 'snippet': {
|
|
993
954
|
const snippet = resource.payload;
|
|
994
|
-
if (!
|
|
955
|
+
if (!isSnippet(snippet)) {
|
|
995
956
|
throw new Error(`Invalid auxiliary snippet`);
|
|
996
957
|
}
|
|
997
958
|
const snippetFilePath = context.filePath('snippets', snippet.name, {
|
|
998
959
|
unique: false,
|
|
999
960
|
contentKey: `snippet::${snippet.id}`,
|
|
1000
|
-
case:
|
|
961
|
+
case: isSafeSnippetFilename(snippet.name) ? 'identity' : 'kebab-case',
|
|
1001
962
|
});
|
|
1002
963
|
const snippetFile = program.staticSupportFile(snippetFilePath.fullPath, snippet.script);
|
|
1003
964
|
globalSnippetFiles.add(snippetFile);
|
|
@@ -1033,7 +994,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1033
994
|
const snippetFiles = context.findScriptSnippetFiles(content);
|
|
1034
995
|
for (const snippetFile of snippetFiles) {
|
|
1035
996
|
const localSnippetFile = program.generatedSupportFile(`snippets/snippets/${snippetFile.basename}`);
|
|
1036
|
-
localSnippetFile.header(
|
|
997
|
+
localSnippetFile.header(docComment(`This file has been generated to help resolve cross-snippet imports.\n`
|
|
1037
998
|
+ `\n`
|
|
1038
999
|
+ `We recommend rewriting your imports to not reference this file, after which\n`
|
|
1039
1000
|
+ `you may remove it.`));
|
|
@@ -1041,7 +1002,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1041
1002
|
}
|
|
1042
1003
|
}
|
|
1043
1004
|
}
|
|
1044
|
-
|
|
1005
|
+
sortResources(resources);
|
|
1045
1006
|
for (const resource of resources) {
|
|
1046
1007
|
try {
|
|
1047
1008
|
codegen.prepare(resource.logicalId, resource, context);
|
|
@@ -1100,7 +1061,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1100
1061
|
}
|
|
1101
1062
|
catch (err) {
|
|
1102
1063
|
this.style.actionFailure();
|
|
1103
|
-
if (!(err instanceof
|
|
1064
|
+
if (!(err instanceof ProjectNotFoundError)) {
|
|
1104
1065
|
throw err;
|
|
1105
1066
|
}
|
|
1106
1067
|
// The project does not exist yet and we must create (initialize) it.
|
|
@@ -1117,7 +1078,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1117
1078
|
value: 'exit',
|
|
1118
1079
|
description: 'No changes will be made.',
|
|
1119
1080
|
}];
|
|
1120
|
-
const { action } = await (
|
|
1081
|
+
const { action } = await prompts({
|
|
1121
1082
|
name: 'action',
|
|
1122
1083
|
type: 'select',
|
|
1123
1084
|
message: 'Your project has not been initialized yet. Initialize now?',
|
|
@@ -1168,7 +1129,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1168
1129
|
value: 'new',
|
|
1169
1130
|
}];
|
|
1170
1131
|
while (true) {
|
|
1171
|
-
const { action } = await (
|
|
1132
|
+
const { action } = await prompts({
|
|
1172
1133
|
name: 'action',
|
|
1173
1134
|
type: 'select',
|
|
1174
1135
|
message: `Found ${plans.length} existing uncommitted plan(s). How do you want to proceed?`,
|
|
@@ -1187,7 +1148,7 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1187
1148
|
}
|
|
1188
1149
|
this.log();
|
|
1189
1150
|
}
|
|
1190
|
-
const { action } = await (
|
|
1151
|
+
const { action } = await prompts({
|
|
1191
1152
|
name: 'action',
|
|
1192
1153
|
type: 'select',
|
|
1193
1154
|
message: 'Do you want to exit or retry?',
|
|
@@ -1237,9 +1198,8 @@ ${chalk_1.default.cyan('For safety, resources are not deletable until the plan h
|
|
|
1237
1198
|
this.exit(0);
|
|
1238
1199
|
}
|
|
1239
1200
|
}
|
|
1240
|
-
exports.default = ImportPlanCommand;
|
|
1241
1201
|
function previewComment() {
|
|
1242
|
-
return
|
|
1202
|
+
return docComment('This Checkly construct file has been generated for preview purposes only.'
|
|
1243
1203
|
+ '\n\n'
|
|
1244
1204
|
+ 'Deploying this file will create duplicate resources.');
|
|
1245
1205
|
}
|
|
@@ -1292,7 +1252,7 @@ function uuidPhysicalId(value) {
|
|
|
1292
1252
|
if (value === '' || value === '*') {
|
|
1293
1253
|
return;
|
|
1294
1254
|
}
|
|
1295
|
-
if (!(
|
|
1255
|
+
if (!validateUuid(value)) {
|
|
1296
1256
|
throw new InvalidResourceIdentifierError(`Resource identifier '${value}' must be a valid UUID`);
|
|
1297
1257
|
}
|
|
1298
1258
|
return value;
|