@zhin.js/plugin-60s 4.0.2 → 4.0.5
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/commands/douyin/{[limit:number=10].js → [[limit]].js} +1 -0
- package/commands/douyin/{[limit:number=10].ts → [[limit]].ts} +1 -0
- package/commands/fanyi/{[text:string].js → [text].js} +1 -0
- package/commands/fanyi/{[text:string].ts → [text].ts} +1 -0
- package/commands/fuel/{[province:string].js → [province].js} +1 -0
- package/commands/fuel/{[province:string].ts → [province].ts} +1 -0
- package/commands/hitokoto/{[type:string].js → [type].js} +1 -0
- package/commands/hitokoto/{[type:string].ts → [type].ts} +1 -0
- package/commands/ip/{[ip:string].js → [ip].js} +1 -0
- package/commands/ip/{[ip:string].ts → [ip].ts} +1 -0
- package/commands/toutiao/{[limit:number=10].js → [[limit]].js} +1 -0
- package/commands/toutiao/{[limit:number=10].ts → [[limit]].ts} +1 -0
- package/commands/weather/{[city:string].js → [city].js} +1 -0
- package/commands/weather/{[city:string].ts → [city].ts} +1 -0
- package/commands/weibo/{[limit:number=10].js → [[limit]].js} +1 -0
- package/commands/weibo/{[limit:number=10].ts → [[limit]].ts} +1 -0
- package/commands/zhihu/{[limit:number=10].js → [[limit]].js} +1 -0
- package/commands/zhihu/{[limit:number=10].ts → [[limit]].ts} +1 -0
- package/package.json +6 -6
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/douyin-hot.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '抖音热搜',
|
|
6
|
+
params: { limit: { type: 'number', default: 10 } },
|
|
6
7
|
execute: ({ params }) => handler({ limit: Number(params.limit) }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/translate.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '文本翻译',
|
|
6
|
+
params: { text: { type: 'string' } },
|
|
6
7
|
execute: ({ params, args }) => handler({ text: String(params.text), to: args[0] != null ? String(args[0]) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import handler from '../../src/handlers/translate.js';
|
|
|
3
3
|
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '文本翻译',
|
|
6
|
+
params: { text: { type: 'string' } },
|
|
6
7
|
execute: ({ params, args }) => handler({ text: String(params.text), to: args[0] != null ? String(args[0]) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/fuel-price.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '今日油价',
|
|
6
|
+
params: { province: { type: 'string' } },
|
|
6
7
|
execute: ({ params }) => handler({ province: params.province != null ? String(params.province) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import handler from '../../src/handlers/fuel-price.js';
|
|
|
3
3
|
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '今日油价',
|
|
6
|
+
params: { province: { type: 'string' } },
|
|
6
7
|
execute: ({ params }) => handler({ province: params.province != null ? String(params.province) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/hitokoto.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '随机一言',
|
|
6
|
+
params: { type: { type: 'string' } },
|
|
6
7
|
execute: ({ params }) => handler({ type: params.type != null ? String(params.type) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/ip-query.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: 'IP 查询',
|
|
6
|
+
params: { ip: { type: 'string' } },
|
|
6
7
|
execute: ({ params }) => handler({ ip: params.ip != null ? String(params.ip) : undefined }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/toutiao-hot.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '头条热搜',
|
|
6
|
+
params: { limit: { type: 'number', default: 10 } },
|
|
6
7
|
execute: ({ params }) => handler({ limit: Number(params.limit) }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/weather.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '查询城市天气',
|
|
6
|
+
params: { city: { type: 'string' } },
|
|
6
7
|
execute: ({ params }) => handler({ city: String(params.city) }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/weibo-hot.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '微博热搜',
|
|
6
|
+
params: { limit: { type: 'number', default: 10 } },
|
|
6
7
|
execute: ({ params }) => handler({ limit: Number(params.limit) }),
|
|
7
8
|
});
|
|
@@ -3,5 +3,6 @@ import { defineCommand } from '@zhin.js/command';
|
|
|
3
3
|
import handler from "../../lib/handlers/zhihu-hot.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
description: '知乎热榜',
|
|
6
|
+
params: { limit: { type: 'number', default: 10 } },
|
|
6
7
|
execute: ({ params }) => handler({ limit: Number(params.limit) }),
|
|
7
8
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-60s",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "60s API aggregation plugin for Zhin.js — news, weather, hot searches, utilities (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
},
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@zhin.js/command": "1.0.
|
|
49
|
-
"@zhin.js/plugin-runtime": "1.1.
|
|
50
|
-
"@zhin.js/tool": "1.0.
|
|
48
|
+
"@zhin.js/command": "1.0.9",
|
|
49
|
+
"@zhin.js/plugin-runtime": "1.1.5",
|
|
50
|
+
"@zhin.js/tool": "1.0.8"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"typescript": "^6.0.3",
|
|
54
54
|
"vitest": "^4.1.10",
|
|
55
55
|
"zod": "^4.4.3",
|
|
56
|
-
"@zhin.js/agent": "1.1.
|
|
56
|
+
"@zhin.js/agent": "1.1.5"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"zod": "^4.0.0",
|
|
60
|
-
"@zhin.js/agent": "1.1.
|
|
60
|
+
"@zhin.js/agent": "1.1.5"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|
|
63
63
|
"@zhin.js/agent": {
|