-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathplugins.d.ts
62 lines (57 loc) · 2.03 KB
/
plugins.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
interface IPluginsService {
add(plugin: string): IFuture<void>; // adds plugin by name, github url, local path and et.
remove(pluginName: string): IFuture<void>; // removes plugin only by name
prepare(pluginData: IDependencyData, platform: string): IFuture<void>;
getAllInstalledPlugins(): IFuture<IPluginData[]>;
ensureAllDependenciesAreInstalled(): IFuture<void>;
afterPrepareAllPlugins(): IFuture<void>;
}
interface IPluginData extends INodeModuleData {
platformsData: IPluginPlatformsData;
/* Gets all plugin variables from plugin */
pluginVariables: IDictionary<IPluginVariableData>;
pluginPlatformsFolderPath(platform: string): string;
}
interface INodeModuleData {
name: string;
version: string;
fullPath: string;
isPlugin: boolean;
moduleInfo: any;
}
interface IPluginPlatformsData {
ios: string;
android: string;
}
interface IPluginVariablesService {
/**
* Saves plugin variables in project package.json file.
* @param {IPluginData} pluginData for the plugin.
* @return {IFuture<void>}
*/
savePluginVariablesInProjectFile(pluginData: IPluginData): IFuture<void>;
/**
* Removes plugin variables from project package.json file.
* @param {IPluginData} pluginData for the plugin.
* @return {IFuture<void>}
*/
removePluginVariablesFromProjectFile(pluginData: IPluginData): IFuture<void>;
/**
* Replaces all plugin variables with their corresponding values.
* @param {IPluginData} pluginData for the plugin.
* @param {pluginConfigurationFileContent} pluginConfigurationFileContent for the plugin.
* @return {IFuture<string>} returns the changed plugin configuration file content.
*/
interpolatePluginVariables(pluginData: IPluginData, pluginConfigurationFileContent: string): IFuture<string>;
/**
* Returns the
* @param {IPluginData} pluginData for the plugin.
* @return {IFuture<string>} returns the changed plugin configuration file content.
*/
getPluginVariablePropertyName(pluginData: IPluginData): string;
}
interface IPluginVariableData {
defaultValue?: string;
name?: string;
value?: string;
}