Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support supplier functions for input files #421

Merged
merged 5 commits into from
Jun 25, 2023

Conversation

KnorpelSenf
Copy link
Member

Not only allows new InputFile(X) but also new InputFile(() => X).

This is very useful if we need to fetch the data from some place before it can be sent. Currently, API requests cannot be repeated by the auto-retry plugin if they send response streams or file streams. We are effectively limited to the things that InputFile can fetch itself internally. This PQ liberates us from that, so we support arbitrary data sources for retries.

Closes #106.

@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05 🎉

Comparison is base (cc32fe2) 41.73% compared to head (47d35bf) 41.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
+ Coverage   41.73%   41.79%   +0.05%     
==========================================
  Files          17       17              
  Lines        5113     5118       +5     
  Branches      204      205       +1     
==========================================
+ Hits         2134     2139       +5     
  Misses       2977     2977              
  Partials        2        2              
Impacted Files Coverage Δ
src/types.deno.ts 95.50% <100.00%> (+0.26%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@KnorpelSenf KnorpelSenf added this to In progress in Coding via automation May 31, 2023
src/types.node.ts Outdated Show resolved Hide resolved
@KnorpelSenf KnorpelSenf requested a review from rojvv June 1, 2023 20:34
@KnorpelSenf
Copy link
Member Author

I need to add tests

@KnorpelSenf KnorpelSenf marked this pull request as draft June 2, 2023 10:13
@KnorpelSenf KnorpelSenf marked this pull request as ready for review June 12, 2023 12:39
@KnorpelSenf KnorpelSenf merged commit b421084 into main Jun 25, 2023
8 checks passed
@KnorpelSenf KnorpelSenf deleted the input-file-from-func branch June 25, 2023 22:30
KnorpelSenf added a commit to ssistoza/grammY that referenced this pull request Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Coding
In progress
Status: Done
Development

Successfully merging this pull request may close these issues.

feat: InputFile from supplier functions
3 participants