nativescript 9.1.0-alpha.7 → 9.1.0-alpha.8
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/lib/common/definitions/mobile.d.ts +15 -10
- package/lib/common/mobile/ios/device/ios-device-file-system.js +29 -1
- package/lib/controllers/prepare-controller.js +53 -11
- package/lib/definitions/project.d.ts +16 -0
- package/lib/services/android-plugin-build-service.js +20 -12
- package/lib/services/livesync/ios-livesync-service.js +113 -2
- package/lib/services/project-data-service.js +14 -11
- package/package.json +4 -7
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -64
- package/node_modules/debug/src/browser.js +0 -272
- package/node_modules/debug/src/common.js +0 -292
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/universal-analytics/.travis.yml +0 -11
- package/node_modules/universal-analytics/AcceptableParams.md +0 -757
- package/node_modules/universal-analytics/HISTORY.md +0 -170
- package/node_modules/universal-analytics/Makefile +0 -5
- package/node_modules/universal-analytics/README.md +0 -651
- package/node_modules/universal-analytics/index.js +0 -2
- package/node_modules/universal-analytics/lib/config.js +0 -171
- package/node_modules/universal-analytics/lib/index.js +0 -563
- package/node_modules/universal-analytics/lib/request.js +0 -73
- package/node_modules/universal-analytics/lib/utils.js +0 -29
- package/node_modules/universal-analytics/package.json +0 -33
- package/node_modules/universal-analytics/test/_enqueue.js +0 -144
- package/node_modules/universal-analytics/test/event.js +0 -346
- package/node_modules/universal-analytics/test/exception.js +0 -233
- package/node_modules/universal-analytics/test/index.js +0 -141
- package/node_modules/universal-analytics/test/item.js +0 -550
- package/node_modules/universal-analytics/test/middleware.js +0 -119
- package/node_modules/universal-analytics/test/mocha.opts +0 -3
- package/node_modules/universal-analytics/test/pageview.js +0 -286
- package/node_modules/universal-analytics/test/send.js +0 -232
- package/node_modules/universal-analytics/test/set.js +0 -68
- package/node_modules/universal-analytics/test/timing.js +0 -363
- package/node_modules/universal-analytics/test/transaction.js +0 -371
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -510
- package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs/index.js +0 -31
- package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/max.js +0 -3
- package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/node_modules/uuid/dist/cjs/native.js +0 -4
- package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/node_modules/uuid/dist/cjs/package.json +0 -1
- package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs/types.js +0 -2
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs/v35.js +0 -41
- package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs/v6.js +0 -19
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs/version.js +0 -10
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
- package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/node_modules/uuid/dist/esm/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm/index.js +0 -14
- package/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm/max.js +0 -1
- package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/node_modules/uuid/dist/esm/md5.js +0 -11
- package/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/node_modules/uuid/dist/esm/native.js +0 -2
- package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm/nil.js +0 -1
- package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm/parse.js +0 -9
- package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm/regex.js +0 -1
- package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm/rng.js +0 -10
- package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/node_modules/uuid/dist/esm/sha1.js +0 -11
- package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm/stringify.js +0 -35
- package/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm/types.js +0 -1
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm/v1.js +0 -83
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v3.js +0 -9
- package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm/v35.js +0 -36
- package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v4.js +0 -27
- package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v5.js +0 -9
- package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm/v6.js +0 -17
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm/v7.js +0 -65
- package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm/validate.js +0 -5
- package/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm/version.js +0 -8
- package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/node_modules/uuid/dist/esm-browser/index.js +0 -14
- package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/max.js +0 -1
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/md5.js +0 -135
- package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/native.js +0 -2
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/parse.js +0 -9
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +0 -11
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/sha1.js +0 -70
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/esm-browser/stringify.js +0 -35
- package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/node_modules/uuid/dist/esm-browser/types.js +0 -1
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/node_modules/uuid/dist/esm-browser/v1.js +0 -83
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v3.js +0 -9
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/node_modules/uuid/dist/esm-browser/v35.js +0 -36
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v4.js +0 -27
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v5.js +0 -9
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/node_modules/uuid/dist/esm-browser/v6.js +0 -17
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/node_modules/uuid/dist/esm-browser/v7.js +0 -65
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -5
- package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
- package/node_modules/uuid/dist/esm-browser/version.js +0 -8
- package/node_modules/uuid/package.json +0 -132
|
@@ -258,8 +258,7 @@ declare global {
|
|
|
258
258
|
* Describes different options for filtering device logs.
|
|
259
259
|
*/
|
|
260
260
|
interface IDeviceLogOptions
|
|
261
|
-
extends IDictionary<string | boolean>,
|
|
262
|
-
Partial<IProjectDir> {
|
|
261
|
+
extends IDictionary<string | boolean>, Partial<IProjectDir> {
|
|
263
262
|
/**
|
|
264
263
|
* Process id of the application on the device.
|
|
265
264
|
*/
|
|
@@ -284,8 +283,7 @@ declare global {
|
|
|
284
283
|
* Describes required methods for getting iOS Simulator's logs.
|
|
285
284
|
*/
|
|
286
285
|
interface IiOSSimulatorLogProvider
|
|
287
|
-
extends NodeJS.EventEmitter,
|
|
288
|
-
IShouldDispose {
|
|
286
|
+
extends NodeJS.EventEmitter, IShouldDispose {
|
|
289
287
|
/**
|
|
290
288
|
* Starts the process for getting simulator logs and emits and DEVICE_LOG_EVENT_NAME event.
|
|
291
289
|
* @param {string} deviceId The unique identifier of the device.
|
|
@@ -429,6 +427,16 @@ declare global {
|
|
|
429
427
|
|
|
430
428
|
interface IDeviceFileSystem {
|
|
431
429
|
listFiles(devicePath: string, appIdentifier?: string): Promise<any>;
|
|
430
|
+
/**
|
|
431
|
+
* Returns the entries of a directory inside the application's
|
|
432
|
+
* sandbox, or null when the directory cannot be read. Currently
|
|
433
|
+
* implemented only for physical iOS devices (AFC), where it backs
|
|
434
|
+
* the post-transfer livesync verification.
|
|
435
|
+
*/
|
|
436
|
+
getDirectoryEntries?(
|
|
437
|
+
devicePath: string,
|
|
438
|
+
appIdentifier: string,
|
|
439
|
+
): Promise<string[] | null>;
|
|
432
440
|
getFile(
|
|
433
441
|
deviceFilePath: string,
|
|
434
442
|
appIdentifier: string,
|
|
@@ -533,8 +541,7 @@ declare global {
|
|
|
533
541
|
/**
|
|
534
542
|
* Describes options that can be passed to devices service's initialization method.
|
|
535
543
|
*/
|
|
536
|
-
interface IDevicesServicesInitializationOptions
|
|
537
|
-
extends Partial<IDeviceLookingOptions> {
|
|
544
|
+
interface IDevicesServicesInitializationOptions extends Partial<IDeviceLookingOptions> {
|
|
538
545
|
/**
|
|
539
546
|
* If passed will start an emulator if necesasry.
|
|
540
547
|
*/
|
|
@@ -1261,8 +1268,7 @@ declare global {
|
|
|
1261
1268
|
}
|
|
1262
1269
|
|
|
1263
1270
|
interface IDeviceLookingOptions
|
|
1264
|
-
extends IHasEmulatorOption,
|
|
1265
|
-
IHasDetectionInterval {
|
|
1271
|
+
extends IHasEmulatorOption, IHasDetectionInterval {
|
|
1266
1272
|
shouldReturnImmediateResult: boolean;
|
|
1267
1273
|
platform: string;
|
|
1268
1274
|
fullDiscovery?: boolean;
|
|
@@ -1388,8 +1394,7 @@ declare global {
|
|
|
1388
1394
|
/**
|
|
1389
1395
|
* Describes information about application on device.
|
|
1390
1396
|
*/
|
|
1391
|
-
interface IDeviceApplicationInformation
|
|
1392
|
-
extends IDeviceApplicationInformationBase {
|
|
1397
|
+
interface IDeviceApplicationInformation extends IDeviceApplicationInformationBase {
|
|
1393
1398
|
/**
|
|
1394
1399
|
* The framework of the project (Cordova or NativeScript).
|
|
1395
1400
|
*/
|
|
@@ -23,6 +23,24 @@ class IOSDeviceFileSystem {
|
|
|
23
23
|
children = result[deviceIdentifier][0].response;
|
|
24
24
|
this.$logger.info(children.join(os_1.EOL));
|
|
25
25
|
}
|
|
26
|
+
async getDirectoryEntries(devicePath, appIdentifier) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
try {
|
|
29
|
+
const result = await this.$iosDeviceOperations.listDirectory([
|
|
30
|
+
{
|
|
31
|
+
deviceId: this.device.deviceInfo.identifier,
|
|
32
|
+
path: devicePath,
|
|
33
|
+
appId: appIdentifier,
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
const entries = (_b = (_a = result === null || result === void 0 ? void 0 : result[this.device.deviceInfo.identifier]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.response;
|
|
37
|
+
return Array.isArray(entries) ? entries : null;
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
this.$logger.trace(`Unable to list directory '${devicePath}' for application ${appIdentifier}: ${err.message}`);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
26
44
|
async getFile(deviceFilePath, appIdentifier, outputFilePath) {
|
|
27
45
|
if (outputFilePath) {
|
|
28
46
|
await this.$iosDeviceOperations.downloadFiles([
|
|
@@ -96,9 +114,19 @@ class IOSDeviceFileSystem {
|
|
|
96
114
|
}
|
|
97
115
|
async uploadFilesCore(filesToUpload) {
|
|
98
116
|
await this.$iosDeviceOperations.uploadFiles(filesToUpload, (err) => {
|
|
99
|
-
|
|
117
|
+
// Previously an error whose deviceId did not exactly match was
|
|
118
|
+
// dropped on the floor — including errors with NO deviceId at
|
|
119
|
+
// all (some ios-device-lib error paths don't attribute one).
|
|
120
|
+
// That left "Successfully synced" printed over a failed
|
|
121
|
+
// transfer and the app silently running stale JavaScript.
|
|
122
|
+
// Rethrow unless the error is positively attributed to a
|
|
123
|
+
// DIFFERENT device; surface even those at warn level so a
|
|
124
|
+
// failed upload is never invisible.
|
|
125
|
+
if (!err.deviceId ||
|
|
126
|
+
err.deviceId === this.device.deviceInfo.identifier) {
|
|
100
127
|
throw err;
|
|
101
128
|
}
|
|
129
|
+
this.$logger.warn(`File upload error reported for another device (${err.deviceId}): ${err.message}`);
|
|
102
130
|
});
|
|
103
131
|
}
|
|
104
132
|
}
|
|
@@ -15,6 +15,7 @@ const decorators_1 = require("../common/decorators");
|
|
|
15
15
|
const helpers_1 = require("../common/helpers");
|
|
16
16
|
const yok_1 = require("../common/yok");
|
|
17
17
|
const constants_1 = require("../constants");
|
|
18
|
+
const resolve_package_path_1 = require("@rigor789/resolve-package-path");
|
|
18
19
|
class PrepareController extends events_1.EventEmitter {
|
|
19
20
|
constructor($platformController, $hooksService, $fs, $logger, $options, $mobileHelper, $nodeModulesDependenciesBuilder, $platformsDataService, $pluginsService, $prepareNativePlatformService, $projectChangesService, $projectDataService, $bundlerCompilerService, $watchIgnoreListService, $analyticsService, $markingModeService, $projectConfigService, $projectService) {
|
|
20
21
|
super();
|
|
@@ -229,28 +230,69 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
229
230
|
* TODO: move this logic to the webpack side of things - WIP and deprecate here with a webpack version check...
|
|
230
231
|
*/
|
|
231
232
|
async writeRuntimePackageJson(projectData, platformData, prepareData = null) {
|
|
233
|
+
var _a, _b, _c, _d, _e;
|
|
232
234
|
const configInfo = this.$projectConfigService.detectProjectConfigs(projectData.projectDir);
|
|
233
235
|
if (configInfo.usingNSConfig) {
|
|
234
236
|
return;
|
|
235
237
|
}
|
|
236
238
|
this.$logger.info("Updating runtime package.json with configuration values...");
|
|
237
|
-
|
|
239
|
+
// Tolerate a missing/unreadable config — prior to the destructure this
|
|
240
|
+
// was a plain object spread, where `undefined` is a legal no-op.
|
|
241
|
+
const { hooks, ignoredNativeDependencies, webpackPackageName, webpackConfigPath, appResourcesPath, buildPath, appPath, ...nsConfig } = (_a = this.$projectConfigService.readConfig(projectData.projectDir)) !== null && _a !== void 0 ? _a : {};
|
|
242
|
+
const platform = platformData.platformNameLowerCase;
|
|
243
|
+
let installedRuntimePackageJSON;
|
|
244
|
+
let runtimePackageName;
|
|
245
|
+
if (platform === "ios" /* PlatformTypes.ios */) {
|
|
246
|
+
runtimePackageName =
|
|
247
|
+
((_c = (_b = projectData.nsConfig) === null || _b === void 0 ? void 0 : _b.ios) === null || _c === void 0 ? void 0 : _c.runtimePackageName) ||
|
|
248
|
+
constants_1.SCOPED_IOS_RUNTIME_NAME;
|
|
249
|
+
}
|
|
250
|
+
else if (platform === "android" /* PlatformTypes.android */) {
|
|
251
|
+
runtimePackageName =
|
|
252
|
+
((_e = (_d = projectData.nsConfig) === null || _d === void 0 ? void 0 : _d.android) === null || _e === void 0 ? void 0 : _e.runtimePackageName) ||
|
|
253
|
+
constants_1.SCOPED_ANDROID_RUNTIME_NAME;
|
|
254
|
+
}
|
|
255
|
+
// try reading from installed runtime first before reading from the npm registry...
|
|
256
|
+
const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(runtimePackageName, {
|
|
257
|
+
paths: [projectData.projectDir],
|
|
258
|
+
});
|
|
259
|
+
if (installedRuntimePackageJSONPath) {
|
|
260
|
+
installedRuntimePackageJSON = this.$fs.readJson(installedRuntimePackageJSONPath);
|
|
261
|
+
}
|
|
238
262
|
const packageData = {
|
|
239
263
|
..._.pick(projectData.packageJsonData, ["name"]),
|
|
240
264
|
...nsConfig,
|
|
241
265
|
main: "bundle",
|
|
266
|
+
...(installedRuntimePackageJSON ? {} : {}),
|
|
242
267
|
};
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
268
|
+
if (platform === "ios" /* PlatformTypes.ios */) {
|
|
269
|
+
if (installedRuntimePackageJSON) {
|
|
270
|
+
packageData.ios = packageData.ios || {};
|
|
271
|
+
packageData.ios.runtime = {
|
|
272
|
+
version: installedRuntimePackageJSON.version,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
if (packageData.ios && packageData.ios.discardUncaughtJsExceptions) {
|
|
276
|
+
packageData.discardUncaughtJsExceptions =
|
|
277
|
+
packageData.ios.discardUncaughtJsExceptions;
|
|
278
|
+
}
|
|
279
|
+
delete packageData.android;
|
|
248
280
|
}
|
|
249
|
-
if (
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
281
|
+
if (platform === "android" /* PlatformTypes.android */) {
|
|
282
|
+
if (installedRuntimePackageJSON) {
|
|
283
|
+
packageData.android = packageData.android || {};
|
|
284
|
+
packageData.android.runtime = {
|
|
285
|
+
version: installedRuntimePackageJSON.version,
|
|
286
|
+
version_info: installedRuntimePackageJSON.version_info,
|
|
287
|
+
gradle: installedRuntimePackageJSON.gradle,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
if (packageData.android &&
|
|
291
|
+
packageData.android.discardUncaughtJsExceptions) {
|
|
292
|
+
packageData.discardUncaughtJsExceptions =
|
|
293
|
+
packageData.android.discardUncaughtJsExceptions;
|
|
294
|
+
}
|
|
295
|
+
delete packageData.ios;
|
|
254
296
|
}
|
|
255
297
|
let packagePath;
|
|
256
298
|
if (this.$mobileHelper.isApplePlatform(platformData.platformNameLowerCase)) {
|
|
@@ -130,6 +130,10 @@ interface INsConfigIOS extends INsConfigPlaform {
|
|
|
130
130
|
* List packages to be included in the iOS build.
|
|
131
131
|
*/
|
|
132
132
|
SPMPackages?: Array<IOSSPMPackage>;
|
|
133
|
+
/**
|
|
134
|
+
* Custom runtime package name
|
|
135
|
+
*/
|
|
136
|
+
runtimePackageName?: string;
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
interface INSConfigVisionOS extends INsConfigIOS {}
|
|
@@ -168,6 +172,11 @@ interface INsConfigAndroid extends INsConfigPlaform {
|
|
|
168
172
|
enableLineBreakpoints?: boolean;
|
|
169
173
|
|
|
170
174
|
enableMultithreadedJavascript?: boolean;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Custom runtime package name
|
|
178
|
+
*/
|
|
179
|
+
runtimePackageName?: string;
|
|
171
180
|
}
|
|
172
181
|
|
|
173
182
|
interface INsConfigHooks {
|
|
@@ -191,6 +200,13 @@ interface INsConfig {
|
|
|
191
200
|
ignoredNativeDependencies?: string[];
|
|
192
201
|
hooks?: INsConfigHooks[];
|
|
193
202
|
projectName?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Legacy keys still found in user configs. Declared so the
|
|
205
|
+
* runtime-package.json generation (PrepareController) can strip them
|
|
206
|
+
* via destructuring without losing type safety.
|
|
207
|
+
*/
|
|
208
|
+
webpackPackageName?: string;
|
|
209
|
+
buildPath?: string;
|
|
194
210
|
}
|
|
195
211
|
|
|
196
212
|
interface IProjectData extends ICreateProjectData {
|
|
@@ -276,31 +276,37 @@ class AndroidPluginBuildService {
|
|
|
276
276
|
}
|
|
277
277
|
if (!runtimeGradleVersions) {
|
|
278
278
|
const latestRuntimeVersion = await this.getLatestRuntimeVersion();
|
|
279
|
-
runtimeGradleVersions =
|
|
279
|
+
runtimeGradleVersions =
|
|
280
|
+
await this.getGradleVersions(latestRuntimeVersion);
|
|
280
281
|
this.$logger.trace(`Got gradle versions ${JSON.stringify(runtimeGradleVersions)} from the latest runtime v${latestRuntimeVersion}`);
|
|
281
282
|
}
|
|
282
283
|
return runtimeGradleVersions || {};
|
|
283
284
|
}
|
|
284
285
|
async getLatestRuntimeVersion() {
|
|
285
|
-
var _a;
|
|
286
|
+
var _a, _b, _c;
|
|
286
287
|
let runtimeVersion = null;
|
|
288
|
+
const packageName = ((_b = (_a = this.$projectData.nsConfig) === null || _a === void 0 ? void 0 : _a.android) === null || _b === void 0 ? void 0 : _b.runtimePackageName) ||
|
|
289
|
+
constants_1.SCOPED_ANDROID_RUNTIME_NAME;
|
|
287
290
|
try {
|
|
288
|
-
let result = await this.$packageManager.view(
|
|
291
|
+
let result = await this.$packageManager.view(packageName, {
|
|
289
292
|
"dist-tags": true,
|
|
290
293
|
});
|
|
291
|
-
result = (
|
|
294
|
+
result = (_c = result === null || result === void 0 ? void 0 : result["dist-tags"]) !== null && _c !== void 0 ? _c : result;
|
|
292
295
|
runtimeVersion = result.latest;
|
|
293
296
|
}
|
|
294
297
|
catch (err) {
|
|
295
298
|
this.$logger.trace(`Error while getting latest android runtime version from view command: ${err}`);
|
|
296
|
-
const registryData = await this.$packageManager.getRegistryPackageData(
|
|
299
|
+
const registryData = await this.$packageManager.getRegistryPackageData(packageName);
|
|
297
300
|
runtimeVersion = registryData["dist-tags"].latest;
|
|
298
301
|
}
|
|
299
302
|
return runtimeVersion;
|
|
300
303
|
}
|
|
301
304
|
getLocalGradleVersions() {
|
|
305
|
+
var _a, _b;
|
|
306
|
+
const packageName = ((_b = (_a = this.$projectData.nsConfig) === null || _a === void 0 ? void 0 : _a.android) === null || _b === void 0 ? void 0 : _b.runtimePackageName) ||
|
|
307
|
+
constants_1.SCOPED_ANDROID_RUNTIME_NAME;
|
|
302
308
|
// try reading from installed runtime first before reading from the npm registry...
|
|
303
|
-
const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(
|
|
309
|
+
const installedRuntimePackageJSONPath = (0, resolve_package_path_1.resolvePackageJSONPath)(packageName, {
|
|
304
310
|
paths: [this.$projectData.projectDir],
|
|
305
311
|
});
|
|
306
312
|
if (!installedRuntimePackageJSONPath) {
|
|
@@ -327,16 +333,18 @@ class AndroidPluginBuildService {
|
|
|
327
333
|
return null;
|
|
328
334
|
}
|
|
329
335
|
async getGradleVersions(runtimeVersion) {
|
|
330
|
-
var _a, _b;
|
|
336
|
+
var _a, _b, _c, _d;
|
|
331
337
|
let runtimeGradleVersions = null;
|
|
332
338
|
const localVersionInfo = this.getLocalGradleVersions();
|
|
333
339
|
if (localVersionInfo) {
|
|
334
340
|
return localVersionInfo;
|
|
335
341
|
}
|
|
342
|
+
const packageName = ((_b = (_a = this.$projectData.nsConfig) === null || _a === void 0 ? void 0 : _a.android) === null || _b === void 0 ? void 0 : _b.runtimePackageName) ||
|
|
343
|
+
constants_1.SCOPED_ANDROID_RUNTIME_NAME;
|
|
336
344
|
// fallback to reading from npm...
|
|
337
345
|
try {
|
|
338
|
-
let output = await this.$packageManager.view(`${
|
|
339
|
-
output = (
|
|
346
|
+
let output = await this.$packageManager.view(`${packageName}@${runtimeVersion}`, { version_info: true });
|
|
347
|
+
output = (_c = output === null || output === void 0 ? void 0 : output["version_info"]) !== null && _c !== void 0 ? _c : output;
|
|
340
348
|
if (!output) {
|
|
341
349
|
/**
|
|
342
350
|
* fallback to the old 'gradle' key in package.json
|
|
@@ -346,8 +354,8 @@ class AndroidPluginBuildService {
|
|
|
346
354
|
* gradle: { version: '6.4', android: '3.6.4' }
|
|
347
355
|
*
|
|
348
356
|
*/
|
|
349
|
-
output = await this.$packageManager.view(`${
|
|
350
|
-
output = (
|
|
357
|
+
output = await this.$packageManager.view(`${packageName}@${runtimeVersion}`, { gradle: true });
|
|
358
|
+
output = (_d = output === null || output === void 0 ? void 0 : output["gradle"]) !== null && _d !== void 0 ? _d : output;
|
|
351
359
|
const { version, android } = output;
|
|
352
360
|
// covert output to the new format...
|
|
353
361
|
output = {
|
|
@@ -359,7 +367,7 @@ class AndroidPluginBuildService {
|
|
|
359
367
|
}
|
|
360
368
|
catch (err) {
|
|
361
369
|
this.$logger.trace(`Error while getting gradle data for android runtime from view command: ${err}`);
|
|
362
|
-
const registryData = await this.$packageManager.getRegistryPackageData(
|
|
370
|
+
const registryData = await this.$packageManager.getRegistryPackageData(packageName);
|
|
363
371
|
runtimeGradleVersions = registryData.versions[runtimeVersion];
|
|
364
372
|
}
|
|
365
373
|
const result = this.getGradleVersionsCore(runtimeGradleVersions);
|
|
@@ -11,6 +11,7 @@ const path = require("path");
|
|
|
11
11
|
const ios_device_livesync_service_1 = require("./ios-device-livesync-service");
|
|
12
12
|
const platform_livesync_service_base_1 = require("./platform-livesync-service-base");
|
|
13
13
|
const constants_1 = require("../../constants");
|
|
14
|
+
const constants_2 = require("../../common/constants");
|
|
14
15
|
const decorators_1 = require("../../common/decorators");
|
|
15
16
|
const yok_1 = require("../../common/yok");
|
|
16
17
|
class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSyncServiceBase {
|
|
@@ -40,14 +41,124 @@ class IOSLiveSyncService extends platform_livesync_service_base_1.PlatformLiveSy
|
|
|
40
41
|
await this.$fs.zipFiles(tempZip, filesToTransfer, (res) => {
|
|
41
42
|
return path.join(constants_1.APP_FOLDER_NAME, path.relative(projectFilesPath, res));
|
|
42
43
|
});
|
|
43
|
-
await
|
|
44
|
+
const deviceProjectRootPath = await deviceAppData.getDeviceProjectRootPath();
|
|
45
|
+
const transferSyncZip = () => device.fileSystem.transferFiles(deviceAppData, [
|
|
44
46
|
{
|
|
45
47
|
getLocalPath: () => tempZip,
|
|
46
48
|
getDevicePath: () => deviceAppData.deviceSyncZipPath,
|
|
47
49
|
getRelativeToProjectBasePath: () => "../sync.zip",
|
|
48
|
-
deviceProjectRootPath
|
|
50
|
+
deviceProjectRootPath,
|
|
49
51
|
},
|
|
50
52
|
]);
|
|
53
|
+
// ── Fail-closed delivery verification ──────────────────────────
|
|
54
|
+
//
|
|
55
|
+
// The AFC transfer has been observed to fail without surfacing an
|
|
56
|
+
// error, leaving the app to boot the stale JavaScript baked into
|
|
57
|
+
// the installed .app payload with no indication anywhere that the
|
|
58
|
+
// sync was lost. After the transfer we therefore confirm the zip
|
|
59
|
+
// is actually present in the app sandbox; one retry covers
|
|
60
|
+
// transient AFC hiccups, and an unconfirmed delivery fails the
|
|
61
|
+
// sync loudly instead of printing "Successfully synced" over
|
|
62
|
+
// stale code (the run-controller surfaces the error; --clean
|
|
63
|
+
// reinstalls the full package).
|
|
64
|
+
//
|
|
65
|
+
// Presence alone is NOT sufficient evidence: a previous run that
|
|
66
|
+
// transferred the zip but aborted before the app restarted leaves
|
|
67
|
+
// a LEFTOVER sync.zip behind (the runtime only consumes it at
|
|
68
|
+
// boot), which would satisfy the check even when THIS upload
|
|
69
|
+
// failed. So any pre-existing zip is deleted up front — after
|
|
70
|
+
// that, post-transfer presence can only be produced by this run's
|
|
71
|
+
// upload.
|
|
72
|
+
//
|
|
73
|
+
// NOTE: deviceProjectRootPath is `.../LiveSync/app` (the extracted
|
|
74
|
+
// app folder); the zip is uploaded one level up, at the LiveSync
|
|
75
|
+
// root — the listing targets THAT directory.
|
|
76
|
+
//
|
|
77
|
+
// Escape hatch: NS_SKIP_IOS_SYNC_VERIFICATION=1 disables the
|
|
78
|
+
// whole verification for exotic setups where directory listing
|
|
79
|
+
// misbehaves but uploads are known-good.
|
|
80
|
+
const syncZipDevicePath = deviceAppData.deviceSyncZipPath;
|
|
81
|
+
const verificationSupported = !!device.fileSystem.getDirectoryEntries &&
|
|
82
|
+
process.env.NS_SKIP_IOS_SYNC_VERIFICATION !== "1";
|
|
83
|
+
const listLiveSyncRoot = () => device.fileSystem.getDirectoryEntries(constants_2.LiveSyncPaths.IOS_DEVICE_PROJECT_ROOT_PATH, deviceAppData.appIdentifier);
|
|
84
|
+
// Entry shape: ios-device-lib's native `read_dir` recursively joins
|
|
85
|
+
// `<requested dir>/<entry>` and returns FULL paths rooted at the
|
|
86
|
+
// requested directory (verified against IOSDeviceLib.cpp and live
|
|
87
|
+
// device output), so the canonical match is exact equality with
|
|
88
|
+
// `Library/Application Support/LiveSync/sync.zip`. The bare
|
|
89
|
+
// `"sync.zip"` equality is defensive cover for listing
|
|
90
|
+
// implementations that return root-relative names. Deliberately NO
|
|
91
|
+
// suffix matching — `endsWith("/sync.zip")` would false-positively
|
|
92
|
+
// accept a nested app asset like `.../LiveSync/app/sync.zip`.
|
|
93
|
+
const containsSyncZip = (entries) => entries.some((entry) => entry === syncZipDevicePath || entry === "sync.zip");
|
|
94
|
+
// "delivered" / "missing" are definitive listings; "unknown" means
|
|
95
|
+
// the listing itself could not be read (after one retry).
|
|
96
|
+
const checkDelivery = async () => {
|
|
97
|
+
let entries = await listLiveSyncRoot();
|
|
98
|
+
if (entries === null) {
|
|
99
|
+
entries = await listLiveSyncRoot();
|
|
100
|
+
}
|
|
101
|
+
if (entries === null) {
|
|
102
|
+
return "unknown";
|
|
103
|
+
}
|
|
104
|
+
return containsSyncZip(entries) ? "delivered" : "missing";
|
|
105
|
+
};
|
|
106
|
+
let preListingAvailable = false;
|
|
107
|
+
let leftoverZipPresent = false;
|
|
108
|
+
if (verificationSupported) {
|
|
109
|
+
// Clear any leftover zip so the post-transfer check attributes
|
|
110
|
+
// presence to this run. Best-effort: AFC "file not found" is
|
|
111
|
+
// tolerated inside deleteFile.
|
|
112
|
+
await device.fileSystem.deleteFile(syncZipDevicePath, deviceAppData.appIdentifier);
|
|
113
|
+
const preEntries = await listLiveSyncRoot();
|
|
114
|
+
preListingAvailable = Array.isArray(preEntries);
|
|
115
|
+
leftoverZipPresent = preListingAvailable && containsSyncZip(preEntries);
|
|
116
|
+
}
|
|
117
|
+
await transferSyncZip();
|
|
118
|
+
if (verificationSupported) {
|
|
119
|
+
if (leftoverZipPresent) {
|
|
120
|
+
// The pre-transfer delete did not take effect, so presence
|
|
121
|
+
// can no longer be attributed to this run. Most likely the
|
|
122
|
+
// upload succeeded too, but say so explicitly rather than
|
|
123
|
+
// claim verification.
|
|
124
|
+
this.$logger.warn("A leftover sync.zip from a previous run could not be removed — delivery verification for this sync is inconclusive. " +
|
|
125
|
+
"If the app runs stale code, re-run the command or use a clean rebuild (--clean).");
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
let state = await checkDelivery();
|
|
129
|
+
if (state === "missing") {
|
|
130
|
+
this.$logger.warn("sync.zip was not found on the device after transfer — retrying once...");
|
|
131
|
+
await transferSyncZip();
|
|
132
|
+
state = await checkDelivery();
|
|
133
|
+
if (state === "delivered") {
|
|
134
|
+
this.$logger.info("sync.zip delivered on retry.");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (state === "missing") {
|
|
138
|
+
throw new Error(`Unable to deliver the application payload (sync.zip) to device ${device.deviceInfo.identifier}. ` +
|
|
139
|
+
`The app would run stale JavaScript without it. ` +
|
|
140
|
+
`Re-run the command, or use a clean rebuild (--clean) to reinstall the full application package.`);
|
|
141
|
+
}
|
|
142
|
+
if (state === "unknown") {
|
|
143
|
+
if (preListingAvailable) {
|
|
144
|
+
// The listing worked moments before the upload and
|
|
145
|
+
// broke right after it — the AFC session is
|
|
146
|
+
// misbehaving at exactly the point where the upload
|
|
147
|
+
// itself is suspect. Fail closed.
|
|
148
|
+
throw new Error(`Unable to confirm delivery of the application payload (sync.zip) to device ${device.deviceInfo.identifier}: ` +
|
|
149
|
+
`the device directory listing failed right after the transfer. ` +
|
|
150
|
+
`Re-run the command, or use a clean rebuild (--clean) to reinstall the full application package. ` +
|
|
151
|
+
`(Set NS_SKIP_IOS_SYNC_VERIFICATION=1 to bypass delivery verification.)`);
|
|
152
|
+
}
|
|
153
|
+
// Listing was unavailable both before and after the
|
|
154
|
+
// transfer — verification is unsupported for this
|
|
155
|
+
// device/session. This is the single fail-open path,
|
|
156
|
+
// and it is loud rather than silent.
|
|
157
|
+
this.$logger.warn("Could not verify sync.zip delivery (device directory listing unavailable). " +
|
|
158
|
+
"If the transfer failed, the app will run stale JavaScript — re-run the command or use a clean rebuild (--clean).");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
51
162
|
await deviceAppData.device.applicationManager.setTransferredAppFiles(filesToTransfer);
|
|
52
163
|
return {
|
|
53
164
|
deviceAppData,
|
|
@@ -18,10 +18,11 @@ const yok_1 = require("../common/yok");
|
|
|
18
18
|
const semver = require("semver");
|
|
19
19
|
const package_path_helper_1 = require("../helpers/package-path-helper");
|
|
20
20
|
class ProjectDataService {
|
|
21
|
-
constructor($fs, $staticConfig, $logger, $devicePlatformsConstants, $androidResourcesMigrationService, $injector) {
|
|
21
|
+
constructor($fs, $staticConfig, $logger, $projectData, $devicePlatformsConstants, $androidResourcesMigrationService, $injector) {
|
|
22
22
|
this.$fs = $fs;
|
|
23
23
|
this.$staticConfig = $staticConfig;
|
|
24
24
|
this.$logger = $logger;
|
|
25
|
+
this.$projectData = $projectData;
|
|
25
26
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
26
27
|
this.$androidResourcesMigrationService = $androidResourcesMigrationService;
|
|
27
28
|
this.$injector = $injector;
|
|
@@ -373,20 +374,20 @@ class ProjectDataService {
|
|
|
373
374
|
return this.getInstalledRuntimePackage(projectDir, platform);
|
|
374
375
|
}
|
|
375
376
|
getInstalledRuntimePackage(projectDir, platform) {
|
|
377
|
+
var _a, _b, _c, _d;
|
|
376
378
|
const runtimePackage = this.$pluginsService
|
|
377
379
|
.getDependenciesFromPackageJson(projectDir)
|
|
378
380
|
.devDependencies.find((d) => {
|
|
381
|
+
var _a, _b, _c, _d;
|
|
379
382
|
if (platform === "ios" /* constants.PlatformTypes.ios */) {
|
|
380
|
-
|
|
381
|
-
constants.SCOPED_IOS_RUNTIME_NAME
|
|
382
|
-
|
|
383
|
-
].includes(d.name);
|
|
383
|
+
const packageName = ((_b = (_a = this.$projectData.nsConfig) === null || _a === void 0 ? void 0 : _a.ios) === null || _b === void 0 ? void 0 : _b.runtimePackageName) ||
|
|
384
|
+
constants.SCOPED_IOS_RUNTIME_NAME;
|
|
385
|
+
return [packageName, constants.TNS_IOS_RUNTIME_NAME].includes(d.name);
|
|
384
386
|
}
|
|
385
387
|
else if (platform === "android" /* constants.PlatformTypes.android */) {
|
|
386
|
-
|
|
387
|
-
constants.SCOPED_ANDROID_RUNTIME_NAME
|
|
388
|
-
|
|
389
|
-
].includes(d.name);
|
|
388
|
+
const packageName = ((_d = (_c = this.$projectData.nsConfig) === null || _c === void 0 ? void 0 : _c.android) === null || _d === void 0 ? void 0 : _d.runtimePackageName) ||
|
|
389
|
+
constants.SCOPED_ANDROID_RUNTIME_NAME;
|
|
390
|
+
return [packageName, constants.TNS_ANDROID_RUNTIME_NAME].includes(d.name);
|
|
390
391
|
}
|
|
391
392
|
else if (platform === "visionos" /* constants.PlatformTypes.visionos */) {
|
|
392
393
|
return d.name === constants.SCOPED_VISIONOS_RUNTIME_NAME;
|
|
@@ -424,13 +425,15 @@ class ProjectDataService {
|
|
|
424
425
|
this.$logger.trace("Could not find an installed runtime, falling back to default runtimes");
|
|
425
426
|
if (platform === "ios" /* constants.PlatformTypes.ios */) {
|
|
426
427
|
return {
|
|
427
|
-
name:
|
|
428
|
+
name: ((_b = (_a = this.$projectData.nsConfig) === null || _a === void 0 ? void 0 : _a.ios) === null || _b === void 0 ? void 0 : _b.runtimePackageName) ||
|
|
429
|
+
constants.SCOPED_IOS_RUNTIME_NAME,
|
|
428
430
|
version: null,
|
|
429
431
|
};
|
|
430
432
|
}
|
|
431
433
|
else if (platform === "android" /* constants.PlatformTypes.android */) {
|
|
432
434
|
return {
|
|
433
|
-
name:
|
|
435
|
+
name: ((_d = (_c = this.$projectData.nsConfig) === null || _c === void 0 ? void 0 : _c.android) === null || _d === void 0 ? void 0 : _d.runtimePackageName) ||
|
|
436
|
+
constants.SCOPED_ANDROID_RUNTIME_NAME,
|
|
434
437
|
version: null,
|
|
435
438
|
};
|
|
436
439
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "9.1.0-alpha.
|
|
4
|
+
"version": "9.1.0-alpha.8",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@nativescript/doctor": "2.0.17",
|
|
59
59
|
"@nativescript/hook": "3.0.5",
|
|
60
60
|
"@npmcli/arborist": "9.1.8",
|
|
61
|
-
"@nstudio/trapezedev-project": "7.2.
|
|
61
|
+
"@nstudio/trapezedev-project": "7.2.3",
|
|
62
62
|
"@rigor789/resolve-package-path": "1.0.7",
|
|
63
63
|
"axios": "1.13.5",
|
|
64
64
|
"byline": "5.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"email-validator": "2.0.4",
|
|
71
71
|
"esprima": "4.0.1",
|
|
72
72
|
"font-finder": "1.1.0",
|
|
73
|
-
"ios-device-lib": "0.9.
|
|
73
|
+
"ios-device-lib": "0.9.4",
|
|
74
74
|
"ios-mobileprovision-finder": "1.2.1",
|
|
75
75
|
"ios-sim-portable": "4.5.1",
|
|
76
76
|
"jimp": "1.6.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"minimatch": "10.2.4",
|
|
82
82
|
"mkdirp": "3.0.1",
|
|
83
83
|
"mute-stream": "2.0.0",
|
|
84
|
-
"nativescript-dev-xcode": "0.8.
|
|
84
|
+
"nativescript-dev-xcode": "0.8.1",
|
|
85
85
|
"open": "8.4.2",
|
|
86
86
|
"ora": "5.4.1",
|
|
87
87
|
"pacote": "21.0.4",
|
|
@@ -162,9 +162,6 @@
|
|
|
162
162
|
"optionalDependencies": {
|
|
163
163
|
"fsevents": "*"
|
|
164
164
|
},
|
|
165
|
-
"bundleDependencies": [
|
|
166
|
-
"universal-analytics"
|
|
167
|
-
],
|
|
168
165
|
"overrides": {
|
|
169
166
|
"@conventional-changelog/git-client": "2.5.1",
|
|
170
167
|
"uuid": "11.1.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
-
Copyright (c) 2018-2021 Josh Junon
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
7
|
-
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
|
8
|
-
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
9
|
-
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
13
|
-
portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
16
|
-
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
17
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
18
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
-
|