fix(lsp): restrict registry completion endpoint schemes (#36477)
Registry completion configuration describes network endpoints, but
endpoint URL resolution previously accepted any URL scheme. That allowed
completion and documentation requests to be routed through handlers that
are not intended for registry services.
This change:
- validates resolved registry endpoints as HTTP or HTTPS while retaining
relative and cross-origin endpoints
- resolves first-key relative endpoints against the current resolved
module URL, matching the other registry completion paths
- rechecks documentation URLs during completion resolution
- adds coverage for supported URL forms and unsupported schemes
HTTP and HTTPS cross-origin endpoints remain supported by design for
registry origins explicitly enabled by the user. This change prevents
routing through unsupported URL-scheme handlers; it does not add a
same-origin restriction.
Validation:
- `cargo test -p deno --lib 'lsp::registries::tests::' -- --nocapture`
- `cargo clippy -p deno --lib --no-deps -- -D warnings`
- `deno run -A --no-config npm:dprint@0.47.2 check --config=.dprint.json
cli/lsp/registries.rs`