Skip to content

Commit 811bded

Browse files
Merge pull request #234 from mean-expert-official/development
Release 2.1.0-rc.2
2 parents e8f2817 + e127017 commit 811bded

File tree

16 files changed

+28
-39
lines changed

16 files changed

+28
-39
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
This file is created to keep history of the LoopBack SDK Builder, it does not consider or keeps any history of its parent module `loopback-sdk-angular`.
44

5-
## Release 2.1.0-rc1
5+
## Release 2.1.0-rc.2
6+
7+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/233
8+
9+
## Release 2.1.0-rc.1
610

711
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/232
812
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/231
@@ -22,6 +26,7 @@ This file is created to keep history of the LoopBack SDK Builder, it does not co
2226
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/204
2327
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/203
2428
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/202
29+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/211
2530

2631
## Release 2.1.0-beta.17
2732

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All Rights Reserved
55

66
MEAN Expert, LoopBack SDK Builder, SDK Builder Mascot and The FireLoop.io name and Logos are protected by copyright and distributed under licenses restricting copying, distribution and decompilation.
77

8-
#Software MTI License
8+
#Software MIT License
99
Copyright (c) 2016 MEAN Expert - Jonathan Casarrubias <@johncasarrubias>
1010

1111
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

lib/angular2/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @module Angular 2 Generator for loopback-sdk-builder
33
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
4-
* @license MTI
4+
* @license MIT
55
* @description
66
* Defines a SDK Schema and builds according configuration
77
*/
@@ -758,7 +758,7 @@ module.exports = function generate(ctx) {
758758
}
759759
/**
760760
* @author João Ribeiro <[email protected], http://jonnybgod.ghost.io>,
761-
* @license MTI
761+
* @license MIT
762762
* @method buildPropertyType
763763
* @description
764764
* Define which properties should be passed as route params

lib/angular2/shared/models/flref.ejs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { LoopBackFilter, StatFilter } from './index';
1212
**/
1313
export class FireLoopRef<T> {
1414
// Reference ID
15-
private id: number = Date.now() + this.buildId();
15+
private id: number = this.buildId();
1616
// Model Instance (For child references, empty on root references)
1717
private instance: any;
1818
// Model Childs
@@ -97,7 +97,6 @@ export class FireLoopRef<T> {
9797
} else {
9898
return this.broadcasts(event, request);
9999
}
100-
101100
}
102101
/**
103102
* @method stats
@@ -108,14 +107,7 @@ export class FireLoopRef<T> {
108107
* TIP: You can improve performance by adding memcached to LoopBack models.
109108
**/
110109
public stats(filter?: StatFilter): Observable<T | T[]> {
111-
let event = `${this.model.getModelName()}.stats`;
112-
let src_pull: Observable<T> = this.pull(event, filter);
113-
// Listen for broadcast announces
114-
let src_request: Observable<T> = Observable.fromEvent<T>(this.socket, `${event}.broadcast.announce`);
115-
src_request.subscribe((res: T) => this.socket.emit(`${event}.broadcast.request`, filter));
116-
// Listen for broadcasted results
117-
let src_broadcast: Observable<T> = Observable.fromEvent<T>(this.socket, `${event}.broadcast`);
118-
return Observable.merge(src_pull, src_broadcast);
110+
return this.on('stats', filter);
119111
}
120112
/**
121113
* @method make
@@ -167,7 +159,7 @@ export class FireLoopRef<T> {
167159
let that: FireLoopRef<T> = this;
168160
let nowEvent: any = `${event}.pull.requested.${ this.id }`;
169161
this.socket.emit(`${event}.pull.request.${ this.id }`, request);
170-
function pullNow(data) {
162+
function pullNow(data: any) {
171163
that.socket.removeListener(nowEvent, pullNow);
172164
sbj.next(data);
173165
};
@@ -221,7 +213,7 @@ export class FireLoopRef<T> {
221213
* multiple references for the same model or relationships.
222214
**/
223215
private buildId(): number {
224-
return Math.floor(Math.random() * 100800) *
216+
return Date.now() + Math.floor(Math.random() * 100800) *
225217
Math.floor(Math.random() * 100700) *
226218
Math.floor(Math.random() * 198500);
227219
}

lib/angular2/shared/services/core/auth.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SDKToken, AccessToken } from '../../models/BaseModels';
77
/**
88
* @module LoopBackAuth
99
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
10-
* @license MTI
10+
* @license MIT
1111
* @description
1212
* Provides with a LoopBack compatible authentication mechanism.
1313
*/

lib/angular2/shared/services/core/base.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare var EventSource: any;
2020
* @module BaseLoopBackApi
2121
* @author Nikolay Matiushenkov <https://github.com/mnvx>
2222
* @contributor Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
23-
* @license MTI
23+
* @license MIT
2424
* @description
2525
* Abstract class that will be implemented in every custom service automatically built
2626
* by the sdk builder.

lib/angular2/shared/services/core/logger.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { LoopBackConfig } from '../../lb.config';
44
/**
55
* @author Jonathan Casarrubias <twitter:@johncasarrubias> <github:@johncasarrubias>
66
* @module LoggerService
7-
* @license MTI
7+
* @license MIT
88
* @description
99
* Console Log wrapper that can be disabled in production mode
1010
**/

lib/angular2/shared/services/core/search.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { URLSearchParams } from '@angular/http';
44
/**
55
* @author Jonathan Casarrubias <twitter:@johncasarrubias> <github:@johncasarrubias>
66
* @module JSONSearchParams
7-
* @license MTI
7+
* @license MIT
88
* @description
99
* JSON Parser and Wrapper for the Angular2 URLSearchParams
1010
* This module correctly encodes a json object into a query string and then creates

lib/angular2/shared/sockets/connections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AccessToken } from '../models';
55
/**
66
* @author Jonathan Casarrubias <twitter:@johncasarrubias> <github:@johncasarrubias>
77
* @module SocketConnections
8-
* @license MTI
8+
* @license MIT
99
* @description
1010
* This module handle socket connections and return singleton instances for each
1111
* connection, it will use the SDK Socket Driver Available currently supporting

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mean-expert/loopback-sdk-builder",
3-
"version": "2.1.0-rc.1",
3+
"version": "2.1.0-rc.2",
44
"description": "Tool for auto-generating Software Development Kits (SDKs) for LoopBack",
55
"bin": {
66
"lb-sdk": "bin/lb-sdk"

0 commit comments

Comments
 (0)