this logically groups api endpoints and gioves them specific openapi tags. which makes them nice on the `/docs` endpoint and makes the `api.py` more approachable
* add wallets list endpoint
* remove trailing slashes from endpoints
* fixup topup url
* fix trailing slash on auth
* backwards compatibility
* feat: `cleanup-wallet` cli command
`lnbits-cli db cleanup-wallets` removes all wallets that never had an transaction.
this helps against spammers creating random wallets, eventually slowing down the db.
* add commands
* add to example env
* db_versions was used in app
* add delta as cli argument
* use days unit
* simplify cli argument name (cleanup_wallet_days -> days)!
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* feat: allow all extension deactivation
* doc: updated comment
* fix: make sure `register_routes` executes after installed extensions are checked
* chore: code format
* fix: do not run migration on deactivated extensions
* fix: make sure the deactivated extension list is loaded in time
* feat: register extension routes if extension never loaded before
* fix: move `load_disabled_extension_list`
* doc: disable by default
* [FEAT] add extension functionality to lnbits-cli
WIP
draft cli commands for vlad :)
* add extension list command
* [feat] lnbits-cli add install, uninstall and upgrade
* feat: load settings from DB
* refactor: simplify settings loading
* feat: show current version if installed
* feat: add mor emessages
* feat: basic DB install
* feat: add extension
* feat: do not install if the server is up
* feat: add logic for uninstall
* refactor: prepare for upgrade
* feat: check extension before upgrade
* refactor: stuff
* fix: have a default value
* feat: use the API logic
* feat: use pi methods for un-install
* refactor: extract _select_release
* feat: add flags
* feat: check if extension already up to date
* refactor: use `_run_async`
* feat: install all extensions
* feat: install online
* fix: api install
* fix: API upgrade & install
* feat: add API uninstall
* failed typo
* typo running
* url duplication
* [fix] provide short-options too (same as upgrade command)
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* make black
* fix: fail if .superuser file not found; add `--admin-user` option
* fix: ambiguous use of `logger.debug`
- register_new_ext_routes must not be None
- `logger.debug` was used because it allowed any arguments, but that was a bad idea
- now an explicit empty `_do_nothing(*_)` function is used
* fix: load settings
* doc: updated `--source-repo`
* chore: rename `upgrade` to `update`
* refactor: use `@annotation` for making commands async
* fix: code checks
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
related to https://github.com/lnbits/lnbits/pull/1855
put the `.super_user` into our data_dir to not pollute our root dir
removed the weird mention to the url in the logs and mention
the `lnbits-cli superuser` instead
this is a breaking change for the bundlers, `cat .super_user` is not good anymore.
fix would be `cat data/.super_user` but for future compatibility i recommend
using `poetry run lnbits-cli superuser`
* remove static/vendor
* add node dependencies
* add bolt11-decoder
* run npm install inside dockerimage
* only use bundle.js and bundle.css
* use node_modules for bundling vendor assets
* remove dead code
* make argument optional
* reintroduce vendor dir
* reintroduce vendor and single javascript files, minification
* wrong moment, remove minification
* lock packages with non critical issues
* black