remove invoices (#1515)

* remove invoices

* remove invoices tests

* remove unused tests/extensions dir

* fix issue

* formatting

* test passing locally. and i dont know why

* fix _extension_dir loading

* gitkeep extension dir

* formatting

* remove bundle from check

* do not prettier compliled css

* do not prettier compliled css

* create extension dir, if it does not exists, just to be sure

* Update lnbits/extension_manager.py

---------

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
dni ⚡
2023-02-20 15:34:18 +01:00
committed by GitHub
co-authored by calle
parent bb05703f2b
commit ca75b328a1
23 changed files with 152 additions and 2160 deletions
+9 -9
View File
@@ -51,13 +51,16 @@ class Extension(NamedTuple):
)
# All subdirectories in the current directory, not recursive.
class ExtensionManager:
def __init__(self, include_disabled_exts=False):
self._disabled: List[str] = settings.lnbits_disabled_extensions
self._admin_only: List[str] = settings.lnbits_admin_extensions
self._extension_folders: List[str] = [
x[1] for x in os.walk(os.path.join(settings.lnbits_path, "extensions"))
][0]
p = Path(settings.lnbits_path, "extensions")
os.makedirs(p, exist_ok=True)
self._extension_folders: List[Path] = [f for f in p.iterdir() if f.is_dir()]
@property
def extensions(self) -> List[Extension]:
@@ -70,11 +73,7 @@ class ExtensionManager:
ext for ext in self._extension_folders if ext not in self._disabled
]:
try:
with open(
os.path.join(
settings.lnbits_path, "extensions", extension, "config.json"
)
) as json_file:
with open(extension / "config.json") as json_file:
config = json.load(json_file)
is_valid = True
is_admin_only = True if extension in self._admin_only else False
@@ -83,9 +82,10 @@ class ExtensionManager:
is_valid = False
is_admin_only = False
*_, extension_code = extension.parts
output.append(
Extension(
extension,
extension_code,
is_valid,
is_admin_only,
config.get("name"),