koishi-plugin-jryspro-fast 2.2.1 → 2.2.3

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/CHANGELOG.md CHANGED
@@ -226,3 +226,21 @@
226
226
  ### 修改
227
227
 
228
228
  * 修改必备插件为vercelSatoriPngService。没有vercelSatoriPngService渲染不了图片。
229
+
230
+ ## v2.2.2
231
+
232
+ ### 优化
233
+
234
+ * 图片处理库sharp替换为更好的wasm-vips
235
+
236
+
237
+ ## v2.2.3
238
+
239
+ ### 修改
240
+
241
+ * 修改必备插件为to-image-service。没有to-image-service渲染不了图片。
242
+
243
+ ### 优化
244
+
245
+ * 样式
246
+ * 支持图片质量
package/README.md CHANGED
@@ -18,10 +18,10 @@ jrys plugin for bella
18
18
  * -i 渲染图模式输出,这个是默认的
19
19
 
20
20
  > 如果你无法使用此插件,请检查
21
- > - 1. (使用命令时无反应,报错等)请检查指令是否有冲突或者是否正确安装vercelSatoriPngService
21
+ > - 1. (使用命令时无反应,报错等)请检查指令是否有冲突或者是否正确安装to-image-service
22
22
  > - 2. 提示“发生未知错误”可能是没有获取到群友的uid,需要在数据库内刷新一下
23
23
  > - 3. “数据出错”之类的提示不是本插件的提示,可能你装了其他插件
24
- > - 4. 启用不了插件。请检查koishi版本,vercelSatoriPngService版本等是否再兼容范围内,或重启koishi,删除此插件依赖再尝试重装
24
+ > - 4. 启用不了插件。请检查koishi版本,to-image-service版本等是否再兼容范围内,或重启koishi,删除此插件依赖再尝试重装
25
25
 
26
26
  随机文件夹内图片时请注意路径\`C:user/path/to/\`不要把后面的/忘了
27
27
 
@@ -35,7 +35,7 @@ jrys plugin for bella
35
35
  | `imgApi` |(v1.3.0可用本地文件夹绝对路径)| 图片api地址,仅支持返回图片的api,不支持json等。由于我只制作了竖屏图片适配,建议使用竖屏的图片。在填写时不要把`http(s)://`忘了哦。 |
36
36
  | `waitting` | | 是否开启等待提示,默认开启 |
37
37
  | `defaultMode` | | 默认输出模式,非以下参数默认为`0` |
38
- | | `0` | 渲染输出-vercelSatoriPngService渲染输出 |
38
+ | | `0` | 渲染输出to-image-service渲染输出 |
39
39
  | | `1` | 纯文本输出,仅输出文本 |
40
40
  | | `2` | (默认)新版竖屏模式输出 |
41
41
  | | `3` | 图文输出,文字+图片的输出方式 |
@@ -56,6 +56,6 @@ jrys plugin for bella
56
56
  imgApi与subimgApi支持本地文件夹绝对路径和http(s)等网络api
57
57
 
58
58
  # TIP
59
- 如果没有图片输出可以看看log时不时vercelSatoriPngService有问题
60
- 确定vercelSatoriPngService没问题那就是api寄了或者本地路径没填对,别把最后面的/省了
59
+ 如果没有图片输出可以看看log时不时to-image-service有问题
60
+ 确定to-image-service没问题那就是api寄了或者本地路径没填对,别把最后面的/省了
61
61
  有问题就github开issues吧
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <title>114514</title>
6
- <style lang="css">
6
+ <style>
7
7
  * {
8
8
  box-sizing: border-box;
9
9
  }
@@ -96,6 +96,7 @@
96
96
  <div
97
97
  style="
98
98
  display: flex;
99
+ flex-direction: column;
99
100
  font-size: 32px;
100
101
  background-color: rgba(206, 168, 134, 0.5);
101
102
  border: 1px solid #161616;
@@ -103,7 +104,12 @@
103
104
  padding: 16px;
104
105
  "
105
106
  >
106
- 你是一个一个签名啊啊啊啊啊啊啊啊啊啊啊啊
107
+ <div>
108
+ 你是半个签名啊啊啊啊啊啊啊啊啊啊啊啊
109
+ </div>
110
+ <div>
111
+ 你是另外半个签名啊啊啊啊啊啊啊啊啊啊啊啊
112
+ </div>
107
113
  </div>
