Open mikenikles opened 1 year ago
Thank you for submitting a PR! Sounds like a great addition, I'll review it asap.
Sorry for the late reply, I wanted to finish the ts migration before reviewing the PR.
In order to support the events, we need to have them for the following operations:
If we are implementing an event for ignored objects, it needs to be emitted in:
isIncluded
getter from SyncObject can be used for this.We should probably change the naming a bit to avoid possible confusion between global transfer events and object events (e.g. start
: objectStart
)
Implementation is not hard from a technical perspective, but changes happen in a lot of commands. If you are still up to work on this that's great, else I can make the changes, let me know :).
Thanks!
No problem, I just caught up on the changes you've made and am excited to give the newest version a go! Looking at your detailed explanation, I believe you'd be much quicker to apply these changes given your familiarity with the code.
Having said that, do let me know when you have it ready for testing and I can test it. Your library is a core piece to how the https://indexed.xyz CLI works, so thank you for keeping it maintained 😍!
Relates to #39.
This PR emits the following events:
start
: When the download process for an object starts.done
: When an object has been synced downloaded.error
: When an error occurred.Each event payload contains an object with:
filePath
: The path of the processed file.error
: An Error in case of theerror
event.Note: #39 also asks for
ignore
events. This PR does not include that. Happy to add that, but I would need some pointers as to where the best place for that is.