nativescript 9.1.0-alpha.1 → 9.1.0-dev.2026-05-29-26613502001
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/README.md +13 -8
- package/docs/man_pages/project/testing/build-windows.md +56 -0
- package/docs/man_pages/project/testing/build.md +4 -2
- package/docs/man_pages/project/testing/debug-windows.md +69 -0
- package/docs/man_pages/project/testing/debug.md +5 -2
- package/docs/man_pages/project/testing/run-windows.md +63 -0
- package/docs/man_pages/project/testing/run.md +5 -2
- package/lib/.d.ts +7 -0
- package/lib/bootstrap.js +5 -0
- package/lib/commands/build.js +32 -1
- package/lib/commands/debug.js +28 -1
- package/lib/commands/run.js +35 -1
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/definitions/mobile.d.ts +8 -10
- package/lib/common/file-system.js +19 -5
- package/lib/common/mobile/device-platforms-constants.js +4 -0
- package/lib/common/mobile/mobile-core/devices-service.js +7 -1
- package/lib/common/mobile/mobile-helper.js +9 -0
- package/lib/common/mobile/windows/windows-application-manager.js +272 -0
- package/lib/common/mobile/windows/windows-device-discovery.js +28 -0
- package/lib/common/mobile/windows/windows-device-file-system.js +78 -0
- package/lib/common/mobile/windows/windows-device.js +126 -0
- package/lib/constants.js +2 -7
- package/lib/controllers/prepare-controller.js +3 -0
- package/lib/data/prepare-data.js +8 -1
- package/lib/definitions/livesync.d.ts +1 -0
- package/lib/definitions/nativescript-dev-xcode.d.ts +1 -25
- package/lib/definitions/project.d.ts +7 -35
- package/lib/device-path-provider.js +11 -1
- package/lib/options.js +5 -0
- package/lib/project-data.js +5 -0
- package/lib/resolvers/livesync-service-resolver.js +3 -0
- package/lib/services/build-data-service.js +3 -0
- package/lib/services/bundler/bundler-compiler-service.js +1 -22
- package/lib/services/ios-project-service.js +8 -4
- package/lib/services/ios-watch-app-service.js +16 -663
- package/lib/services/livesync/windows-device-livesync-service.js +41 -0
- package/lib/services/livesync/windows-livesync-service.js +20 -0
- package/lib/services/platform/add-platform-service.js +10 -3
- package/lib/services/platforms-data-service.js +2 -1
- package/lib/services/prepare-data-service.js +4 -1
- package/lib/services/project-cleanup-service.js +36 -1
- package/lib/services/project-data-service.js +13 -0
- package/lib/services/windows-project-service.js +847 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ NativeScript provides platform APIs directly to the JavaScript runtime (_with st
|
|
|
61
61
|
|
|
62
62
|
Some popular use cases:
|
|
63
63
|
|
|
64
|
-
- Building Web, iOS, Android and Vision Pro apps with a shared codebase (aka, cross platform apps)
|
|
64
|
+
- Building Web, iOS, Android, Windows and Vision Pro apps with a shared codebase (aka, cross platform apps)
|
|
65
65
|
- Building native platform apps with portable JavaScript skills
|
|
66
66
|
- Augmenting JavaScript projects with platform API capabilities
|
|
67
67
|
- AndroidTV and Watch development
|
|
@@ -84,20 +84,21 @@ The NativeScript CLI is the command-line interface for interacting with NativeSc
|
|
|
84
84
|

|
|
85
85
|
|
|
86
86
|
* **Commands** - pretty much what every CLI does - support of different command options, input validation and help
|
|
87
|
-
* **Devices Service** - provides the communication between NativeScript and devices/emulators/simulators used to run/debug the app. Uses iTunes to talk to iOS and
|
|
87
|
+
* **Devices Service** - provides the communication between NativeScript and devices/emulators/simulators used to run/debug the app. Uses iTunes to talk to iOS, adb for Android, and local MSIX deployment for Windows.
|
|
88
88
|
* **LiveSync Service** - redeploys applications when code changes during development
|
|
89
89
|
* **Hooks Service** - executes custom-written hooks in developed application, thus modifying the build process
|
|
90
|
-
* **Platforms Service** - provides app build functionalities, uses Gradle to build Android packages and
|
|
90
|
+
* **Platforms Service** - provides app build functionalities, uses Gradle to build Android packages, Xcode for iOS, and MSBuild for Windows.
|
|
91
91
|
|
|
92
92
|
[Back to Top][1]
|
|
93
93
|
|
|
94
94
|
Supported Platforms
|
|
95
95
|
===
|
|
96
96
|
|
|
97
|
-
With the NativeScript CLI, you can target the following
|
|
97
|
+
With the NativeScript CLI, you can target the following platforms.
|
|
98
98
|
|
|
99
99
|
* Android 4.2 or a later stable official release
|
|
100
100
|
* iOS 9.0 or later stable official release
|
|
101
|
+
* Windows 10 version 1809 (build 17763) or later — via `@nativescript/windows`
|
|
101
102
|
|
|
102
103
|
[Back to Top][1]
|
|
103
104
|
|
|
@@ -277,11 +278,12 @@ You can always override the generated entitlements file, by pointing to your own
|
|
|
277
278
|
|
|
278
279
|
## Build Your Project
|
|
279
280
|
|
|
280
|
-
You can build it for your target
|
|
281
|
+
You can build it for your target platforms.
|
|
281
282
|
|
|
282
283
|
```Shell
|
|
283
284
|
ns build android
|
|
284
285
|
ns build ios
|
|
286
|
+
ns build windows
|
|
285
287
|
```
|
|
286
288
|
|
|
287
289
|
The NativeScript CLI calls the SDK for the selected target platform and uses it to build your app locally.
|
|
@@ -290,11 +292,13 @@ When you build for iOS, the NativeScript CLI will either build for a device, if
|
|
|
290
292
|
|
|
291
293
|
> **IMPORTANT:** To build your app for an iOS device, you must configure a valid certificate and provisioning profile pair, and have that pair present on your system for code signing your application package. For more information, see [iOS Code Signing - A Complete Walkthrough](https://seventhsoulmountain.blogspot.com/2013/09/ios-code-sign-in-complete-walkthrough.html).
|
|
292
294
|
|
|
295
|
+
To build for Windows, you need the [.NET 10 SDK](https://dotnet.microsoft.com/download) with the Windows App SDK workload (`dotnet workload install windows`) and Developer Mode enabled. `ns build windows` produces an MSIX package.
|
|
296
|
+
|
|
293
297
|
[Back to Top][1]
|
|
294
298
|
|
|
295
299
|
## Run Your Project
|
|
296
300
|
|
|
297
|
-
You can test your work in progress on connected Android or iOS devices.
|
|
301
|
+
You can test your work in progress on connected Android or iOS devices, or on the local Windows machine.
|
|
298
302
|
|
|
299
303
|
To verify that the NativeScript CLI recognizes your connected devices, run the following command.
|
|
300
304
|
|
|
@@ -302,13 +306,14 @@ To verify that the NativeScript CLI recognizes your connected devices, run the f
|
|
|
302
306
|
ns devices
|
|
303
307
|
```
|
|
304
308
|
|
|
305
|
-
The NativeScript CLI lists all connected physical devices and running emulators/simulators.
|
|
309
|
+
The NativeScript CLI lists all connected physical devices and running emulators/simulators. On Windows, the local machine is also listed as a Windows device.
|
|
306
310
|
|
|
307
|
-
After you have listed the available devices, you can quickly run your app
|
|
311
|
+
After you have listed the available devices, you can quickly run your app by executing:
|
|
308
312
|
|
|
309
313
|
```Shell
|
|
310
314
|
ns run android
|
|
311
315
|
ns run ios
|
|
316
|
+
ns run windows # Windows only — runs on the local machine
|
|
312
317
|
```
|
|
313
318
|
|
|
314
319
|
[Back to Top][1]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<% if (isJekyll) { %>---
|
|
2
|
+
title: ns build windows
|
|
3
|
+
position: 4
|
|
4
|
+
---<% } %>
|
|
5
|
+
|
|
6
|
+
# ns build windows
|
|
7
|
+
|
|
8
|
+
### Description
|
|
9
|
+
|
|
10
|
+
Builds the project for Windows and produces an MSIX package that you can deploy on any Windows 10/11 machine with Developer Mode enabled.
|
|
11
|
+
|
|
12
|
+
<% if(isConsole && (isLinux || isMacOS)) { %>WARNING: You can run this command only on Windows systems. To view the complete help for this command, run `$ ns help build windows`<% } %>
|
|
13
|
+
<% if((isConsole && isWindows) || isHtml) { %>
|
|
14
|
+
### Commands
|
|
15
|
+
|
|
16
|
+
Usage | Synopsis
|
|
17
|
+
---|---
|
|
18
|
+
General | `$ ns build windows [--release] [--env.*]`
|
|
19
|
+
|
|
20
|
+
### Options
|
|
21
|
+
|
|
22
|
+
* `--release` - If set, produces a release build. Otherwise, produces a debug build with DevTools support enabled.
|
|
23
|
+
* `--env.*` - Specifies additional flags that the bundler may process. Can be passed multiple times. Supported additional flags:
|
|
24
|
+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
|
|
25
|
+
* `--env.uglify` - provides basic obfuscation and smaller app size.
|
|
26
|
+
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
|
|
27
|
+
* `--env.sourceMap` - creates inline source maps.
|
|
28
|
+
* `--force` - If set, skips the application compatibility checks and forces `npm i` to ensure all dependencies are installed.
|
|
29
|
+
|
|
30
|
+
<% } %>
|
|
31
|
+
|
|
32
|
+
<% if(isHtml) { %>
|
|
33
|
+
|
|
34
|
+
### Prerequisites
|
|
35
|
+
|
|
36
|
+
* Windows 10 version 1809 (build 17763) or later.
|
|
37
|
+
* [.NET 10 SDK](https://dotnet.microsoft.com/download) with the Windows App SDK workload installed (`dotnet workload install windows`).
|
|
38
|
+
* MSBuild available in `PATH` (installed with Visual Studio or the .NET SDK).
|
|
39
|
+
|
|
40
|
+
### Command Limitations
|
|
41
|
+
|
|
42
|
+
* You can run `$ ns build windows` only on Windows systems.
|
|
43
|
+
|
|
44
|
+
### Related Commands
|
|
45
|
+
|
|
46
|
+
Command | Description
|
|
47
|
+
----------|----------
|
|
48
|
+
[build android](build-android.html) | Builds the project for Android and produces an APK.
|
|
49
|
+
[build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA.
|
|
50
|
+
[build](build.html) | Builds the project for the selected target platform.
|
|
51
|
+
[debug windows](debug-windows.html) | Debugs your project on the local Windows machine.
|
|
52
|
+
[run windows](run-windows.html) | Runs your project on the local Windows machine.
|
|
53
|
+
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
|
|
54
|
+
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
|
|
55
|
+
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
|
|
56
|
+
<% } %>
|
|
@@ -22,9 +22,10 @@ Usage | Synopsis
|
|
|
22
22
|
<% if((isConsole && isMacOS) || isHtml) { %>General | `$ ns build <Platform>`<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ ns build android`<% } %>
|
|
23
23
|
|
|
24
24
|
<% if((isConsole && isMacOS) || isHtml) { %>### Arguments
|
|
25
|
-
`<Platform>` is the target
|
|
25
|
+
`<Platform>` is the target platform for which you want to build your project. You can set the following target platforms.
|
|
26
26
|
* `android` - Build the project for Android and produces an `APK` that you can manually deploy on a device or in the native emulator.
|
|
27
|
-
* `ios` - Build the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on a device
|
|
27
|
+
* `ios` - Build the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on a device.
|
|
28
|
+
* `windows` - Build the project for Windows and produces an `MSIX` package (Windows only).<% } %>
|
|
28
29
|
|
|
29
30
|
### Options
|
|
30
31
|
|
|
@@ -53,6 +54,7 @@ Command | Description
|
|
|
53
54
|
[appstore upload](../../publishing/appstore-upload.html) | Uploads project to iTunes Connect.
|
|
54
55
|
[build android](build-android.html) | Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.
|
|
55
56
|
[build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA that you can manually deploy in the iOS Simulator or on device, respectively.
|
|
57
|
+
[build windows](build-windows.html) | Builds the project for Windows and produces an MSIX package.
|
|
56
58
|
[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator.
|
|
57
59
|
[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator.
|
|
58
60
|
[debug](debug.html) | Debugs your project on a connected device or in a native emulator.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<% if (isJekyll) { %>---
|
|
2
|
+
title: ns debug windows
|
|
3
|
+
position: 7
|
|
4
|
+
---<% } %>
|
|
5
|
+
|
|
6
|
+
# ns debug windows
|
|
7
|
+
|
|
8
|
+
### Description
|
|
9
|
+
|
|
10
|
+
Initiates a debugging session for your project on the local Windows machine. When necessary, the command will prepare, build, deploy and launch the app before starting the debug session. The NativeScript runtime starts a Chrome DevTools Protocol server on port 9229 — attach Chrome DevTools or any CDP-compatible debugger to `ws://localhost:9229`.
|
|
11
|
+
|
|
12
|
+
<% if(isConsole && (isLinux || isMacOS)) { %>WARNING: You can run this command only on Windows systems. To view the complete help for this command, run `$ ns help debug windows`<% } %>
|
|
13
|
+
<% if((isConsole && isWindows) || isHtml) { %>
|
|
14
|
+
### Commands
|
|
15
|
+
|
|
16
|
+
Usage | Synopsis
|
|
17
|
+
---|---
|
|
18
|
+
Deploy, run and attach the Chrome DevTools debugger | `$ ns debug windows [--device <Device ID>] [--timeout <timeout>]`
|
|
19
|
+
Deploy, run and stop at the first code statement | `$ ns debug windows --debug-brk [--timeout <timeout>]`
|
|
20
|
+
Attach the debug tools to a running app | `$ ns debug windows --start [--timeout <timeout>]`
|
|
21
|
+
|
|
22
|
+
### Options
|
|
23
|
+
|
|
24
|
+
* `--debug-brk` - Builds, deploys and launches the application and stops at the first JavaScript statement.
|
|
25
|
+
* `--start` - Attaches the debug tools to a deployed and running app without restarting it.
|
|
26
|
+
* `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the app to launch. Default: 90 seconds.
|
|
27
|
+
* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
|
|
28
|
+
* `--no-hmr` - Disables Hot Module Replacement (HMR).
|
|
29
|
+
* `--env.*` - Specifies additional flags that the bundler may process. Can be passed multiple times.
|
|
30
|
+
* `--force` - If set, skips the application compatibility checks and forces `npm i` to ensure all dependencies are installed.
|
|
31
|
+
|
|
32
|
+
<% } %>
|
|
33
|
+
|
|
34
|
+
<% if(isHtml) { %>
|
|
35
|
+
|
|
36
|
+
### Prerequisites
|
|
37
|
+
|
|
38
|
+
* Windows 10 version 1809 (build 17763) or later.
|
|
39
|
+
* [.NET 10 SDK](https://dotnet.microsoft.com/download) with the Windows App SDK workload installed.
|
|
40
|
+
* Developer Mode enabled in Windows Settings.
|
|
41
|
+
* Google Chrome or any debugger supporting the Chrome DevTools Protocol (CDP).
|
|
42
|
+
|
|
43
|
+
### How to attach Chrome DevTools
|
|
44
|
+
|
|
45
|
+
1. Run `ns debug windows`
|
|
46
|
+
2. Open Chrome and navigate to `chrome://inspect`
|
|
47
|
+
3. Under **Devices**, click **Configure** and add `localhost:9229`
|
|
48
|
+
4. The NativeScript runtime will appear under **Remote Target** — click **inspect**
|
|
49
|
+
|
|
50
|
+
### Command Limitations
|
|
51
|
+
|
|
52
|
+
* You can run `$ ns debug windows` only on Windows systems.
|
|
53
|
+
|
|
54
|
+
### Related Commands
|
|
55
|
+
|
|
56
|
+
Command | Description
|
|
57
|
+
----------|----------
|
|
58
|
+
[build windows](build-windows.html) | Builds the project for Windows and produces an MSIX package.
|
|
59
|
+
[build android](build-android.html) | Builds the project for Android.
|
|
60
|
+
[build ios](build-ios.html) | Builds the project for iOS.
|
|
61
|
+
[build](build.html) | Builds the project for the selected target platform.
|
|
62
|
+
[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator.
|
|
63
|
+
[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator.
|
|
64
|
+
[debug](debug.html) | Debugs your project on a connected device or in a native emulator.
|
|
65
|
+
[run windows](run-windows.html) | Runs your project on the local Windows machine.
|
|
66
|
+
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
|
|
67
|
+
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
|
|
68
|
+
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
|
|
69
|
+
<% } %>
|
|
@@ -38,15 +38,17 @@ Usage | Synopsis
|
|
|
38
38
|
<% if((isConsole && isMacOS) || isHtml) { %>General | `$ ns debug <Platform>`<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ ns debug android`<% } %>
|
|
39
39
|
|
|
40
40
|
<% if((isConsole && isMacOS) || isHtml) { %>### Arguments
|
|
41
|
-
`<Platform>` is the target
|
|
41
|
+
`<Platform>` is the target platform for which you want to debug your project. You can set the following target platforms:
|
|
42
42
|
* `android` - Start a debugging session for your project on a connected Android device or Android emulator.
|
|
43
|
-
* `ios` - Start a debugging session for your project on a connected iOS device or in the native iOS simulator
|
|
43
|
+
* `ios` - Start a debugging session for your project on a connected iOS device or in the native iOS simulator.
|
|
44
|
+
* `windows` - Start a debugging session on the local Windows machine via Chrome DevTools Protocol on port 9229 (Windows only).<% } %>
|
|
44
45
|
|
|
45
46
|
<% if(isHtml) { %>
|
|
46
47
|
|
|
47
48
|
### Command Limitations
|
|
48
49
|
|
|
49
50
|
* You can run `$ ns debug ios` only on macOS systems.
|
|
51
|
+
* You can run `$ ns debug windows` only on Windows systems.
|
|
50
52
|
|
|
51
53
|
### Related Commands
|
|
52
54
|
|
|
@@ -57,6 +59,7 @@ Command | Description
|
|
|
57
59
|
[build](build.html) | Builds the project for the selected target platform and produces an application package that you can manually deploy on device or in the native emulator.
|
|
58
60
|
[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator.
|
|
59
61
|
[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator.
|
|
62
|
+
[debug windows](debug-windows.html) | Debugs your project on the local Windows machine.
|
|
60
63
|
[deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device.
|
|
61
64
|
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
|
|
62
65
|
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<% if (isJekyll) { %>---
|
|
2
|
+
title: ns run windows
|
|
3
|
+
position: 11
|
|
4
|
+
---<% } %>
|
|
5
|
+
|
|
6
|
+
# ns run windows
|
|
7
|
+
|
|
8
|
+
### Description
|
|
9
|
+
|
|
10
|
+
Runs your project on the local Windows machine. This is shorthand for prepare, build, deploy and launch. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with the running application.
|
|
11
|
+
|
|
12
|
+
<% if(isConsole && (isLinux || isMacOS)) { %>WARNING: You can run this command only on Windows systems. To view the complete help for this command, run `$ ns help run windows`<% } %>
|
|
13
|
+
<% if((isConsole && isWindows) || isHtml) { %>
|
|
14
|
+
When running this command without passing `--release` flag, the app is built in debug configuration with the DevTools server enabled on port 9229.
|
|
15
|
+
<% } %>
|
|
16
|
+
|
|
17
|
+
### Commands
|
|
18
|
+
|
|
19
|
+
Usage | Synopsis
|
|
20
|
+
---|---
|
|
21
|
+
Run on the local Windows device | `$ ns run windows [--release] [--justlaunch] [--env.*]`
|
|
22
|
+
|
|
23
|
+
### Options
|
|
24
|
+
|
|
25
|
+
* `--justlaunch` - If set, does not print the application output in the console.
|
|
26
|
+
* `--release` - If set, produces a release build. Otherwise, produces a debug build.
|
|
27
|
+
* `--no-hmr` - Disables Hot Module Replacement (HMR). When a change in the code is applied, CLI will transfer the modified files and restart the application.
|
|
28
|
+
* `--env.*` - Specifies additional flags that the bundler may process. Can be passed multiple times. Supported additional flags:
|
|
29
|
+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
|
|
30
|
+
* `--env.uglify` - provides basic obfuscation and smaller app size.
|
|
31
|
+
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
|
|
32
|
+
* `--env.sourceMap` - creates inline source maps.
|
|
33
|
+
* `--force` - If set, skips the application compatibility checks and forces `npm i` to ensure all dependencies are installed.
|
|
34
|
+
|
|
35
|
+
<% if(isHtml) { %>
|
|
36
|
+
|
|
37
|
+
### Prerequisites
|
|
38
|
+
|
|
39
|
+
Before running your app, verify that your system meets the following requirements.
|
|
40
|
+
* Windows 10 version 1809 (build 17763) or later.
|
|
41
|
+
* [.NET 10 SDK](https://dotnet.microsoft.com/download) with the Windows App SDK workload installed.
|
|
42
|
+
* Developer Mode enabled in Windows Settings → Privacy & Security → For Developers.
|
|
43
|
+
|
|
44
|
+
### Command Limitations
|
|
45
|
+
|
|
46
|
+
* You can run `$ ns run windows` only on Windows systems.
|
|
47
|
+
|
|
48
|
+
### Related Commands
|
|
49
|
+
|
|
50
|
+
Command | Description
|
|
51
|
+
----------|----------
|
|
52
|
+
[build windows](build-windows.html) | Builds the project for Windows and produces an MSIX package.
|
|
53
|
+
[build android](build-android.html) | Builds the project for Android.
|
|
54
|
+
[build ios](build-ios.html) | Builds the project for iOS.
|
|
55
|
+
[build](build.html) | Builds the project for the selected target platform.
|
|
56
|
+
[debug windows](debug-windows.html) | Debugs your project on the local Windows machine.
|
|
57
|
+
[debug android](debug-android.html) | Debugs your project on a connected Android device or in a native emulator.
|
|
58
|
+
[debug ios](debug-ios.html) | Debugs your project on a connected iOS device or in a native emulator.
|
|
59
|
+
[debug](debug.html) | Debugs your project on a connected device or in a native emulator.
|
|
60
|
+
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
|
|
61
|
+
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
|
|
62
|
+
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
|
|
63
|
+
<% } %>
|
|
@@ -58,9 +58,10 @@ Run on a selected connected device or running emulator. Will start emulator with
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
<% if((isConsole && isMacOS) || isHtml) { %>### Arguments
|
|
61
|
-
`<Platform>` is the target
|
|
61
|
+
`<Platform>` is the target platform for which you want to run your project. You can set the following target platforms:
|
|
62
62
|
* `android` - Run your project on all Android devices and emulators.
|
|
63
63
|
* `ios` - Run your project on all iOS devices and simulators.
|
|
64
|
+
* `windows` - Run your project on the local Windows machine (Windows only).
|
|
64
65
|
|
|
65
66
|
<% } %>
|
|
66
67
|
|
|
@@ -68,7 +69,8 @@ Run on a selected connected device or running emulator. Will start emulator with
|
|
|
68
69
|
|
|
69
70
|
### Command Limitations
|
|
70
71
|
|
|
71
|
-
* The command will work with all connected devices and running emulators on macOS. On
|
|
72
|
+
* The command will work with all connected devices and running emulators on macOS. On Linux the command will work with Android devices only.
|
|
73
|
+
* On Windows the command works with Android devices, emulators, and the local Windows machine (via `ns run windows`).
|
|
72
74
|
* In case a platform is not specified and there's no running devices and emulators, the command will fail.
|
|
73
75
|
|
|
74
76
|
### Related Commands
|
|
@@ -86,6 +88,7 @@ Command | Description
|
|
|
86
88
|
[deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device.
|
|
87
89
|
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
|
|
88
90
|
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
|
|
91
|
+
[run windows](run-windows.html) | Runs your project on the local Windows machine.
|
|
89
92
|
[test init](test-init.html) | Configures your project for unit testing with a selected framework.
|
|
90
93
|
[test android](test-android.html) | Runs the tests in your project on Android devices or native emulators.
|
|
91
94
|
[test ios](test-ios.html) | Runs the tests in your project on iOS devices or the iOS Simulator.
|
package/lib/.d.ts
CHANGED
|
@@ -155,6 +155,10 @@
|
|
|
155
155
|
/// <reference path="common/mobile/mobile-core/ios-device-discovery.ts" />
|
|
156
156
|
/// <reference path="common/mobile/mobile-core/ios-simulator-discovery.ts" />
|
|
157
157
|
/// <reference path="common/mobile/mobile-helper.ts" />
|
|
158
|
+
/// <reference path="common/mobile/windows/windows-application-manager.ts" />
|
|
159
|
+
/// <reference path="common/mobile/windows/windows-device-discovery.ts" />
|
|
160
|
+
/// <reference path="common/mobile/windows/windows-device-file-system.ts" />
|
|
161
|
+
/// <reference path="common/mobile/windows/windows-device.ts" />
|
|
158
162
|
/// <reference path="common/mobile/wp8/wp8-emulator-services.ts" />
|
|
159
163
|
/// <reference path="common/opener.ts" />
|
|
160
164
|
/// <reference path="common/os-info.ts" />
|
|
@@ -391,6 +395,8 @@
|
|
|
391
395
|
/// <reference path="services/livesync/ios-livesync-service.ts" />
|
|
392
396
|
/// <reference path="services/livesync/livesync-socket.ts" />
|
|
393
397
|
/// <reference path="services/livesync/platform-livesync-service-base.ts" />
|
|
398
|
+
/// <reference path="services/livesync/windows-device-livesync-service.ts" />
|
|
399
|
+
/// <reference path="services/livesync/windows-livesync-service.ts" />
|
|
394
400
|
/// <reference path="services/log-parser-service.ts" />
|
|
395
401
|
/// <reference path="services/log-source-map-service.ts" />
|
|
396
402
|
/// <reference path="services/marking-mode-service.ts" />
|
|
@@ -425,6 +431,7 @@
|
|
|
425
431
|
/// <reference path="services/user-settings-service.ts" />
|
|
426
432
|
/// <reference path="services/versions-service.ts" />
|
|
427
433
|
/// <reference path="services/watch-ignore-list-service.ts" />
|
|
434
|
+
/// <reference path="services/windows-project-service.ts" />
|
|
428
435
|
/// <reference path="services/xcconfig-service.ts" />
|
|
429
436
|
/// <reference path="services/xcproj-service.ts" />
|
|
430
437
|
/// <reference path="shared-event-bus.ts" />
|
package/lib/bootstrap.js
CHANGED
|
@@ -25,6 +25,7 @@ yok_1.injector.require("iOSNativeTargetService", "./services/ios-native-target-s
|
|
|
25
25
|
yok_1.injector.require("iOSExtensionsService", "./services/ios-extensions-service");
|
|
26
26
|
yok_1.injector.require("iOSWatchAppService", "./services/ios-watch-app-service");
|
|
27
27
|
yok_1.injector.require("iOSProjectService", "./services/ios-project-service");
|
|
28
|
+
yok_1.injector.require("windowsProjectService", "./services/windows-project-service");
|
|
28
29
|
yok_1.injector.require("iOSProvisionService", "./services/ios-provision-service");
|
|
29
30
|
yok_1.injector.require("xcconfigService", "./services/xcconfig-service");
|
|
30
31
|
yok_1.injector.require("iOSSigningService", "./services/ios/ios-signing-service");
|
|
@@ -81,18 +82,21 @@ yok_1.injector.requireCommand("run|ios", "./commands/run");
|
|
|
81
82
|
yok_1.injector.requireCommand("run|android", "./commands/run");
|
|
82
83
|
yok_1.injector.requireCommand("run|vision", "./commands/run");
|
|
83
84
|
yok_1.injector.requireCommand("run|visionos", "./commands/run");
|
|
85
|
+
yok_1.injector.requireCommand("run|windows", "./commands/run");
|
|
84
86
|
yok_1.injector.requireCommand("typings", "./commands/typings");
|
|
85
87
|
yok_1.injector.requireCommand("preview", "./commands/preview");
|
|
86
88
|
yok_1.injector.requireCommand("debug|ios", "./commands/debug");
|
|
87
89
|
yok_1.injector.requireCommand("debug|android", "./commands/debug");
|
|
88
90
|
yok_1.injector.requireCommand("debug|vision", "./commands/debug");
|
|
89
91
|
yok_1.injector.requireCommand("debug|visionos", "./commands/debug");
|
|
92
|
+
yok_1.injector.requireCommand("debug|windows", "./commands/debug");
|
|
90
93
|
yok_1.injector.requireCommand("fonts", "./commands/fonts");
|
|
91
94
|
yok_1.injector.requireCommand("prepare", "./commands/prepare");
|
|
92
95
|
yok_1.injector.requireCommand("build|ios", "./commands/build");
|
|
93
96
|
yok_1.injector.requireCommand("build|android", "./commands/build");
|
|
94
97
|
yok_1.injector.requireCommand("build|vision", "./commands/build");
|
|
95
98
|
yok_1.injector.requireCommand("build|visionos", "./commands/build");
|
|
99
|
+
yok_1.injector.requireCommand("build|windows", "./commands/build");
|
|
96
100
|
yok_1.injector.requireCommand("deploy", "./commands/deploy");
|
|
97
101
|
yok_1.injector.requireCommand("embed", "./commands/embedding/embed");
|
|
98
102
|
yok_1.injector.require("testExecutionService", "./services/test-execution-service");
|
|
@@ -154,6 +158,7 @@ yok_1.injector.require("LiveSyncSocket", "./services/livesync/livesync-socket");
|
|
|
154
158
|
yok_1.injector.requirePublicClass("androidLivesyncTool", "./services/livesync/android-livesync-tool");
|
|
155
159
|
yok_1.injector.require("androidLiveSyncService", "./services/livesync/android-livesync-service");
|
|
156
160
|
yok_1.injector.require("iOSLiveSyncService", "./services/livesync/ios-livesync-service");
|
|
161
|
+
yok_1.injector.require("windowsLiveSyncService", "./services/livesync/windows-livesync-service");
|
|
157
162
|
yok_1.injector.require("usbLiveSyncService", "./services/livesync/livesync-service"); // The name is used in https://github.com/NativeScript/nativescript-dev-typescript
|
|
158
163
|
yok_1.injector.requirePublic("sysInfo", "./sys-info");
|
|
159
164
|
yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
|
package/lib/commands/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BuildVisionOsCommand = exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
|
|
3
|
+
exports.BuildWindowsCommand = exports.BuildVisionOsCommand = exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const command_base_1 = require("./command-base");
|
|
6
6
|
const helpers_1 = require("../common/helpers");
|
|
@@ -143,4 +143,35 @@ class BuildVisionOsCommand extends BuildIosCommand {
|
|
|
143
143
|
exports.BuildVisionOsCommand = BuildVisionOsCommand;
|
|
144
144
|
yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
|
|
145
145
|
yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
|
|
146
|
+
class BuildWindowsCommand extends BuildCommandBase {
|
|
147
|
+
constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger, $migrateController) {
|
|
148
|
+
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger);
|
|
149
|
+
this.$options = $options;
|
|
150
|
+
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
151
|
+
this.$logger = $logger;
|
|
152
|
+
this.$migrateController = $migrateController;
|
|
153
|
+
this.allowedParameters = [];
|
|
154
|
+
}
|
|
155
|
+
async execute(args) {
|
|
156
|
+
await this.executeCore([
|
|
157
|
+
this.$devicePlatformsConstants.Windows.toLowerCase(),
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
async canExecute(args) {
|
|
161
|
+
const platform = this.$devicePlatformsConstants.Windows;
|
|
162
|
+
if (!this.$options.force) {
|
|
163
|
+
await this.$migrateController.validate({
|
|
164
|
+
projectDir: this.$projectData.projectDir,
|
|
165
|
+
platforms: [platform],
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
let canExecute = await super.canExecuteCommandBase(platform);
|
|
169
|
+
if (canExecute) {
|
|
170
|
+
canExecute = await super.validateArgs(args, platform);
|
|
171
|
+
}
|
|
172
|
+
return canExecute;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.BuildWindowsCommand = BuildWindowsCommand;
|
|
176
|
+
yok_1.injector.registerCommand("build|windows", BuildWindowsCommand);
|
|
146
177
|
//# sourceMappingURL=build.js.map
|
package/lib/commands/debug.js
CHANGED
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.DebugAndroidCommand = exports.DebugIOSCommand = exports.DebugPlatformCommand = void 0;
|
|
9
|
+
exports.DebugWindowsCommand = exports.DebugAndroidCommand = exports.DebugIOSCommand = exports.DebugPlatformCommand = void 0;
|
|
10
10
|
const decorators_1 = require("../common/decorators");
|
|
11
11
|
const command_base_1 = require("./command-base");
|
|
12
12
|
const helpers_1 = require("../common/helpers");
|
|
@@ -171,4 +171,31 @@ __decorate([
|
|
|
171
171
|
(0, decorators_1.cache)()
|
|
172
172
|
], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
|
|
173
173
|
yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
|
|
174
|
+
class DebugWindowsCommand {
|
|
175
|
+
get debugPlatformCommand() {
|
|
176
|
+
return this.$injector.resolve(DebugPlatformCommand, {
|
|
177
|
+
platform: this.$devicePlatformsConstants.Windows,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
constructor($errors, $devicePlatformsConstants, $injector, $projectData) {
|
|
181
|
+
this.$errors = $errors;
|
|
182
|
+
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
183
|
+
this.$injector = $injector;
|
|
184
|
+
this.$projectData = $projectData;
|
|
185
|
+
this.allowedParameters = [];
|
|
186
|
+
this.platform = this.$devicePlatformsConstants.Windows;
|
|
187
|
+
this.$projectData.initializeProjectData();
|
|
188
|
+
}
|
|
189
|
+
async execute(args) {
|
|
190
|
+
return this.debugPlatformCommand.execute(args);
|
|
191
|
+
}
|
|
192
|
+
async canExecute(args) {
|
|
193
|
+
return this.debugPlatformCommand.canExecute(args);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.DebugWindowsCommand = DebugWindowsCommand;
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, decorators_1.cache)()
|
|
199
|
+
], DebugWindowsCommand.prototype, "debugPlatformCommand", null);
|
|
200
|
+
yok_1.injector.registerCommand("debug|windows", DebugWindowsCommand);
|
|
174
201
|
//# sourceMappingURL=debug.js.map
|
package/lib/commands/run.js
CHANGED
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RunVisionOSCommand = exports.RunAndroidCommand = exports.RunIosCommand = exports.RunCommandBase = void 0;
|
|
9
|
+
exports.RunWindowsCommand = exports.RunVisionOSCommand = exports.RunAndroidCommand = exports.RunIosCommand = exports.RunCommandBase = void 0;
|
|
10
10
|
const constants_1 = require("../common/constants");
|
|
11
11
|
const decorators_1 = require("../common/decorators");
|
|
12
12
|
const helpers_1 = require("../common/helpers");
|
|
@@ -154,4 +154,38 @@ class RunVisionOSCommand extends RunIosCommand {
|
|
|
154
154
|
exports.RunVisionOSCommand = RunVisionOSCommand;
|
|
155
155
|
yok_1.injector.registerCommand("run|vision", RunVisionOSCommand);
|
|
156
156
|
yok_1.injector.registerCommand("run|visionos", RunVisionOSCommand);
|
|
157
|
+
class RunWindowsCommand {
|
|
158
|
+
get runCommand() {
|
|
159
|
+
const runCommand = this.$injector.resolve(RunCommandBase);
|
|
160
|
+
runCommand.platform = this.platform;
|
|
161
|
+
return runCommand;
|
|
162
|
+
}
|
|
163
|
+
get platform() {
|
|
164
|
+
return this.$devicePlatformsConstants.Windows;
|
|
165
|
+
}
|
|
166
|
+
constructor($devicePlatformsConstants, $errors, $injector, $options, $platformValidationService, $projectData) {
|
|
167
|
+
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
168
|
+
this.$errors = $errors;
|
|
169
|
+
this.$injector = $injector;
|
|
170
|
+
this.$options = $options;
|
|
171
|
+
this.$platformValidationService = $platformValidationService;
|
|
172
|
+
this.$projectData = $projectData;
|
|
173
|
+
this.allowedParameters = [];
|
|
174
|
+
}
|
|
175
|
+
async execute(args) {
|
|
176
|
+
return this.runCommand.execute(args);
|
|
177
|
+
}
|
|
178
|
+
async canExecute(args) {
|
|
179
|
+
await this.runCommand.canExecute(args);
|
|
180
|
+
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.Windows, this.$projectData)) {
|
|
181
|
+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.Windows} can not be built on this OS`);
|
|
182
|
+
}
|
|
183
|
+
return this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, this.$projectData, this.$devicePlatformsConstants.Windows.toLowerCase());
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
exports.RunWindowsCommand = RunWindowsCommand;
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, decorators_1.cache)()
|
|
189
|
+
], RunWindowsCommand.prototype, "runCommand", null);
|
|
190
|
+
yok_1.injector.registerCommand("run|windows", RunWindowsCommand);
|
|
157
191
|
//# sourceMappingURL=run.js.map
|
package/lib/common/bootstrap.js
CHANGED
|
@@ -46,6 +46,7 @@ yok_1.injector.require("deviceDiscovery", "./mobile/mobile-core/device-discovery
|
|
|
46
46
|
yok_1.injector.require("iOSDeviceDiscovery", "./mobile/mobile-core/ios-device-discovery");
|
|
47
47
|
yok_1.injector.require("iOSSimulatorDiscovery", "./mobile/mobile-core/ios-simulator-discovery");
|
|
48
48
|
yok_1.injector.require("androidDeviceDiscovery", "./mobile/mobile-core/android-device-discovery");
|
|
49
|
+
yok_1.injector.require("windowsDeviceDiscovery", "./mobile/windows/windows-device-discovery");
|
|
49
50
|
yok_1.injector.require("androidEmulatorDiscovery", "./mobile/mobile-core/android-emulator-discovery");
|
|
50
51
|
yok_1.injector.require("iOSDevice", "./mobile/ios/device/ios-device");
|
|
51
52
|
yok_1.injector.require("iOSDeviceProductNameMapper", "./mobile/ios/ios-device-product-name-mapper");
|
|
@@ -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.
|
|
@@ -533,8 +531,7 @@ declare global {
|
|
|
533
531
|
/**
|
|
534
532
|
* Describes options that can be passed to devices service's initialization method.
|
|
535
533
|
*/
|
|
536
|
-
interface IDevicesServicesInitializationOptions
|
|
537
|
-
extends Partial<IDeviceLookingOptions> {
|
|
534
|
+
interface IDevicesServicesInitializationOptions extends Partial<IDeviceLookingOptions> {
|
|
538
535
|
/**
|
|
539
536
|
* If passed will start an emulator if necesasry.
|
|
540
537
|
*/
|
|
@@ -1197,6 +1194,7 @@ declare global {
|
|
|
1197
1194
|
isAndroidPlatform(platform: string): boolean;
|
|
1198
1195
|
isiOSPlatform(platform: string): boolean;
|
|
1199
1196
|
isvisionOSPlatform(platform: string): boolean;
|
|
1197
|
+
isWindowsPlatform(platform: string): boolean;
|
|
1200
1198
|
isApplePlatform(platform: string): boolean;
|
|
1201
1199
|
normalizePlatformName(platform: string): string;
|
|
1202
1200
|
validatePlatformName(platform: string): string;
|
|
@@ -1241,10 +1239,12 @@ declare global {
|
|
|
1241
1239
|
iOS: string;
|
|
1242
1240
|
Android: string;
|
|
1243
1241
|
visionOS: string;
|
|
1242
|
+
Windows: string;
|
|
1244
1243
|
|
|
1245
1244
|
isiOS(value: string): boolean;
|
|
1246
1245
|
isAndroid(value: string): boolean;
|
|
1247
1246
|
isvisionOS(value: string): boolean;
|
|
1247
|
+
isWindows(value: string): boolean;
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
interface IDeviceApplication {
|
|
@@ -1261,8 +1261,7 @@ declare global {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
1263
|
interface IDeviceLookingOptions
|
|
1264
|
-
extends IHasEmulatorOption,
|
|
1265
|
-
IHasDetectionInterval {
|
|
1264
|
+
extends IHasEmulatorOption, IHasDetectionInterval {
|
|
1266
1265
|
shouldReturnImmediateResult: boolean;
|
|
1267
1266
|
platform: string;
|
|
1268
1267
|
fullDiscovery?: boolean;
|
|
@@ -1388,8 +1387,7 @@ declare global {
|
|
|
1388
1387
|
/**
|
|
1389
1388
|
* Describes information about application on device.
|
|
1390
1389
|
*/
|
|
1391
|
-
interface IDeviceApplicationInformation
|
|
1392
|
-
extends IDeviceApplicationInformationBase {
|
|
1390
|
+
interface IDeviceApplicationInformation extends IDeviceApplicationInformationBase {
|
|
1393
1391
|
/**
|
|
1394
1392
|
* The framework of the project (Cordova or NativeScript).
|
|
1395
1393
|
*/
|