-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathdeploy-command-helper.ts
45 lines (39 loc) · 1.38 KB
/
deploy-command-helper.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export class DeployCommandHelper implements IDeployCommandHelper {
constructor(private $options: IOptions,
private $platformService: IPlatformService,
private $projectData: IProjectData) {
this.$projectData.initializeProjectData();
}
public getDeployPlatformInfo(platform: string): IDeployPlatformInfo {
const appFilesUpdaterOptions: IAppFilesUpdaterOptions = {
bundle: !!this.$options.bundle,
release: this.$options.release,
useHotModuleReload: this.$options.hmr
};
const deployOptions: IDeployPlatformOptions = {
clean: this.$options.clean,
device: this.$options.device,
projectDir: this.$projectData.projectDir,
emulator: this.$options.emulator,
release: this.$options.release,
forceInstall: true,
provision: this.$options.provision,
teamId: this.$options.teamId,
keyStoreAlias: this.$options.keyStoreAlias,
keyStoreAliasPassword: this.$options.keyStoreAliasPassword,
keyStorePassword: this.$options.keyStorePassword,
keyStorePath: this.$options.keyStorePath
};
const deployPlatformInfo: IDeployPlatformInfo = {
platform,
appFilesUpdaterOptions,
deployOptions,
projectData: this.$projectData,
buildPlatform: this.$platformService.buildPlatform.bind(this.$platformService),
config: this.$options,
env: this.$options.env,
};
return deployPlatformInfo;
}
}
$injector.register("deployCommandHelper", DeployCommandHelper);