chore: generate
This commit is contained in:
@@ -62,7 +62,10 @@ describe("getTerminalServerScope", () => {
|
|||||||
),
|
),
|
||||||
).toBe("wsl:Debian" as ServerKey)
|
).toBe("wsl:Debian" as ServerKey)
|
||||||
expect(
|
expect(
|
||||||
getTerminalServerScope({ type: "http", http: { url: "https://example.com" } }, "https://example.com" as ServerKey),
|
getTerminalServerScope(
|
||||||
|
{ type: "http", http: { url: "https://example.com" } },
|
||||||
|
"https://example.com" as ServerKey,
|
||||||
|
),
|
||||||
).toBe("https://example.com" as ServerKey)
|
).toBe("https://example.com" as ServerKey)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -94,7 +94,12 @@ export function getTerminalServerScope(conn: ServerConnection.Any | undefined, k
|
|||||||
if (conn.type === "http") {
|
if (conn.type === "http") {
|
||||||
try {
|
try {
|
||||||
const url = new URL(conn.http.url)
|
const url = new URL(conn.http.url)
|
||||||
if (url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "::1" || url.hostname === "[::1]")
|
if (
|
||||||
|
url.hostname === "localhost" ||
|
||||||
|
url.hostname === "127.0.0.1" ||
|
||||||
|
url.hostname === "::1" ||
|
||||||
|
url.hostname === "[::1]"
|
||||||
|
)
|
||||||
return
|
return
|
||||||
} catch {
|
} catch {
|
||||||
return key
|
return key
|
||||||
@@ -127,12 +132,7 @@ const trimTerminal = (pty: LocalPTY) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearWorkspaceTerminals(
|
export function clearWorkspaceTerminals(dir: string, sessionIDs?: string[], platform?: Platform, scope?: string) {
|
||||||
dir: string,
|
|
||||||
sessionIDs?: string[],
|
|
||||||
platform?: Platform,
|
|
||||||
scope?: string,
|
|
||||||
) {
|
|
||||||
const key = getWorkspaceTerminalCacheKey(dir, scope)
|
const key = getWorkspaceTerminalCacheKey(dir, scope)
|
||||||
for (const cache of caches) {
|
for (const cache of caches) {
|
||||||
const entry = cache.get(key)
|
const entry = cache.get(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user