File tree Expand file tree Collapse file tree 6 files changed +12
-7
lines changed
Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 55 "ANDROID_DEBUG_UI_MAC" : " Google Chrome" ,
66 "USE_POD_SANDBOX" : false ,
77 "DISABLE_HOOKS" : false ,
8- "UPLOAD_PLAYGROUND_FILES_ENDPOINT" : " https://play.nativescript.org/api/files" ,
9- "SHORTEN_URL_ENDPOINT" : " https://play.nativescript.org/api/shortenurl?longUrl=%s"
8+ "UPLOAD_PLAYGROUND_FILES_ENDPOINT" : " https://play.nativescript.org/api/files" ,
9+ "SHORTEN_URL_ENDPOINT" : " https://play.nativescript.org/api/shortenurl?longUrl=%s" ,
10+ "PREVIEW_APP_ENVIRONMENT" : " live"
1011}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export class Configuration extends ConfigBase implements IConfiguration { // Use
1010 USE_POD_SANDBOX : boolean = false ;
1111 UPLOAD_PLAYGROUND_FILES_ENDPOINT : string = null ;
1212 SHORTEN_URL_ENDPOINT : string = null ;
13+ PREVIEW_APP_ENVIRONMENT : string = null ;
1314
1415 /*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
1516 constructor ( protected $fs : IFileSystem ) {
Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ interface IConfiguration extends Config.IConfig {
384384 USE_POD_SANDBOX : boolean ;
385385 UPLOAD_PLAYGROUND_FILES_ENDPOINT : string ;
386386 SHORTEN_URL_ENDPOINT : string ;
387+ PREVIEW_APP_ENVIRONMENT : string ;
387388}
388389
389390interface IApplicationPackage {
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
327327 let deviceDescriptorsForInitialSync : ILiveSyncDeviceInfo [ ] = [ ] ;
328328
329329 if ( liveSyncData . syncToPreviewApp ) {
330- this . $previewAppLiveSyncService . initialize ( {
330+ await this . $previewAppLiveSyncService . initialize ( {
331331 appFilesUpdaterOptions : {
332332 bundle : liveSyncData . bundle ,
333333 release : liveSyncData . release ,
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export class PreviewAppLiveSyncService implements IPreviewAppLiveSyncService {
2020 private $projectFilesManager : IProjectFilesManager ,
2121 private $projectFilesProvider : IProjectFilesProvider ) { }
2222
23- public initialize ( data : IPreviewAppLiveSyncData ) {
24- this . $previewSdkService . initialize ( async ( device : Device ) => {
23+ public async initialize ( data : IPreviewAppLiveSyncData ) : Promise < void > {
24+ await this . $previewSdkService . initialize ( async ( device : Device ) => {
2525 if ( ! device ) {
2626 this . $errors . failWithoutHelp ( "Sending initial preview files without a specified device is not supported." ) ;
2727 }
Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ export class PreviewSdkService implements IPreviewSdkService {
1717 return `nsplay://boot?instanceId=${ this . instanceId } &pKey=${ PubnubKeys . PUBLISH_KEY } &sKey=${ PubnubKeys . SUBSCRIBE_KEY } &template=play-ng&hmr=${ hmrValue } ` ;
1818 }
1919
20- public initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : void {
20+ public async initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : Promise < void > {
2121 const initConfig = this . getInitConfig ( getInitialFiles ) ;
2222 this . messagingService = new MessagingService ( ) ;
23- this . instanceId = this . messagingService . initialize ( initConfig ) ;
23+ this . instanceId = await this . messagingService . initialize ( initConfig ) ;
2424 }
2525
2626 public applyChanges ( filesPayload : FilesPayload ) : Promise < void > {
@@ -43,6 +43,8 @@ export class PreviewSdkService implements IPreviewSdkService {
4343 return {
4444 pubnubPublishKey : PubnubKeys . PUBLISH_KEY ,
4545 pubnubSubscribeKey : PubnubKeys . SUBSCRIBE_KEY ,
46+ msvKey : "cli" ,
47+ msvEnv : this . $config . PREVIEW_APP_ENVIRONMENT ,
4648 callbacks : this . getCallbacks ( ) ,
4749 getInitialFiles
4850 } ;
You can’t perform that action at this time.
0 commit comments