🔧 Update script metadata and add input validation for cheat sheet name
This commit is contained in:
@@ -162,12 +162,12 @@
|
||||
},
|
||||
"init-cheatsheet.ts": {
|
||||
"script_name": "init-cheatsheet.ts",
|
||||
"script_length": 1304,
|
||||
"script_sha256": "8dbda9180e217a08f52fc7a8a7d20d33e1d5257ecba9ca1208427ff870787d92",
|
||||
"script_length": 1394,
|
||||
"script_sha256": "a9ba042766eae3e351ce2787c8c409a30eb39496bb219078f322a02003d9321c",
|
||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/init-cheatsheet.ts",
|
||||
"single_script_file": true,
|
||||
"publish_time": 1775929369681,
|
||||
"update_time": 1776006866736
|
||||
"update_time": 1776006975912
|
||||
},
|
||||
"ip.ts": {
|
||||
"script_name": "ip.ts",
|
||||
|
||||
@@ -10,6 +10,10 @@ import {
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const name = prompt("Cheat sheet name:");
|
||||
if (!name) {
|
||||
log.error("Cheat sheet name is required");
|
||||
return;
|
||||
}
|
||||
const repo = prompt("Cheat sheet repo:");
|
||||
const desc = prompt("Cheat sheet description:");
|
||||
|
||||
@@ -46,5 +50,5 @@ main().catch((err) => {
|
||||
exit(1);
|
||||
}).then(() => exit(0));
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T231322+08:00.MEYCIQD09vR5PjKTl9b+gQJQ
|
||||
// ycR0M7Okd9ygkuG5U8lP9HYvBAIhAKpaHWZmGiTK8rX/iQg95M5y5m3y1HvyCaGsB8EATdeQ
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T231558+08:00.MEQCIDBfpbEIXFa3AlXQOTqj
|
||||
// FLDofpXRWVxbx0dIyukc6/ZeAiAze9BYBK1rOWa8TXDmW4Yb5NAFvbCBM6LTjOzqjZtztQ==
|
||||
|
||||
Reference in New Issue
Block a user