ci: adding dockerfile

This commit is contained in:
Chubby Granny Chaser
2025-10-13 17:01:45 +01:00
parent a439095260
commit e5659543ce
57 changed files with 1407 additions and 1617 deletions

View File

@@ -11,7 +11,6 @@ import type {
GameRunning,
FriendRequestAction,
UpdateProfileRequest,
CatalogueSearchPayload,
SeedingStatus,
GameAchievement,
Theme,
@@ -20,7 +19,7 @@ import type {
AchievementCustomNotificationPosition,
AchievementNotificationInfo,
} from "@types";
import type { AuthPage, CatalogueCategory } from "@shared";
import type { AuthPage } from "@shared";
import type { AxiosProgressEvent } from "axios";
contextBridge.exposeInMainWorld("electron", {
@@ -62,44 +61,13 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.invoke("checkDebridAvailability", magnets),
/* Catalogue */
searchGames: (payload: CatalogueSearchPayload, take: number, skip: number) =>
ipcRenderer.invoke("searchGames", payload, take, skip),
getCatalogue: (category: CatalogueCategory) =>
ipcRenderer.invoke("getCatalogue", category),
getGameShopDetails: (objectId: string, shop: GameShop, language: string) =>
ipcRenderer.invoke("getGameShopDetails", objectId, shop, language),
getRandomGame: () => ipcRenderer.invoke("getRandomGame"),
getHowLongToBeat: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getHowLongToBeat", objectId, shop),
getGameStats: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getGameStats", objectId, shop),
getGameAssets: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getGameAssets", objectId, shop),
getTrendingGames: () => ipcRenderer.invoke("getTrendingGames"),
createGameReview: (
shop: GameShop,
objectId: string,
reviewHtml: string,
score: number
) =>
ipcRenderer.invoke("createGameReview", shop, objectId, reviewHtml, score),
getGameReviews: (
shop: GameShop,
objectId: string,
take?: number,
skip?: number,
sortBy?: string
) => ipcRenderer.invoke("getGameReviews", shop, objectId, take, skip, sortBy),
voteReview: (
shop: GameShop,
objectId: string,
reviewId: string,
voteType: "upvote" | "downvote"
) => ipcRenderer.invoke("voteReview", shop, objectId, reviewId, voteType),
deleteReview: (shop: GameShop, objectId: string, reviewId: string) =>
ipcRenderer.invoke("deleteReview", shop, objectId, reviewId),
checkGameReview: (shop: GameShop, objectId: string) =>
ipcRenderer.invoke("checkGameReview", shop, objectId),
onUpdateAchievements: (
objectId: string,
shop: GameShop,
@@ -309,10 +277,6 @@ contextBridge.exposeInMainWorld("electron", {
downloadOptionTitle: string | null
) =>
ipcRenderer.invoke("uploadSaveGame", objectId, shop, downloadOptionTitle),
toggleArtifactFreeze: (gameArtifactId: string, freeze: boolean) =>
ipcRenderer.invoke("toggleArtifactFreeze", gameArtifactId, freeze),
renameGameArtifact: (gameArtifactId: string, label: string) =>
ipcRenderer.invoke("renameGameArtifact", gameArtifactId, label),
downloadGameArtifact: (
objectId: string,
shop: GameShop,
@@ -323,8 +287,6 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.invoke("getGameArtifacts", objectId, shop),
getGameBackupPreview: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getGameBackupPreview", objectId, shop),
deleteGameArtifact: (gameArtifactId: string) =>
ipcRenderer.invoke("deleteGameArtifact", gameArtifactId),
selectGameBackupPath: (
shop: GameShop,
objectId: string,
@@ -381,8 +343,93 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.invoke("showOpenDialog", options),
showItemInFolder: (path: string) =>
ipcRenderer.invoke("showItemInFolder", path),
getFeatures: () => ipcRenderer.invoke("getFeatures"),
getBadges: () => ipcRenderer.invoke("getBadges"),
hydraApi: {
get: (
url: string,
options?: {
params?: unknown;
needsAuth?: boolean;
needsSubscription?: boolean;
ifModifiedSince?: Date;
}
) =>
ipcRenderer.invoke("hydraApiCall", {
method: "get",
url,
params: options?.params,
options: {
needsAuth: options?.needsAuth,
needsSubscription: options?.needsSubscription,
ifModifiedSince: options?.ifModifiedSince,
},
}),
post: (
url: string,
options?: {
data?: unknown;
needsAuth?: boolean;
needsSubscription?: boolean;
}
) =>
ipcRenderer.invoke("hydraApiCall", {
method: "post",
url,
data: options?.data,
options: {
needsAuth: options?.needsAuth,
needsSubscription: options?.needsSubscription,
},
}),
put: (
url: string,
options?: {
data?: unknown;
needsAuth?: boolean;
needsSubscription?: boolean;
}
) =>
ipcRenderer.invoke("hydraApiCall", {
method: "put",
url,
data: options?.data,
options: {
needsAuth: options?.needsAuth,
needsSubscription: options?.needsSubscription,
},
}),
patch: (
url: string,
options?: {
data?: unknown;
needsAuth?: boolean;
needsSubscription?: boolean;
}
) =>
ipcRenderer.invoke("hydraApiCall", {
method: "patch",
url,
data: options?.data,
options: {
needsAuth: options?.needsAuth,
needsSubscription: options?.needsSubscription,
},
}),
delete: (
url: string,
options?: {
needsAuth?: boolean;
needsSubscription?: boolean;
}
) =>
ipcRenderer.invoke("hydraApiCall", {
method: "delete",
url,
options: {
needsAuth: options?.needsAuth,
needsSubscription: options?.needsSubscription,
},
}),
},
canInstallCommonRedist: () => ipcRenderer.invoke("canInstallCommonRedist"),
installCommonRedist: () => ipcRenderer.invoke("installCommonRedist"),
installHydraDeckyPlugin: () => ipcRenderer.invoke("installHydraDeckyPlugin"),
@@ -419,13 +466,10 @@ contextBridge.exposeInMainWorld("electron", {
/* Profile */
getMe: () => ipcRenderer.invoke("getMe"),
undoFriendship: (userId: string) =>
ipcRenderer.invoke("undoFriendship", userId),
updateProfile: (updateProfile: UpdateProfileRequest) =>
ipcRenderer.invoke("updateProfile", updateProfile),
processProfileImage: (imagePath: string) =>
ipcRenderer.invoke("processProfileImage", imagePath),
getFriendRequests: () => ipcRenderer.invoke("getFriendRequests"),
syncFriendRequests: () => ipcRenderer.invoke("syncFriendRequests"),
onSyncFriendRequests: (cb: (friendRequests: FriendRequestSync) => void) => {
const listener = (
@@ -438,26 +482,8 @@ contextBridge.exposeInMainWorld("electron", {
},
updateFriendRequest: (userId: string, action: FriendRequestAction) =>
ipcRenderer.invoke("updateFriendRequest", userId, action),
sendFriendRequest: (userId: string) =>
ipcRenderer.invoke("sendFriendRequest", userId),
/* User */
getUser: (userId: string) => ipcRenderer.invoke("getUser", userId),
getUserLibrary: (
userId: string,
take?: number,
skip?: number,
sortBy?: string
) => ipcRenderer.invoke("getUserLibrary", userId, take, skip, sortBy),
blockUser: (userId: string) => ipcRenderer.invoke("blockUser", userId),
unblockUser: (userId: string) => ipcRenderer.invoke("unblockUser", userId),
getUserFriends: (userId: string, take: number, skip: number) =>
ipcRenderer.invoke("getUserFriends", userId, take, skip),
getBlockedUsers: (take: number, skip: number) =>
ipcRenderer.invoke("getBlockedUsers", take, skip),
getUserStats: (userId: string) => ipcRenderer.invoke("getUserStats", userId),
reportUser: (userId: string, reason: string, description: string) =>
ipcRenderer.invoke("reportUser", userId, reason, description),
getComparedUnlockedAchievements: (
objectId: string,
shop: GameShop,