checkly 0.0.0-canary.0e426f8
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/README.md +127 -0
- package/assets/runtimes/snapshots/20260130/runtimes.json +349 -0
- package/bin/check-node-version.cjs +21 -0
- package/bin/launch.cjs +28 -0
- package/bin/run.cjs +32 -0
- package/constructs.d.ts +1 -0
- package/constructs.js +2 -0
- package/dist/ai-context/context.d.ts +168 -0
- package/dist/ai-context/context.js +363 -0
- package/dist/ai-context/context.js.map +1 -0
- package/dist/ai-context/onboarding-boilerplate/__checks__/api.check.ts +22 -0
- package/dist/ai-context/onboarding-boilerplate/__checks__/heartbeat.check.ts +16 -0
- package/dist/ai-context/onboarding-boilerplate/__checks__/homepage.spec.ts +12 -0
- package/dist/ai-context/onboarding-boilerplate/__checks__/url.check.ts +18 -0
- package/dist/ai-context/onboarding-boilerplate/checkly-config-template.ts +50 -0
- package/dist/ai-context/onboarding-prompts/base.md +1 -0
- package/dist/ai-context/onboarding-prompts/playwright.md +1 -0
- package/dist/ai-context/public-skills/checkly/README.md +43 -0
- package/dist/ai-context/public-skills/checkly/SKILL.md +163 -0
- package/dist/ai-context/skills-command/references/communicate-incidents.md +79 -0
- package/dist/ai-context/skills-command/references/communicate.md +42 -0
- package/dist/ai-context/skills-command/references/configure-alert-channels.md +102 -0
- package/dist/ai-context/skills-command/references/configure-api-checks.md +65 -0
- package/dist/ai-context/skills-command/references/configure-browser-checks.md +29 -0
- package/dist/ai-context/skills-command/references/configure-check-groups.md +17 -0
- package/dist/ai-context/skills-command/references/configure-dns-monitors.md +31 -0
- package/dist/ai-context/skills-command/references/configure-environment.md +92 -0
- package/dist/ai-context/skills-command/references/configure-grpc-monitors.md +61 -0
- package/dist/ai-context/skills-command/references/configure-heartbeat-monitors.md +20 -0
- package/dist/ai-context/skills-command/references/configure-icmp-monitors.md +34 -0
- package/dist/ai-context/skills-command/references/configure-multistep-checks.md +26 -0
- package/dist/ai-context/skills-command/references/configure-playwright-checks.md +81 -0
- package/dist/ai-context/skills-command/references/configure-ssl-monitors.md +39 -0
- package/dist/ai-context/skills-command/references/configure-supporting-constructs.md +176 -0
- package/dist/ai-context/skills-command/references/configure-tcp-monitors.md +32 -0
- package/dist/ai-context/skills-command/references/configure-traceroute-monitors.md +36 -0
- package/dist/ai-context/skills-command/references/configure-url-monitors.md +31 -0
- package/dist/ai-context/skills-command/references/configure.md +193 -0
- package/dist/ai-context/skills-command/references/initialize.md +133 -0
- package/dist/ai-context/skills-command/references/investigate-alerting.md +212 -0
- package/dist/ai-context/skills-command/references/investigate-checks.md +172 -0
- package/dist/ai-context/skills-command/references/investigate-test-sessions.md +165 -0
- package/dist/ai-context/skills-command/references/investigate.md +18 -0
- package/dist/ai-context/skills-command/references/manage-account-members.md +82 -0
- package/dist/ai-context/skills-command/references/manage-plan.md +49 -0
- package/dist/ai-context/skills-command/references/manage.md +53 -0
- package/dist/auth/api-key.d.ts +24 -0
- package/dist/auth/api-key.js +104 -0
- package/dist/auth/api-key.js.map +1 -0
- package/dist/auth/device-flow.d.ts +58 -0
- package/dist/auth/device-flow.js +228 -0
- package/dist/auth/device-flow.js.map +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +226 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/commands/account/plan.d.ts +31 -0
- package/dist/commands/account/plan.js +114 -0
- package/dist/commands/account/plan.js.map +1 -0
- package/dist/commands/account/usage/projections.d.ts +16 -0
- package/dist/commands/account/usage/projections.js +40 -0
- package/dist/commands/account/usage/projections.js.map +1 -0
- package/dist/commands/account/usage/series.d.ts +23 -0
- package/dist/commands/account/usage/series.js +55 -0
- package/dist/commands/account/usage/series.js.map +1 -0
- package/dist/commands/account/usage/summary.d.ts +18 -0
- package/dist/commands/account/usage/summary.js +43 -0
- package/dist/commands/account/usage/summary.js.map +1 -0
- package/dist/commands/account/usage/term.d.ts +15 -0
- package/dist/commands/account/usage/term.js +32 -0
- package/dist/commands/account/usage/term.js.map +1 -0
- package/dist/commands/account/usage/terms.d.ts +16 -0
- package/dist/commands/account/usage/terms.js +43 -0
- package/dist/commands/account/usage/terms.js.map +1 -0
- package/dist/commands/alert-channels/get.d.ts +14 -0
- package/dist/commands/alert-channels/get.js +51 -0
- package/dist/commands/alert-channels/get.js.map +1 -0
- package/dist/commands/alert-channels/list.d.ts +13 -0
- package/dist/commands/alert-channels/list.js +65 -0
- package/dist/commands/alert-channels/list.js.map +1 -0
- package/dist/commands/alert-channels/logs.d.ts +19 -0
- package/dist/commands/alert-channels/logs.js +92 -0
- package/dist/commands/alert-channels/logs.js.map +1 -0
- package/dist/commands/api.d.ts +23 -0
- package/dist/commands/api.js +248 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/assets/download.d.ts +19 -0
- package/dist/commands/assets/download.js +174 -0
- package/dist/commands/assets/download.js.map +1 -0
- package/dist/commands/assets/list.d.ts +17 -0
- package/dist/commands/assets/list.js +106 -0
- package/dist/commands/assets/list.js.map +1 -0
- package/dist/commands/authCommand.d.ts +39 -0
- package/dist/commands/authCommand.js +176 -0
- package/dist/commands/authCommand.js.map +1 -0
- package/dist/commands/baseCommand.d.ts +46 -0
- package/dist/commands/baseCommand.js +162 -0
- package/dist/commands/baseCommand.js.map +1 -0
- package/dist/commands/checks/delete.d.ts +15 -0
- package/dist/commands/checks/delete.js +65 -0
- package/dist/commands/checks/delete.js.map +1 -0
- package/dist/commands/checks/get.d.ts +30 -0
- package/dist/commands/checks/get.js +380 -0
- package/dist/commands/checks/get.js.map +1 -0
- package/dist/commands/checks/list.d.ts +18 -0
- package/dist/commands/checks/list.js +124 -0
- package/dist/commands/checks/list.js.map +1 -0
- package/dist/commands/checks/run.d.ts +18 -0
- package/dist/commands/checks/run.js +141 -0
- package/dist/commands/checks/run.js.map +1 -0
- package/dist/commands/checks/stats.d.ts +22 -0
- package/dist/commands/checks/stats.js +182 -0
- package/dist/commands/checks/stats.js.map +1 -0
- package/dist/commands/debug/parse-file.d.ts +13 -0
- package/dist/commands/debug/parse-file.js +74 -0
- package/dist/commands/debug/parse-file.js.map +1 -0
- package/dist/commands/debug/parse-playwright-config.d.ts +9 -0
- package/dist/commands/debug/parse-playwright-config.js +27 -0
- package/dist/commands/debug/parse-playwright-config.js.map +1 -0
- package/dist/commands/debug/parse-project.d.ts +44 -0
- package/dist/commands/debug/parse-project.js +223 -0
- package/dist/commands/debug/parse-project.js.map +1 -0
- package/dist/commands/deploy.d.ts +29 -0
- package/dist/commands/deploy.js +915 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +13 -0
- package/dist/commands/destroy.js +105 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/env/add.d.ts +14 -0
- package/dist/commands/env/add.js +54 -0
- package/dist/commands/env/add.js.map +1 -0
- package/dist/commands/env/ls.d.ts +8 -0
- package/dist/commands/env/ls.js +21 -0
- package/dist/commands/env/ls.js.map +1 -0
- package/dist/commands/env/pull.d.ts +14 -0
- package/dist/commands/env/pull.js +72 -0
- package/dist/commands/env/pull.js.map +1 -0
- package/dist/commands/env/rm.d.ts +13 -0
- package/dist/commands/env/rm.js +46 -0
- package/dist/commands/env/rm.js.map +1 -0
- package/dist/commands/env/update.d.ts +15 -0
- package/dist/commands/env/update.js +55 -0
- package/dist/commands/env/update.js.map +1 -0
- package/dist/commands/help.d.ts +6 -0
- package/dist/commands/help.js +11 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/import/apply.d.ts +16 -0
- package/dist/commands/import/apply.js +152 -0
- package/dist/commands/import/apply.js.map +1 -0
- package/dist/commands/import/cancel.d.ts +16 -0
- package/dist/commands/import/cancel.js +123 -0
- package/dist/commands/import/cancel.js.map +1 -0
- package/dist/commands/import/commit.d.ts +18 -0
- package/dist/commands/import/commit.js +147 -0
- package/dist/commands/import/commit.js.map +1 -0
- package/dist/commands/import/plan.d.ts +23 -0
- package/dist/commands/import/plan.js +1288 -0
- package/dist/commands/import/plan.js.map +1 -0
- package/dist/commands/incidents/create.d.ts +17 -0
- package/dist/commands/incidents/create.js +103 -0
- package/dist/commands/incidents/create.js.map +1 -0
- package/dist/commands/incidents/list.d.ts +14 -0
- package/dist/commands/incidents/list.js +80 -0
- package/dist/commands/incidents/list.js.map +1 -0
- package/dist/commands/incidents/resolve.d.ts +16 -0
- package/dist/commands/incidents/resolve.js +79 -0
- package/dist/commands/incidents/resolve.js.map +1 -0
- package/dist/commands/incidents/update.d.ts +18 -0
- package/dist/commands/incidents/update.js +106 -0
- package/dist/commands/incidents/update.js.map +1 -0
- package/dist/commands/init.d.ts +25 -0
- package/dist/commands/init.js +296 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +50 -0
- package/dist/commands/login.js +892 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +10 -0
- package/dist/commands/logout.js +47 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/members/delete.d.ts +18 -0
- package/dist/commands/members/delete.js +73 -0
- package/dist/commands/members/delete.js.map +1 -0
- package/dist/commands/members/update.d.ts +21 -0
- package/dist/commands/members/update.js +104 -0
- package/dist/commands/members/update.js.map +1 -0
- package/dist/commands/members.d.ts +23 -0
- package/dist/commands/members.js +136 -0
- package/dist/commands/members.js.map +1 -0
- package/dist/commands/pw-test.d.ts +34 -0
- package/dist/commands/pw-test.js +365 -0
- package/dist/commands/pw-test.js.map +1 -0
- package/dist/commands/rca/get.d.ts +15 -0
- package/dist/commands/rca/get.js +69 -0
- package/dist/commands/rca/get.js.map +1 -0
- package/dist/commands/rca/run.d.ts +16 -0
- package/dist/commands/rca/run.js +113 -0
- package/dist/commands/rca/run.js.map +1 -0
- package/dist/commands/runtimes.d.ts +8 -0
- package/dist/commands/runtimes.js +25 -0
- package/dist/commands/runtimes.js.map +1 -0
- package/dist/commands/skills/index.d.ts +16 -0
- package/dist/commands/skills/index.js +143 -0
- package/dist/commands/skills/index.js.map +1 -0
- package/dist/commands/skills/install.d.ts +17 -0
- package/dist/commands/skills/install.js +124 -0
- package/dist/commands/skills/install.js.map +1 -0
- package/dist/commands/status-pages/get.d.ts +14 -0
- package/dist/commands/status-pages/get.js +48 -0
- package/dist/commands/status-pages/get.js.map +1 -0
- package/dist/commands/status-pages/list.d.ts +14 -0
- package/dist/commands/status-pages/list.js +82 -0
- package/dist/commands/status-pages/list.js.map +1 -0
- package/dist/commands/switch.d.ts +19 -0
- package/dist/commands/switch.js +110 -0
- package/dist/commands/switch.js.map +1 -0
- package/dist/commands/sync-playwright.d.ts +8 -0
- package/dist/commands/sync-playwright.js +48 -0
- package/dist/commands/sync-playwright.js.map +1 -0
- package/dist/commands/test-sessions/get.d.ts +21 -0
- package/dist/commands/test-sessions/get.js +121 -0
- package/dist/commands/test-sessions/get.js.map +1 -0
- package/dist/commands/test-sessions/list.d.ts +22 -0
- package/dist/commands/test-sessions/list.js +190 -0
- package/dist/commands/test-sessions/list.js.map +1 -0
- package/dist/commands/test.d.ts +39 -0
- package/dist/commands/test.js +403 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/trigger.d.ts +39 -0
- package/dist/commands/trigger.js +251 -0
- package/dist/commands/trigger.js.map +1 -0
- package/dist/commands/validate.d.ts +13 -0
- package/dist/commands/validate.js +66 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/whoami.d.ts +16 -0
- package/dist/commands/whoami.js +79 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +20 -0
- package/dist/constants.js +35 -0
- package/dist/constants.js.map +1 -0
- package/dist/constructs/alert-channel-codegen.d.ts +42 -0
- package/dist/constructs/alert-channel-codegen.js +102 -0
- package/dist/constructs/alert-channel-codegen.js.map +1 -0
- package/dist/constructs/alert-channel-subscription-codegen.d.ts +11 -0
- package/dist/constructs/alert-channel-subscription-codegen.js +20 -0
- package/dist/constructs/alert-channel-subscription-codegen.js.map +1 -0
- package/dist/constructs/alert-channel-subscription.d.ts +47 -0
- package/dist/constructs/alert-channel-subscription.js +49 -0
- package/dist/constructs/alert-channel-subscription.js.map +1 -0
- package/dist/constructs/alert-channel.d.ts +130 -0
- package/dist/constructs/alert-channel.js +106 -0
- package/dist/constructs/alert-channel.js.map +1 -0
- package/dist/constructs/alert-escalation-policy-codegen.d.ts +11 -0
- package/dist/constructs/alert-escalation-policy-codegen.js +72 -0
- package/dist/constructs/alert-escalation-policy-codegen.js.map +1 -0
- package/dist/constructs/alert-escalation-policy.d.ts +114 -0
- package/dist/constructs/alert-escalation-policy.js +62 -0
- package/dist/constructs/alert-escalation-policy.js.map +1 -0
- package/dist/constructs/api-assertion-codegen.d.ts +3 -0
- package/dist/constructs/api-assertion-codegen.js +19 -0
- package/dist/constructs/api-assertion-codegen.js.map +1 -0
- package/dist/constructs/api-assertion.d.ts +72 -0
- package/dist/constructs/api-assertion.js +77 -0
- package/dist/constructs/api-assertion.js.map +1 -0
- package/dist/constructs/api-check-bundle.d.ts +66 -0
- package/dist/constructs/api-check-bundle.js +30 -0
- package/dist/constructs/api-check-bundle.js.map +1 -0
- package/dist/constructs/api-check-codegen.d.ts +19 -0
- package/dist/constructs/api-check-codegen.js +83 -0
- package/dist/constructs/api-check-codegen.js.map +1 -0
- package/dist/constructs/api-check.d.ts +189 -0
- package/dist/constructs/api-check.js +215 -0
- package/dist/constructs/api-check.js.map +1 -0
- package/dist/constructs/api-request-codegen.d.ts +4 -0
- package/dist/constructs/api-request-codegen.js +66 -0
- package/dist/constructs/api-request-codegen.js.map +1 -0
- package/dist/constructs/api-request.d.ts +67 -0
- package/dist/constructs/api-request.js +2 -0
- package/dist/constructs/api-request.js.map +1 -0
- package/dist/constructs/browser-check-bundle.d.ts +64 -0
- package/dist/constructs/browser-check-bundle.js +31 -0
- package/dist/constructs/browser-check-bundle.js.map +1 -0
- package/dist/constructs/browser-check-codegen.d.ts +14 -0
- package/dist/constructs/browser-check-codegen.js +46 -0
- package/dist/constructs/browser-check-codegen.js.map +1 -0
- package/dist/constructs/browser-check.d.ts +134 -0
- package/dist/constructs/browser-check.js +169 -0
- package/dist/constructs/browser-check.js.map +1 -0
- package/dist/constructs/check-codegen.d.ts +140 -0
- package/dist/constructs/check-codegen.js +387 -0
- package/dist/constructs/check-codegen.js.map +1 -0
- package/dist/constructs/check-config.d.ts +2 -0
- package/dist/constructs/check-config.js +17 -0
- package/dist/constructs/check-config.js.map +1 -0
- package/dist/constructs/check-group-codegen.d.ts +46 -0
- package/dist/constructs/check-group-codegen.js +282 -0
- package/dist/constructs/check-group-codegen.js.map +1 -0
- package/dist/constructs/check-group-ref.d.ts +20 -0
- package/dist/constructs/check-group-ref.js +46 -0
- package/dist/constructs/check-group-ref.js.map +1 -0
- package/dist/constructs/check-group-v1.d.ts +316 -0
- package/dist/constructs/check-group-v1.js +285 -0
- package/dist/constructs/check-group-v1.js.map +1 -0
- package/dist/constructs/check-group-v2.d.ts +101 -0
- package/dist/constructs/check-group-v2.js +68 -0
- package/dist/constructs/check-group-v2.js.map +1 -0
- package/dist/constructs/check-group.d.ts +4 -0
- package/dist/constructs/check-group.js +5 -0
- package/dist/constructs/check-group.js.map +1 -0
- package/dist/constructs/check.d.ts +483 -0
- package/dist/constructs/check.js +444 -0
- package/dist/constructs/check.js.map +1 -0
- package/dist/constructs/construct-codegen.d.ts +42 -0
- package/dist/constructs/construct-codegen.js +106 -0
- package/dist/constructs/construct-codegen.js.map +1 -0
- package/dist/constructs/construct-diagnostics.d.ts +56 -0
- package/dist/constructs/construct-diagnostics.js +167 -0
- package/dist/constructs/construct-diagnostics.js.map +1 -0
- package/dist/constructs/construct.d.ts +175 -0
- package/dist/constructs/construct.js +179 -0
- package/dist/constructs/construct.js.map +1 -0
- package/dist/constructs/dashboard-bundle.d.ts +11 -0
- package/dist/constructs/dashboard-bundle.js +15 -0
- package/dist/constructs/dashboard-bundle.js.map +1 -0
- package/dist/constructs/dashboard-codegen.d.ts +29 -0
- package/dist/constructs/dashboard-codegen.js +104 -0
- package/dist/constructs/dashboard-codegen.js.map +1 -0
- package/dist/constructs/dashboard.d.ts +226 -0
- package/dist/constructs/dashboard.js +144 -0
- package/dist/constructs/dashboard.js.map +1 -0
- package/dist/constructs/diagnostics.d.ts +59 -0
- package/dist/constructs/diagnostics.js +71 -0
- package/dist/constructs/diagnostics.js.map +1 -0
- package/dist/constructs/dns-assertion-codegen.d.ts +3 -0
- package/dist/constructs/dns-assertion-codegen.js +26 -0
- package/dist/constructs/dns-assertion-codegen.js.map +1 -0
- package/dist/constructs/dns-assertion.d.ts +49 -0
- package/dist/constructs/dns-assertion.js +55 -0
- package/dist/constructs/dns-assertion.js.map +1 -0
- package/dist/constructs/dns-monitor-codegen.d.ts +13 -0
- package/dist/constructs/dns-monitor-codegen.js +34 -0
- package/dist/constructs/dns-monitor-codegen.js.map +1 -0
- package/dist/constructs/dns-monitor.d.ts +98 -0
- package/dist/constructs/dns-monitor.js +62 -0
- package/dist/constructs/dns-monitor.js.map +1 -0
- package/dist/constructs/dns-request-codegen.d.ts +4 -0
- package/dist/constructs/dns-request-codegen.js +28 -0
- package/dist/constructs/dns-request-codegen.js.map +1 -0
- package/dist/constructs/dns-request.d.ts +54 -0
- package/dist/constructs/dns-request.js +2 -0
- package/dist/constructs/dns-request.js.map +1 -0
- package/dist/constructs/email-alert-channel-codegen.d.ts +13 -0
- package/dist/constructs/email-alert-channel-codegen.js +34 -0
- package/dist/constructs/email-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/email-alert-channel.d.ts +27 -0
- package/dist/constructs/email-alert-channel.js +37 -0
- package/dist/constructs/email-alert-channel.js.map +1 -0
- package/dist/constructs/engine.d.ts +42 -0
- package/dist/constructs/engine.js +25 -0
- package/dist/constructs/engine.js.map +1 -0
- package/dist/constructs/environment-variable.d.ts +21 -0
- package/dist/constructs/environment-variable.js +2 -0
- package/dist/constructs/environment-variable.js.map +1 -0
- package/dist/constructs/frequency-codegen.d.ts +8 -0
- package/dist/constructs/frequency-codegen.js +59 -0
- package/dist/constructs/frequency-codegen.js.map +1 -0
- package/dist/constructs/frequency.d.ts +67 -0
- package/dist/constructs/frequency.js +71 -0
- package/dist/constructs/frequency.js.map +1 -0
- package/dist/constructs/grpc-assertion-codegen.d.ts +3 -0
- package/dist/constructs/grpc-assertion-codegen.js +89 -0
- package/dist/constructs/grpc-assertion-codegen.js.map +1 -0
- package/dist/constructs/grpc-assertion-validation.d.ts +13 -0
- package/dist/constructs/grpc-assertion-validation.js +69 -0
- package/dist/constructs/grpc-assertion-validation.js.map +1 -0
- package/dist/constructs/grpc-assertion.d.ts +96 -0
- package/dist/constructs/grpc-assertion.js +110 -0
- package/dist/constructs/grpc-assertion.js.map +1 -0
- package/dist/constructs/grpc-monitor-codegen.d.ts +13 -0
- package/dist/constructs/grpc-monitor-codegen.js +34 -0
- package/dist/constructs/grpc-monitor-codegen.js.map +1 -0
- package/dist/constructs/grpc-monitor.d.ts +94 -0
- package/dist/constructs/grpc-monitor.js +82 -0
- package/dist/constructs/grpc-monitor.js.map +1 -0
- package/dist/constructs/grpc-request-codegen.d.ts +4 -0
- package/dist/constructs/grpc-request-codegen.js +74 -0
- package/dist/constructs/grpc-request-codegen.js.map +1 -0
- package/dist/constructs/grpc-request.d.ts +154 -0
- package/dist/constructs/grpc-request.js +2 -0
- package/dist/constructs/grpc-request.js.map +1 -0
- package/dist/constructs/heartbeat-monitor-codegen.d.ts +11 -0
- package/dist/constructs/heartbeat-monitor-codegen.js +31 -0
- package/dist/constructs/heartbeat-monitor-codegen.js.map +1 -0
- package/dist/constructs/heartbeat-monitor.d.ts +41 -0
- package/dist/constructs/heartbeat-monitor.js +56 -0
- package/dist/constructs/heartbeat-monitor.js.map +1 -0
- package/dist/constructs/http-header.d.ts +18 -0
- package/dist/constructs/http-header.js +2 -0
- package/dist/constructs/http-header.js.map +1 -0
- package/dist/constructs/http-request.d.ts +2 -0
- package/dist/constructs/http-request.js +2 -0
- package/dist/constructs/http-request.js.map +1 -0
- package/dist/constructs/icmp-assertion-codegen.d.ts +3 -0
- package/dist/constructs/icmp-assertion-codegen.js +18 -0
- package/dist/constructs/icmp-assertion-codegen.js.map +1 -0
- package/dist/constructs/icmp-assertion.d.ts +56 -0
- package/dist/constructs/icmp-assertion.js +57 -0
- package/dist/constructs/icmp-assertion.js.map +1 -0
- package/dist/constructs/icmp-monitor-codegen.d.ts +13 -0
- package/dist/constructs/icmp-monitor-codegen.js +34 -0
- package/dist/constructs/icmp-monitor-codegen.js.map +1 -0
- package/dist/constructs/icmp-monitor.d.ts +94 -0
- package/dist/constructs/icmp-monitor.js +50 -0
- package/dist/constructs/icmp-monitor.js.map +1 -0
- package/dist/constructs/icmp-request-codegen.d.ts +4 -0
- package/dist/constructs/icmp-request-codegen.js +24 -0
- package/dist/constructs/icmp-request-codegen.js.map +1 -0
- package/dist/constructs/icmp-request.d.ts +37 -0
- package/dist/constructs/icmp-request.js +2 -0
- package/dist/constructs/icmp-request.js.map +1 -0
- package/dist/constructs/incident.d.ts +15 -0
- package/dist/constructs/incident.js +2 -0
- package/dist/constructs/incident.js.map +1 -0
- package/dist/constructs/incidentio-alert-channel-codegen.d.ts +13 -0
- package/dist/constructs/incidentio-alert-channel-codegen.js +91 -0
- package/dist/constructs/incidentio-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/incidentio-alert-channel.d.ts +44 -0
- package/dist/constructs/incidentio-alert-channel.js +67 -0
- package/dist/constructs/incidentio-alert-channel.js.map +1 -0
- package/dist/constructs/index.d.ts +66 -0
- package/dist/constructs/index.js +67 -0
- package/dist/constructs/index.js.map +1 -0
- package/dist/constructs/internal/account-features.d.ts +13 -0
- package/dist/constructs/internal/account-features.js +24 -0
- package/dist/constructs/internal/account-features.js.map +1 -0
- package/dist/constructs/internal/assertion-codegen.d.ts +31 -0
- package/dist/constructs/internal/assertion-codegen.js +180 -0
- package/dist/constructs/internal/assertion-codegen.js.map +1 -0
- package/dist/constructs/internal/assertion-grammar.d.ts +35 -0
- package/dist/constructs/internal/assertion-grammar.js +75 -0
- package/dist/constructs/internal/assertion-grammar.js.map +1 -0
- package/dist/constructs/internal/assertion-validation.d.ts +3 -0
- package/dist/constructs/internal/assertion-validation.js +16 -0
- package/dist/constructs/internal/assertion-validation.js.map +1 -0
- package/dist/constructs/internal/assertion.d.ts +46 -0
- package/dist/constructs/internal/assertion.js +94 -0
- package/dist/constructs/internal/assertion.js.map +1 -0
- package/dist/constructs/internal/codegen/codegen.d.ts +9 -0
- package/dist/constructs/internal/codegen/codegen.js +16 -0
- package/dist/constructs/internal/codegen/codegen.js.map +1 -0
- package/dist/constructs/internal/codegen/context.d.ts +137 -0
- package/dist/constructs/internal/codegen/context.js +543 -0
- package/dist/constructs/internal/codegen/context.js.map +1 -0
- package/dist/constructs/internal/codegen/index.d.ts +6 -0
- package/dist/constructs/internal/codegen/index.js +6 -0
- package/dist/constructs/internal/codegen/index.js.map +1 -0
- package/dist/constructs/internal/codegen/render.d.ts +68 -0
- package/dist/constructs/internal/codegen/render.js +75 -0
- package/dist/constructs/internal/codegen/render.js.map +1 -0
- package/dist/constructs/internal/codegen/safety.d.ts +2 -0
- package/dist/constructs/internal/codegen/safety.js +3 -0
- package/dist/constructs/internal/codegen/safety.js.map +1 -0
- package/dist/constructs/internal/codegen/snippet.d.ts +12 -0
- package/dist/constructs/internal/codegen/snippet.js +39 -0
- package/dist/constructs/internal/codegen/snippet.js.map +1 -0
- package/dist/constructs/internal/common-diagnostics.d.ts +21 -0
- package/dist/constructs/internal/common-diagnostics.js +88 -0
- package/dist/constructs/internal/common-diagnostics.js.map +1 -0
- package/dist/constructs/internal/declaring-file.d.ts +39 -0
- package/dist/constructs/internal/declaring-file.js +139 -0
- package/dist/constructs/internal/declaring-file.js.map +1 -0
- package/dist/constructs/internal/default-retry-strategy.d.ts +9 -0
- package/dist/constructs/internal/default-retry-strategy.js +13 -0
- package/dist/constructs/internal/default-retry-strategy.js.map +1 -0
- package/dist/constructs/internal/retry-strategy-defaults.d.ts +13 -0
- package/dist/constructs/internal/retry-strategy-defaults.js +14 -0
- package/dist/constructs/internal/retry-strategy-defaults.js.map +1 -0
- 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/internal/status-page-v3-component-configuration.d.ts +10 -0
- package/dist/constructs/internal/status-page-v3-component-configuration.js +13 -0
- package/dist/constructs/internal/status-page-v3-component-configuration.js.map +1 -0
- package/dist/constructs/internal/status-page-v3-theme-colors.d.ts +4 -0
- package/dist/constructs/internal/status-page-v3-theme-colors.js +21 -0
- package/dist/constructs/internal/status-page-v3-theme-colors.js.map +1 -0
- package/dist/constructs/ip.d.ts +2 -0
- package/dist/constructs/ip.js +2 -0
- package/dist/constructs/ip.js.map +1 -0
- package/dist/constructs/key-value-pair-codegen.d.ts +9 -0
- package/dist/constructs/key-value-pair-codegen.js +56 -0
- package/dist/constructs/key-value-pair-codegen.js.map +1 -0
- package/dist/constructs/key-value-pair.d.ts +41 -0
- package/dist/constructs/key-value-pair.js +2 -0
- package/dist/constructs/key-value-pair.js.map +1 -0
- package/dist/constructs/maintenance-window-codegen.d.ts +21 -0
- package/dist/constructs/maintenance-window-codegen.js +70 -0
- package/dist/constructs/maintenance-window-codegen.js.map +1 -0
- package/dist/constructs/maintenance-window.d.ts +96 -0
- package/dist/constructs/maintenance-window.js +86 -0
- package/dist/constructs/maintenance-window.js.map +1 -0
- package/dist/constructs/monitor-codegen.d.ts +1 -0
- package/dist/constructs/monitor-codegen.js +2 -0
- package/dist/constructs/monitor-codegen.js.map +1 -0
- package/dist/constructs/monitor.d.ts +106 -0
- package/dist/constructs/monitor.js +15 -0
- package/dist/constructs/monitor.js.map +1 -0
- package/dist/constructs/msteams-alert-channel-codegen.d.ts +13 -0
- package/dist/constructs/msteams-alert-channel-codegen.js +61 -0
- package/dist/constructs/msteams-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/msteams-alert-channel.d.ts +39 -0
- package/dist/constructs/msteams-alert-channel.js +162 -0
- package/dist/constructs/msteams-alert-channel.js.map +1 -0
- package/dist/constructs/multi-step-check-bundle.d.ts +55 -0
- package/dist/constructs/multi-step-check-bundle.js +21 -0
- package/dist/constructs/multi-step-check-bundle.js.map +1 -0
- package/dist/constructs/multi-step-check-codegen.d.ts +13 -0
- package/dist/constructs/multi-step-check-codegen.js +37 -0
- package/dist/constructs/multi-step-check-codegen.js.map +1 -0
- package/dist/constructs/multi-step-check.d.ts +83 -0
- package/dist/constructs/multi-step-check.js +121 -0
- package/dist/constructs/multi-step-check.js.map +1 -0
- package/dist/constructs/opsgenie-alert-channel-codegen.d.ts +16 -0
- package/dist/constructs/opsgenie-alert-channel-codegen.js +37 -0
- package/dist/constructs/opsgenie-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/opsgenie-alert-channel.d.ts +46 -0
- package/dist/constructs/opsgenie-alert-channel.js +47 -0
- package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
- package/dist/constructs/pagerduty-alert-channel-codegen.d.ts +15 -0
- package/dist/constructs/pagerduty-alert-channel-codegen.js +49 -0
- package/dist/constructs/pagerduty-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/pagerduty-alert-channel.d.ts +40 -0
- package/dist/constructs/pagerduty-alert-channel.js +44 -0
- package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
- package/dist/constructs/phone-call-alert-channel-codegen.d.ts +14 -0
- package/dist/constructs/phone-call-alert-channel-codegen.js +42 -0
- package/dist/constructs/phone-call-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/phone-call-alert-channel.d.ts +34 -0
- package/dist/constructs/phone-call-alert-channel.js +42 -0
- package/dist/constructs/phone-call-alert-channel.js.map +1 -0
- package/dist/constructs/playwright-check-bundle.d.ts +71 -0
- package/dist/constructs/playwright-check-bundle.js +36 -0
- package/dist/constructs/playwright-check-bundle.js.map +1 -0
- package/dist/constructs/playwright-check-codegen.d.ts +85 -0
- package/dist/constructs/playwright-check-codegen.js +212 -0
- package/dist/constructs/playwright-check-codegen.js.map +1 -0
- package/dist/constructs/playwright-check.d.ts +176 -0
- package/dist/constructs/playwright-check.js +293 -0
- package/dist/constructs/playwright-check.js.map +1 -0
- package/dist/constructs/playwright-config-codegen.d.ts +4 -0
- package/dist/constructs/playwright-config-codegen.js +5 -0
- package/dist/constructs/playwright-config-codegen.js.map +1 -0
- package/dist/constructs/playwright-config.d.ts +52 -0
- package/dist/constructs/playwright-config.js +2 -0
- package/dist/constructs/playwright-config.js.map +1 -0
- package/dist/constructs/private-location-check-assignment-codegen.d.ts +10 -0
- package/dist/constructs/private-location-check-assignment-codegen.js +15 -0
- package/dist/constructs/private-location-check-assignment-codegen.js.map +1 -0
- package/dist/constructs/private-location-check-assignment.d.ts +31 -0
- package/dist/constructs/private-location-check-assignment.js +40 -0
- package/dist/constructs/private-location-check-assignment.js.map +1 -0
- package/dist/constructs/private-location-codegen.d.ts +15 -0
- package/dist/constructs/private-location-codegen.js +46 -0
- package/dist/constructs/private-location-codegen.js.map +1 -0
- package/dist/constructs/private-location-group-assignment-codegen.d.ts +10 -0
- package/dist/constructs/private-location-group-assignment-codegen.js +15 -0
- package/dist/constructs/private-location-group-assignment-codegen.js.map +1 -0
- package/dist/constructs/private-location-group-assignment.d.ts +32 -0
- package/dist/constructs/private-location-group-assignment.js +43 -0
- package/dist/constructs/private-location-group-assignment.js.map +1 -0
- package/dist/constructs/private-location.d.ts +66 -0
- package/dist/constructs/private-location.js +90 -0
- package/dist/constructs/private-location.js.map +1 -0
- package/dist/constructs/project-bundle.d.ts +49 -0
- package/dist/constructs/project-bundle.js +74 -0
- package/dist/constructs/project-bundle.js.map +1 -0
- package/dist/constructs/project.d.ts +64 -0
- package/dist/constructs/project.js +237 -0
- package/dist/constructs/project.js.map +1 -0
- package/dist/constructs/query-param.d.ts +18 -0
- package/dist/constructs/query-param.js +2 -0
- package/dist/constructs/query-param.js.map +1 -0
- package/dist/constructs/ref-codegen.d.ts +3 -0
- package/dist/constructs/ref-codegen.js +11 -0
- package/dist/constructs/ref-codegen.js.map +1 -0
- package/dist/constructs/ref.d.ts +49 -0
- package/dist/constructs/ref.js +54 -0
- package/dist/constructs/ref.js.map +1 -0
- package/dist/constructs/retry-strategy-codegen.d.ts +10 -0
- package/dist/constructs/retry-strategy-codegen.js +113 -0
- package/dist/constructs/retry-strategy-codegen.js.map +1 -0
- package/dist/constructs/retry-strategy.d.ts +192 -0
- package/dist/constructs/retry-strategy.js +107 -0
- package/dist/constructs/retry-strategy.js.map +1 -0
- package/dist/constructs/session.d.ts +115 -0
- package/dist/constructs/session.js +291 -0
- package/dist/constructs/session.js.map +1 -0
- package/dist/constructs/slack-alert-channel-codegen.d.ts +14 -0
- package/dist/constructs/slack-alert-channel-codegen.js +42 -0
- package/dist/constructs/slack-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/slack-alert-channel.d.ts +27 -0
- package/dist/constructs/slack-alert-channel.js +41 -0
- package/dist/constructs/slack-alert-channel.js.map +1 -0
- package/dist/constructs/slack-app-alert-channel-codegen.d.ts +13 -0
- package/dist/constructs/slack-app-alert-channel-codegen.js +39 -0
- package/dist/constructs/slack-app-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/slack-app-alert-channel.d.ts +31 -0
- package/dist/constructs/slack-app-alert-channel.js +38 -0
- package/dist/constructs/slack-app-alert-channel.js.map +1 -0
- package/dist/constructs/sms-alert-channel-codegen.d.ts +14 -0
- package/dist/constructs/sms-alert-channel-codegen.js +42 -0
- package/dist/constructs/sms-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/sms-alert-channel.d.ts +33 -0
- package/dist/constructs/sms-alert-channel.js +41 -0
- package/dist/constructs/sms-alert-channel.js.map +1 -0
- package/dist/constructs/ssl-assertion-codegen.d.ts +5 -0
- package/dist/constructs/ssl-assertion-codegen.js +74 -0
- package/dist/constructs/ssl-assertion-codegen.js.map +1 -0
- package/dist/constructs/ssl-assertion-grammar.d.ts +123 -0
- package/dist/constructs/ssl-assertion-grammar.js +90 -0
- package/dist/constructs/ssl-assertion-grammar.js.map +1 -0
- package/dist/constructs/ssl-assertion-validation.d.ts +13 -0
- package/dist/constructs/ssl-assertion-validation.js +118 -0
- package/dist/constructs/ssl-assertion-validation.js.map +1 -0
- package/dist/constructs/ssl-assertion.d.ts +142 -0
- package/dist/constructs/ssl-assertion.js +150 -0
- package/dist/constructs/ssl-assertion.js.map +1 -0
- package/dist/constructs/ssl-monitor-codegen.d.ts +36 -0
- package/dist/constructs/ssl-monitor-codegen.js +53 -0
- package/dist/constructs/ssl-monitor-codegen.js.map +1 -0
- package/dist/constructs/ssl-monitor.d.ts +97 -0
- package/dist/constructs/ssl-monitor.js +73 -0
- package/dist/constructs/ssl-monitor.js.map +1 -0
- package/dist/constructs/ssl-request-codegen.d.ts +4 -0
- package/dist/constructs/ssl-request-codegen.js +49 -0
- package/dist/constructs/ssl-request-codegen.js.map +1 -0
- package/dist/constructs/ssl-request.d.ts +143 -0
- package/dist/constructs/ssl-request.js +2 -0
- package/dist/constructs/ssl-request.js.map +1 -0
- package/dist/constructs/status-page-codegen.d.ts +30 -0
- package/dist/constructs/status-page-codegen.js +88 -0
- package/dist/constructs/status-page-codegen.js.map +1 -0
- package/dist/constructs/status-page-service-codegen.d.ts +12 -0
- package/dist/constructs/status-page-service-codegen.js +39 -0
- package/dist/constructs/status-page-service-codegen.js.map +1 -0
- package/dist/constructs/status-page-service.d.ts +51 -0
- package/dist/constructs/status-page-service.js +69 -0
- package/dist/constructs/status-page-service.js.map +1 -0
- package/dist/constructs/status-page-v3-automation-rule-codegen.d.ts +22 -0
- package/dist/constructs/status-page-v3-automation-rule-codegen.js +52 -0
- package/dist/constructs/status-page-v3-automation-rule-codegen.js.map +1 -0
- package/dist/constructs/status-page-v3-automation-rule.d.ts +90 -0
- package/dist/constructs/status-page-v3-automation-rule.js +87 -0
- package/dist/constructs/status-page-v3-automation-rule.js.map +1 -0
- package/dist/constructs/status-page-v3-codegen.d.ts +39 -0
- package/dist/constructs/status-page-v3-codegen.js +139 -0
- package/dist/constructs/status-page-v3-codegen.js.map +1 -0
- package/dist/constructs/status-page-v3-component-codegen.d.ts +25 -0
- package/dist/constructs/status-page-v3-component-codegen.js +87 -0
- package/dist/constructs/status-page-v3-component-codegen.js.map +1 -0
- package/dist/constructs/status-page-v3-component.d.ts +115 -0
- package/dist/constructs/status-page-v3-component.js +143 -0
- package/dist/constructs/status-page-v3-component.js.map +1 -0
- package/dist/constructs/status-page-v3.d.ts +201 -0
- package/dist/constructs/status-page-v3.js +158 -0
- package/dist/constructs/status-page-v3.js.map +1 -0
- package/dist/constructs/status-page.d.ts +83 -0
- package/dist/constructs/status-page.js +75 -0
- package/dist/constructs/status-page.js.map +1 -0
- package/dist/constructs/tcp-monitor-codegen.d.ts +15 -0
- package/dist/constructs/tcp-monitor-codegen.js +65 -0
- package/dist/constructs/tcp-monitor-codegen.js.map +1 -0
- package/dist/constructs/tcp-monitor.d.ts +167 -0
- package/dist/constructs/tcp-monitor.js +89 -0
- package/dist/constructs/tcp-monitor.js.map +1 -0
- package/dist/constructs/telegram-alert-channel-codegen.d.ts +13 -0
- package/dist/constructs/telegram-alert-channel-codegen.js +108 -0
- package/dist/constructs/telegram-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/telegram-alert-channel.d.ts +49 -0
- package/dist/constructs/telegram-alert-channel.js +63 -0
- package/dist/constructs/telegram-alert-channel.js.map +1 -0
- package/dist/constructs/time-zone.d.ts +24 -0
- package/dist/constructs/time-zone.js +455 -0
- package/dist/constructs/time-zone.js.map +1 -0
- package/dist/constructs/traceroute-assertion-codegen.d.ts +3 -0
- package/dist/constructs/traceroute-assertion-codegen.js +17 -0
- package/dist/constructs/traceroute-assertion-codegen.js.map +1 -0
- package/dist/constructs/traceroute-assertion-grammar.d.ts +33 -0
- package/dist/constructs/traceroute-assertion-grammar.js +33 -0
- package/dist/constructs/traceroute-assertion-grammar.js.map +1 -0
- package/dist/constructs/traceroute-assertion-validation.d.ts +11 -0
- package/dist/constructs/traceroute-assertion-validation.js +71 -0
- package/dist/constructs/traceroute-assertion-validation.js.map +1 -0
- package/dist/constructs/traceroute-assertion.d.ts +48 -0
- package/dist/constructs/traceroute-assertion.js +50 -0
- package/dist/constructs/traceroute-assertion.js.map +1 -0
- package/dist/constructs/traceroute-monitor-codegen.d.ts +13 -0
- package/dist/constructs/traceroute-monitor-codegen.js +36 -0
- package/dist/constructs/traceroute-monitor-codegen.js.map +1 -0
- package/dist/constructs/traceroute-monitor.d.ts +91 -0
- package/dist/constructs/traceroute-monitor.js +54 -0
- package/dist/constructs/traceroute-monitor.js.map +1 -0
- package/dist/constructs/traceroute-request-codegen.d.ts +4 -0
- package/dist/constructs/traceroute-request-codegen.js +41 -0
- package/dist/constructs/traceroute-request-codegen.js.map +1 -0
- package/dist/constructs/traceroute-request.d.ts +84 -0
- package/dist/constructs/traceroute-request.js +2 -0
- package/dist/constructs/traceroute-request.js.map +1 -0
- package/dist/constructs/url-assertion-codegen.d.ts +3 -0
- package/dist/constructs/url-assertion-codegen.js +11 -0
- package/dist/constructs/url-assertion-codegen.js.map +1 -0
- package/dist/constructs/url-assertion.d.ts +60 -0
- package/dist/constructs/url-assertion.js +52 -0
- package/dist/constructs/url-assertion.js.map +1 -0
- package/dist/constructs/url-monitor-codegen.d.ts +13 -0
- package/dist/constructs/url-monitor-codegen.js +34 -0
- package/dist/constructs/url-monitor-codegen.js.map +1 -0
- package/dist/constructs/url-monitor.d.ts +162 -0
- package/dist/constructs/url-monitor.js +114 -0
- package/dist/constructs/url-monitor.js.map +1 -0
- package/dist/constructs/url-request-codegen.d.ts +4 -0
- package/dist/constructs/url-request-codegen.js +28 -0
- package/dist/constructs/url-request-codegen.js.map +1 -0
- package/dist/constructs/url-request.d.ts +65 -0
- package/dist/constructs/url-request.js +2 -0
- package/dist/constructs/url-request.js.map +1 -0
- package/dist/constructs/webhook-alert-channel-codegen.d.ts +34 -0
- package/dist/constructs/webhook-alert-channel-codegen.js +147 -0
- package/dist/constructs/webhook-alert-channel-codegen.js.map +1 -0
- package/dist/constructs/webhook-alert-channel.d.ts +68 -0
- package/dist/constructs/webhook-alert-channel.js +59 -0
- package/dist/constructs/webhook-alert-channel.js.map +1 -0
- package/dist/formatters/account-members.d.ts +8 -0
- package/dist/formatters/account-members.js +115 -0
- package/dist/formatters/account-members.js.map +1 -0
- package/dist/formatters/account-plan.d.ts +16 -0
- package/dist/formatters/account-plan.js +320 -0
- package/dist/formatters/account-plan.js.map +1 -0
- package/dist/formatters/alert-channels.d.ts +15 -0
- package/dist/formatters/alert-channels.js +257 -0
- package/dist/formatters/alert-channels.js.map +1 -0
- package/dist/formatters/analytics.d.ts +8 -0
- package/dist/formatters/analytics.js +223 -0
- package/dist/formatters/analytics.js.map +1 -0
- package/dist/formatters/assertion-line.d.ts +27 -0
- package/dist/formatters/assertion-line.js +126 -0
- package/dist/formatters/assertion-line.js.map +1 -0
- package/dist/formatters/assets.d.ts +22 -0
- package/dist/formatters/assets.js +280 -0
- package/dist/formatters/assets.js.map +1 -0
- package/dist/formatters/batch-stats.d.ts +8 -0
- package/dist/formatters/batch-stats.js +203 -0
- package/dist/formatters/batch-stats.js.map +1 -0
- package/dist/formatters/check-result-detail.d.ts +12 -0
- package/dist/formatters/check-result-detail.js +1099 -0
- package/dist/formatters/check-result-detail.js.map +1 -0
- package/dist/formatters/check-sessions.d.ts +5 -0
- package/dist/formatters/check-sessions.js +113 -0
- package/dist/formatters/check-sessions.js.map +1 -0
- package/dist/formatters/checks.d.ts +29 -0
- package/dist/formatters/checks.js +336 -0
- package/dist/formatters/checks.js.map +1 -0
- package/dist/formatters/incidents.d.ts +7 -0
- package/dist/formatters/incidents.js +172 -0
- package/dist/formatters/incidents.js.map +1 -0
- package/dist/formatters/rca.d.ts +42 -0
- package/dist/formatters/rca.js +156 -0
- package/dist/formatters/rca.js.map +1 -0
- package/dist/formatters/render.d.ts +48 -0
- package/dist/formatters/render.js +263 -0
- package/dist/formatters/render.js.map +1 -0
- package/dist/formatters/status-pages.d.ts +7 -0
- package/dist/formatters/status-pages.js +236 -0
- package/dist/formatters/status-pages.js.map +1 -0
- package/dist/formatters/test-sessions.d.ts +18 -0
- package/dist/formatters/test-sessions.js +341 -0
- package/dist/formatters/test-sessions.js.map +1 -0
- package/dist/formatters/usage.d.ts +21 -0
- package/dist/formatters/usage.js +313 -0
- package/dist/formatters/usage.js.map +1 -0
- package/dist/help/examples.d.ts +6 -0
- package/dist/help/examples.js +20 -0
- package/dist/help/examples.js.map +1 -0
- package/dist/help/help-extension.d.ts +6 -0
- package/dist/help/help-extension.js +93 -0
- package/dist/help/help-extension.js.map +1 -0
- package/dist/help/skills.d.ts +7 -0
- package/dist/help/skills.js +20 -0
- package/dist/help/skills.js.map +1 -0
- package/dist/helpers/account-member-target.d.ts +14 -0
- package/dist/helpers/account-member-target.js +37 -0
- package/dist/helpers/account-member-target.js.map +1 -0
- package/dist/helpers/accounts.d.ts +28 -0
- package/dist/helpers/accounts.js +50 -0
- package/dist/helpers/accounts.js.map +1 -0
- package/dist/helpers/activate-account.d.ts +13 -0
- package/dist/helpers/activate-account.js +24 -0
- package/dist/helpers/activate-account.js.map +1 -0
- package/dist/helpers/api-fields.d.ts +4 -0
- package/dist/helpers/api-fields.js +25 -0
- package/dist/helpers/api-fields.js.map +1 -0
- package/dist/helpers/cli-mode.d.ts +28 -0
- package/dist/helpers/cli-mode.js +210 -0
- package/dist/helpers/cli-mode.js.map +1 -0
- package/dist/helpers/command-preview.d.ts +76 -0
- package/dist/helpers/command-preview.js +74 -0
- package/dist/helpers/command-preview.js.map +1 -0
- package/dist/helpers/command-style.d.ts +24 -0
- package/dist/helpers/command-style.js +135 -0
- package/dist/helpers/command-style.js.map +1 -0
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/constants.js +2 -0
- package/dist/helpers/constants.js.map +1 -0
- package/dist/helpers/content-range.d.ts +1 -0
- package/dist/helpers/content-range.js +7 -0
- package/dist/helpers/content-range.js.map +1 -0
- package/dist/helpers/flags.d.ts +22 -0
- package/dist/helpers/flags.js +68 -0
- package/dist/helpers/flags.js.map +1 -0
- package/dist/helpers/import-plan-selection.d.ts +70 -0
- package/dist/helpers/import-plan-selection.js +134 -0
- package/dist/helpers/import-plan-selection.js.map +1 -0
- package/dist/helpers/incidents.d.ts +15 -0
- package/dist/helpers/incidents.js +50 -0
- package/dist/helpers/incidents.js.map +1 -0
- package/dist/helpers/invalid-input-error.d.ts +15 -0
- package/dist/helpers/invalid-input-error.js +17 -0
- package/dist/helpers/invalid-input-error.js.map +1 -0
- package/dist/helpers/number.d.ts +3 -0
- package/dist/helpers/number.js +21 -0
- package/dist/helpers/number.js.map +1 -0
- package/dist/helpers/onboarding/boilerplate.d.ts +15 -0
- package/dist/helpers/onboarding/boilerplate.js +178 -0
- package/dist/helpers/onboarding/boilerplate.js.map +1 -0
- package/dist/helpers/onboarding/clipboard.d.ts +1 -0
- package/dist/helpers/onboarding/clipboard.js +28 -0
- package/dist/helpers/onboarding/clipboard.js.map +1 -0
- package/dist/helpers/onboarding/detect-project.d.ts +10 -0
- package/dist/helpers/onboarding/detect-project.js +22 -0
- package/dist/helpers/onboarding/detect-project.js.map +1 -0
- package/dist/helpers/onboarding/index.d.ts +7 -0
- package/dist/helpers/onboarding/index.js +8 -0
- package/dist/helpers/onboarding/index.js.map +1 -0
- package/dist/helpers/onboarding/messages.d.ts +12 -0
- package/dist/helpers/onboarding/messages.js +155 -0
- package/dist/helpers/onboarding/messages.js.map +1 -0
- package/dist/helpers/onboarding/prompt-display.d.ts +1 -0
- package/dist/helpers/onboarding/prompt-display.js +76 -0
- package/dist/helpers/onboarding/prompt-display.js.map +1 -0
- package/dist/helpers/onboarding/prompts-helpers.d.ts +2 -0
- package/dist/helpers/onboarding/prompts-helpers.js +13 -0
- package/dist/helpers/onboarding/prompts-helpers.js.map +1 -0
- package/dist/helpers/onboarding/skill-install.d.ts +10 -0
- package/dist/helpers/onboarding/skill-install.js +85 -0
- package/dist/helpers/onboarding/skill-install.js.map +1 -0
- package/dist/helpers/onboarding/template-prompt.d.ts +2 -0
- package/dist/helpers/onboarding/template-prompt.js +14 -0
- package/dist/helpers/onboarding/template-prompt.js.map +1 -0
- package/dist/helpers/prompts.d.ts +7 -0
- package/dist/helpers/prompts.js +10 -0
- package/dist/helpers/prompts.js.map +1 -0
- package/dist/helpers/recast-acorn-parser.d.ts +2 -0
- package/dist/helpers/recast-acorn-parser.js +22 -0
- package/dist/helpers/recast-acorn-parser.js.map +1 -0
- package/dist/helpers/result-assets.d.ts +54 -0
- package/dist/helpers/result-assets.js +319 -0
- package/dist/helpers/result-assets.js.map +1 -0
- package/dist/helpers/test-helper.d.ts +31 -0
- package/dist/helpers/test-helper.js +105 -0
- package/dist/helpers/test-helper.js.map +1 -0
- package/dist/helpers/usage.d.ts +64 -0
- package/dist/helpers/usage.js +242 -0
- package/dist/helpers/usage.js.map +1 -0
- package/dist/helpers/wrap.d.ts +6 -0
- package/dist/helpers/wrap.js +49 -0
- package/dist/helpers/wrap.js.map +1 -0
- package/dist/helpers/write-config-helpers.d.ts +5 -0
- package/dist/helpers/write-config-helpers.js +55 -0
- package/dist/helpers/write-config-helpers.js.map +1 -0
- 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 +5 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/loader/config.d.ts +3 -0
- package/dist/loader/config.js +8 -0
- package/dist/loader/config.js.map +1 -0
- package/dist/loader/index.d.ts +5 -0
- package/dist/loader/index.js +6 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/jiti.d.ts +28 -0
- package/dist/loader/jiti.js +76 -0
- package/dist/loader/jiti.js.map +1 -0
- package/dist/loader/loader.d.ts +43 -0
- package/dist/loader/loader.js +37 -0
- package/dist/loader/loader.js.map +1 -0
- package/dist/loader/match.d.ts +15 -0
- package/dist/loader/match.js +43 -0
- package/dist/loader/match.js.map +1 -0
- package/dist/loader/mixed.d.ts +7 -0
- package/dist/loader/mixed.js +36 -0
- package/dist/loader/mixed.js.map +1 -0
- package/dist/loader/native.d.ts +10 -0
- package/dist/loader/native.js +30 -0
- package/dist/loader/native.js.map +1 -0
- package/dist/messages/common-messages.d.ts +7 -0
- package/dist/messages/common-messages.js +11 -0
- package/dist/messages/common-messages.js.map +1 -0
- package/dist/playwright/playwright-config-loader.d.ts +1 -0
- package/dist/playwright/playwright-config-loader.js +26 -0
- package/dist/playwright/playwright-config-loader.js.map +1 -0
- package/dist/playwright/playwright-config-template.d.ts +8 -0
- package/dist/playwright/playwright-config-template.js +53 -0
- package/dist/playwright/playwright-config-template.js.map +1 -0
- package/dist/reporters/abstract-list.d.ts +67 -0
- package/dist/reporters/abstract-list.js +387 -0
- package/dist/reporters/abstract-list.js.map +1 -0
- package/dist/reporters/ci.d.ts +12 -0
- package/dist/reporters/ci.js +31 -0
- package/dist/reporters/ci.js.map +1 -0
- package/dist/reporters/dot.d.ts +11 -0
- package/dist/reporters/dot.js +39 -0
- package/dist/reporters/dot.js.map +1 -0
- package/dist/reporters/github.d.ts +35 -0
- package/dist/reporters/github.js +130 -0
- package/dist/reporters/github.js.map +1 -0
- package/dist/reporters/json.d.ts +29 -0
- package/dist/reporters/json.js +155 -0
- package/dist/reporters/json.js.map +1 -0
- package/dist/reporters/list.d.ts +15 -0
- package/dist/reporters/list.js +83 -0
- package/dist/reporters/list.js.map +1 -0
- package/dist/reporters/reporter.d.ts +26 -0
- package/dist/reporters/reporter.js +22 -0
- package/dist/reporters/reporter.js.map +1 -0
- package/dist/reporters/util.d.ts +24 -0
- package/dist/reporters/util.js +663 -0
- package/dist/reporters/util.js.map +1 -0
- package/dist/rest/account-members.d.ts +56 -0
- package/dist/rest/account-members.js +18 -0
- package/dist/rest/account-members.js.map +1 -0
- package/dist/rest/accounts.d.ts +25 -0
- package/dist/rest/accounts.js +14 -0
- package/dist/rest/accounts.js.map +1 -0
- package/dist/rest/alert-channels.d.ts +52 -0
- package/dist/rest/alert-channels.js +23 -0
- package/dist/rest/alert-channels.js.map +1 -0
- package/dist/rest/alert-notifications.d.ts +39 -0
- package/dist/rest/alert-notifications.js +19 -0
- package/dist/rest/alert-notifications.js.map +1 -0
- package/dist/rest/analytics.d.ts +41 -0
- package/dist/rest/analytics.js +62 -0
- package/dist/rest/analytics.js.map +1 -0
- package/dist/rest/api.d.ts +80 -0
- package/dist/rest/api.js +165 -0
- package/dist/rest/api.js.map +1 -0
- package/dist/rest/asset-manifests.d.ts +30 -0
- package/dist/rest/asset-manifests.js +29 -0
- package/dist/rest/asset-manifests.js.map +1 -0
- package/dist/rest/assets.d.ts +64 -0
- package/dist/rest/assets.js +91 -0
- package/dist/rest/assets.js.map +1 -0
- package/dist/rest/batch-analytics.d.ts +26 -0
- package/dist/rest/batch-analytics.js +14 -0
- package/dist/rest/batch-analytics.js.map +1 -0
- package/dist/rest/cancel.d.ts +18 -0
- package/dist/rest/cancel.js +28 -0
- package/dist/rest/cancel.js.map +1 -0
- package/dist/rest/check-groups.d.ts +16 -0
- package/dist/rest/check-groups.js +11 -0
- package/dist/rest/check-groups.js.map +1 -0
- package/dist/rest/check-results.d.ts +210 -0
- package/dist/rest/check-results.js +19 -0
- package/dist/rest/check-results.js.map +1 -0
- package/dist/rest/check-sessions.d.ts +63 -0
- package/dist/rest/check-sessions.js +66 -0
- package/dist/rest/check-sessions.js.map +1 -0
- package/dist/rest/check-statuses.d.ts +23 -0
- package/dist/rest/check-statuses.js +20 -0
- package/dist/rest/check-statuses.js.map +1 -0
- package/dist/rest/checkly-storage.d.ts +21 -0
- package/dist/rest/checkly-storage.js +28 -0
- package/dist/rest/checkly-storage.js.map +1 -0
- package/dist/rest/checks.d.ts +48 -0
- package/dist/rest/checks.js +43 -0
- package/dist/rest/checks.js.map +1 -0
- package/dist/rest/entitlements.d.ts +47 -0
- package/dist/rest/entitlements.js +11 -0
- package/dist/rest/entitlements.js.map +1 -0
- package/dist/rest/environment-variables.d.ts +52 -0
- package/dist/rest/environment-variables.js +91 -0
- package/dist/rest/environment-variables.js.map +1 -0
- package/dist/rest/error-groups.d.ts +49 -0
- package/dist/rest/error-groups.js +14 -0
- package/dist/rest/error-groups.js.map +1 -0
- package/dist/rest/errors.d.ts +121 -0
- package/dist/rest/errors.js +328 -0
- package/dist/rest/errors.js.map +1 -0
- package/dist/rest/heartbeat-checks.d.ts +11 -0
- package/dist/rest/heartbeat-checks.js +16 -0
- package/dist/rest/heartbeat-checks.js.map +1 -0
- package/dist/rest/incidents.d.ts +60 -0
- package/dist/rest/incidents.js +28 -0
- package/dist/rest/incidents.js.map +1 -0
- package/dist/rest/locations.d.ts +11 -0
- package/dist/rest/locations.js +11 -0
- package/dist/rest/locations.js.map +1 -0
- package/dist/rest/private-locations.d.ts +10 -0
- package/dist/rest/private-locations.js +10 -0
- package/dist/rest/private-locations.js.map +1 -0
- package/dist/rest/projects.d.ts +545 -0
- package/dist/rest/projects.js +696 -0
- package/dist/rest/projects.js.map +1 -0
- package/dist/rest/rca.d.ts +14 -0
- package/dist/rest/rca.js +28 -0
- package/dist/rest/rca.js.map +1 -0
- package/dist/rest/retry.d.ts +55 -0
- package/dist/rest/retry.js +169 -0
- package/dist/rest/retry.js.map +1 -0
- package/dist/rest/runtimes.d.ts +9 -0
- package/dist/rest/runtimes.js +16 -0
- package/dist/rest/runtimes.js.map +1 -0
- package/dist/rest/status-pages.d.ts +40 -0
- package/dist/rest/status-pages.js +16 -0
- package/dist/rest/status-pages.js.map +1 -0
- 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 +217 -0
- package/dist/rest/test-sessions.js +118 -0
- package/dist/rest/test-sessions.js.map +1 -0
- package/dist/rest/usage.d.ts +221 -0
- package/dist/rest/usage.js +49 -0
- package/dist/rest/usage.js.map +1 -0
- package/dist/rest/users.d.ts +12 -0
- package/dist/rest/users.js +11 -0
- package/dist/rest/users.js.map +1 -0
- package/dist/rest/util.d.ts +3 -0
- package/dist/rest/util.js +10 -0
- package/dist/rest/util.js.map +1 -0
- package/dist/runtimes/index.d.ts +2 -0
- package/dist/runtimes/index.js +2 -0
- package/dist/runtimes/index.js.map +1 -0
- package/dist/runtimes/runtime.d.ts +8 -0
- package/dist/runtimes/runtime.js +2 -0
- package/dist/runtimes/runtime.js.map +1 -0
- package/dist/runtimes/snapshot.d.ts +2 -0
- package/dist/runtimes/snapshot.js +11 -0
- package/dist/runtimes/snapshot.js.map +1 -0
- package/dist/services/abstract-check-runner.d.ts +111 -0
- package/dist/services/abstract-check-runner.js +483 -0
- package/dist/services/abstract-check-runner.js.map +1 -0
- package/dist/services/check-parser/bundler.d.ts +191 -0
- package/dist/services/check-parser/bundler.js +1087 -0
- package/dist/services/check-parser/bundler.js.map +1 -0
- package/dist/services/check-parser/cache-hash.d.ts +286 -0
- package/dist/services/check-parser/cache-hash.js +329 -0
- package/dist/services/check-parser/cache-hash.js.map +1 -0
- package/dist/services/check-parser/collector.d.ts +33 -0
- package/dist/services/check-parser/collector.js +46 -0
- package/dist/services/check-parser/collector.js.map +1 -0
- package/dist/services/check-parser/errors.d.ts +8 -0
- package/dist/services/check-parser/errors.js +46 -0
- package/dist/services/check-parser/errors.js.map +1 -0
- package/dist/services/check-parser/faux-package.d.ts +9 -0
- package/dist/services/check-parser/faux-package.js +24 -0
- package/dist/services/check-parser/faux-package.js.map +1 -0
- package/dist/services/check-parser/lockfile-pruner.d.ts +115 -0
- package/dist/services/check-parser/lockfile-pruner.js +1330 -0
- package/dist/services/check-parser/lockfile-pruner.js.map +1 -0
- package/dist/services/check-parser/package-files/extension.d.ts +38 -0
- package/dist/services/check-parser/package-files/extension.js +66 -0
- package/dist/services/check-parser/package-files/extension.js.map +1 -0
- package/dist/services/check-parser/package-files/jsconfig-json-file.d.ts +17 -0
- package/dist/services/check-parser/package-files/jsconfig-json-file.js +23 -0
- package/dist/services/check-parser/package-files/jsconfig-json-file.js.map +1 -0
- package/dist/services/check-parser/package-files/json-source-file.d.ts +11 -0
- package/dist/services/check-parser/package-files/json-source-file.js +32 -0
- package/dist/services/check-parser/package-files/json-source-file.js.map +1 -0
- package/dist/services/check-parser/package-files/json-text-source-file.d.ts +5 -0
- package/dist/services/check-parser/package-files/json-text-source-file.js +18 -0
- package/dist/services/check-parser/package-files/json-text-source-file.js.map +1 -0
- package/dist/services/check-parser/package-files/loader.d.ts +7 -0
- package/dist/services/check-parser/package-files/loader.js +24 -0
- package/dist/services/check-parser/package-files/loader.js.map +1 -0
- package/dist/services/check-parser/package-files/lockfile-package-version.d.ts +88 -0
- package/dist/services/check-parser/package-files/lockfile-package-version.js +321 -0
- package/dist/services/check-parser/package-files/lockfile-package-version.js.map +1 -0
- package/dist/services/check-parser/package-files/lookup.d.ts +12 -0
- package/dist/services/check-parser/package-files/lookup.js +52 -0
- package/dist/services/check-parser/package-files/lookup.js.map +1 -0
- package/dist/services/check-parser/package-files/package-json-file.d.ts +72 -0
- package/dist/services/check-parser/package-files/package-json-file.js +271 -0
- package/dist/services/check-parser/package-files/package-json-file.js.map +1 -0
- package/dist/services/check-parser/package-files/package-manager.d.ts +288 -0
- package/dist/services/check-parser/package-files/package-manager.js +998 -0
- package/dist/services/check-parser/package-files/package-manager.js.map +1 -0
- package/dist/services/check-parser/package-files/paths.d.ts +98 -0
- package/dist/services/check-parser/package-files/paths.js +247 -0
- package/dist/services/check-parser/package-files/paths.js.map +1 -0
- package/dist/services/check-parser/package-files/pnpmfile.d.ts +40 -0
- package/dist/services/check-parser/package-files/pnpmfile.js +322 -0
- package/dist/services/check-parser/package-files/pnpmfile.js.map +1 -0
- package/dist/services/check-parser/package-files/resolver.d.ts +146 -0
- package/dist/services/check-parser/package-files/resolver.js +664 -0
- package/dist/services/check-parser/package-files/resolver.js.map +1 -0
- package/dist/services/check-parser/package-files/result.d.ts +38 -0
- package/dist/services/check-parser/package-files/result.js +53 -0
- package/dist/services/check-parser/package-files/result.js.map +1 -0
- package/dist/services/check-parser/package-files/source-file.d.ts +15 -0
- package/dist/services/check-parser/package-files/source-file.js +38 -0
- package/dist/services/check-parser/package-files/source-file.js.map +1 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.d.ts +116 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.js +156 -0
- package/dist/services/check-parser/package-files/tsconfig-json-file.js.map +1 -0
- package/dist/services/check-parser/package-files/walk.d.ts +8 -0
- package/dist/services/check-parser/package-files/walk.js +35 -0
- package/dist/services/check-parser/package-files/walk.js.map +1 -0
- package/dist/services/check-parser/package-files/workspace.d.ts +75 -0
- package/dist/services/check-parser/package-files/workspace.js +118 -0
- package/dist/services/check-parser/package-files/workspace.js.map +1 -0
- package/dist/services/check-parser/package-prune.d.ts +235 -0
- package/dist/services/check-parser/package-prune.js +760 -0
- package/dist/services/check-parser/package-prune.js.map +1 -0
- package/dist/services/check-parser/parser.d.ts +86 -0
- package/dist/services/check-parser/parser.js +498 -0
- package/dist/services/check-parser/parser.js.map +1 -0
- package/dist/services/check-parser/patched-dependencies.d.ts +147 -0
- package/dist/services/check-parser/patched-dependencies.js +453 -0
- package/dist/services/check-parser/patched-dependencies.js.map +1 -0
- package/dist/services/check-parser/playwright-config-expander.d.ts +16 -0
- package/dist/services/check-parser/playwright-config-expander.js +175 -0
- package/dist/services/check-parser/playwright-config-expander.js.map +1 -0
- package/dist/services/checkly-config-codegen.d.ts +4 -0
- package/dist/services/checkly-config-codegen.js +189 -0
- package/dist/services/checkly-config-codegen.js.map +1 -0
- package/dist/services/checkly-config-loader.d.ts +378 -0
- package/dist/services/checkly-config-loader.js +302 -0
- package/dist/services/checkly-config-loader.js.map +1 -0
- package/dist/services/config-diagnostics.d.ts +31 -0
- package/dist/services/config-diagnostics.js +57 -0
- package/dist/services/config-diagnostics.js.map +1 -0
- package/dist/services/config.d.ts +69 -0
- package/dist/services/config.js +179 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/content-hash.d.ts +14 -0
- package/dist/services/content-hash.js +22 -0
- package/dist/services/content-hash.js.map +1 -0
- package/dist/services/deploy-diff/diff-lines.d.ts +52 -0
- package/dist/services/deploy-diff/diff-lines.js +327 -0
- package/dist/services/deploy-diff/diff-lines.js.map +1 -0
- package/dist/services/deploy-diff/double-check.d.ts +9 -0
- package/dist/services/deploy-diff/double-check.js +21 -0
- package/dist/services/deploy-diff/double-check.js.map +1 -0
- package/dist/services/deploy-diff/import-shape.d.ts +171 -0
- package/dist/services/deploy-diff/import-shape.js +633 -0
- package/dist/services/deploy-diff/import-shape.js.map +1 -0
- package/dist/services/deploy-diff/legacy-payload.d.ts +22 -0
- package/dist/services/deploy-diff/legacy-payload.js +51 -0
- package/dist/services/deploy-diff/legacy-payload.js.map +1 -0
- package/dist/services/deploy-diff/plan-summary.d.ts +81 -0
- package/dist/services/deploy-diff/plan-summary.js +262 -0
- package/dist/services/deploy-diff/plan-summary.js.map +1 -0
- package/dist/services/deploy-diff/preview-output.d.ts +63 -0
- package/dist/services/deploy-diff/preview-output.js +403 -0
- package/dist/services/deploy-diff/preview-output.js.map +1 -0
- package/dist/services/deploy-diff/render.d.ts +59 -0
- package/dist/services/deploy-diff/render.js +326 -0
- package/dist/services/deploy-diff/render.js.map +1 -0
- package/dist/services/deploy-diff/shape-changes.d.ts +2 -0
- package/dist/services/deploy-diff/shape-changes.js +48 -0
- package/dist/services/deploy-diff/shape-changes.js.map +1 -0
- package/dist/services/deploy-diff/source-index.d.ts +18 -0
- package/dist/services/deploy-diff/source-index.js +48 -0
- package/dist/services/deploy-diff/source-index.js.map +1 -0
- package/dist/services/deploy-diff/variable-names.d.ts +30 -0
- package/dist/services/deploy-diff/variable-names.js +64 -0
- package/dist/services/deploy-diff/variable-names.js.map +1 -0
- package/dist/services/embedded-packages/cache.d.ts +52 -0
- package/dist/services/embedded-packages/cache.js +192 -0
- package/dist/services/embedded-packages/cache.js.map +1 -0
- package/dist/services/embedded-packages/diagnostics.d.ts +129 -0
- package/dist/services/embedded-packages/diagnostics.js +212 -0
- package/dist/services/embedded-packages/diagnostics.js.map +1 -0
- package/dist/services/embedded-packages/integrity.d.ts +28 -0
- package/dist/services/embedded-packages/integrity.js +58 -0
- package/dist/services/embedded-packages/integrity.js.map +1 -0
- package/dist/services/embedded-packages/lockfile-filter.d.ts +20 -0
- package/dist/services/embedded-packages/lockfile-filter.js +40 -0
- package/dist/services/embedded-packages/lockfile-filter.js.map +1 -0
- package/dist/services/embedded-packages/lockfile-packages.d.ts +77 -0
- package/dist/services/embedded-packages/lockfile-packages.js +439 -0
- package/dist/services/embedded-packages/lockfile-packages.js.map +1 -0
- package/dist/services/embedded-packages/materializer.d.ts +102 -0
- package/dist/services/embedded-packages/materializer.js +668 -0
- package/dist/services/embedded-packages/materializer.js.map +1 -0
- package/dist/services/embedded-packages/npmrc.d.ts +198 -0
- package/dist/services/embedded-packages/npmrc.js +539 -0
- package/dist/services/embedded-packages/npmrc.js.map +1 -0
- package/dist/services/embedded-packages/spec.d.ts +119 -0
- package/dist/services/embedded-packages/spec.js +248 -0
- package/dist/services/embedded-packages/spec.js.map +1 -0
- package/dist/services/embedded-packages/url.d.ts +39 -0
- package/dist/services/embedded-packages/url.js +60 -0
- package/dist/services/embedded-packages/url.js.map +1 -0
- package/dist/services/engine-detector.d.ts +16 -0
- package/dist/services/engine-detector.js +213 -0
- package/dist/services/engine-detector.js.map +1 -0
- package/dist/services/engine-resolver.d.ts +6 -0
- package/dist/services/engine-resolver.js +50 -0
- package/dist/services/engine-resolver.js.map +1 -0
- package/dist/services/engine-rules-loader.d.ts +27 -0
- package/dist/services/engine-rules-loader.js +53 -0
- package/dist/services/engine-rules-loader.js.map +1 -0
- 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/oxc-parser.d.ts +26 -0
- package/dist/services/oxc-parser.js +70 -0
- package/dist/services/oxc-parser.js.map +1 -0
- package/dist/services/playwright-config.d.ts +41 -0
- package/dist/services/playwright-config.js +192 -0
- package/dist/services/playwright-config.js.map +1 -0
- package/dist/services/playwright-project-bundler.d.ts +28 -0
- package/dist/services/playwright-project-bundler.js +301 -0
- package/dist/services/playwright-project-bundler.js.map +1 -0
- package/dist/services/pnpm-lockfile-documents.d.ts +50 -0
- package/dist/services/pnpm-lockfile-documents.js +42 -0
- package/dist/services/pnpm-lockfile-documents.js.map +1 -0
- package/dist/services/project-cli.d.ts +75 -0
- package/dist/services/project-cli.js +302 -0
- package/dist/services/project-cli.js.map +1 -0
- package/dist/services/project-parser.d.ts +36 -0
- package/dist/services/project-parser.js +307 -0
- package/dist/services/project-parser.js.map +1 -0
- package/dist/services/proxy.d.ts +32 -0
- package/dist/services/proxy.js +69 -0
- package/dist/services/proxy.js.map +1 -0
- package/dist/services/runner/registries.d.ts +156 -0
- package/dist/services/runner/registries.js +300 -0
- package/dist/services/runner/registries.js.map +1 -0
- package/dist/services/shell.d.ts +2 -0
- package/dist/services/shell.js +15 -0
- package/dist/services/shell.js.map +1 -0
- package/dist/services/skills.d.ts +12 -0
- package/dist/services/skills.js +127 -0
- package/dist/services/skills.js.map +1 -0
- package/dist/services/snapshot-service.d.ts +30 -0
- package/dist/services/snapshot-service.js +98 -0
- package/dist/services/snapshot-service.js.map +1 -0
- package/dist/services/socket-client.d.ts +4 -0
- package/dist/services/socket-client.js +37 -0
- package/dist/services/socket-client.js.map +1 -0
- package/dist/services/symlink-resolver.d.ts +56 -0
- package/dist/services/symlink-resolver.js +860 -0
- package/dist/services/symlink-resolver.js.map +1 -0
- package/dist/services/test-filters.d.ts +21 -0
- package/dist/services/test-filters.js +31 -0
- package/dist/services/test-filters.js.map +1 -0
- package/dist/services/test-runner.d.ts +29 -0
- package/dist/services/test-runner.js +81 -0
- package/dist/services/test-runner.js.map +1 -0
- package/dist/services/test-session-cancel.d.ts +17 -0
- package/dist/services/test-session-cancel.js +40 -0
- package/dist/services/test-session-cancel.js.map +1 -0
- package/dist/services/trigger-runner.d.ts +29 -0
- package/dist/services/trigger-runner.js +49 -0
- package/dist/services/trigger-runner.js.map +1 -0
- package/dist/services/two-installs.d.ts +39 -0
- package/dist/services/two-installs.js +155 -0
- package/dist/services/two-installs.js.map +1 -0
- package/dist/services/util.d.ts +83 -0
- package/dist/services/util.js +343 -0
- package/dist/services/util.js.map +1 -0
- package/dist/services/write-back/apply-edits.d.ts +29 -0
- package/dist/services/write-back/apply-edits.js +255 -0
- package/dist/services/write-back/apply-edits.js.map +1 -0
- package/dist/services/write-back/helper-edit.d.ts +135 -0
- package/dist/services/write-back/helper-edit.js +343 -0
- package/dist/services/write-back/helper-edit.js.map +1 -0
- package/dist/services/write-back/imports.d.ts +30 -0
- package/dist/services/write-back/imports.js +88 -0
- package/dist/services/write-back/imports.js.map +1 -0
- package/dist/services/write-back/literal-edit.d.ts +183 -0
- package/dist/services/write-back/literal-edit.js +359 -0
- package/dist/services/write-back/literal-edit.js.map +1 -0
- package/dist/services/write-back/output.d.ts +26 -0
- package/dist/services/write-back/output.js +110 -0
- package/dist/services/write-back/output.js.map +1 -0
- package/dist/services/write-back/plan.d.ts +180 -0
- package/dist/services/write-back/plan.js +1046 -0
- package/dist/services/write-back/plan.js.map +1 -0
- package/dist/services/write-back/source-file.d.ts +133 -0
- package/dist/services/write-back/source-file.js +460 -0
- package/dist/services/write-back/source-file.js.map +1 -0
- package/dist/sourcegen/args.d.ts +7 -0
- package/dist/sourcegen/args.js +22 -0
- package/dist/sourcegen/args.js.map +1 -0
- package/dist/sourcegen/argsbuilder.d.ts +22 -0
- package/dist/sourcegen/argsbuilder.js +106 -0
- package/dist/sourcegen/argsbuilder.js.map +1 -0
- package/dist/sourcegen/array.d.ts +8 -0
- package/dist/sourcegen/array.js +28 -0
- package/dist/sourcegen/array.js.map +1 -0
- package/dist/sourcegen/arraybuilder.d.ts +21 -0
- package/dist/sourcegen/arraybuilder.js +104 -0
- package/dist/sourcegen/arraybuilder.js.map +1 -0
- package/dist/sourcegen/boolean.d.ts +7 -0
- package/dist/sourcegen/boolean.js +18 -0
- package/dist/sourcegen/boolean.js.map +1 -0
- package/dist/sourcegen/case.d.ts +9 -0
- package/dist/sourcegen/case.js +96 -0
- package/dist/sourcegen/case.js.map +1 -0
- package/dist/sourcegen/comment.d.ts +32 -0
- package/dist/sourcegen/comment.js +113 -0
- package/dist/sourcegen/comment.js.map +1 -0
- package/dist/sourcegen/decl.d.ts +43 -0
- package/dist/sourcegen/decl.js +86 -0
- package/dist/sourcegen/decl.js.map +1 -0
- package/dist/sourcegen/declbuilder.d.ts +14 -0
- package/dist/sourcegen/declbuilder.js +34 -0
- package/dist/sourcegen/declbuilder.js.map +1 -0
- package/dist/sourcegen/expr.d.ts +39 -0
- package/dist/sourcegen/expr.js +77 -0
- package/dist/sourcegen/expr.js.map +1 -0
- package/dist/sourcegen/exprbuilder.d.ts +13 -0
- package/dist/sourcegen/exprbuilder.js +49 -0
- package/dist/sourcegen/exprbuilder.js.map +1 -0
- package/dist/sourcegen/identifier.d.ts +12 -0
- package/dist/sourcegen/identifier.js +22 -0
- package/dist/sourcegen/identifier.js.map +1 -0
- package/dist/sourcegen/index.d.ts +22 -0
- package/dist/sourcegen/index.js +23 -0
- package/dist/sourcegen/index.js.map +1 -0
- package/dist/sourcegen/null.d.ts +5 -0
- package/dist/sourcegen/null.js +7 -0
- package/dist/sourcegen/null.js.map +1 -0
- package/dist/sourcegen/number.d.ts +7 -0
- package/dist/sourcegen/number.js +18 -0
- package/dist/sourcegen/number.js.map +1 -0
- package/dist/sourcegen/object.d.ts +28 -0
- package/dist/sourcegen/object.js +80 -0
- package/dist/sourcegen/object.js.map +1 -0
- package/dist/sourcegen/objectbuilder.d.ts +25 -0
- package/dist/sourcegen/objectbuilder.js +122 -0
- package/dist/sourcegen/objectbuilder.js.map +1 -0
- package/dist/sourcegen/output.d.ts +14 -0
- package/dist/sourcegen/output.js +81 -0
- package/dist/sourcegen/output.js.map +1 -0
- package/dist/sourcegen/program.d.ts +71 -0
- package/dist/sourcegen/program.js +279 -0
- package/dist/sourcegen/program.js.map +1 -0
- package/dist/sourcegen/string.d.ts +8 -0
- package/dist/sourcegen/string.js +23 -0
- package/dist/sourcegen/string.js.map +1 -0
- package/dist/sourcegen/undefined.d.ts +5 -0
- package/dist/sourcegen/undefined.js +7 -0
- package/dist/sourcegen/undefined.js.map +1 -0
- package/dist/sourcegen/unknown.d.ts +2 -0
- package/dist/sourcegen/unknown.js +36 -0
- package/dist/sourcegen/unknown.js.map +1 -0
- package/dist/sourcegen/value.d.ts +4 -0
- package/dist/sourcegen/value.js +3 -0
- package/dist/sourcegen/value.js.map +1 -0
- package/dist/testing/capture-stderr.d.ts +6 -0
- package/dist/testing/capture-stderr.js +21 -0
- package/dist/testing/capture-stderr.js.map +1 -0
- package/dist/testing/clear-git-env.d.ts +1 -0
- package/dist/testing/clear-git-env.js +25 -0
- package/dist/testing/clear-git-env.js.map +1 -0
- package/dist/testing/fixture-sandbox.d.ts +41 -0
- package/dist/testing/fixture-sandbox.js +122 -0
- package/dist/testing/fixture-sandbox.js.map +1 -0
- package/dist/testing/global-setup.d.ts +3 -0
- package/dist/testing/global-setup.js +17 -0
- package/dist/testing/global-setup.js.map +1 -0
- package/dist/util/index.d.ts +9 -0
- package/dist/util/index.js +23 -0
- package/dist/util/index.js.map +1 -0
- package/oclif.manifest.json +4365 -0
- package/package.json +173 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
import Debug from 'debug';
|
|
7
|
+
import { integrityHashToHex, strongestIntegrityHash, verifyIntegrity } from './integrity.js';
|
|
8
|
+
const debug = Debug('checkly:cli:services:embedded-packages');
|
|
9
|
+
function platformCacheDir(env, platform, homedir) {
|
|
10
|
+
switch (platform) {
|
|
11
|
+
case 'darwin':
|
|
12
|
+
return path.join(homedir, 'Library', 'Caches', 'checkly');
|
|
13
|
+
case 'win32': {
|
|
14
|
+
const localAppData = env.LOCALAPPDATA !== undefined && env.LOCALAPPDATA !== ''
|
|
15
|
+
? env.LOCALAPPDATA
|
|
16
|
+
: path.join(homedir, 'AppData', 'Local');
|
|
17
|
+
return path.join(localAppData, 'checkly', 'Cache');
|
|
18
|
+
}
|
|
19
|
+
default: {
|
|
20
|
+
const xdgCacheHome = env.XDG_CACHE_HOME;
|
|
21
|
+
const cacheHome = xdgCacheHome !== undefined && xdgCacheHome !== ''
|
|
22
|
+
? xdgCacheHome
|
|
23
|
+
: path.join(homedir, '.cache');
|
|
24
|
+
return path.join(cacheHome, 'checkly');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The Checkly CLI's cache directories, in precedence order. A
|
|
30
|
+
* `CHECKLY_CACHE_DIR` override is the sole location. Otherwise the primary
|
|
31
|
+
* is the project-local `node_modules/.cache/checkly` (the conventional
|
|
32
|
+
* tool-cache location — incremental installs leave it alone, and CI setups
|
|
33
|
+
* that cache `node_modules` persist it automatically), backed by a
|
|
34
|
+
* per-user platform cache directory (macOS: `~/Library/Caches/checkly`,
|
|
35
|
+
* Windows: `%LOCALAPPDATA%\checkly\Cache`, elsewhere:
|
|
36
|
+
* `$XDG_CACHE_HOME/checkly` or `~/.cache/checkly`) that serves as a read
|
|
37
|
+
* tier and as the write fallback when the project location isn't writable
|
|
38
|
+
* (e.g. a read-only checkout).
|
|
39
|
+
*/
|
|
40
|
+
export function resolveCacheDirs(env = process.env, projectRoot, platform = process.platform, homedir = os.homedir()) {
|
|
41
|
+
const override = env.CHECKLY_CACHE_DIR;
|
|
42
|
+
if (override !== undefined && override !== '') {
|
|
43
|
+
return [path.resolve(override)];
|
|
44
|
+
}
|
|
45
|
+
const dirs = [];
|
|
46
|
+
if (projectRoot !== undefined) {
|
|
47
|
+
dirs.push(path.join(projectRoot, 'node_modules', '.cache', 'checkly'));
|
|
48
|
+
}
|
|
49
|
+
dirs.push(platformCacheDir(env, platform, homedir));
|
|
50
|
+
return [...new Set(dirs)];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A content-addressed store of package tarballs, keyed by the lockfile's
|
|
54
|
+
* integrity hash, spread over one or more root directories in precedence
|
|
55
|
+
* order (typically the project-local cache backed by the per-user one).
|
|
56
|
+
* Reads consult every root and verify the content, so a corrupt entry
|
|
57
|
+
* degrades to a cache miss rather than a user-facing error. Writes go to
|
|
58
|
+
* the first root that accepts them, so an unwritable project tree falls
|
|
59
|
+
* back to the per-user cache instead of failing — unless the unwritable
|
|
60
|
+
* root already holds a verifying entry, which satisfies the write as-is.
|
|
61
|
+
*/
|
|
62
|
+
export class TarballCache {
|
|
63
|
+
#rootDirs;
|
|
64
|
+
constructor(rootDirs) {
|
|
65
|
+
this.#rootDirs = Array.isArray(rootDirs) ? rootDirs : [rootDirs];
|
|
66
|
+
}
|
|
67
|
+
static default(env = process.env, projectRoot, platform = process.platform, homedir = os.homedir()) {
|
|
68
|
+
return new TarballCache(resolveCacheDirs(env, projectRoot, platform, homedir)
|
|
69
|
+
.map(dir => path.join(dir, 'embedded-packages')));
|
|
70
|
+
}
|
|
71
|
+
#pathFor(rootDir, hash) {
|
|
72
|
+
const hex = integrityHashToHex(hash);
|
|
73
|
+
return path.join(rootDir, hash.algorithm, hex.slice(0, 2), `${hex.slice(2)}.tgz`);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Returns the path of a cached, integrity-verified tarball, or undefined
|
|
77
|
+
* on a miss. A file that fails verification is deleted best-effort.
|
|
78
|
+
*/
|
|
79
|
+
async get(integrity) {
|
|
80
|
+
const hash = strongestIntegrityHash(integrity);
|
|
81
|
+
if (hash === undefined) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
for (const rootDir of this.#rootDirs) {
|
|
85
|
+
const filePath = this.#pathFor(rootDir, hash);
|
|
86
|
+
let content;
|
|
87
|
+
try {
|
|
88
|
+
content = await fs.readFile(filePath);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (!verifyIntegrity(content, integrity)) {
|
|
94
|
+
await fs.rm(filePath, { force: true }).catch(() => { });
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
return filePath;
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Stores verified tarball content in the first writable root and returns
|
|
103
|
+
* its path. The write is atomic (temp file + rename), so concurrent
|
|
104
|
+
* processes sharing the cache never observe a torn file — and because
|
|
105
|
+
* the store is content-addressed, losing a write race is itself a
|
|
106
|
+
* success: a write that fails while the destination already holds
|
|
107
|
+
* content matching the integrity returns that entry instead of erroring.
|
|
108
|
+
* The caller is responsible for verifying the content against the
|
|
109
|
+
* lockfile integrity beforehand.
|
|
110
|
+
*/
|
|
111
|
+
async put(integrity, content) {
|
|
112
|
+
const hash = strongestIntegrityHash(integrity);
|
|
113
|
+
if (hash === undefined) {
|
|
114
|
+
throw new Error(`Cannot cache a tarball without a supported integrity hash ('${integrity}')`);
|
|
115
|
+
}
|
|
116
|
+
let lastError;
|
|
117
|
+
for (const [index, rootDir] of this.#rootDirs.entries()) {
|
|
118
|
+
const filePath = this.#pathFor(rootDir, hash);
|
|
119
|
+
const tempPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
120
|
+
try {
|
|
121
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
122
|
+
await fs.writeFile(tempPath, content);
|
|
123
|
+
await fs.rename(tempPath, filePath);
|
|
124
|
+
if (index > 0) {
|
|
125
|
+
debug('cache write fell back to %s', rootDir);
|
|
126
|
+
}
|
|
127
|
+
return filePath;
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
// Concurrent writers race onto the same content-addressed path —
|
|
131
|
+
// two same-integrity puts in this process, or another process
|
|
132
|
+
// sharing the cache. POSIX rename silently replaces, but on
|
|
133
|
+
// Windows the losing rename fails with EPERM while the winner
|
|
134
|
+
// still holds the destination open. Whatever failed, a
|
|
135
|
+
// destination that verifies means the content is cached, which is
|
|
136
|
+
// all a put promises. The recovery read is deliberately
|
|
137
|
+
// single-shot and best-effort: retrying would add fixed latency to
|
|
138
|
+
// every genuinely unwritable root (the common non-race case), so a
|
|
139
|
+
// read that itself hits a transient lock falls through to the
|
|
140
|
+
// normal failure path instead.
|
|
141
|
+
const existing = await fs.readFile(filePath).catch(() => undefined);
|
|
142
|
+
if (existing !== undefined && verifyIntegrity(existing, integrity)) {
|
|
143
|
+
debug('cache write under %s failed (%s), but the destination already verifies', rootDir, err.message);
|
|
144
|
+
return filePath;
|
|
145
|
+
}
|
|
146
|
+
debug('cache write under %s failed: %s', rootDir, err.message);
|
|
147
|
+
lastError = err;
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
await fs.rm(tempPath, { force: true }).catch(() => { });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
throw new Error(`Unable to write the embedded-packages cache`
|
|
154
|
+
+ ` (tried ${this.#rootDirs.map(dir => `'${dir}'`).join(', ')}):`
|
|
155
|
+
+ ` ${lastError?.message ?? 'unknown error'}.`
|
|
156
|
+
+ ` Set CHECKLY_CACHE_DIR to a writable directory to override the cache location.`, { cause: lastError });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Looks up a tarball in npm's cache (cacache), which stores raw registry
|
|
161
|
+
* tarballs content-addressed by the same sha512 the lockfile records, at
|
|
162
|
+
* `content-v2/sha512/<hex[0:2]>/<hex[2:4]>/<hex[4:]>`. Returns verified
|
|
163
|
+
* content, or undefined when absent, unverifiable, or keyed by an
|
|
164
|
+
* algorithm other than sha512. Read-only: npm's cache is never written to.
|
|
165
|
+
*/
|
|
166
|
+
export async function lookupNpmCacache(integrity, env = process.env, platform = process.platform, homedir = os.homedir()) {
|
|
167
|
+
const hash = strongestIntegrityHash(integrity);
|
|
168
|
+
if (hash === undefined || hash.algorithm !== 'sha512') {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
const npmCacheDir = env.npm_config_cache !== undefined && env.npm_config_cache !== ''
|
|
172
|
+
? env.npm_config_cache
|
|
173
|
+
: platform === 'win32'
|
|
174
|
+
? path.join(env.LOCALAPPDATA !== undefined && env.LOCALAPPDATA !== ''
|
|
175
|
+
? env.LOCALAPPDATA
|
|
176
|
+
: path.join(homedir, 'AppData', 'Local'), 'npm-cache')
|
|
177
|
+
: path.join(homedir, '.npm');
|
|
178
|
+
const hex = integrityHashToHex(hash);
|
|
179
|
+
const contentPath = path.join(npmCacheDir, '_cacache', 'content-v2', 'sha512', hex.slice(0, 2), hex.slice(2, 4), hex.slice(4));
|
|
180
|
+
let content;
|
|
181
|
+
try {
|
|
182
|
+
content = await fs.readFile(contentPath);
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
if (!verifyIntegrity(content, integrity)) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
return content;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/services/embedded-packages/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,OA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SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,EAAE;gBACvD,CAAC,CAAC,GAAG,CAAC,YAAY;gBAClB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAC1C,WAAW,CACZ;YACH,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAEhC,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;IACpC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAC/C,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAC/C,CAAA;IAED,IAAI,OAAe,CAAA;IACnB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;QACzC,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { LoadedNpmrcConfig } from './npmrc.js';
|
|
2
|
+
/**
|
|
3
|
+
* Joins up to 8 items, appending `<overflow>N more` for the rest — the
|
|
4
|
+
* uniform truncation for user-facing lists of packages, versions and
|
|
5
|
+
* reasons.
|
|
6
|
+
*/
|
|
7
|
+
export declare function capList(items: string[], separator: string, overflow: string): string;
|
|
8
|
+
/** Quotes and joins a list of names for a message. */
|
|
9
|
+
export declare function quotedList(names: string[]): string;
|
|
10
|
+
/** Stand-in for a URL that cannot be shown without risking a credential. */
|
|
11
|
+
export declare const UNPRINTABLE_URL = "(withheld: unparseable and may contain credentials)";
|
|
12
|
+
/**
|
|
13
|
+
* Rebuilds a URL from the parts that cannot carry a credential, so it can
|
|
14
|
+
* safely appear in error messages and logs.
|
|
15
|
+
*
|
|
16
|
+
* Only scheme and host survive. Userinfo, path, query and fragment are
|
|
17
|
+
* dropped by construction rather than stripped: a registry URL may embed a
|
|
18
|
+
* token in its userinfo, a pre-signed CDN URL puts its signature in the
|
|
19
|
+
* query, and some registries take a token as a PATH segment
|
|
20
|
+
* (`https://host/<token>/npm/`). The path is the component least worth
|
|
21
|
+
* keeping anyway — every message that shows a URL already names the
|
|
22
|
+
* package and version separately, which is what the path encodes.
|
|
23
|
+
*
|
|
24
|
+
* A string that does not parse, parses without a host, or names a scheme
|
|
25
|
+
* nothing here fetches over yields the placeholder instead — deliberately
|
|
26
|
+
* the same rule as what may be requested, so a URL is echoable exactly when
|
|
27
|
+
* it was fetchable. Earlier revisions tried to redact such strings with
|
|
28
|
+
* a regex and leaked a credential four times over as many review rounds —
|
|
29
|
+
* through the first `@` only, through an empty userinfo, through a
|
|
30
|
+
* host-less parse, and through an authority that did not start at offset
|
|
31
|
+
* zero. Nothing short of a parser can tell userinfo from a path in a
|
|
32
|
+
* malformed string, so this follows the precedent already set for proxy
|
|
33
|
+
* URLs in `rest/errors.ts` and declines to echo it at all. Callers name the
|
|
34
|
+
* configuration key and file that produced the value instead, which is
|
|
35
|
+
* where the reader would go to look anyway.
|
|
36
|
+
*/
|
|
37
|
+
export declare function redactUrl(url: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Where the credentials sent with a request came from: a nerf-darted
|
|
40
|
+
* config entry, or userinfo embedded in the URL itself.
|
|
41
|
+
*
|
|
42
|
+
* The `url` case carries a whole `UrlOrigin` rather than mirroring its
|
|
43
|
+
* members, because the two must agree on every variant and a hand-kept
|
|
44
|
+
* copy did not: a variant added to `UrlOrigin` alone once reported
|
|
45
|
+
* registry-issued credentials as coming from a config line that contained
|
|
46
|
+
* none. Reusing the type makes the compiler enforce what review had to.
|
|
47
|
+
*/
|
|
48
|
+
export type SentCredentials = {
|
|
49
|
+
from: 'config';
|
|
50
|
+
keys: string[];
|
|
51
|
+
} | {
|
|
52
|
+
from: 'url';
|
|
53
|
+
origin: UrlOrigin;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Where a tarball URL came from: the lockfile recorded it verbatim, the
|
|
57
|
+
* registry returned it in this package's metadata, or the CLI built it from
|
|
58
|
+
* a registry. `registryKey` is absent when nothing configured one and the
|
|
59
|
+
* public npm registry was assumed.
|
|
60
|
+
*
|
|
61
|
+
* Read both to attribute credentials the URL itself carries and to say
|
|
62
|
+
* which setting produced a URL nothing can be fetched from — and the two
|
|
63
|
+
* answers differ, so the variants are not interchangeable: a metadata URL
|
|
64
|
+
* is the registry's to fix, not the project's.
|
|
65
|
+
*/
|
|
66
|
+
export type UrlOrigin = RecordedUrlOrigin | {
|
|
67
|
+
registryKey?: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A URL this CLI did not compose: something else handed it over already
|
|
71
|
+
* formed, so it can be unusable however it likes.
|
|
72
|
+
*
|
|
73
|
+
* A URL the CLI builds itself cannot be. The registry it is built from is
|
|
74
|
+
* checked first, and appending a path to a URL that parses with a host
|
|
75
|
+
* leaves both intact — so those origins never reach a message about an
|
|
76
|
+
* unusable URL, and are not in this type.
|
|
77
|
+
*/
|
|
78
|
+
export type RecordedUrlOrigin = {
|
|
79
|
+
lockfile: string;
|
|
80
|
+
} | {
|
|
81
|
+
metadata: {
|
|
82
|
+
registryKey?: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Says where an unusable URL came from, and therefore whose it is to fix.
|
|
87
|
+
* The advice has to match the branch: telling someone to correct their
|
|
88
|
+
* registry setting when the bad value came out of the lockfile sends them
|
|
89
|
+
* to a setting that is already correct.
|
|
90
|
+
*/
|
|
91
|
+
export declare function describeUnusableUrlOrigin(origin: RecordedUrlOrigin, npmrc: LoadedNpmrcConfig): string;
|
|
92
|
+
/** What a redirect did to the credentials on a request. */
|
|
93
|
+
export interface RedirectOutcome {
|
|
94
|
+
/** The host the request was last redirected to. */
|
|
95
|
+
host?: string;
|
|
96
|
+
/** True when credentials were sent but did not survive the hop. */
|
|
97
|
+
credentialsDropped?: boolean;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Names config keys and where they came from, for a hint sentence. Keys are
|
|
101
|
+
* listed individually because precedence is per key: the halves of a
|
|
102
|
+
* `username`/`_password` pair can come from different sources.
|
|
103
|
+
*/
|
|
104
|
+
export declare function describeConfigKeys(keys: string[], npmrc: LoadedNpmrcConfig): string;
|
|
105
|
+
/**
|
|
106
|
+
* Explains an HTTP failure that authentication could account for.
|
|
107
|
+
*
|
|
108
|
+
* 404 gets the same treatment as 401/403 because registries routinely hide
|
|
109
|
+
* packages the caller is not authorized to see behind a 404 — npmjs does —
|
|
110
|
+
* which otherwise reads as "this package does not exist" and sends people
|
|
111
|
+
* looking in entirely the wrong place. The wording stays hedged for 404,
|
|
112
|
+
* where a genuinely missing package is equally likely.
|
|
113
|
+
*
|
|
114
|
+
* Whenever credentials were sent, the message names where they came from.
|
|
115
|
+
* They can come from any of several files or an environment variable, so
|
|
116
|
+
* "your credentials were rejected" without saying which source supplied
|
|
117
|
+
* them leaves the reader exactly as stuck as a bare 404.
|
|
118
|
+
*/
|
|
119
|
+
export declare function downloadFailureHint(status: number | undefined, sent: SentCredentials | undefined, npmrc: LoadedNpmrcConfig, redirect?: RedirectOutcome): string;
|
|
120
|
+
/**
|
|
121
|
+
* Names any config file that existed but could not be read, as a sentence
|
|
122
|
+
* with a leading space or the empty string.
|
|
123
|
+
*
|
|
124
|
+
* Worth saying on any failure a credential could explain, not only the ones
|
|
125
|
+
* that got as far as a status code: a skipped `auth.ini` is invisible
|
|
126
|
+
* otherwise, and it is the likeliest thing to be missing when a private
|
|
127
|
+
* package cannot be resolved at all.
|
|
128
|
+
*/
|
|
129
|
+
export declare function describeUnreadableConfig(npmrc: LoadedNpmrcConfig): string;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { NPM_CONFIG_ENV_PREFIX } from './npmrc.js';
|
|
2
|
+
import { FETCHABLE_URL_REQUIREMENT, parseFetchableUrl } from './url.js';
|
|
3
|
+
/**
|
|
4
|
+
* Joins up to 8 items, appending `<overflow>N more` for the rest — the
|
|
5
|
+
* uniform truncation for user-facing lists of packages, versions and
|
|
6
|
+
* reasons.
|
|
7
|
+
*/
|
|
8
|
+
export function capList(items, separator, overflow) {
|
|
9
|
+
const shown = items.slice(0, 8).join(separator);
|
|
10
|
+
return items.length > 8 ? `${shown}${overflow}${items.length - 8} more` : shown;
|
|
11
|
+
}
|
|
12
|
+
/** Quotes and joins a list of names for a message. */
|
|
13
|
+
export function quotedList(names) {
|
|
14
|
+
return capList(names.map(name => `'${name}'`), ', ', ' and ');
|
|
15
|
+
}
|
|
16
|
+
/** Stand-in for a URL that cannot be shown without risking a credential. */
|
|
17
|
+
export const UNPRINTABLE_URL = '(withheld: unparseable and may contain credentials)';
|
|
18
|
+
/**
|
|
19
|
+
* Rebuilds a URL from the parts that cannot carry a credential, so it can
|
|
20
|
+
* safely appear in error messages and logs.
|
|
21
|
+
*
|
|
22
|
+
* Only scheme and host survive. Userinfo, path, query and fragment are
|
|
23
|
+
* dropped by construction rather than stripped: a registry URL may embed a
|
|
24
|
+
* token in its userinfo, a pre-signed CDN URL puts its signature in the
|
|
25
|
+
* query, and some registries take a token as a PATH segment
|
|
26
|
+
* (`https://host/<token>/npm/`). The path is the component least worth
|
|
27
|
+
* keeping anyway — every message that shows a URL already names the
|
|
28
|
+
* package and version separately, which is what the path encodes.
|
|
29
|
+
*
|
|
30
|
+
* A string that does not parse, parses without a host, or names a scheme
|
|
31
|
+
* nothing here fetches over yields the placeholder instead — deliberately
|
|
32
|
+
* the same rule as what may be requested, so a URL is echoable exactly when
|
|
33
|
+
* it was fetchable. Earlier revisions tried to redact such strings with
|
|
34
|
+
* a regex and leaked a credential four times over as many review rounds —
|
|
35
|
+
* through the first `@` only, through an empty userinfo, through a
|
|
36
|
+
* host-less parse, and through an authority that did not start at offset
|
|
37
|
+
* zero. Nothing short of a parser can tell userinfo from a path in a
|
|
38
|
+
* malformed string, so this follows the precedent already set for proxy
|
|
39
|
+
* URLs in `rest/errors.ts` and declines to echo it at all. Callers name the
|
|
40
|
+
* configuration key and file that produced the value instead, which is
|
|
41
|
+
* where the reader would go to look anyway.
|
|
42
|
+
*/
|
|
43
|
+
export function redactUrl(url) {
|
|
44
|
+
// `origin` is deliberately not used to rebuild it: that is the string
|
|
45
|
+
// "null" for non-special schemes.
|
|
46
|
+
const parsed = parseFetchableUrl(url);
|
|
47
|
+
return parsed === undefined ? UNPRINTABLE_URL : `${parsed.protocol}//${parsed.host}`;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Names the registry a URL came from, by the key that configured it or as
|
|
51
|
+
* the assumed default when nothing did.
|
|
52
|
+
*/
|
|
53
|
+
function describeRegistrySource(registryKey, npmrc) {
|
|
54
|
+
return registryKey !== undefined
|
|
55
|
+
? `the registry configured by ${describeConfigKeys([registryKey], npmrc)}`
|
|
56
|
+
: 'the default registry';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Says where an unusable URL came from, and therefore whose it is to fix.
|
|
60
|
+
* The advice has to match the branch: telling someone to correct their
|
|
61
|
+
* registry setting when the bad value came out of the lockfile sends them
|
|
62
|
+
* to a setting that is already correct.
|
|
63
|
+
*/
|
|
64
|
+
export function describeUnusableUrlOrigin(origin, npmrc) {
|
|
65
|
+
if ('lockfile' in origin) {
|
|
66
|
+
return `It was recorded in '${origin.lockfile}', whose tarball URL for this package`
|
|
67
|
+
+ ` is not ${FETCHABLE_URL_REQUIREMENT}.`;
|
|
68
|
+
}
|
|
69
|
+
const registry = describeRegistrySource(origin.metadata.registryKey, npmrc);
|
|
70
|
+
const whose = origin.metadata.registryKey !== undefined
|
|
71
|
+
? `so check that the setting points at the registry you meant before taking it up with whoever runs it.`
|
|
72
|
+
: `and nothing here configures a registry, so this came from the public one.`;
|
|
73
|
+
return `It came from the package metadata served by ${registry}, which returned a tarball URL`
|
|
74
|
+
+ ` that is not ${FETCHABLE_URL_REQUIREMENT}. The URL is the registry's to correct, ${whose}`;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Names config keys and where they came from, for a hint sentence. Keys are
|
|
78
|
+
* listed individually because precedence is per key: the halves of a
|
|
79
|
+
* `username`/`_password` pair can come from different sources.
|
|
80
|
+
*/
|
|
81
|
+
export function describeConfigKeys(keys, npmrc) {
|
|
82
|
+
const described = keys.map(key => {
|
|
83
|
+
const origin = npmrc.origins.get(key);
|
|
84
|
+
switch (origin?.kind) {
|
|
85
|
+
// Name the variable verbatim: the stored key has the `npm_config_`
|
|
86
|
+
// prefix stripped and may be case-folded, so echoing it would name
|
|
87
|
+
// nothing the user can search their environment for.
|
|
88
|
+
case 'env':
|
|
89
|
+
return `the '${origin.variable}' environment variable`;
|
|
90
|
+
case 'file':
|
|
91
|
+
return `'${key}' in '${origin.path}'`;
|
|
92
|
+
default:
|
|
93
|
+
return `'${key}'`;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return capList(described, ', ', ' and ');
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The places a credential could have been configured, highest precedence
|
|
100
|
+
* first. The environment channel is always consulted and outranks every
|
|
101
|
+
* file, so a list that omits it sends people to edit files that cannot win.
|
|
102
|
+
*/
|
|
103
|
+
function describeConfigSources(npmrc) {
|
|
104
|
+
return quotedList([
|
|
105
|
+
`${NPM_CONFIG_ENV_PREFIX}* environment variables`,
|
|
106
|
+
...npmrc.files,
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Names where the credentials on a request came from, as a sentence tail
|
|
111
|
+
* ending in a full stop.
|
|
112
|
+
*/
|
|
113
|
+
function describeSentCredentials(sent, npmrc) {
|
|
114
|
+
if (sent.from === 'config') {
|
|
115
|
+
return `${describeConfigKeys(sent.keys, npmrc)}.`;
|
|
116
|
+
}
|
|
117
|
+
const { origin } = sent;
|
|
118
|
+
if ('lockfile' in origin) {
|
|
119
|
+
return `the tarball URL recorded in '${origin.lockfile}'.`;
|
|
120
|
+
}
|
|
121
|
+
if ('metadata' in origin) {
|
|
122
|
+
return `the tarball URL that ${describeRegistrySource(origin.metadata.registryKey, npmrc)} returned`
|
|
123
|
+
+ ` in this package's metadata, so they were issued by that registry rather than configured here.`;
|
|
124
|
+
}
|
|
125
|
+
return `the URL of ${describeRegistrySource(origin.registryKey, npmrc)}.`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Explains an HTTP failure that authentication could account for.
|
|
129
|
+
*
|
|
130
|
+
* 404 gets the same treatment as 401/403 because registries routinely hide
|
|
131
|
+
* packages the caller is not authorized to see behind a 404 — npmjs does —
|
|
132
|
+
* which otherwise reads as "this package does not exist" and sends people
|
|
133
|
+
* looking in entirely the wrong place. The wording stays hedged for 404,
|
|
134
|
+
* where a genuinely missing package is equally likely.
|
|
135
|
+
*
|
|
136
|
+
* Whenever credentials were sent, the message names where they came from.
|
|
137
|
+
* They can come from any of several files or an environment variable, so
|
|
138
|
+
* "your credentials were rejected" without saying which source supplied
|
|
139
|
+
* them leaves the reader exactly as stuck as a bare 404.
|
|
140
|
+
*/
|
|
141
|
+
export function downloadFailureHint(status, sent, npmrc, redirect = {}) {
|
|
142
|
+
if (status !== 401 && status !== 403 && status !== 404) {
|
|
143
|
+
// The URL in the message is the one that was requested; whatever the
|
|
144
|
+
// status, say so when something else handled it. Without a status
|
|
145
|
+
// nothing answered at all, so the hop is reported without claiming it
|
|
146
|
+
// produced the failure.
|
|
147
|
+
if (redirect.host === undefined) {
|
|
148
|
+
return '';
|
|
149
|
+
}
|
|
150
|
+
return status === undefined
|
|
151
|
+
? ` The request was redirected to '${redirect.host}' before it failed.`
|
|
152
|
+
: ` The request was redirected to '${redirect.host}', which is what answered.`;
|
|
153
|
+
}
|
|
154
|
+
const sentences = [];
|
|
155
|
+
if (redirect.credentialsDropped === true) {
|
|
156
|
+
// Never say the credentials were rejected: the host that answered never
|
|
157
|
+
// saw them, and blaming them sends the reader to rotate a working
|
|
158
|
+
// token. A redirect to an unauthenticated CDN is normal for GitHub
|
|
159
|
+
// Packages and for Artifactory or Nexus fronted by object storage, so
|
|
160
|
+
// this is often not the fault at all — hence the pointer to the
|
|
161
|
+
// redirect target rather than a verdict about it.
|
|
162
|
+
sentences.push(`The request was redirected to '${redirect.host}', and the credentials were dropped rather`
|
|
163
|
+
+ ` than forwarded there, so that host answered without them. This is normal when a registry`
|
|
164
|
+
+ ` redirects to a pre-signed URL; look at what that host returned.`);
|
|
165
|
+
if (sent !== undefined) {
|
|
166
|
+
sentences.push(`The credentials the original host received came from ${describeSentCredentials(sent, npmrc)}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else if (sent === undefined) {
|
|
170
|
+
sentences.push(`No credentials for this registry were found in ${describeConfigSources(npmrc)}.`);
|
|
171
|
+
if (status === 404) {
|
|
172
|
+
sentences.push(`A registry may answer 404 for a package you are not authorized to see, so the package`
|
|
173
|
+
+ ` may exist but be invisible without credentials.`);
|
|
174
|
+
}
|
|
175
|
+
if (redirect.host !== undefined) {
|
|
176
|
+
// Without this the reader is told to configure credentials for a host
|
|
177
|
+
// that never asked for any, when the status came from elsewhere.
|
|
178
|
+
sentences.push(`Note that the request was redirected to '${redirect.host}', which is what answered.`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
if (status === 404) {
|
|
183
|
+
sentences.push(`Credentials were sent but did not grant access, so either the package does not exist`
|
|
184
|
+
+ ` or the credentials do not cover it.`);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
sentences.push(`The credentials sent for this registry were rejected — an expired token fails this way.`);
|
|
188
|
+
}
|
|
189
|
+
sentences.push(`They came from ${describeSentCredentials(sent, npmrc)}`);
|
|
190
|
+
if (redirect.host !== undefined) {
|
|
191
|
+
sentences.push(`They were carried through a redirect to '${redirect.host}', which is what answered.`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return ` ${sentences.join(' ')}${describeUnreadableConfig(npmrc)}`;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Names any config file that existed but could not be read, as a sentence
|
|
198
|
+
* with a leading space or the empty string.
|
|
199
|
+
*
|
|
200
|
+
* Worth saying on any failure a credential could explain, not only the ones
|
|
201
|
+
* that got as far as a status code: a skipped `auth.ini` is invisible
|
|
202
|
+
* otherwise, and it is the likeliest thing to be missing when a private
|
|
203
|
+
* package cannot be resolved at all.
|
|
204
|
+
*/
|
|
205
|
+
export function describeUnreadableConfig(npmrc) {
|
|
206
|
+
if (npmrc.unreadable.length === 0) {
|
|
207
|
+
return '';
|
|
208
|
+
}
|
|
209
|
+
return ` Note that ${quotedList(npmrc.unreadable)} could not be read, so any credentials it holds`
|
|
210
|
+
+ ` were not used.`;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../src/services/embedded-packages/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEvE;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAE,KAAe,EAAE,SAAiB,EAAE,QAAgB;IAC3E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAC/C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAA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UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,iDAAiD;UAC9F,iBAAiB,CAAA;AACvB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single parsed SRI (Subresource Integrity) hash, e.g. one
|
|
3
|
+
* `sha512-<base64>` segment of a lockfile `integrity` value.
|
|
4
|
+
*/
|
|
5
|
+
export interface IntegrityHash {
|
|
6
|
+
algorithm: string;
|
|
7
|
+
digestBase64: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Parses an SRI string (one or more space-separated `algorithm-base64`
|
|
11
|
+
* entries) into its supported hashes, unknown algorithms excluded.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseIntegrity(integrity: string): IntegrityHash[];
|
|
14
|
+
/**
|
|
15
|
+
* Returns the strongest supported hash of an SRI string, or undefined if
|
|
16
|
+
* none of its entries use a supported algorithm.
|
|
17
|
+
*/
|
|
18
|
+
export declare function strongestIntegrityHash(integrity: string): IntegrityHash | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Verifies content against an SRI string using its strongest supported
|
|
21
|
+
* hash. Returns false when no supported hash is present.
|
|
22
|
+
*/
|
|
23
|
+
export declare function verifyIntegrity(content: Buffer, integrity: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The hex encoding of an SRI hash's digest. npm's cacache stores content
|
|
26
|
+
* under this encoding, e.g. `content-v2/sha512/<hex[0:2]>/<hex[2:4]>/<hex[4:]>`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function integrityHashToHex(hash: IntegrityHash): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
// Ordered strongest first. Lockfiles produced in the last decade only use
|
|
3
|
+
// sha512 and (for very old entries) sha1, but sha384/sha256 are valid SRI.
|
|
4
|
+
const SUPPORTED_ALGORITHMS = ['sha512', 'sha384', 'sha256', 'sha1'];
|
|
5
|
+
/**
|
|
6
|
+
* Parses an SRI string (one or more space-separated `algorithm-base64`
|
|
7
|
+
* entries) into its supported hashes, unknown algorithms excluded.
|
|
8
|
+
*/
|
|
9
|
+
export function parseIntegrity(integrity) {
|
|
10
|
+
const hashes = [];
|
|
11
|
+
for (const entry of integrity.trim().split(/\s+/)) {
|
|
12
|
+
const separator = entry.indexOf('-');
|
|
13
|
+
if (separator === -1) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const algorithm = entry.slice(0, separator);
|
|
17
|
+
const digestBase64 = entry.slice(separator + 1);
|
|
18
|
+
if (!SUPPORTED_ALGORITHMS.includes(algorithm) || digestBase64 === '') {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
hashes.push({ algorithm, digestBase64 });
|
|
22
|
+
}
|
|
23
|
+
return hashes;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns the strongest supported hash of an SRI string, or undefined if
|
|
27
|
+
* none of its entries use a supported algorithm.
|
|
28
|
+
*/
|
|
29
|
+
export function strongestIntegrityHash(integrity) {
|
|
30
|
+
const hashes = parseIntegrity(integrity);
|
|
31
|
+
for (const algorithm of SUPPORTED_ALGORITHMS) {
|
|
32
|
+
const match = hashes.find(hash => hash.algorithm === algorithm);
|
|
33
|
+
if (match !== undefined) {
|
|
34
|
+
return match;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Verifies content against an SRI string using its strongest supported
|
|
41
|
+
* hash. Returns false when no supported hash is present.
|
|
42
|
+
*/
|
|
43
|
+
export function verifyIntegrity(content, integrity) {
|
|
44
|
+
const hash = strongestIntegrityHash(integrity);
|
|
45
|
+
if (hash === undefined) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
const digest = createHash(hash.algorithm).update(content).digest('base64');
|
|
49
|
+
return digest === hash.digestBase64;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The hex encoding of an SRI hash's digest. npm's cacache stores content
|
|
53
|
+
* under this encoding, e.g. `content-v2/sha512/<hex[0:2]>/<hex[2:4]>/<hex[4:]>`.
|
|
54
|
+
*/
|
|
55
|
+
export function integrityHashToHex(hash) {
|
|
56
|
+
return Buffer.from(hash.digestBase64, 'base64').toString('hex');
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=integrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrity.js","sourceRoot":"","sources":["../../../src/services/embedded-packages/integrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAWxC,0EAA0E;AAC1E,2EAA2E;AAC3E,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAE,SAAiB;IAC/C,MAAM,MAAM,GAAoB,EAAE,CAAA;IAElC,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QACpC,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;YACrB,SAAQ;QACV,CAAC;QACD,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;QAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAA;QAC/C,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,YAAY,KAAK,EAAE,EAAE,CAAC;YACrE,SAAQ;QACV,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAA;IAC1C,CAAC;IAED,OAAO,MAAM,CAAA;AACf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