upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/client.rs
AgeCommit message (Collapse)Author
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
2024-08-28chore: bump rust-nostr to v0.34.0DanConwayDev
bump all rust-nostr packages I'm not sure I'm completely happy with allowing mutable_key_type but it is just run inside tests it appears that Event didn't have the Copy trait in v0.33.0 so I'm not sure why this warning suddenly appeared the timeout of client.get_events_of needed to be doubled which could indicate that an ineffiency has been introduced in v0.34.0 the primary motivation for upgrading now was to get this fix: nostr:nevent1qqsffl2ld678pjj77rh9k2g4edljmxdu6ew4lvgnglxv7jhu3ru8vvcpp4mhxue69uhkummn9ekx7mqzyzsq3hh327t0h2dq6matqn5064cgj2zanl2stkj6s0lg4t2h5dty6rm2ucm as I suspect it is also effecting other repositories eg nostr-profile-manager
2024-08-01Revert "refactor: fix `stderr` ~> `stdout`"DanConwayDev
This reverts commit 3d2e031294b467be725a4ac5f5e65e029d25699a.
2024-08-01refactor: fix `stderr` ~> `stdout`DanConwayDev
as `stderr` is being used when it shouldn't be
2024-08-01Revert "clear 'fetching updates..' when done"DanConwayDev
This reverts commit 4a38d5f4179114fce60f84c4694284a49f648c64.
2024-08-01clear 'fetching updates..' when doneDanConwayDev
unless there were errors and detailed report doesnt clear
2024-07-30refactor: add struct `RepoState`DanConwayDev
to more easily access state details
2024-07-29feat(fetch): fetch state announcementsDanConwayDev
if multiple maintainers produce state events with the same timestamp, the event with the largest event_id will be used
2024-07-24refactor: use nip34 kinds from rust-nostrDanConwayDev
instead of Kind::Custom(u16) as v33 of rust-nostr introduced them
2024-07-22chore: bump rust-nostr to v0.33.0DanConwayDev
bump all rust-nostr packages move from using patched nip46 nip05 function to profile function in v33 fix send_events_to error message
2024-07-19feat: save created events to cacheDanConwayDev
as soon as they are successfully sent to at least one relay
2024-07-19feat: intergrate `fetch` into `send`DanConwayDev
reworking the tests and test suite as appropriate
2024-07-19fix(fetch): error when user profile not presentDanConwayDev
when fetching a user profile from user relays it throw an error when an existing version of the profile wasn't found
2024-07-19fix(fetch): absent repo addr infinite loopDanConwayDev
prevent an infinite loop when a new maintainer is identified that hasn't issued a repo event yet make it clear when repo_coordinates must not have relays
2024-07-18fix(fetch): dont report old profile as updateDanConwayDev
as any profile event was being recorded as a update
2024-07-18fix(fetch): get profiles of fresh contributorsDanConwayDev
rather than ending the loop without fetching them
2024-07-18fix(fetch): new coodinates infinite loopDanConwayDev
prevent infinite loop when new coordinates are found
2024-07-18refactor(fetch): move database cacheDanConwayDev
into cache directory rather than config directories also removed CodeCollaboration from path as this isn't helpful whilst this is a breaking change, the cache was only introduced during development of this version so it is not highlighted as such
2024-07-18fix(fetch): report profile updates as updatesDanConwayDev
rather than as new profiles
2024-07-18refactor: fetch some profiles from user relaysDanConwayDev
add the ability to fetch more than just the current user from their user write relays
2024-07-18fix(fetch): find repo based in naddr relay hintDanConwayDev
which will enable the following`list` test to pass once `fetch` is intergrated into `list`: finds_based_on_naddr_on_embeded_relay
2024-07-17fix(fetch): get profile with nsec cli parameterDanConwayDev
only the profile from the saved user was being fetched. tests are using cli login parameters and expecting to see the user's name but it was only showing the npub. fixed by allowing the explicit request of specfic user profiles.
2024-07-17feat(login): use fetch to get user profileDanConwayDev
fetch automatically gets updates to logged in user profile / relays fetching without specifying repo pointers will just fetch user profiles so that can be used during login, if user profile isn't in cache login now uses fetch
2024-07-16feat(fetch): get contributor profilesDanConwayDev
just from repository / fallback relays and only if we don't already have a version in cache this is because we are only using it for the user's name
2024-07-16fix(fetch): report grammar and copyDanConwayDev
as 'fetching... updates:' feels more like further updates are being fetched than 'fetching... found'
2024-07-16fix(fetch): report detailsDanConwayDev
so it only counts commits and statues to existing proposals
2024-07-16feat(fetch): search newly discovered inbox relaysDanConwayDev
to increase the likelihood that all events are found
2024-07-16refactor(fetch): improve FetchRequestDanConwayDev
im preparation for identifying new inbox relays
2024-07-15feat(fetch): fetch events and save to cacheDanConwayDev
enabler to add simplicity, efficency and offline capability to other functions improve repo announcement selection
2024-07-03fix(list): remove event size limitDanConwayDev
disable event limits in rust-nostr which cause large patches to be filtered out
2024-06-28feat(login): login with nip46 remote signerDanConwayDev
and save details in git config
2024-06-25refactor: replace keys with signerDanConwayDev
so that nip46 bunker signing can be added
2024-04-24fix: remove relay.f7z.io from default relaysDanConwayDev
as over the last 2-3 weeks it has consitantly be timing out
2024-04-10feat: reduce connection timeout 6s ~> 3sDanConwayDev
seperate connection timeout from get_events_of timeout and reduce it to 3s
2024-04-08feat: reduce `get_events` timeout 10s ~> 6sDanConwayDev
if relays do not connect and retun events within 3s they will rarely connect at all this could be reversed when get_events is used async
2024-03-28refactor: allow pedantic clippy warning large_futuresDanConwayDev
rust-nostr author suggested this might be a false positive https://github.com/rust-nostr/nostr/pull/375#issuecomment-2022245832
2024-03-27fix: relay connection timeout panicDanConwayDev
upgrade from rust-nostr v0.27 ~> v0.28 introduces this panic presumably get_events attempted to write to the MultiProgress just after it has been removed
2024-03-22ClientSigner renamed ~> NostrSignerDanConwayDev
to reflect new name in rust-nostr
2024-02-15fix: curate default relaysDanConwayDev
wss://eden.nostr.land is a paid relay wss://nostr.wine is paid relay
2024-02-14feat: get_events coutdown to timeoutDanConwayDev
add a ui feature to countdown to timeout so user doesn't consider exiting early
2024-02-14feat: send to default relays, blast repo eventDanConwayDev
improve the distribution of events by sending to default relays in addition to user and repo relays. for better discoverability of repo events, this is also blasted. a temporary fix to blast everything was removed. the less reliable purplepages.es relay is moved to more_fallback_relays that currently isn't used
2024-02-14feat: improve fetch events reportingDanConwayDev
Improve how progress is reported in the UI when fetching events
2024-01-31test: dont print verbose get_events log for testsDanConwayDev
this temporarily fixes tests that rely on the cli output from fetching events by not printing verbose messages during tests when a better solution is implemented for communicating get_events status, it should be intergrated into the tests
2024-01-31fix: intermittent crashing by removing block_onDanConwayDev
a crashing bug was identifed when users ran ngit with large relay sets. the test suite would also stop at random tests and produce a ...running for over 60 seconds error but only on nix configuration and not when using rustup. this change fixes this so the ngit must have been crashing more often when ran with the reduced resources of a nix shell. the test suite consistantly runs successfully under nix when this change is applied to v0.1.0. later changes were made to mitigate this and other issues as hot fixes which either intentionally broke tests (to rush the change through as a hotfix) or unintentionally in the case of nostr 0.27 upgrade in fc3f22eac2bb81823f170f61ba9d39baff76b933 changes introduced in e0f543e8adb144f6deff6ff7ea0c412c9fcac5b4, specifically queuing up relays, are probably not needed so I have increased the number of relays proccessed at any one time from 5 to 15
2024-01-27fix: stop requesting events from blasterDanConwayDev
hardcoding this relay as we have temporarily added to to all new repo events, it will never return any results and connecting to many relays is causing problems
2024-01-26chore: upgrade rust-nostr v0.27.0v0.1.1DanConwayDev
this is a contribution from jk (sectore) that I rebased and squashed into this commit. the tests were broken in the last few commits to rush out some fixes. this change may introduce more issues because of Relay.respond_standard_req.
2024-01-26fix: fetching messages with many unreliable relaysDanConwayDev
the tool had not been tested with large number of user relays, some of which are misbehaving. It works well when sending events to relays but struggles when fetching messages. it seems to crash when accessing a large number of relays. this change queues up relays so many are not connected to at the same time. it also shows more verbose messages about its connection and success with relays. many of the tests will fail as a result of this change as I havn't updated them to expect details of more relay interaction. further changes are urgently needed to improve the speed of fetching events. - relay interaction UI should reflect the smooth approach used for sending events - we don't need to fetch user events from every relay - we could show the user information that we have already collected and allow them to interact
2024-01-23build: env specific fallback relaysDanConwayDev
to prevent tests from poluting public relays
2023-12-01feat(prs-list) list and pull selected as branchDanConwayDev
- fetch prs and present as a selectable list - create and / or checkout branch for selected pr - apply latest patches as commits
2023-11-01feat(prs-create) send to user relaysDanConwayDev
reuse client across login and send events
2023-11-01refactor(client) simply connect flowDanConwayDev
connect immediately before requesting or sending events no longer waiting for all relays to connect before interacting with any of them
2023-11-01feat(login) fetch from discovered write relaysDanConwayDev
immediately request metadata and relay list from any newly discovered user write relays
2023-10-01feat(login) fetch user relays and metadataDanConwayDev
get user relay list and metadata events from relays when keys are used and last fetch attempt was more than an hour ago uses user's write relays if known, otherwise uses fallback relays to achieve this a method for intergration testing event fetching from relays was added
2023-10-01feat(prs-create) send to multiple relaysDanConwayDev
add tests but these currently don't work when run together
2023-10-01feat(prs-create) send commit to relayDanConwayDev
- add client - use client to send event - add async functionality - enabler for relay interaction whilst getting cli input