Skip to content

Commit

Permalink
Merge pull request #190 from sdttttt/SDTTTTT
Browse files Browse the repository at this point in the history
  • Loading branch information
sdttttt authored Apr 7, 2021
2 parents 7cd3934 + 7c90e3e commit ee57338
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 11 deletions.
56 changes: 56 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
27 changes: 27 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/sdttttt/vscode-bangumi
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,10 @@ All notable changes to the **Bangumi Open** extension will be documented in this
### Fix

- 修复遇到空时间段番剧不显示提醒状态栏的问题. (Fix #187)

## [2.2.7] - 2021-4-7

### Feat

- 更新依赖.
- 增加了一个计数通知请求, 现在BangumiOpen会统计大🔥的使用每个功能的次数. 这个数据是公开的我会定时发布.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"displayName": "Bangumi Open",
"description": "Support Browse Bangumi for vscode.",
"preview": false,
"version": "2.2.6",
"version": "2.2.7",
"license": "SEE LICENSE IN LICENSE",
"icon": "Icon.png",
"engines": {
Expand Down Expand Up @@ -147,12 +147,12 @@
"mocha": "^7.1.0",
"prettier": "^2.2.1",
"progress-bar-webpack-plugin": "^2.1.0",
"ts-loader": "^8.0.18",
"ts-loader": "^8.1.0",
"tslint": "^6.1.0",
"typescript": "^3.6.4",
"typescript-eslint-parser": "^22.0.0",
"vscode-test": "^1.5.2",
"webpack": "^5.24.2",
"webpack": "^5.30.0",
"webpack-cli": "^4.2.0",
"webpack-notifier": "^1.13.0"
}
Expand Down
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as vscode from "vscode";
import BangumiView from "./views/bangumi";
import WeekBangumiView from "./views/weekBangumi";
import { useReminderNoticeHuck } from "./request/huck"
import { setContext } from "./constants";
import { getConfig } from "./configuration";
import MainIndexList from "./match/";
Expand Down Expand Up @@ -35,6 +36,7 @@ export function activate(context: vscode.ExtensionContext): void {

if (useReminder as boolean) {
Reminder.enableBangumiUpdateReminder();
useReminderNoticeHuck();
}

// The command has been defined in the package.json file
Expand Down
13 changes: 13 additions & 0 deletions src/request/huck.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Axios from "./instance";

export async function useReminderNoticeHuck(): Promise<void> {
Axios.get("http://118.25.6.84:10086/reminder");
}

export async function useWeekBangumiNoticeHuck(): Promise<void> {
Axios.get("http://118.25.6.84:10086/week");
}

export async function useBangumiNoticeHuck(): Promise<void> {
Axios.get("http://118.25.6.84:10086/bangumi");
}
3 changes: 3 additions & 0 deletions src/views/bangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as vscode from "vscode";
import { getAllBangumi } from "../request/bangumi";
import BangumisHTMLGenerator from "../html/bangumiHtml";
import { BangumiUrl } from "../request/bangumiUrl";
import { useBangumiNoticeHuck } from "../request/huck"
import { Bangumi, BangumisData } from "../request/structure";
import { toNumber } from "../utils/type";
import AbstractView from "./view";
Expand Down Expand Up @@ -84,6 +85,8 @@ export default new (class BangumisView extends AbstractView {
).then((data: BangumisData | undefined) =>
this.createBangumiView(data)
);

useBangumiNoticeHuck();
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/views/weekBangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getWeekBangumi } from "../request/bangumi";
import * as vscode from "vscode";
import WeekBangumisHTMLGenerator from "../html/weekBangumiHtml";
import { WeekBangumiData } from "../request/structure";
import { useWeekBangumiNoticeHuck } from "../request/huck";
import AbstractView from "./view";

/**
Expand Down Expand Up @@ -46,5 +47,7 @@ export default new (class WeekBangumisView extends AbstractView {
this.createWeekBangumiView(result);
}
});

useWeekBangumiNoticeHuck();
}
})();
23 changes: 15 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,13 @@ axios@*, axios@^0.21.1:
dependencies:
follow-redirects "^1.10.0"

axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "^1.10.0"

babel-loader@^8.2.2:
version "8.2.2"
resolved "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81"
Expand Down Expand Up @@ -6733,10 +6740,10 @@ trim-repeated@^1.0.0:
dependencies:
escape-string-regexp "^1.0.2"

ts-loader@^8.0.18:
version "8.0.18"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.0.18.tgz#b2385cbe81c34ad9f997915129cdde3ad92a61ea"
integrity sha512-hRZzkydPX30XkLaQwJTDcWDoxZHK6IrEMDQpNd7tgcakFruFkeUp/aY+9hBb7BUGb+ZWKI0jiOGMo0MckwzdDQ==
ts-loader@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.1.0.tgz#d6292487df279c7cc79b6d3b70bb9d31682b693e"
integrity sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A==
dependencies:
chalk "^4.1.0"
enhanced-resolve "^4.0.0"
Expand Down Expand Up @@ -7168,10 +7175,10 @@ webpack-sources@^2.1.1:
source-list-map "^2.0.1"
source-map "^0.6.1"

webpack@^5.24.2:
version "5.24.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.2.tgz#33790dad631e8b639f4246d762e257720875fe54"
integrity sha512-uxxKYEY4kMNjP+D2Y+8aw5Vd7ar4pMuKCNemxV26ysr1nk0YDiQTylg9U3VZIdkmI0YHa0uC8ABxL+uGxGWWJg==
webpack@^5.30.0:
version "5.30.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.30.0.tgz#07d87c182a060e0c2491062f3dc0edc85a29d884"
integrity sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA==
dependencies:
"@types/eslint-scope" "^3.7.0"
"@types/estree" "^0.0.46"
Expand Down

0 comments on commit ee57338

Please sign in to comment.