@floating-live/bilibili 0.15.3 → 0.16.0
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/index.d.ts +5 -5
- package/index.js +5 -21
- package/package.json +7 -7
- package/parser.d.ts +10 -6
- package/parser.js +472 -422
- package/plugin.d.ts +26 -29
- package/plugin.js +63 -67
- package/room.d.ts +108 -74
- package/room.js +315 -230
- package/types.d.ts +39 -484
- package/types.js +1 -2
- package/utils/fingerprint.d.ts +98 -0
- package/utils/fingerprint.js +642 -0
- package/utils/fp2.d.ts +7 -0
- package/utils/fp2.js +234 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/lsid.d.ts +1 -0
- package/utils/lsid.js +15 -0
- package/utils/randomImage.d.ts +2 -0
- package/utils/randomImage.js +107 -0
- package/utils/request.d.ts +32 -0
- package/utils/request.js +181 -0
- package/utils/uuid.d.ts +1 -0
- package/utils/uuid.js +45 -0
- package/index.ts +0 -5
- package/parser.ts +0 -433
- package/plugin.ts +0 -103
- package/room.ts +0 -272
- package/tsconfig.json +0 -14
- package/types.ts +0 -503
- package/utils.d.ts +0 -18
- package/utils.js +0 -138
- package/utils.ts +0 -145
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Minteea
|
|
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.
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./plugin";
|
|
2
|
-
export * from "./room";
|
|
3
|
-
export * from "./parser";
|
|
4
|
-
export * from "./types";
|
|
5
|
-
export * from "./utils";
|
|
1
|
+
export * from "./plugin";
|
|
2
|
+
export * from "./room";
|
|
3
|
+
export * from "./parser";
|
|
4
|
+
export * from "./types";
|
|
5
|
+
export * from "./utils";
|
package/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./plugin"), exports);
|
|
18
|
-
__exportStar(require("./room"), exports);
|
|
19
|
-
__exportStar(require("./parser"), exports);
|
|
20
|
-
__exportStar(require("./types"), exports);
|
|
21
|
-
__exportStar(require("./utils"), exports);
|
|
1
|
+
export * from "./plugin";
|
|
2
|
+
export * from "./room";
|
|
3
|
+
export * from "./parser";
|
|
4
|
+
export * from "./types";
|
|
5
|
+
export * from "./utils";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floating-live/bilibili",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"author": "Minteea",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"postpack": "npm run clear"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"bilibili-live-
|
|
17
|
+
"bilibili-live-danmaku": "^0.7.0-alpha.6"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
+
"@floating-live/platform": "^0.16.0",
|
|
20
21
|
"@types/websocket": "^1.0.5",
|
|
21
22
|
"@types/ws": "^8.5.3",
|
|
22
23
|
"rimraf": "^3.0.2",
|
|
23
|
-
"
|
|
24
|
-
"typescript": "^4.8.4"
|
|
24
|
+
"typescript": "^5.8.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"floating-live": "^0.
|
|
27
|
+
"floating-live": "^0.16.0"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|
package/parser.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { LiveMessage, LiveRoomData } from "floating-live";
|
|
2
|
+
import { BilibiliRoomData, RoomBaseInfo } from "./types";
|
|
3
|
+
import { MessageData, ResponseData } from "bilibili-live-danmaku";
|
|
4
|
+
/** 转换bilibili直播弹幕为floating通用格式 */
|
|
5
|
+
export declare function parseMessage(data: MessageData.All, room?: BilibiliRoomData): LiveMessage.All | undefined;
|
|
6
|
+
/** 转换bilibili直播间信息为floating通用格式 */
|
|
7
|
+
export declare function parseGetInfoByRoom(data: ResponseData.GetInfoByRoom): BilibiliRoomData;
|
|
8
|
+
/** 转换bilibili直播间信息为floating通用格式 */
|
|
9
|
+
export declare function parseRoomBaseInfo(data: RoomBaseInfo): BilibiliRoomData;
|
|
10
|
+
export declare function mergeLiveRoomData<T extends LiveRoomData>(...list: Partial<T>[]): T;
|