@simeonradivoev/gameflow-sdk 1.5.1 → 1.5.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/README.md +15 -0
- package/build.ts +27 -0
- package/hooks/app.ts +12 -0
- package/hooks/auth.ts +9 -0
- package/hooks/emulators.ts +39 -0
- package/hooks/games.ts +174 -0
- package/hooks/store.ts +10 -0
- package/index.ts +91 -0
- package/package.json +49 -52
- package/sdk.tsconfig.json +22 -0
- package/shared.ts +623 -0
- package/task-queue.ts +307 -0
- package/index.d.ts +0 -1219
package/index.d.ts
DELETED
|
@@ -1,1219 +0,0 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
-
|
|
3
|
-
import Conf from 'conf';
|
|
4
|
-
import EventEmitter from 'node:events';
|
|
5
|
-
import { EventEmitter } from 'node:events';
|
|
6
|
-
import { AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncBailHook } from 'tapable';
|
|
7
|
-
import z from 'zod';
|
|
8
|
-
|
|
9
|
-
declare class AuthHooks {
|
|
10
|
-
loginComplete: AsyncSeriesHook<[
|
|
11
|
-
ctx: {
|
|
12
|
-
service: string;
|
|
13
|
-
}
|
|
14
|
-
], {
|
|
15
|
-
auth?: string;
|
|
16
|
-
files: DownloadFileEntry[];
|
|
17
|
-
} | undefined>;
|
|
18
|
-
}
|
|
19
|
-
declare class EmulatorHooks {
|
|
20
|
-
fetchBiosDownload: AsyncSeriesBailHook<[
|
|
21
|
-
ctx: {
|
|
22
|
-
emulator: string;
|
|
23
|
-
systems: EmulatorSystem[];
|
|
24
|
-
biosFolder: string;
|
|
25
|
-
}
|
|
26
|
-
], {
|
|
27
|
-
auth?: string;
|
|
28
|
-
files: DownloadFileEntry[];
|
|
29
|
-
} | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
30
|
-
/**
|
|
31
|
-
* Triggered when emulator is downloaded or updated
|
|
32
|
-
*/
|
|
33
|
-
emulatorPostInstall: AsyncSeriesHook<[
|
|
34
|
-
ctx: EmulatorPostInstallContext
|
|
35
|
-
], {
|
|
36
|
-
emulator: string;
|
|
37
|
-
}>;
|
|
38
|
-
findEmulatorSource: AsyncSeriesHook<[
|
|
39
|
-
ctx: {
|
|
40
|
-
emulator: string;
|
|
41
|
-
sources: EmulatorSourceEntryType[];
|
|
42
|
-
}
|
|
43
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
44
|
-
findEmulatorForSystem: AsyncSeriesHook<[
|
|
45
|
-
ctx: {
|
|
46
|
-
system: string;
|
|
47
|
-
emulators: string[];
|
|
48
|
-
}
|
|
49
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
50
|
-
constructor();
|
|
51
|
-
}
|
|
52
|
-
declare class GameHooks {
|
|
53
|
-
buildLaunchCommands: AsyncSeriesBailHook<[
|
|
54
|
-
ctx: {
|
|
55
|
-
source: string | null;
|
|
56
|
-
sourceId: string | null;
|
|
57
|
-
id: FrontEndId;
|
|
58
|
-
systemSlug: string;
|
|
59
|
-
gamePath: string | null;
|
|
60
|
-
mainGlob?: string | null;
|
|
61
|
-
}
|
|
62
|
-
], CommandEntry[] | Error | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
63
|
-
/** override the launch command for an emulator
|
|
64
|
-
* @param ctx.autoValidCommands The auto generated command for example based on the ES-DE listing
|
|
65
|
-
* @param ctx.emulator The emulator ID if any
|
|
66
|
-
* @param ctx.game.source The source of the game
|
|
67
|
-
* @param ctx.game.sourceId The ID of the source. This could be for example the ROMM ID the game was
|
|
68
|
-
* @returns The argument list to be used when running the emulator.
|
|
69
|
-
* If no emulator bin in the command entry is found the actual command will be used as the bin.
|
|
70
|
-
*/
|
|
71
|
-
emulatorLaunch: AsyncSeriesBailHook<[
|
|
72
|
-
ctx: {
|
|
73
|
-
autoValidCommand: CommandEntry;
|
|
74
|
-
dryRun: boolean;
|
|
75
|
-
game: {
|
|
76
|
-
source?: string;
|
|
77
|
-
sourceId?: string;
|
|
78
|
-
id: FrontEndId;
|
|
79
|
-
platformSlug?: string;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
], {
|
|
83
|
-
args: string[];
|
|
84
|
-
savesPath?: SaveSlots;
|
|
85
|
-
env?: Record<string, string>;
|
|
86
|
-
} | undefined, {
|
|
87
|
-
emulator: string;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* Is the given emulator for the given command supported
|
|
91
|
-
* @returns The current support level. Partial means it can affect some functionality. Full means fully integrated for example with portable ones where you can control all aspects.
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
emulatorLaunchSupport: SyncBailHook<[
|
|
95
|
-
ctx: {
|
|
96
|
-
emulator: string;
|
|
97
|
-
source?: EmulatorSourceEntryType;
|
|
98
|
-
}
|
|
99
|
-
], EmulatorSupport | undefined, {
|
|
100
|
-
emulator: string;
|
|
101
|
-
}>;
|
|
102
|
-
/**
|
|
103
|
-
* Fetches and returns a list of games converted to frontend.
|
|
104
|
-
* @param ctx.localGameIds This is local game ids in the format '<source>@<sourceId>'
|
|
105
|
-
*/
|
|
106
|
-
fetchGames: AsyncSeriesHook<[
|
|
107
|
-
ctx: {
|
|
108
|
-
query: GameListFilterType;
|
|
109
|
-
games: FrontEndGameTypeWithIds[];
|
|
110
|
-
}
|
|
111
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
112
|
-
fetchFilters: AsyncSeriesHook<[
|
|
113
|
-
ctx: {
|
|
114
|
-
source?: string;
|
|
115
|
-
filters: FrontEndFilterSets;
|
|
116
|
-
}
|
|
117
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
118
|
-
fetchGame: AsyncSeriesBailHook<[
|
|
119
|
-
ctx: {
|
|
120
|
-
source: string;
|
|
121
|
-
localGame?: FrontEndGameTypeDetailed;
|
|
122
|
-
id: string;
|
|
123
|
-
}
|
|
124
|
-
], FrontEndGameTypeDetailed | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
125
|
-
searchGame: AsyncSeriesBailHook<[
|
|
126
|
-
ctx: {
|
|
127
|
-
source: string;
|
|
128
|
-
igdb_id?: number;
|
|
129
|
-
ra_id?: number;
|
|
130
|
-
}
|
|
131
|
-
], FrontEndGameTypeDetailed | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
132
|
-
/** Get download file URLs
|
|
133
|
-
* @param ctx.checksum Check if file already exists using checksums
|
|
134
|
-
*/
|
|
135
|
-
fetchDownloads: AsyncSeriesBailHook<[
|
|
136
|
-
ctx: {
|
|
137
|
-
source: string;
|
|
138
|
-
id: string;
|
|
139
|
-
downloadId?: string;
|
|
140
|
-
}
|
|
141
|
-
], DownloadInfo[] | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
142
|
-
fetchRomFiles: AsyncSeriesBailHook<[
|
|
143
|
-
ctx: {
|
|
144
|
-
source: string;
|
|
145
|
-
id: string;
|
|
146
|
-
}
|
|
147
|
-
], string[] | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
148
|
-
fetchRecommendedGamesForGame: AsyncSeriesHook<[
|
|
149
|
-
ctx: {
|
|
150
|
-
game: FrontEndGameTypeDetailed;
|
|
151
|
-
games: (FrontEndGameType & {
|
|
152
|
-
metadata?: any;
|
|
153
|
-
})[];
|
|
154
|
-
}
|
|
155
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
156
|
-
fetchRecommendedGamesForEmulator: AsyncSeriesHook<[
|
|
157
|
-
cts: {
|
|
158
|
-
emulator: EmulatorPackageType;
|
|
159
|
-
systems: EmulatorSystem[];
|
|
160
|
-
games: FrontEndGameType[];
|
|
161
|
-
}
|
|
162
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
163
|
-
fetchPlatform: AsyncSeriesBailHook<[
|
|
164
|
-
ctx: {
|
|
165
|
-
source: string;
|
|
166
|
-
id: string;
|
|
167
|
-
}
|
|
168
|
-
], FrontEndPlatformType | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
169
|
-
platformLookup: AsyncSeriesBailHook<[
|
|
170
|
-
ctx: {
|
|
171
|
-
source?: string;
|
|
172
|
-
id?: string;
|
|
173
|
-
slug?: string;
|
|
174
|
-
}
|
|
175
|
-
], {
|
|
176
|
-
slug: string;
|
|
177
|
-
url_logo?: string | null;
|
|
178
|
-
name?: string;
|
|
179
|
-
family_name?: string;
|
|
180
|
-
} | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
181
|
-
gameLookup: AsyncSeriesWaterfallHook<[
|
|
182
|
-
matches: Map<string, GameLookup[]>,
|
|
183
|
-
ctx: {
|
|
184
|
-
source?: string;
|
|
185
|
-
id?: string;
|
|
186
|
-
search?: string;
|
|
187
|
-
}
|
|
188
|
-
], Map<string, GameLookup[]>, import("tapable").UnsetAdditionalOptions>;
|
|
189
|
-
fetchPlatforms: AsyncSeriesHook<[
|
|
190
|
-
ctx: {
|
|
191
|
-
platforms: FrontEndPlatformType[];
|
|
192
|
-
}
|
|
193
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
194
|
-
prePlay: AsyncSeriesHook<[
|
|
195
|
-
ctx: {
|
|
196
|
-
source: string;
|
|
197
|
-
id: string;
|
|
198
|
-
saveFolderSlots: Record<string, {
|
|
199
|
-
cwd: string;
|
|
200
|
-
}>;
|
|
201
|
-
setProgress: (progress: number, state: string) => void;
|
|
202
|
-
command: CommandEntry;
|
|
203
|
-
gameInfo: {
|
|
204
|
-
platformSlug?: string;
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
208
|
-
/**
|
|
209
|
-
* @param changedSaveFiles Auto detected changed files. This is mainly used to see what changed during gameplay
|
|
210
|
-
* @param validChangedSaveFiles This will be final valid changes to be saved using save integrations like rclone
|
|
211
|
-
*/
|
|
212
|
-
postPlay: AsyncSeriesHook<[
|
|
213
|
-
ctx: {
|
|
214
|
-
source: string;
|
|
215
|
-
id: string;
|
|
216
|
-
saveFolderSlots?: SaveSlots;
|
|
217
|
-
changedSaveFiles: {
|
|
218
|
-
subPath: string;
|
|
219
|
-
cwd: string;
|
|
220
|
-
}[];
|
|
221
|
-
validChangedSaveFiles: Record<string, SaveFileChange>;
|
|
222
|
-
command: CommandEntry;
|
|
223
|
-
gameInfo: {
|
|
224
|
-
platformSlug?: string;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
228
|
-
postInstall: AsyncSeriesHook<[
|
|
229
|
-
ctx: {
|
|
230
|
-
source: string;
|
|
231
|
-
id: string;
|
|
232
|
-
files: string[];
|
|
233
|
-
info: DownloadInfo;
|
|
234
|
-
}
|
|
235
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
236
|
-
fetchCollections: AsyncSeriesHook<[
|
|
237
|
-
ctx: {
|
|
238
|
-
collections: FrontEndCollection[];
|
|
239
|
-
}
|
|
240
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
241
|
-
fetchCollection: AsyncSeriesBailHook<[
|
|
242
|
-
ctx: {
|
|
243
|
-
source: string;
|
|
244
|
-
id: string;
|
|
245
|
-
}
|
|
246
|
-
], FrontEndCollection | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
247
|
-
constructor();
|
|
248
|
-
}
|
|
249
|
-
declare class GameflowHooks {
|
|
250
|
-
games: GameHooks;
|
|
251
|
-
emulators: EmulatorHooks;
|
|
252
|
-
auth: AuthHooks;
|
|
253
|
-
store: StoreHooks;
|
|
254
|
-
}
|
|
255
|
-
declare class JobContext<T extends IJob<TData, TState>, TData, TState extends string> implements IPublicJob<TData, TState, T> {
|
|
256
|
-
private m_id;
|
|
257
|
-
private m_progress;
|
|
258
|
-
private m_state?;
|
|
259
|
-
private running;
|
|
260
|
-
private aborted;
|
|
261
|
-
private completed;
|
|
262
|
-
private error?;
|
|
263
|
-
private events;
|
|
264
|
-
private abortController;
|
|
265
|
-
private m_promise;
|
|
266
|
-
private readonly m_job;
|
|
267
|
-
constructor(id: string, events: EventEmitter<EventsList>, job: T);
|
|
268
|
-
start(): Promise<void>;
|
|
269
|
-
get status(): JobStatus;
|
|
270
|
-
get id(): string;
|
|
271
|
-
get job(): T;
|
|
272
|
-
get promise(): PromiseWithResolvers<TData | undefined>;
|
|
273
|
-
get abortSignal(): AbortSignal;
|
|
274
|
-
get progress(): number;
|
|
275
|
-
get state(): TState | undefined;
|
|
276
|
-
/**
|
|
277
|
-
* @param progress The 0 to 100 progress
|
|
278
|
-
* @param state what type of progress is this. Is it really progress. I humanity even advancing.
|
|
279
|
-
*/
|
|
280
|
-
setProgress(progress: number, state?: TState): void;
|
|
281
|
-
abort(reason?: any): void;
|
|
282
|
-
}
|
|
283
|
-
declare class StoreHooks {
|
|
284
|
-
fetchFeaturedGames: AsyncSeriesHook<[
|
|
285
|
-
ctx: {
|
|
286
|
-
games: FrontEndGameTypeDetailed[];
|
|
287
|
-
}
|
|
288
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
289
|
-
fetchEmulators: AsyncSeriesHook<[
|
|
290
|
-
ctx: {
|
|
291
|
-
emulators: FrontEndEmulator[];
|
|
292
|
-
search?: string;
|
|
293
|
-
}
|
|
294
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
295
|
-
fetchEmulator: AsyncSeriesBailHook<[
|
|
296
|
-
ctx: {
|
|
297
|
-
id: string;
|
|
298
|
-
}
|
|
299
|
-
], FrontEndEmulatorDetailed | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
300
|
-
fetchDownload: AsyncSeriesBailHook<[
|
|
301
|
-
ctx: {
|
|
302
|
-
id: string;
|
|
303
|
-
}
|
|
304
|
-
], ({
|
|
305
|
-
id: string;
|
|
306
|
-
downloadDate: Date;
|
|
307
|
-
type: string;
|
|
308
|
-
version?: string | undefined;
|
|
309
|
-
url?: string | undefined;
|
|
310
|
-
description?: string | undefined;
|
|
311
|
-
} & {
|
|
312
|
-
hasUpdate: boolean;
|
|
313
|
-
}) | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
314
|
-
}
|
|
315
|
-
declare class TaskQueue {
|
|
316
|
-
private activeQueue;
|
|
317
|
-
private queue?;
|
|
318
|
-
private events?;
|
|
319
|
-
constructor();
|
|
320
|
-
enqueue<T>(id: string, job: T, throwOnError?: boolean): T extends IJob<infer TData, infer TState extends string> ? Promise<TData> : never;
|
|
321
|
-
private processQueue;
|
|
322
|
-
private disposeSafeguard;
|
|
323
|
-
hasActive(): boolean;
|
|
324
|
-
hasActiveOfType(type: any): boolean;
|
|
325
|
-
waitForJob(id: string): Promise<void>;
|
|
326
|
-
findJob<T>(id: string, type: new (...args: any[]) => T): T extends IJob<infer TData, infer TState extends string> ? IPublicJob<TData, TState, T> | undefined : undefined;
|
|
327
|
-
on<E extends keyof EventsList>(event: E, listener: E extends keyof EventsList ? EventsList[E] extends unknown[] ? (...args: EventsList[E]) => void : never : never): () => void;
|
|
328
|
-
once<E extends keyof EventsList>(event: E, listener: E extends keyof EventsList ? EventsList[E] extends unknown[] ? (...args: EventsList[E]) => void : never : never): void;
|
|
329
|
-
close(): Promise<unknown[]>;
|
|
330
|
-
}
|
|
331
|
-
export declare const ActiveGameSchema: z.ZodObject<{
|
|
332
|
-
process: z.ZodOptional<z.ZodAny>;
|
|
333
|
-
gameId: z.ZodObject<{
|
|
334
|
-
id: z.ZodString;
|
|
335
|
-
source: z.ZodString;
|
|
336
|
-
}, z.core.$strip>;
|
|
337
|
-
source: z.ZodOptional<z.ZodString>;
|
|
338
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
339
|
-
name: z.ZodString;
|
|
340
|
-
command: z.ZodObject<{
|
|
341
|
-
command: z.ZodUnion<[
|
|
342
|
-
z.ZodString,
|
|
343
|
-
z.ZodArray<z.ZodString>
|
|
344
|
-
]>;
|
|
345
|
-
startDir: z.ZodOptional<z.ZodString>;
|
|
346
|
-
}, z.core.$strip>;
|
|
347
|
-
}, z.core.$strip>;
|
|
348
|
-
export declare const CustomEmulatorSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
349
|
-
export declare const DefaultRommStaleTime: number;
|
|
350
|
-
export declare const DirSchema: z.ZodObject<{
|
|
351
|
-
name: z.ZodString;
|
|
352
|
-
parentPath: z.ZodString;
|
|
353
|
-
isDirectory: z.ZodBoolean;
|
|
354
|
-
}, z.core.$strip>;
|
|
355
|
-
export declare const DownloadSourceSchema: z.ZodObject<{
|
|
356
|
-
id: z.ZodString;
|
|
357
|
-
name: z.ZodString;
|
|
358
|
-
}, z.core.$strip>;
|
|
359
|
-
export declare const EMULATORJS_PORT = 5176;
|
|
360
|
-
export declare const EMULATORJS_URL: (host: string) => string;
|
|
361
|
-
export declare const EmulatorDownloadInfoSchema: z.ZodObject<{
|
|
362
|
-
id: z.ZodString;
|
|
363
|
-
version: z.ZodOptional<z.ZodString>;
|
|
364
|
-
url: z.ZodOptional<z.ZodURL>;
|
|
365
|
-
description: z.ZodOptional<z.ZodString>;
|
|
366
|
-
downloadDate: z.ZodCoercedDate<unknown>;
|
|
367
|
-
type: z.ZodString;
|
|
368
|
-
}, z.core.$strip>;
|
|
369
|
-
export declare const EmulatorPackageSchema: z.ZodObject<{
|
|
370
|
-
name: z.ZodString;
|
|
371
|
-
description: z.ZodString;
|
|
372
|
-
homepage: z.ZodURL;
|
|
373
|
-
logo: z.ZodURL;
|
|
374
|
-
type: z.ZodEnum<{
|
|
375
|
-
emulator: "emulator";
|
|
376
|
-
}>;
|
|
377
|
-
os: z.ZodArray<z.ZodEnum<{
|
|
378
|
-
darwin: "darwin";
|
|
379
|
-
linux: "linux";
|
|
380
|
-
win32: "win32";
|
|
381
|
-
android: "android";
|
|
382
|
-
}>>;
|
|
383
|
-
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
384
|
-
downloads: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[
|
|
385
|
-
z.ZodObject<{
|
|
386
|
-
type: z.ZodLiteral<"github" | "gitlab">;
|
|
387
|
-
pattern: z.ZodString;
|
|
388
|
-
path: z.ZodString;
|
|
389
|
-
bin: z.ZodOptional<z.ZodString>;
|
|
390
|
-
}, z.core.$strip>,
|
|
391
|
-
z.ZodObject<{
|
|
392
|
-
type: z.ZodLiteral<"direct">;
|
|
393
|
-
url: z.ZodURL;
|
|
394
|
-
bin: z.ZodOptional<z.ZodString>;
|
|
395
|
-
}, z.core.$strip>,
|
|
396
|
-
z.ZodObject<{
|
|
397
|
-
type: z.ZodLiteral<"scoop">;
|
|
398
|
-
url: z.ZodURL;
|
|
399
|
-
bin: z.ZodOptional<z.ZodString>;
|
|
400
|
-
}, z.core.$strip>
|
|
401
|
-
], "type">>>>;
|
|
402
|
-
systems: z.ZodArray<z.ZodString>;
|
|
403
|
-
bios: z.ZodOptional<z.ZodLiteral<"required" | "optional">>;
|
|
404
|
-
}, z.core.$strip>;
|
|
405
|
-
export declare const GameListFilterSchema: z.ZodObject<{
|
|
406
|
-
platform_source: z.ZodOptional<z.ZodString>;
|
|
407
|
-
platform_slug: z.ZodOptional<z.ZodString>;
|
|
408
|
-
platform_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
409
|
-
collection_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
410
|
-
collection_source: z.ZodOptional<z.ZodString>;
|
|
411
|
-
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
412
|
-
search: z.ZodOptional<z.ZodString>;
|
|
413
|
-
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
414
|
-
source: z.ZodOptional<z.ZodString>;
|
|
415
|
-
localOnly: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
416
|
-
orderBy: z.ZodOptional<z.ZodLiteral<"added" | "activity" | "name" | "release">>;
|
|
417
|
-
age_ratings: z.ZodOptional<z.ZodUnion<readonly [
|
|
418
|
-
z.ZodArray<z.ZodString>,
|
|
419
|
-
z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>
|
|
420
|
-
]>>;
|
|
421
|
-
genres: z.ZodOptional<z.ZodUnion<readonly [
|
|
422
|
-
z.ZodArray<z.ZodString>,
|
|
423
|
-
z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>
|
|
424
|
-
]>>;
|
|
425
|
-
keywords: z.ZodOptional<z.ZodUnion<readonly [
|
|
426
|
-
z.ZodArray<z.ZodString>,
|
|
427
|
-
z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>
|
|
428
|
-
]>>;
|
|
429
|
-
}, z.core.$strip>;
|
|
430
|
-
export declare const GithubManifestSchema: z.ZodObject<{
|
|
431
|
-
sha: z.ZodCustomStringFormat<"sha1_hex">;
|
|
432
|
-
url: z.ZodURL;
|
|
433
|
-
tree: z.ZodArray<z.ZodObject<{
|
|
434
|
-
path: z.ZodString;
|
|
435
|
-
mode: z.ZodString;
|
|
436
|
-
type: z.ZodEnum<{
|
|
437
|
-
tree: "tree";
|
|
438
|
-
blob: "blob";
|
|
439
|
-
}>;
|
|
440
|
-
sha: z.ZodCustomStringFormat<"sha1_hex">;
|
|
441
|
-
url: z.ZodURL;
|
|
442
|
-
}, z.core.$strip>>;
|
|
443
|
-
}, z.core.$strip>;
|
|
444
|
-
export declare const GithubReleaseSchema: z.ZodObject<{
|
|
445
|
-
id: z.ZodNumber;
|
|
446
|
-
tag_name: z.ZodOptional<z.ZodString>;
|
|
447
|
-
url: z.ZodURL;
|
|
448
|
-
body: z.ZodString;
|
|
449
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
450
|
-
name: z.ZodString;
|
|
451
|
-
browser_download_url: z.ZodURL;
|
|
452
|
-
content_type: z.ZodOptional<z.ZodString>;
|
|
453
|
-
}, z.core.$strip>>;
|
|
454
|
-
}, z.core.$strip>;
|
|
455
|
-
export declare const LOGIN_PORT = 5196;
|
|
456
|
-
export declare const LocalSettingsSchema: z.ZodObject<{
|
|
457
|
-
backgroundBlur: z.ZodDefault<z.ZodBoolean>;
|
|
458
|
-
backgroundAnimation: z.ZodDefault<z.ZodBoolean>;
|
|
459
|
-
theme: z.ZodDefault<z.ZodEnum<{
|
|
460
|
-
dark: "dark";
|
|
461
|
-
light: "light";
|
|
462
|
-
auto: "auto";
|
|
463
|
-
}>>;
|
|
464
|
-
soundEffects: z.ZodDefault<z.ZodBoolean>;
|
|
465
|
-
soundEffectsVolume: z.ZodDefault<z.ZodNumber>;
|
|
466
|
-
hapticsEffects: z.ZodDefault<z.ZodBoolean>;
|
|
467
|
-
showRouterDevOptions: z.ZodDefault<z.ZodBoolean>;
|
|
468
|
-
showQueryDevOptions: z.ZodDefault<z.ZodBoolean>;
|
|
469
|
-
useGameflowKeyboard: z.ZodDefault<z.ZodBoolean>;
|
|
470
|
-
autoKeybaord: z.ZodDefault<z.ZodBoolean>;
|
|
471
|
-
}, z.core.$strip>;
|
|
472
|
-
export declare const NewGameSchema: z.ZodObject<{
|
|
473
|
-
name: z.ZodString;
|
|
474
|
-
summary: z.ZodString;
|
|
475
|
-
genres: z.ZodString;
|
|
476
|
-
}, z.core.$strip>;
|
|
477
|
-
export declare const OAUTH_REDIRECT_PORT = 5194;
|
|
478
|
-
export declare const PlatformSchema: z.ZodObject<{
|
|
479
|
-
slug: z.ZodString;
|
|
480
|
-
}, z.core.$strip>;
|
|
481
|
-
export declare const PluginBunDetailsSchema: z.ZodObject<{
|
|
482
|
-
name: z.ZodString;
|
|
483
|
-
keywords: z.ZodArray<z.ZodString>;
|
|
484
|
-
version: z.ZodString;
|
|
485
|
-
author: z.ZodOptional<z.ZodObject<{
|
|
486
|
-
name: z.ZodOptional<z.ZodString>;
|
|
487
|
-
}, z.core.$strip>>;
|
|
488
|
-
license: z.ZodOptional<z.ZodString>;
|
|
489
|
-
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
490
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
491
|
-
maintainers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
492
|
-
name: z.ZodString;
|
|
493
|
-
}, z.core.$strip>>>;
|
|
494
|
-
dist: z.ZodObject<{
|
|
495
|
-
unpackedSize: z.ZodNumber;
|
|
496
|
-
}, z.core.$strip>;
|
|
497
|
-
description: z.ZodOptional<z.ZodString>;
|
|
498
|
-
_npmUser: z.ZodOptional<z.ZodObject<{
|
|
499
|
-
name: z.ZodString;
|
|
500
|
-
}, z.core.$strip>>;
|
|
501
|
-
}, z.core.$strip>;
|
|
502
|
-
export declare const PluginContextSchema: z.ZodObject<{
|
|
503
|
-
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
504
|
-
}, z.core.$strip>;
|
|
505
|
-
export declare const PluginDescriptionSchema: z.ZodObject<{
|
|
506
|
-
name: z.ZodString;
|
|
507
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
508
|
-
version: z.ZodString;
|
|
509
|
-
description: z.ZodOptional<z.ZodString>;
|
|
510
|
-
icon: z.ZodOptional<z.ZodURL>;
|
|
511
|
-
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
512
|
-
category: z.ZodDefault<z.ZodString>;
|
|
513
|
-
main: z.ZodString;
|
|
514
|
-
canDisable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
515
|
-
}, z.core.$strip>;
|
|
516
|
-
export declare const PluginEntrySchema: z.ZodObject<{
|
|
517
|
-
downloads: z.ZodObject<{
|
|
518
|
-
monthly: z.ZodNumber;
|
|
519
|
-
weekly: z.ZodNumber;
|
|
520
|
-
}, z.core.$strip>;
|
|
521
|
-
searchScore: z.ZodNumber;
|
|
522
|
-
installed: z.ZodBoolean;
|
|
523
|
-
package: z.ZodObject<{
|
|
524
|
-
name: z.ZodString;
|
|
525
|
-
keywords: z.ZodArray<z.ZodString>;
|
|
526
|
-
version: z.ZodString;
|
|
527
|
-
description: z.ZodOptional<z.ZodString>;
|
|
528
|
-
sanitized_name: z.ZodString;
|
|
529
|
-
license: z.ZodOptional<z.ZodString>;
|
|
530
|
-
publisher: z.ZodObject<{
|
|
531
|
-
email: z.ZodString;
|
|
532
|
-
username: z.ZodString;
|
|
533
|
-
trustedPublisher: z.ZodOptional<z.ZodObject<{
|
|
534
|
-
id: z.ZodString;
|
|
535
|
-
oidcConfigId: z.ZodString;
|
|
536
|
-
}, z.core.$strip>>;
|
|
537
|
-
}, z.core.$strip>;
|
|
538
|
-
date: z.ZodCoercedDate<unknown>;
|
|
539
|
-
links: z.ZodObject<{
|
|
540
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
541
|
-
repository: z.ZodOptional<z.ZodString>;
|
|
542
|
-
bugs: z.ZodOptional<z.ZodString>;
|
|
543
|
-
npm: z.ZodURL;
|
|
544
|
-
}, z.core.$strip>;
|
|
545
|
-
}, z.core.$strip>;
|
|
546
|
-
}, z.core.$strip>;
|
|
547
|
-
export declare const PluginLoadingContextSchema: z.ZodObject<{
|
|
548
|
-
setProgress: z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
549
|
-
z.ZodNumber,
|
|
550
|
-
z.ZodString
|
|
551
|
-
], z.core.$ZodFunctionOut>, z.ZodVoid>;
|
|
552
|
-
config: z.ZodCustom<Conf<Record<string, any>>, Conf<Record<string, any>>>;
|
|
553
|
-
zodRegistry: z.ZodCustom<z.core.$ZodRegistry<object | undefined, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, z.core.$ZodRegistry<object | undefined, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
554
|
-
app: z.ZodObject<{
|
|
555
|
-
config: z.ZodCustom<Conf<{
|
|
556
|
-
downloadPath: string;
|
|
557
|
-
launchInFullscreen: boolean;
|
|
558
|
-
disabledPlugins: string[];
|
|
559
|
-
emulatorResolution: "720p" | "1080p" | "1440p" | "4k";
|
|
560
|
-
emulatorWidescreen: boolean;
|
|
561
|
-
rommAddress?: string | undefined;
|
|
562
|
-
rommUser?: string | undefined;
|
|
563
|
-
windowSize?: {
|
|
564
|
-
width: number;
|
|
565
|
-
height: number;
|
|
566
|
-
} | undefined;
|
|
567
|
-
windowPosition?: {
|
|
568
|
-
x: number;
|
|
569
|
-
y: number;
|
|
570
|
-
} | undefined;
|
|
571
|
-
}>, Conf<{
|
|
572
|
-
downloadPath: string;
|
|
573
|
-
launchInFullscreen: boolean;
|
|
574
|
-
disabledPlugins: string[];
|
|
575
|
-
emulatorResolution: "720p" | "1080p" | "1440p" | "4k";
|
|
576
|
-
emulatorWidescreen: boolean;
|
|
577
|
-
rommAddress?: string | undefined;
|
|
578
|
-
rommUser?: string | undefined;
|
|
579
|
-
windowSize?: {
|
|
580
|
-
width: number;
|
|
581
|
-
height: number;
|
|
582
|
-
} | undefined;
|
|
583
|
-
windowPosition?: {
|
|
584
|
-
x: number;
|
|
585
|
-
y: number;
|
|
586
|
-
} | undefined;
|
|
587
|
-
}>>;
|
|
588
|
-
events: z.ZodCustom<EventEmitter<AppEventMap>, EventEmitter<AppEventMap>>;
|
|
589
|
-
taskQueue: z.ZodCustom<TaskQueue, TaskQueue>;
|
|
590
|
-
}, z.core.$strip>;
|
|
591
|
-
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
592
|
-
}, z.core.$strip>;
|
|
593
|
-
export declare const PluginRegistry: string;
|
|
594
|
-
export declare const PluginSchema: z.ZodObject<{
|
|
595
|
-
load: z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
596
|
-
z.ZodObject<{
|
|
597
|
-
setProgress: z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
598
|
-
z.ZodNumber,
|
|
599
|
-
z.ZodString
|
|
600
|
-
], z.core.$ZodFunctionOut>, z.ZodVoid>;
|
|
601
|
-
config: z.ZodCustom<Conf<Record<string, any>>, Conf<Record<string, any>>>;
|
|
602
|
-
zodRegistry: z.ZodCustom<z.core.$ZodRegistry<object | undefined, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, z.core.$ZodRegistry<object | undefined, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
603
|
-
app: z.ZodObject<{
|
|
604
|
-
config: z.ZodCustom<Conf<{
|
|
605
|
-
downloadPath: string;
|
|
606
|
-
launchInFullscreen: boolean;
|
|
607
|
-
disabledPlugins: string[];
|
|
608
|
-
emulatorResolution: "720p" | "1080p" | "1440p" | "4k";
|
|
609
|
-
emulatorWidescreen: boolean;
|
|
610
|
-
rommAddress?: string | undefined;
|
|
611
|
-
rommUser?: string | undefined;
|
|
612
|
-
windowSize?: {
|
|
613
|
-
width: number;
|
|
614
|
-
height: number;
|
|
615
|
-
} | undefined;
|
|
616
|
-
windowPosition?: {
|
|
617
|
-
x: number;
|
|
618
|
-
y: number;
|
|
619
|
-
} | undefined;
|
|
620
|
-
}>, Conf<{
|
|
621
|
-
downloadPath: string;
|
|
622
|
-
launchInFullscreen: boolean;
|
|
623
|
-
disabledPlugins: string[];
|
|
624
|
-
emulatorResolution: "720p" | "1080p" | "1440p" | "4k";
|
|
625
|
-
emulatorWidescreen: boolean;
|
|
626
|
-
rommAddress?: string | undefined;
|
|
627
|
-
rommUser?: string | undefined;
|
|
628
|
-
windowSize?: {
|
|
629
|
-
width: number;
|
|
630
|
-
height: number;
|
|
631
|
-
} | undefined;
|
|
632
|
-
windowPosition?: {
|
|
633
|
-
x: number;
|
|
634
|
-
y: number;
|
|
635
|
-
} | undefined;
|
|
636
|
-
}>>;
|
|
637
|
-
events: z.ZodCustom<EventEmitter<AppEventMap>, EventEmitter<AppEventMap>>;
|
|
638
|
-
taskQueue: z.ZodCustom<TaskQueue, TaskQueue>;
|
|
639
|
-
}, z.core.$strip>;
|
|
640
|
-
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
641
|
-
}, z.core.$strip>
|
|
642
|
-
], z.core.$ZodFunctionOut>, z.ZodPromise<z.ZodVoid>>;
|
|
643
|
-
cleanup: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodPromise<z.ZodVoid>>>;
|
|
644
|
-
settingsSchema: z.ZodOptional<z.ZodCustom<z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>, z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>>>;
|
|
645
|
-
settingsMigrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
646
|
-
z.ZodCustom<Conf<Record<string, any>>, Conf<Record<string, any>>>
|
|
647
|
-
], z.core.$ZodFunctionOut>, z.ZodVoid>>>;
|
|
648
|
-
eventsNames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
649
|
-
id: z.ZodString;
|
|
650
|
-
title: z.ZodOptional<z.ZodString>;
|
|
651
|
-
description: z.ZodOptional<z.ZodString>;
|
|
652
|
-
action: z.ZodString;
|
|
653
|
-
}, z.core.$strip>>>;
|
|
654
|
-
onEvent: z.ZodOptional<z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
655
|
-
z.ZodString
|
|
656
|
-
], z.core.$ZodFunctionOut>, z.ZodUnion<[
|
|
657
|
-
z.ZodObject<{
|
|
658
|
-
openTab: z.ZodOptional<z.ZodString>;
|
|
659
|
-
reload: z.ZodOptional<z.ZodBoolean>;
|
|
660
|
-
}, z.core.$strip>,
|
|
661
|
-
z.ZodRecord<z.ZodString, z.ZodAny>
|
|
662
|
-
]>>>;
|
|
663
|
-
}, z.core.$strip>;
|
|
664
|
-
export declare const RPC_PORT = 8787;
|
|
665
|
-
export declare const RPC_URL: (host: string) => string;
|
|
666
|
-
export declare const RommLoginDataSchema: z.ZodObject<{
|
|
667
|
-
hostname: z.ZodURL;
|
|
668
|
-
username: z.ZodString;
|
|
669
|
-
password: z.ZodString;
|
|
670
|
-
}, z.core.$strip>;
|
|
671
|
-
export declare const SERVER_PORT = 5173;
|
|
672
|
-
export declare const SERVER_URL: (host: string) => string;
|
|
673
|
-
export declare const SOCKETS_URL: (host: string) => string;
|
|
674
|
-
export declare const ScoopPackageSchema: z.ZodObject<{
|
|
675
|
-
version: z.ZodString;
|
|
676
|
-
url: z.ZodOptional<z.ZodURL>;
|
|
677
|
-
description: z.ZodString;
|
|
678
|
-
bin: z.ZodOptional<z.ZodString>;
|
|
679
|
-
architecture: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
680
|
-
url: z.ZodURL;
|
|
681
|
-
hash: z.ZodOptional<z.ZodString>;
|
|
682
|
-
extract_dir: z.ZodOptional<z.ZodString>;
|
|
683
|
-
}, z.core.$strip>>>;
|
|
684
|
-
}, z.core.$strip>;
|
|
685
|
-
export declare const SettingsSchema: z.ZodObject<{
|
|
686
|
-
rommAddress: z.ZodOptional<z.ZodURL>;
|
|
687
|
-
rommUser: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
688
|
-
windowSize: z.ZodOptional<z.ZodObject<{
|
|
689
|
-
width: z.ZodNumber;
|
|
690
|
-
height: z.ZodNumber;
|
|
691
|
-
}, z.core.$strip>>;
|
|
692
|
-
windowPosition: z.ZodOptional<z.ZodObject<{
|
|
693
|
-
x: z.ZodNumber;
|
|
694
|
-
y: z.ZodNumber;
|
|
695
|
-
}, z.core.$strip>>;
|
|
696
|
-
downloadPath: z.ZodString;
|
|
697
|
-
launchInFullscreen: z.ZodDefault<z.ZodBoolean>;
|
|
698
|
-
disabledPlugins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
699
|
-
emulatorResolution: z.ZodDefault<z.ZodEnum<{
|
|
700
|
-
"720p": "720p";
|
|
701
|
-
"1080p": "1080p";
|
|
702
|
-
"1440p": "1440p";
|
|
703
|
-
"4k": "4k";
|
|
704
|
-
}>>;
|
|
705
|
-
emulatorWidescreen: z.ZodDefault<z.ZodBoolean>;
|
|
706
|
-
}, z.core.$strip>;
|
|
707
|
-
export declare const StoreDownloadSchema: z.ZodDiscriminatedUnion<[
|
|
708
|
-
z.ZodObject<{
|
|
709
|
-
type: z.ZodLiteral<"direct">;
|
|
710
|
-
url: z.ZodURL;
|
|
711
|
-
name: z.ZodOptional<z.ZodString>;
|
|
712
|
-
system: z.ZodString;
|
|
713
|
-
main: z.ZodOptional<z.ZodString>;
|
|
714
|
-
saves: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
715
|
-
cwd: z.ZodString;
|
|
716
|
-
globs: z.ZodArray<z.ZodString>;
|
|
717
|
-
}, z.core.$strip>>>;
|
|
718
|
-
}, z.core.$strip>,
|
|
719
|
-
z.ZodObject<{
|
|
720
|
-
type: z.ZodLiteral<"itch">;
|
|
721
|
-
path: z.ZodString;
|
|
722
|
-
name: z.ZodOptional<z.ZodString>;
|
|
723
|
-
system: z.ZodString;
|
|
724
|
-
saves: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
725
|
-
cwd: z.ZodString;
|
|
726
|
-
globs: z.ZodArray<z.ZodString>;
|
|
727
|
-
}, z.core.$strip>>>;
|
|
728
|
-
}, z.core.$strip>
|
|
729
|
-
], "type">;
|
|
730
|
-
export declare const StoreGameSaveSchema: z.ZodObject<{
|
|
731
|
-
cwd: z.ZodString;
|
|
732
|
-
globs: z.ZodArray<z.ZodString>;
|
|
733
|
-
}, z.core.$strip>;
|
|
734
|
-
export declare const StoreGameSchema: z.ZodObject<{
|
|
735
|
-
name: z.ZodString;
|
|
736
|
-
description: z.ZodString;
|
|
737
|
-
version: z.ZodString;
|
|
738
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
739
|
-
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
740
|
-
genres: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
741
|
-
companies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
742
|
-
screenshots: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
743
|
-
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
744
|
-
igdb_id: z.ZodOptional<z.ZodNumber>;
|
|
745
|
-
ra_id: z.ZodOptional<z.ZodNumber>;
|
|
746
|
-
sgdb_id: z.ZodOptional<z.ZodNumber>;
|
|
747
|
-
first_release_date: z.ZodOptional<z.ZodUnion<readonly [
|
|
748
|
-
z.ZodNumber,
|
|
749
|
-
z.ZodDate
|
|
750
|
-
]>>;
|
|
751
|
-
player_count: z.ZodOptional<z.ZodString>;
|
|
752
|
-
saves: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
753
|
-
cwd: z.ZodString;
|
|
754
|
-
globs: z.ZodArray<z.ZodString>;
|
|
755
|
-
}, z.core.$strip>>>>;
|
|
756
|
-
downloads: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[
|
|
757
|
-
z.ZodObject<{
|
|
758
|
-
type: z.ZodLiteral<"direct">;
|
|
759
|
-
url: z.ZodURL;
|
|
760
|
-
name: z.ZodOptional<z.ZodString>;
|
|
761
|
-
system: z.ZodString;
|
|
762
|
-
main: z.ZodOptional<z.ZodString>;
|
|
763
|
-
saves: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
764
|
-
cwd: z.ZodString;
|
|
765
|
-
globs: z.ZodArray<z.ZodString>;
|
|
766
|
-
}, z.core.$strip>>>;
|
|
767
|
-
}, z.core.$strip>,
|
|
768
|
-
z.ZodObject<{
|
|
769
|
-
type: z.ZodLiteral<"itch">;
|
|
770
|
-
path: z.ZodString;
|
|
771
|
-
name: z.ZodOptional<z.ZodString>;
|
|
772
|
-
system: z.ZodString;
|
|
773
|
-
saves: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
774
|
-
cwd: z.ZodString;
|
|
775
|
-
globs: z.ZodArray<z.ZodString>;
|
|
776
|
-
}, z.core.$strip>>>;
|
|
777
|
-
}, z.core.$strip>
|
|
778
|
-
], "type">>;
|
|
779
|
-
}, z.core.$strip>;
|
|
780
|
-
export declare const SystemInfoSchema: z.ZodObject<{
|
|
781
|
-
battery: z.ZodObject<{
|
|
782
|
-
percent: z.ZodNumber;
|
|
783
|
-
isCharging: z.ZodBoolean;
|
|
784
|
-
acConnected: z.ZodBoolean;
|
|
785
|
-
hasBattery: z.ZodBoolean;
|
|
786
|
-
}, z.core.$strip>;
|
|
787
|
-
wifiConnections: z.ZodArray<z.ZodObject<{
|
|
788
|
-
signalLevel: z.ZodNumber;
|
|
789
|
-
}, z.core.$strip>>;
|
|
790
|
-
bluetoothDevices: z.ZodArray<z.ZodObject<{
|
|
791
|
-
connected: z.ZodBoolean;
|
|
792
|
-
}, z.core.$strip>>;
|
|
793
|
-
}, z.core.$strip>;
|
|
794
|
-
export declare const WINDOW_PORT = 4656;
|
|
795
|
-
export declare const settingRegistry: z.core.$ZodRegistry<{
|
|
796
|
-
dev?: boolean;
|
|
797
|
-
}, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
798
|
-
export declare function delay(delay: number | Date, signal?: AbortSignal): Promise<unknown>;
|
|
799
|
-
export interface AbortEvent extends BaseEvent {
|
|
800
|
-
reason?: any;
|
|
801
|
-
}
|
|
802
|
-
export interface AppEventMap {
|
|
803
|
-
exitapp: [
|
|
804
|
-
];
|
|
805
|
-
notification: [
|
|
806
|
-
FrontendNotification
|
|
807
|
-
];
|
|
808
|
-
focus: [
|
|
809
|
-
];
|
|
810
|
-
}
|
|
811
|
-
export interface AutoSaveChange {
|
|
812
|
-
subPath: string;
|
|
813
|
-
cwd: string;
|
|
814
|
-
}
|
|
815
|
-
export interface BaseEvent {
|
|
816
|
-
id: string;
|
|
817
|
-
job: IPublicJob<any, string, any>;
|
|
818
|
-
}
|
|
819
|
-
export interface CommandEntry {
|
|
820
|
-
/** The ID of the command. Could be just an index or a string */
|
|
821
|
-
id: string | number;
|
|
822
|
-
/** The front end label for the command. Mainly gotten from ES-DE list */
|
|
823
|
-
label?: string;
|
|
824
|
-
/** Compiled command to be executed */
|
|
825
|
-
command: string | string[];
|
|
826
|
-
/** Environment variables */
|
|
827
|
-
env?: Record<string, string>;
|
|
828
|
-
/** The path the spawned process will start at */
|
|
829
|
-
startDir?: string;
|
|
830
|
-
/** Is the command valid, for example does the executable exists */
|
|
831
|
-
valid: boolean;
|
|
832
|
-
/** Run the command as shell. Defaults is true */
|
|
833
|
-
shell?: boolean;
|
|
834
|
-
/** For what emulator is the command */
|
|
835
|
-
emulator?: string;
|
|
836
|
-
/** Where the emulator came from */
|
|
837
|
-
emulatorSource?: EmulatorSourceType;
|
|
838
|
-
/** Metadata for the command */
|
|
839
|
-
metadata: {
|
|
840
|
-
romPath?: string;
|
|
841
|
-
emulatorBin?: string;
|
|
842
|
-
/** The root directory of the emulator */
|
|
843
|
-
emulatorDir?: string;
|
|
844
|
-
};
|
|
845
|
-
}
|
|
846
|
-
export interface CompletedEvent extends BaseEvent {
|
|
847
|
-
}
|
|
848
|
-
export interface DownloadFileEntry {
|
|
849
|
-
url: URL;
|
|
850
|
-
/** The path of the file, excluding the name */
|
|
851
|
-
file_path: string;
|
|
852
|
-
/** Just the name of the file including the extension */
|
|
853
|
-
file_name: string;
|
|
854
|
-
/** Checksum of the file */
|
|
855
|
-
sha1?: string;
|
|
856
|
-
/** Size in bytes */
|
|
857
|
-
size?: number;
|
|
858
|
-
}
|
|
859
|
-
export interface DownloadInfo {
|
|
860
|
-
id: string;
|
|
861
|
-
screenshotUrls: string[];
|
|
862
|
-
coverUrl: string;
|
|
863
|
-
platform?: DownloadPlatform;
|
|
864
|
-
slug?: string;
|
|
865
|
-
path_fs?: string;
|
|
866
|
-
main_glob?: string;
|
|
867
|
-
summary?: string;
|
|
868
|
-
name: string;
|
|
869
|
-
last_played?: Date;
|
|
870
|
-
igdb_id?: number;
|
|
871
|
-
ra_id?: number;
|
|
872
|
-
source_id: string;
|
|
873
|
-
system_slug: string;
|
|
874
|
-
extract_path?: string;
|
|
875
|
-
metadata?: any;
|
|
876
|
-
files: DownloadFileEntry[];
|
|
877
|
-
auth?: string;
|
|
878
|
-
version?: string;
|
|
879
|
-
version_source?: string;
|
|
880
|
-
version_system?: string;
|
|
881
|
-
}
|
|
882
|
-
export interface DownloadPlatform {
|
|
883
|
-
id: string;
|
|
884
|
-
source: string;
|
|
885
|
-
igdb_id?: number;
|
|
886
|
-
igdb_slug?: string;
|
|
887
|
-
ra_id?: number;
|
|
888
|
-
moby_id?: number;
|
|
889
|
-
slug: string;
|
|
890
|
-
name: string;
|
|
891
|
-
/** Like Sony or Nintendo */
|
|
892
|
-
family_name?: string;
|
|
893
|
-
}
|
|
894
|
-
export interface DownloadsDrive {
|
|
895
|
-
device: string;
|
|
896
|
-
label: string;
|
|
897
|
-
mountPoint: string | null;
|
|
898
|
-
isRemovable: boolean;
|
|
899
|
-
size: number;
|
|
900
|
-
used: number;
|
|
901
|
-
isCurrentlyUsed: boolean;
|
|
902
|
-
unusableReason: "not_enough_space" | "already_used" | null;
|
|
903
|
-
}
|
|
904
|
-
export interface Drive {
|
|
905
|
-
parent: string | null;
|
|
906
|
-
device: string;
|
|
907
|
-
label: string;
|
|
908
|
-
mountPoint: string | null;
|
|
909
|
-
type: string;
|
|
910
|
-
size: number;
|
|
911
|
-
used: number;
|
|
912
|
-
isRemovable: boolean;
|
|
913
|
-
interfaceType: string | null;
|
|
914
|
-
hasWriteAccess: boolean;
|
|
915
|
-
hasReadAccess: boolean;
|
|
916
|
-
}
|
|
917
|
-
export interface EmulatorPostInstallContext {
|
|
918
|
-
emulator: string;
|
|
919
|
-
emulatorPackage?: EmulatorPackageType;
|
|
920
|
-
path: string;
|
|
921
|
-
update: boolean;
|
|
922
|
-
info: EmulatorDownloadInfoType;
|
|
923
|
-
}
|
|
924
|
-
export interface EmulatorSourceEntryType {
|
|
925
|
-
binPath: string;
|
|
926
|
-
rootPath?: string;
|
|
927
|
-
type: EmulatorSourceType;
|
|
928
|
-
exists: boolean;
|
|
929
|
-
}
|
|
930
|
-
export interface EmulatorSupport {
|
|
931
|
-
id: string;
|
|
932
|
-
source?: EmulatorSourceEntryType;
|
|
933
|
-
supportLevel?: "partial" | "full";
|
|
934
|
-
capabilities?: EmulatorCapabilities[];
|
|
935
|
-
}
|
|
936
|
-
export interface EmulatorSystem {
|
|
937
|
-
id: string;
|
|
938
|
-
romm_slug?: string;
|
|
939
|
-
name: string;
|
|
940
|
-
iconUrl: string;
|
|
941
|
-
}
|
|
942
|
-
export interface ErrorEvent extends BaseEvent {
|
|
943
|
-
error: unknown;
|
|
944
|
-
}
|
|
945
|
-
export interface EventsList {
|
|
946
|
-
started: [
|
|
947
|
-
e: BaseEvent
|
|
948
|
-
];
|
|
949
|
-
progress: [
|
|
950
|
-
e: ProgressEvent
|
|
951
|
-
];
|
|
952
|
-
abort: [
|
|
953
|
-
e: AbortEvent
|
|
954
|
-
];
|
|
955
|
-
/** Called when the job successfully completes */
|
|
956
|
-
completed: [
|
|
957
|
-
e: CompletedEvent
|
|
958
|
-
];
|
|
959
|
-
error: [
|
|
960
|
-
e: ErrorEvent
|
|
961
|
-
];
|
|
962
|
-
ended: [
|
|
963
|
-
e: BaseEvent
|
|
964
|
-
];
|
|
965
|
-
queued: [
|
|
966
|
-
e: BaseEvent
|
|
967
|
-
];
|
|
968
|
-
}
|
|
969
|
-
export interface FrontEndCollection {
|
|
970
|
-
id: FrontEndId;
|
|
971
|
-
name: string;
|
|
972
|
-
description: string;
|
|
973
|
-
path_platform_cover: string | null;
|
|
974
|
-
game_count: number;
|
|
975
|
-
}
|
|
976
|
-
export interface FrontEndEmulator {
|
|
977
|
-
name: string;
|
|
978
|
-
source: string;
|
|
979
|
-
logo: string;
|
|
980
|
-
systems: EmulatorSystem[];
|
|
981
|
-
description?: string;
|
|
982
|
-
gameCount: number;
|
|
983
|
-
validSources: EmulatorSourceEntryType[];
|
|
984
|
-
integrations: EmulatorSupport[];
|
|
985
|
-
}
|
|
986
|
-
export interface FrontEndEmulatorDetailed extends FrontEndEmulator {
|
|
987
|
-
homepage: string;
|
|
988
|
-
description: string;
|
|
989
|
-
downloads: FrontEndEmulatorDetailedDownload[];
|
|
990
|
-
keywords?: string[];
|
|
991
|
-
screenshots: string[];
|
|
992
|
-
biosRequirement?: "required" | "optional";
|
|
993
|
-
bios?: string[];
|
|
994
|
-
storeDownloadInfo?: {
|
|
995
|
-
hasUpdate: boolean;
|
|
996
|
-
version?: string;
|
|
997
|
-
type: string;
|
|
998
|
-
description?: string;
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
1001
|
-
export interface FrontEndEmulatorDetailedDownload {
|
|
1002
|
-
name: string;
|
|
1003
|
-
type: string | undefined;
|
|
1004
|
-
version?: string;
|
|
1005
|
-
}
|
|
1006
|
-
export interface FrontEndFilterLists {
|
|
1007
|
-
age_ratings: string[];
|
|
1008
|
-
player_counts: string[];
|
|
1009
|
-
languages: string[];
|
|
1010
|
-
companies: string[];
|
|
1011
|
-
genres: string[];
|
|
1012
|
-
}
|
|
1013
|
-
export interface FrontEndFilterSets {
|
|
1014
|
-
age_ratings: Set<string>;
|
|
1015
|
-
player_counts: Set<string>;
|
|
1016
|
-
languages: Set<string>;
|
|
1017
|
-
companies: Set<string>;
|
|
1018
|
-
genres: Set<string>;
|
|
1019
|
-
}
|
|
1020
|
-
export interface FrontEndGameMetadata {
|
|
1021
|
-
first_release_date: Date | null;
|
|
1022
|
-
}
|
|
1023
|
-
export interface FrontEndGameMetadataDetailed extends FrontEndGameMetadata {
|
|
1024
|
-
genres: string[];
|
|
1025
|
-
companies: string[];
|
|
1026
|
-
game_modes: string[];
|
|
1027
|
-
age_ratings: string[];
|
|
1028
|
-
player_count: string | null;
|
|
1029
|
-
average_rating: number | null;
|
|
1030
|
-
}
|
|
1031
|
-
export interface FrontEndGameType {
|
|
1032
|
-
platform_display_name: string | null;
|
|
1033
|
-
path_platform_cover: string | null;
|
|
1034
|
-
id: FrontEndId;
|
|
1035
|
-
source: string | null;
|
|
1036
|
-
source_id: string | null;
|
|
1037
|
-
path_fs: string | null;
|
|
1038
|
-
path_covers: string[];
|
|
1039
|
-
last_played: Date | null;
|
|
1040
|
-
updated_at: Date;
|
|
1041
|
-
metadata: FrontEndGameMetadata;
|
|
1042
|
-
slug: string | null;
|
|
1043
|
-
name: string | null;
|
|
1044
|
-
platform_id: number | null;
|
|
1045
|
-
platform_slug: string | null;
|
|
1046
|
-
paths_screenshots: string[];
|
|
1047
|
-
}
|
|
1048
|
-
export interface FrontEndGameTypeDetailed extends Exclude<FrontEndGameTypeWithIds, "metadata"> {
|
|
1049
|
-
summary: string | null;
|
|
1050
|
-
fs_size_bytes: number | null;
|
|
1051
|
-
missing: boolean;
|
|
1052
|
-
local: boolean;
|
|
1053
|
-
version?: string | null;
|
|
1054
|
-
version_system?: string | null;
|
|
1055
|
-
version_source?: string | null;
|
|
1056
|
-
metadata: FrontEndGameMetadataDetailed;
|
|
1057
|
-
emulators?: FrontEndGameTypeDetailedEmulator[];
|
|
1058
|
-
achievements?: {
|
|
1059
|
-
unlocked: number;
|
|
1060
|
-
total: number;
|
|
1061
|
-
entires: FrontEndGameTypeDetailedAchievement[];
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
export interface FrontEndGameTypeDetailedAchievement {
|
|
1065
|
-
id: string;
|
|
1066
|
-
title: string;
|
|
1067
|
-
description?: string;
|
|
1068
|
-
date?: Date;
|
|
1069
|
-
date_hardcode?: Date;
|
|
1070
|
-
badge_url?: string;
|
|
1071
|
-
display_order: number;
|
|
1072
|
-
type?: string;
|
|
1073
|
-
}
|
|
1074
|
-
export interface FrontEndGameTypeDetailedEmulator extends FrontEndEmulator {
|
|
1075
|
-
}
|
|
1076
|
-
export interface FrontEndGameTypeWithIds extends FrontEndGameType {
|
|
1077
|
-
igdb_id: number | null;
|
|
1078
|
-
ra_id: number | null;
|
|
1079
|
-
}
|
|
1080
|
-
export interface FrontEndId {
|
|
1081
|
-
id: string;
|
|
1082
|
-
source: string;
|
|
1083
|
-
}
|
|
1084
|
-
export interface FrontEndPlatformType {
|
|
1085
|
-
id: FrontEndId;
|
|
1086
|
-
slug: string;
|
|
1087
|
-
name: string;
|
|
1088
|
-
family_name?: string | null;
|
|
1089
|
-
path_cover: string | null;
|
|
1090
|
-
game_count: number;
|
|
1091
|
-
updated_at: Date;
|
|
1092
|
-
hasLocal: boolean;
|
|
1093
|
-
paths_screenshots: string[];
|
|
1094
|
-
}
|
|
1095
|
-
export interface FrontendNotification {
|
|
1096
|
-
title?: string;
|
|
1097
|
-
message: string;
|
|
1098
|
-
type: "success" | "error" | "info" | "custom";
|
|
1099
|
-
icon?: "save" | "upload" | "clock";
|
|
1100
|
-
duration?: number;
|
|
1101
|
-
}
|
|
1102
|
-
export interface FrontendPlugin {
|
|
1103
|
-
name: string;
|
|
1104
|
-
displayName?: string;
|
|
1105
|
-
description?: string;
|
|
1106
|
-
category: string;
|
|
1107
|
-
enabled: boolean;
|
|
1108
|
-
canDisable: boolean;
|
|
1109
|
-
canUninstall: boolean;
|
|
1110
|
-
source: PluginSourceType;
|
|
1111
|
-
hasSettings: boolean;
|
|
1112
|
-
version: string;
|
|
1113
|
-
icon?: string;
|
|
1114
|
-
}
|
|
1115
|
-
export interface GameInstallProgress {
|
|
1116
|
-
progress?: number;
|
|
1117
|
-
status?: GameStatusType;
|
|
1118
|
-
details?: string;
|
|
1119
|
-
commands?: CommandEntry[];
|
|
1120
|
-
error?: any;
|
|
1121
|
-
}
|
|
1122
|
-
export interface GameLookup {
|
|
1123
|
-
source: string;
|
|
1124
|
-
id: string;
|
|
1125
|
-
coverUrl: string | null | undefined;
|
|
1126
|
-
slug: string | null | undefined;
|
|
1127
|
-
screenshotUrls: string[];
|
|
1128
|
-
name: string;
|
|
1129
|
-
summary: string | null | undefined;
|
|
1130
|
-
genres: string[];
|
|
1131
|
-
companies: string[];
|
|
1132
|
-
game_modes: string[];
|
|
1133
|
-
age_ratings: string[];
|
|
1134
|
-
player_count: string | undefined;
|
|
1135
|
-
first_release_date: number | undefined;
|
|
1136
|
-
average_rating: number | undefined;
|
|
1137
|
-
keywords: string[];
|
|
1138
|
-
igdb_id: number | undefined;
|
|
1139
|
-
platforms: {
|
|
1140
|
-
id: number;
|
|
1141
|
-
name?: string | null;
|
|
1142
|
-
displayName: string;
|
|
1143
|
-
slug: string;
|
|
1144
|
-
}[];
|
|
1145
|
-
}
|
|
1146
|
-
export interface IJob<TData, TState extends string> {
|
|
1147
|
-
group?: string;
|
|
1148
|
-
start(context: JobContext<IJob<TData, TState>, TData, TState>): Promise<any>;
|
|
1149
|
-
exposeData?(): TData;
|
|
1150
|
-
}
|
|
1151
|
-
export interface IPublicJob<TData, TState extends string, T extends IJob<TData, TState>> {
|
|
1152
|
-
progress: number;
|
|
1153
|
-
state?: string;
|
|
1154
|
-
status: JobStatus;
|
|
1155
|
-
job: T;
|
|
1156
|
-
abort: (reason?: any) => void;
|
|
1157
|
-
}
|
|
1158
|
-
export interface LocalDownloadFileEntry extends DownloadFileEntry {
|
|
1159
|
-
/** Exists on the file system */
|
|
1160
|
-
exists: boolean;
|
|
1161
|
-
/** Matches the checksum */
|
|
1162
|
-
matches: boolean;
|
|
1163
|
-
}
|
|
1164
|
-
export interface LocalGameMetadata {
|
|
1165
|
-
genres?: string[];
|
|
1166
|
-
companies?: string[];
|
|
1167
|
-
game_modes?: string[];
|
|
1168
|
-
age_ratings?: string[];
|
|
1169
|
-
player_count?: string;
|
|
1170
|
-
first_release_date?: number;
|
|
1171
|
-
average_rating?: number;
|
|
1172
|
-
}
|
|
1173
|
-
export interface ProgressEvent extends BaseEvent {
|
|
1174
|
-
progress: number;
|
|
1175
|
-
state?: string;
|
|
1176
|
-
}
|
|
1177
|
-
export interface SaveFileChange {
|
|
1178
|
-
subPath: string | string[];
|
|
1179
|
-
isGlob?: true;
|
|
1180
|
-
cwd: string;
|
|
1181
|
-
shared: boolean;
|
|
1182
|
-
fixedSize?: boolean;
|
|
1183
|
-
}
|
|
1184
|
-
export type ActiveGameType = z.infer<typeof ActiveGameSchema>;
|
|
1185
|
-
export type DirType = z.infer<typeof DirSchema>;
|
|
1186
|
-
export type DownloadSourceType = z.infer<typeof DownloadSourceSchema>;
|
|
1187
|
-
export type EmulatorCapabilities = "saves" | "fullscreen" | "resolution" | "batch" | "states" | "config";
|
|
1188
|
-
export type EmulatorDownloadInfoType = z.infer<typeof EmulatorDownloadInfoSchema>;
|
|
1189
|
-
export type EmulatorPackageType = z.infer<typeof EmulatorPackageSchema>;
|
|
1190
|
-
export type EmulatorSourceType = "custom" | "store" | "registry" | "system" | "static" | "embedded";
|
|
1191
|
-
export type GameInstallProgressEvent = "refresh";
|
|
1192
|
-
export type GameListFilterType = z.infer<typeof GameListFilterSchema>;
|
|
1193
|
-
export type GameStatusType = "installed" | "missing-emulator" | "error" | "install" | "download" | "extract" | "playing" | "queued";
|
|
1194
|
-
export type JobStatus = "completed" | "error" | "running" | "queued" | "aborted";
|
|
1195
|
-
export type KeysWithValueAssignableTo<T, Value> = {
|
|
1196
|
-
[K in keyof T]: Exclude<T[K], undefined> extends Value ? K : never;
|
|
1197
|
-
}[keyof T];
|
|
1198
|
-
export type LocalSettingsType = z.infer<typeof LocalSettingsSchema>;
|
|
1199
|
-
export type PluginBunDetailsType = z.infer<typeof PluginBunDetailsSchema>;
|
|
1200
|
-
export type PluginContextType = z.infer<typeof PluginContextSchema>;
|
|
1201
|
-
export type PluginDescriptionType = z.infer<typeof PluginDescriptionSchema>;
|
|
1202
|
-
export type PluginEntryType = z.infer<typeof PluginEntrySchema>;
|
|
1203
|
-
export type PluginLoadingContextType<TSettings extends Record<string, any> = Record<string, any>> = z.infer<typeof PluginLoadingContextSchema> & {
|
|
1204
|
-
config: Conf<TSettings>;
|
|
1205
|
-
};
|
|
1206
|
-
export type PluginSourceType = "builtin" | "store";
|
|
1207
|
-
export type PluginType<T extends Record<string, any> = Record<string, any>> = Omit<z.infer<typeof PluginSchema>, "load" | "settingsMigrations"> & {
|
|
1208
|
-
load: (ctx: PluginLoadingContextType<T>) => Promise<void>;
|
|
1209
|
-
settingsMigrations?: Record<string, (conf: Conf<T>) => void>;
|
|
1210
|
-
};
|
|
1211
|
-
export type SaveSlots = Record<string, {
|
|
1212
|
-
cwd: string;
|
|
1213
|
-
}>;
|
|
1214
|
-
export type SettingsType = z.infer<typeof SettingsSchema>;
|
|
1215
|
-
export type StoreDownloadType = z.infer<typeof StoreDownloadSchema>;
|
|
1216
|
-
export type StoreGameType = z.infer<typeof StoreGameSchema>;
|
|
1217
|
-
export type SystemInfoType = z.infer<typeof SystemInfoSchema>;
|
|
1218
|
-
|
|
1219
|
-
export {};
|