Skip to content

feat: merge master into webpack branch #4627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 101 commits into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
d17998b
chore: add changelog for 5.3.2 release
Fatme Apr 15, 2019
9ab9639
Merge pull request #4536 from NativeScript/fatme/changelog-5.3.2
Apr 15, 2019
d255b97
feat: deprecate the legacy workflow and recommend the new one
DimitarTachev Apr 18, 2019
dfbc087
fix: recommend the new workflow before executing run/test/debug/prepa…
DimitarTachev Apr 18, 2019
28390c1
fix: fix upload to appstore for accounts without 2 factor authentication
Fatme Apr 18, 2019
ace53e5
fix: handle CLI usage as a library
DimitarTachev Apr 19, 2019
b2bd5b4
chore: fix PR comments
Fatme Apr 19, 2019
85843c6
Merge pull request #4547 from NativeScript/fatme/publish
Apr 19, 2019
f2d59a7
fix: add the initial version of the Legacy Workflow warnings and reco…
DimitarTachev Apr 19, 2019
d728b39
Merge branch 'release' into fatme/merge-release-5.3.3
Fatme Apr 22, 2019
afdb021
fix: prepare xcconfig files for all conigurations
rosen-vladimirov Apr 23, 2019
f9be51d
chore: fix PR comments
DimitarTachev Apr 23, 2019
a2d1098
chore: set version to 5.3.4
rosen-vladimirov Apr 23, 2019
53d0741
Merge pull request #4559 from NativeScript/vladimirov/prepare-xcconfi…
rosen-vladimirov Apr 23, 2019
5b35f2f
docs: remove obsolete HMR steps
NickIliev Apr 24, 2019
5957657
docs: remove BETA statement for HMR status
NickIliev Apr 24, 2019
713855f
Merge pull request #4557 from NativeScript/fatme/merge-release-5.3.3
Apr 24, 2019
8b83f91
Merge pull request #4546 from NativeScript/tachev/legacy-workflow-war…
Apr 24, 2019
ed965e7
chore: add changelog for 5.3.3 and 5.3.4
Fatme Apr 24, 2019
61d77ac
fix: use proxy only for remote requests
martinfrancois Apr 24, 2019
8f9178f
fix: fix the workflow warnings split on Windows (always split by "\n"…
DimitarTachev Apr 25, 2019
9283d29
Merge pull request #4566 from NativeScript/tachev/fix-workflow-warnin…
Apr 25, 2019
995258b
Merge pull request #4564 from NativeScript/fatme/change-log-5.3.4
Fatme Apr 25, 2019
7fdb7b7
feat: initial work on watch app integration
KristianDD Apr 18, 2019
25bf41a
refactor: extract common logic for watch app and extensions
KristianDD Apr 19, 2019
57a97a3
fix: code signing for apps with watchapp
KristianDD Apr 23, 2019
3c08232
refactor: extract more common logic for extension and watchapp
KristianDD Apr 23, 2019
1723a67
refactor: extract some constants
KristianDD Apr 24, 2019
ac311ec
chore: update pbxproj libraries
KristianDD Apr 25, 2019
4b69bb3
fix: no way to control watchos deployment target
KristianDD Apr 25, 2019
be2ee2a
chore: remove unnecessary code
KristianDD Apr 25, 2019
2e5a7e9
chore: fix tests
KristianDD Apr 25, 2019
74ace6b
fix: wrong check for watchapp folder
KristianDD Apr 25, 2019
e260a59
chore: add changelog for 5.3.1 release
Fatme Apr 29, 2019
ef73740
Merge pull request #4572 from NativeScript/fatme/changelog-5.3.1
Fatme Apr 30, 2019
0468853
fix: logcat process is not restarted in some cases
rosen-vladimirov Apr 30, 2019
a28b41b
Merge pull request #4565 from martinfrancois/fixProxyLocalRequests
Fatme Apr 30, 2019
873d82b
Merge pull request #4573 from NativeScript/vladimirov/fix-android-logs-2
rosen-vladimirov May 2, 2019
77f4947
Merge branch 'release' into fatme/merge-release-5.3.4
Fatme May 2, 2019
646f7a7
Merge pull request #4577 from NativeScript/fatme/merge-release-5.3.4
May 2, 2019
8e6f70e
fix: fix the order of applying Podfiles
rosen-vladimirov May 2, 2019
3e586f2
feat: allow executing JS funcitons on cleanup
rosen-vladimirov Apr 21, 2019
395e476
feat: show deprecated messages for things that will be dropped as of …
Fatme Apr 30, 2019
66ce514
Merge pull request #4581 from NativeScript/vladimirov/improve-cleanup
rosen-vladimirov May 7, 2019
d5725e0
fix PR comments
Fatme May 7, 2019
c32139a
Merge pull request #4578 from NativeScript/fatme/deprecated-messages
Fatme May 7, 2019
9ad0ac8
chore: remove the deprecation message for `--bundle` option
Fatme May 7, 2019
1ad9786
Merge pull request #4568 from NativeScript/kddimitrov/watch-app
KristianDD May 7, 2019
a3128cd
Merge pull request #4588 from NativeScript/fatme/remove-message-for-b…
Fatme May 7, 2019
7a79e78
Merge pull request #4563 from NativeScript/niliev/update-hmr-section
May 7, 2019
b606213
chore: update watchapp beta warning
KristianDD May 7, 2019
3baf93a
Merge pull request #4590 from NativeScript/kddimitrov/update-watchapp…
KristianDD May 8, 2019
bd73657
fix: target argument passed to xcodebuild when using workspace
KristianDD May 8, 2019
f031e8d
Merge pull request #4594 from NativeScript/kddimitrov/fix-cocoa-build…
KristianDD May 8, 2019
2ea0b5e
Merge pull request #4579 from NativeScript/vladimirov/apply-cocoapods…
rosen-vladimirov May 8, 2019
8207834
fix (test command): generate source maps when debug-brk is set
DimitarTachev May 8, 2019
84a516c
Merge pull request #4597 from NativeScript/tachev/fix-test-source-maps
May 8, 2019
f8443f8
fix: ensure analytics and cleanup processes are not leaking
rosen-vladimirov May 8, 2019
8e108ea
fix: do not send hot updates when debugBrk is set as we will restart …
DimitarTachev May 8, 2019
3a3d3bf
Merge pull request #4599 from NativeScript/vladimirov/fix-leaking-pro…
rosen-vladimirov May 8, 2019
a3850dc
chore: delete unused progress-indicator
rosen-vladimirov May 1, 2019
02d6dfb
chore: remove `printMsgWithTimeout` from logger
rosen-vladimirov May 1, 2019
822173a
chore: rename initService to projectInitService
rosen-vladimirov May 3, 2019
5169829
feat: expose logger and enable configuring it
rosen-vladimirov May 3, 2019
86dd22a
feat: introduce initializeService
rosen-vladimirov May 3, 2019
449e8a7
fix: use correct method for showing all warnings on initialize
rosen-vladimirov May 3, 2019
b28f5be
feat: use only log4js methods in CLI logger
rosen-vladimirov May 7, 2019
e874d33
chore: handle changes in logger API
rosen-vladimirov May 7, 2019
4f1d7a8
chore: remove write method from logger
rosen-vladimirov May 7, 2019
8b65272
chore: use correct interfaces for appenders
rosen-vladimirov May 7, 2019
9509b74
docs: add information for logger in Public API
rosen-vladimirov May 7, 2019
296dbe9
Merge pull request #4600 from NativeScript/tachev/fix-debug-brk-hmr
May 8, 2019
9bff5a0
chore: handle PR comments
rosen-vladimirov May 8, 2019
194106c
feat: improve initialization service
rosen-vladimirov May 8, 2019
09b6908
Merge pull request #4592 from NativeScript/vladimirov/expose-logger
rosen-vladimirov May 8, 2019
ae4abbd
fix: logger changes broke trace and some hooks
rosen-vladimirov May 9, 2019
31e49d7
Merge pull request #4601 from NativeScript/vladimirov/fix-logger
rosen-vladimirov May 9, 2019
f63195a
chore: set version to 6.0.0
rosen-vladimirov May 9, 2019
f9424dc
chore: set version to 5.4.1
rosen-vladimirov May 9, 2019
7fcece8
Merge pull request #4605 from NativeScript/vladimirov/version-6
rosen-vladimirov May 9, 2019
6ddcc2f
style: misleading warning message
tgpetrov May 10, 2019
2e5ca3c
Merge pull request #4609 from NativeScript/tgpetrov-patch-1
May 10, 2019
7d3302f
fix: make logger backwards compatible
rosen-vladimirov May 10, 2019
201c2be
Merge pull request #4610 from NativeScript/vladimirov/backwards-compa…
May 13, 2019
f8a6d0f
Merge remote-tracking branch 'origin/release' into vladimirov/merge-r…
rosen-vladimirov May 13, 2019
66daa62
Merge pull request #4612 from NativeScript/vladimirov/merge-rel-master
rosen-vladimirov May 13, 2019
beb69e9
chore: update nativescript-dev-xcode to 0.2.0
KristianDD May 13, 2019
d62f84a
Merge pull request #4613 from NativeScript/kddimitrov/update-nativesc…
KristianDD May 13, 2019
3be9e81
fix: set correct link for legacy workflow warning
rosen-vladimirov May 13, 2019
2376eea
Merge pull request #4615 from NativeScript/vladimirov/fix-links
rosen-vladimirov May 13, 2019
936cdff
fix: plugin create command needs more args for plugin seed
rosen-vladimirov May 13, 2019
c3e16d6
Merge pull request #4614 from NativeScript/vladimirov/fix-plugin-create
rosen-vladimirov May 13, 2019
d969467
docs: update changelog for 5.4.0 release
rosen-vladimirov May 15, 2019
fa18afc
Merge pull request #4621 from NativeScript/vladimirov/changelog-540
rosen-vladimirov May 15, 2019
b859af0
Merge pull request #4622 from NativeScript/release-patch
rosen-vladimirov May 16, 2019
f92d24a
chore: merge release in master
rosen-vladimirov May 16, 2019
a4cb42c
Merge pull request #4625 from NativeScript/vladimirov/merge-rel-master
May 16, 2019
81efc59
Merge branch 'master' into feature/webpack-only
Fatme May 17, 2019
0341a15
feat: don't leak android debugging session and remove deprecated meth…
Fatme May 17, 2019
da752d0
fix: move buildinfo related logic to buildInfoFileService
Fatme May 18, 2019
44eb3c5
feat: introduce debugController
Fatme May 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
NativeScript CLI Changelog
================


5.4.0 (2019, May 15)
==

### Implemented
* [Implemented #3993](https://github.com/NativeScript/nativescript-cli/issues/3993): Improve `ctrl + c` handling.
* [Implemented #4374](https://github.com/NativeScript/nativescript-cli/issues/4374): Add `iCloudContainerEnvironment` build option.
* [Implemented #4394](https://github.com/NativeScript/nativescript-cli/issues/4394): Enable Using Hot Module Replacement by Default for New Projects
* [Implemented #4518](https://github.com/NativeScript/nativescript-cli/issues/4518): Show deprecation messages for things that will be dropped for 6.0.0 release
* [Implemented #4541](https://github.com/NativeScript/nativescript-cli/issues/4541): [Beta] Allow integration of Apple Watch application in NativeScript app
* [Implemented #4548](https://github.com/NativeScript/nativescript-cli/issues/4548): Deprecate support for the Legacy Workflow
* [Implemented #4602](https://github.com/NativeScript/nativescript-cli/issues/4602): Streamline CLI's logger


### Fixed
* [Fixed #4280](https://github.com/NativeScript/nativescript-cli/issues/4280): Incorrect message if you delete app's folder and run command with `--path` in it
* [Fixed #4512](https://github.com/NativeScript/nativescript-cli/issues/4512): App's Podfile should be applied last
* [Fixed #4573](https://github.com/NativeScript/nativescript-cli/pull/4573): logcat process is not restarted in some cases
* [Fixed #4593](https://github.com/NativeScript/nativescript-cli/issues/4593): Node.js processes not killed after `tns create` on macOS when analytics are enabled
* [Fixed #4598](https://github.com/NativeScript/nativescript-cli/issues/4598): app.css changes don't apply when debugging with --debug-brk
* [Fixed #4606](https://github.com/NativeScript/nativescript-cli/issues/4606): Unable to build application for iOS with nativescript-bottombar
* [Fixed #4616](https://github.com/NativeScript/nativescript-cli/issues/4616): `tns plugin create` command hangs

5.3.4 (2019, April 24)
==

### Fixed
* [Fixed #4561](https://github.com/NativeScript/nativescript-cli/issues/4561): CLI merges xcconfig files only for specified build configuration

5.3.3 (2019, April 23)
==

### Fixed
* [Fixed #4527](https://github.com/NativeScript/nativescript-cli/issues/4527): Unable to upload applications to App Store

5.3.2 (2019, April 12)
==

### Fixed
* [Fixed #1798](https://github.com/NativeScript/nativescript-cli/issues/1798): Test init command doesn't add a sample test in TypeScript for TypeScript/Angular projects
* [Fixed #4498](https://github.com/NativeScript/nativescript-cli/pull/4498): API: Change the AppStore ids for kinvey scanner and preview app
* [Fixed #4504](https://github.com/NativeScript/nativescript-cli/issues/4504): Custom tagged versions of android runtime are not supported
* [Fixed #4510](https://github.com/NativeScript/nativescript-cli/pull/4510): Handle HTTP 304 response status code

5.3.1 (2019, April 03)
==

### Implemented
* [Implemented #4492](https://github.com/NativeScript/nativescript-cli/pull/4492): API(kinvey): provide correct data to preview-sdk based on the schema

### Fixed
* [Fixed #4370](https://github.com/NativeScript/nativescript-cli/issues/4370): NativeScript CLI installation fails on linux
* [Fixed #4451](https://github.com/NativeScript/nativescript-cli/issues/4451): Error while trying to start application on Android emulator with API level Q
* [Fixed #4483](https://github.com/NativeScript/nativescript-cli/pull/4483): Detection fixes for emulator/device

5.3.0 (2019, March 27)
==

Expand Down
180 changes: 180 additions & 0 deletions PublicAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ const tns = require("nativescript");
* [getPlaygroundAppQrCode](#getplaygroundappqrcode)
* [cleanupService](#cleanupservice)
* [setCleanupLogFile](#setcleanuplogfile)
* [initializeService](#initializeService)
* [initialize](#initialize)
* [logger](#logger)
* [initialize](#initialize)
* [getLevel](#getlevel)
* [appenders](#appenders)
* [emit-appender](#emit-appender)
* [cli-appender](#cli-appender)
* [custom layouts](#custom-layouts)


## Module projectService

Expand Down Expand Up @@ -1509,6 +1519,176 @@ const tns = require("nativescript");
tns.cleanupService.setCleanupLogFile("/Users/username/cleanup-logs.txt");
```

## initializeService
The `initializeService` is used to initialize CLI's configuration at the beginning and print all warnings related to current environment.

### initialize
This method executes initialization actions based on the passed parameters. In case `loggerOptions` are not passed, the default CLI logger will be used.
After initialization, the method will print all system warnings.

* Definition
```TypeScript
interface IInitializeOptions {
loggerOptions?: ILoggerOptions;
settingsServiceOptions?: IConfigurationSettings;
extensibilityOptions?: { pathToExtensions: string };
}

interface IInitializeService {
initialize(initOpts?: IInitializeOptions): Promise<void>;
}

```

> NOTE: For more information about loggerOptions, you can check `logger`.

* Usage
* Initialization without passing any data - `logger` will be initialized with default CLI settings. Warnings will be printed if there are any.
```JavaScript
const tns = require("nativescript");
tns.initializeService.initialize();
```
* Initialize with custom settings service options:
```JavaScript
const tns = require("nativescript");
tns.initializeService.initialize({ settingsServiceOptions: { profileDir: "/Users/username/customDir", userAgentName: "MyApp" } });
```
* Initialize with custom extensibility path:
```JavaScript
const tns = require("nativescript");
tns.initializeService.initialize({ extensibilityOptions: { pathToExtensions: "/Users/username/customDir/extensions" } });
```

## logger

`logger` module is used to show any kind of information to the user. The `logger` uses `log4js` internally, which allows setting different levels for the messages.
The levels are available in `tns.constants.LoggerLevel` enum. Only messages from the current log level (or higher) are shown to the user, i.e. in case the log level is set to `INFO`, `DEBUG` and `TRACE` messages will not be shown to the user, but `WARN` and `ERROR` messages will be shown. </br>
`logger` module can be configured how to show the messages by using different appenders and layouts. </br>
* `appenders` are responsible for output of log events. They may write events to files, send emails, store them in a database, or anything. Most appenders use layouts to serialise the events to strings for output.
* `layout` is a function for converting a LogEvent into a string representation.

`log4js` has predefined appenders and layouts that can be used. In case you do not pass any options to logger's initialization, CLI will default to [console appender](https://log4js-node.github.io/log4js-node/console.html) with [messagePassThrough layout](https://log4js-node.github.io/log4js-node/layouts.html#message-pass-through) with `INFO` log level.</br>
You can override only the properties you want, i.e. only the log level, the layout or the appender. </br>
`nativescript` itself has additional appenders that you can use. More information about them can be found below. You can get a full list of the available appenders by checking the `tns.constants.LoggerAppenders` object. </br>

> NOTE: When CLI is used as a command-line tool, it uses a custom appender and layout in order to write coloured messages to stdout or stderr.

### initialize
The `initialize` method initializes the log4js settings - level, appender and layout. Once called, the settings cannot be changed anymore for the current process.

* Definition
```TypeScript
interface IAppenderOptions extends IDictionary<any> {
type: string;
layout?: Layout;
}

interface ILoggerOptions {
level?: LoggerLevel;
appenderOptions?: IAppenderOptions;
}

initialize(opts?: ILoggerOptions): void;
```

* Usage
* Initialize with default settings:
```JavaScript
tns.logger.initialize();
```
* Initialize with DEBUG log level:
```JavaScript
tns.logger.initialize({ level: tns.constants.LoggerLevel.DEBUG });
```
* Initialize with different appender, for example [fileSync](https://log4js-node.github.io/log4js-node/fileSync.html) appender:
```JavaScript
tns.logger.initialize({ appenderOptions: { type: "fileSync" } });
```
* Initialize with different layout, for example [Pattern](https://log4js-node.github.io/log4js-node/layouts.html#pattern) layout:
```JavaScript
tns.logger.initialize({ appenderOptions: { layout: { type: "pattern" } } });
```
* Initialize with custom appender, layout and level:
```JavaScript
tns.logger.initialize({ appenderOptions: { type: "fileSync", layout: { type: "pattern" } }, level: tns.constants.LoggerLevel.DEBUG });
```

### getLevel
This method returns information for the current log level.

* Definition
```TypeScript
getLevel(): string;
```

* Usage
```JavaScript
console.log(`Current log level is: ${tns.logger.getLevel()}`);
```

### appenders
The `appenders` are log4js concept. `appenders` are responsible for output of log events. You can use all predefined [log4js appenders](https://log4js-node.github.io/log4js-node/appenders.html) and also several predefined CLI appenders

#### emit-appender
The `emit-appender` is used to emit the log events through a passed emitter instead of writing the messages. Whenever a message should be shown, the `emit-appender` emits `logData` event with an object containing the `loggingEvent` and the message passed through the specified layout stored in `formattedMessage` property.

* Usage:
```JavaScript
const tns = require("nativescript");
const { EventEmitter } = require("events");
const { EMIT_APPENDER_EVENT_NAME, LoggerAppenders } = tns.constants;
const emitter = new EventEmitter();
// IMPORTANT: Add the event handler before calling logger's initialize method.
// This is required as log4js makes a copy of the appenderOptions, where the emitter is passed
// NOTE: In case you want to debug the event handler, place `debugger` in it.
emitter.on(EMIT_APPENDER_EVENT_NAME, (logData) => {
if (logData.loggingEvent.level.levelStr === LoggerLevel.WARN) {
console.log(`WARNING: ${logData.formattedMessage}`);
}
});

const logger = tns.logger;
logger.initialize({
appenderOptions: {
type: LoggerAppenders.emitAppender,
emitter
}
});
```

> NOTE: In several cases CLI passes additional configuration properties in the `context` of the `loggingEvent`. Full list is available in the `tns.constants.LoggerConfigData` object. These properties are used by CLI's layout and appender to change the way the message is printed on the terminal and if it should be on stderr or stdout.

#### cli-appender
`cli-appender` prints messages to stdout or stderr based on the passed options for the message.

* Usage
```JavaScript
const tns = require("nativescript");
const { EventEmitter } = require("events");
const { EMIT_APPENDER_EVENT_NAME, LoggerAppenders } = tns.constants;

const logger = tns.logger;
logger.initialize({
appenderOptions: {
type: LoggerAppenders.cliAppender,
}
});
```

### custom layouts
You can define your own layout function in the following way:
```JavaScript
const log4js = require("nativescript/node_modules/log4js");
const util = require("util");
log4js.addLayout("myCustomLayout", (config) => {
return (loggingEvent) => {
return util.format.apply(null, loggingEvent.data);
}
});

tns.logger.initialize({ appenderOptions: { layout: { type: "myCustomLayout" } } });
```

## How to add a new method to Public API
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
Expand Down
2 changes: 2 additions & 0 deletions docs/man_pages/lib-management/plugin-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Create from a custom plugin seed | `$ tns plugin create <Plugin Repository Name>
* `--path` - Specifies the directory where you want to create the project, if different from the current directory.
* `--username` - Specifies the Github username, which will be used to build the URLs in the plugin's package.json file.
* `--pluginName` - Used to set the default file and class names in the plugin source.
* `--includeTypeScriptDemo` - Specifies if TypeScript demo should be created. Default value is `y` (i.e. `demo` will be created), in case you do not want to create this demo, pass `--includeTypeScriptDemo=n`
* `--includeAngularDemo` - Specifies if Angular demo should be created. Default value is `y` (i.e. `demo-angular` will be created), in case you do not want to create this demo, pass `--includeAngularDemo=n`
* `--template` - Specifies the custom seed archive, which you want to use to create your plugin. If `--template` is not set, the NativeScript CLI creates the plugin from the default NativeScript Plugin Seed. `<Template>` can be a URL or a local path to a `.tar.gz` file with the contents of a seed repository.<% if(isHtml) { %> This must be a clone of the [NativeScript Plugin Seed](https://github.com/NativeScript/nativescript-plugin-seed) and must contain a `src` directory with a package.json file and a script at `src/scripts/postclone.js`. After the archive is extracted, the postclone script will be executed with the username (`gitHubUsername`) and plugin name (`pluginName`) parameters given to the `tns plugin create` command prompts. For more information, visit the default plugin seed repository and [examine the source script](https://github.com/NativeScript/nativescript-plugin-seed/blob/master/src/scripts/postclone.js) there. Examples:

* Using a local file:
Expand Down
6 changes: 3 additions & 3 deletions docs/man_pages/project/testing/debug-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ position: 4

Initiates a debugging session for your project on a connected Android device or Android emulator. When necessary, the command will prepare, build, deploy and launch the app before starting the debug session. While debugging, the output from the application is printed in the console and any changes made to your code are synchronizes with the deployed app.

To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in this wiki: https://github.com/NativeScript/nativescript-angular/wiki/HMR.
To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in [the HMR documentation section](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#hot-module-replacement).

### Commands

Expand All @@ -31,12 +31,12 @@ Attach the debug tools to a running app in the native emulator | `$ tns debug an
* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
* `--clean` - If set, forces the complete rebuild of the native application.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--hmr` - (Beta) Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well.<% if(isConsole) { %> The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
* `--hmr` - Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well.<% if(isConsole) { %> For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!

<% if(isHtml) { %>

>Note: Hot Module Replacement (HMR) is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.
>Note: For more information about HMR, the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.

### Command Limitations

Expand Down
14 changes: 10 additions & 4 deletions lib/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require("./common/bootstrap");
$injector.require("logger", "./common/logger");
$injector.requirePublicClass("logger", "./common/logger/logger");
$injector.require("config", "./config");
$injector.require("options", "./options");
// note: order above is important!
Expand All @@ -16,6 +16,7 @@ $injector.require("gradleBuildService", "./services/android/gradle-build-service
$injector.require("gradleBuildArgsService", "./services/android/gradle-build-args-service");
$injector.require("iOSEntitlementsService", "./services/ios-entitlements-service");
$injector.require("iOSExtensionsService", "./services/ios-extensions-service");
$injector.require("iOSWatchAppService", "./services/ios-watch-app-service");
$injector.require("iOSProjectService", "./services/ios-project-service");
$injector.require("iOSProvisionService", "./services/ios-provision-service");
$injector.require("xcconfigService", "./services/xcconfig-service");
Expand All @@ -40,9 +41,7 @@ $injector.require("platformValidationService", "./services/platform/platform-val

$injector.require("buildArtefactsService", "./services/build-artefacts-service");

$injector.require("deviceDebugAppService", "./services/device/device-debug-app-service");
$injector.require("deviceInstallAppService", "./services/device/device-install-app-service");
$injector.require("deviceRefreshAppService", "./services/device/device-refresh-app-service");

$injector.require("runEmitter", "./emitters/run-emitter");
$injector.require("previewAppEmitter", "./emitters/preview-app-emitter");
Expand All @@ -52,6 +51,7 @@ $injector.require("prepareController", "./controllers/prepare-controller");
$injector.require("buildController", "./controllers/build-controller");
$injector.require("deployController", "./controllers/deploy-controller");
$injector.require("runController", "./controllers/run-controller");
$injector.require("debugController", "./controllers/debug-controller");
$injector.require("previewAppController", "./controllers/preview-app-controller");

$injector.require("prepareDataService", "./services/prepare-data-service");
Expand Down Expand Up @@ -134,7 +134,7 @@ $injector.require("xcprojService", "./services/xcproj-service");
$injector.require("versionsService", "./services/versions-service");
$injector.requireCommand("install", "./commands/install");

$injector.require("initService", "./services/init-service");
$injector.require("projectInitService", "./services/project-init-service");
$injector.requireCommand("init", "./commands/init");

$injector.require("infoService", "./services/info-service");
Expand Down Expand Up @@ -221,3 +221,9 @@ $injector.require("networkConnectivityValidator", "./helpers/network-connectivit
$injector.requirePublic("cleanupService", "./services/cleanup-service");

$injector.require("webpackCompilerService", "./services/webpack/webpack-compiler-service");

$injector.require("applePortalSessionService", "./services/apple-portal/apple-portal-session-service");
$injector.require("applePortalCookieService", "./services/apple-portal/apple-portal-cookie-service");
$injector.require("applePortalApplicationService", "./services/apple-portal/apple-portal-application-service");

$injector.requirePublicClass("initializeService", "./services/initialize-service");
Loading