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

Add handshake method to data connectors #406

Merged
merged 1 commit into from Apr 6, 2018

Conversation

Projects
None yet
2 participants
@eduardoboucas
Copy link
Member

eduardoboucas commented Apr 6, 2018

This PR adds a check for a function named handshake in the data connector modules. If present, it will be called to obtain an object with information from the data connector, more precisely an object with the following properties:

  • minimumApiVersion: The minimum version of API required by the data connector
  • version: The version of the data connector module

Given these two values, an error is thrown in one of two situations:

  • The current version of API is lower than the one specified by the data connector
  • The current version of API requires a version of that particular data connector that is greater than the one being used

For the latter to work, API stores in package.json a list of minimum version requirements for the various data connectors, as following:

"dataConnectorDependencies": {
  "@dadi/api-mongodb": "4.1.0"
}

@eduardoboucas eduardoboucas requested a review from jimlambie Apr 6, 2018

@eduardoboucas eduardoboucas changed the title Add handshake method to data connectors Add :handshake: method to data connectors Apr 6, 2018

@eduardoboucas eduardoboucas changed the title Add :handshake: method to data connectors Add handshake method to data connectors Apr 6, 2018

@jimlambie
Copy link
Member

jimlambie left a comment

🤝

@eduardoboucas eduardoboucas merged commit f6d5663 into develop Apr 6, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
security/snyk No new issues
Details

@eduardoboucas eduardoboucas deleted the feature/data-connector-handshake branch Apr 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment