diff options
| -rw-r--r-- | .github/workflows/build-win.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/edit-check.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/typecheck.yml | 2 | ||||
| -rw-r--r-- | backend/src/main.py | 2 | ||||
| -rw-r--r-- | backend/src/plugin/sandboxed_plugin.py | 7 | ||||
| -rwxr-xr-x | contrib/deck.sh | 335 | ||||
| -rwxr-xr-x | contrib/nodeck.sh | 168 | ||||
| -rw-r--r-- | frontend/pnpm-lock.yaml | 108 |
10 files changed, 102 insertions, 530 deletions
diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index c44c22fb..e425c77f 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -44,10 +44,10 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Build Python Backend (noconsole) 🛠️ - run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin;/plugin" --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ uses: actions/upload-artifact@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b1396c1..dfc97e3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./plugin/*:/ --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin:/plugin --hidden-import=logging.handlers --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ if: ${{ !env.ACT }} diff --git a/.github/workflows/edit-check.yml b/.github/workflows/edit-check.yml index 401bc8ae..59ed0fac 100644 --- a/.github/workflows/edit-check.yml +++ b/.github/workflows/edit-check.yml @@ -14,7 +14,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get changed files id: changed-files diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b2a93057..b88fc242 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 # Check out the repository first. + - uses: actions/checkout@v3 # Check out the repository first. - name: Install TypeScript dependencies working-directory: frontend diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 01a4bdff..16239bdf 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 # Check out the repository first. + - uses: actions/checkout@v3 # Check out the repository first. - name: Install Python dependencies working-directory: backend diff --git a/backend/src/main.py b/backend/src/main.py index ef090df4..86c4720d 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -181,7 +181,7 @@ def main(): logger.warning(f"decky is running as an unprivileged user, this is not officially supported and may cause issues") # Append the loader's plugin path to the recognized python paths - sys.path.append(path.join(path.dirname(__file__), "plugin")) + sys.path.append(path.join(path.dirname(__file__), "..", "plugin")) # Append the system and user python paths sys.path.extend(get_system_pythonpaths()) diff --git a/backend/src/plugin/sandboxed_plugin.py b/backend/src/plugin/sandboxed_plugin.py index d44794fa..adf9f802 100644 --- a/backend/src/plugin/sandboxed_plugin.py +++ b/backend/src/plugin/sandboxed_plugin.py @@ -3,7 +3,7 @@ from signal import SIGINT, signal from importlib.util import module_from_spec, spec_from_file_location from json import dumps, loads from logging import getLogger -from sys import exit, path as syspath +from sys import exit, path as syspath, modules as sysmodules from traceback import format_exc from asyncio import (get_event_loop, new_event_loop, set_event_loop, sleep) @@ -72,6 +72,11 @@ class SandboxedPlugin: # append the plugin's `py_modules` to the recognized python paths syspath.append(path.join(environ["DECKY_PLUGIN_DIR"], "py_modules")) + + #TODO: FIX IN A LESS CURSED WAY + keys = [key.replace("src.", "") for key in sysmodules if key.startswith("src.")] + for key in keys: + sysmodules[key] = sysmodules["src"].__dict__[key] spec = spec_from_file_location("_", self.file) assert spec is not None diff --git a/contrib/deck.sh b/contrib/deck.sh deleted file mode 100755 index dddc8665..00000000 --- a/contrib/deck.sh +++ /dev/null @@ -1,335 +0,0 @@ -#!/bin/bash - -## Before using this script, enable sshd on the deck and setup an sshd key between the deck and your dev in sshd_config. -## This script defaults to port 22 unless otherwise specified, and cannot run without a sudo password or LAN IP. -## You will need to specify the path to the ssh key if using key connection exclusively. - -## TODO: document latest changes to wiki - -## Pre-parse arugments for ease of use -CLONEFOLDER=${1:-""} -INSTALLFOLDER=${2:-""} -DECKIP=${3:-""} -SSHPORT=${4:-""} -PASSWORD=${5:-""} -SSHKEYLOC=${6:-""} -LOADERBRANCH=${7:-""} -LIBRARYBRANCH=${8:-""} -TEMPLATEBRANCH=${9:-""} -LATEST=${10:-""} - -## gather options into an array -OPTIONSARRAY=("$CLONEFOLDER" "$INSTALLFOLDER" "$DECKIP" "$SSHPORT" "$PASSWORD" "$SSHKEYLOC" "$LOADERBRANCH" "$LIBRARYBRANCH" "$TEMPLATEBRANCH" "$LATEST") - -## iterate through options array to check their presence -count=0 -for OPTION in ${OPTIONSARRAY[@]}; do - ! [[ "$OPTION" == "" ]] && count=$(($count+1)) - # printf "OPTION=$OPTION\n" -done - -setfolder() { - if [[ "$2" == "clone" ]]; then - local ACTION="clone" - local DEFAULT="git" - elif [[ "$2" == "install" ]]; then - local ACTION="install" - local DEFAULT="dev" - fi - - if [[ "$ACTION" == "clone" ]]; then - printf "Enter the directory in /home/user/ to ${ACTION} to.\n" - printf "The ${ACTION} directory would be: ${HOME}/${DEFAULT}\n" - read -p "Enter your ${ACTION} directory: " CLONEFOLDER - if ! [[ "$CLONEFOLDER" =~ ^[[:alnum:]]+$ ]]; then - printf "Folder name not provided. Using default, '${DEFAULT}'.\n" - CLONEFOLDER="${DEFAULT}" - fi - elif [[ "$ACTION" == "install" ]]; then - printf "Enter the directory in /home/deck/homebrew to ${ACTION} pluginloader to.\n" - printf "The ${ACTION} directory would be: /home/deck/homebrew/${DEFAULT}/pluginloader\n" - printf "It is highly recommended that you use the default folder path seen above, just press enter at the next prompt.\n" - read -p "Enter your ${ACTION} directory: " INSTALLFOLDER - if ! [[ "$INSTALLFOLDER" =~ ^[[:alnum:]]+$ ]]; then - printf "Folder name not provided. Using default, '${DEFAULT}'.\n" - INSTALLFOLDER="${DEFAULT}" - fi - else - printf "Folder type could not be determined, exiting\n" - exit 1 - fi -} - -checkdeckip() { - ### check that ip is provided - if [[ "$1" == "" ]]; then - printf "An ip address must be provided, exiting.\n" - exit 1 - fi - - ### check to make sure it's a potentially valid ipv4 address - if ! [[ $1 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then - printf "A valid ip address must be provided, exiting.\n" - exit 1 - fi -} - -checksshport() { - ### check to make sure a port was specified - if [[ "$1" == "" ]]; then - printf "ssh port not provided. Using default, '22'.\n" - SSHPORT="22" - fi - - ### check for valid ssh port - if [[ $1 -le 0 ]]; then - printf "A valid ssh port must be provided, exiting.\n" - exit 1 - fi -} - -checksshkey() { - ### check if ssh key is present at location provided - if [[ "$1" == "" ]]; then - SSHKEYLOC="$HOME/.ssh/id_rsa" - printf "ssh key was not provided. Defaulting to $SSHKEYLOC if it exists.\n" - fi - - ### check if sshkey is present at location - if ! [[ -e "$1" ]]; then - SSHKEYLOC="" - printf "ssh key does not exist. This script will use password authentication.\n" - fi -} - -checkpassword() { - ### check to make sure a password for 'deck' was specified - if [[ "$1" == "" ]]; then - printf "Remote deck user password was not provided, exiting.\n" - exit 1 - fi -} - -clonefromto() { - # printf "repo=$1\n" - # printf "outdir=$2\n" - # printf "branch=$3\n" - printf "Repository: $1\n" - git clone $1 $2 &> '/dev/null' - CODE=$? - # printf "CODE=${CODE}" - if [[ $CODE -eq 128 ]]; then - cd $2 - git fetch --all &> '/dev/null' - fi - if [[ -z $3 ]]; then - printf "Enter the desired branch for repository "$1" :\n" - local OUT="$(git branch -r | sed '/\/HEAD/d')" - # $OUT="$($OUT > )" - printf "$OUT\nbranch: " - read BRANCH - else - printf "on branch: $3\n" - BRANCH="$3" - fi - if ! [[ -z ${BRANCH} ]]; then - git checkout $BRANCH &> '/dev/null' - fi - if [[ ${LATEST} == "true" ]]; then - git pull --all - elif [[ ${LATEST} == "true" ]]; then - printf "Assuming user not pulling latest commits.\n" - else - printf "Pull latest commits? (y/N): " - read PULL - case ${PULL:0:1} in - y|Y ) - printf "Pulling latest commits.\n" - git pull --all - ;; - * ) - printf "Not pulling latest commits.\n" - ;; - esac - if ! [[ "$PULL" =~ ^[[:alnum:]]+$ ]]; then - printf "Assuming user not pulling latest commits.\n" - fi - fi -} - -pnpmtransbundle() { - cd $1 - if [[ "$2" == "library" ]]; then - npm install --quiet &> '/dev/null' - npm run build --quiet &> '/dev/null' - sudo npm link --quiet &> '/dev/null' - elif [[ "$2" == "frontend" ]]; then - pnpm i &> '/dev/null' - pnpm run build &> '/dev/null' - elif [[ "$2" == "template" ]]; then - pnpm i &> '/dev/null' - pnpm run build &> '/dev/null' - fi -} - -if ! [[ $count -gt 9 ]] ; then - printf "Installing Steam Deck Plugin Loader contributor/developer (for Steam Deck)...\n" - - printf "THIS SCRIPT ASSUMES YOU ARE RUNNING IT ON A PC, NOT THE DECK! - Not planning to contribute to or develop for PluginLoader? - If so, you should not be using this script.\n - If you have a release/nightly installed this script will disable it.\n" - - printf "This script requires you to have nodejs installed. (If nodejs doesn't bundle npm on your OS/distro, then npm is required as well).\n" -fi - -if ! [[ $count -gt 0 ]] ; then - read -p "Press any key to continue" -fi - -printf "\n" - -## User chooses preffered clone & install directories - -if [[ "$CLONEFOLDER" == "" ]]; then - setfolder "$CLONEFOLDER" "clone" -fi - -if [[ "$INSTALLFOLDER" == "" ]]; then - setfolder "$INSTALLFOLDER" "install" -fi - -CLONEDIR="$HOME/$CLONEFOLDER" -INSTALLDIR="/home/deck/homebrew/$INSTALLFOLDER" - -## Input ip address, port, password and sshkey - -### DECKIP already been parsed? -if [[ "$DECKIP" == "" ]]; then - ### get ip address of deck from user - read -p "Enter the ip address of your Steam Deck: " DECKIP -fi - -### validate DECKIP -checkdeckip "$DECKIP" - -### SSHPORT already been parsed? -if [[ "$SSHPORT" == "" ]]; then - ### get ssh port from user - read -p "Enter the ssh port of your Steam Deck: " SSHPORT -fi - -### validate SSHPORT -checksshport "$SSHPORT" - -### PASSWORD already been parsed? -if [[ "$PASSWORD" == "" ]]; then - ### prompt the user for their deck's password - printf "Enter the password for the Steam Deck user 'deck' : " - read -s PASSWORD - printf "\n" -fi - -### validate PASSWORD -checkpassword "$PASSWORD" - -### SSHKEYLOC already been parsed? -if [[ "$SSHKEYLOC" == "" ]]; then - ### prompt the user for their ssh key - read -p "Enter the directory for your ssh key, for ease of connection : " SSHKEYLOC -fi - -### validate SSHKEYLOC -checksshkey "$SSHKEYLOC" - -if [[ "$SSHKEYLOC" == "" ]]; then - IDENINVOC="" -else - IDENINVOC="-i ${SSHKEYLOC}" -fi - -## Create folder structure - -printf "Cloning git repositories.\n" - -mkdir -p ${CLONEDIR} &> '/dev/null' - -### remove folders just in case -# rm -r ${CLONEDIR}/pluginloader -# rm -r ${CLONEDIR}/pluginlibrary -# rm -r ${CLONEDIR}/plugintemplate - -clonefromto "https://github.com/SteamDeckHomebrew/PluginLoader" ${CLONEDIR}/pluginloader "$LOADERBRANCH" - -clonefromto "https://github.com/SteamDeckHomebrew/decky-frontend-lib" ${CLONEDIR}/pluginlibrary "$LIBRARYBRANCH" - -clonefromto "https://github.com/SteamDeckHomebrew/decky-plugin-template" ${CLONEDIR}/plugintemplate "$TEMPLATEBRANCH" - -## install python dependencies to deck - -printf "\nInstalling python dependencies.\n" - -rsync -azp --rsh="ssh -p $SSHPORT $IDENINVOC" ${CLONEDIR}/pluginloader/requirements.txt deck@${DECKIP}:${INSTALLDIR}/pluginloader/requirements.txt &> '/dev/null' - -ssh deck@${DECKIP} -p ${SSHPORT} ${IDENINVOC} "python -m ensurepip && python -m pip install --upgrade pip && python -m pip install --upgrade setuptools && python -m pip install -r $INSTALLDIR/pluginloader/requirements.txt" &> '/dev/null' - -## Transpile and bundle typescript - -[ "$UID" -eq 0 ] || printf "Input password to proceed with install.\n" - -sudo npm install -g pnpm &> '/dev/null' - -type pnpm &> '/dev/null' - -PNPMLIVES=$? - -if ! [[ "$PNPMLIVES" -eq 0 ]]; then - printf "pnpm does not appear to be installed, exiting.\n" - exit 1 -fi - -printf "Transpiling and bundling typescript.\n" - -pnpmtransbundle ${CLONEDIR}/pluginlibrary/ "library" - -pnpmtransbundle ${CLONEDIR}/pluginloader/frontend "frontend" - -pnpmtransbundle ${CLONEDIR}/plugintemplate "template" - -## Transfer relevant files to deck - -printf "Copying relevant files to install directory\n\n" - -ssh deck@${DECKIP} -p ${SSHPORT} ${IDENINVOC} "mkdir -p $INSTALLDIR/pluginloader && mkdir -p $INSTALLDIR/plugins" &> '/dev/null' - -### copy files for PluginLoader -rsync -avzp --rsh="ssh -p $SSHPORT $IDENINVOC" --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='frontend/' --exclude='dist/' --exclude='contrib/' --exclude='*.log' --exclude='requirements.txt' --exclude='backend/__pycache__/' --exclude='.gitignore' --delete ${CLONEDIR}/pluginloader/* deck@${DECKIP}:${INSTALLDIR}/pluginloader &> '/dev/null' - -if ! [[ $? -eq 0 ]]; then - printf "Error occurred when copying $CLONEDIR/pluginloader/ to $INSTALLDIR/pluginloader/\n" - printf "Check that your Steam Deck is active, ssh is enabled and running and is accepting connections.\n" - exit 1 -fi - -### copy files for plugin template -rsync -avzp --rsh="ssh -p $SSHPORT $IDENINVOC" --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='node_modules/' --exclude='src/' --exclude='*.log' --exclude='.gitignore' --exclude='pnpm-lock.yaml' --exclude='package.json' --exclude='rollup.config.js' --exclude='tsconfig.json' --delete ${CLONEDIR}/plugintemplate deck@${DECKIP}:${INSTALLDIR}/plugins &> '/dev/null' -if ! [[ $? -eq 0 ]]; then - printf "Error occurred when copying $CLONEDIR/plugintemplate to $INSTALLDIR/plugins\n" - exit 1 -fi - -## TODO: direct contributors to wiki for this info? - -printf "Run these commands to deploy your local changes to the deck:\n" -printf "'rsync -avzp --mkpath --rsh=""\"ssh -p $SSHPORT $IDENINVOC\""" --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='frontend/' --exclude='dist/' --exclude='contrib/' --exclude='*.log' --exclude='requirements.txt' --exclude='backend/__pycache__/' --exclude='.gitignore' --delete $CLONEDIR/pluginloader/* deck@$DECKIP:$INSTALLDIR/pluginloader/'\n" -printf "'rsync -avzp --mkpath --rsh=""\"ssh -p $SSHPORT $IDENINVOC\""" --exclude='.git/' --exclude='.github/' --exclude='.vscode/' --exclude='node_modules/' --exclude='src/' --exclude='*.log' --exclude='.gitignore' --exclude='package-lock.json' --delete $CLONEDIR/pluginname deck@$DECKIP:$INSTALLDIR/plugins'\n\n" - -printf "Run in console or in a script this command to run your development version:\n'ssh deck@$DECKIP -p $SSHPORT $IDENINVOC 'export PLUGIN_PATH=$INSTALLDIR/plugins; export CHOWN_PLUGIN_PATH=0; echo 'steam' | sudo -SE python3 $INSTALLDIR/pluginloader/backend/main.py'\n" - -## Disable Releases versions if they exist - -### ssh into deck and disable PluginLoader release/nightly service -printf "Connecting via ssh to disable any PluginLoader release versions.\n" -printf "Script will exit after this. All done!\n" - -ssh deck@${DECKIP} -p ${SSHPORT} ${IDENINVOC} "printf $PASSWORD | sudo -S systemctl disable --now plugin_loader; echo $?" &> '/dev/null' diff --git a/contrib/nodeck.sh b/contrib/nodeck.sh deleted file mode 100755 index 29dca940..00000000 --- a/contrib/nodeck.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash - -## Pre-parse arugments for ease of use -CLONEFOLDER=${1:-""} -LOADERBRANCH=${2:-""} -LIBRARYBRANCH=${3:-""} -TEMPLATEBRANCH=${4:-""} -LATEST=${5:-""} - -## gather options into an array -OPTIONSARRAY=("$CLONEFOLDER" "$LOADERBRANCH" "$LIBRARYBRANCH" "$TEMPLATEBRANCH" "$LATEST") - -## iterate through options array to check their presence -count=0 -for OPTION in ${OPTIONSARRAY[@]}; do - ! [[ "$OPTION" == "" ]] && count=$(($count+1)) - # printf "OPTION=$OPTION\n" -done - -clonefromto() { - # printf "repo=$1\n" - # printf "outdir=$2\n" - # printf "branch=$3\n" - printf "Repository: $1\n" - git clone $1 $2 &> '/dev/null' - CODE=$? - # printf "CODE=${CODE}" - if [[ $CODE -eq 128 ]]; then - cd $2 - git fetch --all &> '/dev/null' - fi - if [[ -z $3 ]]; then - printf "Enter the desired branch for repository "$1" :\n" - local OUT="$(git branch -r | sed '/\/HEAD/d')" - # $OUT="$($OUT > )" - printf "$OUT\nbranch: " - read BRANCH - else - printf "on branch: $3\n" - BRANCH="$3" - fi - if ! [[ -z ${BRANCH} ]]; then - git checkout $BRANCH &> '/dev/null' - fi - if [[ ${LATEST} == "true" ]]; then - git pull --all - elif [[ ${LATEST} == "true" ]]; then - printf "Assuming user not pulling latest commits.\n" - else - printf "Pull latest commits? (y/N): " - read PULL - case ${PULL:0:1} in - y|Y ) - printf "Pulling latest commits.\n" - git pull --all - ;; - * ) - printf "Not pulling latest commits.\n" - ;; - esac - if ! [[ "$PULL" =~ ^[[:alnum:]]+$ ]]; then - printf "Assuming user not pulling latest commits.\n" - fi - fi -} - -pnpmtransbundle() { - cd $1 - if [[ "$2" == "library" ]]; then - npm install --quiet &> '/dev/null' - npm run build --quiet &> '/dev/null' - sudo npm link --quiet &> '/dev/null' - elif [[ "$2" == "frontend" ]]; then - pnpm i &> '/dev/null' - pnpm run build &> '/dev/null' - elif [[ "$2" == "template" ]]; then - pnpm i &> '/dev/null' - pnpm run build &> '/dev/null' - fi -} - - -if ! [[ $count -gt 4 ]] ; then - printf "Installing Steam Deck Plugin Loader contributor/developer (no Steam Deck)..." - - printf "\nTHIS SCRIPT ASSUMES YOU ARE RUNNING IT ON A PC, NOT THE DECK! - Not planning to contribute to or develop for PluginLoader? - Then you should not be using this script.\n" - - printf "\nThis script requires you to have nodejs installed. (If nodejs doesn't bundle npm on your OS/distro, then npm is required as well).\n" -fi - -if ! [[ $count -gt 0 ]] ; then - read -p "Press any key to continue" -fi - -printf "\n" - -if [[ "$CLONEFOLDER" == "" ]]; then - printf "Enter the directory in /home/user/ to clone to.\n" - printf "The clone directory would be: ${HOME}/git \n" - read -p "Enter your clone directory: " CLONEFOLDER - if ! [[ "$CLONEFOLDER" =~ ^[[:alnum:]]+$ ]]; then - printf "Folder name not provided. Using default, '${DEFAULT}'.\n" - CLONEFOLDER="${DEFAULT}" - fi -fi - -CLONEDIR="$HOME/$CLONEFOLDER" - -## Create folder structure - -printf "Cloning git repositories.\n" - -mkdir -p ${CLONEDIR} &> '/dev/null' - -### remove folders just in case -# rm -r ${CLONEDIR}/pluginloader -# rm -r ${CLONEDIR}/pluginlibrary -# rm -r ${CLONEDIR}/plugintemplate - -clonefromto "https://github.com/SteamDeckHomebrew/PluginLoader" ${CLONEDIR}/pluginloader "$LOADERBRANCH" - -clonefromto "https://github.com/SteamDeckHomebrew/decky-frontend-lib" ${CLONEDIR}/pluginlibrary "$LIBRARYBRANCH" - -clonefromto "https://github.com/SteamDeckHomebrew/decky-plugin-template" ${CLONEDIR}/plugintemplate "$TEMPLATEBRANCH" - -## install python dependencies (maybe use venv?) - -python -m pip install -r ${CLONEDIR}/pluginloader/requirements.txt &> '/dev/null' - -## Transpile and bundle typescript - -[ "$UID" -eq 0 ] || printf "Input password to proceed with install.\n" - -type npm &> '/dev/null' - -NPMLIVES=$? - -if ! [[ "$PNPMLIVES" -eq 0 ]]; then - printf "npm does not appear to be installed, exiting.\n" - exit 1 -fi - -sudo npm install -g pnpm &> '/dev/null' - -type pnpm &> '/dev/null' - -PNPMLIVES=$? - -if ! [[ "$PNPMLIVES" -eq 0 ]]; then - printf "pnpm does not appear to be installed, exiting.\n" - exit 1 -fi - -printf "Transpiling and bundling typescript.\n" - -pnpmtransbundle ${CLONEDIR}/pluginlibrary/ "library" - -pnpmtransbundle ${CLONEDIR}/pluginloader/frontend "frontend" - -pnpmtransbundle ${CLONEDIR}/plugintemplate "template" - -printf "Plugin Loader is located at '${CLONEDIR}/pluginloader/'.\n" - -printf "Run in console or in a script these commands to run your development version:\n'export PLUGIN_PATH=${CLONEDIR}/plugins; export CHOWN_PLUGIN_PATH=0; sudo -E python3 ${CLONEDIR}/pluginloader/backend/main.py'\n" - -printf "All done!\n" diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 786b22ca..db150c51 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -120,6 +120,14 @@ packages: '@jridgewell/trace-mapping': 0.3.18 dev: true + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.20 + chalk: 2.4.2 + dev: true + /@babel/code-frame@7.22.5: resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} @@ -144,7 +152,7 @@ packages: '@babel/helpers': 7.22.5 '@babel/parser': 7.22.5 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 @@ -165,6 +173,16 @@ packages: jsesc: 2.5.2 dev: true + /@babel/generator@7.23.0: + resolution: {integrity: sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 + jsesc: 2.5.2 + dev: true + /@babel/helper-compilation-targets@7.22.5(@babel/core@7.22.5): resolution: {integrity: sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==} engines: {node: '>=6.9.0'} @@ -179,24 +197,29 @@ packages: semver: 6.3.0 dev: true + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} dev: true - /@babel/helper-function-name@7.22.5: - resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/template': 7.22.15 + '@babel/types': 7.23.0 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.23.0 dev: true /@babel/helper-module-imports@7.22.5: @@ -216,7 +239,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color @@ -236,11 +259,23 @@ packages: '@babel/types': 7.22.5 dev: true + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + dev: true + /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} @@ -256,12 +291,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color dev: true + /@babel/highlight@7.22.20: + resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} @@ -279,12 +323,29 @@ packages: '@babel/types': 7.22.5 dev: true + /@babel/parser@7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.0 + dev: true + /@babel/runtime@7.22.5: resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.11 + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 + dev: true + /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} @@ -294,18 +355,18 @@ packages: '@babel/types': 7.22.5 dev: true - /@babel/traverse@7.22.5: - resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} + /@babel/traverse@7.23.2: + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -321,6 +382,15 @@ packages: to-fast-properties: 2.0.0 dev: true + /@babel/types@7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@esbuild/android-arm64@0.17.19: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} @@ -2052,7 +2122,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/parser': 7.22.5 - '@babel/traverse': 7.22.5 + '@babel/traverse': 7.23.2 '@babel/types': 7.22.5 find-line-column: 0.5.2 transitivePeerDependencies: |
