upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/client.rs
AgeCommit message (Collapse)Author
2025-10-20fix: reading NIP-22 style Status events during fetchDanConwayDev
also fix the report so that we show nip10 style statuses too
2025-09-03fix: nostr:// nip05 without localDanConwayDev
the patch I sent to rust-nostr library got merged
2025-08-19fix: nip05 without local partDanConwayDev
allow users to use just a nip05 domain in nostr:// urls rather than requiring _@ prefix.
2025-08-18fix: only use state and ann from maintainersDanConwayDev
at some point we introduced a bug were we were taking the state and git servers from non authorised maintainers.
2025-08-07Merge branch 'add-prs-to-ngit-send'DanConwayDev
2025-08-07feat(send): PR fallback to user / custom graspDanConwayDev
if use is maintainer, push PR to all repo git servers. if user has a fork, push to all git servers it lists, and repo grasp servers. if user hasn't got a fork but has a user grasp list and pushing push to repo grasp servers fails, create a personal-fork automatically at each user grasp server and push there. fallback to prompting user for either grasp servers or git server with write permission. if user provides grasp servers, suggesting adding to user preference list.
2025-08-04refactor: use rust-nostr `verify_subscriptions`DanConwayDev
instead of `match_events` after receiving events
2025-07-31fix: nip05 breaking changes in rust-nostrDanConwayDev
as its now 'bring your own transport'
2025-07-31chore: bump rust-nostr v0.43DanConwayDev
with trival breaking changes. nip05 changes will be done seperately.
2025-07-23refactor: Rename fallback relays and grasp serversDanConwayDev
Rename `params.fallback_relays` and `client.fallback_relays` to `relay_default_set`. Rename `params.fallback_grasp_servers` to `grasp_default_set`. This includes updating associated getters and usages across the codebase.
2025-07-23refactor: add fallback grasp servers to clientDanConwayDev
so that they can be used as part of push and send
2025-07-22feat(pr): generate pr event > oversized patchDanConwayDev
but only for new proposals
2025-07-18feat(pr): fetch pr and pr updates from clone urlsDanConwayDev
we try and get them from clone urls of repo and fallback to those specified by contributor
2025-07-18feat(pr): list PR and PR updatesDanConwayDev
remote will list the refs under `pr/*` namespace. `ngit list` will display in the list of open / draft proposals. it won't yet fetch the related oids to enable fetching or checking out the branch.
2025-07-18feat: fetch PR and PRUpdate eventsDanConwayDev
as the first stage of adding support
2025-07-18feat(status): read nip22 style status eventsDanConwayDev
in anticipation of moving to the nip22 style
2025-07-16chore: bump nightly rustfmtDanConwayDev
to latest available and apply fmt fixes
2025-07-16chore: nix flake updateDanConwayDev
required running: `cargo fix --allow-dirty --allow-staged` `cargo clippy --fix --allow-dirty -- -D warnings` to fix problems and then manually fixing some too
2025-07-15feat(client): skip relays that just timeoutDanConwayDev
Prevent repeated attempts to connect to relays that have previously failed due to connection timeouts within the current session, improving overall performance and reliability. Added a `relays_not_to_retry` map to the `Client` struct to store relays to skip and their reasons. Implemented methods `skip_relay_for_session` and `is_relay_skipped_for_session` to manage this map. Relays are added to the skip list upon connection timeouts. Subsequent attempts to use these skipped relays during the same session will immediately fail with the recorded reason, avoiding unnecessary network calls. Progress bars are updated to reflect skipped relays and their reasons.
2025-05-31feat(push): prevent push if no ann eventDanConwayDev
To ensure additional maintainers publish an annoucement event, require it for them to push
2025-05-23fix: use blossoms from all maintainersDanConwayDev
applying this change to blossom: 25e58e52624210f5852a9183495821526add5928
2025-05-21fix: preserve relay and git server orderDanConwayDev
rewrite of 25e58e52624210f5852a9183495821526add5928 which took relays & git servers from all maintainer some test failed due to incorrect ordering. its better to start with the ones the trusted maintainer selected.
2025-05-21feat: add support for default relay overridesDanConwayDev
via git config so they can be overwritten locally and globally
2025-05-21refactor: move client defaults into paramsDanConwayDev
in prep for optionally getting some of this config from git config overrides
2025-05-21fix: use relays & git servers from all maintainerDanConwayDev
but other details from trusted maintainer. This maximises the likelihood that all git servers and relays have the correct state.
2025-05-05chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
2025-04-03feat(send): add description to event signing processDanConwayDev
resolving nostr:note1qu8le4a8qz9hhxy6q85txejcq0kln0r3s9vdtwrhtqwvauc6nxuqn3fj0z so it doesnt appear frozen when there are lots of events being signed by a remote signer
2025-04-02fix: publish error prefix regressionDanConwayDev
introduced by rust-nostr v0.40 from v0.37
2025-04-01chore: bump rust-nostr v0.37 ~> v0.40DanConwayDev
and fix all of the breaking changes
2024-12-16chore: bump nix flake rust nightly `fmt` overlayDanConwayDev
update the rust nightly `fmt` overlay which needs to be pinned to a specific version (this case by date) update formatting in main files via `cargo fmt`
2024-12-03refactor: limit fetch to 1 trusted coordinateDanConwayDev
previously fetch supported fetching multiple trusted coordinates at once. The additional complexity trade off isn't worth it. It will still fetch events related to the coordinates of maintainers that the trusted maintainer lists. A scenario where there might be multiple trusted coordinates is where a large repo is split into multiple nostr repos to manage pull requests and issues in seperate sub-units. I might therefore have different remotes that target different identifiers. There also might be different set of maintainers groups that are have different views on the latest state of the same codebase and they haven't split off into using different identifiers. Its simplier ngit to fetch these different nostr repos independantly when requested. git-remote-nostr will do this automatically as it works through remotes but for ngit cmds a further change is required so `get_repo_coordinates` and `try_and_get_repo_coordinates` prompts to select the desired one.
2024-12-02fix: repo_ref 'not found' err suggest `ngit init'DanConwayDev
if the nostr remote was created by the maintainer before `ngit init` was ran. the error is more likely to occur when a user clones a repo using the nostr remote whist the relay in the hint is down and the fallback relays dont have the announcement. or if the user is offline when they clone.
2024-12-02fix(repo_ref): clarify no repo event err msgDanConwayDev
as there might be a repo event but we couldn't find it
2024-11-29feat(init): set remote `origin`DanConwayDev
check whether remote `origin` is nostr url and if not attempt to set it.
2024-11-28refactor: remove fufilled commentDanConwayDev
as the feature is implmeneted
2024-11-27feat: only print awaiting signer with nip46DanConwayDev
using the backend feature I requested for rust-nostr
2024-11-27chore: bump rust-nosrt v0.37.0DanConwayDev
use RelayUrl in repo_ref which I had resisted as it mutates relay urls when printed to append a slash
2024-11-26refactor: err msgs 'cannot' > 'failed to'DanConwayDev
in nearly all cases 'cannot' was used when an action was tried and failed. 'failed to' is strictly better because: * just because the action didn't work that time doesnt mean it cannot work * it is better at drawing the users attention to a problem
2024-11-21feat(login): overhaul login experienceDanConwayDev
* simplify login menu, making it more accessable to newcomers and easier to select remote signer options * enable `ngit login` to work from anywhere (not just a git repo) * assume fresh login details saved to global git config but fallback to local repository * maintain local repository login via `ngit login --local` * maintain login via CLI arguments eg `ngit send --nsec nsec123` * nudge users to remember nsec when pasting in ncryptsec for a better UX, whilst maintaining the option to be prompted for password everytime * create placeholder menu items for help menu and create account
2024-11-12fix: send event error messageDanConwayDev
rust-nostr v35/v36 changed the `pool.send_event_to` error message to use 'event/s not published' instead of the error message from the relay. `relay.send_event` supplies the useful error message.
2024-11-12test: prevent signer commentaryDanConwayDev
identification of signer has been removed from rust-nostr. until it is added back in we must always prompt the user about signing as if its a local signer the message will be removed before the user sees it. unfortunately this is picked up by the tests so we must only prompt the user when not running tests.
2024-11-11chore: bump rust-nostr v0.36DanConwayDev
bump all rust-nostr packages to latest issued version. there have been some breaking changes to nip46 and this applies these changes.
2024-10-31fix(init): remove broken blasterDanConwayDev
muntiny wallet has shut down and removed its blaster relay
2024-10-28chore: bump rust-nostr to patch near v0.36.0DanConwayDev
bump all rust-nostr packages refactoring code based on breaking changes upgrading to patched version to address signer issue: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
2024-10-28refactor: replace sqlite with lmdbDanConwayDev
as sqlite is depricated in rust-nostr
2024-09-25chore: bump rust-nostr v0.35DanConwayDev
bump all rust-nostr packages
2024-09-24feat(login): login via nip46 QR codeDanConwayDev
or nostrconnect url string which is a much better UX flow for nip46
2024-09-11refactor: fix fmt and clippy issuesDanConwayDev
which potentially were only identified when a dependancy was updated
2024-09-04refactor(remote): split into modulesDanConwayDev
to make it easier to read
2024-09-04refactor: fix imports, etc based on restructureDanConwayDev
move some functions out of ngit and into lib/mod and lib/git_events remove MockConnect from binaries so it is only used in the library. this was done: * mainly because automocks were not being imported from lib into each binary * but also because the these functions were being tested with MockConnect
2024-09-04refactor: organise into lib and bin structureDanConwayDev
the make the code more readable this commit just moves the files, the next commit should fix the imports