Skip to content

Commit

Permalink
chore: release v1.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
aooiuu committed Aug 20, 2024
1 parent 0e2bb44 commit 06d2976
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "docs",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"private": true,
"scripts": {
"docs:dev": "vitepress dev",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "any-reader",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"private": true,
"packageManager": "pnpm@9.4.0",
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/cli",
"type": "commonjs",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down
25 changes: 13 additions & 12 deletions packages/cli/src/command/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,25 @@ async function checkRules(options: CheckOptions) {
const limit = pLimit(+options.concurrency);
const rows: Rule[] = JSON.parse(fs.readFileSync(input, 'utf-8'));

const progressBar = new SingleBar({});
const progressBar = new SingleBar({
format: '[检查规则] [{bar}] {percentage}% | {value}/{total}'
});
progressBar.start(rows.length, 0);
const validRules: Rule[] = [];

await Promise.all(
rows.map((row) =>
limit(() =>
timeoutWith(
ping(row.host)
.then((ping: number) => {
if (ping && ping !== -1) {
validRules.push(row);
}
})
.catch(() => {})
).finally(() => {
progressBar.increment();
})
timeoutWith(ping(row.host))
.then((ping: number) => {
if (ping && ping !== -1) {
validRules.push(row);
}
})
.catch(() => {})
.finally(() => {
progressBar.increment();
})
)
)
)
Expand Down
8 changes: 2 additions & 6 deletions packages/cli/src/utils/promise.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
export function timeoutWith(tasks: any, t = 6000) {
const delay = () =>
new Promise((_, reject) => {
setTimeout(reject, t);
});

return Promise.race([tasks, delay()]);
const delay = new Promise((_, reject) => setTimeout(reject, t));
return Promise.race([tasks, delay]);
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/core",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down
2 changes: 1 addition & 1 deletion packages/epub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@any-reader/epub",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"scripts": {
"build": "unbuild",
Expand Down
2 changes: 1 addition & 1 deletion packages/legado/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/legado",
"type": "module",
"version": "1.9.7",
"version": "1.10.5",
"private": true,
"description": "",
"author": "aooiuu <aooiu@qq.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/rubick/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/rubick",
"type": "commonjs",
"version": "1.10.4",
"version": "1.10.5",
"private": true,
"description": "",
"author": "aooiuu <aooiu@qq.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/rule-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/rule-utils",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/server",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@any-reader/shared",
"type": "module",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down
2 changes: 1 addition & 1 deletion packages/utools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@any-reader/utools",
"version": "1.10.4",
"version": "1.10.5",
"private": true,
"description": "",
"author": "aooiuu <aooiu@qq.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "any-reader",
"description": "摸鱼,自定义规则多站点聚合搜索阅读小说、漫画。包含JS规则解析库和VSCode插件。支持本地小说 TXT、EPUB",
"icon": "resources/icon.png",
"version": "1.10.4",
"version": "1.10.5",
"publisher": "aooiu",
"private": true,
"qna": "https://github.com/aooiuu/any-reader/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@any-reader/web",
"version": "1.10.4",
"version": "1.10.5",
"description": "",
"author": "aooiuu <aooiu@qq.com>",
"license": "GPL3",
Expand Down

0 comments on commit 06d2976

Please sign in to comment.