update term color
This commit is contained in:
@@ -256,12 +256,12 @@
|
|||||||
},
|
},
|
||||||
"term-color.ts": {
|
"term-color.ts": {
|
||||||
"script_name": "term-color.ts",
|
"script_name": "term-color.ts",
|
||||||
"script_length": 1472,
|
"script_length": 2040,
|
||||||
"script_sha256": "64523ef7952cc9e189b04605677e2e03193b9435b9d171423d590fd6a37280e3",
|
"script_sha256": "19bfc6d98fd3e6eee305b30a89904d4c5d8961bc203e84e0ce00c35485372d26",
|
||||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/term-color.ts",
|
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/term-color.ts",
|
||||||
"single_script_file": true,
|
"single_script_file": true,
|
||||||
"publish_time": 1770533214194,
|
"publish_time": 1770533214194,
|
||||||
"update_time": 1770536826085
|
"update_time": 1770537359527
|
||||||
},
|
},
|
||||||
"tree.ts": {
|
"tree.ts": {
|
||||||
"script_name": "tree.ts",
|
"script_name": "tree.ts",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env runts -- --allow-import
|
#!/usr/bin/env runts -- --allow-import --allow-net
|
||||||
|
|
||||||
import {term} from "https://script.hatter.ink/@33/deno-commons-mod.ts";
|
import { term } from "https://script.hatter.ink/@33/deno-commons-mod.ts";
|
||||||
|
import { fetchDataWithTimeout } from "../libraries/deno-commons-mod.ts";
|
||||||
|
|
||||||
function printColors(colors: string[], prefix: string, suffix: string) {
|
function printColors(colors: string[], prefix: string, suffix: string) {
|
||||||
const termOutputs: string[] = [];
|
const termOutputs: string[] = [];
|
||||||
@@ -25,6 +26,21 @@ async function main() {
|
|||||||
"cyan",
|
"cyan",
|
||||||
"white",
|
"white",
|
||||||
];
|
];
|
||||||
|
try {
|
||||||
|
const denoCommonsModResponse = await fetchDataWithTimeout(
|
||||||
|
"https://hatter.ink/s/deno-commons-mod.ts",
|
||||||
|
);
|
||||||
|
const denoCommonsMod = await denoCommonsModResponse.json();
|
||||||
|
const denoCommonsModUrl = denoCommonsMod.data["script-url"];
|
||||||
|
console.log(
|
||||||
|
term.auto(
|
||||||
|
`[bg_white][green][bold]import {term} from "${denoCommonsModUrl}";\n`,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
// IGNORE
|
||||||
|
}
|
||||||
|
|
||||||
printColors(colors, "", "");
|
printColors(colors, "", "");
|
||||||
console.log();
|
console.log();
|
||||||
printColors(colors, "", "_bright");
|
printColors(colors, "", "_bright");
|
||||||
@@ -46,5 +62,5 @@ async function main() {
|
|||||||
}
|
}
|
||||||
await main();
|
await main();
|
||||||
|
|
||||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T154653+08:00.MEUCIQCt2qj/3lPKwhX8n5ID
|
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T155509+08:00.MEUCIEkRx6ftytYOS1NOOi/C
|
||||||
// jvkItXyST6mG1/j3fcUHybaePQIgAM4ErXInKntZU3DvmuX8szEFXIcFN1W3+zYLzPuYywk=
|
// 5k1uznr7juyMmOMq/11nkyWIAiEA8tGnRCDfOyaQriwMSjxfO4tTm2xfxbcUbvJfmy/HAso=
|
||||||
|
|||||||
Reference in New Issue
Block a user