feat: add scripts

This commit is contained in:
2026-01-21 23:28:36 +08:00
parent 948fa74409
commit 7e11e6a72a
6 changed files with 98 additions and 5 deletions

View File

@@ -34,6 +34,50 @@
"publish_time": 1737306227061, "publish_time": 1737306227061,
"update_time": 1737650670435 "update_time": 1737650670435
}, },
"cmd.ts": {
"script_name": "cmd.ts",
"script_length": 3076,
"script_sha256": "ca4a0193ca760b126e8471ccac1c73928b5dab79da5f89f198936e799032dab3",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/cmd-ts/main.ts",
"publish_time": 1769009291639,
"update_time": 1769009291639
},
"decodeUri.ts": {
"script_name": "decodeUri.ts",
"script_length": 402,
"script_sha256": "691df11e6ca680064155b6d5537a81099142e7c80cfda2436260226197f5e4d9",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/decodeUri.ts",
"single_script_file": true,
"publish_time": 1769009291643,
"update_time": 1769009291643
},
"decodeUriComponent.ts": {
"script_name": "decodeUriComponent.ts",
"script_length": 411,
"script_sha256": "3e6b7b9c9bc0a701790ee38ee66ad7019093d44b590163300259e907979c2703",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/decodeUriComponent.ts",
"single_script_file": true,
"publish_time": 1769009291641,
"update_time": 1769009291641
},
"encodeUri.ts": {
"script_name": "encodeUri.ts",
"script_length": 402,
"script_sha256": "e4ebab94e26fee237e675f3798309f5ebdf27f754b8634e20be33ecef30c05cc",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/encodeUri.ts",
"single_script_file": true,
"publish_time": 1769009291640,
"update_time": 1769009291640
},
"encodeUriComponent.ts": {
"script_name": "encodeUriComponent.ts",
"script_length": 411,
"script_sha256": "917098558bb6ea65e5a6679407cd952b298703b42a850fc84a9917ab8e1c71fc",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/encodeUriComponent.ts",
"single_script_file": true,
"publish_time": 1769009291640,
"update_time": 1769009291640
},
"helloworld-bun.ts": { "helloworld-bun.ts": {
"script_name": "helloworld-bun.ts", "script_name": "helloworld-bun.ts",
"script_length": 237, "script_length": 237,
@@ -115,11 +159,11 @@
}, },
"python.ts": { "python.ts": {
"script_name": "python.ts", "script_name": "python.ts",
"script_length": 561, "script_length": 2560,
"script_sha256": "56a24aee4b6c4203fb46fb5d06533bb53cdc1857ceacaaea89720c0bd957a38e", "script_sha256": "b65bea2cf9927b6b21bb87e9a597ebb2eaf2bd86929e90d149b60317f0cb3d02",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/python-ts/main.ts", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/python-ts/main.ts",
"publish_time": 1768236234264, "publish_time": 1768236234264,
"update_time": 1768236234264 "update_time": 1769009291638
}, },
"random.ts": { "random.ts": {
"script_name": "random.ts", "script_name": "random.ts",

View File

@@ -4,6 +4,11 @@
"script_length": 5917, "script_length": 5917,
"script_sha256": "2b7efec1c473856e156bea9c8c9ce526c217138b8813b8706600808e895ce0f5" "script_sha256": "2b7efec1c473856e156bea9c8c9ce526c217138b8813b8706600808e895ce0f5"
}, },
"cmd-ts": {
"script_name": "cmd-ts",
"script_length": 3076,
"script_sha256": "ca4a0193ca760b126e8471ccac1c73928b5dab79da5f89f198936e799032dab3"
},
"helloworld-bun-ts": { "helloworld-bun-ts": {
"script_name": "helloworld-bun-ts", "script_name": "helloworld-bun-ts",
"script_length": 237, "script_length": 237,
@@ -16,8 +21,8 @@
}, },
"python-ts": { "python-ts": {
"script_name": "python-ts", "script_name": "python-ts",
"script_length": 561, "script_length": 2560,
"script_sha256": "56a24aee4b6c4203fb46fb5d06533bb53cdc1857ceacaaea89720c0bd957a38e" "script_sha256": "b65bea2cf9927b6b21bb87e9a597ebb2eaf2bd86929e90d149b60317f0cb3d02"
}, },
"sigstore-verify-ts": { "sigstore-verify-ts": {
"script_name": "sigstore-verify-ts", "script_name": "sigstore-verify-ts",

11
single-scripts/decodeUri.ts Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env runts --
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = await toArrayBuffer(Deno.stdin.readable);
const encoded = decodeURI(new TextDecoder().decode(input));
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260121T232713+08:00.MEYCIQC5Qkmj03V0nXHS/CVq
// UK0RbjEnYEQmsamBc1G0vMpZ4AIhAKzdm2O47MfMVqX8CDaTLAP5Q3FL7Qr7V4idoZmdUBBU

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env runts --
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = await toArrayBuffer(Deno.stdin.readable);
const encoded = decodeURIComponent(new TextDecoder().decode(input));
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260121T232720+08:00.MEUCIQDey6Bigi3lt0pKkjqe
// qivxSwsQ7iuQqE3L8l0km167XQIgKouhGEMv0efcU2huFRFjNCvluo0/39QVY84aYEfdCLo=

11
single-scripts/encodeUri.ts Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env runts --
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = await toArrayBuffer(Deno.stdin.readable);
const encoded = encodeURI(new TextDecoder().decode(input));
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260121T232616+08:00.MEUCIFR22KcyM6rFopdoq6Ql
// XntYCaLLBA3/zMR36jOqsUedAiEAsTvDvWNPAq6IUXRqSge5NZ9Hf7/DnF1hjQjZ6+SZQOg=

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env runts --
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const input = await toArrayBuffer(Deno.stdin.readable);
const encoded = encodeURIComponent(new TextDecoder().decode(input));
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260121T232516+08:00.MEYCIQDACv34O4dNEf0su2wk
// Lv4+hfZyvbDLPHF8utf2jM3VoAIhAJgrJW75gxZX9Che75cWQN/XB9qvA3MmeAaa9Oo4WWNX