update hatter script pub --type deno-mod

This commit is contained in:
2026-01-27 23:45:57 +08:00
parent 78cc973dc7
commit e206ad2534

View File

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