Skip to content

Commit 35992e8

Browse files
Merge pull request #254 from mean-expert-official/development
Release 2.1.0-rc.4 🚀
2 parents ec75d24 + c2f5456 commit 35992e8

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

CHANGELOG.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,34 @@
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-rc.4
6+
7+
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/26?closed=1
8+
9+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/253
10+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/252
11+
512
## Release 2.1.0-rc.3
613

7-
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/25
14+
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/25?closed=1
815

916
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/243
1017
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/249
1118
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/250
1219
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/240
1320
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/237
1421
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/246
22+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/236
1523

1624
## Release 2.1.0-rc.2
1725

18-
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/24
26+
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/24?closed=1
1927

2028
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/233
2129

2230
## Release 2.1.0-rc.1
2331

24-
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/21
32+
- Milestone Details: https://github.com/mean-expert-official/loopback-sdk-builder/milestone/21?closed=1
2533

2634
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/232
2735
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/231

lib/angular2/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,13 @@ module.exports = function generate(ctx) {
597597
{ module: 'LoopBackFilter, AccessToken', from: '../../models/BaseModels'},
598598
{ module: 'SDKModels', from: '../custom/SDKModels'},
599599
{ module: 'Observable', from: 'rxjs/Observable' },
600+
{ module: 'Subject', from: 'rxjs/Subject' },
600601
{ module: 'ErrorObservable', from: 'rxjs/observable/ErrorObservable' },
601602
{ module: 'rxjs/add/operator/catch' },
602603
{ module: 'rxjs/add/operator/map' },
603604
];
604605

605606
if (isIo === 'enabled') {
606-
imports.push({ module: 'Subject', from: 'rxjs/Subject'});
607607
imports.push({ module: 'SocketConnections', from: '../../sockets/socket.connections'});
608608
}
609609

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
declare var EventSource: any;
55
/**
66
* @module BaseLoopBackApi
7+
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
78
* @author Nikolay Matiushenkov <https://github.com/mnvx>
8-
* @contributor Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
99
* @license MIT
1010
* @description
1111
* Abstract class that will be implemented in every custom service automatically built
@@ -322,7 +322,7 @@ export abstract class BaseLoopBackApi {
322322
LoopBackConfig.getApiVersion(),
323323
this.model.getModelDefinition().plural,
324324
':id', 'replace'
325-
].join('/'), undefined, undefined, { data }).map((data: T) => this.model.factory(data));
325+
].join('/'), { id }, undefined, { data }).map((data: T) => this.model.factory(data));
326326
}
327327
/**
328328
* @method createChangeStream

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.3",
3+
"version": "2.1.0-rc.4",
44
"description": "Tool for auto-generating Software Development Kits (SDKs) for LoopBack",
55
"bin": {
66
"lb-sdk": "bin/lb-sdk"

tests/angular2/src/app/shared/sdk/services/core/base.service.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ import { LoopBackConfig } from '../../lb.config';
99
import { LoopBackFilter, AccessToken } from '../../models/BaseModels';
1010
import { SDKModels } from '../custom/SDKModels';
1111
import { Observable } from 'rxjs/Observable';
12+
import { Subject } from 'rxjs/Subject';
1213
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
1314
import 'rxjs/add/operator/catch';
1415
import 'rxjs/add/operator/map';
15-
import { Subject } from 'rxjs/Subject';
1616
import { SocketConnections } from '../../sockets/socket.connections';
1717
// Making Sure EventSource Type is available to avoid compilation issues.
1818
declare var EventSource: any;
1919
/**
2020
* @module BaseLoopBackApi
21+
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
2122
* @author Nikolay Matiushenkov <https://github.com/mnvx>
22-
* @contributor Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
2323
* @license MIT
2424
* @description
2525
* Abstract class that will be implemented in every custom service automatically built
@@ -133,7 +133,7 @@ export abstract class BaseLoopBackApi {
133133
* @description
134134
* Generic create method
135135
*/
136-
public create<T>(data: any = {}): Observable<T> {
136+
public create<T>(data: T): Observable<T> {
137137
return this.request('POST', [
138138
LoopBackConfig.getPath(),
139139
LoopBackConfig.getApiVersion(),
@@ -147,7 +147,7 @@ export abstract class BaseLoopBackApi {
147147
* @description
148148
* Generic create method
149149
*/
150-
public createMany<T>(data: any = {}): Observable<T[]> {
150+
public createMany<T>(data: T[]): Observable<T[]> {
151151
return this.request('POST', [
152152
LoopBackConfig.getPath(),
153153
LoopBackConfig.getApiVersion(),
@@ -289,7 +289,7 @@ export abstract class BaseLoopBackApi {
289289
* @description
290290
* Generic upsert method
291291
*/
292-
public upsert<T>(data: any = {}): Observable<T> {
292+
public upsert<T>(data: T): Observable<T> {
293293
return this.request('PUT', [
294294
LoopBackConfig.getPath(),
295295
LoopBackConfig.getApiVersion(),
@@ -303,7 +303,7 @@ export abstract class BaseLoopBackApi {
303303
* @description
304304
* Generic upsertWithWhere method
305305
*/
306-
public upsertWithWhere<T>(where: any = {}, data: any = {}): Observable<T> {
306+
public upsertWithWhere<T>(where: any = {}, data: T): Observable<T> {
307307
let _urlParams: any = {};
308308
if (where) _urlParams.where = where;
309309
return this.request('PUT', [
@@ -320,7 +320,7 @@ export abstract class BaseLoopBackApi {
320320
* @description
321321
* Generic replaceOrCreate method
322322
*/
323-
public replaceOrCreate<T>(data: any = {}): Observable<T> {
323+
public replaceOrCreate<T>(data: T): Observable<T> {
324324
return this.request('PUT', [
325325
LoopBackConfig.getPath(),
326326
LoopBackConfig.getApiVersion(),
@@ -335,13 +335,13 @@ export abstract class BaseLoopBackApi {
335335
* @description
336336
* Generic replaceById method
337337
*/
338-
public replaceById<T>(id: any, data: any = {}): Observable<T> {
338+
public replaceById<T>(id: any, data: T): Observable<T> {
339339
return this.request('POST', [
340340
LoopBackConfig.getPath(),
341341
LoopBackConfig.getApiVersion(),
342342
this.model.getModelDefinition().plural,
343343
':id', 'replace'
344-
].join('/'), undefined, undefined, { data }).map((data: T) => this.model.factory(data));
344+
].join('/'), { id }, undefined, { data }).map((data: T) => this.model.factory(data));
345345
}
346346
/**
347347
* @method createChangeStream

0 commit comments

Comments
 (0)