kol.js 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "kol.js",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "src/index.ts",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "/src"
8
8
  ],
9
+ "repository": "https://github.com/loathers/oaf.git",
9
10
  "license": "MIT",
10
11
  "scripts": {
11
12
  "build": "tsc",
@@ -13,23 +14,23 @@
13
14
  "format": "prettier --write ."
14
15
  },
15
16
  "devDependencies": {
16
- "prettier": "^3.6.2",
17
- "typescript": "^5.8.2",
18
- "vitest": "^3.0.9"
17
+ "prettier": "^3.7.4",
18
+ "typescript": "^5.9.3",
19
+ "vitest": "^4.0.15"
19
20
  },
20
21
  "dependencies": {
21
22
  "async-mutex": "^0.5.0",
22
- "css-select": "^5.1.0",
23
+ "css-select": "^6.0.0",
23
24
  "date-fns": "^4.1.0",
24
25
  "domhandler": "^5.0.3",
25
26
  "domutils": "^3.2.2",
26
- "got": "^14.4.6",
27
- "html-entities": "^2.5.3",
27
+ "got": "^14.6.5",
28
+ "html-entities": "^2.6.0",
28
29
  "htmlparser2": "^10.0.0",
29
- "image-size": "^2.0.1",
30
+ "image-size": "^2.0.2",
30
31
  "querystring": "^0.2.1",
31
- "tough-cookie": "^5.1.2",
32
+ "tough-cookie": "^6.0.0",
32
33
  "ts-dedent": "^2.2.0",
33
34
  "typed-emitter": "^2.1.0"
34
35
  }
35
- }
36
+ }
package/src/Client.ts CHANGED
@@ -1,21 +1,24 @@
1
1
  import { Mutex } from "async-mutex";
2
2
  import { EventEmitter } from "node:events";
3
- import TypedEventEmitter, { EventMap } from "typed-emitter";
3
+ import TypedEventEmitter, { type EventMap } from "typed-emitter";
4
4
 
5
5
  import { sanitiseBlueText, wait } from "./utils/utils.js";
6
6
  import { Player } from "./Player.js";
7
7
  import { parseLeaderboard } from "./utils/leaderboard.js";
8
8
  import {
9
- ChatMessage,
10
- KmailMessage,
11
- KoLChatMessage,
12
- KoLKmail,
13
- KoLMessage,
9
+ type ChatMessage,
10
+ type KmailMessage,
11
+ type KoLChatMessage,
12
+ type KoLKmail,
13
+ type KoLMessage,
14
14
  isValidMessage,
15
15
  } from "./utils/kmail.js";
16
16
  import { PlayerCache } from "./Cache.js";
17
17
  import { CookieJar } from "tough-cookie";
18
- import got, { OptionsOfJSONResponseBody, OptionsOfTextResponseBody } from "got";
18
+ import got, {
19
+ type OptionsOfJSONResponseBody,
20
+ type OptionsOfTextResponseBody,
21
+ } from "got";
19
22
 
20
23
  type TypedEmitter<T extends EventMap> = TypedEventEmitter.default<T>;
21
24
 
@@ -13,7 +13,6 @@ describe("Avatars", () => {
13
13
  it("can parse an avatar with a broken url", async () => {
14
14
  const page = await loadFixture(__dirname, "showplayer_broken_avatar.html");
15
15
  const svg = await generateAvatarSvg(page);
16
- console.log(svg);
17
16
  expect(svg).toContain(`title="/adventureimages/nopic.gif"`);
18
17
  });
19
18
  });