fishpi 0.0.22 → 0.0.24
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 +42 -0
- package/lib/article.js +5 -5
- package/lib/chat.d.ts +4 -2
- package/lib/chatroom.d.ts +11 -1
- package/lib/chatroom.js +63 -9
- package/lib/index.d.ts +8 -1
- package/lib/index.js +36 -14
- package/lib/typing.d.ts +29 -0
- package/lib/user.js +2 -2
- package/package.json +53 -53
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
- 文件上传;
|
|
11
11
|
- 通知信息;
|
|
12
12
|
- 清风明月;
|
|
13
|
+
- 文章读写;
|
|
14
|
+
- 评论点赞;
|
|
15
|
+
- 私聊功能;
|
|
13
16
|
|
|
14
17
|
## 安装
|
|
15
18
|
|
|
@@ -53,4 +56,43 @@ await fish.chatroom.redpacket.send({
|
|
|
53
56
|
recivers: [];
|
|
54
57
|
})
|
|
55
58
|
|
|
59
|
+
// 私聊历史获取
|
|
60
|
+
let chatHistory = await fish.chat.get({ user: 'username', autoRead: false })
|
|
61
|
+
// 监听私聊新消息
|
|
62
|
+
fishpi.chat.addListener(({ msg: any }) => {
|
|
63
|
+
switch (msg.command) {
|
|
64
|
+
// 私聊未读数更新
|
|
65
|
+
case 'chatUnreadCountRefresh':
|
|
66
|
+
if(msg.count > 0) {
|
|
67
|
+
let unreadMsgs = await fishpi.chat.unread();
|
|
68
|
+
}
|
|
69
|
+
else this.users.forEach((u, i) => {
|
|
70
|
+
this.users[i].unread = 0;
|
|
71
|
+
});
|
|
72
|
+
break;
|
|
73
|
+
// 新私聊消息
|
|
74
|
+
case 'newIdleChatMessage':
|
|
75
|
+
// msg 就是新的私聊消息
|
|
76
|
+
console.log(msg.senderUserName, '说:', notice.preview);
|
|
77
|
+
break;
|
|
78
|
+
// 有新的消息通知
|
|
79
|
+
case 'refreshNotification':
|
|
80
|
+
console.log('你有新消息【', await fishpi.notice.count(), '】')
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
// 监听指定用户的私聊消息
|
|
85
|
+
fishpi.chat.addListener(({ msg: ChatData }) => {
|
|
86
|
+
console.log(msg.senderUserName, '[', msg.time, ']:', msg.content);
|
|
87
|
+
}, 'username');
|
|
88
|
+
// 给指定用户发私聊消息
|
|
89
|
+
fishpi.chat.send('username', 'Hi~');
|
|
56
90
|
```
|
|
91
|
+
|
|
92
|
+
## 注意事项
|
|
93
|
+
|
|
94
|
+
API 库使用 `fetch` 做 API 请求,浏览器环境可以直接使用。在 Node 环境需要安装 `node-fetch` 2.x 版本的库。执行如下代码设置 `fetch` 函数:
|
|
95
|
+
```typescript
|
|
96
|
+
import fetch from 'node-fetch'
|
|
97
|
+
globalThis.fetch = fetch as any;
|
|
98
|
+
```
|
package/lib/article.js
CHANGED
|
@@ -194,12 +194,12 @@ var Article = /** @class */ (function () {
|
|
|
194
194
|
})];
|
|
195
195
|
case 1:
|
|
196
196
|
rsp = _a.sent();
|
|
197
|
-
rsp.articleAuthor.sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.
|
|
198
|
-
for (i = 0; i < rsp.
|
|
199
|
-
rsp.articleComments[i].sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.
|
|
197
|
+
rsp.article.articleAuthor.sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.article.articleAuthor.sysMetal);
|
|
198
|
+
for (i = 0; i < rsp.article.articleComments.length; i++) {
|
|
199
|
+
rsp.article.articleComments[i].sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.article.articleComments[i].sysMetal);
|
|
200
200
|
}
|
|
201
|
-
for (i = 0; i < rsp.
|
|
202
|
-
rsp.articleNiceComments[i].sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.
|
|
201
|
+
for (i = 0; i < rsp.article.articleNiceComments.length; i++) {
|
|
202
|
+
rsp.article.articleNiceComments[i].sysMetal = (0, utils_1.analyzeMetalAttr)(rsp.article.articleNiceComments[i].sysMetal);
|
|
203
203
|
}
|
|
204
204
|
return [2 /*return*/, rsp];
|
|
205
205
|
case 2:
|
package/lib/chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ReconnectingWebSocket from 'reconnecting-websocket';
|
|
2
|
-
import { ApiResponse, ChatData } from './typing';
|
|
2
|
+
import { ApiResponse, ChatData, NoticeMsg } from './typing';
|
|
3
3
|
declare class Chat {
|
|
4
4
|
private _apiKey;
|
|
5
5
|
private _rwss;
|
|
@@ -42,7 +42,9 @@ declare class Chat {
|
|
|
42
42
|
* @param user 指定用户消息监听函数,空为新信息监听
|
|
43
43
|
* @param wsCallback 要移除的函数,若为空,则清空消息监听
|
|
44
44
|
*/
|
|
45
|
-
removeListener(user: string | undefined, wsCallback:
|
|
45
|
+
removeListener(user: string | undefined, wsCallback: ({ msg }: {
|
|
46
|
+
msg: NoticeMsg;
|
|
47
|
+
}) => void): void;
|
|
46
48
|
/**
|
|
47
49
|
* 添加聊天室消息监听函数
|
|
48
50
|
* @param wsCallback 消息监听函数
|
package/lib/chatroom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiResponse, ChatContentType, ChatMessageType, ChatRoomMessage, GestureType, Message, RedPacket, RedPacketInfo } from './typing';
|
|
1
|
+
import { ApiResponse, ChatContentType, ChatMessageType, ChatRoomMessage, GestureType, Message, MuteItem, RedPacket, RedPacketInfo } from './typing';
|
|
2
2
|
declare class ChatRoom {
|
|
3
3
|
private _apiKey;
|
|
4
4
|
private _discusse;
|
|
@@ -45,6 +45,16 @@ declare class ChatRoom {
|
|
|
45
45
|
* @param msg 消息内容,支持 Markdown
|
|
46
46
|
*/
|
|
47
47
|
send(msg: string): Promise<ApiResponse<undefined>>;
|
|
48
|
+
/**
|
|
49
|
+
* 发送一条弹幕
|
|
50
|
+
* @param msg 消息内容,支持 Markdown
|
|
51
|
+
* @param color 弹幕颜色
|
|
52
|
+
*/
|
|
53
|
+
barrage(msg: string, color?: string): Promise<ApiResponse<undefined>>;
|
|
54
|
+
/**
|
|
55
|
+
* 获取禁言中成员列表(思过崖)
|
|
56
|
+
*/
|
|
57
|
+
mutes(): Promise<ApiResponse<Array<MuteItem>>>;
|
|
48
58
|
/**
|
|
49
59
|
* 获取消息原文(比如 Markdown)
|
|
50
60
|
* @param oId 消息 Id
|
package/lib/chatroom.js
CHANGED
|
@@ -130,9 +130,6 @@ var ChatRoom = /** @class */ (function () {
|
|
|
130
130
|
})];
|
|
131
131
|
case 1:
|
|
132
132
|
rsp_1 = _a.sent();
|
|
133
|
-
if (rsp_1.status === 401) {
|
|
134
|
-
return [2 /*return*/, { code: -1, msg: '登录已失效,请重新登录!' }];
|
|
135
|
-
}
|
|
136
133
|
if (rsp_1.code != 0) {
|
|
137
134
|
throw new Error(rsp_1.msg);
|
|
138
135
|
}
|
|
@@ -256,13 +253,70 @@ var ChatRoom = /** @class */ (function () {
|
|
|
256
253
|
});
|
|
257
254
|
});
|
|
258
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* 发送一条弹幕
|
|
258
|
+
* @param msg 消息内容,支持 Markdown
|
|
259
|
+
* @param color 弹幕颜色
|
|
260
|
+
*/
|
|
261
|
+
ChatRoom.prototype.barrage = function (msg, color) {
|
|
262
|
+
if (color === void 0) { color = '#ffffff'; }
|
|
263
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
264
|
+
var rsp, e_5;
|
|
265
|
+
return __generator(this, function (_a) {
|
|
266
|
+
switch (_a.label) {
|
|
267
|
+
case 0:
|
|
268
|
+
_a.trys.push([0, 2, , 3]);
|
|
269
|
+
return [4 /*yield*/, (0, utils_1.request)({
|
|
270
|
+
url: "chat-room/send",
|
|
271
|
+
method: 'post',
|
|
272
|
+
data: {
|
|
273
|
+
content: "[barrager]{\"color\":\"".concat(color, "\",\"content\":\"").concat(msg, "\"}[/barrager]"),
|
|
274
|
+
apiKey: this._apiKey
|
|
275
|
+
},
|
|
276
|
+
})];
|
|
277
|
+
case 1:
|
|
278
|
+
rsp = _a.sent();
|
|
279
|
+
return [2 /*return*/, rsp];
|
|
280
|
+
case 2:
|
|
281
|
+
e_5 = _a.sent();
|
|
282
|
+
throw e_5;
|
|
283
|
+
case 3: return [2 /*return*/];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* 获取禁言中成员列表(思过崖)
|
|
290
|
+
*/
|
|
291
|
+
ChatRoom.prototype.mutes = function () {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
293
|
+
var rsp, e_6;
|
|
294
|
+
return __generator(this, function (_a) {
|
|
295
|
+
switch (_a.label) {
|
|
296
|
+
case 0:
|
|
297
|
+
_a.trys.push([0, 2, , 3]);
|
|
298
|
+
return [4 /*yield*/, (0, utils_1.request)({
|
|
299
|
+
url: "chat-room/si-guo-list",
|
|
300
|
+
method: 'get',
|
|
301
|
+
})];
|
|
302
|
+
case 1:
|
|
303
|
+
rsp = _a.sent();
|
|
304
|
+
return [2 /*return*/, rsp];
|
|
305
|
+
case 2:
|
|
306
|
+
e_6 = _a.sent();
|
|
307
|
+
throw e_6;
|
|
308
|
+
case 3: return [2 /*return*/];
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
};
|
|
259
313
|
/**
|
|
260
314
|
* 获取消息原文(比如 Markdown)
|
|
261
315
|
* @param oId 消息 Id
|
|
262
316
|
*/
|
|
263
317
|
ChatRoom.prototype.raw = function (oId) {
|
|
264
318
|
return __awaiter(this, void 0, void 0, function () {
|
|
265
|
-
var rsp,
|
|
319
|
+
var rsp, e_7;
|
|
266
320
|
return __generator(this, function (_a) {
|
|
267
321
|
switch (_a.label) {
|
|
268
322
|
case 0:
|
|
@@ -274,8 +328,8 @@ var ChatRoom = /** @class */ (function () {
|
|
|
274
328
|
rsp = _a.sent();
|
|
275
329
|
return [2 /*return*/, rsp.replace(/<!--.*?-->/g, '')];
|
|
276
330
|
case 2:
|
|
277
|
-
|
|
278
|
-
throw
|
|
331
|
+
e_7 = _a.sent();
|
|
332
|
+
throw e_7;
|
|
279
333
|
case 3: return [2 /*return*/];
|
|
280
334
|
}
|
|
281
335
|
});
|
|
@@ -296,7 +350,7 @@ var ChatRoom = /** @class */ (function () {
|
|
|
296
350
|
*/
|
|
297
351
|
open: function (oId, gesture) {
|
|
298
352
|
return __awaiter(this, void 0, void 0, function () {
|
|
299
|
-
var rsp,
|
|
353
|
+
var rsp, e_8;
|
|
300
354
|
return __generator(this, function (_a) {
|
|
301
355
|
switch (_a.label) {
|
|
302
356
|
case 0:
|
|
@@ -314,8 +368,8 @@ var ChatRoom = /** @class */ (function () {
|
|
|
314
368
|
rsp = _a.sent();
|
|
315
369
|
return [2 /*return*/, rsp];
|
|
316
370
|
case 2:
|
|
317
|
-
|
|
318
|
-
throw
|
|
371
|
+
e_8 = _a.sent();
|
|
372
|
+
throw e_8;
|
|
319
373
|
case 3: return [2 /*return*/];
|
|
320
374
|
}
|
|
321
375
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -55,12 +55,19 @@ declare class FishPi {
|
|
|
55
55
|
* 查询指定用户信息
|
|
56
56
|
* @param username 用户名
|
|
57
57
|
*/
|
|
58
|
-
user(username: string): Promise<
|
|
58
|
+
user(username: string): Promise<UserInfo>;
|
|
59
59
|
/**
|
|
60
60
|
* 用户名联想,通常用于 @ 列表
|
|
61
61
|
* @param username 用户名
|
|
62
62
|
*/
|
|
63
63
|
names(name: string): Promise<AtUserList>;
|
|
64
|
+
/**
|
|
65
|
+
* 获取最近注册的20个用户
|
|
66
|
+
*/
|
|
67
|
+
recentRegister(): Promise<ApiResponse<Array<{
|
|
68
|
+
userNickname: string;
|
|
69
|
+
userName: string;
|
|
70
|
+
}>>>;
|
|
64
71
|
/**
|
|
65
72
|
* 上传文件
|
|
66
73
|
* @param files 要上传的文件,如果是在 Node 使用,则传入文件路径数组,若是在浏览器使用,则传入文件对象数组。
|
package/lib/index.js
CHANGED
|
@@ -164,8 +164,8 @@ var FishPi = /** @class */ (function () {
|
|
|
164
164
|
})];
|
|
165
165
|
case 1:
|
|
166
166
|
rsp = _a.sent();
|
|
167
|
-
this.setToken(rsp.
|
|
168
|
-
return [2 /*return*/, rsp
|
|
167
|
+
this.setToken(rsp.Key);
|
|
168
|
+
return [2 /*return*/, rsp];
|
|
169
169
|
case 2:
|
|
170
170
|
e_1 = _a.sent();
|
|
171
171
|
throw e_1;
|
|
@@ -186,16 +186,13 @@ var FishPi = /** @class */ (function () {
|
|
|
186
186
|
case 0:
|
|
187
187
|
_a.trys.push([0, 2, , 3]);
|
|
188
188
|
return [4 /*yield*/, (0, utils_1.request)({
|
|
189
|
-
url: "user/".concat(username
|
|
189
|
+
url: "user/".concat(username).concat(this.apiKey ? "?apiKey=".concat(this.apiKey) : '')
|
|
190
190
|
})];
|
|
191
191
|
case 1:
|
|
192
192
|
rsp = _a.sent();
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
rsp.data.sysMetal = (0, utils_1.toMetal)(rsp.data.sysMetal);
|
|
197
|
-
rsp.data.allMetalOwned = (0, utils_1.toMetal)(rsp.data.allMetalOwned);
|
|
198
|
-
return [2 /*return*/, rsp.data];
|
|
193
|
+
rsp.sysMetal = (0, utils_1.toMetal)(rsp.sysMetal);
|
|
194
|
+
rsp.allMetalOwned = (0, utils_1.toMetal)(rsp.allMetalOwned);
|
|
195
|
+
return [2 /*return*/, rsp];
|
|
199
196
|
case 2:
|
|
200
197
|
e_2 = _a.sent();
|
|
201
198
|
throw e_2;
|
|
@@ -224,7 +221,7 @@ var FishPi = /** @class */ (function () {
|
|
|
224
221
|
})];
|
|
225
222
|
case 1:
|
|
226
223
|
rsp = _a.sent();
|
|
227
|
-
return [2 /*return*/, rsp
|
|
224
|
+
return [2 /*return*/, rsp];
|
|
228
225
|
case 2:
|
|
229
226
|
e_3 = _a.sent();
|
|
230
227
|
throw e_3;
|
|
@@ -233,13 +230,38 @@ var FishPi = /** @class */ (function () {
|
|
|
233
230
|
});
|
|
234
231
|
});
|
|
235
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* 获取最近注册的20个用户
|
|
235
|
+
*/
|
|
236
|
+
FishPi.prototype.recentRegister = function () {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
238
|
+
var rsp, e_4;
|
|
239
|
+
return __generator(this, function (_a) {
|
|
240
|
+
switch (_a.label) {
|
|
241
|
+
case 0:
|
|
242
|
+
_a.trys.push([0, 2, , 3]);
|
|
243
|
+
return [4 /*yield*/, (0, utils_1.request)({
|
|
244
|
+
url: "api/user/recentReg",
|
|
245
|
+
method: 'get',
|
|
246
|
+
})];
|
|
247
|
+
case 1:
|
|
248
|
+
rsp = _a.sent();
|
|
249
|
+
return [2 /*return*/, rsp];
|
|
250
|
+
case 2:
|
|
251
|
+
e_4 = _a.sent();
|
|
252
|
+
throw e_4;
|
|
253
|
+
case 3: return [2 /*return*/];
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
};
|
|
236
258
|
/**
|
|
237
259
|
* 上传文件
|
|
238
260
|
* @param files 要上传的文件,如果是在 Node 使用,则传入文件路径数组,若是在浏览器使用,则传入文件对象数组。
|
|
239
261
|
*/
|
|
240
262
|
FishPi.prototype.upload = function (files) {
|
|
241
263
|
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
var data, _a, rsp,
|
|
264
|
+
var data, _a, rsp, e_5;
|
|
243
265
|
return __generator(this, function (_b) {
|
|
244
266
|
switch (_b.label) {
|
|
245
267
|
case 0:
|
|
@@ -269,10 +291,10 @@ var FishPi = /** @class */ (function () {
|
|
|
269
291
|
})];
|
|
270
292
|
case 4:
|
|
271
293
|
rsp = _b.sent();
|
|
272
|
-
return [2 /*return*/, rsp
|
|
294
|
+
return [2 /*return*/, rsp];
|
|
273
295
|
case 5:
|
|
274
|
-
|
|
275
|
-
throw
|
|
296
|
+
e_5 = _b.sent();
|
|
297
|
+
throw e_5;
|
|
276
298
|
case 6: return [2 /*return*/];
|
|
277
299
|
}
|
|
278
300
|
});
|
package/lib/typing.d.ts
CHANGED
|
@@ -2050,3 +2050,32 @@ export interface ChatData {
|
|
|
2050
2050
|
*/
|
|
2051
2051
|
receiverUserName: string;
|
|
2052
2052
|
}
|
|
2053
|
+
/**
|
|
2054
|
+
* 禁言用户信息
|
|
2055
|
+
*/
|
|
2056
|
+
export interface MuteItem {
|
|
2057
|
+
/**
|
|
2058
|
+
* 解除禁言时间戳
|
|
2059
|
+
*/
|
|
2060
|
+
time: number;
|
|
2061
|
+
/**
|
|
2062
|
+
* 用户头像
|
|
2063
|
+
*/
|
|
2064
|
+
userAvatarURL: string;
|
|
2065
|
+
/**
|
|
2066
|
+
* 用户名
|
|
2067
|
+
*/
|
|
2068
|
+
userName: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* 用户昵称
|
|
2071
|
+
*/
|
|
2072
|
+
userNickname: string;
|
|
2073
|
+
}
|
|
2074
|
+
export interface NoticeMsg {
|
|
2075
|
+
command: 'refreshNotification' | 'chatUnreadCountRefresh' | 'newIdleChatMessage';
|
|
2076
|
+
userId: string;
|
|
2077
|
+
preview?: string;
|
|
2078
|
+
senderAvatar?: string;
|
|
2079
|
+
senderUserName?: string;
|
|
2080
|
+
count?: number;
|
|
2081
|
+
}
|
package/lib/user.js
CHANGED
|
@@ -70,7 +70,7 @@ var User = /** @class */ (function () {
|
|
|
70
70
|
rsp = _a.sent();
|
|
71
71
|
if (rsp.data)
|
|
72
72
|
rsp.data.sysMetal = (0, utils_1.toMetal)(rsp.data.sysMetal);
|
|
73
|
-
return [2 /*return*/, rsp
|
|
73
|
+
return [2 /*return*/, rsp];
|
|
74
74
|
case 2:
|
|
75
75
|
e_1 = _a.sent();
|
|
76
76
|
throw e_1;
|
|
@@ -95,7 +95,7 @@ var User = /** @class */ (function () {
|
|
|
95
95
|
case 1:
|
|
96
96
|
rsp = _a.sent();
|
|
97
97
|
rsp.data = Object.keys(rsp.data);
|
|
98
|
-
return [2 /*return*/, rsp
|
|
98
|
+
return [2 /*return*/, rsp];
|
|
99
99
|
case 2:
|
|
100
100
|
e_2 = _a.sent();
|
|
101
101
|
throw e_2;
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fishpi",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "A Package to use API of fishpi.",
|
|
5
|
-
"main": "./lib/index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"lib"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"prebuild": "rimraf lib",
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"prepublish": "npm run build",
|
|
13
|
-
"test": "NODE_OPTIONS=\"-r ts-node/register --no-warnings\" node ./test/index.ts",
|
|
14
|
-
"publish": "npm publish"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/imlinhanchao/fishpi-api-package.git"
|
|
19
|
-
},
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"author": {
|
|
22
|
-
"name": "Hancel.Lin",
|
|
23
|
-
"email": "imlinhanchao@foxmail.com",
|
|
24
|
-
"url": "https://github.com/imlinhanchao"
|
|
25
|
-
},
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=12.0"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [],
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/imlinhanchao/fishpi-api-package/issues"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/imlinhanchao/fishpi-api-package#readme",
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"form-data": "^4.0.0",
|
|
36
|
-
"reconnecting-websocket": "^4.4.0",
|
|
37
|
-
"ws": "^8.4.2"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/node": "^12.20.11",
|
|
41
|
-
"@types/node-fetch": "^2.6.3",
|
|
42
|
-
"@types/ws": "^8.2.2",
|
|
43
|
-
"node-fetch": "2",
|
|
44
|
-
"rimraf": "^5.0.0",
|
|
45
|
-
"ts-node": "^10.2.1",
|
|
46
|
-
"typescript": "^4.2.4"
|
|
47
|
-
},
|
|
48
|
-
"release": {
|
|
49
|
-
"branches": [
|
|
50
|
-
"master"
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "fishpi",
|
|
3
|
+
"version": "0.0.24",
|
|
4
|
+
"description": "A Package to use API of fishpi.",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"lib"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"prebuild": "rimraf lib",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"prepublish": "npm run build",
|
|
13
|
+
"test": "NODE_OPTIONS=\"-r ts-node/register --no-warnings\" node ./test/index.ts",
|
|
14
|
+
"publish": "npm publish"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/imlinhanchao/fishpi-api-package.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Hancel.Lin",
|
|
23
|
+
"email": "imlinhanchao@foxmail.com",
|
|
24
|
+
"url": "https://github.com/imlinhanchao"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=12.0"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/imlinhanchao/fishpi-api-package/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/imlinhanchao/fishpi-api-package#readme",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"form-data": "^4.0.0",
|
|
36
|
+
"reconnecting-websocket": "^4.4.0",
|
|
37
|
+
"ws": "^8.4.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^12.20.11",
|
|
41
|
+
"@types/node-fetch": "^2.6.3",
|
|
42
|
+
"@types/ws": "^8.2.2",
|
|
43
|
+
"node-fetch": "2",
|
|
44
|
+
"rimraf": "^5.0.0",
|
|
45
|
+
"ts-node": "^10.2.1",
|
|
46
|
+
"typescript": "^4.2.4"
|
|
47
|
+
},
|
|
48
|
+
"release": {
|
|
49
|
+
"branches": [
|
|
50
|
+
"master"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|