updates
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env runts -- --allow-import
|
||||
|
||||
import {args, exit} from "https://script.hatter.ink/@41/deno-commons-mod.ts";
|
||||
import {args, exit, stdinToArrayBuffer,} from "https://script.hatter.ink/@43/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(args(), {
|
||||
boolean: ["help"],
|
||||
@@ -22,11 +21,11 @@ let input;
|
||||
if (flags.value) {
|
||||
input = flags.value;
|
||||
} else {
|
||||
input = new TextDecoder().decode(await toArrayBuffer(Deno.stdin.readable));
|
||||
input = new TextDecoder().decode(await stdinToArrayBuffer());
|
||||
}
|
||||
const encoded = encodeURI(input);
|
||||
|
||||
console.log(encoded);
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260211T223656+08:00.MEUCIHhfsF0mbPmh5MylnqPg
|
||||
// MEXtiFQ3ncpqJcQruOqdUViLAiEA77/M0NfgxlerlG0zjY/r0Etz7fQ0TyqX8B1Qe1iev8Q=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260211T225148+08:00.MEUCIAwanQfv/7ixuUTMPJKh
|
||||
// eU5BnGTKB5PeqmPHPkq5BpoJAiEAjASLCxu/w1Dm/6lz8yPlc71mChWo1M1MxiyiM3MQ6Cs=
|
||||
|
||||
Reference in New Issue
Block a user