dsh-dpharness 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/changelog.js +10 -0
- package/lib/client.js +113 -6
- package/lib/index.js +71 -1
- package/package.json +1 -1
package/lib/changelog.js
CHANGED
|
@@ -37,6 +37,16 @@ export function npmLatestUrl(pkg) {
|
|
|
37
37
|
* (用户要看的是行为变化,不是我们的 commit 分类)。
|
|
38
38
|
*/
|
|
39
39
|
export const CHANGELOG = [
|
|
40
|
+
{
|
|
41
|
+
version: "0.8.0",
|
|
42
|
+
date: "2026-11-18",
|
|
43
|
+
title: "插件面板新增可合作的展示位",
|
|
44
|
+
items: [
|
|
45
|
+
"严选插件库面板里新增三处展示位:右栏、列表上方与页脚。它们是给合作方展示信息的卡片,与「今日推荐」完全分开,不会混进推荐结论里。",
|
|
46
|
+
"付费合作的内容会明确标注「广告」,与网站上的标注方式一致;站内自荐内容则显示自己的标签。",
|
|
47
|
+
"展示内容由网站统一配置,调整物料不需要更新插件;没有合作内容时这些位置不会出现,也不会留下空白占位。",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
40
50
|
{
|
|
41
51
|
version: "0.7.1",
|
|
42
52
|
date: "2026-11-18",
|
package/lib/client.js
CHANGED
|
@@ -185,6 +185,16 @@ window.__ModuleLoader__.load({
|
|
|
185
185
|
两类都不抢主 CTA 视觉,但能一眼看出这条是否与网站一致。 */
|
|
186
186
|
".dph_dailyMode{font-size:11px;line-height:1.5;margin:4px 0 0;color:var(--dsw-alias-label-tertiary)}",
|
|
187
187
|
".dph_dailyModeSite{color:var(--dsw-alias-success-fg,#16a34a)}",
|
|
188
|
+
/* 招商物料卡(2026-11-18):沿用 dph_railCard 卡片语言,但整体更轻——
|
|
189
|
+
角标固定「广告」、不抢安装主 CTA 的实心 accent。三处共用同一组件。 */
|
|
190
|
+
".dph_adCard{position:relative;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;padding:10px 12px;background:var(--dsw-alias-bg-secondary,transparent)}",
|
|
191
|
+
".dph_adBadge{display:inline-block;font-size:10px;line-height:1;padding:3px 5px;border-radius:4px;background:var(--dsw-alias-bg-tertiary,rgba(127,127,127,.15));color:var(--dsw-alias-label-secondary);vertical-align:middle;margin-right:6px}",
|
|
192
|
+
".dph_adBadgeOwn{color:var(--dsw-alias-accent-fg,#0a7)}",
|
|
193
|
+
".dph_adBrand{font-size:11px;color:var(--dsw-alias-label-secondary)}",
|
|
194
|
+
".dph_adTitle{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary);margin:4px 0 2px;line-height:1.45}",
|
|
195
|
+
".dph_adDesc{font-size:11px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}",
|
|
196
|
+
".dph_adCta{display:inline-block;margin-top:6px;font-size:11px;color:var(--dsw-alias-accent-fg,#0a7);text-decoration:none}",
|
|
197
|
+
".dph_adCta:hover{text-decoration:underline}",
|
|
188
198
|
".dph_setState{flex:none;font-size:12px;color:var(--dsw-alias-label-secondary)}",
|
|
189
199
|
/* 更新日志:版本折叠列表。复用 details/summary(与分类精选同一手法)——
|
|
190
200
|
原生折叠无需自己管状态,键盘可达性也白送。 */
|
|
@@ -469,6 +479,7 @@ window.__ModuleLoader__.load({
|
|
|
469
479
|
"daily.why": "为什么是它",
|
|
470
480
|
"daily.hint": "每天 00:00(北京时间)换一条,当天对所有用户一致。",
|
|
471
481
|
"daily.modeSite": "与 dpharness.com 今日推荐同源",
|
|
482
|
+
"ad.badge": "广告",
|
|
472
483
|
"daily.modeLocal": "本站推荐暂不可用,当前显示本地口径(可能与网站不同)",
|
|
473
484
|
"daily.expand": "展开",
|
|
474
485
|
"daily.collapse": "收起",
|
|
@@ -805,6 +816,7 @@ window.__ModuleLoader__.load({
|
|
|
805
816
|
"daily.why": "Why this one",
|
|
806
817
|
"daily.hint": "Rotates at 00:00 (UTC+8); identical for everyone that day.",
|
|
807
818
|
"daily.modeSite": "Same as today's pick on dpharness.com",
|
|
819
|
+
"ad.badge": "Ad",
|
|
808
820
|
"daily.modeLocal": "Site pick unavailable; showing local result (may differ from the website)",
|
|
809
821
|
"daily.expand": "Expand",
|
|
810
822
|
"daily.collapse": "Collapse",
|
|
@@ -2684,11 +2696,95 @@ window.__ModuleLoader__.load({
|
|
|
2684
2696
|
if (mode === "site") {
|
|
2685
2697
|
return { picked: { item: dailyPick.item, cat: dailyPick.cat, sub: dailyPick.sub }, mode };
|
|
2686
2698
|
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2699
|
+
return { picked: best.state.data ? pickDaily(best.state.data, dateKey) : null, mode };
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
/* 招商物料取数(2026-11-18,PRD-插件招商广告位)。
|
|
2703
|
+
站点 /api/plugin-ads 一次返回三个位的物料,经 host /api/dpharness/plugin-ads 转发。
|
|
2704
|
+
模块级共享:面板里三处(右栏/主列/页脚)各渲染一张卡,但只发一次请求。
|
|
2705
|
+
上刊免发版:host 缓存 60s、站点 no-store;这里组件挂载后取一次,切视图不重取。 */
|
|
2706
|
+
let pluginAdsShared = null;
|
|
2707
|
+
let pluginAdsInflight = null;
|
|
2708
|
+
|
|
2709
|
+
function usePluginAds(t, enabled) {
|
|
2710
|
+
const [, force] = react.useState(0);
|
|
2711
|
+
react.useEffect(() => {
|
|
2712
|
+
if (!enabled || pluginAdsShared || pluginAdsInflight) return undefined;
|
|
2713
|
+
const controller = new AbortController();
|
|
2714
|
+
const timer = setTimeout(() => controller.abort(), 20000);
|
|
2715
|
+
pluginAdsInflight = readHostJson("/api/dpharness/plugin-ads", controller.signal)
|
|
2716
|
+
.then((body) => {
|
|
2717
|
+
if (controller.signal.aborted) return;
|
|
2718
|
+
pluginAdsShared = Array.isArray(body && body.items) ? body.items : [];
|
|
2719
|
+
force((n) => n + 1);
|
|
2720
|
+
})
|
|
2721
|
+
.catch(() => {
|
|
2722
|
+
pluginAdsShared = []; // 取数失败 = 不渲染广告,绝不阻塞面板
|
|
2723
|
+
force((n) => n + 1);
|
|
2724
|
+
})
|
|
2725
|
+
.finally(() => { pluginAdsInflight = null; clearTimeout(timer); });
|
|
2726
|
+
return () => { clearTimeout(timer); controller.abort(); };
|
|
2727
|
+
}, [enabled]);
|
|
2728
|
+
return pluginAdsShared;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* 招商物料卡。三处(右栏 / 主列 / 页脚)共用同一组件,避免三套口径。
|
|
2733
|
+
*
|
|
2734
|
+
* 🔴 角标合规(沿用站内 config/sponsor.ts):kind="ad" 强制渲染「广告」,
|
|
2735
|
+
* **不读物料的 tag 字段**(tag 可被配置改写,不能承载广告标识);
|
|
2736
|
+
* 只有 kind="own" 才显示物料自带的 tag。与站内 SponsorSlot 完全同一条纪律。
|
|
2737
|
+
* 🔴 埋点走 plugin_hub 事件(插件唯一能进站点的通道),位与物料 id 用
|
|
2738
|
+
* host buildTrackPayload 白名单里的 via / pkg 段承载(新增字段会被丢弃)。
|
|
2739
|
+
*/
|
|
2740
|
+
function AdCard(props) {
|
|
2741
|
+
// 🔴 必须是组件形式(h(AdCard, props))而非普通函数调用 —— 内部有 hooks。
|
|
2742
|
+
// 站内既有 dailyCard/railDailyCard 是纯函数(无 hooks),不要照抄那个调用方式。
|
|
2743
|
+
const item = props && props.item;
|
|
2744
|
+
const t = props && props.t;
|
|
2745
|
+
const hasItem = !!(item && item.slot);
|
|
2746
|
+
react.useEffect(() => {
|
|
2747
|
+
if (!hasItem) return;
|
|
2748
|
+
// via=位、pkg=物料 id —— 二者都在 buildTrackPayload 的白名单段内
|
|
2749
|
+
track("plugin_hub", {
|
|
2750
|
+
action: "ad_show", via: item.code || item.slot,
|
|
2751
|
+
pkg: String(item.id || "").slice(0, 64),
|
|
2752
|
+
});
|
|
2753
|
+
}, [hasItem, item && item.id]);
|
|
2754
|
+
if (!hasItem) return null;
|
|
2755
|
+
const slotCode = item.code || item.slot;
|
|
2756
|
+
const isAd = item.kind === "ad";
|
|
2757
|
+
const badge = isAd ? t("ad.badge") : (item.tag || t("ad.badge"));
|
|
2758
|
+
const href = String(item.url || "");
|
|
2759
|
+
const external = item.external !== false && /^https?:\/\//i.test(href);
|
|
2760
|
+
const report = (action) => {
|
|
2761
|
+
track("plugin_hub", { action, via: slotCode, pkg: String(item.id || "").slice(0, 64) });
|
|
2762
|
+
};
|
|
2763
|
+
return h("div", { className: "dph_adCard", "data-ad-slot": item.slot, key: "ad-" + item.slot }, [
|
|
2764
|
+
h("div", { className: "dph_bar", key: "head" }, [
|
|
2765
|
+
h("span", {
|
|
2766
|
+
className: "dph_adBadge" + (isAd ? "" : " dph_adBadgeOwn"),
|
|
2767
|
+
key: "badge",
|
|
2768
|
+
}, badge),
|
|
2769
|
+
item.brand ? h("span", { className: "dph_adBrand", key: "brand" }, item.brand) : null,
|
|
2770
|
+
]),
|
|
2771
|
+
h("div", { className: "dph_adTitle", key: "title" }, item.title),
|
|
2772
|
+
item.desc ? h("div", { className: "dph_adDesc", key: "desc" }, item.desc) : null,
|
|
2773
|
+
Array.isArray(item.points) && item.points.length
|
|
2774
|
+
? h("div", { className: "dph_tags", key: "points" }, item.points.slice(0, 3).map((p, i) =>
|
|
2775
|
+
h("span", { className: "dph_tag", key: "p" + i }, p)))
|
|
2776
|
+
: null,
|
|
2777
|
+
h("a", {
|
|
2778
|
+
className: "dph_adCta", key: "cta", href,
|
|
2779
|
+
target: external ? "_blank" : undefined,
|
|
2780
|
+
rel: external ? "noopener noreferrer" : undefined,
|
|
2781
|
+
onClick: () => report("ad_click"),
|
|
2782
|
+
}, item.cta || t("action.openSite")),
|
|
2783
|
+
]);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
/**
|
|
2787
|
+
* 「套装」取数(站点 /sets 的同源数据,经本机 host 转发)。
|
|
2692
2788
|
*
|
|
2693
2789
|
* 与 useBest 同一条纪律:只在切到该视图时才请求;拿到一次就不再重复,
|
|
2694
2790
|
* 点刷新才重取(缓存交给 host,TTL 5 分钟)。
|
|
@@ -5085,6 +5181,9 @@ window.__ModuleLoader__.load({
|
|
|
5085
5181
|
const best = useBest(t, mode === "best" || mode === "daily" || state.daily);
|
|
5086
5182
|
// 今日推荐同源(2026-11-18):与 best 同开关,三组件共享模块级缓存只发一次
|
|
5087
5183
|
const dailyPick = useDailyPick(t, mode === "best" || mode === "daily" || state.daily, dateKey);
|
|
5184
|
+
// 招商物料(2026-11-18):三个位一次请求,模块级共享
|
|
5185
|
+
const ads = usePluginAds(t, mode === "best" || mode === "daily" || state.daily);
|
|
5186
|
+
const adOf = (slot) => ads && ads.find((a) => a.slot === slot);
|
|
5088
5187
|
const sets = useSets(t, mode === "sets");
|
|
5089
5188
|
const board = useBoard(t, boardKind, mode === "board");
|
|
5090
5189
|
const data = cat.state.data;
|
|
@@ -5270,7 +5369,9 @@ window.__ModuleLoader__.load({
|
|
|
5270
5369
|
/* 社群 + 订阅:与待重启横幅同一层(常驻、不随列表滚走)。展开二维码后
|
|
5271
5370
|
会把列表往下推约 120px —— 可接受,因为它是点击后的主动结果。 */
|
|
5272
5371
|
h(JoinCard, { key: "join" }),
|
|
5372
|
+
h(AdCard, { item: adOf("plugin-inline"), t: t, scope: "tab", key: "ad-inline" }),
|
|
5273
5373
|
...body,
|
|
5374
|
+
h(AdCard, { item: adOf("plugin-footer"), t: t, scope: "tab", key: "ad-footer" }),
|
|
5274
5375
|
h("div", { className: "dph_footer", key: "hint" }, t("footer.hint")),
|
|
5275
5376
|
h("div", { className: "dph_footer", key: "tel" }, h("div", { className: "dph_footToggles" }, [telemetryToggle(), floatToggle()])),
|
|
5276
5377
|
]),
|
|
@@ -5278,7 +5379,9 @@ window.__ModuleLoader__.load({
|
|
|
5278
5379
|
showRailDaily
|
|
5279
5380
|
? h("div", { className: "dph_dailySlot", key: "dslot" }, railDailyCard(best, cat.copiedCmd, cat.markCopied, dateKey, dailyPick))
|
|
5280
5381
|
: null,
|
|
5281
|
-
h("div", { className: "dph_railSlot", key: "rslot" }, [highlightCard, installCard
|
|
5382
|
+
h("div", { className: "dph_railSlot", key: "rslot" }, [highlightCard, installCard,
|
|
5383
|
+
h(AdCard, { item: adOf("plugin-rail"), t: t, scope: "tab", key: "ad-rail" }),
|
|
5384
|
+
].filter(Boolean)),
|
|
5282
5385
|
]),
|
|
5283
5386
|
]);
|
|
5284
5387
|
}
|
|
@@ -5385,6 +5488,9 @@ window.__ModuleLoader__.load({
|
|
|
5385
5488
|
const best = useBest(t, state.open && (mode === "best" || mode === "daily" || state.daily));
|
|
5386
5489
|
// 今日推荐同源(2026-11-18):面板收成胶囊时(!state.open)不发请求
|
|
5387
5490
|
const dailyPick = useDailyPick(t, state.open && (mode === "best" || mode === "daily" || state.daily), dateKey);
|
|
5491
|
+
// 招商物料(2026-11-18):面板是 400px 窄形态,只放页脚位 P3(与页签共用缓存,不额外请求)
|
|
5492
|
+
const ads = usePluginAds(t, state.open && (mode === "best" || mode === "daily" || state.daily));
|
|
5493
|
+
const adFooter = ads && ads.find((a) => a.slot === "plugin-footer");
|
|
5388
5494
|
const bestData = best.state.data;
|
|
5389
5495
|
const sets = useSets(t, state.open && mode === "sets");
|
|
5390
5496
|
const setsData = sets.state.data;
|
|
@@ -5580,6 +5686,7 @@ window.__ModuleLoader__.load({
|
|
|
5580
5686
|
/* 浮窗里也放一份:浮窗是曝光最高的入口,只有页签有等于大半用户看不到。
|
|
5581
5687
|
compact 版省掉说明行,二维码默认收起(面板只有 400px 宽)。 */
|
|
5582
5688
|
h(JoinCard, { key: "join", compact: true }),
|
|
5689
|
+
h(AdCard, { item: adFooter, t: t, scope: "panel", key: "ad-footer" }),
|
|
5583
5690
|
h("div", { className: "dph_footRow", key: "row" }, [
|
|
5584
5691
|
telemetryToggle(),
|
|
5585
5692
|
h("button", {
|
package/lib/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export const name = "dpharness";
|
|
|
48
48
|
/** The dsh web server service used to register HTTP routes. */
|
|
49
49
|
export const inject = ["webServer"];
|
|
50
50
|
|
|
51
|
-
export const VERSION = "0.
|
|
51
|
+
export const VERSION = "0.8.0";
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* 本插件在 npm 上的包名 —— 与 dsh 的插件 id(上面的 `name = "dpharness"`)**不是一回事**,
|
|
@@ -271,6 +271,10 @@ const BEST_UPSTREAM = "https://dpharness.com/api/best";
|
|
|
271
271
|
const SETS_UPSTREAM = "https://dpharness.com/api/sets";
|
|
272
272
|
/** 「今日推荐」的上游:站点的唯一选取实现(2026-11-18 接入,见 fetchDailyPick)。 */
|
|
273
273
|
const DAILY_PICK_UPSTREAM = "https://dpharness.com/api/daily-pick";
|
|
274
|
+
/** 招商物料的上游(2026-11-18,PRD-插件招商广告位)。站点 no-store,插件侧只做短缓存。 */
|
|
275
|
+
const PLUGIN_ADS_UPSTREAM = "https://dpharness.com/api/plugin-ads";
|
|
276
|
+
/** 物料缓存 60s:上刊/下刊最多等 1 分钟生效,同时避免每次开面板都打上游。 */
|
|
277
|
+
const PLUGIN_ADS_TTL_MS = 60 * 1000;
|
|
274
278
|
const SITE = "https://dpharness.com";
|
|
275
279
|
const TRACK = "https://dpharness.com/api/track/event";
|
|
276
280
|
/**
|
|
@@ -875,6 +879,8 @@ const cache = new Map();
|
|
|
875
879
|
let bestCache = { at: 0, value: null };
|
|
876
880
|
/** /api/daily-pick 的结果缓存(按自然日缓存,跨日必失效——推荐是「今天」的语义)。 */
|
|
877
881
|
let dailyPickCache = { date: "", value: null };
|
|
882
|
+
/** /api/plugin-ads 的物料缓存(短 TTL,保证上刊免发版且不过度打上游)。 */
|
|
883
|
+
let pluginAdsCache = { at: 0, value: null };
|
|
878
884
|
/** /api/sets 单键缓存(套装同样每月才同步一次,缓存策略与 /best 一致) */
|
|
879
885
|
let setsCache = { at: 0, value: null };
|
|
880
886
|
let eventWindow = { startedAt: 0, count: 0 };
|
|
@@ -2201,6 +2207,69 @@ export function apply(ctx) {
|
|
|
2201
2207
|
}
|
|
2202
2208
|
});
|
|
2203
2209
|
|
|
2210
|
+
/* 招商物料转发(2026-11-18,PRD-插件招商广告位)。
|
|
2211
|
+
站点的 /api/plugin-ads 只下发展示字段,插件 UI 不能直接跨域请求站点,故经本机 host 转发。
|
|
2212
|
+
🔴 免发版语义:物料在站点 overrides.json 改完即生效;本路由只缓存 60s,不缓存到自然日。
|
|
2213
|
+
上游失败/形状非法一律返回空数组 —— 插件侧不渲染、不留空角标,绝不把错误伪装成物料。 */
|
|
2214
|
+
registerRoute(ctx, "/api/dpharness/plugin-ads", async (req, res) => {
|
|
2215
|
+
if (req.method !== "GET") {
|
|
2216
|
+
res.writeHead(405, { allow: "GET" });
|
|
2217
|
+
res.end();
|
|
2218
|
+
return;
|
|
2219
|
+
}
|
|
2220
|
+
const now = Date.now();
|
|
2221
|
+
if (pluginAdsCache.value && now - pluginAdsCache.at < PLUGIN_ADS_TTL_MS) {
|
|
2222
|
+
sendJson(res, 200, { ok: true, items: pluginAdsCache.value, cached: true, fetchedAt: pluginAdsCache.at });
|
|
2223
|
+
return;
|
|
2224
|
+
}
|
|
2225
|
+
const controller = new AbortController();
|
|
2226
|
+
const timer = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
|
|
2227
|
+
try {
|
|
2228
|
+
const response = await fetch(PLUGIN_ADS_UPSTREAM, {
|
|
2229
|
+
headers: { accept: "application/json", "user-agent": `dsh-dpharness/${VERSION}` },
|
|
2230
|
+
signal: controller.signal,
|
|
2231
|
+
});
|
|
2232
|
+
if (!response.ok) throw new Error(`upstream HTTP ${response.status}`);
|
|
2233
|
+
const body = await response.json();
|
|
2234
|
+
if (!body || !Array.isArray(body.items)) throw new Error("items missing");
|
|
2235
|
+
// 形状校验:只保留能安全渲染的字段,缺关键字段的物料直接丢弃(不留空角标)
|
|
2236
|
+
const ALLOWED_SLOTS = ["plugin-rail", "plugin-inline", "plugin-footer"];
|
|
2237
|
+
const items = body.items.filter((it) => {
|
|
2238
|
+
if (!it || typeof it !== "object") return false;
|
|
2239
|
+
if (!ALLOWED_SLOTS.includes(it.slot)) return false;
|
|
2240
|
+
if (typeof it.title !== "string" || typeof it.url !== "string" || !it.url) return false;
|
|
2241
|
+
if (it.kind !== "ad" && it.kind !== "own") return false;
|
|
2242
|
+
return true;
|
|
2243
|
+
}).map((it) => ({
|
|
2244
|
+
slot: it.slot,
|
|
2245
|
+
code: typeof it.code === "string" ? it.code : it.slot,
|
|
2246
|
+
id: typeof it.id === "string" ? it.id : "",
|
|
2247
|
+
kind: it.kind,
|
|
2248
|
+
tag: typeof it.tag === "string" ? it.tag : "",
|
|
2249
|
+
brand: typeof it.brand === "string" ? it.brand : "",
|
|
2250
|
+
title: it.title.slice(0, 120),
|
|
2251
|
+
desc: typeof it.desc === "string" ? it.desc.slice(0, 280) : "",
|
|
2252
|
+
points: Array.isArray(it.points) ? it.points.slice(0, 3).filter((p) => typeof p === "string") : [],
|
|
2253
|
+
cta: typeof it.cta === "string" ? it.cta.slice(0, 60) : "",
|
|
2254
|
+
url: it.url.slice(0, 500),
|
|
2255
|
+
external: it.external !== false,
|
|
2256
|
+
}));
|
|
2257
|
+
pluginAdsCache = { at: Date.now(), value: items };
|
|
2258
|
+
sendJson(res, 200, {
|
|
2259
|
+
ok: true, items, cached: false,
|
|
2260
|
+
fetchedAt: pluginAdsCache.at, ts: typeof body.ts === "number" ? body.ts : pluginAdsCache.at,
|
|
2261
|
+
});
|
|
2262
|
+
} catch (error) {
|
|
2263
|
+
// 上游故障 ≠ 物料为空,分开给 reason 便于埋点区分;两者都不渲染卡片
|
|
2264
|
+
sendJson(res, 200, {
|
|
2265
|
+
ok: true, items: [], cached: false, reason: "upstream_unavailable",
|
|
2266
|
+
error: String((error && error.message) || error),
|
|
2267
|
+
});
|
|
2268
|
+
} finally {
|
|
2269
|
+
clearTimeout(timer);
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
|
|
2204
2273
|
// 「组合方案套装」:站点 /sets 专区的同源数据(跨插件纵向组合,见 fetchSets 注释)
|
|
2205
2274
|
registerRoute(ctx, "/api/dpharness/sets", async (req, res) => {
|
|
2206
2275
|
if (req.method !== "GET") {
|
|
@@ -2721,6 +2790,7 @@ export function apply(ctx) {
|
|
|
2721
2790
|
"/api/dpharness/search",
|
|
2722
2791
|
"/api/dpharness/best",
|
|
2723
2792
|
"/api/dpharness/daily-pick",
|
|
2793
|
+
"/api/dpharness/plugin-ads",
|
|
2724
2794
|
"/api/dpharness/sets",
|
|
2725
2795
|
"/api/dpharness/event",
|
|
2726
2796
|
"/api/dpharness/subscribe",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-dpharness",
|
|
3
3
|
"icon": "./icon.svg",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"description": "Curated dpharness.com plugin catalog inside the DeepSeek Harness Web GUI: a conversation-view tab, a sidebar entry and a dismissible site-wide floating panel, offering a searchable full catalog, a monthly by-category shortlist, a daily pick and an update check (this plugin plus every installed plugin) with a red-dot reminder, with one-click install via dshmarket or the dsh CLI. Includes a settings page (General row + Plugins tab) for the widget visibility, the daily pick, the update check and the opt-out telemetry relay covering the full install funnel.",
|
|
6
6
|
"author": "zhanghao3693 <zhanghao3693@qq.com>",
|
|
7
7
|
"repository": {
|