koishi-plugin-vsinger-gacha 1.1.3 → 1.1.4

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # koishi-plugin-vsinger-gacha
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/koishi-plugin-vsinger-gacha?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-vsinger-gacha)
4
+ [![CI](https://github.com/zb23333ww/koishi-plugin-vsinger-gacha/actions/workflows/ci.yml/badge.svg)](https://github.com/zb23333ww/koishi-plugin-vsinger-gacha/actions/workflows/ci.yml)
4
5
  [![license](https://img.shields.io/github/license/zb23333ww/koishi-plugin-vsinger-gacha?style=flat-square)](LICENSE)
5
6
 
6
7
  > 六位 VSinger 角色的 B 站收藏集抽卡插件:423 张官方卡、43 个奖池、真实概率 + 保底、镭射版、签到积分与图鉴长图。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-vsinger-gacha",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "VSinger 收藏集抽卡 / 签到积分 / 图鉴(Koishi 插件,一次性安装)",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -0,0 +1,17 @@
1
+ /** CI 用:真实 Koishi + mock 适配器,确认插件能加载并注册指令 */
2
+ const { Context } = require('koishi');
3
+ const mockMod = require('@koishijs/plugin-mock');
4
+ const plugin = require('../lib/index.js');
5
+
6
+ const app = new Context({ prefix: ['/'] });
7
+ app.plugin(mockMod.default ?? mockMod);
8
+ app.plugin(plugin, { cardsDir: './data/cards' });
9
+
10
+ app.start().then(() => {
11
+ const n = app.$commander._commandList.length;
12
+ console.log('指令数', n);
13
+ process.exit(n > 10 ? 0 : 1);
14
+ }).catch((e) => {
15
+ console.error(e);
16
+ process.exit(1);
17
+ });