@@ -147,8 +147,8 @@ module.exports = function generate(ctx) {
147147 * STORAGE
148148 */
149149 {
150- template : './shared/storage/internal. storage.ts' ,
151- output : '/storage/internal. storage.ts' ,
150+ template : './shared/storage/storage.swaps .ts' ,
151+ output : '/storage/storage.swaps .ts' ,
152152 params : { }
153153 }
154154 ] ;
@@ -159,6 +159,11 @@ module.exports = function generate(ctx) {
159159 output : '/storage/cookie.browser.ts' ,
160160 params : { }
161161 } ) ;
162+ schema . push ( {
163+ template : './shared/storage/storage.browser.ts' ,
164+ output : '/storage/storage.browser.ts' ,
165+ params : { }
166+ } ) ;
162167 }
163168 // Add Server Specific Code
164169 if ( ctx . driver === 'ng2universal' ) {
@@ -470,7 +475,7 @@ module.exports = function generate(ctx) {
470475 { module : 'LoopBackAuth' , from : './services/core/auth.service' } ,
471476 { module : 'LoggerService' , from : './services/custom/logger.service' } ,
472477 { module : 'SDKModels' , from : './services/custom/SDKModels' } ,
473- { module : 'InternalStorage' , from : './storage/internal. storage' } ,
478+ { module : 'InternalStorage, SDKStorage ' , from : './storage/storage.swaps ' } ,
474479 { module : 'HttpModule' , from : '@angular/http' } ,
475480 { module : 'CommonModule' , from : '@angular/common' } ,
476481 { module : 'NgModule, ModuleWithProviders' , from : '@angular/core' }
@@ -479,13 +484,15 @@ module.exports = function generate(ctx) {
479484 switch ( driver ) {
480485 case 'ng2web' :
481486 imports . push ( { module : 'CookieBrowser' , from : './storage/cookie.browser' } ) ;
487+ imports . push ( { module : 'StorageBrowser' , from : './storage/storage.browser' } ) ;
482488 if ( isIo === 'enabled' ) {
483489 imports . push ( { module : 'SocketBrowser' , from : './sockets/socket.browser' } ) ;
484490 }
485491 break ;
486492 case 'ng2universal' :
487493 imports . push ( { module : 'CookieBrowser' , from : './storage/cookie.browser' } ) ;
488494 imports . push ( { module : 'CookieNode' , from : './storage/cookie.node' } ) ;
495+ imports . push ( { module : 'StorageBrowser' , from : './storage/storage.browser' } ) ;
489496 if ( isIo === 'enabled' ) {
490497 imports . push ( { module : 'SocketBrowser' , from : './sockets/socket.browser' } ) ;
491498 imports . push ( { module : 'SocketNode' , from : './sockets/socket.node' } ) ;
@@ -528,6 +535,7 @@ module.exports = function generate(ctx) {
528535 case 'browser' :
529536 if ( driver === 'ng2web' || driver === 'ng2universal' ) {
530537 imports . push ( '{ provide: InternalStorage, useClass: CookieBrowser }' ) ;
538+ imports . push ( '{ provide: SDKStorage, useClass: StorageBrowser }' ) ;
531539 if ( isIo === 'enabled' ) {
532540 imports . push ( '{ provide: SocketDriver, useClass: SocketBrowser }' ) ;
533541 }
@@ -544,6 +552,7 @@ module.exports = function generate(ctx) {
544552 case 'nativescript' :
545553 if ( driver === 'ng2native' ) {
546554 imports . push ( '{ provide: InternalStorage, useClass: StorageNative }' ) ;
555+ imports . push ( '{ provide: SDKStorage, useClass: StorageNative }' ) ;
547556 if ( isIo === 'enabled' ) {
548557 imports . push ( '{ provide: SocketDriver, useClass: SocketNative }' ) ;
549558 }
0 commit comments