nativescript 9.1.1 → 9.1.2-dev.2026-09-24-36031892256

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.
Files changed (74) hide show
  1. package/README.md +13 -8
  2. package/config/test-deps-versions-generated.json +1 -1
  3. package/docs/man_pages/project/testing/build-windows.md +64 -0
  4. package/docs/man_pages/project/testing/build.md +4 -2
  5. package/docs/man_pages/project/testing/debug-windows.md +69 -0
  6. package/docs/man_pages/project/testing/debug.md +5 -2
  7. package/docs/man_pages/project/testing/run-windows.md +63 -0
  8. package/docs/man_pages/project/testing/run.md +5 -2
  9. package/lib/bootstrap.js +5 -0
  10. package/lib/commands/build.d.ts +10 -0
  11. package/lib/commands/build.js +41 -1
  12. package/lib/commands/debug.d.ts +12 -0
  13. package/lib/commands/debug.js +28 -1
  14. package/lib/commands/run.d.ts +14 -0
  15. package/lib/commands/run.js +35 -1
  16. package/lib/commands/typings.d.ts +1 -0
  17. package/lib/commands/typings.js +55 -0
  18. package/lib/common/bootstrap.js +1 -0
  19. package/lib/common/commands/doctor.d.ts +7 -0
  20. package/lib/common/commands/doctor.js +18 -1
  21. package/lib/common/definitions/mobile.d.ts +9 -0
  22. package/lib/common/file-system.js +34 -6
  23. package/lib/common/http-client.js +9 -2
  24. package/lib/common/mobile/device-platforms-constants.d.ts +2 -0
  25. package/lib/common/mobile/device-platforms-constants.js +4 -0
  26. package/lib/common/mobile/mobile-core/devices-service.d.ts +2 -1
  27. package/lib/common/mobile/mobile-core/devices-service.js +7 -1
  28. package/lib/common/mobile/mobile-helper.d.ts +1 -0
  29. package/lib/common/mobile/mobile-helper.js +9 -0
  30. package/lib/common/mobile/windows/windows-application-manager.d.ts +25 -0
  31. package/lib/common/mobile/windows/windows-application-manager.js +237 -0
  32. package/lib/common/mobile/windows/windows-device-discovery.d.ts +9 -0
  33. package/lib/common/mobile/windows/windows-device-discovery.js +27 -0
  34. package/lib/common/mobile/windows/windows-device-file-system.d.ts +15 -0
  35. package/lib/common/mobile/windows/windows-device-file-system.js +74 -0
  36. package/lib/common/mobile/windows/windows-device.d.ts +13 -0
  37. package/lib/common/mobile/windows/windows-device.js +110 -0
  38. package/lib/constants.d.ts +12 -2
  39. package/lib/constants.js +15 -4
  40. package/lib/controllers/prepare-controller.js +3 -0
  41. package/lib/controllers/run-controller.js +1 -0
  42. package/lib/data/build-data.d.ts +11 -0
  43. package/lib/data/build-data.js +18 -1
  44. package/lib/data/prepare-data.d.ts +4 -0
  45. package/lib/data/prepare-data.js +8 -1
  46. package/lib/declarations.d.ts +9 -0
  47. package/lib/definitions/livesync.d.ts +3 -0
  48. package/lib/definitions/project.d.ts +10 -0
  49. package/lib/device-path-provider.d.ts +3 -1
  50. package/lib/device-path-provider.js +13 -1
  51. package/lib/options.js +19 -0
  52. package/lib/project-data.js +5 -0
  53. package/lib/resolvers/livesync-service-resolver.js +3 -0
  54. package/lib/services/apple-portal/apple-portal-session-service.d.ts +1 -0
  55. package/lib/services/apple-portal/apple-portal-session-service.js +34 -0
  56. package/lib/services/build-data-service.d.ts +2 -2
  57. package/lib/services/build-data-service.js +3 -0
  58. package/lib/services/build-info-file-service.js +1 -0
  59. package/lib/services/bundler/bundler-compiler-service.js +1 -0
  60. package/lib/services/livesync/windows-device-livesync-service.d.ts +14 -0
  61. package/lib/services/livesync/windows-device-livesync-service.js +47 -0
  62. package/lib/services/livesync/windows-livesync-service.d.ts +13 -0
  63. package/lib/services/livesync/windows-livesync-service.js +19 -0
  64. package/lib/services/platform/add-platform-service.js +9 -1
  65. package/lib/services/platforms-data-service.d.ts +1 -1
  66. package/lib/services/platforms-data-service.js +2 -1
  67. package/lib/services/prepare-data-service.d.ts +2 -2
  68. package/lib/services/prepare-data-service.js +4 -1
  69. package/lib/services/project-cleanup-service.d.ts +1 -0
  70. package/lib/services/project-cleanup-service.js +30 -1
  71. package/lib/services/project-data-service.js +18 -0
  72. package/lib/services/windows-project-service.d.ts +42 -0
  73. package/lib/services/windows-project-service.js +907 -0
  74. package/package.json +3 -3
