fix: un-gitignore bindings for CI
This commit is contained in:
parent
c442bbb283
commit
32d6d1fae0
2 changed files with 166 additions and 1 deletions
3
apps/oneclient/frontend/.gitignore
vendored
3
apps/oneclient/frontend/.gitignore
vendored
|
|
@ -4,4 +4,5 @@ dist
|
|||
dist-ssr
|
||||
*.local
|
||||
|
||||
**/*.gen.ts
|
||||
# **/*.gen.ts
|
||||
routeTree.gen.ts
|
||||
|
|
|
|||
164
apps/oneclient/frontend/src/bindings.gen.ts
Normal file
164
apps/oneclient/frontend/src/bindings.gen.ts
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
// This file has been generated by Specta. DO NOT EDIT.
|
||||
|
||||
import type { InferCommandOutput } from 'taurpc';
|
||||
import { createTauRPCProxy as createProxy } from 'taurpc';
|
||||
|
||||
type TAURI_CHANNEL<T> = (response: T) => void;
|
||||
|
||||
export type ClusterError = { type: 'InvalidVersion'; data: string } | { type: 'MissingJavaVersion'; data: string } | { type: 'ClusterDownloading'; data: string } | { type: 'ClusterAlreadyRunning'; data: string };
|
||||
|
||||
export interface ClusterModel { id: bigint; folder_name: string; stage: ClusterStage; created_at: string; group_id: bigint | null; name: string; mc_version: string; mc_loader: GameLoader; mc_loader_version: string | null; last_played: string | null; overall_played: bigint | null; icon_url: Icon | null; setting_profile_name: string | null; linked_pack_id: string | null; linked_pack_version: string | null }
|
||||
|
||||
export type ClusterStage = 'notready' | 'downloading' | 'repairing' | 'ready';
|
||||
|
||||
export interface ClusterUpdate { name: string | null; icon_url: Icon | null }
|
||||
|
||||
export interface CreateCluster { name: string; mc_version: string; mc_loader: GameLoader; mc_loader_version: string | null; icon: Icon | null }
|
||||
|
||||
export type CryptoError = { type: 'InvalidHash'; data: string } | { type: 'InvalidAlgorithm'; data: string };
|
||||
|
||||
export type DaoError = { type: 'NotFound'; data: string } | { type: 'AlreadyExists'; data: string } | { type: 'InvalidValue'; data: string };
|
||||
|
||||
export interface DirectoryError { type: 'BaseDir'; data: string }
|
||||
|
||||
export type DiscordError = { type: 'MissingClientId'; data: string } | { type: 'ConnectError'; data: string };
|
||||
|
||||
export type GameLoader = 'vanilla' | 'forge' | 'neoforge' | 'quilt' | 'fabric' | 'legacyfabric';
|
||||
|
||||
export type IOError = { type: 'InvalidAbsolutePath'; data: string } | { type: 'IOErrorWrapper'; data: string } | { type: 'IOError'; data: string } | { type: 'DeserializeError'; data: string } | { type: 'AsyncZipError'; data: string };
|
||||
|
||||
export type Icon = string;
|
||||
|
||||
export type IncompatiblePackageType = { type: 'McVersion'; data: string } | { type: 'Loader'; data: string };
|
||||
|
||||
export interface IngressError { type: 'NotFound'; data: string }
|
||||
|
||||
export interface IngressPayload { id: string; message: string; ingress_type: IngressType; percent: number | null; total: number }
|
||||
|
||||
export type IngressType = { Download: { file_name: string } } | 'JavaPrepare' | 'JavaCheck' | 'JavaLocate' | 'MinecraftDownload' | { PrepareCluster: { cluster_name: string } };
|
||||
|
||||
export type JavaError = { type: 'ParseVersion'; data: string } | { type: 'Execute'; data: string } | { type: 'MissingJava'; data: string };
|
||||
|
||||
export type LauncherError = { type: 'DirError'; data: DirectoryError } | { type: 'IOError'; data: IOError } | { type: 'IngressError'; data: IngressError } | { type: 'JavaError'; data: JavaError } | { type: 'CryptoError'; data: CryptoError } | { type: 'DiscordError'; data: DiscordError } | { type: 'MetadataError'; data: MetadataError } | { type: 'ClusterError'; data: ClusterError } | { type: 'MinecraftAuthError'; data: MinecraftAuthError } | { type: 'ProcessError'; data: ProcessError } | { type: 'PackageError'; data: PackageError } | { type: 'DaoError'; data: DaoError } | { type: 'SerdeError'; data: string } | { type: 'AnyhowError'; data: string } | { type: 'DbError'; data: string } | { type: 'ReqwestError'; data: string } | { type: 'InterpulseError'; data: string } | { type: 'RegexError'; data: string } | { type: 'SemaphoreError'; data: string } | { type: 'UrlError'; data: string } | { type: 'TauriError'; data: string };
|
||||
|
||||
export type MessageLevel = 'Info' | 'Warn' | 'Error';
|
||||
|
||||
export interface MessagePayload { level: MessageLevel; message: string }
|
||||
|
||||
export type MetadataError = { type: 'FetchError'; data: string } | { type: 'NotModdedManifest'; data: string } | { type: 'NotVanillaManifest'; data: string } | { type: 'ParseError'; data: string } | { type: 'NoMatchingLoader'; data: string } | { type: 'NoMatchingVersion'; data: string };
|
||||
|
||||
export type MinecraftAuthError = { type: 'PublicKeyReading'; data: string } | { type: 'PKCS8Error'; data: string } | { type: 'SerializeError'; data: string } | { type: 'DeserializeError'; data: string } | { type: 'RequestError'; data: string } | { type: 'SigningError'; data: string } | { type: 'HashError'; data: string } | { type: 'SessionIdError'; data: string };
|
||||
|
||||
/**
|
||||
* A structure of all needed Minecraft credentials for logging in and account management.
|
||||
*/
|
||||
export interface MinecraftCredentials {
|
||||
/**
|
||||
* The uuid of the credentials.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The username of the Minecraft account.
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
* The access token as a String.
|
||||
*/
|
||||
access_token: string;
|
||||
/**
|
||||
* The refresh token as a string for [`MinecraftState#refresh`].
|
||||
*/
|
||||
refresh_token: string;
|
||||
/**
|
||||
* The time that the access token expires as a [`DateTime<Utc>`].
|
||||
*/
|
||||
expires: string;
|
||||
|
||||
}
|
||||
|
||||
export type PackageError = { type: 'NoPrimaryFile'; data: string } | { type: 'IsModPack'; data: string } | { type: 'Incompatible'; data: IncompatiblePackageType };
|
||||
|
||||
export interface Process { pid: number; started_at: string; cluster_id: bigint; post_hook: string | null; account_id: string }
|
||||
|
||||
export type ProcessError = { type: 'HookUnsuccessful'; data: string } | { type: 'NoPid'; data: string };
|
||||
|
||||
export type ProcessPayload = { type: 'Starting'; command: string } | { type: 'Started'; process: Process } | { type: 'Stopped'; pid: number; exit_code: number } | { type: 'Output'; pid: number; output: string };
|
||||
|
||||
export interface Resolution { width: number; height: number }
|
||||
|
||||
export interface SettingProfileModel { name: string; java_id: bigint | null; res: Resolution | null; force_fullscreen: boolean | null; mem_max: number | null; launch_args: string | null; launch_env: string | null; hook_pre: string | null; hook_wrapper: string | null; hook_post: string | null; os_extra: SettingsOsExtra | null }
|
||||
|
||||
export interface Settings { global_game_settings: SettingProfileModel; allow_parallel_running_clusters: boolean; enable_gamemode: boolean; discord_enabled: boolean; max_concurrent_requests: bigint; settings_version: number }
|
||||
|
||||
export type SettingsOsExtra = Record<string, never>;
|
||||
|
||||
/**
|
||||
* A game version of Minecraft
|
||||
*/
|
||||
export interface Version {
|
||||
/**
|
||||
* A unique identifier of the version
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The release type of the version
|
||||
*/
|
||||
type: VersionType;
|
||||
/**
|
||||
* A link to additional information about the version
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The latest time a file in this version was updated
|
||||
*/
|
||||
time: string;
|
||||
/**
|
||||
* The time this version was released
|
||||
*/
|
||||
releaseTime: string;
|
||||
/**
|
||||
* The SHA1 hash of the additional information about the version
|
||||
*/
|
||||
sha1: string;
|
||||
/**
|
||||
* Whether the version supports the latest player safety features
|
||||
*/
|
||||
complianceLevel: number;
|
||||
/**
|
||||
* The SHA1 hash of the original unmodified Minecraft version's JSON
|
||||
* This is only available when using the Pulseflow mirror
|
||||
*/
|
||||
originalSha1?: string | null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The version type of Minecraft
|
||||
*/
|
||||
export type VersionType =
|
||||
/**
|
||||
* A major version, which is stable for all players to use
|
||||
*/
|
||||
'release' |
|
||||
/**
|
||||
* An experimental version, which is unstable and used for feature previews and beta testing
|
||||
*/
|
||||
'snapshot' |
|
||||
/**
|
||||
* The oldest versions before the game was released
|
||||
*/
|
||||
'old_alpha' |
|
||||
/**
|
||||
* Early versions of the game
|
||||
*/
|
||||
'old_beta';
|
||||
|
||||
const ARGS_MAP = { oneclient: '{"open_dev_tools":[],"return_error":[]}', core: '{"getClusterById":["id"],"getProfileOrDefault":["name"],"readSettings":[],"getClusters":[],"removeUser":["uuid"],"writeSettings":["setting"],"removeCluster":["id"],"createCluster":["options"],"getGameVersions":[],"openMsaLogin":[],"launchCluster":["id","uuid"],"setDefaultUser":["uuid"],"getDefaultUser":["fallback"],"updateClusterById":["id","request"],"getLoadersForVersion":["mc_version"],"getUser":["uuid"],"getUsers":[],"getGlobalProfile":[]}', events: '{"ingress":["event"],"message":["event"],"process":["event"]}' };
|
||||
export interface Router {
|
||||
core: { getClusters: () => Promise<Array<ClusterModel>>; getClusterById: (id: bigint) => Promise<ClusterModel | null>; removeCluster: (id: bigint) => Promise<null>; createCluster: (options: CreateCluster) => Promise<ClusterModel>; launchCluster: (id: bigint, uuid: string | null) => Promise<null>; updateClusterById: (id: bigint, request: ClusterUpdate) => Promise<null>; getProfileOrDefault: (name: string | null) => Promise<SettingProfileModel>; getGlobalProfile: () => Promise<SettingProfileModel>; getGameVersions: () => Promise<Array<Version>>; getLoadersForVersion: (mcVersion: string) => Promise<Array<GameLoader>>; getUsers: () => Promise<Array<MinecraftCredentials>>; getUser: (uuid: string) => Promise<MinecraftCredentials | null>; removeUser: (uuid: string) => Promise<null>; getDefaultUser: (fallback: boolean | null) => Promise<MinecraftCredentials | null>; setDefaultUser: (uuid: string | null) => Promise<null>; openMsaLogin: () => Promise<MinecraftCredentials | null>; readSettings: () => Promise<Settings>; writeSettings: (setting: Settings) => Promise<null> };
|
||||
oneclient: { return_error: () => Promise<null>; open_dev_tools: () => Promise<void> };
|
||||
events: { ingress: (event: IngressPayload) => Promise<void>; message: (event: MessagePayload) => Promise<void>; process: (event: ProcessPayload) => Promise<void> };
|
||||
}
|
||||
|
||||
export type { InferCommandOutput };
|
||||
export const createTauRPCProxy = () => createProxy<Router>(ARGS_MAP);
|
||||
Loading…
Add table
Reference in a new issue