-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathproject.d.ts
123 lines (111 loc) · 4.5 KB
/
project.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
interface IProjectService {
createProject(projectName: string, selectedTemplate?: string): IFuture<void>;
}
interface IProjectData {
projectDir: string;
projectName: string;
platformsDir: string;
projectFilePath: string;
projectId?: string;
dependencies: any;
appDirectoryPath: string;
appResourcesDirectoryPath: string;
}
interface IProjectDataService {
initialize(projectDir: string): void;
getValue(propertyName: string): IFuture<any>;
setValue(key: string, value: any): IFuture<void>;
removeProperty(propertyName: string): IFuture<void>;
removeDependency(dependencyName: string): IFuture<void>;
}
/**
* Describes working with templates.
*/
interface IProjectTemplatesService {
/**
* Prepares template for project creation.
* In case templateName is not provided, use defaultTemplatePath.
* In case templateName is a special word, validated from us (for ex. typescript), resolve the real template name and add it to npm cache.
* In any other cases try to `npm install` the specified templateName to temp directory.
* @param {string} templateName The name of the template.
* @return {string} Path to the directory where extracted template can be found.
*/
prepareTemplate(templateName: string, projectDir: string): IFuture<string>;
}
interface IPlatformProjectServiceBase {
getPluginPlatformsFolderPath(pluginData: IPluginData, platform: string): string;
}
interface IBuildConfig {
buildForDevice?: boolean;
architectures?: string[];
}
/**
* Describes iOS-specific build configuration properties
*/
interface IiOSBuildConfig extends IBuildConfig {
/**
* Identifier of the mobile provision which will be used for the build. If not set a provision will be selected automatically if possible.
*/
mobileProvisionIdentifier?: string;
/**
* Code sign identity used for build. If not set iPhone Developer is used as a default when building for device.
*/
codeSignIdentity?: string;
}
interface IPlatformProjectService {
platformData: IPlatformData;
validate(): IFuture<void>;
createProject(frameworkDir: string, frameworkVersion: string, pathToTemplate?: string): IFuture<void>;
interpolateData(): IFuture<void>;
interpolateConfigurationFile(configurationFilePath?: string): IFuture<void>;
afterCreateProject(projectRoot: string): IFuture<void>;
buildProject(projectRoot: string, buildConfig?: IBuildConfig): IFuture<void>;
buildForDeploy(projectRoot: string, buildConfig?: IBuildConfig): IFuture<void>;
prepareProject(): IFuture<void>;
prepareAppResources(appResourcesDirectoryPath: string): IFuture<void>;
isPlatformPrepared(projectRoot: string): IFuture<boolean>;
canUpdatePlatform(newInstalledModuleDir: string): IFuture<boolean>;
preparePluginNativeCode(pluginData: IPluginData, options?: any): IFuture<void>;
removePluginNativeCode(pluginData: IPluginData): IFuture<void>;
afterPrepareAllPlugins(): IFuture<void>;
beforePrepareAllPlugins(dependencies?: IDictionary<IDependencyData>): IFuture<void>;
getAppResourcesDestinationDirectoryPath(): IFuture<string>;
deploy(deviceIdentifier: string): IFuture<void>;
processConfigurationFilesFromAppResources(): IFuture<void>;
/**
* Ensures there is configuration file (AndroidManifest.xml, Info.plist) in app/App_Resources.
*/
ensureConfigurationFileInAppResources(): IFuture<void>;
}
interface IAndroidProjectPropertiesManager {
getProjectReferences(): IFuture<ILibRef[]>;
addProjectReference(referencePath: string): IFuture<void>;
removeProjectReference(referencePath: string): IFuture<void>;
}
interface ITestExecutionService {
startTestRunner(platform: string): IFuture<void>;
startKarmaServer(platform: string): IFuture<void>;
}
/**
* Describes a service used to facilitate communication with CocoaPods
*/
interface ICocoaPodsService {
/**
* Get the header needed for the beginning of every Podfile
* @param {string} targetName The name of the target (usually the same as the project's name).
* @return {string} The header which needs to be placed at the beginning of a Podfile.
*/
getPodfileHeader(targetName: string): string;
/**
* Get the footer needed for the end of every Podfile
* @return {string} The footer which needs to be placed at the end of a Podfile.
*/
getPodfileFooter(): string;
/**
* Merges the content of hooks with the provided name if there are more than one hooks with this name in the Podfile.
* @param {string} hookName The name of the hook.
* @param {string} pathToPodfile The path to the Podfile.
* @return {IFuture<void>}
*/
mergePodfileHookContent(sectionName: string, pathToPodfile: string): IFuture<void>
}