web-dc-api 0.0.71 → 0.0.73
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/dist/dc.min.js +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +2 -2
- package/lib/common/types/types.ts +2 -0
- package/lib/implements/aiproxy/manager.ts +16 -1
- package/lib/modules/auth-module.ts +2 -2
- package/package.json +9 -9
|
@@ -507,9 +507,24 @@ export class AIProxyManager {
|
|
|
507
507
|
continue; // 如果格式不正确,跳过
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
const
|
|
510
|
+
const valueWithExtra = contentStr.substring((parts[0]||"").length + 1);
|
|
511
511
|
try {
|
|
512
|
+
//解析出扩展信息(时间戳,用户公钥等)
|
|
513
|
+
const valueParts = valueWithExtra.split("$$$dckv_extra$$$");
|
|
514
|
+
const value = valueParts[0] || "{}";
|
|
512
515
|
const content = JSON.parse(value);
|
|
516
|
+
if (valueParts.length > 1) {
|
|
517
|
+
const extraStr = valueParts[1] || "{}";
|
|
518
|
+
const extra = JSON.parse(extraStr);
|
|
519
|
+
if (extra) {
|
|
520
|
+
if (extra.timestamp) {
|
|
521
|
+
content.timestamp = extra.timestamp;
|
|
522
|
+
}
|
|
523
|
+
if (extra.opuser) {
|
|
524
|
+
content.userPubkey = extra.opuser;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
513
528
|
allContent.push(content as AIProxyConfig);
|
|
514
529
|
} catch (error) {
|
|
515
530
|
console.error("解析内容错误:", error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-dc-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
4
4
|
"description": "web相关的dcapi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"browser": "dist/dc.min.js",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"keywords": [],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"grpc-libp2p-client": "^0.0.10",
|
|
37
36
|
"@helia/block-brokers": "4.1.0",
|
|
38
37
|
"@helia/dag-cbor": "^4.0.3",
|
|
39
38
|
"@helia/interface": "4.0.1",
|
|
@@ -57,6 +56,7 @@
|
|
|
57
56
|
"datastore-idb": "^3.0.1",
|
|
58
57
|
"datastore-level": "^11.0.1",
|
|
59
58
|
"google-protobuf": "~3.21.2",
|
|
59
|
+
"grpc-libp2p-client": "^0.0.14",
|
|
60
60
|
"helia": "5.3.0",
|
|
61
61
|
"interface-ipld-format": "^1.0.1",
|
|
62
62
|
"it-to-buffer": "^4.0.7",
|
|
@@ -77,11 +77,6 @@
|
|
|
77
77
|
"lib": "lib"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"cbor-x": "^1.6.0",
|
|
81
|
-
"crypto-js": "^4.2.0",
|
|
82
|
-
"ethers": "^6.14.1",
|
|
83
|
-
"lodash": "~4.17.0",
|
|
84
|
-
"mp4box": "^0.5.4",
|
|
85
80
|
"@babel/core": "^7.27.4",
|
|
86
81
|
"@babel/preset-env": "^7.27.2",
|
|
87
82
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -93,12 +88,17 @@
|
|
|
93
88
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
94
89
|
"@types/google-protobuf": "^3.15.12",
|
|
95
90
|
"@types/jsbn": "^1.2.33",
|
|
91
|
+
"cbor-x": "^1.6.0",
|
|
96
92
|
"core-js": "^3.43.0",
|
|
93
|
+
"crypto-js": "^4.2.0",
|
|
94
|
+
"ethers": "^6.14.1",
|
|
95
|
+
"lodash": "~4.17.0",
|
|
96
|
+
"mp4box": "^0.5.4",
|
|
97
97
|
"nodemon": "^3.1.9",
|
|
98
98
|
"rollup-plugin-dts": "^6.2.1",
|
|
99
99
|
"typescript": "^5.8.3",
|
|
100
|
-
"webpack-bundle-analyzer": "^4.10.2",
|
|
101
100
|
"vite": "^7.1.2",
|
|
102
|
-
"vite-plugin-dts": "^4.5.4"
|
|
101
|
+
"vite-plugin-dts": "^4.5.4",
|
|
102
|
+
"webpack-bundle-analyzer": "^4.10.2"
|
|
103
103
|
}
|
|
104
104
|
}
|