Skip to content

Commit

Permalink
Merge pull request #254 from mean-expert-official/development
Browse files Browse the repository at this point in the history
Release 2.1.0-rc.4 🚀
  • Loading branch information
jonathan-casarrubias authored Dec 13, 2016
2 parents ec75d24 + c2f5456 commit 35992e8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@

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`.

## Release 2.1.0-rc.4

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

- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/253
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/252

## Release 2.1.0-rc.3

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

- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/243
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/249
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/250
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/240
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/237
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/246
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/236

## Release 2.1.0-rc.2

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

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

## Release 2.1.0-rc.1

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

- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/232
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/231
Expand Down
2 changes: 1 addition & 1 deletion lib/angular2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,13 @@ module.exports = function generate(ctx) {
{ module: 'LoopBackFilter, AccessToken', from: '../../models/BaseModels'},
{ module: 'SDKModels', from: '../custom/SDKModels'},
{ module: 'Observable', from: 'rxjs/Observable' },
{ module: 'Subject', from: 'rxjs/Subject' },
{ module: 'ErrorObservable', from: 'rxjs/observable/ErrorObservable' },
{ module: 'rxjs/add/operator/catch' },
{ module: 'rxjs/add/operator/map' },
];

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

Expand Down
4 changes: 2 additions & 2 deletions lib/angular2/shared/services/core/base.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
declare var EventSource: any;
/**
* @module BaseLoopBackApi
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
* @author Nikolay Matiushenkov <https://github.com/mnvx>
* @contributor Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
* @license MIT
* @description
* Abstract class that will be implemented in every custom service automatically built
Expand Down Expand Up @@ -322,7 +322,7 @@ export abstract class BaseLoopBackApi {
LoopBackConfig.getApiVersion(),
this.model.getModelDefinition().plural,
':id', 'replace'
].join('/'), undefined, undefined, { data }).map((data: T) => this.model.factory(data));
].join('/'), { id }, undefined, { data }).map((data: T) => this.model.factory(data));
}
/**
* @method createChangeStream
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mean-expert/loopback-sdk-builder",
"version": "2.1.0-rc.3",
"version": "2.1.0-rc.4",
"description": "Tool for auto-generating Software Development Kits (SDKs) for LoopBack",
"bin": {
"lb-sdk": "bin/lb-sdk"
Expand Down
18 changes: 9 additions & 9 deletions tests/angular2/src/app/shared/sdk/services/core/base.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { LoopBackConfig } from '../../lb.config';
import { LoopBackFilter, AccessToken } from '../../models/BaseModels';
import { SDKModels } from '../custom/SDKModels';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import { Subject } from 'rxjs/Subject';
import { SocketConnections } from '../../sockets/socket.connections';
// Making Sure EventSource Type is available to avoid compilation issues.
declare var EventSource: any;
/**
* @module BaseLoopBackApi
* @author Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
* @author Nikolay Matiushenkov <https://github.com/mnvx>
* @contributor Jonathan Casarrubias <@johncasarrubias> <github:jonathan-casarrubias>
* @license MIT
* @description
* Abstract class that will be implemented in every custom service automatically built
Expand Down Expand Up @@ -133,7 +133,7 @@ export abstract class BaseLoopBackApi {
* @description
* Generic create method
*/
public create<T>(data: any = {}): Observable<T> {
public create<T>(data: T): Observable<T> {
return this.request('POST', [
LoopBackConfig.getPath(),
LoopBackConfig.getApiVersion(),
Expand All @@ -147,7 +147,7 @@ export abstract class BaseLoopBackApi {
* @description
* Generic create method
*/
public createMany<T>(data: any = {}): Observable<T[]> {
public createMany<T>(data: T[]): Observable<T[]> {
return this.request('POST', [
LoopBackConfig.getPath(),
LoopBackConfig.getApiVersion(),
Expand Down Expand Up @@ -289,7 +289,7 @@ export abstract class BaseLoopBackApi {
* @description
* Generic upsert method
*/
public upsert<T>(data: any = {}): Observable<T> {
public upsert<T>(data: T): Observable<T> {
return this.request('PUT', [
LoopBackConfig.getPath(),
LoopBackConfig.getApiVersion(),
Expand All @@ -303,7 +303,7 @@ export abstract class BaseLoopBackApi {
* @description
* Generic upsertWithWhere method
*/
public upsertWithWhere<T>(where: any = {}, data: any = {}): Observable<T> {
public upsertWithWhere<T>(where: any = {}, data: T): Observable<T> {
let _urlParams: any = {};
if (where) _urlParams.where = where;
return this.request('PUT', [
Expand All @@ -320,7 +320,7 @@ export abstract class BaseLoopBackApi {
* @description
* Generic replaceOrCreate method
*/
public replaceOrCreate<T>(data: any = {}): Observable<T> {
public replaceOrCreate<T>(data: T): Observable<T> {
return this.request('PUT', [
LoopBackConfig.getPath(),
LoopBackConfig.getApiVersion(),
Expand All @@ -335,13 +335,13 @@ export abstract class BaseLoopBackApi {
* @description
* Generic replaceById method
*/
public replaceById<T>(id: any, data: any = {}): Observable<T> {
public replaceById<T>(id: any, data: T): Observable<T> {
return this.request('POST', [
LoopBackConfig.getPath(),
LoopBackConfig.getApiVersion(),
this.model.getModelDefinition().plural,
':id', 'replace'
].join('/'), undefined, undefined, { data }).map((data: T) => this.model.factory(data));
].join('/'), { id }, undefined, { data }).map((data: T) => this.model.factory(data));
}
/**
* @method createChangeStream
Expand Down

0 comments on commit 35992e8

Please sign in to comment.