Skip to content

Commit

Permalink
Release 1.0.0-alpha.25 🚀
Browse files Browse the repository at this point in the history
- Implemented Metadata Passing to RPC and Streams
  • Loading branch information
Jonathan committed May 6, 2018
1 parent d1eb830 commit cc30caa
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ documentation
dist
dist6
package-lock.json
sdk:storage
sdk:storage
.test
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onixjs/core",
"version": "1.0.0-alpha.24",
"version": "1.0.0-alpha.25",
"description": "An Enterprise Grade NodeJS Platform that implements Industry Standards and Patterns in order to provide Connectivity, Stability, High-Availability and High-Performance.",
"main": "dist/src/index.js",
"scripts": {
Expand Down Expand Up @@ -49,8 +49,7 @@
},
"dependencies": {
"@onixjs/enumerable": "1.0.0-alpha.7",
"@onixjs/sdk": "^1.0.0-alpha.8",
"@types/uws": "^0.13.2",
"@onixjs/sdk": "^1.0.0-alpha.13.1",
"finalhandler": "^1.1.1",
"reflect-metadata": "^0.1.12",
"router": "^1.3.2",
Expand All @@ -61,6 +60,7 @@
"@types/mongoose": "^5.0.2",
"@types/node": "^9.4.6",
"@types/send": "^0.14.4",
"@types/uws": "^0.13.2",
"ava": "^0.25.0",
"coveralls": "^3.0.0",
"dot": "^1.1.2",
Expand Down
7 changes: 6 additions & 1 deletion src/core/call.responser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,19 @@ export class CallResponser {
? await method.call(
scope,
operation.message.request.payload,
operation.message.request.metadata,
)
: null;
},
);
} else {
// Else just call the requested method now.
return method
? await method.call(scope, operation.message.request.payload)
? await method.call(
scope,
operation.message.request.payload,
operation.message.request.metadata,
)
: null;
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/core/call.streamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class CallStreamer {
? method.call(
scope,
data => handler(slaveSubHandler(masterSubHandler(data))),
operation.message.request.payload,
operation.message.request.metadata,
)
: null;
},
Expand All @@ -128,7 +128,7 @@ export class CallStreamer {
? method.call(
scope,
data => handler(masterSubHandler(data)),
operation.message.request.payload,
operation.message.request.metadata,
)
: null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class OnixJS {
* @description Current Onix Version.
*/
get version(): string {
return '1.0.0-alpha.24';
return '1.0.0-alpha.25';
}
/**
* @property router
Expand Down
2 changes: 1 addition & 1 deletion test/onixjs.acceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ test('Onix rpc component stream', async t => {
// Init SDK
await client.init();
// Create a TodoApp Reference
const TodoAppRef: AppReference | Error = client.AppReference('TodoApp');
const TodoAppRef: AppReference | Error = await client.AppReference('TodoApp');
// Verify we actually got a Reference and not an Error
if (TodoAppRef instanceof AppReference) {
const componentRef: ComponentReference = TodoAppRef.Module(
Expand Down
2 changes: 1 addition & 1 deletion test/onixjs.core.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {CallResponser} from '../src/core/call.responser';
import * as WebSocket from 'uws';
import * as dot from 'dot';
import {CallStreamer} from '../src/core/call.streamer';
import {NodeJS} from '@onixjs/sdk/dist/core/node.adapters';
import {NodeJS} from '@onixjs/sdk/dist/adapters/node.adapters';
import {Utils} from '@onixjs/sdk/dist/utils';
import {Mongoose, Schema} from 'mongoose';
import {GroupMatch} from '../src/core/acl.group.match';
Expand Down

0 comments on commit cc30caa

Please sign in to comment.