Skip to content

Commit a6ecd9d

Browse files
author
Jonathan Casarrubias
committed
Release 2.1.0-beta.1 🚀
- Fix: #127 - Fix: #124 - Fix: #122 - Fix: #112 - Fix: #31
1 parent 8609c7e commit a6ecd9d

70 files changed

Lines changed: 1039 additions & 380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"typescript.tsdk": "node_modules/typescript/lib"
4+
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
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-beta.1
6+
7+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/127
8+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/124
9+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/122
10+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/112
11+
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/31
12+
513
## Release 2.0.10
614

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

LICENSE.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
Copyright (c) 2016 Jonathan Casarrubias <@johncasarrubias>
1+
#Art and Graphics License
2+
Copyright (c) 2016 MEAN Expert - Jonathan Casarrubias <@johncasarrubias>
3+
4+
All Rights Reserved
5+
6+
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.
7+
8+
#Software MTI License
9+
Copyright (c) 2016 MEAN Expert - Jonathan Casarrubias <@johncasarrubias>
210

311
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:
412

513
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
614

715
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
816

9-
[MIT License](http://opensource.org/licenses/MIT)
17+
[MIT License](http://opensource.org/licenses/MIT)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ $ npm install --save-dev @mean-expert/loopback-sdk-builder
2222

2323
[LINK TO FEATURES](https://github.com/mean-expert-official/loopback-sdk-builder/wiki#features)
2424

25+
# FireLoop API (NEW)
26+
27+
Are you willing to build pure and modern Real-Time applications?? Then [CHECK THIS OUT](https://github.com/mean-expert-official/loopback-sdk-builder/wiki/8.-(NEW)-FireLoop-API)
28+
29+
![FireLoop.io](https://storage.googleapis.com/mean-expert-images/fireloop-logo.png)
30+
31+
2532
# Contact
2633

2734
Discuss features and ask questions on [@johncasarrubias at Twitter](https://twitter.com/johncasarrubias).
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* tslint:disable */
2-
var SocketIO = require('nativescript-socket.io');
2+
var SocketIO = require('nativescript-socketio');
33
export class SocketDriver {
44
static connect(url: any, options: any) {
5-
return SocketIO.connect(url, options);
5+
let socketIO: any = new SocketIO(url, options)
6+
socketIO.connect();
7+
return socketIO;
68
}
79
}

lib/angular2/index.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ module.exports = function generate(ctx) {
5959
buildModuleImports: buildModuleImports
6060
}
6161
},
62-
{
63-
template: './shared/sdk.module.ejs',
64-
output: '/sdk.module.ts',
65-
params: {
66-
isIo: ctx.isIo,
67-
models: ctx.models,
68-
buildModuleImports: buildModuleImports
69-
}
70-
},
7162
{
7263
template: './shared/models/index.ejs',
7364
output: '/models/index.ts',
@@ -88,6 +79,21 @@ module.exports = function generate(ctx) {
8879
output: '/services/core/index.ts',
8980
params: {}
9081
},
82+
{
83+
template: './shared/services/core/io.ejs',
84+
output: '/services/core/io.service.ts',
85+
params: {}
86+
},
87+
{
88+
template: './shared/services/core/realtime.ejs',
89+
output: '/services/core/real.time.ts',
90+
params: {}
91+
},
92+
{
93+
template: './shared/services/core/fireloop.ejs',
94+
output: '/services/core/fireloop.ts',
95+
params: {}
96+
},
9197
/**
9298
* SDK CONFIG
9399
*/
@@ -345,6 +351,7 @@ module.exports = function generate(ctx) {
345351
let imports = [
346352
{ module: 'JSONSearchParams', from: './services/core/search.params'},
347353
{ module: 'ErrorHandler', from: './services/core/error.service'},
354+
{ module: 'RealTime', from: './services/core/real.time'},
348355
{ module: 'LoopBackAuth', from: './services/core/auth.service'},
349356
{ module: 'LoggerService', from: './services/custom/logger.service'},
350357
];

lib/angular2/shared/index.ejs

Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,69 @@
11
/**
2-
* @module SDK Index
2+
* @module SDKModule
33
* @author Jonathan Casarrubias <t:@johncasarrubias> <gh:jonathan-casarrubias>
44
* @license MTI 2016 Jonathan Casarrubias
55
* @description
6-
* The SDK Index is automatically built by the LoopBack SDK Builder.
6+
* The SDKModule is a generated Software Development Kit automatically built by
7+
* the LoopBack SDK Builder open source module.
78
*
8-
* The SDK Index will temporally keep providing access to everything in the SDK
9-
* including services. This is because will maintain backwards compatibility for those
10-
* Applications below Angular 2 RC 5 version that does not support NgModule just yet.
9+
* The SDKModule provides Angular 2 >= RC.5 support, which means that NgModules
10+
* can import this Software Development Kit as follows:
1111
*
12-
* IMPORTANT NOTE:
1312
*
14-
* If your application is equal or above RC 5 It is recommended to import the SDK
15-
* Module located in ./sdk.module.ts and follow the instructions.
13+
* APP Route Module Context
14+
* ============================================================================
15+
* import { NgModule } from '@angular/core';
16+
* import { BrowserModule } from '@angular/platform-browser';
17+
* // App Root
18+
* import { AppComponent } from './app.component';
19+
* // Feature Modules
20+
* import { SDKModule } from './shared/sdk/sdk.module';
21+
* // Import Routing
22+
* import { routing } from './app.routing';
23+
* @NgModule({
24+
* imports: [
25+
* BrowserModule,
26+
* routing,
27+
* SDKModule.forRoot()
28+
* ],
29+
* declarations: [ AppComponent ],
30+
* bootstrap: [ AppComponent ]
31+
* })
32+
* export class AppModule { }
1633
*
17-
* Also, It is recommended for you to start upgrading your application in order to
18-
* support NgModules before backwards support is also dropped by Angular.
19-
*
20-
* READ: https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html#!#5-cleanup
21-
**/
22-
<%- buildModuleImports(models, true) %>
23-
/**
24-
* IMPORTANT: API_PROVIDERS WILL BE DEPRECATED WHEN ANGULAR 2 IS STABLE
25-
* PLEASE MIGRATE YOUR PROJECT AS SOON AS POSSIBLE.
26-
* ONCE ANGULAR 2 IS STABLE I WON'T KEEP SUPPORTING API PROVIDERS.
27-
* USER NGMODULE INSTEAD LOCATED IN ./sdk.module.ts
2834
**/
29-
export const API_PROVIDERS: any[] = [
30-
LoopBackAuth,
31-
ErrorHandler,
32-
LoggerService,
33-
JSONSearchParams,<%
34-
Object.keys(models).forEach(function(modelName, i, arr) {
35-
modelName = modelName[0].toUpperCase() + modelName.slice(1);
36-
%>
37-
<%- modelName %>Api<%= i < arr.length -1 ? ',' : '' %><%
38-
});%>
39-
];
35+
<%- buildModuleImports(models, false) %>
36+
37+
@NgModule({
38+
imports: [ CommonModule, HttpModule ],
39+
declarations: [ ],
40+
exports: [ ],
41+
providers: [ ]
42+
})
43+
44+
export class SDKModule {
45+
static forRoot(): ModuleWithProviders {
46+
return {
47+
ngModule: SDKModule,
48+
providers: [
49+
RealTime,
50+
LoopBackAuth,
51+
ErrorHandler,
52+
LoggerService,
53+
JSONSearchParams,<%
54+
Object.keys(models).forEach(function(modelName, i, arr) {
55+
modelName = modelName[0].toUpperCase() + modelName.slice(1);
56+
%>
57+
<%- modelName %>Api<%= i < arr.length -1 ? ',' : '' %><%
58+
});%>
59+
]
60+
};
61+
}
62+
}
63+
4064
export * from './models/index';
4165
export * from './services/index';
4266
export * from './lb.config';
43-
export * from './sdk.module';
4467
<% if ( isIo === 'enabled' ){ -%>export * from './sockets/index';
4568
<% }
4669
-%>
47-

lib/angular2/shared/models/base.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<% if (!loadAccessToken) { %>
33
import 'AccessToken' from './AccessToken';
44
<% } %>
5+
declare var Object: any;
56
export interface LoopBackFilter {
67
fields?: any;
78
include?: any;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/* tslint:disable */
22
<%- buildModelImports(model) %>
3+
declare var Object: any;
34
export interface <%- modelName %>Interface {
45
<%- buildModelProperties(model, true) %>
56
}
67

78
export class <%- modelName %> implements <%- modelName %>Interface {
89
<%- buildModelProperties(model) %>
9-
constructor(instance?: <%- modelName %>) {
10+
constructor(instance?: <%- modelName %>Interface) {
1011
Object.assign(this, instance);
1112
}
1213
}

lib/angular2/shared/sdk.module.ejs

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)