[x] Added tests for code changes or test/build only changes
[x] Updated the change log file (CHANGES.md|CHANGELOG.md) or test/build only changes
[x] Completed the PR template below:
Description
Fixes #407
Approach
Expose BasePlugin on the Cloudant factory method so that it can be imported directly from @cloudant/cloudant.
This means that custom plugin authors do not need to require @cloudant/cloudant/plugins/base.
Schema & API Changes
BasePlugin is now part of the public API, e.g.
const Cloudant = require('@cloudant/cloudant');
// Cloudant.BasePlugin is now exported meaning that
// BasePlugin is part of the public API
class MyPlugin extends Cloudant.BasePlugin {
...
}
const cloudant = Cloudant({ ..., plugins: [MyPlugin] });
TypeScript types also updated to reflect this and types for BasePlugin have been added so that plugin authors can more easily implement plugins in TypeScript.
Checklist
CHANGES.md
|CHANGELOG.md
) or test/build only changesDescription
Fixes #407
Approach
Expose
BasePlugin
on theCloudant
factory method so that it can be imported directly from@cloudant/cloudant
.This means that custom plugin authors do not need to require
@cloudant/cloudant/plugins/base
.Schema & API Changes
BasePlugin
is now part of the public API, e.g.TypeScript types also updated to reflect this and types for
BasePlugin
have been added so that plugin authors can more easily implement plugins in TypeScript.Security and Privacy
No change
Testing
Modified existing test for TypeScript types.
Monitoring and Logging
No change