-
Notifications
You must be signed in to change notification settings - Fork 17
Release 6.0.0-beta-6 #363
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
Merged
Merged
Release 6.0.0-beta-6 #363
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix #343 unhandled rejection on connect retry.
Change parameters order for collection:create to put optional param in last position
Update webpack build config to fix undefined protocol classes in raw web usage : change webpack entrypoint to include all classes rename library name to avoid Kuzzle.Kuzzle ... add BUILT global constant to avoid exception when used in raw web everything remains unchanged for use with Webpack and NodeJS
The host param is now mandatory for protocols. The new constructor signature include mandatory host param and optional options param.
Adds a `useController` method to the Kuzzle object to use custom defined controllers. This allows to call plugin routes from the SDK without using the `query` method. If I have a plugin with the following action: ``` this.controllers = { test: { sayHello: 'sayHello' } }; this.routes = [ { verb: 'get', url: '/test/sayHello', controller: 'test', action: 'sayHello' } ]; async sayHello (request) { const message = request.input.args.message || request.input.body.message; return message; } ``` Then I can define the following custom controller and use it in the SDK: ``` class TestController extends BaseController { constructor (accessor) { super('ctoi-le-plugin/test', accessor); } sayHello (message, options) { const request = { action: 'sayHello', body: { message } }; return this.query(request, options) .then(response => response.result); } } const kuzzle = new Kuzzle(new WebSocket('localhost')); kuzzle.useController(new TestController('test')) console.log(await kuzzle.test.sayHello('Hello moto')) ```
Co-Authored-By: scottinet <[email protected]>
React native compatibility
Fixes a call to `checkToken` upon reconnection to Kuzzle. The previous version was surely a copy/paste error based on v5.
Fix #343 unhandled rejection on connect retry.
Change parameters order for collection:create to put optional param in last position
Update webpack build config to fix undefined protocol classes in raw web usage : change webpack entrypoint to include all classes rename library name to avoid Kuzzle.Kuzzle ... add BUILT global constant to avoid exception when used in raw web everything remains unchanged for use with Webpack and NodeJS
The host param is now mandatory for protocols. The new constructor signature include mandatory host param and optional options param.
Adds a `useController` method to the Kuzzle object to use custom defined controllers. This allows to call plugin routes from the SDK without using the `query` method. If I have a plugin with the following action: ``` this.controllers = { test: { sayHello: 'sayHello' } }; this.routes = [ { verb: 'get', url: '/test/sayHello', controller: 'test', action: 'sayHello' } ]; async sayHello (request) { const message = request.input.args.message || request.input.body.message; return message; } ``` Then I can define the following custom controller and use it in the SDK: ``` class TestController extends BaseController { constructor (accessor) { super('ctoi-le-plugin/test', accessor); } sayHello (message, options) { const request = { action: 'sayHello', body: { message } }; return this.query(request, options) .then(response => response.result); } } const kuzzle = new Kuzzle(new WebSocket('localhost')); kuzzle.useController(new TestController('test')) console.log(await kuzzle.test.sayHello('Hello moto')) ```
Co-Authored-By: scottinet <[email protected]>
Fixes a call to `checkToken` upon reconnection to Kuzzle. The previous version was surely a copy/paste error based on v5.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
6.0.0-beta-6 (2019-01-17)
Bug fixes