@morehao/dsh-github-trending 0.0.0-stage → 0.0.1
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/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +30 -2
- package/cordis.patch.yml +7 -0
- package/icon.svg +5 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/package.json +63 -4
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 morehao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-github-trending
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> GitHub 趋势日报插件:每天抓取 GitHub Trending,生成中文简介与当日总结,写进你自己的仓库,并自动提交与合并 PR。
|
|
4
|
+
|
|
5
|
+
**状态:脚手架(0.0.1)。** 包结构、构建与发布链路已就绪,业务功能按设计文档分阶段实现。
|
|
6
|
+
|
|
7
|
+
## 它做什么
|
|
8
|
+
|
|
9
|
+
- 每天定时抓取 `github.com/trending`(全语言 + 你指定的语言)
|
|
10
|
+
- 用宿主已配置的模型生成每个仓库的中文简介与当日总结
|
|
11
|
+
- 写入你指定的本地仓库,建 `trending/YYYY-MM-DD` 分支,提交、创建 PR 并按配置自动合并
|
|
12
|
+
- 认证优先「打开网页输码」的 OAuth Device Flow,也支持 PAT 与本机 `gh` 凭据
|
|
13
|
+
|
|
14
|
+
## 安装
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
dsh plugin --profile <profile> add @morehao/dsh-github-trending
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
装完重启宿主。
|
|
21
|
+
|
|
22
|
+
## 开发
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install
|
|
26
|
+
npm run build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 许可
|
|
30
|
+
|
|
31
|
+
MIT
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect x="4" y="4" width="56" height="56" rx="14" fill="#0d1117"/>
|
|
3
|
+
<path d="M18 46V22l14 12 14-12v24" fill="none" stroke="#58a6ff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<circle cx="32" cy="45" r="3" fill="#3fb950"/>
|
|
5
|
+
</svg>
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-github-trending — 插件入口(脚手架)
|
|
3
|
+
*
|
|
4
|
+
* 当前只做最小装配,验证包结构可被宿主加载。
|
|
5
|
+
* 业务模块(fetcher / parser / summarizer / renderer / git / pr)按设计文档分阶段接入。
|
|
6
|
+
*/
|
|
7
|
+
declare const name = "dsh-github-trending";
|
|
8
|
+
interface PluginLogger {
|
|
9
|
+
info?: (message: string) => void;
|
|
10
|
+
warn?: (message: string) => void;
|
|
11
|
+
}
|
|
12
|
+
interface PluginContext {
|
|
13
|
+
logger?: PluginLogger;
|
|
14
|
+
}
|
|
15
|
+
declare const inject: string[];
|
|
16
|
+
declare function apply(ctx: PluginContext): void;
|
|
17
|
+
declare const _default: {
|
|
18
|
+
name: string;
|
|
19
|
+
inject: string[];
|
|
20
|
+
apply: typeof apply;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { type PluginContext, type PluginLogger, apply, _default as default, inject, name };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
var name = "dsh-github-trending";
|
|
3
|
+
var inject = [];
|
|
4
|
+
function apply(ctx) {
|
|
5
|
+
ctx.logger?.info?.("[dsh-github-trending] loaded (scaffold)");
|
|
6
|
+
}
|
|
7
|
+
var index_default = { name, inject, apply };
|
|
8
|
+
export {
|
|
9
|
+
apply,
|
|
10
|
+
index_default as default,
|
|
11
|
+
inject,
|
|
12
|
+
name
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * dsh-github-trending — 插件入口(脚手架)\n *\n * 当前只做最小装配,验证包结构可被宿主加载。\n * 业务模块(fetcher / parser / summarizer / renderer / git / pr)按设计文档分阶段接入。\n */\n\nexport const name = 'dsh-github-trending'\n\nexport interface PluginLogger {\n info?: (message: string) => void\n warn?: (message: string) => void\n}\n\nexport interface PluginContext {\n logger?: PluginLogger\n}\n\nexport const inject: string[] = []\n\nexport function apply(ctx: PluginContext): void {\n ctx.logger?.info?.('[dsh-github-trending] loaded (scaffold)')\n}\n\nexport default { name, inject, apply }\n"],"mappings":";AAOO,IAAM,OAAO;AAWb,IAAM,SAAmB,CAAC;AAE1B,SAAS,MAAM,KAA0B;AAC9C,MAAI,QAAQ,OAAO,yCAAyC;AAC9D;AAEA,IAAO,gBAAQ,EAAE,MAAM,QAAQ,MAAM;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morehao/dsh-github-trending",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "GitHub 趋势日报插件:每日抓取 Trending、生成中文简介与总结,提交到自己仓库并自动合并 PR。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"lib",
|
|
18
|
+
"cordis.patch.yml",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"icon.svg"
|
|
23
|
+
],
|
|
24
|
+
"icon": "icon.svg",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"dsh",
|
|
27
|
+
"dsh-plugin",
|
|
28
|
+
"deepseek-harness",
|
|
29
|
+
"github",
|
|
30
|
+
"trending",
|
|
31
|
+
"daily-digest",
|
|
32
|
+
"chinese"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=22.20",
|
|
36
|
+
"dsh": ">=0.2.1-rc.3 <0.3.0-0"
|
|
37
|
+
},
|
|
38
|
+
"dsh": {
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"prepublishOnly": "npm run build"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^22.0.0",
|
|
50
|
+
"tsup": "^8.0.0",
|
|
51
|
+
"typescript": "^5.9.0"
|
|
52
|
+
},
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"author": "morehao <morehao@qq.com>",
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/morehao/dsh-github-trending.git"
|
|
58
|
+
},
|
|
59
|
+
"bugs": "https://github.com/morehao/dsh-github-trending/issues",
|
|
60
|
+
"homepage": "https://github.com/morehao/dsh-github-trending",
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"registry": "https://registry.npmjs.org"
|
|
64
|
+
}
|
|
65
|
+
}
|