@forward-widget/danmu-universe 0.0.1 → 0.0.2
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 +6 -12
- package/dist/danmu-universe.js +11 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,19 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
## 支持的平台
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
10
|
+
- 腾讯视频
|
|
11
|
+
- 优酷视频
|
|
12
|
+
- 爱奇艺
|
|
13
|
+
- 哔哩哔哩
|
|
14
14
|
|
|
15
|
-
## 功能特性
|
|
16
|
-
|
|
17
|
-
- ✨ **多平台支持**: 统一接口访问多个视频平台的弹幕数据
|
|
18
|
-
- 🔍 **智能搜索**: 基于TMDB ID和豆瓣ID进行内容匹配
|
|
19
|
-
- ⚡ **高性能**: 支持分段加载和时间切片的弹幕获取
|
|
20
|
-
- 🛡️ **类型安全**: 完整的TypeScript类型定义
|
|
21
|
-
- 🎯 **精确定位**: 支持按时间点获取特定时段的弹幕
|
|
22
|
-
- 📦 **轻量级**: 优化的构建输出,最小化依赖
|
|
23
15
|
|
|
24
16
|
## 安装使用
|
|
25
17
|
|
|
@@ -33,6 +25,8 @@ https://unpkg.com/@forward-widget/danmu-universe
|
|
|
33
25
|
|
|
34
26
|
## 开发
|
|
35
27
|
|
|
28
|
+
欢迎社区贡献,如果你想为项目做出贡献
|
|
29
|
+
|
|
36
30
|
### 环境要求
|
|
37
31
|
|
|
38
32
|
- Node.js >= 24
|
package/dist/danmu-universe.js
CHANGED
|
@@ -3700,12 +3700,16 @@ class Storage {
|
|
|
3700
3700
|
return this.set(e, JSON.stringify(t), n);
|
|
3701
3701
|
}
|
|
3702
3702
|
cleanup() {
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
this.get(e)
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3703
|
+
try {
|
|
3704
|
+
let e = "__storage_last_cleanup__";
|
|
3705
|
+
this.get(e) || Widget.storage.keys().forEach((e)=>{
|
|
3706
|
+
this.get(e);
|
|
3707
|
+
}), this.set(e, "1", {
|
|
3708
|
+
ttl: TTL_1_DAY
|
|
3709
|
+
});
|
|
3710
|
+
} catch (e) {
|
|
3711
|
+
console.error("Failed to cleanup storage", e);
|
|
3712
|
+
}
|
|
3709
3713
|
}
|
|
3710
3714
|
constructor(){
|
|
3711
3715
|
_define_property(this, "defaultTTL", TTL_5_MINUTES);
|
|
@@ -5899,7 +5903,7 @@ WidgetMetadata = {
|
|
|
5899
5903
|
title: "\u901A\u7528\u5F39\u5E55",
|
|
5900
5904
|
description: "\u901A\u7528\u5F39\u5E55\u63D2\u4EF6\uFF0C\u652F\u6301\u817E\u8BAF\u3001\u4F18\u9177\u3001\u7231\u5947\u827A\u3001\u54D4\u54E9\u54D4\u54E9\u7B49\u5E73\u53F0",
|
|
5901
5905
|
author: "Baran",
|
|
5902
|
-
version: "0.0.
|
|
5906
|
+
version: "0.0.2",
|
|
5903
5907
|
site: "https://github.com/baranwang/forward-widgets/tree/main/packages/danmu-universe",
|
|
5904
5908
|
requiredVersion: "0.0.2",
|
|
5905
5909
|
modules: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forward-widget/danmu-universe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/danmu-universe.js",
|
|
6
6
|
"exports": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "rslib build",
|
|
35
|
-
"dev": "rslib build --watch",
|
|
34
|
+
"build": "NODE_ENV=production rslib build",
|
|
35
|
+
"dev": "NODE_ENV=development rslib build --watch",
|
|
36
36
|
"test": "rstest",
|
|
37
37
|
"pb": "pnpm pbjs && pnpm pbts",
|
|
38
38
|
"pbjs": "pbjs -t static-module -w es6 -o src/scrapers/bilibili/dm.proto.js src/scrapers/bilibili/dm.proto",
|