koishi-plugin-oni-sync-bot 0.3.1 → 0.3.3

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -10
  2. package/package.json +2 -3
package/lib/index.js CHANGED
@@ -42,7 +42,6 @@ var import_plugin_console = require("@koishijs/plugin-console");
42
42
 
43
43
  // src/utils/login.ts
44
44
  var import_mwn = require("mwn");
45
- var import_tough_cookie = require("tough-cookie");
46
45
 
47
46
  // src/utils/tools.ts
48
47
  var import_koishi = require("koishi");
@@ -103,15 +102,8 @@ async function login(siteConfig) {
103
102
  }
104
103
  });
105
104
  if (siteConfig.name === "bwiki") {
106
- const sessdataCookie = new import_tough_cookie.Cookie({
107
- key: "SESSDATA",
108
- value: "666",
109
- domain: "wiki.biligame.com",
110
- path: "/oni",
111
- httpOnly: true,
112
- secure: true
113
- });
114
- bot.cookieJar.setCookie(sessdataCookie, bot.options.apiUrl, (err) => {
105
+ const cookieString = "SESSDATA=666; Domain=wiki.biligame.com; Path=/oni; HttpOnly; Secure";
106
+ bot.cookieJar.setCookie(cookieString, bot.options.apiUrl, (err) => {
115
107
  if (err) console.error("Cookie 注入失败:", err);
116
108
  });
117
109
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-oni-sync-bot",
3
3
  "description": "缺氧Wiki站镜像点同步-测试",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -27,7 +27,6 @@
27
27
  "koishi-plugin-cron": "^3.1.0",
28
28
  "mwn": "^3.0.1",
29
29
  "node-fetch": "^3.3.2",
30
- "pinyin-pro": "^3.28.0",
31
- "tough-cookie": "^6.0.1"
30
+ "pinyin-pro": "^3.28.0"
32
31
  }
33
32
  }