108
114
  <div
109
115
  style="
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <title>114514</title>
6
- <style lang="css">
6
+ <style>
7
7
  * {
8
8
  box-sizing: border-box;
9
9
  }
@@ -22,7 +22,7 @@
22
22
  >
23
23
  <div
24
24
  style="
25
- width: 350px;
25
+ width: 370px;
26
26
  height: 100%;
27
27
  padding: 0 20px;
28
28
  display: flex;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context, Schema } from "koishi";
2
2
  export declare const name = "jryspro-fast";
3
- export declare const usage = "\n## \u66F4\u65B0\u63D2\u4EF6\u524D\u8BF7\u505C\u6B62\u8FD0\u884C\u63D2\u4EF6\n\u63D2\u4EF6\u914D\u7F6E\u9879\u53EF\u80FD\u4F1A\u6709\u6539\u52A8\uFF0C\u4E0D\u505C\u6B62\u63D2\u4EF6\u76F4\u63A5\u66F4\u65B0\u53EF\u80FD\u4F1A\u5BFC\u81F4koishi\u70B8\u6389\n\n## \u4F7F\u7528\u8BF4\u660E\n\n> \u5982\u679C\u4F60\u65E0\u6CD5\u4F7F\u7528\u6B64\u63D2\u4EF6\uFF0C\u8BF7\u68C0\u67E5\n> - 1. (\u4F7F\u7528\u547D\u4EE4\u65F6\u65E0\u53CD\u5E94\uFF0C\u62A5\u9519\u7B49)\u8BF7\u68C0\u67E5\u6307\u4EE4\u662F\u5426\u6709\u51B2\u7A81\u6216\u8005\u662F\u5426\u6B63\u786E\u5B89\u88C5vercelSatoriPngService\n> - 2. \u63D0\u793A\u201C\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u201D\u53EF\u80FD\u662F\u6CA1\u6709\u83B7\u53D6\u5230\u7FA4\u53CB\u7684uid\uFF0C\u9700\u8981\u5728\u6570\u636E\u5E93\u5185\u5237\u65B0\u4E00\u4E0B\n> - 3. \u201C\u6570\u636E\u51FA\u9519\u201D\u4E4B\u7C7B\u7684\u63D0\u793A\u4E0D\u662F\u672C\u63D2\u4EF6\u7684\u63D0\u793A\uFF0C\u53EF\u80FD\u4F60\u88C5\u4E86\u5176\u4ED6\u63D2\u4EF6\n> - 4. \u542F\u7528\u4E0D\u4E86\u63D2\u4EF6\u3002\u8BF7\u68C0\u67E5koishi\u7248\u672C\uFF0CvercelSatoriPngService\u7248\u672C\u7B49\u662F\u5426\u518D\u517C\u5BB9\u8303\u56F4\u5185\uFF0C\u6216\u91CD\u542Fkoishi\uFF0C\u5220\u9664\u6B64\u63D2\u4EF6\u4F9D\u8D56\u518D\u5C1D\u8BD5\u91CD\u88C5\n\n\u968F\u673A\u6587\u4EF6\u5939\u5185\u56FE\u7247\u65F6\u8BF7\u6CE8\u610F\u8DEF\u5F84`C:/user/path/to/`\u4E0D\u8981\u628A\u540E\u9762\u7684/\u5FD8\u4E86\n\n## api\u8BF4\u660E\n* api url\u4EE5 #e# \u7ED3\u5C3E\u53EF\u4EE5\u5728\u672B\u5C3E\u6DFB\u52A0\u66F4\u65B0\u65F6\u95F4\u6233(\u4F8B\u5B50\u540E\u9762\u7B49\u4EF7\u7684\u6570\u5B57\u4E3A\u5F53\u524D\u65F6\u95F4\u6233)\n* \u4F8B: https://api.example.com/img?#e# ==\u7B49\u4EF7\u4E8E== https://api.example.com/img?271878\n* \u4F8B: https://api.example.com/img?type=acc&v=#e# ==\u7B49\u4EF7\u4E8E== https://api.example.com/img?type=acc&v=271878\n\nimgApi\u4E0EsubimgApi\u652F\u6301\u672C\u5730\u6587\u4EF6\u5939\u7EDD\u5BF9\u8DEF\u5F84\u548Chttp(s)\u7B49\u7F51\u7EDCapi\n";
3
+ export declare const usage = "\n## \u66F4\u65B0\u63D2\u4EF6\u524D\u8BF7\u505C\u6B62\u8FD0\u884C\u63D2\u4EF6\n\u63D2\u4EF6\u914D\u7F6E\u9879\u53EF\u80FD\u4F1A\u6709\u6539\u52A8\uFF0C\u4E0D\u505C\u6B62\u63D2\u4EF6\u76F4\u63A5\u66F4\u65B0\u53EF\u80FD\u4F1A\u5BFC\u81F4koishi\u70B8\u6389\n\n## \u4F7F\u7528\u8BF4\u660E\n\n> \u5982\u679C\u4F60\u65E0\u6CD5\u4F7F\u7528\u6B64\u63D2\u4EF6\uFF0C\u8BF7\u68C0\u67E5\n> - 1. (\u4F7F\u7528\u547D\u4EE4\u65F6\u65E0\u53CD\u5E94\uFF0C\u62A5\u9519\u7B49)\u8BF7\u68C0\u67E5\u6307\u4EE4\u662F\u5426\u6709\u51B2\u7A81\u6216\u8005\u662F\u5426\u6B63\u786E\u5B89\u88C5to-image-service\n> - 2. \u63D0\u793A\u201C\u53D1\u751F\u672A\u77E5\u9519\u8BEF\u201D\u53EF\u80FD\u662F\u6CA1\u6709\u83B7\u53D6\u5230\u7FA4\u53CB\u7684uid\uFF0C\u9700\u8981\u5728\u6570\u636E\u5E93\u5185\u5237\u65B0\u4E00\u4E0B\n> - 3. \u201C\u6570\u636E\u51FA\u9519\u201D\u4E4B\u7C7B\u7684\u63D0\u793A\u4E0D\u662F\u672C\u63D2\u4EF6\u7684\u63D0\u793A\uFF0C\u53EF\u80FD\u4F60\u88C5\u4E86\u5176\u4ED6\u63D2\u4EF6\n> - 4. \u542F\u7528\u4E0D\u4E86\u63D2\u4EF6\u3002\u8BF7\u68C0\u67E5koishi\u7248\u672C\uFF0Cto-image-service\u7248\u672C\u7B49\u662F\u5426\u518D\u517C\u5BB9\u8303\u56F4\u5185\uFF0C\u6216\u91CD\u542Fkoishi\uFF0C\u5220\u9664\u6B64\u63D2\u4EF6\u4F9D\u8D56\u518D\u5C1D\u8BD5\u91CD\u88C5\n\n\u968F\u673A\u6587\u4EF6\u5939\u5185\u56FE\u7247\u65F6\u8BF7\u6CE8\u610F\u8DEF\u5F84`C:/user/path/to/`\u4E0D\u8981\u628A\u540E\u9762\u7684/\u5FD8\u4E86\n\n## api\u8BF4\u660E\n* api url\u4EE5 #e# \u7ED3\u5C3E\u53EF\u4EE5\u5728\u672B\u5C3E\u6DFB\u52A0\u66F4\u65B0\u65F6\u95F4\u6233(\u4F8B\u5B50\u540E\u9762\u7B49\u4EF7\u7684\u6570\u5B57\u4E3A\u5F53\u524D\u65F6\u95F4\u6233)\n* \u4F8B: https://api.example.com/img?#e# ==\u7B49\u4EF7\u4E8E== https://api.example.com/img?271878\n* \u4F8B: https://api.example.com/img?type=acc&v=#e# ==\u7B49\u4EF7\u4E8E== https://api.example.com/img?type=acc&v=271878\n\nimgApi\u4E0EsubimgApi\u652F\u6301\u672C\u5730\u6587\u4EF6\u5939\u7EDD\u5BF9\u8DEF\u5F84\u548Chttp(s)\u7B49\u7F51\u7EDCapi\n";
4
4
  export interface Config {
5
5
  interval: number;
6
6
  nightauto: boolean;
@@ -46,4 +46,4 @@ export interface JrysItem {
46
46
  signText: string;
47
47
  unsignText: string;
48
48
  }
49
- export declare function apply(ctx: Context, config: Config): void;
49
+ export declare function apply(ctx: Context, config: Config): Promise<void>;
package/lib/index.js CHANGED
@@ -40,7 +40,6 @@ module.exports = __toCommonJS(src_exports);
40
40
  var import_node_fs = __toESM(require("node:fs"));
41
41
  var import_node_path = __toESM(require("node:path"));
42
42
  var import_node_crypto = __toESM(require("node:crypto"));
43
- var import_sharp = __toESM(require("sharp"));
44
43
  var import_koishi = require("koishi");
45
44
  var name = "jryspro-fast";
46
45
  var logger = new import_koishi.Logger(name);
@@ -51,10 +50,10 @@ var usage = `
51
50
  ## 使用说明
52
51
 
53
52
  > 如果你无法使用此插件,请检查
54
- > - 1. (使用命令时无反应,报错等)请检查指令是否有冲突或者是否正确安装vercelSatoriPngService
53
+ > - 1. (使用命令时无反应,报错等)请检查指令是否有冲突或者是否正确安装to-image-service
55
54
  > - 2. 提示“发生未知错误”可能是没有获取到群友的uid,需要在数据库内刷新一下
56
55
  > - 3. “数据出错”之类的提示不是本插件的提示,可能你装了其他插件
57
- > - 4. 启用不了插件。请检查koishi版本,vercelSatoriPngService版本等是否再兼容范围内,或重启koishi,删除此插件依赖再尝试重装
56
+ > - 4. 启用不了插件。请检查koishi版本,to-image-service版本等是否再兼容范围内,或重启koishi,删除此插件依赖再尝试重装
58
57
 
59
58
  随机文件夹内图片时请注意路径\`C:/user/path/to/\`不要把后面的/忘了
60
59
 
@@ -77,7 +76,7 @@ var schema = import_koishi.Schema.object({
77
76
  imgApi: import_koishi.Schema.string().role("link").required().description(
78
77
  "[必填]渲染模式美图的api或文件夹(推荐纯竖屏),仅支持返回图片的api,不要忘记http(s)://"
79
78
  ),
80
- imgQuality: import_koishi.Schema.percent().default(0.4).description("渲染图输出质量"),
79
+ imgQuality: import_koishi.Schema.number().role("slider").min(1).max(100).step(1).default(75).description("渲染图输出质量"),
81
80
  waiting: import_koishi.Schema.boolean().default(true).description("是否开启发送消息等待提示"),
82
81
  callme: import_koishi.Schema.boolean().default(false).description("是否开启callme功能"),
83
82
  defaultMode: import_koishi.Schema.union([0, 1, 2, 3]).default(2).description(
@@ -88,14 +87,14 @@ var schema = import_koishi.Schema.object({
88
87
  ),
89
88
  avatarUrl: import_koishi.Schema.string().role("link").description("默认头像URL(https?://或者file:///)")
90
89
  });
91
- var inject = ["vercelSatoriPngService", "database"];
92
- function apply(ctx, config) {
93
- let fileType;
90
+ var inject = ["toImageService", "database"];
91
+ async function apply(ctx, config) {
92
+ let fileType = await import("file-type");
94
93
  const template = import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../assets/template.html"), "utf8").replace(/[\s\S]*<body[^>]*>([\s\S]*)<\/body>[\s\S]*/, "$1").trim();
95
94
  const template2 = import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../assets/template2.html"), "utf8").replace(/[\s\S]*<body[^>]*>([\s\S]*)<\/body>[\s\S]*/, "$1").trim();
96
- const defaultAvatar = `data:image/png;base64,` + Buffer.from(import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../assets/avatar.png"))).toString(
97
- "base64"
98
- );
95
+ const defaultAvatar = `data:image/png;base64,` + Buffer.from(
96
+ import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../assets/avatar.png"))
97
+ ).toString("base64");
99
98
  const jrysJson = JSON.parse(
100
99
  import_node_fs.default.readFileSync(import_node_path.default.join(__dirname, "../assets/jrys.json"), "utf8")
101
100
  );
@@ -180,6 +179,7 @@ function apply(ctx, config) {
180
179
  const avatar = await downloadUrl({
181
180
  url: avatarUrl
182
181
  });
182
+ const signTexts = dJson.signText.split(",");
183
183
  const replacedContent = template.replace(
184
184
  "https://dummyimage.com/389x399/6e2d6e/c2c5ed.png",
185
185
  background.base64
@@ -193,17 +193,14 @@ function apply(ctx, config) {
193
193
  "你是一个一个幸运星啊啊啊啊啊啊啊啊啊啊啊啊",
194
194
  `${dJson.fortuneSummary.toString().length > 8 ? dJson.fortuneSummary.toString().substring(0, 8) : dJson.fortuneSummary}&nbsp;&nbsp;${dJson.luckyStar}`
195
195
  ).replace(
196
- "你是一个一个签名啊啊啊啊啊啊啊啊啊啊啊啊",
197
- `${dJson.signText.split(",")[0]},${dJson.signText.split(",")[1]}<br/>${dJson.signText.split(",")[2]},${dJson.signText.split(",")[3]}`
198
- );
199
- const png = await ctx.vercelSatoriPngService.htmlToPng(
200
- replacedContent,
201
- {
202
- width,
203
- height
204
- }
196
+ "你是半个签名啊啊啊啊啊啊啊啊啊啊啊啊",
197
+ `${signTexts[0]},${signTexts[1]}`
198
+ ).replace(
199
+ "你是另外半个签名啊啊啊啊啊啊啊啊啊啊啊啊",
200
+ `${signTexts[1]},${signTexts[2]}`
205
201
  );
206
- return [import_koishi.h.image((await png.toArray())[0], "image/png")];
202
+ const png = await htmlToImg(replacedContent, width, height);
203
+ return [import_koishi.h.image(png, "image/png")];
207
204
  } catch (err) {
208
205
  logger.error(err);
209
206
  return "渲染失败,不知道发生了啥";
@@ -211,14 +208,14 @@ function apply(ctx, config) {
211
208
  } else if (options.img || config.defaultMode === 0 && !options.out && !options.txtimg && !options.new) {
212
209
  if (config.waiting) session.send("请稍等,正在查询……").then();
213
210
  try {
214
- let width = 357;
211
+ let width = 370 + 7;
215
212
  const height = 1040;
216
213
  const background = await downloadUrl({
217
214
  url: backgroundUrl,
218
215
  needMetadata: true
219
216
  });
220
217
  width += Math.round(
221
- (height - 14) / background.metadata.height * background.metadata.width
218
+ (height - 14) / background.metaData.height * background.metaData.width
222
219
  );
223
220
  const replacedContent = template2.replace(
224
221
  /rgba\(255, 255, 255, 0\.6\)/g,
@@ -242,14 +239,8 @@ function apply(ctx, config) {
242
239
  /<!--解签开始-->[\s\S]*<!--解签结束-->/,
243
240
  dJson.unsignText.split("").map((s) => `<div>${s}</div>`).join("")
244
241
  );
245
- const png = await ctx.vercelSatoriPngService.htmlToPng(
246
- replacedContent,
247
- {
248
- width,
249
- height
250
- }
251
- );
252
- return [import_koishi.h.image((await png.toArray())[0], "image/png")];
242
+ const png = await htmlToImg(replacedContent, width, height);
243
+ return [import_koishi.h.image(png, "image/png")];
253
244
  } catch (err) {
254
245
  logger.error(err);
255
246
  return "渲染失败,不知道发生了啥";
@@ -278,13 +269,28 @@ function apply(ctx, config) {
278
269
  }
279
270
  }
280
271
  });
281
- async function loadFileType() {
282
- if (!fileType) {
283
- fileType = await import("file-type");
272
+ async function htmlToImg(html, width, height) {
273
+ const reactElement = ctx.toImageService.toReactElement.htmlToReactElement(html);
274
+ const svg = await ctx.toImageService.reactElementToSvg.satori(
275
+ reactElement,
276
+ {
277
+ width,
278
+ height
279
+ }
280
+ );
281
+ if (config.imgQuality === 100) {
282
+ return await ctx.toImageService.svgToImage.vips(svg, {
283
+ format: "png"
284
+ });
284
285
  }
285
- return fileType;
286
+ return await ctx.toImageService.svgToImage.vips(svg, {
287
+ format: "jpeg",
288
+ options: {
289
+ Q: config.imgQuality
290
+ }
291
+ });
286
292
  }
287
- __name(loadFileType, "loadFileType");
293
+ __name(htmlToImg, "htmlToImg");
288
294
  function getUserKey(session) {
289
295
  let etime = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0);
290
296
  let userId;
@@ -311,8 +317,11 @@ function apply(ctx, config) {
311
317
  return jrysJson[getUserKey(session).key];
312
318
  }
313
319
  __name(getJrys, "getJrys");
314
- async function downloadUrl(args) {
315
- const { url, cover, needMetadata } = args;
320
+ async function downloadUrl({
321
+ url,
322
+ cover,
323
+ needMetadata
324
+ }) {
316
325
  if (/^data:/i.test(url)) {
317
326
  return { base64: url };
318
327
  }
@@ -325,57 +334,40 @@ function apply(ctx, config) {
325
334
  logger.error("未知url类型");
326
335
  throw "渲染失败,不知道发生了啥";
327
336
  }
328
- await loadFileType();
329
337
  const imgType = await fileType.fileTypeFromBuffer(imgData);
330
- let imgSharp;
331
- let metadata;
332
- const touchImgSharp = /* @__PURE__ */ __name(() => {
333
- if (!imgSharp) {
334
- imgSharp = (0, import_sharp.default)(imgData);
338
+ const vips = ctx.toImageService.toImageBase.getVips();
339
+ let img;
340
+ let metaData;
341
+ const touchImg = /* @__PURE__ */ __name(() => {
342
+ if (!img) {
343
+ img = vips.Image.newFromBuffer(imgData);
335
344
  }
336
- }, "touchImgSharp");
345
+ }, "touchImg");
337
346
  if (needMetadata) {
338
- touchImgSharp();
339
- metadata = await imgSharp.metadata();
347
+ touchImg();
348
+ metaData = {
349
+ width: img.width,
350
+ height: img.height
351
+ };
340
352
  }
341
353
  if (cover) {
342
- touchImgSharp();
343
- if (!metadata) {
344
- metadata = await imgSharp.metadata();
345
- }
346
- const newWh = {
347
- width: cover.width,
348
- height: cover.height
349
- };
350
- if (metadata.height * (cover.width / metadata.width) < cover.height) {
351
- newWh.width = Math.round(
352
- metadata.width * (cover.height / metadata.height)
353
- );
354
- } else {
355
- newWh.height = Math.round(
356
- metadata.height * (cover.width / metadata.width)
357
- );
358
- }
359
- imgSharp.resize(newWh);
360
- imgSharp.extract({
361
- left: Math.round((newWh.width - cover.width) / 2),
362
- width: cover.width,
363
- top: Math.round((newWh.height - cover.height) / 2),
364
- height: cover.height
354
+ img = vips.Image.thumbnailBuffer(imgData, cover.width, {
355
+ height: cover.height,
356
+ crop: vips.Interesting.centre
365
357
  });
366
358
  if (imgType.ext !== "webp") {
367
- imgData = await imgSharp.toBuffer();
359
+ imgData = Buffer.from(img.pngsaveBuffer());
368
360
  }
369
361
  }
370
362
  let mime = imgType.mime;
371
363
  if (imgType.ext === "webp") {
372
- touchImgSharp();
373
- imgData = await imgSharp.png({}).toBuffer();
364
+ touchImg();
365
+ imgData = Buffer.from(img.pngsaveBuffer());
374
366
  mime = "image/png";
375
367
  }
376
368
  return {
377
369
  base64: `data:${mime};base64,` + imgData.toString("base64"),
378
- metadata
370
+ metaData
379
371
  };
380
372
  }
381
373
  __name(downloadUrl, "downloadUrl");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-jryspro-fast",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "main": "lib/index.js",
5
5
  "typings": "lib/index.d.ts",
6
6
  "homepage": "https://github.com/pgnqukezrdxmhjso/koishi-plugin-jryspro-fast",
@@ -33,7 +33,7 @@
33
33
  "service": {
34
34
  "required": [
35
35
  "http",
36
- "vercelSatoriPngService"
36
+ "toImageService"
37
37
  ],
38
38
  "optional": [
39
39
  "database"
@@ -49,13 +49,12 @@
49
49
  "今日运势"
50
50
  ],
51
51
  "peerDependencies": {
52
- "koishi": "^4.16.0"
53
- },
54
- "devDependencies": {
55
- "koishi-plugin-vercel-satori-png-service": "^0.1.5"
52
+ "koishi": "^4.18.10"
56
53
  },
57
54
  "dependencies": {
58
- "file-type": "^21.0.0",
59
- "sharp": "^0.34.3"
55
+ "file-type": "^21.3.0"
56
+ },
57
+ "devDependencies": {
58
+ "koishi-plugin-to-image-service": "^0.1.0"
60
59
  }
61
60
  }