Skip to content

Commit

Permalink
Release 2.1.0-beta.1 🚀
Browse files Browse the repository at this point in the history
- Fix: #127
- Fix: #124
- Fix: #122
- Fix: #112
- Fix: #31
  • Loading branch information
Jonathan Casarrubias committed Sep 30, 2016
1 parent 8609c7e commit a6ecd9d
Show file tree
Hide file tree
Showing 70 changed files with 1,039 additions and 380 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": "node_modules/typescript/lib"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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-beta.1

- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/127
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/124
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/122
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/112
- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/31

## Release 2.0.10

- Fix: https://github.com/mean-expert-official/loopback-sdk-builder/issues/121
Expand Down
12 changes: 10 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Copyright (c) 2016 Jonathan Casarrubias <@johncasarrubias>
#Art and Graphics License
Copyright (c) 2016 MEAN Expert - Jonathan Casarrubias <@johncasarrubias>

All Rights Reserved

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.

#Software MTI License
Copyright (c) 2016 MEAN Expert - Jonathan Casarrubias <@johncasarrubias>

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:

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

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.

[MIT License](http://opensource.org/licenses/MIT)
[MIT License](http://opensource.org/licenses/MIT)
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ $ npm install --save-dev @mean-expert/loopback-sdk-builder

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

# FireLoop API (NEW)

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)

![FireLoop.io](https://storage.googleapis.com/mean-expert-images/fireloop-logo.png)


# Contact

Discuss features and ask questions on [@johncasarrubias at Twitter](https://twitter.com/johncasarrubias).
6 changes: 4 additions & 2 deletions lib/angular2/drivers/nativescript2/socket.driver.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* tslint:disable */
var SocketIO = require('nativescript-socket.io');
var SocketIO = require('nativescript-socketio');
export class SocketDriver {
static connect(url: any, options: any) {
return SocketIO.connect(url, options);
let socketIO: any = new SocketIO(url, options)
socketIO.connect();
return socketIO;
}
}
25 changes: 16 additions & 9 deletions lib/angular2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ module.exports = function generate(ctx) {
buildModuleImports: buildModuleImports
}
},
{
template: './shared/sdk.module.ejs',
output: '/sdk.module.ts',
params: {
isIo: ctx.isIo,
models: ctx.models,
buildModuleImports: buildModuleImports
}
},
{
template: './shared/models/index.ejs',
output: '/models/index.ts',
Expand All @@ -88,6 +79,21 @@ module.exports = function generate(ctx) {
output: '/services/core/index.ts',
params: {}
},
{
template: './shared/services/core/io.ejs',
output: '/services/core/io.service.ts',
params: {}
},
{
template: './shared/services/core/realtime.ejs',
output: '/services/core/real.time.ts',
params: {}
},
{
template: './shared/services/core/fireloop.ejs',
output: '/services/core/fireloop.ts',
params: {}
},
/**
* SDK CONFIG
*/
Expand Down Expand Up @@ -345,6 +351,7 @@ module.exports = function generate(ctx) {
let imports = [
{ module: 'JSONSearchParams', from: './services/core/search.params'},
{ module: 'ErrorHandler', from: './services/core/error.service'},
{ module: 'RealTime', from: './services/core/real.time'},
{ module: 'LoopBackAuth', from: './services/core/auth.service'},
{ module: 'LoggerService', from: './services/custom/logger.service'},
];
Expand Down
86 changes: 54 additions & 32 deletions lib/angular2/shared/index.ejs
Original file line number Diff line number Diff line change
@@ -1,47 +1,69 @@
/**
* @module SDK Index
* @module SDKModule
* @author Jonathan Casarrubias <t:@johncasarrubias> <gh:jonathan-casarrubias>
* @license MTI 2016 Jonathan Casarrubias
* @description
* The SDK Index is automatically built by the LoopBack SDK Builder.
* The SDKModule is a generated Software Development Kit automatically built by
* the LoopBack SDK Builder open source module.
*
* The SDK Index will temporally keep providing access to everything in the SDK
* including services. This is because will maintain backwards compatibility for those
* Applications below Angular 2 RC 5 version that does not support NgModule just yet.
* The SDKModule provides Angular 2 >= RC.5 support, which means that NgModules
* can import this Software Development Kit as follows:
*
* IMPORTANT NOTE:
*
* If your application is equal or above RC 5 It is recommended to import the SDK
* Module located in ./sdk.module.ts and follow the instructions.
* APP Route Module Context
* ============================================================================
* import { NgModule } from '@angular/core';
* import { BrowserModule } from '@angular/platform-browser';
* // App Root
* import { AppComponent } from './app.component';
* // Feature Modules
* import { SDKModule } from './shared/sdk/sdk.module';
* // Import Routing
* import { routing } from './app.routing';
* @NgModule({
* imports: [
* BrowserModule,
* routing,
* SDKModule.forRoot()
* ],
* declarations: [ AppComponent ],
* bootstrap: [ AppComponent ]
* })
* export class AppModule { }
*
* Also, It is recommended for you to start upgrading your application in order to
* support NgModules before backwards support is also dropped by Angular.
*
* READ: https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html#!#5-cleanup
**/
<%- buildModuleImports(models, true) %>
/**
* IMPORTANT: API_PROVIDERS WILL BE DEPRECATED WHEN ANGULAR 2 IS STABLE
* PLEASE MIGRATE YOUR PROJECT AS SOON AS POSSIBLE.
* ONCE ANGULAR 2 IS STABLE I WON'T KEEP SUPPORTING API PROVIDERS.
* USER NGMODULE INSTEAD LOCATED IN ./sdk.module.ts
**/
export const API_PROVIDERS: any[] = [
LoopBackAuth,
ErrorHandler,
LoggerService,
JSONSearchParams,<%
Object.keys(models).forEach(function(modelName, i, arr) {
modelName = modelName[0].toUpperCase() + modelName.slice(1);
%>
<%- modelName %>Api<%= i < arr.length -1 ? ',' : '' %><%
});%>
];
<%- buildModuleImports(models, false) %>

@NgModule({
imports: [ CommonModule, HttpModule ],
declarations: [ ],
exports: [ ],
providers: [ ]
})

export class SDKModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: SDKModule,
providers: [
RealTime,
LoopBackAuth,
ErrorHandler,
LoggerService,
JSONSearchParams,<%
Object.keys(models).forEach(function(modelName, i, arr) {
modelName = modelName[0].toUpperCase() + modelName.slice(1);
%>
<%- modelName %>Api<%= i < arr.length -1 ? ',' : '' %><%
});%>
]
};
}
}

export * from './models/index';
export * from './services/index';
export * from './lb.config';
export * from './sdk.module';
<% if ( isIo === 'enabled' ){ -%>export * from './sockets/index';
<% }
-%>

1 change: 1 addition & 0 deletions lib/angular2/shared/models/base.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<% if (!loadAccessToken) { %>
import 'AccessToken' from './AccessToken';
<% } %>
declare var Object: any;
export interface LoopBackFilter {
fields?: any;
include?: any;
Expand Down
3 changes: 2 additions & 1 deletion lib/angular2/shared/models/model.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* tslint:disable */
<%- buildModelImports(model) %>
declare var Object: any;
export interface <%- modelName %>Interface {
<%- buildModelProperties(model, true) %>
}

export class <%- modelName %> implements <%- modelName %>Interface {
<%- buildModelProperties(model) %>
constructor(instance?: <%- modelName %>) {
constructor(instance?: <%- modelName %>Interface) {
Object.assign(this, instance);
}
}
61 changes: 0 additions & 61 deletions lib/angular2/shared/sdk.module.ejs

This file was deleted.

1 change: 1 addition & 0 deletions lib/angular2/shared/services/core/auth.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* tslint:disable */
declare var Object: any;
import { Injectable } from '@angular/core';
import { StorageDriver } from '../../storage/storage.driver';
import { SDKToken<% if (loadAccessToken) { %>, AccessToken<% } %> } from '../../models/BaseModels';
Expand Down
Loading

0 comments on commit a6ecd9d

Please sign in to comment.