-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathplatform.d.ts
102 lines (88 loc) · 3.45 KB
/
platform.d.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/**
* Describes information about how to build the native project.
*/
interface IBuildPlatformAction {
/**
* Builds the native project for the specified platform for device or emulator.
* When finishes, build saves the .nsbuildinfo file in platform product folder.
* This file points to the prepare that was used to build the project and allows skipping unnecessary builds and deploys.
* @param {string} platform The platform to build.
* @param {IBuildConfig} buildConfig Indicates whether the build is for device or emulator.
* @param {IProjectData} projectData DTO with information about the project.
* @returns {Promise<string>} The path to the built file.
*/
buildPlatform(platform: string, buildConfig: IBuildConfig, projectData: IProjectData): Promise<string>;
}
interface IPlatformData {
frameworkPackageName: string;
platformProjectService: IPlatformProjectService;
projectRoot: string;
normalizedPlatformName: string;
platformNameLowerCase: string;
appDestinationDirectoryPath: string;
getBuildOutputPath(options: IBuildOutputOptions): string;
getValidBuildOutputData(buildOptions: IBuildOutputOptions): IValidBuildOutputData;
frameworkDirectoriesExtensions?: string[];
frameworkDirectoriesNames?: string[];
targetedOS?: string[];
configurationFileName?: string;
configurationFilePath?: string;
relativeToFrameworkConfigurationFilePath: string;
fastLivesyncFileExtensions: string[];
}
interface IValidBuildOutputData {
packageNames: string[];
regexes?: RegExp[];
}
interface IBuildOutputOptions extends Partial<IBuildForDevice>, IRelease, IHasAndroidBundle {
outputPath?: string;
}
interface IPlatformsDataService {
getPlatformData(platform: string, projectData: IProjectData): IPlatformData;
}
interface INodeModulesBuilder {
prepareNodeModules(prepareNodeModulesData: IPrepareNodeModulesData): Promise<void>;
}
interface IPrepareNodeModulesData {
platformData: IPlatformData;
projectData: IProjectData;
}
interface INodeModulesDependenciesBuilder {
getProductionDependencies(projectPath: string): IDependencyData[];
}
interface IBuildInfo {
prepareTime: string;
buildTime: string;
/**
* Currently it is used only for iOS.
* As `xcrun` command does not throw an error when IPHONEOS_DEPLOYMENT_TARGET is provided in `xcconfig` file and
* the simulator's version does not match IPHONEOS_DEPLOYMENT_TARGET's value, we need to save it to buildInfo file
* in order check it on livesync and throw an error to the user.
*/
deploymentTarget?: string;
}
interface IPlatformEnvironmentRequirements {
checkEnvironmentRequirements(input: ICheckEnvironmentRequirementsInput): Promise<ICheckEnvironmentRequirementsOutput>;
}
interface ICheckEnvironmentRequirementsInput {
platform?: string;
projectDir?: string;
runtimeVersion?: string;
options?: IOptions;
notConfiguredEnvOptions?: INotConfiguredEnvOptions;
}
interface ICheckEnvironmentRequirementsOutput {
canExecute: boolean;
selectedOption: string;
}
interface IAddPlatformData extends IControllerDataBase {
frameworkPath?: string;
}
interface IPlatformController {
addPlatform(addPlatformData: IAddPlatformData): Promise<void>;
addPlatformIfNeeded(addPlatformData: IAddPlatformData): Promise<void>;
}
interface IAddPlatformService {
addPlatformSafe(projectData: IProjectData, platformData: IPlatformData, packageToInstall: string, nativePrepare: INativePrepare): Promise<string>;
setPlatformVersion(platformData: IPlatformData, projectData: IProjectData, frameworkVersion: string): Promise<void>
}