nativescript 8.6.2-vision.8 → 8.6.3
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/test-deps-versions-generated.json +1 -1
- package/lib/bootstrap.js +0 -4
- package/lib/commands/create-project.js +9 -69
- package/lib/commands/run.js +4 -21
- package/lib/common/definitions/mobile.d.ts +0 -11
- package/lib/common/mobile/device-platforms-constants.js +0 -10
- package/lib/common/mobile/emulator-helper.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +1 -8
- package/lib/common/mobile/log-filter.js +1 -3
- package/lib/common/mobile/mobile-core/devices-service.js +5 -18
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -7
- package/lib/common/mobile/mobile-helper.js +0 -12
- package/lib/constants.js +4 -11
- package/lib/controllers/prepare-controller.js +1 -1
- package/lib/data/build-data.js +0 -1
- package/lib/declarations.d.ts +0 -8
- package/lib/definitions/build.d.ts +0 -1
- package/lib/definitions/project.d.ts +0 -5
- package/lib/device-path-provider.js +2 -2
- package/lib/helpers/livesync-command-helper.js +3 -3
- package/lib/options.js +1 -7
- package/lib/package-installation-manager.js +3 -15
- package/lib/project-data.js +0 -6
- package/lib/resolvers/livesync-service-resolver.js +1 -1
- package/lib/services/build-data-service.js +1 -1
- package/lib/services/ios/spm-service.js +7 -7
- package/lib/services/ios/xcodebuild-args-service.js +5 -16
- package/lib/services/ios-project-service.js +13 -41
- package/lib/services/platform-environment-requirements.js +1 -3
- package/lib/services/platforms-data-service.js +1 -6
- package/lib/services/plugins-service.js +1 -6
- package/lib/services/prepare-data-service.js +1 -1
- package/lib/services/project-changes-service.js +1 -6
- package/lib/services/project-data-service.js +0 -9
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/stringify-package/CHANGELOG.md +16 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"@jsdevtools/coverage-istanbul-loader":"3.0.5","karma":"6.4.2","karma-coverage":"2.2.1","karma-nativescript-launcher":"0.4.0","mocha":"10.2.0","karma-mocha":"2.0.1","karma-chai":"0.1.0","karma-jasmine":"4.0.2","karma-qunit":"4.1.2","@types/karma-chai":"0.1.
|
|
1
|
+
{"@jsdevtools/coverage-istanbul-loader":"3.0.5","karma":"6.4.2","karma-coverage":"2.2.1","karma-nativescript-launcher":"0.4.0","mocha":"10.2.0","karma-mocha":"2.0.1","karma-chai":"0.1.0","karma-jasmine":"4.0.2","karma-qunit":"4.1.2","@types/karma-chai":"0.1.6","@types/mocha":"10.0.6","@types/jasmine":"5.1.4","@types/qunit":"2.19.9","nyc":"15.1.0"}
|
package/lib/bootstrap.js
CHANGED
|
@@ -78,14 +78,10 @@ yok_1.injector.requireCommand("platform|update", "./commands/update-platform");
|
|
|
78
78
|
yok_1.injector.requireCommand("run|*all", "./commands/run");
|
|
79
79
|
yok_1.injector.requireCommand("run|ios", "./commands/run");
|
|
80
80
|
yok_1.injector.requireCommand("run|android", "./commands/run");
|
|
81
|
-
yok_1.injector.requireCommand("run|vision", "./commands/run");
|
|
82
|
-
yok_1.injector.requireCommand("run|visionos", "./commands/run");
|
|
83
81
|
yok_1.injector.requireCommand("typings", "./commands/typings");
|
|
84
82
|
yok_1.injector.requireCommand("preview", "./commands/preview");
|
|
85
83
|
yok_1.injector.requireCommand("debug|ios", "./commands/debug");
|
|
86
84
|
yok_1.injector.requireCommand("debug|android", "./commands/debug");
|
|
87
|
-
yok_1.injector.requireCommand("debug|vision", "./commands/debug");
|
|
88
|
-
yok_1.injector.requireCommand("debug|visionos", "./commands/debug");
|
|
89
85
|
yok_1.injector.requireCommand("fonts", "./commands/fonts");
|
|
90
86
|
yok_1.injector.requireCommand("prepare", "./commands/prepare");
|
|
91
87
|
yok_1.injector.requireCommand("build|ios", "./commands/build");
|
|
@@ -65,21 +65,6 @@ class CreateProjectCommand {
|
|
|
65
65
|
else if (this.$options.svelte) {
|
|
66
66
|
selectedTemplate = constants.SVELTE_NAME;
|
|
67
67
|
}
|
|
68
|
-
else if (this.$options["vision-ng"]) {
|
|
69
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-ng"];
|
|
70
|
-
}
|
|
71
|
-
else if (this.$options["vision-react"]) {
|
|
72
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-react"];
|
|
73
|
-
}
|
|
74
|
-
else if (this.$options["vision-solid"]) {
|
|
75
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-solid"];
|
|
76
|
-
}
|
|
77
|
-
else if (this.$options["vision-svelte"]) {
|
|
78
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-svelte"];
|
|
79
|
-
}
|
|
80
|
-
else if (this.$options["vision-vue"]) {
|
|
81
|
-
selectedTemplate = constants.RESERVED_TEMPLATE_NAMES["vision-vue"];
|
|
82
|
-
}
|
|
83
68
|
else {
|
|
84
69
|
selectedTemplate = this.$options.template;
|
|
85
70
|
}
|
|
@@ -237,11 +222,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
237
222
|
value: "@nativescript/template-tab-navigation-ts",
|
|
238
223
|
description: CreateProjectCommand.TabsTemplateDescription,
|
|
239
224
|
},
|
|
240
|
-
{
|
|
241
|
-
key: CreateProjectCommand.BlankVisionTemplateKey,
|
|
242
|
-
value: "@nativescript/template-hello-world-ts-vision",
|
|
243
|
-
description: CreateProjectCommand.BlankVisionTemplateDescription,
|
|
244
|
-
},
|
|
245
225
|
];
|
|
246
226
|
return templates;
|
|
247
227
|
}
|
|
@@ -262,11 +242,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
262
242
|
value: "@nativescript/template-tab-navigation-ng",
|
|
263
243
|
description: CreateProjectCommand.TabsTemplateDescription,
|
|
264
244
|
},
|
|
265
|
-
{
|
|
266
|
-
key: CreateProjectCommand.BlankVisionTemplateKey,
|
|
267
|
-
value: "@nativescript/template-hello-world-ng-vision",
|
|
268
|
-
description: CreateProjectCommand.BlankVisionTemplateDescription,
|
|
269
|
-
},
|
|
270
245
|
];
|
|
271
246
|
return templates;
|
|
272
247
|
}
|
|
@@ -277,11 +252,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
277
252
|
value: constants.RESERVED_TEMPLATE_NAMES.react,
|
|
278
253
|
description: CreateProjectCommand.HelloWorldTemplateDescription,
|
|
279
254
|
},
|
|
280
|
-
{
|
|
281
|
-
key: CreateProjectCommand.BlankVisionTemplateKey,
|
|
282
|
-
value: "@nativescript/template-blank-react-vision",
|
|
283
|
-
description: CreateProjectCommand.BlankVisionTemplateDescription,
|
|
284
|
-
},
|
|
285
255
|
];
|
|
286
256
|
return templates;
|
|
287
257
|
}
|
|
@@ -292,11 +262,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
292
262
|
value: constants.RESERVED_TEMPLATE_NAMES.svelte,
|
|
293
263
|
description: CreateProjectCommand.HelloWorldTemplateDescription,
|
|
294
264
|
},
|
|
295
|
-
{
|
|
296
|
-
key: CreateProjectCommand.BlankVisionTemplateKey,
|
|
297
|
-
value: "@nativescript/template-blank-svelte-vision",
|
|
298
|
-
description: CreateProjectCommand.BlankVisionTemplateDescription,
|
|
299
|
-
},
|
|
300
265
|
];
|
|
301
266
|
return templates;
|
|
302
267
|
}
|
|
@@ -322,11 +287,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
322
287
|
value: "@nativescript/template-tab-navigation-vue",
|
|
323
288
|
description: CreateProjectCommand.TabsTemplateDescription,
|
|
324
289
|
},
|
|
325
|
-
{
|
|
326
|
-
key: CreateProjectCommand.BlankVisionTemplateKey,
|
|
327
|
-
value: "@nativescript/template-blank-vue-vision",
|
|
328
|
-
description: CreateProjectCommand.BlankVisionTemplateDescription,
|
|
329
|
-
},
|
|
330
290
|
];
|
|
331
291
|
return templates;
|
|
332
292
|
}
|
|
@@ -336,32 +296,6 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
336
296
|
const relativePath = path.relative(process.cwd(), projectDir);
|
|
337
297
|
const greyDollarSign = color_1.color.grey("$");
|
|
338
298
|
this.$logger.clearScreen();
|
|
339
|
-
let runDebugNotes = [];
|
|
340
|
-
if (this.$options.vision ||
|
|
341
|
-
this.$options["vision-ng"] ||
|
|
342
|
-
this.$options["vision-react"] ||
|
|
343
|
-
this.$options["vision-solid"] ||
|
|
344
|
-
this.$options["vision-svelte"] ||
|
|
345
|
-
this.$options["vision-vue"]) {
|
|
346
|
-
runDebugNotes = [
|
|
347
|
-
`Run the project on Vision Pro with:`,
|
|
348
|
-
"",
|
|
349
|
-
` ${greyDollarSign} ${color_1.color.green("ns run visionos --no-hmr")}`,
|
|
350
|
-
];
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
runDebugNotes = [
|
|
354
|
-
`Run the project on multiple devices:`,
|
|
355
|
-
"",
|
|
356
|
-
` ${greyDollarSign} ${color_1.color.green("ns run ios")}`,
|
|
357
|
-
` ${greyDollarSign} ${color_1.color.green("ns run android")}`,
|
|
358
|
-
"",
|
|
359
|
-
"Debug the project with Chrome DevTools:",
|
|
360
|
-
"",
|
|
361
|
-
` ${greyDollarSign} ${color_1.color.green("ns debug ios")}`,
|
|
362
|
-
` ${greyDollarSign} ${color_1.color.green("ns debug android")}`,
|
|
363
|
-
];
|
|
364
|
-
}
|
|
365
299
|
this.$logger.info([
|
|
366
300
|
[
|
|
367
301
|
color_1.color.green(`Project`),
|
|
@@ -371,7 +305,15 @@ can skip this prompt next time using the --template option, or the --ng, --react
|
|
|
371
305
|
"",
|
|
372
306
|
`Now you can navigate to your project with ${color_1.color.cyan(`cd ${relativePath}`)} and then:`,
|
|
373
307
|
"",
|
|
374
|
-
|
|
308
|
+
`Run the project on multiple devices:`,
|
|
309
|
+
"",
|
|
310
|
+
` ${greyDollarSign} ${color_1.color.green("ns run ios")}`,
|
|
311
|
+
` ${greyDollarSign} ${color_1.color.green("ns run android")}`,
|
|
312
|
+
"",
|
|
313
|
+
"Debug the project with Chrome DevTools:",
|
|
314
|
+
"",
|
|
315
|
+
` ${greyDollarSign} ${color_1.color.green("ns debug ios")}`,
|
|
316
|
+
` ${greyDollarSign} ${color_1.color.green("ns debug android")}`,
|
|
375
317
|
``,
|
|
376
318
|
`For more options consult the docs or run ${color_1.color.green("ns --help")}`,
|
|
377
319
|
"",
|
|
@@ -383,8 +325,6 @@ CreateProjectCommand.BlankTemplateKey = "Blank";
|
|
|
383
325
|
CreateProjectCommand.BlankTemplateDescription = "A blank app";
|
|
384
326
|
CreateProjectCommand.BlankTsTemplateKey = "Blank Typescript";
|
|
385
327
|
CreateProjectCommand.BlankTsTemplateDescription = "A blank typescript app";
|
|
386
|
-
CreateProjectCommand.BlankVisionTemplateKey = "visionOS";
|
|
387
|
-
CreateProjectCommand.BlankVisionTemplateDescription = "A visionOS app";
|
|
388
328
|
CreateProjectCommand.HelloWorldTemplateKey = "Hello World";
|
|
389
329
|
CreateProjectCommand.HelloWorldTemplateDescription = "A Hello World app";
|
|
390
330
|
CreateProjectCommand.DrawerTemplateKey = "SideDrawer";
|
package/lib/commands/run.js
CHANGED
|
@@ -15,7 +15,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.RunAndroidCommand = exports.RunIosCommand = exports.RunCommandBase = void 0;
|
|
19
19
|
const constants_1 = require("../common/constants");
|
|
20
20
|
const decorators_1 = require("../common/decorators");
|
|
21
21
|
const helpers_1 = require("../common/helpers");
|
|
@@ -97,11 +97,11 @@ class RunIosCommand {
|
|
|
97
97
|
canExecute(args) {
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
const projectData = this.$projectDataService.getProjectData();
|
|
100
|
-
if (!this.$platformValidationService.isPlatformSupportedForOS(this.
|
|
101
|
-
this.$errors.fail(`Applications for platform ${this.
|
|
100
|
+
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, projectData)) {
|
|
101
|
+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
|
|
102
102
|
}
|
|
103
103
|
const result = (yield this.runCommand.canExecute(args)) &&
|
|
104
|
-
(yield this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.
|
|
104
|
+
(yield this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.$devicePlatformsConstants.iOS.toLowerCase()));
|
|
105
105
|
return result;
|
|
106
106
|
});
|
|
107
107
|
}
|
|
@@ -158,20 +158,3 @@ __decorate([
|
|
|
158
158
|
], RunAndroidCommand.prototype, "runCommand", null);
|
|
159
159
|
exports.RunAndroidCommand = RunAndroidCommand;
|
|
160
160
|
yok_1.injector.registerCommand("run|android", RunAndroidCommand);
|
|
161
|
-
class RunVisionOSCommand extends RunIosCommand {
|
|
162
|
-
get platform() {
|
|
163
|
-
return this.$devicePlatformsConstants.visionOS;
|
|
164
|
-
}
|
|
165
|
-
constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectDataService) {
|
|
166
|
-
super($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectDataService);
|
|
167
|
-
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
168
|
-
this.$errors = $errors;
|
|
169
|
-
this.$injector = $injector;
|
|
170
|
-
this.$options = $options;
|
|
171
|
-
this.$platformValidationService = $platformValidationService;
|
|
172
|
-
this.$projectDataService = $projectDataService;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
exports.RunVisionOSCommand = RunVisionOSCommand;
|
|
176
|
-
yok_1.injector.registerCommand("run|vision", RunVisionOSCommand);
|
|
177
|
-
yok_1.injector.registerCommand("run|visionos", RunVisionOSCommand);
|
|
@@ -1037,10 +1037,6 @@ declare global {
|
|
|
1037
1037
|
* The state of the simulator. Can be 'Shutdown' or 'Booted'
|
|
1038
1038
|
*/
|
|
1039
1039
|
state?: string;
|
|
1040
|
-
/**
|
|
1041
|
-
* The platform of the device (iOS, visionOS)
|
|
1042
|
-
*/
|
|
1043
|
-
platform?: string;
|
|
1044
1040
|
}
|
|
1045
1041
|
|
|
1046
1042
|
interface IiOSSimResolver {
|
|
@@ -1196,8 +1192,6 @@ declare global {
|
|
|
1196
1192
|
platformNames: string[];
|
|
1197
1193
|
isAndroidPlatform(platform: string): boolean;
|
|
1198
1194
|
isiOSPlatform(platform: string): boolean;
|
|
1199
|
-
isvisionOSPlatform(platform: string): boolean;
|
|
1200
|
-
isApplePlatfrom(platform: string): boolean;
|
|
1201
1195
|
normalizePlatformName(platform: string): string;
|
|
1202
1196
|
validatePlatformName(platform: string): string;
|
|
1203
1197
|
buildDevicePath(...args: string[]): string;
|
|
@@ -1240,11 +1234,6 @@ declare global {
|
|
|
1240
1234
|
interface IDevicePlatformsConstants {
|
|
1241
1235
|
iOS: string;
|
|
1242
1236
|
Android: string;
|
|
1243
|
-
visionOS: string;
|
|
1244
|
-
|
|
1245
|
-
isiOS(value: string): boolean;
|
|
1246
|
-
isAndroid(value: string): boolean;
|
|
1247
|
-
isvisionOS(value: string): boolean;
|
|
1248
1237
|
}
|
|
1249
1238
|
|
|
1250
1239
|
interface IDeviceApplication {
|
|
@@ -6,16 +6,6 @@ class DevicePlatformsConstants {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.iOS = "iOS";
|
|
8
8
|
this.Android = "Android";
|
|
9
|
-
this.visionOS = "visionOS";
|
|
10
|
-
}
|
|
11
|
-
isiOS(value) {
|
|
12
|
-
return value.toLowerCase() === this.iOS.toLowerCase();
|
|
13
|
-
}
|
|
14
|
-
isAndroid(value) {
|
|
15
|
-
return value.toLowerCase() === this.Android.toLowerCase();
|
|
16
|
-
}
|
|
17
|
-
isvisionOS(value) {
|
|
18
|
-
return value.toLowerCase() === this.visionOS.toLowerCase();
|
|
19
9
|
}
|
|
20
10
|
}
|
|
21
11
|
exports.DevicePlatformsConstants = DevicePlatformsConstants;
|
|
@@ -22,15 +22,9 @@ class IosEmulatorServices {
|
|
|
22
22
|
this.$mobileHelper = $mobileHelper;
|
|
23
23
|
}
|
|
24
24
|
startEmulator(options) {
|
|
25
|
-
var _a;
|
|
26
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
26
|
let error = null;
|
|
28
27
|
try {
|
|
29
|
-
if (options.platform === this.$devicePlatformsConstants.visionOS &&
|
|
30
|
-
!options.emulatorIdOrName) {
|
|
31
|
-
const { devices } = yield this.tryGetiOSSimDevices();
|
|
32
|
-
options.emulatorIdOrName = (_a = devices.find((device) => device.platform === this.$devicePlatformsConstants.visionOS)) === null || _a === void 0 ? void 0 : _a.id;
|
|
33
|
-
}
|
|
34
28
|
yield this.$iOSSimResolver.iOSSim.startSimulator({
|
|
35
29
|
device: options.imageIdentifier || options.emulatorIdOrName,
|
|
36
30
|
state: "None",
|
|
@@ -117,7 +111,6 @@ class IosEmulatorServices {
|
|
|
117
111
|
});
|
|
118
112
|
}
|
|
119
113
|
convertSimDeviceToDeviceInfo(simDevice) {
|
|
120
|
-
var _a;
|
|
121
114
|
return {
|
|
122
115
|
imageIdentifier: simDevice.id,
|
|
123
116
|
identifier: simDevice.id,
|
|
@@ -132,7 +125,7 @@ class IosEmulatorServices {
|
|
|
132
125
|
isTablet: this.$mobileHelper.isiOSTablet(simDevice.name),
|
|
133
126
|
type: constants_1.DeviceTypes.Emulator,
|
|
134
127
|
connectionTypes: [constants_2.DeviceConnectionType.Local],
|
|
135
|
-
platform:
|
|
128
|
+
platform: this.$devicePlatformsConstants.iOS,
|
|
136
129
|
};
|
|
137
130
|
}
|
|
138
131
|
}
|
|
@@ -29,9 +29,7 @@ class LogFilter {
|
|
|
29
29
|
getDeviceLogFilterInstance(platform) {
|
|
30
30
|
if (platform) {
|
|
31
31
|
if (platform.toLowerCase() ===
|
|
32
|
-
this.$devicePlatformsConstants.iOS.toLowerCase()
|
|
33
|
-
platform.toLowerCase() ===
|
|
34
|
-
this.$devicePlatformsConstants.visionOS.toLowerCase()) {
|
|
32
|
+
this.$devicePlatformsConstants.iOS.toLowerCase()) {
|
|
35
33
|
return this.$injector.resolve("iOSLogFilter");
|
|
36
34
|
}
|
|
37
35
|
else if (platform.toLowerCase() ===
|
|
@@ -29,7 +29,7 @@ const helpers = require("../../helpers");
|
|
|
29
29
|
const helpers_1 = require("../../helpers");
|
|
30
30
|
const yok_1 = require("../../yok");
|
|
31
31
|
class DevicesService extends events_1.EventEmitter {
|
|
32
|
-
constructor($logger, $errors, $iOSSimulatorDiscovery, $iOSDeviceDiscovery, $androidDeviceDiscovery, $staticConfig, $messages, $mobileHelper, $deviceLogProvider, $hostInfo, $injector, $options, $androidProcessService, $iOSEmulatorServices, $androidEmulatorServices, $androidEmulatorDiscovery, $emulatorHelper, $prompter
|
|
32
|
+
constructor($logger, $errors, $iOSSimulatorDiscovery, $iOSDeviceDiscovery, $androidDeviceDiscovery, $staticConfig, $messages, $mobileHelper, $deviceLogProvider, $hostInfo, $injector, $options, $androidProcessService, $iOSEmulatorServices, $androidEmulatorServices, $androidEmulatorDiscovery, $emulatorHelper, $prompter) {
|
|
33
33
|
super();
|
|
34
34
|
this.$logger = $logger;
|
|
35
35
|
this.$errors = $errors;
|
|
@@ -49,7 +49,6 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
49
49
|
this.$androidEmulatorDiscovery = $androidEmulatorDiscovery;
|
|
50
50
|
this.$emulatorHelper = $emulatorHelper;
|
|
51
51
|
this.$prompter = $prompter;
|
|
52
|
-
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
53
52
|
this._devices = {};
|
|
54
53
|
this._availableEmulators = {};
|
|
55
54
|
this._isInitialized = false;
|
|
@@ -200,12 +199,7 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
200
199
|
}));
|
|
201
200
|
}
|
|
202
201
|
getDeviceInstances() {
|
|
203
|
-
return _.values(this._devices)
|
|
204
|
-
var _a;
|
|
205
|
-
const simPlatform = (_a = device.simulator) === null || _a === void 0 ? void 0 : _a.platform;
|
|
206
|
-
device.deviceInfo.platform = simPlatform !== null && simPlatform !== void 0 ? simPlatform : device.deviceInfo.platform;
|
|
207
|
-
return device;
|
|
208
|
-
});
|
|
202
|
+
return _.values(this._devices);
|
|
209
203
|
}
|
|
210
204
|
getInstalledApplications(deviceIdentifier) {
|
|
211
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -338,7 +332,7 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
338
332
|
}
|
|
339
333
|
getDeviceByIdentifier(identifier) {
|
|
340
334
|
const searchedDevice = _.find(this.getDeviceInstances(), (device) => {
|
|
341
|
-
if (this.$mobileHelper.
|
|
335
|
+
if (this.$mobileHelper.isiOSPlatform(device.deviceInfo.platform) &&
|
|
342
336
|
device.isEmulator) {
|
|
343
337
|
return (device.deviceInfo.identifier === identifier ||
|
|
344
338
|
device.deviceInfo.displayName === identifier);
|
|
@@ -502,7 +496,7 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
502
496
|
const deviceInstances = this.getDeviceInstances();
|
|
503
497
|
if (!deviceInitOpts.deviceId && _.isEmpty(deviceInstances)) {
|
|
504
498
|
if (!this.$hostInfo.isDarwin &&
|
|
505
|
-
this.$mobileHelper.
|
|
499
|
+
this.$mobileHelper.isiOSPlatform(deviceInitOpts.platform)) {
|
|
506
500
|
this.$errors.fail(constants.ERROR_NO_DEVICES_CANT_USE_IOS_SIMULATOR);
|
|
507
501
|
}
|
|
508
502
|
}
|
|
@@ -530,13 +524,6 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
530
524
|
}
|
|
531
525
|
}
|
|
532
526
|
}
|
|
533
|
-
if (data.platform === this.$devicePlatformsConstants.visionOS &&
|
|
534
|
-
deviceInstances.length) {
|
|
535
|
-
const runningDeviceInstance = deviceInstances.find((device) => device.deviceInfo.platform === this.$devicePlatformsConstants.visionOS);
|
|
536
|
-
if (!runningDeviceInstance) {
|
|
537
|
-
return this.startEmulatorCore(data);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
527
|
if (data.emulator && deviceInstances.length) {
|
|
541
528
|
const runningDeviceInstance = _.some(deviceInstances, (value) => value.isEmulator);
|
|
542
529
|
if (!runningDeviceInstance) {
|
|
@@ -715,7 +702,7 @@ class DevicesService extends events_1.EventEmitter {
|
|
|
715
702
|
}
|
|
716
703
|
resolveEmulatorServices(platform) {
|
|
717
704
|
platform = platform || this._platform;
|
|
718
|
-
if (this.$mobileHelper.
|
|
705
|
+
if (this.$mobileHelper.isiOSPlatform(platform)) {
|
|
719
706
|
return this.$injector.resolve("iOSEmulatorServices");
|
|
720
707
|
}
|
|
721
708
|
else if (this.$mobileHelper.isAndroidPlatform(platform)) {
|
|
@@ -14,26 +14,21 @@ const device_discovery_1 = require("./device-discovery");
|
|
|
14
14
|
const ios_device_1 = require("../ios/device/ios-device");
|
|
15
15
|
const yok_1 = require("../../yok");
|
|
16
16
|
class IOSDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
17
|
-
constructor($injector, $logger, $mobileHelper, $iosDeviceOperations
|
|
17
|
+
constructor($injector, $logger, $mobileHelper, $iosDeviceOperations) {
|
|
18
18
|
super();
|
|
19
19
|
this.$injector = $injector;
|
|
20
20
|
this.$logger = $logger;
|
|
21
21
|
this.$mobileHelper = $mobileHelper;
|
|
22
22
|
this.$iosDeviceOperations = $iosDeviceOperations;
|
|
23
|
-
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
24
23
|
}
|
|
25
24
|
startLookingForDevices(options) {
|
|
26
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
26
|
this.$logger.trace("Options for ios-device-discovery", options);
|
|
28
27
|
if (options &&
|
|
29
28
|
options.platform &&
|
|
30
|
-
(!this.$mobileHelper.
|
|
31
|
-
options.emulator)) {
|
|
29
|
+
(!this.$mobileHelper.isiOSPlatform(options.platform) || options.emulator)) {
|
|
32
30
|
return;
|
|
33
31
|
}
|
|
34
|
-
if (this.$mobileHelper.isvisionOSPlatform(options.platform)) {
|
|
35
|
-
options.platform = this.$devicePlatformsConstants.iOS;
|
|
36
|
-
}
|
|
37
32
|
yield this.$iosDeviceOperations.startLookingForDevices((deviceInfo) => {
|
|
38
33
|
const device = this.createDevice(deviceInfo);
|
|
39
34
|
this.addDevice(device);
|
|
@@ -25,7 +25,6 @@ class MobileHelper {
|
|
|
25
25
|
return [
|
|
26
26
|
this.$devicePlatformsConstants.iOS,
|
|
27
27
|
this.$devicePlatformsConstants.Android,
|
|
28
|
-
this.$devicePlatformsConstants.visionOS,
|
|
29
28
|
];
|
|
30
29
|
}
|
|
31
30
|
isAndroidPlatform(platform) {
|
|
@@ -38,14 +37,6 @@ class MobileHelper {
|
|
|
38
37
|
this.$devicePlatformsConstants.iOS.toLowerCase() ===
|
|
39
38
|
platform.toLowerCase());
|
|
40
39
|
}
|
|
41
|
-
isvisionOSPlatform(platform) {
|
|
42
|
-
return !!(platform &&
|
|
43
|
-
this.$devicePlatformsConstants.visionOS.toLowerCase() ===
|
|
44
|
-
platform.toLowerCase());
|
|
45
|
-
}
|
|
46
|
-
isApplePlatfrom(platform) {
|
|
47
|
-
return this.isiOSPlatform(platform) || this.isvisionOSPlatform(platform);
|
|
48
|
-
}
|
|
49
40
|
normalizePlatformName(platform) {
|
|
50
41
|
if (this.isAndroidPlatform(platform)) {
|
|
51
42
|
return "Android";
|
|
@@ -53,9 +44,6 @@ class MobileHelper {
|
|
|
53
44
|
else if (this.isiOSPlatform(platform)) {
|
|
54
45
|
return "iOS";
|
|
55
46
|
}
|
|
56
|
-
else if (this.isvisionOSPlatform(platform)) {
|
|
57
|
-
return "visionOS";
|
|
58
|
-
}
|
|
59
47
|
return undefined;
|
|
60
48
|
}
|
|
61
49
|
validatePlatformName(platform) {
|
package/lib/constants.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OUTPUTS_DIR = exports.BUILD_DIR = exports.BUILD_XCCONFIG_FILE_NAME = exports.INCLUDE_GRADLE_NAME = exports.INFO_PLIST_FILE_NAME = exports.APP_GRADLE_FILE_NAME = exports.MANIFEST_FILE_NAME = exports.ANDROID_ANALYTICS_DATA_FILE = exports.ANDROID_ANALYTICS_DATA_DIR = exports.FONTS_DIR = exports.ASSETS_DIR = exports.MAIN_DIR = exports.SRC_DIR = exports.AWAIT_NOTIFICATION_TIMEOUT_SECONDS = exports.CODE_SIGN_ENTITLEMENTS = exports.LIB_DIR_NAME = exports.KARMA_CONFIG_NAME = exports.TSCCONFIG_TNS_JSON_NAME = exports.WEBPACK_CONFIG_NAME = exports.HOOKS_DIR_NAME = exports.PLATFORMS_DIR_NAME = exports.XML_FILE_EXTENSION = exports.LIVESYNC_EXCLUDED_FILE_PATTERNS = exports.TEST_RUNNER_NAME = exports.TESTING_FRAMEWORKS = exports.LIVESYNC_EXCLUDED_DIRECTORIES = exports.DEFAULT_APP_IDENTIFIER_PREFIX = exports.NODE_MODULE_CACHE_PATH_KEY_NAME = exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = exports.PACKAGE_LOCK_JSON_FILE_NAME = exports.PACKAGE_JSON_FILE_NAME = exports.
|
|
4
|
-
exports.DEBUGGER_ATTACHED_EVENT_NAME = exports.USER_INTERACTION_NEEDED_EVENT_NAME = exports.CONNECTION_ERROR_EVENT_NAME = exports.BUILD_OUTPUT_EVENT_NAME = exports.ProjectTypes = exports.JsFlavorName = exports.TsFlavorName = exports.SvelteFlavorName = exports.ReactFlavorName = exports.VueFlavorName = exports.NgFlavorName = exports.SVELTE_NAME = exports.REACT_NAME = exports.TYPESCRIPT_NAME = exports.JAVASCRIPT_NAME = exports.ANGULAR_NAME = exports.VUE_NAME = exports.ItunesConnectApplicationTypes = exports.androidAppResourcesFolderName = exports.iOSAppResourcesFolderName = exports.ITMSConstants = exports.ANALYTICS_LOCAL_TEMPLATE_PREFIX = exports.RESERVED_TEMPLATE_NAMES = exports.ReleaseType = exports.SaveOptions = exports.TemplatesV2PackageJsonKeysToRemove = exports.PackageJsonKeysToKeep = exports.LiveSyncTrackActionNames = exports.PackageVersion = exports.MetadataFilteringConstants = exports.IOS_WATCHAPP_EXTENSION_FOLDER = exports.IOS_WATCHAPP_FOLDER = exports.NATIVE_EXTENSION_FOLDER = exports.APPLICATION_RESPONSE_TIMEOUT_SECONDS = exports.NATIVE_SOURCE_FOLDER = exports.TNS_NATIVE_SOURCE_GROUP_NAME = exports.HASHES_FILE_NAME = exports.APKS_EXTENSION_NAME = exports.AAB_EXTENSION_NAME = exports.APK_EXTENSION_NAME = exports.DEPENDENCIES_JSON_NAME = exports.CONFIG_FILE_NAME_TS = exports.CONFIG_FILE_NAME_JS = exports.CONFIG_FILE_NAME_DISPLAY = exports.CONFIG_NS_APP_ENTRY = exports.CONFIG_NS_APP_RESOURCES_ENTRY = exports.CONFIG_NS_FILE_NAME = exports.RESOURCES_DIR = exports.BUNDLE_DIR =
|
|
5
|
-
exports.PackageManagers = exports.EMIT_APPENDER_EVENT_NAME = exports.LoggerConfigData = exports.LoggerLevel = exports.DeviceConnectionType = exports.LoggerAppenders = exports.IOSNativeTargetTypes = exports.IOSNativeTargetProductTypes = exports.IOSDeviceTargets = exports.RunOnDeviceEvents = exports.AndroidAppBundleMessages = exports.AndroidBundleValidatorMessages = exports.BundleValidatorMessages = exports.IosProjectConstants = exports.EXTENSION_PROVISIONING_FILENAME = exports.PODFILE_NAME = exports.PLUGINS_BUILD_DATA_FILENAME = exports.PLUGIN_BUILD_DATA_FILENAME = exports.AddPlaformErrors = exports.PACKAGE_PLACEHOLDER_NAME = exports.AndroidBuildDefaults = exports.Hooks = exports.XcodeDeprecationStringFormat = exports.MacOSDeprecationStringFormat = exports.MacOSVersions = exports.AssetConstants = exports.CLI_RESOURCES_DIR_NAME = exports.NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = exports.AnalyticsEventLabelDelimiter = exports.DebugCommandErrors = exports.WEBPACK_COMPILATION_COMPLETE = exports.PREPARE_READY_EVENT_NAME = exports.INITIAL_SYNC_EVENT_NAME = exports.FILES_CHANGE_EVENT_NAME = exports.CACACHE_DIRECTORY_NAME = exports.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE = exports.ANDROID_RELEASE_BUILD_ERROR_MESSAGE = exports.POST_INSTALL_COMMAND_NAME = exports.INSPECTOR_CACHE_DIRNAME = exports.VERSION_STRING =
|
|
3
|
+
exports.APK_DIR = exports.OUTPUTS_DIR = exports.BUILD_DIR = exports.BUILD_XCCONFIG_FILE_NAME = exports.INCLUDE_GRADLE_NAME = exports.INFO_PLIST_FILE_NAME = exports.APP_GRADLE_FILE_NAME = exports.MANIFEST_FILE_NAME = exports.ANDROID_ANALYTICS_DATA_FILE = exports.ANDROID_ANALYTICS_DATA_DIR = exports.FONTS_DIR = exports.ASSETS_DIR = exports.MAIN_DIR = exports.SRC_DIR = exports.AWAIT_NOTIFICATION_TIMEOUT_SECONDS = exports.CODE_SIGN_ENTITLEMENTS = exports.LIB_DIR_NAME = exports.KARMA_CONFIG_NAME = exports.TSCCONFIG_TNS_JSON_NAME = exports.WEBPACK_CONFIG_NAME = exports.HOOKS_DIR_NAME = exports.PLATFORMS_DIR_NAME = exports.XML_FILE_EXTENSION = exports.LIVESYNC_EXCLUDED_FILE_PATTERNS = exports.TEST_RUNNER_NAME = exports.TESTING_FRAMEWORKS = exports.LIVESYNC_EXCLUDED_DIRECTORIES = exports.DEFAULT_APP_IDENTIFIER_PREFIX = exports.NODE_MODULE_CACHE_PATH_KEY_NAME = exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = exports.PACKAGE_LOCK_JSON_FILE_NAME = exports.PACKAGE_JSON_FILE_NAME = exports.SCOPED_IOS_RUNTIME_NAME = exports.SCOPED_ANDROID_RUNTIME_NAME = exports.TNS_IOS_RUNTIME_NAME = exports.TNS_ANDROID_RUNTIME_NAME = exports.UI_MOBILE_BASE_NAME = exports.TNS_CORE_MODULES_WIDGETS_NAME = exports.WEBPACK_PLUGIN_NAME = exports.SCOPED_TNS_CORE_THEME_NAME = exports.TNS_CORE_THEME_NAME = exports.SCOPED_TNS_CORE_MODULES = exports.TNS_CORE_MODULES_NAME = exports.TNS_MODULES_FOLDER_NAME = exports.NODE_MODULES_FOLDER_NAME = exports.NATIVESCRIPT_KEY_NAME = exports.NS_BASE_PODFILE = exports.PROJECT_FRAMEWORK_FOLDER_NAME = exports.APP_RESOURCES_FOLDER_NAME = exports.APP_FOLDER_NAME = void 0;
|
|
4
|
+
exports.DEBUGGER_DETACHED_EVENT_NAME = exports.DEBUGGER_ATTACHED_EVENT_NAME = exports.USER_INTERACTION_NEEDED_EVENT_NAME = exports.CONNECTION_ERROR_EVENT_NAME = exports.BUILD_OUTPUT_EVENT_NAME = exports.ProjectTypes = exports.JsFlavorName = exports.TsFlavorName = exports.SvelteFlavorName = exports.ReactFlavorName = exports.VueFlavorName = exports.NgFlavorName = exports.SVELTE_NAME = exports.REACT_NAME = exports.TYPESCRIPT_NAME = exports.JAVASCRIPT_NAME = exports.ANGULAR_NAME = exports.VUE_NAME = exports.ItunesConnectApplicationTypes = exports.androidAppResourcesFolderName = exports.iOSAppResourcesFolderName = exports.ITMSConstants = exports.ANALYTICS_LOCAL_TEMPLATE_PREFIX = exports.RESERVED_TEMPLATE_NAMES = exports.ReleaseType = exports.SaveOptions = exports.TemplatesV2PackageJsonKeysToRemove = exports.PackageJsonKeysToKeep = exports.LiveSyncTrackActionNames = exports.PackageVersion = exports.MetadataFilteringConstants = exports.IOS_WATCHAPP_EXTENSION_FOLDER = exports.IOS_WATCHAPP_FOLDER = exports.NATIVE_EXTENSION_FOLDER = exports.APPLICATION_RESPONSE_TIMEOUT_SECONDS = exports.NATIVE_SOURCE_FOLDER = exports.TNS_NATIVE_SOURCE_GROUP_NAME = exports.HASHES_FILE_NAME = exports.APKS_EXTENSION_NAME = exports.AAB_EXTENSION_NAME = exports.APK_EXTENSION_NAME = exports.DEPENDENCIES_JSON_NAME = exports.CONFIG_FILE_NAME_TS = exports.CONFIG_FILE_NAME_JS = exports.CONFIG_FILE_NAME_DISPLAY = exports.CONFIG_NS_APP_ENTRY = exports.CONFIG_NS_APP_RESOURCES_ENTRY = exports.CONFIG_NS_FILE_NAME = exports.RESOURCES_DIR = exports.BUNDLE_DIR = void 0;
|
|
5
|
+
exports.PackageManagers = exports.EMIT_APPENDER_EVENT_NAME = exports.LoggerConfigData = exports.LoggerLevel = exports.DeviceConnectionType = exports.LoggerAppenders = exports.IOSNativeTargetTypes = exports.IOSNativeTargetProductTypes = exports.IOSDeviceTargets = exports.RunOnDeviceEvents = exports.AndroidAppBundleMessages = exports.AndroidBundleValidatorMessages = exports.BundleValidatorMessages = exports.IosProjectConstants = exports.EXTENSION_PROVISIONING_FILENAME = exports.PODFILE_NAME = exports.PLUGINS_BUILD_DATA_FILENAME = exports.PLUGIN_BUILD_DATA_FILENAME = exports.AddPlaformErrors = exports.PACKAGE_PLACEHOLDER_NAME = exports.AndroidBuildDefaults = exports.Hooks = exports.XcodeDeprecationStringFormat = exports.MacOSDeprecationStringFormat = exports.MacOSVersions = exports.AssetConstants = exports.CLI_RESOURCES_DIR_NAME = exports.NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = exports.AnalyticsEventLabelDelimiter = exports.DebugCommandErrors = exports.WEBPACK_COMPILATION_COMPLETE = exports.PREPARE_READY_EVENT_NAME = exports.INITIAL_SYNC_EVENT_NAME = exports.FILES_CHANGE_EVENT_NAME = exports.CACACHE_DIRECTORY_NAME = exports.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE = exports.ANDROID_RELEASE_BUILD_ERROR_MESSAGE = exports.POST_INSTALL_COMMAND_NAME = exports.INSPECTOR_CACHE_DIRNAME = exports.VERSION_STRING = void 0;
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
exports.APP_FOLDER_NAME = "app";
|
|
8
8
|
exports.APP_RESOURCES_FOLDER_NAME = "App_Resources";
|
|
@@ -22,7 +22,6 @@ exports.TNS_ANDROID_RUNTIME_NAME = "tns-android";
|
|
|
22
22
|
exports.TNS_IOS_RUNTIME_NAME = "tns-ios";
|
|
23
23
|
exports.SCOPED_ANDROID_RUNTIME_NAME = "@nativescript/android";
|
|
24
24
|
exports.SCOPED_IOS_RUNTIME_NAME = "@nativescript/ios";
|
|
25
|
-
exports.SCOPED_VISIONOS_RUNTIME_NAME = "@nativescript/visionos";
|
|
26
25
|
exports.PACKAGE_JSON_FILE_NAME = "package.json";
|
|
27
26
|
exports.PACKAGE_LOCK_JSON_FILE_NAME = "package-lock.json";
|
|
28
27
|
exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = `/data/data/%s/files`;
|
|
@@ -68,7 +67,7 @@ exports.APK_EXTENSION_NAME = ".apk";
|
|
|
68
67
|
exports.AAB_EXTENSION_NAME = ".aab";
|
|
69
68
|
exports.APKS_EXTENSION_NAME = ".apks";
|
|
70
69
|
exports.HASHES_FILE_NAME = ".nshashes";
|
|
71
|
-
exports.TNS_NATIVE_SOURCE_GROUP_NAME = "
|
|
70
|
+
exports.TNS_NATIVE_SOURCE_GROUP_NAME = "TNSNativeSource";
|
|
72
71
|
exports.NATIVE_SOURCE_FOLDER = "src";
|
|
73
72
|
exports.APPLICATION_RESPONSE_TIMEOUT_SECONDS = 60;
|
|
74
73
|
exports.NATIVE_EXTENSION_FOLDER = "extensions";
|
|
@@ -137,19 +136,13 @@ exports.RESERVED_TEMPLATE_NAMES = {
|
|
|
137
136
|
default: "@nativescript/template-hello-world",
|
|
138
137
|
javascript: "@nativescript/template-hello-world",
|
|
139
138
|
tsc: "@nativescript/template-hello-world-ts",
|
|
140
|
-
vision: "@nativescript/template-hello-world-ts-vision",
|
|
141
139
|
vue: "@nativescript/template-blank-vue",
|
|
142
|
-
"vision-vue": "@nativescript/template-blank-vue-vision",
|
|
143
140
|
typescript: "@nativescript/template-hello-world-ts",
|
|
144
141
|
ng: "@nativescript/template-hello-world-ng",
|
|
145
142
|
angular: "@nativescript/template-hello-world-ng",
|
|
146
|
-
"vision-ng": "@nativescript/template-hello-world-ng-vision",
|
|
147
143
|
react: "@nativescript/template-blank-react",
|
|
148
|
-
"vision-react": "@nativescript/template-blank-react-vision",
|
|
149
144
|
reactjs: "@nativescript/template-blank-react",
|
|
150
|
-
"vision-solid": "@nativescript/template-blank-solid-vision",
|
|
151
145
|
svelte: "@nativescript/template-blank-svelte",
|
|
152
|
-
"vision-svelte": "@nativescript/template-blank-svelte-vision",
|
|
153
146
|
};
|
|
154
147
|
exports.ANALYTICS_LOCAL_TEMPLATE_PREFIX = "localTemplate_";
|
|
155
148
|
class ITMSConstants {
|
|
@@ -268,7 +268,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
268
268
|
packageData.android.discardUncaughtJsExceptions;
|
|
269
269
|
}
|
|
270
270
|
let packagePath;
|
|
271
|
-
if (
|
|
271
|
+
if (platformData.platformNameLowerCase === "ios") {
|
|
272
272
|
packagePath = path.join(platformData.projectRoot, projectData.projectName, "app", "package.json");
|
|
273
273
|
}
|
|
274
274
|
else {
|
package/lib/data/build-data.js
CHANGED
|
@@ -6,7 +6,6 @@ class BuildData extends prepare_data_1.PrepareData {
|
|
|
6
6
|
constructor(projectDir, platform, data) {
|
|
7
7
|
super(projectDir, platform, data);
|
|
8
8
|
this.device = data.device;
|
|
9
|
-
this._device = data === null || data === void 0 ? void 0 : data._device;
|
|
10
9
|
this.emulator = data.emulator;
|
|
11
10
|
this.clean = data.clean;
|
|
12
11
|
this.buildForDevice = data.buildForDevice || data.forDevice;
|
package/lib/declarations.d.ts
CHANGED
|
@@ -677,12 +677,6 @@ interface IOptions
|
|
|
677
677
|
vue: boolean;
|
|
678
678
|
vuejs: boolean;
|
|
679
679
|
js: boolean;
|
|
680
|
-
vision: boolean;
|
|
681
|
-
"vision-ng": boolean;
|
|
682
|
-
"vision-react": boolean;
|
|
683
|
-
"vision-solid": boolean;
|
|
684
|
-
"vision-svelte": boolean;
|
|
685
|
-
"vision-vue": boolean;
|
|
686
680
|
javascript: boolean;
|
|
687
681
|
androidTypings: boolean;
|
|
688
682
|
production: boolean; //npm flag
|
|
@@ -698,8 +692,6 @@ interface IOptions
|
|
|
698
692
|
markingMode: boolean;
|
|
699
693
|
git: boolean;
|
|
700
694
|
dryRun: boolean;
|
|
701
|
-
|
|
702
|
-
platformOverride: string;
|
|
703
695
|
}
|
|
704
696
|
|
|
705
697
|
interface IEnvOptions {
|
|
@@ -105,8 +105,6 @@ interface INsConfigIOS extends INsConfigPlaform {
|
|
|
105
105
|
discardUncaughtJsExceptions?: boolean;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
interface INSConfigVisionOS extends INsConfigIOS {}
|
|
109
|
-
|
|
110
108
|
interface INsConfigAndroid extends INsConfigPlaform {
|
|
111
109
|
v8Flags?: string;
|
|
112
110
|
|
|
@@ -158,7 +156,6 @@ interface INsConfig {
|
|
|
158
156
|
webpackConfigPath?: string;
|
|
159
157
|
ios?: INsConfigIOS;
|
|
160
158
|
android?: INsConfigAndroid;
|
|
161
|
-
visionos?: INSConfigVisionOS;
|
|
162
159
|
ignoredNativeDependencies?: string[];
|
|
163
160
|
hooks?: INsConfigHooks[];
|
|
164
161
|
}
|
|
@@ -561,8 +558,6 @@ interface IBuildConfig
|
|
|
561
558
|
clean?: boolean;
|
|
562
559
|
architectures?: string[];
|
|
563
560
|
buildOutputStdio?: string;
|
|
564
|
-
platform?: string;
|
|
565
|
-
_device?: Mobile.IDevice;
|
|
566
561
|
}
|
|
567
562
|
|
|
568
563
|
/**
|
|
@@ -24,7 +24,7 @@ class DevicePathProvider {
|
|
|
24
24
|
getDeviceProjectRootPath(device, options) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
let projectRoot = "";
|
|
27
|
-
if (this.$mobileHelper.
|
|
27
|
+
if (this.$mobileHelper.isiOSPlatform(device.deviceInfo.platform)) {
|
|
28
28
|
projectRoot = device.isEmulator
|
|
29
29
|
? yield this.$iOSSimResolver.iOSSim.getApplicationPath(device.deviceInfo.identifier, options.appIdentifier)
|
|
30
30
|
: constants_2.LiveSyncPaths.IOS_DEVICE_PROJECT_ROOT_PATH;
|
|
@@ -50,7 +50,7 @@ class DevicePathProvider {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
getDeviceSyncZipPath(device) {
|
|
53
|
-
return this.$mobileHelper.
|
|
53
|
+
return this.$mobileHelper.isiOSPlatform(device.deviceInfo.platform) &&
|
|
54
54
|
!device.isEmulator
|
|
55
55
|
? constants_2.LiveSyncPaths.IOS_DEVICE_SYNC_ZIP_PATH
|
|
56
56
|
: undefined;
|
|
@@ -76,7 +76,7 @@ class LiveSyncCommandHelper {
|
|
|
76
76
|
});
|
|
77
77
|
const buildData = this.$buildDataService.getBuildData(this.$projectData.projectDir, d.deviceInfo.platform, Object.assign(Object.assign({}, this.$options.argv), { outputPath, buildForDevice: !d.isEmulator, watch: !this.$options.release && this.$options.watch, nativePrepare: {
|
|
78
78
|
forceRebuildNativeApp: additionalOptions.forceRebuildNativeApp,
|
|
79
|
-
}
|
|
79
|
+
} }));
|
|
80
80
|
this.$androidBundleValidatorHelper.validateDeviceApiLevel(d, buildData);
|
|
81
81
|
const buildAction = additionalOptions && additionalOptions.buildPlatform
|
|
82
82
|
? additionalOptions.buildPlatform.bind(additionalOptions.buildPlatform, d.deviceInfo.platform, buildData, this.$projectData)
|
|
@@ -167,12 +167,12 @@ class LiveSyncCommandHelper {
|
|
|
167
167
|
this.$errors.fail("Unable to find applicable devices to execute operation and unable to start emulator when platform is not specified.");
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
const
|
|
170
|
+
const workingWithiOSDevices = !platform || this.$mobileHelper.isiOSPlatform(platform);
|
|
171
171
|
const shouldKeepProcessAlive = this.$options.watch || !this.$options.justlaunch;
|
|
172
172
|
if (shouldKeepProcessAlive) {
|
|
173
173
|
this.$analyticsService.setShouldDispose(false);
|
|
174
174
|
this.$cleanupService.setShouldDispose(false);
|
|
175
|
-
if (
|
|
175
|
+
if (workingWithiOSDevices) {
|
|
176
176
|
this.$iosDeviceOperations.setShouldDispose(false);
|
|
177
177
|
this.$iOSSimulatorLogProvider.setShouldDispose(false);
|
|
178
178
|
}
|
package/lib/options.js
CHANGED
|
@@ -112,11 +112,6 @@ class Options {
|
|
|
112
112
|
vue: { type: "boolean", hasSensitiveValue: false },
|
|
113
113
|
vuejs: { type: "boolean", hasSensitiveValue: false },
|
|
114
114
|
svelte: { type: "boolean", hasSensitiveValue: false },
|
|
115
|
-
"vision-ng": { type: "boolean", hasSensitiveValue: false },
|
|
116
|
-
"vision-react": { type: "boolean", hasSensitiveValue: false },
|
|
117
|
-
"vision-solid": { type: "boolean", hasSensitiveValue: false },
|
|
118
|
-
"vision-svelte": { type: "boolean", hasSensitiveValue: false },
|
|
119
|
-
"vision-vue": { type: "boolean", hasSensitiveValue: false },
|
|
120
115
|
tsc: { type: "boolean", hasSensitiveValue: false },
|
|
121
116
|
ts: { type: "boolean", hasSensitiveValue: false },
|
|
122
117
|
typescript: { type: "boolean", hasSensitiveValue: false },
|
|
@@ -342,8 +337,7 @@ class Options {
|
|
|
342
337
|
this.$settingsService.setSettings({
|
|
343
338
|
profileDir: this.argv.profileDir,
|
|
344
339
|
});
|
|
345
|
-
this.argv.profileDir = this.argv["profile-dir"] =
|
|
346
|
-
this.$settingsService.getProfileDir();
|
|
340
|
+
this.argv.profileDir = this.argv["profile-dir"] = this.$settingsService.getProfileDir();
|
|
347
341
|
if (this.argv.justlaunch) {
|
|
348
342
|
this.argv.watch = false;
|
|
349
343
|
}
|
|
@@ -49,25 +49,13 @@ class PackageInstallationManager {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
getMaxSatisfyingVersion(packageName, versionRange) {
|
|
52
|
-
var _a;
|
|
52
|
+
var _a, _b;
|
|
53
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
const data = yield this.$packageManager.view(packageName, {
|
|
55
55
|
versions: true,
|
|
56
56
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
versions = [data];
|
|
60
|
-
}
|
|
61
|
-
else if (data === null || data === void 0 ? void 0 : data.versions) {
|
|
62
|
-
versions = data.versions;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
versions = data;
|
|
66
|
-
}
|
|
67
|
-
if (!versions || !Array.isArray(versions)) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
return (_a = semver.maxSatisfying(versions, versionRange)) === null || _a === void 0 ? void 0 : _a.toString();
|
|
57
|
+
return (_b = semver
|
|
58
|
+
.maxSatisfying((_a = data === null || data === void 0 ? void 0 : data.versions) !== null && _a !== void 0 ? _a : data, versionRange)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
71
59
|
});
|
|
72
60
|
}
|
|
73
61
|
getMaxSatisfyingVersionSafe(packageName, versionIdentifier) {
|
package/lib/project-data.js
CHANGED
|
@@ -23,7 +23,6 @@ class ProjectData {
|
|
|
23
23
|
this.warnProjectId();
|
|
24
24
|
this.projectIdentifiers.ios = identifier;
|
|
25
25
|
this.projectIdentifiers.android = identifier;
|
|
26
|
-
this.projectIdentifiers.visionos = identifier;
|
|
27
26
|
}
|
|
28
27
|
constructor($fs, $errors, $projectHelper, $staticConfig, $options, $logger, $injector, $androidResourcesMigrationService, $devicePlatformsConstants) {
|
|
29
28
|
this.$fs = $fs;
|
|
@@ -157,13 +156,11 @@ class ProjectData {
|
|
|
157
156
|
return {
|
|
158
157
|
ios: "",
|
|
159
158
|
android: "",
|
|
160
|
-
visionos: "",
|
|
161
159
|
};
|
|
162
160
|
}
|
|
163
161
|
const identifier = {
|
|
164
162
|
ios: config.id,
|
|
165
163
|
android: config.id,
|
|
166
|
-
visionos: config.id,
|
|
167
164
|
};
|
|
168
165
|
if (config.ios && config.ios.id) {
|
|
169
166
|
identifier.ios = config.ios.id;
|
|
@@ -171,9 +168,6 @@ class ProjectData {
|
|
|
171
168
|
if (config.android && config.android.id) {
|
|
172
169
|
identifier.android = config.android.id;
|
|
173
170
|
}
|
|
174
|
-
if (config.visionos && config.visionos.id) {
|
|
175
|
-
identifier.visionos = config.visionos.id;
|
|
176
|
-
}
|
|
177
171
|
return identifier;
|
|
178
172
|
}
|
|
179
173
|
getProjectType() {
|
|
@@ -9,7 +9,7 @@ class LiveSyncServiceResolver {
|
|
|
9
9
|
this.$mobileHelper = $mobileHelper;
|
|
10
10
|
}
|
|
11
11
|
resolveLiveSyncService(platform) {
|
|
12
|
-
if (this.$mobileHelper.
|
|
12
|
+
if (this.$mobileHelper.isiOSPlatform(platform)) {
|
|
13
13
|
return this.$injector.resolve("iOSLiveSyncService");
|
|
14
14
|
}
|
|
15
15
|
else if (this.$mobileHelper.isAndroidPlatform(platform)) {
|
|
@@ -8,7 +8,7 @@ class BuildDataService {
|
|
|
8
8
|
this.$mobileHelper = $mobileHelper;
|
|
9
9
|
}
|
|
10
10
|
getBuildData(projectDir, platform, data) {
|
|
11
|
-
if (this.$mobileHelper.
|
|
11
|
+
if (this.$mobileHelper.isiOSPlatform(platform)) {
|
|
12
12
|
return new build_data_1.IOSBuildData(projectDir, platform, data);
|
|
13
13
|
}
|
|
14
14
|
else if (this.$mobileHelper.isAndroidPlatform(platform)) {
|
|
@@ -20,14 +20,17 @@ class SPMService {
|
|
|
20
20
|
this.$xcodebuildCommandService = $xcodebuildCommandService;
|
|
21
21
|
this.$xcodebuildArgsService = $xcodebuildArgsService;
|
|
22
22
|
}
|
|
23
|
-
getSPMPackages(projectData
|
|
24
|
-
const spmPackages = this.$projectConfigService.getValue(
|
|
23
|
+
getSPMPackages(projectData) {
|
|
24
|
+
const spmPackages = this.$projectConfigService.getValue("ios.SPMPackages", []);
|
|
25
25
|
return spmPackages;
|
|
26
26
|
}
|
|
27
|
+
hasSPMPackages(projectData) {
|
|
28
|
+
return this.getSPMPackages(projectData).length > 0;
|
|
29
|
+
}
|
|
27
30
|
applySPMPackages(platformData, projectData) {
|
|
28
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
32
|
try {
|
|
30
|
-
const spmPackages = this.getSPMPackages(projectData
|
|
33
|
+
const spmPackages = this.getSPMPackages(projectData);
|
|
31
34
|
if (!spmPackages.length) {
|
|
32
35
|
this.$logger.trace("SPM: no SPM packages to apply.");
|
|
33
36
|
return;
|
|
@@ -36,13 +39,10 @@ class SPMService {
|
|
|
36
39
|
ios: {
|
|
37
40
|
path: ".",
|
|
38
41
|
},
|
|
39
|
-
visionos: {
|
|
40
|
-
path: ".",
|
|
41
|
-
},
|
|
42
42
|
enableAndroid: false,
|
|
43
43
|
});
|
|
44
44
|
yield project.load();
|
|
45
|
-
if (
|
|
45
|
+
if (!project.ios) {
|
|
46
46
|
this.$logger.trace("SPM: no iOS project found via trapeze.");
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -15,7 +15,8 @@ const constants = require("../../constants");
|
|
|
15
15
|
const constants_1 = require("../../common/constants");
|
|
16
16
|
const yok_1 = require("../../common/yok");
|
|
17
17
|
const _ = require("lodash");
|
|
18
|
-
const
|
|
18
|
+
const DevicePlatformSdkName = "iphoneos";
|
|
19
|
+
const SimulatorPlatformSdkName = "iphonesimulator";
|
|
19
20
|
class XcodebuildArgsService {
|
|
20
21
|
constructor($devicePlatformsConstants, $devicesService, $fs, $iOSWatchAppService, $logger) {
|
|
21
22
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
@@ -33,23 +34,15 @@ class XcodebuildArgsService {
|
|
|
33
34
|
else {
|
|
34
35
|
args = args.concat(["CODE_SIGN_IDENTITY="]);
|
|
35
36
|
}
|
|
36
|
-
let destination = "generic/platform=iOS Simulator";
|
|
37
|
-
let isvisionOS = this.$devicePlatformsConstants.isvisionOS(buildConfig.platform);
|
|
38
|
-
if (isvisionOS) {
|
|
39
|
-
destination = "platform=visionOS Simulator";
|
|
40
|
-
if (buildConfig._device) {
|
|
41
|
-
destination += `,id=${buildConfig._device.deviceInfo.identifier}`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
37
|
args = args
|
|
45
38
|
.concat([
|
|
46
39
|
"-destination",
|
|
47
|
-
|
|
40
|
+
"generic/platform=iOS Simulator",
|
|
48
41
|
"build",
|
|
49
42
|
"-configuration",
|
|
50
43
|
buildConfig.release ? constants_1.Configurations.Release : constants_1.Configurations.Debug,
|
|
51
44
|
])
|
|
52
|
-
.concat(this.getBuildCommonArgs(platformData, projectData,
|
|
45
|
+
.concat(this.getBuildCommonArgs(platformData, projectData, SimulatorPlatformSdkName))
|
|
53
46
|
.concat(this.getBuildLoggingArgs())
|
|
54
47
|
.concat(this.getXcodeProjectArgs(platformData.projectRoot, projectData));
|
|
55
48
|
return args;
|
|
@@ -71,7 +64,7 @@ class XcodebuildArgsService {
|
|
|
71
64
|
]
|
|
72
65
|
.concat(this.getXcodeProjectArgs(platformData.projectRoot, projectData))
|
|
73
66
|
.concat(architectures)
|
|
74
|
-
.concat(this.getBuildCommonArgs(platformData, projectData,
|
|
67
|
+
.concat(this.getBuildCommonArgs(platformData, projectData, DevicePlatformSdkName))
|
|
75
68
|
.concat(this.getBuildLoggingArgs());
|
|
76
69
|
return args;
|
|
77
70
|
});
|
|
@@ -79,10 +72,6 @@ class XcodebuildArgsService {
|
|
|
79
72
|
getArchitecturesArgs(buildConfig) {
|
|
80
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
74
|
const args = [];
|
|
82
|
-
if (this.$devicePlatformsConstants.isvisionOS(buildConfig.platform)) {
|
|
83
|
-
args.push("ONLY_ACTIVE_ARCH=YES");
|
|
84
|
-
return args;
|
|
85
|
-
}
|
|
86
75
|
const devicesArchitectures = buildConfig.buildForDevice
|
|
87
76
|
? yield this.getArchitecturesFromConnectedDevices(buildConfig)
|
|
88
77
|
: [];
|
|
@@ -15,7 +15,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.IOSProjectService =
|
|
18
|
+
exports.IOSProjectService = void 0;
|
|
19
19
|
const path = require("path");
|
|
20
20
|
const shell = require("shelljs");
|
|
21
21
|
const _ = require("lodash");
|
|
@@ -30,30 +30,14 @@ const plist = require("plist");
|
|
|
30
30
|
const constants_2 = require("../constants");
|
|
31
31
|
const helpers_2 = require("../common/helpers");
|
|
32
32
|
const yok_1 = require("../common/yok");
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.VisionSimulatorPlatformSdkName = "xrsimulator";
|
|
33
|
+
const DevicePlatformSdkName = "iphoneos";
|
|
34
|
+
const SimulatorPlatformSdkName = "iphonesimulator";
|
|
36
35
|
const FRAMEWORK_EXTENSIONS = [".framework", ".xcframework"];
|
|
37
|
-
const getPlatformSdkName = (
|
|
38
|
-
|
|
39
|
-
const isvisionOS = yok_1.injector
|
|
40
|
-
.resolve("devicePlatformsConstants")
|
|
41
|
-
.isvisionOS(buildData.platform);
|
|
42
|
-
if (forDevice) {
|
|
43
|
-
return exports.DevicePlatformSdkName;
|
|
44
|
-
}
|
|
45
|
-
if (isvisionOS) {
|
|
46
|
-
return exports.VisionSimulatorPlatformSdkName;
|
|
47
|
-
}
|
|
48
|
-
return exports.SimulatorPlatformSdkName;
|
|
49
|
-
};
|
|
50
|
-
const getConfigurationName = (release) => {
|
|
51
|
-
return release ? constants_1.Configurations.Release : constants_1.Configurations.Debug;
|
|
52
|
-
};
|
|
36
|
+
const getPlatformSdkName = (forDevice) => forDevice ? DevicePlatformSdkName : SimulatorPlatformSdkName;
|
|
37
|
+
const getConfigurationName = (release) => release ? constants_1.Configurations.Release : constants_1.Configurations.Debug;
|
|
53
38
|
class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase {
|
|
54
|
-
constructor($fs, $
|
|
39
|
+
constructor($fs, $childProcess, $cocoapodsService, $errors, $logger, $injector, $projectDataService, $devicePlatformsConstants, $hostInfo, $xcprojService, $iOSProvisionService, $iOSSigningService, $pbxprojDomXcode, $xcode, $iOSEntitlementsService, $platformEnvironmentRequirements, $plistParser, $xcconfigService, $xcodebuildService, $iOSExtensionsService, $iOSWatchAppService, $iOSNativeTargetService, $sysInfo, $tempService, $spmService) {
|
|
55
40
|
super($fs, $projectDataService);
|
|
56
|
-
this.$options = $options;
|
|
57
41
|
this.$childProcess = $childProcess;
|
|
58
42
|
this.$cocoapodsService = $cocoapodsService;
|
|
59
43
|
this.$errors = $errors;
|
|
@@ -77,31 +61,28 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
77
61
|
this.$sysInfo = $sysInfo;
|
|
78
62
|
this.$tempService = $tempService;
|
|
79
63
|
this.$spmService = $spmService;
|
|
80
|
-
this.$mobileHelper = $mobileHelper;
|
|
81
64
|
this._platformsDirCache = null;
|
|
82
65
|
this._platformData = null;
|
|
83
66
|
}
|
|
84
67
|
getPlatformData(projectData) {
|
|
85
|
-
var _a;
|
|
86
68
|
if (!projectData && !this._platformData) {
|
|
87
69
|
throw new Error("First call of getPlatformData without providing projectData.");
|
|
88
70
|
}
|
|
89
71
|
if (projectData &&
|
|
90
72
|
projectData.platformsDir &&
|
|
91
73
|
this._platformsDirCache !== projectData.platformsDir) {
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, platform.toLowerCase());
|
|
74
|
+
const projectRoot = path.join(projectData.platformsDir, this.$devicePlatformsConstants.iOS.toLowerCase());
|
|
75
|
+
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, "ios");
|
|
95
76
|
this._platformData = {
|
|
96
77
|
frameworkPackageName: runtimePackage.name,
|
|
97
|
-
normalizedPlatformName:
|
|
98
|
-
platformNameLowerCase:
|
|
78
|
+
normalizedPlatformName: "iOS",
|
|
79
|
+
platformNameLowerCase: "ios",
|
|
99
80
|
appDestinationDirectoryPath: path.join(projectRoot, projectData.projectName),
|
|
100
81
|
platformProjectService: this,
|
|
101
82
|
projectRoot: projectRoot,
|
|
102
83
|
getBuildOutputPath: (options) => {
|
|
103
84
|
const config = getConfigurationName(!options || options.release);
|
|
104
|
-
return path.join(projectRoot, constants.BUILD_DIR, `${config}-${getPlatformSdkName(options)}`);
|
|
85
|
+
return path.join(projectRoot, constants.BUILD_DIR, `${config}-${getPlatformSdkName(!options || options.buildForDevice || options.buildForAppStore)}`);
|
|
105
86
|
},
|
|
106
87
|
getValidBuildOutputData: (buildOptions) => {
|
|
107
88
|
const forDevice = !buildOptions ||
|
|
@@ -360,10 +341,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
360
341
|
this.$logger.trace(`Images to remove from xcode project: ${imagesToRemove.join(", ")}`);
|
|
361
342
|
_.each(imagesToRemove, (image) => project.removeResourceFile(path.join(this.getAppResourcesDestinationDirectoryPath(projectData), image)));
|
|
362
343
|
this.savePbxProj(project, projectData);
|
|
363
|
-
|
|
364
|
-
if (!this.$fs.exists(resourcesNativeCodePath)) {
|
|
365
|
-
resourcesNativeCodePath = path.join(resourcesDirectoryPath, this.$devicePlatformsConstants.iOS, constants.NATIVE_SOURCE_FOLDER);
|
|
366
|
-
}
|
|
344
|
+
const resourcesNativeCodePath = path.join(resourcesDirectoryPath, platformData.normalizedPlatformName, constants.NATIVE_SOURCE_FOLDER);
|
|
367
345
|
yield this.prepareNativeSourceCode(constants.TNS_NATIVE_SOURCE_GROUP_NAME, resourcesNativeCodePath, projectData);
|
|
368
346
|
}
|
|
369
347
|
this.$iOSWatchAppService.removeWatchApp({ pbxProjPath });
|
|
@@ -384,13 +362,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
384
362
|
const platformsAppResourcesPath = this.getAppResourcesDestinationDirectoryPath(projectData);
|
|
385
363
|
this.$fs.deleteDirectory(platformsAppResourcesPath);
|
|
386
364
|
this.$fs.ensureDirectoryExists(platformsAppResourcesPath);
|
|
387
|
-
|
|
388
|
-
if (this.$fs.exists(platformAppResourcesPath)) {
|
|
389
|
-
this.$fs.copyFile(path.join(platformAppResourcesPath, "*"), platformsAppResourcesPath);
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
this.$fs.copyFile(path.join(projectAppResourcesPath, this.$devicePlatformsConstants.iOS, "*"), platformsAppResourcesPath);
|
|
393
|
-
}
|
|
365
|
+
this.$fs.copyFile(path.join(projectAppResourcesPath, platformData.normalizedPlatformName, "*"), platformsAppResourcesPath);
|
|
394
366
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, platformData.configurationFileName));
|
|
395
367
|
this.$fs.deleteFile(path.join(platformsAppResourcesPath, constants.PODFILE_NAME));
|
|
396
368
|
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, constants.NATIVE_SOURCE_FOLDER));
|
|
@@ -74,9 +74,7 @@ class PlatformEnvironmentRequirements {
|
|
|
74
74
|
win32: "windows",
|
|
75
75
|
darwin: "macos",
|
|
76
76
|
}[process.platform];
|
|
77
|
-
const anchor = platform
|
|
78
|
-
? `#setting-up-${os}-for-${platform.toLowerCase()}`
|
|
79
|
-
: "";
|
|
77
|
+
const anchor = platform ? `#setting-up-${os}-for-${platform.toLowerCase()}` : "";
|
|
80
78
|
return (`Verify that your environment is configured according to the system requirements described at\n` +
|
|
81
79
|
`https://docs.nativescript.org/setup/${os}${anchor}.`);
|
|
82
80
|
}
|
|
@@ -4,22 +4,17 @@ exports.PlatformsDataService = void 0;
|
|
|
4
4
|
const yok_1 = require("../common/yok");
|
|
5
5
|
const _ = require("lodash");
|
|
6
6
|
class PlatformsDataService {
|
|
7
|
-
constructor($
|
|
8
|
-
this.$options = $options;
|
|
7
|
+
constructor($androidProjectService, $iOSProjectService) {
|
|
9
8
|
this.platformsDataService = {};
|
|
10
9
|
this.platformsDataService = {
|
|
11
10
|
ios: $iOSProjectService,
|
|
12
11
|
android: $androidProjectService,
|
|
13
|
-
visionos: $iOSProjectService,
|
|
14
12
|
};
|
|
15
13
|
}
|
|
16
14
|
getPlatformData(platform, projectData) {
|
|
17
|
-
var _a;
|
|
18
|
-
var _b;
|
|
19
15
|
const platformKey = platform && _.first(platform.toLowerCase().split("@"));
|
|
20
16
|
let platformData;
|
|
21
17
|
if (platformKey) {
|
|
22
|
-
(_a = (_b = this.$options).platformOverride) !== null && _a !== void 0 ? _a : (_b.platformOverride = platform);
|
|
23
18
|
platformData =
|
|
24
19
|
this.platformsDataService[platformKey] &&
|
|
25
20
|
this.platformsDataService[platformKey].getPlatformData(projectData);
|
|
@@ -306,12 +306,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
|
|
|
306
306
|
cacheData.directory ||
|
|
307
307
|
path.dirname(this.getPackageJsonFilePathForModule(cacheData.name, projectDir));
|
|
308
308
|
pluginData.isPlugin = !!cacheData.nativescript;
|
|
309
|
-
pluginData.pluginPlatformsFolderPath = (platform) =>
|
|
310
|
-
if (this.$mobileHelper.isvisionOSPlatform(platform)) {
|
|
311
|
-
platform = "ios";
|
|
312
|
-
}
|
|
313
|
-
return path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
|
|
314
|
-
};
|
|
309
|
+
pluginData.pluginPlatformsFolderPath = (platform) => path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
|
|
315
310
|
const data = cacheData.nativescript;
|
|
316
311
|
if (pluginData.isPlugin) {
|
|
317
312
|
pluginData.platformsData = data.platforms;
|
|
@@ -9,7 +9,7 @@ class PrepareDataService {
|
|
|
9
9
|
}
|
|
10
10
|
getPrepareData(projectDir, platform, data) {
|
|
11
11
|
const platformLowerCase = platform.toLowerCase();
|
|
12
|
-
if (this.$mobileHelper.
|
|
12
|
+
if (this.$mobileHelper.isiOSPlatform(platform)) {
|
|
13
13
|
return new prepare_data_1.IOSPrepareData(projectDir, platformLowerCase, data);
|
|
14
14
|
}
|
|
15
15
|
else if (this.$mobileHelper.isAndroidPlatform(platform)) {
|
|
@@ -52,12 +52,7 @@ class ProjectChangesService {
|
|
|
52
52
|
this._changesInfo = new ProjectChangesInfo();
|
|
53
53
|
const isNewPrepareInfo = yield this.ensurePrepareInfo(platformData, projectData, prepareData);
|
|
54
54
|
if (!isNewPrepareInfo) {
|
|
55
|
-
|
|
56
|
-
if (!this.$fs.exists(platformResourcesDir) &&
|
|
57
|
-
platformData.platformNameLowerCase ===
|
|
58
|
-
this.$devicePlatformsConstants.visionOS.toLowerCase()) {
|
|
59
|
-
platformResourcesDir = path.join(projectData.appResourcesDirectoryPath, this.$devicePlatformsConstants.iOS);
|
|
60
|
-
}
|
|
55
|
+
const platformResourcesDir = path.join(projectData.appResourcesDirectoryPath, platformData.normalizedPlatformName);
|
|
61
56
|
this._changesInfo.appResourcesChanged = this.containsNewerFiles(platformResourcesDir, projectData);
|
|
62
57
|
this.$nodeModulesDependenciesBuilder
|
|
63
58
|
.getProductionDependencies(projectData.projectDir, projectData.ignoredDependencies)
|
|
@@ -382,9 +382,6 @@ class ProjectDataService {
|
|
|
382
382
|
constants.TNS_ANDROID_RUNTIME_NAME,
|
|
383
383
|
].includes(d.name);
|
|
384
384
|
}
|
|
385
|
-
else if (platform === "visionos") {
|
|
386
|
-
return d.name === constants.SCOPED_VISIONOS_RUNTIME_NAME;
|
|
387
|
-
}
|
|
388
385
|
});
|
|
389
386
|
if (runtimePackage) {
|
|
390
387
|
const coerced = semver.coerce(runtimePackage.version);
|
|
@@ -425,12 +422,6 @@ class ProjectDataService {
|
|
|
425
422
|
version: null,
|
|
426
423
|
};
|
|
427
424
|
}
|
|
428
|
-
else if (platform === "visionos") {
|
|
429
|
-
return {
|
|
430
|
-
name: constants.SCOPED_VISIONOS_RUNTIME_NAME,
|
|
431
|
-
version: null,
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
425
|
}
|
|
435
426
|
getNsConfigDefaultContent(data) {
|
|
436
427
|
const config = this.getNsConfigDefaultObject(data);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changers Lorgs!
|
|
2
|
+
|
|
3
|
+
## 1.0
|
|
4
|
+
|
|
5
|
+
Full rewrite. Essentially a brand new module.
|
|
6
|
+
|
|
7
|
+
- Return a promise instead of taking a callback.
|
|
8
|
+
- Use native `fs.mkdir(path, { recursive: true })` when available.
|
|
9
|
+
- Drop support for outdated Node.js versions. (Technically still works on
|
|
10
|
+
Node.js v8, but only 10 and above are officially supported.)
|
|
11
|
+
|
|
12
|
+
## 0.x
|
|
13
|
+
|
|
14
|
+
Original and most widely used recursive directory creation implementation
|
|
15
|
+
in JavaScript, dating back to 2010.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# v3.0
|
|
2
|
+
|
|
3
|
+
- Add `--preserve-root` option to executable (default true)
|
|
4
|
+
- Drop support for Node.js below version 6
|
|
5
|
+
|
|
6
|
+
# v2.7
|
|
7
|
+
|
|
8
|
+
- Make `glob` an optional dependency
|
|
9
|
+
|
|
10
|
+
# 2.6
|
|
11
|
+
|
|
12
|
+
- Retry on EBUSY on non-windows platforms as well
|
|
13
|
+
- Make `rimraf.sync` 10000% more reliable on Windows
|
|
14
|
+
|
|
15
|
+
# 2.5
|
|
16
|
+
|
|
17
|
+
- Handle Windows EPERM when lstat-ing read-only dirs
|
|
18
|
+
- Add glob option to pass options to glob
|
|
19
|
+
|
|
20
|
+
# 2.4
|
|
21
|
+
|
|
22
|
+
- Add EPERM to delay/retry loop
|
|
23
|
+
- Add `disableGlob` option
|
|
24
|
+
|
|
25
|
+
# 2.3
|
|
26
|
+
|
|
27
|
+
- Make maxBusyTries and emfileWait configurable
|
|
28
|
+
- Handle weird SunOS unlink-dir issue
|
|
29
|
+
- Glob the CLI arg for better Windows support
|
|
30
|
+
|
|
31
|
+
# 2.2
|
|
32
|
+
|
|
33
|
+
- Handle ENOENT properly on Windows
|
|
34
|
+
- Allow overriding fs methods
|
|
35
|
+
- Treat EPERM as indicative of non-empty dir
|
|
36
|
+
- Remove optional graceful-fs dep
|
|
37
|
+
- Consistently return null error instead of undefined on success
|
|
38
|
+
- win32: Treat ENOTEMPTY the same as EBUSY
|
|
39
|
+
- Add `rimraf` binary
|
|
40
|
+
|
|
41
|
+
# 2.1
|
|
42
|
+
|
|
43
|
+
- Fix SunOS error code for a non-empty directory
|
|
44
|
+
- Try rmdir before readdir
|
|
45
|
+
- Treat EISDIR like EPERM
|
|
46
|
+
- Remove chmod
|
|
47
|
+
- Remove lstat polyfill, node 0.7 is not supported
|
|
48
|
+
|
|
49
|
+
# 2.0
|
|
50
|
+
|
|
51
|
+
- Fix myGid call to check process.getgid
|
|
52
|
+
- Simplify the EBUSY backoff logic.
|
|
53
|
+
- Use fs.lstat in node >= 0.7.9
|
|
54
|
+
- Remove gently option
|
|
55
|
+
- remove fiber implementation
|
|
56
|
+
- Delete files that are marked read-only
|
|
57
|
+
|
|
58
|
+
# 1.0
|
|
59
|
+
|
|
60
|
+
- Allow ENOENT in sync method
|
|
61
|
+
- Throw when no callback is provided
|
|
62
|
+
- Make opts.gently an absolute path
|
|
63
|
+
- use 'stat' if 'lstat' is not available
|
|
64
|
+
- Consistent error naming, and rethrow non-ENOENT stat errors
|
|
65
|
+
- add fiber implementation
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
<a name="1.0.1"></a>
|
|
6
|
+
## [1.0.1](https://github.com/npm/stringify-package/compare/v1.0.0...v1.0.1) (2019-09-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* strict comparison ([0c5675f](https://github.com/npm/stringify-package/commit/0c5675f)), closes [#2](https://github.com/npm/stringify-package/issues/2)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<a name="1.0.0"></a>
|
|
16
|
+
# 1.0.0 (2018-07-18)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"preferGlobal": true,
|
|
4
|
-
"version": "8.6.
|
|
4
|
+
"version": "8.6.3",
|
|
5
5
|
"author": "NativeScript <support@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"preuninstall.js"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"clean": "npx rimraf node_modules package-lock.json
|
|
32
|
+
"clean": "npx rimraf node_modules package-lock.json && npm run setup",
|
|
33
33
|
"build": "grunt",
|
|
34
34
|
"build.all": "grunt test",
|
|
35
35
|
"dev": "tsc --watch",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"mobile"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@nativescript/doctor": "2.0.
|
|
58
|
+
"@nativescript/doctor": "2.0.12",
|
|
59
59
|
"@nativescript/schematics-executor": "0.0.2",
|
|
60
60
|
"@npmcli/arborist": "^7.2.0",
|
|
61
61
|
"@npmcli/move-file": "^2.0.0",
|
|
62
62
|
"@rigor789/resolve-package-path": "1.0.7",
|
|
63
63
|
"@rigor789/trapezedev-project": "7.1.1",
|
|
64
|
-
|
|
64
|
+
"ansi-colors": "^4.1.3",
|
|
65
65
|
"archiver": "^5.3.1",
|
|
66
66
|
"axios": "1.3.5",
|
|
67
67
|
"byline": "5.0.0",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"esprima": "4.0.1",
|
|
76
76
|
"font-finder": "1.1.0",
|
|
77
77
|
"glob": "9.3.4",
|
|
78
|
-
"ios-device-lib": "0.9.
|
|
78
|
+
"ios-device-lib": "0.9.3",
|
|
79
79
|
"ios-mobileprovision-finder": "1.1.0",
|
|
80
|
-
"ios-sim-portable": "4.4.
|
|
80
|
+
"ios-sim-portable": "4.4.1",
|
|
81
81
|
"jimp": "0.22.7",
|
|
82
82
|
"lodash": "4.17.21",
|
|
83
83
|
"log4js": "6.9.1",
|