File tree 6 files changed +12
-7
lines changed
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 @@ -327,7 +327,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
327
327
let deviceDescriptorsForInitialSync : ILiveSyncDeviceInfo [ ] = [ ] ;
328
328
329
329
if ( liveSyncData . syncToPreviewApp ) {
330
- this . $previewAppLiveSyncService . initialize ( {
330
+ await this . $previewAppLiveSyncService . initialize ( {
331
331
appFilesUpdaterOptions : {
332
332
bundle : liveSyncData . bundle ,
333
333
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 @@ -17,10 +17,10 @@ export class PreviewSdkService implements IPreviewSdkService {
17
17
return `nsplay://boot?instanceId=${ this . instanceId } &pKey=${ PubnubKeys . PUBLISH_KEY } &sKey=${ PubnubKeys . SUBSCRIBE_KEY } &template=play-ng&hmr=${ hmrValue } ` ;
18
18
}
19
19
20
- public initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : void {
20
+ public async initialize ( getInitialFiles : ( device : Device ) => Promise < FilesPayload > ) : Promise < void > {
21
21
const initConfig = this . getInitConfig ( getInitialFiles ) ;
22
22
this . messagingService = new MessagingService ( ) ;
23
- this . instanceId = this . messagingService . initialize ( initConfig ) ;
23
+ this . instanceId = await this . messagingService . initialize ( initConfig ) ;
24
24
}
25
25
26
26
public applyChanges ( filesPayload : FilesPayload ) : Promise < void > {
@@ -43,6 +43,8 @@ export class PreviewSdkService implements IPreviewSdkService {
43
43
return {
44
44
pubnubPublishKey : PubnubKeys . PUBLISH_KEY ,
45
45
pubnubSubscribeKey : PubnubKeys . SUBSCRIBE_KEY ,
46
+ msvKey : "cli" ,
47
+ msvEnv : this . $config . PREVIEW_APP_ENVIRONMENT ,
46
48
callbacks : this . getCallbacks ( ) ,
47
49
getInitialFiles
48
50
} ;
You can’t perform that action at this time.
0 commit comments