From ab9edbb4fdcff42c5e925ffbb9afe4980fdacb8a Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 19 Jan 2025 01:12:37 +0800 Subject: [PATCH] feat: update publickey.ts --- script-meta-v2.json | 8 ++++---- single-scripts/print-env.ts | 2 +- single-scripts/publickey.ts | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/script-meta-v2.json b/script-meta-v2.json index fee452a..5cd763d 100644 --- a/script-meta-v2.json +++ b/script-meta-v2.json @@ -13,15 +13,15 @@ }, "print-env.ts": { "script_name": "print-env.ts", - "script_length": 154, - "script_sha256": "60236017ab2b448bf830fbcca63de7017fcf9462d91af16649ed6b49f516d24e", + "script_length": 156, + "script_sha256": "b77d1b8c5ee91ef83e7b1bb72851f6a8f6ed4b0c4ab811fe62f24eebab72149a", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/print-env.ts", "single_script_file": true }, "publickey.ts": { "script_name": "publickey.ts", - "script_length": 1530, - "script_sha256": "ffd1181afb7bbc9cf0f45c2617dc956d4d363fd893456ad0ebc03fc63bab64ad", + "script_length": 1572, + "script_sha256": "7910b0d8c727a5d8cefa0174d19b0e6e7925dc3960dbe3625735f4a55f7180e2", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/publickey.ts", "single_script_file": true }, diff --git a/single-scripts/print-env.ts b/single-scripts/print-env.ts index c7b90fb..0f066ee 100755 --- a/single-scripts/print-env.ts +++ b/single-scripts/print-env.ts @@ -2,6 +2,6 @@ const envs = Deno.env.toObject(); -for (let envKey in envs) { +for (const envKey in envs) { console.log(`${envKey} --> ${envs[envKey]}`); } diff --git a/single-scripts/publickey.ts b/single-scripts/publickey.ts index 9717821..038eff0 100755 --- a/single-scripts/publickey.ts +++ b/single-scripts/publickey.ts @@ -21,7 +21,8 @@ if (Deno.args.length === 0) { // console.log(x509.publicKey.export({format: "pem", type: "spki"})); // } -function printPublicKey(publicKey) { +// deno-lint-ignore no-explicit-any +function printPublicKey(publicKey: any) { console.log('JWK:'); const exportedJwk = publicKey.export({format: "jwk"}); console.log(JSON.stringify(exportedJwk, null, 4)); @@ -42,7 +43,7 @@ try { const publicKey = createPublicKey({key, format: "jwk"}); printPublicKey(publicKey); Deno.exit(0); - } catch (e) { + } catch (_e) { // IGNORE }