refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -4,7 +4,7 @@
|
||||
* 只输出布尔值与个数:不截图、不输出页面内容与 Cookie 值;对真实站点只有一次导航。
|
||||
* 用法(只读数据库;camofox 需带 umt-cookies 插件,见 docs/runbook/browser.md §9):
|
||||
* CAMOFOX_URL=http://127.0.0.1:49391 CAMOFOX_ACCESS_KEY=... DATABASE_URL=postgres://... SECRET_MASTER_KEY=... \
|
||||
* deno run -A scripts/browser-verify/cookie-real.ts <site key>
|
||||
* bun scripts/browser-verify/cookie-real.ts <site key>
|
||||
* 密钥只从环境变量读,不写进文件。
|
||||
*/
|
||||
import {
|
||||
@@ -20,11 +20,11 @@ import { createSecretStore } from "../../apps/server/src/modules/auth-settings/p
|
||||
import { readAccountCookie } from "../../apps/server/src/modules/sources-identity/service/credentials.ts";
|
||||
|
||||
const env = (k: string) => {
|
||||
const v = Deno.env.get(k);
|
||||
const v = process.env[k];
|
||||
if (!v) throw new Error(`缺少环境变量 ${k}`);
|
||||
return v;
|
||||
};
|
||||
const siteKey = Deno.args[0] ?? "hhanclub";
|
||||
const siteKey = process.argv.slice(2)[0] ?? "hhanclub";
|
||||
const db = createDb({ connectionString: env("DATABASE_URL"), max: 2 });
|
||||
const secrets = createSecretStore({ db, masterKey: env("SECRET_MASTER_KEY") });
|
||||
const quiet = { info() {}, warn() {}, error() {}, debug() {} } as never;
|
||||
|
||||
Reference in new issue
Block a user