superfaceai / one-sdk-js

1️⃣ One Node.js SDK for all the APIs you want to integrate with
https://superface.ai
MIT License
46 stars 3 forks source link

Chore/resolve map and provider #285

Closed Jakub-Vacek closed 1 year ago

Jakub-Vacek commented 2 years ago

Description

This PR refactors local map and provider resolution. It removes overly complicated resolveValue function and it introduces separate functions for local map and provider resolution. It also improves validation of loaded files.

This should NOT be braking change. But in cases of poorly configured SDK this change may lead to throwing valid errors (we are checking that eg. profile id in map ast matches profile id in super.json)

This PR is ready we just need to decide if this is shippable under minor change.

fixes: https://github.com/superfaceai/one-sdk-js/issues/279

Motivation and Context

Types of changes

Checklist:

Jakub-Vacek commented 1 year ago

@freaz @TheEdward162 what do you think about this PR. Are we able to merge it in this cycle?