nativescript 9.0.0-alpha.8 → 9.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/config.json +1 -1
- package/config/test-deps-versions-generated.json +3 -3
- package/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-get.md +36 -0
- package/docs/man_pages/config/config-set.md +40 -0
- package/docs/man_pages/config/config.md +39 -0
- package/docs/man_pages/project/hooks/hooks.md +35 -0
- package/docs/man_pages/start.md +1 -0
- package/lib/.d.ts +4 -0
- package/lib/bootstrap.js +2 -0
- package/lib/commands/build.js +22 -3
- package/lib/commands/clean.js +3 -3
- package/lib/commands/config.js +9 -3
- package/lib/commands/hooks/common.js +79 -0
- package/lib/commands/hooks/hooks-lock.js +100 -0
- package/lib/commands/hooks/hooks.js +71 -0
- package/lib/commands/plugin/build-plugin.js +6 -2
- package/lib/commands/typings.js +1 -1
- package/lib/common/declarations.d.ts +5 -0
- package/lib/common/definitions/extensibility.d.ts +2 -2
- package/lib/common/definitions/mobile.d.ts +78 -72
- package/lib/common/file-system.js +1 -1
- package/lib/common/logger/logger.js +1 -1
- package/lib/common/mobile/android/android-device.js +8 -2
- package/lib/common/mobile/mobile-core/devices-service.js +1 -1
- package/lib/common/plist-parser.js +3 -3
- package/lib/common/project-helper.js +15 -2
- package/lib/common/services/hooks-service.js +1 -1
- package/lib/config.js +2 -38
- package/lib/constants.js +3 -2
- package/lib/controllers/build-controller.js +1 -1
- package/lib/controllers/deploy-controller.js +5 -2
- package/lib/controllers/migrate-controller.js +6 -5
- package/lib/controllers/platform-controller.js +3 -1
- package/lib/controllers/prepare-controller.js +54 -13
- package/lib/controllers/run-controller.js +12 -13
- package/lib/controllers/update-controller.js +2 -2
- package/lib/data/build-data.js +2 -0
- package/lib/declarations.d.ts +3 -1
- package/lib/definitions/android-plugin-migrator.d.ts +3 -2
- package/lib/definitions/build.d.ts +4 -2
- package/lib/definitions/hooks.d.ts +1 -0
- package/lib/definitions/ios-debugger-port-service.d.ts +1 -1
- package/lib/definitions/livesync.d.ts +1 -1
- package/lib/definitions/project.d.ts +14 -0
- package/lib/definitions/run.d.ts +2 -4
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/nativescript-cli.js +28 -0
- package/lib/options.js +9 -2
- package/lib/project-data.js +8 -2
- package/lib/services/analytics/analytics-broker-process.js +1 -1
- package/lib/services/analytics/analytics-service.js +1 -1
- package/lib/services/android/gradle-build-args-service.js +21 -7
- package/lib/services/android/gradle-build-service.js +15 -1
- package/lib/services/android-plugin-build-service.js +58 -44
- package/lib/services/android-project-service.js +63 -4
- package/lib/services/build-artifacts-service.js +24 -9
- package/lib/services/bundler/bundler-compiler-service.js +77 -104
- package/lib/services/cocoapods-service.js +10 -4
- package/lib/services/device/device-install-app-service.js +27 -5
- package/lib/services/extensibility-service.js +1 -1
- package/lib/services/ios/xcodebuild-args-service.js +7 -5
- package/lib/services/ios-project-service.js +5 -2
- package/lib/services/plugins-service.js +3 -2
- package/lib/services/project-data-service.js +16 -18
- package/lib/services/timeline-profiler-service.js +21 -13
- package/lib/services/versions-service.js +2 -1
- package/package.json +18 -15
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-app/app/build.gradle +1292 -0
- package/vendor/gradle-app/app/gradle-helpers/AnalyticsCollector.gradle +48 -0
- package/vendor/gradle-app/app/gradle-helpers/BuildToolTask.gradle +50 -0
- package/vendor/gradle-app/app/gradle-helpers/CustomExecutionLogger.gradle +52 -0
- package/vendor/gradle-app/app/gradle.properties +45 -0
- package/vendor/gradle-app/build.gradle +170 -0
- package/vendor/gradle-app/settings.gradle +78 -0
- package/vendor/gradle-plugin/build.gradle +214 -91
- package/vendor/gradle-plugin/gradle.properties +2 -18
- package/vendor/gradle-plugin/settings.gradle +23 -11
- package/lib/common/resources/platform-tools/android/darwin/NOTICE.txt +0 -3407
- package/lib/common/resources/platform-tools/android/darwin/adb +0 -0
- package/lib/common/resources/platform-tools/android/linux/NOTICE.txt +0 -4451
- package/lib/common/resources/platform-tools/android/linux/adb +0 -0
- package/lib/common/resources/platform-tools/android/win32/AdbWinApi.dll +0 -0
- package/lib/common/resources/platform-tools/android/win32/AdbWinUsbApi.dll +0 -0
- package/lib/common/resources/platform-tools/android/win32/NOTICE.txt +0 -4451
- package/lib/common/resources/platform-tools/android/win32/adb.exe +0 -0
- package/lib/common/resources/platform-tools/android/win32/fastboot.exe +0 -0
|
@@ -99,6 +99,12 @@ declare global {
|
|
|
99
99
|
* For iOS simulators - same as the identifier.
|
|
100
100
|
*/
|
|
101
101
|
imageIdentifier?: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Optional property describing the architecture of the device
|
|
105
|
+
* Available for Android only
|
|
106
|
+
*/
|
|
107
|
+
abis?: string[];
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
interface IDeviceError extends Error, IDeviceIdentifier {}
|
|
@@ -131,7 +137,7 @@ declare global {
|
|
|
131
137
|
appId: string,
|
|
132
138
|
projectName: string,
|
|
133
139
|
projectDir: string,
|
|
134
|
-
ensureAppStarted?: boolean
|
|
140
|
+
ensureAppStarted?: boolean,
|
|
135
141
|
): Promise<any>;
|
|
136
142
|
destroyDebugSocket(appId: string): Promise<void>;
|
|
137
143
|
openDeviceLogStream(options?: IiOSLogStreamOptions): Promise<void>;
|
|
@@ -146,7 +152,7 @@ declare global {
|
|
|
146
152
|
|
|
147
153
|
interface IAndroidDeviceFileSystem extends IDeviceFileSystem {
|
|
148
154
|
getDeviceHashService(
|
|
149
|
-
appIdentifier: string
|
|
155
|
+
appIdentifier: string,
|
|
150
156
|
): Mobile.IAndroidDeviceHashService;
|
|
151
157
|
}
|
|
152
158
|
|
|
@@ -240,7 +246,7 @@ declare global {
|
|
|
240
246
|
*/
|
|
241
247
|
setProjectNameForDevice(
|
|
242
248
|
deviceIdentifier: string,
|
|
243
|
-
projectName: string
|
|
249
|
+
projectName: string,
|
|
244
250
|
): void;
|
|
245
251
|
|
|
246
252
|
/**
|
|
@@ -250,7 +256,7 @@ declare global {
|
|
|
250
256
|
*/
|
|
251
257
|
setProjectDirForDevice(
|
|
252
258
|
deviceIdentifier: string,
|
|
253
|
-
projectDir: string
|
|
259
|
+
projectDir: string,
|
|
254
260
|
): void;
|
|
255
261
|
}
|
|
256
262
|
|
|
@@ -293,7 +299,7 @@ declare global {
|
|
|
293
299
|
*/
|
|
294
300
|
startLogProcess(
|
|
295
301
|
deviceId: string,
|
|
296
|
-
options?: Mobile.IiOSLogStreamOptions
|
|
302
|
+
options?: Mobile.IiOSLogStreamOptions,
|
|
297
303
|
): Promise<void>;
|
|
298
304
|
}
|
|
299
305
|
|
|
@@ -317,7 +323,7 @@ declare global {
|
|
|
317
323
|
filterData(
|
|
318
324
|
platform: string,
|
|
319
325
|
data: string,
|
|
320
|
-
deviceLogOptions: Mobile.IDeviceLogOptions
|
|
326
|
+
deviceLogOptions: Mobile.IDeviceLogOptions,
|
|
321
327
|
): string;
|
|
322
328
|
}
|
|
323
329
|
|
|
@@ -334,7 +340,7 @@ declare global {
|
|
|
334
340
|
replaceWithOriginalFileLocations(
|
|
335
341
|
platform: string,
|
|
336
342
|
messageData: string,
|
|
337
|
-
loggingOptions: Mobile.IDeviceLogOptions
|
|
343
|
+
loggingOptions: Mobile.IDeviceLogOptions,
|
|
338
344
|
): string;
|
|
339
345
|
}
|
|
340
346
|
|
|
@@ -351,7 +357,7 @@ declare global {
|
|
|
351
357
|
*/
|
|
352
358
|
filterData(
|
|
353
359
|
data: string,
|
|
354
|
-
deviceLogOptions: Mobile.IDeviceLogOptions
|
|
360
|
+
deviceLogOptions: Mobile.IDeviceLogOptions,
|
|
355
361
|
): string;
|
|
356
362
|
}
|
|
357
363
|
|
|
@@ -380,13 +386,13 @@ declare global {
|
|
|
380
386
|
installApplication(
|
|
381
387
|
packageFilePath: string,
|
|
382
388
|
appIdentifier?: string,
|
|
383
|
-
buildData?: IBuildData
|
|
389
|
+
buildData?: IBuildData,
|
|
384
390
|
): Promise<void>;
|
|
385
391
|
uninstallApplication(appIdentifier: string): Promise<void>;
|
|
386
392
|
reinstallApplication(
|
|
387
393
|
appIdentifier: string,
|
|
388
394
|
packageFilePath: string,
|
|
389
|
-
buildData?: IBuildData
|
|
395
|
+
buildData?: IBuildData,
|
|
390
396
|
): Promise<void>;
|
|
391
397
|
startApplication(appData: IStartApplicationData): Promise<void>;
|
|
392
398
|
stopApplication(appData: IApplicationData): Promise<void>;
|
|
@@ -395,7 +401,7 @@ declare global {
|
|
|
395
401
|
tryStartApplication(appData: IApplicationData): Promise<void>;
|
|
396
402
|
getDebuggableApps(): Promise<Mobile.IDeviceApplicationInformation[]>;
|
|
397
403
|
getDebuggableAppViews(
|
|
398
|
-
appIdentifiers: string[]
|
|
404
|
+
appIdentifiers: string[],
|
|
399
405
|
): Promise<IDictionary<Mobile.IDebugWebViewInfo[]>>;
|
|
400
406
|
/**
|
|
401
407
|
* Sets the files transferred on device.
|
|
@@ -432,34 +438,34 @@ declare global {
|
|
|
432
438
|
getFile(
|
|
433
439
|
deviceFilePath: string,
|
|
434
440
|
appIdentifier: string,
|
|
435
|
-
outputFilePath?: string
|
|
441
|
+
outputFilePath?: string,
|
|
436
442
|
): Promise<void>;
|
|
437
443
|
getFileContent(
|
|
438
444
|
deviceFilePath: string,
|
|
439
|
-
appIdentifier: string
|
|
445
|
+
appIdentifier: string,
|
|
440
446
|
): Promise<string>;
|
|
441
447
|
putFile(
|
|
442
448
|
localFilePath: string,
|
|
443
449
|
deviceFilePath: string,
|
|
444
|
-
appIdentifier: string
|
|
450
|
+
appIdentifier: string,
|
|
445
451
|
): Promise<void>;
|
|
446
452
|
deleteFile(deviceFilePath: string, appIdentifier: string): Promise<void>;
|
|
447
453
|
transferFiles(
|
|
448
454
|
deviceAppData: Mobile.IDeviceAppData,
|
|
449
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
455
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
450
456
|
): Promise<Mobile.ILocalToDevicePathData[]>;
|
|
451
457
|
transferDirectory(
|
|
452
458
|
deviceAppData: Mobile.IDeviceAppData,
|
|
453
459
|
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
454
|
-
projectFilesPath: string
|
|
460
|
+
projectFilesPath: string,
|
|
455
461
|
): Promise<Mobile.ILocalToDevicePathData[]>;
|
|
456
462
|
transferFile?(
|
|
457
463
|
localFilePath: string,
|
|
458
|
-
deviceFilePath: string
|
|
464
|
+
deviceFilePath: string,
|
|
459
465
|
): Promise<void>;
|
|
460
466
|
createFileOnDevice?(
|
|
461
467
|
deviceFilePath: string,
|
|
462
|
-
fileContent: string
|
|
468
|
+
fileContent: string,
|
|
463
469
|
): Promise<void>;
|
|
464
470
|
/**
|
|
465
471
|
* Updates the hash file on device with the current hashes of files.
|
|
@@ -468,7 +474,7 @@ declare global {
|
|
|
468
474
|
*/
|
|
469
475
|
updateHashesOnDevice(
|
|
470
476
|
hashes: IStringDictionary,
|
|
471
|
-
appIdentifier: string
|
|
477
|
+
appIdentifier: string,
|
|
472
478
|
): Promise<void>;
|
|
473
479
|
}
|
|
474
480
|
|
|
@@ -483,11 +489,11 @@ declare global {
|
|
|
483
489
|
interface IAndroidDebugBridge {
|
|
484
490
|
executeCommand(
|
|
485
491
|
args: string[],
|
|
486
|
-
options?: IAndroidDebugBridgeCommandOptions
|
|
492
|
+
options?: IAndroidDebugBridgeCommandOptions,
|
|
487
493
|
): Promise<any>;
|
|
488
494
|
executeShellCommand(
|
|
489
495
|
args: string[],
|
|
490
|
-
options?: IAndroidDebugBridgeCommandOptions
|
|
496
|
+
options?: IAndroidDebugBridgeCommandOptions,
|
|
491
497
|
): Promise<any>;
|
|
492
498
|
pushFile(localFilePath: string, deviceFilePath: string): Promise<void>;
|
|
493
499
|
removeFile(deviceFilePath: string): Promise<void>;
|
|
@@ -514,7 +520,7 @@ declare global {
|
|
|
514
520
|
interface IDeviceAndroidDebugBridge extends IAndroidDebugBridge {
|
|
515
521
|
sendBroadcastToDevice(
|
|
516
522
|
action: string,
|
|
517
|
-
extras?: IStringDictionary
|
|
523
|
+
extras?: IStringDictionary,
|
|
518
524
|
): Promise<number>;
|
|
519
525
|
}
|
|
520
526
|
|
|
@@ -557,7 +563,7 @@ declare global {
|
|
|
557
563
|
skipEmulatorStart?: boolean;
|
|
558
564
|
/**
|
|
559
565
|
* Currently available only for iOS. Specifies the sdk version of the iOS simulator.
|
|
560
|
-
* In case when `
|
|
566
|
+
* In case when `ns run ios --device "iPhone 6"` command is executed, the user can specify the sdk of the simulator because it is possible to have more than one device with the same name but with different sdk versions.
|
|
561
567
|
*/
|
|
562
568
|
sdk?: string;
|
|
563
569
|
|
|
@@ -587,7 +593,7 @@ declare global {
|
|
|
587
593
|
execute<T>(
|
|
588
594
|
action: (device: Mobile.IDevice) => Promise<T>,
|
|
589
595
|
canExecute?: (dev: Mobile.IDevice) => boolean,
|
|
590
|
-
options?: { allowNoDevices?: boolean }
|
|
596
|
+
options?: { allowNoDevices?: boolean },
|
|
591
597
|
): Promise<IDeviceActionResult<T>[]>;
|
|
592
598
|
|
|
593
599
|
/**
|
|
@@ -622,7 +628,7 @@ declare global {
|
|
|
622
628
|
deviceIdentifiers: string[],
|
|
623
629
|
appIdentifier: string,
|
|
624
630
|
framework: string,
|
|
625
|
-
projectDir: string
|
|
631
|
+
projectDir: string,
|
|
626
632
|
): Promise<IAppInstalledInfo>[];
|
|
627
633
|
setLogLevel(logLevel: string, deviceIdentifier?: string): void;
|
|
628
634
|
deployOnDevices(
|
|
@@ -630,20 +636,20 @@ declare global {
|
|
|
630
636
|
packageFile: string,
|
|
631
637
|
packageName: string,
|
|
632
638
|
framework: string,
|
|
633
|
-
projectDir: string
|
|
639
|
+
projectDir: string,
|
|
634
640
|
): Promise<void>[];
|
|
635
641
|
getDeviceByIdentifier(identifier: string): Mobile.IDevice;
|
|
636
642
|
mapAbstractToTcpPort(
|
|
637
643
|
deviceIdentifier: string,
|
|
638
644
|
appIdentifier: string,
|
|
639
|
-
framework: string
|
|
645
|
+
framework: string,
|
|
640
646
|
): Promise<string>;
|
|
641
647
|
getDebuggableApps(
|
|
642
|
-
deviceIdentifiers: string[]
|
|
648
|
+
deviceIdentifiers: string[],
|
|
643
649
|
): Promise<Mobile.IDeviceApplicationInformation[]>[];
|
|
644
650
|
getDebuggableViews(
|
|
645
651
|
deviceIdentifier: string,
|
|
646
|
-
appIdentifier: string
|
|
652
|
+
appIdentifier: string,
|
|
647
653
|
): Promise<Mobile.IDebugWebViewInfo[]>;
|
|
648
654
|
|
|
649
655
|
/**
|
|
@@ -659,7 +665,7 @@ declare global {
|
|
|
659
665
|
* @returns {Promise<Mobile.IListEmulatorsOutput>} Dictionary with the following format: { ios: { devices: Mobile.IDeviceInfo[], errors: string[] }, android: { devices: Mobile.IDeviceInfo[], errors: string[]}}.
|
|
660
666
|
*/
|
|
661
667
|
getEmulatorImages(
|
|
662
|
-
options?: Mobile.IListEmulatorsOptions
|
|
668
|
+
options?: Mobile.IListEmulatorsOptions,
|
|
663
669
|
): Promise<Mobile.IListEmulatorsOutput>;
|
|
664
670
|
|
|
665
671
|
/**
|
|
@@ -674,11 +680,11 @@ declare global {
|
|
|
674
680
|
* prompts the user for a manual choice or returns the first one for non interactive terminals.
|
|
675
681
|
*/
|
|
676
682
|
pickSingleDevice(
|
|
677
|
-
options: IPickSingleDeviceOptions
|
|
683
|
+
options: IPickSingleDeviceOptions,
|
|
678
684
|
): Promise<Mobile.IDevice>;
|
|
679
685
|
|
|
680
686
|
getPlatformsFromDeviceDescriptors(
|
|
681
|
-
deviceDescriptors: ILiveSyncDeviceDescriptor[]
|
|
687
|
+
deviceDescriptors: ILiveSyncDeviceDescriptor[],
|
|
682
688
|
): string[];
|
|
683
689
|
}
|
|
684
690
|
|
|
@@ -734,7 +740,7 @@ declare global {
|
|
|
734
740
|
mapAbstractToTcpPort(
|
|
735
741
|
deviceIdentifier: string,
|
|
736
742
|
appIdentifier: string,
|
|
737
|
-
framework: string
|
|
743
|
+
framework: string,
|
|
738
744
|
): Promise<string>;
|
|
739
745
|
|
|
740
746
|
/**
|
|
@@ -743,7 +749,7 @@ declare global {
|
|
|
743
749
|
* @return {Mobile.IDeviceApplicationInformation[]} Returns array of applications information for the applications which are available for debugging.
|
|
744
750
|
*/
|
|
745
751
|
getDebuggableApps(
|
|
746
|
-
deviceIdentifier: string
|
|
752
|
+
deviceIdentifier: string,
|
|
747
753
|
): Promise<Mobile.IDeviceApplicationInformation[]>;
|
|
748
754
|
|
|
749
755
|
/**
|
|
@@ -756,7 +762,7 @@ declare global {
|
|
|
756
762
|
getMappedAbstractToTcpPorts(
|
|
757
763
|
deviceIdentifier: string,
|
|
758
764
|
appIdentifiers: string[],
|
|
759
|
-
framework: string
|
|
765
|
+
framework: string,
|
|
760
766
|
): Promise<IDictionary<number>>;
|
|
761
767
|
|
|
762
768
|
/**
|
|
@@ -767,7 +773,7 @@ declare global {
|
|
|
767
773
|
*/
|
|
768
774
|
getAppProcessId(
|
|
769
775
|
deviceIdentifier: string,
|
|
770
|
-
appIdentifier: string
|
|
776
|
+
appIdentifier: string,
|
|
771
777
|
): Promise<string>;
|
|
772
778
|
|
|
773
779
|
/**
|
|
@@ -778,7 +784,7 @@ declare global {
|
|
|
778
784
|
* @returns {number} The TCP port that is used for the forwarding.
|
|
779
785
|
*/
|
|
780
786
|
forwardFreeTcpToAbstractPort(
|
|
781
|
-
portForwardInputData: IPortForwardData
|
|
787
|
+
portForwardInputData: IPortForwardData,
|
|
782
788
|
): Promise<number>;
|
|
783
789
|
}
|
|
784
790
|
|
|
@@ -840,7 +846,7 @@ declare global {
|
|
|
840
846
|
fileName: string,
|
|
841
847
|
localProjectRootPath: string,
|
|
842
848
|
onDeviceFileName: string,
|
|
843
|
-
deviceProjectRootPath: string
|
|
849
|
+
deviceProjectRootPath: string,
|
|
844
850
|
): Mobile.ILocalToDevicePathData;
|
|
845
851
|
}
|
|
846
852
|
|
|
@@ -895,7 +901,7 @@ declare global {
|
|
|
895
901
|
* @returns {Promise<IStartEmulatorOutput>} Starts the emulator and returns the errors if some error occurs.
|
|
896
902
|
*/
|
|
897
903
|
startEmulator(
|
|
898
|
-
options: Mobile.IStartEmulatorOptions
|
|
904
|
+
options: Mobile.IStartEmulatorOptions,
|
|
899
905
|
): Promise<IStartEmulatorOutput>;
|
|
900
906
|
|
|
901
907
|
/**
|
|
@@ -916,7 +922,7 @@ declare global {
|
|
|
916
922
|
* Returns array of all available android emulators - genymotion and native avd emulators and array of errors.
|
|
917
923
|
*/
|
|
918
924
|
getEmulatorImages(
|
|
919
|
-
adbDevicesOutput: string[]
|
|
925
|
+
adbDevicesOutput: string[],
|
|
920
926
|
): Promise<Mobile.IEmulatorImagesOutput>;
|
|
921
927
|
/**
|
|
922
928
|
* Gets all identifiers of all running android emulators.
|
|
@@ -967,7 +973,7 @@ declare global {
|
|
|
967
973
|
* @returns {Promise<IVirtualBoxEnumerateGuestPropertiesOutput>} - Returns a dictionary in the following format: { properties: string; error?: string; }
|
|
968
974
|
*/
|
|
969
975
|
enumerateGuestProperties(
|
|
970
|
-
id: string
|
|
976
|
+
id: string,
|
|
971
977
|
): Promise<IVirtualBoxEnumerateGuestPropertiesOutput>;
|
|
972
978
|
}
|
|
973
979
|
|
|
@@ -1012,7 +1018,7 @@ declare global {
|
|
|
1012
1018
|
*/
|
|
1013
1019
|
parseIniFile(
|
|
1014
1020
|
iniFilePath: string,
|
|
1015
|
-
avdInfo?: Mobile.IAvdInfo
|
|
1021
|
+
avdInfo?: Mobile.IAvdInfo,
|
|
1016
1022
|
): Mobile.IAvdInfo;
|
|
1017
1023
|
}
|
|
1018
1024
|
|
|
@@ -1056,7 +1062,7 @@ declare global {
|
|
|
1056
1062
|
launchApplication(
|
|
1057
1063
|
applicationPath: string,
|
|
1058
1064
|
appIdentifier: string,
|
|
1059
|
-
options: IiOSSimLaunchApplicationOptions
|
|
1065
|
+
options: IiOSSimLaunchApplicationOptions,
|
|
1060
1066
|
): Promise<any>;
|
|
1061
1067
|
printDeviceTypes(): Promise<any>;
|
|
1062
1068
|
sendNotification(notification: string, deviceId: string): Promise<void>;
|
|
@@ -1104,7 +1110,7 @@ declare global {
|
|
|
1104
1110
|
interface IiOSSimulatorService extends IEmulatorPlatformService {
|
|
1105
1111
|
postDarwinNotification(
|
|
1106
1112
|
notification: string,
|
|
1107
|
-
deviceId: string
|
|
1113
|
+
deviceId: string,
|
|
1108
1114
|
): Promise<void>;
|
|
1109
1115
|
|
|
1110
1116
|
/**
|
|
@@ -1206,34 +1212,34 @@ declare global {
|
|
|
1206
1212
|
getDeviceFileContent(
|
|
1207
1213
|
device: Mobile.IDevice,
|
|
1208
1214
|
deviceFilePath: string,
|
|
1209
|
-
projectData: IProjectData
|
|
1215
|
+
projectData: IProjectData,
|
|
1210
1216
|
): Promise<string>;
|
|
1211
1217
|
}
|
|
1212
1218
|
|
|
1213
1219
|
interface IEmulatorHelper {
|
|
1214
1220
|
mapAndroidApiLevelToVersion: IStringDictionary;
|
|
1215
1221
|
getEmulatorsFromAvailableEmulatorsOutput(
|
|
1216
|
-
availableEmulatorsOutput: Mobile.IListEmulatorsOutput
|
|
1222
|
+
availableEmulatorsOutput: Mobile.IListEmulatorsOutput,
|
|
1217
1223
|
): Mobile.IDeviceInfo[];
|
|
1218
1224
|
getErrorsFromAvailableEmulatorsOutput(
|
|
1219
|
-
availableEmulatorsOutput: Mobile.IListEmulatorsOutput
|
|
1225
|
+
availableEmulatorsOutput: Mobile.IListEmulatorsOutput,
|
|
1220
1226
|
): string[];
|
|
1221
1227
|
getEmulatorByImageIdentifier(
|
|
1222
1228
|
imageIdentifier: string,
|
|
1223
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1229
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1224
1230
|
): Mobile.IDeviceInfo;
|
|
1225
1231
|
getEmulatorByIdOrName(
|
|
1226
1232
|
emulatorIdOrName: string,
|
|
1227
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1233
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1228
1234
|
): Mobile.IDeviceInfo;
|
|
1229
1235
|
getEmulatorByStartEmulatorOptions(
|
|
1230
1236
|
options: Mobile.IStartEmulatorOptions,
|
|
1231
|
-
emulators: Mobile.IDeviceInfo[]
|
|
1237
|
+
emulators: Mobile.IDeviceInfo[],
|
|
1232
1238
|
): Mobile.IDeviceInfo;
|
|
1233
1239
|
isEmulatorRunning(emulator: Mobile.IDeviceInfo): boolean;
|
|
1234
1240
|
setRunningAndroidEmulatorProperties(
|
|
1235
1241
|
emulatorId: string,
|
|
1236
|
-
emulator: Mobile.IDeviceInfo
|
|
1242
|
+
emulator: Mobile.IDeviceInfo,
|
|
1237
1243
|
): void;
|
|
1238
1244
|
}
|
|
1239
1245
|
|
|
@@ -1286,13 +1292,13 @@ declare global {
|
|
|
1286
1292
|
* Computes the shasums of localToDevicePaths and updates hash file on device
|
|
1287
1293
|
*/
|
|
1288
1294
|
updateHashes(
|
|
1289
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1295
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1290
1296
|
): Promise<void>;
|
|
1291
1297
|
/**
|
|
1292
1298
|
* Computes the shasums of localToDevicePaths and removes them from hash file on device
|
|
1293
1299
|
*/
|
|
1294
1300
|
removeHashes(
|
|
1295
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1301
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1296
1302
|
): Promise<boolean>;
|
|
1297
1303
|
|
|
1298
1304
|
/**
|
|
@@ -1309,7 +1315,7 @@ declare global {
|
|
|
1309
1315
|
*/
|
|
1310
1316
|
generateHashesFromLocalToDevicePaths(
|
|
1311
1317
|
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1312
|
-
initialShasums?: IStringDictionary
|
|
1318
|
+
initialShasums?: IStringDictionary,
|
|
1313
1319
|
): Promise<IStringDictionary>;
|
|
1314
1320
|
|
|
1315
1321
|
/**
|
|
@@ -1318,7 +1324,7 @@ declare global {
|
|
|
1318
1324
|
* @returns {string[]} DevicePaths of all elements from the input localToDevicePaths.
|
|
1319
1325
|
*/
|
|
1320
1326
|
getDevicePaths(
|
|
1321
|
-
localToDevicePaths: Mobile.ILocalToDevicePathData[]
|
|
1327
|
+
localToDevicePaths: Mobile.ILocalToDevicePathData[],
|
|
1322
1328
|
): string[];
|
|
1323
1329
|
|
|
1324
1330
|
/**
|
|
@@ -1329,7 +1335,7 @@ declare global {
|
|
|
1329
1335
|
*/
|
|
1330
1336
|
getChangedShasums(
|
|
1331
1337
|
oldShasums: IStringDictionary,
|
|
1332
|
-
currentShasums: IStringDictionary
|
|
1338
|
+
currentShasums: IStringDictionary,
|
|
1333
1339
|
): IStringDictionary;
|
|
1334
1340
|
}
|
|
1335
1341
|
|
|
@@ -1371,7 +1377,7 @@ declare global {
|
|
|
1371
1377
|
*/
|
|
1372
1378
|
handleErrors(
|
|
1373
1379
|
errors: IAndroidDebugBridgeError[],
|
|
1374
|
-
treatErrorsAsWarnings?: boolean
|
|
1380
|
+
treatErrorsAsWarnings?: boolean,
|
|
1375
1381
|
): void;
|
|
1376
1382
|
}
|
|
1377
1383
|
|
|
@@ -1401,77 +1407,77 @@ declare global {
|
|
|
1401
1407
|
install(
|
|
1402
1408
|
ipaPath: string,
|
|
1403
1409
|
deviceIdentifiers: string[],
|
|
1404
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1410
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1405
1411
|
): Promise<IOSDeviceResponse>;
|
|
1406
1412
|
|
|
1407
1413
|
uninstall(
|
|
1408
1414
|
appIdentifier: string,
|
|
1409
1415
|
deviceIdentifiers: string[],
|
|
1410
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1416
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1411
1417
|
): Promise<IOSDeviceResponse>;
|
|
1412
1418
|
|
|
1413
1419
|
startLookingForDevices(
|
|
1414
1420
|
deviceFoundCallback: DeviceInfoCallback,
|
|
1415
1421
|
deviceUpdatedCallback: DeviceInfoCallback,
|
|
1416
1422
|
deviceLostCallback: DeviceInfoCallback,
|
|
1417
|
-
options?: Mobile.IDeviceLookingOptions
|
|
1423
|
+
options?: Mobile.IDeviceLookingOptions,
|
|
1418
1424
|
): Promise<void>;
|
|
1419
1425
|
|
|
1420
1426
|
startDeviceLog(deviceIdentifier: string): void;
|
|
1421
1427
|
|
|
1422
1428
|
apps(
|
|
1423
1429
|
deviceIdentifiers: string[],
|
|
1424
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1430
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1425
1431
|
): Promise<IOSDeviceAppInfo>;
|
|
1426
1432
|
|
|
1427
1433
|
listDirectory(
|
|
1428
1434
|
listArray: IOSDeviceLib.IReadOperationData[],
|
|
1429
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1435
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1430
1436
|
): Promise<IOSDeviceMultipleResponse>;
|
|
1431
1437
|
|
|
1432
1438
|
readFiles(
|
|
1433
1439
|
deviceFilePaths: IOSDeviceLib.IReadOperationData[],
|
|
1434
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1440
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1435
1441
|
): Promise<IOSDeviceResponse>;
|
|
1436
1442
|
|
|
1437
1443
|
downloadFiles(
|
|
1438
1444
|
deviceFilePaths: IOSDeviceLib.IFileOperationData[],
|
|
1439
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1445
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1440
1446
|
): Promise<IOSDeviceResponse>;
|
|
1441
1447
|
|
|
1442
1448
|
uploadFiles(
|
|
1443
1449
|
files: IOSDeviceLib.IUploadFilesData[],
|
|
1444
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1450
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1445
1451
|
): Promise<IOSDeviceResponse>;
|
|
1446
1452
|
|
|
1447
1453
|
deleteFiles(
|
|
1448
1454
|
deleteArray: IOSDeviceLib.IDeleteFileData[],
|
|
1449
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1455
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1450
1456
|
): Promise<IOSDeviceResponse>;
|
|
1451
1457
|
|
|
1452
1458
|
start(
|
|
1453
1459
|
startArray: IOSDeviceLib.IIOSApplicationData[],
|
|
1454
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1460
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1455
1461
|
): Promise<IOSDeviceResponse>;
|
|
1456
1462
|
|
|
1457
1463
|
stop(
|
|
1458
1464
|
stopArray: IOSDeviceLib.IIOSApplicationData[],
|
|
1459
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1465
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1460
1466
|
): Promise<IOSDeviceResponse>;
|
|
1461
1467
|
|
|
1462
1468
|
postNotification(
|
|
1463
1469
|
postNotificationArray: IOSDeviceLib.IPostNotificationData[],
|
|
1464
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1470
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1465
1471
|
): Promise<IOSDeviceResponse>;
|
|
1466
1472
|
|
|
1467
1473
|
awaitNotificationResponse(
|
|
1468
1474
|
awaitNotificationResponseArray: IOSDeviceLib.IAwaitNotificatioNResponseData[],
|
|
1469
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1475
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1470
1476
|
): Promise<IOSDeviceResponse>;
|
|
1471
1477
|
|
|
1472
1478
|
connectToPort(
|
|
1473
1479
|
connectToPortArray: IOSDeviceLib.IConnectToPortData[],
|
|
1474
|
-
errorHandler?: DeviceOperationErrorHandler
|
|
1480
|
+
errorHandler?: DeviceOperationErrorHandler,
|
|
1475
1481
|
): Promise<IDictionary<IOSDeviceLib.IConnectToPortResponse[]>>;
|
|
1476
1482
|
|
|
1477
1483
|
setShouldDispose(shouldDispose: boolean): void;
|
|
@@ -1480,7 +1486,7 @@ declare global {
|
|
|
1480
1486
|
type DeviceOperationErrorHandler = (err: IOSDeviceLib.IDeviceError) => void;
|
|
1481
1487
|
|
|
1482
1488
|
type DeviceInfoCallback = (
|
|
1483
|
-
deviceInfo: IOSDeviceLib.IDeviceActionInfo
|
|
1489
|
+
deviceInfo: IOSDeviceLib.IDeviceActionInfo,
|
|
1484
1490
|
) => void;
|
|
1485
1491
|
|
|
1486
1492
|
type IOSDeviceResponse = IDictionary<IOSDeviceLib.IDeviceResponse[]>;
|
|
@@ -18,9 +18,9 @@ const shelljs = require("shelljs");
|
|
|
18
18
|
const helpers_1 = require("./helpers");
|
|
19
19
|
const constants_1 = require("../constants");
|
|
20
20
|
const os_1 = require("os");
|
|
21
|
-
const detectNewline = require("detect-newline");
|
|
22
21
|
const archiver_1 = require("archiver");
|
|
23
22
|
const mkdirp = require("mkdirp");
|
|
23
|
+
const detectNewline = require("detect-newline");
|
|
24
24
|
let FileSystem = FileSystem_1 = class FileSystem {
|
|
25
25
|
constructor($injector) {
|
|
26
26
|
this.$injector = $injector;
|
|
@@ -27,7 +27,7 @@ class Logger {
|
|
|
27
27
|
this.passwordReplacement = "$1$3*******$2$4";
|
|
28
28
|
this.defaultLogLevel = this.$config.DEBUG
|
|
29
29
|
? constants_1.LoggerLevel.TRACE
|
|
30
|
-
: constants_1.LoggerLevel.
|
|
30
|
+
: constants_1.LoggerLevel.WARN;
|
|
31
31
|
}
|
|
32
32
|
initialize(opts) {
|
|
33
33
|
opts = opts || {};
|
|
@@ -45,6 +45,10 @@ class AndroidDevice {
|
|
|
45
45
|
identifier: this.identifier,
|
|
46
46
|
displayName: details.name,
|
|
47
47
|
model: details.model,
|
|
48
|
+
abis: [
|
|
49
|
+
...details["cpu.abilist64"].split(","),
|
|
50
|
+
...details["cpu.abilist32"].split(","),
|
|
51
|
+
],
|
|
48
52
|
version,
|
|
49
53
|
vendor: details.brand,
|
|
50
54
|
platform: this.$devicePlatformsConstants.Android,
|
|
@@ -58,8 +62,10 @@ class AndroidDevice {
|
|
|
58
62
|
? [constants_1.DeviceConnectionType.Local]
|
|
59
63
|
: [constants_1.DeviceConnectionType.USB];
|
|
60
64
|
if (this.isEmulator) {
|
|
61
|
-
this.deviceInfo.displayName =
|
|
62
|
-
|
|
65
|
+
this.deviceInfo.displayName =
|
|
66
|
+
await this.$androidEmulatorServices.getRunningEmulatorName(this.identifier);
|
|
67
|
+
this.deviceInfo.imageIdentifier =
|
|
68
|
+
await this.$androidEmulatorServices.getRunningEmulatorImageIdentifier(this.identifier);
|
|
63
69
|
}
|
|
64
70
|
this.$logger.trace(this.deviceInfo);
|
|
65
71
|
}
|
|
@@ -396,7 +396,7 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
396
396
|
preErrorMsg = "Multiple errors were thrown:" + os_1.EOL;
|
|
397
397
|
}
|
|
398
398
|
const errorMessage = `${preErrorMsg}${errors
|
|
399
|
-
.map((e) => e.message || e)
|
|
399
|
+
.map((e) => e.stack || e.message || e)
|
|
400
400
|
.join(os_1.EOL)}`;
|
|
401
401
|
this.$errors.fail(errorMessage);
|
|
402
402
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlistParser = void 0;
|
|
4
|
-
const
|
|
4
|
+
const SimplePlist = require("simple-plist");
|
|
5
5
|
const yok_1 = require("./yok");
|
|
6
6
|
class PlistParser {
|
|
7
7
|
parseFile(plistFilePath) {
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
|
-
|
|
9
|
+
SimplePlist.readFile(plistFilePath, (err, obj) => {
|
|
10
10
|
if (err) {
|
|
11
11
|
reject(err);
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@ class PlistParser {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
parseFileSync(plistFilePath) {
|
|
20
|
-
return
|
|
20
|
+
return SimplePlist.readFileSync(plistFilePath);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.PlistParser = PlistParser;
|
|
@@ -6,7 +6,8 @@ const _ = require("lodash");
|
|
|
6
6
|
const yok_1 = require("./yok");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
class ProjectHelper {
|
|
9
|
-
constructor($logger, $fs, $staticConfig, $errors, $options) {
|
|
9
|
+
constructor($injector, $logger, $fs, $staticConfig, $errors, $options) {
|
|
10
|
+
this.$injector = $injector;
|
|
10
11
|
this.$logger = $logger;
|
|
11
12
|
this.$fs = $fs;
|
|
12
13
|
this.$staticConfig = $staticConfig;
|
|
@@ -57,7 +58,8 @@ class ProjectHelper {
|
|
|
57
58
|
isProjectFileCorrect(projectFilePath) {
|
|
58
59
|
try {
|
|
59
60
|
const fileContent = this.$fs.readText(projectFilePath);
|
|
60
|
-
|
|
61
|
+
const packageName = this.getProjectData(path.dirname(projectFilePath)).nsConfig.corePackageName || constants_1.SCOPED_TNS_CORE_MODULES;
|
|
62
|
+
return (fileContent.includes(packageName) ||
|
|
61
63
|
fileContent.includes(constants_1.TNS_CORE_MODULES_NAME));
|
|
62
64
|
}
|
|
63
65
|
catch (err) {
|
|
@@ -65,6 +67,17 @@ class ProjectHelper {
|
|
|
65
67
|
}
|
|
66
68
|
return false;
|
|
67
69
|
}
|
|
70
|
+
getProjectData(projectFilePath) {
|
|
71
|
+
try {
|
|
72
|
+
const projectData = this.$injector.resolve("projectData");
|
|
73
|
+
projectData.initializeProjectData(projectFilePath);
|
|
74
|
+
return projectData;
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
console.error(error);
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
68
81
|
}
|
|
69
82
|
exports.ProjectHelper = ProjectHelper;
|
|
70
83
|
yok_1.injector.register("projectHelper", ProjectHelper);
|