mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
some api paths
This commit is contained in:
1 parent
b060e65af5
commit
b2fd85a5b0
13 files changed
+106
-21
No files matched your search
@@ -1,9 +1,31 @@
|
||||
import { fetchPB } from "../../protobuf";
|
||||
import { GameDefinitions } from "../../protos";
|
||||
import {
|
||||
CamouflageDefinitions,
|
||||
ConsumableDefinitions,
|
||||
GameDefinitions,
|
||||
ProvisionDefinitions,
|
||||
TankDefinitions,
|
||||
} from "../../protos";
|
||||
import { BlitzKitAPI } from "./base";
|
||||
|
||||
export class ClientBlitzKitAPI extends BlitzKitAPI {
|
||||
game() {
|
||||
gameDefinitions() {
|
||||
return fetchPB("/api/definitions/game.pb", GameDefinitions);
|
||||
}
|
||||
|
||||
consumableDefinitions() {
|
||||
return fetchPB("/api/definitions/consumables.pb", ConsumableDefinitions);
|
||||
}
|
||||
|
||||
tankDefinitions() {
|
||||
return fetchPB("/api/definitions/tanks.pb", TankDefinitions);
|
||||
}
|
||||
|
||||
camouflageDefinitions() {
|
||||
return fetchPB("/api/definitions/camouflage.pb", CamouflageDefinitions);
|
||||
}
|
||||
|
||||
provisionDefinitions() {
|
||||
return fetchPB("/api/definitions/provisions.pb", ProvisionDefinitions);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export * from "./base";
|
||||
export * from "./client";
|
||||
export * from "./server";
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
AbstractVFS,
|
||||
Armor,
|
||||
AssaultRanges,
|
||||
AvailableNationsYaml,
|
||||
@@ -59,6 +58,7 @@ import {
|
||||
VehicleDefinitionList,
|
||||
VehicleDefinitions,
|
||||
} from "@blitzkit/core";
|
||||
import { AbstractVFS } from "@blitzkit/core/src/blitzkit/vfs/abstract";
|
||||
import { SUPPORTED_LOCALE_BLITZ_MAP } from "@blitzkit/i18n";
|
||||
import locales from "@blitzkit/i18n/locales.json";
|
||||
import { parse as parsePath } from "path";
|
||||
@@ -147,8 +147,6 @@ export class ServerBlitzKitAPI extends BlitzKitAPI {
|
||||
}
|
||||
|
||||
async init() {
|
||||
console.log("Initializing server; this will take a while...");
|
||||
|
||||
console.log("Initializing virtual file system...");
|
||||
await this.vfs.init();
|
||||
|
||||
@@ -1650,7 +1648,7 @@ export class ServerBlitzKitAPI extends BlitzKitAPI {
|
||||
}
|
||||
}
|
||||
|
||||
export function Cache(disableInDev = false) {
|
||||
function Cache(disableInDev = false) {
|
||||
const cache = new WeakMap<object, Map<string, Promise<unknown>>>();
|
||||
|
||||
return function <This, Arguments extends any[], Return>(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from "./api";
|
||||
export * from "./assertSecret";
|
||||
export * from "./availableProvisions";
|
||||
export * from "./averageDefinitions";
|
||||
@@ -29,6 +28,5 @@ export * from "./tankNames";
|
||||
export * from "./unionBoundingBox";
|
||||
export * from "./uniqueGuns";
|
||||
export * from "./unwrapBlitzkitResponse";
|
||||
export * from "./vfs";
|
||||
export * from "./votes";
|
||||
export * from "./youtubers";
|
||||
@@ -1,5 +0,0 @@
|
||||
export * from "./abstract";
|
||||
export * from "./local";
|
||||
export * from "./mixed";
|
||||
export * from "./steam";
|
||||
export * from "./zip";
|
||||
Reference in new issue
Block a user