Spot it. Save it. Free, local-first Chrome extension for images, videos and prompts. Explore 2,000+ curated cases and connect your library to AI Agents via MCP. 提示词导演
JavaScript ai-artai-videochrome-extensionclaude-codecodexhiggsfieldjimenglocal-firstmcpmidjourneymoodboardprompt-engineeringprompt-libraryprompt-managerreference-libraryseedancevisual-bookmarksweb-clipper
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
const source = new URL("../node_modules/@noble/hashes/", import.meta.url);
const target = new URL("../extension/vendor/noble-hashes/", import.meta.url);
const check = process.argv.includes("--check");
const files = ["sha2.js", "_md.js", "_u64.js", "utils.js", "LICENSE"];
if (!check) await mkdir(target, { recursive: true });
for (const name of files) {
const bytes = await readFile(new URL(name, source));
const path = new URL(name, target);
if (check) {
if (!bytes.equals(await readFile(path))) throw new Error(`哈希运行时与锁定依赖不一致:${fileURLToPath(path)}`);
} else await writeFile(path, bytes);
}
process.stdout.write(check ? "哈希运行时与锁定依赖一致\n" : "已同步流式哈希运行时\n");