mcutils-js-api 2.0.0 → 2.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/dist/index.d.ts +4 -4
- package/dist/test.js +8 -0
- package/dist/types/{player → cache}/cached-player-name.d.ts +1 -1
- package/dist/types/cache/cached-player.d.ts +3 -0
- package/dist/types/dns/dns-record.d.ts +4 -15
- package/dist/types/dns/impl/a-record.d.ts +6 -0
- package/dist/types/dns/impl/srv-record.d.ts +9 -0
- package/dist/types/dns/impl/srv-record.js +1 -0
- package/dist/types/server/{bedrock-server.d.ts → impl/bedrock-server.d.ts} +1 -1
- package/dist/types/server/impl/bedrock-server.js +1 -0
- package/dist/types/server/{java-server.d.ts → impl/java-server.d.ts} +1 -1
- package/dist/types/server/impl/java-server.js +1 -0
- package/dist/types/server/server.d.ts +11 -4
- package/package.json +1 -1
- package/dist/types/player/cached-player.d.ts +0 -3
- /package/dist/{types/cache.js → test.d.ts} +0 -0
- /package/dist/types/{cache.d.ts → cache/cache.d.ts} +0 -0
- /package/dist/types/{player/cached-player-name.js → cache/cache.js} +0 -0
- /package/dist/types/{player/cached-player.js → cache/cached-player-name.js} +0 -0
- /package/dist/types/{server/bedrock-server.js → cache/cached-player.js} +0 -0
- /package/dist/types/{server/java-server.js → dns/impl/a-record.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ErrorResponse } from "./types/response/error-response";
|
|
2
|
-
import type { BedrockServer } from "./types/server/bedrock-server";
|
|
3
|
-
import type { JavaServer } from "./types/server/java-server";
|
|
4
|
-
import type { CachedPlayer } from "./types/
|
|
5
|
-
import type { CachedPlayerName } from "./types/
|
|
2
|
+
import type { BedrockServer } from "./types/server/impl/bedrock-server";
|
|
3
|
+
import type { JavaServer } from "./types/server/impl/java-server";
|
|
4
|
+
import type { CachedPlayer } from "./types/cache/cached-player";
|
|
5
|
+
import type { CachedPlayerName } from "./types/cache/cached-player-name";
|
|
6
6
|
export declare class McUtilsAPI {
|
|
7
7
|
private readonly endpoint;
|
|
8
8
|
constructor(endpoint?: string);
|
package/dist/test.js
ADDED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
address?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SRVRecord {
|
|
8
|
-
type: "SRV";
|
|
9
|
-
ttl: number;
|
|
10
|
-
name: string;
|
|
11
|
-
target: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
weight: number;
|
|
14
|
-
port: number;
|
|
15
|
-
}
|
|
1
|
+
import type { ARecord } from "./impl/a-record";
|
|
2
|
+
import type { SRVRecord } from "./impl/srv-record";
|
|
3
|
+
export type { ARecord } from "./impl/a-record";
|
|
4
|
+
export type { SRVRecord } from "./impl/srv-record";
|
|
16
5
|
export type DnsRecord = ARecord | SRVRecord;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Cache } from "../cache";
|
|
1
|
+
import type { Cache } from "../cache/cache";
|
|
2
2
|
import type { DnsRecord } from "../dns/dns-record";
|
|
3
3
|
export interface Server extends Cache {
|
|
4
4
|
hostname: string;
|
|
@@ -7,7 +7,7 @@ export interface Server extends Cache {
|
|
|
7
7
|
motd: ServerMotd;
|
|
8
8
|
players: ServerPlayers;
|
|
9
9
|
records: DnsRecord[];
|
|
10
|
-
location?:
|
|
10
|
+
location?: GeoLocation | null;
|
|
11
11
|
asn?: AsnData | null;
|
|
12
12
|
}
|
|
13
13
|
export type ServerMotd = {
|
|
@@ -16,22 +16,29 @@ export type ServerMotd = {
|
|
|
16
16
|
html: string[];
|
|
17
17
|
preview: string;
|
|
18
18
|
};
|
|
19
|
+
export type ServerPlayerSampleName = {
|
|
20
|
+
raw: string;
|
|
21
|
+
clean: string;
|
|
22
|
+
html: string;
|
|
23
|
+
};
|
|
19
24
|
export type ServerPlayerSample = {
|
|
20
25
|
id: string;
|
|
21
|
-
name:
|
|
26
|
+
name: ServerPlayerSampleName;
|
|
27
|
+
url: string;
|
|
22
28
|
};
|
|
23
29
|
export type ServerPlayers = {
|
|
24
30
|
online: number;
|
|
25
31
|
max: number;
|
|
26
32
|
sample?: ServerPlayerSample[];
|
|
27
33
|
};
|
|
28
|
-
export type
|
|
34
|
+
export type GeoLocation = {
|
|
29
35
|
country: string;
|
|
30
36
|
countryCode: string;
|
|
31
37
|
region: string;
|
|
32
38
|
city: string;
|
|
33
39
|
latitude: number;
|
|
34
40
|
longitude: number;
|
|
41
|
+
flagUrl: string;
|
|
35
42
|
};
|
|
36
43
|
export type AsnData = {
|
|
37
44
|
asn: string;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|