@zhin.js/plugin-qrcode 3.0.3 → 3.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.
|
@@ -4,8 +4,12 @@ import { buildQrImageUrl } from '../src/qrcode-lib.js';
|
|
|
4
4
|
|
|
5
5
|
export default defineCommand({
|
|
6
6
|
description: '根据文本或链接生成二维码图片',
|
|
7
|
-
execute: ({ params }) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
execute: ({ params, args }) => {
|
|
8
|
+
// [text:string] 单动态段只消费一个词;含空格的文本需拼上剩余 args
|
|
9
|
+
const text = [String(params.text ?? ''), ...args].join(' ').trim();
|
|
10
|
+
return raw({
|
|
11
|
+
type: 'image',
|
|
12
|
+
data: { url: buildQrImageUrl(text) },
|
|
13
|
+
});
|
|
14
|
+
},
|
|
11
15
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-qrcode",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "QR code generator & reader plugin for Zhin.js (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
},
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@zhin.js/command": "1.0.
|
|
41
|
-
"@zhin.js/plugin-runtime": "1.
|
|
42
|
-
"@zhin.js/core": "1.
|
|
40
|
+
"@zhin.js/command": "1.0.3",
|
|
41
|
+
"@zhin.js/plugin-runtime": "1.1.1",
|
|
42
|
+
"@zhin.js/core": "1.4.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^6.0.3",
|
|
46
46
|
"vitest": "^4.1.10",
|
|
47
47
|
"zod": "^4.4.3",
|
|
48
|
-
"@zhin.js/agent": "1.0.
|
|
48
|
+
"@zhin.js/agent": "1.0.6"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"zod": "^4.0.0",
|
|
52
|
-
"@zhin.js/agent": "1.0.
|
|
52
|
+
"@zhin.js/agent": "1.0.6"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@zhin.js/agent": {
|