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,1087 @@
|
|
|
1
|
+
import { once } from 'node:events';
|
|
2
|
+
import { createReadStream, createWriteStream } from 'node:fs';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import Debug from 'debug';
|
|
7
|
+
import * as uuid from 'uuid';
|
|
8
|
+
import { createHash } from 'node:crypto';
|
|
9
|
+
import { checklyStorage } from '../../rest/api.js';
|
|
10
|
+
import { PayloadTooLargeError } from '../../rest/errors.js';
|
|
11
|
+
import { EMBEDDED_PACKAGES_ARCHIVE_DIR } from '../embedded-packages/materializer.js';
|
|
12
|
+
import { filterTarballsByLockfile } from '../embedded-packages/lockfile-filter.js';
|
|
13
|
+
import { composeWorkspaceCacheHash, canonicalizePackageJson, loadWorkspaceCacheHashInputs, PACKAGE_JSON_EXCLUDED_FIELDS, } from './cache-hash.js';
|
|
14
|
+
import { lockfileArchivePath, manifestArchivePath, pruneBundledLockfile } from './lockfile-pruner.js';
|
|
15
|
+
import { MemberPruneDiagnostics, normalizePackagePrune, prunePackageJson, resolveManifestPrune, } from './package-prune.js';
|
|
16
|
+
import { findUnrepairedPatchKeys, isRemovablePatchPath, planPatchFilter, } from './patched-dependencies.js';
|
|
17
|
+
import { REGISTRIES_ARCHIVE_PATH, serializeRegistries, validateRegistries } from '../runner/registries.js';
|
|
18
|
+
import { sha256OfFile } from '../content-hash.js';
|
|
19
|
+
import { pathToPosix } from '../util.js';
|
|
20
|
+
const debug = Debug('checkly:cli:services:check-parser:bundler');
|
|
21
|
+
/**
|
|
22
|
+
* The files pnpm accepts `patchedDependencies` in, which are also their
|
|
23
|
+
* archive paths: both live at the workspace root, and the workspace root is
|
|
24
|
+
* the bundle's strip prefix (see {@link Bundler.createForWorkspace}).
|
|
25
|
+
*/
|
|
26
|
+
const PATCH_CONFIG_KINDS = ['pnpm-workspace.yaml', 'package.json'];
|
|
27
|
+
/**
|
|
28
|
+
* Where a file goes in the archive. A file usually lands at its own path
|
|
29
|
+
* relative to the bundle root, but a file bundled at the path of a symlink that
|
|
30
|
+
* points at it carries the archive path explicitly.
|
|
31
|
+
*/
|
|
32
|
+
function archivePath(file, stripPrefix) {
|
|
33
|
+
if (file.physical && file.archivePath !== undefined) {
|
|
34
|
+
return file.archivePath;
|
|
35
|
+
}
|
|
36
|
+
// Posix form, because this value keys the bundler's dedup registry alongside
|
|
37
|
+
// resolver-carried archive paths, which are always posix. On Windows,
|
|
38
|
+
// path.relative produces a backslash spelling that would not collide with the
|
|
39
|
+
// posix spelling of the same path, and the archive would end up with
|
|
40
|
+
// duplicate entries (archiver normalizes both to the same tar name).
|
|
41
|
+
return pathToPosix(stripPrefix
|
|
42
|
+
? path.relative(stripPrefix, file.filePath)
|
|
43
|
+
: file.filePath);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Drops any symlink that has entries beneath it. One path cannot be both a
|
|
47
|
+
* symlink and a directory, and tar refuses to extract an archive claiming
|
|
48
|
+
* otherwise — the failure this whole mechanism exists to avoid.
|
|
49
|
+
*
|
|
50
|
+
* This has to happen here, over the complete set of entries, and not only where
|
|
51
|
+
* the entries are produced: the archive is the union of what the symlink
|
|
52
|
+
* resolver contributed and what the check parser registered, and the parser does
|
|
53
|
+
* not resolve symlinks. A spec that imports through a symlinked directory is
|
|
54
|
+
* registered at its path *through* that link, which puts it under a link the
|
|
55
|
+
* resolver quite reasonably kept.
|
|
56
|
+
*
|
|
57
|
+
* Entry names are posix by construction — archivePath() guarantees it.
|
|
58
|
+
*
|
|
59
|
+
* The link is what goes, rather than the files: the files are content, and they
|
|
60
|
+
* extract perfectly well as ordinary files, whereas the link takes the whole
|
|
61
|
+
* archive down with it.
|
|
62
|
+
*/
|
|
63
|
+
function dropSymlinksWithChildren(entries) {
|
|
64
|
+
const directories = new Set();
|
|
65
|
+
for (const [name] of entries) {
|
|
66
|
+
for (let parent = path.posix.dirname(name); parent !== '.' && parent !== '/' && parent !== '' && !directories.has(parent); parent = path.posix.dirname(parent)) {
|
|
67
|
+
directories.add(parent);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return entries
|
|
71
|
+
.filter(([name, file]) => {
|
|
72
|
+
if (!file.physical || file.symlinkTarget === undefined) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
if (!directories.has(name)) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (file.referencedLink) {
|
|
79
|
+
// Path references in a bundled file (e.g. a Playwright config's
|
|
80
|
+
// testDir) depend on this link, and they will not resolve without it.
|
|
81
|
+
// The situation is a conflict between those references and files
|
|
82
|
+
// archived beneath the link's own path — say so, rather than letting
|
|
83
|
+
// the check fail only in the cloud.
|
|
84
|
+
process.stderr.write(`Warning: ${name} is a symlink that bundled configuration refers to, but other files `
|
|
85
|
+
+ `are archived beneath its path, so the symlink itself cannot be included. References `
|
|
86
|
+
+ `through it may not resolve when the check runs.\n`);
|
|
87
|
+
}
|
|
88
|
+
debug(`Dropping symlink ${name}: other files are archived beneath it`);
|
|
89
|
+
return false;
|
|
90
|
+
})
|
|
91
|
+
.map(([, file]) => file);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Timestamp stamped on every archive entry, in place of the file's own mtime or
|
|
95
|
+
* the clock. Fixed so the archive's content hash describes the content and
|
|
96
|
+
* nothing else; see {@link BundleArchive.add}.
|
|
97
|
+
*/
|
|
98
|
+
const ARCHIVE_ENTRY_DATE = new Date(0);
|
|
99
|
+
export class BundleArchive {
|
|
100
|
+
static TMPDIR_PREFIX = 'cli-';
|
|
101
|
+
static DEFAULT_FILENAME = 'playwright-project.tar.gz';
|
|
102
|
+
#tempDir;
|
|
103
|
+
#archiveFile;
|
|
104
|
+
#archiveFileWriteStream;
|
|
105
|
+
#stripPrefix;
|
|
106
|
+
#archive;
|
|
107
|
+
#containsEmbeddedPackages = false;
|
|
108
|
+
constructor(options) {
|
|
109
|
+
const { tempDir, archiveFile, archiveFileWriteStream, stripPrefix, archive, } = options;
|
|
110
|
+
this.#tempDir = tempDir;
|
|
111
|
+
this.#archiveFile = archiveFile;
|
|
112
|
+
this.#archiveFileWriteStream = archiveFileWriteStream;
|
|
113
|
+
this.#stripPrefix = stripPrefix;
|
|
114
|
+
this.#archive = archive;
|
|
115
|
+
}
|
|
116
|
+
static async create(options) {
|
|
117
|
+
debug(`Creating bundle archive`);
|
|
118
|
+
const { tempDir: maybeTempDir, stripPrefix, } = options;
|
|
119
|
+
const tempDir = maybeTempDir
|
|
120
|
+
? await fs.mkdir(maybeTempDir, { recursive: true }).then(() => maybeTempDir)
|
|
121
|
+
// tmpdir() on macOS usually returns a path starting with /var which is
|
|
122
|
+
// a symlink. Resolve the path so that we don't run into path mismatch
|
|
123
|
+
// issues.
|
|
124
|
+
: await fs.realpath(await fs.mkdtemp(path.join(tmpdir(), BundleArchive.TMPDIR_PREFIX)));
|
|
125
|
+
debug(`Using temporary directory ${tempDir}`);
|
|
126
|
+
const archiveFile = path.join(tempDir, BundleArchive.DEFAULT_FILENAME);
|
|
127
|
+
debug(`Using archive file ${archiveFile}`);
|
|
128
|
+
const archive = await createArchiver();
|
|
129
|
+
const output = createWriteStream(archiveFile);
|
|
130
|
+
archive.pipe(output);
|
|
131
|
+
return new BundleArchive({
|
|
132
|
+
tempDir,
|
|
133
|
+
archiveFile,
|
|
134
|
+
archive,
|
|
135
|
+
archiveFileWriteStream: output,
|
|
136
|
+
stripPrefix,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
async add(...files) {
|
|
140
|
+
// Stat every physical file up front, following symlinks, and hand the result
|
|
141
|
+
// to archiver. Left to itself archiver lstats each path and turns anything
|
|
142
|
+
// that happens to be a symlink into a symlink entry — which is how a symlink
|
|
143
|
+
// and the files beneath it end up in the archive at the same path, an
|
|
144
|
+
// archive tar cannot extract. Symlink entries are emitted deliberately,
|
|
145
|
+
// below, and nowhere else.
|
|
146
|
+
//
|
|
147
|
+
// A bundle that includes node_modules runs to tens of thousands of files, so
|
|
148
|
+
// these go out together rather than one await at a time.
|
|
149
|
+
const stats = await Promise.all(files.map(async (file) => {
|
|
150
|
+
if (!file.physical || file.symlinkTarget !== undefined) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
return await fs.stat(file.filePath);
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
// Following the link means a broken one fails here, where archiver would
|
|
158
|
+
// previously have made it a dangling entry.
|
|
159
|
+
process.stderr.write(`Warning: skipping ${file.filePath}: ${err instanceof Error ? err.message : err}\n`);
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
}));
|
|
163
|
+
for (const [index, file] of files.entries()) {
|
|
164
|
+
const name = archivePath(file, this.#stripPrefix);
|
|
165
|
+
if (name.startsWith(`${EMBEDDED_PACKAGES_ARCHIVE_DIR}/`)) {
|
|
166
|
+
this.#containsEmbeddedPackages = true;
|
|
167
|
+
}
|
|
168
|
+
const entry = {
|
|
169
|
+
mode: 0o755, // Default mode for files in the archive
|
|
170
|
+
name,
|
|
171
|
+
// Every entry's timestamp is pinned, because the archive's SHA-256 is
|
|
172
|
+
// what tells Checkly whether the code bundle changed and it has to
|
|
173
|
+
// describe the content alone. Left alone, a tar entry carries the
|
|
174
|
+
// file's mtime — or, for an entry the bundler generates in memory (a
|
|
175
|
+
// faux workspace manifest, a pruned lockfile, the runner's registries
|
|
176
|
+
// file), the current time. Either makes two archives of identical
|
|
177
|
+
// content differ: a CI pipeline that clones fresh per run would report
|
|
178
|
+
// every Playwright suite as changed on every deploy.
|
|
179
|
+
date: ARCHIVE_ENTRY_DATE,
|
|
180
|
+
};
|
|
181
|
+
if (!file.physical) {
|
|
182
|
+
this.#archive.append(file.content, entry);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (file.symlinkTarget !== undefined) {
|
|
186
|
+
// Appended rather than added through archiver's symlink(), which takes
|
|
187
|
+
// no date and would stamp the entry with the current time — the same
|
|
188
|
+
// reproducibility problem as any other entry, and one that hits every
|
|
189
|
+
// pnpm or npm workspace bundle, since those are symlink farms.
|
|
190
|
+
// `linkname` is the field archiver's tar sink reads for a symlink
|
|
191
|
+
// entry — the same one its own symlink() fills in; the published types
|
|
192
|
+
// do not list it.
|
|
193
|
+
this.#archive.append(Buffer.alloc(0), {
|
|
194
|
+
...entry,
|
|
195
|
+
type: 'symlink',
|
|
196
|
+
linkname: file.symlinkTarget,
|
|
197
|
+
});
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const fileStats = stats[index];
|
|
201
|
+
if (fileStats === undefined) {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
this.#archive.file(file.filePath, { ...entry, stats: fileStats });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async finalize() {
|
|
208
|
+
await this.#archive.finalize();
|
|
209
|
+
await new Promise((resolve, reject) => {
|
|
210
|
+
this.#archiveFileWriteStream.on('close', resolve);
|
|
211
|
+
this.#archiveFileWriteStream.on('error', reject);
|
|
212
|
+
});
|
|
213
|
+
return await FinalizedBundleArchive.create({
|
|
214
|
+
archiveFile: this.#archiveFile,
|
|
215
|
+
// Hashed here, where the archive is complete on disk and has not been
|
|
216
|
+
// uploaded yet: the deploy sends the hash, and a preview of that deploy
|
|
217
|
+
// describes the bundle by hash alone.
|
|
218
|
+
sha256: await sha256OfFile(this.#archiveFile),
|
|
219
|
+
containsEmbeddedPackages: this.#containsEmbeddedPackages,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
async destroy() {
|
|
223
|
+
debug(`Destroying root ${this.#tempDir}`);
|
|
224
|
+
await fs.rm(this.#tempDir, {
|
|
225
|
+
recursive: true,
|
|
226
|
+
force: true,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Error thrown when the Checkly API rejects the code bundle upload because
|
|
232
|
+
* the bundle exceeds the maximum size the API accepts (HTTP 413). The size
|
|
233
|
+
* limit is enforced server-side and is not known ahead of time; it is parsed
|
|
234
|
+
* from the response when the server names it.
|
|
235
|
+
*/
|
|
236
|
+
export class BundleTooLargeError extends Error {
|
|
237
|
+
sizeBytes;
|
|
238
|
+
maxBytes;
|
|
239
|
+
containsEmbeddedPackages;
|
|
240
|
+
constructor(options) {
|
|
241
|
+
const { sizeBytes, maxBytes, containsEmbeddedPackages, cause, } = options;
|
|
242
|
+
// Round the bundle size up and the limit down so that a bundle just
|
|
243
|
+
// barely over the limit cannot render as two equal figures ("the
|
|
244
|
+
// compressed bundle is 30 MB, but the Checkly API accepts at most
|
|
245
|
+
// 30 MB").
|
|
246
|
+
const size = formatMegabytes(sizeBytes, Math.ceil);
|
|
247
|
+
// Attribute the limit to the Checkly API only when a plausible one is
|
|
248
|
+
// known (given, and not so small that it floors to "0 MB"). A 413 can
|
|
249
|
+
// also come from an intermediary (e.g. a corporate proxy with its own
|
|
250
|
+
// upload cap), but such a response would not use the API's own message
|
|
251
|
+
// phrasing that maxBytes is parsed from, and ends up here undefined.
|
|
252
|
+
const formattedLimit = maxBytes !== undefined ? formatMegabytes(maxBytes, Math.floor) : undefined;
|
|
253
|
+
const limit = formattedLimit !== undefined && formattedLimit !== '0 MB'
|
|
254
|
+
? `but the Checkly API accepts at most ${formattedLimit}`
|
|
255
|
+
: `which exceeds what the upload endpoint accepts`;
|
|
256
|
+
const remedies = containsEmbeddedPackages
|
|
257
|
+
? `removing large files from the Playwright project, narrowing any 'include' patterns, `
|
|
258
|
+
+ `or embedding fewer private packages ('bundle.packages.embed')`
|
|
259
|
+
: `removing large files from the Playwright project or narrowing any 'include' patterns`;
|
|
260
|
+
super(`The code bundle is too large to upload: the compressed bundle is ${size}, ${limit}. `
|
|
261
|
+
+ `Reduce the bundle size by ${remedies}.`, { cause });
|
|
262
|
+
this.name = 'BundleTooLargeError';
|
|
263
|
+
this.sizeBytes = sizeBytes;
|
|
264
|
+
this.maxBytes = maxBytes;
|
|
265
|
+
this.containsEmbeddedPackages = containsEmbeddedPackages ?? false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function formatMegabytes(bytes, round) {
|
|
269
|
+
return `${round(bytes / 1048576 * 10) / 10} MB`;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* A 413 response names the size limit only inside hapi's message text
|
|
273
|
+
* ("Payload content length greater than maximum allowed: <bytes>"); there is
|
|
274
|
+
* no structured field carrying it.
|
|
275
|
+
*/
|
|
276
|
+
function parseMaxBytes(message) {
|
|
277
|
+
const match = /maximum allowed: (\d+)/.exec(message);
|
|
278
|
+
return match !== null ? Number(match[1]) : undefined;
|
|
279
|
+
}
|
|
280
|
+
export class FinalizedBundleArchive {
|
|
281
|
+
#archiveFile;
|
|
282
|
+
#sha256;
|
|
283
|
+
#containsEmbeddedPackages;
|
|
284
|
+
constructor(options) {
|
|
285
|
+
const { archiveFile, sha256, containsEmbeddedPackages, } = options;
|
|
286
|
+
this.#archiveFile = archiveFile;
|
|
287
|
+
this.#sha256 = sha256;
|
|
288
|
+
this.#containsEmbeddedPackages = containsEmbeddedPackages ?? false;
|
|
289
|
+
}
|
|
290
|
+
// eslint-disable-next-line require-await
|
|
291
|
+
static async create(options) {
|
|
292
|
+
return new FinalizedBundleArchive(options);
|
|
293
|
+
}
|
|
294
|
+
get archiveFile() {
|
|
295
|
+
return this.#archiveFile;
|
|
296
|
+
}
|
|
297
|
+
/** Lowercase hex SHA-256 of the archive's bytes. */
|
|
298
|
+
get sha256() {
|
|
299
|
+
return this.#sha256;
|
|
300
|
+
}
|
|
301
|
+
async store() {
|
|
302
|
+
const { size } = await fs.stat(this.#archiveFile);
|
|
303
|
+
try {
|
|
304
|
+
const { data: { key, }, } = await this.#uploadCodeBundle(this.#archiveFile, size, this.#sha256);
|
|
305
|
+
return await RemoteBundleArchive.create({
|
|
306
|
+
key,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
catch (err) {
|
|
310
|
+
if (err instanceof PayloadTooLargeError) {
|
|
311
|
+
throw new BundleTooLargeError({
|
|
312
|
+
sizeBytes: size,
|
|
313
|
+
maxBytes: parseMaxBytes(err.data.message),
|
|
314
|
+
containsEmbeddedPackages: this.#containsEmbeddedPackages,
|
|
315
|
+
cause: err,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
throw err;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
async #uploadCodeBundle(filePath, size, sha256) {
|
|
322
|
+
const stream = createReadStream(filePath);
|
|
323
|
+
stream.on('error', err => {
|
|
324
|
+
throw new Error(`Failed to read Playwright project file: ${err.message}`);
|
|
325
|
+
});
|
|
326
|
+
try {
|
|
327
|
+
return await checklyStorage.uploadCodeBundle(stream, size, sha256);
|
|
328
|
+
}
|
|
329
|
+
finally {
|
|
330
|
+
// A failed upload leaves the stream unconsumed and its file handle
|
|
331
|
+
// open; on Windows the open handle blocks deleting the archive's
|
|
332
|
+
// temp directory. destroy() only schedules the close, so wait for it
|
|
333
|
+
// to complete before continuing to any cleanup. (After a fully
|
|
334
|
+
// consumed upload the stream has already auto-closed and both calls
|
|
335
|
+
// are no-ops.)
|
|
336
|
+
stream.destroy();
|
|
337
|
+
if (!stream.closed) {
|
|
338
|
+
await once(stream, 'close');
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
export class RemoteBundleArchive {
|
|
344
|
+
#key;
|
|
345
|
+
constructor(options) {
|
|
346
|
+
const { key, } = options;
|
|
347
|
+
this.#key = key;
|
|
348
|
+
}
|
|
349
|
+
// eslint-disable-next-line require-await
|
|
350
|
+
static async create(options) {
|
|
351
|
+
return new RemoteBundleArchive(options);
|
|
352
|
+
}
|
|
353
|
+
get key() {
|
|
354
|
+
return this.#key;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Maps planned tarballs to cache-hash records. yarn.lock plans carry no SRI
|
|
359
|
+
* tarball integrity (it is resolved from registry metadata only at
|
|
360
|
+
* materialization time), so their records use the lockfile's own checksum —
|
|
361
|
+
* an equally stable content pin that is known at plan time, keeping the
|
|
362
|
+
* eager placeholder hash and the finalize hash consistent. The parsers
|
|
363
|
+
* guarantee one of the two hashes is always present; the empty-string
|
|
364
|
+
* fallback only satisfies the type.
|
|
365
|
+
*/
|
|
366
|
+
export function embeddedPackageHashInputs(tarballs) {
|
|
367
|
+
return tarballs?.map(({ name, version, integrity, lockfileChecksum }) => ({
|
|
368
|
+
name,
|
|
369
|
+
version,
|
|
370
|
+
integrity: integrity ?? lockfileChecksum ?? '',
|
|
371
|
+
}));
|
|
372
|
+
}
|
|
373
|
+
export class Bundler {
|
|
374
|
+
#id;
|
|
375
|
+
#marker;
|
|
376
|
+
#cacheHashMarker;
|
|
377
|
+
#codeBundleChecksumMarker;
|
|
378
|
+
#tempDir;
|
|
379
|
+
#stripPrefix;
|
|
380
|
+
#workspaceContext;
|
|
381
|
+
#files = new Map();
|
|
382
|
+
/**
|
|
383
|
+
* Archive paths of manifests a finalize-time rewrite replaced — package
|
|
384
|
+
* pruning (`bundle.packages.prune`) or the patch filtering. Unlike a
|
|
385
|
+
* synthesized member manifest, a rewritten manifest has an on-disk original,
|
|
386
|
+
* so it is hashed the way on-disk manifests are — with `version` stripped —
|
|
387
|
+
* rather than verbatim. Hashing the raw bytes would make a release bump
|
|
388
|
+
* alone change the dependency cache key even though no install input did.
|
|
389
|
+
*/
|
|
390
|
+
#rewrittenManifests = new Set();
|
|
391
|
+
constructor(options) {
|
|
392
|
+
const { tempDir, cacheHash, stripPrefix, workspaceContext, } = options;
|
|
393
|
+
this.#id = uuid.v4();
|
|
394
|
+
this.#marker = new BundlePathMarker(`bundle:${this.#id}`);
|
|
395
|
+
this.#cacheHashMarker = new CacheHashMarker(cacheHash);
|
|
396
|
+
this.#codeBundleChecksumMarker = new CodeBundleChecksumMarker();
|
|
397
|
+
this.#stripPrefix = stripPrefix;
|
|
398
|
+
this.#tempDir = tempDir;
|
|
399
|
+
this.#workspaceContext = workspaceContext;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Creates a bundler without a workspace context. Workspace-dependent
|
|
403
|
+
* finalize() behavior — lockfile pruning, embedded package
|
|
404
|
+
* materialization (`bundle.packages.embed`) and the cache-hash recompute
|
|
405
|
+
* — only happens for bundlers built with {@link createForWorkspace}; a
|
|
406
|
+
* plain bundler archives exactly the files registered into it.
|
|
407
|
+
*/
|
|
408
|
+
// eslint-disable-next-line require-await
|
|
409
|
+
static async create(options) {
|
|
410
|
+
debug(`Creating bundler`);
|
|
411
|
+
return new Bundler(options);
|
|
412
|
+
}
|
|
413
|
+
static async createForWorkspace(workspace, options) {
|
|
414
|
+
debug(`Creating bundler for workspace`);
|
|
415
|
+
const { tempDir, dependencyCacheVersion, embeddedPackagesMaterializer, packageManager, packagePrune, runnerRegistries, } = options;
|
|
416
|
+
const embeddedPackages = (await embeddedPackagesMaterializer?.plan())?.tarballs;
|
|
417
|
+
// Serialized once so the eager cache hash below, the finalize()
|
|
418
|
+
// recompute and the registered bundle file all agree on the exact
|
|
419
|
+
// bytes. Re-validated on entry like `normalizePackagePrune` is — the
|
|
420
|
+
// config loader has already validated config-sourced values, but
|
|
421
|
+
// programmatic callers reach this constructor directly.
|
|
422
|
+
const runnerRegistriesContent = runnerRegistries !== undefined
|
|
423
|
+
? serializeRegistries(validateRegistries(runnerRegistries))
|
|
424
|
+
: undefined;
|
|
425
|
+
const runnerRegistriesDigest = runnerRegistriesContent !== undefined
|
|
426
|
+
? createHash('sha256').update(runnerRegistriesContent, 'utf8').digest()
|
|
427
|
+
: undefined;
|
|
428
|
+
// The composition is captured so finalize() can recompute the hash with
|
|
429
|
+
// bundle-time additions (faux manifests, a pruned lockfile) from the
|
|
430
|
+
// same workspace inputs, loaded once. The eager value below is only a
|
|
431
|
+
// placeholder for the window before finalize() runs — finalize() always
|
|
432
|
+
// recomputes it.
|
|
433
|
+
const cacheHashInputs = await loadWorkspaceCacheHashInputs(workspace);
|
|
434
|
+
const composeCacheHash = (extra) => {
|
|
435
|
+
return composeWorkspaceCacheHash(cacheHashInputs, {
|
|
436
|
+
dependencyCacheVersion,
|
|
437
|
+
runnerRegistries: runnerRegistriesDigest,
|
|
438
|
+
...extra,
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
return new Bundler({
|
|
442
|
+
tempDir,
|
|
443
|
+
cacheHash: composeCacheHash({ embeddedPackages: embeddedPackageHashInputs(embeddedPackages) }),
|
|
444
|
+
stripPrefix: workspace?.root.path,
|
|
445
|
+
workspaceContext: {
|
|
446
|
+
workspace,
|
|
447
|
+
packageManager,
|
|
448
|
+
embeddedPackagesMaterializer,
|
|
449
|
+
packagePrune: normalizePackagePrune(packagePrune),
|
|
450
|
+
runnerRegistriesContent,
|
|
451
|
+
composeCacheHash,
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
get marker() {
|
|
456
|
+
return this.#marker;
|
|
457
|
+
}
|
|
458
|
+
updateMarker(newValue) {
|
|
459
|
+
this.#marker.updateValue(newValue);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* The dependency cache hash. A mutable holder rather than a plain string:
|
|
463
|
+
* consumers copy it into check payloads during bundle(), but the final
|
|
464
|
+
* value — reflecting faux manifests and a possibly pruned lockfile — is
|
|
465
|
+
* only known once finalize() has run, the same ordering problem
|
|
466
|
+
* {@link BundlePathMarker} solves for the archive path.
|
|
467
|
+
*/
|
|
468
|
+
get cacheHash() {
|
|
469
|
+
return this.#cacheHashMarker;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* The code bundle's content hash, filled in by finalize(). See
|
|
473
|
+
* {@link CodeBundleChecksumMarker} for why it is a holder.
|
|
474
|
+
*/
|
|
475
|
+
get codeBundleSha256() {
|
|
476
|
+
return this.#codeBundleChecksumMarker;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Whether any files have been registered for bundling. Only Playwright check
|
|
480
|
+
* suites register files (see playwright-check.ts), so an empty bundler means the
|
|
481
|
+
* project has nothing that needs a remote code bundle and the upload can be skipped.
|
|
482
|
+
*/
|
|
483
|
+
get isEmpty() {
|
|
484
|
+
return this.#files.size === 0;
|
|
485
|
+
}
|
|
486
|
+
registerFiles(...files) {
|
|
487
|
+
for (const newFile of files) {
|
|
488
|
+
// Keyed by archive path, not source path: one source file can be archived
|
|
489
|
+
// at more than one path (a package reached through two symlinks), and
|
|
490
|
+
// keying by source would silently drop all but one of them.
|
|
491
|
+
const key = archivePath(newFile, this.#stripPrefix);
|
|
492
|
+
const existingFile = this.#files.get(key);
|
|
493
|
+
if (existingFile) {
|
|
494
|
+
// Prefer physical files.
|
|
495
|
+
if (existingFile.physical && !newFile.physical) {
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
this.#files.set(key, newFile);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Prunes the bundled lockfile to match the bundle's final file set,
|
|
504
|
+
* materializes the embedded package tarballs the (possibly pruned)
|
|
505
|
+
* lockfile still references, and recomputes the cache hash from the
|
|
506
|
+
* bundle's actual install inputs (faux manifests, the pruned lockfile and
|
|
507
|
+
* the shipped embedded set). Runs at finalize time because all of it
|
|
508
|
+
* depends on the complete file set, which only exists once every check
|
|
509
|
+
* has registered its files — and because materializing after pruning is
|
|
510
|
+
* what keeps pruned-away tarballs from ever being downloaded.
|
|
511
|
+
*/
|
|
512
|
+
async #refreshWorkspaceBundle() {
|
|
513
|
+
const context = this.#workspaceContext;
|
|
514
|
+
if (context === undefined) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
const prunedManifestOriginals = await this.#pruneManifestPackages(context);
|
|
518
|
+
const lockfilePrune = await this.#pruneLockfile(context);
|
|
519
|
+
const pruned = await this.#dropUnusedPatches(context, lockfilePrune.pruned);
|
|
520
|
+
// Pruned manifests must never ship alongside an unpruned lockfile: the
|
|
521
|
+
// lockfile's importer sections would declare dependencies the shipped
|
|
522
|
+
// manifests lack, failing the runner's frozen install. When lockfile
|
|
523
|
+
// pruning skipped or failed for any reason, roll the manifest rewrite
|
|
524
|
+
// back — unless the skip itself proved the original lockfile already
|
|
525
|
+
// matches the pruned manifests (a byte-identical regeneration), or the
|
|
526
|
+
// bundle ships no lockfile at all, in which case the manifests are the
|
|
527
|
+
// install's only input and nothing can fall out of sync.
|
|
528
|
+
if (pruned === undefined
|
|
529
|
+
&& !lockfilePrune.consistent
|
|
530
|
+
&& prunedManifestOriginals.size > 0
|
|
531
|
+
&& this.#bundledLockfilePath(context) !== undefined) {
|
|
532
|
+
for (const [manifestPath, original] of prunedManifestOriginals) {
|
|
533
|
+
this.#files.set(manifestPath, original);
|
|
534
|
+
this.#rewrittenManifests.delete(manifestPath);
|
|
535
|
+
}
|
|
536
|
+
process.stderr.write(`Warning: bundle.packages.prune was not applied because the bundled lockfile could `
|
|
537
|
+
+ `not be pruned to match; the original manifests ship unchanged.\n`);
|
|
538
|
+
}
|
|
539
|
+
const embeddedPackages = await this.#materializeEmbeddedPackages(context, pruned);
|
|
540
|
+
this.#registerRunnerRegistries(context);
|
|
541
|
+
const fauxPackageJsons = [];
|
|
542
|
+
for (const [archivePath, file] of this.#files) {
|
|
543
|
+
if (file.physical || path.posix.basename(archivePath) !== 'package.json') {
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
const raw = Buffer.from(file.content, 'utf8');
|
|
547
|
+
fauxPackageJsons.push({
|
|
548
|
+
path: archivePath,
|
|
549
|
+
raw: this.#rewrittenManifests.has(archivePath)
|
|
550
|
+
? canonicalizePackageJson(raw, PACKAGE_JSON_EXCLUDED_FIELDS)
|
|
551
|
+
: raw,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
// Unconditional: with no faux manifests, no pruned lockfile and an
|
|
555
|
+
// unfiltered embedded set this reproduces the exact digest computed in
|
|
556
|
+
// createForWorkspace (empty record groups write nothing).
|
|
557
|
+
this.#cacheHashMarker.updateValue(context.composeCacheHash({
|
|
558
|
+
fauxPackageJsons,
|
|
559
|
+
prunedLockfile: pruned,
|
|
560
|
+
embeddedPackages: embeddedPackageHashInputs(embeddedPackages),
|
|
561
|
+
}));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Registers the serialized `runner.registries` configuration into the
|
|
565
|
+
* bundle at {@link REGISTRIES_ARCHIVE_PATH}. The path is CLI-managed:
|
|
566
|
+
* runners honor whatever lands there, so a pre-existing entry — a
|
|
567
|
+
* hand-written file an `include` glob dragged in, which has passed no
|
|
568
|
+
* validation and contributes nothing to the cache hash — is dropped
|
|
569
|
+
* rather than shipped, whether or not the option is set. Set directly
|
|
570
|
+
* rather than through `registerFiles`, whose prefer-physical rule
|
|
571
|
+
* would keep such a file. Skipped when the bundle is empty: the
|
|
572
|
+
* project then has no Playwright Check Suite, nothing is uploaded, and
|
|
573
|
+
* registering the file would make `isEmpty` misreport.
|
|
574
|
+
*/
|
|
575
|
+
#registerRunnerRegistries(context) {
|
|
576
|
+
if (this.#files.delete(REGISTRIES_ARCHIVE_PATH)) {
|
|
577
|
+
process.stderr.write(`Warning: ${REGISTRIES_ARCHIVE_PATH} is generated from the 'runner.registries' config `
|
|
578
|
+
+ `field and cannot be supplied as a project file; the included file was dropped.\n`);
|
|
579
|
+
}
|
|
580
|
+
const content = context.runnerRegistriesContent;
|
|
581
|
+
if (content === undefined || this.isEmpty) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
this.#files.set(REGISTRIES_ARCHIVE_PATH, {
|
|
585
|
+
// A virtual file's archive path is derived from its filePath
|
|
586
|
+
// relative to the strip prefix, so the filePath must sit under it.
|
|
587
|
+
filePath: path.join(this.#stripPrefix ?? '', REGISTRIES_ARCHIVE_PATH),
|
|
588
|
+
physical: false,
|
|
589
|
+
content,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Applies `bundle.packages.prune` to the workspace manifests in the
|
|
594
|
+
* bundle — the root's and every bundled member's — replacing each
|
|
595
|
+
* affected entry with a rewritten virtual copy. Runs before lockfile
|
|
596
|
+
* pruning so the lockfile-only install resolves against the reduced
|
|
597
|
+
* manifests and the removed dependencies fall out of the pruned lockfile.
|
|
598
|
+
* Only manifests at the workspace's own locations are touched: a
|
|
599
|
+
* package.json an `include` glob dragged in is not an install input.
|
|
600
|
+
*
|
|
601
|
+
* Returns the replaced original entries, keyed by archive path, so
|
|
602
|
+
* {@link Bundler.refreshWorkspaceBundle} can roll the rewrite back when
|
|
603
|
+
* the bundled lockfile cannot be pruned to match.
|
|
604
|
+
*/
|
|
605
|
+
async #pruneManifestPackages(context) {
|
|
606
|
+
const replaced = new Map();
|
|
607
|
+
const prune = context.packagePrune;
|
|
608
|
+
// An empty bundle — a run whose check filter left nothing to bundle —
|
|
609
|
+
// applies no prune, so its configuration is deliberately not linted
|
|
610
|
+
// either: even a genuinely typo'd member selector stays quiet here
|
|
611
|
+
// and reports on the next run that bundles something. Mirrors the
|
|
612
|
+
// isEmpty short-circuits in #registerRunnerRegistries and
|
|
613
|
+
// #materializeEmbeddedPackages.
|
|
614
|
+
if (prune === undefined || this.isEmpty) {
|
|
615
|
+
return replaced;
|
|
616
|
+
}
|
|
617
|
+
const { workspace } = context;
|
|
618
|
+
const memberDiagnostics = new MemberPruneDiagnostics(prune);
|
|
619
|
+
const visited = new Set();
|
|
620
|
+
for (const pkg of [workspace.root, ...workspace.packages]) {
|
|
621
|
+
const manifestPath = manifestArchivePath(workspace, pkg);
|
|
622
|
+
// A root manifest whose own workspace globs match itself appears in
|
|
623
|
+
// workspace.packages a second time; without this guard the second
|
|
624
|
+
// visit would re-read and re-prune the same archive path — and
|
|
625
|
+
// repeat any per-manifest failure warning — whenever the first
|
|
626
|
+
// visit left the entry physical.
|
|
627
|
+
if (visited.has(manifestPath)) {
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
visited.add(manifestPath);
|
|
631
|
+
const identity = {
|
|
632
|
+
name: pkg.name,
|
|
633
|
+
// Compared by path, not object identity: a root manifest whose own
|
|
634
|
+
// workspace globs match itself (e.g. `workspaces: ['**']`) appears
|
|
635
|
+
// in workspace.packages as a second Package instance, and that
|
|
636
|
+
// duplicate must still resolve as the root.
|
|
637
|
+
root: pkg.path === workspace.root.path,
|
|
638
|
+
};
|
|
639
|
+
// Observed whether or not the member is in this run's bundle: the
|
|
640
|
+
// typo net compares selectors against the whole workspace.
|
|
641
|
+
memberDiagnostics.observeWorkspaceMember(identity);
|
|
642
|
+
const file = this.#files.get(manifestPath);
|
|
643
|
+
if (file === undefined) {
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
if (!file.physical) {
|
|
647
|
+
// The only virtual member manifests are synthesized ones (faux
|
|
648
|
+
// shims), which carry no dependency classes — and only a rewrite
|
|
649
|
+
// of a physical original may join #rewrittenManifests, whose
|
|
650
|
+
// consumers rely on the rewritten content being the real manifest.
|
|
651
|
+
debug(`Not pruning ${manifestPath}: not a physical manifest`);
|
|
652
|
+
continue;
|
|
653
|
+
}
|
|
654
|
+
memberDiagnostics.observeBundledMember(identity);
|
|
655
|
+
const resolved = resolveManifestPrune(prune, identity);
|
|
656
|
+
if (resolved === undefined) {
|
|
657
|
+
// Under member-scoped entries a manifest no entry targets is not
|
|
658
|
+
// part of the requested transformation, so the failure paths
|
|
659
|
+
// below do not apply to it either.
|
|
660
|
+
debug(`Not pruning ${manifestPath}: no prune entries apply to it`);
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
if (file.symlinkTarget !== undefined) {
|
|
664
|
+
this.#warnManifestPruneFailure(manifestPath, `the manifest is bundled as a symlink`);
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
// A virtual entry's archive name is always derived from its filePath,
|
|
668
|
+
// so a replacement can only stand in for an entry that already
|
|
669
|
+
// archives at that derived path (same rule as #readPatchConfigs).
|
|
670
|
+
const replacementArchivePath = pathToPosix(path.relative(this.#stripPrefix ?? '', file.filePath));
|
|
671
|
+
if (replacementArchivePath !== manifestPath) {
|
|
672
|
+
this.#warnManifestPruneFailure(manifestPath, `the rewritten manifest would move to ${replacementArchivePath}`);
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
let content;
|
|
676
|
+
try {
|
|
677
|
+
content = await fs.readFile(file.filePath, 'utf8');
|
|
678
|
+
}
|
|
679
|
+
catch (err) {
|
|
680
|
+
this.#warnManifestPruneFailure(manifestPath, `the bundled manifest could not be read (${err})`);
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
memberDiagnostics.observeManifestContent(identity, content);
|
|
684
|
+
const result = prunePackageJson(content, resolved);
|
|
685
|
+
if (result === undefined) {
|
|
686
|
+
this.#warnManifestPruneFailure(manifestPath, `the manifest could not be rewritten safely`);
|
|
687
|
+
continue;
|
|
688
|
+
}
|
|
689
|
+
if (!result.changed) {
|
|
690
|
+
// Left physical: the entry hashes and ships exactly as before, and
|
|
691
|
+
// an untouched manifest must not force lockfile pruning.
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
replaced.set(manifestPath, file);
|
|
695
|
+
this.#files.set(manifestPath, {
|
|
696
|
+
// The archive name is derived from filePath, so the rewritten entry
|
|
697
|
+
// has to keep the original's.
|
|
698
|
+
filePath: file.filePath,
|
|
699
|
+
physical: false,
|
|
700
|
+
content: result.content,
|
|
701
|
+
});
|
|
702
|
+
this.#rewrittenManifests.add(manifestPath);
|
|
703
|
+
debug(`Pruned ${manifestPath}: ${result.removed.join(', ') || '(structural cleanup only)'}`);
|
|
704
|
+
}
|
|
705
|
+
// Config-lint warnings, printed even when the rollback below later
|
|
706
|
+
// restores the originals: they describe the configuration, and the
|
|
707
|
+
// rollback prints its own warning about the shipped state.
|
|
708
|
+
memberDiagnostics.logMemberReach();
|
|
709
|
+
for (const warning of memberDiagnostics.warnings()) {
|
|
710
|
+
process.stderr.write(`Warning: ${warning}.\n`);
|
|
711
|
+
}
|
|
712
|
+
return replaced;
|
|
713
|
+
}
|
|
714
|
+
#warnManifestPruneFailure(manifestPath, reason) {
|
|
715
|
+
// A stderr warning rather than a debug line: pruning is a user-requested
|
|
716
|
+
// transformation, and silently shipping the original manifest
|
|
717
|
+
// reintroduces the exact lockfile bloat the user configured it to
|
|
718
|
+
// remove.
|
|
719
|
+
process.stderr.write(`Warning: could not apply bundle.packages.prune to ${manifestPath}: ${reason}; `
|
|
720
|
+
+ `its original contents ship unchanged.\n`);
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* The archive path of the workspace's lockfile when the bundle ships it,
|
|
724
|
+
* mirroring the checks lockfile pruning performs before running.
|
|
725
|
+
*/
|
|
726
|
+
#bundledLockfilePath(context) {
|
|
727
|
+
const archivePath = lockfileArchivePath(context.workspace);
|
|
728
|
+
if (archivePath === undefined || !this.#files.has(archivePath)) {
|
|
729
|
+
return undefined;
|
|
730
|
+
}
|
|
731
|
+
return archivePath;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Materializes the embedded package tarballs into the bundle: the full
|
|
735
|
+
* planned set, or — when the bundled lockfile was pruned — only the
|
|
736
|
+
* tarballs the pruned lockfile still references, so pruned-away packages
|
|
737
|
+
* are never downloaded. Returns the shipped set for the cache hash.
|
|
738
|
+
*/
|
|
739
|
+
async #materializeEmbeddedPackages(context, pruned) {
|
|
740
|
+
const materializer = context.embeddedPackagesMaterializer;
|
|
741
|
+
if (materializer === undefined) {
|
|
742
|
+
return undefined;
|
|
743
|
+
}
|
|
744
|
+
// plan() is memoized and was already awaited in createForWorkspace, so
|
|
745
|
+
// this resolves the same promise without extra work.
|
|
746
|
+
const { tarballs: embeddedPackages } = await materializer.plan();
|
|
747
|
+
// The empty-bundle arm is load-bearing: every command calls finalize()
|
|
748
|
+
// unconditionally, including on bundles no check registered files into,
|
|
749
|
+
// and an empty bundle must not trigger downloads (nor the materializer's
|
|
750
|
+
// plan-issues backstop, which validation never ran for a project
|
|
751
|
+
// without Playwright checks). Nothing ships from an empty bundle, so
|
|
752
|
+
// nothing reaches the hash either.
|
|
753
|
+
if (this.isEmpty) {
|
|
754
|
+
return undefined;
|
|
755
|
+
}
|
|
756
|
+
let kept = embeddedPackages;
|
|
757
|
+
if (pruned !== undefined) {
|
|
758
|
+
const filtered = filterTarballsByLockfile(embeddedPackages, pruned.content, pruned.name);
|
|
759
|
+
kept = filtered.kept;
|
|
760
|
+
if (filtered.dropped.length > 0) {
|
|
761
|
+
debug(`Embedded packages dropped with the pruned lockfile: ${filtered.dropped.map(tarball => `${tarball.name}@${tarball.version}`).join(', ')}`);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
// Debug rather than user-facing output for now: a bare stderr line has
|
|
765
|
+
// no good home in the current CLI output UX. Revisit when finalize-time
|
|
766
|
+
// work gets proper progress reporting.
|
|
767
|
+
if (kept.length > 0) {
|
|
768
|
+
debug(`Preparing ${kept.length} embedded package tarball(s)`);
|
|
769
|
+
}
|
|
770
|
+
// Deliberately called even for an empty kept set: the materializer's
|
|
771
|
+
// plan-issues backstop must still reject a plan whose specs all failed
|
|
772
|
+
// to resolve.
|
|
773
|
+
const materialized = await materializer.materializeTarballs(kept);
|
|
774
|
+
this.registerFiles(...materialized.map(tarball => ({
|
|
775
|
+
filePath: tarball.filePath,
|
|
776
|
+
physical: true,
|
|
777
|
+
archivePath: tarball.archivePath,
|
|
778
|
+
})));
|
|
779
|
+
return kept;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Filters the bundle's pnpm patch declarations down to the ones the pruned
|
|
783
|
+
* lockfile shows still apply, dropping the matching patch files and lockfile
|
|
784
|
+
* entries with them.
|
|
785
|
+
*
|
|
786
|
+
* A bundle carries the workspace's whole `patchedDependencies` map but only
|
|
787
|
+
* a subset of its members, so a patch whose package belongs to an unbundled
|
|
788
|
+
* member ends up applying to nothing. pnpm rejects that outright when it
|
|
789
|
+
* re-resolves, which is why the prune install tolerates it (see
|
|
790
|
+
* PNpmDetector.lockfileOnlyInstallCommand) and the leftovers are cleaned up
|
|
791
|
+
* here instead — the pruned lockfile is the first point at which the bundle's
|
|
792
|
+
* real dependency graph is known.
|
|
793
|
+
*
|
|
794
|
+
* Every failure mode leaves the bundle exactly as pruning produced it, which
|
|
795
|
+
* installs correctly today; the reporting below covers the case where that
|
|
796
|
+
* fallback is nonetheless a bundle the runner would reject.
|
|
797
|
+
*/
|
|
798
|
+
async #dropUnusedPatches(context, pruned) {
|
|
799
|
+
if (pruned === undefined || context.packageManager.name !== 'pnpm') {
|
|
800
|
+
return pruned;
|
|
801
|
+
}
|
|
802
|
+
let configs = [];
|
|
803
|
+
let result = pruned;
|
|
804
|
+
try {
|
|
805
|
+
// `replaceable` is about whether the filtering may edit these files;
|
|
806
|
+
// whatever could be READ still feeds the diagnostic below, so a bundle
|
|
807
|
+
// this step declines to touch is not also a bundle it stays quiet about.
|
|
808
|
+
const read = await this.#readPatchConfigs();
|
|
809
|
+
configs = read.configs;
|
|
810
|
+
if (read.replaceable) {
|
|
811
|
+
const plan = planPatchFilter({
|
|
812
|
+
configs,
|
|
813
|
+
originalLockfileContent: pruned.originalContent,
|
|
814
|
+
prunedLockfileContent: pruned.content,
|
|
815
|
+
});
|
|
816
|
+
if (plan !== undefined) {
|
|
817
|
+
const applied = this.#applyPatchFilter(context, pruned, plan);
|
|
818
|
+
if (applied !== undefined) {
|
|
819
|
+
result = applied;
|
|
820
|
+
// The diagnostic below must see what actually ships, so the config
|
|
821
|
+
// is swapped for its rewritten bytes only once the apply took.
|
|
822
|
+
configs = configs.map(config => config.archivePath === plan.rewrittenConfig.archivePath
|
|
823
|
+
? { ...config, content: plan.rewrittenConfig.content }
|
|
824
|
+
: config);
|
|
825
|
+
debug(`Dropped unused patch declarations: ${plan.unusedKeys.join(', ')}`);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
catch (err) {
|
|
831
|
+
debug(`Could not filter the bundle's patch declarations: ${err}`);
|
|
832
|
+
}
|
|
833
|
+
// Evaluated on every path, including the ones that changed nothing: a
|
|
834
|
+
// config declaring a patch the shipped lockfile does not record is what
|
|
835
|
+
// makes the runner's install fail, and silently shipping that is the
|
|
836
|
+
// failure this step exists to prevent.
|
|
837
|
+
if (configs.length > 0) {
|
|
838
|
+
const unrepaired = findUnrepairedPatchKeys({
|
|
839
|
+
configs,
|
|
840
|
+
originalLockfileContent: pruned.originalContent,
|
|
841
|
+
shippedLockfileContent: result.content,
|
|
842
|
+
});
|
|
843
|
+
if (unrepaired.length > 0) {
|
|
844
|
+
process.stderr.write(`Note: the bundled pnpm config declares patches that the bundled lockfile does not `
|
|
845
|
+
+ `record (${unrepaired.join(', ')}), which can fail the remote install. Your own lockfile `
|
|
846
|
+
+ `does record them, so run your package manager's install to refresh it rather than `
|
|
847
|
+
+ `removing the entries; set CHECKLY_LOCKFILE_PRUNE=0 to opt out of pruning entirely.\n`);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
return result;
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Reads the bundle's copies of the two files pnpm accepts
|
|
854
|
+
* `patchedDependencies` in.
|
|
855
|
+
*
|
|
856
|
+
* `replaceable` is false when a candidate exists but cannot be read or
|
|
857
|
+
* cannot be swapped for a rewritten copy; filtering one declaring config
|
|
858
|
+
* while leaving the other would manufacture the very config/lockfile
|
|
859
|
+
* mismatch this step removes. Whatever *could* be read is still returned, so
|
|
860
|
+
* the caller can report on a bundle it declines to edit.
|
|
861
|
+
*/
|
|
862
|
+
async #readPatchConfigs() {
|
|
863
|
+
const configs = [];
|
|
864
|
+
let replaceable = true;
|
|
865
|
+
// The archive path and the kind are the same string here; see
|
|
866
|
+
// PATCH_CONFIG_KINDS for why.
|
|
867
|
+
for (const archivePath of PATCH_CONFIG_KINDS) {
|
|
868
|
+
const file = this.#files.get(archivePath);
|
|
869
|
+
if (file === undefined) {
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
// A virtual entry's archive name is always derived from its filePath,
|
|
873
|
+
// so a replacement can only stand in for an entry that already archives
|
|
874
|
+
// at that derived path. An entry bundled somewhere other than its own
|
|
875
|
+
// path — reached through a symlink, and carrying an explicit
|
|
876
|
+
// archivePath — cannot be replaced without moving it.
|
|
877
|
+
const replacementArchivePath = pathToPosix(path.relative(this.#stripPrefix ?? '', file.filePath));
|
|
878
|
+
if (replacementArchivePath !== archivePath) {
|
|
879
|
+
debug(`Bundled ${archivePath} would move to ${replacementArchivePath} if rewritten;`
|
|
880
|
+
+ ` leaving patches alone`);
|
|
881
|
+
replaceable = false;
|
|
882
|
+
}
|
|
883
|
+
try {
|
|
884
|
+
const content = file.physical
|
|
885
|
+
? await fs.readFile(file.filePath, 'utf8')
|
|
886
|
+
: file.content;
|
|
887
|
+
configs.push({ archivePath, kind: archivePath, content });
|
|
888
|
+
}
|
|
889
|
+
catch (err) {
|
|
890
|
+
debug(`Could not read bundled ${archivePath}: ${err}`);
|
|
891
|
+
replaceable = false;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
return { configs, replaceable };
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Applies a patch filter plan. Deliberately pure map mutation over
|
|
898
|
+
* already-computed content: a throw partway through would ship a bundle
|
|
899
|
+
* whose config, patch files and lockfile disagree, which fails the runner's
|
|
900
|
+
* install either way it lands.
|
|
901
|
+
*/
|
|
902
|
+
#applyPatchFilter(context, pruned, plan) {
|
|
903
|
+
// Resolved before anything is mutated: the config entry is what the plan
|
|
904
|
+
// was computed from, and rewriting the lockfile without it would ship the
|
|
905
|
+
// mismatch this step exists to remove.
|
|
906
|
+
const existing = this.#files.get(plan.rewrittenConfig.archivePath);
|
|
907
|
+
if (existing === undefined) {
|
|
908
|
+
return undefined;
|
|
909
|
+
}
|
|
910
|
+
this.#files.set(plan.rewrittenConfig.archivePath, {
|
|
911
|
+
// The archive name is derived from filePath, so the rewritten entry has
|
|
912
|
+
// to keep the original's.
|
|
913
|
+
filePath: existing.filePath,
|
|
914
|
+
physical: false,
|
|
915
|
+
content: plan.rewrittenConfig.content,
|
|
916
|
+
});
|
|
917
|
+
if (path.posix.basename(plan.rewrittenConfig.archivePath) === 'package.json') {
|
|
918
|
+
this.#rewrittenManifests.add(plan.rewrittenConfig.archivePath);
|
|
919
|
+
}
|
|
920
|
+
for (const patchPath of plan.droppedPatchPaths) {
|
|
921
|
+
// Defense in depth, as an allow-list rather than a list of things not to
|
|
922
|
+
// delete: a declared patch path is user input reaching a delete, and it
|
|
923
|
+
// can name any bundled file — an .npmrc carrying registry auth, a
|
|
924
|
+
// pnpmfile the lockfile records a checksum for, or a `.patch` fixture
|
|
925
|
+
// that a check's own `include` glob put in the bundle. Only the
|
|
926
|
+
// conventional location the auto-include adds patches from is removable;
|
|
927
|
+
// a patch kept elsewhere simply stays, inert, exactly as an
|
|
928
|
+
// unreferenced one does.
|
|
929
|
+
if (!isRemovablePatchPath(patchPath)) {
|
|
930
|
+
debug(`Refusing to drop ${patchPath}: outside the conventional patches directory`);
|
|
931
|
+
continue;
|
|
932
|
+
}
|
|
933
|
+
this.#files.delete(patchPath);
|
|
934
|
+
}
|
|
935
|
+
this.#files.set(pruned.archivePath, {
|
|
936
|
+
filePath: context.workspace.lockfile.unwrap(),
|
|
937
|
+
physical: false,
|
|
938
|
+
content: plan.lockfileContent,
|
|
939
|
+
});
|
|
940
|
+
return {
|
|
941
|
+
...pruned,
|
|
942
|
+
content: plan.lockfileContent,
|
|
943
|
+
hash: createHash('sha256').update(plan.lockfileContent).digest(),
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
async #pruneLockfile(context) {
|
|
947
|
+
const result = await pruneBundledLockfile({
|
|
948
|
+
workspace: context.workspace,
|
|
949
|
+
packageManager: context.packageManager,
|
|
950
|
+
files: this.#files,
|
|
951
|
+
rewrittenManifests: this.#rewrittenManifests,
|
|
952
|
+
});
|
|
953
|
+
if (result.status === 'failed') {
|
|
954
|
+
process.stderr.write(`Warning: could not prune the bundled lockfile: ${result.reason}. `
|
|
955
|
+
+ `Falling back to the original lockfile; it may reference workspace packages and `
|
|
956
|
+
+ `dependencies that are not part of the bundle. If the lockfile is out of date, `
|
|
957
|
+
+ `run your package manager's install to refresh it; set CHECKLY_LOCKFILE_PRUNE=0 `
|
|
958
|
+
+ `to disable pruning.\n`);
|
|
959
|
+
return {};
|
|
960
|
+
}
|
|
961
|
+
if (result.status === 'skipped') {
|
|
962
|
+
if (result.notable) {
|
|
963
|
+
// The bundle is a partial workspace, so the unpruned lockfile
|
|
964
|
+
// over-describes it — say so instead of failing silently on the
|
|
965
|
+
// remote install.
|
|
966
|
+
process.stderr.write(`Note: the bundled lockfile was not pruned (${result.reason}); it may reference `
|
|
967
|
+
+ `workspace packages and dependencies that are not part of the bundle. If this `
|
|
968
|
+
+ `setup cannot be pruned, set CHECKLY_LOCKFILE_PRUNE=0 to opt out of pruning `
|
|
969
|
+
+ `(and this note) entirely.\n`);
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
debug(`Lockfile pruning skipped: ${result.reason}`);
|
|
973
|
+
}
|
|
974
|
+
return { consistent: result.consistent };
|
|
975
|
+
}
|
|
976
|
+
// Set entries directly rather than through registerFiles: its
|
|
977
|
+
// prefer-physical dedup would keep the original lockfile, and would drop
|
|
978
|
+
// a backfilled manifest whose path is occupied by a symlink entry —
|
|
979
|
+
// desyncing the bundle from the lockfile the prune was computed against.
|
|
980
|
+
for (const manifest of result.backfilledManifests) {
|
|
981
|
+
this.#files.set(archivePath(manifest, this.#stripPrefix), manifest);
|
|
982
|
+
}
|
|
983
|
+
this.#files.set(result.archivePath, {
|
|
984
|
+
filePath: context.workspace.lockfile.unwrap(),
|
|
985
|
+
physical: false,
|
|
986
|
+
content: result.content,
|
|
987
|
+
});
|
|
988
|
+
debug(`Pruned bundled lockfile ${result.archivePath}`);
|
|
989
|
+
return {
|
|
990
|
+
pruned: {
|
|
991
|
+
name: path.posix.basename(result.archivePath),
|
|
992
|
+
hash: createHash('sha256').update(result.content).digest(),
|
|
993
|
+
content: result.content,
|
|
994
|
+
archivePath: result.archivePath,
|
|
995
|
+
originalContent: result.originalContent,
|
|
996
|
+
},
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
async finalize() {
|
|
1000
|
+
await this.#refreshWorkspaceBundle();
|
|
1001
|
+
const archive = await BundleArchive.create({
|
|
1002
|
+
tempDir: this.#tempDir,
|
|
1003
|
+
stripPrefix: this.#stripPrefix,
|
|
1004
|
+
});
|
|
1005
|
+
const files = dropSymlinksWithChildren(
|
|
1006
|
+
// Ordered by code point, not `localeCompare`: the order decides the
|
|
1007
|
+
// archive's bytes and therefore its hash, and a locale-sensitive
|
|
1008
|
+
// comparison would make that hash depend on the machine that built it.
|
|
1009
|
+
Array.from(this.#files.entries()).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)));
|
|
1010
|
+
await archive.add(...files);
|
|
1011
|
+
const finalized = await archive.finalize();
|
|
1012
|
+
this.#codeBundleChecksumMarker.updateValue(finalized.sha256);
|
|
1013
|
+
return finalized;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
async function createArchiver() {
|
|
1017
|
+
// Dynamic import for CommonJs so it doesn't break when using checkly/playwright-reporter archiver
|
|
1018
|
+
// The custom Checkly fork of archiver exports TarArchive class instead of a default function
|
|
1019
|
+
const archiverModule = await import('archiver');
|
|
1020
|
+
if (archiverModule.TarArchive) {
|
|
1021
|
+
// Using Checkly's custom fork which exports TarArchive class
|
|
1022
|
+
return new archiverModule.TarArchive({ gzip: true, gzipOptions: { level: 9 } });
|
|
1023
|
+
}
|
|
1024
|
+
else if (archiverModule.default) {
|
|
1025
|
+
// Using standard archiver which has a default factory function
|
|
1026
|
+
return archiverModule.default('tar', { gzip: true, gzipOptions: { level: 9 } });
|
|
1027
|
+
}
|
|
1028
|
+
else {
|
|
1029
|
+
throw new Error('Unable to initialize archiver: neither TarArchive nor default export found');
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
export class BundlePathMarker {
|
|
1033
|
+
#value;
|
|
1034
|
+
constructor(initialValue) {
|
|
1035
|
+
this.#value = initialValue;
|
|
1036
|
+
}
|
|
1037
|
+
updateValue(newValue) {
|
|
1038
|
+
this.#value = newValue;
|
|
1039
|
+
}
|
|
1040
|
+
toJSON() {
|
|
1041
|
+
return this.#value;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Mutable holder for the dependency cache hash, serialized as a plain
|
|
1046
|
+
* string. See {@link Bundler.cacheHash} for why a holder is needed.
|
|
1047
|
+
*
|
|
1048
|
+
* Deliberately a standalone class rather than a subclass of
|
|
1049
|
+
* {@link BundlePathMarker}: the own `#value` field makes the two marker
|
|
1050
|
+
* types nominally incompatible, so a bundle path cannot be passed where the
|
|
1051
|
+
* cache hash is expected (or vice versa) without a compile error.
|
|
1052
|
+
*/
|
|
1053
|
+
export class CacheHashMarker {
|
|
1054
|
+
#value;
|
|
1055
|
+
constructor(initialValue) {
|
|
1056
|
+
this.#value = initialValue;
|
|
1057
|
+
}
|
|
1058
|
+
updateValue(newValue) {
|
|
1059
|
+
this.#value = newValue;
|
|
1060
|
+
}
|
|
1061
|
+
toJSON() {
|
|
1062
|
+
return this.#value;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Mutable holder for the code bundle's SHA-256, serialized as a plain string.
|
|
1067
|
+
* Checks copy it into their payloads during bundle(), but the archive it
|
|
1068
|
+
* describes only exists once finalize() has run — the same ordering problem
|
|
1069
|
+
* {@link BundlePathMarker} solves for the archive path.
|
|
1070
|
+
*
|
|
1071
|
+
* Starts empty and serializes to `undefined` until finalize() fills it in, so
|
|
1072
|
+
* a payload synthesized without a finalized archive simply omits the key
|
|
1073
|
+
* instead of claiming a hash of nothing.
|
|
1074
|
+
*
|
|
1075
|
+
* Deliberately a standalone class rather than a subclass of
|
|
1076
|
+
* {@link BundlePathMarker}, for the reason given on {@link CacheHashMarker}.
|
|
1077
|
+
*/
|
|
1078
|
+
export class CodeBundleChecksumMarker {
|
|
1079
|
+
#value;
|
|
1080
|
+
updateValue(newValue) {
|
|
1081
|
+
this.#value = newValue;
|
|
1082
|
+
}
|
|
1083
|
+
toJSON() {
|
|
1084
|
+
return this.#value;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
//# sourceMappingURL=bundler.js.map
|