Skip to content

Commit

Permalink
error boundary now properly reports steam errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed May 27, 2024
1 parent a84a13c commit 9c8db57
Show file tree
Hide file tree
Showing 12 changed files with 247 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:

- name: Run tsc (TypeScript)
working-directory: frontend
run: $(pnpm bin)/tsc --noEmit
run: pnpm run typecheck
10 changes: 10 additions & 0 deletions backend/decky_loader/plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .messages import MethodCallRequest, SocketMessageType
from ..enums import PluginLoadType
from ..localplatform.localsocket import LocalSocket
from ..helpers import get_homebrew_path, mkdir_as_user

from typing import Any, Callable, Coroutine, Dict, List

Expand Down Expand Up @@ -50,6 +51,15 @@ def __init__(self, file: str, plugin_directory: str, plugin_path: str, emit_call
# TODO enable this after websocket release
self.legacy_method_warning = False

home = get_homebrew_path()
mkdir_as_user(path.join(home, "settings", self.plugin_directory))
# TODO maybe dont chown this?
mkdir_as_user(path.join(home, "data"))
mkdir_as_user(path.join(home, "data", self.plugin_directory))
# TODO maybe dont chown this?
mkdir_as_user(path.join(home, "logs"))
mkdir_as_user(path.join(home, "logs", self.plugin_directory))

def __str__(self) -> str:
return self.name

Expand Down
6 changes: 0 additions & 6 deletions backend/decky_loader/plugin/sandboxed_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ def initialize(self, socket: LocalSocket):
environ["DECKY_USER_HOME"] = helpers.get_home_path()
environ["DECKY_HOME"] = helpers.get_homebrew_path()
environ["DECKY_PLUGIN_SETTINGS_DIR"] = path.join(environ["DECKY_HOME"], "settings", self.plugin_directory)
helpers.mkdir_as_user(path.join(environ["DECKY_HOME"], "settings"))
helpers.mkdir_as_user(environ["DECKY_PLUGIN_SETTINGS_DIR"])
environ["DECKY_PLUGIN_RUNTIME_DIR"] = path.join(environ["DECKY_HOME"], "data", self.plugin_directory)
helpers.mkdir_as_user(path.join(environ["DECKY_HOME"], "data"))
helpers.mkdir_as_user(environ["DECKY_PLUGIN_RUNTIME_DIR"])
environ["DECKY_PLUGIN_LOG_DIR"] = path.join(environ["DECKY_HOME"], "logs", self.plugin_directory)
helpers.mkdir_as_user(path.join(environ["DECKY_HOME"], "logs"))
helpers.mkdir_as_user(environ["DECKY_PLUGIN_LOG_DIR"])
environ["DECKY_PLUGIN_DIR"] = path.join(self.plugin_path, self.plugin_directory)
environ["DECKY_PLUGIN_NAME"] = self.name
if self.version:
Expand Down
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"build": "rollup -c",
"watch": "rollup -c -w",
"lint": "prettier -c src",
"typecheck": "tsc --noEmit",
"format": "prettier -c src -w"
},
"devDependencies": {
"@decky/api": "^1.0.3",
"@decky/api": "^1.0.4",
"@rollup/plugin-commonjs": "^21.1.0",
"@rollup/plugin-image": "^3.0.3",
"@rollup/plugin-json": "^4.1.0",
Expand Down
17 changes: 10 additions & 7 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c8db57

Please sign in to comment.