This commit is contained in:
parent
9eaf6125b7
commit
db98cf20a1
@ -1,4 +1,4 @@
|
|||||||
import { Config } from "jest";
|
import {Config} from "jest";
|
||||||
|
|
||||||
// Sync object
|
// Sync object
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mcutils-library",
|
"name": "mcutils-library",
|
||||||
"version": "1.2.4",
|
"version": "1.2.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { McUtilsAPIError } from "../types/error";
|
import {McUtilsAPIError} from "../types/error";
|
||||||
|
|
||||||
export default class WebRequest {
|
export default class WebRequest {
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CachedEndpointStatus } from "types/mojang/endpoint-status";
|
import {CachedEndpointStatus} from "types/mojang/endpoint-status";
|
||||||
import { API_ENDPOINT } from "..";
|
import {API_ENDPOINT} from "..";
|
||||||
import WebRequest from "../common/WebRequest";
|
import WebRequest from "../common/WebRequest";
|
||||||
|
|
||||||
const endpointStatusEndpoint = API_ENDPOINT + "/mojang/status";
|
const endpointStatusEndpoint = API_ENDPOINT + "/mojang/status";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { API_ENDPOINT, CachedPlayer, CachedUsernameToUuid } from "..";
|
import {API_ENDPOINT, CachedPlayer, CachedUsernameToUuid} from "..";
|
||||||
import WebRequest from "../common/WebRequest";
|
import WebRequest from "../common/WebRequest";
|
||||||
|
|
||||||
const playerEndpoint = API_ENDPOINT + "/player/{id}";
|
const playerEndpoint = API_ENDPOINT + "/player/{id}";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { API_ENDPOINT, CachedBedrockMinecraftServer, CachedJavaMinecraftServer } from "..";
|
import {API_ENDPOINT, CachedBedrockMinecraftServer, CachedJavaMinecraftServer} from "..";
|
||||||
import WebRequest from "../common/WebRequest";
|
import WebRequest from "../common/WebRequest";
|
||||||
import { BlockedStatus } from "../types/server/blocked-status";
|
import {BlockedStatus} from "../types/server/blocked-status";
|
||||||
import { ServerPlatform } from "../types/server/platform";
|
import {ServerPlatform} from "../types/server/platform";
|
||||||
|
|
||||||
const serverEndpoint = API_ENDPOINT + "/server/{platform}/{hostname}";
|
const serverEndpoint = API_ENDPOINT + "/server/{platform}/{hostname}";
|
||||||
const serverIconEndpoint = API_ENDPOINT + "/server/icon/{hostname}";
|
const serverIconEndpoint = API_ENDPOINT + "/server/icon/{hostname}";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Status } from "../status";
|
import {Status} from "../status";
|
||||||
|
import {Cache} from "../cache";
|
||||||
|
|
||||||
export interface CachedEndpointStatus extends Cache, EndpointStatus {
|
export interface CachedEndpointStatus extends Cache, EndpointStatus {
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import {Cache} from "../cache";
|
||||||
|
|
||||||
export interface CachedPlayer extends Cache, Player {}
|
export interface CachedPlayer extends Cache, Player {}
|
||||||
|
|
||||||
type Player = {
|
type Player = {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { MinecraftServer } from "../server";
|
import {MinecraftServer} from "../server";
|
||||||
|
import {Cache} from "../../cache";
|
||||||
|
|
||||||
export interface CachedBedrockMinecraftServer extends Cache, BedrockMinecraftServer {}
|
export interface CachedBedrockMinecraftServer extends Cache, BedrockMinecraftServer {}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { MinecraftServer } from "../server";
|
import {MinecraftServer} from "../server";
|
||||||
|
import {Cache} from "../../cache";
|
||||||
|
|
||||||
export interface CachedJavaMinecraftServer extends Cache, JavaMinecraftServer {}
|
export interface CachedJavaMinecraftServer extends Cache, JavaMinecraftServer {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getMojangEndpointStatus } from "../dist";
|
import {getMojangEndpointStatus} from "../dist";
|
||||||
|
|
||||||
test("ensureMojangEndpointStatusLookupSuccess", async () => {
|
test("ensureMojangEndpointStatusLookupSuccess", async () => {
|
||||||
const response = await getMojangEndpointStatus();
|
const response = await getMojangEndpointStatus();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getPlayer, getPlayerSkinPart, getPlayerUuid } from "../dist/index";
|
import {getPlayer, getPlayerSkinPart, getPlayerUuid} from "../dist/index";
|
||||||
|
|
||||||
test("ensureGetPlayerLookupSuccess", async () => {
|
test("ensureGetPlayerLookupSuccess", async () => {
|
||||||
const player = await getPlayer("Notch");
|
const player = await getPlayer("Notch");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ServerPlatform, getBlockedStatus, getServer, getServerIcon } from "../dist";
|
import {getBlockedStatus, getServer, getServerIcon, ServerPlatform} from "../dist";
|
||||||
|
|
||||||
test("ensureGetServerLookupSuccess", async () => {
|
test("ensureGetServerLookupSuccess", async () => {
|
||||||
const server = await getServer(ServerPlatform.Java, "mc.hypixel.net");
|
const server = await getServer(ServerPlatform.Java, "mc.hypixel.net");
|
||||||
|
Loading…
Reference in New Issue
Block a user