feat(publish): add seven publish adapters for new media platforms
Wire sohuhao, wangyihao, juejin, smzdm, weixin-gzh, zol, and dongchedi into the publish runtime: each ships its own publish protocol and auth-failure classifier (login/token/challenge codes) plus registry entries in selectPublishAdapter and the auth adapter map. Smzdm bind detection now triple-falls-back across page-context fetch, session fetch, cookie fetch, and a final cookie-derived account so the nickname-less guest profile still resolves to a stable platform UID. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,11 +19,18 @@ import { getAIPlatformCatalogItem, isAIPlatformId } from "@geo/shared-types";
|
||||
import {
|
||||
baijiahaoAdapter,
|
||||
bilibiliAdapter,
|
||||
dongchediAdapter,
|
||||
getMonitorAdapter,
|
||||
jianshuAdapter,
|
||||
juejinAdapter,
|
||||
qiehaoAdapter,
|
||||
smzdmAdapter,
|
||||
sohuhaoAdapter,
|
||||
toutiaoAdapter,
|
||||
wangyihaoAdapter,
|
||||
weixinGzhAdapter,
|
||||
zhihuAdapter,
|
||||
zolAdapter,
|
||||
type AdapterExecutionResult,
|
||||
type MonitorAdapter,
|
||||
type PublishAdapter,
|
||||
@@ -2895,18 +2902,39 @@ function selectPublishAdapter(platform: string): PublishAdapter | null {
|
||||
if (platform === baijiahaoAdapter.platform) {
|
||||
return baijiahaoAdapter;
|
||||
}
|
||||
if (platform === sohuhaoAdapter.platform) {
|
||||
return sohuhaoAdapter;
|
||||
}
|
||||
if (platform === zhihuAdapter.platform) {
|
||||
return zhihuAdapter;
|
||||
}
|
||||
if (platform === wangyihaoAdapter.platform) {
|
||||
return wangyihaoAdapter;
|
||||
}
|
||||
if (platform === jianshuAdapter.platform) {
|
||||
return jianshuAdapter;
|
||||
}
|
||||
if (platform === juejinAdapter.platform) {
|
||||
return juejinAdapter;
|
||||
}
|
||||
if (platform === qiehaoAdapter.platform) {
|
||||
return qiehaoAdapter;
|
||||
}
|
||||
if (platform === bilibiliAdapter.platform) {
|
||||
return bilibiliAdapter;
|
||||
}
|
||||
if (platform === smzdmAdapter.platform) {
|
||||
return smzdmAdapter;
|
||||
}
|
||||
if (platform === weixinGzhAdapter.platform) {
|
||||
return weixinGzhAdapter;
|
||||
}
|
||||
if (platform === zolAdapter.platform) {
|
||||
return zolAdapter;
|
||||
}
|
||||
if (platform === dongchediAdapter.platform) {
|
||||
return dongchediAdapter;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user