@soga/baidu-ua 0.1.13 → 0.1.14
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 +1 -0
- package/dist/main.d.ts +2 -1
- package/dist/main.js +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
### @soga/baidu-ua
|
package/dist/main.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export declare const getBaiduUA: (host_id: number, is_large_file: boolean) => Pr
|
|
|
2
2
|
ua: string;
|
|
3
3
|
finishBaiduUA: () => void;
|
|
4
4
|
}>;
|
|
5
|
-
export declare const resetBaiduUA: (app_ua_list: string[], web_ua_list: string[]) =>
|
|
5
|
+
export declare const resetBaiduUA: (app_ua_list: string[], web_ua_list: string[]) => void;
|
|
6
|
+
export declare const removeBaiduUA: (host_id: number) => void;
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resetBaiduUA = exports.getBaiduUA = void 0;
|
|
3
|
+
exports.removeBaiduUA = exports.resetBaiduUA = exports.getBaiduUA = void 0;
|
|
4
4
|
const userAgents = {
|
|
5
5
|
app: [
|
|
6
6
|
'netdisk;4.46.6;PC;PC-Mac',
|
|
@@ -98,7 +98,7 @@ const getBaiduUA = async (host_id, is_large_file) => {
|
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
exports.getBaiduUA = getBaiduUA;
|
|
101
|
-
const resetBaiduUA =
|
|
101
|
+
const resetBaiduUA = (app_ua_list, web_ua_list) => {
|
|
102
102
|
userAgents.app = app_ua_list;
|
|
103
103
|
userAgents.web = web_ua_list;
|
|
104
104
|
instanceMap.forEach((ins) => {
|
|
@@ -106,3 +106,7 @@ const resetBaiduUA = async (app_ua_list, web_ua_list) => {
|
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
108
|
exports.resetBaiduUA = resetBaiduUA;
|
|
109
|
+
const removeBaiduUA = (host_id) => {
|
|
110
|
+
instanceMap.delete(host_id);
|
|
111
|
+
};
|
|
112
|
+
exports.removeBaiduUA = removeBaiduUA;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soga/baidu-ua",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"keywords": [],
|
|
32
32
|
"author": "",
|
|
33
33
|
"license": "ISC",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "99f8fe90e0f34b6a645e6b2c6682071f74c9a0dc"
|
|
35
35
|
}
|