From 3cfce3ef878b18529356c2a3462f6246cdcdbf7b Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 8 Feb 2026 14:49:30 +0800 Subject: [PATCH] updates --- script-meta-v2.json | 6 +++--- single-scripts/term-color.ts | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/script-meta-v2.json b/script-meta-v2.json index fe99200..aa80295 100644 --- a/script-meta-v2.json +++ b/script-meta-v2.json @@ -256,12 +256,12 @@ }, "term-color.ts": { "script_name": "term-color.ts", - "script_length": 1284, - "script_sha256": "986933a2d8457c58b7db2ce20189a7a39815c87ea4729fefe9cfe04d5505f729", + "script_length": 1380, + "script_sha256": "3ece88b65555499245a670b03002a3edd5d957f88151863bea0d829a75f92cb9", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/term-color.ts", "single_script_file": true, "publish_time": 1770533214194, - "update_time": 1770533214194 + "update_time": 1770533366713 }, "tree.ts": { "script_name": "tree.ts", diff --git a/single-scripts/term-color.ts b/single-scripts/term-color.ts index 95a8d2f..d4be0bd 100755 --- a/single-scripts/term-color.ts +++ b/single-scripts/term-color.ts @@ -3,7 +3,7 @@ import {term} from "https://script.hatter.ink/@32/deno-commons-mod.ts"; function printColors(colors: string[], prefix: string, suffix: string) { - const termOutputs = []; + const termOutputs: string[] = []; for (const color of colors) { termOutputs.push( term.auto( @@ -15,7 +15,7 @@ function printColors(colors: string[], prefix: string, suffix: string) { } async function main() { - const colors = [ + const colors: string[] = [ "black", "red", "green", @@ -33,10 +33,18 @@ async function main() { console.log(); printColors(colors, "bg_", "_bright"); console.log(); - console.log(term.auto('[bg_black][white][bold]Bold, white and black background [/][/][/]')); - console.log(term.auto('[black][bg_white][bold]Bold, black and white background [/][/][/]')); + console.log( + term.auto( + "[bg_black][white][bold]Bold, white and black background [/][/][/]", + ), + ); + console.log( + term.auto( + "[black][bg_white][bold]Bold, black and white background [/][/][/]", + ), + ); } await main(); -// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T144636+08:00.MEUCIQCyWJ2Yiijq3QYzuGXC -// uF1MfCW1yjFC5LmxDXQwGs8efgIgD6Xfh/4jUoDMjhRhp2itj9juT4PkGkP2u+9AhBZo1hY= +// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T144919+08:00.MEYCIQCSlSgTG6QYjn33Q5EH +// mGh2Fgzhn6QZVFCSKSJYcJrvxwIhAJeu9a64omxuy3aSMLggr7aWnTpDNNWq1dIM8qvjFNQ9