-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathdeclarations.ts
258 lines (228 loc) · 8.06 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
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<any>;
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;
}
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 ILiveSyncService {
liveSync(platform: string): IFuture<void>;
}
interface IOptions extends ICommonOptions {
baseConfig: string;
client: boolean;
compileSdk: number;
copyFrom: string;
copyTo: string;
debugTransport: boolean;
emulator: boolean;
forDevice: boolean;
framework: string;
frameworkName: string;
frameworkPath: string;
frameworkVersion: string;
ignoreScripts: boolean;
ipa: string;
keyStoreAlias: string;
keyStoreAliasPassword: string;
keyStorePassword: string;
keyStorePath: string;
linkTo: string;
ng: boolean;
platformTemplate: string;
port: Number;
production: boolean;
sdk: string;
staticBindings: boolean;
symlink: boolean;
tnsModulesVersion: string;
}
interface IInitService {
initialize(): IFuture<void>;
}
/**
* Describes standard username/password type credentials.
*/
interface ICredentials {
username: string;
password: string;
}
/**
* Describes properties needed for uploading a package to iTunes Connect
*/
interface IITMSData extends ICredentials {
/**
* The identifier of the mobile provision used for building. Note that this will override the same option set through .xcconfig files.
* @type {string}
*/
mobileProvisionIdentifier?: string;
/**
* The Code Sign Identity used for building. Note that this will override the same option set through .xcconfig files.
* @type {string}
*/
codeSignIdentity?: string;
/**
* Path to a .ipa file which will be uploaded. If set that .ipa will be used and no build will be issued.
* @type {string}
*/
ipaFilePath?: string;
/**
* Specifies whether the logging level of the itmstransporter command-line tool should be set to verbose.
* @type {string}
*/
verboseLogging?: boolean;
}
/**
* Used for communicating with Xcode's iTMS Transporter tool.
*/
interface IITMSTransporterService {
/**
* Uploads an .ipa package to iTunes Connect.
* @param {IITMSData} data Data needed to upload the package
* @return {IFuture<void>}
*/
upload(data: IITMSData): IFuture<void>;
/**
* Queries Apple's content delivery API to get the user's registered iOS applications.
* @param {ICredentials} credentials Credentials for authentication with iTunes Connect.
* @return {IFuture<IItunesConnectApplication[]>} The user's iOS applications.
*/
getiOSApplications(credentials: ICredentials): IFuture<IiTunesConnectApplication[]>;
}
/**
* 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>;
}
/**
* Describes validation methods for XMLs.
*/
interface IXmlValidator {
/**
* Checks the passed xml files for errors and if such exists, print them on the stdout.
* @param {string[]} sourceFiles Files to be checked. Only the ones that ends with .xml are filtered.
* @return {IFuture<boolean>} true in case there are no errors in specified files and false in case there's at least one error.
*/
validateXmlFiles(sourceFiles: string[]): IFuture<boolean>;
/**
* Checks the passed xml file for errors and returns them as a result.
* @param {string} sourceFile File to be checked.
* @return {IFuture<string>} The errors detected (as a single string) or null in case there are no errors.
*/
getXmlFileErrors(sourceFile: string): IFuture<string>;
}