rune
Version:
CLI to upload your games to Rune
42 lines (41 loc) • 1.39 kB
TypeScript
import { Linter } from "eslint";
import { FileInfo } from "./getGameFiles.js";
import LintMessage = Linter.LintMessage;
export declare const MAX_PLAYERS = 6;
export declare const validationOptions: {
sdkUrlStartOldRune: string;
sdkUrlStartRune: string;
sdkUrlStartDusk: string;
sdkVersionRegex: RegExp;
minSdkVersion: string;
maxFiles: number;
maxSizeMb: number;
};
export interface ValidationError {
message: string;
lintErrors?: LintMessage[];
}
export interface ValidationResult {
valid: boolean;
errors: ValidationError[];
sdk: "Rune" | "Dusk";
}
export declare function parseGameIndexHtml(indexHtmlContent: string): {
parsedIndexHtml: import("node-html-parser").HTMLElement;
scripts: import("node-html-parser").HTMLElement[];
sdkScript: import("node-html-parser").HTMLElement | undefined;
} | null;
export type GameConfig = {
landscape: boolean;
minPlayers: number | undefined;
maxPlayers: number | undefined;
updatesPerSecond: number;
eventCallbacks: {
playerLeft: boolean;
playerJoined: boolean;
};
update: boolean;
persistPlayerData: boolean;
};
export declare function validateGameFilesWithEval(logicRunner: string, files: FileInfo[]): Promise<ValidationResult>;
export declare function validateGameFiles(files: FileInfo[], gameConfig: GameConfig): Promise<ValidationResult>;