@zhin.js/plugin-music 1.1.25 → 1.1.27
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/LICENSE +21 -0
- package/commands/cookie/delete/[source]/index.js +1 -1
- package/commands/cookie/delete/[source]/index.ts +1 -1
- package/commands/cookie/get/[source]/index.js +1 -1
- package/commands/cookie/get/[source]/index.ts +1 -1
- package/commands/cookie/set/[source]/index.js +1 -1
- package/commands/cookie/set/[source]/index.ts +1 -1
- package/commands/cookie/status/index.js +1 -1
- package/commands/cookie/status/index.ts +1 -1
- package/commands/login/[platform]/index.js +1 -1
- package/commands/login/[platform]/index.ts +1 -1
- package/package.json +11 -16
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 凉菜
|
|
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.
|
|
@@ -7,7 +7,7 @@ export default defineCommand({
|
|
|
7
7
|
description: '删除音乐平台凭证', descriptionI18n: { en: "Delete music platform credentials" },
|
|
8
8
|
alias: ['删除'],
|
|
9
9
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
10
|
-
permit: ['
|
|
10
|
+
permit: ['owner'],
|
|
11
11
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
12
12
|
const source = String(params.source ?? '').trim();
|
|
13
13
|
const key = String(args[0] ?? '').trim();
|
|
@@ -9,7 +9,7 @@ export default defineCommand({
|
|
|
9
9
|
description: '删除音乐平台凭证', descriptionI18n: { en: "Delete music platform credentials" },
|
|
10
10
|
alias: ['删除'],
|
|
11
11
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
12
|
-
permit: ['
|
|
12
|
+
permit: ['owner'],
|
|
13
13
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
14
14
|
const source = String(params.source ?? '').trim();
|
|
15
15
|
const key = String(args[0] ?? '').trim();
|
|
@@ -7,7 +7,7 @@ export default defineCommand({
|
|
|
7
7
|
description: '查看音乐平台凭证(脱敏)', descriptionI18n: { en: "View music platform credentials with sensitive values masked" },
|
|
8
8
|
alias: ['查看'],
|
|
9
9
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
10
|
-
permit: ['
|
|
10
|
+
permit: ['owner'],
|
|
11
11
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
12
12
|
const source = String(params.source ?? '').trim();
|
|
13
13
|
const key = String(args[0] ?? '').trim();
|
|
@@ -9,7 +9,7 @@ export default defineCommand({
|
|
|
9
9
|
description: '查看音乐平台凭证(脱敏)', descriptionI18n: { en: "View music platform credentials with sensitive values masked" },
|
|
10
10
|
alias: ['查看'],
|
|
11
11
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
12
|
-
permit: ['
|
|
12
|
+
permit: ['owner'],
|
|
13
13
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
14
14
|
const source = String(params.source ?? '').trim();
|
|
15
15
|
const key = String(args[0] ?? '').trim();
|
|
@@ -7,7 +7,7 @@ export default defineCommand({
|
|
|
7
7
|
description: '保存音乐平台凭证', descriptionI18n: { en: "Save music platform credentials" },
|
|
8
8
|
alias: ['设置'],
|
|
9
9
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
10
|
-
permit: ['
|
|
10
|
+
permit: ['owner'],
|
|
11
11
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
12
12
|
const source = String(params.source ?? '').trim();
|
|
13
13
|
const [key, ...valueParts] = args.map(String);
|
|
@@ -9,7 +9,7 @@ export default defineCommand({
|
|
|
9
9
|
description: '保存音乐平台凭证', descriptionI18n: { en: "Save music platform credentials" },
|
|
10
10
|
alias: ['设置'],
|
|
11
11
|
params: { source: { type: 'string', description: '音乐源(qq/netease/kuwo/kugou)', descriptionI18n: { en: "Music source (qq / netease / kuwo / kugou)" } } },
|
|
12
|
-
permit: ['
|
|
12
|
+
permit: ['owner'],
|
|
13
13
|
async execute({ params, args, use, locale, formatCommand }) {
|
|
14
14
|
const source = String(params.source ?? '').trim();
|
|
15
15
|
const [key, ...valueParts] = args.map(String);
|
|
@@ -5,7 +5,7 @@ import { messages as t, sourceName } from "../../../lib/i18n.js";
|
|
|
5
5
|
export default defineCommand({
|
|
6
6
|
description: '查看各平台凭证配置状态', descriptionI18n: { en: "View configured music credentials by platform" },
|
|
7
7
|
alias: ['状态'],
|
|
8
|
-
permit: ['
|
|
8
|
+
permit: ['owner'],
|
|
9
9
|
async execute({ use, locale }) {
|
|
10
10
|
const allCreds = await use(musicRuntimeToken).credentials.list();
|
|
11
11
|
const lines = [t(locale, 'credentials')];
|
|
@@ -6,7 +6,7 @@ import type { MusicSource } from '../../../src/types.js';
|
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: '查看各平台凭证配置状态', descriptionI18n: { en: "View configured music credentials by platform" },
|
|
8
8
|
alias: ['状态'],
|
|
9
|
-
permit: ['
|
|
9
|
+
permit: ['owner'],
|
|
10
10
|
async execute({ use, locale }) {
|
|
11
11
|
const allCreds = await use(musicRuntimeToken).credentials.list();
|
|
12
12
|
const lines: string[] = [t(locale, 'credentials')];
|
|
@@ -13,7 +13,7 @@ export default defineCommand({
|
|
|
13
13
|
params: {
|
|
14
14
|
platform: { type: 'string', description: '音乐平台(qq / netease / 取消)', descriptionI18n: { en: "Music platform (qq / netease) or cancel" } },
|
|
15
15
|
},
|
|
16
|
-
permit: ['
|
|
16
|
+
permit: ['owner'],
|
|
17
17
|
async execute({ params, input, use, locale, formatCommand }) {
|
|
18
18
|
const platform = String(params.platform ?? '').trim();
|
|
19
19
|
const ids = resolveMessageIds(input);
|
|
@@ -18,7 +18,7 @@ export default defineCommand<unknown, string, Message>({
|
|
|
18
18
|
params: {
|
|
19
19
|
platform: { type: 'string', description: '音乐平台(qq / netease / 取消)', descriptionI18n: { en: "Music platform (qq / netease) or cancel" } },
|
|
20
20
|
},
|
|
21
|
-
permit: ['
|
|
21
|
+
permit: ['owner'],
|
|
22
22
|
async execute({ params, input, use, locale, formatCommand }) {
|
|
23
23
|
const platform = String(params.platform ?? '').trim();
|
|
24
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-music",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"description": "Music search and sharing plugin for Zhin.js (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"components",
|
|
21
21
|
"src",
|
|
22
22
|
"lib",
|
|
23
|
-
"tools",
|
|
24
23
|
"skills",
|
|
25
24
|
"README.md"
|
|
26
25
|
],
|
|
@@ -42,27 +41,23 @@
|
|
|
42
41
|
},
|
|
43
42
|
"license": "MIT",
|
|
44
43
|
"dependencies": {
|
|
45
|
-
"@zhin.js/core": "1.
|
|
46
|
-
"@zhin.js/im-contract": "1.1.
|
|
47
|
-
"@zhin.js/tool": "1.1.
|
|
48
|
-
"@zhin.js/skill": "1.1.
|
|
44
|
+
"@zhin.js/core": "1.6.0",
|
|
45
|
+
"@zhin.js/im-contract": "1.1.14",
|
|
46
|
+
"@zhin.js/tool": "1.1.19",
|
|
47
|
+
"@zhin.js/skill": "1.1.17"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"typescript": "^6.0.3",
|
|
52
51
|
"vitest": "^4.1.10",
|
|
53
|
-
"zhin.js": "1.1.
|
|
52
|
+
"zhin.js": "1.1.27"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
|
-
"@zhin.js/
|
|
57
|
-
"@zhin.js/
|
|
58
|
-
"@zhin.js/
|
|
59
|
-
"
|
|
60
|
-
"zhin.js": "^1.1.25"
|
|
55
|
+
"@zhin.js/command": "^1.2.1",
|
|
56
|
+
"@zhin.js/component": "^1.1.17",
|
|
57
|
+
"@zhin.js/middleware": "^1.1.17",
|
|
58
|
+
"zhin.js": "^1.1.27"
|
|
61
59
|
},
|
|
62
60
|
"peerDependenciesMeta": {
|
|
63
|
-
"@zhin.js/adapter-icqq": {
|
|
64
|
-
"optional": true
|
|
65
|
-
},
|
|
66
61
|
"@zhin.js/command": {
|
|
67
62
|
"optional": true
|
|
68
63
|
},
|
|
@@ -118,6 +113,6 @@
|
|
|
118
113
|
"scripts": {
|
|
119
114
|
"build": "tsc",
|
|
120
115
|
"clean": "rimraf lib",
|
|
121
|
-
"test": "
|
|
116
|
+
"test": "vitest run --root ../../.. plugins/utils/music/tests"
|
|
122
117
|
}
|
|
123
118
|
}
|