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