This commit is contained in:
2026-02-11 22:37:32 +08:00
parent 46dc8009c2
commit f40eb40d6b
8 changed files with 62 additions and 54 deletions

View File

@@ -1,20 +1,21 @@
#!/usr/bin/env runts --
#!/usr/bin/env runts -- --allow-import
import { parseArgs } from "jsr:@std/cli/parse-args";
import { toArrayBuffer } from "https://deno.land/std@0.203.0/streams/mod.ts";
import {args, exit} from "https://script.hatter.ink/@41/deno-commons-mod.ts";
import {parseArgs} from "jsr:@std/cli/parse-args";
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const flags = parseArgs(Deno.args, {
const flags = parseArgs(args(), {
boolean: ["help"],
string: ["value"],
alias: {
V: "value"
}
V: "value",
},
});
if (flags.help) {
console.log("echo value | encode-uri-component.ts");
console.log("encode-uri-component.ts --value <value>");
Deno.exit(0);
exit(0);
}
let input;
@@ -27,5 +28,5 @@ const encoded = encodeURIComponent(input);
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260122T235939+08:00.MEQCIAQ5xspL/Z+a19RydUte
// RRZnxP8wJSNLUFycWtQwJBvOAiAzk+43vb8lLiStnvmxQWN68Ddl2Hy5OodwvKxb2YWM4w==
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260211T223656+08:00.MEYCIQDWpN6TPlSUC2reXixQ
// cAsopGtVR7O1eHOZ8yMXhXJamAIhAKHLwiUf97ArNi0fYjQ8pfEkRXA6kfxM41Uj3rgYj1X/