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: add support for async based resource operation handlers #523

Merged
merged 8 commits into from
Aug 20, 2024

Commits on Aug 18, 2024

  1. ref: remove unnecessary serviceMeta in middleware

    The callback passed to .end method receives 3 arguments: err, data and
    meta. Therefore, we don't need to capture meta in the serviceMeta
    array as we used to do.
    pablopalacios committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    aa37564 View commit details
    Browse the repository at this point in the history
  2. ref: prepare _executePromise to handle async resource handlers

    - Remove unnecessary setImmediate (since we started using promises, we
    are not blocking the main thread anymore).
    
    - Move _executeRequest to Request class (since it operates quite
    heavily on the request object).
    
    - _executeRequest always resolves now. The resolved object contains an
    err, data and meta properties. This change allows us to simplify .end
    and ._captureMetaAndStats methods.
    
    - _captureMetaAndStats is simpler now, it takes the err and meta
    object directly so we don't need to guess if they exist or not.
    pablopalacios committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    383e0ad View commit details
    Browse the repository at this point in the history
  3. feat: add support for async based resource handlers

    With this change, it's now possible to use fetchr fully
    callbackless. If any resource handler is defined with one or less
    arguments, we expect this resource to be async and we pass all the
    arguments in just one object to it (which also simplifies the
    signature of the handlers).
    pablopalacios committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    8938b74 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8452a65 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a344f45 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d24c425 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8e62470 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Update README.md

    redonkulus authored Aug 19, 2024
    Configuration menu
    Copy the full SHA
    6a0d88e View commit details
    Browse the repository at this point in the history