-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathdeclarations.ts
194 lines (167 loc) · 6.01 KB
/
declarations.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
interface INodePackageManager {
getCache(): string;
load(config?: any): IFuture<void>;
install(packageName: string, pathToSave: string, config?: any): IFuture<any>;
uninstall(packageName: string, config?: any, path?: string): IFuture<any>;
cache(packageName: string, version: string, cache?: any): IFuture<IDependencyData>;
cacheUnpack(packageName: string, version: string, unpackTarget?: string): IFuture<void>;
view(packageName: string, propertyName: string): IFuture<any>;
executeNpmCommand(npmCommandName: string, currentWorkingDirectory: string): IFuture<any>;
}
interface INpmInstallationManager {
getCacheRootPath(): string;
addToCache(packageName: string, version: string): IFuture<void>;
cacheUnpack(packageName: string, version: string, unpackTarget?: string): IFuture<void>;
install(packageName: string, options?: INpmInstallOptions): IFuture<string>;
getLatestVersion(packageName: string): IFuture<string>;
getLatestCompatibleVersion(packageName: string): IFuture<string>;
getCachedPackagePath(packageName: string, version: string): string;
addCleanCopyToCache(packageName: string, version: string): IFuture<void>;
}
interface INpmInstallOptions {
pathToSave?: string;
version?: string;
}
interface IDependencyData {
name: string;
version: string;
nativescript: any;
dependencies?: IStringDictionary;
devDependencies?: IStringDictionary;
}
interface IStaticConfig extends Config.IStaticConfig { }
interface IConfiguration extends Config.IConfig {
ANDROID_DEBUG_UI: string;
USE_POD_SANDBOX: boolean;
}
interface IApplicationPackage {
packageName: string;
time: Date;
}
interface ILockFile {
lock(): IFuture<void>;
unlock(): IFuture<void>;
}
interface IOpener {
open(target: string, appname: string): void;
}
interface IUsbLiveSyncService {
liveSync(platform: string): IFuture<void>;
}
interface IiOSUsbLiveSyncService extends IPlatformSpecificUsbLiveSyncService {
sendPageReloadMessageToSimulator(): IFuture<void>;
}
interface IOptions extends ICommonOptions {
frameworkPath: string;
frameworkName: string;
framework: string;
frameworkVersion: string;
copyFrom: string;
linkTo: string;
release: boolean;
emulator: boolean;
symlink: boolean;
forDevice: boolean;
client: boolean;
production: boolean;
keyStorePath: string;
keyStorePassword: string;
keyStoreAlias: string;
keyStoreAliasPassword: string;
sdk: string;
debugTransport: boolean;
ignoreScripts: boolean;
tnsModulesVersion: string;
staticBindings: boolean;
compileSdk: number;
port: Number;
copyTo: string;
baseConfig: string;
}
interface IProjectFilesManager {
processPlatformSpecificFiles(directoryPath: string, platform: string, excludedDirs?: string[]): IFuture<void>;
}
interface IInitService {
initialize(): IFuture<void>;
}
/**
* Provides access to information about installed Android tools and SDKs versions.
*/
interface IAndroidToolsInfo {
/**
* Provides information about installed Android SDKs, Build Tools, Support Library
* and ANDROID_HOME environement variable.
* @return {IAndroidToolsInfoData} Information about installed Android Tools and SDKs.
*/
getToolsInfo(): IFuture<IAndroidToolsInfoData>;
/**
* Validates the information about required Android tools and SDK versions.
* @param {any} options Defines if the warning messages should treated as error and if the targetSdk value should be validated as well.
* @return {boolean} True if there are detected issues, false otherwise.
*/
validateInfo(options?: {showWarningsAsErrors: boolean, validateTargetSdk: boolean}): IFuture<boolean>;
/**
* Validates the information about required JAVA version.
* @param {string} installedJavaVersion The JAVA version that will be checked.
* @param {any} options Defines if the warning messages should treated as error.
* @return {boolean} True if there are detected issues, false otherwise.
*/
validateJavacVersion(installedJavaVersion: string, options?: {showWarningsAsErrors: boolean}): IFuture<boolean>;
/**
* Returns the path to `android` executable. It should be `$ANDROID_HOME/tools/android`.
* In case ANDROID_HOME is not defined, check if `android` is part of $PATH.
* @param {any} options Defines if the warning messages should treated as error.
* @return {string} Path to the `android` executable.
*/
getPathToAndroidExecutable(options?: {showWarningsAsErrors: boolean}): IFuture<string>;
/**
* Gets the path to `adb` executable from ANDROID_HOME. It should be `$ANDROID_HOME/platform-tools/adb` in case it exists.
* @return {string} Path to the `adb` executable. In case it does not exists, null is returned.
*/
getPathToAdbFromAndroidHome(): IFuture<string>;
}
/**
* Describes information about installed Android tools and SDKs.
*/
interface IAndroidToolsInfoData {
/**
* The value of ANDROID_HOME environment variable.
*/
androidHomeEnvVar: string;
/**
* The latest installed version of Android Build Tools that satisfies CLI's requirements.
*/
buildToolsVersion: string;
/**
* The latest installed version of Android SDK that satisfies CLI's requirements.
*/
compileSdkVersion: number;
/**
* The latest installed version of Android Support Repository that satisfies CLI's requirements.
*/
supportRepositoryVersion: string;
/**
* The Android targetSdkVersion specified by the user.
* In case it is not specified, compileSdkVersion will be used for targetSdkVersion.
*/
targetSdkVersion: number;
}
interface ISocketProxyFactory {
createSocketProxy(factory: () => any): IFuture<any>;
}
interface IiOSNotification {
waitForDebug: string;
attachRequest: string;
appLaunching: string;
readyForAttach: string;
attachAvailabilityQuery: string;
alreadyConnected: string;
attachAvailable: string;
}
interface IiOSNotificationService {
awaitNotification(npc: Mobile.INotificationProxyClient, notification: string, timeout: number): IFuture<string>;
}
interface IiOSSocketRequestExecutor {
executeLaunchRequest(device: Mobile.IiOSDevice, timeout: number, readyForAttachTimeout: number): IFuture<void>;
executeAttachRequest(device: Mobile.IiOSDevice, timeout: number): IFuture<void>;
}