refactor: convert to bun workspaces monorepo

- Move web app into apps/web/
- Create packages/shared/ with shared types
- Create plugins/decky-vault/ scaffold
- Root package.json manages workspaces only
This commit is contained in:
2026-06-28 05:20:28 +08:00
parent c4bede20d4
commit cd72b7a948
345 changed files with 488 additions and 126 deletions
+32
View File
@@ -0,0 +1,32 @@
import { DeckyVaultImportV1 } from "@deckyvault/shared"
interface PluginSettings {
apiKey: string
autoRecord: boolean
exportPath: string
}
let settings: PluginSettings = {
apiKey: "",
autoRecord: false,
exportPath: "/home/deck/Downloads",
}
export default {
name: "DeckyVault",
content: () => {
// Main plugin UI — will be implemented in a future phase
return <div>DeckyVault Plugin</div>
},
onSettingUpdate: (newSettings: Partial<PluginSettings>) => {
settings = { ...settings, ...newSettings }
},
onGameSessionStart: (appId: number) => {
DeckyPlugin.log(`[DeckyVault] Game started: ${appId}`)
// Future: start MangoHud monitoring
},
onGameSessionEnd: (appId: number) => {
DeckyPlugin.log(`[DeckyVault] Game stopped: ${appId}`)
// Future: stop monitoring, prompt export/upload
},
}
+32
View File
@@ -0,0 +1,32 @@
// Decky Loader API type declarations
// These mirror the APIs available in the Steam Deck game mode CEF context
declare global {
const DeckyPlugin: {
log: (...args: unknown[]) => void
debug: (...args: unknown[]) => void
info: (...args: unknown[]) => void
error: (...args: unknown[]) => void
}
const SteamClient: {
Apps: {
GetAppData: (appId: number) => Promise<{
strAppName: string
strShortcutName: string
strExePath: string
}>
RegisterForGameStarted: (
callback: (appId: number) => void,
) => { unregister: () => void }
RegisterForGameStopped: (
callback: (appId: number) => void,
) => { unregister: () => void }
}
System: {
GetOSVersion: () => Promise<string>
}
}
}
export {}