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 5
5
"ANDROID_DEBUG_UI_MAC" : " Google Chrome" ,
6
6
"USE_POD_SANDBOX" : false ,
7
7
"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"
10
11
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export class Configuration extends ConfigBase implements IConfiguration { // Use
10
10
USE_POD_SANDBOX : boolean = false ;
11
11
UPLOAD_PLAYGROUND_FILES_ENDPOINT : string = null ;
12
12
SHORTEN_URL_ENDPOINT : string = null ;
13
+ PREVIEW_APP_ENVIRONMENT : string = null ;
13
14
14
15
/*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
15
16
constructor ( protected $fs : IFileSystem ) {
Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ interface IConfiguration extends Config.IConfig {
384
384
USE_POD_SANDBOX : boolean ;
385
385
UPLOAD_PLAYGROUND_FILES_ENDPOINT : string ;
386
386
SHORTEN_URL_ENDPOINT : string ;
387
+ PREVIEW_APP_ENVIRONMENT : string ;
387
388
}
388
389
389
390
interface IApplicationPackage {
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
325
325
let deviceDescriptorsForInitialSync : ILiveSyncDeviceInfo [ ] = [ ] ;
326
326
327
327
if ( liveSyncData . syncToPreviewApp ) {
328
- this . $previewAppLiveSyncService . initialize ( {
328
+ await this . $previewAppLiveSyncService . initialize ( {
329
329
appFilesUpdaterOptions : {
330
330
bundle : liveSyncData . bundle ,
331
331
release : liveSyncData . release ,
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export class PreviewAppLiveSyncService implements IPreviewAppLiveSyncService {
20
20
private $projectFilesManager : IProjectFilesManager ,
21
21
private $projectFilesProvider : IProjectFilesProvider ) { }
22
22
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 ) => {
25
25
if ( ! device ) {
26
26
this . $errors . failWithoutHelp ( "Sending initial preview files without a specified device is not supported." ) ;
27
27
}
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ export class PreviewSdkService implements IPreviewSdkService {
18
18
return `nsplay://boot?instanceId=${ this . instanceId } &pKey=${ PubnubKeys . PUBLISH_KEY } &sKey=${ PubnubKeys . SUBSCRIBE_KEY } &template=play-ng&hmr=${ hmrValue } ` ;
19
19
}
20
20
21
- public initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : void {
21
+ public async initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : Promise < void > {
22
22
const initConfig = this . getInitConfig ( getInitialFiles ) ;
23
23
this . messagingService = new MessagingService ( ) ;
24
- this . instanceId = this . messagingService . initialize ( initConfig ) ;
24
+ this . instanceId = await this . messagingService . initialize ( initConfig ) ;
25
25
}
26
26
27
27
public applyChanges ( filesPayload : FilesPayload ) : Promise < void > {
@@ -44,6 +44,8 @@ export class PreviewSdkService implements IPreviewSdkService {
44
44
return {
45
45
pubnubPublishKey : PubnubKeys . PUBLISH_KEY ,
46
46
pubnubSubscribeKey : PubnubKeys . SUBSCRIBE_KEY ,
47
+ msvKey : "cli" ,
48
+ msvEnv : this . $config . PREVIEW_APP_ENVIRONMENT ,
47
49
callbacks : this . getCallbacks ( ) ,
48
50
getInitialFiles
49
51
} ;
You can’t perform that action at this time.
0 commit comments