@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 ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## 0.0.1
4
+
5
+ - 初始化包结构:TypeScript + tsup 构建、Cordis 插件入口、市场元数据。
6
+ - 业务功能待实现(抓取、解析、中文摘要、写文件、分支与 PR、自动合并、调度、设置页)。
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
- # Temporary Holding Version
1
+ # dsh-github-trending
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
@@ -0,0 +1,7 @@
1
+ # dsh-github-trending profile bundle patch
2
+ # `name` 是宿主 import() 用的模块标识符,必须与 npm 包名一致。
3
+ # `id` 是 cordis 配置树内的键,与插件导出的插件名保持一致。
4
+ - insert:
5
+ - id: dsh-github-trending
6
+ name: '@morehao/dsh-github-trending'
7
+ config: {}
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
@@ -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.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
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
+ }