package/README.md CHANGED
@@ -62,7 +62,7 @@ NativeScript provides platform APIs directly to the JavaScript runtime (_with st
62
62
 
63
63
  Some popular use cases:
64
64
 
65
- - Building Web, iOS, Android and Vision Pro apps with a shared codebase (aka, cross platform apps)
65
+ - Building Web, iOS, Android, Windows and Vision Pro apps with a shared codebase (aka, cross platform apps)
66
66
  - Building native platform apps with portable JavaScript skills
67
67
  - Augmenting JavaScript projects with platform API capabilities
68
68
  - AndroidTV and Watch development
@@ -85,20 +85,21 @@ The NativeScript CLI is the command-line interface for interacting with NativeSc
85
85
  ![NativeScript CLI diagram](https://github.com/NativeScript/nativescript-cli/raw/release/ns-cli.png)
86
86
 
87
87
  * **Commands** - pretty much what every CLI does - support of different command options, input validation and help
88
- * **Devices Service** - provides the communication between NativeScript and devices/emulators/simulators used to run/debug the app. Uses iTunes to talk to iOS and adb for Android
88
+ * **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.
89
89
  * **LiveSync Service** - redeploys applications when code changes during development
90
90
  * **Hooks Service** - executes custom-written hooks in developed application, thus modifying the build process
91
- * **Platforms Service** - provides app build functionalities, uses Gradle to build Android packages and Xcode for iOS.
91
+ * **Platforms Service** - provides app build functionalities, uses Gradle to build Android packages, Xcode for iOS, and MSBuild for Windows.
92
92
 
93
93
  [Back to Top][1]
94
94
 
95
95
  Supported Platforms
96
96
  ===
97
97
 
98
- With the NativeScript CLI, you can target the following mobile platforms.
98
+ With the NativeScript CLI, you can target the following platforms.
99
99
 
100
100
  * Android 4.2 or a later stable official release
101
101
  * iOS 9.0 or later stable official release
102
+ * Windows 10 version 1809 (build 17763) or later. Via `@nativescript/windows`
102
103
 
103
104
  [Back to Top][1]
104
105
 
@@ -278,11 +279,12 @@ You can always override the generated entitlements file, by pointing to your own
278
279
 
279
280
  ## Build Your Project
280
281
 
281
- You can build it for your target mobile platforms.
282
+ You can build it for your target platforms.
282
283
 
283
284
  ```Shell
284
285
  ns build android
285
286
  ns build ios
287
+ ns build windows
286
288
  ```
287
289
 
288
290
  The NativeScript CLI calls the SDK for the selected target platform and uses it to build your app locally.
@@ -291,11 +293,13 @@ When you build for iOS, the NativeScript CLI will either build for a device, if
291
293
 
292
294
  > **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).
293
295
 
296
+ 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.
297
+
294
298
  [Back to Top][1]
295
299
 
296
300
  ## Run Your Project
297
301
 
298
- You can test your work in progress on connected Android or iOS devices.
302
+ You can test your work in progress on connected Android or iOS devices, or on the local Windows machine.
299
303
 
300
304
  To verify that the NativeScript CLI recognizes your connected devices, run the following command.
301
305
 
@@ -303,13 +307,14 @@ To verify that the NativeScript CLI recognizes your connected devices, run the f
303
307
  ns devices
304
308
  ```
305
309
 
306
- The NativeScript CLI lists all connected physical devices and running emulators/simulators.
310
+ The NativeScript CLI lists all connected physical devices and running emulators/simulators. On Windows, the local machine is also listed as a Windows device.
307
311
 
308
- After you have listed the available devices, you can quickly run your app on connected devices by executing:
312
+ After you have listed the available devices, you can quickly run your app by executing:
309
313
 
310
314
  ```Shell
311
315
  ns run android
312
316
  ns run ios
317
+ ns run windows # Windows only. Runs on the local machine
313
318
  ```
314
319
 
315
320
  [Back to Top][1]
@@ -7,7 +7,7 @@
7
7
  "karma": "6.4.4",
8
8
  "karma-coverage": "2.2.1",
9
9
  "karma-nativescript-launcher": "1.0.0",
10
- "mocha": "12.0.0",
10
+ "mocha": "12.0.2",
11
11
  "karma-mocha": "2.0.1",
12
12
  "karma-chai": "0.1.0",
13
13
  "karma-jasmine": "4.0.2",
@@ -0,0 +1,64 @@
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 [--certificate <File Path> --certificate-password <Password>] [--certificate-thumbprint <Thumbprint>] [--store-upload] [--msixbundle]] [--arch <Architecture>] [--copy-to <File Path>] [--env.*]`
19
+
20
+ ### Options
21
+
22
+ * `--release` - If set, produces a release build and packages it as an MSIX. By default this produces a sideloadable `.msix` (sign it with the `--certificate*` options); pass `--store-upload` to produce a `.msixupload` bundle for the Microsoft Store instead. Without `--release`, produces a debug build with DevTools support enabled.
23
+ * `--certificate` - Specifies the file path to the code-signing certificate (`.pfx`) used to sign the release MSIX. Path is resolved relative to the project directory if not absolute. Used together with `--release`.
24
+ * `--certificate-password` - Provides the password for the certificate specified with `--certificate`.
25
+ * `--certificate-thumbprint` - Signs the release MSIX using an already-installed certificate identified by its thumbprint, instead of a `.pfx` file. Used together with `--release`. Takes precedence over `--certificate`.
26
+ * `--store-upload` - When set with `--release`, produces an unsigned `.msixupload` bundle for submission to the Microsoft Store (the Store re-signs it). No local certificate is required.
27
+ * `--msixbundle` - When set with `--release`, produces an MSIX bundle (`.msixbundle`). Implied by `--store-upload`.
28
+ * `--arch` - Sets the target architecture for the build (for example `x64`, `arm64`). Defaults to `x64`.
29
+ * `--copy-to` - Specifies the file path where the built package will be copied. If it points to a non-existent directory path, it will be created. If the specified value is an existing directory, the original file name will be used.
30
+ * `--env.*` - Specifies additional flags that the bundler may process. Can be passed multiple times. Supported additional flags:
31
+ * `--env.aot` - creates Ahead-Of-Time build (Angular only).
32
+ * `--env.uglify` - provides basic obfuscation and smaller app size.
33
+ * `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
34
+ * `--env.sourceMap` - creates inline source maps.
35
+ * `--force` - If set, skips the application compatibility checks and forces `npm i` to ensure all dependencies are installed.
36
+
37
+ <% } %>
38
+
39
+ <% if(isHtml) { %>
40
+
41
+ ### Prerequisites
42
+
43
+ * Windows 10 version 1809 (build 17763) or later.
44
+ * [.NET 10 SDK](https://dotnet.microsoft.com/download) with the Windows App SDK workload installed (`dotnet workload install windows`).
45
+ * MSBuild available in `PATH` (installed with Visual Studio or the .NET SDK).
46
+
47
+ ### Command Limitations
48
+
49
+ * You can run `$ ns build windows` only on Windows systems.
50
+ * A `--release` build without `--store-upload`, `--certificate` or `--certificate-thumbprint` produces an unsigned `.msix` that cannot be installed until it is signed.
51
+
52
+ ### Related Commands
53
+
54
+ Command | Description
55
+ ----------|----------
56
+ [build android](build-android.html) | Builds the project for Android and produces an APK.
57
+ [build ios](build-ios.html) | Builds the project for iOS and produces an APP or IPA.
58
+ [build](build.html) | Builds the project for the selected target platform.
59
+ [debug windows](debug-windows.html) | Debugs your project on the local Windows machine.
60
+ [run windows](run-windows.html) | Runs your project on the local Windows machine.
61
+ [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
62
+ [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
63
+ [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
64
+ <% } %>
@@ -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 mobile platform for which you want to build your project. You can set the following target platforms.
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 mobile platform for which you want to debug your project. You can set the following target platforms:
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 mobile platform for which you want to run your project. You can set the following target platforms:
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 Windows and Linux the command will work with Android devices only.
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/bootstrap.js CHANGED
@@ -24,6 +24,7 @@ yok_1.injector.require("iOSNativeTargetService", "./services/ios-native-target-s
24
24
  yok_1.injector.require("iOSExtensionsService", "./services/ios-extensions-service");
25
25
  yok_1.injector.require("iOSWatchAppService", "./services/ios-watch-app-service");
26
26
  yok_1.injector.require("iOSProjectService", "./services/ios-project-service");
27
+ yok_1.injector.require("windowsProjectService", "./services/windows-project-service");
27
28
  yok_1.injector.require("iOSProvisionService", "./services/ios-provision-service");
28
29
  yok_1.injector.require("xcconfigService", "./services/xcconfig-service");
29
30
  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");
158
163
  yok_1.injector.requirePublic("sysInfo", "./sys-info");
159
164
  yok_1.injector.require("iOSNotificationService", "./services/ios-notification-service");
@@ -56,3 +56,13 @@ export declare class BuildVisionOsCommand extends BuildIosCommand implements ICo
56
56
  execute(args: string[]): Promise<void>;
57
57
  canExecute(args: string[]): Promise<boolean>;
58
58
  }
59
+ export declare class BuildWindowsCommand extends BuildCommandBase implements ICommand {
60
+ protected $options: IOptions;
61
+ protected $devicePlatformsConstants: Mobile.IDevicePlatformsConstants;
62
+ protected $logger: ILogger;
63
+ private $migrateController;
64
+ allowedParameters: ICommandParameter[];
65
+ constructor($options: IOptions, $errors: IErrors, $projectData: IProjectData, $platformsDataService: IPlatformsDataService, $devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $buildController: IBuildController, $platformValidationService: IPlatformValidationService, $buildDataService: IBuildDataService, $logger: ILogger, $migrateController: IMigrateController);
66
+ execute(args: string[]): Promise<void>;
67
+ canExecute(args: string[]): Promise<boolean>;
68
+ }
@@ -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");
@@ -144,3 +144,43 @@ class BuildVisionOsCommand extends BuildIosCommand {
144
144
  exports.BuildVisionOsCommand = BuildVisionOsCommand;
145
145
  yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
146
146
  yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
147
+ class BuildWindowsCommand extends BuildCommandBase {
148
+ constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger, $migrateController) {
149
+ super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger);
150
+ this.$options = $options;
151
+ this.$devicePlatformsConstants = $devicePlatformsConstants;
152
+ this.$logger = $logger;
153
+ this.$migrateController = $migrateController;
154
+ this.allowedParameters = [];
155
+ }
156
+ async execute(args) {
157
+ await this.executeCore([
158
+ this.$devicePlatformsConstants.Windows.toLowerCase(),
159
+ ]);
160
+ if (this.$options.release && this.$options.storeUpload) {
161
+ this.$logger.info(constants_1.WindowsAppPackageMessages.STORE_UPLOAD_DOCS_MESSAGE);
162
+ }
163
+ }
164
+ async canExecute(args) {
165
+ const platform = this.$devicePlatformsConstants.Windows;
166
+ if (!this.$options.force) {
167
+ await this.$migrateController.validate({
168
+ projectDir: this.$projectData.projectDir,
169
+ platforms: [platform],
170
+ });
171
+ }
172
+ let canExecute = await super.canExecuteCommandBase(platform);
173
+ if (canExecute) {
174
+ if (this.$options.release &&
175
+ !this.$options.storeUpload &&
176
+ !this.$options.certificate &&
177
+ !this.$options.certificateThumbprint) {
178
+ this.$logger.warn(constants_1.WINDOWS_RELEASE_UNSIGNED_MESSAGE);
179
+ }
180
+ canExecute = await super.validateArgs(args, platform);
181
+ }
182
+ return canExecute;
183
+ }
184
+ }
185
+ exports.BuildWindowsCommand = BuildWindowsCommand;
186
+ yok_1.injector.registerCommand("build|windows", BuildWindowsCommand);
@@ -51,3 +51,15 @@ export declare class DebugAndroidCommand implements ICommand {
51
51
  canExecute(args: string[]): Promise<boolean>;
52
52
  platform: string;
53
53
  }
54
+ export declare class DebugWindowsCommand implements ICommand {
55
+ protected $errors: IErrors;
56
+ private $devicePlatformsConstants;
57
+ private $injector;
58
+ private $projectData;
59
+ private get debugPlatformCommand();
60
+ allowedParameters: ICommandParameter[];
61
+ constructor($errors: IErrors, $devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $injector: IInjector, $projectData: IProjectData);
62
+ execute(args: string[]): Promise<void>;
63
+ canExecute(args: string[]): Promise<boolean>;
64
+ platform: string;
65
+ }
@@ -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");
@@ -168,3 +168,30 @@ __decorate([
168
168
  (0, decorators_1.cache)()
169
169
  ], DebugAndroidCommand.prototype, "debugPlatformCommand", null);
170
170
  yok_1.injector.registerCommand("debug|android", DebugAndroidCommand);
171
+ class DebugWindowsCommand {
172
+ get debugPlatformCommand() {
173
+ return this.$injector.resolve(DebugPlatformCommand, {
174
+ platform: this.$devicePlatformsConstants.Windows,
175
+ });
176
+ }
177
+ constructor($errors, $devicePlatformsConstants, $injector, $projectData) {
178
+ this.$errors = $errors;
179
+ this.$devicePlatformsConstants = $devicePlatformsConstants;
180
+ this.$injector = $injector;
181
+ this.$projectData = $projectData;
182
+ this.allowedParameters = [];
183
+ this.platform = this.$devicePlatformsConstants.Windows;
184
+ this.$projectData.initializeProjectData();
185
+ }
186
+ async execute(args) {
187
+ return this.debugPlatformCommand.execute(args);
188
+ }
189
+ async canExecute(args) {
190
+ return this.debugPlatformCommand.canExecute(args);
191
+ }
192
+ }
193
+ exports.DebugWindowsCommand = DebugWindowsCommand;
194
+ __decorate([
195
+ (0, decorators_1.cache)()
196
+ ], DebugWindowsCommand.prototype, "debugPlatformCommand", null);
197
+ yok_1.injector.registerCommand("debug|windows", DebugWindowsCommand);
@@ -59,3 +59,17 @@ export declare class RunVisionOSCommand extends RunIosCommand {
59
59
  get platform(): string;
60
60
  constructor($devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $errors: IErrors, $injector: IInjector, $options: IOptions, $platformValidationService: IPlatformValidationService, $projectDataService: IProjectDataService);
61
61
  }
62
+ export declare class RunWindowsCommand implements ICommand {
63
+ private $devicePlatformsConstants;
64
+ private $errors;
65
+ private $injector;
66
+ private $options;
67
+ private $platformValidationService;
68
+ private $projectData;
69
+ private get runCommand();
70
+ allowedParameters: ICommandParameter[];
71
+ get platform(): string;
72
+ constructor($devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $errors: IErrors, $injector: IInjector, $options: IOptions, $platformValidationService: IPlatformValidationService, $projectData: IProjectData);
73
+ execute(args: string[]): Promise<void>;
74
+ canExecute(args: string[]): Promise<boolean>;
75
+ }
@@ -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,3 +154,37 @@ 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);
@@ -18,5 +18,6 @@ export declare class TypingsCommand implements ICommand {
18
18
  canExecute(args: string[]): Promise<boolean>;
19
19
  private resolveGradleDependencies;
20
20
  private handleAndroidTypings;
21
+ private handleWindowsTypings;
21
22
  private handleiOSTypings;
22
23
  }