stackvitals 0.1.0__py3-none-any.whl
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.
- mergescout/__init__.py +1 -0
- mergescout/archive/__init__.py +0 -0
- mergescout/archive/__main__.py +30 -0
- mergescout/archive/convert.py +83 -0
- mergescout/archive/events.py +55 -0
- mergescout/archive/manifest.py +45 -0
- mergescout/archive/stream.py +83 -0
- mergescout/bench/__init__.py +1 -0
- mergescout/bench/__main__.py +135 -0
- mergescout/bench/ci.py +257 -0
- mergescout/bench/deploys.py +115 -0
- mergescout/bench/matched.py +22 -0
- mergescout/bench/prior.py +42 -0
- mergescout/bench/report.py +230 -0
- mergescout/bench/shared.py +112 -0
- mergescout/bench/stars.py +57 -0
- mergescout/cli.py +89 -0
- mergescout/config.py +35 -0
- mergescout/crawl/__init__.py +0 -0
- mergescout/crawl/__main__.py +97 -0
- mergescout/crawl/chain.py +34 -0
- mergescout/crawl/fetch.py +146 -0
- mergescout/crawl/outcomes.py +69 -0
- mergescout/crawl/queries.py +250 -0
- mergescout/crawl/runner.py +176 -0
- mergescout/crawl/seed.py +77 -0
- mergescout/crawl/state.py +169 -0
- mergescout/crawl/writer.py +87 -0
- mergescout/discover/__init__.py +0 -0
- mergescout/discover/__main__.py +58 -0
- mergescout/discover/sweep.py +286 -0
- mergescout/github/__init__.py +0 -0
- mergescout/github/graphql.py +202 -0
- mergescout/github/identities.py +35 -0
- mergescout/github/releases.py +137 -0
- mergescout/labels.py +20 -0
- mergescout/mcp_server.py +228 -0
- mergescout/measure/__init__.py +0 -0
- mergescout/measure/__main__.py +75 -0
- mergescout/measure/api_cost.py +91 -0
- mergescout/measure/count_repos.py +30 -0
- mergescout/measure/jsonl.py +14 -0
- mergescout/measure/report.py +56 -0
- mergescout/measure/sample.py +37 -0
- mergescout/owners.py +22 -0
- mergescout/setup_check.py +64 -0
- mergescout/signals/__init__.py +0 -0
- mergescout/signals/__main__.py +96 -0
- mergescout/signals/bump_ledger.py +258 -0
- mergescout/signals/bumps.py +104 -0
- mergescout/signals/check.py +141 -0
- mergescout/signals/community_bench.py +149 -0
- mergescout/signals/delivery_bench.py +103 -0
- mergescout/signals/deps_map.py +261 -0
- mergescout/signals/deps_trends.py +117 -0
- mergescout/signals/evidence.py +94 -0
- mergescout/signals/exploits.py +43 -0
- mergescout/signals/flow_bench.py +258 -0
- mergescout/signals/identity.py +73 -0
- mergescout/signals/issues.py +76 -0
- mergescout/signals/labels.py +79 -0
- mergescout/signals/osv.py +232 -0
- mergescout/signals/owners_watch.py +80 -0
- mergescout/signals/repo_stats.py +96 -0
- mergescout/signals/rules.py +70 -0
- mergescout/signals/silver.py +33 -0
- mergescout/signals/top_packages.py +26 -0
- mergescout/signals/triage.py +71 -0
- mergescout/signals/triage_math.py +120 -0
- mergescout/signals/walls.py +91 -0
- mergescout/snapshot/__init__.py +0 -0
- mergescout/snapshot/__main__.py +215 -0
- mergescout/snapshot/build.py +147 -0
- mergescout/snapshot/publish.py +70 -0
- mergescout/snapshot/schema.py +34 -0
- mergescout/snapshot/score.py +30 -0
- mergescout/store/__init__.py +0 -0
- mergescout/store/__main__.py +46 -0
- mergescout/store/sync.py +148 -0
- mergescout/timeutil.py +11 -0
- mergescout/tool/__init__.py +0 -0
- mergescout/tool/action_pack.py +62 -0
- mergescout/tool/live.py +201 -0
- mergescout/tool/queries.py +293 -0
- mergescout/tool/refs.py +31 -0
- mergescout/tool/store.py +129 -0
- mergescout/tool/tracking.py +83 -0
- stackvitals/__init__.py +2 -0
- stackvitals/__main__.py +4 -0
- stackvitals/ci/__init__.py +1 -0
- stackvitals/ci/action.py +574 -0
- stackvitals/ci/analyze.py +577 -0
- stackvitals/ci/api.py +218 -0
- stackvitals/ci/automation.py +212 -0
- stackvitals/ci/bench.py +195 -0
- stackvitals/ci/burnin.py +102 -0
- stackvitals/ci/cli.py +570 -0
- stackvitals/ci/collect.py +239 -0
- stackvitals/ci/cost.py +107 -0
- stackvitals/ci/coverage.py +155 -0
- stackvitals/ci/feedback.py +699 -0
- stackvitals/ci/fingerprint.py +220 -0
- stackvitals/ci/gitlab.py +121 -0
- stackvitals/ci/gitlab_action.py +125 -0
- stackvitals/ci/impact.py +125 -0
- stackvitals/ci/investigate.py +59 -0
- stackvitals/ci/kinds.py +52 -0
- stackvitals/ci/monitors.py +105 -0
- stackvitals/ci/owners.py +116 -0
- stackvitals/ci/quarantine_runtime.py +90 -0
- stackvitals/ci/report.py +435 -0
- stackvitals/ci/retry.py +67 -0
- stackvitals/ci/selfheal.py +102 -0
- stackvitals/ci/shards.py +120 -0
- stackvitals/ci/share.py +59 -0
- stackvitals/ci/store.py +93 -0
- stackvitals/ci/testreports.py +351 -0
- stackvitals/ci/tickets.py +106 -0
- stackvitals/ci/track_record.json +11 -0
- stackvitals/ci/triage.py +130 -0
- stackvitals/ci/triggers.py +147 -0
- stackvitals/ci/upload.py +85 -0
- stackvitals/ci/validate.py +91 -0
- stackvitals/cli.py +111 -0
- stackvitals/codeowners.py +69 -0
- stackvitals/community/__init__.py +0 -0
- stackvitals/community/action.py +140 -0
- stackvitals/community/affiliation.py +51 -0
- stackvitals/community/analyze.py +507 -0
- stackvitals/community/build.py +56 -0
- stackvitals/community/chaoss.py +70 -0
- stackvitals/community/cli.py +79 -0
- stackvitals/community/collect.py +240 -0
- stackvitals/community/context.py +54 -0
- stackvitals/community/report.py +250 -0
- stackvitals/connectors/__init__.py +244 -0
- stackvitals/connectors/ai_spend.py +190 -0
- stackvitals/connectors/base.py +82 -0
- stackvitals/connectors/check.py +686 -0
- stackvitals/connectors/copilot.py +104 -0
- stackvitals/connectors/discord.py +103 -0
- stackvitals/connectors/discourse.py +117 -0
- stackvitals/connectors/incident_io.py +106 -0
- stackvitals/connectors/jira.py +210 -0
- stackvitals/connectors/linear.py +140 -0
- stackvitals/connectors/pagerduty.py +96 -0
- stackvitals/connectors/slack.py +110 -0
- stackvitals/connectors/sonar.py +77 -0
- stackvitals/connectors/store.py +120 -0
- stackvitals/connectors/tracker.py +108 -0
- stackvitals/connectors/writeback.py +105 -0
- stackvitals/contribute/__init__.py +1 -0
- stackvitals/contribute/brief.py +297 -0
- stackvitals/contribute/cli.py +64 -0
- stackvitals/core/__init__.py +1 -0
- stackvitals/core/actors.py +103 -0
- stackvitals/core/agent_ledger.py +120 -0
- stackvitals/core/agreements.py +95 -0
- stackvitals/core/ai_outcomes.py +276 -0
- stackvitals/core/alerts.py +224 -0
- stackvitals/core/appdata.py +112 -0
- stackvitals/core/bucket.py +190 -0
- stackvitals/core/bugs.py +43 -0
- stackvitals/core/calendar.py +34 -0
- stackvitals/core/capex.py +57 -0
- stackvitals/core/change_risk.py +181 -0
- stackvitals/core/changes.py +133 -0
- stackvitals/core/chat.py +143 -0
- stackvitals/core/config.py +373 -0
- stackvitals/core/dataflow.py +168 -0
- stackvitals/core/decisions.py +275 -0
- stackvitals/core/delivery.py +954 -0
- stackvitals/core/delivery_peers.py +98 -0
- stackvitals/core/delivery_report.py +429 -0
- stackvitals/core/deliverycli.py +147 -0
- stackvitals/core/devlake_dora.sql +485 -0
- stackvitals/core/digest.py +333 -0
- stackvitals/core/explaincli.py +107 -0
- stackvitals/core/explore.py +296 -0
- stackvitals/core/export.py +342 -0
- stackvitals/core/exportcli.py +117 -0
- stackvitals/core/findings.py +350 -0
- stackvitals/core/health.py +94 -0
- stackvitals/core/identity.py +82 -0
- stackvitals/core/insights.py +365 -0
- stackvitals/core/insightscli.py +43 -0
- stackvitals/core/installdoc.py +69 -0
- stackvitals/core/investment.py +187 -0
- stackvitals/core/joins.py +43 -0
- stackvitals/core/llmsdoc.py +40 -0
- stackvitals/core/merge_queue.py +70 -0
- stackvitals/core/metrics.py +109 -0
- stackvitals/core/model.py +285 -0
- stackvitals/core/projectcli.py +66 -0
- stackvitals/core/propose.py +86 -0
- stackvitals/core/pulse.py +85 -0
- stackvitals/core/recorded.py +145 -0
- stackvitals/core/releases.py +39 -0
- stackvitals/core/requests.py +528 -0
- stackvitals/core/resync.py +35 -0
- stackvitals/core/schema.py +205 -0
- stackvitals/core/services.py +203 -0
- stackvitals/core/settings.py +96 -0
- stackvitals/core/sqlcli.py +111 -0
- stackvitals/core/stats.py +222 -0
- stackvitals/core/store.py +125 -0
- stackvitals/core/summary.py +104 -0
- stackvitals/core/time.py +29 -0
- stackvitals/core/tomledit.py +149 -0
- stackvitals/core/uicli.py +138 -0
- stackvitals/core/webapp.py +79 -0
- stackvitals/core/what_changed.py +76 -0
- stackvitals/core/workspace.py +194 -0
- stackvitals/deps/__init__.py +1 -0
- stackvitals/deps/action.py +299 -0
- stackvitals/deps/actions_vulns.py +89 -0
- stackvitals/deps/cli.py +77 -0
- stackvitals/deps/dossier.py +341 -0
- stackvitals/deps/evidence.py +44 -0
- stackvitals/deps/fixplan.py +40 -0
- stackvitals/deps/guarddog.py +32 -0
- stackvitals/deps/hygiene.py +47 -0
- stackvitals/deps/imports.py +113 -0
- stackvitals/deps/lockfiles.py +198 -0
- stackvitals/deps/lookalike.py +80 -0
- stackvitals/deps/reach.py +59 -0
- stackvitals/deps/release.py +110 -0
- stackvitals/deps/runtimes.py +161 -0
- stackvitals/deps/supply.py +454 -0
- stackvitals/deps/vulns.py +588 -0
- stackvitals/editors/__init__.py +40 -0
- stackvitals/editors/vscode/extension.js +101 -0
- stackvitals/editors/vscode/marks.js +92 -0
- stackvitals/editors/vscode/package.json +26 -0
- stackvitals/flow/__init__.py +1 -0
- stackvitals/flow/action.py +178 -0
- stackvitals/flow/analyze.py +418 -0
- stackvitals/flow/automate.py +72 -0
- stackvitals/flow/build.py +46 -0
- stackvitals/flow/cli.py +93 -0
- stackvitals/flow/code_hosts.py +146 -0
- stackvitals/flow/collect.py +451 -0
- stackvitals/flow/gitlab_mr.py +75 -0
- stackvitals/flow/knowledge.py +202 -0
- stackvitals/flow/peers.py +90 -0
- stackvitals/flow/preflight.py +210 -0
- stackvitals/flow/report.py +253 -0
- stackvitals/flow/rules.py +135 -0
- stackvitals/flow/store.py +108 -0
- stackvitals/flow/survival.py +84 -0
- stackvitals/flow/triage.py +62 -0
- stackvitals/mcp_server.py +670 -0
- stackvitals/portal/__init__.py +0 -0
- stackvitals/portal/action.py +205 -0
- stackvitals/portal/batch.py +80 -0
- stackvitals/portal/campaigns.py +104 -0
- stackvitals/portal/catalog.py +104 -0
- stackvitals/portal/checks.py +63 -0
- stackvitals/portal/cli.py +172 -0
- stackvitals/portal/descriptor.py +105 -0
- stackvitals/portal/export.py +43 -0
- stackvitals/portal/github.py +48 -0
- stackvitals/portal/golden.py +95 -0
- stackvitals/portal/history.py +30 -0
- stackvitals/portal/inventory.py +264 -0
- stackvitals/portal/owners.py +78 -0
- stackvitals/portal/pages.py +153 -0
- stackvitals/portal/rollup.py +32 -0
- stackvitals/portal/scorecard.py +366 -0
- stackvitals/security/__init__.py +2 -0
- stackvitals/security/probes.py +154 -0
- stackvitals/security/repo_checks.py +132 -0
- stackvitals/security/workflows.py +111 -0
- stackvitals/shell.py +107 -0
- stackvitals/site.py +51 -0
- stackvitals/web/app/LICENSES.md +428 -0
- stackvitals/web/app/boot.js +1 -0
- stackvitals/web/app/chunks/AddRepo-KRPZXWCY.js +1 -0
- stackvitals/web/app/chunks/SetupRunning-XWFQAKRZ.js +1 -0
- stackvitals/web/app/chunks/accuracy-data-OQTDXI7Y.js +1 -0
- stackvitals/web/app/chunks/agents-data-BAL6QAOF.js +11 -0
- stackvitals/web/app/chunks/chunk-24LFKFZ6.js +1 -0
- stackvitals/web/app/chunks/chunk-3G4SQNUC.js +1 -0
- stackvitals/web/app/chunks/chunk-3IXWEOIJ.js +154 -0
- stackvitals/web/app/chunks/chunk-3ROQFHPV.js +1 -0
- stackvitals/web/app/chunks/chunk-45PGAQRO.js +8 -0
- stackvitals/web/app/chunks/chunk-4H53OYLG.js +1 -0
- stackvitals/web/app/chunks/chunk-4LUI7O5P.js +1 -0
- stackvitals/web/app/chunks/chunk-4SQPQ5TB.js +1 -0
- stackvitals/web/app/chunks/chunk-4WKQTWUC.js +2 -0
- stackvitals/web/app/chunks/chunk-576YHDEK.js +8 -0
- stackvitals/web/app/chunks/chunk-6BDBXA6V.js +1 -0
- stackvitals/web/app/chunks/chunk-6RLVD2DT.js +1 -0
- stackvitals/web/app/chunks/chunk-763NH7PP.js +1 -0
- stackvitals/web/app/chunks/chunk-76WAVKUG.js +1 -0
- stackvitals/web/app/chunks/chunk-7II2BD5F.js +1 -0
- stackvitals/web/app/chunks/chunk-7TJCBOAY.js +1 -0
- stackvitals/web/app/chunks/chunk-ASYNLVOP.js +1 -0
- stackvitals/web/app/chunks/chunk-CTKDYZMG.js +1 -0
- stackvitals/web/app/chunks/chunk-CVB26NMC.js +1 -0
- stackvitals/web/app/chunks/chunk-G7NGB5UX.js +1 -0
- stackvitals/web/app/chunks/chunk-GPVLJRZD.js +1 -0
- stackvitals/web/app/chunks/chunk-GQYFN4PE.js +75 -0
- stackvitals/web/app/chunks/chunk-GT4EAKAO.js +2 -0
- stackvitals/web/app/chunks/chunk-IYMBFPCV.js +1 -0
- stackvitals/web/app/chunks/chunk-LAAGCPU3.js +1 -0
- stackvitals/web/app/chunks/chunk-MAPYGK3P.js +1 -0
- stackvitals/web/app/chunks/chunk-P5TXDD45.js +1 -0
- stackvitals/web/app/chunks/chunk-PABICGBL.js +1 -0
- stackvitals/web/app/chunks/chunk-RPXHAG6F.js +1 -0
- stackvitals/web/app/chunks/chunk-RQZPSJ2Y.js +1 -0
- stackvitals/web/app/chunks/chunk-S2ZBMEVA.js +1 -0
- stackvitals/web/app/chunks/chunk-S654BBEP.js +6 -0
- stackvitals/web/app/chunks/chunk-T7QVTNXF.js +1 -0
- stackvitals/web/app/chunks/chunk-THFUOCPC.js +273 -0
- stackvitals/web/app/chunks/chunk-TO4VVRZ7.js +1 -0
- stackvitals/web/app/chunks/chunk-VQ5YXO54.js +1 -0
- stackvitals/web/app/chunks/chunk-VWKSMFWJ.js +1 -0
- stackvitals/web/app/chunks/chunk-Y6LUXDM6.js +1 -0
- stackvitals/web/app/chunks/chunk-YTANGYYH.js +1 -0
- stackvitals/web/app/chunks/connect-KONYWYTT.js +1 -0
- stackvitals/web/app/chunks/connections-data-2DYS4UVW.js +32 -0
- stackvitals/web/app/chunks/logos-N5IINUAM.js +1 -0
- stackvitals/web/app/chunks/more-KMJMJQD3.js +10 -0
- stackvitals/web/app/chunks/more-PC6FVS3P.js +1 -0
- stackvitals/web/app/chunks/more-RCIVCUDE.js +2 -0
- stackvitals/web/app/chunks/more-ZKKRY6NO.css +1 -0
- stackvitals/web/app/chunks/sealbox-35YL4EUH.js +3 -0
- stackvitals/web/app/chunks/session-DYYTOE2K.js +1 -0
- stackvitals/web/app/chunks/settingsApply-2HRJEZYM.js +1 -0
- stackvitals/web/app/chunks/settingsReview-GX2FZQ4M.js +3 -0
- stackvitals/web/app/chunks/uPlot.esm-OIWT3AHJ.js +3 -0
- stackvitals/web/app/demo/ci/impact.json +1 -0
- stackvitals/web/app/demo/ci/quarantine.json +1 -0
- stackvitals/web/app/demo/ci/tickets.json +1 -0
- stackvitals/web/app/demo/mobile/alerts.json +1 -0
- stackvitals/web/app/demo/mobile/app.json +1 -0
- stackvitals/web/app/demo/mobile/community.json +1 -0
- stackvitals/web/app/demo/mobile/connectors.json +1 -0
- stackvitals/web/app/demo/mobile/data.json +1 -0
- stackvitals/web/app/demo/mobile/decisions.json +1 -0
- stackvitals/web/app/demo/mobile/delivery.json +1 -0
- stackvitals/web/app/demo/mobile/deps.json +1 -0
- stackvitals/web/app/demo/mobile/flow.json +1 -0
- stackvitals/web/app/demo/mobile/health.json +1 -0
- stackvitals/web/app/demo/mobile/insights.json +1 -0
- stackvitals/web/app/demo/mobile/pulse.json +1 -0
- stackvitals/web/app/demo/mobile/security.json +1 -0
- stackvitals/web/app/demo/mobile/summary/ci_jobs.jsonl +5 -0
- stackvitals/web/app/demo/mobile/summary/devlake_project_pr_metrics.jsonl +14 -0
- stackvitals/web/app/demo/mobile/summary/devlake_pull_requests.jsonl +14 -0
- stackvitals/web/app/demo/mobile/summary/manifest.json +1 -0
- stackvitals/web/app/demo/mobile/summary/prs.jsonl +19 -0
- stackvitals/web/app/demo/mobile/summary/tests.jsonl +1 -0
- stackvitals/web/app/demo/mobile/supply.json +1 -0
- stackvitals/web/app/demo/mobile/vulns.json +1 -0
- stackvitals/web/app/demo/payments-api/alerts.json +1 -0
- stackvitals/web/app/demo/payments-api/app.json +1 -0
- stackvitals/web/app/demo/payments-api/community.json +1 -0
- stackvitals/web/app/demo/payments-api/connectors.json +1 -0
- stackvitals/web/app/demo/payments-api/data.json +1 -0
- stackvitals/web/app/demo/payments-api/decisions.json +1 -0
- stackvitals/web/app/demo/payments-api/delivery.json +1 -0
- stackvitals/web/app/demo/payments-api/deps.json +1 -0
- stackvitals/web/app/demo/payments-api/flow.json +1 -0
- stackvitals/web/app/demo/payments-api/health.json +1 -0
- stackvitals/web/app/demo/payments-api/insights.json +1 -0
- stackvitals/web/app/demo/payments-api/pulse.json +1 -0
- stackvitals/web/app/demo/payments-api/security.json +1 -0
- stackvitals/web/app/demo/payments-api/summary/ci_jobs.jsonl +5 -0
- stackvitals/web/app/demo/payments-api/summary/devlake_project_pr_metrics.jsonl +14 -0
- stackvitals/web/app/demo/payments-api/summary/devlake_pull_requests.jsonl +14 -0
- stackvitals/web/app/demo/payments-api/summary/manifest.json +1 -0
- stackvitals/web/app/demo/payments-api/summary/prs.jsonl +22 -0
- stackvitals/web/app/demo/payments-api/summary/tests.jsonl +3 -0
- stackvitals/web/app/demo/payments-api/supply.json +1 -0
- stackvitals/web/app/demo/payments-api/vulns.json +1 -0
- stackvitals/web/app/demo/portal.json +1 -0
- stackvitals/web/app/demo/settings.json +1 -0
- stackvitals/web/app/demo/web-app/alerts.json +1 -0
- stackvitals/web/app/demo/web-app/app.json +1 -0
- stackvitals/web/app/demo/web-app/community.json +1 -0
- stackvitals/web/app/demo/web-app/connectors.json +1 -0
- stackvitals/web/app/demo/web-app/data.json +1 -0
- stackvitals/web/app/demo/web-app/decisions.json +1 -0
- stackvitals/web/app/demo/web-app/delivery.json +1 -0
- stackvitals/web/app/demo/web-app/deps.json +1 -0
- stackvitals/web/app/demo/web-app/flow.json +1 -0
- stackvitals/web/app/demo/web-app/health.json +1 -0
- stackvitals/web/app/demo/web-app/insights.json +1 -0
- stackvitals/web/app/demo/web-app/pulse.json +1 -0
- stackvitals/web/app/demo/web-app/security.json +1 -0
- stackvitals/web/app/demo/web-app/summary/ci_jobs.jsonl +5 -0
- stackvitals/web/app/demo/web-app/summary/devlake_project_pr_metrics.jsonl +14 -0
- stackvitals/web/app/demo/web-app/summary/devlake_pull_requests.jsonl +14 -0
- stackvitals/web/app/demo/web-app/summary/manifest.json +1 -0
- stackvitals/web/app/demo/web-app/summary/prs.jsonl +18 -0
- stackvitals/web/app/demo/web-app/summary/tests.jsonl +2 -0
- stackvitals/web/app/demo/web-app/supply.json +1 -0
- stackvitals/web/app/demo/web-app/vulns.json +1 -0
- stackvitals/web/app/fonts/plex-mono-400.woff2 +0 -0
- stackvitals/web/app/fonts/plex-sans-400.woff2 +0 -0
- stackvitals/web/app/fonts/plex-sans-600.woff2 +0 -0
- stackvitals/web/app/fonts/plex-sans-condensed-700.woff2 +0 -0
- stackvitals/web/app/help/accuracy.json +1 -0
- stackvitals/web/app/help/connectors.json +1 -0
- stackvitals/web/app/help/getting-started.json +1 -0
- stackvitals/web/app/help/index.json +1 -0
- stackvitals/web/app/help/modules.json +1 -0
- stackvitals/web/app/help/privacy-and-security.json +1 -0
- stackvitals/web/app/help/reference.json +1 -0
- stackvitals/web/app/main.css +1 -0
- stackvitals/web/app/main.js +1 -0
- stackvitals/web/app/pages/about.css +1 -0
- stackvitals/web/app/pages/about.js +1 -0
- stackvitals/web/app/pages/activity.css +1 -0
- stackvitals/web/app/pages/activity.js +1 -0
- stackvitals/web/app/pages/agents.css +1 -0
- stackvitals/web/app/pages/agents.js +2 -0
- stackvitals/web/app/pages/ci.css +1 -0
- stackvitals/web/app/pages/ci.js +1 -0
- stackvitals/web/app/pages/community.css +1 -0
- stackvitals/web/app/pages/community.js +1 -0
- stackvitals/web/app/pages/connections.css +1 -0
- stackvitals/web/app/pages/connections.js +6 -0
- stackvitals/web/app/pages/delivery.css +1 -0
- stackvitals/web/app/pages/delivery.js +45 -0
- stackvitals/web/app/pages/deps.css +1 -0
- stackvitals/web/app/pages/deps.js +7 -0
- stackvitals/web/app/pages/explore.css +1 -0
- stackvitals/web/app/pages/explore.js +7 -0
- stackvitals/web/app/pages/health.css +1 -0
- stackvitals/web/app/pages/health.js +1 -0
- stackvitals/web/app/pages/help.css +1 -0
- stackvitals/web/app/pages/help.js +6 -0
- stackvitals/web/app/pages/insights.css +1 -0
- stackvitals/web/app/pages/insights.js +1 -0
- stackvitals/web/app/pages/investment.css +1 -0
- stackvitals/web/app/pages/investment.js +3 -0
- stackvitals/web/app/pages/overview.css +1 -0
- stackvitals/web/app/pages/overview.js +1 -0
- stackvitals/web/app/pages/portal.css +1 -0
- stackvitals/web/app/pages/portal.js +51 -0
- stackvitals/web/app/pages/prs.css +1 -0
- stackvitals/web/app/pages/prs.js +4 -0
- stackvitals/web/app/pages/settings.css +1 -0
- stackvitals/web/app/pages/settings.js +1 -0
- stackvitals/web/app/pages/setup.css +1 -0
- stackvitals/web/app/pages/setup.js +2 -0
- stackvitals/web/app/pages/standing.css +1 -0
- stackvitals/web/app/pages/standing.js +1 -0
- stackvitals/web/app/pages/welcome-sheet.js +1 -0
- stackvitals/web/app/pages/welcome.js +1 -0
- stackvitals/web/app/settings-workflow.json +1 -0
- stackvitals/web/index.html +34 -0
- stackvitals/web/site/index.html +108 -0
- stackvitals/web/site/integrations.html +15 -0
- stackvitals/web/site/setup.html +15 -0
- stackvitals/web/site/site.css +68 -0
- stackvitals-0.1.0.dist-info/METADATA +134 -0
- stackvitals-0.1.0.dist-info/RECORD +465 -0
- stackvitals-0.1.0.dist-info/WHEEL +4 -0
- stackvitals-0.1.0.dist-info/entry_points.txt +3 -0
- stackvitals-0.1.0.dist-info/licenses/LICENSE +202 -0
- stackvitals-0.1.0.dist-info/licenses/NOTICE +16 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import{a as G,b as $}from"./chunk-T7QVTNXF.js";import{a as U,b as I}from"./chunk-RPXHAG6F.js";import{j as _,k as y,l as O,m as B}from"./chunk-VQ5YXO54.js";import{e as H}from"./chunk-76WAVKUG.js";import{b as W,d as M}from"./chunk-VWKSMFWJ.js";import{I as v,S as z,a as R,c as m,d as T,h as A,i as b,w as e,x as k,z as u}from"./chunk-GT4EAKAO.js";import{d as w}from"./chunk-G7NGB5UX.js";w();w();var j=/\b(github_pat_[A-Za-z0-9_]{22,255}|gh[pousr]_[A-Za-z0-9]{30,255})\b/;function S(t){return t.startsWith("github_pat_")?"fine":t.startsWith("ghp_")?"classic":t.startsWith("ghu_")?"app":"oauth"}var P=[{id:"contents",says:"Read the code and add the workflow file"},{id:"workflows",says:"Change files in .github/workflows"},{id:"actions",says:"Start the first run and watch it"},{id:"pull_requests",says:"Open a pull request when the branch is protected"},{id:"variables",says:"Set the every-CI-run switch"},{id:"secrets",says:"Save keys for Connections"},{id:"pages",says:"Turn on the web page"},{id:"administration",says:"Read the repo's Actions settings"}];function E(){let t=new URLSearchParams({name:"StackVitals",description:"Lets the StackVitals app set up and run StackVitals in the repos you pick",expires_in:"90"});for(let i of P)t.set(i.id,"write");return`https://github.com/settings/personal-access-tokens/new?${t}`}var J={contents:t=>`/repos/${t}/contents/`,actions:t=>`/repos/${t}/actions/workflows?per_page=1`,pull_requests:t=>`/repos/${t}/pulls?per_page=1`,variables:t=>`/repos/${t}/actions/variables?per_page=1`,secrets:t=>`/repos/${t}/actions/secrets/public-key`,pages:t=>`/repos/${t}/pages`,administration:t=>`/repos/${t}/actions/permissions`};async function q(t,i){let p=await t.call("GET","/user");if(!p.ok)throw I(p,!0);let g=S(i),f={login:p.data.login,avatar:p.data.avatar_url,name:p.data.name||null,kind:g};if(g==="classic"||g==="oauth"){let n=(p.headers.get("x-oauth-scopes")||"").split(",").map(a=>a.trim()),d=a=>n.includes(a),h=P.map(a=>({id:a.id,says:a.says,ok:a.id==="workflows"?d("workflow"):d("repo")}));return{...f,repos:null,probe:null,checks:h,missing:h.filter(a=>a.ok===!1)}}let l=await t.call("GET","/user/repos?per_page=100&sort=pushed");if(!l.ok)throw I(l,!0);let x=l.data||[],c=(x.find(n=>n.private)||x[0])?.full_name||null,s=await Promise.all(P.map(async n=>{let d=c&&J[n.id]?.(c);if(!d)return{id:n.id,says:n.says,ok:null};let h=await t.call("GET",d);return{id:n.id,says:n.says,ok:h.status===403?!1:h.ok||h.status===404?!0:null}}));return{...f,repos:x.length,probe:c,checks:s,missing:s.filter(n=>n.ok===!1)}}var K=`/* Connect GitHub, the repo picker, the Welcome screen and setup's plan and live steps. Loads with Welcome and Setup only. */
|
|
2
|
+
.gh-avatar { border-radius: 50%; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); object-fit: cover; }
|
|
3
|
+
.account-bar { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
4
|
+
.account-bar.is-compact { gap: 8px; font-size: 13.5px; }
|
|
5
|
+
.account-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
|
|
6
|
+
.account-text small { color: var(--ink-2); font-size: 12.5px; }
|
|
7
|
+
.account-bar.is-compact .account-text small { display: none; }
|
|
8
|
+
|
|
9
|
+
.connect { display: flex; flex-direction: column; gap: 14px; }
|
|
10
|
+
.connect-or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; margin: 0; }
|
|
11
|
+
.connect-or::before, .connect-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
|
|
12
|
+
.connect-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
|
|
13
|
+
.connect-steps > li { display: flex; gap: 12px; align-items: flex-start; }
|
|
14
|
+
.connect-steps > li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
|
|
15
|
+
.connect-steps > li > div > .field { width: 100%; margin: 0; }
|
|
16
|
+
.connect-steps p { margin: 0; color: var(--ink-2); font-size: 14px; }
|
|
17
|
+
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; margin-top: 1px; }
|
|
18
|
+
.connect-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; }
|
|
19
|
+
.remember { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
|
|
20
|
+
.pick-hint { margin: 2px 0 0; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 13px; width: 100%; display: flex; flex-direction: column; gap: 6px; }
|
|
21
|
+
.pick-hint-row { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
|
|
22
|
+
.pick-hint-row.is-on { color: var(--ink); font-weight: 600; }
|
|
23
|
+
.pick-hint .radio { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--line-strong); flex: none; }
|
|
24
|
+
.pick-hint .radio.is-on { border: 4px solid var(--accent); }
|
|
25
|
+
.pick-hint-chip { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); color: var(--ink-2);
|
|
26
|
+
border-radius: 6px; padding: 1px 8px; font: 500 12px var(--mono, monospace); pointer-events: none; }
|
|
27
|
+
.pick-hint-chip .ic { width: 12px; height: 12px; color: var(--good); }
|
|
28
|
+
.pick-hint-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
|
|
29
|
+
.pick-hint figcaption { color: var(--ink-2); }
|
|
30
|
+
.connect-result { display: flex; flex-direction: column; gap: 12px; }
|
|
31
|
+
.abilities { display: flex; flex-direction: column; gap: 10px; }
|
|
32
|
+
.ability-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
|
|
33
|
+
.ability-list li { display: flex; align-items: center; gap: 8px; }
|
|
34
|
+
.ability-list li > span:first-of-type { flex: 1; min-width: 0; }
|
|
35
|
+
.ability-list .ic { width: 17px; height: 17px; color: var(--good); flex: none; }
|
|
36
|
+
.ability-list .is-missing .ic { color: var(--bad); }
|
|
37
|
+
.note-act { display: block; margin-top: 8px; }
|
|
38
|
+
.note b { font-weight: 700; }
|
|
39
|
+
|
|
40
|
+
/* Repo picker */
|
|
41
|
+
.picker { display: flex; flex-direction: column; gap: 14px; }
|
|
42
|
+
.picker .search-field { flex: none; }
|
|
43
|
+
.picker-group { display: flex; flex-direction: column; gap: 6px; }
|
|
44
|
+
.picker-owner { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 4px; display: flex; gap: 8px; align-items: baseline; text-transform: none; }
|
|
45
|
+
.picker-owner .num { color: var(--ink-3); font-weight: 600; }
|
|
46
|
+
.picker .row-title { display: inline-flex; align-items: center; gap: 6px; }
|
|
47
|
+
.picker .row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
48
|
+
.repo-lock { width: 14px; height: 14px; color: var(--ink-3); }
|
|
49
|
+
.checking { display: inline-flex; color: var(--ink-3); }
|
|
50
|
+
.picker-none { color: var(--ink-2); margin: 0 4px; }
|
|
51
|
+
|
|
52
|
+
/* Setup: plan and live steps */
|
|
53
|
+
.plan { list-style: none; margin: 0; padding: 4px 0; }
|
|
54
|
+
.plan-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
|
|
55
|
+
.plan-row + .plan-row { border-top: 1px solid var(--line); }
|
|
56
|
+
.plan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
57
|
+
.plan-text small { color: var(--ink-2); font-size: 13.5px; }
|
|
58
|
+
.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
|
59
|
+
.wf-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
|
|
60
|
+
.wf-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
|
|
61
|
+
.wf-chip .ic { width: 14px; height: 14px; }
|
|
62
|
+
.advanced { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
|
|
63
|
+
.adv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
|
|
64
|
+
.adv-row > span:first-child { flex: 1 1 200px; }
|
|
65
|
+
.yaml-peek { margin-top: 12px; }
|
|
66
|
+
.yaml-peek summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 0; }
|
|
67
|
+
.yaml-peek .code { margin-top: 8px; }
|
|
68
|
+
.yaml-peek pre { max-height: 360px; }
|
|
69
|
+
.go-card { display: flex; flex-direction: column; gap: 14px; }
|
|
70
|
+
.go-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
|
|
71
|
+
.go-list li { display: flex; gap: 8px; align-items: flex-start; }
|
|
72
|
+
.go-list .ic { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 1px; }
|
|
73
|
+
.go-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
74
|
+
.go-or { margin: 0; color: var(--ink-2); font-size: 13.5px; }
|
|
75
|
+
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
76
|
+
.setup-step { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
|
|
77
|
+
.setup-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-3); }
|
|
78
|
+
.setup-mark .ic { width: 16px; height: 16px; }
|
|
79
|
+
.setup-step.is-running .setup-mark { background: var(--accent-soft); color: var(--accent); }
|
|
80
|
+
.setup-step.is-done .setup-mark { background: var(--good-soft); color: var(--good); }
|
|
81
|
+
.setup-step.is-failed .setup-mark { background: var(--bad-soft); color: var(--bad); }
|
|
82
|
+
.setup-step.is-waiting .setup-mark { background: var(--watch-soft); color: var(--watch); }
|
|
83
|
+
.setup-step.is-pending b, .setup-step.is-skipped b { color: var(--ink-2); font-weight: 600; }
|
|
84
|
+
.setup-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 3px; }
|
|
85
|
+
.setup-body p { margin: 0; color: var(--ink-2); font-size: 14px; }
|
|
86
|
+
.setup-fix { display: flex; gap: 6px; align-items: flex-start; color: var(--ink) !important; }
|
|
87
|
+
.setup-fix .ic { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
|
|
88
|
+
.setup-site { font-size: 14px; color: var(--ink-2); }
|
|
89
|
+
.jobs { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; width: 100%; }
|
|
90
|
+
.jobs > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
91
|
+
.job-state { color: var(--ink-3); }
|
|
92
|
+
.job-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
|
|
93
|
+
.job-dot.is-in_progress { background: var(--accent); } .job-dot.is-success { background: var(--good); } .job-dot.is-failure { background: var(--bad); }
|
|
94
|
+
.job-steps { list-style: none; margin: 0; padding: 0 0 0 16px; width: 100%; display: flex; flex-direction: column; gap: 3px; color: var(--ink-2); }
|
|
95
|
+
.job-steps li { display: flex; align-items: center; gap: 6px; }
|
|
96
|
+
.job-steps .ic, .job-steps .spin { width: 13px; height: 13px; }
|
|
97
|
+
.job-steps .is-success .ic { color: var(--good); } .job-steps .is-failure .ic { color: var(--bad); }
|
|
98
|
+
|
|
99
|
+
/* Instrument (sheet design): Connect, the account bar, permissions and the repo picker. Steps numbered in blue rings with bold sans
|
|
100
|
+
figures; the pick sketch a grey panel with a bold label; names 600, headings 700; mono only for the repo id */
|
|
101
|
+
[data-design="sheet"] .connect { gap: 20px; }
|
|
102
|
+
[data-design="sheet"] .connect-or { font: 600 14px var(--font); color: var(--ink-2); }
|
|
103
|
+
[data-design="sheet"] .connect-or::before, [data-design="sheet"] .connect-or::after { background: var(--line-strong); }
|
|
104
|
+
[data-design="sheet"] .connect-steps { gap: 0; }
|
|
105
|
+
[data-design="sheet"] .connect-steps > li { gap: 14px; }
|
|
106
|
+
[data-design="sheet"] .connect-steps > li + li { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 22px; }
|
|
107
|
+
[data-design="sheet"] .connect-steps > li > div > b { font-weight: 700; font-size: 18px; line-height: 1.25; }
|
|
108
|
+
[data-design="sheet"] .connect-steps p { font-size: 15px; color: var(--ink-2); }
|
|
109
|
+
[data-design="sheet"] .step-n { width: 30px; height: 30px; margin-top: -2px; background: var(--accent-soft); border: 1.5px solid var(--sv-blue); color: var(--accent);
|
|
110
|
+
font: 700 15px/1 var(--font); font-variant-numeric: tabular-nums; border-radius: 50% !important; }
|
|
111
|
+
[data-design="sheet"] .connect-steps .btn { min-height: 44px; }
|
|
112
|
+
[data-design="sheet"] .pick-hint { margin-top: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); padding: 14px 16px; gap: 8px; font-size: 15px; }
|
|
113
|
+
[data-design="sheet"] .pick-hint-tag { font: 700 13.5px/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line-strong); padding-bottom: 8px; }
|
|
114
|
+
[data-design="sheet"] .pick-hint-row { gap: 10px; color: var(--ink-2); flex-wrap: wrap; }
|
|
115
|
+
[data-design="sheet"] .pick-hint-row.is-on { color: var(--ink); font-weight: 600; }
|
|
116
|
+
[data-design="sheet"] .pick-hint .radio, [data-design="sheet"] .pick-hint .radio.is-on { width: 15px; height: 15px; border: 1.5px solid var(--ink); background: var(--surface); display: inline-grid; place-items: center; }
|
|
117
|
+
[data-design="sheet"] .pick-hint .radio.is-on { border-color: var(--sv-blue); }
|
|
118
|
+
[data-design="sheet"] .pick-hint .radio.is-on::after { content: ""; width: 7px; height: 7px; background: var(--sv-blue); border-radius: 50% !important; }
|
|
119
|
+
/* The picked repo sits under its option, as on the sheet Welcome's sketch */
|
|
120
|
+
[data-design="sheet"] .pick-hint-row.is-on { display: grid; grid-template-columns: 15px auto; justify-content: start; row-gap: 6px; }
|
|
121
|
+
[data-design="sheet"] .pick-hint-chip { grid-column: 2; justify-self: start; margin: 0; font: 400 13.5px var(--mono); color: var(--ink); background: var(--surface); border-color: var(--line-strong); padding: 2px 8px; }
|
|
122
|
+
[data-design="sheet"] .pick-hint figcaption { font-size: 14.5px; }
|
|
123
|
+
[data-design="sheet"] .connect-steps .field-label { font-size: 18px; font-weight: 700; line-height: 1.25; }
|
|
124
|
+
[data-design="sheet"] .pick-hint-chip .ic { color: var(--good); }
|
|
125
|
+
[data-design="sheet"] .remember { font-size: 15px; }
|
|
126
|
+
[data-design="sheet"] .connect-result { gap: 14px; }
|
|
127
|
+
[data-design="sheet"] .account-bar b { font-weight: 600; }
|
|
128
|
+
[data-design="sheet"] .account-text small { font-size: 14px; color: var(--ink-2); }
|
|
129
|
+
[data-design="sheet"] .gh-avatar { border: 1.5px solid var(--line-strong); background: var(--surface-2); }
|
|
130
|
+
[data-design="sheet"] .ability-list { gap: 8px; font-size: 15px; }
|
|
131
|
+
[data-design="sheet"] .ability-list li { align-items: flex-start; flex-wrap: wrap; gap: 4px 10px; }
|
|
132
|
+
[data-design="sheet"] .ability-list .ic { margin-top: 3px; color: var(--good); }
|
|
133
|
+
[data-design="sheet"] .ability-list .is-missing .ic { color: var(--bad); }
|
|
134
|
+
[data-design="sheet"] .picker-owner { font: 700 15px var(--font); color: var(--ink); margin: 0; }
|
|
135
|
+
[data-design="sheet"] .picker-owner .num { font: 600 14px var(--font); font-variant-numeric: tabular-nums; color: var(--ink-2); }
|
|
136
|
+
[data-design="sheet"] .picker .glist.card { border: 1.5px solid var(--frame); }
|
|
137
|
+
[data-design="sheet"] .picker .row-title { font-weight: 600; }
|
|
138
|
+
@media (max-width: 640px) {
|
|
139
|
+
[data-design="sheet"] .connect-steps > li { gap: 10px; }
|
|
140
|
+
[data-design="sheet"] .connect-row { flex-direction: column; align-items: stretch; }
|
|
141
|
+
[data-design="sheet"] .pick-hint { padding: 12px; }
|
|
142
|
+
[data-design="sheet"] .account-bar { flex-wrap: wrap; gap: 8px 12px; }
|
|
143
|
+
[data-design="sheet"] .account-text { flex: 1 1 160px; }
|
|
144
|
+
[data-design="sheet"] .account-text small { overflow-wrap: anywhere; }
|
|
145
|
+
[data-design="sheet"] .account-bar.is-compact .account-text { flex: 0 1 auto; }
|
|
146
|
+
[data-design="sheet"] .ability-list li > span:first-of-type { flex: 1 1 180px; }
|
|
147
|
+
[data-design="sheet"] .ability-list li > .pill { margin-left: 27px; }
|
|
148
|
+
[data-design="sheet"] .picker .row { gap: 8px 10px; padding: 10px 12px; }
|
|
149
|
+
[data-design="sheet"] .picker .row-text { flex: 1 1 0; }
|
|
150
|
+
[data-design="sheet"] .picker .row-sub { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
|
151
|
+
[data-design="sheet"] .picker .row-trail { margin-left: 42px; order: 3; flex: 1 1 100%; }
|
|
152
|
+
[data-design="sheet"] .picker .row-chev { margin-left: auto; }
|
|
153
|
+
}
|
|
154
|
+
`;document.getElementById("sv-connect-css")||document.head.appendChild(Object.assign(document.createElement("style"),{id:"sv-connect-css",textContent:K}));function L({src:t,size:i=36}){return t?e("img",{class:"gh-avatar",src:t.includes("?")?t:`${t}?s=${i*2}`,alt:"",width:i,height:i}):e("span",{class:"gh-avatar",style:{width:`${i}px`,height:`${i}px`},children:e(k,{name:"lock"})})}function F({info:t}){return e("div",{class:"abilities",children:[t.repos===0?e("div",{class:"note note-bad",role:"alert",children:[e(k,{name:"warn"}),e("span",{children:["This token reaches no repos. On GitHub's page, under",e("b",{children:" Repository access"}),", choose ",e("b",{children:"Only select repositories"})," and pick yours."]})]}):null,e("ul",{class:"ability-list","aria-label":"What the token can do",children:t.checks.map(i=>e("li",{class:i.ok===!1?"is-missing":"",children:[e(k,{name:i.ok===!1?"warn":i.ok?"check":"dot"}),e("span",{children:i.says}),i.ok===!1?e(v,{tone:"bad",icon:null,children:"missing"}):i.ok===null?e(v,{tone:"neutral",icon:null,children:"checked at setup"}):null]}))}),t.missing.length?e("div",{class:"note note-watch",children:[e(k,{name:"warn"}),e("span",{children:["Missing: ",t.missing.map(i=>i.says.toLowerCase()).join("; "),". Make a new token with everything ticked and paste it here.",e("span",{class:"note-act",children:e(u,{size:"sm",variant:"tinted",href:E(),external:!0,iconEnd:"external",children:"Make a new token"})})]})]}):null]})}var N=A(null);function D(t,i){let[p,g]=m(""),[f,l]=m(!1),[x,c]=m(null),[s,n]=m(null),d=async a=>{let o=a.match(j)?.[1];if(!o){c("That doesn't look like a GitHub token. It starts with github_pat_ (or ghp_ for a classic one).");return}l(!0),c(null),n(null);try{let r=await q(U(o),o);n(r),N.set(r),O({token:o,kind:S(o),login:r.login,avatar:r.avatar,...r.name?{name:r.name}:{},remember:t}),g(""),z(`Connected as ${r.login}`),!r.missing.length&&r.repos!==0&&i?.()}catch(r){c(r instanceof Error?r.message:"The check failed.")}l(!1)};return{text:p,busy:f,err:x,setErr:c,info:s,setInfo:n,check:d,onInput:a=>{g(a),c(null);let o=a.trim();o&&o.match(j)?.[1]===o&&d(o)}}}function ue(){let t=b(N),i=b(y);return t&&i&&i.login===t.login&&(t.missing.length||t.repos===0)?e(F,{info:t}):null}function fe({compact:t}){let i=b(y);return i?e("div",{class:"account-bar"+(t?" is-compact":""),children:[e(L,{src:i.avatar,size:t?28:36}),e("span",{class:"account-text",children:[e("b",{children:i.login||"Connected"}),e("small",{children:[i.kind==="app"?"Signed in with GitHub":i.kind==="fine"?"Fine-grained token":"Classic token",i.remember?", remembered on this device":", this tab only"]})]}),e(u,{size:"sm",variant:"plain",onClick:()=>{B(),z("Signed out of GitHub","neutral"),location.reload()},children:"Sign out"})]}):null}function me({app:t,onConnected:i}){let p=G(t),[g,f]=m(!1),{text:l,busy:x,err:c,info:s,setInfo:n,check:d,onInput:h}=D(g,i),a=async()=>{p&&location.assign(await $(p,g&&_(),location.hash||"#/"))},o=b(y);return T(()=>{o||n(null)},[o]),e("div",{class:"connect",children:[p?e(R,{children:[e(u,{variant:"filled",size:"lg",wide:!0,icon:"link",onClick:a,children:"Sign in with GitHub"}),e("p",{class:"connect-or",children:e("span",{children:"or use a token"})})]}):null,e("ol",{class:"connect-steps",children:[e("li",{children:[e("span",{class:"step-n","aria-hidden":"true",children:"1"}),e("div",{children:[e("b",{children:"Make a token on GitHub"}),e("p",{children:"The page opens with the name, a 90-day expiry and the permissions filled in."}),e(u,{variant:p?"tinted":"filled",href:E(),external:!0,iconEnd:"external",children:"Open GitHub's token page"}),e("figure",{class:"pick-hint","aria-label":"On GitHub's page: Repository access, Only select repositories, then pick yours",children:[e("span",{class:"pick-hint-tag","aria-hidden":"true",children:"What GitHub's page looks like"}),e("div",{class:"pick-hint-row",children:[e("span",{class:"radio"}),e("span",{children:"All repositories"})]}),e("div",{class:"pick-hint-row is-on",children:[e("span",{class:"radio is-on"}),e("span",{children:"Only select repositories"}),e("span",{class:"pick-hint-chip","aria-hidden":"true",children:[e(k,{name:"check"}),"owner/repo"]})]}),e("figcaption",{children:["On GitHub's page, under ",e("b",{children:"Repository access"}),", pick the repos; GitHub can't fill that in. Then ",e("b",{children:"Generate token"})," and copy it."]})]})]})]}),e("li",{children:[e("span",{class:"step-n","aria-hidden":"true",children:"2"}),e("div",{children:[e(M,{label:"Paste it here",error:c,hint:"Checked as soon as you paste. It goes only to api.github.com and stays in this browser.",children:r=>e("input",{id:r,class:"input mono",type:"password",autoComplete:"off",spellcheck:!1,placeholder:"github_pat_\u2026",value:l,onInput:C=>h(C.currentTarget.value),onKeyDown:C=>{C.key==="Enter"&&d(l)}})}),e("div",{class:"connect-row",children:[_()?e("label",{class:"remember",children:[e(W,{checked:g,onChange:f,labelledBy:"remember-l"}),e("span",{id:"remember-l",children:"Remember on this device"})]}):e("small",{class:"remember",children:["Kept for this tab only: other sites under ",location.hostname," could read a remembered token. Use a custom domain or ",e("code",{children:"stackvitals ui"})," to remember it."]}),e(u,{variant:"tinted",loading:x,disabled:!l.trim(),onClick:()=>d(l),children:"Check token"})]})]})]})]}),s&&o?e(H,{class:"connect-result",children:[e("div",{class:"account-bar",children:[e(L,{src:s.avatar}),e("span",{class:"account-text",children:[e("b",{children:s.login}),e("small",{children:s.repos===null?"Classic token: every repo you can reach":`${s.repos}${s.repos===100?"+":""} repo${s.repos===1?"":"s"} picked`})]}),s.missing.length?e(v,{tone:"watch",children:"Needs more"}):e(v,{tone:"good",children:"Ready"})]}),e(F,{info:s}),i?e(u,{variant:"filled",wide:!0,onClick:i,children:"Continue"}):null]}):null]})}export{E as a,L as b,F as c,N as d,D as e,ue as f,fe as g,me as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,c as d,u as o,w as e}from"./chunk-GT4EAKAO.js";import{d as u}from"./chunk-G7NGB5UX.js";u();function k({bars:r,kind:i="count",height:m=220,onPick:p,label:h}){let[t,b]=d(null),v=Math.max(1,...r.map(a=>a.value)),l=a=>{b(a),p?.(a)};return e("div",{class:"bars",role:"listbox","aria-label":h,tabIndex:0,style:{height:`${m}px`},"aria-activedescendant":t===null?void 0:`bar-${t}`,onKeyDown:a=>{if(a.key!=="ArrowLeft"&&a.key!=="ArrowRight")return;a.preventDefault();let n=a.key==="ArrowRight"?1:-1;l(t===null?n>0?0:r.length-1:Math.max(0,Math.min(r.length-1,t+n)))},onBlur:()=>l(null),onMouseLeave:()=>l(null),children:r.map((a,n)=>e("div",{id:`bar-${n}`,role:"option","aria-selected":t===n,class:"bar"+(t===n?" is-on":""),"aria-label":`${a.label}: ${o(i,a.value)}`,onMouseEnter:()=>l(n),onClick:()=>l(n),children:[e("span",{class:"bar-value num","aria-hidden":"true",children:o(i,a.value)}),e("span",{class:"bar-track","aria-hidden":"true",children:e("span",{class:`bar-fill tone-${a.tone||"accent"}`,style:{height:`${a.value/v*100}%`,transitionDelay:`${n*40}ms`}})}),e("span",{class:"bar-label","aria-hidden":"true",children:a.label.split("/").map((s,f)=>f?e(c,{children:["/",e("wbr",{}),s]}):s)})]}))})}export{k as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{d as l}from"./chunk-G7NGB5UX.js";l();var h=t=>typeof t=="string"&&/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(t)&&!t.split("/").some(n=>n==="."||n==="..");function p(t){if(!h(t))throw new Error(`"${String(t).slice(0,80)}" isn't a repo name (owner/name)`);return t.split("/").map(encodeURIComponent).join("/")}function d(t){if(typeof t!="string"||!/^[A-Za-z0-9_.-]+\.ya?ml$/.test(t))throw new Error(`"${String(t).slice(0,80)}" isn't a workflow file name`);return encodeURIComponent(t)}var k=t=>{var n;return(globalThis[n=Symbol.for("sv.signout")]??(globalThis[n]=new Set)).add(t)},a=null;function $(t,n){return`${t}:${/[\s"'\\]/.test(n)?JSON.stringify(n):n}`}function S(t=[],n={}){return{version:1,changes:t,settings:n}}function R(t,n=""){return`${n?n+`
|
|
2
|
+
|
|
3
|
+
`:""}Sent from the StackVitals app. The StackVitals workflow applies this when someone with access opens it, answers here and closes it.
|
|
4
|
+
|
|
5
|
+
\`\`\`stackvitals
|
|
6
|
+
${JSON.stringify(t)}
|
|
7
|
+
\`\`\`
|
|
8
|
+
`}function m(){if(a)return a;try{return sessionStorage.getItem("sv:token")}catch{return null}}function w(t,n=!1){a=t||null;try{t&&n?sessionStorage.setItem("sv:token",t):sessionStorage.removeItem("sv:token")}catch{}}k(()=>w(null));async function u(t,n={}){let e=await fetch(`https://api.github.com${t}`,{...n,headers:{Accept:"application/vnd.github+json",Authorization:`Bearer ${m()}`,"X-GitHub-Api-Version":"2022-11-28",...n.body?{"Content-Type":"application/json"}:{}}});if(!e.ok){let o=[401,403,404].includes(e.status);o&&w(null);let r=e.status===401?"the token was refused":o?"the token can't run this repo's workflows (it needs Actions: read and write on this repo)":e.status===422?"this repo's StackVitals workflow is older and takes no request; update it, or use the GitHub issue":`GitHub answered ${e.status}`;throw new Error(r)}return e.status===204?null:await e.json()}async function b(t,n){if(!t.links?.workflow)throw new Error("this page doesn't know the workflow's file name yet; use the GitHub issue instead");let e=p(t.repo),o=d(t.links.workflow),r=async()=>(await u(`/repos/${e}/actions/workflows/${o}/runs?event=workflow_dispatch&per_page=5`)).workflow_runs||[],f=Math.max(0,...(await r()).map(i=>i.id));await u(`/repos/${e}/actions/workflows/${o}/dispatches`,{method:"POST",body:JSON.stringify({ref:t.default_branch,inputs:{request:JSON.stringify(n)}})});for(let i=0;i<10;i++){await new Promise(s=>setTimeout(s,2e3));let c=(await r()).filter(s=>s.id>f).sort((s,g)=>s.id-g.id)[0];if(c)return c}return null}function x(t,n){return u(`/repos/${p(t.repo)}/actions/runs/${encodeURIComponent(n)}`)}function v(t){let n=t.repo.split("/")[0];return`https://github.com/settings/personal-access-tokens/new?name=${encodeURIComponent("StackVitals app")}&description=${encodeURIComponent(`Lets the StackVitals app start its workflow in ${t.repo}`)}&target_name=${encodeURIComponent(n)}&expires_in=30&actions=write`}export{$ as a,S as b,R as c,m as d,w as e,b as f,x as g,v as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as a}from"./chunk-GT4EAKAO.js";import{d as l}from"./chunk-G7NGB5UX.js";l();function h({title:t,note:e,action:i,children:d,class:r}){return a("div",{class:"blk-tbl"+(r?" "+r:""),children:[a("div",{class:"blk-tbl-h",children:[a("h3",{children:t}),e?a("span",{class:"blk-tbl-note",children:e}):null,i?a("span",{class:"blk-tbl-act",children:i}):null]}),d]})}function c({title:t,note:e}){return a("h3",{class:"blk-h",children:[t,e?a("span",{class:"blk-h-note",children:e}):null]})}function p({title:t,state:e,bar:i,children:d,class:r,tone:n}){return a("section",{class:"blk-panel"+(n?` blk-${n}`:"")+(r?" "+r:""),children:[a("div",{class:"blk-panel-h",children:[a("h3",{children:t}),e?a("span",{class:"blk-panel-state",children:e}):null]}),d?a("div",{class:"blk-panel-b",children:d}):null,i?a("div",{class:"blk-bar",role:"group",children:i}):null]})}function s({rows:t,class:e}){let i=t.filter(d=>!!d);return i.length?a("dl",{class:"blk-facts"+(e?" "+e:""),children:i.map(([d,r])=>a("div",{class:"blk-fact",children:[a("dt",{children:d}),a("dd",{children:r})]}))}):null}function o({tone:t,children:e}){return a("span",{class:`blk-mark blk-mark-${t}`,children:[a("i",{"aria-hidden":"true"}),e]})}function v({title:t,does:e,why:i,needs:d,children:r}){return a(p,{title:t,state:a(o,{tone:"neutral",children:"From your machine"}),class:"blk-machine",children:[a(s,{rows:[["What it does",e],["Why not in the app",i],["What it needs",d]]}),a("div",{class:"blk-machine-cmd",children:r})]})}export{h as a,c as b,p as c,s as d,o as e,v as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as g}from"./chunk-24LFKFZ6.js";import{a as f}from"./chunk-45PGAQRO.js";import{g as y}from"./chunk-4WKQTWUC.js";import{k as c,l as b,m,n as w,o as v,q as $,s as h}from"./chunk-GT4EAKAO.js";import{d as k}from"./chunk-G7NGB5UX.js";k();var _=t=>`${String(t.workflow||"?").split("/").pop()} / ${t.job}`;function A(t){let l=t?.weekly||[],r=s=>l.filter(e=>s(e)!==null&&s(e)!==void 0).map(e=>({label:h(e.week),value:s(e),n:e.job_runs}));return[{id:"first_try",name:"First-try green",sub:"Pushes green without a re-run",kind:"share",better:"up",period:"week",points:r(s=>s.first_try_share),meaning:s=>`${Math.round(s*100)} of every 100 pushes passed every check without a re-run.`,info:{title:"First-try green",body:"The share of pushes whose checks all passed without anyone re-running a job. Re-runs hide flaky tests; this number does not.",facts:t?.pushes?[["Pushes",String(t.pushes.pushes)],["Likely range",t.pushes.first_try_range?`${m(t.pushes.first_try_range[0])} to ${m(t.pushes.first_try_range[1])}`:"\u2013"]]:[],doc:"methods.md"}},{id:"flake_share",name:"Flaky job runs",sub:"Failed, then passed on the same code",kind:"percent",better:"down",period:"week",points:r(s=>s.flake_share),meaning:(s,e)=>`${s.toFixed(1)}% of ${e.n??"the"} job runs that week failed and then passed with no code change.`,info:{title:"Flaky job runs",body:"A flake is a job or test that failed and then passed on the same commit. This line is the share of job runs where that happened.",doc:"methods.md"}},{id:"push_median",name:"Time to green",sub:"Push until all checks finish",kind:"secs",better:"down",period:"week",points:r(s=>s.push_median_s),meaning:s=>`Half of all pushes had every check finished within ${b(s)}.`,info:{title:"Time to green",body:"The median time from a push until every check on it finished, by week.",doc:"methods.md"}},{id:"job_runs",name:"Job runs",sub:"CI jobs run each week",kind:"count",better:null,period:"week",points:r(s=>s.job_runs),meaning:s=>`${Math.round(s)} job runs that week.`,info:{title:"Job runs",body:"How many CI jobs ran each week, re-runs included. Neither up nor down is better; it shows how busy CI was."}}]}function x(t){let l=A(t.ci),r=[l[0],l[2]],s=t.flow?.monthly||[];r.push({id:"opened",name:"Pull requests opened",sub:"By month",kind:"count",better:null,period:"month",points:s.map(n=>({label:h(n.month),value:n.opened??0})),meaning:n=>`${Math.round(n)} pull requests opened that month.`}),r.push({id:"merged",name:"Pull requests merged",sub:"By month",kind:"count",better:"up",period:"month",points:s.filter(n=>n.merged!==void 0).map(n=>({label:h(n.month),value:n.merged})),meaning:n=>`${Math.round(n)} pull requests merged that month.`}),r.push({id:"deploys",name:"Deployments",sub:"To production, by month",kind:"count",better:"up",period:"month",points:(t.delivery?.dora?.monthly||[]).map(n=>({label:h(n.month),value:n.deployments})),meaning:n=>`${Math.round(n)} deployments that month.`,info:{title:"Deployments",body:"Deployments and releases StackVitals found, by month. DORA's deploy frequency is read from these.",doc:"dora-guide.md"}});let e=t.alerts?.series||{};return e.pickup_p75_hours&&r.push({id:"pickup",name:"Review pickup",sub:"3 in 4 reviews start within",kind:"hours",better:"down",period:"day",points:g(e.pickup_p75_hours),meaning:n=>`3 in 4 review requests were picked up within ${c(n)}.`,info:{title:"Review pickup",body:"Hours from a pull request asking for review until someone starts (75th percentile), day by day.",doc:"methods.md"}}),e.review_p75_hours&&r.push({id:"review",name:"Time in review",sub:"3 in 4 reviews finish within",kind:"hours",better:"down",period:"day",points:g(e.review_p75_hours),meaning:n=>`3 in 4 pull requests were approved within ${c(n)} of their first review.`}),r.push({id:"stars",name:"Stars",sub:"New stars by week",kind:"count",better:"up",period:"week",points:(t.community?.stars?.weeks||[]).map(([n,o])=>({label:h(n),value:o})),meaning:n=>`${Math.round(n)} new stars that week.`}),r.filter(n=>n.points.length>0)}function R(t,l){let r=[],s=t.decisions?.state||{};for(let e of t.ci?.tests||[])(e.state==="flaky"||e.state==="broken")&&!y(s[`test:${e.id}`])&&r.push({kind:"ci",tone:"bad",title:e.id,href:`#/ci/test/${encodeURIComponent(e.id)}`,what:`Test ${e.state==="flaky"?"is flaky":"keeps failing"}`,meta:`${e.flake_events||e.failures} of ${e.runs} runs${e.since?`, since ${v(e.since)}`:""}`,decide:{kind:"test",id:e.id,verbs:e.state==="flaky"?["quarantine","mute","acknowledge"]:["mute","quarantine","acknowledge"]},cmd:`/stackvitals ${e.state==="flaky"?"quarantine":"mute"} ${f("test",e.id)} because `});for(let e of t.ci?.jobs||[]){let n=_(e);e.state==="flaky"&&!y(s[`job:${n}`])&&r.push({kind:"ci",tone:"bad",title:n,href:`#/ci/job/${encodeURIComponent(n)}`,what:"Job is flaky",meta:`${e.flake_events} of ${e.runs} runs, ${Math.round(e.retry_minutes||0)} min lost to re-runs`,decide:{kind:"job",id:n,verbs:["mute","acknowledge"]},cmd:`/stackvitals mute ${f("job",n)} for 14d because `})}for(let e of t.delivery?.stuck?.hanging_review||[])r.push({kind:"prs",tone:"watch",title:`#${e.pr} waits for its review`,href:`https://github.com/${l.repo}/pull/${e.pr}`,external:!0,what:"Review not started",meta:`asked ${$(e.since)}`});for(let e of t.deps?.security_overdue||[])r.push({kind:"deps",tone:"bad",title:`${e.package} ${e.from||""} to ${e.to||""}`,href:`https://github.com/${l.repo}/pull/${e.pr}`,external:!0,what:"Security update waiting",meta:`#${e.pr}, open ${c(e.age_hours)}`,decide:{kind:"package",id:e.package,verbs:["accept"]},cmd:`/stackvitals accept ${f("package",e.package)} for 30d because `});for(let e of t.community?.waiting||[])r.push({kind:"community",tone:"watch",title:`${e.kind==="issue"?"Issue":"Pull request"} #${e.n}`,href:`https://github.com/${l.repo}/${e.kind==="issue"?"issues":"pull"}/${e.n}`,external:!0,what:"A newcomer waits for a first answer",meta:w(e.days,"day")});return r}var J={good:"Clear",ok:"Fair",bad:"Unsettled",off:"Not set up"},F={good:"sun",ok:"fair",bad:"rain",off:"off"};function M(t,l){let r=o=>l.filter(i=>i.kind===o).length,s=[],e=o=>s.push({...o,word:J[o.tone]}),n=t.ci;if(n){let o=[...n.tests||[],...n.jobs||[]],i=o.filter(p=>p.state==="flaky").length,d=o.filter(p=>p.state==="broken").length,a=n.pushes?.first_try_share,u=r("ci");e({id:"ci",name:"CI Health",tone:d||u?"bad":(a??0)>=.88&&!i?"good":"ok",value:a==null?"\u2013":m(a),trace:(n.weekly||[]).map(p=>p.first_try_share??0),note:`green on the first try over ${n.window_days??30} days; ${i} flaky, ${d} failing every run${n.pushes?`; ${w(n.pushes.pushes,"push","pushes")}`:"; too few pushes yet"}`,alarm:u?`${u} undecided`:null})}else e({id:"ci",name:"CI Health",tone:"off",value:"\u2013",note:"Add ci to the workflow's modules",trace:[]});if(t.flow){let o=r("prs");e({id:"prs",name:"Pull Requests",tone:o?"bad":t.flow.stale?"ok":"good",value:String(t.flow.open??"\u2013"),trace:(t.flow.monthly||[]).map(i=>i.opened??0),note:`open now; ${(t.flow.queue||[]).length} waiting on someone, ${t.flow.stale?`${t.flow.stale} stale`:"none stale"}`,alarm:o?`${o} ${o===1?"review":"reviews"} not started`:null})}else e({id:"prs",name:"Pull Requests",tone:"off",value:"\u2013",note:"Add flow to the workflow's modules",trace:[]});if(t.delivery){let o=t.delivery,i=o.phases?.pickup,d=o.dora?.change_failure_rate,a=(t.alerts?.series?.pickup_p75_hours||[]).map(u=>u[1]??0);e({id:"delivery",name:"Delivery",tone:d!=null&&d>.15?"bad":(o.dora?.deployments??0)>0?"good":"ok",value:String(o.dora?.deployments??0),trace:a.length?a:(o.dora?.monthly||[]).map(u=>u.deployments),note:`deployments in ${o.window_days??90} days; pickup ${i?.p75_h!==null&&i?.p75_h!==void 0?`3 in 4 within ${c(i.p75_h)}`:"not measured yet"}${i?.n!==void 0?` (n = ${i.n})`:""}${o.ai?.assisted_prs?.share!==null&&o.ai?.assisted_prs?.share!==void 0?`; ${m(o.ai.assisted_prs.share)} with AI help`:""}`})}else e({id:"delivery",name:"Delivery",tone:"off",value:"\u2013",note:"Add flow to the workflow's modules",trace:[]});if(t.community){let o=t.community,i=r("community");e({id:"community",name:"Community",tone:i>3?"bad":i?"ok":"good",value:String(o.waiting_total??0),trace:(o.stars?.weeks||[]).map(d=>d[1]),note:`newcomers waiting; ${o.stars?.stars??0} stars${o.score?`, score ${o.score.score}/100`:""}`,alarm:i?`${i} waiting`:null})}else e({id:"community",name:"Community",tone:"off",value:"\u2013",note:"Add community to the workflow's modules",trace:[]});if(t.deps||t.vulns){let o=r("deps"),i=t.deps,d=t.vulns?.open||[],a=d.filter(p=>p.malware||["critical","high"].includes(p.severity||"")).length,u=t.vulns?`${d.length} known ${d.length===1?"vulnerability":"vulnerabilities"}${a?`, ${a} serious`:""}`:"";e(i?{id:"deps",name:"Dependencies",tone:o||a?"bad":(i.open||[]).length?"ok":"good",value:String((i.open||[]).length),trace:[],note:`update PRs open${i.merge_median_hours!==null&&i.merge_median_hours!==void 0?`; merge in ${c(i.merge_median_hours)}`:""}${i.security_overdue?.length?"":"; no security update overdue"}${u?`; ${u}`:""}`,alarm:o?`${o} security overdue`:null}:{id:"deps",name:"Dependencies",tone:a?"bad":d.length?"ok":"good",value:String(d.length),trace:[],note:`known vulnerabilities${a?`; ${a} critical or high`:""}; no update bot history yet`,alarm:a?`${a} serious`:null})}else e({id:"deps",name:"Dependencies",tone:"off",value:"\u2013",note:"Add deps to the workflow's modules",trace:[]});if(t.portal){let o=t.portal.repos||[];e({id:"portal",name:"Portal",tone:"good",value:String(o.length),trace:[],note:`repos in the catalog; ${o.filter(i=>i.owners?.status==="valid").length} with valid owners, ${o.filter(i=>!i.score?.level).length} below bronze`})}return s}function P(t){let l=t.filter(e=>e.tone!=="off");if(!l.length)return"No readings yet";let r=l.filter(e=>e.tone==="bad").length,s=l.filter(e=>e.tone==="ok").length;return r===0&&s<=1?"Healthy":r<=1?"Mostly healthy":"Unsettled"}var T={red_ci:"ci",fix_job:"ci",fix_test:"ci",review_wait:"prs",stale_review:"prs",incident:"delivery",outsider_wait:"community",bump_red:"deps"};export{_ as a,A as b,x as c,R as d,F as e,M as f,P as g,T as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,f as k}from"./chunk-4WKQTWUC.js";import{f as y,g as $}from"./chunk-76WAVKUG.js";import{G as p,I as f,a as i,c as u,d as m,p as h,q as l,w as t,x as c,y as b,z as a}from"./chunk-GT4EAKAO.js";import{d as g}from"./chunk-G7NGB5UX.js";g();var D={ci:"CI Health",flow:"Pull Requests",delivery:"Delivery",insights:"Insights",community:"Community",portal:"Portal",alerts:"Alerts",deps:"Dependencies",supply:"Supply chain",vulns:"Vulnerabilities"};function w(e){let o=k(e);if(!e||!o)return{tone:"bad",when:null,title:"No run has written data yet"};if(e.run?.conclusion&&e.run.conclusion!=="success")return{tone:"bad",when:o,title:`The last run ${e.run.conclusion==="failure"?"failed":e.run.conclusion}`};let s=(Date.now()-h(o))/36e5;return s<6?{tone:"good",when:o,title:"Running on schedule"}:s<26?{tone:"watch",when:o,title:"Data is a few hours old"}:{tone:"bad",when:o,title:"Data is getting old"}}function A(e){return e?.visibility==="private"&&/\.github\.io$/.test(location.hostname)}function J(e){let[o,s]=u([]);return m(()=>{if(!e){s([]);return}v("settings.json").then(n=>s([...e.notes||[],...n?.notes||[]]))},[e]),o}function S({app:e,open:o,onClose:s}){let n=w(e),x=J(o?e:null);return t(p,{open:o,onClose:s,title:"Installation",description:e?.repo||"No repository data",footer:t(i,{children:[e?.links?.edit_settings?t(a,{variant:"plain",href:e.links.edit_settings,external:!0,icon:"settings",children:"Edit settings"}):null,e?.links?.actions?t(a,{variant:"filled",href:e.links.actions,external:!0,icon:"play",children:"Run it now"}):null]}),children:[t("div",{class:`health-top tone-${n.tone}`,children:[t("span",{class:"light",children:t(c,{name:n.tone==="good"?"check":n.tone==="watch"?"clock":"warn"})}),t("div",{children:[t("b",{children:n.title}),t("small",{children:[n.when?`Data written ${l(n.when)}`:"The first run of the StackVitals workflow writes it.",e?.run?.number?`, run #${e.run.number}`:"",e?.run?.next?`. Next ${l(e.run.next).replace(" ago","")}`:""]})]})]}),A(e)?t("div",{class:"note note-bad",role:"alert",children:[t(c,{name:"lock"}),t("span",{children:["This repo is private, but this page is on GitHub Pages, which is public on most plans. Turn Pages off and set ",t("code",{children:"pages: artifact"}),", or open it with ",t("code",{children:["stackvitals ui ",e?.repo]}),"."]})]}):null,x.map(r=>t("div",{class:"note note-watch",children:[t(c,{name:"warn"}),t("span",{children:r})]})),e?t(i,{children:[t("h3",{class:"sheet-h3",children:"Modules"}),t(y,{label:"Modules and when each wrote its data",children:Object.entries(e.modules||{}).map(([r,d])=>t($,{title:D[r]||r,subtitle:d.file,trailing:d.updated?t(f,{tone:(Date.now()-h(d.updated))/36e5<26?"good":"watch",children:l(d.updated)}):t(f,{tone:"neutral",children:"not yet"})}))}),t("dl",{class:"kv",children:[t("dt",{children:"Default branch"}),t("dd",{children:e.default_branch||"\u2013"}),t("dt",{children:"Visibility"}),t("dd",{children:e.visibility||"\u2013"}),e.links?.workflow?t(i,{children:[t("dt",{children:"Workflow"}),t("dd",{children:t("code",{children:e.links.workflow})})]}):null,e.links?.settings_file?t(i,{children:[t("dt",{children:"Settings"}),t("dd",{children:t("a",{href:b(e.links.settings_file),target:"_blank",rel:"noopener noreferrer",children:".github/stackvitals.toml"})})]}):null]})]}):null]})}function O({app:e}){let[o,s]=u(!1),n=w(e);return t(i,{children:[t("div",{class:`hstrip tone-${n.tone}`,children:[t("span",{class:`dot dot-${n.tone}`,"aria-hidden":"true"}),t("span",{class:"hstrip-text",children:[t("b",{children:[n.title,"."]})," ",n.when?`Data written ${l(n.when)}`:"Waiting for the first run",e?.default_branch?`, from ${e.default_branch}`:"","."]}),t(a,{size:"sm",variant:"tinted",onClick:()=>s(!0),children:"Installation"}),e?.links?.actions?t(a,{size:"sm",variant:"plain",href:e.links.actions,external:!0,icon:"play",children:"Run now"}):null]}),t(S,{app:e,open:o,onClose:()=>s(!1)})]})}function E({app:e}){let[o,s]=u(!1),n=w(e);return t(i,{children:[t("button",{type:"button",class:"side-health press",onClick:()=>s(!0),"aria-label":`Installation: ${n.title}. ${n.when?`Data written ${l(n.when)}`:""}`,children:[t("span",{class:`dot dot-${n.tone}`,"aria-hidden":"true"}),t("span",{children:[t("b",{children:n.when?`Updated ${l(n.when)}`:"No data yet"}),t("small",{children:n.title})]})]}),t(S,{app:e,open:o,onClose:()=>s(!1)})]})}export{w as a,O as b,E as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as h,g as j,s as l,v as T}from"./chunk-VQ5YXO54.js";import{c as d,d as f,h as w,i as u}from"./chunk-GT4EAKAO.js";import{d as k}from"./chunk-G7NGB5UX.js";k();var c=new Map;function a(e,n,t){let r=h(e)+"|"+n;return c.has(r)||c.set(r,j(e,n).then(s=>s===null?null:t(s))),c.get(r)}var D=e=>{try{return JSON.parse(e)}catch{return null}};function F(e,n){if(typeof n!="string")return n;let t=n.match(/^NOW([+-])(\d+)([mhd])$/);if(t){let r=+t[2]*{m:6e4,h:36e5,d:864e5}[t[3]]*(t[1]==="-"?-1:1),s=new Date(Date.now()+r).toISOString().replace(/\.\d+Z$/,"Z");return e==="until"||e==="oldest"||e==="newest"?s.slice(0,10):s}if(t=n.match(/^MON-(\d+)$/),t){let r=new Date;return r.setUTCDate(1),r.setUTCMonth(r.getUTCMonth()-+t[1]),r.toISOString().slice(0,7)}return n}var x=e=>e.kind==="pages"&&e.url.includes("demo/"),m=e=>x(e)?n=>{try{return JSON.parse(n,F)}catch{return null}}:D;function A(e){let n=e;if(!n||!n.packed)return e;for(let t of n.repos||[])t.score?.rows&&(t.score.results=t.score.rows.map(([r,s,o])=>({id:n.rule_index[r][0],level:n.rule_index[r][1],result:typeof s=="number"?n.result_codes[s]:s,evidence:n.evidence_index[o]})),delete t.score.rows);return e}var P=["data.json","flow.json","delivery.json","insights.json","community.json","portal.json","alerts.json","deps.json","supply.json","vulns.json","security.json"],_=["settings.json","portal.json"];async function b(e,n=l.get().source){if(P.includes(e)){let r=await a(n,"app.json",m(n));if(r&&!Object.values(r.modules||{}).some(s=>s.file===e))return null}let t=m(n);return x(n)&&_.includes(e)&&(e="../"+e),a(n,e,e.endsWith("portal.json")?r=>A(t(r)):t)}function v(e){return e.split(`
|
|
2
|
+
`).filter(n=>n.trim()).map(n=>{try{return JSON.parse(n)}catch{return null}}).filter(Boolean)}async function N(e,n=l.get().source){let t=await a(n,"app.json",m(n)),r=t&&t.summary===null?["../summary/"]:["summary/","../summary/"];for(let s of r){let o=await a(n,s+e+".jsonl",v);if(o)return o}return null}var g=w(0);function K(){c.clear(),g.set(e=>e+1)}function I(e){let n=u(l),t=u(g),r=n.id+t+JSON.stringify(e),[s,o]=d({key:"",data:{ready:!1}});return f(()=>{let S=!0,y=Object.keys(e);return Promise.all(y.map(p=>{let i=e[p];return i.startsWith("table:")?N(i.slice(6),n.source):b(i,n.source)})).then(p=>{if(!S)return;let i={ready:!0};y.forEach((O,J)=>{i[O]=p[J]??null}),o({key:r,data:i})}),()=>{S=!1}},[r]),s.key===r?s.data:{ready:!1}}function W(){let e=u(l),n=u(g),[t,r]=d(null);return f(()=>{let s=!0;return b("app.json",e.source).then(o=>{s&&(r({id:e.id,app:o}),o?.repo&&T(e.id,o.repo))}),()=>{s=!1}},[e.id,n]),t&&t.id===e.id?t.app:void 0}function Z(e){let n=Object.values(e?.modules||{}).map(t=>t.updated).filter(t=>!!t).map(t=>String(t).replace(" UTC","Z").replace(" ","T")).sort();return n.length?n[n.length-1]:null}var $=e=>!!e&&e.kind!=="setting"&&e.kind!=="golden"&&!["unmute","unquarantine","reopen","include","confirm","dispute"].includes(e.verb);export{b as a,N as b,K as c,I as d,W as e,Z as f,$ as g};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{f as N}from"./chunk-T7QVTNXF.js";import{a as C,b as m,d as S,e as A,f as O,g as q}from"./chunk-RPXHAG6F.js";import{d as x}from"./chunk-45PGAQRO.js";import{c as p,d as y,n as V}from"./chunk-VQ5YXO54.js";import{d as k}from"./chunk-G7NGB5UX.js";k();k();var F=["dates","map","teams"],v=/"(?:[^"\\]|\\.)*"|'[^']*'/g,L=/^\s*\[\[?\s*([^[\]]+?)\s*\]\]?\s*(#.*)?$/;function E(t,n){if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number")return String(t);if(typeof t=="string"){if(n==="dates"){if(!/^\d{4}-\d{2}-\d{2}$/.test(t))throw new Error(`"${t}" isn't a date like 2026-12-31.`);return t}return JSON.stringify(t)}if(Array.isArray(t))return"["+t.map(e=>E(e,"list")).join(", ")+"]";throw new Error(`${JSON.stringify(t)} can't be written as a setting.`)}var P=t=>{let n=t.replace(v,"").split("#")[0];return n.split("[").length-n.split("]").length};function Q(t){let n=[],e=0;return t.forEach((r,a)=>{let s=e===0?L.exec(r):null;if(s){n.push([s[1].replace(/ /g,""),a]);return}(e||/^\s*[\w"'.-]+\s*=/.test(r))&&(e=Math.max(e+P(r),0))}),n.map(([r,a],s)=>[r,a,s+1<n.length?n[s+1][1]:t.length])}function z(t){let n=t.replace(v,e=>" ".repeat(e.length)).indexOf("#");return n>=0?t.slice(n).trimEnd():""}var R=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function K(t,n,e,r){let a=new RegExp(`^\\s*(?:${R(r)}|"${R(r)}"|'${R(r)}')\\s*=`);for(let s=n;s<e;s++){if(!a.test(t[s]))continue;let o=s,l=P(t[s]);for(;l>0&&o+1<e;)o++,l+=P(t[o]);return[s,o+1]}return null}function W(t,n,e,r){let a=Q(t).find(([c])=>c===n);if(!a)return e===null?t:[...t,...t.length&&t[t.length-1].trim()?[""]:[],`[${n}]`,...e];let[,s,o]=a,l=o;for(;l>s+1&&!t[l-1].trim();)l--;if(r===null)return[...t.slice(0,s+1),...e||[],...t.slice(l)];let i=K(t,s+1,o,r);if(i){let c=e&&e.length===1&&i[1]-i[0]===1?z(t[i[0]]):"";return[...t.slice(0,i[0]),...c?[`${e[0]} ${c}`]:e||[],...t.slice(i[1])]}return e===null?t:[...t.slice(0,l),...e,...t.slice(l)]}function rt(t,n,e){let r=(t||"").replace(/\r\n/g,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`);r.length&&r[r.length-1]===""&&(r=r.slice(0,-1));for(let[a,s]of Object.entries(n)){let o=e[a];if(!o)throw new Error(`${a} is not a setting StackVitals knows.`);if(F.includes(o)){if(s!==null&&(typeof s!="object"||Array.isArray(s)))throw new Error(`${a} takes a table of entries.`);r=W(r,a,s===null?null:Object.entries(s).map(([l,i])=>`${JSON.stringify(l)} = ${E(i,o)}`),null)}else{let l=a.lastIndexOf("."),i=a.slice(l+1);r=W(r,a.slice(0,l),s===null?null:[`${i} = ${E(s,o)}`],i)}}return r.join(`
|
|
4
|
+
`).replace(/^\n+|\n+$/g,"")+`
|
|
5
|
+
`}function B(t){let n=t.replace(/\r\n/g,`
|
|
6
|
+
`).split(`
|
|
7
|
+
`),e=n.findIndex(i=>/^\s*(-\s+)?uses:\s*["']?[^"'\s]*(merge-scout|stackvitals)/i.test(i)&&!/\.github\/workflows\//.test(i));if(e<0)return null;let r=n[e].indexOf("uses:"),a=i=>i.length-i.trimStart().length,s=e;for(;s>0&&!/^\s*-\s/.test(n[s])&&(a(n[s-1])>=r||!n[s-1].trim());)s--;let o=e+1;for(;o<n.length&&(!n[o].trim()||n[o].trimStart().startsWith("#")||a(n[o])>=r);)o++;for(;o>e+1&&!n[o-1].trim();)o--;let l=n.findIndex((i,c)=>c>=s&&c<o&&a(i)===r&&/^\s*with:\s*(#.*)?$/.test(i));return{lines:n,at:e,col:r,withAt:l,end:o}}function G(t){if(t.withAt<0)return[];let n=[];for(let e=t.withAt+1;e<t.end;e++){let r=t.lines[e];if(!r.trim()||r.trimStart().startsWith("#"))continue;if(r.length-r.trimStart().length<=t.col)break;let a=/^\s+([\w-]+):\s*(.*)$/.exec(r);a&&n.push({key:a[1],line:e,value:a[2]})}return n}function X(t){let n=t.trim();if(n.startsWith('"'))try{return JSON.parse(n.slice(0,n.lastIndexOf('"')+1))}catch{return n}return n.startsWith("'")?n.slice(1,n.lastIndexOf("'")).replace(/''/g,"'"):n.replace(/\s+#.*$/,"")}function D(t){let n=B(t);return n?Object.fromEntries(G(n).map(e=>[e.key,/^[|>]/.test(e.value.trim())?"(several lines)":X(e.value)])):null}var H=t=>/^[\w.,/@+-]*$/.test(t)&&t!==""?t:JSON.stringify(t);function st(t,n){let e=B(t);if(!e)throw new Error("this workflow has no StackVitals step to edit.");let r=e.lines,a=" ".repeat(e.col);e.withAt<0&&(r.splice(e.at+1,0,`${a}with:`),e.withAt=e.at+1,e.end++);for(let[s,o]of Object.entries(n)){let l=G(e),i=l.find(u=>u.key===s),c=i?r[i.line].slice(0,r[i.line].length-r[i.line].trimStart().length):l[0]?" ".repeat(r[l[0].line].length-r[l[0].line].trimStart().length):a+" ";if(i&&/^[|>]/.test(i.value.trim()))throw new Error(`${s} spans several lines; change it on GitHub.`);if(i)o===null?(r.splice(i.line,1),e.end--):r[i.line]=`${c}${s}: ${H(o)}`;else if(o!==null){let u=l.length?l[l.length-1].line+1:e.withAt+1;r.splice(u,0,`${c}${s}: ${H(o)}`),e.end++}}return r.join(`
|
|
8
|
+
`)}var ht=".github/stackvitals.toml",Y=()=>V()||x(),$=async t=>C(await N(t)||x());async function Z(t){try{return(await t.get("/user"))?.login||"the app"}catch{return"the app"}}var tt=t=>typeof t.data=="object"&&t.data?.message?String(t.data.message):"",nt=t=>[403,409,422].includes(t.status)&&/protect|rule|pull request/i.test(tt(t));async function pt(t,n,e,r,a){let s=p(t.repo),o=a||await $(t),l=await o.get(`/repos/${s}`);if(!l)throw new Error(`the token can't see ${t.repo}.`);let i=l.default_branch||t.default_branch||"main",c=`/repos/${s}/contents/${O(n)}`,u=async d=>{let f=await o.get(`${c}?ref=${encodeURIComponent(d)}`);return{sha:f?.sha,text:f?A(f.content||""):""}},w=await Z(o),_=`chore(stackvitals): Update ${r} (asked from the StackVitals app by ${w})`;for(let d=0;;d++){let f=await u(i),U=e(f.text);if(U===f.text)return{kind:"same"};let g=await o.call("PUT",c,{message:_,content:S(U),branch:i,...f.sha?{sha:f.sha}:{}});if(g.ok)return{kind:"committed",url:g.data?.commit?.html_url};if(nt(g))break;if(!(g.status===409&&d===0))throw g.status===409?new Error(`${n} changed on GitHub while saving; try again.`):m(g,!0)}let h=`stackvitals/settings-${new Date().toISOString().replace(/\D/g,"").slice(0,14)}`,I=await o.get(`/repos/${s}/git/ref/heads/${O(i)}`);if(!I)throw new Error(`the branch ${i} wasn't found.`);let J=await o.call("POST",`/repos/${s}/git/refs`,{ref:`refs/heads/${h}`,sha:I.object.sha});if(!J.ok)throw m(J,!0);let b=await u(h),j=await o.call("PUT",c,{message:_,content:S(e(b.text)),branch:h,...b.sha?{sha:b.sha}:{}});if(!j.ok)throw m(j,!0);let T=await o.call("POST",`/repos/${s}/pulls`,{title:`Update StackVitals ${r} (asked from the StackVitals app)`,head:h,base:i,body:`A ${r} change asked from the StackVitals app by ${w}.`});return T.ok?{kind:"pr",url:T.data.html_url}:{kind:"compare",url:`https://github.com/${s}/compare/${encodeURIComponent(i)}...${encodeURIComponent(h)}?quick_pull=1`}}async function mt(t,n){if(!t.links?.workflow)throw new Error("this page doesn't know the workflow's file name yet; use the GitHub issue instead.");let e=p(t.repo),r=y(t.links.workflow),a=await $(t),s=async()=>(await a.get(`/repos/${e}/actions/workflows/${r}/runs?event=workflow_dispatch&per_page=5`))?.workflow_runs||[],o=Math.max(0,...(await s()).map(i=>i.id)),l=await a.call("POST",`/repos/${e}/actions/workflows/${r}/dispatches`,{ref:t.default_branch||"main",inputs:{request:JSON.stringify(n)}});if(!l.ok)throw l.status===422?new Error("this repo's StackVitals workflow is older and takes no request; update it, or use the GitHub issue."):m(l,!0);for(let i=0;i<10;i++){await q(2e3);let c=(await s()).filter(u=>u.id>o).sort((u,w)=>u.id-w.id)[0];if(c)return c}return null}var wt=async(t,n)=>(await $(t)).get(`/repos/${p(t.repo)}/actions/runs/${encodeURIComponent(n)}`);async function et(t){let n=t.default_branch||"main";try{if(!t.links?.workflow)return null;let e=p(t.repo),r=`.github/workflows/${y(t.links.workflow)}`;if(Y()){let s=await(await $(t)).get(`/repos/${e}/contents/${r}?ref=${encodeURIComponent(n)}`);return s?A(s.content):null}if(t.visibility==="private")return null;let a=await fetch(`https://raw.githubusercontent.com/${e}/${encodeURIComponent(n)}/${r}`,{cache:"no-cache"});return a.ok?await a.text():null}catch{return null}}async function dt(t){let n=await et(t);return n===null?null:D(n)}export{rt as a,H as b,st as c,ht as d,Y as e,nt as f,pt as g,mt as h,wt as i,et as j,dt as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r,f as m}from"./chunk-MAPYGK3P.js";import{h as n,j as o}from"./chunk-GT4EAKAO.js";import{d as s}from"./chunk-G7NGB5UX.js";s();var a=n(o.get("theme","light")==="dark"?"dark":"light"),l=n(o.get("calm",!1)),g=n(r(o.get("logo-def",null))),i=n(0);function u(e){a.set(e),o.set("theme",e);let t=document.documentElement;t.classList.add("is-theming"),t.dataset.theme=e,setTimeout(()=>t.classList.remove("is-theming"),400),requestAnimationFrame(()=>i.set(c=>c+1))}function h(e){l.set(e),o.set("calm",e),document.documentElement.classList.toggle("calm",e)}function L(e){g.set(e),o.set("logo",e.id),o.set("logo-def",e);let t=document.getElementById("favicon");t&&(t.href=m(e))}if(typeof matchMedia=="function")for(let e of["(prefers-color-scheme: dark)","(prefers-contrast: more)"])matchMedia(e).addEventListener("change",()=>i.set(t=>t+1));function x(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}export{a,l as b,g as c,i as d,u as e,h as f,L as g,x as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as I,h as O}from"./chunk-VWKSMFWJ.js";import{P as x,a as S,c as b,g as L,t as B,w as n,x as w,z as C}from"./chunk-GT4EAKAO.js";import{d as R}from"./chunk-G7NGB5UX.js";R();function z(r,l){let a=URL.createObjectURL(new Blob([l],{type:"text/csv"})),c=Object.assign(document.createElement("a"),{href:a,download:r});document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}var A=(r,l)=>{let a=r;return a.id??a.key??a.number??a.n??a.pr??a.name??l};function J({rows:r,columns:l,name:a="rows",empty:c,initialSort:U,limit:f=50,search:$=!0,caption:h}){let[v,j]=b(""),[s,F]=b(U||null),[y,T]=b({}),[p,E]=b(f),u=(e,t)=>e.raw?e.raw(t):t[e.key],d=L(()=>{let e=v.trim().toLowerCase(),t=(r||[]).filter(o=>(!e||l.some(i=>String(u(i,o)??"").toLowerCase().includes(e)))&&Object.entries(y).every(([i,g])=>!g||String(u(l.find(m=>m.key===i),o))===g));if(s){let o=l.find(i=>i.key===s.key);t=[...t].sort((i,g)=>{let m=u(o,i),k=u(o,g);return m===k?0:m==null?1:k==null?-1:(m<k?-1:1)*(s.desc?-1:1)})}return t},[r,v,s,y]);if(!r||!r.length)return n(S,{children:c||n(x,{title:"Nothing here yet."})});let M=e=>[...new Set(r.map(t=>String(u(e,t)??"")).filter(Boolean))].sort(),q=$&&r.length>6;return n("div",{class:"table-wrap card",children:[q?n("div",{class:"table-tools",children:[n("span",{class:"search-field",children:[n(w,{name:"search"}),n(I,{type:"search",value:v,onInput:j,placeholder:"Filter rows",label:`Filter ${h||"rows"}`})]}),l.filter(e=>e.filter).map(e=>n(O,{label:`Filter by ${e.label}`,value:y[e.key]||"",onChange:t=>T({...y,[e.key]:t}),options:[{value:"",label:`Any ${e.label.toLowerCase()}`},...M(e).map(t=>({value:t,label:t}))]})),n("span",{class:"table-count","aria-live":"polite",children:[d.length," of ",r.length]}),n(C,{size:"sm",variant:"plain",icon:"down",onClick:()=>z(`${a}.csv`,B(d,l)),children:"CSV"})]}):null,n("div",{class:"table-scroll",children:n("table",{class:"table",children:[h?n("caption",{class:"sr",children:h}):null,n("thead",{children:n("tr",{children:l.map(e=>n("th",{scope:"col",class:e.num?"is-num":"","aria-sort":s?.key===e.key?s.desc?"descending":"ascending":"none",children:n("button",{type:"button",class:"th-btn",onClick:()=>F({key:e.key,desc:s?.key===e.key?!s.desc:!!e.num}),children:[e.label,n(w,{name:s?.key===e.key?s.desc?"down":"up":"chev",class:s?.key===e.key?"is-on":""})]})}))})}),n("tbody",{children:d.slice(0,p).map((e,t)=>n("tr",{children:l.map(o=>n("td",{"data-label":o.label,class:(o.num?"is-num num":"")+(o.primary?" is-primary":"")+(o.nowrap?" is-nowrap":""),children:o.render?o.render(e):String(u(o,e)??"\u2013")}))},A(e,t)))})]})}),d.length>p?n("div",{class:"table-more",children:n(C,{variant:"plain",onClick:()=>E(p+f),children:["Show ",Math.min(f,d.length-p)," more of ",d.length-p]})}):null]})}export{J as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as g}from"./chunk-GT4EAKAO.js";import{d as p}from"./chunk-G7NGB5UX.js";p();function l(t){let e=(t||"#/").replace(/^#/,""),[r="",n=""]=e.split("?"),o=c=>{try{return decodeURIComponent(c)}catch{return c}},a=r.split("/").filter(Boolean).map(o),s=a[0]||"",i=u[s];return{page:i||s||"overview",rest:a.slice(1),query:new URLSearchParams(n),path:i?r.replace(s,i):r}}var u={home:"overview",integrations:"connections"},h=g(l(location.hash));addEventListener("hashchange",()=>{let t=h.get(),e=l(location.hash);h.set(e),(t.page!==e.page||t.rest.join("/")!==e.rest.join("/"))&&scrollTo({top:0})});function m(t,...e){return"#/"+[t==="overview"?"":t,...e.map(encodeURIComponent)].filter((r,n)=>n>0||r).join("/")}function R(t){location.hash=t.replace(/^#/,"")}function v(t,e,r){let n=new URLSearchParams(t.query);r===null?n.delete(e):n.set(e,r);let o=n.toString();return"#/"+t.path.replace(/^\//,"")+(o?"?"+o:"")}export{h as a,m as b,R as c,v as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,d as C,f as c,h,w as n,x as d}from"./chunk-GT4EAKAO.js";import{d as p}from"./chunk-G7NGB5UX.js";p();var m=h({title:"",compact:!1});function y({title:e,subtitle:t,toolbar:l,children:o,wide:r}){let s=c(null);return C(()=>{m.set({title:e,compact:!1});let i=s.current;if(!i||typeof IntersectionObserver!="function")return;let a=new IntersectionObserver(([v])=>m.set({title:e,compact:!v.isIntersecting}),{rootMargin:"-56px 0px 0px 0px"});return a.observe(i),()=>a.disconnect()},[e]),n("div",{class:"page"+(r?" page-wide":""),children:[n("header",{class:"page-head",children:[n("div",{class:"page-titles",children:[n("h1",{ref:s,class:"large-title",children:e}),t?n("p",{class:"page-sub",children:t}):null]}),l?n("div",{class:"page-tools",children:l}):null]}),o]})}var g=0;function k({title:e,description:t,action:l,info:o,children:r,id:s,class:i}){let a=c(s?`${s}-h`:`sec-${++g}`);return n("section",{class:"section"+(i?" "+i:""),id:s,"aria-labelledby":a.current,children:[n("div",{class:"section-head",children:[n("div",{class:"section-titles",children:[n("h2",{id:a.current,class:"section-title",children:[e,o]}),t?n("p",{class:"section-desc",children:t}):null]}),l?n("div",{class:"section-action",children:l}):null]}),n("div",{class:"section-body",children:r})]})}function I({children:e,ratio:t}){return n("div",{class:"columns"+(t==="lead"?" columns-lead":""),children:e})}function L({children:e,pad:t=!0,class:l,tone:o}){return n("div",{class:"card"+(t?" card-pad":"")+(o?` tone-${o}`:"")+(l?" "+l:""),children:e})}function R({children:e,label:t}){return n("ul",{class:"glist card","aria-label":t,children:e})}function P(e){let t=n(u,{children:[e.icon?n("span",{class:"row-icon",children:n(d,{name:e.icon})}):e.leading?n("span",{class:"row-lead",children:e.leading}):null,n("span",{class:"row-text",children:[n("span",{class:"row-title"+(e.mono?" mono":""),children:e.title}),e.subtitle?n("span",{class:"row-sub",children:e.subtitle}):null]}),e.trailing?n("span",{class:"row-trail",children:e.trailing}):null,e.href||e.onClick?n(d,{name:e.external?"external":"right",class:"row-chev"}):null]}),l="row"+(e.selected?" is-selected":"");return n("li",{class:"glist-item",children:[e.href?n("a",{class:l+" row-action press",href:e.href,"aria-label":e.label,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:t}):e.onClick?n("button",{type:"button",class:l+" row-action press","aria-label":e.label,"aria-pressed":e.selected,onClick:e.onClick,children:t}):n("div",{class:l,children:t}),e.detail?n("div",{class:"row-detail",children:e.detail}):null]})}function S({children:e}){return n("div",{class:"stats card",children:e})}function $({label:e,value:t,note:l,info:o}){return n("div",{class:"stat",children:[n("div",{class:"stat-label",children:[e,o]}),n("div",{class:"stat-value num",children:t}),l?n("div",{class:"stat-note",children:l}):null]})}export{m as a,y as b,k as c,I as d,L as e,R as f,P as g,S as h,$ as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as g,e as o}from"./chunk-S654BBEP.js";import{j as t}from"./chunk-GT4EAKAO.js";import{d as s}from"./chunk-G7NGB5UX.js";s();var u=n=>`settings-pending:${n}`,m=n=>t.get(u(n),null),f=(n,e)=>t.set(u(n),e);function P(n,e,l){return Object.entries(n.settings).every(([i,r])=>o(g(l,i),r===null?e.find(p=>p.key===i)?.default:r))}export{m as a,f as b,P as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N,b as W,e as X,f as Y}from"./chunk-6BDBXA6V.js";import{c as J}from"./chunk-4WKQTWUC.js";import{f as $,k as K,m as B,q as x,r as F,s as G,t as U,u as q}from"./chunk-VQ5YXO54.js";import{a as Z,b as j}from"./chunk-VWKSMFWJ.js";import{A as O,E as R,F as z,G as I,S as k,a as A,c as v,d as P,e as D,f as M,i as S,w as e,x as w}from"./chunk-GT4EAKAO.js";import{d as L}from"./chunk-G7NGB5UX.js";L();L();var ae=()=>typeof matchMedia=="function"&&matchMedia("(max-width: 640px)").matches;function Q(t){let{mounted:n,shown:a}=z(t.open),[o]=v(ae);return t.sheetOnPhone&&o?e(I,{open:t.open,onClose:t.onClose,title:t.label,size:"sm",children:t.children}):n?e(O,{children:e(se,{...t,shown:a})}):null}function se({open:t,onClose:n,anchor:a,label:o,children:s,align:d="end",width:r=320,shown:p}){let c=M(null),[i,oe]=v(null),H=M(n);H.current=n,D(()=>{let h=()=>{let m=a.current?.getBoundingClientRect();if(!m||!c.current)return;let C=c.current.offsetHeight,E=Math.min(r,innerWidth-16),l=8,u=innerHeight-m.bottom-l-8,g=m.top-l-8,y=C>u&&g>u,b=d==="end"?m.right-E:m.left;b=Math.max(8,Math.min(innerWidth-E-8,b)),oe({top:y?Math.max(8,m.top-l-Math.min(C,g)):m.bottom+l,left:b,up:y,maxH:Math.max(160,y?g:u)})};return h(),addEventListener("resize",h),addEventListener("scroll",h,!0),()=>{removeEventListener("resize",h),removeEventListener("scroll",h,!0)}},[]),P(()=>{let h=()=>c.current?.querySelector('[aria-checked="true"], [role^="menuitem"], '+R);(h()||c.current)?.focus({preventScroll:!0});let m=new MutationObserver(()=>{document.activeElement===c.current&&h()?.focus({preventScroll:!0})});c.current&&m.observe(c.current,{childList:!0,subtree:!0});let C=l=>{let u=l.target;!c.current?.contains(u)&&!a.current?.contains(u)&&H.current()},E=l=>{if(l.key==="Escape"){l.preventDefault(),H.current();return}if(l.key!=="Tab"||!c.current)return;let u=[...c.current.querySelectorAll(R+', [role^="menuitem"]')].filter(le=>le.offsetParent!==null);if(!u.length){l.preventDefault();return}let g=u[0],y=u[u.length-1],b=document.activeElement;l.shiftKey&&(b===g||b===c.current)?(l.preventDefault(),y.focus()):!l.shiftKey&&(b===y||!c.current.contains(b))&&(l.preventDefault(),g.focus())};return document.addEventListener("pointerdown",C,!0),document.addEventListener("keydown",E),()=>{m.disconnect(),document.removeEventListener("pointerdown",C,!0),document.removeEventListener("keydown",E);let l=document.activeElement;(!l||l===document.body||c.current?.contains(l))&&a.current?.focus({preventScroll:!0})}},[]);let re=i?{top:`${i.top}px`,left:`${i.left}px`,width:`${Math.min(r,innerWidth-16)}px`,maxHeight:`${i.maxH}px`}:{top:"-9999px",left:"0px",width:`${r}px`};return e("div",{ref:c,class:"popover"+(i?.up?" is-up":"")+(p&&t&&i?" is-open":"")+(d==="start"?" from-start":""),role:"dialog","aria-modal":"true","aria-label":o,tabIndex:-1,style:re,children:s})}function V({label:t,children:n}){return e("div",{role:"menu","aria-label":t,class:"menu",onKeyDown:o=>{let s=[...o.currentTarget.querySelectorAll('[role^="menuitem"]:not([disabled])')],d=s.indexOf(document.activeElement),r=p=>{o.preventDefault(),s[(p+s.length)%s.length]?.focus()};o.key==="ArrowDown"?r(d+1):o.key==="ArrowUp"?r(d-1):o.key==="Home"?r(0):o.key==="End"&&r(s.length-1)},children:n})}function f({icon:t,leading:n,title:a,subtitle:o,checked:s,onSelect:d,trailing:r,danger:p}){return e("button",{type:"button",role:s===void 0?"menuitem":"menuitemradio","aria-checked":s,tabIndex:-1,class:"menu-item press"+(p?" is-danger":""),onClick:d,children:[t?e("span",{class:"menu-icon",children:e(w,{name:t})}):n,e("span",{class:"menu-text",children:[e("b",{children:a}),o?e("small",{children:o}):null]}),r,s?e(w,{name:"check",class:"menu-check"}):null]})}function _({children:t}){return e("div",{class:"menu-label",role:"presentation",children:t})}function T(){return e("div",{class:"menu-sep",role:"separator"})}var ee=[212,152,32,280,350,190,100,0];function te({label:t,size:n=28}){let a=t.split("/").pop()||t,o=0;for(let s of t)o=o*31+s.charCodeAt(0)>>>0;return e("span",{class:"repo-av","aria-hidden":"true",style:{width:`${n}px`,height:`${n}px`,fontSize:`${Math.round(n*.46)}px`,"--hue":String(ee[o%ee.length])},children:a.replace(/[^A-Za-z0-9]/g,"")[0]?.toUpperCase()||"?"})}function ce(){let t=S(N),n=S(W);return e("div",{class:"appearance",children:[e("div",{class:"pref-row",children:[e("span",{id:"pref-theme",children:"Theme"}),e(Z,{size:"sm",label:"Theme",value:t,onChange:X,options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"}]})]}),e("div",{class:"pref-row",children:[e("span",{id:"pref-calm",children:"Reduce motion"}),e(j,{checked:n,onChange:Y,labelledBy:"pref-calm"})]})]})}var ne=null;function ue({open:t,onClose:n}){let[a,o]=v(null);return P(()=>{t&&!a&&(ne||(ne=import("./AddRepo-KRPZXWCY.js"))).then(o)},[t]),a?e(a.AddRepoSheet,{open:t,onClose:n}):null}function He(){let[t,n]=v(!1),[a,o]=v(!1),s=M(null),d=S(F),r=S(G),p=S(K),c=i=>{n(!1),i.id!==r.id&&(U(i),k(`Showing ${i.label}`,"neutral"))};return e(A,{children:[e("button",{ref:s,type:"button",class:"profile press","aria-haspopup":"dialog","aria-expanded":t,onClick:()=>n(!t),"aria-label":`Repository ${r.label}. Switch repository or change appearance`,children:[e(te,{label:r.label}),e("span",{class:"profile-name",children:r.label}),e(w,{name:"chev",class:"profile-chev"})]}),e(Q,{open:t,onClose:()=>n(!1),anchor:s,label:"Repositories and appearance",width:360,sheetOnPhone:!0,children:[e(V,{label:"Repositories",children:[e(_,{children:x?"Demo repositories":"Your repositories"}),d.map(i=>e(f,{leading:e(te,{label:i.label,size:34}),title:i.label,subtitle:i.demo?"Example repo with demo data":$(i.source),checked:i.id===r.id,onSelect:()=>c(i)})),e(T,{}),x?null:e(f,{icon:"plus",title:"Add a repository",subtitle:"By name or Pages address",onSelect:()=>{n(!1),o(!0)}}),x?null:e(f,{icon:"link",title:p?"Your GitHub repos":"Connect GitHub",subtitle:p?`Signed in as ${p.login||"you"}; set up in a few clicks`:"Open private repos and set up in a few clicks once GitHub is connected",onSelect:()=>{n(!1),location.hash="#/setup?pick=1"}}),p?e(f,{icon:"left",title:"Sign out of GitHub",subtitle:"Forgets the token in this browser",onSelect:()=>{n(!1),B(),location.reload()}}):null,e(f,{icon:"refresh",title:"Reload the data",subtitle:"Fetch every file again",onSelect:()=>{J(),n(!1),k("Data reloaded")}}),x?e(f,{icon:"left",title:"Leave the demo",onSelect:()=>{location.href=location.pathname}}):e(f,{icon:"play",title:"Try the demo",subtitle:"Three example repos with full data",onSelect:()=>{location.href=location.pathname+"?demo=1"}}),!x&&r.id!=="here"?e(f,{icon:"trash",title:`Forget ${r.label}`,danger:!0,onSelect:()=>{n(!1),q(r.id),k("Removed from your list","neutral")}}):null]}),e(T,{}),e(ce,{})]}),e(ue,{open:a,onClose:()=>o(!1)})]})}export{Q as a,te as b,ce as c,He as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as f,S as r,w as u}from"./chunk-GT4EAKAO.js";import{d as s}from"./chunk-G7NGB5UX.js";s();var c="The file is too long for a GitHub link: it's copied; paste it into GitHub's editor (Ctrl+V or Cmd+V), then commit.",d="The request is too long for a GitHub link: it's copied; paste it into the issue's description (Ctrl+V or Cmd+V), then submit.",g="The file is too long for a GitHub link, so this button copies it first: paste it into GitHub's editor (Ctrl+V or Cmd+V), then commit.",h="The request is too long for a GitHub link, so this button copies it first: paste it into the issue's description (Ctrl+V or Cmd+V), then submit.",a=t=>encodeURIComponent(t).replace(/%20/g,"+");function m(t,e,i,n,o=n){let l=`https://github.com/${t}/new/${encodeURIComponent(e)}?filename=${a(i)}`,p=`${l}&value=${a(n)}`;return p.length<=4e3?{url:p,kind:"file",paste:null}:{url:l,kind:"file",paste:o}}function _(t,e,i){let n=`https://github.com/${t}/issues/new?title=${encodeURIComponent(e.slice(0,200))}`,o=`${n}&body=${encodeURIComponent(i)}`;return o.length<=4e3?{url:o,kind:"issue",paste:null}:{url:n,kind:"issue",paste:i}}s();function k(t,e){return()=>{if(!t.paste){r(e);return}f(t.paste).then(i=>r(i?t.kind==="file"?c:d:t.kind==="file"?"Copy failed: use Copy the file on this page, then paste it into GitHub's editor.":"Copy failed: try again, or apply it with a token.",i?"good":"bad"))}}function C({link:t}){return t?.paste?u("p",{class:"field-hint paste-note",children:t.kind==="file"?g:h}):null}export{g as a,m as b,_ as c,k as d,C as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk-6RLVD2DT.js";import{e as m}from"./chunk-76WAVKUG.js";import{I as c,P as p,m as o,w as t}from"./chunk-GT4EAKAO.js";import{d as u}from"./chunk-G7NGB5UX.js";u();function h({title:i,note:a,action:n,children:r}){return t("div",{class:"ci-tbl",children:[t("div",{class:"ci-tbl-h",children:[t("h3",{children:i}),a?t("span",{class:"ci-tbl-note",children:a}):null,n?t("span",{class:"ci-tbl-act",children:n}):null]}),r]})}function y({title:i,state:a,bar:n,children:r,class:s}){return t("section",{class:"ci-panel"+(s?" "+s:""),children:[t("div",{class:"ci-panel-h",children:[t("h3",{children:i}),a?t("span",{class:"ci-panel-state",children:a}):null]}),r?t("div",{class:"ci-panel-b",children:r}):null,n?t("div",{class:"ci-bar",role:"group","aria-label":`${i}: actions`,children:n}):null]})}function v({rows:i}){return t("dl",{class:"ci-facts",children:i.filter(a=>!!a).map(([a,n])=>t("div",{class:"ci-fact",children:[t("dt",{children:a}),t("dd",{children:n})]}))})}function F({changes:i}){let a=i.filter(e=>!e.note&&!e.shown_with);if(!a.length)return t(m,{children:t(p,{icon:"clock",title:"Too few runs this week to compare.",children:"This week is set against the four weeks before once there are enough runs."})});let n=(e,l,b)=>l==null?"\u2013":e.unit==="share"?o(l):e.unit==="count"?`${l}${b?" a week":""}`:`${(+l).toFixed(1)} ${e.unit}`,r=e=>e.detectable?e.unit==="share"?`${Math.round(e.detectable*100)} points`:`${e.detectable>=3?Math.round(e.detectable):e.detectable.toFixed(1)}\xD7`:"\u2013",s=a.map((e,l)=>({id:e.metric||String(l),c:e}));return t(h,{title:"This week against the four before",note:"As the weekly digest reads it.",children:t(d,{name:"this-week",caption:"This week against the four weeks before",search:!1,rows:s,columns:[{key:"label",label:"Measure",primary:!0,raw:e=>e.c.label,render:e=>t("span",{class:"ci-cap",children:e.c.label})},{key:"now",label:"This week",num:!0,raw:e=>e.c.now,render:e=>n(e.c,e.c.now)},{key:"base",label:"Four weeks before",num:!0,raw:e=>e.c.base,render:e=>n(e.c,e.c.base,!0)},{key:"moved",label:"Moved",raw:e=>e.c.changed?e.c.direction||"moved":"steady",render:e=>e.c.changed?t(c,{tone:"watch",icon:e.c.direction==="up"?"up":"down",children:e.c.direction==="up"?"Rose":"Fell"}):t(c,{tone:"neutral",icon:null,children:"Steady within noise"})},{key:"detectable",label:"Smallest change it would catch",raw:e=>e.c.detectable??null,render:e=>r(e.c)}]})})}function $({fb:i}){let a=Object.entries(i).map(([n,r])=>({state:n,...r}));return t(h,{title:"Confirmed and disputed calls",note:"From your team's /stackvitals confirm and dispute commands.",children:t(d,{name:"verdict-feedback",caption:"Verdict feedback",search:!1,rows:a,columns:[{key:"state",label:"What it said",primary:!0,render:n=>t("span",{class:"ci-cap",children:n.state==="unknown"?"not in the findings":n.state})},{key:"confirmed",label:"Confirmed",num:!0},{key:"disputed",label:"Disputed",num:!0},{key:"share",label:"Right",num:!0,render:n=>o(n.share)},{key:"range",label:"Likely range",raw:n=>n.low,render:n=>`${o(n.low)} to ${o(n.high)}`}]})})}function x(i){let a=document.getElementById(i);a&&a.scrollIntoView({behavior:matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"start"})}export{h as a,y as b,v as c,F as d,$ as e,x as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N}from"./chunk-S2ZBMEVA.js";import{d as J,e as K}from"./chunk-ASYNLVOP.js";import{a as E,b as O,d as P,e as V,f as G,g as H,h as L}from"./chunk-45PGAQRO.js";import{a as z,d as R,e as D,f as U,h as W}from"./chunk-VWKSMFWJ.js";import{G as B,N as F,O as T,S as _,a as b,c as r,w as t,x as q,z as S}from"./chunk-GT4EAKAO.js";import{d as I}from"./chunk-G7NGB5UX.js";I();var Q={quarantine:"Quarantine: your test command passes while only it fails",unquarantine:"Keep out of quarantine (it blocks)",mute:"Mute: measured, but no alert or new issue",unmute:"Unmute",acknowledge:"Acknowledge: the team lives with it",snooze:"Snooze: off the list for a while",reopen:"Reopen",exclude:"Leave out of the numbers",include:"Count it again",accept:"Accept the risk until a date",confirm:"StackVitals got this right",dispute:"StackVitals got this wrong (say why)"},A={quarantine:30,mute:30,snooze:14,accept:30},M=e=>new Date(Date.now()+e*864e5).toISOString().slice(0,10);function X(e,s,i,l,p,u){let m=A[i]!==void 0,n=m?l==="date"?p||null:M(Number(l)):null,d=O([{verb:i,kind:e,id:s,until:n,reason:u}]),a=`/stackvitals ${i} ${E(e,s)}${n?` until ${n}`:""}${u?` because ${u}`:""}`;return{lasts:m,end:n,req:d,snippet:a,title:`StackVitals: ${i} ${e} ${s}`.slice(0,120)}}var Y={who:"anyone with triage or write access to this repo",lands:"the decisions log in the stackvitals-data branch, shown on every page",when:"as soon as the workflow has run (a minute or two)"};function Z({app:e,title:s,req:i,snippet:l,who:p,lands:u,when:m}){let[n,d]=r("choose"),[a,h]=r(null),[x,k]=r(""),[v,y]=r(""),g=N(e,s,i),f=async()=>{if(!P()){d("token");return}d("sending");try{let o=await G(e,i);h(o),d("sent"),_("The StackVitals workflow started");for(let C=0;o&&C<60&&o.status!=="completed";C++)await new Promise($=>setTimeout($,5e3)),o=await H(e,o.id),h(o)}catch(o){k(o.message),d("error")}};return t("div",{class:"send",children:[t("dl",{class:"kv",children:[p?t(b,{children:[t("dt",{children:"Who can"}),t("dd",{children:p})]}):null,u?t(b,{children:[t("dt",{children:"Where it lands"}),t("dd",{children:u})]}):null,m?t(b,{children:[t("dt",{children:"When"}),t("dd",{children:m})]}):null]}),t("div",{class:"send-actions",children:[g?t(S,{variant:"filled",href:g.url,external:!0,icon:"external",onClick:J(g,"Opened on GitHub: press Submit there"),children:"Open the request on GitHub"}):null,t(S,{variant:"tinted",icon:"bolt",loading:n==="sending",onClick:f,children:"Apply now with my token"}),l?t(F,{text:l,label:"Copy as a comment"}):null]}),t(K,{link:g}),n==="token"?t("div",{class:"card card-pad token-box",children:[t("p",{children:["Paste a fine-grained token for ",t("b",{children:e.repo})," with ",t("b",{children:"Actions: read and write"})," only. ",t("a",{href:L(e),target:"_blank",rel:"noopener noreferrer",children:"Create one"})," (30 days). It stays in this tab and goes only to api.github.com."]}),t("div",{class:"inline-form",children:[t(D,{type:"password",mono:!0,value:v,onInput:o=>y(o.trim()),placeholder:"github_pat_\u2026",label:"Fine-grained GitHub token"}),t(S,{variant:"filled",disabled:!v,onClick:()=>{V(v,!0),y(""),f()},children:"Use it and apply"})]})]}):null,t("div",{role:"status",children:n==="sent"?t("p",{class:"note note-good",children:[t(q,{name:"check"}),t("span",{children:a?t(b,{children:["Run ",t("a",{href:a.html_url,target:"_blank",rel:"noopener noreferrer",children:["#",a.run_number]}),": ",a.status==="completed"?`finished (${a.conclusion}). Reload to see the change.`:`${a.status}\u2026`]}):"The workflow started; it shows in the Actions tab in a moment."})]}):null}),t("div",{role:"alert",children:n==="error"?t("p",{class:"note note-bad",children:[t(q,{name:"warn"}),t("span",{children:["Not sent: ",x,". The GitHub issue works without a token."]})]}):null})]})}function dt({app:e,kind:s,id:i,verbs:l,label:p="Decide",size:u="sm"}){let[m,n]=r(!1),[d,a]=r(l[0]),[h,x]=r(String(A[l[0]]||0)),[k,v]=r(""),[y,g]=r(""),{lasts:f,req:o,snippet:C,title:$}=X(s,i,d,h,k,y);return t(b,{children:[t(S,{size:u,variant:"tinted",onClick:()=>n(!0),haspopup:"dialog",children:p}),t(B,{open:m,onClose:()=>n(!1),title:p,description:t("span",{class:"mono-soft",children:[s,": ",i]}),size:"md",children:[t("div",{class:"form",children:[t(R,{label:"What to do",children:c=>t(W,{id:c,value:d,onChange:w=>{a(w),x(String(A[w]||0))},options:l.map(w=>({value:w,label:Q[w]||w}))})}),f?t("div",{class:"field",children:[t("span",{class:"field-label",id:"dec-len",children:"For how long"}),t(z,{label:"For how long",value:h,onChange:x,scroll:!0,options:[...["7","14","30","90"].map(c=>({value:c,label:`${c} days`})),{value:"date",label:"Until a date"}]})]}):null,f&&h==="date"?t(R,{label:"Until",children:c=>t(U,{id:c,value:k,min:M(1),onInput:v})}):null,t(R,{label:"Why",hint:"Kept in the decisions log.",children:c=>t(D,{id:c,value:y,onInput:g,maxLength:200,placeholder:"A short reason"})})]}),f&&h==="date"&&!k?t("p",{class:"field-hint",children:"Pick the date it ends, then send it."}):t(Z,{app:e,title:$,req:o,snippet:C,...Y})]})]})}function ut({list:e}){return t("div",{class:"commands",children:e.map(s=>t(T,{inline:!0,code:s.text,note:s.note}))})}export{Q as a,A as b,M as c,X as d,Y as e,Z as f,dt as g,ut as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.create;var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var j=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(l,a)=>(typeof require<"u"?require:l)[a]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var b=(e,l,a)=>()=>{if(a)throw a[0];try{return e&&(l=e(e=0)),l}catch(c){throw a=[c],c}};var k=(e,l)=>()=>{try{return l||e((l={exports:{}}).exports,l),l.exports}catch(a){throw l=0,a}};var f=(e,l,a,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let d of t(l))!I.call(e,d)&&d!==a&&i(e,d,{get:()=>l[d],enumerable:!(c=r(l,d))||c.enumerable});return e};var m=(e,l,a)=>(a=e!=null?n(y(e)):{},f(l||!e||!e.__esModule?i(a,"default",{value:e,enumerable:!0}):a,e));var q,h=b(()=>{q={relay:"",clientId:""}});export{j as a,k as b,m as c,h as d,q as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as B}from"./chunk-PABICGBL.js";import{b as z,d as F,e as G}from"./chunk-ASYNLVOP.js";import{f as y}from"./chunk-T7QVTNXF.js";import{a as H}from"./chunk-RPXHAG6F.js";import{d as c}from"./chunk-45PGAQRO.js";import{k as C}from"./chunk-VQ5YXO54.js";import{N as x,O as v,S as w,a as u,c as s,i as h,w as t,x as g,z as d}from"./chunk-GT4EAKAO.js";import{d as k}from"./chunk-G7NGB5UX.js";k();function V({title:n,note:e,action:a,children:i}){return t("div",{class:"blk-tbl",children:[t("div",{class:"blk-tbl-h",children:[t("h3",{children:n}),e?t("span",{class:"blk-tbl-note",children:e}):null,a?t("span",{class:"blk-tbl-act",children:a}):null]}),i]})}function X({title:n,state:e,bar:a,children:i,class:r}){return t("section",{class:"blk-panel"+(r?" "+r:""),children:[t("div",{class:"blk-panel-h",children:[t("h3",{children:n}),e?t("span",{class:"blk-panel-state",children:e}):null]}),i?t("div",{class:"blk-panel-b",children:i}):null,a?t("div",{class:"blk-bar",role:"group","aria-label":`${n}: actions`,children:a}):null]})}function Y({rows:n,class:e}){return t("dl",{class:"blk-facts"+(e?" "+e:""),children:n.filter(a=>!!a).map(([a,i])=>t("div",{class:"blk-fact",children:[t("dt",{children:a}),t("dd",{children:i})]}))})}function Z({app:n,f:e,needs:a}){let[i,r]=s("idle"),[p,P]=s(null),[q,A]=s(""),b=n.default_branch||"main",o=z(n.repo,b,e.file,e.content),m=!!(h(C)?.token||c()),$=async()=>{r("busy");try{let l=await y(n)||c();if(!l)throw new Error("connect GitHub first");let f=await B(H(l),{repo:n.repo,base:b,branch:e.branch,file:e.file,content:e.content,message:e.message,title:e.title,body:e.body});P(f),r("done"),w(`Pull request #${f.number} opened`)}catch(l){A(l instanceof Error?l.message:"GitHub refused it"),r("error")}};return t(u,{children:[t(v,{title:e.file,code:e.content}),t("div",{class:"blk-bar blk-bar-flat",role:"group","aria-label":"Add the file",children:[t(d,{variant:"filled",href:o.url,external:!0,icon:"external",onClick:F(o,"Opened on GitHub: press Commit changes there"),children:"Open on GitHub as a new file"}),m?t(d,{variant:"tinted",icon:"bolt",loading:i==="busy",onClick:$,children:"Open a pull request"}):t(d,{variant:"plain",href:"#/settings?module=account",iconEnd:"right",children:"Connect GitHub to open a pull request"}),t(x,{text:e.content,label:"Copy the file"})]}),t(G,{link:o}),t("p",{class:"blk-how",children:["GitHub's editor opens ",o.paste?"on the new file":"with the file filled in"," on ",b,"; nothing is saved until you press Commit changes there.",m?` Open a pull request puts it on a ${e.branch} branch with your GitHub sign-in or token, which needs ${a}.`:` With GitHub connected, one click opens it as a pull request instead (the token needs ${a}).`]}),t("div",{role:"status",children:i==="done"&&p?t("p",{class:"note note-good",children:[t(g,{name:"check"}),t("span",{children:["Pull request ",t("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",children:["#",p.number]})," is open: merge it to turn this on."]})]}):null}),t("div",{role:"alert",children:i==="error"?t("p",{class:"note note-bad",children:[t(g,{name:"warn"}),t("span",{children:["Not opened: ",q,". The GitHub editor link works without a token."]})]}):null})]})}export{V as a,X as b,Y as c,Z as d};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import{d as p}from"./chunk-G7NGB5UX.js";p();var m="stackvitals/stackvitals@v0",f=".github/workflows/stackvitals.yml",l=["ci","flow","deps","community"],g=`name: StackVitals
|
|
2
|
+
on:
|
|
3
|
+
workflow_run:
|
|
4
|
+
workflows: {names} # your CI workflows; each finished run is read right away
|
|
5
|
+
types: [completed]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "17 */3 * * *" # Team Flow every 3 hours, and a CI catch-up
|
|
8
|
+
repository_dispatch:
|
|
9
|
+
types: [stackvitals-deployment, stackvitals-incident] # sent by \`stackvitals record\` from any deploy tool
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
request:
|
|
13
|
+
description: "A change sent from the StackVitals app (leave empty for a normal run)"
|
|
14
|
+
required: false
|
|
15
|
+
default: ""
|
|
16
|
+
push: # your settings file applies at once; adding this file starts the first run
|
|
17
|
+
paths: [".github/stackvitals.toml", ".github/workflows/stackvitals.yml"]
|
|
18
|
+
issues:
|
|
19
|
+
types: [opened, closed, reopened] # requests from the app; flaky-test issues closed as not planned, or reopened
|
|
20
|
+
issue_comment:
|
|
21
|
+
types: [created] # /stackvitals commands
|
|
22
|
+
pull_request: # the dependency check, only when a lockfile changes (never runs the PR's code)
|
|
23
|
+
paths: ["**/*.lock", "**/*lock.json", "**/*lock.yaml", "**/npm-shrinkwrap.json", "**/requirements*.txt", "**/go.mod",
|
|
24
|
+
"**/*.lockfile", "**/pom.xml", "**/pylock*.toml", "**/Package.resolved", "**/gems.locked",
|
|
25
|
+
"**/verification-metadata.xml", "**/*.freeze"]
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write # saves history to the stackvitals-data branch; settings changes asked for from the app
|
|
28
|
+
actions: read # reads your CI runs, jobs and test reports (write: [automation] rerun_flaky re-runs known flakes)
|
|
29
|
+
checks: read # Team Flow: sees which PRs have failing checks (write: [automation] verdict_check)
|
|
30
|
+
statuses: read
|
|
31
|
+
deployments: read # Team Flow: delivery from deployments
|
|
32
|
+
issues: write # the weekly digest, answers to /stackvitals commands, flaky-test and alert issues
|
|
33
|
+
pull-requests: write # reads PRs for Team Flow; one comment on failed PR runs (set to read to turn comments off)
|
|
34
|
+
jobs:
|
|
35
|
+
vitals:
|
|
36
|
+
# Only what concerns StackVitals starts a runner: settings pushed to the default branch, requests and commands from
|
|
37
|
+
# people with access to the repo, and flaky-test issues being closed or reopened.
|
|
38
|
+
if: >-
|
|
39
|
+
(github.event_name != 'push' || github.ref_name == github.event.repository.default_branch) &&
|
|
40
|
+
(github.event_name != 'issues' ||
|
|
41
|
+
(github.event.action == 'opened' && contains(github.event.issue.body, '\`\`\`stackvitals') &&
|
|
42
|
+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association)) ||
|
|
43
|
+
(github.event.action != 'opened' && contains(github.event.issue.labels.*.name, 'flaky-test'))) &&
|
|
44
|
+
(github.event_name != 'issue_comment' ||
|
|
45
|
+
(contains(github.event.comment.body, '/stackvitals') &&
|
|
46
|
+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))) &&
|
|
47
|
+
(github.event_name != 'workflow_run' || !github.event.repository.private ||
|
|
48
|
+
github.event.workflow_run.conclusion != 'success' || vars.STACKVITALS_EVERY_CI_RUN == 'true')
|
|
49
|
+
# Private repos pay for Actions minutes: a CI run that passed starts no job (the 3-hourly run reads it), unless the
|
|
50
|
+
# repo variable STACKVITALS_EVERY_CI_RUN is "true" (the verdict check needs it). On the job, so events it skips never
|
|
51
|
+
# wait in (or cancel) the queue; PR checks and Test connection runs never wait for (or get dropped behind) data runs.
|
|
52
|
+
concurrency:
|
|
53
|
+
group: stackvitals-\${{ github.event.pull_request.number || (contains(github.event.inputs.request, '"check"') && format('check-{0}', github.run_id)) || 'data' }}
|
|
54
|
+
cancel-in-progress: false
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
timeout-minutes: 20
|
|
57
|
+
steps:
|
|
58
|
+
- uses: {ref}
|
|
59
|
+
env:
|
|
60
|
+
STACKVITALS_EVERY_CI_RUN: \${{ vars.STACKVITALS_EVERY_CI_RUN }}
|
|
61
|
+
with:
|
|
62
|
+
modules: ci,flow,deps,community
|
|
63
|
+
jira-email: \${{ secrets.JIRA_EMAIL }} # optional: Jira Cloud (see Integrations); unused while unset
|
|
64
|
+
jira-token: \${{ secrets.JIRA_API_TOKEN }}
|
|
65
|
+
linear-token: \${{ secrets.LINEAR_API_KEY }} # optional: Linear
|
|
66
|
+
pagerduty-token: \${{ secrets.PAGERDUTY_API_KEY }} # optional: PagerDuty or incident.io incidents
|
|
67
|
+
incident-io-token: \${{ secrets.INCIDENT_IO_API_KEY }}
|
|
68
|
+
triage-key: \${{ secrets.GEMINI_API_KEY }} # optional: a model's view on undecided failures ([ci.triage])
|
|
69
|
+
# traffic-token: \${{ steps.app.outputs.token }} # optional: keep traffic past GitHub's 14 days (see docs/modules.md)
|
|
70
|
+
`;function k(s){return JSON.stringify(s).replace(/[\u007f-]/g,e=>e==="\x7F"?e:"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0"))}function b(s){let e=null;for(let t=0;t<s.length;t++){let n=s[t];if((n==='"'||n==="'")&&(e===null||e===n))e=e?null:n;else if(n==="#"&&e===null&&(t===0||/\s/.test(s[t-1])))return s.slice(0,t).replace(/\s+$/,"")}return s}var v=s=>s.length-s.replace(/^\s+/,"").length;function y(s,e){let t=new Set(e),n=(...o)=>o.some(r=>t.has(r)),i=s.match(/[^\n]*\n|[^\n]+$/g)||[],a=[],c=null;for(let o of i){let r=o.trim().split(":",1)[0],u=v(o);if(c!==null){if(u>c||!o.trim())continue;c=null}if(u===2&&(r==="workflow_run"&&!t.has("ci")||r==="pull_request"&&!t.has("deps"))){c=u;continue}if(u===2&&["actions","checks","statuses","deployments","pull-requests"].includes(r)){if(!{actions:t.has("ci"),checks:n("ci","flow"),statuses:n("ci","flow"),deployments:t.has("flow"),"pull-requests":!0}[r])continue;r==="pull-requests"&&!n("ci","flow")&&(o=` pull-requests: read # the dependency check reads the files a pull request changes
|
|
71
|
+
`)}o.trim().startsWith("modules:")&&(o=o.split("modules:")[0]+"modules: "+l.filter(d=>t.has(d)).join(",")+`
|
|
72
|
+
`),a.push(o)}return a.join("")}function R(s,e={}){let t="["+(s&&s.length?s:["CI"]).map(k).join(", ")+"]",n=g.replace("{names}",t).replace("{ref}",e.ref||m),i=e.modules||l;return i.join(",")!==l.join(",")&&(n=y(n,i)),e.compact?n.split(/\r?\n/).map(b).filter(a=>a.trim()).join(`
|
|
73
|
+
`)+`
|
|
74
|
+
`:n}function $(s,e){let t=[];return e.days&&e.days!==90&&t.push(`days: "${Math.round(e.days)}"`),e.budget&&e.budget!==800&&t.push(`budget: "${Math.round(e.budget)}"`),e.pages==="artifact"&&t.push("pages: artifact"),t.length?s.replace(/^( *)modules: .*$/m,(n,i)=>[n,...t.map(a=>i+a)].join(`
|
|
75
|
+
`)):s}var _=/\b(test|tests|testing|ci|build|builds|lint|check|checks|pre-commit|e2e|unit|integration|verify|validate)\b/i,w=/\b(lock|stale|label|labeler|greet|welcome|release|publish|deploy|pages|codeql|scorecard|zizmor|dependabot|triage|sync|review)\b/i;function I(s){let e=s.filter(t=>_.test(t)&&!w.test(t));return e.length?e:s.slice()}function T(s,e){let t=l.filter(n=>e.includes(n));return`stackvitals ci init ${s}${t.length===l.length?"":` --modules ${t.join(",")}`} > ${f}`}var N="actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0",h="astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0";function A(s=6,e=!0){let[t,n]=m.split("@"),i=" ".repeat(s),a=i+" ";return[`${i}- uses: ${e?h:h.split(" # ")[0]}`,`${i} with:`,`${i} cache-dependency-glob: ""`,`${i}- name: Install StackVitals`,...e?[`${i} # The same code and pinned packages as the StackVitals Action (its uv.lock), run from their own folder.`]:[],`${i} run: |`,...[`git clone -q --depth 1 --branch ${n} https://github.com/${t}.git "$RUNNER_TEMP/stackvitals"`,'uv sync --quiet --frozen --only-group action --project "$RUNNER_TEMP/stackvitals"','mkdir -p "$RUNNER_TEMP/bin"','cat > "$RUNNER_TEMP/bin/stackvitals" <<EOF',"#!/bin/sh",'PYTHONPATH="$RUNNER_TEMP/stackvitals/src" exec "$RUNNER_TEMP/stackvitals/.venv/bin/python" -m stackvitals "\\$@"',"EOF",'chmod +x "$RUNNER_TEMP/bin/stackvitals"','echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"'].map(c=>a+c)]}export{m as a,f as b,l as c,k as d,R as e,$ as f,I as g,T as h,N as i,A as j};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as g}from"./chunk-G7NGB5UX.js";g();var Z,h,Ce,ot,D,xe,Te,Se,le,q,V,Ee,ce,ae,se,it,X={},Y=[],lt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Q=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function ue(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function at(e,t,n){var r,o,i,c={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:c[i]=t[i];if(arguments.length>2&&(c.children=arguments.length>3?Z.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)c[i]===void 0&&(c[i]=e.defaultProps[i]);return J(e,c,r,o,null)}function J(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Ce,__i:-1,__u:0};return o==null&&h.vnode!=null&&h.vnode(i),i}function C(e){return e.children}function K(e,t){this.props=e,this.context=t}function z(e,t){if(t==null)return e.__?z(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?z(e):null}function st(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=I({},t);i.__v=t.__v+1,h.vnode&&h.vnode(i),_e(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??z(t),!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,Le(r,i,o),t.__e=t.__=null,i.__e!=n&&Pe(i)}}function Pe(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Pe(e)}function Me(e){(!e.__d&&(e.__d=!0)&&D.push(e)&&!G.__r++||xe!=h.debounceRendering)&&((xe=h.debounceRendering)||Te)(G)}function G(){try{for(var e,t=1;D.length;)D.length>t&&D.sort(Se),e=D.shift(),t=D.length,st(e)}finally{D.length=G.__r=0}}function He(e,t,n,r,o,i,c,u,d,a,p){var m,l,_,v,M,y,k=r&&r.__k||Y,f=t.length;for(d=ct(n,t,k,d,f),m=0;m<f;m++)(_=n.__k[m])!=null&&(l=_.__i!=-1&&k[_.__i]||X,_.__i=m,y=_e(e,_,l,o,i,c,u,d,a,p),v=_.__e,_.ref&&l.ref!=_.ref&&(l.ref&&de(l.ref,null,_),p.push(_.ref,_.__c||v,_)),M==null&&v!=null&&(M=v),4&_.__u?(d=Ne(_,d,e),l.__e&&(l.__e=null)):typeof _.type=="function"&&y!==void 0?d=y:v&&(d=v.nextSibling),_.__u&=-7);return n.__e=M,d}function ct(e,t,n,r,o){var i,c,u,d,a,p=n.length,m=p,l=0;for(e.__k=new Array(o),i=0;i<o;i++)(c=t[i])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=e.__k[i]=J(null,c,null,null,null):Q(c)?c=e.__k[i]=J(C,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=e.__k[i]=J(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):e.__k[i]=c,d=i+l,c.__=e,c.__b=e.__b+1,u=null,(a=c.__i=ut(c,n,d,m))!=-1&&(m--,(u=n[a])&&(u.__u|=2)),u==null||u.__v==null?(a==-1&&(o>p?l--:o<p&&l++),typeof c.type!="function"&&(c.__u|=4)):a!=d&&(a==d-1?l--:a==d+1?l++:(a>d?l--:l++,c.__u|=4))):e.__k[i]=null;if(m)for(i=0;i<p;i++)(u=n[i])!=null&&(2&u.__u)==0&&(u.__e==r&&(r=z(u)),Ie(u,u));return r}function Ne(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Ne(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=z(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ut(e,t,n,r){var o,i,c,u=e.key,d=e.type,a=t[n],p=a!=null&&(2&a.__u)==0;if(a===null&&u==null||p&&u==a.key&&d==a.type)return n;if(r>(p?1:0)){for(o=n-1,i=n+1;o>=0||i<t.length;)if((a=t[c=o>=0?o--:i++])!=null&&(2&a.__u)==0&&u==a.key&&d==a.type)return c}return-1}function ke(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||lt.test(t)?n:n+"px"}function W(e,t,n,r,o){var i,c;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ke(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ke(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ee,"$1")),c=t.toLowerCase(),t=c in e||t=="onFocusOut"||t=="onFocusIn"?c.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[V]=r[V]:(n[V]=ce,e.addEventListener(t,i?se:ae,i)):e.removeEventListener(t,i?se:ae,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function we(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[q]==null)t[q]=ce++;else if(t[q]<n[V])return;return n(h.event?h.event(t):t)}}}function _e(e,t,n,r,o,i,c,u,d,a){var p,m,l,_,v,M,y,k,f,T,B,w,P,S,A,O,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[u=t.__e=n.__e]),(p=h.__b)&&p(t);e:if(typeof E=="function"){m=c.length;try{if(f=t.props,T=E.prototype&&E.prototype.render,B=(p=E.contextType)&&r[p.__c],w=p?B?B.props.value:p.__:r,n.__c?k=(l=t.__c=n.__c).__=l.__E:(T?t.__c=l=new E(f,w):(t.__c=l=new K(f,w),l.constructor=E,l.render=dt),B&&B.sub(l),l.state||(l.state={}),l.__n=r,_=l.__d=!0,l.__h=[],l._sb=[]),T&&l.__s==null&&(l.__s=l.state),T&&E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,E.getDerivedStateFromProps(f,l.__s))),v=l.props,M=l.state,l.__v=t,_)T&&E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),T&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(T&&E.getDerivedStateFromProps==null&&f!==v&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(f,w),t.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(f,l.__s,w)===!1){t.__v!=n.__v&&(l.props=f,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(F){F&&(F.__=t)}),Y.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&c.push(l),u=z(n);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(f,l.__s,w),T&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(v,M,y)})}if(l.context=w,l.props=f,l.__P=e,l.__e=!1,P=h.__r,S=0,T)l.state=l.__s,l.__d=!1,P&&P(t),p=l.render(l.props,l.state,l.context),Y.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,P&&P(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++S<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),T&&!_&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(v,M)),A=p!=null&&p.type===C&&p.key==null?Ae(p.props.children):p,u=He(e,Q(A)?A:[A],t,n,r,o,i,c,u,d,a),l.base=t.__e,t.__u&=-161,l.__h.length&&c.push(l),k&&(l.__E=l.__=null)}catch(F){if(c.length=m,t.__v=null,d||i!=null){if(F.then){for(t.__u|=d?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;i!=null&&(i[i.indexOf(u)]=null),t.__e=u}else if(i!=null)for(O=i.length;O--;)ue(i[O])}else t.__e=n.__e;t.__k==null&&(t.__k=n.__k||[]),F.then||$e(t),h.__e(F,t,n)}}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=_t(n.__e,t,n,r,o,i,c,d,a);return(p=h.diffed)&&p(t),128&t.__u?void 0:u}function $e(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($e))}function Le(e,t,n){for(var r=0;r<n.length;r++)de(n[r],n[++r],n[++r]);h.__c&&h.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){h.__e(i,o.__v)}})}function Ae(e){return typeof e!="object"||e==null||e.__b>0?e:Q(e)?e.map(Ae):e.constructor!==void 0?null:I({},e)}function _t(e,t,n,r,o,i,c,u,d){var a,p,m,l,_,v,M,y=n.props||X,k=t.props,f=t.type;if(f=="svg"?o="http://www.w3.org/2000/svg":f=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((_=i[a])&&"setAttribute"in _==!!f&&(f?_.localName==f:_.nodeType==3)){e=_,i[a]=null;break}}if(e==null){if(f==null)return document.createTextNode(k);e=document.createElementNS(o,f,k.is&&k),u&&(h.__m&&h.__m(t,i),u=!1),i=null}if(f==null)y===k||u&&e.data==k||(e.data=k);else{if(i=f=="textarea"&&k.defaultValue!=null?null:i&&Z.call(e.childNodes),!u&&i!=null)for(y={},a=0;a<e.attributes.length;a++)y[(_=e.attributes[a]).name]=_.value;for(a in y)_=y[a],a=="dangerouslySetInnerHTML"?m=_:a=="children"||a in k||a=="value"&&"defaultValue"in k||a=="checked"&&"defaultChecked"in k||W(e,a,null,_,o);for(a in k)_=k[a],a=="children"?l=_:a=="dangerouslySetInnerHTML"?p=_:a=="value"?v=_:a=="checked"?M=_:u&&typeof _!="function"||y[a]===_||W(e,a,_,y[a],o);if(p)u||m&&(p.__html==m.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(m&&(e.innerHTML=""),He(t.type=="template"?e.content:e,Q(l)?l:[l],t,n,r,f=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:n.__k&&z(n,0),u,d),i!=null)for(a=i.length;a--;)ue(i[a]);u&&f!="textarea"||(a="value",f=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[a]||f=="progress"&&!v||f=="option"&&v!=y[a])&&W(e,a,v,y[a],o),a="checked",M!=null&&M!=e[a]&&W(e,a,M,y[a],o))}return e}function de(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){h.__e(o,n)}}function Ie(e,t,n){var r,o;if(h.unmount&&h.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||de(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){h.__e(i,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ie(r[o],t,n||typeof e.type!="function");n||ue(e.__e),e.__c=e.__=e.__e=void 0}function dt(e,t,n){return this.constructor(e,n)}function pe(e,t,n){var r,o,i,c;t==document&&(t=document.documentElement),h.__&&h.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],c=[],_e(t,e=(!r&&n||t).__k=at(C,null,[e]),o||X,X,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Z.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,c),Le(i,e,c),e.props.children=null}Z=Y.slice,h={__e:function(e,t,n,r){for(var o,i,c;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),c=o.__d),c)return o.__E=o}catch(u){e=u}throw e}},Ce=0,ot=function(e){return e!=null&&e.constructor===void 0},K.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Me(this))},K.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Me(this))},K.prototype.render=C,D=[],Te=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Se=function(e,t){return e.__v.__b-t.__v.__b},G.__r=0,le=Math.random().toString(8),q="__d"+le,V="__a"+le,Ee=/(PointerCapture)$|Capture$/i,ce=0,ae=we(!1),se=we(!0),it=0;g();var R,b,fe,Fe,te=0,je=[],x=h,De=x.__b,ze=x.__r,Ue=x.diffed,Be=x.__c,Oe=x.unmount,Re=x.__;function ne(e,t){x.__h&&x.__h(b,e,te||t),te=0;var n=b.__H||(b.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function L(e){return te=1,pt(We,e)}function pt(e,t,n){var r=ne(R++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):We(void 0,t),function(u){var d=r.__N?r.__N[0]:r.__[0],a=r.t(d,u);d!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=b,!b.__f)){var o=function(u,d,a){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==u;if(r.__c.__H.__.some(function(_){if(_.__N){p=!0;var v=_.__[0];_.__=_.__N,_.__N=void 0,v!==_.__[0]&&(m=!0)}}),i){var l=i.call(this,u,d,a);return p?l||m:l}return!p||m};b.__f=!0;var i=b.shouldComponentUpdate,c=b.componentWillUpdate;b.componentWillUpdate=function(u,d,a){if(this.__e){var p=i;i=void 0,o(u,d,a),i=p}c&&c.call(this,u,d,a)},b.shouldComponentUpdate=o}return r.__N||r.__}function U(e,t){var n=ne(R++,3);!x.__s&&ve(n.__H,t)&&(n.__=e,n.u=t,b.__H.__h.push(n))}function me(e,t){var n=ne(R++,4);!x.__s&&ve(n.__H,t)&&(n.__=e,n.u=t,b.__h.push(n))}function H(e){return te=5,ft(function(){return{current:e}},[])}function ft(e,t){var n=ne(R++,7);return ve(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ht(){for(var e;e=je.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ee),t.__h.some(he),t.__h=[]}catch(n){t.__h=[],x.__e(n,e.__v)}}}x.__b=function(e){b=null,De&&De(e)},x.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Re&&Re(e,t)},x.__r=function(e){ze&&ze(e),R=0;var t=(b=e.__c).__H;t&&(fe===b?(t.__h=[],b.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(ee),t.__h.some(he),t.__h=[],R=0)),fe=b},x.diffed=function(e){Ue&&Ue(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(je.push(t)!==1&&Fe===x.requestAnimationFrame||((Fe=x.requestAnimationFrame)||mt)(ht)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),fe=b=null},x.__c=function(e,t){t.some(function(n){try{n.__h.some(ee),n.__h=n.__h.filter(function(r){return!r.__||he(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],x.__e(r,n.__v)}}),Be&&Be(e,t)},x.unmount=function(e){Oe&&Oe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{ee(r)}catch(o){t=o}}),n.__H=void 0,t&&x.__e(t,n.__v))};var Ve=typeof requestAnimationFrame=="function";function mt(e){var t,n=function(){clearTimeout(r),Ve&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ve&&(t=requestAnimationFrame(n))}function ee(e){var t=b,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),b=t}function he(e){var t=b;e.__c=e.__(),b=t}function ve(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function We(e,t){return typeof t=="function"?t(e):t}g();function qe(e){let t=e,n=new Set;return{get:()=>t,set(r){let o=typeof r=="function"?r(t):r;Object.is(o,t)||(t=o,n.forEach(i=>i(t)))},subscribe(r){return n.add(r),()=>{n.delete(r)}}}}function Je(e){let[,t]=L(0);return U(()=>e.subscribe(()=>t(n=>n+1)),[e]),e.get()}var Vt={get(e,t){try{let n=localStorage.getItem("sv:"+e);return n===null?t:JSON.parse(n)}catch{return t}},set(e,t){try{localStorage.setItem("sv:"+e,JSON.stringify(t))}catch{}}};g();var re=e=>e==null||Number.isNaN(e);function Ke(e){return re(e)?"\u2013":e>=48?`${(e/24).toFixed(1)} days`:e>=1?`${e.toFixed(1)} h`:`${Math.round(e*60)} min`}function vt(e){return re(e)?"\u2013":e>=3600?Ke(e/3600):e>=60?`${Math.round(e/60)} min`:`${Math.round(e)} s`}function yt(e,t=0){return re(e)?"\u2013":`${(e*100).toFixed(t)}%`}function qt(e,t,n=t+"s"){return`${e.toLocaleString("en-US")} ${e===1?t:n}`}function Jt(e){return e?String(e).slice(0,10):"\u2013"}function gt(e){return e?Date.parse(String(e).replace(" UTC","Z").replace(" ","T")):NaN}function Kt(e,t=Date.now()){if(!e)return"never";let n=gt(e);if(Number.isNaN(n))return String(e);let r=Math.round((t-n)/6e4);return r<1?"just now":r<60?`${r} min ago`:r<2880?`${Math.round(r/60)} h ago`:`${Math.round(r/1440)} days ago`}function Xt(e,t=80){let n=String(e??"");return n.length>t?n.slice(0,t-1)+"\u2026":n}var ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yt(e){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})/);return t?`${ye[+t[2]-1]} ${+t[3]}`:(t=e.match(/^(\d{4})-(\d{2})$/),t||(t=e.match(/^(\d{2})\/(\d{2})$/),t)?ye[+t[2]-1]:e)}function Gt(e,t){let n=r=>{let o=r==null?"":typeof r=="object"?JSON.stringify(r):String(r);return typeof r=="string"&&/^[=+\-@\t\r]/.test(o)&&(o=`'${o}`),/[",\n]/.test(o)?`"${o.replace(/"/g,'""')}"`:o};return[t.map(r=>n(r.label)).join(","),...e.map(r=>t.map(o=>n(o.raw?o.raw(r):r[o.key])).join(","))].join(`
|
|
2
|
+
`)}function bt(e,t){if(re(t))return"\u2013";switch(e){case"share":return yt(t);case"percent":return`${t.toFixed(1)}%`;case"secs":return vt(t);case"hours":return Ke(t);default:return Math.round(t).toLocaleString("en-US")}}function ge(e,t,n){let r=Math.abs(n-t);if(e==="share"){let o=Math.round(r*100);return`${o} ${o===1?"pt":"pts"}`}return e==="percent"?`${r.toFixed(1)} pts`:bt(e,r)}function be(e,t,n){return t===n||Number(ge(e,t,n).replace(/[^0-9.]/g,""))===0}function Xe(e,t,n,r){return!e||be(t,n,r)?"neutral":e==="up"==r>n?"good":"bad"}g();var xt=0;function s(e,t,n,r,o,i){t||(t={});var c,u,d=t;if("ref"in d)for(u in d={},t)u=="ref"?c=t[u]:d[u]=t[u];var a={type:e,props:d,key:n,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xt,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(c=e.defaultProps))for(u in c)d[u]===void 0&&(d[u]=c[u]);return h.vnode&&h.vnode(a),a}g();var Mt={overview:'<path d="M4 11.5 12 5l8 6.5V19a1 1 0 0 1-1 1h-4.5v-5h-5v5H5a1 1 0 0 1-1-1z"/>',insights:'<path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1.1 2V16h5v-.2c.1-.8.5-1.5 1.1-2A6 6 0 0 0 12 3z"/>',ci:'<circle cx="12" cy="12" r="8.5"/><path d="m8.5 12.3 2.4 2.4 4.8-5"/>',prs:'<circle cx="6.5" cy="6" r="2.2"/><circle cx="6.5" cy="18" r="2.2"/><circle cx="17.5" cy="18" r="2.2"/><path d="M6.5 8.2v7.6M17.5 15.8V10a3 3 0 0 0-3-3H11m2-2.5L10.5 7 13 9.5"/>',delivery:'<path d="M20.5 3.5 3.5 10.6l6.8 2.6 2.6 6.8zM10.3 13.2l4.2-4.2"/>',community:'<circle cx="9" cy="8.5" r="3.2"/><path d="M3.5 19c.6-3 2.8-4.8 5.5-4.8s4.9 1.8 5.5 4.8"/><circle cx="16.8" cy="9.5" r="2.5"/><path d="M15.6 14.4c2.4-.2 4.3 1.3 4.9 4.1"/>',deps:'<path d="M12 3 4 7.5v9L12 21l8-4.5v-9zM4 7.5l8 4.5 8-4.5M12 12v9"/>',investment:'<path d="M12 3a9 9 0 1 0 9 9h-9z"/><path d="M15 3.5A9 9 0 0 1 20.5 9H15z"/>',portal:'<rect x="4" y="4" width="7" height="7" rx="1.8"/><rect x="13" y="4" width="7" height="7" rx="1.8"/><rect x="4" y="13" width="7" height="7" rx="1.8"/><rect x="13" y="13" width="7" height="7" rx="1.8"/>',explore:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 4.5 4.5"/>',activity:'<path d="M12 7v5l3 2"/><circle cx="12" cy="12" r="8.5"/>',about:'<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.6v.1"/>',setup:'<path d="M5 12.5 9.5 17 19 7.5"/><path d="M4 4h16v16H4z" opacity=".35"/>',connections:'<path d="M9 7V3M15 7V3M7 7h10v4a5 5 0 0 1-10 0zM12 16v5"/>',agents:'<rect x="5" y="8" width="14" height="11" rx="3"/><path d="M12 8V4.5M9.5 13v1M14.5 13v1M2.5 13v2M21.5 13v2"/>',settings:'<path d="M4 7h10M18 7h2M4 17h4M12 17h8"/><circle cx="16" cy="7" r="2"/><circle cx="10" cy="17" r="2"/>',help:'<circle cx="12" cy="12" r="8.5"/><path d="M9.6 9.5a2.5 2.5 0 1 1 3.4 2.3c-.6.3-1 .8-1 1.5v.4M12 16.6v.1"/>',more:'<circle cx="6" cy="12" r="1.3"/><circle cx="12" cy="12" r="1.3"/><circle cx="18" cy="12" r="1.3"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"/>',fair:'<path d="M8 6.5a3.5 3.5 0 0 1 6.3 1.2M8.5 3v1.2M3.8 7.8H5M4.9 4.4l.9.9"/><path d="M7.5 19h9a3.5 3.5 0 0 0 .4-7 5 5 0 0 0-9.6 1.2A3 3 0 0 0 7.5 19z"/>',rain:'<path d="M7.5 15h9a3.5 3.5 0 0 0 .4-7 5 5 0 0 0-9.6 1.2A3 3 0 0 0 7.5 15z"/><path d="m9 18-1 2.5M13 18l-1 2.5M17 18l-1 2.5"/>',off:'<circle cx="12" cy="12" r="8.5"/><path d="M8 12h8"/>',up:'<path d="M12 19V5M6 11l6-6 6 6"/>',down:'<path d="M12 5v14M6 13l6 6 6-6"/>',flat:'<path d="M5 12h14"/>',chev:'<path d="m7 10 5 5 5-5"/>',right:'<path d="m10 7 5 5-5 5"/>',left:'<path d="m14 7-5 5 5 5"/>',check:'<path d="m5 12.5 4.5 4.5L19 7.5"/>',x:'<path d="M6 6l12 12M18 6 6 18"/>',copy:'<rect x="8" y="8" width="12" height="12" rx="2.5"/><path d="M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"/>',warn:'<path d="M12 4 2.8 19.5h18.4z"/><path d="M12 10v4.5M12 17.2v.1"/>',refresh:'<path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3M19.5 4.5v4h-4"/>',external:'<path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>',plus:'<path d="M12 5v14M5 12h14"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 4.5 4.5"/>',play:'<path d="M8 5.5v13l10.5-6.5z"/>',bolt:'<path d="M13 3 5 13.5h6l-1 7.5 8-10.5h-6z"/>',moon:'<path d="M19.5 14.5A8 8 0 0 1 9.5 4.5a8 8 0 1 0 10 10z"/>',trash:'<path d="M5 7h14M10 7V4.5h4V7M7 7l1 13h8l1-13"/>',lock:'<rect x="5" y="10.5" width="14" height="10" rx="2.5"/><path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5"/>',clock:'<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>',link:'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>',dot:'<circle cx="12" cy="12" r="4"/>',info:'<circle cx="12" cy="12" r="9.25"/><path d="M12 11v5.75M12 7.6v.01"/>'};function N({name:e,size:t,class:n}){return s("svg",{class:"ic"+(n?" "+n:""),viewBox:"0 0 24 24",width:t,height:t,"aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:Mt[e]}})}g();function kt(e){if(!e||/[\u0000-\u001f]/.test(e))return;let t=/^\s*([a-z][a-z0-9+.-]*):/i.exec(e);return t?["https","http","mailto"].includes(t[1].toLowerCase())?e:void 0:e.startsWith("//")?void 0:e}function oe(e){let t=["btn","press",`btn-${e.variant||"tinted"}`,e.size&&e.size!=="md"?`btn-${e.size}`:"",e.wide?"btn-wide":"",e.loading?"is-loading":"",e.children?"":"btn-icon",e.class||""].filter(Boolean).join(" "),n=s(C,{children:[e.loading?s("span",{class:"spin","aria-hidden":"true"}):e.icon?s(N,{name:e.icon}):null,e.children?s("span",{children:e.children}):null,e.iconEnd?s(N,{name:e.iconEnd}):null]}),r=kt(e.href);return r&&!e.disabled?s("a",{class:t,href:r,"aria-label":e.label,onClick:e.onClick,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:n}):s("button",{type:e.type||"button",class:t,"aria-label":e.label,disabled:e.disabled||e.loading,"aria-busy":e.loading||void 0,"aria-pressed":e.pressed,"aria-controls":e.controls,"aria-expanded":e.expanded,"aria-haspopup":e.haspopup,onClick:e.onClick,children:n})}g();g();var wt=typeof matchMedia=="function"?matchMedia("(prefers-reduced-motion: reduce)"):null;function Ye(){return!!wt?.matches||document.documentElement.classList.contains("calm")}var Ct=e=>1-Math.pow(1-e,4),dn=e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2;function pn(e,t,n,r=Ct){if(Ye())return t(1),n?.(),()=>{};let o=null,i=0,c=!1,u=d=>{if(c)return;o===null&&(o=d);let a=Math.min(1,(d-o)/e);t(r(a)),a<1?i=requestAnimationFrame(u):n?.()};return i=requestAnimationFrame(u),()=>{c=!0,cancelAnimationFrame(i)}}var Ge=()=>Ye()?0:320;g();function ie({children:e}){let t=H(null);return!t.current&&typeof document<"u"&&(t.current=document.createElement("div")),me(()=>{let n=t.current;return n.className="layer",document.body.appendChild(n),()=>{pe(null,n),n.remove()}},[]),me(()=>{pe(s(C,{children:e}),t.current)}),null}var j=[],Tt=0,Ze=0;function Qe(e){Ze+=e?1:-1,document.documentElement.classList.toggle("is-locked",Ze>0)}var et='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function St(e){let[t,n]=L(e),[r,o]=L(!1);return U(()=>{if(e){n(!0);let c=requestAnimationFrame(()=>requestAnimationFrame(()=>o(!0)));return()=>cancelAnimationFrame(c)}o(!1);let i=setTimeout(()=>n(!1),Ge());return()=>clearTimeout(i)},[e]),{mounted:t,shown:r}}function tt(e){let{mounted:t,shown:n}=St(e.open);return t?s(ie,{children:s(Et,{...e,shown:n})}):null}function Et({open:e,onClose:t,title:n,description:r,children:o,footer:i,size:c="md",hideTitle:u,shown:d}){let a=H(null),p=H(Symbol("sheet")),m=H(`sheet-t-${++Tt}`).current,l=H(null),[_,v]=L(0),M=H(null),y=H(t);y.current=t,U(()=>{l.current=document.activeElement,j.push(p.current),Qe(!0),(a.current?.querySelector("[data-autofocus]")||a.current?.querySelector(".sheet-content "+et.split(",")[0])||a.current)?.focus({preventScroll:!0});let P=S=>{if(j[j.length-1]!==p.current)return;if(S.key==="Escape"){S.preventDefault(),y.current();return}if(S.key!=="Tab"||!a.current)return;let A=[...a.current.querySelectorAll(et)].filter(F=>F.offsetParent!==null);if(!A.length){S.preventDefault();return}let O=A[0],E=A[A.length-1];S.shiftKey&&(document.activeElement===O||document.activeElement===a.current)?(S.preventDefault(),E.focus()):!S.shiftKey&&document.activeElement===E&&(S.preventDefault(),O.focus())};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P),j.splice(j.indexOf(p.current),1),Qe(!1),l.current?.isConnected&&l.current.focus({preventScroll:!0})}},[]);let k=w=>{w.pointerType==="mouse"||!matchMedia("(max-width: 640px)").matches||w.target.closest("button")||(M.current={y:w.clientY,t:performance.now()},w.currentTarget.setPointerCapture(w.pointerId))},f=w=>{M.current&&v(Math.max(0,w.clientY-M.current.y))},T=w=>{if(!M.current)return;let P=w.clientY-M.current.y,S=P/Math.max(1,performance.now()-M.current.t);M.current=null,(P>110||S>.6)&&y.current(),v(0)};return s("div",{class:"overlay"+(d&&e?" is-open":""),children:[s("div",{class:"scrim",onClick:()=>y.current(),"aria-hidden":"true"}),s("div",{ref:a,class:`sheet sheet-${c}${_?" is-dragging":""}`,role:"dialog","aria-modal":"true","aria-labelledby":m,tabIndex:-1,style:_?{transform:`translateY(${_}px)`}:void 0,children:[s("div",{class:"sheet-head",onPointerDown:k,onPointerMove:f,onPointerUp:T,onPointerCancel:T,children:[s("span",{class:"grabber","aria-hidden":"true"}),s("div",{class:"sheet-titles"+(u?" sr":""),children:[s("h2",{id:m,class:"sheet-title",children:n}),r?s("p",{class:"sheet-desc",children:r}):null]}),s("button",{type:"button",class:"close-x press","aria-label":"Close",onClick:()=>y.current(),children:s(N,{name:"x"})})]}),s("div",{class:"sheet-content",children:o}),i?s("div",{class:"sheet-foot",children:i}):null]})]})}g();var Pt="https://github.com/stackvitals/stackvitals/blob/main/docs/",Ht={good:"check",bad:"warn",watch:"clock",neutral:"dot",accent:"dot"};function Nt({tone:e="neutral",icon:t,children:n,solid:r}){let o=t===null?null:t||Ht[e];return s("span",{class:`pill pill-${e}${r?" is-solid":""}`,children:[o?s(N,{name:o}):null,s("span",{children:n})]})}var $t={flaky:["bad","Flaky"],broken:["bad","Failing"],suspect:["watch","Suspect"],fixed:["good","Fixed"],ok:["good","OK"],miss:["bad","Missed"],heads_up:["watch","Heads up"],elite:["good","Elite"],high:["good","High"],medium:["watch","Medium"],low:["bad","Low"],gold:["good","Gold"],silver:["neutral","Silver"],bronze:["watch","Bronze"]};function In({value:e}){if(!e)return null;let[t,n]=$t[e]||["neutral",e.replace(/_/g," ")];return s(Nt,{tone:t,children:n})}function Fn({kind:e,from:t,to:n,better:r}){let o=be(e,t,n),i=Xe(r,e,t,n),c=o?"flat":n>t?"up":"down",u=ge(e,t,n),d=o?"No change":`${c==="up"?"Up":"Down"} ${u}${i!=="neutral"?`, ${i==="good"?"better":"worse"}`:""}`;return s("span",{class:`change change-${i}`,role:"img","aria-label":d,title:d,children:[s(N,{name:c}),s("span",{"aria-hidden":"true",children:o?"Flat":u})]})}function Dn({info:e,label:t}){let[n,r]=L(!1);return s(C,{children:[s("button",{type:"button",class:"info-btn press","aria-label":t||`How ${e.title} works`,onClick:o=>{o.stopPropagation(),r(!0)},children:s(N,{name:"info"})}),s(tt,{open:n,onClose:()=>r(!1),title:e.title,size:"sm",footer:s(C,{children:[e.doc?s(oe,{variant:"plain",href:e.doc[0]=="#"?e.doc:Pt+e.doc,external:e.doc[0]!="#",iconEnd:"external",children:"Learn more"}):null,s(oe,{variant:"filled",onClick:()=>r(!1),children:"Done"})]}),children:[s("div",{class:"info-body",children:e.body}),e.facts?.length?s("dl",{class:"facts",children:e.facts.map(([o,i])=>s("div",{class:"fact",children:[s("dt",{children:o}),s("dd",{class:"num",children:i})]}))}):null]})]})}async function Lt(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function nt({text:e,label:t="Copy",small:n}){let[r,o]=L(!1);return s(oe,{variant:"tinted",size:n?"sm":"md",icon:r?"check":"copy",onClick:async()=>{let i=await Lt(e);o(i),Ft(i?"Copied":"Copy failed: select the text instead",i?"good":"bad"),setTimeout(()=>o(!1),1600)},children:r?"Copied":t})}function zn({code:e,title:t,inline:n,note:r}){return n?s("div",{class:"cmd-wrap",children:[s("div",{class:"cmd",children:[s("code",{tabIndex:0,children:e}),s(nt,{text:e,small:!0})]}),r?s("p",{class:"cmd-note",children:r}):null]}):s("div",{class:"code",children:[s("div",{class:"code-head",children:[s("span",{children:t||"Code"}),s(nt,{text:e,small:!0})]}),s("pre",{tabIndex:0,children:s("code",{children:e})}),r?s("p",{class:"cmd-note",children:r}):null]})}function Un({icon:e="about",title:t,children:n,action:r}){return s("div",{class:"empty",children:[s("span",{class:"empty-icon",children:s(N,{name:e})}),s("p",{class:"empty-title",children:t}),n?s("div",{class:"empty-body",children:n}):null,r?s("div",{class:"empty-action",children:r}):null]})}function At({lines:e=3,chart:t}){return s("div",{class:"skeleton","aria-busy":"true","aria-label":"Loading",children:[t?s("div",{class:"sk sk-chart"}):null,Array.from({length:e},(n,r)=>s("div",{class:"sk sk-line",style:{width:`${92-r*13}%`}}))]})}function Bn(){return s("div",{class:"page","aria-busy":"true",children:[s("div",{class:"sk sk-title"}),s("div",{class:"sk sk-sub"}),s(At,{chart:!0,lines:4})]})}var rt=qe(null),It=0;function Ft(e,t="good"){rt.set({id:++It,text:e,tone:t})}function On(){let e=Je(rt),[t,n]=L(!1),r=H(0);return U(()=>{e&&(n(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>n(!1),2800))},[e?.id]),s(ie,{children:s("div",{class:"toast"+(t?" is-open":"")+(e?` toast-${e.tone}`:""),role:"status","aria-live":"polite",children:e?s(C,{children:[s(N,{name:e.tone==="bad"?"warn":"check"}),s("span",{children:e.text})]}):null})})}export{C as a,pe as b,L as c,U as d,me as e,H as f,ft as g,qe as h,Je as i,Vt as j,Ke as k,vt as l,yt as m,qt as n,Jt as o,gt as p,Kt as q,Xt as r,Yt as s,Gt as t,bt as u,Xe as v,s as w,N as x,kt as y,oe as z,ie as A,Ye as B,dn as C,pn as D,et as E,St as F,tt as G,Pt as H,Nt as I,In as J,Fn as K,Dn as L,Lt as M,nt as N,zn as O,Un as P,At as Q,Bn as R,Ft as S,On as T};
|