@simeonradivoev/gameflow-sdk 1.4.0 → 1.5.1
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/index.d.ts +155 -231
- package/package.json +14 -14
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Gameflow Deck SDK
|
|
2
|
+
|
|
3
|
+
This is the type definitions for Gameflow Deck plugins.
|
|
4
|
+
|
|
5
|
+
## Developing a plugin
|
|
6
|
+
|
|
7
|
+
The plugin must have a default export class of type `PluginType`. It exposes the context and all the hooks to be tapped.
|
|
8
|
+
Gameflow uses the [Tapable Hooks](https://github.com/webpack/tapable).
|
|
9
|
+
|
|
10
|
+
The package must expose a main script gameflow will import and validate. It must implement the type fields on `PluginDescriptionType`.
|
|
11
|
+
|
|
12
|
+
## Publishing
|
|
13
|
+
|
|
14
|
+
For the plugin to show up in the UI for download. It must be published to NPM with the `gameflow-plugin` keyword. Gameflow uses bun to install plugins as packages from npmjs.
|
|
15
|
+
Follow publishing instruction check the [NPM Docs](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry)
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import Conf from 'conf';
|
|
4
4
|
import EventEmitter from 'node:events';
|
|
5
|
-
import {
|
|
5
|
+
import { EventEmitter } from 'node:events';
|
|
6
|
+
import { AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncBailHook } from 'tapable';
|
|
6
7
|
import z from 'zod';
|
|
7
8
|
|
|
8
9
|
declare class AuthHooks {
|
|
@@ -177,14 +178,14 @@ declare class GameHooks {
|
|
|
177
178
|
name?: string;
|
|
178
179
|
family_name?: string;
|
|
179
180
|
} | undefined, import("tapable").UnsetAdditionalOptions>;
|
|
180
|
-
gameLookup:
|
|
181
|
+
gameLookup: AsyncSeriesWaterfallHook<[
|
|
182
|
+
matches: Map<string, GameLookup[]>,
|
|
181
183
|
ctx: {
|
|
182
184
|
source?: string;
|
|
183
185
|
id?: string;
|
|
184
186
|
search?: string;
|
|
185
|
-
matches: GameLookup[];
|
|
186
187
|
}
|
|
187
|
-
], import("tapable").UnsetAdditionalOptions>;
|
|
188
|
+
], Map<string, GameLookup[]>, import("tapable").UnsetAdditionalOptions>;
|
|
188
189
|
fetchPlatforms: AsyncSeriesHook<[
|
|
189
190
|
ctx: {
|
|
190
191
|
platforms: FrontEndPlatformType[];
|
|
@@ -399,7 +400,7 @@ export declare const EmulatorPackageSchema: z.ZodObject<{
|
|
|
399
400
|
}, z.core.$strip>
|
|
400
401
|
], "type">>>>;
|
|
401
402
|
systems: z.ZodArray<z.ZodString>;
|
|
402
|
-
bios: z.ZodOptional<z.ZodLiteral<"
|
|
403
|
+
bios: z.ZodOptional<z.ZodLiteral<"required" | "optional">>;
|
|
403
404
|
}, z.core.$strip>;
|
|
404
405
|
export declare const GameListFilterSchema: z.ZodObject<{
|
|
405
406
|
platform_source: z.ZodOptional<z.ZodString>;
|
|
@@ -477,20 +478,72 @@ export declare const OAUTH_REDIRECT_PORT = 5194;
|
|
|
477
478
|
export declare const PlatformSchema: z.ZodObject<{
|
|
478
479
|
slug: z.ZodString;
|
|
479
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>;
|
|
480
502
|
export declare const PluginContextSchema: z.ZodObject<{
|
|
481
503
|
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
482
504
|
}, z.core.$strip>;
|
|
483
505
|
export declare const PluginDescriptionSchema: z.ZodObject<{
|
|
484
506
|
name: z.ZodString;
|
|
485
|
-
displayName: z.ZodString
|
|
507
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
486
508
|
version: z.ZodString;
|
|
487
|
-
description: z.ZodString
|
|
509
|
+
description: z.ZodOptional<z.ZodString>;
|
|
488
510
|
icon: z.ZodOptional<z.ZodURL>;
|
|
489
511
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
490
512
|
category: z.ZodDefault<z.ZodString>;
|
|
491
513
|
main: z.ZodString;
|
|
492
514
|
canDisable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
493
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>;
|
|
494
547
|
export declare const PluginLoadingContextSchema: z.ZodObject<{
|
|
495
548
|
setProgress: z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
496
549
|
z.ZodNumber,
|
|
@@ -498,8 +551,46 @@ export declare const PluginLoadingContextSchema: z.ZodObject<{
|
|
|
498
551
|
], z.core.$ZodFunctionOut>, z.ZodVoid>;
|
|
499
552
|
config: z.ZodCustom<Conf<Record<string, any>>, Conf<Record<string, any>>>;
|
|
500
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>;
|
|
501
591
|
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
502
592
|
}, z.core.$strip>;
|
|
593
|
+
export declare const PluginRegistry: string;
|
|
503
594
|
export declare const PluginSchema: z.ZodObject<{
|
|
504
595
|
load: z.ZodFunction<z.core.$ZodTuple<readonly [
|
|
505
596
|
z.ZodObject<{
|
|
@@ -509,6 +600,43 @@ export declare const PluginSchema: z.ZodObject<{
|
|
|
509
600
|
], z.core.$ZodFunctionOut>, z.ZodVoid>;
|
|
510
601
|
config: z.ZodCustom<Conf<Record<string, any>>, Conf<Record<string, any>>>;
|
|
511
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>;
|
|
512
640
|
hooks: z.ZodCustom<GameflowHooks, GameflowHooks>;
|
|
513
641
|
}, z.core.$strip>
|
|
514
642
|
], z.core.$ZodFunctionOut>, z.ZodPromise<z.ZodVoid>>;
|
|
@@ -664,13 +792,10 @@ export declare const SystemInfoSchema: z.ZodObject<{
|
|
|
664
792
|
}, z.core.$strip>>;
|
|
665
793
|
}, z.core.$strip>;
|
|
666
794
|
export declare const WINDOW_PORT = 4656;
|
|
667
|
-
export declare const config: Conf<SettingsType>;
|
|
668
795
|
export declare const settingRegistry: z.core.$ZodRegistry<{
|
|
669
796
|
dev?: boolean;
|
|
670
797
|
}, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
671
798
|
export declare function delay(delay: number | Date, signal?: AbortSignal): Promise<unknown>;
|
|
672
|
-
export declare let events: EventEmitter<AppEventMap>;
|
|
673
|
-
export declare let taskQueue: TaskQueue;
|
|
674
799
|
export interface AbortEvent extends BaseEvent {
|
|
675
800
|
reason?: any;
|
|
676
801
|
}
|
|
@@ -976,11 +1101,12 @@ export interface FrontendNotification {
|
|
|
976
1101
|
}
|
|
977
1102
|
export interface FrontendPlugin {
|
|
978
1103
|
name: string;
|
|
979
|
-
displayName
|
|
980
|
-
description
|
|
1104
|
+
displayName?: string;
|
|
1105
|
+
description?: string;
|
|
981
1106
|
category: string;
|
|
982
1107
|
enabled: boolean;
|
|
983
1108
|
canDisable: boolean;
|
|
1109
|
+
canUninstall: boolean;
|
|
984
1110
|
source: PluginSourceType;
|
|
985
1111
|
hasSettings: boolean;
|
|
986
1112
|
version: string;
|
|
@@ -1055,130 +1181,29 @@ export interface SaveFileChange {
|
|
|
1055
1181
|
shared: boolean;
|
|
1056
1182
|
fixedSize?: boolean;
|
|
1057
1183
|
}
|
|
1058
|
-
export type ActiveGameType =
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
id: string;
|
|
1062
|
-
source: string;
|
|
1063
|
-
};
|
|
1064
|
-
source?: string | undefined;
|
|
1065
|
-
sourceId?: string | undefined;
|
|
1066
|
-
name: string;
|
|
1067
|
-
command: {
|
|
1068
|
-
command: string | string[];
|
|
1069
|
-
startDir?: string | undefined;
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
|
-
export type DirType = {
|
|
1073
|
-
name: string;
|
|
1074
|
-
parentPath: string;
|
|
1075
|
-
isDirectory: boolean;
|
|
1076
|
-
};
|
|
1077
|
-
export type DownloadSourceType = {
|
|
1078
|
-
id: string;
|
|
1079
|
-
name: string;
|
|
1080
|
-
};
|
|
1184
|
+
export type ActiveGameType = z.infer<typeof ActiveGameSchema>;
|
|
1185
|
+
export type DirType = z.infer<typeof DirSchema>;
|
|
1186
|
+
export type DownloadSourceType = z.infer<typeof DownloadSourceSchema>;
|
|
1081
1187
|
export type EmulatorCapabilities = "saves" | "fullscreen" | "resolution" | "batch" | "states" | "config";
|
|
1082
|
-
export type EmulatorDownloadInfoType =
|
|
1083
|
-
|
|
1084
|
-
version?: string | undefined;
|
|
1085
|
-
url?: string | undefined;
|
|
1086
|
-
description?: string | undefined;
|
|
1087
|
-
downloadDate: Date;
|
|
1088
|
-
type: string;
|
|
1089
|
-
};
|
|
1090
|
-
export type EmulatorPackageType = {
|
|
1091
|
-
name: string;
|
|
1092
|
-
description: string;
|
|
1093
|
-
homepage: string;
|
|
1094
|
-
logo: string;
|
|
1095
|
-
type: "emulator";
|
|
1096
|
-
os: ("darwin" | "linux" | "win32" | "android")[];
|
|
1097
|
-
keywords?: string[] | undefined;
|
|
1098
|
-
downloads?: {
|
|
1099
|
-
[key: string]: ({
|
|
1100
|
-
type: "github" | "gitlab";
|
|
1101
|
-
pattern: string;
|
|
1102
|
-
path: string;
|
|
1103
|
-
bin?: string | undefined;
|
|
1104
|
-
} | {
|
|
1105
|
-
type: "direct";
|
|
1106
|
-
url: string;
|
|
1107
|
-
bin?: string | undefined;
|
|
1108
|
-
} | {
|
|
1109
|
-
type: "scoop";
|
|
1110
|
-
url: string;
|
|
1111
|
-
bin?: string | undefined;
|
|
1112
|
-
})[];
|
|
1113
|
-
} | undefined;
|
|
1114
|
-
systems: string[];
|
|
1115
|
-
bios?: ("required" | "optional") | undefined;
|
|
1116
|
-
};
|
|
1188
|
+
export type EmulatorDownloadInfoType = z.infer<typeof EmulatorDownloadInfoSchema>;
|
|
1189
|
+
export type EmulatorPackageType = z.infer<typeof EmulatorPackageSchema>;
|
|
1117
1190
|
export type EmulatorSourceType = "custom" | "store" | "registry" | "system" | "static" | "embedded";
|
|
1118
1191
|
export type GameInstallProgressEvent = "refresh";
|
|
1119
|
-
export type GameListFilterType =
|
|
1120
|
-
platform_source?: string | undefined;
|
|
1121
|
-
platform_slug?: string | undefined;
|
|
1122
|
-
platform_id?: number | undefined;
|
|
1123
|
-
collection_id?: number | undefined;
|
|
1124
|
-
collection_source?: string | undefined;
|
|
1125
|
-
limit?: number | undefined;
|
|
1126
|
-
search?: string | undefined;
|
|
1127
|
-
offset?: number | undefined;
|
|
1128
|
-
source?: string | undefined;
|
|
1129
|
-
localOnly?: boolean | undefined;
|
|
1130
|
-
orderBy?: ("added" | "activity" | "name" | "release") | undefined;
|
|
1131
|
-
age_ratings?: (string[] | any) | undefined;
|
|
1132
|
-
genres?: (string[] | any) | undefined;
|
|
1133
|
-
keywords?: (string[] | any) | undefined;
|
|
1134
|
-
};
|
|
1192
|
+
export type GameListFilterType = z.infer<typeof GameListFilterSchema>;
|
|
1135
1193
|
export type GameStatusType = "installed" | "missing-emulator" | "error" | "install" | "download" | "extract" | "playing" | "queued";
|
|
1136
1194
|
export type JobStatus = "completed" | "error" | "running" | "queued" | "aborted";
|
|
1137
1195
|
export type KeysWithValueAssignableTo<T, Value> = {
|
|
1138
1196
|
[K in keyof T]: Exclude<T[K], undefined> extends Value ? K : never;
|
|
1139
1197
|
}[keyof T];
|
|
1140
|
-
export type LocalSettingsType =
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
hapticsEffects: boolean;
|
|
1147
|
-
showRouterDevOptions: boolean;
|
|
1148
|
-
showQueryDevOptions: boolean;
|
|
1149
|
-
/** Show the gameflow on screen keyboard when using a controller */
|
|
1150
|
-
useGameflowKeyboard: boolean;
|
|
1151
|
-
/** Open on screen keybaord automatically */
|
|
1152
|
-
autoKeybaord: boolean;
|
|
1153
|
-
};
|
|
1154
|
-
export type PluginContextType = {
|
|
1155
|
-
hooks: any;
|
|
1156
|
-
};
|
|
1157
|
-
export type PluginDescriptionType = {
|
|
1158
|
-
name: string;
|
|
1159
|
-
displayName: string;
|
|
1160
|
-
version: string;
|
|
1161
|
-
description: string;
|
|
1162
|
-
/** Can be an external URL to an image or a data url */
|
|
1163
|
-
icon?: string | undefined;
|
|
1164
|
-
keywords?: string[] | undefined;
|
|
1165
|
-
category: string;
|
|
1166
|
-
/** The main entry. It must export a default class implementing PluginType */
|
|
1167
|
-
main: string;
|
|
1168
|
-
/** Can the plugin be disabled or enabled by the user */
|
|
1169
|
-
canDisable?: boolean | undefined;
|
|
1170
|
-
};
|
|
1171
|
-
export type PluginLoadingContextType<TSettings extends Record<string, any> = Record<string, any>> = {
|
|
1172
|
-
setProgress: (args_0: number, args_1: string) => void | undefined;
|
|
1173
|
-
/** Per plugin config. It will use the settings schema defined in the plugin class */
|
|
1174
|
-
config: any;
|
|
1175
|
-
/** Used by the settings to register metadata for the UI */
|
|
1176
|
-
zodRegistry: any;
|
|
1177
|
-
hooks: any;
|
|
1178
|
-
} & {
|
|
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> & {
|
|
1179
1204
|
config: Conf<TSettings>;
|
|
1180
1205
|
};
|
|
1181
|
-
export type PluginSourceType = "builtin";
|
|
1206
|
+
export type PluginSourceType = "builtin" | "store";
|
|
1182
1207
|
export type PluginType<T extends Record<string, any> = Record<string, any>> = Omit<z.infer<typeof PluginSchema>, "load" | "settingsMigrations"> & {
|
|
1183
1208
|
load: (ctx: PluginLoadingContextType<T>) => Promise<void>;
|
|
1184
1209
|
settingsMigrations?: Record<string, (conf: Conf<T>) => void>;
|
|
@@ -1186,110 +1211,9 @@ export type PluginType<T extends Record<string, any> = Record<string, any>> = Om
|
|
|
1186
1211
|
export type SaveSlots = Record<string, {
|
|
1187
1212
|
cwd: string;
|
|
1188
1213
|
}>;
|
|
1189
|
-
export type SettingsType =
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
width: number;
|
|
1194
|
-
height: number;
|
|
1195
|
-
} | undefined;
|
|
1196
|
-
windowPosition?: {
|
|
1197
|
-
x: number;
|
|
1198
|
-
y: number;
|
|
1199
|
-
} | undefined;
|
|
1200
|
-
downloadPath: string;
|
|
1201
|
-
launchInFullscreen: boolean;
|
|
1202
|
-
disabledPlugins: string[];
|
|
1203
|
-
emulatorResolution: "720p" | "1080p" | "1440p" | "4k";
|
|
1204
|
-
emulatorWidescreen: boolean;
|
|
1205
|
-
};
|
|
1206
|
-
export type StoreDownloadType = {
|
|
1207
|
-
type: "direct";
|
|
1208
|
-
url: string;
|
|
1209
|
-
name?: string | undefined;
|
|
1210
|
-
system: string;
|
|
1211
|
-
main?: string | undefined;
|
|
1212
|
-
saves?: {
|
|
1213
|
-
[key: string]: {
|
|
1214
|
-
cwd: string;
|
|
1215
|
-
globs: string[];
|
|
1216
|
-
};
|
|
1217
|
-
} | undefined;
|
|
1218
|
-
} | {
|
|
1219
|
-
type: "itch";
|
|
1220
|
-
path: string;
|
|
1221
|
-
name?: string | undefined;
|
|
1222
|
-
system: string;
|
|
1223
|
-
saves?: {
|
|
1224
|
-
[key: string]: {
|
|
1225
|
-
cwd: string;
|
|
1226
|
-
globs: string[];
|
|
1227
|
-
};
|
|
1228
|
-
} | undefined;
|
|
1229
|
-
};
|
|
1230
|
-
export type StoreGameType = {
|
|
1231
|
-
name: string;
|
|
1232
|
-
description: string;
|
|
1233
|
-
version: string;
|
|
1234
|
-
homepage?: string | undefined;
|
|
1235
|
-
keywords?: string[] | undefined;
|
|
1236
|
-
genres?: string[] | undefined;
|
|
1237
|
-
companies?: string[] | undefined;
|
|
1238
|
-
screenshots?: string[] | undefined;
|
|
1239
|
-
covers?: string[] | undefined;
|
|
1240
|
-
igdb_id?: number | undefined;
|
|
1241
|
-
ra_id?: number | undefined;
|
|
1242
|
-
sgdb_id?: number | undefined;
|
|
1243
|
-
first_release_date?: (number | Date) | undefined;
|
|
1244
|
-
player_count?: string | undefined;
|
|
1245
|
-
saves?: {
|
|
1246
|
-
[key: string]: {
|
|
1247
|
-
[key: string]: {
|
|
1248
|
-
cwd: string;
|
|
1249
|
-
globs: string[];
|
|
1250
|
-
};
|
|
1251
|
-
};
|
|
1252
|
-
} | undefined;
|
|
1253
|
-
downloads: {
|
|
1254
|
-
[key: string]: {
|
|
1255
|
-
type: "direct";
|
|
1256
|
-
url: string;
|
|
1257
|
-
name?: string | undefined;
|
|
1258
|
-
system: string;
|
|
1259
|
-
main?: string | undefined;
|
|
1260
|
-
saves?: {
|
|
1261
|
-
[key: string]: {
|
|
1262
|
-
cwd: string;
|
|
1263
|
-
globs: string[];
|
|
1264
|
-
};
|
|
1265
|
-
} | undefined;
|
|
1266
|
-
} | {
|
|
1267
|
-
type: "itch";
|
|
1268
|
-
path: string;
|
|
1269
|
-
name?: string | undefined;
|
|
1270
|
-
system: string;
|
|
1271
|
-
saves?: {
|
|
1272
|
-
[key: string]: {
|
|
1273
|
-
cwd: string;
|
|
1274
|
-
globs: string[];
|
|
1275
|
-
};
|
|
1276
|
-
} | undefined;
|
|
1277
|
-
};
|
|
1278
|
-
};
|
|
1279
|
-
};
|
|
1280
|
-
export type SystemInfoType = {
|
|
1281
|
-
battery: {
|
|
1282
|
-
percent: number;
|
|
1283
|
-
isCharging: boolean;
|
|
1284
|
-
acConnected: boolean;
|
|
1285
|
-
hasBattery: boolean;
|
|
1286
|
-
};
|
|
1287
|
-
wifiConnections: {
|
|
1288
|
-
signalLevel: number;
|
|
1289
|
-
}[];
|
|
1290
|
-
bluetoothDevices: {
|
|
1291
|
-
connected: boolean;
|
|
1292
|
-
}[];
|
|
1293
|
-
};
|
|
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>;
|
|
1294
1218
|
|
|
1295
1219
|
export {};
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simeonradivoev/gameflow-sdk",
|
|
3
|
+
"version": "1.5.1",
|
|
3
4
|
"types": "index.d.ts",
|
|
4
5
|
"description": "plugin SDK for the Gameflow Deck Launcher",
|
|
5
6
|
"keywords": [
|
|
@@ -7,7 +8,6 @@
|
|
|
7
8
|
"sdk"
|
|
8
9
|
],
|
|
9
10
|
"license": "AGPL-3.0",
|
|
10
|
-
"version": "1.4.0",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/simeonradivoev/gameflow-deck"
|
|
@@ -20,35 +20,35 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"7zip-bin": "^5.2.0",
|
|
22
22
|
"@auth/core": "^0.34.3",
|
|
23
|
-
"@elysiajs/cors": "^1.4.
|
|
24
|
-
"@elysiajs/eden": "^1.4.
|
|
25
|
-
"@jimp/wasm-webp": "^1.6.
|
|
23
|
+
"@elysiajs/cors": "^1.4.2",
|
|
24
|
+
"@elysiajs/eden": "^1.4.9",
|
|
25
|
+
"@jimp/wasm-webp": "^1.6.1",
|
|
26
26
|
"@phalcode/ts-igdb-client": "^1.0.26",
|
|
27
27
|
"cheerio": "^1.2.0",
|
|
28
|
-
"conf": "^15.0
|
|
29
|
-
"drizzle-orm": "^0.45.
|
|
30
|
-
"elysia": "^1.4.
|
|
31
|
-
"fs-extra": "^11.3.
|
|
28
|
+
"conf": "^15.1.0",
|
|
29
|
+
"drizzle-orm": "^0.45.2",
|
|
30
|
+
"elysia": "^1.4.28",
|
|
31
|
+
"fs-extra": "^11.3.5",
|
|
32
32
|
"get-folder-size": "^5.0.0",
|
|
33
33
|
"ini": "^6.0.0",
|
|
34
|
-
"jimp": "^1.6.
|
|
34
|
+
"jimp": "^1.6.1",
|
|
35
35
|
"mustache": "^4.2.0",
|
|
36
36
|
"node-7z": "^3.0.0",
|
|
37
37
|
"node-disk-info": "^1.3.0",
|
|
38
|
-
"node-downloader-helper": "^2.1.
|
|
38
|
+
"node-downloader-helper": "^2.1.11",
|
|
39
39
|
"node-stream-zip": "^1.15.0",
|
|
40
40
|
"node-unrar-js": "^2.0.2",
|
|
41
41
|
"open": "^11.0.0",
|
|
42
|
-
"p-queue": "^9.
|
|
42
|
+
"p-queue": "^9.2.0",
|
|
43
43
|
"pathe": "^2.0.3",
|
|
44
44
|
"slugify": "^1.6.9",
|
|
45
45
|
"smol-toml": "^1.6.1",
|
|
46
46
|
"systeminformation": "^5.31.5",
|
|
47
|
-
"tapable": "^2.3.
|
|
48
|
-
"tough-cookie": "^6.0.
|
|
47
|
+
"tapable": "^2.3.3",
|
|
48
|
+
"tough-cookie": "^6.0.1",
|
|
49
49
|
"tough-cookie-file-store": "^3.3.0",
|
|
50
50
|
"unzip-stream": "^0.3.4",
|
|
51
51
|
"webview-bun": "^2.4.0",
|
|
52
|
-
"zod": "^4.3
|
|
52
|
+
"zod": "^4.4.3"
|
|
53
53
|
}
|
|
54
54
|
}
|