mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-08-08 01:43:03 +08:00
feat(baoyu-post-to-wechat): add multi-account support
Support multiple WeChat Official Accounts via EXTEND.md accounts block. Each account gets isolated Chrome profile, credential resolution chain (inline → prefixed env → unprefixed env), and --account CLI arg.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { execSync, type ChildProcess } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
import process from 'node:process';
|
||||
|
||||
import {
|
||||
@@ -80,6 +81,11 @@ export function getDefaultProfileDir(): string {
|
||||
});
|
||||
}
|
||||
|
||||
export function getAccountProfileDir(alias: string): string {
|
||||
const base = getDefaultProfileDir();
|
||||
return path.join(path.dirname(base), `wechat-${alias}`);
|
||||
}
|
||||
|
||||
export interface ChromeSession {
|
||||
cdp: CdpConnection;
|
||||
sessionId: string;
|
||||
|
||||
Reference in New Issue
Block a user