Skip to content

Commit fa15ee1

Browse files
authored
refactor(core): 重构核心实现 (#14)
- 使用react作为模板渲染 - 重构订阅推送实现 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit # Release Notes * **New Features** * Added multi-platform Git repository support for GitHub, Gitee, GitCode, and CnbCool * Implemented React-based visual rendering template for commit information display * **Infrastructure Changes** * Migrated package manager from bun to pnpm * Restructured project into workspace with separate core and template packages * Updated release configuration for multi-package versioning * **Project Updates** * Updated package metadata and license to LGPL-3.0-only * Refactored build configuration and development workflows <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent fa741ea commit fa15ee1

122 files changed

Lines changed: 5998 additions & 3225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@ jobs:
1616
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
1717
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
1818

19-
- name: 设置 bun
20-
uses: oven-sh/setup-bun@v2
19+
- name: 配置 pnpm
20+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
2121
with:
22-
bun-version: latest
23-
22+
version: 10.25.0
23+
2424
- name: 构建plugin
2525
run: |
26-
bun install
27-
bun run build
26+
pnpm install
27+
pnpm run build
2828
mkdir -p ${{ runner.temp }}/temp/plugin
29-
cp -r package.json CHANGELOG.md README.md LICENSE resources config lib ${{ runner.temp }}/temp/plugin
29+
cp -r README.md LICENSE ${{ runner.temp }}/temp/plugin
30+
31+
- name: 处理构建产物
32+
run: |
33+
34+
cp -r package.json CHANGELOG.md resources config lib ${{ runner.temp }}/temp/plugin
35+
working-directory: packages/core
3036

3137
- name: 上传plugin构建产物
3238
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
node_modules/
2-
.idea/
3-
@karinjs/
4-
lib/
1+
**/node_modules/**
2+
.idea/

.release-please-config.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
33
"release-type": "node",
4-
"include-component-in-tag": false,
4+
"include-component-in-tag": true,
5+
"plugins": [
6+
{
7+
"type": "linked-versions",
8+
"groupName": "nipaw",
9+
"components": ["core", "template"]
10+
}
11+
],
512
"changelog-sections": [
613
{
714
"type": "feat",
@@ -64,8 +71,13 @@
6471
}
6572
],
6673
"packages": {
67-
".": {
68-
"release-type": "node"
74+
"packages/core": {
75+
"release-type": "node",
76+
"component": "core"
77+
},
78+
"packages/template": {
79+
"release-type": "node",
80+
"component": "template"
6981
}
7082
},
7183
"commit-search-depth": 50

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
".": "1.3.0"
2+
"packages/core": "1.3.0",
3+
"packages/template": "1.3.0"
34
}

.vscode/setting.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
3+
}

package.json

Lines changed: 18 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,32 @@
11
{
2-
"name": "@candriajs/karin-plugin-git",
3-
"version": "1.3.0",
4-
"description": "一个karin的git平台仓库订阅推送",
5-
"keywords": [
6-
"karin-plugin",
7-
"karin-plugin-git"
8-
],
9-
"homepage": "https://github.com/CandriaJS/karin-plugin-git",
10-
"bugs": {
11-
"url": "https://github.com/CandriaJS/karin-plugin-git/issues"
12-
},
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/CandriaJS/karin-plugin-git.git"
16-
},
17-
"license": "GNU General Public License v3.0",
2+
"name": "@candriajs/git-poject",
3+
"version": "1.0.0",
4+
"description": "",
5+
"keywords": [],
6+
"license": "GPL-3.0-or-later",
187
"author": "CandriaJS",
198
"type": "module",
20-
"main": "lib/index.js",
21-
"files": [
22-
"config/",
23-
"lib/",
24-
"resources/",
25-
"LICENSE",
26-
"package.json",
27-
"README.md",
28-
"CHANGELOG.md"
29-
],
9+
"main": "",
3010
"scripts": {
31-
"app": "node --import tsx src/app.ts",
32-
"build": "tsc --noEmit && tsdown",
33-
"dev": "cross-env EBV_FILE=\"development.env\" node --import tsx src/app.ts",
34-
"lint": "eslint .",
35-
"lint:fix": "eslint . --fix",
36-
"pub": "npm publish --access public",
37-
"sort": "sort-package-json",
38-
"watch": "cross-env EBV_FILE=\"development.env\" tsx watch --include \"src/**/*.ts\" src/app.ts"
39-
},
40-
"dependencies": {
41-
"@mdit/plugin-tasklist": "^0.22.2",
42-
"@puniyu/component": "^0.6.0",
43-
"dayjs": "^1.11.19",
44-
"es-toolkit": "^1.41.0",
45-
"markdown-it": "^14.1.0",
46-
"markdown-it-emoji": "^3.0.0",
47-
"nipaw": "npm:@puniyu/nipaw@^1.9.2"
11+
"dev": "pnpm --filter @candriajs/karin-plugin-git dev",
12+
"build": "pnpm -r run build"
4813
},
4914
"devDependencies": {
50-
"@karinjs/plugin-puppeteer": "^1.0.21",
51-
"@prettier/plugin-oxc": "^0.0.4",
52-
"@types/express": "^5.0.5",
53-
"@types/markdown-it": "^14.1.2",
54-
"@types/markdown-it-emoji": "^3.0.1",
15+
"@prettier/plugin-oxc": "^0.1.3",
16+
"oxlint": "^1.32.0",
17+
"prettier": "^3.6.2",
5518
"@types/node": "^22.15.3",
5619
"cross-env": "^7.0.3",
57-
"node-karin": "^1.12.2",
58-
"oxlint": "^1.26.0",
59-
"prettier": "^3.6.2",
20+
"node-karin": "1.10.23",
6021
"tsc-alias": "1.8.13",
61-
"tsdown": "^0.15.12",
22+
"tsdown": "^0.17.2",
6223
"tsx": "^4.19.4",
63-
"typescript": "^5.8.3"
24+
"typescript": "^5.9.2"
6425
},
65-
"karin": {
66-
"main": "src/index.ts",
67-
"web": "./lib/web.config.js",
68-
"ts-web": "./src/web.config.ts",
69-
"apps": [
70-
"lib/apps"
71-
],
72-
"ts-apps": [
73-
"src/apps"
74-
],
75-
"static": [
76-
"resources"
77-
],
78-
"files": [
79-
"config",
80-
"data",
81-
"resources"
82-
],
83-
"engines": {
84-
"karin": ">=1.9.1"
26+
"pnpm": {
27+
"overrides": {
28+
"vite": "npm:rolldown-vite@latest"
8529
}
8630
},
87-
"packageManager": "pnpm@10.14.0"
31+
"packageManager": "pnpm@10.25.0"
8832
}
File renamed without changes.

packages/core/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@karinjs/
2+
lib/
File renamed without changes.

0 commit comments

Comments
 (0)