MCPcopy
hub / github.com/zgsm-ai/costrict / parse

Method parse

packages/vscode-shim/src/classes/Uri.ts:53–67  ·  view source on GitHub ↗

* Parse a URI string * * @param value - The URI string to parse * @returns A new Uri instance

(value: string)

Source from the content-addressed store, hash-verified

51 * @returns A new Uri instance
52 */
53 static parse(value: string): Uri {
54 try {
55 const url = new URL(value)
56 return new Uri(
57 url.protocol.slice(0, -1),
58 url.hostname,
59 url.pathname,
60 url.search.slice(1),
61 url.hash.slice(1),
62 )
63 } catch {
64 // If URL parsing fails, treat as file path
65 return Uri.file(value)
66 }
67 }
68
69 /**
70 * Join a URI with path segments

Callers 15

updatePackageVersionFunction · 0.80
generateNpmPackageFunction · 0.80
publishFunction · 0.80
loadCredentialsMethod · 0.80

Calls 1

fileMethod · 0.80

Tested by 15

linesFunction · 0.64
linesFunction · 0.64
linesFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
messageHandlerFunction · 0.64
readFileContentFunction · 0.64