diff --git a/.gitattributes b/.gitattributes index cf01f69e8b..5a5718e0d5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,8 @@ bin/nativescript.js eol=lf +# Use LF for shell scripts +*.sh eol=lf + +# Use LF for all files +* text=auto eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000000..3870bdf8d7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,114 @@ +name: 🐞 Bug report +description: Create a bug report to help us improve NativeScript CLI +labels: [bug-pending-triage] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report an issue. + + > ## Important! :warning: + > + > The issue list is reserved exclusively for bug reports and feature requests. That means we do not accept usage questions. If you open an issue that does not conform to the requirements, it will be closed. + > + > For usage questions, please refer to the following resources: + > * Search the [docs](https://docs.nativescript.org/) + > * Search or ask in [Discord](https://nativescript.org/discord) + > * Search or ask in [Discussions](https://github.com/NativeScript/NativeScript/discussions) + > * Search or ask on [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) + > * Watch [video tutorials](https://nativescripting.com/) + + - type: textarea + validations: + required: true + attributes: + label: Issue Description + description: | + A clear and concise description of what the bug is. + Please, explain whether it's a build-time error or a runtime error. + + If you intend to submit a PR for this issue, tell us in the description. + placeholder: | + When I do , happens and I see the following error message: + + ``` + + ``` + + Expected behavior: + + When I do , should happen instead. + + - type: textarea + attributes: + label: Reproduction + description: | + Add commands used or steps taken to reproduce the behaviour. + Include links, references or anything else that will give us more context about the issue you are encountering. + placeholder: | + e.g: + https://github.com/NativeScript/nativescript-cli + + 1. clone, and run with `ns run ios` + 2. Click on '...' + 3. See error + + - type: textarea + attributes: + label: Relevant log output (if applicable) + description: | + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + + Using the `--log trace` flag will usuall print more verbose logs that will help identify the issue quicker. + + When pasting verbose logs, please make sure you remove any sensitive information. + render: shell + + - type: textarea + attributes: + label: Environment + description: | + Provide information about your environment. Run + + ```shell + echo 'y' | npx nativescript-envinfo + ``` + + inside the project and paste the output directly without manual formatting. + placeholder: | + Paste the result of + + echo 'y' | npx nativescript-envinfo + + - type: markdown + attributes: + value: | + --- + + Before you submit this issue, please confirm the following: + + **1. Is there an existing issue for this?** + + Please search to see if an issue already exists for the bug you encountered or is not already reported on [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) as a question. + + **2. Confirm you are submitting a bug report** + + Please confirm you are submitting a bug report and not a usage question. + + **3. Code of Conduct** + + By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc) + + --- + - type: checkboxes + id: terms + attributes: + label: Please accept these terms + options: + - label: I have searched the [existing issues](https://github.com/NativeScript/nativescript-cli/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before + required: true + - label: This is a bug report + required: true + - label: I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc) + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..7c53936a50 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: false +contact_links: + - name: Search the Docs + url: https://docs.nativescript.org + about: Refer to the docs and search for what you are looking for. + - name: Search or ask in Discord + url: https://nativescript.org/discord + about: Ask questions and discuss with other NativeScript users in real-time. + - name: Search or ask in Discussions + url: https://github.com/NativeScript/NativeScript/discussions + about: Use GitHub discussions for message-board style questions and discussions. + - name: Search or ask on StackOverflow + url: https://stackoverflow.com/questions/tagged/nativescript + about: Use StackOverflow to look for answered questions that may be similar to yours. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000000..6c929ebfc1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,71 @@ +name: 🚀 Feature request +description: Suggest an idea for NativeScript CLI +labels: ["feature-pending-triage"] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to request a feature for NativeScript! + + > ## Important! :warning: + > + > The issue list is reserved exclusively for bug reports and feature requests. That means we do not accept usage questions. If you open an issue that does not conform to the requirements, it will be closed. + > + > For usage questions, please refer to the following resources: + > * Search the [docs](https://docs.nativescript.org/) + > * Search or ask in [Discord](https://nativescript.org/discord) + > * Search or ask in [Discussions](https://github.com/NativeScript/NativeScript/discussions) + > * Search or ask on [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) + > * Watch [video tutorials](https://nativescripting.com/) + + - type: textarea + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. + placeholder: | + I wish I could use NativeScript CLI to do [...] + or + I'm always frustrated when [...] + + - type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + + - type: textarea + attributes: + label: Anything else? + description: Add any other context, code examples, or references to existing implementations about the feature request here. + + - type: markdown + attributes: + value: | + --- + + Before you submit this feature request, please confirm the following: + + **1. Is there an existing issue for this?** + + Please search to see if an issue related to this feature request already exists. + + **2. Code of Conduct** + + By submitting this feature request, you agree to follow our [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc) + + --- + + - type: checkboxes + id: terms + attributes: + label: Please accept these terms + options: + - label: I have searched the [existing issues](https://github.com/NativeScript/nativescript-cli/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before + required: true + - label: I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc) + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..f10437293c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,60 @@ + + + + + +## PR Checklist + +- [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. +- [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. +- [ ] You have signed the [CLA](http://www.nativescript.org/cla). +- [ ] All existing tests are passing: https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#contribute-to-the-code-base +- [ ] Tests for the changes are included. + +## What is the current behavior? + + +## What is the new behavior? + + +Fixes/Implements/Closes #[Issue Number]. + + + + + + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..2ac7ef3191 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,36 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + + - package-ecosystem: npm + directory: / + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/doctor + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + - package-ecosystem: npm + directory: /packages/nativescript-envinfo + schedule: + interval: monthly + time: "23:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] diff --git a/.github/workflows/codeql-advanced.yml b/.github/workflows/codeql-advanced.yml new file mode 100644 index 0000000000..23bea62599 --- /dev/null +++ b/.github/workflows/codeql-advanced.yml @@ -0,0 +1,103 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "main", "release" ] + pull_request: + branches: [ "main", "release" ] + schedule: + - cron: '21 2 * * 1' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: javascript-typescript + build-mode: none + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000000..2f8e435dd4 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,22 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, +# surfacing known-vulnerable versions of the packages declared or updated in the PR. +# Once installed, if the workflow run is marked as required, +# PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.3.0 + - name: 'Dependency Review' + uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2 diff --git a/.github/workflows/npm_release_cli.yml b/.github/workflows/npm_release_cli.yml new file mode 100644 index 0000000000..70dae07342 --- /dev/null +++ b/.github/workflows/npm_release_cli.yml @@ -0,0 +1,162 @@ +name: 'nativescript -> npm' + +on: + push: + branches: + - main + tags: + - "v*" + paths-ignore: + - 'packages/**' + workflow_dispatch: + +env: + NPM_TAG: 'next' + +jobs: + build: + name: Build + runs-on: macos-latest + outputs: + npm_version: ${{ steps.npm_version_output.outputs.NPM_VERSION }} + npm_tag: ${{ steps.npm_version_output.outputs.NPM_TAG }} + + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + with: + egress-policy: audit + + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + fetch-depth: 0 + + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + with: + node-version: 22.14.0 + registry-url: "https://registry.npmjs.org" + + - name: Setup + run: npm i --ignore-scripts --legacy-peer-deps --no-package-lock + + - name: Get Current Version + run: | + NPM_VERSION=$(node -e "console.log(require('./package.json').version);") + echo NPM_VERSION=$NPM_VERSION >> $GITHUB_ENV + + - name: Bump version for dev release + if: ${{ !contains(github.ref, 'refs/tags/') }} + run: | + NPM_VERSION=$(node ./scripts/get-next-version.js) + echo NPM_VERSION=$NPM_VERSION >> $GITHUB_ENV + npm version $NPM_VERSION --no-git-tag-version + + - name: Output NPM Version and tag + id: npm_version_output + run: | + NPM_TAG=$(node ./scripts/get-npm-tag.js) + echo NPM_VERSION=$NPM_VERSION >> $GITHUB_OUTPUT + echo NPM_TAG=$NPM_TAG >> $GITHUB_OUTPUT + + - name: Build nativescript + run: npm pack + + - name: Upload npm package artifact + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: npm-package + path: nativescript-${{steps.npm_version_output.outputs.NPM_VERSION}}.tgz + + publish: + runs-on: ubuntu-latest + environment: npm-publish + needs: + - build + permissions: + contents: read + id-token: write + env: + NPM_VERSION: ${{needs.build.outputs.npm_version}} + NPM_TAG: ${{needs.build.outputs.npm_tag}} + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + with: + egress-policy: audit + + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + with: + node-version: 22.14.0 + registry-url: "https://registry.npmjs.org" + + - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: npm-package + path: dist + + - name: Update npm (required for OIDC trusted publishing) + run: | + npm install -g npm@^11.5.1 + npm --version + + - name: Publish package (OIDC trusted publishing) + if: ${{ vars.USE_NPM_TOKEN != 'true' }} + run: | + echo "Publishing nativescript@$NPM_VERSION to NPM with tag $NPM_TAG via OIDC trusted publishing..." + unset NODE_AUTH_TOKEN + if [ -n "${NPM_CONFIG_USERCONFIG:-}" ]; then + rm -f "$NPM_CONFIG_USERCONFIG" + fi + npm publish ./dist/nativescript-${{env.NPM_VERSION}}.tgz --tag $NPM_TAG --access public --provenance + env: + NODE_AUTH_TOKEN: "" + + - name: Publish package (granular token) + if: ${{ vars.USE_NPM_TOKEN == 'true' }} + run: | + echo "Publishing nativescript@$NPM_VERSION to NPM with tag $NPM_TAG via granular token..." + npm publish ./dist/nativescript-${{env.NPM_VERSION}}.tgz --tag $NPM_TAG --access public --provenance + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + + github-release: + runs-on: ubuntu-latest + # only runs on tagged commits + if: ${{ contains(github.ref, 'refs/tags/') }} + permissions: + contents: write + needs: + - build + env: + NPM_VERSION: ${{needs.build.outputs.npm_version}} + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + with: + egress-policy: audit + + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + fetch-depth: 0 + + - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + with: + node-version: 22.14.0 + + - name: Setup + run: npm i --ignore-scripts --legacy-peer-deps --no-package-lock + + - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: npm-package + path: dist + + - name: Partial Changelog + run: npx conventional-changelog -p angular -r2 > body.md + + - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0 + with: + artifacts: "dist/nativescript-*.tgz" + bodyFile: "body.md" + prerelease: ${{needs.build.outputs.npm_tag != 'latest'}} + allowUpdates: true diff --git a/.github/workflows/npm_release_doctor.yml b/.github/workflows/npm_release_doctor.yml new file mode 100644 index 0000000000..3098c795a9 --- /dev/null +++ b/.github/workflows/npm_release_doctor.yml @@ -0,0 +1,52 @@ +name: '@nativescript/doctor -> npm' + +on: + push: + branches: [ 'main' ] + paths: + - 'packages/doctor/**' + workflow_dispatch: + +defaults: + run: + working-directory: packages/doctor + +env: + NPM_TAG: 'next' + +permissions: + contents: read + +jobs: + release: + runs-on: ubuntu-latest + + steps: + + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 + with: + egress-policy: audit + + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + - name: Setup + run: npm install + + - name: Generate Version + run: | + echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV + + - name: Bump Version + run: npm --no-git-tag-version version $NPM_VERSION + + - name: Build @nativescript/doctor + run: npm pack + + - name: Publish @nativescript/doctor + env: + NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + echo "Publishing @nativescript/doctor@$NPM_VERSION to NPM with tag $NPM_TAG..." + npm publish nativescript-doctor-$NPM_VERSION.tgz --tag $NPM_TAG diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000000..7595c41d05 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,73 @@ +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '20 7 * * 2' + push: + branches: ["main"] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + contents: read + actions: read + # To allow GraphQL ListCommits to work + issues: read + pull-requests: read + # To detect SAST tools + checks: read + + steps: + + - name: "Checkout code" + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.3.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecards on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 + with: + sarif_file: results.sarif \ No newline at end of file diff --git a/.gitignore b/.gitignore index 05679ace79..0fd3dda24f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,13 @@ *.js !/*.js !bin/nativescript.js +!bin/nsc.js !vendor/*.js !resources/** +!lib/common/test/resources/**/* +lib/common/test/resources/.DS_Store *.js.map - +!.travis/**/* coverage lib-cov *.seed @@ -29,9 +32,60 @@ results scratch/ .idea/ .settings/ -.vscode/ test-reports.xml +# VSCode +.vscode/** +!.vscode/launch.json +!.vscode/settings.json + npm-debug.log node_modules -docs/html \ No newline at end of file + +docs/html +docs-cli + +!test-scripts/*.js +!test/files/**/*.js + +# From previous submodule +lib/common/*.js +!lib/common/vendor/*.json + +lib/common/*.js.map +!lib/common/vendor/*.js + +lib/common/lib-cov +lib/common/*.seed +lib/common/*.log +lib/common/*.csv +lib/common/*.dat +lib/common/*.out +lib/common/*.pid +lib/common/*.gz +lib/common/*.tgz +lib/common/*.tmp +lib/common/*.sublime-workspace +lib/common/tscommand*.tmp.txt +lib/common/.tscache/ +lib/common/pids +lib/common/logs +lib/common/results +lib/common/scratch/ +lib/common/.idea/workspace.xml +lib/common/.idea/tasks.xml +lib/common/.idea/watcherTasks.xml + +lib/common/npm-debug.log +lib/common/node_modules +!lib/common/Gruntfile.js +lib/common/.d.ts +!lib/common/bin/**/* +lib/common/coverage/**/* +lib/common/xunit.xml +lib/common/test-reports.xml +!lib/common/test-scripts/** +!lib/common/scripts/** +config/test-deps-versions-generated.json +!scripts/get-next-version.js +!scripts/get-npm-tag.js \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 386ca6c4fb..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/common"] - path = lib/common - url = git@github.com:telerik/mobile-cli-lib.git diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000000..c37466e2b3 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged \ No newline at end of file diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index a3bf33e13a..0000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -nativescript-cli \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index f758959656..0000000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 4b29c89c25..8cff9841d3 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -5,5 +5,4 @@ - - + \ No newline at end of file diff --git a/.idea/scopes/Nativescript_CLI_TypeScript.xml b/.idea/scopes/Nativescript_CLI_TypeScript.xml deleted file mode 100644 index efb2748f34..0000000000 --- a/.idea/scopes/Nativescript_CLI_TypeScript.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml deleted file mode 100644 index 922003b843..0000000000 --- a/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index c80f2198b5..94a25f7f4c 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -3,5 +3,4 @@ - - + \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000000..3c53558cd9 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "useTabs": true, + "overrides": [ + { + "files": "*.json", + "options": { + "useTabs": false + } + } + ] +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6d4a363d8d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: node_js -node_js: -- '0.10' -before_install: -- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules -- git submodule update --init --recursive -- npm install -g grunt-cli -install: -- npm install -- grunt pack --no-color -script: -- npm test -git: - submodules: false -deploy: -- provider: releases - skip_cleanup: true - api_key: - secure: eUmm52zfs68StxqUkPWuuNa85vBrlYmjuRw4FR8kZSyBWKkCySU8xuZVRpxLdqE3VRAsORsP2Ggf4UKqDM4BtTNl0lZGLeyT2OuL/9AB1r/IqzylLI2xAmibboLktFL4BQL8uqWnBkyYHSC0Ufv7C8poXdbyubLrSMuP9hRBy/0= - file: travis/nativescript.tgz - on: - tags: true - all_branches: true -- provider: npm - email: nativescript@telerik.com - api_key: - secure: KISJen/tS+355itLT6eI5rBAwL9utOLDT1l8z6dJKLdt24l9LvKxhHlYI/WOCVPvNCUQ8cQAqGcVgmD+SmTpoCkBAHMml3C/zGZSwYd6Km1/1Eu0JtodbtLjLaTaPYpU+I7Z2bC6eFdb8hIrFEZhf92oQAyLCgBQJpu3ECjxXgI= - on: - tags: true - all_branches: true diff --git a/.travis/add-publishConfig.js b/.travis/add-publishConfig.js new file mode 100644 index 0000000000..b338e5e1aa --- /dev/null +++ b/.travis/add-publishConfig.js @@ -0,0 +1,37 @@ +#!/usr/bin/env node + +const fsModule = require("fs"); +const path = "./package.json"; +const fileOptions = { encoding: "utf-8" }; +const content = fsModule.readFileSync(path, fileOptions); + +const packageDef = JSON.parse(content); +if (!packageDef.publishConfig) { + packageDef.publishConfig = {}; +} + +const branch = process.argv[2]; +if (!branch) { + console.log("Please pass the branch name as an argument!"); + process.exit(1); +} + +switch (branch) { + case "release": + packageDef.publishConfig.tag = "rc"; + break; + case "release-patch": + packageDef.publishConfig.tag = "patch"; + break; + case "master": + packageDef.publishConfig.tag = "next"; + break; + case "feature/webpack-only": + packageDef.publishConfig.tag = "webpack"; + break; + default: + throw new Error(`Unable to publish as the branch ${branch} does not have corresponding tag. Supported branches are master (next tag), release (rc tag) and release-patch (patch tag)`); +} + +const newContent = JSON.stringify(packageDef, null, " "); +fsModule.writeFileSync(path, newContent, fileOptions); diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..6e28092972 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,65 @@ +{ + // Use IntelliSense to learn about possible Node.js debug attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "cwd": "${workspaceRoot}", + "sourceMaps": true, + // In case you want to debug child processes started from CLI: + // "autoAttachChildProcesses": true, + "name": "Launch CLI (Node 6+)", + "program": "${workspaceRoot}/lib/nativescript-cli.js", + // example commands + "args": [ + "create", + "cliapp", + "--path", + "${workspaceRoot}/scratch" + ] + // "args": [ "test", "android", "--justlaunch"] + // "args": [ "platform", "add", "android@1.3.0", "--path", "cliapp"] + // "args": [ "platform", "remove", "android", "--path", "cliapp"] + // "args": [ "plugin", "add", "nativescript-barcodescanner", "--path", "cliapp"] + // "args": [ "plugin", "remove", "nativescript-barcodescanner", "--path", "cliapp"] + // "args": [ "build", "android", "--path", "cliapp"] + // "args": [ "run", "android", "--path", "cliapp"] + // "args": [ "debug", "android", "--path", "cliapp"] + // "args": [ "livesync", "android", "--path", "cliapp"] + // "args": [ "livesync", "android", "--watch", "--path", "cliapp"], + // "args": [ "resources", "generate", "icons", "./test/image-generation-test.png", "--path", "cliapp" ], + // "args": [ "resources", "generate", "splashes", "./test/image-generation-test.png", "--path", "cliapp", "--background", "#8000ff" ], + }, + { + // in case you want to debug a single test, modify it's code to be `it.only(...` instead of `it(...` + "type": "node", + "request": "launch", + "name": "Launch Tests (Node 6+)", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "cwd": "${workspaceRoot}", + "sourceMaps": true + }, + { + "type": "node", + "request": "attach", + "name": "Attach to Broker Process", + // In case you want to debug Analytics Broker process, add `--debug-brk=9897` (or --inspect-brk=9897) when spawning analytics-broker-process. + "port": 9897, + "sourceMaps": true + }, + { + "name": "Attach to Node Debugger", + "type": "node", + "request": "attach", + "port": 9229, + "address": "127.0.0.1", + "skipFiles": [ + "/**" + ], + "sourceMaps": true + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..5a586207df --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/*.js": { "when": "$(basename).ts"}, + "**/*.js.map": true, + "**/.husky/_": true + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a412ea1a..a4ce9d17da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2072 @@ +## [9.0.2](https://github.com/NativeScript/nativescript-cli/compare/v9.0.1...v9.0.2) (2026-01-04) + + +### Bug Fixes + +* vite build and prepare ([#5948](https://github.com/NativeScript/nativescript-cli/issues/5948)) ([e892f48](https://github.com/NativeScript/nativescript-cli/commit/e892f48ea86510b1aafbb739a42bfd834fbdc12e)) + + + +## [9.0.1](https://github.com/NativeScript/nativescript-cli/compare/v9.0.0...v9.0.1) (2025-11-18) + + +### Bug Fixes + +* prevent error if nativescript.config entry is undefined ([#5919](https://github.com/NativeScript/nativescript-cli/issues/5919)) ([bfad89e](https://github.com/NativeScript/nativescript-cli/commit/bfad89ead225c881c46e2a6a4de042a1cb434323)) + + + +# [9.0.0](https://github.com/NativeScript/nativescript-cli/compare/v8.9.3...v9.0.0) (2025-11-17) + + +### Bug Fixes + +* **android:** livesync tool connect race condition ([#5857](https://github.com/NativeScript/nativescript-cli/issues/5857)) ([1daa553](https://github.com/NativeScript/nativescript-cli/commit/1daa5533d72408b2bba6773ddbd012f5284dc41f)) +* clear all deprecated dependencies ([#5858](https://github.com/NativeScript/nativescript-cli/issues/5858)) ([d9bced3](https://github.com/NativeScript/nativescript-cli/commit/d9bced3427f620f78ca7da62066f836e4961b084)) +* **config:** using set with undefined ([#5883](https://github.com/NativeScript/nativescript-cli/issues/5883)) ([b09510f](https://github.com/NativeScript/nativescript-cli/commit/b09510f5c994226030097332b6f0996c21d1d96c)) +* remove lock from default clean ([#5881](https://github.com/NativeScript/nativescript-cli/issues/5881)) ([a1c39f6](https://github.com/NativeScript/nativescript-cli/commit/a1c39f6d7e9912b74c913a793adc3b6edf125574)) +* **security:** axios 1.11.0 ([#5847](https://github.com/NativeScript/nativescript-cli/issues/5847)) ([0b08cb2](https://github.com/NativeScript/nativescript-cli/commit/0b08cb29bda03495a1e9a99e4bef100bc2d88838)) +* **security:** xml2js and braces ([#5848](https://github.com/NativeScript/nativescript-cli/issues/5848)) ([debc85a](https://github.com/NativeScript/nativescript-cli/commit/debc85a584cdb305ff329bca12c255750e8a9658)) +* update ios-sim-portable to version 4.5.1 ([#5850](https://github.com/NativeScript/nativescript-cli/issues/5850)) ([f575bdc](https://github.com/NativeScript/nativescript-cli/commit/f575bdcc39a1a749788aa04e4cc33d2d26f92489)) +* **visionos:** build/prepare ([e40a1b8](https://github.com/NativeScript/nativescript-cli/commit/e40a1b8d6cfd055016ac2612ecccb771176766b0)) + + +### Features + +* add config to help menu ([#5916](https://github.com/NativeScript/nativescript-cli/issues/5916)) ([f81499d](https://github.com/NativeScript/nativescript-cli/commit/f81499d4092426a801ac2a4bf9579a03c463a2b9)) +* add Dependabot configuration ([#5859](https://github.com/NativeScript/nativescript-cli/issues/5859)) ([93a214c](https://github.com/NativeScript/nativescript-cli/commit/93a214c093c3aa5d47df6b19371c12b26d3c97ed)) +* add Dependency Review Action workflow ([#5860](https://github.com/NativeScript/nativescript-cli/issues/5860)) ([1478ba9](https://github.com/NativeScript/nativescript-cli/commit/1478ba9b8d6cd987833dbd7108a19ed37c0f041f)) +* android upgrades, bundletool to 1.18.2, kotlin to 2.2.20 ([#5917](https://github.com/NativeScript/nativescript-cli/issues/5917)) ([cc94b80](https://github.com/NativeScript/nativescript-cli/commit/cc94b80328ac22828509e71313848bb10d444150)) +* **android:** api level 36 + start up emulator with unknown target versions ([#5842](https://github.com/NativeScript/nativescript-cli/issues/5842)) ([de2cb8c](https://github.com/NativeScript/nativescript-cli/commit/de2cb8c1e68bfbf0c7651a440bbaff72de27cf50)) +* **android:** update default compileSdkVersion and buildToolsVersion to 35 ([#5849](https://github.com/NativeScript/nativescript-cli/issues/5849)) ([cca32f9](https://github.com/NativeScript/nativescript-cli/commit/cca32f99d644c176f61383866cd45979d6e1f6b2)) +* config settings to use different bundlers ([#5837](https://github.com/NativeScript/nativescript-cli/issues/5837)) ([27e94e8](https://github.com/NativeScript/nativescript-cli/commit/27e94e8bececb837ce901e37e9b1c0d4581603dd)) +* hooks command ([#5918](https://github.com/NativeScript/nativescript-cli/issues/5918)) ([87cbca9](https://github.com/NativeScript/nativescript-cli/commit/87cbca902f8a30f27b8db524d307fd40d808216a)) +* **hooks:** support ES Modules ([#5843](https://github.com/NativeScript/nativescript-cli/issues/5843)) ([23c07aa](https://github.com/NativeScript/nativescript-cli/commit/23c07aa097750147432a8a823a4673c328df76fc)) +* migration updates ([52e5749](https://github.com/NativeScript/nativescript-cli/commit/52e57499806431ee5e3919e9a7cd631e030481ac)) +* replace chalk/ansi-colors/glob with Node.js built-ins ([#5853](https://github.com/NativeScript/nativescript-cli/issues/5853)) ([e562267](https://github.com/NativeScript/nativescript-cli/commit/e562267ce6a7d5cf2172679d6498b2ab79a9aff7)) + + + +## [8.9.3](https://github.com/NativeScript/nativescript-cli/compare/v8.9.2...v8.9.3) (2025-07-16) + + +### Bug Fixes + +* **bundler:** include process.env first ([4df139d](https://github.com/NativeScript/nativescript-cli/commit/4df139dc83456ac98dc4cdae765b72a47a945f91)) +* pass down process environment to webpack process ([#5844](https://github.com/NativeScript/nativescript-cli/issues/5844)) ([1e8b93f](https://github.com/NativeScript/nativescript-cli/commit/1e8b93fb0b8c5ac3080fdb5eecec5b7326859c81)) + + + +## [8.9.2](https://github.com/NativeScript/nativescript-cli/compare/v8.9.1...v8.9.2) (2025-03-25) + + +### Bug Fixes + +* icon generator color type error ([#5838](https://github.com/NativeScript/nativescript-cli/issues/5838)) ([af81491](https://github.com/NativeScript/nativescript-cli/commit/af8149113844a7aebcd6bf66eeae73154ac7927b)) +* remove --legacy-peer-deps flag on install ([#5839](https://github.com/NativeScript/nativescript-cli/issues/5839)) ([ca6fb68](https://github.com/NativeScript/nativescript-cli/commit/ca6fb68a96cbf4006885c878527c0743b3dae248)) + + + +## [8.9.1](https://github.com/NativeScript/nativescript-cli/compare/v8.9.0...v8.9.1) (2025-03-05) + + +### Bug Fixes + +* support node < 22.14 ([#5834](https://github.com/NativeScript/nativescript-cli/issues/5834)) ([9c5fdb2](https://github.com/NativeScript/nativescript-cli/commit/9c5fdb24a826974d62ce72b74a13e5e419136d77)) + + + +# [8.9.0](https://github.com/NativeScript/nativescript-cli/compare/v8.8.3...v8.9.0) (2025-02-27) + + +### Bug Fixes + +* add webpack env data so that scripts can read it ([#5817](https://github.com/NativeScript/nativescript-cli/issues/5817)) ([bc23679](https://github.com/NativeScript/nativescript-cli/commit/bc23679c426858dc4a6824641123116a8720d33f)) +* **android:** emulator ini file parsing ([#5824](https://github.com/NativeScript/nativescript-cli/issues/5824)) ([2f35b34](https://github.com/NativeScript/nativescript-cli/commit/2f35b347e1d9710f17862009784826cfb0c589aa)) +* **android:** logging after app restart ([#5815](https://github.com/NativeScript/nativescript-cli/issues/5815)) ([86d9f29](https://github.com/NativeScript/nativescript-cli/commit/86d9f29ced188a8b7904a83f3c58f06131db8282)) +* apple team id not being used when persisted to the platforms folder ([#5821](https://github.com/NativeScript/nativescript-cli/issues/5821)) ([4176e98](https://github.com/NativeScript/nativescript-cli/commit/4176e989cc132591b94d2a876fe72a3ab85a3527)) +* ensure plugin path is defined to process configs ([d96fde1](https://github.com/NativeScript/nativescript-cli/commit/d96fde1f151e1565ac38d311b42a91b552d70d1c)) +* ios-device-lib compiled with arm and x64 ([#5825](https://github.com/NativeScript/nativescript-cli/issues/5825)) ([9eac531](https://github.com/NativeScript/nativescript-cli/commit/9eac5314ac34ee1eea69d480534e1de7e3c99cd6)) +* ios-mobileprovision-finder updates for profile location adjustments ([ea0a138](https://github.com/NativeScript/nativescript-cli/commit/ea0a1389bc91c5549744cf710bef7f471bcc9823)) +* ios-mobileprovision-finder updates for windows ([c06e099](https://github.com/NativeScript/nativescript-cli/commit/c06e0995364769848e693ad513fcad8b6699029a)) +* ns publish, apple authentication, appstore list ([#5820](https://github.com/NativeScript/nativescript-cli/issues/5820)) ([5e381d4](https://github.com/NativeScript/nativescript-cli/commit/5e381d435ee8e65d729b5683040cef0a9a03a71c)) +* **windows:** APPDATA required ([#5823](https://github.com/NativeScript/nativescript-cli/issues/5823)) ([91eab28](https://github.com/NativeScript/nativescript-cli/commit/91eab28c982e98f7dec6ab3aa943900daed2f12a)) + + +### Features + +* build flag to append generated suffix to bundles ([#5814](https://github.com/NativeScript/nativescript-cli/issues/5814)) ([d10b817](https://github.com/NativeScript/nativescript-cli/commit/d10b817f7428f7fc668b21c38302704592060823)) +* custom android-studio path to support nixos using new env.NATIVESCRIPT_ANDROID_STUDIO_PATH ([#5816](https://github.com/NativeScript/nativescript-cli/issues/5816)) ([661b653](https://github.com/NativeScript/nativescript-cli/commit/661b653f39332859bb808cec5992c6b4fcbfe150)) +* **ios:** 'ns widget ios' for single command widget generator ([#5829](https://github.com/NativeScript/nativescript-cli/issues/5829)) ([89d09d3](https://github.com/NativeScript/nativescript-cli/commit/89d09d3d27030ec98ce1e50b21be2d238c79f2e5)) +* **ios:** allow collections of NativeSource to be included via nativescript.config ([#5830](https://github.com/NativeScript/nativescript-cli/issues/5830)) ([daa567c](https://github.com/NativeScript/nativescript-cli/commit/daa567caa7250d17cb567883a4753480dcb6b933)) +* **ios:** multi target support for swift packages ([#5828](https://github.com/NativeScript/nativescript-cli/issues/5828)) ([2090491](https://github.com/NativeScript/nativescript-cli/commit/209049163b6235f6726230e8eec2f19908e893ea)) +* plugins can now define their own nativescript.config for SPMPackage inclusion ([#5826](https://github.com/NativeScript/nativescript-cli/issues/5826)) ([b2bad0c](https://github.com/NativeScript/nativescript-cli/commit/b2bad0cfaaaea4d1aafddfdf1153e1f3e3afee5d)) +* support solid with typescript template ([1b6202d](https://github.com/NativeScript/nativescript-cli/commit/1b6202db13eb585e342b72604028dd3e0aeef97f)) + + + +## [8.8.3](https://github.com/NativeScript/nativescript-cli/compare/v8.8.2...v8.8.3) (2024-12-03) + +* SPM package version now supports semver ranges + * `~1.0.0` => upToNextMinor + * `^1.0.0` => upToNextMajor + * `#hash` => specific commit hash + * `` => specific branch + +## [8.8.2](https://github.com/NativeScript/nativescript-cli/compare/v8.8.1...v8.8.2) (2024-08-28) + + +### Bug Fixes + +* don't quote executable in windows ([823565e](https://github.com/NativeScript/nativescript-cli/commit/823565e95102343449bc687387d43a5f223390b1)) +* typings path separator on windows ([#5812](https://github.com/NativeScript/nativescript-cli/issues/5812)) ([25c3d67](https://github.com/NativeScript/nativescript-cli/commit/25c3d67ff92980b45326a4cc5043561bba393598)) + + + +## [8.8.1](https://github.com/NativeScript/nativescript-cli/compare/v8.8.0...v8.8.1) (2024-08-19) + + +### Bug Fixes + +* quote windows command line arguments ([#5808](https://github.com/NativeScript/nativescript-cli/issues/5808)) ([bf9a6cd](https://github.com/NativeScript/nativescript-cli/commit/bf9a6cdbed227c876b8a94a13e3517e684dad924)) + + +### Features + +* add android 35 support ([#5811](https://github.com/NativeScript/nativescript-cli/issues/5811)) ([abc7ab4](https://github.com/NativeScript/nativescript-cli/commit/abc7ab474024bda566374271e0497f4c73d78b4d)) + + + +# [8.8.0](https://github.com/NativeScript/nativescript-cli/compare/v8.7.2...v8.8.0) (2024-07-11) + + +### Bug Fixes + +* `ns config set` failure with prettier plugins ([67e68c6](https://github.com/NativeScript/nativescript-cli/commit/67e68c64aec9fcf180cbb91bcc1bfb1ee897094b)) +* **android:** use more accurate PID detection on restart ([#5804](https://github.com/NativeScript/nativescript-cli/issues/5804)) ([6509773](https://github.com/NativeScript/nativescript-cli/commit/650977342c67056a1ac3138d3810739cab95d5d5)) + + +### Features + +* ability to embed NativeScript into host Swift and Kotlin projects ([#5803](https://github.com/NativeScript/nativescript-cli/issues/5803)) ([42177c3](https://github.com/NativeScript/nativescript-cli/commit/42177c31bd034b6106500259b264db6347c5e21e)) +* add support for custom platform 'projectName' from nativescript.config ([#2107](https://github.com/NativeScript/nativescript-cli/issues/2107)) ([#5801](https://github.com/NativeScript/nativescript-cli/issues/5801)) ([32f8fc5](https://github.com/NativeScript/nativescript-cli/commit/32f8fc5332cfe8deda9606346906a4fa179fe78d)) +* gradle 8, kotlin 2 & updated bundletool ([#5799](https://github.com/NativeScript/nativescript-cli/issues/5799)) ([29acc76](https://github.com/NativeScript/nativescript-cli/commit/29acc76479646c1150440f9a4d0defa19faa74f0)) +* migrate 8.8 and associated depedencies ([#5807](https://github.com/NativeScript/nativescript-cli/issues/5807)) ([9e9773f](https://github.com/NativeScript/nativescript-cli/commit/9e9773f481991e30ac9c0aaf7a3a5dcc947fc801)) +* native add command to add native source files to the project ([#5806](https://github.com/NativeScript/nativescript-cli/issues/5806)) ([2f2d1e0](https://github.com/NativeScript/nativescript-cli/commit/2f2d1e0bfa5e3e41bba653de2393e9a2c169bd38)) + + + +## [8.7.2](https://github.com/NativeScript/nativescript-cli/compare/v8.7.1...v8.7.2) (2024-05-28) + +### Bug Fixes + +* fix `npm i -g nativescript` on npm 10.4.0+ ([9d2ec7c](https://github.com/NativeScript/nativescript-cli/commit/9d2ec7cb6a12ea10439ea287991812645a156473)) + +### Features + +* don't uninstall app by default ([bac14c0](https://github.com/NativeScript/nativescript-cli/commit/bac14c06568c7a0538618d9ca1e369a56dd272b5)) + + + +## [8.7.1](https://github.com/NativeScript/nativescript-cli/compare/v8.7.0...v8.7.1) (2024-05-16) + + +### Bug Fixes + +* **windows:** make compatible with latest node patch levels ([#5802](https://github.com/NativeScript/nativescript-cli/issues/5802)) ([8795e98](https://github.com/NativeScript/nativescript-cli/commit/8795e98e7876d11ac0032135607fb13bf00d246d)) + + +### Features + +* interactive typings generation for android ([#5798](https://github.com/NativeScript/nativescript-cli/issues/5798)) ([d3f2e70](https://github.com/NativeScript/nativescript-cli/commit/d3f2e70101d44a9bc8450c5d0b90419945c2604f)) + + + +# [8.7.0](https://github.com/NativeScript/nativescript-cli/compare/v8.6.5...v8.7.0) (2024-04-08) + + +### Bug Fixes + +* **autocomplete:** fix the generation of the autocomplete script and prevent duplication on enable/disable ([#5794](https://github.com/NativeScript/nativescript-cli/issues/5794)) ([7c87b49](https://github.com/NativeScript/nativescript-cli/commit/7c87b49bd3779ad4a43ebae044595e2bdac8b373)) +* **debug-ios:** don't explicitly bind ws to `localhost` ([#5788](https://github.com/NativeScript/nativescript-cli/issues/5788)) ([280b10d](https://github.com/NativeScript/nativescript-cli/commit/280b10d3410d9b5340e7dd7e532a11e4cdd7bca5)) +* **ios:** only allow IPHONEOS_DEPLOYMENT_TARGET to be explicitly set vs entire xcconfig ([ac8afcc](https://github.com/NativeScript/nativescript-cli/commit/ac8afcc70c68c8c8476278ec508265483635f105)) +* **ios:** skip package validation on xcodebuild ([#5782](https://github.com/NativeScript/nativescript-cli/issues/5782)) ([e47cff4](https://github.com/NativeScript/nativescript-cli/commit/e47cff471ab25f7608360c8c0c94463a83116788)) +* **plugins:** parse name issue with invalid plugins ([#5770](https://github.com/NativeScript/nativescript-cli/issues/5770)) ([f826248](https://github.com/NativeScript/nativescript-cli/commit/f82624892c1433ea1aefdbeb06b5bd53e954b8a1)) +* remove python six requirement ([#5785](https://github.com/NativeScript/nativescript-cli/issues/5785)) ([25ae1f0](https://github.com/NativeScript/nativescript-cli/commit/25ae1f0842469697826c0061b499f55b54f0987d)) +* tests ([13b0bdb](https://github.com/NativeScript/nativescript-cli/commit/13b0bdb808a4796ea0c68575fd41308db5ef840c)) + + +### Features + +* add experimental bun package manager support ([#5791](https://github.com/NativeScript/nativescript-cli/issues/5791)) ([f758f6c](https://github.com/NativeScript/nativescript-cli/commit/f758f6cac3ed5e1ba6adeb9b68a683a21fdd0e07)) +* add open ios/android ([#5779](https://github.com/NativeScript/nativescript-cli/issues/5779)) ([81b32bc](https://github.com/NativeScript/nativescript-cli/commit/81b32bcaa125d2914c4e3ad41068d7da9671635d)) +* **ios:** ensure user defined xcconfig always takes priority ([#5784](https://github.com/NativeScript/nativescript-cli/issues/5784)) ([500d751](https://github.com/NativeScript/nativescript-cli/commit/500d75176cee0f5c5a5551ffcc1d4c00c7543b5a)) +* provide appId to webpack config ([#5778](https://github.com/NativeScript/nativescript-cli/issues/5778)) ([e3ef37d](https://github.com/NativeScript/nativescript-cli/commit/e3ef37dc648e99ff09844e22e11c917f7d727cdf)) +* support for solid/solidjs templates and migrations for 8.7 ([#5796](https://github.com/NativeScript/nativescript-cli/issues/5796)) ([cf788f0](https://github.com/NativeScript/nativescript-cli/commit/cf788f053fd976ee7dd62af2ac61bb1590498be0)) +* visionOS support ([#5783](https://github.com/NativeScript/nativescript-cli/issues/5783)) ([6a6a832](https://github.com/NativeScript/nativescript-cli/commit/6a6a8322655b1dedadda912d712cf26ee6d51f56)) + + + +## [8.6.4](https://github.com/NativeScript/nativescript-cli/compare/v8.6.3...v8.6.4) (2024-01-17) + + +### Bug Fixes + +* skip log-source-maps for large files ([#5780](https://github.com/NativeScript/nativescript-cli/issues/5780)) ([c53b4e9](https://github.com/NativeScript/nativescript-cli/commit/c53b4e9111f3da98547ec273c92a73ead89aca13)) + + + +## [8.6.1](https://github.com/NativeScript/nativescript-cli/compare/v8.6.0...v8.6.1) (2023-10-23) + + +### Bug Fixes + +* remove cli-table aliasing ([#5763](https://github.com/NativeScript/nativescript-cli/issues/5763)) ([dd1640c](https://github.com/NativeScript/nativescript-cli/commit/dd1640ca15235be82d945fe6401e3993a6a4442a)) +* resolve pacote regression with creating app from a template directory ([#5766](https://github.com/NativeScript/nativescript-cli/issues/5766)) ([2cd7a62](https://github.com/NativeScript/nativescript-cli/commit/2cd7a62ee8535f72c578e681806ca441c752c357)) +* setup docs links ([#5762](https://github.com/NativeScript/nativescript-cli/issues/5762)) ([b229fdf](https://github.com/NativeScript/nativescript-cli/commit/b229fdf4eb4d942fce5734166e02c1b4b193cdb7)) + + + +# [8.6.0](https://github.com/NativeScript/nativescript-cli/compare/v8.5.3...v8.6.0) (2023-10-10) + + +### Bug Fixes + +* bump resolve-package-path to fix aliased module resolution ([3307155](https://github.com/NativeScript/nativescript-cli/commit/33071556385e9a1ec8945e66eb57b5f1ef744c28)) +* check if interactive before attaching key commands ([27d3940](https://github.com/NativeScript/nativescript-cli/commit/27d394030fec6c39dd58138411a65b80def7fcb8)) +* get framework name from Info.plist ([#5759](https://github.com/NativeScript/nativescript-cli/issues/5759)) ([6bc6ca9](https://github.com/NativeScript/nativescript-cli/commit/6bc6ca91422b6e6d9c7b5dbc4457c69ec58b74f0)) +* hash plugin files after prepare ([#5753](https://github.com/NativeScript/nativescript-cli/issues/5753)) ([ecf1959](https://github.com/NativeScript/nativescript-cli/commit/ecf19599eda49dbbdb0d01333880e736bb02d222)) +* **ios-device-lib:** use 0.9.3 with device core handling ([5cc76f4](https://github.com/NativeScript/nativescript-cli/commit/5cc76f4ad890b3f8e79bfdcd64d6e9842baf081d)) +* **logs:** android log detection fixes ([b5cc32e](https://github.com/NativeScript/nativescript-cli/commit/b5cc32ece0ec7e38fd084ea3398abca2fedc0a9a)) +* **logs:** correctly trim ios logs + fix tests ([be1e737](https://github.com/NativeScript/nativescript-cli/commit/be1e737a7457d4e35eda76619369a52b88d0dcab)) +* **logs:** don't trim leading whitespace ([f522401](https://github.com/NativeScript/nativescript-cli/commit/f522401e03322c328e7859cea2881af73f6889fe)) +* use valid interface ([a35dfa6](https://github.com/NativeScript/nativescript-cli/commit/a35dfa6a4841e01efd9dbc85b66048be90bcee1c)) + + +### Features + +* add key commands ([5dbc780](https://github.com/NativeScript/nativescript-cli/commit/5dbc780f3b5e216669092db3cb413fa0fc25f53e)) +* allow android plugins to have cpp code ([#5758](https://github.com/NativeScript/nativescript-cli/issues/5758)) ([c5f7b85](https://github.com/NativeScript/nativescript-cli/commit/c5f7b85e55c76eadb9697efc554814a8ed31b1ab)) +* allow running on visionOS ([#5745](https://github.com/NativeScript/nativescript-cli/issues/5745)) ([f6a0fdd](https://github.com/NativeScript/nativescript-cli/commit/f6a0fdd14ee409e791fa75de52cd6f85154db3cb)) +* **angular:** use 16.2.0 on ns update ([a31b3bb](https://github.com/NativeScript/nativescript-cli/commit/a31b3bb881a74e7d46eb30e172c145dd9536e0ad)) +* **extension:** initial per-extension provisioning ([#5749](https://github.com/NativeScript/nativescript-cli/issues/5749)) ([c564e18](https://github.com/NativeScript/nativescript-cli/commit/c564e189b36334a2f8a7a7fc57e911b9139cb358)) +* **extensions:** add extension podfile and setup extension with provision ([#5751](https://github.com/NativeScript/nativescript-cli/issues/5751)) ([ba3293c](https://github.com/NativeScript/nativescript-cli/commit/ba3293c174155b1143e87662ed49c978e9cac32d)) +* **extensions:** allow seperate release/debug build configuration ([#5741](https://github.com/NativeScript/nativescript-cli/issues/5741)) ([fdcc98e](https://github.com/NativeScript/nativescript-cli/commit/fdcc98e9fc45786fd362444dad2fa1d458d09cb6)) +* **ios:** always override xcconfig with user values ([#5735](https://github.com/NativeScript/nativescript-cli/issues/5735)) ([5b88e06](https://github.com/NativeScript/nativescript-cli/commit/5b88e06404bf910da966ec1a7969f13c8f843fe4)) +* **logs:** improve android logging ([#5755](https://github.com/NativeScript/nativescript-cli/issues/5755)) ([8c5ef04](https://github.com/NativeScript/nativescript-cli/commit/8c5ef043bc8355e5ce421dbc4ee02efd78e06caa)) +* **spm:** add support for local SPM packages ([#5748](https://github.com/NativeScript/nativescript-cli/issues/5748)) ([c40e217](https://github.com/NativeScript/nativescript-cli/commit/c40e2177ecbc452d124a6d6f750d1bfeb9de7e50)) + + + +## [8.5.3](https://github.com/NativeScript/nativescript-cli/compare/v8.5.2...v8.5.3) (2023-04-12) + + +### Bug Fixes + +* correctly merge IPHONEOS_DEPLOYMENT_TARGET in xcconfigs ([#5728](https://github.com/NativeScript/nativescript-cli/issues/5728)) ([e6c09c0](https://github.com/NativeScript/nativescript-cli/commit/e6c09c0048534f6079634291706b0b38ac193a6c)) +* hooks not being called ([#5729](https://github.com/NativeScript/nativescript-cli/issues/5729)) ([c35673e](https://github.com/NativeScript/nativescript-cli/commit/c35673eb9ed02116e1286351ca7a711d6ee231e7)) +* migrate - safeguard possibly null values ([#5730](https://github.com/NativeScript/nativescript-cli/issues/5730)) ([68d9373](https://github.com/NativeScript/nativescript-cli/commit/68d9373aec1427a71e1f6236fff4f8084c33a421)) + + + +## [8.5.2](https://github.com/NativeScript/nativescript-cli/compare/v8.5.1...v8.5.2) (2023-04-06) + + +### Features + +* clean multiple projects ([#5726](https://github.com/NativeScript/nativescript-cli/issues/5726)) ([e39e8db](https://github.com/NativeScript/nativescript-cli/commit/e39e8dbea725bbb541c9f76fc7b8723bf204d423)) + + + +## [8.5.1](https://github.com/NativeScript/nativescript-cli/compare/v8.5.0...v8.5.1) (2023-03-29) + + +### Reverts + +* "fix: build plugins using same gradle config structure as apps ([#5671](https://github.com/NativeScript/nativescript-cli/issues/5671))" ([2c2c964](https://github.com/NativeScript/nativescript-cli/commit/2c2c964c791a831f091a5a10432d4b9f6266e5d4)) + + + +# [8.5.0](https://github.com/NativeScript/nativescript-cli/compare/v8.4.0...v8.5.0) (2023-03-28) + + +### Bug Fixes + +* **publish:** various apple publish/sign-in fixes ([#5718](https://github.com/NativeScript/nativescript-cli/issues/5718)) ([1c27c2b](https://github.com/NativeScript/nativescript-cli/commit/1c27c2bf17a7df1fcfa434b7c04fda3a41f38a34)) +* build plugins using same gradle config structure as apps ([#5671](https://github.com/NativeScript/nativescript-cli/issues/5671)) ([40e459a](https://github.com/NativeScript/nativescript-cli/commit/40e459ac2669bed5a1b661f47336691cc8d0b997)) +* **android:** support unsigned apks ([#5706](https://github.com/NativeScript/nativescript-cli/issues/5706)) ([32d3a0f](https://github.com/NativeScript/nativescript-cli/commit/32d3a0fe4a83943c2580b42c1e1536236a3d6164)) +* **doctor:** check for python3 instead of python ([f21156c](https://github.com/NativeScript/nativescript-cli/commit/f21156c8d02964308f503dcdf8f9dc2764745b4e)) + + +### Features + +* **migrate:** 8.5.0 migrations ([#5725](https://github.com/NativeScript/nativescript-cli/issues/5725)) ([b11357d](https://github.com/NativeScript/nativescript-cli/commit/b11357d1c1c7ee717acd43fbccee568367d77016)) +* support generating android adaptive icons ([#5667](https://github.com/NativeScript/nativescript-cli/issues/5667)) ([73694bd](https://github.com/NativeScript/nativescript-cli/commit/73694bd447625f3df91f999c66e13e9ddc6fb01e)) +* **profiling:** generate chrome compatible timeline data ([#5686](https://github.com/NativeScript/nativescript-cli/issues/5686)) ([0569873](https://github.com/NativeScript/nativescript-cli/commit/0569873139576c3264c631699d9357a96d2d4dbf)) +* experimental SPM support ([#5721](https://github.com/NativeScript/nativescript-cli/issues/5721)) ([1443240](https://github.com/NativeScript/nativescript-cli/commit/14432403857354a8281b8fd1c1d3b4c2f6659403)) +* experimental yarn2+ support ([#5701](https://github.com/NativeScript/nativescript-cli/issues/5701)) ([363db96](https://github.com/NativeScript/nativescript-cli/commit/363db96d7a07245cf1635a2dc22b7a2110941f29)) + + + +# [8.4.0](https://github.com/NativeScript/nativescript-cli/compare/v8.3.3...v8.4.0) (2022-11-30) + + +### Bug Fixes + +* get `targetSdkVersion` from project ext ([#5656](https://github.com/NativeScript/nativescript-cli/issues/5656)) ([7574be2](https://github.com/NativeScript/nativescript-cli/commit/7574be2f4cd19b3f9ed28bf351f59ed22f11d7ae)) +* handle unknown/undefined platform edge case ([#5694](https://github.com/NativeScript/nativescript-cli/issues/5694)) ([aa3de73](https://github.com/NativeScript/nativescript-cli/commit/aa3de73193356eedc8ba1c68c9ae9e62b3902832)) +* hmr doesn't work properly in paths with the character '.' ([#5703](https://github.com/NativeScript/nativescript-cli/issues/5703)) ([7a312a2](https://github.com/NativeScript/nativescript-cli/commit/7a312a2113796a75d4fa22541249526bd4ef2dd6)) +* only include EXCLUDED_ARCHS workaround in xcode 12 ([#5705](https://github.com/NativeScript/nativescript-cli/issues/5705)) ([3e430cf](https://github.com/NativeScript/nativescript-cli/commit/3e430cffb52e5f210d3e32e293b9f464f2fc75b6)) +* **testing:** pin karma-jasmine to 4.0.2 ([#5695](https://github.com/NativeScript/nativescript-cli/issues/5695)) ([a5bbac7](https://github.com/NativeScript/nativescript-cli/commit/a5bbac7d32c0a60ea3426b3fbd9b795402d757d1)), closes [#5690](https://github.com/NativeScript/nativescript-cli/issues/5690) + + +### Features + +* **doctor:** more informative android compile SDK messages ([#5697](https://github.com/NativeScript/nativescript-cli/issues/5697)) ([cfaa882](https://github.com/NativeScript/nativescript-cli/commit/cfaa882dd42d0d2447efb597442359ed19d9665d)) +* include-settings.gradle plugin ([#5693](https://github.com/NativeScript/nativescript-cli/issues/5693)) ([6155ff7](https://github.com/NativeScript/nativescript-cli/commit/6155ff7f40c37c1183f9cf66b3ea0a464fb6497c)) +* pass in tempPlugin flag during plugin build ([#5691](https://github.com/NativeScript/nativescript-cli/issues/5691)) ([645e9ea](https://github.com/NativeScript/nativescript-cli/commit/645e9ea516063db5da230fbd08db7d9fe37ab971)) +* **migrations:** use Angular 14.2 ([3dc0323](https://github.com/NativeScript/nativescript-cli/commit/3dc03231c7edc7efce9f97445a211f7657c8da1e)) + + + +## [8.3.3](https://github.com/NativeScript/nativescript-cli/compare/v8.3.2...v8.3.3) (2022-08-22) + + +### Bug Fixes + +* **console:** disable long line splitting ([be8274d](https://github.com/NativeScript/nativescript-cli/commit/be8274d7dce5f9d43a4aa3bf78d6beb414115dfc)) +* **preview:** windows spawn error ([f737579](https://github.com/NativeScript/nativescript-cli/commit/f73757929550f54fca4509f597da4dd746297ba7)) + + +### Features + +* ensure App_Resources exists before running ([#5689](https://github.com/NativeScript/nativescript-cli/issues/5689)) ([ba8dd58](https://github.com/NativeScript/nativescript-cli/commit/ba8dd58e289c0e2b8a3bc847a4c8a4e5d1bc0d73)) + + + +## [8.3.2](https://github.com/NativeScript/nativescript-cli/compare/v8.3.1...v8.3.2) (2022-07-31) + + +### Bug Fixes + +* **logger:** don't trim text if maxWidth is NaN or <10 ([5415582](https://github.com/NativeScript/nativescript-cli/commit/541558270d54be32f2d38f0848a958e0cbca2a0b)) + + + +## [8.3.1](https://github.com/NativeScript/nativescript-cli/compare/v8.3.0...v8.3.1) (2022-07-29) + + +### Bug Fixes + +* use correct path to emulator executable ([#5663](https://github.com/NativeScript/nativescript-cli/issues/5663)) ([d49b666](https://github.com/NativeScript/nativescript-cli/commit/d49b6664f216456f84bfbf3dc5f1b362588e1951)) + + +### Features + +* **migrate:** update to 8.3 ([#5685](https://github.com/NativeScript/nativescript-cli/issues/5685)) ([50de194](https://github.com/NativeScript/nativescript-cli/commit/50de1946986b634bd3a9cf6d06d5f9b0c93a3caf)) + + + +# [8.3.0](https://github.com/NativeScript/nativescript-cli/compare/v8.2.3...v8.3.0) (2022-07-25) + + +### Bug Fixes + +* **ios-publish:** Update API calls to get applications ([#5678](https://github.com/NativeScript/nativescript-cli/issues/5678)) ([4abe2c9](https://github.com/NativeScript/nativescript-cli/commit/4abe2c901829b28f1e1fa26009996db96af06047)) +* **unit-test-runner:** node 18 binding family ([#5673](https://github.com/NativeScript/nativescript-cli/issues/5673)) ([1da28bc](https://github.com/NativeScript/nativescript-cli/commit/1da28bcb506650a0c43f468a43f4d577a7d9d3d4)) +* ios log filtering ([#5679](https://github.com/NativeScript/nativescript-cli/issues/5679)) ([8446000](https://github.com/NativeScript/nativescript-cli/commit/8446000ec7580fdc2aff4d7154edd174bf2d1d52)) + + +### Features + +* bump @nativescript/doctor version ([893989b](https://github.com/NativeScript/nativescript-cli/commit/893989b250c6372937a67f4c55ac05e92c1f26a8)) +* cleaner log output ([#5680](https://github.com/NativeScript/nativescript-cli/issues/5680)) ([5330207](https://github.com/NativeScript/nativescript-cli/commit/53302079e30580242e7bf4f9cad88f9b37d1a789)) +* **doctor:** add android-33 to supported sdks ([b8f15a0](https://github.com/NativeScript/nativescript-cli/commit/b8f15a06ffab855ed7f77b580b6421650bbed52a)) +* **migrate:** use Angular 14.1 ([#5681](https://github.com/NativeScript/nativescript-cli/issues/5681)) ([d5d4206](https://github.com/NativeScript/nativescript-cli/commit/d5d4206c4041e10e4abb0e11ae6f7a9c8c89412e)) +* add watchAction hooks ([#5661](https://github.com/NativeScript/nativescript-cli/issues/5661)) ([bb3a696](https://github.com/NativeScript/nativescript-cli/commit/bb3a6965792cc565ab6d516c30a640ac98313ee7)) +* alias --simulator to --emulator ([e9d9d5a](https://github.com/NativeScript/nativescript-cli/commit/e9d9d5a878c455d9a69cc1416fe21d07c1c5e5c4)) +* re-enable preview command ([#5676](https://github.com/NativeScript/nativescript-cli/issues/5676)) ([98124e7](https://github.com/NativeScript/nativescript-cli/commit/98124e70a8867ad6161a199ee11129ca6b269eb4)) + + + +## [8.2.3](https://github.com/NativeScript/nativescript-cli/compare/v8.2.2...v8.2.3) (2022-03-23) + + +### Bug Fixes + +* **doctor:** improve target and sdk compatibility detection on <8.2 ([#5648](https://github.com/NativeScript/nativescript-cli/issues/5648)) ([fa257dd](https://github.com/NativeScript/nativescript-cli/commit/fa257dd455ca55374cf419d638ac74166dc727db)) +* **ios-publish:** changes in Apple API to set Team ([#5653](https://github.com/NativeScript/nativescript-cli/issues/5653)) ([5ceb254](https://github.com/NativeScript/nativescript-cli/commit/5ceb254f317d0cb186bfc31b89e2d2b28625094c)) +* **spawn:** resolve relative paths to prevent ENOENT errors ([37d576b](https://github.com/NativeScript/nativescript-cli/commit/37d576bcde7352b7fa6c937d5e765e10486fedf3)), closes [#5649](https://github.com/NativeScript/nativescript-cli/issues/5649) +* **test:** node17 resolves localhost to ipv6 instead of ipv4 ([81cb9c3](https://github.com/NativeScript/nativescript-cli/commit/81cb9c37cdd4e24115be79b24b68dfbaf8cdcfd2)) + + + +## [8.2.2](https://github.com/NativeScript/nativescript-cli/compare/v8.2.1...v8.2.2) (2022-03-09) + + +### Bug Fixes + +* topological dependency sorting ([#5647](https://github.com/NativeScript/nativescript-cli/issues/5647)) ([9d8d967](https://github.com/NativeScript/nativescript-cli/commit/9d8d967096fba41325ee9082eed02a880cb803f6)) + + +### Features + +* read gradle versions from local runtime first ([#5646](https://github.com/NativeScript/nativescript-cli/issues/5646)) ([1b9cde3](https://github.com/NativeScript/nativescript-cli/commit/1b9cde38f2272ae142520141469962fbe5f55954)) + + + +# [8.2.1](https://github.com/NativeScript/nativescript-cli/compare/v8.2.0...v8.2.1) (2022-03-08) + +### Bug Fixes + +* node17 debugger can't attach ([fc84d92](https://github.com/NativeScript/nativescript-cli/commit/fc84d92d9c102ddaca036c0cda1800b8e41fd653)) + +# [8.2.0](https://github.com/NativeScript/nativescript-cli/compare/v8.1.5...v8.2.0) (2022-03-08) + + +### Bug Fixes + +* remove deprecated property ([f7b4a74](https://github.com/NativeScript/nativescript-cli/commit/f7b4a74f58cb4b5fb8c6baa6f6b9d75512f21c1f)) +* **pnpm:** escape + in podfile path string ([#5638](https://github.com/NativeScript/nativescript-cli/issues/5638)) ([a11cace](https://github.com/NativeScript/nativescript-cli/commit/a11cace045856499a44637cd3052501ef34b5757)) +* add a missing newline to the clean command ([#5611](https://github.com/NativeScript/nativescript-cli/issues/5611)) ([46c396d](https://github.com/NativeScript/nativescript-cli/commit/46c396d6caecb88aae9774157e86d1f6bd7a6d1f)) +* correctly allow plugins build to detect before-plugins.gradle ([#5631](https://github.com/NativeScript/nativescript-cli/issues/5631)) ([3b42042](https://github.com/NativeScript/nativescript-cli/commit/3b420428e80594661968313ec63bd44089f960b0)) +* import performance from perf_hooks ([fade332](https://github.com/NativeScript/nativescript-cli/commit/fade3326765bac5cd9bbbda9efe54320e34360a9)) +* move additionalPathsToClean under cli object ([d16a932](https://github.com/NativeScript/nativescript-cli/commit/d16a932c1d660bf34f1bb0135899471f1de08260)) +* write project settings to gradle.properties ([#5640](https://github.com/NativeScript/nativescript-cli/issues/5640)) ([e0ed7f2](https://github.com/NativeScript/nativescript-cli/commit/e0ed7f2dd7e23d5fbb4fe3185e0b7f85534018d7)) +* **doctor:** Cannot read property 'toLowerCase' of null ([#5604](https://github.com/NativeScript/nativescript-cli/issues/5604)) ([0be52e9](https://github.com/NativeScript/nativescript-cli/commit/0be52e914540898fa0cdc679edfa303192c812f7)) +* **test:** exit test command if karma finishes execution ([#5618](https://github.com/NativeScript/nativescript-cli/issues/5618)) ([9f73e96](https://github.com/NativeScript/nativescript-cli/commit/9f73e9640357ebe6736dfd52e0ad5997c5c0b339)) + + +### Features + +* --gradlePath argument support ([#5628](https://github.com/NativeScript/nativescript-cli/issues/5628)) ([387c7c0](https://github.com/NativeScript/nativescript-cli/commit/387c7c0f2eaefcf942e9d6087edaa2a9c42ce064)) +* `--gradleArgs` option to pass gradle parameters ([#5630](https://github.com/NativeScript/nativescript-cli/issues/5630)) ([02d179a](https://github.com/NativeScript/nativescript-cli/commit/02d179a358297d099f1e2d2377b042db374edcad)) +* build transient native dependencies ([#5643](https://github.com/NativeScript/nativescript-cli/issues/5643)) ([1435eef](https://github.com/NativeScript/nativescript-cli/commit/1435eef272aced36e7f97a355ff5c7ea936f94e7)) +* bump migrate versions for 8.2.0 ([#5645](https://github.com/NativeScript/nativescript-cli/issues/5645)) ([6726ccc](https://github.com/NativeScript/nativescript-cli/commit/6726ccc3816afd17369633eb94e2c28735984efa)) +* compute and log build time ([#5602](https://github.com/NativeScript/nativescript-cli/issues/5602)) ([fb0a7b8](https://github.com/NativeScript/nativescript-cli/commit/fb0a7b80a0710226b57627246df7470c67ad4c8a)) +* improved --json output from devices ([#5565](https://github.com/NativeScript/nativescript-cli/issues/5565)) ([8446795](https://github.com/NativeScript/nativescript-cli/commit/84467951331982cc001504e078df23865bb25f31)) +* reduce aar size by removing R.class and BuildConfig.class ([#5644](https://github.com/NativeScript/nativescript-cli/issues/5644)) ([9ad80bf](https://github.com/NativeScript/nativescript-cli/commit/9ad80bfedf1f9e8c726ef8a546da2132c2b40897)) +* **android:** add gradle 7+ support ([#5614](https://github.com/NativeScript/nativescript-cli/issues/5614)) ([be6706a](https://github.com/NativeScript/nativescript-cli/commit/be6706af99c89765f3773e7e324a70037b2ec7b8)) +* **clean:** allow overriding pathsToClean in config ([b33507d](https://github.com/NativeScript/nativescript-cli/commit/b33507d703ce416e0c89423d55a2ad9d8f085a31)) +* **typings:** support --aar inputs ([#5641](https://github.com/NativeScript/nativescript-cli/issues/5641)) ([67fdd0a](https://github.com/NativeScript/nativescript-cli/commit/67fdd0afd05492543e74584f54986a274131c723)) +* launch last used simulator instead of iPhone 6 ([289317d](https://github.com/NativeScript/nativescript-cli/commit/289317d3bc3e78fe31de477f01bd8f452dd68512)) + + +### Performance Improvements + +* doctor cache runtimeVersion ([#5642](https://github.com/NativeScript/nativescript-cli/issues/5642)) ([3063550](https://github.com/NativeScript/nativescript-cli/commit/306355042065435348c77fefe163429c6164c643)) + + + +## [8.1.5](https://github.com/NativeScript/nativescript-cli/compare/v8.1.4...v8.1.5) (2021-11-26) + + +### Bug Fixes + +* **clean:** report failures to remove item ([#5601](https://github.com/NativeScript/nativescript-cli/issues/5601)) ([3902257](https://github.com/NativeScript/nativescript-cli/commit/3902257b335a0b652bda6ebfcf35585c02e05fb9)) +* **config:** handle invalid/unset projectDir ([b844498](https://github.com/NativeScript/nativescript-cli/commit/b8444986f34d1552b68a9257a4a4224d1f799abe)) +* **migrate:** create polyfills.ts if missing for angular projects ([#5593](https://github.com/NativeScript/nativescript-cli/issues/5593)) ([8728335](https://github.com/NativeScript/nativescript-cli/commit/87283355bba2e0a7bfa487fee15dfa82798db755)) + + +### Features + +* `ns -v --json` to skip update checks ([d7330b0](https://github.com/NativeScript/nativescript-cli/commit/d7330b0cdb4ca392b8b3f6c81b49ae1a0eb3a07a)) +* github issue forms ([#5609](https://github.com/NativeScript/nativescript-cli/issues/5609)) ([676630b](https://github.com/NativeScript/nativescript-cli/commit/676630bcb86203c532c52dd004d2ccd78cc17e6b)) +* nativescript-envinfo package ([#5600](https://github.com/NativeScript/nativescript-cli/issues/5600)) ([fd3b3a8](https://github.com/NativeScript/nativescript-cli/commit/fd3b3a86de02e512471158aa1fe501ec49c5c6e7)) +* unit-test-runner 3.0 with optional coverage report handling ([#5610](https://github.com/NativeScript/nativescript-cli/issues/5610)) ([ae7f286](https://github.com/NativeScript/nativescript-cli/commit/ae7f28634ca3de0167c309d2019cf7f78e3fc2c5)) +* **config:** cli.packageManager override support ([#5596](https://github.com/NativeScript/nativescript-cli/issues/5596)) ([3c03579](https://github.com/NativeScript/nativescript-cli/commit/3c035794489c26fe9100b30d011b7eaa94f4b353)) +* **hooks:** project persistent hooks in config ([#5597](https://github.com/NativeScript/nativescript-cli/issues/5597)) ([97bbe33](https://github.com/NativeScript/nativescript-cli/commit/97bbe3388fa150c7818fbe24e4220c9a6238267b)) + + + +## [8.1.4](https://github.com/NativeScript/nativescript-cli/compare/v8.1.3...v8.1.4) (2021-10-11) + + +### Bug Fixes + +* **migrate:** loosen up migrate condition for missing dependencies ([96af85b](https://github.com/NativeScript/nativescript-cli/commit/96af85bc985ee0881bfc95eae96182d0638dbe01)) +* runtime version detection for tags ([#5587](https://github.com/NativeScript/nativescript-cli/issues/5587)) ([a0663f4](https://github.com/NativeScript/nativescript-cli/commit/a0663f4e8733eee748060f47d7358b4a37b4ce98)), closes [#5574](https://github.com/NativeScript/nativescript-cli/issues/5574) + + + +## [8.1.3](https://github.com/NativeScript/nativescript-cli/compare/v8.1.2...v8.1.3) (2021-09-30) + + +### Bug Fixes + +* **ios-publish:** update API ([#5580](https://github.com/NativeScript/nativescript-cli/issues/5580)) ([63acaa6](https://github.com/NativeScript/nativescript-cli/commit/63acaa6defdf610aecbd49abd59ef3185948720c)) +* **m1:** cocoapods command when installed natively ([#5584](https://github.com/NativeScript/nativescript-cli/issues/5584)) ([65dcf01](https://github.com/NativeScript/nativescript-cli/commit/65dcf01bb213c5c7b0581a1f92d7aba7fb3aec0c)) +* **metadata-filtering:** only add when there are items to add ([ab9fc0f](https://github.com/NativeScript/nativescript-cli/commit/ab9fc0f9b7fd3a4adde10c28d538518d61039107)) +* **test-execution-service:** canStartKarma condition ([c68d58e](https://github.com/NativeScript/nativescript-cli/commit/c68d58edff8023875d4b973d7b5c65528e550b66)) +* fix source map path ([#5583](https://github.com/NativeScript/nativescript-cli/issues/5583)) ([8ecb335](https://github.com/NativeScript/nativescript-cli/commit/8ecb33541cdf405f5769b7cfa7385423e512ae80)) +* require.resolve for packages with exports field in package.json ([#5579](https://github.com/NativeScript/nativescript-cli/issues/5579)) ([56ed35b](https://github.com/NativeScript/nativescript-cli/commit/56ed35b71323f25759d36e1e1750ed9cd267a66d)) +* source-map appPath prefix detection ([77a8ce7](https://github.com/NativeScript/nativescript-cli/commit/77a8ce77d1d3110b67c858b19651abfde71afe8c)) + + +### Features + +* allow plugin blacklist metadata ([#5582](https://github.com/NativeScript/nativescript-cli/issues/5582)) ([5e9de51](https://github.com/NativeScript/nativescript-cli/commit/5e9de518785717ae44aff85c900d06e1dbebf882)) + + + +## [8.1.2](https://github.com/NativeScript/nativescript-cli/compare/v8.1.1...v8.1.2) (2021-09-15) + + +### Bug Fixes + +* **http-client:** requests with no proxy configured ([#5573](https://github.com/NativeScript/nativescript-cli/issues/5573)) ([d5121b4](https://github.com/NativeScript/nativescript-cli/commit/d5121b4082ed49dfc5c8994005d938223d114f25)) + + + +## [8.1.1](https://github.com/NativeScript/nativescript-cli/compare/v8.1.0...v8.1.1) (2021-09-12) + + +### Bug Fixes + +* launching android 11 and 12 emulators ([f32642e](https://github.com/NativeScript/nativescript-cli/commit/f32642e8fa2eaf799c872da96a7240805fc164ad)) +* order package.json keys the right way on project creation ([e68dcc8](https://github.com/NativeScript/nativescript-cli/commit/e68dcc89826704d83cf03bdfc9f7112ecfc092cd)) +* **create-project:** local template handling ([4f8d644](https://github.com/NativeScript/nativescript-cli/commit/4f8d6440538f5687ef198b61605c4479da0e41f3)) +* gradle build error when building some plugins ([58a0e60](https://github.com/NativeScript/nativescript-cli/commit/58a0e60bcbb8f0ee4732a4947cb2a78241fc065f)) +* runtime versions with a range ([e0bbf1b](https://github.com/NativeScript/nativescript-cli/commit/e0bbf1b4548b235c9638cdf9688035c99e4552f9)) + + +### Features + +* **create-project:** allow --force to forcefully create git repo inside another one ([30d42d2](https://github.com/NativeScript/nativescript-cli/commit/30d42d253e13d071c33aba7aded7affd5695fe32)) +* **create-project:** cleaner post-create message ([7c8741e](https://github.com/NativeScript/nativescript-cli/commit/7c8741eae122983b495dc82bb559e540684cc315)) +* **create-project:** detect git repo before initializing and --no-git support ([6d9b7df](https://github.com/NativeScript/nativescript-cli/commit/6d9b7df1284ec8f7332f32d14079c6858a8859f1)) +* new ns update handling ([bff78e3](https://github.com/NativeScript/nativescript-cli/commit/bff78e32b0a5cf5cd2d01f6ff35c46b9373b7fe7)) +* updated migration rules ([b2d51da](https://github.com/NativeScript/nativescript-cli/commit/b2d51da373c4d81ffa75bb313c55ac50362beeb3)) + + +### Performance Improvements + +* implement a memoize decorator with smart caching ([6521671](https://github.com/NativeScript/nativescript-cli/commit/6521671f17e8c4dc16d7c6c3378d1814b6ab1cb4)) + + + +# [8.1.0](https://github.com/NativeScript/nativescript-cli/compare/v8.0.2...v8.1.0) (2021-09-08) + + +### Bug Fixes + +* autocompletion aliases ([1640eee](https://github.com/NativeScript/nativescript-cli/commit/1640eee23b4592f12500b88162de2f562ee5a8f8)) +* CFBundleIdentifier override warning ([e62784e](https://github.com/NativeScript/nativescript-cli/commit/e62784ed802cb3f63cb2b157980af11d7b91b2c1)) +* check for not installed dependencies using require.resolve ([1fc817f](https://github.com/NativeScript/nativescript-cli/commit/1fc817f0220507ae5454fa56e150ab4969410e88)) +* xcodebuild destination warning ([#5564](https://github.com/NativeScript/nativescript-cli/issues/5564)) ([943eec6](https://github.com/NativeScript/nativescript-cli/commit/943eec6d94410a4f57435d90b59e6c62a39d8634)) +* config detection ([404a511](https://github.com/NativeScript/nativescript-cli/commit/404a5114614826c1d32d63d20a212890b555f2d8)) +* enable terminal cursor when Ctrl+C during a prompt ([cfb80a2](https://github.com/NativeScript/nativescript-cli/commit/cfb80a2ab7a64e9c18c45385894403397c636f73)) +* properly handle missing App_Resources ([#5536](https://github.com/NativeScript/nativescript-cli/issues/5536)) ([0a112f3](https://github.com/NativeScript/nativescript-cli/commit/0a112f30043ac2c2516033bcf4275af0ec55d502)) +* race condition when getting iOS inspector port ([#5544](https://github.com/NativeScript/nativescript-cli/issues/5544)) ([8f8dd83](https://github.com/NativeScript/nativescript-cli/commit/8f8dd83dc6042e0f67952981da4cde5d11a582c7)), closes [#3701](https://github.com/NativeScript/nativescript-cli/issues/3701) +* remove ns preview note on project creation ([db53037](https://github.com/NativeScript/nativescript-cli/commit/db53037fbeffe739db95766681e4afad98681816)) +* windows path issue ([fa90b60](https://github.com/NativeScript/nativescript-cli/commit/fa90b60e0cbc30b633db6d94e69e71ad9dad0266)) +* **migrate:** nativescript-unit-test-runner & missing basePath ([#5537](https://github.com/NativeScript/nativescript-cli/issues/5537)) ([0be8aca](https://github.com/NativeScript/nativescript-cli/commit/0be8acab10792d031471d4f0d613547b4e91a3ad)) +* **typings:** spawn to work with Windows as well ([d6e431e](https://github.com/NativeScript/nativescript-cli/commit/d6e431e3a65f4b960d12caf124b7179eafcfa02b)) + + +### Features + +* add `--config` option ([#5554](https://github.com/NativeScript/nativescript-cli/issues/5554)) ([9f844ea](https://github.com/NativeScript/nativescript-cli/commit/9f844ea59140801fb7c83886a7ecb31ddd63e3e6)) +* **livesync:** support livesync in remote machine ([#5560](https://github.com/NativeScript/nativescript-cli/issues/5560)) ([4e94ad4](https://github.com/NativeScript/nativescript-cli/commit/4e94ad44945ce4490fad3e558f0ed55ef429310c)) +* **plugins:** allow plugins to use kotlin files ([#5555](https://github.com/NativeScript/nativescript-cli/issues/5555)) ([37e2dbb](https://github.com/NativeScript/nativescript-cli/commit/37e2dbb92b0ea6876f2281cbd9ff850d7700a551)) +* allow passing cli args when running in the iOS Simulator ([#5518](https://github.com/NativeScript/nativescript-cli/issues/5518)) ([6b700b4](https://github.com/NativeScript/nativescript-cli/commit/6b700b4090b181db0d0dc627573bb9b90750f61a)) +* allow tests to run on monorepos ([#5547](https://github.com/NativeScript/nativescript-cli/issues/5547)) ([bfa8e91](https://github.com/NativeScript/nativescript-cli/commit/bfa8e91de63206b15b0408c7cf4dd9ae0fedff13)) +* default template version based on cli major ([#5517](https://github.com/NativeScript/nativescript-cli/issues/5517)) ([2f1d876](https://github.com/NativeScript/nativescript-cli/commit/2f1d876c9008f18f19a9a130f28296ea5910fa0d)) +* ignoring native dependencies ([#5524](https://github.com/NativeScript/nativescript-cli/issues/5524)) ([6ba5cd6](https://github.com/NativeScript/nativescript-cli/commit/6ba5cd6d79d9e88dcb66e7d6c7defba2d41ec601)) +* ns typings command ([#5551](https://github.com/NativeScript/nativescript-cli/issues/5551)) ([4703cef](https://github.com/NativeScript/nativescript-cli/commit/4703cef32b779bb195429c459f7efb00a5ce7806)) + + +### Performance Improvements + +* remove duplicate plugins data ([#5563](https://github.com/NativeScript/nativescript-cli/issues/5563)) ([7d80902](https://github.com/NativeScript/nativescript-cli/commit/7d80902161e24ae92d0459620bdaa46077d1ffde)) + + + +## [8.0.2](https://github.com/NativeScript/nativescript-cli/compare/v8.0.1...v8.0.2) (2021-05-11) + + +### Bug Fixes + +* test init and karma conf for 8.0 with webpack5 ([#5528](https://github.com/NativeScript/nativescript-cli/issues/5528)) ([03d68d6](https://github.com/NativeScript/nativescript-cli/commit/03d68d6572f896c9cba6b95cb1bf204ce27bfc2b)) + + +### Features + +* --env.sourceMap custom values ([f32773d](https://github.com/NativeScript/nativescript-cli/commit/f32773db5899e3133395f1e27f82cead27c0a7b3)) + + + +## [8.0.1](https://github.com/NativeScript/nativescript-cli/compare/v8.0.0...v8.0.1) (2021-04-01) + + +### Bug Fixes + +* compat message updates ([7c475e6](https://github.com/NativeScript/nativescript-cli/commit/7c475e6de9c11e0cf428ee83390db0db89bf4249)) +* empty main fields during migrate ([7403e4d](https://github.com/NativeScript/nativescript-cli/commit/7403e4d16343df110d32d02653c188b8ac67978b)) + + +### Features + +* enable ESLint plugin in migrate ([d8537fa](https://github.com/NativeScript/nativescript-cli/commit/d8537faa1cc21f2fb6665aa2c136d129c589363a)) +* handle --env flags ([23fe6a3](https://github.com/NativeScript/nativescript-cli/commit/23fe6a3cc9b8f7624fffeb0be39301ebcc234291)) + + + +# [8.0.0](https://github.com/NativeScript/nativescript-cli/compare/v7.2.1...v8.0.0) (2021-03-31) + + +### Bug Fixes + +* handle caret and tilde in runtime versions ([#5501](https://github.com/NativeScript/nativescript-cli/issues/5501)) ([04eba0d](https://github.com/NativeScript/nativescript-cli/commit/04eba0deb50637a6402ee2bfb14243aad597ce0f)) + + +### Features + +* ns8 ([#5508](https://github.com/NativeScript/nativescript-cli/issues/5508)) ([10a2d2e](https://github.com/NativeScript/nativescript-cli/commit/10a2d2e3b4b6a6856b1f1898dbf9b180c0dd649b)) +* platform specific doctor ([#5505](https://github.com/NativeScript/nativescript-cli/issues/5505)) ([ff04446](https://github.com/NativeScript/nativescript-cli/commit/ff04446906f8d2b16d3d92e40ce2e97dc3aa98eb)) + + + +## [7.2.1](https://github.com/NativeScript/nativescript-cli/compare/v7.2.0...v7.2.1) (2021-03-11) + + +### Bug Fixes + +* npm7 peerDependecies ([5e2688f](https://github.com/NativeScript/nativescript-cli/commit/5e2688fd38dae9cd293e08afaa67018dc0d271c2)) +* ns update default to latest version ([#5497](https://github.com/NativeScript/nativescript-cli/issues/5497)) ([04202dc](https://github.com/NativeScript/nativescript-cli/commit/04202dcb8f828939205ccf58fb8121304e21d61a)) + + + +# [7.2.0](https://github.com/NativeScript/nativescript-cli/compare/v7.1.2...v7.2.0) (2021-02-05) + + +### Bug Fixes + +* default appPath in new projects ([#5466](https://github.com/NativeScript/nativescript-cli/issues/5466)) ([0675896](https://github.com/NativeScript/nativescript-cli/commit/0675896bf86327092b08377e9523c7be0fdc1332)) +* handle permissions error on directory creation ([#5480](https://github.com/NativeScript/nativescript-cli/issues/5480)) ([58e833d](https://github.com/NativeScript/nativescript-cli/commit/58e833d64787bbd29b3792b7550e8923ed141f52)) +* tgz runtime resolution ([101bfae](https://github.com/NativeScript/nativescript-cli/commit/101bfae8279f81912512fd6ac7839e033e41f8e5)) +* update setup requirements link ([#5459](https://github.com/NativeScript/nativescript-cli/issues/5459)) ([c8447cd](https://github.com/NativeScript/nativescript-cli/commit/c8447cdda5bc5c56a4021798ffe7cdfaedd8ebb7)) + + +### Features + +* -v checking for updates ([#5461](https://github.com/NativeScript/nativescript-cli/issues/5461)) ([2d6683c](https://github.com/NativeScript/nativescript-cli/commit/2d6683c984a032f631dc80bc935393ac347a4baa)) +* initialize git repo on project create ([#5468](https://github.com/NativeScript/nativescript-cli/issues/5468)) ([9f78c15](https://github.com/NativeScript/nativescript-cli/commit/9f78c15d031931d557dc7cfcf0561ce88eeac2ff)) +* warn invalid platform folders ([#5463](https://github.com/NativeScript/nativescript-cli/issues/5463)) ([fde4403](https://github.com/NativeScript/nativescript-cli/commit/fde440342f2b2205982506891533f58db5418e64)) + + +### Performance Improvements + +* initialize project data only if uninitialized ([#5478](https://github.com/NativeScript/nativescript-cli/issues/5478)) ([27c2f0c](https://github.com/NativeScript/nativescript-cli/commit/27c2f0cdfd1ea0a662e66551b86a3d8e4f630395)) +* validate update version before backup ([#5479](https://github.com/NativeScript/nativescript-cli/issues/5479)) ([d312f14](https://github.com/NativeScript/nativescript-cli/commit/d312f14e819ac5194eab9a7e5c7a19a980ed3fe4)) + + + +## [7.1.2](https://github.com/NativeScript/nativescript-cli/compare/v7.1.1...v7.1.2) (2021-01-04) + + +### Bug Fixes + +* prompter returning undefined instead of value ([#5457](https://github.com/NativeScript/nativescript-cli/issues/5457)) ([4cc4bca](https://github.com/NativeScript/nativescript-cli/commit/4cc4bcac62abbe328ddc9abb4816f0ed733c5269)) + + + +## [7.1.1](https://github.com/NativeScript/nativescript-cli/compare/v7.1.0...v7.1.1) (2020-12-30) + + +### Bug Fixes + +* prompter returning index instead of value ([c1d5a27](https://github.com/NativeScript/nativescript-cli/commit/c1d5a271a0b689d1e734e55363dbc55015ef102a)) + + + +# [7.1.0](https://github.com/NativeScript/nativescript-cli/compare/v7.0.12...v7.1.0) (2020-12-29) + + +### Features + +* **logs:** support external sourcemaps from `.map` files ([#5434](https://github.com/NativeScript/nativescript-cli/issues/5434)) ([de678cf](https://github.com/NativeScript/nativescript-cli/commit/de678cff9f9478f8f7960fc412984cc3d1921898)) +* fonts command ([#5452](https://github.com/NativeScript/nativescript-cli/issues/5452)) ([a6b0e3c](https://github.com/NativeScript/nativescript-cli/commit/a6b0e3cce55c6c7b6cecfffb9b9f231d48c5820b)) +* vue-ts-template ([#5453](https://github.com/NativeScript/nativescript-cli/issues/5453)) ([7cdaed7](https://github.com/NativeScript/nativescript-cli/commit/7cdaed74dba0d8c171fa43ae1597f803ed83cd73)) + + + +## [7.0.12](https://github.com/NativeScript/nativescript-cli/compare/v7.0.11...v7.0.12) (2020-12-19) + + +### Bug Fixes + +* Big Sur - iTunes is not installed ([799bb76](https://github.com/NativeScript/nativescript-cli/commit/799bb76aec76f6595d744614719f57a863d557aa)), closes [#5342](https://github.com/NativeScript/nativescript-cli/issues/5342) +* CFBundleName cannot be changed ([#5427](https://github.com/NativeScript/nativescript-cli/issues/5427)) ([ca32dc2](https://github.com/NativeScript/nativescript-cli/commit/ca32dc2f6b46b93be9df8d216a7d8ecbee200f1e)) +* ns update version null ([#5441](https://github.com/NativeScript/nativescript-cli/issues/5441)) ([6de0c3e](https://github.com/NativeScript/nativescript-cli/commit/6de0c3e513da0b91f4deef84748417a842c4bbf0)), closes [#5440](https://github.com/NativeScript/nativescript-cli/issues/5440) +* remove iTunesValidator ([#5439](https://github.com/NativeScript/nativescript-cli/issues/5439)) ([6b3da6e](https://github.com/NativeScript/nativescript-cli/commit/6b3da6e3c84bd2bfb69f26041866736e7208fb83)) + + +### Performance Improvements + +* use prompts instead of inquirer ([#5443](https://github.com/NativeScript/nativescript-cli/issues/5443)) ([ab24ece](https://github.com/NativeScript/nativescript-cli/commit/ab24ece0aaf5ad38b574c52bdd753728a1b6d72b)) + + + +## [7.0.11](https://github.com/NativeScript/nativescript-cli/compare/v7.0.10...v7.0.11) (2020-10-21) + + +### Bug Fixes + +* **plugin-build:** invalid path argument ([1fc3893](https://github.com/NativeScript/nativescript-cli/commit/1fc3893e5bff66816d195d28aeafa01f2649ba5d)), closes [#5387](https://github.com/NativeScript/nativescript-cli/issues/5387) +* asset generation alpha value ([#5420](https://github.com/NativeScript/nativescript-cli/issues/5420)) ([becbe60](https://github.com/NativeScript/nativescript-cli/commit/becbe6076ae2ad2bdd56a1bc6c5ee9b538240d04)) + + +### Features + +* add svelte support ([#5418](https://github.com/NativeScript/nativescript-cli/issues/5418)) ([08a0d91](https://github.com/NativeScript/nativescript-cli/commit/08a0d91775e9504410fb898c34fa7c6b8d514a2a)) +* migration rules for svelte-native ([#5372](https://github.com/NativeScript/nativescript-cli/issues/5372)) ([c5db5fe](https://github.com/NativeScript/nativescript-cli/commit/c5db5feff0069e8ae82bbfe0e770fe6c70ee42bc)) + + + +## [7.0.10](https://github.com/NativeScript/nativescript-cli/compare/7.0.9...7.0.10) (2020-10-03) + + +### Bug Fixes + +* **ios:** remove VALID_ARCHS from cocoapods for xcode 12 ([#5407](https://github.com/NativeScript/nativescript-cli/issues/5407)) ([03ecac9](https://github.com/NativeScript/nativescript-cli/commit/03ecac9dcde06f361f59ae990139906dc96a45f0)) + + + +## [7.0.9](https://github.com/NativeScript/nativescript-cli/compare/v7.0.9-rc.2...v7.0.9) (2020-10-03) + + +### Bug Fixes + +* exclude unsupported architectures from cocoapods ([#5405](https://github.com/NativeScript/nativescript-cli/issues/5405)) ([e866d70](https://github.com/NativeScript/nativescript-cli/commit/e866d709b8518161db4166d3ba0fe7c65e505d36)) +* platform sometimes not in lower case ([#5406](https://github.com/NativeScript/nativescript-cli/issues/5406)) ([21f48ab](https://github.com/NativeScript/nativescript-cli/commit/21f48abaa0a16363867f0715e3166f84479bdad8)), closes [#5391](https://github.com/NativeScript/nativescript-cli/issues/5391) + + +### Features + +* config manipulation commands ([#5402](https://github.com/NativeScript/nativescript-cli/issues/5402)) ([25410b7](https://github.com/NativeScript/nativescript-cli/commit/25410b74a411bfa04d0aa968d47e2bd5a3c2cd1a)) + + + +## [7.0.8](https://github.com/NativeScript/nativescript-cli/compare/v7.0.7...v7.0.8) (2020-09-12) + + +### Bug Fixes + +* **migrate:** filter out keys from invalid nested package.json ([685d3c9](https://github.com/NativeScript/nativescript-cli/commit/685d3c9d67eea93ac919d799c999354d83032412)) +* try use emitted packagejson's main field ([9641bea](https://github.com/NativeScript/nativescript-cli/commit/9641bea992e05978dbb64d28dc7d60bf14ea2f76)) + + + +## [7.0.7](https://github.com/NativeScript/nativescript-cli/compare/v7.0.6...v7.0.7) (2020-09-09) + + +### Bug Fixes + +* platform clean not adding the platform back ([#5383](https://github.com/NativeScript/nativescript-cli/issues/5383)) ([daea022](https://github.com/NativeScript/nativescript-cli/commit/daea022875c996e1d521238d6587c2e45a1f8336)), closes [#5365](https://github.com/NativeScript/nativescript-cli/issues/5365) +* **doctor:** cannot read property 'filter' of null ([#5374](https://github.com/NativeScript/nativescript-cli/issues/5374)) ([dd09547](https://github.com/NativeScript/nativescript-cli/commit/dd095473daca8436979e8dd95d87f69c1fbf5f9c)), closes [#5366](https://github.com/NativeScript/nativescript-cli/issues/5366) + + +### Features + +* clean up legacy nsconfig if created for bw compat ([#5380](https://github.com/NativeScript/nativescript-cli/issues/5380)) ([233091b](https://github.com/NativeScript/nativescript-cli/commit/233091b2d33447b9e5b060c05d19dcb95c9f7431)) +* migrate tsconfig.json for ns7 projects ([#5378](https://github.com/NativeScript/nativescript-cli/issues/5378)) ([8491b07](https://github.com/NativeScript/nativescript-cli/commit/8491b072210bf6db4007d7737ae0d875624c5147)) +* pass current CLI public lib path to webpack env ([#5381](https://github.com/NativeScript/nativescript-cli/issues/5381)) ([6f91984](https://github.com/NativeScript/nativescript-cli/commit/6f91984c90ac65786e5679cadf98341cccabb84e)) + + + +## [7.0.6](https://github.com/NativeScript/nativescript-cli/compare/v7.0.5...v7.0.6) (2020-09-04) + +### Bug Fixes + +* Forced gradle scripts to LF instead of CRLF + +## [7.0.5](https://github.com/NativeScript/nativescript-cli/compare/v7.0.4...v7.0.5) (2020-09-04) + + +### Bug Fixes + +* account for platform specific ids from package.json ([6f64d20](https://github.com/NativeScript/nativescript-cli/commit/6f64d20e149a3e6899f84dc257ed7db7fbe41aef)) +* app id migration when using separate ids ([06e238f](https://github.com/NativeScript/nativescript-cli/commit/06e238f175c4b5edaffa04d8f73f96fddcf0550c)) +* missing gradle properties option useAndroidX ([#5369](https://github.com/NativeScript/nativescript-cli/issues/5369)) ([d0916ce](https://github.com/NativeScript/nativescript-cli/commit/d0916cebdb88a22a85c883225ed189f5479f6d78)) +* pnpm support for installing dev deps ([d863107](https://github.com/NativeScript/nativescript-cli/commit/d863107e7211899e4cdfc71986051ede63c3f464)) + + +### Features + +* improved migrations ([b5f66d9](https://github.com/NativeScript/nativescript-cli/commit/b5f66d9ca9de24921d7b0340d5fdf9efebf1f1e9)) + + +## [7.0.4](https://github.com/NativeScript/nativescript-cli/compare/v7.0.3...v7.0.4) (2020-09-04) + + +### Bug Fixes + +* various fixes ([f796781](https://github.com/NativeScript/nativescript-cli/commit/f79678120f93c723fe04699d5b545266e824598c)) + + + +## [7.0.3](https://github.com/NativeScript/nativescript-cli/compare/v7.0.2...v7.0.3) (2020-09-04) + + +### Bug Fixes + +* ENOENT reading from non existent nativescript.config.js ([e063be9](https://github.com/NativeScript/nativescript-cli/commit/e063be964ae98df557f8615947dc58bf783cd41d)) + + +### Features + +* improved migrations for app path and resource paths ([d1729cf](https://github.com/NativeScript/nativescript-cli/commit/d1729cfee78c2e2b0d183651acf67faddf8ed27c)) + + + +## [7.0.2](https://github.com/NativeScript/nativescript-cli/compare/v7.0.1...v7.0.2) (2020-09-04) + + +### Bug Fixes + +* --help ([419ecda](https://github.com/NativeScript/nativescript-cli/commit/419ecdae3428bff0d4da0ad7c6a14cfb48af567b)) +* project detection ([95812b8](https://github.com/NativeScript/nativescript-cli/commit/95812b8203a01312aa33e6143e6316775b271d58)) +* update should update runtime versions ([5e15627](https://github.com/NativeScript/nativescript-cli/commit/5e15627be81f164444b0525dbd0a322185b46d6d)) + + +### Features + +* auto format config after change with prettier + detect user prettier config ([b882ac8](https://github.com/NativeScript/nativescript-cli/commit/b882ac871278eb6155be48eeeffe281d8be7970a)) + + + +## [7.0.1](https://github.com/NativeScript/nativescript-cli/compare/v7.0.0...v7.0.1) (2020-09-04) + + +### Bug Fixes + +* version format to use v instead of @ ([3fca107](https://github.com/NativeScript/nativescript-cli/commit/3fca107b31d914d307565ea39e8e01533af7eadb)) + + + +# [7.0.0](https://github.com/NativeScript/nativescript-cli/compare/v6.7.8...v7.0.0) (2020-09-04) + + +### Bug Fixes + +* broken test due to missing dependency ([21839ff](https://github.com/NativeScript/nativescript-cli/commit/21839ff106ca0977e737ae0bc0a1c6aa1176e03e)) +* failing tests ([82f5c5a](https://github.com/NativeScript/nativescript-cli/commit/82f5c5a3e71932d0426cad46f7f34fcd693c06f1)) +* failing tests + config service stub ([aea3714](https://github.com/NativeScript/nativescript-cli/commit/aea37144535fc79a07a3ff17e9ad841a88a270a3)) +* global Error extension and Function injection ([ed5b8d3](https://github.com/NativeScript/nativescript-cli/commit/ed5b8d32583573cf85301ce9e10fb80ae3d9a325)) +* plugin service tests and config reading ([aaee65e](https://github.com/NativeScript/nativescript-cli/commit/aaee65e1274bccd414d3821d4155962f8ba0ea2c)) +* properly resolve bundle id ([6d97a5f](https://github.com/NativeScript/nativescript-cli/commit/6d97a5f5f28d86b163ebae20b03e8a0bd104eeab)) +* runtime name/version parse ([2cda1e6](https://github.com/NativeScript/nativescript-cli/commit/2cda1e64c58d582821a05cf2bb01a980304bdc70)) +* scoped runtimes, project detection, frameworkPath ([8805f1e](https://github.com/NativeScript/nativescript-cli/commit/8805f1ecf7da83483d26a66ac8fe367950cee7b4)) +* unit-tests ([092f3f4](https://github.com/NativeScript/nativescript-cli/commit/092f3f4a4411a414d3c67d033c45f9ac16ed3426)) +* update runtime package.json when config changes ([299c1f5](https://github.com/NativeScript/nativescript-cli/commit/299c1f561956cf51d284faf5a754e69df7327ad0)) + + +### Features + +* add 'ns' alias ([b0acd67](https://github.com/NativeScript/nativescript-cli/commit/b0acd6749826d0bca6460970469ef6b279e6e3b5)) +* add 'nsc' alias ([c8c2d94](https://github.com/NativeScript/nativescript-cli/commit/c8c2d94783085c485743123a8a86285886b5b36c)) +* config file handling ([011b02b](https://github.com/NativeScript/nativescript-cli/commit/011b02b59f2b4a9fe9fa78efd1d703c28ac9cb6a)) +* config manipulation ([90ac914](https://github.com/NativeScript/nativescript-cli/commit/90ac9147064e9fbc94d06c7e9390b67ab3506626)) +* passing appPath and appResourcesPath through gradle args ([e915a93](https://github.com/NativeScript/nativescript-cli/commit/e915a93cda7418d8f7c2b82f58f7930897db28bc)) +* use scoped app templates and fix create project appid ([e0f8f0f](https://github.com/NativeScript/nativescript-cli/commit/e0f8f0fcfadcecc66441b6c79d5561a482b5cd04)) +* **webpack:** use scoped @nativescript/webpack ([8307d78](https://github.com/NativeScript/nativescript-cli/commit/8307d78a1fe7954709ec9bf1dcfcabd68cc832e5)) + + + +## [6.7.8](https://github.com/NativeScript/nativescript-cli/compare/v6.7.7...v6.7.8) (2020-06-27) + + +### Bug Fixes + +* **react:** tns options ([1ad7bda](https://github.com/NativeScript/nativescript-cli/commit/1ad7bdad9cf1de588293288d18aa6b88c4f6ef94)) + + + +## [6.7.7](https://github.com/NativeScript/nativescript-cli/compare/v6.7.6...v6.7.7) (2020-06-27) + + +### Features + +* **react:** official quick create for --react app ([#5336](https://github.com/NativeScript/nativescript-cli/issues/5336)) ([5d3f3a4](https://github.com/NativeScript/nativescript-cli/commit/5d3f3a4336e6aeb6b2fc78b19ace1c9eea51ae20)) + + + +## [6.7.5](https://github.com/NativeScript/nativescript-cli/compare/v6.7.4...v6.7.5) (2020-06-25) + + +### Features + +* **android:** doctor support for android 30 ([#5332](https://github.com/NativeScript/nativescript-cli/issues/5332)) ([c5930e4](https://github.com/NativeScript/nativescript-cli/commit/c5930e41562d49d004edc28a88c6d192c59288c9)) + + + +## [6.7.4](https://github.com/NativeScript/nativescript-cli/compare/v6.7.0...v6.7.4) (2020-05-30) + + +### Bug Fixes + +* **chrome:** new debug url with chrome ([#5319](https://github.com/NativeScript/nativescript-cli/issues/5319)) ([788ac88](https://github.com/NativeScript/nativescript-cli/commit/788ac8895981eb8a60d117effa73e4dd8e115a16)) +* **node:** full node 14 support ([4c005ca](https://github.com/NativeScript/nativescript-cli/commit/4c005caf2731d1ba489aa6a854bca3d3d5d7e154)) + + + +# [6.7.0](https://github.com/NativeScript/nativescript-cli/compare/v6.5.1...v6.7.0) (2020-05-30) + + +### Features + +* **android:** allow modifying gradlew args in hooks ([#5301](https://github.com/NativeScript/nativescript-cli/issues/5301)) ([6684a3e](https://github.com/NativeScript/nativescript-cli/commit/6684a3e80d56cf6bb89a0250b5c28ae790e860f4)) +* **node:** version 14 support ([#5316](https://github.com/NativeScript/nativescript-cli/issues/5316)) ([5414b77](https://github.com/NativeScript/nativescript-cli/commit/5414b77b7981bbf109d521a2c9ae7573fe69ab12)) + + + NativeScript CLI Changelog ================ + +6.5.0 (2020, May 22) +=== + +### New + +* [Implemented #5255](https://github.com/NativeScript/nativescript-cli/issues/5255): Warn if the CLI might print sensitive data to the output + +### Fixed + +* [Fixed #5259](https://github.com/NativeScript/nativescript-cli/issues/5259): Unable to use pnpm on macOS and Linux +* [Fixed #5260](https://github.com/NativeScript/nativescript-cli/issues/5260): `tns package-manager set invalid_value` does not say pnpm is supported +* [Fixed #5261](https://github.com/NativeScript/nativescript-cli/issues/5261): `tns package-manager set ` does not give any output +* [Fixed #5262](https://github.com/NativeScript/nativescript-cli/issues/5262): `tns package-manager` fails with error +* [Fixed #5263](https://github.com/NativeScript/nativescript-cli/issues/5263): `tns package-manager` docs does not list pnpm as supported value +* [Fixed #5264](https://github.com/NativeScript/nativescript-cli/issues/5264): `tns package-manager --help` fails with error + + +6.4.1 (2020, February 25) +=== + +### Fixed + +* [Fixed #5236](https://github.com/NativeScript/nativescript-cli/issues/5236): File paths from device logs are not clickable +* [Fixed #5251](https://github.com/NativeScript/nativescript-cli/issues/5251): External files are not livesynced +* [Fixed #5252](https://github.com/NativeScript/nativescript-cli/issues/5252): Logs from platform specific files point to incorrect file + + +6.4.0 (2020, February 11) +=== + +### New + +* [Implemented #4654](https://github.com/NativeScript/nativescript-cli/issues/4654): Add support for pkg manager `pnpm` +* [Implemented #5214](https://github.com/NativeScript/nativescript-cli/issues/5214): Same dependencies installed multiple times in `node_modules` cause build failure +* [Implemented #5218](https://github.com/NativeScript/nativescript-cli/issues/5218): Allow configuring path/name to webpack.config.js +* [Implemented #5220](https://github.com/NativeScript/nativescript-cli/issues/5220): Native metadata filtering for iOS and Android +* [Implemented #5230](https://github.com/NativeScript/nativescript-cli/issues/5230): Obsolete support for Xcode 10 +* [Implemented #5233](https://github.com/NativeScript/nativescript-cli/issues/5233): Support command level hooks + +### Fixed + +* [Fixed #5187](https://github.com/NativeScript/nativescript-cli/issues/5187): Inaccessible native source code without modulemap +* [Fixed #5239](https://github.com/NativeScript/nativescript-cli/issues/5239): Temporary files created by CLI are not deleted in some cases +* [Fixed #5242](https://github.com/NativeScript/nativescript-cli/issues/5242): Java 13 is not supported, but doctor does not detect it + + +6.3.3 (2020, January 13) +=== + +### New + +* [Implemented #5205](https://github.com/NativeScript/nativescript-cli/issues/5205): Support build hooks +* [Implemented #5210](https://github.com/NativeScript/nativescript-cli/issues/5210): Support environment check hooks + +### Fixed + +* [Fixed #3818](https://github.com/NativeScript/nativescript-cli/issues/3818): Cannot set property 'socket' of null +* [Fixed #5072](https://github.com/NativeScript/nativescript-cli/issues/5072):`tns update next` doesn't work with CLI 6+ + + +6.3.2 (2020, January 9) +=== + +### Fixed + +* [Fixed #5200](https://github.com/NativeScript/nativescript-cli/issues/5200): api29 emulator is not recognized as latest + + +6.3.1 (2020, January 7) +=== + +### Fixed + +* [Fixed #5192](https://github.com/NativeScript/nativescript-cli/issues/5192): `tns info` command does not work with @nativescript/core + + +6.3.0 (2019, December 17) +=== + +### New + +* [Implemented #5128](https://github.com/NativeScript/nativescript-cli/issues/5128): Support for node v13 +* [Implemented #5155](https://github.com/NativeScript/nativescript-cli/issues/5155): Improve transition from tns preview to tns run +* [Implemented #5180](https://github.com/NativeScript/nativescript-cli/issues/5180): Cache the result of environment checks + +### Fixed + +* [Fixed #4982](https://github.com/NativeScript/nativescript-cli/issues/4982): `tns deploy` does not verify if the project should be migrated +* [Fixed #5069](https://github.com/NativeScript/nativescript-cli/issues/5069): Android API 29 emulator error +* [Fixed #5113](https://github.com/NativeScript/nativescript-cli/issues/5113): tns test init page does not list frameworks properly. +* [Fixed #5115](https://github.com/NativeScript/nativescript-cli/issues/5115): tns update command doesn't work in some plugins' demo apps +* [Fixed #5149](https://github.com/NativeScript/nativescript-cli/issues/5149): `tns update` should handle scoped packages +* [Fixed #5159](https://github.com/NativeScript/nativescript-cli/issues/5159): applyPluginsCocoaPods fails on case sensitive volumes +* [Fixed #5173](https://github.com/NativeScript/nativescript-cli/issues/5173): `--justlaunch` flag enables HMR + +6.2.2 (2019, November 22) +== + +### Fixed +* [Fixed #5126](https://github.com/NativeScript/nativescript-cli/issues/5126): CLI does not generate all icons + +6.2.1 (2019, November 18) +== + +### Fixed +* [Fixed #5120](https://github.com/NativeScript/nativescript-cli/issues/5120): Android resource directories are not prepared correctly +* [Fixed #5105](https://github.com/NativeScript/nativescript-cli/issues/5105): App restarts when changing platform specific scss + +6.2.0 (2019, November 1) +== + +### New +* [Implemented #5038](https://github.com/NativeScript/nativescript-cli/issues/5038): Deprecate support for markingMode:full +* [Implemented #5049](https://github.com/NativeScript/nativescript-cli/issues/5049): Android App Bundle Improvements +* [Implemented #5060](https://github.com/NativeScript/nativescript-cli/issues/5060): Kotlin usage tracking in android builds +* [Implemented #5096](https://github.com/NativeScript/nativescript-cli/issues/5096): Reduce the npm requests when checking if the project should be migrated +* [Implemented #5104](https://github.com/NativeScript/nativescript-cli/pull/5104): Allow tag and range versions in the preview app plugin versions validation +* [Implemented #5107](https://github.com/NativeScript/nativescript-cli/issues/5107): Support V8 Snapshots on Windows + +### Fixed +* [Fixed #3785](https://github.com/NativeScript/nativescript-cli/issues/3785): NativeScript CLI doesn't pause on webpack compilation errors +* [Fixed #4681](https://github.com/NativeScript/nativescript-cli/issues/4681): `tns update ios` is not working +* [Fixed #4963](https://github.com/NativeScript/nativescript-cli/issues/4963): Difference in hookArgs.prepareData.platform on prepare and run command +* [Fixed #4995](https://github.com/NativeScript/nativescript-cli/issues/4995): Building plugin and running demo app fails if plugins has a surrounding gradle build +* [Fixed #5005](https://github.com/NativeScript/nativescript-cli/issues/5005): Apple Watch extension with space in the name of `.entitlements` file is not working +* [Fixed #5020](https://github.com/NativeScript/nativescript-cli/issues/5020): Stuck at "Restarting application on device" on Windows 10, iPad mini 2, compiled with NativeScript Sidekick cloud service. +* [Fixed #5030](https://github.com/NativeScript/nativescript-cli/issues/5030): The `tns devices` command lists appletv as iOS platform +* [Fixed #5034](https://github.com/NativeScript/nativescript-cli/issues/5034): Broken build when passing --i-cloud-container-environment +* [Fixed #5056](https://github.com/NativeScript/nativescript-cli/issues/5056): Unable to process native iOS files and frameworks from scoped packages +* [Fixed #5061](https://github.com/NativeScript/nativescript-cli/issues/5061): Unable to resolve cocoapods version conflicts +* [Fixed #5063](https://github.com/NativeScript/nativescript-cli/issues/5063): Splash Screen asset generation fails for iOS +* [Fixed #5070](https://github.com/NativeScript/nativescript-cli/issues/5070): The `tns test` command cannot work if the source code is not in `src` or `app` folder +* [Fixed #5077](https://github.com/NativeScript/nativescript-cli/pull/5077): Pass allowProvisioningUpdates to xcodebuild only when building for device +* [Fixed #5094](https://github.com/NativeScript/nativescript-cli/issues/5094): Add Theme v2 name to non-extenal modules when starting webpack + +6.1.2 (2019, September 18) +== + +### Fixed +* [Fixed #5018](https://github.com/NativeScript/nativescript-cli/issues/5018): Track runtime versions on add and on build, run, deploy + + +6.1.1 (2019, September 17) +== + +### Fixed + +* [Fixed #5015](https://github.com/NativeScript/nativescript-cli/pull/5015): CLI passes `--preserve-symlinks` to the webpack itself, not to the Node.js +* [Fixed #4893](https://github.com/NativeScript/nativescript-cli/issues/4893): `tns preview` crashes when scanning on devices with different platforms +* [Fixed #4939](https://github.com/NativeScript/nativescript-cli/issues/4939): Xcode 11 warning: `CFBundleIdentifier value must be the same as PRODUCT_BUNDLE_IDENTIFIER` + +6.1.0 (2019, September 04) +== + +### New + +* [Implemented #4229](https://github.com/NativeScript/nativescript-cli/issues/4229): Do not display command usage help after execution is started +* [Implemented #4909](https://github.com/NativeScript/nativescript-cli/issues/4909): Support for Xcode 11 and iOS 13 +* [Implemented #4926](https://github.com/NativeScript/nativescript-cli/issues/4926): Android SDK 29 support +* [Implemented #4947](https://github.com/NativeScript/nativescript-cli/issues/4947): Add tracking for both React NativeScript and Svelte Native projects +* [Implemented #4966](https://github.com/NativeScript/nativescript-cli/issues/4966): Support LiveSync to iOS Wi-Fi devices +* [Implemented #4974](https://github.com/NativeScript/nativescript-cli/issues/4974): Ask the users why they've uninstalled NativeScript CLI +* [Implemented #4976](https://github.com/NativeScript/nativescript-cli/issues/4976): Handle changes in iOS and Android Runtime 6.1.0 logging +* [Implemented #4980](https://github.com/NativeScript/nativescript-cli/issues/4980): Update message for subscribing to NativeScript newsletter +* [Implemented #4992](https://github.com/NativeScript/nativescript-cli/pull/4992): Allow tns to be able to use npm configuration properly + +### Fixed + +* [Fixed #4936](https://github.com/NativeScript/nativescript-cli/issues/4936): HMR not recovering after exception in Angular lazy routes +* [Fixed #4958](https://github.com/NativeScript/nativescript-cli/issues/4958): `tns doctor` fails when setup is not correct and user selects to fix it manually +* [Fixed #4971](https://github.com/NativeScript/nativescript-cli/issues/4971): Not needed checks are executed on `pod install` + +6.0.3 (2019, August 05) +== +* [Fixed #4914](https://github.com/NativeScript/nativescript-cli/issues/4914): livesync not working with command tns test android +* [Fixed #4746](https://github.com/NativeScript/nativescript-cli/issues/4746): Unable to work with `karma-webpack@4.0.2` on test command +* [Fixed #4586](https://github.com/NativeScript/nativescript-cli/issues/4586): publish ios fails because of hsa2 + +6.0.2 (2019, July 22) +== +* [Fixed #4885](https://github.com/NativeScript/nativescript-cli/issues/4885): `migrate` and `update` commands are failing where everything is up-to-date +* [Fixed #4887](https://github.com/NativeScript/nativescript-cli/pull/4887): Include forgotten Angular dependency from the code-sharing apps +* [Fixed #4888](https://github.com/NativeScript/nativescript-cli/pull/4888): Sidekick: multiple errors in Sidekick + +6.0.1 (2019, July 18) +== +* [Fixed #4814](https://github.com/NativeScript/nativescript-cli/issues/4814): Missing `yargs-parser` dependency +* [Fixed #4846](https://github.com/NativeScript/nativescript-cli/issues/4846): Xcode running on devices crashes with error `Unable to create file *.hot-update.json` +* [Fixed #4871](https://github.com/NativeScript/nativescript-cli/pull/4871): Issues when stopping the LiveSync process +* [Fixed #4872](https://github.com/NativeScript/nativescript-cli/pull/4872): Sidekick: debug operation fails on iOS when Developer Disk Image is not installed on device +* [Fixed #4873](https://github.com/NativeScript/nativescript-cli/issues/4873): `tns migrate` should update `nativescript-vue-template-compiler` +* [Fixed #4874](https://github.com/NativeScript/nativescript-cli/issues/4874): After `tns migrate` preview/build/run commands fail with `ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.3.0 but 3.4.5 was found instead.` +* [Fixed #4876](https://github.com/NativeScript/nativescript-cli/issues/4876):`tns migrate` does not update @ngtools/webpack +* [Fixed #4878](https://github.com/NativeScript/nativescript-cli/issues/4878): `tns migrate` does not update @angular/animations +* [Fixed #4879](https://github.com/NativeScript/nativescript-cli/issues/4879): `--platform-template` option is still shown in CLI's help + +6.0.0 (2019, July 17) +== + +### Breaking changes + +* Applications can be build only with bundle workflow - in previous versions there were two ways to build your application - `bundle` and `legacy` workflow. With this release CLI allows building your app only in case you are using the bundle workflow. More information is available [in this blopost](https://www.nativescript.org/blog/the-future-of-building-nativescript-apps) +* With older CLI versions you were able to run `tns debug android` and continue debugging after the command exits. In this release, when CLI exits, it clears all used resources, so you will not be able to continue the debug session. More information is available in [this issue](https://github.com/NativeScript/nativescript-cli/issues/4219) for more information. +* `--syncAllFiles` option is not supported anymore - this option was added to force CLI to watch all files in `node_modules`. In 6.0 this is the default and only behavior - webpack watches all required files and CLI watches the `platforms` directories and `package.json` files of the plugins added as dependencies of the application. +* Drop support for Xcode versions below 10 - new features for iOS require the latest Xcode versions, so we decided to require at least Xcode 10 for building the applications +* Drop support for Node.js below 8 - Node.js 8 does not support [these version anymore](https://github.com/nodejs/Release) and so does our CLI. In case you are using such Node.js version, CLI will not allow you to execute any command, so you should upgrade to latest LTS version. +* `--platformTemplate` option has been deleted. More information can be found in [this issue](https://github.com/NativeScript/nativescript-cli/issues/4867). +* `tns init` command has been deleted +* `tns clean app` command has been deleted +* Improved plugin development workflow may require changes in your daily work when creating plugins. More information can be found in [this issue](https://github.com/NativeScript/nativescript-cli/issues/4865) +* When you pass `--release`, CLI will switch webpack in production mode. More information can be found in [this issue](https://github.com/NativeScript/nativescript-cli/issues/4497) +* CLI now forces sourceMap generation by default when building in debug mode. You can disable them by passing `--env.sourceMap false`. souceMaps are disabled by default in release builds, you can enable them by passing `--env.sourceMap`. + +### New +* [Implemented #2368](https://github.com/NativeScript/nativescript-cli/issues/2368): Compiling in other path (dist), no in same path (src/app) +* [Implemented #2417](https://github.com/NativeScript/nativescript-cli/issues/2417): Show TypeScript line numbers in stack traces +* [Implemented #2776](https://github.com/NativeScript/nativescript-cli/issues/2776): Add ability to ignore files from final package when build in release +* [Implemented #3378](https://github.com/NativeScript/nativescript-cli/issues/3378): Running app with locally installed plugin should transpile the plugin's TypeScript files +* [Implemented #4497](https://github.com/NativeScript/nativescript-cli/issues/4497): Ability to detect within webpack if app is being built for release +* [Implemented #4604](https://github.com/NativeScript/nativescript-cli/issues/4604): Logs and errors from devices always point to bundle/vendor files +* [Implemented #4646](https://github.com/NativeScript/nativescript-cli/issues/4646): Introduce command (`tns migrate`) to migrate old project to 6.0.0 requirements +* [Implemented #4648](https://github.com/NativeScript/nativescript-cli/issues/4648): Drop support for Node.js < 8 +* [Implemented #4649](https://github.com/NativeScript/nativescript-cli/issues/4649): Deprecate support for Node.js < 10 +* [Implemented #4650](https://github.com/NativeScript/nativescript-cli/issues/4650): Add official support for Node.js 12 +* [Implemented #4651](https://github.com/NativeScript/nativescript-cli/issues/4651): Add drawer navigation prompt when vue flavor is selected on `tns create` +* [Implemented #4667](https://github.com/NativeScript/nativescript-cli/issues/4667): Support yarn hoisted packages in a workspace context +* [Implemented #4692](https://github.com/NativeScript/nativescript-cli/issues/4692): CLI should watch package.json files in the application +* [Implemented #4731](https://github.com/NativeScript/nativescript-cli/issues/4731): Drop support for Xcode < 10 +* [Implemented #4863](https://github.com/NativeScript/nativescript-cli/issues/4863): Delete `tns init` command +* [Implemented #4863](https://github.com/NativeScript/nativescript-cli/issues/4863): Delete `tns clean app` command +* [Implemented #4865](https://github.com/NativeScript/nativescript-cli/issues/4865): Improve plugin development workflow +* [Implemented #4867](https://github.com/NativeScript/nativescript-cli/issues/4867): Delete `--platformTemplate` option + +### Fixed +* [Fixed #2739](https://github.com/NativeScript/nativescript-cli/issues/2739): Unit test runner do not work in --watch mode +* [Fixed #2963](https://github.com/NativeScript/nativescript-cli/issues/2963): Confusing messages on preparing plugin +* [Fixed #3028](https://github.com/NativeScript/nativescript-cli/issues/3028): Local dependency brakes build +* [Fixed #3146](https://github.com/NativeScript/nativescript-cli/issues/3146): `tns run ios` shows "No reachable hosts" after running unit tests +* [Fixed #3351](https://github.com/NativeScript/nativescript-cli/issues/3351): If you delete the whole css data or the css file itself the changes are not going to be applied to the app +* [Fixed #3546](https://github.com/NativeScript/nativescript-cli/issues/3546): Your project have installed babel-traverse version null but Android platform requires version ^6.4.5 +* [Fixed #3568](https://github.com/NativeScript/nativescript-cli/issues/3568): EXPORT FAILED fse.node has conflicting provisioning settings +* [Fixed #3630](https://github.com/NativeScript/nativescript-cli/issues/3630): cp: copyFileSync: could not write to dest file (code=EPERM) +* [Fixed #3767](https://github.com/NativeScript/nativescript-cli/issues/3767): Exception when delete a file from `/platforms/android` +* [Fixed #3849](https://github.com/NativeScript/nativescript-cli/issues/3849): The livesync check if a file has modifications doesn't work as expected +* [Fixed #4219](https://github.com/NativeScript/nativescript-cli/issues/4219): Android debugging is leaking the debug session +* [Fixed #4239](https://github.com/NativeScript/nativescript-cli/issues/4239): Copy `App_Resources` directly to `platforms/.../res` (Android) or `platforms/.../Resources` (iOS) instead of copying them with Webpack +* [Fixed #4264 ](https://github.com/NativeScript/nativescript-cli/issues/4264 ): When using `--syncAllFiles` on Android frequently crashes with error +* [Fixed #4480](https://github.com/NativeScript/nativescript-cli/issues/4480): [TypeScript & Vue project] When using `--bundle` changes made to a platform specific file in `node_modules` does not start a new build process +* [Fixed #4500](https://github.com/NativeScript/nativescript-cli/issues/4500): Changes to `.js` files located in `node_modules` causes the `livesync` to take upto 30 sec +* [Fixed #4513](https://github.com/NativeScript/nativescript-cli/issues/4513): Error when building for Android and using `bcryptjs` +* [Fixed #4607](https://github.com/NativeScript/nativescript-cli/issues/4607): Image replacement is not respected during tns run with hmr +* [Fixed #4647](https://github.com/NativeScript/nativescript-cli/issues/4647): CLI's checkForChanges method should not check all `node_modules` +* [Fixed #4658](https://github.com/NativeScript/nativescript-cli/issues/4658): [iOS] tns preview is including tns-core-modules in vendor.js +* [Fixed #4770](https://github.com/NativeScript/nativescript-cli/issues/4770): Incorrect execution of hooks where there is unresolved injected dependency + + +5.4.2 (2019, June 19) +== + +### Fixed +* [Fixed #4732](https://github.com/NativeScript/nativescript-cli/pull/4732): HMR does not work with `tns cloud run ios ...` on Windows + + +5.4.1 (2019, June 17) +== + +### Fixed +* [Fixed #4226](https://github.com/NativeScript/nativescript-cli/issues/4226): Slowly attaching to debugger on real iOS device with bundle +* [Fixed #4584](https://github.com/NativeScript/nativescript-cli/issues/4584): Invalid App Store Icon Error, while uploading an iOS app with CLI generated icons +* [Fixed #4608](https://github.com/NativeScript/nativescript-cli/issues/4608): Misleading message for min runtime version +* [Fixed #4664](https://github.com/NativeScript/nativescript-cli/pull/4664): `tns cloud run...` command does not respect useLegacyWorkflow flag +* [Fixed #4665](https://github.com/NativeScript/nativescript-cli/issues/4665): Incorrect error is shown when unsupported Node.js version is used +* [Fixed #4664](https://github.com/NativeScript/nativescript-cli/pull/4679): `$logger` fails to print null objects +* [Fixed #4665](https://github.com/NativeScript/nativescript-cli/issues/4701): Deprecate support for `tns init` command + + +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) +== + +### Implemented +* [Implemented #3965](https://github.com/NativeScript/nativescript-cli/issues/3965): [Beta] Support for iOS app extensions +* [Implemented #4389](https://github.com/NativeScript/nativescript-cli/issues/4389): Provide a way to use Hot Module Replacement (`--hmr`) by default for a project +* [Implemented #4392](https://github.com/NativeScript/nativescript-cli/issues/4392): Ability to run unit tests with `--bundle` +* [Implemented #4456](https://github.com/NativeScript/nativescript-cli/issues/4456): Official support for Hot Module Replacement (`--hmr`) + +### Fixed +* [Fixed #4403](https://github.com/NativeScript/nativescript-cli/issues/4403): Exception in iOS app entry point not shown in terminal +* [Fixed #4440](https://github.com/NativeScript/nativescript-cli/issues/4440): `NativeScript can only run in Xcode version 6.0 or greater` error is shown on every iOS command +* [Fixed #4441](https://github.com/NativeScript/nativescript-cli/issues/4441): Nothing happens with app on device if you delete a file with bundle +* [Fixed #4458](https://github.com/NativeScript/nativescript-cli/issues/4458): Warnings for short imports are shown for browser code +* [Fixed #4459](https://github.com/NativeScript/nativescript-cli/pull/4459): API: Raise `debuggerAttached` only if app is restarted during debug + + +5.2.3 (2019, March 12) +== + +### Fixed +* [Fixed #4426](https://github.com/NativeScript/nativescript-cli/pull/4426): Some http requests may stuck and instead of hanging, we should retry them + + +5.2.2 (2019, March 08) +== + +### Fixed +* [Fixed #4390](https://github.com/NativeScript/nativescript-cli/issues/4390): Update and synchronise the unit testing dependencies + + +5.2.1 (2019, March 05) +== +### Implemented +* [Implemented #4375](https://github.com/NativeScript/nativescript-cli/issues/4375): Show warning for deprecated short imports/require used in application + +### Fixed +* [Fixed #3604](https://github.com/NativeScript/nativescript-cli/issues/3604): iOS build breaks with multiple plugins with Podfile +* [Fixed #4301](https://github.com/NativeScript/nativescript-cli/issues/4301): Disconnect previous iOS chrome debuggers when opening a new one +* [Fixed #4354](https://github.com/NativeScript/nativescript-cli/issues/4354): Unable to apply a change when application is not running on device +* [Fixed #4373](https://github.com/NativeScript/nativescript-cli/issues/4373): `tns test` throws an error in newly created apps +* [Fixed #4383](https://github.com/NativeScript/nativescript-cli/issues/4383): `tns doctor` command does not report any information on CircleCI and Travis virtual machines + + +5.2.0 (2018, February 13) +== + +### Implemented +* [Implemented #3807](https://github.com/NativeScript/nativescript-cli/issues/3807): Enable app Podfile +* [Implemented #4243](https://github.com/NativeScript/nativescript-cli/issues/4243): CLI command steps profiling and performance analytics +* [Implemented #4305](https://github.com/NativeScript/nativescript-cli/issues/4305): Add official support for Node.js 11 +* [Implemented #4313](https://github.com/NativeScript/nativescript-cli/issues/4313): Track how many users used {N} CLI and Playground +* [Implemented #4323](https://github.com/NativeScript/nativescript-cli/issues/4323): Skip CLI's postinstall in case it is not installed globally +* [Implemented #4325](https://github.com/NativeScript/nativescript-cli/issues/4325): Angular apps should work with HMR out of the box +* [Implemented #4343](https://github.com/NativeScript/nativescript-cli/issues/4343): Support Objective-C code in App Resources for iOS applications + +### Fixed +* [Fixed #3122](https://github.com/NativeScript/nativescript-cli/issues/3122): `tns debug ios --debug-brk` fails the majority of the time +* [Fixed #3161](https://github.com/NativeScript/nativescript-cli/issues/3161): `tns test` command fails to find a running iOS simulator +* [Fixed #4232](https://github.com/NativeScript/nativescript-cli/issues/4232): Unit testing for freshly created angular project is broken on Android emulator +* [Fixed #4253](https://github.com/NativeScript/nativescript-cli/issues/4253): LiveSync stops working in Preview app when make change in scss file +* [Fixed #4255](https://github.com/NativeScript/nativescript-cli/issues/4255): Uninstalling NativeScript should also remove its extensions +* [Fixed #4283](https://github.com/NativeScript/nativescript-cli/issues/4283): `tns run android` fails with private npm registry +* [Fixed #4300](https://github.com/NativeScript/nativescript-cli/issues/4300): Strange logs after project built for Android +* [Fixed #4311](https://github.com/NativeScript/nativescript-cli/issues/4311): [iOS] Build with nativescript-plugin-firebase requires legacy build system +* [Fixed #4324](https://github.com/NativeScript/nativescript-cli/issues/4324): High CPU utilization during `tns run` +* [Fixed #4327](https://github.com/NativeScript/nativescript-cli/issues/4327): `tns devices --availableDevices` prompts to install Xcode command line tools +* [Fixed #4347](https://github.com/NativeScript/nativescript-cli/issues/4347): `tns resources generate splashes ` fails for newly created project + + +5.1.1 (2019, January 17) +== + +### Fixed +* [Fixed #4024](https://github.com/NativeScript/nativescript-cli/issues/4024): LiveSync is not working in Preview app when Angular's lazy loading is used +* [Fixed #4197](https://github.com/NativeScript/nativescript-cli/issues/4197): Not able to change IPHONEOS_DEPLOYMENT_TARGET due to CLI overwriting ARCHS and VALID_ARCHS +* [Fixed #4222](https://github.com/NativeScript/nativescript-cli/issues/4222): Sidekick restarts DevTools during debug when change in .xml/.css/.html file is applied +* [Fixed #4218](https://github.com/NativeScript/nativescript-cli/issues/4218): Cannot run app after debug-brk fail +* [Fixed #4228](https://github.com/NativeScript/nativescript-cli/issues/4228): `tns update` command doesn't work with yarn +* [Fixed #4230](https://github.com/NativeScript/nativescript-cli/issues/4230): Debugging with HMR is not working for iOS +* [Fixed #4234](https://github.com/NativeScript/nativescript-cli/issues/4234): Creating project hangs on Windows when yarn is set as package manager +* [Fixed #4236](https://github.com/NativeScript/nativescript-cli/issues/4236): Chrome DevTools(iOS): Debugger does not attach after reloading the page +* [Fixed #4238](https://github.com/NativeScript/nativescript-cli/issues/4238): Fresh project build error on ios +* [Fixed #4251](https://github.com/NativeScript/nativescript-cli/pull/4251): Unhandled promise rejection error from sidekick when livesync to preview app with bundle +* [Fixed #4260](https://github.com/NativeScript/nativescript-cli/issues/4260): CLI crashes when attaching to a non running iOS app +* [Fixed #4261](https://github.com/NativeScript/nativescript-cli/issues/4261): The CLI requires developer disk image not only in debug +* [Fixed #4272](https://github.com/NativeScript/nativescript-cli/issues/4272): Generation of splash screen fails for new templates +* [Fixed #4273](https://github.com/NativeScript/nativescript-cli/issues/4273): `tns debug ios --hmr` If you have two open tabs and close one, breakpoints stop working +* [Fixed #4291](https://github.com/NativeScript/nativescript-cli/issues/4291): Error during debug on iOS: WebSocket is not open: readyState 2 (CLOSING) +* [Fixed #4292](https://github.com/NativeScript/nativescript-cli/issues/4292): Error during debug on iOS: RangeError: Index out of range +* [Fixed #4293](https://github.com/NativeScript/nativescript-cli/issues/4293): Error during debug on iOS: RangeError [ERR_BUFFER_OUT_OF_BOUNDS] + + +5.1.0 (2018, December 11) +== + +### Implemented +* [Implemented #2737](https://github.com/NativeScript/nativescript-cli/issues/2737): Make it possible `tns` to use Yarn as the package manager +* [Implemented #2992](https://github.com/NativeScript/nativescript-cli/issues/2992): Do not restart application when changing `.xml`, `.html` or `.css` file when debugging +* [Implemented #4068](https://github.com/NativeScript/nativescript-cli/issues/4068): Android application bundle initial support (build .aab files) +* [Implemented #4152](https://github.com/NativeScript/nativescript-cli/issues/4152): Analytics: Get information for what has been tracked in Google Analytics +* [Implemented #4200](https://github.com/NativeScript/nativescript-cli/issues/4200): Analytics: Add analytics for code-sharing projects usage +* [Implemented #4201](https://github.com/NativeScript/nativescript-cli/issues/4201): Analytics: Track project property on every analytics hit +* [Implemented #4211](https://github.com/NativeScript/nativescript-cli/issues/4211): Analytics: Track command options in analytics + +### Fixed +* [Fixed #4075](https://github.com/NativeScript/nativescript-cli/issues/4075): `tns preview` - app is refreshed on ios devices when changing android specific files +* [Fixed #4141](https://github.com/NativeScript/nativescript-cli/issues/4141): Don't prepare the project on `tns preview` command +* [Fixed #4178](https://github.com/NativeScript/nativescript-cli/issues/4178): Broken files pattern in karma config +* [Fixed #4198](https://github.com/NativeScript/nativescript-cli/issues/4198): The NativeScript Inspector is not closed on `Ctrl + C` +* [Fixed #4049](https://github.com/NativeScript/nativescript-cli/issues/4049): `tns` commands Removing Newline Added by `npm` from `package.json` + + +5.0.3 (2018, December 4) +== +### Fixed +* [Fixed #4186](https://github.com/NativeScript/nativescript-cli/issues/4186): Fix stuck http requests/responses +* [Fixed #4189](https://github.com/NativeScript/nativescript-cli/pull/4189): API: Fix "Cannot read property 'removeListener' of undefined" error on second stop of livesync to preview app + + +5.0.2 (2018, November 29) +== +### Implemented +* [Implemented #4167](https://github.com/NativeScript/nativescript-cli/pull/4167): API: Expose previewAppLiveSyncError event when some error is thrown while livesyncing to preview app + +### Fixed +* [Fixed #3962](https://github.com/NativeScript/nativescript-cli/issues/3962): If command 'tns plugin create .. ' failed , directory with plugin repository name must be deleted +* [Fixed #4053](https://github.com/NativeScript/nativescript-cli/issues/4053): Update Nativescript cli setup scripts to use android sdk 28 +* [Fixed #4077](https://github.com/NativeScript/nativescript-cli/issues/4077): Platform add with framework path and custom version breaks run with "--bundle" +* [Fixed #4129](https://github.com/NativeScript/nativescript-cli/issues/4129): tns preview doesn't sync changes when download 2 Playground projects +* [Fixed #4135](https://github.com/NativeScript/nativescript-cli/issues/4135): Too many TypeScript "Watching for file changes" messages in console during build +* [Fixed #4158](https://github.com/NativeScript/nativescript-cli/pull/4158): API: reset devices list when stopLiveSync method is called +* [Fixed #4161](https://github.com/NativeScript/nativescript-cli/pull/4161): API: raise deviceLost event after timeout of 5 seconds + + +5.0.1 (2018, November 14) +== +### Implemented +* [Implemented #4083](https://github.com/NativeScript/nativescript-cli/pull/4083): API: Add public API for deviceFound and deviceLost for preview devices +* [Implemented #4087](https://github.com/NativeScript/nativescript-cli/pull/4087): API: Expose public method for getting the qr code of playground app +* [Implemented #4093](https://github.com/NativeScript/nativescript-cli/pull/4093): API: Expose public api for starting the livesync operation to preview app + +### Fixed +* [Fixed #2670](https://github.com/NativeScript/nativescript-cli/issues/2670): Command line `tns run android --clean` rebuilds +* [Fixed #4043](https://github.com/NativeScript/nativescript-cli/issues/4043): `tns preview` fails when local plugin is referenced with tag in `package.json` +* [Fixed #4046](https://github.com/NativeScript/nativescript-cli/issues/4046):`tns debug ios` does not work with bigger projects on slower devices +* [Fixed #4055](https://github.com/NativeScript/nativescript-cli/pull/4055): API: Remove persisted emulator's data on deviceLost event +* [Fixed #4056](https://github.com/NativeScript/nativescript-cli/pull/4056): API: `TypeError: Invalid Version: null` is thrown when emulator is stopped immediately after start +* [Fixed #4071](https://github.com/NativeScript/nativescript-cli/issues/4071): Unable to run `tns test ` +* [Fixed #4073](https://github.com/NativeScript/nativescript-cli/pull/4073): Error is thrown when Node.js 11 is used +* [Fixed #4076](https://github.com/NativeScript/nativescript-cli/issues/4076): Cannot connect to device socket when run debug with justlaunch +* [Fixed #4079](https://github.com/NativeScript/nativescript-cli/pull/4079): API: Reset errors when fallback to list avds from director +* [Fixed #4090](https://github.com/NativeScript/nativescript-cli/issues/4090): `tns preview` and `tns platform add ...` issue +* [Fixed #4096](https://github.com/NativeScript/nativescript-cli/issues/4096): NativeScript v4 is not using the v4 of the app templates during project creation +* [Fixed #4100](https://github.com/NativeScript/nativescript-cli/issues/4100): Apply `before-plugins.gradle` file in the plugin `build.gradle` + + +5.0.0 (2018, November 1) +== + +### Breaking + +* Existing applications that are using older Android runtime (not 5.0.0 one), but are built with CLI 5.0.0, may experience some changes - until now CLI was always passing parameter to gradle `-PsupportVersion=26.0.0-alpha1`. As CLI no longer passes this version, the default one from build.gradle will be used (for example 27.0.1). Check [this issue](https://github.com/NativeScript/nativescript-cli/pull/3923) for more information. In case you want to use the old version in your application, add the following in your `app.gradle`: +``` +project.ext.supportVersion = "26.0.0-alpha1" +``` + +* CLI will not allow building for iOS with Xcode 8 or below. Check [this issue](https://github.com/NativeScript/nativescript-cli/issues/3887) for more information. +* CLI no longer support macOS Sierra and below. In case you are using such OS, CLI will print error message on each command. It will not stop you, but certain features will not work and we will not investigate them. `tns debug ios --inspector` will not work on macOS Sierra and below. +* You will not be able to build applications for Android without installing Android SDK 28. You can install Android SDK 28 and build tools 28 by executing the following commands: +``` +$ANDROID_HOME/tools/bin/sdkmanager "build-tools;28.0.1" +$ANDROID_HOME/tools/bin/sdkmanager "platforms;android-28" +``` +* `tns create` command is interactive now. In case you are using it in CI environment where the shell is marked as TTY (Travis for example), the CI will hang as it will wait for selection. You can get back the old behavior by passing `--js`: `tns create --js`. In case the terminal is not interactive, CLI will use the old behavior. More information is available in [this issue](https://github.com/NativeScript/nativescript-cli/issues/3829). + +### New +* [Implemented #1945](https://github.com/NativeScript/nativescript-cli/issues/1945): Add `tns plugin create` command. +* [Implemented #3040](https://github.com/NativeScript/nativescript-cli/issues/3040): Ability to have different app identifiers for iOS and Android. +* [Implemented #3813](https://github.com/NativeScript/nativescript-cli/issues/3813): Ability to preview NativeScript apps without any local setup - `tns preview` command. +* [Implemented #3829](https://github.com/NativeScript/nativescript-cli/issues/3829): Interactive `tns create`. +* [Implemented #3843](https://github.com/NativeScript/nativescript-cli/issues/3843): Make new Android livesync reuse socket connection. +* [Implemented #3866](https://github.com/NativeScript/nativescript-cli/issues/3866): Read registry from npm config instead of hard-wiring to registry.npmjs.org. +* [Implemented #3875](https://github.com/NativeScript/nativescript-cli/issues/3875): Add hot module replacement option (`--hmr`) for `tns run []` command - it will not to restart the app on js/ts changes. +* [Implemented #3886](https://github.com/NativeScript/nativescript-cli/issues/3886): Drop support for macOS Sierra and below. +* [Implemented #3887](https://github.com/NativeScript/nativescript-cli/issues/3887): CLI should not allow execution of iOS commands with Xcode 8 and below. +* [Implemented #3923](https://github.com/NativeScript/nativescript-cli/pull/3923): Remove requirement for Android Support Repository local installation. +* [Implemented #3991](https://github.com/NativeScript/nativescript-cli/issues/3991): Require Android SDK 28 for compilation. +* [Implemented #4036](https://github.com/NativeScript/nativescript-cli/issues/4036): Ability to run with bundle option on multiple platforms - `tns run --bundle` command. + +### Fixed +* [Fixed #3549](https://github.com/NativeScript/nativescript-cli/issues/3549): Podfile generation broken on livesync +* [Fixed #3686](https://github.com/NativeScript/nativescript-cli/issues/3686): Pod install fails with non-error message for fresh installations +* [Fixed #3878](https://github.com/NativeScript/nativescript-cli/pull/3878): Prompter for mail on postinstall is very obligatory +* [Fixed #3910](https://github.com/NativeScript/nativescript-cli/pull/3910): `tns platform add ios` should not be executed on non-macOS +* [Fixed #3912](https://github.com/NativeScript/nativescript-cli/issues/3912): Build fails with Xcode 10 with error could not find included file `../plugins-debug.xcconfig` in search paths +* [Fixed #3920](https://github.com/NativeScript/nativescript-cli/issues/3920): iOS apps will not start with Xcode 10 +* [Fixed #3932](https://github.com/NativeScript/nativescript-cli/issues/3932): Plugins' platforms directory should not exist in tns_modules +* [Fixed #3934](https://github.com/NativeScript/nativescript-cli/issues/3934): Unable to create project from scoped package +* [Fixed #3937](https://github.com/NativeScript/nativescript-cli/issues/3937): The app cannot be recovered with livesync after an unhandled exception on iOS +* [Fixed #3957](https://github.com/NativeScript/nativescript-cli/issues/3957): Always have to run plugin tests twice on iOS - Failed to load Info.plist from bundle at path +* [Fixed #3984](https://github.com/NativeScript/nativescript-cli/issues/3984): Files are not deleted from platforms folder on `tns run` command +* [Fixed #3986](https://github.com/NativeScript/nativescript-cli/pull/3986): `tns debug ios` command fails in some cases on iOS Simulator +* [Fixed #4007](https://github.com/NativeScript/nativescript-cli/issues/4007): Application built in release has TypeScript files +* [Fixed #4010](https://github.com/NativeScript/nativescript-cli/issues/4010): `node_modules` are prepared twice on initial run + + +4.2.4 (2018, September 19) +== + +### Fixed +* [Fixed #3832](https://github.com/NativeScript/nativescript-cli/issues/3832): Unable to work with devices with numeric identifiers +* [Fixed #3881](https://github.com/NativeScript/nativescript-cli/pull/3881): Replace forum references with stack overflow. +* [Fixed #3883](https://github.com/NativeScript/nativescript-cli/issues/3883): CLI installs the app on every change +* [Fixed #3893](https://github.com/NativeScript/nativescript-cli/pull/3893): [API] Errors are raised when emulator lost/found event is raised. +* [Fixed #3893](https://github.com/NativeScript/nativescript-cli/pull/3893): [API] Android emulator image display names are not correct. +* [Fixed #3894](https://github.com/NativeScript/nativescript-cli/issues/3894): `Socket Error: Error: write ECONNABORTED` is raised when trying to run on Android + + +4.2.3 (2018, August 27) +== + +### Fixed +* [Fixed #3840](https://github.com/NativeScript/nativescript-cli/issues/3840): Unable to reconnect to iOS Simulator when debugging +* [Fixed #3824](https://github.com/NativeScript/nativescript-cli/issues/3824): `tns create` command not using proxy set with `tns proxy set` + + +4.2.2 (2018, August 17) +== + +### Fixed +* [Fixed #3818](https://github.com/NativeScript/nativescript-cli/issues/3818): Unable to start application on Android device with a custom activity containing capital letters +* [Fixed #3820](https://github.com/NativeScript/nativescript-cli/issues/3820): A command help is shown on native build error +* [Fixed #3821](https://github.com/NativeScript/nativescript-cli/issues/3821): [Sporadic] Unable to start iOS debugger from VSCode extension + + +4.2.1 (2018, August 10) +== + +### Fixed +* [Fixed #3763](https://github.com/NativeScript/nativescript-cli/issues/3763): Duplicated entries in `tns run` log while livesyncing +* [Fixed #3802](https://github.com/NativeScript/nativescript-cli/issues/3802): Unable to use templates without `App_Resources` +* [Fixed #3803](https://github.com/NativeScript/nativescript-cli/issues/3803): `tns run ios` command fails if tns-ios version is a tag +* [Fixed #3805](https://github.com/NativeScript/nativescript-cli/issues/3805): `tns run android` fails in case you do not have Android emulator images + + +4.2.0 (2018, August 7) +== + +### New +* [Implemented #3023](https://github.com/NativeScript/nativescript-cli/issues/3023): `tns device --available-devices` to list all emulator images +* [Implemented #3717](https://github.com/NativeScript/nativescript-cli/pull/3717): Speed up device detection +* [Implemented #3718](https://github.com/NativeScript/nativescript-cli/issues/3718): Install the Android project dependencies only when needed +* [Implemented #3719](https://github.com/NativeScript/nativescript-cli/issues/3719): Build plugins with the same gradle versions as the runtime +* [Implemented #3735](https://github.com/NativeScript/nativescript-cli/pull/3735): Speed up adding native platform +* [Implemented #3750](https://github.com/NativeScript/nativescript-cli/pull/3750): Add hook for `checkForChanges` +* [Implemented #3733](https://github.com/NativeScript/nativescript-cli/issues/3733): [API] Expose API for listing and starting emulators and simulators when using CLI as library. +* [Implemented #3797](https://github.com/NativeScript/nativescript-cli/issues/3797): Use sockets to LiveSync changes on Android +* [Implemented #3798](https://github.com/NativeScript/nativescript-cli/issues/3798): Allow templates to be full application - full support + +### Fixed +* [Fixed #2485](https://github.com/NativeScript/nativescript-cli/issues/2485): EACCES (Permission denied) when livesync Angular projects on Samsung devices +* [Fixed #2547](https://github.com/NativeScript/nativescript-cli/issues/2547): `tns-android` remains inside dependencies when `tns build/run android` fails +* [Fixed #3132](https://github.com/NativeScript/nativescript-cli/issues/3132): Xcode 9: Requires Provisioning Profile Error +* [Fixed #3602](https://github.com/NativeScript/nativescript-cli/issues/3602): Livesync does not work on Android P +* [Fixed #3610](https://github.com/NativeScript/nativescript-cli/issues/3610): Livesync ignores aar file changes inside a plugin +* [Fixed #3672](https://github.com/NativeScript/nativescript-cli/issues/3672): `tns run/debug ios --syncAllFiles` with cocoapods has issues +* [Fixed #3707](https://github.com/NativeScript/nativescript-cli/issues/3707): CLI generates aar files on changes in `app/` (livesync with webpack) +* [Fixed #3710](https://github.com/NativeScript/nativescript-cli/issues/3710): CLI regenerates ALL aar files on changes in `node_modules` +* [Fixed #3723](https://github.com/NativeScript/nativescript-cli/issues/3723): iOS build for device fails with Xcode 10 beta versions +* [Fixed #3729](https://github.com/NativeScript/nativescript-cli/pull/3729): File references inside .pbxproject are incorrect when there's space in project path +* [Fixed #3741](https://github.com/NativeScript/nativescript-cli/issues/3741): Platforms folder need to be removed after a bitcode error +* [Fixed #3744](https://github.com/NativeScript/nativescript-cli/pull/3744): During all gradle operations "Gradle build" message is printed +* [Fixed #3751](https://github.com/NativeScript/nativescript-cli/issues/3751): Problem building nativescript-google-maps-sdk on Android +* [Fixed #3752](https://github.com/NativeScript/nativescript-cli/issues/3752): Increase the default timeout for debug command from 5 to 10 seconds +* [Fixed #3768](https://github.com/NativeScript/nativescript-cli/pull/3768): Skip preparation of plugins native files in case they are not changed +* [Fixed #3794](https://github.com/NativeScript/nativescript-cli/pull/3794): Update lodash to fix a security vulnerability. + + +4.1.2 (2018, June 26) +== + +### Fixed + +* [Fixed #2283](https://github.com/NativeScript/nativescript-cli/issues/2283): On adding test frameworks their peerDependencies are not installed +* [Fixed #3689](https://github.com/NativeScript/nativescript-cli/issues/3689): `tns test ` throws exception + + +4.1.1 (2018, June 19) +== + +### Fixed + +* [Fixed #3625](https://github.com/NativeScript/nativescript-cli/issues/3625): `tns run ios --device fakeId` start random emulator +* [Fixed #3633](https://github.com/NativeScript/nativescript-cli/pull/3633): iOS Debugging: Close frontend socket unconditionally +* [Fixed #3644](https://github.com/NativeScript/nativescript-cli/issues/3644): `tns run ios --justlaunch` do not exit on real iOS devices +* [Fixed #3658](https://github.com/NativeScript/nativescript-cli/issues/3658): Don't rebuild application for android when something is changed in App_Resources/iOS +* [Fixed #3660](https://github.com/NativeScript/nativescript-cli/issues/3660): A deprecation warning is shown when `tns debug ios` command is executed with node v10 +* [Fixed #3662](https://github.com/NativeScript/nativescript-cli/pull/3662): Fix project creation when template v2 is used +* [Fixed #3666](https://github.com/NativeScript/nativescript-cli/issues/3666): Unable to generate icons when the Contents.json is not generated by Xcode +* [Fixed #3675](https://github.com/NativeScript/nativescript-cli/pull/3675): File connections to iOS device work for a single app only +* [Fixed #3677](https://github.com/NativeScript/nativescript-cli/issues/3677): docs: Add alias to plugin add/install +* [Fixed #3682](https://github.com/NativeScript/nativescript-cli/pull/3682): Use google as default repo when building plugins + + +4.1.0 (2018, May 31) +== + +### New +* [Implemented #3321](https://github.com/NativeScript/nativescript-cli/issues/3321): Work simultaneously with multiple iOS Simulators +* [Implemented #3404](https://github.com/NativeScript/nativescript-cli/issues/3404): Start LiveSync watcher earlier during run +* [Implemented #3570](https://github.com/NativeScript/nativescript-cli/issues/3570): Add deprecation message for macOS versions under High Sierra +* [Implemented #3581](https://github.com/NativeScript/nativescript-cli/issues/3581): Drop support for Node.js 4.x.x +* [Implemented #3582](https://github.com/NativeScript/nativescript-cli/issues/3582): Deprecate support for Node.js 6.x.x +* [Implemented #3605](https://github.com/NativeScript/nativescript-cli/issues/3605): Support Java 10 +* [Implemented #3636](https://github.com/NativeScript/nativescript-cli/issues/3636): Allow templates to be full applications - BETA support +* [Implemented #3650](https://github.com/NativeScript/nativescript-cli/issues/3650): Enable using source code in iOS part of plugins + +### Fixed +* [Fixed #1398](https://github.com/NativeScript/nativescript-cli/issues/1398): CLI detects iOS devices connected over Wi-fi and fails to work with them +* [Fixed #2831](https://github.com/NativeScript/nativescript-cli/issues/2831): `tns debug android --start` releases the terminal session +* [Fixed #3580](https://github.com/NativeScript/nativescript-cli/pull/3580): API: isValidNativeScriptProject returns incorrect result +* [Fixed #3593](https://github.com/NativeScript/nativescript-cli/issues/3593): Tracking for used Debug tools is not correct +* [Fixed #3629](https://github.com/NativeScript/nativescript-cli/issues/3629): `tns debug android --start` does not print application console.logs + + +4.0.2 (2018, May 18) +== + +### Fixed +* [Fixed #3595](https://github.com/NativeScript/nativescript-cli/issues/3595): Do not track local paths in Analytics +* [Fixed #3597](https://github.com/NativeScript/nativescript-cli/issues/3597): Users who subscribe to Progess Newsletter are not informed for the privacy policy + +4.0.1 (2018, May 11) +== + +### New +* [Implemented #3535](https://github.com/NativeScript/nativescript-cli/pull/3535) API: Expose androidProcessService - getAppProcessId method + +### Fixed +* [Fixed #1548](https://github.com/NativeScript/nativescript-cli/issues/1548): `--sdk` flag not working properly when starting emulators in iOS +* [Fixed #2131](https://github.com/NativeScript/nativescript-cli/issues/2131): Simulators with `(` in name are not started after `tns run ios --device ` +* [Fixed #2727](https://github.com/NativeScript/nativescript-cli/issues/2727): Passing more than one parameter on `tns create` returns unappropriate error message +* [Fixed #3529](https://github.com/NativeScript/nativescript-cli/issues/3529): iOS logging does not work on multiple simulators +* [Fixed #3536](https://github.com/NativeScript/nativescript-cli/issues/3536): Message for tracking in Google Analytics is always printed +* [Fixed #3554](https://github.com/NativeScript/nativescript-cli/issues/3554): NativeScript is not compatible with Node.js 10.x.x +* [Fixed #3557](https://github.com/NativeScript/nativescript-cli/pull/3557): Asset generation should not fail in case some App_Resources are missing. +* [Fixed #3560](https://github.com/NativeScript/nativescript-cli/issues/3560): Android build fails when path to app has space and plugin should be build + + +4.0.0 (2018, April 10) +== + +### New +* [Implemented #2632](https://github.com/NativeScript/nativescript-cli/issues/2632) Guidance for new CLI users +* [Implemented #3243](https://github.com/NativeScript/nativescript-cli/issues/3243) 'Scss' file changes trigger app refresh instead reloading the view and apply generated 'css' +* [Implemented #3248](https://github.com/NativeScript/nativescript-cli/issues/3248) Support JDK_HOME and JAVA_HOME +* [Implemented #3257](https://github.com/NativeScript/nativescript-cli/issues/3257) Make {N} project structure configurable +* [Implemented #3317](https://github.com/NativeScript/nativescript-cli/issues/3317) Support livesync with webpack +* [Implemented #3449](https://github.com/NativeScript/nativescript-cli/pull/3449) Track Vue.js project type +* [Implemented #3496](https://github.com/NativeScript/nativescript-cli/issues/3496) Generate assets for the mobile application +* [Implemented #3497](https://github.com/NativeScript/nativescript-cli/issues/3497) Command to migrate Android resources to 4.0.0 structure +* [Implemented #3516](https://github.com/NativeScript/nativescript-cli/issues/3516) Improve Getting Started Experience + +### Fixed +* [Fixed #3151](https://github.com/NativeScript/nativescript-cli/issues/3151): Install fails if user setting file is not valid json +* [Fixed #3324](https://github.com/NativeScript/nativescript-cli/issues/3324): Error when iOS simulator's window is closed +* [Fixed #3442](https://github.com/NativeScript/nativescript-cli/issues/3442): Unnecessary second build upon `tns run android` +* [Fixed #3451](https://github.com/NativeScript/nativescript-cli/issues/3451): `tns plugin remove` fails with : Cannot convert undefined or null to object +* [Fixed #3470](https://github.com/NativeScript/nativescript-cli/issues/3470): Error when we are publishing to AppStore +* [Fixed #3481](https://github.com/NativeScript/nativescript-cli/issues/3481): Cannot log in users on iOS simulator with kinvey-nativescript-sdk +* [Fixed #3514](https://github.com/NativeScript/nativescript-cli/pull/3514): Incorrect error is shown when xcrun simctl is not configured + +3.4.3 (2018, March 02) +== + +### New +* [Implemented #3407](https://github.com/NativeScript/nativescript-cli/issues/3407) Allow templates to predefine plugin configurations in `package.json` +* [Implemented #3408](https://github.com/NativeScript/nativescript-cli/issues/3408) Add additional tracking for users who have exported projects from Playground + + +3.4.2 (2018, February 01) +== + +### New +* [Implemented #2127](https://github.com/NativeScript/nativescript-cli/issues/2127): Feature Request: Ability to disable spinner during install process + +### Fixed +* [Fixed #3337](https://github.com/NativeScript/nativescript-cli/issues/3337): Empty Chrome DevTools when using tns debug ios for iOS Simulator +* [Fixed #3338](https://github.com/NativeScript/nativescript-cli/issues/3338): `tns debug ios --chrome` can not stop on first line + + +3.4.1 (2018, January 11) +== + +### New +* [Implemented #3313](https://github.com/NativeScript/nativescript-cli/pull/3313): Allow using Android SDK 27 + +### Fixed +* [Fixed #3280](https://github.com/NativeScript/nativescript-cli/issues/3280): App_Resources are duplicated on consecutive builds with --bundle +* [Fixed #3183](https://github.com/NativeScript/nativescript-cli/issues/3183): `tns debug ios --chrome` keeps changing port on every livesync update +* [Fixed #3148](https://github.com/NativeScript/nativescript-cli/issues/3148): Fix detection of Javac version +* [Fixed #3302](https://github.com/NativeScript/nativescript-cli/pull/3302): fix(ios-inspector): Update cached inspector package to latest compatible version +* [Fixed #3311](https://github.com/NativeScript/nativescript-cli/pull/3311): Allow setting authenthicated proxy on Windows when Visual C++ redistributable is not installed + + +3.4.0 (2017, December 20) +== + +### New +* [Implemented #3171](https://github.com/NativeScript/nativescript-cli/issues/3171): Make --chrome the default for tns debug ios + +### Fixed +* [Fixed #3268](https://github.com/NativeScript/nativescript-cli/issues/3268): tns run android - EMFILE: too many open files +* [Fixed #3202](https://github.com/NativeScript/nativescript-cli/issues/3202): `tns update ` does not work +* [Fixed #3187](https://github.com/NativeScript/nativescript-cli/issues/3187): Android tns debug, crashing when there is a response from server + +3.3.1 (2017, November 17) +== + +### Fixed +* [Fixed #3164](https://github.com/NativeScript/nativescript-cli/issues/3164): `npm run build-*-bundle` gets stuck at nativescript-unit-test-runner hook. +* [Fixed #3182](https://github.com/NativeScript/nativescript-cli/issues/3182): CLI fails when unable to start Analytics Broker process. + +3.3.0 (2017, October 26) +== + +### New + +* [Implemented #3076](https://github.com/NativeScript/nativescript-cli/issues/3076): NativeScript setup scripts should have silent installer mode. + +### Fixed +* [Fixed #3141](https://github.com/NativeScript/nativescript-cli/issues/3141): No console.log output Xcode 9 iOS 11. +* [Fixed #3016](https://github.com/NativeScript/nativescript-cli/issues/3016): tns_modules randomly appears in app folder and breaks build. +* [Fixed #2967](https://github.com/NativeScript/nativescript-cli/issues/2967): Create plugin by static static libraries error. + +3.2.0 (2017, September 7) +== + +### Fixed +* [Fixed #3073](https://github.com/NativeScript/nativescript-cli/issues/3073): Saving two platform-specific files during LiveSync causes an exception +* [Fixed #3054](https://github.com/NativeScript/nativescript-cli/issues/3054): `tns prepare ` fails with Unhandled promise rejection +* [Fixed #3048](https://github.com/NativeScript/nativescript-cli/issues/3048): Fixed setup script for Windows +* [Fixed #3046](https://github.com/NativeScript/nativescript-cli/issues/3046): Export fails for Xcode 9 beta 5 +* [Fixed #3026](https://github.com/NativeScript/nativescript-cli/issues/3026): Fixed scripts for local installation of NativeScript on macOS +* [Fixed #3021](https://github.com/NativeScript/nativescript-cli/issues/3021): If multiple devices from the same platform are connected `tns debug --start` should ask you which of them to use +* [Fixed #3020](https://github.com/NativeScript/nativescript-cli/issues/3020): iOS Archive Export unexpected behavior when using AdHoc or AppStore provisioning +* [Fixed #3007](https://github.com/NativeScript/nativescript-cli/issues/3007): Application hangs on iOS during LiveSync +* [Fixed #3006](https://github.com/NativeScript/nativescript-cli/issues/3006): Add help for --provision option +* [Fixed #2952](https://github.com/NativeScript/nativescript-cli/issues/2952): Do not select automatically on which Android device to start debugging +* [Fixed #2946](https://github.com/NativeScript/nativescript-cli/issues/2946): Can't run iOS app on case-sensitive filesystem on macOS +* [Fixed #2934](https://github.com/NativeScript/nativescript-cli/issues/2934): Running `tns build android --release ...` uses *.debug.* files in build output +* [Fixed #2888](https://github.com/NativeScript/nativescript-cli/issues/2888): Build in release mode for iOS doesn't seem to set the production mode for APN +* [Fixed #2825](https://github.com/NativeScript/nativescript-cli/issues/2825): LiveSync won't work if appId doesn't match - no warning/error +* [Fixed #2818](https://github.com/NativeScript/nativescript-cli/issues/2818): Exception and stack trace is not shown in terminal for Android +* [Fixed #2810](https://github.com/NativeScript/nativescript-cli/issues/2810): Cannot read property 'match' of null error when installing nativescript cli +* [Fixed #2728](https://github.com/NativeScript/nativescript-cli/issues/2728): `tns run ios --device fakeID` starts iOS Simulator +* [Fixed #2716](https://github.com/NativeScript/nativescript-cli/issues/2716): Webpack issues when build in release mode +* [Fixed #2657](https://github.com/NativeScript/nativescript-cli/issues/2657): `tns run android/ios` does not remove folders correctly +* [Fixed #2515](https://github.com/NativeScript/nativescript-cli/issues/2515): CLI captures logs from Chrome and Cordova apps +* [Fixed #2501](https://github.com/NativeScript/nativescript-cli/issues/2501): Manual signing with distribution provisioning profile fails with NS 2.5 + +3.1.3 (2017, July 25) +== + +### New + +* [Implemented #2470](https://github.com/NativeScript/nativescript-cli/issues/2470): Establish a recommended workflow for simultaneous Android & iOS development - use `tns run` command. +* [Implemented #2873](https://github.com/NativeScript/nativescript-cli/issues/2873): Add official support for Node 8. +* [Implemented #2894](https://github.com/NativeScript/nativescript-cli/issues/2894): Support for Android 8 (API-26) and Android Build Tools 26.0.0. + +### Fixed +* [Fixed #2361](https://github.com/NativeScript/nativescript-cli/issues/2361): 'iTunes is not installed...' on Windows when using `tns run android`. +* [Fixed #2870](https://github.com/NativeScript/nativescript-cli/issues/2870): CLI can not create projects with custom templates when npm 5 is used . +* [Fixed #2871](https://github.com/NativeScript/nativescript-cli/issues/2871): CLI can not add platform from local tgz package when npm 5 is used . +* [Fixed #2889](https://github.com/NativeScript/nativescript-cli/issues/2889): `tns prepare ios --provision` starts simulator. +* [Fixed #2936](https://github.com/NativeScript/nativescript-cli/issues/2936): CFBundleURLTypes cannot be overridden from a plugin. +* [Fixed #2941](https://github.com/NativeScript/nativescript-cli/issues/2941): Duplicate console logs with LiveSync in 3.1. +* [Fixed #2965](https://github.com/NativeScript/nativescript-cli/issues/2965): Unmet peerDependencies break adding of platform. +* [Fixed #2966](https://github.com/NativeScript/nativescript-cli/issues/2966): Improve selection of device/emulator for debugging. +* [Fixed #2975](https://github.com/NativeScript/nativescript-cli/issues/2975): CLI Process hangs on native build failure. +* [Fixed #2986](https://github.com/NativeScript/nativescript-cli/issues/2986): Preparing a project for a platform causes changes for the other platform. +* [Fixed #2988](https://github.com/NativeScript/nativescript-cli/issues/2988): CLI fails with EPIPE during `$ tns run ios`. + +3.1.2 (2017, July 06) +== + +### Fixed +* [Fixed #2950](https://github.com/NativeScript/nativescript-cli/issues/2950): Unable to provide user input on postinstall of plugin + +3.1.1 (2017, June 28) +== + +### Fixed +* [Fixed #2879](https://github.com/NativeScript/nativescript-cli/issues/2879): Livesync does not apply changes in CSS files on physical iOS devices +* [Fixed #2892](https://github.com/NativeScript/nativescript-cli/issues/2892): Not copying the CFBundleURLTypes from the plist file to the project +* [Fixed #2916](https://github.com/NativeScript/nativescript-cli/issues/2916): If no device or emulator is attached `tns debug android` kills the commandline process and doesn't start an emulator +* [Fixed #2923](https://github.com/NativeScript/nativescript-cli/issues/2923): Fix asking for user email on postinstall +* [Fixed #2929](https://github.com/NativeScript/nativescript-cli/issues/2929): Android release builds with webpack disregards plugin's gradle dependencies. + + +3.1.0 (2017, June 22) +== + +### Fixed + +* [Fixed #2905](https://github.com/NativeScript/nativescript-cli/issues/2905): Doctor command fails when ANDROID_HOME is not set +* [Fixed #2874](https://github.com/NativeScript/nativescript-cli/issues/2874): Unable to build and deploy app to iTunes: Unable to connect to iTunes Connect +* [Fixed #2856](https://github.com/NativeScript/nativescript-cli/issues/2856): DevDependencies' dependencies are added to native project +* [Fixed #2860](https://github.com/NativeScript/nativescript-cli/issues/2860): `tns run ios` fails on iOS devices after rebuilding application in the process +* [Fixed #2850](https://github.com/NativeScript/nativescript-cli/issues/2850): Document properly the "Emulate Options" +* [Fixed #2757](https://github.com/NativeScript/nativescript-cli/issues/2757): `tns build ios --forDevice --path TestApp` start simulator +* [Fixed #2720](https://github.com/NativeScript/nativescript-cli/issues/2720): Livesync error with webstorm temporary files +* [Fixed #2716](https://github.com/NativeScript/nativescript-cli/issues/2716): Web pack issues when build in release mode +* [Fixed #2501](https://github.com/NativeScript/nativescript-cli/issues/2501): Manual signing with distribution provisioning profile fails with NS 2.5 +* [Fixed #2446](https://github.com/NativeScript/nativescript-cli/issues/2446): tns run--device NonexistentName retunrs different messages for ios and android +* [Fixed #1358](https://github.com/NativeScript/nativescript-cli/issues/1358): Webstorm Ubuntu .bash_profile +* [Fixed #521](https://github.com/NativeScript/nativescript-cli/issues/521): EPERM error with .local/share directory after installing CLI + +### Deprecated + +* [Implemented #2329](https://github.com/NativeScript/nativescript-cli/issues/2329): Remove the emulate command + +3.0.3 (2017, June 1) +== + +### Fixed + +* [Fix #2855](https://github.com/NativeScript/nativescript-cli/issues/2855): iOS inspector not installed with npm 5 + +3.0.2 (2017, May 30) +== + +### Fixed + +* Removed restart of the App if HTML/CSS file was modified. The issue is fixed in the Modules **3.0.1** and we can again just refresh the app on change. +* [Fix #2852](https://github.com/NativeScript/nativescript-cli/pull/2852): Fix prepare for android when building with webpack + +3.0.1 (2017, May 11) +== + +### Fixed + +* [Fix #2732](https://github.com/NativeScript/nativescript-cli/issues/2732): Livesync crashes app every OTHER time on iOS with 3.0.0-rc.2 +* [Fix #2764](https://github.com/NativeScript/nativescript-cli/issues/2764): Error when executing "tns run ios" with 3.0 on a project that is located in a directory path with "spaces" + +2.5.5 (2017, May 11) +== + +### Fixed + +* [Fix #2782](https://github.com/NativeScript/nativescript-cli/issues/2782): [2.5.*] tns run always add latest platform + +3.0.0 (2017, May 3) +== + +### Fixed + +* [Fixed #2500](https://github.com/NativeScript/nativescript-cli/issues/2500): Debug on device does not sync file changes +* [Fixed #2639](https://github.com/NativeScript/nativescript-cli/issues/2639): Build continues after gradle build fails +* [Fixed #1882](https://github.com/NativeScript/nativescript-cli/issues/1882): Run/debug commands should not try to deploy on connected but not paired devices +* [Fixed #2673](https://github.com/NativeScript/nativescript-cli/issues/2673): `tns device ios` does not list real devices if simulator is running. +* [Fixed #2685](https://github.com/NativeScript/nativescript-cli/issues/2685): `tns run ios` starts iOS Simulator even if physical iOS device is attached +* [Fixed #2661](https://github.com/NativeScript/nativescript-cli/issues/2661): Adding new files during livesync doesn't succeed on iOS Devices +* [Fixed #2650](https://github.com/NativeScript/nativescript-cli/issues/2650): Release Build Android error: gradlew.bat failed with exit code 1 When Path contains Space +* [Fixed #2125](https://github.com/NativeScript/nativescript-cli/issues/2125): NativeScript setup script fails on Mac +* [Fixed #2697](https://github.com/NativeScript/nativescript-cli/issues/2697): App_Resources being copied into app RAW + +3.0.0-RC.1 (2017, March 29) +== + +### New + +* [Implemented #2170](https://github.com/NativeScript/nativescript-cli/issues/2170): CLI should report adb install errors +* [Implemented #2204](https://github.com/NativeScript/nativescript-cli/issues/2204): Remove fibers from CLI and use async/await +* [Implemented #2349](https://github.com/NativeScript/nativescript-cli/issues/2349): Command "emulate" and options "--emulator/--device/--avd" are a bit confusing to use +* [Implemented #2513](https://github.com/NativeScript/nativescript-cli/issues/2513): Allow templates to omit App_Resources +* [Implemented #2633](https://github.com/NativeScript/nativescript-cli/issues/2633): Deprecate `tns livesync` command + +### Fixed + +* [Fixed #2225](https://github.com/NativeScript/nativescript-cli/issues/2225): The tns debug ios command hangs on launch screen +* [Fixed #2357](https://github.com/NativeScript/nativescript-cli/issues/2357): --copy-to option is broken +* [Fixed #2446](https://github.com/NativeScript/nativescript-cli/issues/2446): tns emulate --device NonexistentName retunrs different messages for ios and android +* [Fixed #2486](https://github.com/NativeScript/nativescript-cli/issues/2486): tns run android (without started emulator/connected device) fails to start app +* [Fixed #2487](https://github.com/NativeScript/nativescript-cli/issues/2487): Exception: The plugin tns-android@2.5.0 is already installed +* [Fixed #2496](https://github.com/NativeScript/nativescript-cli/issues/2496): `tns platform clean android` does not maintain the same version of the runtimes +* [Fixed #2511](https://github.com/NativeScript/nativescript-cli/issues/2511): Second run of `tns run android --release` does not respect changes in application code +* [Fixed #2557](https://github.com/NativeScript/nativescript-cli/issues/2557): 2.5.1 iOS incremental build generates inconsistent binary +* [Fixed #2559](https://github.com/NativeScript/nativescript-cli/issues/2559): `tns init` fails, `ins init --force` produce invalid app +* [Fixed #2560](https://github.com/NativeScript/nativescript-cli/issues/2560): `tns run` should do full prepare/rebuild if something in App_Resources is changes +* [Fixed #2561](https://github.com/NativeScript/nativescript-cli/issues/2561): Fix prepare process terminates if passing too many arguments to a new node process +* [Fixed #2641](https://github.com/NativeScript/nativescript-cli/issues/2641): Removed files are not sync correctly on android +* [Fixed #2642](https://github.com/NativeScript/nativescript-cli/issues/2642): `tns run ios/android` sync hidden files +* [Fixed #2653](https://github.com/NativeScript/nativescript-cli/issues/2653): Copy folder with files inside app breaks live sync + +2.5.3 (2017, March 20) +== + +### New + +* [Implemented #2583](https://github.com/NativeScript/nativescript-cli/issues/2583): Add support for Android SDK Tools 25.2.3 + +2.5.2 (2017, February 24) +== + +### Fixed + +* [Fixed #2564](https://github.com/NativeScript/nativescript-cli/issues/2564): Add support for Node.js 7.6.0 + +2.5.1 (2017, February 17) +== + +### Fixed + +* [Fixed #2476](https://github.com/NativeScript/nativescript-cli/issues/2476): `tns run ios` unable to sync files on iOS Simulator +* [Fixed #2491](https://github.com/NativeScript/nativescript-cli/issues/2491): "ERROR Error: Could not find module" after 2.5 upgrade +* [Fixed #2472](https://github.com/NativeScript/nativescript-cli/issues/2472): Livesync watches .DS_Store files +* [Fixed #2469](https://github.com/NativeScript/nativescript-cli/issues/2469): `tns run` can get stuck in a loop since 2.5 +* [Fixed #2512](https://github.com/NativeScript/nativescript-cli/issues/2512): Run should not watch hidden files +* [Fixed #2521](https://github.com/NativeScript/nativescript-cli/issues/2521): Enable requesting user input during plugin installation + +2.5.0 (2017, February 1) +== +### New +* [Implemented #2330](https://github.com/NativeScript/nativescript-cli/issues/2330) and [#1366](https://github.com/NativeScript/nativescript-cli/issues/1366): Run command syncs and watches for changes +* [Implemented #2277](https://github.com/NativeScript/nativescript-cli/issues/2277): Fast livesync of images +* [Implemented #2276](https://github.com/NativeScript/nativescript-cli/issues/2276): Support plugin development when using the watch option +* [Implemented #2260]( https://github.com/NativeScript/nativescript-cli/issues/2260): Deprecate support for Node.js 4.x feature +* [Implemented #2112]( https://github.com/NativeScript/nativescript-cli/issues/2112): Update webpack plugin to run as a npm script feature +* [Implemented #1906]( https://github.com/NativeScript/nativescript-cli/issues/1906): TNS Doctor Android tools detection feature +* [Implemented #1845](https://github.com/NativeScript/nativescript-cli/issues/1845): Remove NPM as a dependency, use the NPM installed on users' machine feature + +### Fixed + +**Install and setup issues** + +* [Fixed #2302](https://github.com/NativeScript/nativescript-cli/issues/2302): App runs in Xcode and CLI but not on test flight +* [Fixed #1922](https://github.com/NativeScript/nativescript-cli/issues/1922): TNS doctor does not detect if JDK is not installed and throws an error +* [Fixed #2312](https://github.com/NativeScript/nativescript-cli/issues/2312): Creating app w/ nativescript@next is not deploying App_Resources folder +* [Fixed #2308](https://github.com/NativeScript/nativescript-cli/issues/2308): Using nativescript@next brings multiple libraries into node_modules +* [Fixed #2301](https://github.com/NativeScript/nativescript-cli/issues/2301): Rework logic of handling 2 package.json files after tns create +* [Fixed #2299](https://github.com/NativeScript/nativescript-cli/issues/2299): tns create TestApp --ng (or --tsc) takes too long +* [Fixed #2257](https://github.com/NativeScript/nativescript-cli/issues/2257): {N} doesn't include @namespace node_modules + +**Build, Prepare, Run issues** + +* [Fixed #2213](https://github.com/NativeScript/nativescript-cli/issues/2213): When switching build configurations plugin platform files are copied into assets +* [Fixed #2177](https://github.com/NativeScript/nativescript-cli/issues/2177): Prepare does not flatten scoped dependencies +* [Fixed #2150](https://github.com/NativeScript/nativescript-cli/issues/2150): TNS run command broken with using --watch +* [Fixed #1740](https://github.com/NativeScript/nativescript-cli/issues/1740): Dev Dependencies (like Gulp, etc) getting built and build is failing because of which Gulp * [Fixed #](): integration is not working currently. +* [Fixed #2270](https://github.com/NativeScript/nativescript-cli/issues/2270): App is not rebuilt after removing plugin with native dependencies bug +* [Fixed #2253](https://github.com/NativeScript/nativescript-cli/issues/2253): Prepare command with bundle option doesn't copy files + +**Livesync issues** + +* [Fixed #2341](https://github.com/NativeScript/nativescript-cli/issues/2341): LiveSync after {N} update uses old app on the device +* [Fixed #2325](https://github.com/NativeScript/nativescript-cli/issues/2325): tns livesync ios --watch --emulator doesn't watch html or sass changes, only ts +* [Fixed #2221](https://github.com/NativeScript/nativescript-cli/issues/2221): Provision to watch files in symlinked directories for livesync command +* [Fixed #2267](https://github.com/NativeScript/nativescript-cli/issues/2267): Cannot run livesync with ios simulator + +**Emulate/ Device issues** + +* [Fixed #1522](https://github.com/NativeScript/nativescript-cli/issues/1522): Cannot specify emulator device while debugging +* [Fixed #2345](https://github.com/NativeScript/nativescript-cli/issues/2345): Option --device {DeviceName} not working for emulate/run/debug/deploy bug +* [Fixed #2344](https://github.com/NativeScript/nativescript-cli/issues/2344): Emulate command not working for iOS + +**Debug issues** + +* [Fixed #2315](https://github.com/NativeScript/nativescript-cli/issues/2315): tns debug ios --watch fails on newly created app if there is already deployed app with the same app id +* [Fixed #2292](https://github.com/NativeScript/nativescript-cli/issues/2292): "tns debug {platform} --watch" inconvenient behavior + +**Console logging issues** + +* [Fixed #2385](https://github.com/NativeScript/nativescript-cli/issues/2385): console line breaks in terminal are non existent Android bug +* [Fixed #2266](https://github.com/NativeScript/nativescript-cli/issues/2266): CLI crashes/stops responding after ~80 console.logs + +**Other issues** +* [Fixed #1594](https://github.com/NativeScript/nativescript-cli/issues/1594): CLI does not respect shelljs errors +* [Fixed #2395](https://github.com/NativeScript/nativescript-cli/issues/2395): Error occurs when --justlaunch option used +* [Fixed #2379](https://github.com/NativeScript/nativescript-cli/issues/2379): Next release will be not backward compatbile with old proejcts. +* [Fixed #2370](https://github.com/NativeScript/nativescript-cli/issues/2370): Error: ENOENT: no such file or directory, chmod 'C:\Users\NSBUIL~1\AppData\Local\Temp\nsbuilduser\KillSwitches\cli' +* [Fixed #2240](https://github.com/NativeScript/nativescript-cli/issues/2240): Hooks inside app folder for template-hello-world-ng on tns create +* [Fixed #2228](https://github.com/NativeScript/nativescript-cli/issues/2228): Homebrew as root is no longer supported +* [Fixed #2227]( https://github.com/NativeScript/nativescript-cli/issues/2227): Remove use of lib/iOS folder for native plugins +* [Fixed #282]( https://github.com/NativeScript/nativescript-cli/issues/282): "tns platform add android --path TNSApp --symlink" does not work on Windows +* [Fixed #1802](https://github.com/NativeScript/nativescript-cli/issues/1802): semver copied to platforms/android even though it's a dev dependency + +2.4.2 (2016, December 8) +== +### Fixed +* [Fixed #2332](https://github.com/NativeScript/nativescript-cli/pull/2332): Fixed email registration process + +2.4.1 (2016, December 4) +== +### Fixed +* [Fixed #2200](https://github.com/NativeScript/nativescript-cli/pull/2200): TypeScript files don't show in {N} debugger. +* [Fixed #2273](https://github.com/NativeScript/nativescript-cli/pull/2273): Livesync should continue to work after app crash + +2.4.0 (2016, November 16) +== +### New +* [Implemented #2071](https://github.com/NativeScript/nativescript-cli/issues/2071): Add device alias command +* [Implemented #1968](https://github.com/NativeScript/nativescript-cli/issues/1968): Add `tns devices` as synonym for `tns device` +* [Implemented #2067](https://github.com/NativeScript/nativescript-cli/issues/2067): Build, run, and livesync commands should support the teamid option +* [Implemented #2111](https://github.com/NativeScript/nativescript-cli/issues/2111): Prevent app folder updates when --bundle option used +* [Implemented #2129](https://github.com/NativeScript/nativescript-cli/issues/2129): Show typescript file row:column in CLI log when possible +* [Implemented #2128](https://github.com/NativeScript/nativescript-cli/issues/2128): Add option to subscribe to NativeScript email lists when installing CLI +* [Implemented #2027](https://github.com/NativeScript/nativescript-cli/issues/2027): Create tns update command +* [Implemented #2157](https://github.com/NativeScript/nativescript-cli/issues/2157): Add support for Node 7 +* [Implemented #2151](https://github.com/NativeScript/nativescript-cli/issues/2151): Add snapshot plugin to project package.json +* [Implemented #2164](https://github.com/NativeScript/nativescript-cli/issues/2164): Deprecate support for Node 0.12 +* [Implemented #2149](https://github.com/NativeScript/nativescript-cli/issues/2149): Implement incremental prepare + +### Fixed +* [Fixed #2061](https://github.com/NativeScript/nativescript-cli/issues/2061): "Tns debug ios --watch" increase node processes after every change +* [Fixed #2081](https://github.com/NativeScript/nativescript-cli/issues/2081): List of all iOS devices produces an error +* [Fixed #2081](https://github.com/NativeScript/nativescript-cli/issues/2081): Check for iOS simulator and get full iOS logs on Mac +* [Fixed #2086](https://github.com/NativeScript/nativescript-cli/issues/2086): Stop calling npm install on each prepare of NG projects +* [Fixed #2087](https://github.com/NativeScript/nativescript-cli/issues/2087): Do not stop process when EPEERINVALID error is raised +* [Fixed #2088](https://github.com/NativeScript/nativescript-cli/issues/2088): Show helpful information when sync over WiFi error is detected +* [Fixed #2093](https://github.com/NativeScript/nativescript-cli/issues/2093): Fix getting iOS simulator device logs +* [Fixed #2094](https://github.com/NativeScript/nativescript-cli/issues/2094): "--framework-path" with no argument fails with "input.replace is not a function" message +* [Fixed #2056](https://github.com/NativeScript/nativescript-cli/issues/2056): Please let `tns` continue if it encounters a "does not satisfy its siblings' peerDependencies requirements! +* [Fixed #1980](https://github.com/NativeScript/nativescript-cli/issues/1980): Prepare does not work properly when plugin has only Android native implementaion +* [Fixed #1974](https://github.com/NativeScript/nativescript-cli/issues/1974): The plugin remove command fails with ENOENT +* [Fixed #2110](https://github.com/NativeScript/nativescript-cli/issues/2110): Prepare plugins without node_modules +* [Fixed #2072](https://github.com/NativeScript/nativescript-cli/issues/2072): First-time livesync fails on device +* [Fixed #2070](https://github.com/NativeScript/nativescript-cli/issues/2070): Tns debug Android --watch cannot be stopped with Ctrl + C command after a few changes in the code +* [Fixed #2152](https://github.com/NativeScript/nativescript-cli/issues/2152): Copy node_modules to platform on prepare (fix Node6/npm 3.x bug) +* [Fixed #2154](https://github.com/NativeScript/nativescript-cli/issues/2154): "tns device log" throws exception on real iOS devices +* [Fixed #2168](https://github.com/NativeScript/nativescript-cli/issues/2168): CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory +* [Fixed #2178](https://github.com/NativeScript/nativescript-cli/issues/2178): Running `tsc` after runing tests causes test execution to fail +* [Fixed #1398](https://github.com/NativeScript/nativescript-cli/issues/1398): CLI( tns ) Only can deploy first time to real iPhone device +* [Fixed #2155](https://github.com/NativeScript/nativescript-cli/issues/2155): CLI does not work with Node7 +* [Fixed #1989](https://github.com/NativeScript/nativescript-cli/issues/1989): TNS and dependencies vs devdependencies + +2.3.0 (2016, September 15) +== + +### Fixed +* [Fixed #2034](https://github.com/NativeScript/nativescript-cli/issues/2034): Fixed: Cannot read property "targetNum" of undefined +* [Fixed #2028](https://github.com/NativeScript/nativescript-cli/issues/2028):Fixed: Android Custom Activities and TNS incompatibility +* [Fixed #2025](https://github.com/NativeScript/nativescript-cli/issues/2025):Fixed: Add support for Node.js 6.5 +* [Fixed #2022](https://github.com/NativeScript/nativescript-cli/issues/2022):Fixed: LiveEdit restarts typescript projects +* [Fixed #1636](https://github.com/NativeScript/nativescript-cli/issues/1636):Fixed: The test android command fails to run tests + +2.2.1 (2016, August 15) +== + +### Fixed +* [Fixed #1985](https://github.com/NativeScript/nativescript-cli/issues/1985): Fixed: Livesync + debug on Android not working when there are changes in tns-core-modules. +* [Fixed #1993](https://github.com/NativeScript/nativescript-cli/issues/1993): Fixed: VisualStudio Code hangs when executing sync on iOS action. +* [Fixed #1994](https://github.com/NativeScript/nativescript-cli/issues/1985): Fixed: Livesync + debug syncs wrong files on Android. + +2.2.0 (2016, August 10) +== + +### New +* [Implemented #1959](https://github.com/NativeScript/nativescript-cli/issues/1959): XCode8/iOS10 support +* [Implemented #1948](https://github.com/NativeScript/nativescript-cli/issues/1948): npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue +* [Implemented #1944](https://github.com/NativeScript/nativescript-cli/issues/1944): Enhancement: tns plugin INSTALL alias +* [Implemented #1565](https://github.com/NativeScript/nativescript-cli/issues/1565): Livesync debugging support +* [Implemented #526](https://github.com/NativeScript/nativescript-cli/issues/526): Update plugin command + +### Fixed +* [Fixed #1958](https://github.com/NativeScript/nativescript-cli/issues/1958): CSS is not automatically livesynced in angular apps. +* [Fixed #1955](https://github.com/NativeScript/nativescript-cli/issues/1955): Livesync does not inform the user if no platforms are added but kills the process. +* [Fixed #1955](https://github.com/NativeScript/nativescript-cli/issues/1955): Livesync does not inform the user if no platforms are added but kills the process. +* [Fixed #1920](https://github.com/NativeScript/nativescript-cli/issues/1920): "tns debug ios" does not work. +* [Fixed #1912](https://github.com/NativeScript/nativescript-cli/issues/1912): "tns device run --device " noes no work. +* [Fixed #1909](https://github.com/NativeScript/nativescript-cli/issues/1909): "tns run android --emulator" deploy to device. +* [Fixed #1904](https://github.com/NativeScript/nativescript-cli/issues/1904): ERROR Provide a valid path to the desired application bundle.(with Device and Simulator running). +* [Fixed #1900](https://github.com/NativeScript/nativescript-cli/issues/1900): livesync EISDIR error when changing ".ts" file. +* [Fixed #1872](https://github.com/NativeScript/nativescript-cli/issues/1872): "tns livesync android" not updating application consistently. +* [Fixed #1508](https://github.com/NativeScript/nativescript-cli/issues/1508): Project with plugin variables does not build. +* [Fixed #1354](https://github.com/NativeScript/nativescript-cli/issues/1354): Livesync both Android and iOS at the same time, only android updates. + +2.1.0 (2016, June 30) +== + +### New +* [Implemented #1773](https://github.com/NativeScript/nativescript-cli/issues/1773): Show warning when livesync cannot reflect a change. +* [Implemented #1733](https://github.com/NativeScript/nativescript-cli/issues/1733): [node.js 6.x support] Native module sources is not supported. +* [Implemented #1731](https://github.com/NativeScript/nativescript-cli/issues/1731): Have the quick setup scripts create an AVD emulator. +* [Implemented #1650](https://github.com/NativeScript/nativescript-cli/issues/1650): Implement a shorthand --tsc option of the create command. +* [Implemented #1580](https://github.com/NativeScript/nativescript-cli/issues/1580): Add clean commands to tns. +* [Implemented #1517](https://github.com/NativeScript/nativescript-cli/issues/1517): Allow for apps to disable page reload livesyncs. + +### Fixed +* [Fixed #1883](https://github.com/NativeScript/nativescript-cli/issues/1883): Live sync recompiles the app every time in iOS when run first time. +* [Fixed #1853](https://github.com/NativeScript/nativescript-cli/issues/1853): Flag when Android devices are out of storage. +* [Fixed #1826](https://github.com/NativeScript/nativescript-cli/issues/1826): Replace Local Maven repository for Support Libraries with Android Support Repository. +* [Fixed #1810](https://github.com/NativeScript/nativescript-cli/issues/1810): tns livesync android --emulator --watch fails when create new folder. +* [Fixed #1790](https://github.com/NativeScript/nativescript-cli/issues/1790): tns publish ios fails with cocoapods. +* [Fixed #1777](https://github.com/NativeScript/nativescript-cli/issues/1777): Invalid XML kills livesync. +* [Fixed #1776](https://github.com/NativeScript/nativescript-cli/issues/1776): UnitTest app is packed within the published application which increases the size of the application. +* [Fixed #1770](https://github.com/NativeScript/nativescript-cli/issues/1770): "tns livesync ios --watch" doesn't sync changes if pacakgeId and folder name does not match. +* [Fixed #1752](https://github.com/NativeScript/nativescript-cli/issues/1752): Use spaces instead of tabs in package.json for consistency with npm. +* [Fixed #1746](https://github.com/NativeScript/nativescript-cli/issues/1746): Remove node_modules after preparing plugins. +* [Fixed #1739](https://github.com/NativeScript/nativescript-cli/issues/1739): NativeScript 2.0 warning needs to reference how to install updated cocoapods when xcode 7.3 supported version of pods is released. +* [Fixed #1734](https://github.com/NativeScript/nativescript-cli/issues/1734): ios builds with 2.0.0: Processing node_modules failed. TypeError: Cannot read property 'split' of null. +* [Fixed #1732](https://github.com/NativeScript/nativescript-cli/issues/1732): TNS 2.00 & Macintosh without Java/Android configured. +* [Fixed #1727](https://github.com/NativeScript/nativescript-cli/issues/1727): [Angular] Improve livesync performance for iOS. +* [Fixed #1725](https://github.com/NativeScript/nativescript-cli/issues/1725): Ctrl + C shortcut does not stop the livesync ios --watch command. +* [Fixed #1652](https://github.com/NativeScript/nativescript-cli/issues/1652): Analytics for OS X version. +* [Fixed #1620](https://github.com/NativeScript/nativescript-cli/issues/1620): Unable to debug on iOS using the --device option. +* [Fixed #1571](https://github.com/NativeScript/nativescript-cli/issues/1571): Livesync ios is not working when dependency has executable. +* [Fixed #1481](https://github.com/NativeScript/nativescript-cli/issues/1481): LiveSync doesn't show any changes to a modal page. +* [Fixed #1376](https://github.com/NativeScript/nativescript-cli/issues/1376): Consider removing --debug-brk parameter. +* [Fixed #1296](https://github.com/NativeScript/nativescript-cli/issues/1296): tns build breaks permanately if you have drawable-invalid name. +* [Fixed #485](https://github.com/NativeScript/nativescript-cli/issues/485): Platform specific prepare breaks source map paths. + 2.0.1 (2016, May 18) == ### Fixed @@ -470,4 +2537,4 @@ To list all available versions for ios, run $ npm view tns-ios versions
To l ### Fixed * [Fixed #299](https://github.com/NativeScript/nativescript-cli/issues/299): You cannot build the default `Hello World` app for Android on OS X systems. -* [Fixed #297](https://github.com/NativeScript/nativescript-cli/issues/297): You cannot install the NativeScript CLI. \ No newline at end of file +* [Fixed #297](https://github.com/NativeScript/nativescript-cli/issues/297): You cannot install the NativeScript CLI. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..1c845d0b10 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,83 @@ +# NativeScript Community Code of Conduct + +Our community members come from all walks of life and are all at different stages of their personal and professional journeys. To support everyone, we've prepared a short code of conduct. Our mission is best served in an environment that is friendly, safe, and accepting; free from intimidation or harassment. + +Towards this end, certain behaviors and practices will not be tolerated. + +## tl;dr + +- Be respectful. +- We're here to help. +- Abusive behavior is never tolerated. +- Violations of this code may result in swift and permanent expulsion from the NativeScript community channels. + +## Administrators + +- Dan Wilson (@DanWilson on Slack) +- Jen Looper (@jen.looper on Slack) +- TJ VanToll (@tjvantoll on Slack) + +## Scope + +We expect all members of the NativeScript community, including administrators, users, facilitators, and vendors to abide by this Code of Conduct at all times in our community venues, online and in person, and in one-on-one communications pertaining to NativeScript affairs. + +This policy covers the usage of the NativeScript Slack community, as well as the NativeScript support forums, NativeScript GitHub repositories, the NativeScript website, and any NativeScript-related events. This Code of Conduct is in addition to, and does not in any way nullify or invalidate, any other terms or conditions related to use of NativeScript. + +The definitions of various subjective terms such as "discriminatory", "hateful", or "confusing" will be decided at the sole discretion of the NativeScript administrators. + +## Friendly, Harassment-Free Space + +We are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. + +We ask that you please respect that people have differences of opinion regarding technical choices, and acknowledge that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer. A difference of technology preferences is never a license to be rude. + +Any spamming, trolling, flaming, baiting, or other attention-stealing behaviour is not welcome, and will not be tolerated. + +Harassing other users of NativeScript is never tolerated, whether via public or private media. + +Avoid using offensive or harassing package names, nicknames, or other identifiers that might detract from a friendly, safe, and welcoming environment for all. + +Harassment includes, but is not limited to: harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics; inappropriate use of nudity, sexual images, and/or sexually explicit language in public spaces; threats of physical or non-physical harm; deliberate intimidation, stalking or following; harassing photography or recording; sustained disruption of talks or other events; inappropriate physical contact; and unwelcome sexual attention. + +## Acceptable Content + +The NativeScript administrators reserve the right to make judgement calls about what is and isn't appropriate in published content. These are guidelines to help you be successful in our community. + +Content must contain something applicable to the previously stated goals of the NativeScript community. "Spamming", that is, publishing any form of content that is not applicable, is not allowed. + +Content must not contain illegal or infringing content. You should only publish content to NativeScript properties if you have the right to do so. This includes complying with all software license agreements or other intellectual property restrictions. For example, redistributing an MIT-licensed module with the copyright notice removed, would not be allowed. You will be responsible for any violation of laws or others’ intellectual property rights. + +Content must not be malware. For example, content (code, video, pictures, words, etc.) which is designed to maliciously exploit or damage computer systems, is not allowed. + +Content name, description, and other visible metadata must not include abusive, inappropriate, or harassing content. + +## Reporting Violations of this Code of Conduct + +If you believe someone is harassing you or has otherwise violated this Code of Conduct, please contact the administrators and send us an abuse report. If this is the initial report of a problem, please include as much detail as possible. It is easiest for us to address issues when we have more context. + +## Consequences + +All content published to the NativeScript community channels is hosted at the sole discretion of the NativeScript administrators. + +Unacceptable behavior from any community member, including sponsors, employees, customers, or others with decision-making authority, will not be tolerated. + +Anyone asked to stop unacceptable behavior is expected to comply immediately. + +If a community member engages in unacceptable behavior, the NativeScript administrators may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event or service). + +## Addressing Grievances + +If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify the administrators. We will do our best to ensure that your grievance is handled appropriately. + +In general, we will choose the course of action that we judge as being most in the interest of fostering a safe and friendly community. + +## Contact Info +Please contact Dan Wilson @DanWilson if you need to report a problem or address a grievance related to an abuse report. + +You are also encouraged to contact us if you are curious about something that might be "on the line" between appropriate and inappropriate content. We are happy to provide guidance to help you be a successful part of our community. + +## Credit and License + +This Code of Conduct borrows heavily from the WADE Code of Conduct, which is derived from the NodeBots Code of Conduct, which in turn borrows from the npm Code of Conduct, which was derived from the Stumptown Syndicate Citizen's Code of Conduct, and the Rust Project Code of Conduct. + +This document may be reused under a Creative Commons Attribution-ShareAlike License. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index caf03c6503..8cc5756fd9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,31 +3,22 @@ Contribute to the Telerik NativeScript Command-Line Interface *Help us improve the Telerik NativeScript CLI* -The Telerik NativeScript CLI lets you create, build, and deploy NativeScript-based projects on iOS and Android devices. - -* [Report an Issue](#bug "Learn how to report an issue") -* [Request a Feature](#request "Learn how to submit a feature or improvement request") -* [Contribute to the Code Base](#contribute "Learn how to submit your own improvements to the code") +* [Report an Issue](#report-an-issue "Learn how to report an issue") +* [Request a Feature](#request-a-feature "Learn how to submit a feature or improvement request") +* [Contribute to the Code Base](#contribute-to-the-code-base "Learn how to submit your own improvements to the code") +* [Updating the CLI Documentation](#updating-the-cli-documentation "Learn how to make changes to CLI help and documentation") Report an Issue === If you find a bug in the source code or a mistake in the documentation, you can submit an issue to our [GitHub Repository][2]. Before you submit your issue, search the archive to check if a similar issues has been logged or addressed. This will let us focus on fixing issues and adding new features. -If your issue appears to be a bug, and hasn't been reported, open a new issue. To help us investigate your issue and respond in a timely manner, you can provide is with the following details. - -* **Overview of the issue:** Provide a short description of the visible symptoms. If applicable, include error messages, screen shots, and stack traces. -* **Motivation for or use case:** Let us know how this particular issue affects your work. -* **Telerik NativeScript version(s):** List the current version and build number of the CLI interface. You can get it by running `tns --version`. Let us know if you have not observed this behavior in earlier versions and if you consider it a regression. -* **System configuration:** Provide us with relevant system configuration information such as operating system, network connection, proxy usage, etc. Let us know if you have been able to reproduce the issue on multiple setups. -* **Steps to reproduce:** If applicable, submit a step-by-step walkthrough of how to reproduce the issue. -* **Related issues:** If you discover a similar issue in our archive, give us a heads up - it might help us identify the culprit. -* **Suggest a fix:** You are welcome to suggest a bug fix or pinpoint the line of code or the commit that you believe has introduced the issue. +If your issue appears to be a bug, and hasn't been reported, open a new issue and select the `Bug report` option. To help us investigate your issue and respond in a timely manner, please follow the recommended bug report template. [Back to Top][1] Request a Feature === -You can request a new feature by submitting an issue with the *enhancement* label to our [GitHub Repository][2]. +You can request a new feature by opening a new issue, selecting the `Feature request` option and following the recommended feature request template. If you want to implement a new feature yourself, consider submitting it to the [GitHub Repository][2] as a Pull Request. [Back to Top][1] @@ -42,13 +33,9 @@ Before you submit a Pull Request, consider the following guidelines. ```bash git clone git@github.com:NativeScript/nativescript-cli.git ``` -* Initialize the submodule. +* Run the setup script. This will initialize the git submodule, install the node dependencies and build with grunt. ```bash - git submodule init -``` -* Fetch data from the submodule. -```bash - git submodule update + npm run setup ``` * Make your changes in a new `git` branch. We use the Gitflow branching model so you will have to branch from our master branch. ```bash @@ -57,19 +44,19 @@ Before you submit a Pull Request, consider the following guidelines. * Create your patch and include appropriate test cases. * Build your changes locally. ```bash - grunt + ./node_modules/.bin/grunt ``` * Ensure all the tests pass. ```bash - grunt test + ./node_modules/.bin/grunt test ``` * Ensure that your code passes the linter. ```bash - grunt lint + ./node_modules/.bin/grunt lint ``` -* Commit your changes and create a descriptive commit message (the commit message is used to generate release notes). +* Commit your changes following the [commit message guidelines](https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#-commit-message-guidelines) (the commit message is used to generate release notes). ```bash - git commit -a + git commit -m "fix: my awesome fix" ``` * Push your branch to GitHub. ```bash @@ -105,5 +92,18 @@ When the patch is reviewed and merged, you can safely delete your branch and pul [Back to Top][1] +Updating the CLI Documentation +=== + +The CLI documentation is what you see when running the `ns help` command. +This documentation is distributed as part of the CLI package and is generated from the *.md files that can be found in man_pages folder +The output of the documentation is html static pages that are generated on post install hook of the CLI installation. +In addition, documentation generation is triggered every time there is no html article for the respective help command that is executed. + +In order to see a change applied in your development workspace after editing the *.md files, you can use the `ns dev-generate-help` command. +This will trigger regeneration of all html files on your local environment. Mind that you need to run from the /bin folder of the nativescript_cli. + +[Back to Top][1] + [1]: #contribute-to-the-telerik-nativescript-command-line-interface [2]: https://github.com/NativeScript/nativescript-cli diff --git a/CocoaPods.md b/CocoaPods.md deleted file mode 100644 index 57a40e1015..0000000000 --- a/CocoaPods.md +++ /dev/null @@ -1,102 +0,0 @@ -# Using CocoaPods - -When you develop for iOS, you can quickly add third-party libraries to your NativeScript projects via the [CocoaPods](https://cocoapods.org/) dependency manager. - -To work with such libraries, you need to wrap them as a custom NativeScript plugin and add them to your project. - - * [Install CocoaPods](#install-cocoapods) - * [Create CLI Project](#create-cli-project) - * [Wrap the Library as NativeScript Plugin](#wrap-the-library-as-nativescript-plugin) - * [Build the Project](#build-the-project) - -## Install CocoaPods -You need to install CocoaPods. If you haven't yet, you can do so by running: - -```bash -$ sudo gem install cocoapods -``` -> **NOTE:** All operations and code in this article are verified against CocoaPods 0.38.2. - -To check your current version, run the following command. - -```bash -$ pod --version -``` - -To update CocoaPods, just run the installation command again. - -``` -sudo gem install cocoapods -``` - -## Create CLI Project -To start, create a project and add the iOS platform. - -```bash -$ tns create MYCocoaPodsApp -$ cd MYCocoaPodsApp -$ tns platform add ios -``` - -## Wrap the Library as NativeScript Plugin - -For more information about working with NativeScript plugins, click [here](PLUGINS.md). - -```bash -cd .. -mkdir my-plugin -cd my-plugin -``` - -Create a `package.json` file with the following content: - -```json -{ - "name": "my-plugin", - "version": "0.0.1", - "nativescript": { - "platforms": { - "ios": "1.3.0" - } - } -} -``` - -Create a [Podfile](https://guides.cocoapods.org/syntax/podfile.html) which describes the dependency to the library that you want to use. Move it to the `platforms/ios` folder. - -``` -my-plugin/ -├── package.json -└── platforms/ - └── ios/ - └── Podfile -``` - -Podfile: -``` -pod 'GoogleMaps' -``` - -## Install the Plugin - -Next, install the plugin: - -```bash -tns plugin add ../my-plugin -``` - -> **NOTE:** Installing CocoaPods sets the deployment target of your app to iOS 8, if not already set to iOS 8 or later. This change is required because CocoaPods are installed as shared frameworks to ensure that all symbols are available at runtime. - -## Build the Project - -```bash -tns build ios -``` - -This modifies the `MYCocoaPodsApp.xcodeproj` and creates a workspace with the same name. - -> **IMPORTANT:** You will no longer be able to run the `xcodeproj` alone. NativeScript CLI will build the newly created workspace and produce the correct package. - -## Troubleshooting - -In case of post-build linker errors, you might need to resolve missing dependencies to native frameworks required by the installed CocoaPod. For more information about how to create the required links, see the [build.xcconfig specification](PLUGINS.md#buildxcconfig-specification). diff --git a/Gruntfile.js b/Gruntfile.js index 0bbd35e43e..a08b50c319 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,24 +1,37 @@ -var now = new Date().toISOString(); +const childProcess = require("child_process"); +const EOL = require("os").EOL; +const path = require("path"); +const now = new Date().toISOString(); +const manifest = require('pacote').manifest; + + +const ENVIRONMENTS = { + live: "live", + dev: "dev" +}; + +const GA_TRACKING_IDS = { + [ENVIRONMENTS.dev]: "UA-111455-51", + [ENVIRONMENTS.live]: "UA-111455-44" +}; + +const CONFIG_DATA = { + filePath: "config/config.json", + gaKey: "GA_TRACKING_ID" +} function shallowCopy(obj) { var result = {}; - Object.keys(obj).forEach(function(key) { + Object.keys(obj).forEach(function (key) { result[key] = obj[key]; }); return result; } var travis = process.env["TRAVIS"]; -var buildNumber = process.env["TRAVIS_BUILD_NUMBER"] || process.env["BUILD_NUMBER"] || "non-ci"; - -module.exports = function(grunt) { - var path = require("path"); - var commonLibNodeModules = path.join("lib", "common", "node_modules"); - if(require("fs").existsSync(commonLibNodeModules)) { - grunt.file.delete(commonLibNodeModules); - } - grunt.file.write(path.join("lib", "common", ".d.ts"), ""); +var buildNumber = process.env["PACKAGE_VERSION"] || process.env["BUILD_NUMBER"] || "non-ci"; +module.exports = function (grunt) { grunt.initConfig({ copyPackageTo: process.env["CopyPackageTo"] || ".", @@ -28,28 +41,20 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON("package.json"), ts: { - options: { - target: 'es5', - module: 'commonjs', - sourceMap: true, - declaration: false, - removeComments: false, - noImplicitAny: true, - experimentalDecorators: true - }, + options: grunt.file.readJSON("tsconfig.json").compilerOptions, devlib: { - src: ["lib/**/*.ts", "!lib/common/node_modules/**/*.ts", "!lib/common/messages/**/*.ts"], + src: ["lib/**/*.ts", "!lib/common/node_modules/**/*.ts"], reference: "lib/.d.ts" }, devall: { - src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts", "!lib/common/messages/**/*.ts", "lib/common/test/unit-tests/**/*.ts", "definitions/**/*.ts", "!lib/common/test/.d.ts"], + src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts", "lib/common/test/unit-tests/**/*.ts", "definitions/**/*.ts", "!lib/common/test/.d.ts"], reference: "lib/.d.ts" }, release_build: { - src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts", "!lib/common/messages/**/*.ts"], + src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts"], reference: "lib/.d.ts", options: { sourceMap: false, @@ -58,17 +63,6 @@ module.exports = function(grunt) { }, }, - tslint: { - build: { - files: { - src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts", "!lib/common/messages/**/*.ts", "lib/common/test/unit-tests/**/*.ts", "definitions/**/*.ts", "!lib/**/*.d.ts" , "!test/**/*.d.ts"] - }, - options: { - configuration: grunt.file.readJSON("./tslint.json") - } - } - }, - watch: { devall: { files: ["lib/**/*.ts", 'test/**/*.ts', "!lib/common/node_modules/**/*.ts", "!lib/common/messages/**/*.ts"], @@ -104,7 +98,7 @@ module.exports = function(grunt) { command: "npm pack", options: { execOptions: { - env: (function() { + env: (function () { var env = shallowCopy(process.env); env["NATIVESCRIPT_SKIP_POSTINSTALL_TASKS"] = "1"; return env; @@ -119,19 +113,43 @@ module.exports = function(grunt) { }, - copy: { - package_to_drop_folder: { - src: "*.tgz", - dest: "<%= copyPackageTo %>/<%= jobName %>/<%= dateString %> #<%= buildNumber %>/" - }, - package_to_qa_drop_folder: { - src: "*.tgz", - dest: "<%= copyPackageTo %>/<%= jobName %>/nativescript.tgz" - } - }, - clean: { - src: ["test/**/*.js*", "lib/**/*.js*", "!lib/common/vendor/*.js", "!lib/common/**/*.json", "!lib/common/Gruntfile.js", "!lib/common/node_modules/**/*", "!lib/common/hooks/**/*.js", "!lib/common/bin/*.js", "*.tgz"] + src: ["test/**/*.js*", + "!test/files/**/*.js*", + "lib/**/*.js*", + "!test-scripts/**/*", + "!lib/common/vendor/*.js", + "!lib/common/**/*.json", + "!lib/common/Gruntfile.js", + "!lib/common/node_modules/**/*", + "!lib/common/hooks/**/*.js", + "!lib/common/bin/*.js", + "!lib/common/test-scripts/**/*", + "!lib/common/scripts/**/*", + "!lib/common/test/resources/**/*", + "*.tgz"] + }, + template: { + 'process-markdowns': { + options: { + data: { + "isJekyll": true, + "isHtml": true, + "isConsole": true, + "isWindows": true, + "isMacOS": true, + "isLinux": true, + "constants": "" + } + }, + files: [{ + expand: true, + cwd: "docs/man_pages/", + src: "**/*.md", + dest: "docs-cli/", + ext: ".md" + }] + } } }); @@ -140,9 +158,12 @@ module.exports = function(grunt) { grunt.loadNpmTasks("grunt-contrib-watch"); grunt.loadNpmTasks("grunt-shell"); grunt.loadNpmTasks("grunt-ts"); - grunt.loadNpmTasks("grunt-tslint"); + grunt.loadNpmTasks("grunt-template"); - grunt.registerTask("set_package_version", function(version) { + grunt.registerTask("set_package_version", function (version) { + // NOTE: DO NOT call this task in npm's prepack script - it will change the version in package.json, + // but npm will still try to publish the version that was originally specified in the package.json/ + // Also this may break some Jenkins builds as the produced package will have unexpected name. var buildVersion = version !== undefined ? version : buildNumber; if (process.env["BUILD_CAUSE_GHPRBCAUSE"]) { buildVersion = "PR" + buildVersion; @@ -150,41 +171,127 @@ module.exports = function(grunt) { var packageJson = grunt.file.readJSON("package.json"); var versionParts = packageJson.version.split("-"); - if (process.env["RELEASE_BUILD"]) { -// HACK - excluded until 1.0.0 release or we refactor our project infrastructure (whichever comes first) -// packageJson.version = versionParts[0]; - } else { + + // The env is used in Jenkins job to produce package that will be releasd with "latest" tag in npm (i.e. strict version). + if (!process.env["RELEASE_BUILD"]) { versionParts[1] = buildVersion; packageJson.version = versionParts.join("-"); } + grunt.file.write("package.json", JSON.stringify(packageJson, null, " ")); }); - grunt.registerTask("enableScripts", function(enable) { - var enableTester = /false/i; - var newScriptsAttr = !enableTester.test(enable) ? "scripts" : "skippedScripts"; - var packageJson = grunt.file.readJSON("package.json"); - var oldScriptsAttrValue = packageJson.scripts || packageJson.skippedScripts; - delete packageJson.scripts; - delete packageJson.skippedScripts; - packageJson[newScriptsAttr] = oldScriptsAttrValue; - grunt.file.write("package.json", JSON.stringify(packageJson, null, " ")); + grunt.registerTask("tslint:build", function (version) { + childProcess.execSync("npm run tslint", { stdio: "inherit" }); + }); + + const setConfig = (key, value) => { + const configJson = grunt.file.readJSON(CONFIG_DATA.filePath); + configJson[key] = value; + const stringConfigContent = JSON.stringify(configJson, null, " ") + EOL; + grunt.file.write(CONFIG_DATA.filePath, stringConfigContent); + } + + grunt.registerTask("set_live_ga_id", function () { + setConfig(CONFIG_DATA.gaKey, GA_TRACKING_IDS[ENVIRONMENTS.live]); + }); + + grunt.registerTask("set_dev_ga_id", function () { + setConfig(CONFIG_DATA.gaKey, GA_TRACKING_IDS[ENVIRONMENTS.dev]); + }); + + grunt.registerTask("verify_live_ga_id", function () { + var configJson = grunt.file.readJSON(CONFIG_DATA.filePath); + + if (configJson[CONFIG_DATA.gaKey] !== GA_TRACKING_IDS[ENVIRONMENTS.live]) { + throw new Error("Google Analytics id is not configured correctly."); + } }); grunt.registerTask("test", ["ts:devall", "shell:npm_test"]); - grunt.registerTask("pack", [ + + registerTestingDependenciesTasks(grunt); + + grunt.registerTask("prepare", [ "clean", "ts:release_build", + "generate_unit_testing_dependencies", + "verify_unit_testing_dependencies", "shell:npm_test", + "set_live_ga_id", + "verify_live_ga_id" + ]); + grunt.registerTask("pack", [ "set_package_version", - "shell:build_package", - - "copy:package_to_drop_folder", - "copy:package_to_qa_drop_folder" + "shell:build_package" ]); + + grunt.registerTask("travisPack", function () { + if (travis && process.env.TRAVIS_PULL_REQUEST_BRANCH) { + return grunt.task.run("pack"); + } + + // Set correct version in Travis job, so the deploy will not publish strict version (for example 5.2.0). + grunt.task.run("set_package_version"); + console.log(`Skipping pack step as the current build is not from PR, so it will be packed from the deploy provider.`); + }); grunt.registerTask("lint", ["tslint:build"]); grunt.registerTask("all", ["clean", "test", "lint"]); - grunt.registerTask("rebuild", ["clean", "ts:devlib"]); - grunt.registerTask("default", "ts:devlib"); + grunt.registerTask("rebuild", ["clean", "default"]); + grunt.registerTask("default", ["ts:devlib", "generate_unit_testing_dependencies"]); + grunt.registerTask("docs-jekyll", ['template']); }; + +function registerTestingDependenciesTasks(grunt) { + const configsBasePath = path.join(__dirname, "config"); + const generatedVersionFilePath = path.join(configsBasePath, "test-deps-versions-generated.json"); + + grunt.registerTask("generate_unit_testing_dependencies", async function () { + const done = this.async(); + + const dependenciesVersions = {}; + let testDependencies; + + try { + testDependencies = grunt.file.readJSON(path.join(configsBasePath, "test-dependencies.json")); + } catch (err) { + grunt.log.error("Could not read test-dependencies.json:", err); + return done(false); + } + + (async () => { + try { + for (const dep of testDependencies) { + if (dep.version) { + dependenciesVersions[dep.name] = dep.version; + } else { + dependenciesVersions[dep.name] = await latestVersion(dep.name); + } + } + grunt.file.write( + generatedVersionFilePath, + JSON.stringify(dependenciesVersions, null, 2) + ); + grunt.log.writeln("Wrote", generatedVersionFilePath); + done(); + } catch (err) { + grunt.log.error(err); + done(false); + } + })(); + }); + + grunt.registerTask("verify_unit_testing_dependencies", function () { + if (!grunt.file.exists(generatedVersionFilePath)) { + throw new Error("Unit testing dependencies are not configured."); + } + }); +} + +async function latestVersion(name) { + // only fetches the package.json for the latest dist-tag + const { version } = await manifest(name.toLowerCase(), { fullMetadata: false }); + return version; +} + diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 index 2c63567572..451412229a --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright (c) 2015-2016 Telerik AD + Copyright (c) 2020, nStudio, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ Apache License distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/PLUGINS.md b/PLUGINS.md deleted file mode 100644 index e811271028..0000000000 --- a/PLUGINS.md +++ /dev/null @@ -1,354 +0,0 @@ -PLUGINS -========= - -Starting with NativeScript CLI 1.1.0, you can develop or use plugins in your NativeScript projects. - -* [What Are NativeScript Plugins](#what-are-nativescript-plugins) -* [Create a Plugin](#create-a-plugin) - * [Directory Structure](#directory-structure) - * [`package.json` Specification](#packagejson-specification) - * [`include.gradle` Specification](#includegradle-specification) - * [`build.xcconfig` Specification](#buildxcconfig-specification) -* [Install a Plugin](#install-a-plugin) - * [Valid Plugin Sources](#valid-plugin-sources) - * [Installation Specifics](#installation-specifics) - * [Manual Steps After Installation](#manual-steps-after-installation) -* [Use a Plugin](#use-a-plugin) -* [Remove a Plugin](#remove-a-plugin) - * [Removal Specifics](#removal-specifics) - * [Manual Steps After Removal](#manual-steps-after-removal) - -## What Are NativeScript Plugins - -A NativeScript plugin is any npm package, published or not, that exposes a native API via JavaScript and consists of the following elements. - -* A `package.json` file which contains the following metadata: name, version, supported runtime versions, dependencies and others. For more information, see the [`package.json` Specification](#packagejson-specification) section. -* One or more CommonJS modules that expose a native API via a unified JavaScript API. For more information about Common JS modules, see the [CommonJS Wiki](http://wiki.commonjs.org/wiki/CommonJS). -* (Optional) `AndroidManifest.xml` and `Info.plist` which describe the permissions, features or other configurations required or used by your app for Android and iOS, respectively. -* (Optional) Native Android libraries and the native Android `include.gradle` configuration file which describes the native dependencies. For more information, see the [`include.gradle` Specification](#includegradle-specification) section. -* (Optional) Native iOS libraries and the native `build.xcconfig` configuration file which describes the native dependencies. For more information, see the [`build.xcconfig` Specification](#buildxcconfig-specification) section. - -The plugin must have the directory structure, described in the [Directory Structure](#directory-structure) section. - -## Create a Plugin - -If the NativeScript framework does not expose a native API that you need, you can develop a plugin which exposes the required functionality. When you develop a plugin, keep in mind the following requirements. - -* The plugin must be a valid npm package. -* The plugin must expose a built-in native API or a native API available via custom native libraries. -* The plugin must be written in JavaScript and must comply with the CommonJS specification. If you are using a transpiler, make sure to include the transpiled JavaScript files in your plugin. -* The plugin directory structure must comply with the specification described below. -* The plugin must contain a valid `package.json` which complies with the specification described below. -* If the plugin requires any permissions, features or other configuration specifics, it must contain `AndroidManifest.xml` or `Info.plist` file which describe them. -* If the plugin depends on native libraries, it must contain a valid `include.gradle` or `build.xcconfig` file, which describes the dependencies. - -### Directory Structure - -NativeScript plugins which consist of one CommonJS module might have the following directory structure. - -``` -my-plugin/ -├── index.js -├── package.json -└── platforms/ - ├── android/ - │ ├── res/ - │ └── AndroidManifest.xml - └── ios/ - └── Info.plist -``` - -NativeScript plugins which consist of multiple CommonJS modules might have the following directory structure. - -``` -my-plugin/ -├── index.js -├── package.json -├── MyModule1/ -│ ├── index1.js -│ └── package.json -├── MyModule2/ -│ ├── index2.js -│ └── package.json -└── platforms/ - ├── android/ - │ ├── AndroidManifest.xml - │ └── res/ - └── ios/ - └── Info.plist -``` - -* `index.js`: This file is the CommonJS module which exposes the native API. You can use platform-specific `*.platform.js` files. For example: `index.ios.js` and `index.android.js`. During the plugin installation, the NativeScript CLI will copy the platform resources to the `tns_modules` subdirectory in the correct platform destination in the `platforms` directory of your project.
Alternatively, you can give any name to this CommonJS module. In this case, however, you need to point to this file by setting the `main` key in the `package.json` for the plugin. For more information, see [Folders as Modules](https://nodejs.org/api/modules.html#modules_folders_as_modules). -* `package.json`: This file contains the metadata for your plugin. It sets the supported runtimes, the plugin name and version and any dependencies. The `package.json` specification is described in detail below. -* `platforms\android\AndroidManifest.xml`: This file describes any specific configuration changes required for your plugin to work. For example: required permissions. For more information about the format of `AndroidManifest.xml`, see [App Manifest](http://developer.android.com/guide/topics/manifest/manifest-intro.html).
During build, gradle will merge the plugin `AndroidManifest.xml` with the `AndroidManifest.xml` for your project. The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues. -* `platforms\android\res`: (Optional) This directory contains resources declared by the `AndroidManifest.xml` file. You can look at the folder structure [here](http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes). -* `platforms\ios\Info.plist`: This file describes any specific configuration changes required for your plugin to work. For example, required permissions. For more information about the format of `Info.plist`, see [About Information Property List Files](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html).
During the plugin installation, the NativeScript CLI will merge the plugin `Info.plist` with the `Info.plist` for your project. The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues. - -NativeScript plugins which contain both native Android and iOS libraries might have the following directory structure. - -``` -my-plugin/ -├── ... -└── platforms/ - ├── android/ - │ ├── res/ - │ ├── MyLibrary.jar - │ ├── MyLibrary.aar - │ ├── include.gradle - │ └── AndroidManifest.xml - └── ios/ - ├── MyiOSFramework.framework - ├── build.xcconfig - ├── Podfile - ├── Info.plist - ├── MyStaticiOSLibrary.a - └── include/ - └── MyStaticiOSLibrary/ - └── ... -``` - -* `platforms\android`: This directory contains any native Android libraries packaged as `*.jar` and `*.aar` packages. These native libraries can reside in the root of this directory or in a user-created sub-directory. During the plugin installation, the NativeScript CLI will configure the Android project in `platforms\android` to work with the plugin. -* `platforms\android\res`: (Optional) This directory contains resources declared by the `AndroidManifest.xml` file. You can look at the folder structure [here](http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes). -* `platforms\android\include.gradle`: This file modifies the native Android configuration of your NativeScript project such as native dependencies, build types and configurations. For more information about the format of `include.gradle`, see [`include.gradle` file](#includegradle-specification). -* `platforms\ios`: This directory contains native dynamic iOS Cocoa Touch Frameworks (`.framework`) and Cocoa Touch Static Libraries (`.a`). During the plugin installation, the NativeScript CLI will copy these files to `lib\iOS` in your project and will configure the iOS project in `platforms\ios` to work with the libraries. If the library is written in Swift, only APIs exposed to Objective-C are exposed to NativeScript. In case the plugin contains a Cocoa Touch Static Library (`.a`), you must place all public headers (`.h`) under `include\\`. Make sure that the static libraries are built at least for the following processor architectures - armv7, arm64, i386. -* `platforms\ios\build.xcconfig`: This file modifies the native iOS configuration of your NativeScript project such as native dependencies and configurations. For more information about the format of `build.xcconfig`, see [`build.xcconfig` file](#buildxcconfig-specification). -* `platforms\ios\Podfile`: This file describes the dependency to the library that you want to use. For more information, see [the CocoaPods article](CocoaPods.md). - -### Package.json Specification - -Every NativeScript plugin should contain a valid `package.json` file in its root. This `package.json` file must meet the following requirements. - -* It must comply with the [npm specification](https://docs.npmjs.com/files/package.json).
The `package.json` must contain at least `name` and `version` pairs. You will later use the plugin in your code by requiring it by its `name`. -* It must contain a `nativescript` section which describes the supported NativeScript runtimes and their versions. This section can be empty. If you want to define supported platforms and runtimes, you can nest a `platforms` section. In this `platforms` section, you can nest `ios` and `android` key-value pairs. The values in these pairs must be valid runtime versions or ranges of values specified by a valid semver(7) syntax. -* If the plugin depends on other npm modules, it must contain a `dependencies` section as described [here](https://docs.npmjs.com/files/package.json#dependencies).
The NativeScript CLI will resolve the dependencies during the plugin installation. - -#### Package.json Example - -The following is an example of a `package.json` file for a NativeScript plugin which supports the 1.0.0 version of the iOS runtime and the 1.1.0 version of the Android runtime. - -```JSON -{ - "name": "myplugin", - "version": "0.0.1", - "nativescript": { - "platforms": { - "ios": "1.0.0", - "android": "1.1.0" - } - } -} -``` - -### Include.gradle Specification - -Every NativeScript plugin, which contains native Android dependencies, should also contain a valid `include.gradle` file in the root of its `platforms\android` directory. This `include.gradle` file must meet the following requirements. - -* It must contain its own [configuration](http://developer.android.com/tools/building/configuring-gradle.html). -* It might contain native dependencies required to build the plugin properly. -* Any native dependencies should be available in [jcenter](https://bintray.com/bintray/jcenter) or from the Android SDK installed on your machine. - -> **IMPORTANT:** If you don't have an `include.gradle` file, at build time, gradle will create a default one containing all default elements. - -#### Include.gradle Example -```gradle -//default elements -android { - productFlavors { - "my-plugin" { - dimension "my-plugin" - } - } -} - -//optional elements -dependencies { - compile "groupName:pluginName:ver" -} -``` - -### Build.xcconfig Specification -Every NativeScript plugin, which contains native iOS dependencies, can also contain a [valid](https://pewpewthespells.com/blog/xcconfig_guide.html) `build.xcconfig` file in the root of its `platforms\ios` directory. This `build.xcconfig` file might contain native dependencies required to build the plugin properly. - -#### Build.xcconfig Example -``` -OTHER_LDFLAGS = $(inherited) -framework "QuartzCore" -l"sqlite3" -``` - -## Install a Plugin - -To install a plugin for your project, inside your project, run the following command. - -```Shell -tns plugin add -``` - -### Valid Plugin Sources - -You can specify a plugin by name in the npm registry, local path or URL. The following are valid values for the `` attribute. - -* A `` or `@` for plugins published in the npm registry. -* A `` to the directory which contains the plugin files and its `package.json` file. -* A `` to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file. -* A `` which resolves to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file. -* A `` which resolves to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file. - -### Installation Specifics - -The installation of a NativeScript plugin mimics the installation of an npm module. - -The NativeScript CLI takes the plugin and installs it to the `node_modules` directory in the root of your project. During this process, the NativeScript CLI resolves any dependencies described in the plugin `package.json` file and adds the plugin to the project `package.json` file in the project root. - -If the NativeScript CLI detects any native iOS libraries in the plugin, it copies the library files to the `lib\ios` folder in your project and configures the iOS-specific projects in `platforms\ios` to work with the library. - -Next, the NativeScript CLI runs a partial `prepare` operation for the plugin for all platforms configured for the project. During this operation, the CLI copies only the plugin to the `tns_modules` subdirectories in the `platforms\android` and `platforms\ios` directories in your project. If your plugin contains platform-specific `JS` files, the CLI copies them to the respective platform subdirectory and renames them by removing the platform modifier. - -> **TIP:** If you have not configured any platforms, when you run `$ tns platform add`, the NativeScript CLI will automatically prepare all installed plugins for the newly added platform. - -Finally, the CLI merges the plugin `Info.plist` file with `platforms\ios\Info.plist` in your project. The plugin `AndroidManifest.xml` will be merged with `platforms\android\AndroidManifest.xml` later, at build time. - -> **IMPORTANT:** Currently, the merging of the platform configuration files does not resolve any contradicting or duplicate entries. - -#### AndroidManifest.xml Merge Example - -The following is an example of a plugin `AndroidManifest`, project `AndroidManifest.xml` and the resulting merged file after the plugin installation. - -**The Plugin Manifest** - -```XML - - - - - - - - - - - - - - - -``` - -**The Project Manifest Located in `platforms\android\`** - -```XML - - - - - - - - - - - - - - - - - - - - -``` - -**The Merged Manifest Located in `platforms\android\`** - -```XML - - - - - - - - - - - - - - - - - - - - - - - - - -``` - -### Manual Steps After Installation - -After the installation is complete, you need to open `platforms\android\AndroidManifest.xml` and `platforms\ios\Info.plist` in your project and inspect them for duplicate or contradicting entries. Make sure to preserve the settings required by the plugin. Otherwise, your app might not build or it might not work as expected, when deployed on device. - -## Use a Plugin - -To use a plugin inside your project, you need to add a `require` in your app. - -```JavaScript -var myPlugin = require("myplugin"); -``` - -This will look for a `myplugin` module with a valid `package.json` file in the `tns_modules` directory. Note that you must require the plugin with the value for the `name` key in the plugin `package.json` file. - -## Remove a Plugin - -To remove a plugin from your project, inside your project, run the following command. - -```Shell -tns plugin remove -``` - -You must specify the plugin by the value for the `name` key in the plugin `package.json` file. - -### Removal Specifics - -The removal of a NativeScript plugin mimics the removal of an npm module. - -The NativeScript CLI removes any plugin files from the `node_modules` directory in the root of your project. During this process, the NativeScript CLI removes any dependencies described in the plugin `package.json` file and removes the plugin from the project `package.json` file in the project root. - -> **IMPORTANT:** For iOS, this operation does not remove files from the `platforms\ios` directories and native iOS libraries, and does not unmerge the `Info.plist` file. For Android, this operation unmerges the `AndroidManifest.xml` file and takes care of removing any plugin files located in `platforms\android`. - -### Manual Steps After Removal - -After the plugin removal is complete, make sure to remove any leftover native iOS library files from the `lib\ios` directory in the root of the project. Update the iOS-specific projects in `platforms\ios` to remove any dependencies on the removed native libraries. - -Next, you need to run the following command. - -```Shell -tns prepare -``` - -Make sure to run the command for all platforms configured for the project. During this operation, the NativeScript CLI will remove any leftover plugin files from your `platforms\ios` directory. - -> **TIP:** Instead of `$ tns prepare` you can run `$ tns build`, `$ tns run`, `$ tns deploy` or `$ tns emulate`. All these commands run `$ tns prepare`. - -Next, open your `platforms\ios\Info.plist` file and remove any leftover entries from the plugin `Info.plist` file. - -Finally, make sure to update your code not to use the uninstalled plugin. diff --git a/PublicAPI.md b/PublicAPI.md new file mode 100644 index 0000000000..b59cba2fe3 --- /dev/null +++ b/PublicAPI.md @@ -0,0 +1,1696 @@ +Public API +== + +This document describes all methods that can be invoked when NativeScript CLI is required as library, i.e. + +```JavaScript +const ns = require("nativescript"); +``` + +# Contents +* [projectService](#projectservice) + * [createProject](#createproject) + * [isValidNativeScriptProject](#isvalidnativescriptproject) +* [projectDataService](#projectdataservice) + * [getProjectData](#getprojectdata) + * [getProjectDataFromContent](#getprojectdatafromcontent) + * [getNsConfigDefaultContent](#getnsconfigdefaultcontent) + * [getAssetsStructure](#getassetsstructure) + * [getIOSAssetsStructure](#getiosassetsstructure) + * [getAndroidAssetsStructure](#getandroidassetsstructure) +* [extensibilityService](#extensibilityservice) + * [pathToExtensions](#pathToExtensions) + * [installExtension](#installextension) + * [uninstallExtension](#uninstallextension) + * [getInstalledExtensions](#getinstalledextensions) + * [loadExtensions](#loadextensions) +* [settingsService](#settingsservice) + * [setSettings](#setsettings) +* [npm](#npm) + * [install](#install) + * [uninstall](#uninstall) + * [search](#search) + * [view](#view) +* [analyticsService](#analyticsservice) + * [startEqatecMonitor](#starteqatecmonitor) +* [debugService](#debugservice) + * [debug](#debug) +* [liveSyncService](#livesyncservice) + * [liveSync](#livesync) + * [liveSyncToPreviewApp](#livesynctopreviewapp) + * [stopLiveSync](#stopLiveSync) + * [enableDebugging](#enableDebugging) + * [attachDebugger](#attachDebugger) + * [disableDebugging](#disableDebugging) + * [getLiveSyncDeviceDescriptors](#getLiveSyncDeviceDescriptors) + * [events](#events) +* [analyticsSettingsService](#analyticsSettingsService) + * [getClientId](#getClientId) +* [constants](#constants) +* [assetsGenerationService](#assetsgenerationservice) + * [generateIcons](#generateicons) + * [generateSplashScreens](#generatesplashscreens) +* [androidProcessService](#androidprocessservice) + * [getAppProcessId](#getappprocessid) +* [sysInfo](#sysinfo) + * [getSupportedNodeVersionRange](#getsupportednodeversionrange) + * [getSystemWarnings](#getsystemwarnings) +* [devicesService](#devicesservice) + * [getEmulatorImages](#getemulatorimages) + * [startEmulator](#startemulator) + * [startDeviceDetectionInterval](#startdevicedetectioninterval) + * [stopDeviceDetectionInterval](#stopdevicedetectioninterval) + * [startEmulatorDetectionInterval](#startemulatordetectioninterval) + * [stopEmulatorDetectionInterval](#stopemulatordetectioninterval) +* [deviceEmitter](#deviceemitter) + * [events](#deviceemitterevents) +* [previewDevicesService](#previewdevicesservice) + * [deviceFound](#devicefound) + * [deviceLost](#devicelost) + * [deviceLog](#devicelog) +* [previewQrCodeService](#previewqrcodeservice) + * [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 + +`projectService` modules allow you to create new NativeScript application. + +### createProject +* Description: `createProject(projectSettings: IProjectSettings): Promise` - Creates new NativeScript application. By passing `projectSettings` argument you specify the name of the application, the template that will be used, etc.: + +```TypeScript +/** + * Describes available settings when creating new NativeScript application. + */ +interface IProjectSettings { + /** + * Name of the newly created application. + */ + projectName: string; + + /** + * Selected template from which to create the project. If not specified, defaults to hello-world template. + * Template can be any npm package, local dir, github url, .tgz file. + * If it is set to `angular` or `ng`, default NativeScript Angular Hello World template will be used. + * If it is set to `typescript` or `tsc`, default NativeScript TypeScript Hello World template will be used. + */ + template?: string; + + /** + * Application identifier for the newly created application. If not specified, defaults to org.nativescript.. + */ + appId?: string; + + /** + * Path where the project will be created. If not specified, defaults to current working dir. + */ + pathToProject?: string; + + /** + * Defines if invalid application name can be used for project creation. + */ + force?: boolean; + + /** + * Defines whether the `npm install` command should be executed with `--ignore-scripts` option. + * When it is passed, all scripts (postinstall for example) will not be executed. + */ + ignoreScripts?: boolean; +} +``` + +* Sample usage: +```JavaScript +const projectSettings = { + projectName: "my-ns-app", + template: "ng", + pathToProject: "/home/my-user/project-dir" +}; + +tns.projectService.createProject(projectSettings) + .then(() => console.log("Project successfully created.")) + .catch((err) => console.log("Unable to create project, reason: ", err); +``` + +### isValidNativeScriptProject +* Definition: `isValidNativeScriptProject(projectDir: string): boolean` - Checks if the specified path is a valid NativeScript project. Returns `true` in case the directory is a valid project, `false` otherwise. + +* Sample usage: +```JavaScript +const isValidProject = tns.projectService.isValidNativeScriptProject("/tmp/myProject"); +console.log(isValidProject); // true or false +``` + +## projectDataService +`projectDataService` provides a way to get information about a NativeScript project. + +A common interface describing the results of a method is `IProjectData`: + +```TypeScript +interface IProjectData extends IProjectDir { + projectName: string; + platformsDir: string; + projectFilePath: string; + projectId?: string; + dependencies: any; + devDependencies: IStringDictionary; + appDirectoryPath: string; + appResourcesDirectoryPath: string; + projectType: string; + nsConfig: INsConfig; + /** + * Initializes project data with the given project directory. If none supplied defaults to cwd. + * @param {string} projectDir Project root directory. + * @returns {void} + */ + initializeProjectData(projectDir?: string): void; + /** + * Initializes project data with the given package.json, nsconfig.json content and project directory. If none supplied defaults to cwd. + * @param {string} packageJsonContent: string + * @param {string} nsconfigContent: string + * @param {string} projectDir Project root directory. + * @returns {void} + */ + initializeProjectDataFromContent(packageJsonContent: string, nsconfigContent: string, projectDir?: string): void; + getAppDirectoryPath(projectDir?: string): string; + getAppDirectoryRelativePath(): string; + getAppResourcesDirectoryPath(projectDir?: string): string; + getAppResourcesRelativeDirectoryPath(): string; +} + +interface IProjectDir { + projectDir: string; +} + +interface INsConfig { + appPath?: string; + appResourcesPath?:string; +} +``` + +### getProjectData +Returns an initialized IProjectData object containing data about the NativeScript project in the provided `projectDir`. + +* Definition: +```TypeScript +/** + * Returns an initialized IProjectData object containing data about the NativeScript project in the provided projectDir + * @param {string} projectDir The path to the project + * @returns {IProjectData} Information about the NativeScript project + */ +getProjectData(projectDir: string): IProjectData +``` + +### getProjectDataFromContent +Returns an IProjectData object that is initialized with the provided package.json content, nsconfig.json content and `projectDir`. + +* Definition: +```TypeScript +/** + * Returns an initialized IProjectData object containing data about the NativeScript project in the provided projectDir + * @param {string} packageJsonContent The content of the project.json file in the root of the project + * @param {string} projectDir The path to the project + * @returns {IProjectData} Information about the NativeScript project + */ +getProjectDataFromContent(packageJsonContent: string, projectDir?: string): IProjectData +``` + +### getNsConfigDefaultContent +Returns the default content of "nsconfig.json" merged with the properties provided by the `data` argument. +* Definition: +```TypeScript +/** + * Returns the default content of "nsconfig.json" merged with the properties provided by the "data" argument. + * @param {Object} data Properties that should not be defaulted. + */ + getNsConfigDefaultContent(data?: Object): string +``` + +### getAssetsStructure +Gives information about the whole assets structure for both iOS and Android. For each of the platforms, the returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages (only for iOS). +* Definition: +```TypeScript +/** + * Gives information about the whole assets structure for both iOS and Android. + * For each of the platforms, the returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages (only for iOS). + * @param {IProjectDir} opts Object with a single property - projectDir. This is the root directory where NativeScript project is located. + * @returns {Promise} An object describing the current asset structure. + */ +getAssetsStructure(opts: IProjectDir): Promise; +``` + +* Usage: +```JavaScript +tns.projectDataService.getAssetsStructure({ projectDir: "/Users/username/myNativeScriptProject" }) + .then(assetsStructure => console.log(`The current assets structure is ${JSON.stringify(assetsStructure, null, 2)}.`)) + .catch(err => console.log("Failed to get assets structure.")); +``` + +### getIOSAssetsStructure +Gives information about the assets structure for iOS. The returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages. +* Definition: +```TypeScript +/** + * Gives information about the whole assets structure for iOS. + * The returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages. + * @param {IProjectDir} opts Object with a single property - projectDir. This is the root directory where NativeScript project is located. + * @returns {Promise} An object describing the current asset structure for iOS. + */ +getIOSAssetsStructure(opts: IProjectDir): Promise; +``` + +* Usage: +```JavaScript +tns.projectDataService.getIOSAssetsStructure({ projectDir: "/Users/username/myNativeScriptProject" }) + .then(assetsStructure => console.log(`The current assets structure for iOS is ${JSON.stringify(assetsStructure, null, 2)}.`)) + .catch(err => console.log("Failed to get assets structure.")); +``` + +### getAndroidAssetsStructure +Gives information about the assets structure for Android. The returned object will contain icons, splashBackgrounds and splashCenterImages. +* Definition: +```TypeScript +/** + * Gives information about the whole assets structure for Android. + * The returned object will contain icons, splashBackgrounds and splashCenterImages. + * @param {IProjectDir} opts Object with a single property - projectDir. This is the root directory where NativeScript project is located. + * @returns {Promise} An object describing the current asset structure for Android. + */ +getAndroidAssetsStructure(opts: IProjectDir): Promise; +``` + +* Usage: +```JavaScript +tns.projectDataService.getAndroidAssetsStructure({ projectDir: "/Users/username/myNativeScriptProject" }) + .then(assetsStructure => console.log(`The current assets structure for Android is ${JSON.stringify(assetsStructure, null, 2)}.`)) + .catch(err => console.log("Failed to get assets structure.")); +``` + +## extensibilityService +`extensibilityService` module gives access to methods for working with CLI's extensions - list, install, uninstall, load them. The extensions add new functionality to CLI, so once an extension is loaded, all methods added to it's public API are accessible directly through CLI when it is used as a library. Extensions may also add new commands, so they are accessible through command line when using NativeScript CLI. + +A common interface describing the results of a method is `IExtensionData`: +```TypeScript +/** + * Describes each extension. + */ +interface IExtensionData { + /** + * The name of the extension. + */ + extensionName: string; +} +``` +### pathToExtensions +Get/Set the to the CLI extensions. + +* Definition: +```TypeScript +/** + * The path to the CLI extensions. + */ +pathToExtensions: string; +``` + +### installExtension +Installs specified extension. + +* Definition: +```TypeScript +/** + * Installs a specified extension. + * @param {string} extensionName Name of the extension to be installed. It may contain version as well, i.e. myPackage, myPackage@1.0.0, myPackage.tgz, https://github.com/myOrganization/myPackage/tarball/master, https://github.com/myOrganization/myPackage etc. + * @returns {Promise} Information about installed extensions. + */ +installExtension(extensionName: string): Promise; +``` + +* Usage: +```JavaScript +tns.extensibilityService.installExtension("extension-package") + .then(extensionData => console.log(`Successfully installed extension ${extensionData.extensionName}.`)) + .catch(err => console.log("Failed to install extension.")); +``` + +### uninstallExtension +Uninstalls specified extensions, so its functionality will no longer be available through CLI. + +* Definition: +```TypeScript +/** + * Uninstalls extension from the installation. + * @param {string} extensionName Name of the extension to be uninstalled. + * @returns {Promise} + */ +uninstallExtension(extensionName: string): Promise; +``` + +* Usage: +```JavaScript +tns.extensibilityService.uninstallExtension("extension-package") + .then(() => console.log("Successfully uninstalled extension.")) + .catch(err => console.log("Failed to uninstall extension.")); +``` + +### getInstalledExtensions +Gets information about all installed extensions. + +* Definition: +```TypeScript +/** + * Gets information about installed dependencies - names and versions. + * @returns {IStringDictionary} + */ +getInstalledExtensions(): IStringDictionary; +``` + +* Usage: +```JavaScript +const installedExtensions = tns.extensibilityService.getInstalledExtensions(); +for (let extensionName in installedExtensions) { + const version = installedExtensions[extensionName]; + console.log(`The extension ${extensionName} is installed with version ${version}.`); +} +``` + +### loadExtensions +Loads all currently installed extensions. The method returns array of Promises, one for each installed extension. In case any of the extensions cannot be loaded, only its Promise is rejected. + +* Definition +```TypeScript +/** + * Loads all extensions, so their methods and commands can be used from CLI. + * For each of the extensions, a new Promise is returned. It will be rejected in case the extension cannot be loaded. However other promises will not be reflected by this failure. + * In case a promise is rejected, the error will have additional property (extensionName) that shows which is the extension that cannot be loaded in the process. + * @returns {Promise[]} Array of promises, each is resolved with information about loaded extension. + */ +loadExtensions(): Promise[]; +``` + +* Usage: +```JavaScript +const loadExtensionsPromises = tns.extensibilityService.loadExtensions(); +for (let promise of loadExtensionsPromises) { + promise.then(extensionData => console.log(`Loaded extension: ${extensionData.extensionName}.`), + err => { + console.log(`Failed to load extension: ${err.extensionName}`); + console.log(err); + }); +} +``` + +### loadExtension +Loads a specified extension. + +* Definition +```TypeScript +/** + * Loads a single extension, so its methods and commands can be used from CLI. + * @param {string} extensionName Name of the extension to be installed. It may contain version as well, i.e. myPackage, myPackage@1.0.0 + * A Promise is returned. It will be rejected in case the extension cannot be loaded. + * @returns {Promise} Promise, resolved with IExtensionData. + */ +loadExtension(extensionName: string): Promise; +``` + +* Usage: +```JavaScript +tns.extensibilityService.loadExtension("my-extension") + .then(extensionData => console.log(`Loaded extension: ${extensionData.extensionName}.`), + err => { + console.log(`Failed to load extension: ${err.extensionName}`); + console.log(err); + }); +} +``` + +## settingsService +`settingsService` module provides a way to configure various settings. + +### setSettings +Used to set various settings in order to modify the behavior of some methods. +* Auxiliary interfaces: +```TypeScript +/** + * Describes configuration settings that modify the behavior of some methods. + */ +interface IConfigurationSettings { + /** + * This string will be used when constructing the UserAgent http header. + * @type {string} + */ + userAgentName: string; +} +``` + +* Definition: +```TypeScript +/** + * Describes service used to configure various settings. + */ +interface ISettingsService { + /** + * Used to set various settings in order to modify the behavior of some methods. + * @param {IConfigurationSettings} settings Settings which will modify the behaviour of some methods. + * @returns {void} + */ + setSettings(settings: IConfigurationSettings): void; +} +``` + +* Usage: +```JavaScript +tns.settingsService.setSettings({ userAgentName: "myUserAgent", profileDir: "customProfileDir" }); +``` + +## npm +`npm` module provides a way to interact with npm specifically the use of install, uninstall, search and view commands. + +### install +Installs specified package. Note that you can use the third argument in order to pass different options to the installation like `ignore-scripts`, `save` or `save-exact` which work exactly like they would if you would execute npm from the command line and pass them as `--` flags. +* Auxiliary interfaces: +```TypeScript +/** + * Describes information about installed package. + */ +interface INpmInstallResultInfo { + /** + * Installed package's name. + * @type {string} + */ + name: string; + /** + * Installed package's version. + * @type {string} + */ + version: string; + /** + * The original output that npm CLI produced upon installation. + * @type {INpmInstallCLIResult} + */ + originalOutput: INpmInstallCLIResult; +} +``` + +* Definition: +```TypeScript +/** + * Installs dependency + * @param {string} packageName The name of the dependency - can be a path, a url or a string. + * @param {string} pathToSave The destination of the installation. + * @param {IDictionary} config Additional options that can be passed to manipulate installation. + * @return {Promise} Information about installed package. +*/ +install(packageName: string, pathToSave: string, config: IDictionary): Promise; +``` + +* Usage: +```JavaScript +tns.npm.install("lodash", "/tmp/myProject", { save: true }).then(result => { + console.log(`${result.name} installed successfully`); +}, err => { + console.log("An error occurred during installation", err); +}); +``` + +### uninstall +Uninstalls a specified package. + +* Definition: +```TypeScript +/** + * Uninstalls a dependency + * @param {string} packageName The name of the dependency. + * @param {IDictionary} config Additional options that can be passed to manipulate uninstallation. + * @param {string} path The destination of the uninstallation. + * @return {Promise} The output of the uninstallation. +*/ +uninstall(packageName: string, config?: IDictionary, path?: string): Promise; +``` + +* Usage: +```JavaScript +tns.npm.uninstall("lodash", "/tmp/myProject", { save: true }).then(output => { + console.log(`Uninstalled successfully, output: ${output}`); +}, err => { + console.log("An error occurred during uninstallation", err); +}); +``` + +### search +Searches for a package using keywords. + +* Definition: +```TypeScript +/** + * Searches for a package. + * @param {string[]} filter Keywords with which to perform the search. + * @param {IDictionary} config Additional options that can be passed to manipulate search. + * @return {Promise} The output of the uninstallation. + */ +search(filter: string[], config: IDictionary): Promise; +``` + +* Usage: +```JavaScript +tns.npm.search(["nativescript", "cloud"], { silent: true }).then(output => { + console.log(`Found: ${output}`); +}, err => { + console.log("An error occurred during searching", err); +}); +``` + +### view +Provides information about a given package. + +* Definition +```TypeScript +/** + * Provides information about a given package. + * @param {string} packageName The name of the package. + * @param {IDictionary} config Additional options that can be passed to manipulate view. + * @return {Promise} Object, containing information about the package. + */ +view(packageName: string, config: Object): Promise; +``` + +* Usage: +```JavaScript +tns.npm.view(["nativescript"], {}).then(result => { + console.log(`${result.name}'s latest version is ${result["dist-tags"].latest}`); +}, err => { + console.log("An error occurred during viewing", err); +}); +``` + +## debugService +Provides methods for debugging applications on devices. The service is also event emitter, that raises the following events: +* `connectionError` event - this event is raised when the debug operation cannot start on iOS device. The causes can be: + * Application is not running on the specified iOS Device. + * Application is not built in debug configuration on the specified iOS device. + The event is raised with the following information: +```TypeScript +{ + /** + * Device identifier on which the debug process cannot start. + */ + deviceId: string; + + /** + * The error message. + */ + message: string; + + /** + * Code of the error. + */ + code: number +} +``` + +* Usage: +```JavaScript +tns.debugService.on("connectionError", errorData => { + console.log(`Unable to start debug operation on device ${errorData.deviceIdentifier}. Error is: ${errorData.message}.`); +}); +``` + +### debug +The `debug` method allows starting a debug operation for specified application on a specific device. The method returns a Promise, which is resolved with a url. The url should be opened in Chrome DevTools in order to debug the application. + +The returned Promise will be rejected in case any error occurs. It will also be rejected in case: +1. Specified deviceIdentifier is not found in current list of attached devices. +1. The device, specified as deviceIdentifier is connected but not trusted. +1. The specified application is not installed on the device. +1. Trying to debug applications on connected iOS device on Linux. +1. In case the application is not running on the specified device. +1. In case the installed application is not built in debug configuration. + +* Definition: +```TypeScript +/** + * Starts debug operation based on the specified debug data. + * @param {IDebugData} debugData Describes information for device and application that will be debugged. + * @param {IDebugOptions} debugOptions Describe possible options to modify the behavior of the debug operation, for example stop on the first line. + * @returns {Promise} Device Identifier, full url and port where the frontend client can be connected. + */ +debug(debugData: IDebugData, debugOptions: IDebugOptions): Promise; +``` + +The type of arguments that you can pass are described below: +```TypeScript +/** + * Describes information for starting debug process. + */ +interface IDebugData { + /** + * Id of the device on which the debug process will be started. + */ + deviceIdentifier: string; + + /** + * Application identifier of the app that it will be debugged. + */ + applicationIdentifier: string; + + /** + * The name of the application, for example `MyProject`. + */ + projectName?: string; + + /** + * Path to project. + */ + projectDir?: string; +} + +/** + * Describes all options that define the behavior of debug. + */ +interface IDebugOptions { + /** + * Defines if bundled Chrome DevTools should be used or specific commit. + * Default value is true for Android and false for iOS. + */ + useBundledDevTools?: boolean; + + /** + * Defines if https://chrome-devtools-frontend.appspot.com should be used instead of chrome-devtools://devtools + * In case it is passed, the value of `useBundledDevTools` is disregarded. + * Default value is false. + */ + useHttpUrl?: boolean; + + /** + * Defines the commit that will be used in cases where remote protocol is required. + * For Android this is the case when useHttpUrl is set to true or useBundledDevTools is set to false. + * For iOS the value is used by default and when useHttpUrl is set to true. + * Default value is 02e6bde1bbe34e43b309d4ef774b1168d25fd024 which corresponds to 55.0.2883 Chrome version + */ + devToolsCommit?: string; + + /** + * Defines if Chrome DevTools should be used for debugging. + */ + chrome?: boolean; + + /** + * Defines if thĐĩ application is already started on device. + */ + start?: boolean; +} +``` + +* Usage: +```JavaScript +tns.debugService.on("connectionError", errorData => { + console.log(`Unable to start debug operation on device ${errorData.deviceIdentifier}. Error is: ${errorData.message}.`); +}); + +const debugData = { + deviceIdentifier: "4df18f307d8a8f1b", + applicationIdentifier: "com.telerik.app1", + projectName: "app1", + projectDir: "/Users/myUser/app1" +}; + +const debugOptions = { + useBundledDevTools: true +}; + +tns.debugService.debug(debugData, debugOptions) + .then(debugInfo => console.log(`Open the following url in Chrome DevTools: ${debugInfo.url}, port is: ${debugInfo.port} and deviceIdentifier is: ${debugInfo.deviceIdentifier}`)) + .catch(err => console.log(`Unable to start debug operation, reason: ${err.message}.`)); +``` + +## liveSyncService +Used to LiveSync changes on devices. The operation can be started for multiple devices and stopped for each of them. During LiveSync operation, the service will emit different events based on the action that's executing. + +### liveSync +Starts a LiveSync operation for specified devices. During the operation, application may have to be rebuilt (for example in case a change in App_Resources is detected). +By default the LiveSync operation will start file system watcher for `/app` directory and any change in it will trigger a LiveSync operation. +After calling the method once, you can add new devices to the same LiveSync operation by calling the method again with the new device identifiers. + +> NOTE: Consecutive calls to `liveSync` method for the same project will execute the initial sync (deploy and fullSync) only for new device identifiers. So in case the first call is for devices with ids [ 'A' , 'B' ] and the second one is for devices with ids [ 'B', 'C' ], the initial sync will be executed only for device with identifier 'C'. + +> NOTE: In case a consecutive call to `liveSync` method requires change in the pattern for watching files (i.e. `liveSyncData.syncAllFiles` option has changed), current watch operation will be stopped and a new one will be started. + +> NOTE: In case `debugggingEnabled` is set to `true` in a deviceDescriptor, debugging will initially be enabled for that device and a debugger will be attached after a successful livesync operation. + +* Definition +```TypeScript +/** + * Starts LiveSync operation by rebuilding the application if necessary and starting watcher. + * @param {ILiveSyncDeviceInfo[]} deviceDescriptors Describes each device for which we would like to sync the application - identifier, outputPath and action to rebuild the app. + * @param {ILiveSyncInfo} liveSyncData Describes the LiveSync operation - for which project directory is the operation and other settings. + * @returns {Promise} + */ +liveSync(deviceDescriptors: ILiveSyncDeviceInfo[], liveSyncData: ILiveSyncInfo): Promise; +``` + +* Usage: +```JavaScript +const projectDir = "myProjectDir"; +const androidDeviceDescriptor = { + identifier: "4df18f307d8a8f1b", + buildAction: () => { + return tns.localBuildService.build("Android", { projectDir, bundle: false, release: false, buildForDevice: true }); + }, + outputPath: null +}; + +const iOSDeviceDescriptor = { + identifier: "12318af23ebc0e25", + buildAction: () => { + return tns.localBuildService.build("iOS", { projectDir, bundle: false, release: false, buildForDevice: true }); + }, + outputPath: null +}; + +const liveSyncData = { + projectDir, + skipWatcher: false, + watchAllFiles: false, + bundle: false, + release: false, + useLiveEdit: false +}; + +tns.liveSyncService.liveSync([ androidDeviceDescriptor, iOSDeviceDescriptor ], liveSyncData) + .then(() => { + console.log("LiveSync operation started."); + }, err => { + console.log("An error occurred during LiveSync", err); + }); +``` + +### liveSyncToPreviewApp +Starts a LiveSync operation to the Preview app. After scanning the QR code with the scanner provided in the NativeScript Playground app, the app will be launched on a device through the Preview app. Additionally, any changes made to the project will be automatically synchronized with the deployed app. + +* Definition +```TypeScript +/** + * Starts LiveSync operation by producting a QR code and starting watcher. + * @param {IPreviewAppLiveSyncData} liveSyncData Describes the LiveSync operation - for which project directory is the operation and other settings. + * @returns {Promise} + */ +liveSyncToPreviewApp(liveSyncData: IPreviewAppLiveSyncData): Promise; +``` + +* Usage: +```JavaScript +const liveSyncData = { + projectDir, + bundle: false, + useHotModuleReload: false, + env: { } +}; +tns.liveSyncService.liveSyncToPreviewApp(liveSyncData) + .then(qrCodeImageData => { + console.log("The qrCodeImageData is: " + qrCodeImageData); + }); +``` + +### stopLiveSync +Stops LiveSync operation. In case deviceIdentifires are passed, the operation will be stopped only for these devices. + +* Definition +```TypeScript +/** + * Stops LiveSync operation for specified directory. + * @param {string} projectDir The directory for which to stop the operation. + * @param {string[]} @optional deviceIdentifiers Device ids for which to stop the application. In case nothing is passed, LiveSync operation will be stopped for all devices. + * @returns {Promise} + */ +stopLiveSync(projectDir: string, deviceIdentifiers?: string[]): Promise; +``` + +* Usage +```JavaScript +const projectDir = "myProjectDir"; +const deviceIdentifiers = [ "4df18f307d8a8f1b", "12318af23ebc0e25" ]; +tns.liveSyncService.stopLiveSync(projectDir, deviceIdentifiers) + .then(() => { + console.log("LiveSync operation stopped."); + }, err => { + console.log("An error occurred during stopage.", err); + }); +``` + +### enableDebugging +Enables debugging during a LiveSync operation. This method will try to attach a debugger to the application. Note that `userInteractionNeeded` event may be raised. Additional details about the arguments can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts). + +* Definition +```TypeScript +/** +* Enables debugging for the specified devices +* @param {IEnableDebuggingDeviceOptions[]} deviceOpts Settings used for enabling debugging for each device. +* @param {IDebuggingAdditionalOptions} enableDebuggingOptions Settings used for enabling debugging. +* @returns {Promise[]} Array of promises for each device. +*/ +enableDebugging(deviceOpts: IEnableDebuggingDeviceOptions[], enableDebuggingOptions: IDebuggingAdditionalOptions): Promise[]; +``` + +* Usage +```JavaScript +const projectDir = "/tmp/myProject"; +const liveSyncData = { projectDir }; +const devices = [androidDeviceDescriptor, iOSDeviceDescriptor]; +tns.liveSyncService.liveSync(devices, liveSyncData) + .then(() => { + console.log("LiveSync operation started."); + devices.forEach(device => { + tns.liveSyncService.enableDebugging([{ + deviceIdentifier: device.identifier + }], { projectDir }); + }); + }); +``` + +### attachDebugger +Attaches a debugger to the specified device. Additional details about the argument can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts). + +* Definition +```TypeScript +/** +* Attaches a debugger to the specified device. +* @param {IAttachDebuggerOptions} settings Settings used for controling the attaching process. +* @returns {Promise} +*/ +attachDebugger(settings: IAttachDebuggerOptions): Promise; +``` + +* Usage +```JavaScript +tns.liveSyncService.on("userInteractionNeeded", data => { + console.log("Please restart the app manually"); + return tns.liveSyncService.attachDebugger(data); +}); +``` + +### disableDebugging +Disables debugging during a LiveSync operation. This method will try to detach a debugger from the application. Additional details about the arguments can be seen [here](https://github.com/NativeScript/nativescript-cli/blob/master/lib/definitions/livesync.d.ts). + +* Definition +```TypeScript +/** +* Disables debugging for the specified devices +* @param {IDisableDebuggingDeviceOptions[]} deviceOptions Settings used for disabling debugging for each device. +* @param {IDebuggingAdditionalOptions} debuggingAdditionalOptions Settings used for disabling debugging. +* @returns {Promise[]} Array of promises for each device. +*/ +disableDebugging(deviceOptions: IDisableDebuggingDeviceOptions[], debuggingAdditionalOptions: IDebuggingAdditionalOptions): Promise[]; +``` + +* Usage +```JavaScript +const projectDir = "/tmp/myProject"; +const liveSyncData = { projectDir }; +const devices = [androidDeviceDescriptor, iOSDeviceDescriptor]; +tns.liveSyncService.liveSync(devices, liveSyncData) + .then(() => { + console.log("LiveSync operation started."); + devices.forEach(device => { + tns.liveSyncService.enableDebugging([{ + deviceIdentifier: device.identifier + }], { projectDir }); + setTimeout(() => { + tns.liveSyncService.disableDebugging([{ + deviceIdentifier: device.identifier + }], { projectDir }); + }, 1000 * 30); + }); + }); +``` + +### getLiveSyncDeviceDescriptors +Gives information for currently running LiveSync operation and parameters used to start it on each device. + +* Definition +```TypeScript +/** + * Returns the device information for current LiveSync operation of specified project. + * In case LiveSync has been started on many devices, but stopped for some of them at a later point, + * calling the method after that will return information only for devices for which LiveSync operation is in progress. + * @param {string} projectDir The path to project for which the LiveSync operation is executed + * @returns {ILiveSyncDeviceInfo[]} Array of elements describing parameters used to start LiveSync on each device. +*/ +getLiveSyncDeviceDescriptors(projectDir: string): ILiveSyncDeviceInfo[]; +``` + +* Usage +```JavaScript +const projectDir = "myProjectDir"; +const deviceIdentifiers = [ "4df18f307d8a8f1b", "12318af23ebc0e25" ]; +const currentlyRunningDescriptors = tns.liveSyncService.getLiveSyncDeviceDescriptors(projectDir); +console.log(`LiveSync for ${projectDir} is currently running on the following devices: ${currentlyRunningDescriptors.map(descriptor => descriptor.identifier)}`); +``` + +### Events +`liveSyncService` raises several events in order to provide information for current state of the operation. +* liveSyncStarted - raised whenever CLI starts a LiveSync operation for specific device. When `liveSync` method is called, the initial LiveSync operation will emit `liveSyncStarted` for each specified device. After that the event will be emitted only in case when liveSync method is called again with different device instances. The event is raised with the following data: +```TypeScript +{ + projectDir: string; + deviceIdentifier: string; + applicationIdentifier: string; +} +``` + +Example: +```JavaScript +tns.liveSyncService.on("liveSyncStarted", data => { + console.log(`Started LiveSync on ${data.deviceIdentifier} for ${data.applicationIdentifier}.`); +}); +``` + +* liveSyncExecuted - raised whenever CLI finishes a LiveSync operation for specific device. When `liveSync` method is called, the initial LiveSync operation will emit `liveSyncExecuted` for each specified device once it finishes the operation. After that the event will be emitted whenever a change is detected (in case file system watcher is started) and the LiveSync operation is executed for each device. The event is raised with the following data: +```TypeScript +{ + projectDir: string; + deviceIdentifier: string; + applicationIdentifier: string; + /** + * Full paths to files synced during the operation. In case the `syncedFiles.length` is 0, the operation is "fullSync" (i.e. all project files are synced). + */ + syncedFiles: string[]; + isFullSync: boolean; +} +``` + +Example: +```JavaScript +tns.liveSyncService.on("liveSyncExecuted", data => { + console.log(`Executed LiveSync on ${data.deviceIdentifier} for ${data.applicationIdentifier}. Uploaded files are: ${data.syncedFiles.join(" ")}.`); +}); +``` + +* liveSyncStopped - raised when LiveSync operation is stopped. The event will be raised when the operation is stopped for each device and will be raised when the whole operation is stopped. The event is raised with the following data: +```TypeScript +{ + projectDir: string; + /** + * Passed only when the LiveSync operation is stopped for a specific device. In case it is not passed, the whole LiveSync operation is stopped. + */ + deviceIdentifier?: string; +} +``` + +Example: +```JavaScript +tns.liveSyncService.on("liveSyncStopped", data => { + if (data.deviceIdentifier) { + console.log(`Stopped LiveSync on ${data.deviceIdentifier} for ${data.projectDir}.`); + } else { + console.log(`Stopped LiveSync for ${data.projectDir}.`); + } +}); +``` + +* liveSyncError - raised whenever an error is detected during LiveSync operation. The event is raised for specific device. Once an error is detected, the event will be raised and the LiveSync operation will be stopped for this device, i.e. `liveSyncStopped` event will be raised for it. The event is raised with the following data: +```TypeScript +{ + projectDir: string; + deviceIdentifier: string; + applicationIdentifier: string; + error: Error; +} +``` + +Example: +```JavaScript +tns.liveSyncService.on("liveSyncError", data => { + console.log(`Error detected during LiveSync on ${data.deviceIdentifier} for ${data.projectDir}. Error: ${data.error.message}.`); +}); +``` + +* notify - raised when LiveSync operation has some data that is important for the user. The event is raised for specific device. The event is raised with the following data: +```TypeScript +{ + projectDir: string; + deviceIdentifier: string; + applicationIdentifier: string; + notification: string; +} +``` + +Example: +```JavaScript +tns.liveSyncService.on("notify", data => { + console.log(`Notification: ${data.notification} for LiveSync operation on ${data.deviceIdentifier} for ${data.projectDir}. `); +}); +``` + +* userInteractionNeeded - raised whenever CLI needs to restart an application but cannot so the user has to restart it manually. The event is raised with an object, which can later be passed to `attachDebugger` method of `liveSyncService`: + +Example: +```JavaScript +tns.liveSyncService.on("userInteractionNeeded", data => { + console.log("Please restart the app manually"); + return tns.liveSyncService.attachDebugger(data); +}); +``` + +* debuggerAttached - raised whenever CLI attaches the backend debugging socket and a frontend debugging client may be attached. The event is raised with an object containing the device's identifier, url for debugging and port + +Example: +```JavaScript +tns.liveSyncService.on("debuggerAttached", debugInfo => { + console.log(`Backend client connected, frontend client may be connected at ${debugInfo.url} to debug app on device ${debugInfo.deviceIdentifier}. Port is: ${debugInfo.port}`); +}); +``` + +* debuggerDetached - raised whenever CLI detaches the backend debugging socket. The event is raised with an object of the `IDebugInformation` type: + +Example: +```JavaScript +tns.liveSyncService.on("debuggerDetached", debugInfo => { + console.log(`Detached debugger for device with id ${debugInfo.deviceIdentifier}`); +}); +``` + +## analyticsSettingsService +Provides methods for accessing the analytics settings file data. + +### getClientId +The `getClientId` method allows retrieving the clientId used in the analytics tracking + +* Definition: +```TypeScript +/** + * Gets the clientId used for analytics tracking + * @returns {Promise} Client identifier in UUIDv4 standard. + */ +getClientId(): Promise; +``` + +* Usage: +```JavaScript +tns.analyticsSettingsService.getClientId() + .then(clientId => console.log(clientId)); +``` + +### getUserAgentString +The `getUserAgentString` method allows retrieving a user agent string identifying the current system + +* Definition: +```TypeScript +/** + * Gets user agent string identifing the current system in the following format: `${identifier} (${systemInfo}) ${osArch}` + * @param {string} identifier The product identifier. + * @returns {string} The user agent string. + */ +getUserAgentString(identifier: string): string; +``` + +* Usage: +```JavaScript +const userAgentString = tns.analyticsSettingsService.getUserAgentString("tns/3.3.0"); +``` + +### getPlaygroundInfo +The `getPlaygroundInfo` method allows retrieving information for projects that are exported from playground + +* Definition: +```TypeScript +/** + * Gets information for projects that are exported from playground. + * Returns null in case when project does not have playground key in package.json file (e.g is not exported from playground) and no playground info is saved in userSettings file + * @param {string} projectDir The project directory. + * @returns {Promise} Playground info. { id: string, usedTutorial: boolean } + */ +getPlaygroundInfo(projectDir: string): Promise; +``` + +* Usage: +```JavaScript +tns.analyticsSettingsService.getPlaygroundInfo("/my/project/path") + .then(playgroundInfo => { + console.log(playgroundInfo.id); + console.log(playgroundInfo.usedTutorial); + }); +``` + +## constants +Contains various constants related to NativeScript. + +## assetsGenerationService +`assetsGenerationService` module allows generation of assets - icons and splashes. + +### generateIcons +The `generateIcons` method generates icons for specified platform (or both iOS and Android in case platform is not specified) and places them on correct location in the specified project. + +* Definition: +```TypeScript +/** + * Generate icons for iOS and Android + * @param {IResourceGenerationData} iconsGenerationData Provides the data needed for icons generation + * @returns {Promise} + */ +generateIcons({ imagePath: string, projectDir: string, platform?: string }): Promise; +``` + +* Usage: +```JavaScript +tns.assetsGenerationService.generateIcons({ projectDir: "/Users/username/myNativeScriptProject", imagePath: "/Users/username/image.png" }) + .then(() => { + console.log("Successfully generated icons"); + }); +``` + + +### generateSplashScreens +The `generateSplashScreens` method generates icons for specified platform (or both iOS and Android in case platform is not specified) and places them on correct location in the specified project. + +* Definition: +```TypeScript +/** + * Generate splash screens for iOS and Android + * @param {ISplashesGenerationData} splashesGenerationData Provides the data needed for splash screens generation + * @returns {Promise} + */ +generateSplashScreens({ imagePath: string, projectDir: string, platform?: string, background?: string }): Promise; +``` + +* Usage: +```JavaScript +tns.assetsGenerationService.generateSplashScreens({ projectDir: "/Users/username/myNativeScriptProject", imagePath: "/Users/username/image.png", background: "blue" }) + .then(() => { + console.log("Successfully generated splash screens"); + }); +``` + +## androidProcessService +The `androidProcessService` exposes methods for getting information about the applications working on Android devices. + +### getAppProcessId +The `getAppProcessId` returns the PID of the specified application. If the app is not running on device, the method will return null. + +* Definition +```TypeScript +/** + * Gets the PID of a running application. + * @param deviceIdentifier {string} The identifier of the device. + * @param appIdentifier The identifier of the application. + * @return {string} Returns the process id matching the application identifier in the device process list. + */ +getAppProcessId(deviceIdentifier: string, appIdentifier: string): Promise; +``` + +* Usage +```JavaScript +tns.androidProcessService.getAppProcessId("4df18f307d8a8f1b", "org.nativescript.demoapp") + .then(pid => console.log(`The PID is ${pid}`)) + .catch(err => console.error(`Error while checking for PID: ${err}`)); +``` + +## sysInfo +The `sysInfo` module exposes methods to get the current environment setup and warnings for it. + +### getSupportedNodeVersionRange +The `getSupportedNodeVersionRange` method gives information about the supported Node.js versions for the current CLI. The result is a valid semver range, for example `>=6.0.0`. + +* Definition +```TypeScript +/** + * Returns the value of engines.node key from CLI's package.json file. + * @return {string} The range of supported Node.js versions. + */ +getSupportedNodeVersionRange(): string; +``` + +* Usage +```JavaScript +const nodeJsRange = tns.sysInfo.getSupportedNodeVersionRange(); +console.log(nodeJsRange); +``` + +### getSystemWarnings +The `getSystemWarnings` methods returns all deprecation warnings for current environment. For example, in case the support for the current OS is deprecated by CLI, the method will return array with one message describing the deprecation. + +* Definition +```TypeScript +/** + * Gets all global warnings for the current environment, for example Node.js version compatibility, OS compatibility, etc. + * @return {Promise} All warnings. Empty array is returned in case the system is setup correctly. + */ +getSystemWarnings(): Promise; +``` + +* Usage +```JavaScript +tns.sysInfo.getSystemWarnings() + .then(warnings => { + warnings.forEach(warn => console.log(warn)); + }) + .catch(err => console.error(`Error while trying to get system warnings: ${err}`)); +``` + +## devicesService +The `devicesService` module allows interaction with devices and emulators. You can get a list of the available emulators or start a specific emulator. + +### getEmulators +The `getEmulators` method returns object of all running and available emulators. The result is in the following format: +```JavaScript + { + android: { + devices: Mobile.IDeviceInfo[], + errors: string[] + }, + ios: { + devices: Mobile.IDeviceInfo[], + errors: string[] + } + } +``` + +This method accepts platform parameter. If provided only devices by specified platform will be returned. + +* Usage +```TypeScript +tns.devicesService.getEmulators() + .then(availableEmulatorsOutput => { + Object.keys(availableEmulatorsOutput) + .forEach(platform => { + availableEmulatorsOutput[platform].devices.forEach(device => console.log(device)); + }) + }) +``` + +### startEmulator +The `startEmulator` method starts the emulator specified by provided options. Returns an array of errors if something unexpected happens or null otherwise. +* Usage +```TypeScript +tns.devicesService.startEmulator({imageIdentifier: "my emulator imageIdentifier"}) + .then(errors => { }); +``` + +### startDeviceDetectionInterval +Starts device detection interval, which is run on specified number of seconds. This allows detection of new attached devices, started emulators/simulators, detection when device/emulator/simulator is disconnected, etc. +> NOTE: The interval is started automatically when you call `devicesService.initialize` without passing `skipDeviceDetectionInterval: true`. + +> NOTE: iOS Device detection interval cannot be stopped, so once started, it will always report connected/disconnected devices. + +* Definition +```TypeScript +startDeviceDetectionInterval({ detectionInterval?: number, platform?: string }): void +``` + +* Usage +```JavaScript +tns.devicesService.startDeviceDetectionInterval({ detectionInterval: 1000 }); +``` + +### stopDeviceDetectionInterval +Stops device detection interval started by `devicesService.initialize` or `devicesService.startDeviceDetectionInterval`. +* Definition +```TypeScript +stopDeviceDetectionInterval(): void +``` + +* Usage +```JavaScript +tns.devicesService.stopDeviceDetectionInterval(); +``` + +### startEmulatorDetectionInterval +Starts emulator images detection interval, which is run on specified number of seconds. This allows detection of new installed emulator/simulator images. + +* Definition +```TypeScript +startEmulatorDetectionInterval({ detectionInterval?: number }): void +``` + +* Usage +```JavaScript +tns.devicesService.startEmulatorDetectionInterval({ detectionInterval: 1000 }); +``` + +### stopEmulatorDetectionInterval +Stops device detection interval started by `devicesService.startEmulatorDetectionInterval`. +* Definition +```TypeScript +stopEmulatorDetectionInterval(): void +``` + +* Usage +```JavaScript +tns.devicesService.stopEmulatorDetectionInterval(); +``` + +## deviceEmitter +This module is used to emit information for devices, applications on them, etc. + +### deviceEmitterEvents +`deviceEmitter` emits the following events: +`deviceEmitter` module is used to emit different events related to devices attached to the system. +You can use `deviceEmitter` to add handles for the following events: + +* `deviceFound` - Raised when a new device is attached to the system. The callback function will receive one argument - `deviceInfoData`. +Sample usage: +```JavaScript +tns.deviceEmitter.on("deviceFound", (deviceInfoData) => { + console.log("Found device with identifier: " + deviceInfoData.identifier); +}); +``` + +* `deviceLost` - Raised when a device is detached from the system. The callback function will receive one argument - `deviceInfoData`. +Sample usage: +```JavaScript +tns.deviceEmitter.on("deviceLost", (deviceInfoData) => { + console.log("Detached device with identifier: " + deviceInfoData.identifier); +}); +``` + +* `deviceLogData` - Raised when attached device reports any information. This is the output of `adb logcat` for Android devices. For iOS this is the `iOS SysLog`. +The event is raised for any device that reports data. The callback function has two arguments - `deviceIdentifier` and `reportedData`.

+Sample usage: +```JavaScript +tns.deviceEmitter.on("deviceLogData", (identifier, reportedData) => { + console.log("Device " + identifier + " reports: " + reportedData); +}); +``` + +* `applicationInstalled` - Raised when application is installed on a device. The callback has two arguments - `deviceIdentifier` and `applicationIdentifier`.

+Sample usage: +```JavaScript +tns.deviceEmitter.on("applicationInstalled", (identifier, applicationIdentifier) => { + console.log("Application " + applicationIdentifier + " has been installed on device with id: " + identifier); +}); +``` + +* `applicationUninstalled` - Raised when application is removed from device. The callback has two arguments - `deviceIdentifier` and `applicationIdentifier`.

+Sample usage: +```JavaScript +tns.deviceEmitter.on("applicationUninstalled", (identifier, applicationIdentifier) => { + console.log("Application " + applicationIdentifier + " has been uninstalled from device with id: " + identifier); +}); +``` + +* `debuggableAppFound` - Raised when application on a device becomes available for debugging. The callback has one argument - `applicationInfo`.

+Sample usage: +```JavaScript +tns.deviceEmitter.on("debuggableAppFound", (applicationInfo) => { + console.log("Application " + applicationInfo.appIdentifier + " is available for debugging on device with id: " + applicationInfo.deviceIdentifier); +}); +``` +Sample result for `applicationInfo` will be: +```JSON +{ + "deviceIdentifier": "4df18f307d8a8f1b", + "appIdentifier": "com.telerik.Fitness", + "framework": "NativeScript", + "title": "NativeScript Application" +} +``` + +* `debuggableAppLost` - Raised when application on a device is not available for debugging anymore. The callback has one argument - `applicationInfo`.

+Sample usage: +```JavaScript +tns.deviceEmitter.on("debuggableAppLost", (applicationInfo) => { + console.log("Application " + applicationInfo.appIdentifier + " is not available for debugging anymore on device with id: " + applicationInfo.deviceIdentifier); +}); +``` +Sample result for `applicationInfo` will be: +```JSON +{ + "deviceIdentifier": "4df18f307d8a8f1b", + "appIdentifier": "com.telerik.Fitness", + "framework": "NativeScript", + "title": "NativeScript Application" +} +``` + +* `emulatorImageFound` - Raised when a new Android Emulator Image or iOS Simulator is created/installed on the system. The callback has a single argument that describes the new image: +```JavaScript +tns.deviceEmitter.on("emulatorImageFound", (emulatorImageInfo) => { + console.log("Added new emulator image", emulatorImageInfo); +}); +``` +`emulatorImageInfo` is of type [Moble.IDeviceInfo](https://github.com/telerik/mobile-cli-lib/blob/61cdaaaf7533394afbbe84dd4eee355072ade2de/definitions/mobile.d.ts#L9-L86). + +* `emulatorImageLost` - Raised when an Android Emulator Image or iOS Simulator is removed from the system. The callback has a single argument that describes the removed image: +```JavaScript +tns.deviceEmitter.on("emulatorImageLost", (emulatorImageInfo) => { + console.log("Removed emulator image", emulatorImageInfo); +}); +``` +`emulatorImageInfo` is of type [Moble.IDeviceInfo](https://github.com/telerik/mobile-cli-lib/blob/61cdaaaf7533394afbbe84dd4eee355072ade2de/definitions/mobile.d.ts#L9-L86). + +## previewDevicesService +The `previewDevicesService` module allows interaction with preview devices. You can get a list of the connected preview devices and logs from specified device. + +### previewDevicesEmitterEvents + +* `deviceFound` - Raised when the QR code is scanned with any device. The callback function will receive one argument - `device`. +Sample usage: +```JavaScript +tns.previewDevicesService.on("deviceFound", device => { + console.log("Attached device with identifier: " + device.id); +}); +``` + +* `deviceLost` - Raised when the Preview app is stopped on a specified device. The callback function will receive one argument - `device`. +Sample usage: +```JavaScript +tns.previewDevicesService.on("deviceLost", device => { + console.log("Detached device with identifier: " + device.id); +}); +``` + +* `deviceLog` - Raised when the app deployed in Preview app reports any information. The event is raised for any device that reports data. The callback function has two arguments - `device` and `message`.

+Sample usage: +```JavaScript +tns.previewDevicesService.on("deviceLogData", (device, message) => { + console.log("Device " + device.id + " reports: " + message); +}); +``` + +## previewQrCodeService +The `previewQrCodeService` exposes methods for getting information about the QR of the Playground app and deployed app in Preview app. + +### getPlaygroundAppQrCode +Returns information used to generate the QR code of the Playground app. + +* Usage: +```TypeScript +tns.previewQrCodeService.getPlaygroundAppQrCode() + .then(result => { + console.log("QR code data for iOS platform: " + result.ios); + console.log("QR code data for Android platform: " + result.android); + }); +``` + +## cleanupService +The `cleanupService` is used to handle actions that should be executed after CLI's process had exited. This is an internal service, that runs detached childProcess in which it executes CLI's cleanup actions once CLI is dead. As the process is detached, logs from it are not shown anywhere, so the service exposes a way to add log file in which the child process will write its logs. + +### setCleanupLogFile +Defines the log file location where the child cleanup process will write its logs. + +> NOTE: You must call this method immediately after requiring NativeScript CLI. In case you call it after the cleanup process had started, it will not use the passed log file. + +* Definition +```TypeScript +/** + * Sets the file in which the cleanup process will write its logs. + * This method must be called before starting the cleanup process, i.e. when CLI is initialized. + * @param {string} filePath Path to file where the logs will be written. The logs are appended to the passed file. + * @returns {void} + */ +setCleanupLogFile(filePath: string): void; +``` + +* Usage +```JavaScript +const ns = require("nativescript"); +ns.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; +} + +``` + +> 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 ns = require("nativescript"); + ns.initializeService.initialize(); + ``` + * Initialize with custom settings service options: + ```JavaScript + const ns = require("nativescript"); + ns.initializeService.initialize({ settingsServiceOptions: { profileDir: "/Users/username/customDir", userAgentName: "MyApp" } }); + ``` + * Initialize with custom extensibility path: + ```JavaScript + const ns = require("nativescript"); + ns.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.
+`logger` module can be configured how to show the messages by using different appenders and layouts.
+* `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.
+You can override only the properties you want, i.e. only the log level, the layout or the appender.
+`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.
+ +> 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 { + 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 ns = 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 = ns.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 `ns.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 ns = require("nativescript"); +const { EventEmitter } = require("events"); +const { EMIT_APPENDER_EVENT_NAME, LoggerAppenders } = ns.constants; + +const logger = ns.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); + } +}); + +ns.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`. + +More information how to add a method to public API is available [here](https://github.com/telerik/mobile-cli-lib#how-to-make-a-method-public). +After that add each method that you've exposed to the tests in `tests/nativescript-cli-lib.ts` file. There you'll find an object describing each publicly available module and the methods that you can call. diff --git a/README.md b/README.md index afa55e5de3..55da5866a1 100644 --- a/README.md +++ b/README.md @@ -1,273 +1,173 @@ -NativeScript Command-Line Interface -================ -[![Build Status](https://travis-ci.org/NativeScript/nativescript-cli.svg?branch=build)][2] - -*Create, build, and run native apps for iOS and Android using JavaScript or TypeScript* - -The NativeScript CLI lets you create, build, and deploy NativeScript-based projects on iOS and Android devices. - -* [What is NativeScript](#what-is-nativescript "Quick overview of NativeScript, the JavaScript framework for cross-platform development of native iOS and Android apps") -* [Supported Platforms](#supported-platforms "The mobile platforms you can target with NativeScript") -* [System Requirements](#system-requirements "The hardware and software requirements for setting up and working with the NativeScript CLI") -* [Installation](#installation "How to configure and install the NativeScript CLI") - * [Install the NativeScript CLI](#install-the-nativescript-cli) - * [Configure Proxy Usage](#configure-proxy-usage) -* [Quick Start](#quick-start "Get started with the NativeScript CLI") - * [The Commands](#the-commands) - * [Create Project](#create-project) - * [Add Platforms](#add-platforms) - * [Develop Your Project](#develop-your-project) - * [Prepare for Build](#prepare-for-build) - * [Build Your Project](#build-your-project) - * [Deploy Your Project](#deploy-your-project) - * [Emulate Your Project](#emulate-your-project) - * [Run Your Project](#run-your-project) -* [Extending the CLI](#extending-the-cli) -* [Troubleshooting](#troubleshooting) -* [Known Issues](#known-issues) -* [How to Contribute](#how-to-contribute) -* [License](#license) + +

+ Nativescript Logo +

+ +

The NativeScript CLI lets you create, build, and deploy NativeScript apps.

+ + + +--- + +

+ npm version + license + downloads +

+ +Get it using: `npm install -g nativescript` + +- [What is NativeScript](#what-is-nativescript) +- [How the NativeScript CLI works](#how-the-nativescript-cli-works) +- [Supported Platforms](#supported-platforms) +- [System Requirements](#system-requirements) +- [Installation](#installation) + - [Install the NativeScript CLI](#install-the-nativescript-cli) + - [Configure Proxy Settings](#configure-proxy-settings) + - [Set Proxy Settings](#set-proxy-settings) + - [Attributes](#attributes) + - [Options](#options) + - [Limitations](#limitations) + - [Display Current Proxy Settings](#display-current-proxy-settings) + - [Clear Proxy Settings](#clear-proxy-settings) +- [Quick Start](#quick-start) + - [The Commands](#the-commands) + - [Create Project](#create-project) + - [Develop Your Project](#develop-your-project) + - [Development with NativeScript](#development-with-nativescript) + - [Development in `app`](#development-in-app) + - [Development in `platforms`](#development-in-platforms) + - [Modifying Configuration Files](#modifying-configuration-files) + - [Modifying Entitlements File (iOS only)](#modifying-entitlements-file-ios-only) + - [Build Your Project](#build-your-project) + - [Run Your Project](#run-your-project) +- [Extending the CLI](#extending-the-cli) +- [Troubleshooting](#troubleshooting) +- [How to Contribute](#how-to-contribute) +- [How to Build](#how-to-build) +- [Get Help](#get-help) +- [License](#license) What is NativeScript === -NativeScript is a cross-platform JavaScript framework that lets you develop native iOS and Android apps from a single code base. The framework provides JavaScript access to the native APIs, user interface, and rendering engines of iOS and Android. By using JavaScript or TypeScript, you can create one project that builds into an iOS or Android app with completely native user experience. - -To learn more about NativeScript, you can check the following resources: +NativeScript provides platform APIs directly to the JavaScript runtime (_with strong types_) for a rich TypeScript development experience. -* [The NativeScript web page][4] -* [NativeScript - a Technical Overview][9] -* [Development with NativeScript][3] -* [Announcing NativeScript - cross-platform framework for building native mobile applications][11] -* [The NativeScript Documentation Wiki][6] -* [The NativeScript API Reference][7] -* [The NativeScript FAQ][8] -* [On NativeScript for Android][10] - -[Back to Top][1] +Some popular use cases: -Supported Platforms -=== +- Building Web, iOS, Android and Vision Pro apps with a shared codebase (aka, cross platform apps) +- Building native platform apps with portable JavaScript skills +- Augmenting JavaScript projects with platform API capabilities +- AndroidTV and Watch development +- watchOS development +- Learning native platforms through JavaScript understanding +- Exploring platform API documentation by trying APIs [directly from a web browser](https://preview.nativescript.org/) without requiring a platform development machine setup. -With the NativeScript CLI, you can target the following mobile platforms. +To learn more about NativeScript, you can check the following resources: -* Android 4.2 or a later stable official release -* iOS 7.0 or later stable official release +* [The NativeScript web page][2] +* The NativeScript [Documentation][4] and contributing to [docs via the repo](https://github.com/NativeScript/docs) [Back to Top][1] -System Requirements +How the NativeScript CLI works === -You can install and run the NativeScript CLI on Windows, OS X or Linux. - -* [Windows](#windows) -* [OS X](#os-x) -* [Linux](#linux) +The NativeScript CLI is the command-line interface for interacting with NativeScript. It incorporates several important services. Consider the following diagram: -## Windows +![NativeScript CLI diagram](https://github.com/NativeScript/nativescript-cli/raw/release/ns-cli.png) -> On Windows systems, you can develop, build, and deploy NativeScript projects that target Android. - -### Setup Script -To quickly set up your system for the latest NativeScript CLI, paste the following PowerShell script in the **Command Prompt** and hit `Enter`: -```cmd -@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))" -``` - -Alternatively, your can paste the following PowerShell setup script in a **Windows PowerShell console** and hit `Enter`: -```PowerShell -start-process -FilePath PowerShell.exe -Verb Runas -Wait -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))" -``` -> Both scripts require that you have **.NET 4.0 or later** installed on your system. You can download .NET 4.6.1 from this [link](http://go.microsoft.com/fwlink/?LinkId=671729). +* **Commands** - pretty much what every CLI does - support of different command options, input validation and help +* **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 +* **LiveSync Service** - redeploys applications when code changes during development +* **Hooks Service** - executes custom-written hooks in developed application, thus modifying the build process +* **Platforms Service** - provides app build functionalities, uses Gradle to build Android packages and Xcode for iOS. +[Back to Top][1] -### Manual Setup +Supported Platforms +=== -* Windows 7 SP1 or later -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release -* (Optional) [Chocolatey][Chocolatey] -* [JDK 8][JDK 8] or a later stable official release -* [Android SDK 22][Android SDK 22] or a later stable official release -* [Android SDK Build-tools 23.0.0][Android SDK Build-tools 23.0.0] or a later stable official release -* [Local Maven repository for Support Libraries][Local Maven repository for Support Libraries] -* (Optional) [Genymotion][Genymotion] +With the NativeScript CLI, you can target the following mobile platforms. -If you have installed Chocolatey, you can complete these steps to set up JDK, and Android SDK. +* Android 4.2 or a later stable official release +* iOS 9.0 or later stable official release -1. Run a Windows command prompt. -1. To install JDK, run the following command. +[Back to Top][1] - ```Shell - choco install java.jdk - ``` -1. If not present, create the following environment variables. +System Requirements +=== - ``` - JAVA_HOME=Path to the jdk* install directory - ``` +You can install and run the NativeScript CLI on Windows, macOS or Linux. - For example: JAVA_HOME=C:\Program Files\Java\jdk1.8.0_66 +* [Windows](https://docs.nativescript.org/setup/windows) +* [macOS](https://docs.nativescript.org/setup/macos) +* [Linux](https://docs.nativescript.org/setup/linux) - ``` - ANDROID_HOME=Path to Android installation directory - ``` +Installation +=== - For example: ANDROID_HOME=C:\Android\android-sdk +## Install the NativeScript CLI -> NOTE: This is the directory that contains `tools` and `platform-tools` directories. +The NativeScript CLI is available for installing as an npm package. -1. To install the Android SDK, run the following command. +In the command prompt, run the following command. - ```Shell - choco install android-sdk - ``` -1. To update the Android SDK to 22 or later, run the following command. +OS | Node.js installed from https://nodejs.org/ | Node.js installed via package manager +---|---------------------|---- +Windows | `npm install nativescript -g` | `npm install nativescript -g` +macOS | `sudo npm install nativescript -g --unsafe-perm` | `npm install nativescript -g` +Linux | `sudo npm install nativescript -g --unsafe-perm` | `npm install nativescript -g` - ```Shell - android update sdk - ``` -1. Select all packages for the Android 22 SDK and any other SDKs that you want to install, click **Install** and wait for the installation to complete. -1. Select Android SDK Build-tools 22.0.0 or later stable version, click **Install** and wait for the installation to complete. -1. Select Extras/Local Maven repository for Support Libraries, click **Install** and wait for the installation to complete. +To check if your system is configured properly, run the following command. -> NOTE: You can install required Android Tools with the following command: ```Shell -android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,sys-img-x86-android-22,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui +ns doctor ``` -## OS X +## Configure Proxy Settings -> On OS X systems, you can develop, build, and deploy NativeScript projects that target iOS and Android. +If you are working with the NativeScript CLI behind a web proxy, you need to configure your proxy settings. -### Setup Script -To quickly set up your system for the latest NativeScript CLI, paste the following Ruby script in the **Terminal** and hit `Enter`: -```Shell -sudo ruby -e "$(curl -fsSL https://www.nativescript.org/setup/mac)" -``` - -### Manual Setup - -* OS X Mavericks -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release -* For iOS development - * [Latest Xcode][12] - * [Xcode command-line tools][12] - * [xcodeproj ruby gem][13] - can be installed by running `$ [sudo] gem install xcodeproj` in the terminal - * (Optional) [CocoaPods][CocoaPods] - * (Optional) [xcproj][xcproj] - you only need this command line tool in case you have Xcode 7.3 or later installed and CocoaPods 0.39.0 or earlier. `xcproj` can either be installed by running `$ brew install xcproj` in the terminal, or by building it manually with xcodebuild -* For Android development - * [JDK 8][JDK 8] or a later stable official release - * [Android SDK 22][Android SDK 22] or a later stable official release - * [Android SDK Build-tools 23.0.0][Android SDK Build-tools 23.0.0] or a later stable official release - * [Local Maven repository for Support Libraries][Local Maven repository for Support Libraries] - * (Optional) [Genymotion][Genymotion] - -If not present, create the following environment variables. - -``` -JAVA_HOME=Path to the jdk* install directory -``` - -For example: JAVA_HOME=/usr/bin/java - -``` -ANDROID_HOME=Path to Android installation directory -``` - -For example: ANDROID_HOME=/usr/local/Cellar/android-sdk/24/ - -> NOTE: This is the directory that contains `tools` and `platform-tools` directories. - -You can install the required Android tools with the following command: +### Set Proxy Settings ```Shell -echo yes | android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,sys-img-x86-android-22,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui +ns proxy set ``` -## Linux - -> On Linux systems, you can develop, build, and deploy NativeScript projects that target Android. - -* Ubuntu 14.04 LTS -* The latest Node.js [0.10.x](https://nodejs.org/dist/latest-v0.10.x/), [0.12.x](https://nodejs.org/dist/latest-v0.12.x/), [4.x](https://nodejs.org/dist/latest-v4.x/) or [5.x](https://nodejs.org/dist/latest-v5.x/) stable official release +#### Attributes - > **TIP:** You can follow the instructions provided [here](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) to install Node.js on your system. +
<Url> +(Required) The full URL of the proxy. The <Url> attribute is required and if you do not provide it when running the command, the NativeScript CLI will prompt you to provide it. An example of a valid proxy URL is http://127.0.0.1:8888.
+ +
<Username> and <Password> +(Optional) The credentials for the proxy. The <Username> and <Password> attributes are optional, however, if you choose to provide them, you must provide both.
-* G++ compiler +#### Options - ```Shell - sudo apt-get install g++ - ``` -* On 64-bit systems only - * The runtime libraries for the ia32/i386 architecture. - - ```Shell - sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386 - ``` -* [JDK 8][JDK 8] or a later stable official release -* [Android SDK 22][Android SDK 22] or a later stable official release -* [Android SDK Build-tools 23.0.0][Android SDK Build-tools 23.0.0] or a later stable official release -* [Local Maven repository for Support Libraries][Local Maven repository for Support Libraries] -* (Optional) [Genymotion][Genymotion] - -If not present, create the following environment variables. - -``` -JAVA_HOME=Path to the jdk* install directory -``` - -For example: JAVA_HOME=/usr/bin/java - -``` -ANDROID_HOME=Path to Android installation directory -``` +
--insecure +The --insecure flag allows you to perform insecure SSL connections and transfers. This option is useful when your proxy does not have a CA certificate or the certificate is no longer valid.
-For example: ANDROID_HOME=/home/user/android-sdk +#### Limitations -> NOTE: This is the directory that contains `tools` and `platform-tools` directories. +* You can provide the `` and `` attributes only on Windows systems. +* Proxy settings for the npm, the Android Gradle and (optional) Docker need to be configured separately. For more information, see the following articles: + * [Configure the npm proxy](https://docs.npmjs.com/misc/config#https-proxy) + * [Configure the Android Gradle proxy](https://docs.gradle.org/3.3/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy) + * [Configure the Docker proxy](https://docs.docker.com/network/proxy/) -You can install required Android Tools with the following command. +### Display Current Proxy Settings ```Shell -echo yes | android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,sys-img-x86-android-22,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui +ns proxy ``` -[Back to Top][1] - -Installation -=== - -## Install the NativeScript CLI - -The NativeScript CLI is available for installing as an npm package. - -In the command prompt, run the following command. - -OS | Node.js installed from http://nodejs.org/ | Node.js installed via package manager ----|---------------------|---- -Windows | `npm install nativescript -g` | `npm install nativescript -g` -OS X | `sudo npm install nativescript -g --unsafe-perm` | `npm install nativescript -g` -Linux | `sudo npm install nativescript -g --unsafe-perm` | `npm install nativescript -g` - -To check if your system is configured properly, run the following command. +### Clear Proxy Settings ```Shell -tns doctor +ns proxy clear ``` -## Configure Proxy Usage - -If you are working with the NativeScript CLI behind a web proxy, you might need to configure your proxy settings. - -1. On your file system, locate the directory where the **nativescript** npm package is installed. -1. In a text editor, open `config` → `config.json`. -1. Set `USE_PROXY` to `true`. -1. Set `PROXY_PORT`. -1. Set `PROXY_HOSTNAME`. - -> Make sure to preserve the quotation marks and commas as in the initial `config.json` file. - [Back to Top][1] Quick Start @@ -275,128 +175,60 @@ Quick Start * [The Commands](#the-commands) * [Create Project](#create-project) -* [Add Platforms](#add-platforms) * [Develop Your Project](#develop-your-project) -* [Prepare for Build](#prepare-for-build) * [Build Your Project](#build-your-project) -* [Deploy Your Project](#deploy-your-project) -* [Emulate Your Project](#emulate-your-project) * [Run Your Project](#run-your-project) ## The Commands -Run `tns help` to view all available commands in the browser. Run `tns help ` to view more information about a selected command in the browser. - -* `help` opens a new browser window and lists all available commands. -* `create [--path ] [--appid ] [--copy-from ]` creates a new project with the specified settings. -* `init` initializes an existing project and prompts for project configuration. -* `platform list` lists the current target platforms for your project. -* `platform add ` adds a new target platform to your project. -* `platform remove ` removes the selected platform from the target platforms of the project. -* `platform update ` updates the NativeScript runtime for the specified platform. -* `prepare ` copies cross-platform and selected platform-specific content to the subdirectory for the target platform. -* `build ` builds the project for the selected target platform. -* `emulate ` builds the project for the selected target platform and runs it in the native emulator, if configured. -* `deploy [--device ]` deploys an already built application on connected device. -* `run [--device ]` executes `prepare`, `build`, and `deploy`. -* `livesync ` synchronizes changes from your project to an already deployed application on device. -* `test init` configures your project for unit testing with a selected framework. -* `test ` runs your unit tests on a connected device or in the native emulator. -* `device` lists connected devices, including any running Android Virtual Devices or Genymotion virtual devices. -* `device log` opens the log stream for the selected device. -* `device run` runs a selected application on a connected device. -* `device list-applications` lists the installed applications on all connected devices. -* `usage-reporting` configures anonymous usage reporting. -* `error-reporting` configures anonymous error tracking. -* `doctor` checks for configuration issues. -* `autocomplete` lets you configure your command-line completion settings for zsh and bash profiles. +Run `ns help` to view all available commands in the browser. Run `ns help ` to view more information about a selected command in the browser. `ns --help` opens console help, where help information is shown in the console. [Back to Top][1] ## Create Project -To create a new cross-platform project from the default template, run the following command. +To create a new cross-platform project from the default JavaScript template, run the following command. ```Shell -tns create MyApp +ns create MyApp --js ``` -To create a new cross-platform project from an existing NativeScript project, run the following command. +To create a new cross-platform project from the default TypeScript, Angular or Vue template, use the `template` option followed by either `typescript`, `angular` or `vue`. ```Shell -tns create MyApp --copy-from +ns create MyApp --template typescript +ns create MyApp --template angular +ns create MyApp --template vue ``` -Where is the complete path to the directory that contains your existing project. You can use any NativeScript project, created with the Telerik AppBuilder clients. - -The NativeScript creates a new project based on the JavaScript built-in template and sets the application identifier to `org.nativescript.myapp`. - -The CLI places the project in a new directory in the current directory. The newly created directory has the following structure. +Or you can simply use the shorthand `tsc` and `ng` options. +```Shell +ns create MyApp --tsc +ns create MyApp --ng ``` -MyApp/ -├── app -│ ├── app.css -│ ├── app.js -│ ├── bootstrap.js -│ ├── main-page.js -│ ├── main-page.xml -│ ├── App_Resources -│ │ └── ... -│ └── tns_modules -│ └── ... -└── platforms - └── ... -``` - -* The `app` directory is the **development space for your application**. You should modify all common and platform-specific code within this directory. When you run `prepare `, the NativeScript CLI copies relevant content to the platform-specific folders for each target platform. -* The `platforms` directory is created empty. When you add a target platform to your project, the NativeScript CLI creates a new subdirectory with the platform name. The subdirectory contains the ready-to-build resources of your app. When you run `prepare `, the NativeScript CLI copies relevant content from the `app` directory to the platform-specific subdirectory for each target platform. - -[Back to Top][1] - -## Add Platforms - -After you have created your project, you can start adding target platforms to it. To be able to build your project into an application package for a selected target platform, you need to add the platform to your project first. Currently, you can target Android and iOS with your NativeScript projects. - -Navigate to the directory that contains your newly created project and run the following commands. +With the `template` option you can also specify a local or a remote path to the template that you want to use to create your project. +For example, if you want to create a React template, run the following command. ```Shell -tns platform add android -tns platform add ios +ns create MyApp --template https://github.com/shirakaba/tns-template-blank-react.git ``` -`platform add` creates the `android` and the `ios` subdirectories in the `platforms` directory. These subdirectories have the platform-specific project structure required for native development with the native SDKs for the platform. +The NativeScript CLI creates a new project and sets the application identifier to `org.nativescript.myapp`. + +The CLI places the project in a new directory in the current directory. The newly created directory has the following structure. ``` -... -platforms/ -|-- android/ -|-- |-- assets/ -|-- |-- gen/ -|-- |-- libs/ -|-- |-- node_modules/ -|-- |-- res/ -|-- |-- src/ -|-- |-- .project -|-- |-- AndroidManifest.xml -|-- |-- build.xml -|-- |-- local.properties -|-- |-- proguard-project.txt -|-- `-- project.properties -|-- ios/ -|-- |-- libTNSBridge.a -|-- |-- node_modules -`-- |-- MyApp/ - `-- MyApp.xcodeproj -... +MyApp/ +├── App_Resources +├── src +│ └── ... +└── platforms + └── ... ``` -For more information about the structure of Android native projects, see [Android Projects](http://developer.android.com/tools/projects/index.html#ApplicationProjects). - -For more information about the structure iOS native projects, see [Code Organization in Xcode Projects](http://akosma.com/2009/07/28/code-organization-in-xcode-projects/). - -> **TIP:** The NativeScript team provides experimental support for the latest versions of iOS and Android. You can choose which platform runtime to use in your project by running `tns platform add @`
To list all available versions for android, run $ npm view tns-android versions
To list only experimental versions for android, run $ npm view tns-android dist-tags -To list all available versions for ios, run $ npm view tns-ios versions
To list only experimental versions for ios, run $ npm view tns-ios dist-tags +* The `src` directory (or sometimes `app` folder) is the **development space for your application**. You should modify all common and platform-specific code within this directory. When you run `prepare `, the NativeScript CLI prepares relevant content to the platform-specific folders for each target platform. +* The `platforms` directory is created empty. When you add a target platform to your project, the NativeScript CLI creates a new subdirectory with the platform name. The subdirectory contains the ready-to-build resources of your app. When you run `prepare `, the NativeScript CLI prepares relevant content from the `app` directory to the platform-specific subdirectory for each target platform. [Back to Top][1] @@ -410,12 +242,12 @@ To list all available versions for ios, run $ npm view tns-ios versions
To l For more information about working with NativeScript, see the following resources. -* [The NativeScript Documentation Wiki][6] -* [The NativeScript API Reference][7] +* [The NativeScript Documentation Wiki][3] +* [The NativeScript API Reference][5] ### Development in `app` -The `app` directory in the root of the project is the development space for your project. **Place all your common and platform-specific code in this directory.** When you run `prepare `, the NativeScript CLI copies relevant content to the platform-specific folders for each target platform. +The `app` directory in the root of the project is the development space for your project. **Place all your common and platform-specific code in this directory.** In the `app` directory, you can use **platform-specific files** to provide customized functionality and design for each target platform. To indicate that a file is platform-specific, make sure that the file name is in the following format: `name.ios.extension` or `name.android.extension`. For example: `main.ios.js` or `main.android.js`. @@ -423,113 +255,54 @@ You can develop shared functionality or design in common files. To indicate that ### Development in `platforms` -> **IMPORTANT:** Avoid editing files located in the `platforms` subdirectory because the NativeScript CLI overrides such files during the `prepare ` using the contents of the `app` directory. +> **IMPORTANT:** Avoid editing files located in the `platforms` subdirectory because the NativeScript CLI overrides such files. ### Modifying Configuration Files -The NativeScript CLI respects any platform configuration files placed inside `app/App_Resources`. Those files are respectively `app/App_Resources/AndroidManifest.xml` for Android and `app/App_Resources/Info.plist` for iOS. - -Additionaly, you can modify `app/App_Resources/build.xcconfig` and `app/App_Resources/app.gradle` for adding/removing additional build properties for iOS and Android, respectively. - -[Back to Top][1] - -## Prepare for Build - -When you run `build`, the NativeScript CLI uses the resources from the platform-specific subdirectory in the `platforms` directory. To populate the platform-specific subdirectory with the correct application assets, you need to run `prepare`. +The NativeScript CLI respects any platform configuration files placed inside `App_Resources`. -```Shell -tns prepare android -tns prepare ios -``` +### Modifying Entitlements File (iOS only) -`prepare ` takes content from `app`, analyzes it and copies it to the platform-specific subdirectory in `platforms`. This operation copies common and relevant platform-specific content that applies to the selected platform. This ensures that your Android or iOS application contain only the correct assets. +To specify which capabilities are required by your App - Maps, Push Notifications, Wallet etc. you can add or edit the `app.entitlements` file placed inside `App_Resources/iOS`. When building the project, the default `App_Resources/iOS/app.entitlements` file gets merged with all Plugins entitlement files and a new `yourAppName.entitlements` is created in the platforms directory. The path would be `platforms/ios//.entitlements` and will be linked in the `build.xcconfig` file. -Keep in mind that `prepare` overrides changes made to the platform-specific subdirectory in `platforms`. For more information, see [Development in platforms](#development-in-platforms). +You can always override the generated entitlements file, by pointing to your own entitlements file by setting the `CODE_SIGN_ENTITLEMENTS` property in the `App_Resources/iOS/build.xcconfig` file. [Back to Top][1] ## Build Your Project -After you have prepared your project, you can build it for your target mobile platforms. +You can build it for your target mobile platforms. ```Shell -tns build android -tns build ios +ns build android +ns build ios ``` The NativeScript CLI calls the SDK for the selected target platform and uses it to build your app locally. -When you build for Android, the NativeScript CLI saves the application package as an `APK` in `platforms` → `android` → `bin`. - When you build for iOS, the NativeScript CLI will either build for a device, if there's a device attached, or for the native emulator if there are no devices attached. To trigger a native emulator build when a device is attached, set the `--emulator` flag. -The native emulator build is saved as an `APP` in `platforms` → `ios` → `build` → `emulator`. The device build is saved as an `IPA` in `platforms` → `ios` → `build` → `device`. - -> **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](http://seventhsoulmountain.blogspot.com/2013/09/ios-code-sign-in-complete-walkthrough.html). +> **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). [Back to Top][1] -## Deploy Your Project +## Run Your Project You can test your work in progress on connected Android or iOS devices. To verify that the NativeScript CLI recognizes your connected devices, run the following command. ```Shell -tns device -``` - -The NativeScript CLI lists all connected physical devices and running Android Virtual Devices. - -After you have listed the available devices, you can deploy your app on all devices from the selected target platform. - - -```Shell -tns deploy android -tns deploy ios +ns devices ``` -The NativeScript CLI calls the SDK for the selected target platform and uses it to build your app locally. After the build is complete, the NativeScript CLI downloads and installs the application package on your connected devices. - -On Android devices, the app runs automatically. - -On iOS devices, the app does not run automatically. To run the app, tap the app icon. - -> **IMPORTANT:** To deploy your app on iOS devices, you need to configure a valid pair of certificate and provisioning profile for code signing your application package. For more information, see [iOS Code Signing - A Complete Walkthrough](http://seventhsoulmountain.blogspot.com/2013/09/ios-code-sign-in-complete-walkthrough.html). +The NativeScript CLI lists all connected physical devices and running emulators/simulators. -[Back to Top][1] - -## Emulate Your Project - -If you do not have any physical devices on which to test your app or if you have not configured any certificates and provisioning profiles for iOS, you can run your app in the native emulator of your target platform. +After you have listed the available devices, you can quickly run your app on connected devices by executing: ```Shell -tns emulate android -tns emulate ios -``` - -This operation calls the SDK for the selected target platform, builds your app locally, launches the native device emulator for the selected target platform, and runs your project on the virtual device. - -For Android, the NativeScript CLI runs your app in the earliest created virtual device or the currently running Android Virtual Device. Before running your app in the Android native emulator, make sure that you have configured at least one virtual device in the Android Virtual Device manager. - -For iOS, the NativeScript CLI runs your app in the iOS Simulator. - -[Back to Top][1] - -## Run Your Project - -You can quickly run your app on connected devices, including all running Android Virtual Devices. The following command is shorthand for `prepare`, `build`, and `deploy`. - -```Shell -tns run android -tns run ios -``` - -You can quickly deploy your app in the native emulators. The following command is shorthand for `prepare`, `build`, and `emulate`. - -```Shell -tns run android --emulator -tns run ios --emulator +ns run android +ns run ios ``` [Back to Top][1] @@ -537,11 +310,11 @@ tns run ios --emulator Extending the CLI === -The NativeScript CLI lets you extend its behavior and customize it to fit your needs by using [hooks](https://en.wikipedia.org/wiki/Hooking). +The NativeScript CLI lets you extend its behavior and customize it to fit your needs by using [hooks](https://docs.nativescript.org/guide/hooks). -When you run one of the extendable commands (for example, `tns build`), the CLI checks for hooks and executes them. Plugins can also use hooks to control the compilation of the application package. +When you run one of the extendable commands (for example, `ns build`), the CLI checks for hooks and executes them. Plugins can also use hooks to control the compilation of the application package. -For more information, see the [Extending the CLI document](https://github.com/NativeScript/nativescript-cli/blob/production/extending-cli.md) +For more information, see the [Extending the CLI document](https://github.com/NativeScript/nativescript-cli/blob/main/extending-cli.md) [Back to Top][1] @@ -551,37 +324,44 @@ Troubleshooting If the NativeScript CLI does not behave as expected, you might be facing a configuration issue. For example, a missing `JAVA` path. To check if your system is configured properly for the NativeScript CLI, run the following command. ```bash -tns doctor +ns doctor ``` This command prints warnings about current configuration issues and provides basic information about how to resolve them. -If addressing the configuration issues does not resolve your problem, you can [report an issue](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#report-an-issue) or [post in the NativeScript page in Google Groups](https://groups.google.com/forum/#!forum/nativescript). +If addressing the configuration issues does not resolve your problem, you can [report an issue](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#report-an-issue) or [ask the community](https://stackoverflow.com/questions/tagged/nativescript). [Back to Top][1] -Known Issues +How to Contribute === -* You cannot synchronize changes to apps on Android 4.3 devices and on some Samsung devices using the `livesync android` command.
**Workaround:** Upgrade to a later version of Android to be able to use the `livesync` command. If you need to develop for Android 4.3 devices, re-build and re-deploy your app to get your latest changes on device. +To learn how to log a bug that you just discovered, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#report-an-issue). + +To learn how to suggest a new feature or improvement, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#request-a-feature). -* On OS X systems with configured firewall or web proxy, when you run a command, the operation might not release the command line and you might not be able to run other commands until you break the current operation.
If you have enabled feature usage tracking for the NativeScript CLI, but you have not authenticated with the firewall or web proxy on your OS X system, the NativeScript CLI might not release the command line after you run a command. To continue working with the NativeScript CLI, you need to break the current operation by pressing `Ctrl+C`.
**Workaround:** Authenticate with the firewall or web proxy. - 1. Close the terminal. - 1. Run Safari. - 1. Attempt to open a web page. - 1. Provide your authentication credentials for accessing the Internet. - 1. Run the terminal and continue working with the NativeScript CLI. +To learn how to contribute to the code base, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#contribute-to-the-code-base). [Back to Top][1] -How to Contribute +How to Build === +``` +git clone https://github.com/NativeScript/nativescript-cli +cd nativescript-cli +npm run setup +npm run build +``` -To learn how to log a bug that you just discovered, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#report-an-issue). +To use the locally built CLI instead of `ns` you can call `PATH_TO_CLI_FOLDER/bin/ns`. For example: +`PATH_TO_CLI_FOLDER/bin/ns run ios|android` -To learn how to suggest a new feature or improvement, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#request-a-feature). +[Back to Top][1] -To learn how to contribute to the code base, click [here](https://github.com/NativeScript/nativescript-cli/blob/master/CONTRIBUTING.md#contribute-to-the-code-base). +Get Help +=== + +Please, use [github issues](https://github.com/NativeScript/nativescript-cli/issues) strictly for [reporting bugs](CONTRIBUTING.md#report-an-issue) or [requesting features](CONTRIBUTING.md#request-a-feature). For general NativeScript questions and support, check out [Stack Overflow](https://stackoverflow.com/questions/tagged/nativescript) or ask our experts in the [NativeScript community Discord channel](https://nativescript.org/discord). [Back to Top][1] @@ -592,24 +372,8 @@ This software is licensed under the Apache 2.0 license, quoted { + if (code) { + console.log(chalk.gray("mocha: ") + "Exited with " + code); + } else { + console.log(chalk.gray("mocha: ") + chalk.red("Exited with " + code)); + } + mocha = null; + mochal = null; + }); + mochal = readline.createInterface({ input: mocha.stdout }); + mochal.on('line', line => { + console.log(chalk.gray('mocha: ') + line); + }); +} + +var tsc = spawn("./node_modules/.bin/tsc", ["--watch"]); +var tscl = readline.createInterface({ input: tsc.stdout }); +tscl.on('line', line => { + console.log(chalk.gray(" tsc: ") + line); + if (line.indexOf("Compilation complete.") >= 0) { + compilationComplete(); + } else if (line.indexOf("File change detected.") >= 0) { + compilationStarted(); + } else if (line.indexOf(": error TS") >= 0) { + foundErrors(); + } +}); diff --git a/docs/build-jekyll-md.sh b/docs/build-jekyll-md.sh new file mode 100755 index 0000000000..766f974aa7 --- /dev/null +++ b/docs/build-jekyll-md.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -e + +rm -rf docs-cli +npm install --ignore-scripts + +npx grunt docs-jekyll diff --git a/docs/man_pages/cloud/cloud-setup.md b/docs/man_pages/cloud/cloud-setup.md new file mode 100644 index 0000000000..03b355161a --- /dev/null +++ b/docs/man_pages/cloud/cloud-setup.md @@ -0,0 +1,29 @@ +<% if (isJekyll) { %>--- +title: ns cloud setup +position: 5 +---<% } %> + +# ns cloud setup + +### Description + +Install the `nativescript-cloud extension` to configure your environment for cloud builds. + +### Commands + +Usage | Synopsis +------|------- +Install the `nativescript-cloud extension` | `$ ns cloud setup` +Log in for cloud builds (will open browser login form) | `$ ns login` +Log in for cloud builds (through the CLI) | `$ ns dev-login ` +Accept EULA agreement | `$ ns accept eula` +Perform iOS cloud build | `$ ns cloud build ios --accountId=` +Perform Android cloud build | `$ ns cloud build android --accountId=` +View accountId (after logging in) | `$ ns account` + + +### Related Commands + +Command | Description +----------|---------- +[setup](setup.html) | Run the setup script to try to automatically configure your environment for local builds. diff --git a/docs/man_pages/config/config-get.md b/docs/man_pages/config/config-get.md new file mode 100644 index 0000000000..e262e557a5 --- /dev/null +++ b/docs/man_pages/config/config-get.md @@ -0,0 +1,36 @@ +<% if (isJekyll) { %>--- +title: ns config get +position: 2 +---<% } %> + +# ns config get + +### Description + +Prints the value for a specific key from the project's NativeScript configuration. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns config get ` + +### Arguments + +* `` — The configuration key in dot-notation. Examples: `ios.id`, `android.codeCache`, `bundler`. + +### Examples + +* `$ ns config get ios.id` +* `$ ns config get android.codeCache` +* `$ ns config get bundler` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[config](config.html) | Lists all configuration values for the current project. +[config set](config-set.html) | Sets the value for the specified configuration key. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/config/config-set.md b/docs/man_pages/config/config-set.md new file mode 100644 index 0000000000..ea7769f647 --- /dev/null +++ b/docs/man_pages/config/config-set.md @@ -0,0 +1,40 @@ +<% if (isJekyll) { %>--- +title: ns config set +position: 3 +---<% } %> + +# ns config set + +### Description + +Sets the value for a specific key in the project's NativeScript configuration. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns config set ` + +### Arguments + +* `` — The configuration key in dot-notation. Examples: `ios.id`, `android.codeCache`, `bundler`. +* `` — The value to set. Parsed as JSON when possible (e.g. `true`, `42`, `{ "foo": "bar" }`). Otherwise treated as a string. + +### Examples + +* `$ ns config set ios.id org.nativescript.myapp` +* `$ ns config set android.codeCache true` +* `$ ns config set bundler vite` + +### Notes + +* Setting whole objects is not supported. Update individual keys instead. For example, use: + `$ ns config set android.codeCache true` + +### Related Commands + +Command | Description +----------|---------- +[config](config.html) | Lists all configuration values for the current project. +[config get](config-get.html) | Prints the value for the specified configuration key. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/config/config.md b/docs/man_pages/config/config.md new file mode 100644 index 0000000000..7b701e03d1 --- /dev/null +++ b/docs/man_pages/config/config.md @@ -0,0 +1,39 @@ +<% if (isJekyll) { %>--- +title: ns config +position: 1 +---<% } %> + +# ns config + +### Description + +View and manage your project's NativeScript configuration stored in `nativescript.config.(js|ts)` (or legacy `nsconfig.json`). + +### Commands + +Usage | Synopsis +------|--------- +List all config | `$ ns config` +Get a value | `$ ns config get ` +Set a value | `$ ns config set ` + +### Examples + +* `$ ns config` — prints all configuration values. +* `$ ns config get ios.id` — prints the iOS bundle identifier. +* `$ ns config set android.codeCache true` — enables Android V8 code cache. + +### Notes + +* Keys use dot-notation, for example: `ios.id`, `android.codeCache`, `bundler`. +* Values are parsed as JSON when possible. Use quotes for strings with spaces. + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[config get](config-get.html) | Prints the value for the specified configuration key. +[config set](config-set.html) | Sets the value for the specified configuration key. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/device/device-android.md b/docs/man_pages/device/device-android.md index 194b6280f9..2156bca320 100644 --- a/docs/man_pages/device/device-android.md +++ b/docs/man_pages/device/device-android.md @@ -1,14 +1,24 @@ -device android -========== +<% if (isJekyll) { %>--- +title: ns device android +position: 1 +---<% } %> + +# ns device android + +### Description + +Lists all recognized connected Android physical and running virtual devices with serial number and index. <% if(isHtml) { %>If a connected Android device is not shown in the list, make sure that you have installed the required Android USB drivers on your system and that USB debugging is enabled on the device.<% } %> + +### Commands Usage | Synopsis ------|------- -General | `$ tns device android [--timeout ]` - -Lists all recognized connected Android physical and running virtual devices with serial number and index. <% if(isHtml) { %>If a connected Android device is not shown in the list, make sure that you have installed the required Android USB drivers on your system and that USB debugging is enabled on the device.<% } %> +General | `$ ns device android [--timeout ]` ### Options -* `--timeout` - Sets the time in milliseconds for the operation to search for connected devices before completing. If not set, the default value is 4000. <% if(isHtml) { %>The operation will continue to wait and listen for newly connected devices and will list them after the specified time expires. + +* `--available-devices` - Lists all available emulators for Android. +* `--timeout` - Sets the time in milliseconds for the operation to search for connected devices before completing. If not set, the default value is 4000. <% if(isHtml) { %>The operation will continue to wait and listen for newly connected devices and will list them after the specified time expires. ### Related Commands diff --git a/docs/man_pages/device/device-ios.md b/docs/man_pages/device/device-ios.md index 1269f967ee..d6c4e2cabe 100644 --- a/docs/man_pages/device/device-ios.md +++ b/docs/man_pages/device/device-ios.md @@ -1,21 +1,32 @@ -device ios -========== +<% if (isJekyll) { %>--- +title: ns device ios +position: 2 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns device ios [--timeout ]` +# ns device ios + +### Description Lists all recognized connected iOS devices with serial number and index. -<% if(isConsole && (isLinux)) { %>WARNING: You can run this command only on Windows and OS X systems. To view the complete help for this command, run `$ tns help device ios`<% } %> +<% if(isConsole && (isLinux)) { %>WARNING: You can run this command only on Windows and macOS systems. To view the complete help for this command, run `$ ns help device ios`<% } %> + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns device ios [--timeout ]` <% if((isConsole && (isWindows || isMacOS)) || isHtml) { %> + ### Options + +* `--available-devices` - Lists all available emulators for iOS. * `--timeout` - Sets the time in milliseconds for the operation to search for connected devices before completing. If not set, the default value is 4000. <% } %><% if(isHtml) { %>The operation will continue to wait and listen for newly connected devices and will list them after the specified time expires. ### Command Limitations -* You can run `$ tns device ios` on Windows and OS X systems. +* You can run `$ ns device ios` on Windows and OS X systems. ### Related Commands diff --git a/docs/man_pages/device/device-list-applications.md b/docs/man_pages/device/device-list-applications.md index 0865f12705..b74c2961ee 100644 --- a/docs/man_pages/device/device-list-applications.md +++ b/docs/man_pages/device/device-list-applications.md @@ -1,19 +1,26 @@ -device list-applications -========== +<% if (isJekyll) { %>--- +title: ns device list-applications +position: 3 +---<% } %> + +# ns device list-applications + +### Description + +Lists the installed applications on all connected Android <% if(isWindows || isMacOS) { %>and iOS <% } %>devices. + +### Commands Usage | Synopsis ------|------- -General | `$ tns device list-applications [--device ]` - -Lists the installed applications on all connected Android <% if(isWindows || isMacOS) { %>and iOS <% } %>devices. +General | `$ ns device list-applications [--device ]` ### Options -* `--device` - If multiple devices are connected, sets the device for which you want to list all currently installed applications. -### Attributes -* `` is the device index or identifier as listed by run `$ tns device` +* `--device` - If multiple devices are connected, sets the device for which you want to list all currently installed applications. `` is the device index or identifier as listed by the `$ ns device` command. + +<% if(isHtml) { %> -<% if(isHtml) { %> ### Command Limitations * You cannot work with connected iOS devices on Linux systems. diff --git a/docs/man_pages/device/device-log.md b/docs/man_pages/device/device-log.md index c87ee93523..602d72278e 100644 --- a/docs/man_pages/device/device-log.md +++ b/docs/man_pages/device/device-log.md @@ -1,19 +1,26 @@ -device log -========== +<% if (isJekyll) { %>--- +title: ns device log +position: 4 +---<% } %> + +# ns device log + +### Description + +Opens the device log stream for a selected connected Android <% if(isWindows || isMacOS) { %>or iOS <% } %>device. + +### Commands Usage | Synopsis ------|------- -General | `$ tns device log [--device ]` - -Opens the device log stream for a selected connected Android <% if(isWindows || isMacOS) { %>or iOS <% } %>device. +General | `$ ns device log [--device ]` ### Options -* `--device` - If multiple devices are connected, sets the device for which you want to stream the log in the console. -### Attributes -* `` is the device index or identifier as listed by `$ tns device` +* `--device` - If multiple devices are connected, sets the device for which you want to stream the log in the console. `` is the device index or identifier as listed by the `$ ns device` command. + +<% if(isHtml) { %> -<% if(isHtml) { %> ### Command Limitations * You cannot work with connected iOS devices on Linux systems. diff --git a/docs/man_pages/device/device-run.md b/docs/man_pages/device/device-run.md index 318f4b15cc..fc6e704744 100644 --- a/docs/man_pages/device/device-run.md +++ b/docs/man_pages/device/device-run.md @@ -1,27 +1,37 @@ -device run -========== +<% if (isJekyll) { %>--- +title: ns device run +position: 5 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns device run [--device ]` +# ns device run + +### Description Runs the selected application on a connected Android <% if(isMacOS) { %>or iOS <% } %>device. <% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can work only with connected Android devices.<% } %> +### Commands + +Usage | Synopsis +------|------- +General | `$ ns device run [--device ]` + ### Options -* `--device` - If multiple devices are connected, sets the device on which you want to run the app. -### Attributes -* `` is the application identifier as listed by `$ tns device list-applications` -* `` is the device index or identifier as listed by run `$ tns device` +* `--device` - If multiple devices are connected, sets the device on which you want to run the app. `` is the device index or identifier as listed by the `$ ns device` command. + +### Arguments + +* `` is the application identifier as listed by `$ ns device list-applications`. <% if(isHtml) { %> + ### Prerequisites -Before running your app on an iOS device, verify that your system and app meet the following requirements. -* You are running the NativeScript CLI on an OS X system. -* You have installed Xcode 5 or later. +Before running your app on an iOS device, verify that your system and app meet the following requirements. +* You are running the NativeScript CLI on a macOS system. +* You have installed the latest version of Xcode. * You have built your app with the debug build configuration. Before running your app on an Android device, verify that your app meets the following requirement. @@ -31,7 +41,7 @@ Before running your app on an Android device, verify that your app meets the fol ### Command Limitations * You can run this command on one connected device at a time. -* You can run this command for iOS devices only on OS X systems. +* You can run this command for iOS devices only on macOS systems. ### Related Commands diff --git a/docs/man_pages/device/device.md b/docs/man_pages/device/device.md index 22cdee2814..777acc8eec 100644 --- a/docs/man_pages/device/device.md +++ b/docs/man_pages/device/device.md @@ -1,24 +1,38 @@ -device -========== +<% if (isJekyll) { %>--- +title: ns device +position: 6 +---<% } %> + +# ns device + +### Description + +Lists all recognized connected Android <% if(isWindows || isMacOS) { %>or iOS devices <% } %>with serial number and index<% if(isWindows || isMacOS) { %>, grouped by platform<% } %>. + +### Commands Usage | Synopsis ------|--------- -General | `$ tns device []` +General | `$ ns device []` -Lists all recognized connected Android <% if(isWindows || isMacOS) { %>or iOS devices <% } %>with serial number and index<% if(isWindows || isMacOS) { %>, grouped by platform<% } %>. +### Arguments -### Attributes -`` extends the `device` command. You can set the following values for this attribute. +`` extends the `device` command. You can set the following values for this argument: * `android` - Lists all recognized connected Android physical and running Android virtual devices. -<% if(isWindows || isMacOS) { %>* `ios` - Lists all recognized connected iOS devices. <% } %> +<% if(isWindows || isMacOS) { %>* `ios` - Lists all recognized connected iOS devices. <% } %> * `log` - Opens the device log stream for a selected connected device. * `list-applications` - Lists the installed applications on all connected Android <% if(isWindows || isMacOS) { %>or iOS <%}%>devices. * `run` - Runs the selected application on a connected Android <% if(isMacOS) { %>or iOS <%}%>device. -<% if(isHtml) { %> +<% if(isHtml) { %> + ### Command Limitations -* You can run `$ tns device ios` on Windows and OS X systems. +* You can run `$ ns device ios` on Windows and macOS systems. + +### Aliases + +* You can use `$ ns devices` as an alias for `$ ns device`. ### Related Commands diff --git a/docs/man_pages/env-configuration/setup.md b/docs/man_pages/env-configuration/setup.md new file mode 100644 index 0000000000..572872fd14 --- /dev/null +++ b/docs/man_pages/env-configuration/setup.md @@ -0,0 +1,22 @@ +<% if (isJekyll) { %>--- +title: ns setup +position: 5 +---<% } %> + +# ns setup + +### Description + +Run the setup script to automatically install the NativeScript dependencies and configure your environment for local builds. + +### Commands + +Usage | Synopsis +------|------- +Run the setup script | `$ ns setup` + +### Related Commands + +Command | Description +----------|---------- +[setup cloud](setup-cloud.html) | Install the nativescript-cloud extension to configure your environment for cloud builds. \ No newline at end of file diff --git a/docs/man_pages/general/autocomplete-disable.md b/docs/man_pages/general/autocomplete-disable.md index a02a7f366f..cdc66d0074 100644 --- a/docs/man_pages/general/autocomplete-disable.md +++ b/docs/man_pages/general/autocomplete-disable.md @@ -1,14 +1,24 @@ -autocomplete disable -========== +<% if (isJekyll) { %>--- +title: ns autocomplete disable +position: 1 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns autocomplete disable` +# ns autocomplete disable + +### Description Disables command-line completion for bash and zsh shells. You need to restart the shell to complete the operation. <% if(isHtml) { %>> <% } %>NOTE: This operation might modify the `.bash_profile`, `.bashrc` and `.zshrc` files. -<% if(isHtml) { %> + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns autocomplete disable` + +<% if(isHtml) { %> + ### Related Commands Command | Description @@ -20,4 +30,8 @@ Command | Description [error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. [help](help.html) | Lists the available commands or shows information about the selected command. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/general/autocomplete-enable.md b/docs/man_pages/general/autocomplete-enable.md index 9881b6a1f3..0958510eaf 100644 --- a/docs/man_pages/general/autocomplete-enable.md +++ b/docs/man_pages/general/autocomplete-enable.md @@ -1,14 +1,24 @@ -autocomplete enable -========== +<% if (isJekyll) { %>--- +title: ns autocomplete enable +position: 2 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns autocomplete enable` +# ns autocomplete enable + +### Description Enables command-line completion for bash and zsh shells. You need to restart the shell to complete the operation. <% if(isHtml) { %>> <% } %>NOTE: This operation might modify the `.bash_profile`, `.bashrc` and `.zshrc` files. -<% if(isHtml) { %> + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns autocomplete enable` + +<% if(isHtml) { %> + ### Related Commands Command | Description @@ -20,4 +30,8 @@ Command | Description [error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. [help](help.html) | Lists the available commands or shows information about the selected command. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/general/autocomplete-status.md b/docs/man_pages/general/autocomplete-status.md index 373bb7f3c3..16576f1cd3 100644 --- a/docs/man_pages/general/autocomplete-status.md +++ b/docs/man_pages/general/autocomplete-status.md @@ -1,13 +1,22 @@ -autocomplete status -========== +<% if (isJekyll) { %>--- +title: ns autocomplete status +position: 3 +---<% } %> + +# ns autocomplete status + +### Description + +Prints your current command-line completion settings. + +### Commands Usage | Synopsis ------|------- -General | `$ tns autocomplete status` +General | `$ ns autocomplete status` -Prints your current command-line completion settings. +<% if(isHtml) { %> -<% if(isHtml) { %> ### Related Commands Command | Description @@ -19,4 +28,8 @@ Command | Description [error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. [help](help.html) | Lists the available commands or shows information about the selected command. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/general/autocomplete.md b/docs/man_pages/general/autocomplete.md index 15c9a10e08..a82f2fdd71 100644 --- a/docs/man_pages/general/autocomplete.md +++ b/docs/man_pages/general/autocomplete.md @@ -1,24 +1,34 @@ -autocomplete -========== +<% if (isJekyll) { %>--- +title: ns autocomplete +position: 4 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns autocomplete []` -Get settings | `$ tns autocomplete status` -Enable | `$ tns autocomplete enable` -Disable | `$ tns autocomplete disable` +# ns autocomplete + +### Description Prints your current command-line completion settings. If disabled, prompts you to enable it. <% if(isHtml) { %>> <% } %>NOTE: This operation might modify the `.bash_profile`, `.bashrc` and `.zshrc` files. -### Attributes +### Commands + +Usage | Synopsis +------|------- +General | `$ ns autocomplete []` +Get settings | `$ ns autocomplete status` +Enable | `$ ns autocomplete enable` +Disable | `$ ns autocomplete disable` + +### Arguments + `` extends the `autocomplete` command. You can set the following values for this attribute. * `status` - Prints your current command-line completion settings. * `enable` - Enables command-line completion. You need to restart the shell to complete the operation. * `disable` - Disables command-line completion. You need to restart the shell to complete the operation. -<% if(isHtml) { %> +<% if(isHtml) { %> + ### Related Commands Command | Description @@ -29,4 +39,8 @@ Command | Description [usage-reporting](usage-reporting.html) | Configures anonymous usage reporting for the NativeScript CLI. [error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/general/clean.md b/docs/man_pages/general/clean.md new file mode 100644 index 0000000000..603cb7d59f --- /dev/null +++ b/docs/man_pages/general/clean.md @@ -0,0 +1,22 @@ +<% if (isJekyll) { %>--- +title: ns clean +position: 24 +---<% } %> + +# ns clean + +### Description + +Clean project artifacts. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns clean` + +<% if(isHtml) { %> + +### Related Commands + +<% } %> diff --git a/docs/man_pages/general/doctor.md b/docs/man_pages/general/doctor.md index 10c2fe5ad3..95cbdfee33 100644 --- a/docs/man_pages/general/doctor.md +++ b/docs/man_pages/general/doctor.md @@ -1,13 +1,22 @@ -doctor -========== +<% if (isJekyll) { %>--- +title: ns doctor +position: 5 +---<% } %> + +# ns doctor + +### Description + +Checks your system for configuration problems which might prevent the NativeScript CLI from working properly for the specified platform, if configured. + +### Commands Usage | Synopsis ------|------- -General | `$ tns doctor` - -Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +General | `$ ns doctor ` <% if(isHtml) { %> + ### Related Commands Command | Description @@ -17,4 +26,8 @@ Command | Description [autocomplete](autocomplete.html) | Prints your current command-line completion settings. If disabled, prompts you to enable it. [help](help.html) | Lists the available commands or shows information about the selected command. [info](info.html) | Displays version information about the NativeScript CLI, core modules, and runtimes. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> diff --git a/docs/man_pages/general/error-reporting.md b/docs/man_pages/general/error-reporting.md index 6543bcba3f..2ec0ff7602 100644 --- a/docs/man_pages/general/error-reporting.md +++ b/docs/man_pages/general/error-reporting.md @@ -1,21 +1,29 @@ -error-reporting -========== +<% if (isJekyll) { %>--- +title: ns error-reporting +position: 6 +---<% } %> + +# ns error-reporting + +### Description + +Configures anonymous error reporting for the NativeScript CLI. All data gathered is used strictly for improving the product and will never be used to identify or contact you. + +### Commands Usage | Synopsis ------|------- -General | `$ tns error-reporting []` - -Configures anonymous error reporting for the NativeScript CLI. +General | `$ ns error-reporting []` -All data gathered is used strictly for improving the product and will never be used to identify or contact you. +### Arguments -### Attributes `` extends the `error-reporting` command. You can set the following values for this attribute. * `status` - Shows the current configuration for anonymous error reporting for the NativeScript CLI. * `enable` - Enables anonymous error reporting. * `disable` - Disables anonymous error reporting. -<% if(isHtml) { %> +<% if(isHtml) { %> + ### Related Commands Command | Description @@ -26,4 +34,8 @@ Command | Description [autocomplete-enable](autocomplete-enable.html) | Enables command-line completion for bash and zsh shells. [autocomplete-disable](autocomplete-disable.html) | Disables command-line completion for bash and zsh shells. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/general/extension-install.md b/docs/man_pages/general/extension-install.md new file mode 100644 index 0000000000..afa5c2a6d8 --- /dev/null +++ b/docs/man_pages/general/extension-install.md @@ -0,0 +1,45 @@ +<% if (isJekyll) { %>--- +title: ns extension install +position: 7 +---<% } %> + +# ns extension install + +### Description + +Installs specified extension. Each extension adds additional functionality that's accessible directly from NativeScript CLI. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns extension install ` + +### Arguments + +* `` can be any of the following. + * A `` or `@` where `` is the name of a package that is published in the npm registry and `` is a valid version of this plugin. + * A `` to the directory which contains the extension, including its `package.json` file. + * A `` to a `.tar.gz` archive containing a directory with the extension and its `package.json` file. + * A `` which resolves to a `.tar.gz` archive containing a directory with the extension and its `package.json` file. + * A `` which resolves to a `.tar.gz` archive containing a directory with the extension and its `package.json` file. + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[extension](extension.html) | Prints information about all installed extensions. +[extension-uninstall](extension-uninstall.html) | Uninstalls specified extension. +[autocomplete-status](autocomplete-status.html) | Prints the current status of your command-line completion settings. +[autocomplete-enable](autocomplete-enable.html) | Configures your current command-line completion settings. +[autocomplete-disable](autocomplete-disable.html) | Disables command-line completion for bash and zsh shells. +[usage-reporting](usage-reporting.html) | Configures anonymous usage reporting for the NativeScript CLI. +[error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. +[doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/general/extension-uninstall.md b/docs/man_pages/general/extension-uninstall.md new file mode 100644 index 0000000000..59ab1ceb69 --- /dev/null +++ b/docs/man_pages/general/extension-uninstall.md @@ -0,0 +1,41 @@ +<% if (isJekyll) { %>--- +title: ns extension uninstall +position: 8 +---<% } %> + +# ns extension uninstall + +### Description + +Uninstalls the specified extension, after which you will no longer be able to use the functionality added by this extensions to the NativeScript CLI. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns extension uninstall ` + +### Arguments + +* `` is the name of the extension as listed in its `package.json` file. + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[extension](extension.html) | Prints information about all installed extensions. +[extension-uninstall](extension-uninstall.html) | Uninstalls specified extension. +[extension-install](extension-install.html) | Installs specified extension. +[autocomplete-status](autocomplete-status.html) | Prints the current status of your command-line completion settings. +[autocomplete-enable](autocomplete-enable.html) | Configures your current command-line completion settings. +[autocomplete-disable](autocomplete-disable.html) | Disables command-line completion for bash and zsh shells. +[usage-reporting](usage-reporting.html) | Configures anonymous usage reporting for the NativeScript CLI. +[error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. +[doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/general/extension.md b/docs/man_pages/general/extension.md new file mode 100644 index 0000000000..07ca927972 --- /dev/null +++ b/docs/man_pages/general/extension.md @@ -0,0 +1,35 @@ +<% if (isJekyll) { %>--- +title: ns extension +position: 9 +---<% } %> + +# ns extension + +### Description + +Prints information about all installed extensions. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns extension` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[extension-install](extension-install.html) | Installs specified extension. +[autocomplete-status](autocomplete-status.html) | Prints the current status of your command-line completion settings. +[autocomplete-enable](autocomplete-enable.html) | Configures your current command-line completion settings. +[autocomplete-disable](autocomplete-disable.html) | Disables command-line completion for bash and zsh shells. +[usage-reporting](usage-reporting.html) | Configures anonymous usage reporting for the NativeScript CLI. +[error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. +[doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/general/help.md b/docs/man_pages/general/help.md index fe8787e63a..32af99d6ba 100644 --- a/docs/man_pages/general/help.md +++ b/docs/man_pages/general/help.md @@ -1,19 +1,29 @@ -help -========== +<% if (isJekyll) { %>--- +title: ns help +position: 10 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns help []` +# ns help + +### Description Opens the command reference for all commands in your browser or shows information about the selected command in the browser. -To list all commands available in the console, run `$ tns -h` -To print information about a selected command in the console, run `$ tns -h` +To list all commands available in the console, run `$ ns -h`. +To print information about a selected command in the console, run `$ ns -h`. -### Attributes -* `` is any of the available commands as listed by `$ tns help` or `$ tns -h` +### Commands + +Usage | Synopsis +------|------- +General | `$ ns help []` + +### Arguments + +* `` is any of the available commands as listed by `$ ns help` or `$ ns -h` <% if(isHtml) { %> + ### Related Commands Command | Description @@ -23,4 +33,7 @@ Command | Description [autocomplete](autocomplete.html) | Prints your current command-line completion settings. If disabled, prompts you to enable it. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. [info](info.html) | Displays version information about the NativeScript CLI, core modules, and runtimes. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. <% } %> diff --git a/docs/man_pages/general/info.md b/docs/man_pages/general/info.md index c59668199c..bf2018b48a 100644 --- a/docs/man_pages/general/info.md +++ b/docs/man_pages/general/info.md @@ -1,13 +1,22 @@ -info -========== +<% if (isJekyll) { %>--- +title: ns info +position: 11 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns info` +# ns info + +### Description Displays version information about the NativeScript CLI, core modules, and runtimes. +### Commands + +Usage | Synopsis +------|------- +General | `$ ns info` + <% if(isHtml) { %> + ### Related Commands Command | Description @@ -17,4 +26,8 @@ Command | Description [autocomplete](autocomplete.html) | Prints your current command-line completion settings. If disabled, prompts you to enable it. [help](help.html) | Lists the available commands or shows information about the selected command. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> diff --git a/docs/man_pages/general/migrate.md b/docs/man_pages/general/migrate.md new file mode 100644 index 0000000000..a69c40bdde --- /dev/null +++ b/docs/man_pages/general/migrate.md @@ -0,0 +1,79 @@ +<% if (isJekyll) { %>--- +title: ns migrate +position: 15 +---<% } %> + +# ns migrate + +### Description + +Migrates the app dependencies to a form compatible with NativeScript 6.0. Running this command will not affect the codebase of the application and you might need to do additional changes manually. + +The migrate command will update **"webpack.config.js"**, **"karma.conf.js"**, **"tsconfig.tns.json"**(not for code sharing projects) and **"package-lock.json"**. The original files will be moved to **".migration_backup"** folder. +The following folders will be removed: **"hooks"**, **"platforms"** and **"node_modules"**. The **"hooks"** folder will also be backed up in **".migration_backup"** folder. + +The **"nativescript-dev-sass"** and **"nativescript-dev-typescript"** dependencies will be replaced with **"node-sass"** and **"typescript"** respectively. +The **"nativescript-dev-less"** dependency will be removed, but to enable LESS CSS support the user should follow the steps in this<% if(isConsole) { %> feature request: https://github.com/NativeScript/nativescript-dev-webpack/issues/967.<% } %><% if(isHtml) { %> [feature request](https://github.com/NativeScript/nativescript-dev-webpack/issues/967).<% } %> + +The following dependencies will be updated if needed: +* tns-core-modules +* tns-core-modules-widgets +* tns-platform-declarations +* nativescript-dev-webpack +* nativescript-camera +* nativescript-geolocation +* nativescript-imagepicker +* nativescript-permissions +* nativescript-social-share +* nativescript-ui-chart +* nativescript-ui-dataform +* nativescript-ui-gauge +* nativescript-ui-listview +* nativescript-ui-sidedrawer +* nativescript-ui-calendar +* nativescript-ui-autocomplete +* nativescript-cardview +* nativescript-datetimepicker +* kinvey-nativescript-sdk +* nativescript-plugin-firebase +* nativescript-vue +* nativescript-vue-template-compiler +* nativescript-angular +* @angular/animiations +* @angular/platform-browser-dynamic +* @angular/common +* @angular/compiler +* @angular/compiler-cli +* @angular/core +* @angular/forms +* @angular/http +* @angular/platform-browser +* @angular/router +* @ngtools/webpack +* @angular-devkit/build-angular +* rxjs +* zone.js +* @nativescript/unit-test-runner +* karma-webpack +* karma-jasmine +* karma-mocha +* karma-chai +* karma-qunit +* karma + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns migrate` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. +[help](help.html) | Lists the available commands or shows information about the selected command. +[doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +<% } %> diff --git a/docs/man_pages/general/package-manager-get.md b/docs/man_pages/general/package-manager-get.md new file mode 100644 index 0000000000..a582878de1 --- /dev/null +++ b/docs/man_pages/general/package-manager-get.md @@ -0,0 +1,26 @@ +<% if (isJekyll) { %>--- +title: ns package-manager get +position: 19 +---<% } %> + +# ns package-manager get + +### Description + +Prints the value of the current package manager. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns package-manager get` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[package-manager-set](package-manager-set.html) | Enables the specified package manager for the NativeScript CLI. Supported values are npm, yarn and pnpm. +[package-manager-get](package-manager-get.html) | Prints the value of the current package manager. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/general/package-manager-set.md b/docs/man_pages/general/package-manager-set.md new file mode 100644 index 0000000000..e55f7718d0 --- /dev/null +++ b/docs/man_pages/general/package-manager-set.md @@ -0,0 +1,29 @@ +<% if (isJekyll) { %>--- +title: ns package-manager set +position: 18 +---<% } %> + +# ns package-manager set + +### Description + +Enables the specified package manager for the NativeScript CLI. Supported values are npm, yarn and pnpm. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns package-manager set ` + +### Arguments + +* `` is the name of the package manager. Supported values are npm, yarn and pnpm. + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[package-manager-get](package-manager-get.html) | Prints the value of the current package manager. +<% } %> diff --git a/docs/man_pages/general/package-manager.md b/docs/man_pages/general/package-manager.md new file mode 100644 index 0000000000..c0a9187ebe --- /dev/null +++ b/docs/man_pages/general/package-manager.md @@ -0,0 +1,25 @@ +<% if (isJekyll) { %>--- +title: ns package-manager get +position: 19 +---<% } %> + +# ns package-manager get + +### Description + +Prints the value of the current package manager. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns package-manager get` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[package-manager-set](package-manager-set.html) | Enables the specified package manager for the NativeScript CLI. Supported values are npm, yarn and pnpm. +<% } %> \ No newline at end of file diff --git a/docs/man_pages/general/proxy-clear.md b/docs/man_pages/general/proxy-clear.md new file mode 100644 index 0000000000..b81b57394f --- /dev/null +++ b/docs/man_pages/general/proxy-clear.md @@ -0,0 +1,26 @@ +<% if (isJekyll) { %>--- +title: ns proxy clear +position: 12 +---<% } %> + +# ns proxy clear + +### Description + +Clears the currently configured proxy settings of the NativeScript CLI. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns proxy clear` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[proxy](proxy.html) | Displays proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +<% } %> diff --git a/docs/man_pages/general/proxy-set.md b/docs/man_pages/general/proxy-set.md new file mode 100644 index 0000000000..4efea775c9 --- /dev/null +++ b/docs/man_pages/general/proxy-set.md @@ -0,0 +1,45 @@ +<% if (isJekyll) { %>--- +title: ns proxy set +position: 13 +---<% } %> + +# ns proxy set + +### Description + +Sets the proxy settings of the NativeScript CLI. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns proxy set [ <% if(isWindows) {%>[ []]<%}%>]` + +### Options + +* `--insecure` - Allows insecure SSL connections and transfers to be performed. In case your proxy doesn't have a CA certificate or has an invalid one you need to use this flag. + +### Arguments + +* `` is the full url of the proxy. For example, http://127.0.0.1:8888. If you do not provide the url when running the command, the NativeScript CLI will prompt you to provide it. +<% if(isWindows) {%> +* `` and `` are your credentials for the proxy. These are not necessary, however, if you provide a `` you need to provide a `` too. +<% } %> + +<% if(isHtml) { %> + +### Command Limitations + +* You can set credentials only on Windows systems. +* Proxy settings for npm, (Android) Gradle and (optional) Docker need to be set separately. + * configuring `npm` proxy - https://docs.npmjs.com/misc/config#https-proxy + * (Android) configuring Gradle proxy - set global configuration in the user directory - _/.gradle/gradle.properties_ - https://docs.gradle.org/3.3/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy + * configuring Docker proxy - https://docs.docker.com/network/proxy/ + +### Related Commands + +Command | Description +----------|---------- +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +<% } %> diff --git a/docs/man_pages/general/proxy.md b/docs/man_pages/general/proxy.md new file mode 100644 index 0000000000..0a525d2fb9 --- /dev/null +++ b/docs/man_pages/general/proxy.md @@ -0,0 +1,31 @@ +<% if (isJekyll) { %>--- +title: ns proxy +position: 14 +---<% } %> + +# ns proxy + +### Description + +Displays the current proxy settings of the NativeScript CLI. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns proxy []` + +### Arguments +`` extends the `proxy` command. You can set the following values for this attribute: +* `set` - Sets proxy settings +* `clear` - Clears proxy settings + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +<% } %> diff --git a/docs/man_pages/general/update.md b/docs/man_pages/general/update.md new file mode 100644 index 0000000000..aecf9b3872 --- /dev/null +++ b/docs/man_pages/general/update.md @@ -0,0 +1,40 @@ +<% if (isJekyll) { %>--- +title: ns update +position: 16 +---<% } %> + +# ns update + +### Description + +Updates the project with the latest versions of iOS/Android runtimes, cross-platform modules and "@nativescript/webpack". +In order to get the latest development release instead, pass `next` as argument: +`ns update next` + +You can also switch to specific version by passing it to the command: +`ns update 5.0.0` + +**NOTE:** The provided version should be an existing version of the project template for this project type. + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns update` + +<% if(isHtml) { %> + +### Related Commands + +Command | Description +----------|---------- +[usage-reporting](usage-reporting.html) | Configures anonymous usage reporting for the NativeScript CLI. +[error-reporting](error-reporting.html) | Configures anonymous error reporting for the NativeScript CLI. +[autocomplete](autocomplete.html) | Prints your current command-line completion settings. If disabled, prompts you to enable it. +[help](help.html) | Lists the available commands or shows information about the selected command. +[doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. +<% } %> diff --git a/docs/man_pages/general/usage-reporting.md b/docs/man_pages/general/usage-reporting.md index 138cf0f33e..c4b7a1eb0e 100644 --- a/docs/man_pages/general/usage-reporting.md +++ b/docs/man_pages/general/usage-reporting.md @@ -1,21 +1,29 @@ -usage-reporting -========== +<% if (isJekyll) { %>--- +title: ns usage-reporting +position: 17 +---<% } %> + +# ns usage-reporting + +### Description + +Configures anonymous usage reporting for the NativeScript CLI. All data gathered is used strictly for improving the product and will never be used to identify or contact you. + +### Commands Usage | Synopsis ------|------- -General | `$ tns usage-reporting []` - -Configures anonymous usage reporting for the NativeScript CLI. +General | `$ ns usage-reporting []` -All data gathered is used strictly for improving the product and will never be used to identify or contact you. +### Arguments -### Attributes `` extends the `usage-reporting` command. You can set the following values for this attribute. * `status` - Shows the current configuration for anonymous usage reporting for the NativeScript CLI. * `enable` - Enables anonymous usage reporting. * `disable` - Disables anonymous usage reporting. -<% if(isHtml) { %> +<% if(isHtml) { %> + ### Related Commands Command | Description @@ -26,4 +34,8 @@ Command | Description [autocomplete-enable](autocomplete-enable.html) | Enables command-line completion for bash and zsh shells. [autocomplete-disable](autocomplete-disable.html) | Disables command-line completion for bash and zsh shells. [doctor](doctor.html) | Checks your system for configuration problems which might prevent the NativeScript CLI from working properly. +[proxy](proxy.html) | Displays proxy settings. +[proxy clear](proxy-clear.html) | Clears proxy settings. +[proxy set](proxy-set.html) | Sets proxy settings. +[update](update.html) | Updates the project with the latest versions of iOS/Android runtimes and cross-platform modules. <% } %> \ No newline at end of file diff --git a/docs/man_pages/index.html b/docs/man_pages/index.html new file mode 100644 index 0000000000..9b48a78e50 --- /dev/null +++ b/docs/man_pages/index.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/docs/man_pages/lib-management/plugin-add.md b/docs/man_pages/lib-management/plugin-add.md index 15e2d715d6..6fa5eb0bb5 100644 --- a/docs/man_pages/lib-management/plugin-add.md +++ b/docs/man_pages/lib-management/plugin-add.md @@ -1,14 +1,23 @@ -plugin add -========== +<% if (isJekyll) { %>--- +title: ns plugin add +position: 1 +---<% } %> -Usage | Synopsis -------|------- -General | `$ tns plugin add ` +# ns plugin add + +### Description <% if(isConsole) { %>Installs the specified plugin and any packages that it depends on.<% } %> -<% if(isHtml) { %>Installs the specified plugin and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin when you add a platform. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/blob/master/PLUGINS.md).<% } %> +<% if(isHtml) { %>Installs the specified plugin and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin when you add a platform.<% } %> + +### Commands -### Attributes +Usage | Synopsis +------|------- +General | `$ ns plugin add ` +Alias | `$ ns plugin install ` + +### Arguments * `` is a valid NativeScript plugin, specified by any of the following. * A `` or `@` where `` is the name of a plugin that is published in the npm registry and `` is a valid version of this plugin. @@ -18,6 +27,7 @@ General | `$ tns plugin add ` * A `` which resolves to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file. <% if(isHtml) { %> + ### Prerequisites * Verify that the plugin that you want to add contains a valid `package.json` file. Valid `package.json` files contain a `nativescript` section. @@ -27,7 +37,6 @@ General | `$ tns plugin add ` Command | Description ----------|---------- [plugin](plugin.html) | Lets you manage the plugins for your project. +[plugin install](plugin-install.html) | Installs the specified plugin and its dependencies. [plugin remove](plugin-remove.html) | Uninstalls the specified plugin and its dependencies. -[plugin find](plugin-find.html) | Finds NativeScript plugins in npm. -[plugin search](plugin-search.html) | Finds NativeScript plugins in npm. <% } %> diff --git a/docs/man_pages/lib-management/plugin-build.md b/docs/man_pages/lib-management/plugin-build.md new file mode 100644 index 0000000000..dba2193387 --- /dev/null +++ b/docs/man_pages/lib-management/plugin-build.md @@ -0,0 +1,32 @@ +<% if (isJekyll) { %>--- +title: ns plugin build +position: 8 +---<% } %> + +# ns plugin build + +### Description + +<% if(isConsole) { %>Attempts to build the plugin's Android-specific project files located in `platforms/android`. Strips and removes `include.gradle` flavor declarations, if any are present. <% } %> +<% if(isHtml) { %>Attempts to build the plugin's Android-specific project files located in `platforms/android`. The resulting Android Library (aar), and the generated Android Gradle project used to build the library can be found at `platforms/android`. Also strips and removes `include.gradle` flavor declarations, if any are present. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/blob/master/PLUGINS.md).<% } %> + +### Commands + +Usage | Synopsis +------|------- +General | `$ ns plugin build` + +<% if(isHtml) { %> + +### Prerequisites + +* Verify that the command is being executed in the source directory of a plugin - e.g. `nativescript-barcodescanner/src` + +### Related Commands + +Command | Description +----------|---------- +[plugin](plugin.html) | Lets you manage the plugins for your project. +[plugin install](plugin-install.html) | Installs the specified plugin and its dependencies. +[plugin remove](plugin-remove.html) | Uninstalls the specified plugin and its dependencies. +<% } %> diff --git a/docs/man_pages/lib-management/plugin-create.md b/docs/man_pages/lib-management/plugin-create.md new file mode 100644 index 0000000000..783abc5546 --- /dev/null +++ b/docs/man_pages/lib-management/plugin-create.md @@ -0,0 +1,48 @@ +<% if (isJekyll) { %>--- +title: ns plugin create +position: 1 +---<% } %> + +# ns plugin create + +### Description + +Creates a new project for NativeScript plugin development. The project uses the [NativeScript Plugin Seed](https://github.com/NativeScript/nativescript-plugin-seed) as a base and contains the following directories: + +* `src` - source code of the plugin +* `publish` - shell scripts used to build and pack the plugin source code and publish it in [NPM](https://www.npmjs.com/) + +The command will also propose you to setup demo applications and if you accept them, it will create the following additional directories: +* `demo` - simple NativeScript application used to test and show plugin features +* `demo-angular` - simple Angular application used to test and show plugin features + +The project is setup for easy commit in Github, which is why the command will ask you for your Github username. +<% if(isHtml) { %>Before starting to code your first plugin, you can visit the NativeScript documentation page for [building plugins](https://docs.nativescript.org/plugins/building-plugins#step-2-set-up-a-development-workflow) or the [plugin seed repository](https://github.com/NativeScript/nativescript-plugin-seed/blob/master/README.md).<% } %> + +### Commands + +Usage | Synopsis +---|--- +Create from the default plugin seed | `$ ns plugin create [--path ]` +Create from a custom plugin seed | `$ ns plugin create [--path ] --template