update hatter script pub --type deno-mod
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
fetchWithTimoutAndAutoProxy,
|
||||
} from "https://global.hatter.ink/script/get/@0/deno-fetch-auto-proxy-mod.ts";
|
||||
fetchWithTimeoutAndAutoProxy,
|
||||
} from "https://global.hatter.ink/script/get/@1/deno-fetch-auto-proxy-mod.ts";
|
||||
|
||||
export class SshKey {
|
||||
algorithm: string;
|
||||
@@ -35,7 +35,7 @@ export async function fetchKeys(
|
||||
timeout?: number,
|
||||
): Promise<Array<SshKey>> {
|
||||
const url = `https://github.com/${username}.keys`;
|
||||
const response = await fetchWithTimoutAndAutoProxy(url, timeout);
|
||||
const response = await fetchWithTimeoutAndAutoProxy(url, timeout);
|
||||
const responseText: string = await response.text();
|
||||
return responseText.trim().split("\n").map((k) => SshKey.parseSshKey(k));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user