refactor: move Python backend modules to project root
This commit is contained in:
@@ -8,7 +8,7 @@ from typing import Optional, Tuple
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from .crypto import BitwardenCrypto, PinCrypto
|
from crypto import BitwardenCrypto, PinCrypto
|
||||||
|
|
||||||
|
|
||||||
# Default URLs
|
# Default URLs
|
||||||
@@ -5,14 +5,17 @@ Main entry point for the Python backend. Provides API routes for the frontend.
|
|||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
import decky_plugin
|
import decky_plugin
|
||||||
from .bitwarden_client import BitwardenClient
|
from bitwarden_client import BitwardenClient
|
||||||
from .crypto import BitwardenCrypto, PinCrypto
|
from crypto import BitwardenCrypto, PinCrypto
|
||||||
from .totp import generate_totp, get_totp_remaining_seconds
|
from totp import generate_totp, get_totp_remaining_seconds
|
||||||
from .clipboard import copy_to_clipboard, clear_all_clipboards
|
from clipboard import copy_to_clipboard, clear_all_clipboards
|
||||||
|
|
||||||
|
|
||||||
class Plugin:
|
class Plugin:
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"description": "Bitwarden/Vaultwarden password manager plugin for Decky Loader",
|
"description": "Bitwarden/Vaultwarden password manager plugin for Decky Loader",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c && mkdir -p out && zip -r out/decky-vaultwarden.zip dist/ main.py plugin.json defaults/ requirements.txt",
|
"build": "rollup -c && mkdir -p out && rm -rf out/staging && mkdir -p out/staging/Vaultwarden && cp -r dist main.py bitwarden_client.py crypto.py totp.py clipboard.py plugin.json defaults requirements.txt package.json out/staging/Vaultwarden/ && cd out/staging && zip -r ../Vaultwarden.zip Vaultwarden/ && rm -rf out/staging",
|
||||||
"watch": "rollup -c -w",
|
"watch": "rollup -c -w",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
import deckyPlugin from "@decky/rollup";
|
import deckyPlugin from "@decky/rollup";
|
||||||
|
|
||||||
export default deckyPlugin({
|
export default deckyPlugin({
|
||||||
// Extra rollup options if needed
|
output: {
|
||||||
|
exports: undefined,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user