update post-note.ts
This commit is contained in:
@@ -141,12 +141,12 @@
|
||||
},
|
||||
"post-note.ts": {
|
||||
"script_name": "post-note.ts",
|
||||
"script_length": 2019,
|
||||
"script_sha256": "75b2d9c0e0a42a4dd19896bfbdf973f2ad4e5e67aea76400920bfbf41d657bff",
|
||||
"script_length": 2030,
|
||||
"script_sha256": "9fc2c3223882a9040d3becc7d1c5dfc5c89dfb313fa05c8605e041629d887881",
|
||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/post-note.ts",
|
||||
"single_script_file": true,
|
||||
"publish_time": 1737475603673,
|
||||
"update_time": 1769525452943
|
||||
"update_time": 1769525844426
|
||||
},
|
||||
"print-env.ts": {
|
||||
"script_name": "print-env.ts",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env runts -- --allow-env --allow-import --allow-net
|
||||
#!/usr/bin/env runts -- --allow-env --allow-import --allow-net --allow-read
|
||||
|
||||
import {parseArgs} from "jsr:@std/cli/parse-args";
|
||||
import {encryptEcdhP256} from "https://global.hatter.ink/script/get/@0/deno-wrapkey-mod.ts";
|
||||
import {log} from "https://global.hatter.ink/script/get/@1/deno-commons-mod.ts";
|
||||
import {getEnv, log,} from "https://global.hatter.ink/script/get/@18/deno-commons-mod.ts";
|
||||
import {fetchWithTimeoutAndAutoProxy} from "https://global.hatter.ink/script/get/@1/deno-fetch-auto-proxy-mod.ts";
|
||||
|
||||
const endpoint = Deno.env.get("POST_ENCRYPTED_NOTE_ENDPOINT");
|
||||
const publicKeyPointHex = Deno.env.get("ENCRYPTION_PUBLIC_KEY_POINT_HEX");
|
||||
const endpoint = getEnv("POST_ENCRYPTED_NOTE_ENDPOINT");
|
||||
const publicKeyPointHex = getEnv("ENCRYPTION_PUBLIC_KEY_POINT_HEX");
|
||||
|
||||
if (!endpoint || !publicKeyPointHex) {
|
||||
log.error("Endpoint and public key point hex must both assigned.");
|
||||
@@ -60,5 +60,5 @@ const response = await fetchWithTimeoutAndAutoProxy(
|
||||
|
||||
console.info(response.status, await response.json());
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260127T224542+08:00.MEUCIQDg4zKtOOdd95j7LqzA
|
||||
// kNqHczlfJblEWj3Q6WE3RxzxKQIgJuopk5tUHS9Iyx/Sd85R+SbPA3axAaP8TVVMCZlFZso=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260127T225716+08:00.MEUCIEnxw6Q8UfPFWxfs+0Hq
|
||||
// dzR+nwQoChs/xwSyAm4wpd9DAiEAnOZ70FXyf0e0QQpHiYHFLYdMdMZZWhCKjv2ShguSoPg=
|
||||
|
||||
Reference in New Issue
Block a user