MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeHost

Function normalizeHost

apps/sim/connectors/gitlab/gitlab.ts:186–188  ·  view source on GitHub ↗

* Normalizes the host config value via the shared GitLab host normalizer: * trims, strips any protocol prefix and trailing slashes, rejects structurally * unsafe hosts (userinfo, whitespace, embedded path), and falls back to * gitlab.com when empty. Shared with the GitLab tools and webhook provid

(rawHost: unknown)

Source from the content-addressed store, hash-verified

184 * @throws {UnsafeGitLabHostError} when a non-empty host is structurally unsafe.
185 */
186function normalizeHost(rawHost: unknown): string {
187 return normalizeGitLabHost(rawHost)
188}
189
190/**
191 * Builds the REST API v4 base URL for the configured host.

Callers 1

gitlab.tsFile · 0.70

Calls 1

normalizeGitLabHostFunction · 0.90

Tested by

no test coverage detected