diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644
index 7b237d6d1cf7..000000000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-environment:
- # Note: if updating to Node 10, use at least 10.5.0 to include a fix for
- # https://github.com/nodejs/node/issues/20297
- nodejs_version: "8.9.2" # Same version as used in CircleCI.
-
-matrix:
- fast_finish: true
-
-install:
- - ps: Install-Product node $env:nodejs_version
- - yarn install --frozen-lockfile
- - npm run webdriver-update-appveyor
-
-test_script:
- - node --version
- - yarn --version
- - yarn test
- - node tests\legacy-cli\run_e2e.js --appveyor "--glob=tests/{basic,commands,generate,build/styles}/**"
-
-build: off
-deploy: off
-
-cache:
- - node_modules -> yarn.lock
- - "%LOCALAPPDATA%\\Yarn"
diff --git a/.bazelignore b/.bazelignore
new file mode 100644
index 000000000000..de4d1f007dd1
--- /dev/null
+++ b/.bazelignore
@@ -0,0 +1,2 @@
+dist
+node_modules
diff --git a/.bazelrc b/.bazelrc
new file mode 100644
index 000000000000..776a8225c3e7
--- /dev/null
+++ b/.bazelrc
@@ -0,0 +1,62 @@
+# Make TypeScript compilation fast, by keeping a few copies of the compiler
+# running as daemons, and cache SourceFile AST's to reduce parse time.
+build --strategy=TypeScriptCompile=worker
+
+# Performance: avoid stat'ing input files
+build --watchfs
+
+test --test_output=errors
+
+################################
+# Remote Execution Setup #
+################################
+
+ # Use the Angular team internal GCP instance for remote execution.
+build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
+build:remote --project_id=internal-200822
+
+ # Setup the build strategy for various types of actions. Mixing "local" and "remote"
+# can cause unexpected results and we want to run everything remotely if possible.
+build:remote --spawn_strategy=remote
+build:remote --strategy=Javac=remote
+build:remote --strategy=Closure=remote
+build:remote --strategy=Genrule=remote
+build:remote --define=EXECUTOR=remote
+
+ # Setup the remote build execution servers.
+build:remote --remote_cache=remotebuildexecution.googleapis.com
+build:remote --remote_executor=remotebuildexecution.googleapis.com
+build:remote --tls_enabled=true
+build:remote --auth_enabled=true
+build:remote --remote_timeout=3600
+build:remote --jobs=50
+
+ # Setup the toolchain and platform for the remote build execution. The platform
+# is automatically configured by the "rbe_autoconfig" rule in the project workpsace.
+build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk
+build:remote --javabase=@rbe_ubuntu1604_angular//java:jdk
+build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
+build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
+build:remote --crosstool_top=@rbe_ubuntu1604_angular//cc:toolchain
+build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
+build:remote --extra_toolchains=@rbe_ubuntu1604_angular//config:cc-toolchain
+build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
+build:remote --host_platform=//tools:rbe_ubuntu1604-angular
+build:remote --platforms=//tools:rbe_ubuntu1604-angular
+
+ # Setup Build Event Service
+build:remote --bes_backend=buildeventservice.googleapis.com
+build:remote --bes_timeout=30s
+build:remote --bes_results_url="https://source.cloud.google.com/results/invocations/"
+
+ # Set remote caching settings
+build:remote --remote_accept_cached=true
+
+####################################################
+# User bazel configuration
+# NOTE: This needs to be the *last* entry in the config.
+####################################################
+
+# Load any settings which are specific to the current user. Needs to be *last* statement
+# in this config, as the user configuration should be able to overwrite flags from this file.
+try-import .bazelrc.user
diff --git a/.circleci/config.yml b/.circleci/config.yml
index c02a15a576f5..203e9386d302 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -7,115 +7,277 @@
# To validate changes, use an online parser, eg.
# http://yaml-online-parser.appspot.com/
+version: 2.1
+
# Variables
## IMPORTANT
-# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
-# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
-var_1: &docker_image angular/ngcontainer:0.3.3
-var_2: &cache_key angular_devkit-{{ checksum "yarn.lock" }}-0.3.3-2
-
-# Settings common to each job
-anchor_1: &defaults
- working_directory: ~/ng
- docker:
- - image: *docker_image
-
-# After checkout, rebase on top of master.
-# Similar to travis behavior, but not quite the same.
-# See https://discuss.circleci.com/t/1662
-anchor_2: &post_checkout
- post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
-anchor_3: &root_package_lock_key
- key: *cache_key
-anchor_4: &attach_options
+# If you change the cache key prefix, also sync the restore_cache fallback to match.
+# Keep the static part of the cache key as prefix to enable correct fallbacks.
+# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
+var_1: &cache_key angular_devkit-0.11.0-{{ checksum "yarn.lock" }}
+var_2: &default_nodeversion "12.1"
+var_3: &attach_options
at: .
+var_4: &ignore_pull_requests
+ filters:
+ branches:
+ ignore:
+ - /pull\/.*/
+
+# Executor Definitions
+# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
+executors:
+ action-executor:
+ parameters:
+ nodeversion:
+ type: string
+ default: *default_nodeversion
+ docker:
+ - image: circleci/node:<< parameters.nodeversion >>
+ working_directory: ~/ng
+
+ test-executor:
+ parameters:
+ nodeversion:
+ type: string
+ default: *default_nodeversion
+ docker:
+ - image: circleci/node:<< parameters.nodeversion >>-browsers
+ working_directory: ~/ng
+ environment:
+ NPM_CONFIG_PREFIX: ~/.npm-global
+ resource_class: xlarge
+
+ windows-executor:
+ working_directory: ~/ng
+ resource_class: windows.medium
+ shell: powershell.exe -ExecutionPolicy Bypass
+ machine:
+ image: windows-server-2019
+
+# Command Definitions
+# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
+commands:
+ setup_windows:
+ steps:
+ - checkout
+ - run:
+ # Need to install node and yarn before, as the base windows image doesn't have anything.
+ # TODO: remove when CircleCI provides preconfigured node images/VMs.
+ name: Setup windows node environment
+ command: ./.circleci/windows-env.ps1
+ # TODO: remove commands other than the e2e runner when workspaces on windows are well supported.
+ - run:
+ name: Rebase PR on target branch
+ command: >
+ if (Test-Path env:CIRCLE_PR_NUMBER) {
+ git config user.name "angular-ci"
+ git config user.email "angular-ci"
+ node tools\rebase-pr.js angular/angular-cli $env:CIRCLE_PR_NUMBER }
+ - run: node --version
+ - run: yarn --version
+ - run: yarn install --frozen-lockfile
+
+ setup_bazel_rbe:
+ parameters:
+ key:
+ type: env_var_name
+ default: CIRCLE_PROJECT_REPONAME
+ steps:
+ - run:
+ name: "Setup bazel RBE remote execution"
+ command: |
+ touch .bazelrc.user;
+ # We need ensure that the same default digest is used for encoding and decoding
+ # with openssl. Openssl versions might have different default digests which can
+ # cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
+ openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k "${<< parameters.key >>}" -out /home/circleci/.gcp_credentials;
+ sudo bash -c "echo -e 'build --google_credentials=/home/circleci/.gcp_credentials' >> .bazelrc.user";
+ # Upload/don't upload local results to cache based on environment
+ if [[ -n "{$CIRCLE_PR_NUMBER}" ]]; then
+ sudo bash -c "echo -e 'build:remote --remote_upload_local_results=false\n' >> .bazelrc.user";
+ echo "Not uploading local build results to remote cache.";
+ else
+ sudo bash -c "echo -e 'build:remote --remote_upload_local_results=true\n' >> .bazelrc.user";
+ echo "Uploading local build results to remote cache.";
+ fi
+ # Enable remote builds
+ sudo bash -c "echo -e 'build --config=remote' >> .bazelrc.user";
+ echo "Reading from remote cache for bazel remote jobs.";
# Job definitions
-version: 2
jobs:
install:
- <<: *defaults
+ executor: action-executor
steps:
- - checkout: *post_checkout
- - restore_cache: *root_package_lock_key
+ - checkout
+ - run:
+ name: Rebase PR on target branch
+ command: >
+ if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
+ # User is required for rebase.
+ git config user.name "angular-ci"
+ git config user.email "angular-ci"
+ # Rebase PR on top of target branch.
+ node tools/rebase-pr.js angular/angular-cli ${CIRCLE_PR_NUMBER}
+ else
+ echo "This build is not over a PR, nothing to do."
+ fi
+ - restore_cache:
+ keys:
+ - *cache_key
+ # This fallback should be the cache_key without variables.
+ - angular_devkit-0.11.0-
- run: yarn install --frozen-lockfile
- persist_to_workspace:
root: .
paths:
- ./*
- save_cache:
- <<: *root_package_lock_key
+ key: *cache_key
paths:
- ~/.cache/yarn
-
+
lint:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- - run: npm run lint
+ - run: yarn lint
+ - run: 'yarn bazel:format -mode=check ||
+ (echo "BUILD files not formatted. Please run ''yarn bazel:format''" ; exit 1)'
+ # Run the skylark linter to check our Bazel rules
+ - run: 'yarn bazel:lint ||
+ (echo -e "\n.bzl files have lint errors. Please run ''yarn bazel:lint-fix''"; exit 1)'
validate:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- - run: npm run validate -- --ci
+ - run: yarn validate --ci
test:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- - run: npm run test -- --code-coverage --full
+ - run: yarn test --full
test-large:
- <<: *defaults
+ parameters:
+ ivy:
+ type: boolean
+ default: false
+ glob:
+ type: string
+ default: ""
+ executor: test-executor
resource_class: large
parallelism: 4
steps:
- attach_workspace: *attach_options
- - run: npm run webdriver-update-circleci
- - run: npm run test-large -- --code-coverage --full --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
+ - run: yarn webdriver-update
+ - run: yarn test-large --full <<# parameters.ivy >>--ivy< parameters.ivy >> <<# parameters.glob >>--glob="<< parameters.glob >>"< parameters.glob >> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
e2e-cli:
- <<: *defaults
- environment:
- BASH_ENV: ~/.profile
- resource_class: xlarge
+ parameters:
+ ivy:
+ type: boolean
+ default: false
+ snapshots:
+ type: boolean
+ default: false
+ executor: test-executor
parallelism: 4
steps:
- attach_workspace: *attach_options
- - run: npm install --global npm@6
- - run: xvfb-run -a node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
+ - run:
+ name: Initialize Environment
+ command: ./.circleci/env.sh
+ - run:
+ name: Execute CLI E2E Tests
+ command: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ivy >>--ivy< parameters.ivy >> <<# parameters.snapshots >>--ng-snapshots< parameters.snapshots >>
+
+ e2e-cli-node-10:
+ executor:
+ name: test-executor
+ nodeversion: "10.12"
+ parallelism: 4
+ steps:
+ - attach_workspace: *attach_options
+ - run:
+ name: Initialize Environment
+ command: |
+ ./.circleci/env.sh
+ # Ensure latest npm version to support local package repository
+ PATH=~/.npm-global/bin:$PATH npm install --global npm
+ - run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
+
+ test-browsers:
+ executor:
+ name: test-executor
+ environment:
+ E2E_BROWSERS: true
+ steps:
+ - attach_workspace: *attach_options
+ - run:
+ name: Initialize Environment
+ command: ./.circleci/env.sh
+ - run:
+ name: Initialize Saucelabs
+ command: setSecretVar SAUCE_ACCESS_KEY $(echo $SAUCE_ACCESS_KEY | rev)
+ - run:
+ name: Start Saucelabs Tunnel
+ command: ./scripts/saucelabs/start-tunnel.sh
+ background: true
+ # Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
+ # too early without Saucelabs not being ready.
+ - run: ./scripts/saucelabs/wait-for-tunnel.sh
+ - run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
+ - run: ./scripts/saucelabs/stop-tunnel.sh
build:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- - run: npm run admin -- build
+ - run: yarn build
+
+ # This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions
+ # and rerun them faster.
+ flake-jail:
+ executor: action-executor
+ steps:
+ - attach_workspace: *attach_options
+ - run: yarn webdriver-update
+ - run: yarn test-large --full --flakey
+ - run: yarn test-large --full --flakey --ivy=true
build-bazel:
- <<: *defaults
- resource_class: large
+ executor: action-executor
+ resource_class: xlarge
steps:
- attach_workspace: *attach_options
+ - setup_bazel_rbe
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
- - run: bazel test //packages/...
+ - run: yarn bazel:test
snapshot_publish:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- run:
name: Decrypt Credentials
+ # Note: when changing the image, you might have to re-encrypt the credentials with a
+ # matching version of openssl.
+ # See https://stackoverflow.com/a/43847627/2116927 for more info.
command: |
- openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/github_token
+ openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/github_token -md md5
- run:
name: Deployment to Snapshot
command: |
- npm run admin -- snapshots --verbose --githubTokenFile=${HOME}/github_token
+ yarn admin snapshots --verbose --githubTokenFile=${HOME}/github_token
publish:
- <<: *defaults
+ executor: action-executor
steps:
- attach_workspace: *attach_options
- run:
@@ -125,7 +287,35 @@ jobs:
- run:
name: Deployment to NPM
command: |
- npm run admin -- publish --verbose
+ yarn admin publish --verbose
+
+ # Windows jobs
+ # CircleCI support for Windows jobs is still in preview.
+ # Docs: https://github.com/CircleCI-Public/windows-preview-docs
+ test-win:
+ executor: windows-executor
+ # Skipping cache and workspace for now because it takes 10x longer than on linux.
+ # TODO: when/if CircleCI makes them faster, use cache and workspaces fully.
+ # Notes:
+ # - windows needs its own cache key because binaries in node_modules are different.
+ # - windows might need its own workspace for the same reason.
+ # - get cache dir on windows via `yarn cache dir` (was `C:\Users\circleci\AppData\Local\Yarn\Cache\v4` last time)
+ steps:
+ - setup_windows
+ # Build and test should be on their own jobs, but restoring workspaces is too slow
+ # so we do it here.
+ - run: yarn build
+ - run: yarn test --full
+ # Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding.
+ - run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob=tests/{basic,ivy}/**" }
+
+ e2e-cli-win:
+ executor: windows-executor
+ parallelism: 4
+ steps:
+ - setup_windows
+ - run: yarn build
+ - run: node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX
workflows:
version: 2
@@ -140,33 +330,79 @@ workflows:
- install
- build:
requires:
- - lint
- - validate
+ - install
+ filters:
+ branches:
+ ignore:
+ - /docs-preview/
- build-bazel:
requires:
- - lint
- - validate
+ - build
- test:
requires:
- build
+ - test-win:
+ requires:
+ - test
+ - test-large:
+ requires:
+ - build
- test-large:
+ name: test-large-ivy
+ ivy: true
+ glob: "packages/angular_devkit/build_angular/test/browser/*_spec_large.ts"
requires:
- build
- e2e-cli:
+ post-steps:
+ - store_artifacts:
+ path: /tmp/dist
+ destination: cli/new-production
+ requires:
+ - build
+ - e2e-cli:
+ name: e2e-cli-ivy
+ ivy: true
+ requires:
+ - build
+ - e2e-cli:
+ name: e2e-cli-ng-snapshots
+ snapshots: true
+ requires:
+ - e2e-cli
+ pre-steps:
+ - run:
+ name: Don't run expensive e2e snapshots tests for forks other than renovate-bot and angular
+ command: >
+ if [[ "$CIRCLE_PR_USERNAME" != "renovate-bot" ]] &&
+ [[ "$CIRCLE_PROJECT_USERNAME" != "angular" || $CIRCLE_BRANCH != "master" ]]; then
+ circleci step halt
+ fi
+ - e2e-cli-node-10:
+ <<: *ignore_pull_requests
+ requires:
+ - e2e-cli
+ - e2e-cli-win:
+ <<: *ignore_pull_requests
+ requires:
+ - e2e-cli
+ - test-browsers:
+ requires:
+ - build
+ - flake-jail:
requires:
- build
- snapshot_publish:
+ <<: *ignore_pull_requests
requires:
- test
- build
- e2e-cli
- filters:
- branches:
- only: master
- publish:
requires:
- test
- build
+ - e2e-cli
- snapshot_publish
filters:
tags:
diff --git a/.circleci/env-helpers.inc.sh b/.circleci/env-helpers.inc.sh
new file mode 100644
index 000000000000..5fa1263e112f
--- /dev/null
+++ b/.circleci/env-helpers.inc.sh
@@ -0,0 +1,73 @@
+####################################################################################################
+# Helpers for defining environment variables for CircleCI.
+#
+# In CircleCI, each step runs in a new shell. The way to share ENV variables across steps is to
+# export them from `$BASH_ENV`, which is automatically sourced at the beginning of every step (for
+# the default `bash` shell).
+#
+# See also https://circleci.com/docs/2.0/env-vars/#using-bash_env-to-set-environment-variables.
+####################################################################################################
+
+# Set and print an environment variable.
+#
+# Use this function for setting environment variables that are public, i.e. it is OK for them to be
+# visible to anyone through the CI logs.
+#
+# Usage: `setPublicVar `
+function setPublicVar() {
+ setSecretVar $1 "$2";
+ echo "$1=$2";
+}
+
+# Set (without printing) an environment variable.
+#
+# Use this function for setting environment variables that are secret, i.e. should not be visible to
+# everyone through the CI logs.
+#
+# Usage: `setSecretVar `
+function setSecretVar() {
+ # WARNING: Secrets (e.g. passwords, access tokens) should NOT be printed.
+ # (Keep original shell options to restore at the end.)
+ local -r originalShellOptions=$(set +o);
+ set +x -eu -o pipefail;
+
+ echo "export $1=\"${2:-}\";" >> $BASH_ENV;
+
+ # Restore original shell options.
+ eval "$originalShellOptions";
+}
+
+
+# Create a function to set an environment variable, when called.
+#
+# Use this function for creating setter for public environment variables that require expensive or
+# time-consuming computaions and may not be needed. When needed, you can call this function to set
+# the environment variable (which will be available through `$BASH_ENV` from that point onwards).
+#
+# Arguments:
+# - ``: The name of the environment variable. The generated setter function will be
+# `setPublicVar_`.
+# - ``: The code to run to compute the value for the variable. Since this code should be
+# executed lazily, it must be properly escaped. For example:
+# ```sh
+# # DO NOT do this:
+# createPublicVarSetter MY_VAR "$(whoami)"; # `whoami` will be evaluated eagerly
+#
+# # DO this isntead:
+# createPublicVarSetter MY_VAR "\$(whoami)"; # `whoami` will NOT be evaluated eagerly
+# ```
+#
+# Usage: `createPublicVarSetter `
+#
+# Example:
+# ```sh
+# createPublicVarSetter MY_VAR 'echo "FOO"';
+# echo $MY_VAR; # Not defined
+#
+# setPublicVar_MY_VAR;
+# source $BASH_ENV;
+# echo $MY_VAR; # FOO
+# ```
+function createPublicVarSetter() {
+ echo "setPublicVar_$1() { setPublicVar $1 \"$2\"; }" >> $BASH_ENV;
+}
diff --git a/.circleci/env.sh b/.circleci/env.sh
new file mode 100755
index 000000000000..49c0ab18326a
--- /dev/null
+++ b/.circleci/env.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# Variables
+readonly projectDir=$(realpath "$(dirname ${BASH_SOURCE[0]})/..")
+readonly envHelpersPath="$projectDir/.circleci/env-helpers.inc.sh";
+
+# Load helpers and make them available everywhere (through `$BASH_ENV`).
+source $envHelpersPath;
+echo "source $envHelpersPath;" >> $BASH_ENV;
+
+
+####################################################################################################
+# Define PUBLIC environment variables for CircleCI.
+####################################################################################################
+# See https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables for more info.
+####################################################################################################
+setPublicVar PROJECT_ROOT "$projectDir";
+
+####################################################################################################
+# Define SauceLabs environment variables for CircleCI.
+####################################################################################################
+setPublicVar SAUCE_USERNAME "angular-ci";
+setSecretVar SAUCE_ACCESS_KEY "9b988f434ff8-fbca-8aa4-4ae3-35442987";
+setPublicVar SAUCE_LOG_FILE /tmp/angular/sauce-connect.log
+setPublicVar SAUCE_READY_FILE /tmp/angular/sauce-connect-ready-file.lock
+setPublicVar SAUCE_PID_FILE /tmp/angular/sauce-connect-pid-file.lock
+setPublicVar SAUCE_TUNNEL_IDENTIFIER "angular-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
+# Amount of seconds we wait for sauceconnect to establish a tunnel instance. In order to not
+# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.
+setPublicVar SAUCE_READY_FILE_TIMEOUT 120
+
+# Source `$BASH_ENV` to make the variables available immediately.
+source $BASH_ENV;
diff --git a/.circleci/gcp_token b/.circleci/gcp_token
new file mode 100644
index 000000000000..06773903e8d8
Binary files /dev/null and b/.circleci/gcp_token differ
diff --git a/.circleci/windows-env.ps1 b/.circleci/windows-env.ps1
new file mode 100644
index 000000000000..1c4fff24e433
--- /dev/null
+++ b/.circleci/windows-env.ps1
@@ -0,0 +1,9 @@
+# Install nodejs and yarn via Chocolatey.
+choco install nodejs --version 12.1.0 --no-progress
+choco install yarn --version 1.16.0 --no-progress
+
+# Add PATH modifications to the Powershell profile. This is the win equivalent of .bash_profile.
+# https://docs.microsoft.com/en-us/previous-versions//bb613488(v=vs.85)
+new-item -path $profile -itemtype file -force
+# Paths for nodejs, npm, and yarn. Use single quotes to prevent interpolation.
+Add-Content $profile '$Env:path += ";C:\Program Files\nodejs\;C:\Users\circleci\AppData\Roaming\npm\;C:\Program Files (x86)\Yarn\bin\;"'
diff --git a/.editorconfig b/.editorconfig
index 36e19acf952e..1c658dfbc777 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# http://editorconfig.org
+# https://editorconfig.org
root = true
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000000..de32b85d6693
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,12 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# JS and TS files must always use LF for tools to work
+*.js eol=lf
+*.ts eol=lf
+*.json eol=lf
+*.css eol=lf
+*.scss eol=lf
+*.less eol=lf
+*.html eol=lf
+*.svg eol=lf
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 524740f30080..b5135def5125 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,56 +1,10 @@
-
-### Bug Report or Feature Request (mark with an `x`)
-```
-- [ ] bug report -> please search issues before submitting
-- [ ] feature request
-```
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
-### Command (mark with an `x`)
-```
-- [ ] new
-- [ ] build
-- [ ] serve
-- [ ] test
-- [ ] e2e
-- [ ] generate
-- [ ] add
-- [ ] update
-- [ ] lint
-- [ ] xi18n
-- [ ] run
-- [ ] config
-- [ ] help
-- [ ] version
-- [ ] doc
-```
+Please help us process issues more efficiently by filing an
+issue using one of the following templates:
-### Versions
-
+https://github.com/angular/angular-cli/issues/new/choose
+Thank you!
-### Repro steps
-
-
-
-### The log given by the failure
-
-
-
-### Desired functionality
-
-
-
-### Mention any other details that might be useful
-
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md
new file mode 100644
index 000000000000..b8249e87c28b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1-bug-report.md
@@ -0,0 +1,82 @@
+---
+name: "\U0001F41EBug report"
+about: Report a bug in Angular CLI
+---
+
+
+
+# 🐞 Bug report
+
+### Command (mark with an `x`)
+
+
+```
+- [ ] new
+- [ ] build
+- [ ] serve
+- [ ] test
+- [ ] e2e
+- [ ] generate
+- [ ] add
+- [ ] update
+- [ ] lint
+- [ ] xi18n
+- [ ] run
+- [ ] config
+- [ ] help
+- [ ] version
+- [ ] doc
+```
+
+### Is this a regression?
+
+
+ Yes, the previous version in which this bug was not present was: ....
+
+
+### Description
+
+ A clear and concise description of the problem...
+
+
+## 🔬 Minimal Reproduction
+
+
+## 🔥 Exception or Error
+
+
+
+
+
+
+
+## 🌍 Your Environment
+
+
+
+
+
+
+**Anything else relevant?**
+
+
+
diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md
new file mode 100644
index 000000000000..4c8292f45157
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2-feature-request.md
@@ -0,0 +1,49 @@
+---
+name: "\U0001F680Feature request"
+about: Suggest a feature for Angular CLI
+
+---
+
+
+
+# 🚀 Feature request
+
+
+### Command (mark with an `x`)
+
+
+```
+- [ ] new
+- [ ] build
+- [ ] serve
+- [ ] test
+- [ ] e2e
+- [ ] generate
+- [ ] add
+- [ ] update
+- [ ] lint
+- [ ] xi18n
+- [ ] run
+- [ ] config
+- [ ] help
+- [ ] version
+- [ ] doc
+```
+
+### Description
+ A clear and concise description of the problem or missing capability...
+
+
+### Describe the solution you'd like
+ If you have a solution in mind, please describe it.
+
+
+### Describe alternatives you've considered
+ Have you considered any alternative solutions or workarounds?
diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md
new file mode 100644
index 000000000000..7cd9ec28753a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md
@@ -0,0 +1,13 @@
+---
+name: "📚 Docs or angular.io issue report"
+about: Report an issue in Angular's documentation or angular.io application
+
+---
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
+
+Please file any Docs or angular.io issues at: https://github.com/angular/angular/issues/new/choose
+
+For the time being, we keep Angular AIO issues in a separate repository.
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md b/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md
new file mode 100644
index 000000000000..b789da9f6da1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md
@@ -0,0 +1,11 @@
+---
+name: ⚠️Security issue disclosure
+about: Report a security issue in Angular Framework, Material, or CLI
+
+---
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
+
+Please read https://angular.io/guide/security#report-issues on how to disclose security related issues.
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/ISSUE_TEMPLATE/5-support-request.md b/.github/ISSUE_TEMPLATE/5-support-request.md
new file mode 100644
index 000000000000..f6e6e66ff893
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/5-support-request.md
@@ -0,0 +1,16 @@
+---
+name: "❓Support request"
+about: Questions and requests for support
+
+---
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
+
+Please do not file questions or support requests on the GitHub issues tracker.
+
+You can get your questions answered using other communication channels. Please see:
+https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#question
+
+Thank you!
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/ISSUE_TEMPLATE/6-angular-framework.md b/.github/ISSUE_TEMPLATE/6-angular-framework.md
new file mode 100644
index 000000000000..8a689c55de35
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/6-angular-framework.md
@@ -0,0 +1,13 @@
+---
+name: "⚡Angular Framework"
+about: Issues and feature requests for Angular Framework
+
+---
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
+
+Please file any Angular Framework issues at: https://github.com/angular/angular/issues/new/choose
+
+For the time being, we keep Angular issues in a separate repository.
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/ISSUE_TEMPLATE/7-angular-material.md b/.github/ISSUE_TEMPLATE/7-angular-material.md
new file mode 100644
index 000000000000..b023135b0cc5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/7-angular-material.md
@@ -0,0 +1,13 @@
+---
+name: "\U0001F48EAngular Material"
+about: Issues and feature requests for Angular Material
+
+---
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
+
+Please file any Angular Material issues at: https://github.com/angular/material2/issues/new
+
+For the time being, we keep Angular Material issues in a separate repository.
+
+🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml
index ca9d26f7dd2d..c00e502cba2b 100644
--- a/.github/angular-robot.yml
+++ b/.github/angular-robot.yml
@@ -41,13 +41,13 @@ merge:
# list of PR statuses that need to be successful
requiredStatuses:
- - "continuous-integration/appveyor/pr"
- "ci/circleci: build"
- "ci/circleci: build-bazel"
- "ci/circleci: install"
- "ci/circleci: lint"
- "ci/circleci: validate"
- "ci/circleci: test"
+ - "ci/circleci: test-win"
- "ci/circleci: test-large"
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
@@ -91,3 +91,9 @@ triage:
-
- "type: docs"
- "comp: *"
+
+# Size checking
+size:
+ circleCiStatusName: "ci/circleci: e2e-cli"
+ maxSizeIncrease: 10000
+ comment: false
diff --git a/.gitignore b/.gitignore
index e6c63302db9c..88895c7481f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
bazel-*
test-project-host-*
dist/
+dist-schema/
# IDEs
.idea/
diff --git a/.mailmap b/.mailmap
index bf8640d5dec9..d10bc39a19a7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -16,6 +16,8 @@ Charles Lyding
Charles Lyding <19598772+clydin@users.noreply.github.com>
Filipe Silva
Mike Brocchi
+Alan Agius
+ Alan Agius
################################################################################
diff --git a/.monorepo.json b/.monorepo.json
index 6a3d96820dff..81367b00b771 100644
--- a/.monorepo.json
+++ b/.monorepo.json
@@ -19,7 +19,7 @@
{
"label": "License",
"image": "https://img.shields.io/npm/l/@angular/cli.svg",
- "url": "https://github.com/angular/angular-cli/blob/master/LICENSE"
+ "url": "/LICENSE"
}
],
[
@@ -37,17 +37,15 @@
],
"links": {
"Gitter": "https://gitter.im/angular/angular-cli",
- "Contributing": "https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md",
+ "Contributing": "/CONTRIBUTING.md",
"Angular CLI": "http://github.com/angular/angular-cli"
},
"packages": {
"@_/benchmark": {
- "version": "0.8.0-rc.0",
- "hash": "a9b1f213a4069f789d20021bda616775"
+ },
+ "@_/builders": {
},
"devkit": {
- "version": "0.8.0-rc.0",
- "hash": "5f2b302aa3a1b3f9b6a54a90519f85a0"
},
"@angular/cli": {
"name": "Angular CLI",
@@ -55,18 +53,14 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular/cli/README.md"
+ "url": "/packages/angular/cli/README.md"
}
],
- "version": "6.2.0-rc.0",
- "snapshotRepo": "angular/cli-builds",
- "hash": "1418f5d7aa4bde2b7c9339f25087de06"
+ "snapshotRepo": "angular/cli-builds"
},
"@angular/pwa": {
"name": "Angular PWA Schematics",
"section": "Schematics",
- "version": "0.8.0-rc.0",
- "hash": "b37d506c657d48379099ccbeeba54da9",
"snapshotRepo": "angular/angular-pwa-builds"
},
"@angular-devkit/architect": {
@@ -74,29 +68,28 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/architect/README.md"
+ "url": "/packages/angular_devkit/architect/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "64fb30a21ddc98f26b89ffd1dbf828d7",
"snapshotRepo": "angular/angular-devkit-architect-builds"
},
"@angular-devkit/architect-cli": {
"name": "Architect CLI",
- "version": "0.8.0-rc.0",
- "hash": "9d2161b7ca9044c2286c7d66e10ead12",
+ "section": "Tooling",
"snapshotRepo": "angular/angular-devkit-architect-cli-builds"
},
+ "@angular-devkit/benchmark": {
+ "name": "Benchmark",
+ "section": "Tooling"
+ },
"@angular-devkit/build-optimizer": {
"name": "Build Optimizer",
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_optimizer/README.md"
+ "url": "/packages/angular_devkit/build_optimizer/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "556f1e60c2d5d0ad09ef2e56705e6e4f",
"snapshotRepo": "angular/angular-devkit-build-optimizer-builds"
},
"@angular-devkit/build-ng-packagr": {
@@ -104,11 +97,9 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_ng_packagr/README.md"
+ "url": "/packages/angular_devkit/build_ng_packagr/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "ac2b1791f5e03267681a444d0a919a26",
"snapshotRepo": "angular/angular-devkit-build-ng-packagr-builds"
},
"@angular-devkit/build-angular": {
@@ -116,11 +107,9 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/README.md"
+ "url": "/packages/angular_devkit/build_angular/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "4bdacedd086a72f496b737623a47f470",
"snapshotRepo": "angular/angular-devkit-build-angular-builds"
},
"@angular-devkit/build-webpack": {
@@ -128,23 +117,19 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_webpack/README.md"
+ "url": "/packages/angular_devkit/build_webpack/README.md"
}
],
- "version": "0.8.0-rc.0",
- "snapshotRepo": "angular/angular-devkit-build-webpack-builds",
- "hash": "dc4e1b6d135bc9c394169c15cc4902e3"
+ "snapshotRepo": "angular/angular-devkit-build-webpack-builds"
},
"@angular-devkit/core": {
"name": "Core",
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/core/README.md"
+ "url": "/packages/angular_devkit/core/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "0d21af770ad0a24cba535cc296995b7d",
"snapshotRepo": "angular/angular-devkit-core-builds"
},
"@angular-devkit/schematics": {
@@ -152,46 +137,34 @@
"links": [
{
"label": "README",
- "url": "https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/README.md"
+ "url": "/packages/angular_devkit/schematics/README.md"
}
],
- "version": "0.8.0-rc.0",
- "hash": "a10bf52f075cc93c8d28d187dcce788d",
"snapshotRepo": "angular/angular-devkit-schematics-builds"
},
"@angular-devkit/schematics-cli": {
"name": "Schematics CLI",
"section": "Tooling",
- "version": "0.8.0-rc.0",
- "hash": "f1ee4ce02cf395e6ef6888fa93ef9d50",
"snapshotRepo": "angular/angular-devkit-schematics-cli-builds"
},
"@ngtools/webpack": {
"name": "Webpack Angular Plugin",
- "version": "6.2.0-rc.0",
"section": "Misc",
- "hash": "9ac09fecd47a8602820ae5abb94ddac9",
"snapshotRepo": "angular/ngtools-webpack-builds"
},
"@schematics/angular": {
"name": "Angular Schematics",
"section": "Schematics",
- "version": "0.8.0-rc.0",
- "hash": "acf5e21cf8dc3d69ab9333480d2007f3",
"snapshotRepo": "angular/schematics-angular-builds"
},
"@schematics/schematics": {
"name": "Schematics Schematics",
- "version": "0.8.0-rc.0",
"section": "Schematics",
- "hash": "45b6ce378bceb13a53b67e2cfbfcb5ab",
"snapshotRepo": "angular/schematics-schematics-builds"
},
"@schematics/update": {
"name": "Package Update Schematics",
- "version": "0.8.0-rc.0",
"section": "Schematics",
- "hash": "e29b2069a90870776b29050bedb9475a",
"snapshotRepo": "angular/schematics-update-builds"
}
}
diff --git a/.nvmrc b/.nvmrc
index 45a4fb75db86..f599e28b8ab0 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-8
+10
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000000..fbcd212375a5
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+/etc/api
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000000..5e2863a11f68
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "printWidth": 100,
+ "singleQuote": true,
+ "trailingComma": "all"
+}
diff --git a/BUILD b/BUILD
index 5b9205d3eef1..a1c5b6b5ac0e 100644
--- a/BUILD
+++ b/BUILD
@@ -9,30 +9,6 @@ licenses(["notice"]) # MIT License
exports_files([
"LICENSE",
"tsconfig.json", # @external
+ "tsconfig-test.json", # @external
+ "tslint.base.json", # @external
])
-
-# NOTE: this will move to node_modules/BUILD in a later release
-# @external_begin
-filegroup(
- name = "node_modules",
- srcs = glob(
- # Only include files we might use, to reduce the file count and surface size of
- # filename problems.
- [
- "node_modules/**/*.js",
- "node_modules/**/*.json",
- "node_modules/**/*.d.ts",
- ],
- exclude = [
- # e.g. node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt
- "node_modules/**/test/**",
- # e.g. node_modules/xpath/docs/function resolvers.md
- "node_modules/**/docs/**",
- # e.g. node_modules/puppeteer/.local-chromium/mac-536395/chrome-mac/Chromium.app/Contents/Versions/66.0.3347.0/Chromium Framework.framework/Chromium Framework
- "node_modules/**/.*/**",
- # Ignore paths with spaces.
- "node_modules/**/* *",
- ],
- ) + glob(["node_modules/.bin/*"]),
-)
-# @external_end
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e93eef54157f..6072228db9a3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,13 +12,17 @@ to follow:
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
- [Signing the CLA](#cla)
+ - [Updating the Public API](#public-api)
## Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our [Code of Conduct][coc].
## Got a Question or Problem?
-Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](https://stackoverflow.com/questions/tagged/angular-devkit) where the questions should be tagged with tag `angular-devkit`.
+Please, do not open issues for the general support questions as we want to keep GitHub issues for
+bug reports and feature requests. You've got much better chances of getting your question answered
+on [StackOverflow](https://stackoverflow.com/questions/tagged/angular-devkit) where the questions
+should be tagged with tag `angular-cli` or `angular-devkit`.
StackOverflow is a much better place to ask questions since:
@@ -26,7 +30,8 @@ StackOverflow is a much better place to ask questions since:
- questions and answers stay available for public viewing so your question / answer might help someone else
- StackOverflow's voting system assures that the best answers are prominently visible.
-To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
+To save your and our time we will be systematically closing all the issues that are requests for
+general support and redirecting people to StackOverflow.
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
@@ -66,7 +71,7 @@ We will be insisting on a minimal reproduce scenario in order to save maintainer
Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
-You can file new issues by filling out our [new issue form](https://github.com/angular/angular-cli/issues/new).
+You can file new issues by selecting from our [new issue templates](https://github.com/angular/angular-cli/issues/new/choose) and filling out the issue template.
### Submitting a Pull Request (PR)
@@ -180,41 +185,65 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
### Type
Must be one of the following:
-* **build**: Changes that affect the build system or external dependencies
-* **ci**: Changes to our CI configuration files and scripts
-* **docs**: Documentation only changes
-* **feat**: A new feature
-* **fix**: A bug fix
-* **perf**: A code change that improves performance
-* **refactor**: A code change that neither fixes a bug nor adds a feature
-* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
-* **test**: Adding missing tests or correcting existing tests
+* **build**: Changes that affect the build system or external dependencies. [2]
+* **ci**: Changes to our CI configuration files and scripts. [2]
+* **docs**: Documentation only changes.
+* **feat**: A new feature. [1]
+* **fix**: A bug fix. [1]
+* **refactor**: A code change that neither fixes a bug nor adds a feature
+* **release**: A release commit. Must only include version changes. [2]
+* **revert**: A git commit revert. The description must include the original commit message. [2]
+* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
+* **test**: Adding missing tests or correcting existing tests.
+
+
+[1] This type MUST have a scope. See the next section for more information.
+[2] This type MUST NOT have a scope. It only applies to general scripts and tooling.
### Scope
The scope should be the name of the npm package affected as perceived by the person reading changelog generated from the commit messages.
The following is the list of supported scopes:
-* **@angular-devkit/core**
+* **@angular/cli**
+* **@angular/pwa**
+* **@angular-devkit/architect**
+* **@angular-devkit/architect-cli**
+* **@angular-devkit/build-angular**
+* **@angular-devkit/build-ng-packagr**
* **@angular-devkit/build-optimizer**
+* **@angular-devkit/build-webpack**
+* **@angular-devkit/core**
* **@angular-devkit/schematics**
* **@angular-devkit/schematics-cli**
+* **@ngtools/webpack**
* **@schematics/angular**
* **@schematics/schematics**
+* **@schematics/update**
-There are currently a few exceptions to the "use package name" rule:
-
-* **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
-* **changelog**: used for updating the release notes in CHANGELOG.md
-* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
### Subject
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
+* be concise and direct
* no dot (.) at the end
+### Examples
+Examples of valid commit messages:
+
+* `fix(@angular/cli): prevent the flubber from grassing`
+* `refactor(@schematics/angular): move all JSON classes together`
+
+Examples of invalid commit messages:
+* `fix(@angular/cli): add a new XYZ command`
+
+ This is a feature, not a fix.
+* `ci(@angular/cli): fix publishing workflow`
+
+ The `ci` type cannot have a scope.
+
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
@@ -240,9 +269,44 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
[coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
-[dev-doc]: ttps://github.com/angular/angular-cli/blob/master/packages/angular/cli/README.md#development-hints-for-working-on-angular-cli
+[dev-doc]: https://github.com/angular/angular-cli/blob/master/packages/angular/cli/README.md#development-hints-for-working-on-angular-cli
[GitHub]: https://github.com/angular/angular-cli
[gitter]: https://gitter.im/angular/angular-cli
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
[stackoverflow]: http://stackoverflow.com/questions/tagged/angular-devkit
+
+## Updating the Public API
+Our Public API is protected with TS API Guardian. This is a tool that keeps track of public API surface of our packages.
+
+To test if your change effect the public API you need to run the API guardian on that particular package.
+
+For example in case `@angular-devkit/core` package was modified you need to run:
+
+```bash
+yarn bazel test //etc/api:angular_devkit_core_api
+```
+
+You can also test all packages by running:
+```bash
+yarn bazel test //etc/api ...
+```
+
+If you modified the public API, the test will fail. To update the golden files you need to run:
+
+```bash
+yarn bazel run //etc/api:angular_devkit_core_api.accept
+```
+
+**Note**: In some cases we use aliased symbols to create namespaces.
+
+Example:
+```javascript
+import * as foo from './foo';
+
+export { foo };
+```
+There are currently not supported by the API guardian.
+To overcome this limitation we created `_golden-api.ts` in certain packages.
+
+When adding a new API, it might be the case that you need to add it to `_golden-api.ts`.
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000000..8fef94100787
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,2 @@
+FROM node:10.12
+ENTRYPOINT [ "sh" ]
diff --git a/README.md b/README.md
index 762e1ad325e8..2b50b1394f92 100644
--- a/README.md
+++ b/README.md
@@ -10,39 +10,63 @@
Any changes to README.md directly will result in a failure on CI.
-->
-# Angular DevKit
+# Angular CLI
### Development tools and libraries specialized for Angular
This is the home of the DevKit and the Angular CLI code. You can find the Angular CLI specific README
-[here](https://github.com/angular/angular-cli/blob/master/packages/angular/cli/README.md).
+[here](/packages/angular/cli/README.md).
[](https://circleci.com/gh/angular/angular-cli) [](https://david-dm.org/angular/angular-cli) [](https://david-dm.org/angular/angular-cli?type=dev)
-[](https://github.com/angular/angular-cli/blob/master/LICENSE)
+[](/LICENSE)
[](https://github.com/angular/angular-cli/fork) [](https://github.com/angular/angular-cli)
-----
-
-This is the home for all the tools and libraries built to assist developers with their Angular applications.
-
### Quick Links
-[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) |
+[Gitter](https://gitter.im/angular/angular-cli) | [Contributing](/CONTRIBUTING.md) | [Angular CLI](http://github.com/angular/angular-cli) |
|---|---|---|
+----
+
+## The Goal of Angular CLI
+
+The Angular CLI creates, manages, builds and test your Angular projects. It's built on top of the
+Angular DevKit.
## The Goal of DevKit
-Our goal is to provide a large set of libraries that can be used to manage, develop, deploy and
+DevKit's goal is to provide a large set of libraries that can be used to manage, develop, deploy and
analyze your code.
-This is the extension of the Angular CLI Project. Once this set of tools is done, the Angular CLI
-as it is today will become one of many interfaces available to perform those tasks. Everything
-will also be available to third party tools and IDEs.
+# Getting Started - Local Development
+
+## Installation
+To get started locally, follow these instructions:
+
+1. If you haven't done it already, [make a fork of this repo](https://github.com/angular/angular-cli/fork).
+1. Clone to your local computer using `git`.
+1. Make sure that you have Node 10.9 or later installed. See instructions [here](https://nodejs.org/en/download/).
+1. Make sure that you have `yarn` installed; see instructions [here](https://yarnpkg.com/lang/en/docs/install/).
+1. Run `yarn` (no arguments) from the root of your clone of this project.
+1. Run `yarn link` to add all custom scripts we use to your global install.
+## Creating New Packages
+Adding a package to this repository means running two separate commands:
+
+1. `schematics devkit:package PACKAGE_NAME`. This will update the `.monorepo` file, and create the
+ base files for the new package (package.json, src/index, etc).
+1. `devkit-admin templates`. This will update the README and all other template files that might
+ have changed when adding a new package.
+
+For private packages, you will need to add a `"private": true` key to your package.json manually.
+This will require re-running the template admin script.
+
+# Packages
+
+This is a monorepo which contains many tools and packages:
@@ -50,26 +74,23 @@ will also be available to third party tools and IDEs.
| Project | Package | Version | Links |
|---|---|---|---|
-**Angular CLI** | [`@angular/cli`](https://npmjs.com/package/@angular/cli) | [](https://npmjs.com/package/@angular/cli) | [](https://github.com/angular/angular-cli/blob/master/packages/angular/cli/README.md) [](https://github.com/angular/cli-builds)
+**Angular CLI** | [`@angular/cli`](https://npmjs.com/package/@angular/cli) | [](https://npmjs.com/package/@angular/cli) | [](/packages/angular/cli/README.md) [](https://github.com/angular/cli-builds)
+**Architect CLI** | [`@angular-devkit/architect-cli`](https://npmjs.com/package/@angular-devkit/architect-cli) | [](https://npmjs.com/package/@angular-devkit/architect-cli) | [](https://github.com/angular/angular-devkit-architect-cli-builds)
**Schematics CLI** | [`@angular-devkit/schematics-cli`](https://npmjs.com/package/@angular-devkit/schematics-cli) | [](https://npmjs.com/package/@angular-devkit/schematics-cli) | [](https://github.com/angular/angular-devkit-schematics-cli-builds)
-
## Packages
-This is a monorepo which contains many packages:
-
| Project | Package | Version | Links |
|---|---|---|---|
-**Architect** | [`@angular-devkit/architect`](https://npmjs.com/package/@angular-devkit/architect) | [](https://npmjs.com/package/@angular-devkit/architect) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/architect/README.md) [](https://github.com/angular/angular-devkit-architect-builds)
-**Architect CLI** | [`@angular-devkit/architect-cli`](https://npmjs.com/package/@angular-devkit/architect-cli) | [](https://npmjs.com/package/@angular-devkit/architect-cli) | [](https://github.com/angular/angular-devkit-architect-cli-builds)
-**Build Angular** | [`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular) | [](https://npmjs.com/package/@angular-devkit/build-angular) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/README.md) [](https://github.com/angular/angular-devkit-build-angular-builds)
-**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_ng_packagr/README.md) [](https://github.com/angular/angular-devkit-build-ng-packagr-builds)
-**Build Optimizer** | [`@angular-devkit/build-optimizer`](https://npmjs.com/package/@angular-devkit/build-optimizer) | [](https://npmjs.com/package/@angular-devkit/build-optimizer) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_optimizer/README.md) [](https://github.com/angular/angular-devkit-build-optimizer-builds)
-**Build Webpack** | [`@angular-devkit/build-webpack`](https://npmjs.com/package/@angular-devkit/build-webpack) | [](https://npmjs.com/package/@angular-devkit/build-webpack) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_webpack/README.md) [](https://github.com/angular/angular-devkit-build-webpack-builds)
-**Core** | [`@angular-devkit/core`](https://npmjs.com/package/@angular-devkit/core) | [](https://npmjs.com/package/@angular-devkit/core) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/core/README.md) [](https://github.com/angular/angular-devkit-core-builds)
-**Schematics** | [`@angular-devkit/schematics`](https://npmjs.com/package/@angular-devkit/schematics) | [](https://npmjs.com/package/@angular-devkit/schematics) | [](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/README.md) [](https://github.com/angular/angular-devkit-schematics-builds)
+**Architect** | [`@angular-devkit/architect`](https://npmjs.com/package/@angular-devkit/architect) | [](https://npmjs.com/package/@angular-devkit/architect) | [](/packages/angular_devkit/architect/README.md) [](https://github.com/angular/angular-devkit-architect-builds)
+**Build Angular** | [`@angular-devkit/build-angular`](https://npmjs.com/package/@angular-devkit/build-angular) | [](https://npmjs.com/package/@angular-devkit/build-angular) | [](/packages/angular_devkit/build_angular/README.md) [](https://github.com/angular/angular-devkit-build-angular-builds)
+**Build NgPackagr** | [`@angular-devkit/build-ng-packagr`](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [](https://npmjs.com/package/@angular-devkit/build-ng-packagr) | [](/packages/angular_devkit/build_ng_packagr/README.md) [](https://github.com/angular/angular-devkit-build-ng-packagr-builds)
+**Build Optimizer** | [`@angular-devkit/build-optimizer`](https://npmjs.com/package/@angular-devkit/build-optimizer) | [](https://npmjs.com/package/@angular-devkit/build-optimizer) | [](/packages/angular_devkit/build_optimizer/README.md) [](https://github.com/angular/angular-devkit-build-optimizer-builds)
+**Build Webpack** | [`@angular-devkit/build-webpack`](https://npmjs.com/package/@angular-devkit/build-webpack) | [](https://npmjs.com/package/@angular-devkit/build-webpack) | [](/packages/angular_devkit/build_webpack/README.md) [](https://github.com/angular/angular-devkit-build-webpack-builds)
+**Core** | [`@angular-devkit/core`](https://npmjs.com/package/@angular-devkit/core) | [](https://npmjs.com/package/@angular-devkit/core) | [](/packages/angular_devkit/core/README.md) [](https://github.com/angular/angular-devkit-core-builds)
+**Schematics** | [`@angular-devkit/schematics`](https://npmjs.com/package/@angular-devkit/schematics) | [](https://npmjs.com/package/@angular-devkit/schematics) | [](/packages/angular_devkit/schematics/README.md) [](https://github.com/angular/angular-devkit-schematics-builds)
#### Schematics
diff --git a/WORKSPACE b/WORKSPACE
index 3647c4e935d3..e3a274dae0be 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,66 +1,113 @@
-workspace(name = "angular_devkit")
+workspace(name = "angular_cli")
+
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-# We get Buildifier from here.
http_archive(
- name = "com_github_bazelbuild_buildtools",
- url = "https://github.com/bazelbuild/buildtools/archive/0.15.0.zip",
- strip_prefix = "buildtools-0.15.0",
- sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe",
+ name = "build_bazel_rules_nodejs",
+ sha256 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51",
+ urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
)
-load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
-buildifier_dependencies()
-
-# The Go toolchain is used for Buildifier.
-# rules_typescript_dependencies() also tries to load it but we add it explicitely so we
-# don't have hidden dependencies.
-# This also means we need to load it before rules_typescript_dependencies().
-http_archive(
- name = "io_bazel_rules_go",
- url = "https://github.com/bazelbuild/rules_go/archive/0.14.0.zip",
- strip_prefix = "rules_go-0.14.0",
- sha256 = "9bd7c2743f014e4e112b671098ba1da6aec036fe07093b10ca39a9f81ec5cc33",
+# We use protocol buffers for the Build Event Protocol
+git_repository(
+ name = "com_google_protobuf",
+ commit = "beaeaeda34e97a6ff9735b33a66e011102ab506b",
+ remote = "https://github.com/protocolbuffers/protobuf",
)
-load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
-go_rules_dependencies()
-go_register_toolchains()
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
-# We need a minimum of this version to include https://github.com/bazelbuild/rules_nodejs/pull/281.
-http_archive(
- name = "build_bazel_rules_nodejs",
- url = "https://github.com/bazelbuild/rules_nodejs/archive/c75e3dd0571b0937e3ce0c4f0e6b6b50d90468f0.zip",
- strip_prefix = "rules_nodejs-c75e3dd0571b0937e3ce0c4f0e6b6b50d90468f0",
- sha256 = "b78506ddaed7c682027f873d2bd50086a28570b3187da9fa16fe1672eed3015e",
+protobuf_deps()
+
+load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
+
+# 0.18.0 is needed for .bazelignore
+check_bazel_version(minimum_bazel_version = "0.18.0")
+
+node_repositories(
+ node_repositories = {
+ "10.9.0-darwin_amd64": (
+ "node-v10.9.0-darwin-x64.tar.gz",
+ "node-v10.9.0-darwin-x64",
+ "3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc",
+ ),
+ "10.9.0-linux_amd64": (
+ "node-v10.9.0-linux-x64.tar.xz",
+ "node-v10.9.0-linux-x64",
+ "c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff",
+ ),
+ "10.9.0-windows_amd64": (
+ "node-v10.9.0-win-x64.zip",
+ "node-v10.9.0-win-x64",
+ "6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e",
+ ),
+ },
+ node_version = "10.9.0",
+ yarn_repositories = {
+ "1.9.2": (
+ "yarn-v1.9.2.tar.gz",
+ "yarn-v1.9.2",
+ "3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204",
+ ),
+ },
+ yarn_version = "1.9.2",
)
-# Load the TypeScript rules, its dependencies, and setup the workspace.
-http_archive(
- name = "build_bazel_rules_typescript",
- url = "https://github.com/bazelbuild/rules_typescript/archive/0.16.1.zip",
- strip_prefix = "rules_typescript-0.16.1",
- sha256 = "5b2b0bc63cfcffe7bf97cad2dad3b26a73362f806de66207051f66c87956a995",
+yarn_install(
+ name = "npm",
+ data = [
+ "//:tools/yarn/check-yarn.js",
+ ],
+ package_json = "//:package.json",
+ yarn_lock = "//:yarn.lock",
)
-load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
-# build_bazel_rules_nodejs is loaded transitively through rules_typescript_dependencies.
-rules_typescript_dependencies()
+load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
+
+install_bazel_dependencies()
+
+load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
-# Load the nodejs dependencies, check minimum Bazel version, and define the local node_modules.
-load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
-rules_nodejs_dependencies()
+# Load karma dependencies
+load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")
-load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")
-check_bazel_version("0.15.0")
-node_repositories(
- package_json = ["//:package.json"],
- preserve_symlinks = True,
+rules_karma_dependencies()
+
+# Setup the rules_webtesting toolchain
+load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
+
+web_test_repositories()
+
+##########################
+# Remote Execution Setup #
+##########################
+# Bring in bazel_toolchains for RBE setup configuration.
+http_archive(
+ name = "bazel_toolchains",
+ sha256 = "54764b510cf45754c01ac65c9ba83e5f8fc8a033b8296ef74c4e4d6d1dbfaf21",
+ strip_prefix = "bazel-toolchains-d67435097bd65153a592ecdcc83094474914c205",
+ urls = ["https://github.com/xingao267/bazel-toolchains/archive/d67435097bd65153a592ecdcc83094474914c205.tar.gz"],
)
-local_repository(
- name = "rxjs",
- path = "node_modules/rxjs/src",
+load("@bazel_toolchains//rules:environments.bzl", "clang_env")
+load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
+
+rbe_autoconfig(
+ name = "rbe_ubuntu1604_angular",
+ # The sha256 of marketplace.gcr.io/google/rbe-ubuntu16-04 container that is
+ # used by rbe_autoconfig() to pair toolchain configs in the @bazel_toolchains repo.
+ base_container_digest = "sha256:677c1317f14c6fd5eba2fd8ec645bfdc5119f64b3e5e944e13c89e0525cc8ad1",
+ # Note that if you change the `digest`, you might also need to update the
+ # `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:
+ # and marketplace.gcr.io/google/rbe-ubuntu16-04: have
+ # the same Clang and JDK installed.
+ # Clang is needed because of the dependency on @com_google_protobuf.
+ # Java is needed for the Bazel's test executor Java tool.
+ digest = "sha256:74a8e9dca4781d5f277a7bd8e7ea7ed0f5906c79c9cd996205b6d32f090c62f3",
+ env = clang_env(),
+ registry = "marketplace.gcr.io",
+ repository = "google/rbe-ubuntu16-04-webtest",
)
diff --git a/benchmark/aio/.gitignore b/benchmark/aio/.gitignore
new file mode 100644
index 000000000000..3c85010e11ea
--- /dev/null
+++ b/benchmark/aio/.gitignore
@@ -0,0 +1 @@
+angular/
\ No newline at end of file
diff --git a/benchmark/aio/package.json b/benchmark/aio/package.json
new file mode 100644
index 000000000000..fce9b14e36f7
--- /dev/null
+++ b/benchmark/aio/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "aio-benchmark",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "initialize": "yarn clone && yarn setup && yarn update",
+ "clone": "(git clone https://github.com/angular/angular --depth 1 || true) && cd angular && git fetch origin dd2a650c3455f3bc0a88f8181758a84aacb25fea && git checkout -f FETCH_HEAD",
+ "setup": "cd angular && yarn && cd aio && yarn && yarn setup",
+ "update": "cd angular/aio && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev",
+ "//": "Shouldn't need to install the package twice, but the first install seems to leave two @ngtools/webpack installs around.",
+ "postupdate": "cd angular/aio && yarn add ../../../../dist/_angular-devkit_build-angular.tgz --dev",
+ "benchmark": "cd angular/aio && benchmark --verbose -- yarn ~~build --configuration=stable"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC"
+}
diff --git a/bin/README.md b/bin/README.md
new file mode 100644
index 000000000000..6f3d6c17fbd2
--- /dev/null
+++ b/bin/README.md
@@ -0,0 +1,17 @@
+# `/bin` Folder
+
+This folder includes binaries that are linked when globally linking this repository.
+
+Each file in this directory follows this pattern:
+
+1. JavaScript only.
+1. Requires `../lib/bootstrap-local.js` to bootstrap TypeScript and Node integration.
+1. Requires `../lib/packages` and use the package metadata to find the binary script for the
+package the script is bootstrapping.
+1. Call out main, or simply require the file if it has no export.
+
+`devkit-admin` does not follow this pattern as it needs to setup logging and run some localized
+logic.
+
+In order to add a new script, you should make sure it's in the root `package.json`, so people
+linking this repo get a reference to the script.
diff --git a/bin/purify b/bin/benchmark
similarity index 60%
rename from bin/purify
rename to bin/benchmark
index 810b4d6820b9..4ada663d8bfc 100755
--- a/bin/purify
+++ b/bin/benchmark
@@ -11,4 +11,9 @@
require('../lib/bootstrap-local');
const packages = require('../lib/packages').packages;
-require(packages['@angular-devkit/build-optimizer'].bin['purify']);
+const main = require(packages['@angular-devkit/benchmark'].bin['benchmark']).main;
+
+const args = process.argv.slice(2);
+main({ args })
+ .then(exitCode => process.exitCode = exitCode)
+ .catch(e => { throw (e); });
diff --git a/bin/devkit-admin b/bin/devkit-admin
index be8719fd60ca..f356b0d42e96 100755
--- a/bin/devkit-admin
+++ b/bin/devkit-admin
@@ -25,6 +25,7 @@ const args = minimist(process.argv.slice(2), {
const scriptName = args._.shift();
const scriptPath = path.join('../scripts', scriptName);
+const cwd = process.cwd();
process.chdir(path.join(__dirname, '..'));
@@ -64,14 +65,13 @@ try {
try {
Promise.resolve()
- .then(() => require(scriptPath).default(args, logger))
+ .then(() => require(scriptPath).default(args, logger, cwd))
.then(exitCode => process.exit(exitCode || 0))
.catch(err => {
- logger.fatal(err.stack);
+ logger.fatal(err && err.stack);
process.exit(99);
});
} catch (err) {
logger.fatal(err.stack);
process.exit(99);
}
-
diff --git a/bin/schematics b/bin/schematics
index 748599df46c9..ea3f5176befa 100755
--- a/bin/schematics
+++ b/bin/schematics
@@ -11,4 +11,4 @@
require('../lib/bootstrap-local');
const packages = require('../lib/packages').packages;
-require(packages['@angular-devkit/schematics-cli'].bin['schematics']);
+require(packages['@angular-devkit/schematics-cli'].bin['schematics']).main({ args: process.argv.slice(2) });
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 000000000000..6fdee803e80c
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,25 @@
+# `/docs` Folder
+
+This folder is used for all documentation. It contains a number of subfolders with short
+descriptions here.
+
+## `/docs/design`
+
+Design documents on GitHub, in Markdown format. The number of design documents available is limited.
+
+## `/docs/documentation`
+
+THIS FOLDER IS DEPRECATED AND SHOULD NOT BE UPDATED ANYMORE. Documentation is now available on
+angular.io and can be updated on the main [angular/angular](https://github.com/angular/angular)
+repo.
+
+Markdown files used to publish to the [GitHub Wiki](https://github.com/angular/angular-cli/wiki).
+
+## `/docs/process`
+
+Description of various caretaker and workflow processes.
+
+## `/docs/specifications`
+
+Specifications for support of Angular CLI features. These are meant to be read directly on GitHub
+by developers of libraries who want to integrate with the Angular CLI.
diff --git a/docs/design/analytics.md b/docs/design/analytics.md
new file mode 100644
index 000000000000..5ec9c56adf29
--- /dev/null
+++ b/docs/design/analytics.md
@@ -0,0 +1,124 @@
+# Usage Metrics Gathering
+This document list exactly what is gathered and how.
+
+Any change to analytics should most probably include a change to this document.
+
+# Pageview
+Each command creates a pageview with the path `/command/${commandName}/${subcommandName}`. IE.
+`ng generate component my-component --dryRun` would create a page view with the path
+`/command/generate/@schematics_angular/component`.
+
+We use page views to keep track of sessions more effectively, and to tag events to a page.
+
+Project names and target names will be removed.
+The command `ng run some-project:lint:some-configuration` will create a page view with the path
+`/command/run`.
+
+# Dimensions
+Google Analytics Custom Dimensions are used to track system values and flag values. These
+dimensions are aggregated automatically on the backend.
+
+One dimension per flag, and although technically there can be an overlap between 2 commands, for
+simplicity it should remain unique across all CLI commands. The dimension is the value of the
+`x-user-analytics` field in the `schema.json` files.
+
+To create a new dimension (tracking a new flag):
+
+1. Create the dimension on analytics.google.com first. Dimensions are not tracked if they aren't
+ defined on GA.
+1. Use the ID of the dimension as the `x-user-analytics` value in the `schema.json` file.
+1. Add a new row to the table below in the same PR as the one adding the dimension to the code.
+1. New dimensions PRs need to be approved by [bradgreen@google.com](mailto:bradgreen@google.com),
+ [stephenfluin@google.com](mailto:stephenfluin@google.com) and
+ [iminar@google.com](mailto:iminar@google.com). **This is not negotiable.**
+
+**DO NOT ADD `x-user-analytics` FOR VALUES THAT ARE USER IDENTIFIABLE (PII), FOR EXAMPLE A
+PROJECT NAME TO BUILD OR A MODULE NAME.**
+
+Note: There's a limit of 20 custom dimensions.
+
+### List Of All Dimensions
+
+| Id | Flag | Type |
+|:---:|:---|:---|
+| 1 | `CPU Count` | `number` |
+| 2 | `CPU Speed` | `number` |
+| 3 | `RAM (In GB)` | `number` |
+| 4 | `Node Version` | `number` |
+| 5 | `Flag: --style` | `string` |
+| 6 | `--collection` | `string` |
+| 7 | `--buildEventLog` | `boolean` |
+| 8 | `Flag: --enableIvy` | `boolean` |
+| 9 | `Flag: --inlineStyle` | `boolean` |
+| 10 | `Flag: --inlineTemplate` | `boolean` |
+| 11 | `Flag: --viewEncapsulation` | `string` |
+| 12 | `Flag: --skipTests` | `boolean` |
+| 13 | `Flag: --aot` | `boolean` |
+| 14 | `Flag: --minimal` | `boolean` |
+| 15 | `Flag: --lintFix` | `boolean` |
+| 16 | `Flag: --optimization` | `boolean` |
+| 17 | `Flag: --routing` | `boolean` |
+| 18 | `Flag: --skipImport` | `boolean` |
+| 19 | `Flag: --export` | `boolean` |
+| 20 | `Build Errors (comma separated)` | `string` |
+
+
+# Metrics
+
+### List of All Metrics
+
+| Id | Flag | Type |
+|:---:|:---|:---|
+| 1 | `NgComponentCount` | `number` |
+| 2 | `UNUSED_2` | `none` |
+| 3 | `UNUSED_3` | `none` |
+| 4 | `UNUSED_4` | `none` |
+| 5 | `Build Time` | `number` |
+| 6 | `NgOnInit Count` | `number` |
+| 7 | `Initial Chunk Size` | `number` |
+| 8 | `Total Chunk Count` | `number` |
+| 9 | `Total Chunk Size` | `number` |
+| 10 | `Lazy Chunk Count` | `number` |
+| 11 | `Lazy Chunk Size` | `number` |
+| 12 | `Asset Count` | `number` |
+| 13 | `Asset Size` | `number` |
+| 14 | ` Polyfill Size` | `number` |
+| 15 | ` Css Size` | `number` |
+
+
+# Operating System and Node Version
+A User Agent string is built to "fool" Google Analytics into reading the Operating System and
+version fields from it. The base dimensions are used for those.
+
+Node version is our App ID, but a dimension is also used to get the numeric MAJOR.MINOR of node.
+
+# Debugging
+Using `DEBUG=universal-analytics` will report all calls to the universal-analytics library,
+including queuing events and sending them to the server.
+
+Using `DEBUG=ng:analytics` will report additional information regarding initialization and
+decisions made during the usage analytics process, e.g. if the user has analytics disabled.
+
+Using `DEBUG=ng:analytics:command` will show the decisions made by the command runner.
+
+Using `DEBUG=ng:analytics:log` will show what we actually send to GA.
+
+See [the `debug` NPM library](https://www.npmjs.com/package/debug) for more information.
+
+# Disabling Usage Analytics
+There are 2 ways of disabling usage analytics:
+
+1. using `ng analytics off` (or changing the global configuration file yourself). This is the same
+ as answering "No" to the prompt.
+1. There is an `NG_CLI_ANALYTICS` environment variable that overrides the global configuration.
+ That flag is a string that represents the User ID. If the string `"false"` is used it will
+ disable analytics for this run. If the string `"ci"` is used it will show up as a CI run (see
+ below).
+
+# CI
+A special user named `ci` is used for analytics for tracking CI information. This is a convention
+and is in no way enforced.
+
+Running on CI by default will disable analytics (because of a lack of TTY on STDIN/OUT). It can be
+manually enabled using either a global configuration with a value of `ci`, or using the
+`NG_CLI_ANALYTICS=ci` environment variable.
diff --git a/docs/documentation/add.md b/docs/documentation/add.md
index 9406f31a2c2a..1b208274a1e5 100644
--- a/docs/documentation/add.md
+++ b/docs/documentation/add.md
@@ -1,5 +1,7 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/add).**
+
# ng add
## Overview
diff --git a/docs/documentation/angular-workspace.md b/docs/documentation/angular-workspace.md
index 48be62aa0e8f..fbe3761870dc 100644
--- a/docs/documentation/angular-workspace.md
+++ b/docs/documentation/angular-workspace.md
@@ -1,4 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available in [angular.io](https://angular.io)**.
# Angular CLI workspace file (angular.json) schema
diff --git a/docs/documentation/build.md b/docs/documentation/build.md
index ba25703f56b1..20b765306349 100644
--- a/docs/documentation/build.md
+++ b/docs/documentation/build.md
@@ -1,4 +1,6 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/build)**.
+
# ng build
@@ -392,7 +394,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
--stats-json
- Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.
+ Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https://webpack.github.io/analyse.
diff --git a/docs/documentation/config.md b/docs/documentation/config.md
index bc4d49f32612..6fc6bcc14172 100644
--- a/docs/documentation/config.md
+++ b/docs/documentation/config.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/config)**.
# ng config
diff --git a/docs/documentation/doc.md b/docs/documentation/doc.md
index 33fcd402f69c..3defe5f6e8aa 100644
--- a/docs/documentation/doc.md
+++ b/docs/documentation/doc.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/doc)**.
# ng doc
diff --git a/docs/documentation/e2e.md b/docs/documentation/e2e.md
index 2f9c0d40a695..85c1bd4c401b 100644
--- a/docs/documentation/e2e.md
+++ b/docs/documentation/e2e.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/e2e)**.
# ng e2e
diff --git a/docs/documentation/eject.md b/docs/documentation/eject.md
index 3e2ff0055fe4..9d0ca516438d 100644
--- a/docs/documentation/eject.md
+++ b/docs/documentation/eject.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this.**.
# ng eject
diff --git a/docs/documentation/generate.md b/docs/documentation/generate.md
index ad35dc73742c..11ecd055b66a 100644
--- a/docs/documentation/generate.md
+++ b/docs/documentation/generate.md
@@ -1,10 +1,15 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate
## Overview
`ng generate [name]` generates the specified schematic
+## Alias
+g - `ng g [name]`
+
## Available Schematics:
- [class](generate/class)
- [component](generate/component)
@@ -15,7 +20,7 @@
- [module](generate/module)
- [pipe](generate/pipe)
- [service](generate/service)
-
+ - [appShell](generate/app-shell)
- [application](generate/application)
- [library](generate/library)
- [universal](generate/universal)
diff --git a/docs/documentation/generate/app-shell.md b/docs/documentation/generate/app-shell.md
index 42308267e804..384b87e58ae5 100644
--- a/docs/documentation/generate/app-shell.md
+++ b/docs/documentation/generate/app-shell.md
@@ -1,9 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate app-shell
## Overview
-Create an app shell.
+`ng generate appShell [name]` creates an app shell
+
+## Alias
+app-shell - `ng generate app-shell [name]`
## Options
diff --git a/docs/documentation/generate/application.md b/docs/documentation/generate/application.md
index 439d24693cf2..c6e8bfc5e3fd 100644
--- a/docs/documentation/generate/application.md
+++ b/docs/documentation/generate/application.md
@@ -1,9 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate application
## Overview
-Create an Angular application.
+`ng generate application [name]` creates an Angular application.
+
+## Alias
+app - `ng generate app [name]`
## Options
diff --git a/docs/documentation/generate/class.md b/docs/documentation/generate/class.md
index 4804318f7eff..911a9f3c14f2 100644
--- a/docs/documentation/generate/class.md
+++ b/docs/documentation/generate/class.md
@@ -1,10 +1,13 @@
-
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate class
## Overview
`ng generate class [name]` generates a class
+## Alias
+cl - `ng generate cl [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/component.md b/docs/documentation/generate/component.md
index 95335f9c792e..3e1e4dca8fda 100644
--- a/docs/documentation/generate/component.md
+++ b/docs/documentation/generate/component.md
@@ -1,10 +1,15 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate component
## Overview
`ng generate component [name]` generates a component
+## Alias
+c - `ng generate c [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/directive.md b/docs/documentation/generate/directive.md
index aa1653ebf9cc..94d7bc71783d 100644
--- a/docs/documentation/generate/directive.md
+++ b/docs/documentation/generate/directive.md
@@ -1,10 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate directive
## Overview
`ng generate directive [name]` generates a directive
+## Alias
+d - `ng generate d [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/enum.md b/docs/documentation/generate/enum.md
index b5614375d60b..82733a176401 100644
--- a/docs/documentation/generate/enum.md
+++ b/docs/documentation/generate/enum.md
@@ -1,10 +1,13 @@
-
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate enum
## Overview
`ng generate enum [name]` generates an enumeration
+## Alias
+e - `ng generate e [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/guard.md b/docs/documentation/generate/guard.md
index ea2e17aec000..5dd19b883a31 100644
--- a/docs/documentation/generate/guard.md
+++ b/docs/documentation/generate/guard.md
@@ -1,8 +1,13 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate guard
## Overview
`ng generate guard [name]` generates a guard
+## Alias
+g - `ng generate g [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/interface.md b/docs/documentation/generate/interface.md
index c769635e12b0..bd749ebd2d52 100644
--- a/docs/documentation/generate/interface.md
+++ b/docs/documentation/generate/interface.md
@@ -1,10 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate interface
## Overview
`ng generate interface [name] ` generates an interface
+## Alias
+i - `ng generate i [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/library.md b/docs/documentation/generate/library.md
index 2d62e7985834..48f4d0f40614 100644
--- a/docs/documentation/generate/library.md
+++ b/docs/documentation/generate/library.md
@@ -1,9 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
+
# ng generate library
## Overview
-Generate a library project for Angular.
+`ng generate library [name]` generates a library project for Angular.
+
+## Alias
+lib - `ng generate lib [name]`
## Options
@@ -57,7 +62,7 @@ Generate a library project for Angular.
--skip-install
- Do not add dependencies to package.json.
+ Skip installing dependency packages.
diff --git a/docs/documentation/generate/module.md b/docs/documentation/generate/module.md
index 090a04366098..25055ee35565 100644
--- a/docs/documentation/generate/module.md
+++ b/docs/documentation/generate/module.md
@@ -1,10 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate module
## Overview
`ng generate module [name]` generates an NgModule
+## Alias
+m - `ng generate m [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/pipe.md b/docs/documentation/generate/pipe.md
index e5384f787a19..cebbc9ce3c3e 100644
--- a/docs/documentation/generate/pipe.md
+++ b/docs/documentation/generate/pipe.md
@@ -1,10 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate pipe
## Overview
`ng generate pipe [name]` generates a pipe
+## Alias
+p - `ng generate p [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/service.md b/docs/documentation/generate/service.md
index e4008eb0fc20..c3da41708494 100644
--- a/docs/documentation/generate/service.md
+++ b/docs/documentation/generate/service.md
@@ -1,10 +1,14 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate service
## Overview
`ng generate service [name]` generates a service
+## Alias
+s - `ng generate s [name]`
+
## Options
dry-run
diff --git a/docs/documentation/generate/universal.md b/docs/documentation/generate/universal.md
index 945eaa3c2c0c..053689b12151 100644
--- a/docs/documentation/generate/universal.md
+++ b/docs/documentation/generate/universal.md
@@ -1,9 +1,10 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/generate)**.
# ng generate universal
## Overview
-Create an Angular universal app.
+`ng generate universal [name]` creates an Angular universal app.
## Options
diff --git a/docs/documentation/help.md b/docs/documentation/help.md
index 577f2cab8f9b..98f898764364 100644
--- a/docs/documentation/help.md
+++ b/docs/documentation/help.md
@@ -1,4 +1,6 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/help)**.
+
# ng help
diff --git a/docs/documentation/home.md b/docs/documentation/home.md
index 83762c301ab0..f8d2bb2a87ac 100644
--- a/docs/documentation/home.md
+++ b/docs/documentation/home.md
@@ -2,7 +2,7 @@
# Angular CLI
-NOTE: this documentation is for Angular CLI 6. For Angular CLI 1.x go [here](1-x/home) instead.
+**NOTE: this documentation is for Angular CLI 6. For Angular CLI Version 7 go [here](https://angular.io/cli) and 1.x go [here](1-x-home) instead.**
### Overview
The Angular CLI is a tool to initialize, develop, scaffold and maintain [Angular](https://angular.io) applications
@@ -13,6 +13,10 @@ To install the Angular CLI:
npm install -g @angular/cli
```
+> If you get an error installing the CLI, this is an issue with your local npm setup on your machine, not a problem in Angular CLI.
+> Please have a look at the [fixing npm permissions page](https://docs.npmjs.com/getting-started/fixing-npm-permissions), [common errors page](https://docs.npmjs.com/troubleshooting/common-errors), [npm issue tracker](https://github.com/npm/npm/issues), or open a new issue if the problem you are experiencing isn't known.
+> To install a different version, see below.
+
Generating and serving an Angular project via a development server
[Create](new) and [run](serve) a new project:
```
@@ -63,3 +67,12 @@ End-to-end tests are run via [Protractor](http://www.protractortest.org/).
### Additional Information
There are several [stories](stories) which will walk you through setting up
additional aspects of Angular applications.
+
+### Installing a specific version
+The CLI is installed both globally (the command above with the `-g` argument to `npm install`) and also within the project. To install a different version of the CLI, you can just update the version locally within your project. The globally installed package will always delegate to the local one.
+
+There are several different versions available at any time:
+- Install a previous version, maybe because of a bug in the latest version. For example to get 6.0.2: `npm install @angular/cli@6.0.2`
+- Install the pre-release of a newer minor/major version, to try new features. For example to get 7.0.0-beta.3: `npm install @angular/cli@next`. Note that the `@next` version is only useful during beta periods.
+- Install a snapshot build from the latest passing run of our CI (angular-cli/master). This is useful if an issue was just fixed or a new feature just landed on master, but is not yet released: `npm install @angular/cli@github:angular/cli-builds` (or maybe better, find the particular SHA that you want to try:
+`npm install @angular/cli@github:angular/cli-builds#0123456789abcdef`)
diff --git a/docs/documentation/lint.md b/docs/documentation/lint.md
index 46cf98642821..5418a991d338 100644
--- a/docs/documentation/lint.md
+++ b/docs/documentation/lint.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/lint)**.
# ng lint
diff --git a/docs/documentation/new.md b/docs/documentation/new.md
index 4e7ebd260918..8ed2220272b4 100644
--- a/docs/documentation/new.md
+++ b/docs/documentation/new.md
@@ -1,5 +1,7 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/new)**.
+
# ng new
## Overview
diff --git a/docs/documentation/run.md b/docs/documentation/run.md
index c7de54d15085..f5b107733158 100644
--- a/docs/documentation/run.md
+++ b/docs/documentation/run.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/run)**.
# ng run
diff --git a/docs/documentation/serve.md b/docs/documentation/serve.md
index b064c71ab3f5..1a7ba7ba0bc2 100644
--- a/docs/documentation/serve.md
+++ b/docs/documentation/serve.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/serve)**.
# ng serve
diff --git a/docs/documentation/stories.md b/docs/documentation/stories.md
index 3d21cda0a10c..b32673dcf112 100644
--- a/docs/documentation/stories.md
+++ b/docs/documentation/stories.md
@@ -5,7 +5,6 @@
- [1.0 Update](stories/1.0-update)
- [App Shell](stories/app-shell)
- [Asset Configuration](stories/asset-configuration)
- - [Autocompletion](stories/autocompletion)
- [Configure Hot Module Replacement](stories/configure-hmr)
- [CSS Preprocessors](stories/css-preprocessors)
- [Global Lib](stories/global-lib)
diff --git a/docs/documentation/stories/1.0-update.md b/docs/documentation/stories/1.0-update.md
new file mode 100644
index 000000000000..b3c1f8fde90b
--- /dev/null
+++ b/docs/documentation/stories/1.0-update.md
@@ -0,0 +1,505 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available in [angular.io](https://angular.io)**.
+
+# Angular CLI migration guide
+
+In this migration guide we'll be looking at some of the major changes to CLI projects in the
+last two months.
+
+Most of these changes were not breaking changes and your project should work fine without them.
+
+But if you've been waiting for the perfect time to update, this is it!
+Along with major rebuild speed increases, we've been busy adding a lot of features.
+
+Documentation has also completely moved to [the wiki](https://github.com/angular/angular-cli/wiki).
+The new [Stories](https://github.com/angular/angular-cli/wiki/stories) section covers common usage
+scenarios, so be sure to have a look!
+
+Below are the changes between a project generated two months ago, with `1.0.0-beta.24` and
+a `1.0.0` project.
+If you kept your project up to date you might have a lot of these already.
+
+You can find more details about changes between versions in [the releases tab on GitHub](https://github.com/angular/angular-cli/releases).
+
+If you prefer, you can also generate a new project in a separate folder using
+ `ng new upgrade-project --skip-install` and compare the differences.
+
+## @angular/cli
+
+Angular CLI can now be found on NPM under `@angular/cli` instead of `angular-cli`, and upgrading is a simple 3 step process:
+
+1. Uninstall old version
+2. Update node/npm if necessary
+3. Install new version
+
+### 1. Uninstall old version
+
+If you're using Angular CLI `beta.28` or less, you need to uninstall the `angular-cli` packages:
+```bash
+npm uninstall -g angular-cli # Remove global package
+npm uninstall --save-dev angular-cli # Remove from package.json
+```
+
+Otherwise, uninstall the `@angular/cli` packages:
+```bash
+npm uninstall -g @angular/cli # Remove global package
+npm uninstall --save-dev @angular/cli # Remove from package.json
+```
+
+Also purge the cache and local packages:
+```
+rm -rf node_modules dist # Use rmdir on Windows
+npm cache clean
+```
+
+At this point, you should not have Angular CLI on your system anymore. If invoking Angular CLI at the commandline reveals that it still exists on your system, you will have to manually remove it. See _Manually removing residual Angular CLI_.
+
+### 2. Update node/npm if necessary
+
+Angular CLI now has a minimum requirement of Node 6.9.0 or higher, together with NPM 3 or higher.
+
+If your Node or NPM versions do not meet these requirements, please refer to [the documentation](https://docs.npmjs.com/getting-started/installing-node) on how to upgrade.
+
+### 3. Install the new version
+
+To update Angular CLI to a new version, you must update both the global package and your project's local package:
+
+```bash
+npm install -g @angular/cli@latest # Global package
+npm install --save-dev @angular/cli@latest # Local package
+npm install # Restore removed dependencies
+```
+
+### Manually removing residual Angular CLI
+
+If you accidentally updated NPM before removing the old Angular CLI, you may find that uninstalling the package using `npm uninstall` is proving fruitless. This _could_ be because the global install (and uninstall) path changed between versions of npm from `/usr/local/lib` to `/usr/lib`, and hence, no longer searches through the old directory. In this case you'll have to remove it manually:
+
+`rm -rf /usr/local/lib/node_modules/@angular/cli`
+
+If the old Angular CLI package _still_ persists, you'll need to research how to remove it before proceeding with the upgrade.
+
+## .angular-cli.json
+
+`angular-cli.json` is now `angular.json`, but we still accept the old config file name.
+
+A few new properties have changed in it:
+
+### Schema
+
+Add the `$schema` property above project for handy IDE support on your config file:
+
+```
+"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+```
+
+### Polyfills
+
+There is now a dedicated entry for polyfills ([#3812](https://github.com/angular/angular-cli/pull/3812))
+inside `apps[0].polyfills`, between `main` and `test`:
+
+```
+"main": "main.ts",
+"polyfills": "polyfills.ts",
+"test": "test.ts",
+```
+
+Add it and remove `import './polyfills.ts';` from `src/main.ts` and `src/test.ts`.
+
+We also added a lot of descriptive comments to the existing `src/polyfills.ts` file, explaining
+which polyfills are needed for what browsers.
+Be sure to check it out in a new project!
+
+### Environments
+
+A new `environmentSource` entry ([#4705](https://github.com/angular/angular-cli/pull/4705))
+replaces the previous source entry inside environments.
+
+To migrate angular-cli.json follow the example below:
+
+Before:
+```
+"environments": {
+ "source": "environments/environment.ts",
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+}
+```
+
+After:
+
+```
+"environmentSource": "environments/environment.ts",
+"environments": {
+ "dev": "environments/environment.ts",
+ "prod": "environments/environment.prod.ts"
+}
+```
+
+### Linting
+
+The CLI now uses the TSLint API ([#4248](https://github.com/angular/angular-cli/pull/4248))
+to lint several TS projects at once.
+
+There is a new `lint` entry in `.angular-cli.json` between `e2e` and `test` where all linting
+targets are listed:
+
+```
+"e2e": {
+ "protractor": {
+ "config": "./protractor.conf.js"
+ }
+},
+"lint": [
+ {
+ "project": "src/tsconfig.app.json"
+ },
+ {
+ "project": "src/tsconfig.spec.json"
+ },
+ {
+ "project": "e2e/tsconfig.e2e.json"
+ }
+],
+"test": {
+ "karma": {
+ "config": "./karma.conf.js"
+ }
+},
+```
+
+### Generator defaults
+
+Now you can list generator defaults per generator ([#4389](https://github.com/angular/angular-cli/pull/4389))
+in `defaults`.
+
+Instead of:
+```
+"defaults": {
+ "styleExt": "css",
+ "prefixInterfaces": false,
+ "inline": {
+ "style": false,
+ "template": false
+ },
+ "spec": {
+ "class": false,
+ "component": true,
+ "directive": true,
+ "module": false,
+ "pipe": true,
+ "service": true
+ }
+}
+```
+
+You can instead list the flags as they appear on [the generator command](https://github.com/angular/angular-cli/wiki/generate-component):
+```
+"defaults": {
+ "styleExt": "css",
+ "component": {
+ "inlineTemplate": false,
+ "spec": true
+ }
+}
+```
+
+## One tsconfig per app
+
+CLI projects now use one tsconfig per app ([#4924](https://github.com/angular/angular-cli/pull/4924)).
+
+- `src/tsconfig.app.json`: configuration for the Angular app.
+```
+{
+ "compilerOptions": {
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "target": "es5",
+ "lib": [
+ "es2017",
+ "dom"
+ ],
+ "outDir": "../out-tsc/app",
+ "module": "es2015",
+ "baseUrl": "",
+ "types": []
+ },
+ "exclude": [
+ "test.ts",
+ "**/*.spec.ts"
+ ]
+}
+```
+- `src/tsconfig.spec.json`: configuration for the unit tests.
+```
+{
+ "compilerOptions": {
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "lib": [
+ "es2017",
+ "dom"
+ ],
+ "outDir": "../out-tsc/spec",
+ "module": "commonjs",
+ "target": "es5",
+ "baseUrl": "",
+ "types": [
+ "jasmine",
+ "node"
+ ]
+ },
+ "files": [
+ "test.ts"
+ ],
+ "include": [
+ "**/*.spec.ts",
+ "**/*.d.ts"
+ ]
+}
+
+```
+- `e2e/tsconfig.e2e.json`: configuration for the e2e tests.
+```
+{
+ "compilerOptions": {
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "lib": [
+ "es2017"
+ ],
+ "outDir": "../out-tsc/e2e",
+ "module": "commonjs",
+ "target": "es5",
+ "types":[
+ "jasmine",
+ "node"
+ ]
+ }
+}
+
+```
+
+There is an additional root-level `tsconfig.json` that is used for IDE integration.
+```
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "outDir": "./dist/out-tsc",
+ "baseUrl": "src",
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "target": "es5",
+ "typeRoots": [
+ "node_modules/@types"
+ ],
+ "lib": [
+ "es2017",
+ "dom"
+ ]
+ }
+}
+```
+
+You can delete `e2e/tsconfig.json` and `src/tsconfig.json` after adding these.
+
+Also update `.angular-cli.json` to use them inside `apps[0]`:
+
+```
+"tsconfig": "tsconfig.app.json",
+"testTsconfig": "tsconfig.spec.json",
+```
+
+Then update `protractor.conf.js` to use the e2e config as well:
+```
+beforeLaunch: function() {
+ require('ts-node').register({
+ project: 'e2e/tsconfig.e2e.json'
+ });
+},
+```
+
+These configs have an `types` array where you should add any package you install via `@types/*`.
+This array helps keep typings isolated to the apps that really need them and avoid problems with
+duplicate typings.
+
+For instance, the unit test `tsconfig` has `jasmine` and `node`, which correspond to
+`@types/jasmine` and `@types/node`.
+Add any typings you've installed to the appropriate `tsconfig` as well.
+
+## typings.d.ts
+
+There's a new `src/typings.d.ts` file that serves two purposes:
+- provides a centralized place for users to add their own custom typings
+- makes it easy to use components that use `module.id`, present in the documentation and in snippets
+
+```
+/* SystemJS module definition */
+declare var module: NodeModule;
+interface NodeModule {
+ id: string;
+}
+```
+
+## package.json
+
+We've updated a lot of packages over the last months in order to keep projects up to date.
+
+Additions or removals are found in bold below.
+
+Packages in `dependencies`:
+- `@angular/*` packages now have a `^4.0.0` minimum
+- `core-js` remains unchanged at `^2.4.1`
+- `rxjs` was updated to `^5.1.0`
+- `ts-helpers` was **removed**
+- `zone.js` was updated to `^0.8.4`
+
+Packages in `devDependencies`:
+- `@angular/cli` at `1.0.0` replaces `angular-cli`
+- `@angular/compiler-cli` is also at `^4.0.0`
+- `@types/jasmine` remains unchanged and pinned at `2.5.38`
+- `@types/node` was updated to `~6.0.60`
+- `codelyzer` was updated to `~2.0.0`
+- `jasmine-core` was updated to `~2.5.2`
+- `jasmine-spec-reporter` was updated to `~3.2.0`
+- `karma` was updated to `~1.4.1`
+- `karma-chrome-launcher` was updated to `~2.0.0`
+- `karma-cli` was updated to `~1.0.1`
+- `karma-jasmine` was updated to `~1.1.0`
+- `karma-jasmine-html-reporter` was **added** at `^0.2.2`
+- `karma-coverage-istanbul-reporter` was **added** at `^0.2.0`, replacing `karma-remap-istanbul`
+- `karma-remap-istanbul` was **removed**
+- `protractor` was updated to `~5.1.0`
+- `ts-node` was updated to `~2.0.0`
+- `tslint` was updated to `~4.5.0`
+- `typescript` was updated to `~2.1.0`
+
+See the [karma](#karma.conf.js) and [protractor](#protractor.conf.js) sections below for more
+information on changed packages.
+
+The [Linting rules](#Linting rules) section contains a list of rules that changed due to updates.
+
+We also updated the scripts section to make it more simple:
+
+```
+"scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "test": "ng test",
+ "lint": "ng lint",
+ "e2e": "ng e2e"
+},
+```
+
+## karma.conf.js
+
+Karma configuration suffered some changes to improve the code-coverage functionality,
+use the new `@angular/cli` package, and the new HTML reporter.
+
+In the `frameworks` array update the CLI package to `@angular/cli`.
+
+In the `plugins` array:
+- add `require('karma-jasmine-html-reporter')` and `require('karma-coverage-istanbul-reporter')`
+- remove `require('karma-remap-istanbul')`
+- update the CLI plugin to `require('@angular/cli/plugins/karma')`
+
+Add a new `client` option just above `patterns`:
+```
+client:{
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+},
+files: [
+```
+
+Change the preprocessor to use the new CLI package:
+```
+preprocessors: {
+ './src/test.ts': ['@angular/cli']
+},
+```
+
+Replace `remapIstanbulReporter` with `coverageIstanbulReporter`:
+```
+coverageIstanbulReporter: {
+ reports: [ 'html', 'lcovonly' ],
+ fixWebpackSourcePaths: true
+},
+```
+
+Remove the config entry from `angularCli`:
+```
+angularCli: {
+ environment: 'dev'
+},
+```
+
+Update the reporters to use `coverage-istanbul` instead of `karma-remap-istanbul`, and
+add `kjhtml` (short for karma-jasmine-html-reporter):
+```
+reporters: config.angularCli && config.angularCli.codeCoverage
+ ? ['progress', 'coverage-istanbul']
+ : ['progress', 'kjhtml'],
+```
+
+## protractor.conf.js
+
+Protractor was updated to the new 5.x major version, but you shouldn't need to change much
+to take advantage of all its new features.
+
+Replace the spec reporter import from:
+```
+var SpecReporter = require('jasmine-spec-reporter');
+```
+to
+```
+const { SpecReporter } = require('jasmine-spec-reporter');
+```
+
+Remove `useAllAngular2AppRoots: true`.
+
+Update `beforeLaunch` as described in [One tsconfig per app](#one-tsconfig-per-app):
+```
+beforeLaunch: function() {
+ require('ts-node').register({
+ project: 'e2e/tsconfig.e2e.json'
+ });
+},
+```
+
+Update `onPrepare`:
+```
+onPrepare: function() {
+ jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+}
+```
+
+## Linting rules
+
+The updated versions of `tslint` and `codelyzer` contain a few rule changes that you should
+apply to your `tslint.json`:
+
+Add these new rules:
+```
+"callable-types": true,
+"import-blacklist": [true, "rxjs"],
+"import-spacing": true,
+"interface-over-type-literal": true,
+"no-empty-interface": true,
+"no-string-throw": true,
+"prefer-const": true,
+"typeof-compare": true,
+"unified-signatures": true,
+```
+
+Update `no-inferrable-types` to `"no-inferrable-types": [true, "ignore-params"]`.
diff --git a/docs/documentation/stories/app-shell.md b/docs/documentation/stories/app-shell.md
index 2428f65b2f65..66c27058bb31 100644
--- a/docs/documentation/stories/app-shell.md
+++ b/docs/documentation/stories/app-shell.md
@@ -1,4 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available in [angular.io](https://angular.io)**.
# App shell
@@ -48,7 +49,12 @@ build with the app shell target
```
ng run my-app:app-shell
```
+If you would like to build for production you should run the following command
+```
+ng run my-app:app-shell:production
+ng run my-app:app-shell --configuration production
+```
Verify the build output
-Open dist/app-shell/index.html
+Open dist/index.html
look for text "app-shell works!" which verifies that the app shell route was rendered as part of the output
diff --git a/docs/documentation/stories/application-environments.md b/docs/documentation/stories/application-environments.md
index 635bc2d39fe6..f263ec36419e 100644
--- a/docs/documentation/stories/application-environments.md
+++ b/docs/documentation/stories/application-environments.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/build#configuring-application-environments)**.
+
# Application Environments
In Angular CLI you can configure the build system to replace existing files for your intended
diff --git a/docs/documentation/stories/asset-configuration.md b/docs/documentation/stories/asset-configuration.md
index 6d2f50556cd9..c19602ff18a2 100644
--- a/docs/documentation/stories/asset-configuration.md
+++ b/docs/documentation/stories/asset-configuration.md
@@ -1,7 +1,10 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation is available [here](https://angular.io/guide/build)**.
+
# Project assets
You use the `assets` array inside the build target in `angular.json` to list files or folders
-you want to copy as-is when building your project.
+you want to copy as-is when building your project. if you think you need to exclude files,
+consider not putting that thing in the assets
By default, the `src/assets/` folder and `src/favicon.ico` are copied over.
@@ -19,13 +22,14 @@ The array below does the same as the default one:
```json
"assets": [
{ "glob": "**/*", "input": "src/assets/", "output": "/assets/" },
- { "glob": "favicon.ico", "input": "/src", "output": "/" },
+ { "glob": "favicon.ico", "input": "src/", "output": "/" },
]
```
-`glob` is the a [node-glob](https://github.com/isaacs/node-glob) using `input` as base directory.
-`input` is relative to the workspace root, while `output` is relative to `outDir`
-(`dist/project-name` default).
+- `glob` is a [node-glob](https://github.com/isaacs/node-glob) using `input` as base directory.
+- `input` is relative to the workspace root.
+- `ignore` is a list of globs to ignore from copying.
+- `output` is relative to `outDir` (`dist/project-name` default).
You can use this extended configuration to copy assets from outside your project.
For instance, you can copy assets from a node package:
@@ -36,7 +40,14 @@ The array below does the same as the default one:
]
```
-The contents of `node_modules/some-package/images/` will be available in `dist/some-package/`.
+You can ignore certain files from copying by using the `ignore` option:
+ ```json
+"assets": [
+ { "glob": "**/*", "input": "src/assets/", "ignore": ["**/*.svg"], "output": "/assets/" },
+]
+```
+
+The contents of `node_modules/some-package/images/` will be available in `dist/some-package/`.
## Writing assets outside of `dist/`
diff --git a/docs/documentation/stories/autoprefixer.md b/docs/documentation/stories/autoprefixer.md
index c6902fccaf3b..7c3e0a202e11 100644
--- a/docs/documentation/stories/autoprefixer.md
+++ b/docs/documentation/stories/autoprefixer.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation is available [here](https://angular.io/guide/build#configuring-browser-compatibility)**.
+
# Change target browsers for Autoprefixer
Currently, the CLI uses [Autoprefixer](https://github.com/postcss/autoprefixer) to ensure compatibility
diff --git a/docs/documentation/stories/budgets.md b/docs/documentation/stories/budgets.md
index f6eea0f0311a..726f352e8a08 100644
--- a/docs/documentation/stories/budgets.md
+++ b/docs/documentation/stories/budgets.md
@@ -1,8 +1,10 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/build#configure-size-budgets)**.
+
# Budgets
As applications grow in functionality, they also grow in size. Budgets is a feature in the
Angular CLI which allows you to set budget thresholds in your configuration to ensure parts
-of your application stay within boundries which you set.
+of your application stay within boundaries which you set.
**angular.json**
```
@@ -60,3 +62,24 @@ Available formats:
All sizes are relative to baseline.
Percentages are not valid for baseline values.
+
+## Example
+
+```
+{
+ ...
+ "configurations": {
+ "production": {
+ ...
+ budgets: [
+ {
+ "type": "bundle",
+ "name": "vendor",
+ "minimumWarning": "300kb",
+ "minimumError": "400kb",
+ }
+ ]
+ }
+ }
+}
+```
diff --git a/docs/documentation/stories/code-coverage.md b/docs/documentation/stories/code-coverage.md
index 15f67bb317da..da623b42ff1d 100644
--- a/docs/documentation/stories/code-coverage.md
+++ b/docs/documentation/stories/code-coverage.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/testing#enable-code-coverage-reports)**.
+
# Code Coverage
With the Angular CLI we can run unit tests as well as create code coverage reports. Code coverage reports allow us to see any parts of our code base that may not be properly tested by our unit tests.
diff --git a/docs/documentation/stories/configure-hmr.md b/docs/documentation/stories/configure-hmr.md
index 58e34ac9245b..b3520a67a271 100644
--- a/docs/documentation/stories/configure-hmr.md
+++ b/docs/documentation/stories/configure-hmr.md
@@ -1,7 +1,9 @@
+**HMR is a webpack feature that is not officially supported by Angular. Community contributors can submit PRs against this page to add corrections, new information, or advice.**.
+
# Configure Hot Module Replacement
-Hot Module Replacement (HMR) is a WebPack feature to update code in a running app without rebuilding it.
-This results in faster updates and less full page-reloads.
+Hot Module Replacement (HMR) is a [webpack](https://webpack.js.org) feature to update code in a running app without rebuilding it.
+This results in faster updates and fewer full page-reloads.
You can read more about HMR by visiting [this page](https://webpack.js.org/guides/hot-module-replacement/).
@@ -42,7 +44,7 @@ export const environment = {
Update `angular.json` to include an hmr environment as explained [here](./application-environments)
-and add configurations within build and serve to enable hmr. Note that `` here
+and add configurations within build and serve to enable hmr. Note that `` here
represents the name of the project you are adding this configuration to in `angular.json`.
```json
@@ -176,6 +178,4 @@ When starting the server Webpack will tell you that it’s enabled:
NOTICE Hot Module Replacement (HMR) is enabled for the dev server.
-Now if you make changes to one of your components they changes should be visible automatically without a complete browser refresh.
-
-
+Now if you make changes to one of your components the changes should be visible automatically without a complete browser refresh.
diff --git a/docs/documentation/stories/continuous-integration.md b/docs/documentation/stories/continuous-integration.md
index 269bab08997c..afecbd429674 100644
--- a/docs/documentation/stories/continuous-integration.md
+++ b/docs/documentation/stories/continuous-integration.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/testing#set-up-continuous-integration)**.
+
# Continuous Integration
One of the best ways to keep your project bug free is through a test suite, but it's easy to forget
diff --git a/docs/documentation/stories/create-library.md b/docs/documentation/stories/create-library.md
index 8ccf97421c49..f4be4e7a3dc5 100644
--- a/docs/documentation/stories/create-library.md
+++ b/docs/documentation/stories/create-library.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/creating-libs)**.
+
# Library support in Angular CLI 6
Angular CLI v6 comes with library support via [ng-packagr](https://github.com/dherges/ng-packagr)
@@ -62,7 +64,7 @@ If this happens just rebuild your library.
To publish your library follow these steps:
```
-ng build my-lib --prod
+ng build my-lib
cd dist/my-lib
npm publish
```
@@ -71,9 +73,6 @@ If you've never published a package in npm before, you will need to create a use
You can read more about publishing on npm here:
https://docs.npmjs.com/getting-started/publishing-npm-packages
-The `--prod` flag should be used when building to publish because it will completely clean the build
-directory for the library beforehand, removing old code leftover code from previous versions.
-
## Why do I need to build the library everytime I make changes?
diff --git a/docs/documentation/stories/css-preprocessors.md b/docs/documentation/stories/css-preprocessors.md
index 90d93282d498..35e7441ffa7a 100644
--- a/docs/documentation/stories/css-preprocessors.md
+++ b/docs/documentation/stories/css-preprocessors.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available here [angular.io](https://angular.io/guide/build)**.
+
# CSS Preprocessor integration
Angular CLI supports all major CSS preprocessors:
diff --git a/docs/documentation/stories/disk-serve.md b/docs/documentation/stories/disk-serve.md
index b3f4663b630b..3d7be396125b 100644
--- a/docs/documentation/stories/disk-serve.md
+++ b/docs/documentation/stories/disk-serve.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available here [angular.io](https://angular.io/guide/build)**.
+
# Serve from Disk
The CLI supports running a live browser reload experience to users by running `ng serve`. This will compile the application upon file saves and reload the browser with the newly compiled application. This is done by hosting the application in memory and serving it via [webpack-dev-server](https://webpack.js.org/guides/development/#webpack-dev-server).
diff --git a/docs/documentation/stories/github-pages.md b/docs/documentation/stories/github-pages.md
index 658c8340a863..a41b375c7e99 100644
--- a/docs/documentation/stories/github-pages.md
+++ b/docs/documentation/stories/github-pages.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/deployment#deploy-to-github-pages)**.
+
# Deploy to GitHub Pages
A simple way to deploy your Angular app is to use
diff --git a/docs/documentation/stories/global-lib.md b/docs/documentation/stories/global-lib.md
index 74f1f3a64587..d82089140668 100644
--- a/docs/documentation/stories/global-lib.md
+++ b/docs/documentation/stories/global-lib.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available here [angular.io](https://angular.io/guide/build)**.
+
# Global Library Installation
Some javascript libraries need to be added to the global scope and loaded as if
diff --git a/docs/documentation/stories/global-scripts.md b/docs/documentation/stories/global-scripts.md
index c67a052629f3..c0cecbd8b809 100644
--- a/docs/documentation/stories/global-scripts.md
+++ b/docs/documentation/stories/global-scripts.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available here [angular.io](https://angular.io/guide/build)**.
+
# Global scripts
You can add Javascript files to the global scope via the `scripts` option inside your
diff --git a/docs/documentation/stories/global-styles.md b/docs/documentation/stories/global-styles.md
index 32ff05b4cd23..300a7e953837 100644
--- a/docs/documentation/stories/global-styles.md
+++ b/docs/documentation/stories/global-styles.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation will be available here [angular.io](https://angular.io/guide/build)**.
+
# Global styles
The `styles.css` file allows users to add global styles and supports
diff --git a/docs/documentation/stories/include-angular-flex.md b/docs/documentation/stories/include-angular-flex.md
index 107db0e9c1c9..fa381baaacb1 100644
--- a/docs/documentation/stories/include-angular-flex.md
+++ b/docs/documentation/stories/include-angular-flex.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this.**
+
## Include [Flex Layout](https://github.com/angular/flex-layout) in your CLI application
diff --git a/docs/documentation/stories/include-angular-material.md b/docs/documentation/stories/include-angular-material.md
index e4e36bc015d5..9c6a440a051b 100644
--- a/docs/documentation/stories/include-angular-material.md
+++ b/docs/documentation/stories/include-angular-material.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this.**
+
# Include [Angular Material](https://material.angular.io)
[Angular Material](https://material.angular.io) is a set of Material Design components for Angular apps. To get started please visit these links to the Angular Material project:
diff --git a/docs/documentation/stories/include-angularfire.md b/docs/documentation/stories/include-angularfire.md
index a99f15caae3a..9c3ab4ba3eaf 100644
--- a/docs/documentation/stories/include-angularfire.md
+++ b/docs/documentation/stories/include-angularfire.md
@@ -1,4 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this.**
# Include AngularFire
diff --git a/docs/documentation/stories/include-bootstrap.md b/docs/documentation/stories/include-bootstrap.md
index 82acb4dc4dae..f4efc8169996 100644
--- a/docs/documentation/stories/include-bootstrap.md
+++ b/docs/documentation/stories/include-bootstrap.md
@@ -1,4 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this.**
# Include [Bootstrap](http://getbootstrap.com/)
diff --git a/docs/documentation/stories/include-font-awesome.md b/docs/documentation/stories/include-font-awesome.md
index dad47e6d2d7b..93036b3461cc 100644
--- a/docs/documentation/stories/include-font-awesome.md
+++ b/docs/documentation/stories/include-font-awesome.md
@@ -1,4 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this.**
# Include [Font Awesome](https://fontawesome.com/)
@@ -23,13 +24,31 @@ To add Font Awesome CSS icons to your app...
"build": {
"options": {
"styles": [
- "../node_modules/font-awesome/css/font-awesome.css"
- "styles.css"
+ "../node_modules/font-awesome/css/font-awesome.css",
+ "src/styles.css"
],
}
}
```
### Using SASS
+Create new project with SASS:
+```
+ng new cli-app --style=scss
+```
+To use with existing project with `CSS`:
+1. Rename `src/styles.css` to `src/styles.scss`
+2. Change `angular.json` to look for `styles.scss` instead of css:
+```
+// in angular.json
+"build": {
+ "options": {
+ "styles": [
+ "src/styles.scss"
+ ],
+ }
+}
+```
+Make sure to change `styles.css` to `styles.scss`.
Create an empty file _variables.scss in src/.
diff --git a/docs/documentation/stories/internationalization.md b/docs/documentation/stories/internationalization.md
index 2acd551752ba..d71b8bfef2ac 100644
--- a/docs/documentation/stories/internationalization.md
+++ b/docs/documentation/stories/internationalization.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/i18n)**.
+
# Internationalization (i18n)
If you are working on internationalization, the CLI can help you with the following steps:
diff --git a/docs/documentation/stories/multiple-projects.md b/docs/documentation/stories/multiple-projects.md
index d1a49bce61e4..79743c8b57db 100644
--- a/docs/documentation/stories/multiple-projects.md
+++ b/docs/documentation/stories/multiple-projects.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation is available [here](https://angular.io/guide/build)**.
+
# Multiple Projects
Angular CLI supports multiple applications within one workspace.
diff --git a/docs/documentation/stories/proxy.md b/docs/documentation/stories/proxy.md
index c0cfd0e1cabc..5ce38cb24b93 100644
--- a/docs/documentation/stories/proxy.md
+++ b/docs/documentation/stories/proxy.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/build#using-corporate-proxy)**.
+
# Proxy To Backend
Using the [proxying support](https://webpack.js.org/configuration/dev-server/#devserver-proxy) in webpack's dev server we can highjack certain URLs and send them to a backend server.
@@ -26,7 +28,7 @@ We can then add the `proxyConfig` option to the serve target:
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "your-application-name:build",
- "proxyConfig": "src/proxy.conf.json"
+ "proxyConfig": "proxy.conf.json"
},
```
@@ -119,7 +121,7 @@ Make sure to point to the right file (`.js` instead of `.json`):
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "your-application-name:build",
- "proxyConfig": "src/proxy.conf.js"
+ "proxyConfig": "proxy.conf.js"
},
```
@@ -183,4 +185,4 @@ function setupForCorporateProxy(proxyConfig) {
module.exports = setupForCorporateProxy(proxyConfig);
```
-This way if you have a `http_proxy` or `HTTP_PROXY` environment variable defined, an agent will automatically be added to pass calls through your corporate proxy when running `npm start`.
\ No newline at end of file
+This way if you have a `http_proxy` or `HTTP_PROXY` environment variable defined, an agent will automatically be added to pass calls through your corporate proxy when running `npm start`.
diff --git a/docs/documentation/stories/routing.md b/docs/documentation/stories/routing.md
index 504a62e6f07e..023f8a43461c 100644
--- a/docs/documentation/stories/routing.md
+++ b/docs/documentation/stories/routing.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/router#integrate-routing-with-your-app)**.
+
# Generating a route
The CLI supports routing in several ways:
diff --git a/docs/documentation/stories/third-party-lib.md b/docs/documentation/stories/third-party-lib.md
index 272635865808..bba00af34ad2 100644
--- a/docs/documentation/stories/third-party-lib.md
+++ b/docs/documentation/stories/third-party-lib.md
@@ -1,3 +1,5 @@
+**Documentation below is deprecated and we no longer accept PRs to improve this. The new documentation is available [here](https://angular.io/guide/build)**.
+
# 3rd Party Library Installation
Simply install your library via `npm install lib-name --save` and import it in your code.
diff --git a/docs/documentation/stories/universal-rendering.md b/docs/documentation/stories/universal-rendering.md
index cb007b6eb712..f05c5769f640 100644
--- a/docs/documentation/stories/universal-rendering.md
+++ b/docs/documentation/stories/universal-rendering.md
@@ -1,3 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/guide/universal)**.
+
# Angular Universal Integration
The Angular CLI supports generation of a Universal build for your application. This is a CommonJS-formatted bundle which can be `require()`'d into a Node application (for example, an Express server) and used with `@angular/platform-server`'s APIs to prerender your application.
@@ -20,11 +22,10 @@ This story will show you how to set up Universal bundling for an existing `@angu
Install `@angular/platform-server` into your project. Make sure you use the same version as the other `@angular` packages in your project.
-> You'll also need ts-loader (for your webpack build we'll show later) and @nguniversal/module-map-ngfactory-loader, as it's used to handle lazy-loading in the context of a server-render. (by loading the chunks right away)
+> You'll also need @nguniversal/module-map-ngfactory-loader, as it's used to handle lazy-loading in the context of a server-render. (by loading the chunks right away)
```bash
$ npm install --save @angular/platform-server @nguniversal/module-map-ngfactory-loader express
-$ npm install --save-dev ts-loader webpack-cli
```
## Step 1: Prepare your App for Universal rendering
@@ -197,6 +198,30 @@ app.engine('html', ngExpressEngine({
}));
```
+In case you want to use an AppShell with SSR and Lazy loaded modules you need to configure `NgModuleFactoryLoader` as a provider.
+
+For more context see: https://github.com/angular/angular-cli/issues/9202
+
+```typescript
+import { Compiler, NgModuleFactoryLoader } from '@angular/core';
+import { provideModuleMap, ModuleMapNgFactoryLoader, MODULE_MAP } from '@nguniversal/module-map-ngfactory-loader';
+
+app.engine('html', ngExpressEngine({
+ bootstrap: AppServerModuleNgFactory,
+ providers: [
+ provideModuleMap(LAZY_MODULE_MAP),
+ {
+ provide: NgModuleFactoryLoader,
+ useClass: ModuleMapNgFactoryLoader,
+ deps: [
+ Compiler,
+ MODULE_MAP
+ ],
+ },
+ ]
+}));
+```
+
Below we can see a TypeScript implementation of a -very- simple Express server to fire everything up.
> Note: This is a very bare bones Express application, and is just for demonstrations sake. In a real production environment, you'd want to make sure you have other authentication and security things setup here as well. This is just meant just to show the specific things needed that are relevant to Universal itself. The rest is up to you!
@@ -263,60 +288,36 @@ app.listen(PORT, () => {
});
```
-## Step 5: Setup a webpack config to handle this Node server.ts file and serve your application!
+## Step 5: Setup a TypeScript config to handle this Node server.ts file and serve your application!
Now that we have our Node Express server setup, we need to pack it and serve it!
-Create a file named `webpack.server.config.js` at the ROOT of your application.
+Create a file named `server.tsconfig.json` at the ROOT of your application.
> This file basically takes that server.ts file, and takes it and compiles it and every dependency it has into `dist/server.js`.
-### ./webpack.server.config.js (root project level)
+### ./server.tsconfig.json (root project level)
```typescript
-const path = require('path');
-const webpack = require('webpack');
-
-module.exports = {
- mode: 'none',
- entry: {
- server: './server.ts',
- },
- target: 'node',
- resolve: { extensions: ['.ts', '.js'] },
- optimization: {
- minimize: false
- },
- output: {
- // Puts the output at the root of the dist folder
- path: path.join(__dirname, 'dist'),
- filename: '[name].js'
- },
- module: {
- rules: [
- { test: /\.ts$/, loader: 'ts-loader' },
- {
- // Mark files inside `@angular/core` as using SystemJS style dynamic imports.
- // Removing this will cause deprecation warnings to appear.
- test: /(\\|\/)@angular(\\|\/)core(\\|\/).+\.js$/,
- parser: { system: true },
- },
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "outDir": "./dist",
+ "sourceMap": true,
+ "declaration": false,
+ "moduleResolution": "node",
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "target": "es5",
+ "typeRoots": [
+ "node_modules/@types"
+ ],
+ "lib": [
+ "es2017",
+ "dom"
]
},
- plugins: [
- new webpack.ContextReplacementPlugin(
- // fixes WARNING Critical dependency: the request of a dependency is an expression
- /(.+)?angular(\\|\/)core(.+)?/,
- path.join(__dirname, 'src'), // location of your src
- {} // a map of your routes
- ),
- new webpack.ContextReplacementPlugin(
- // fixes WARNING Critical dependency: the request of a dependency is an expression
- /(.+)?express(\\|\/)(.+)?/,
- path.join(__dirname, 'src'),
- {}
- )
- ]
+ "include": ["server.ts"]
}
```
@@ -343,12 +344,12 @@ Now lets create a few handy scripts to help us do all of this in the future.
```json
"scripts": {
// These will be your common scripts
- "build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
+ "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
"serve:ssr": "node dist/server.js",
// Helpers for the above scripts
"build:client-and-server-bundles": "ng build --prod && ng run your-project-name:server",
- "webpack:server": "webpack --config webpack.server.config.js --progress --colors"
+ "compile:server": "tsc -p server.tsconfig.json",
}
```
diff --git a/docs/documentation/test.md b/docs/documentation/test.md
index ea5c128225ea..5b00f3286c71 100644
--- a/docs/documentation/test.md
+++ b/docs/documentation/test.md
@@ -1,4 +1,6 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/test)**.
+
# ng test
diff --git a/docs/documentation/update.md b/docs/documentation/update.md
index 7d2cebe984fb..2a540e5693e9 100644
--- a/docs/documentation/update.md
+++ b/docs/documentation/update.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/update)**.
# ng update
diff --git a/docs/documentation/version.md b/docs/documentation/version.md
index c6418d66cff5..4e58dc803a6b 100644
--- a/docs/documentation/version.md
+++ b/docs/documentation/version.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/version)**.
# ng version
diff --git a/docs/documentation/xi18n.md b/docs/documentation/xi18n.md
index 835873787bef..01c00ca475f8 100644
--- a/docs/documentation/xi18n.md
+++ b/docs/documentation/xi18n.md
@@ -1,4 +1,5 @@
+**Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/xi18n)**.
# ng xi18n
diff --git a/docs/process/bazel.md b/docs/process/bazel.md
new file mode 100644
index 000000000000..01a63a1f0a67
--- /dev/null
+++ b/docs/process/bazel.md
@@ -0,0 +1,30 @@
+## Yarn Workspaces
+
+The package architecture of `angular-cli` repository is originally setup using
+yarn [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/). This means the
+dependencies of various `package.json` in the repository are linked and
+installed together.
+
+## Bazel
+
+Since then, Bazel was introduced to manage some of the build dependencies in
+`angular-cli` repo. However, Bazel does **not** yet support yarn workspaces,
+since it requires laying out more than one `node_modules` directory. In this
+mixed mode, developers ought to take extra care to synchronize the dependencies.
+
+Since the `yarn_install` rule that installs all NPM dependencies in this
+repository only reads from the **root** `package.json`, every Bazel target that
+depends on packages downloaded from the NPM registry will need to have the
+dependency declared in the **root** `package.json`.
+
+In addition, if the dependency is also needed at runtime (non-dev dependencies),
+the dependency on the individual package's `package.json` has to be updated as
+well. This is to ensure that when users download a published version from NPM,
+they will be able to install all dependencies correctly without Bazel. It is the
+responsibility of the developer to keep both `package.json` in sync.
+
+## Issues
+
+1. Yarn workspaces is not compatible with Bazel-managed deps
+ [(#12736)](https://github.com/angular/angular-cli/issues/12736)
+
diff --git a/docs/process/release.md b/docs/process/release.md
index 6ae887075057..da502f7dd095 100644
--- a/docs/process/release.md
+++ b/docs/process/release.md
@@ -41,15 +41,19 @@ Only the first 2 commits should be cherry picked to the patch branch, as the las
# Release
+## Before releasing
+
+Make sure the CI is green.
+
+Consider if you need to update `packages/schematics/angular/utility/latest-versions.ts` to reflect changes in dependent versions.
+
## Shepparding
-As commits are cherry-picked when PRs are merged, creating the release should be a matter of updating the version
-numbers. This can be done with the following command.
+As commits are cherry-picked when PRs are merged, creating the release should be a matter of creating a tag.
-See `scripts/release.ts` for the full list of release types, e.g. patch updates the third number per semver.
+**Make sure you update the package versions in `packages/schematics/angular/utility/latest-versions.ts`.**
```bash
-devkit-admin release patch --force # replace with minor-beta etc.
git commit -a -m 'release: vXX'
git tag 'vXX'
git push upstream && git push upstream --tags
@@ -71,6 +75,24 @@ Check out the minor tag (e.g. `v6.8.0-beta.0`), then run:
devkit-admin publish --tag next
```
+### Microsite Publishing
+
+**This can ONLY be done by a Google employee.**
+
+**You will need firebase access to our cli-angular-io firebase site. If you don't have it, escalate.**
+
+Check out if changes were made to the microsite:
+
+```sh
+git log v8.0.0-beta.0..HEAD --oneline etc/cli.angular.io | wc -l
+```
+
+If the number is 0 you can ignore the rest of this section.
+
+To publish, go to the `etc/cli.angular.io` directory and run `firebase deploy`. You might have to `firebase login` first. If you don't have the firebase CLI installed, you can install it using `npm install --global firebase-tools` (or use your package manager of choice).
+
+This is detailed in `etc/cli.angular.io/README.md`.
+
### Release Notes
`devkit-admin changelog` takes `from` and `to` arguments which are any valid git ref.
diff --git a/docs/specifications/schematic-prompts.md b/docs/specifications/schematic-prompts.md
new file mode 100644
index 000000000000..08092ef20235
--- /dev/null
+++ b/docs/specifications/schematic-prompts.md
@@ -0,0 +1,121 @@
+# Schematic Prompts
+
+Schematic prompts provide the ability to introduce user interaction into the schematic execution. The schematic runtime supports the ability to allow schematic options to be configured to display a customizable question to the user and then use the response as the value for the option. These prompts are displayed before the execution of the schematic. This allows users direct the operation of the schematic without requiring indepth knowledge of the full spectrum of options available to the user.
+
+To enable this capability, the JSON Schema used to define the schematic's options supports extensions to allow the declarative definition of the prompts and their respective behavior. No additional logic or changes are required to the JavaScript for a schematic to support the prompts.
+
+## Basic Usage
+
+To illustrate the addition of a prompt to an existing schematic the following example JSON schema for a hypothetical _hello world_ schematic will be used.
+
+```json
+{
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "default": "world"
+ },
+ "useColor": {
+ "type": "boolean"
+ }
+ }
+}
+```
+
+Suppose it would be preferred if the user was asked for their name. This can be accomplished by augmenting the `name` property definition with an `x-prompt` field.
+```json
+"x-prompt": "What is your name?"
+```
+In most cases, only the text of the prompt is required. To minimize the amount of necessary configuration, the above _shorthand_ form is supported and will typically be all that is required. Full details regarding the _longhand_ form can be found in the **Configuration Reference** section.
+
+Adding a prompt to allow the user to decided whether the schematic will use color when executing its hello action is also very similar. The schema with both prompts would be as follows:
+```json
+{
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "default": "world",
+ "x-prompt": "What is your name?"
+ },
+ "useColor": {
+ "type": "boolean",
+ "x-prompt": "Would you like the response in color?"
+ }
+ }
+}
+```
+
+Prompts have several different types which provide the ability to display an input method that best represents the schematic option's potential values.
+
+* `confirmation` - A **yes** or **no** question; ideal for boolean options
+* `input` - textual input; ideal for string or number options
+* `list` - a predefined set of items which may be selected
+
+When using the _shorthand_ form, the most appropriate type will automatically be selected based on the property's schema. In the example, the `name` prompt will use an `input` type because it it is a `string` property. The `useColor` prompt will use a `confirmation` type because it is a boolean property with `yes` corresponding to `true` and `no` corresponding to `false`.
+
+It is also important that the response from the user conforms to the contraints of the property. By specifying constraints using the JSON schema, the prompt runtime will automatically validate the response provided by the user. If the value is not acceptable, the user will be asked to enter a new value. This ensures that any values passed to the schematic will meet the expectations of the schematic's implementation and removes the need to add additional checks within the schematic's code.
+
+## Configuration Reference
+
+The `x-prompt` field supports two alternatives to enable a prompt for a schematic option. A shorthand form when additional customization is not required and a longhand form providing the ability for more control over the prompt. All user responses are validated against the property's schema. For example, string type properties can use a minimum length or regular expression constraint to control the allowed values. In the event the response fails validation, the user will be asked to enter a new value.
+
+### Longhand Form
+
+In the this form, the `x-prompt` field is an object with subfields that can be used to customize the behavior of the prompt. Note that some fields only apply to specific prompt types.
+
+| Field | Data Value | Default |
+|-|-|-|
+| `type` | `confirmation`, `input`, `list` | see shorthand section for details
+| `message` | string | N/A (required)
+| `items` | string and/or `label`/`value` object pair | only valid with type `list`
+
+
+### Shorthand Form
+
+`x-prompt` [type: string] --> Question to display to the user.
+
+For this usage, the type of the prompt is determined by the type of the containing property.
+
+| Property Schema | Prompt Type | Notes |
+|-|:-:|:-:|
+| `"type": "boolean"` | `confirmation` | |
+| `"type": "string"` | `input` | |
+| `"type": "number"` | `input` | only valid numbers accepted |
+| `"type": "integer"` | `input` | only valid numbers accepted |
+| `"enum": [...]` | `list` | enum members become list selections
+
+### `x-prompt` Schema
+
+```json
+{
+ "oneOf": [
+ { "type": "string" },
+ {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string" },
+ "message": { "type": "string" },
+ "items": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ { "type": "string" },
+ {
+ "type": "object",
+ "properties": {
+ "label": { "type": "string" },
+ "value": { }
+ },
+ "required": [ "value" ]
+ }
+ ]
+ }
+ }
+ },
+ "required": [ "message" ]
+ }
+ ]
+}
+```
\ No newline at end of file
diff --git a/etc/README.md b/etc/README.md
new file mode 100644
index 000000000000..b0c2447c9b1d
--- /dev/null
+++ b/etc/README.md
@@ -0,0 +1,3 @@
+# `/etc` Folder
+
+This folder is for files that doesn't fit in other directories in the root folder.
diff --git a/etc/api/BUILD b/etc/api/BUILD
new file mode 100644
index 000000000000..3a10d4e9fb48
--- /dev/null
+++ b/etc/api/BUILD
@@ -0,0 +1,52 @@
+load("@npm_ts_api_guardian//:index.bzl", "ts_api_guardian_test")
+
+[ts_api_guardian_test(
+ name = "%s_%s_%sapi" % (
+ bundle[0],
+ bundle[1],
+ bundle[2].replace("src/", "").replace("index", "").replace("_golden-api", "").replace("/", "_"),
+ ),
+ actual = "angular_cli/packages/%s/%s/npm_package/%s.d.ts" % (
+ bundle[0],
+ bundle[1],
+ bundle[2],
+ ),
+ allow_module_identifiers = [
+ "fs",
+ "ts",
+ "ajv",
+ "Symbol",
+ "webpack",
+ ],
+ data = glob([
+ "%s/%s/**/*.d.ts" % (
+ bundle[0],
+ bundle[1],
+ ),
+ ]) + [
+ "//packages/%s/%s:npm_package" % (
+ bundle[0],
+ bundle[1],
+ ),
+ ],
+ golden = "angular_cli/etc/api/%s/%s/%s.d.ts" % (
+ bundle[0],
+ bundle[1],
+ bundle[2],
+ ),
+ # We don't want to analyse these exports nor add them to the golden files
+ # in most cases it's because Ts API Guardian doesn't support Symbol Aliases.
+ strip_export_pattern = [
+ # @angular-devkit/architect
+ "^BuilderProgressState$",
+ # @angular-devkit/schematics
+ "^workflow$",
+ "^formats$",
+ # @angular-devkit/build-optimizer
+ "^buildOptimizerLoader$",
+ ],
+ # At the moment using this will ignore a big change
+ use_angular_tag_rules = False,
+) for bundle in [b[:-len(".d.ts")].split("/", 2) for b in glob(
+ ["**/*.d.ts"],
+)]]
diff --git a/etc/api/angular_devkit/architect/src/index.d.ts b/etc/api/angular_devkit/architect/src/index.d.ts
new file mode 100644
index 000000000000..1d7e5cb3e925
--- /dev/null
+++ b/etc/api/angular_devkit/architect/src/index.d.ts
@@ -0,0 +1,91 @@
+export declare class Architect {
+ constructor(_host: ArchitectHost, registry?: json.schema.SchemaRegistry, additionalJobRegistry?: experimental.jobs.Registry);
+ has(name: experimental.jobs.JobName): Observable;
+ scheduleBuilder(name: string, options: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise;
+ scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise;
+}
+
+export interface BuilderContext {
+ readonly analytics: analytics.Analytics;
+ builder: BuilderInfo;
+ currentDirectory: string;
+ id: number;
+ logger: logging.LoggerApi;
+ target?: Target;
+ workspaceRoot: string;
+ addTeardown(teardown: () => (Promise | void)): void;
+ getBuilderNameForTarget(target: Target): Promise;
+ getTargetOptions(target: Target): Promise;
+ reportProgress(current: number, total?: number, status?: string): void;
+ reportRunning(): void;
+ reportStatus(status: string): void;
+ scheduleBuilder(builderName: string, options?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise;
+ scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise;
+ validateOptions(options: json.JsonObject, builderName: string): Promise;
+}
+
+export interface BuilderHandlerFn {
+ (input: A, context: BuilderContext): BuilderOutputLike;
+}
+
+export declare type BuilderInfo = json.JsonObject & {
+ builderName: string;
+ description: string;
+ optionSchema: json.schema.JsonSchema;
+};
+
+export declare type BuilderInput = json.JsonObject & RealBuilderInput;
+
+export declare type BuilderOutput = json.JsonObject & RealBuilderOutput;
+
+export declare type BuilderOutputLike = SubscribableOrPromise | BuilderOutput;
+
+export declare type BuilderProgress = json.JsonObject & RealBuilderProgress & TypedBuilderProgress;
+
+export declare type BuilderProgressReport = BuilderProgress & ({
+ target?: Target;
+ builder: BuilderInfo;
+});
+
+export declare type BuilderRegistry = experimental.jobs.Registry;
+
+export interface BuilderRun {
+ id: number;
+ info: BuilderInfo;
+ output: Observable;
+ progress: Observable;
+ result: Promise;
+ stop(): Promise;
+}
+
+export declare function createBuilder(fn: BuilderHandlerFn): Builder;
+
+export declare function isBuilderOutput(obj: any): obj is BuilderOutput;
+
+export interface ScheduleOptions {
+ analytics?: analytics.Analytics;
+ logger?: logging.Logger;
+}
+
+export declare function scheduleTargetAndForget(context: BuilderContext, target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Observable;
+
+export declare type Target = json.JsonObject & RealTarget;
+
+export declare function targetFromTargetString(str: string): Target;
+
+export declare function targetStringFromTarget({ project, target, configuration }: Target): string;
+
+export declare type TypedBuilderProgress = ({
+ state: BuilderProgressState.Stopped;
+} | {
+ state: BuilderProgressState.Error;
+ error: json.JsonValue;
+} | {
+ state: BuilderProgressState.Waiting;
+ status?: string;
+} | {
+ state: BuilderProgressState.Running;
+ status?: string;
+ current: number;
+ total?: number;
+});
diff --git a/etc/api/angular_devkit/architect/testing/index.d.ts b/etc/api/angular_devkit/architect/testing/index.d.ts
new file mode 100644
index 000000000000..ccd2f03ff06d
--- /dev/null
+++ b/etc/api/angular_devkit/architect/testing/index.d.ts
@@ -0,0 +1,37 @@
+export declare class TestingArchitectHost implements ArchitectHost {
+ currentDirectory: string;
+ workspaceRoot: string;
+ constructor(workspaceRoot?: string, currentDirectory?: string, _backendHost?: ArchitectHost | null);
+ addBuilder(builderName: string, builder: Builder, description?: string, optionSchema?: json.schema.JsonSchema): void;
+ addBuilderFromPackage(packageName: string): Promise;
+ addTarget(target: Target, builderName: string, options?: json.JsonObject): void;
+ getBuilderNameForTarget(target: Target): Promise;
+ getCurrentDirectory(): Promise;
+ getOptionsForTarget(target: Target): Promise;
+ getWorkspaceRoot(): Promise;
+ loadBuilder(info: BuilderInfo): Promise;
+ resolveBuilder(builderName: string): Promise;
+}
+
+export declare class TestLogger extends logging.Logger {
+ constructor(name: string, parent?: logging.Logger | null);
+ clear(): void;
+ includes(message: string): boolean;
+ test(re: RegExp): boolean;
+}
+
+export declare class TestProjectHost extends NodeJsSyncHost {
+ protected _templateRoot: Path;
+ constructor(_templateRoot: Path);
+ appendToFile(path: string, str: string): void;
+ copyFile(from: string, to: string): void;
+ fileMatchExists(dir: string, regex: RegExp): PathFragment | undefined;
+ initialize(): Observable;
+ replaceInFile(path: string, match: RegExp | string, replacement: string): void;
+ restore(): Observable;
+ root(): Path;
+ scopedSync(): virtualFs.SyncDelegateHost;
+ writeMultipleFiles(files: {
+ [path: string]: string | ArrayBufferLike | Buffer;
+ }): void;
+}
diff --git a/etc/api/angular_devkit/benchmark/src/index.d.ts b/etc/api/angular_devkit/benchmark/src/index.d.ts
new file mode 100644
index 000000000000..9c3713d1a78b
--- /dev/null
+++ b/etc/api/angular_devkit/benchmark/src/index.d.ts
@@ -0,0 +1,91 @@
+export interface AggregatedMetric extends Metric {
+ componentValues: number[];
+}
+
+export interface AggregatedProcessStats {
+ cpu: number;
+ ctime: number;
+ elapsed: number;
+ memory: number;
+ pid: number;
+ ppid: number;
+ processes: number;
+ timestamp: number;
+}
+
+export declare const aggregateMetricGroups: (g1: MetricGroup, g2: MetricGroup) => MetricGroup;
+
+export declare const aggregateMetrics: (m1: Metric | AggregatedMetric, m2: Metric | AggregatedMetric) => AggregatedMetric;
+
+export declare type BenchmarkReporter = (command: Command, groups: MetricGroup[]) => void;
+
+export declare type Capture = (process: MonitoredProcess) => Observable;
+
+export declare class Command {
+ args: string[];
+ cmd: string;
+ cwd: string;
+ expectedExitCode: number;
+ constructor(cmd: string, args?: string[], cwd?: string, expectedExitCode?: number);
+ toString(): string;
+}
+
+export declare const cumulativeMovingAverage: (acc: number, val: number, accSize: number) => number;
+
+export declare const defaultReporter: (logger: logging.Logger) => BenchmarkReporter;
+
+export declare const defaultStatsCapture: Capture;
+
+export declare class LocalMonitoredProcess implements MonitoredProcess {
+ stats$: Observable;
+ stderr$: Observable;
+ stdout$: Observable;
+ constructor(command: Command);
+ run(): Observable;
+}
+
+export declare function main({ args, stdout, stderr, }: MainOptions): Promise<0 | 1>;
+
+export interface MainOptions {
+ args: string[];
+ stderr?: ProcessOutput;
+ stdout?: ProcessOutput;
+}
+
+export declare const max: (v1: number, v2: number) => number;
+
+export declare class MaximumRetriesExceeded extends BaseException {
+ constructor(retries: number);
+}
+
+export interface Metric {
+ componentValues?: number[];
+ name: string;
+ unit: string;
+ value: number;
+}
+
+export interface MetricGroup {
+ metrics: (Metric | AggregatedMetric)[];
+ name: string;
+}
+
+export interface MonitoredProcess {
+ stats$: Observable;
+ stderr$: Observable;
+ stdout$: Observable;
+ run(): Observable;
+ toString(): string;
+}
+
+export declare function runBenchmark({ command, captures, reporters, iterations, retries, logger, }: RunBenchmarkOptions): Observable;
+
+export interface RunBenchmarkOptions {
+ captures: Capture[];
+ command: Command;
+ expectedExitCode?: number;
+ iterations?: number;
+ logger?: logging.Logger;
+ reporters: BenchmarkReporter[];
+ retries?: number;
+}
diff --git a/etc/api/angular_devkit/build_optimizer/src/_golden-api.d.ts b/etc/api/angular_devkit/build_optimizer/src/_golden-api.d.ts
new file mode 100644
index 000000000000..83e1865b8cba
--- /dev/null
+++ b/etc/api/angular_devkit/build_optimizer/src/_golden-api.d.ts
@@ -0,0 +1,25 @@
+export declare function buildOptimizer(options: BuildOptimizerOptions): TransformJavascriptOutput;
+
+export declare const buildOptimizerLoaderPath: string;
+
+export declare class BuildOptimizerWebpackPlugin {
+ apply(compiler: Compiler): void;
+}
+
+export default function buildOptimizerLoader(this: webpack.loader.LoaderContext, content: string, previousSourceMap: RawSourceMap): void;
+
+export declare function getFoldFileTransformer(program: ts.Program): ts.TransformerFactory;
+
+export declare function getImportTslibTransformer(): ts.TransformerFactory;
+
+export declare function getPrefixClassesTransformer(): ts.TransformerFactory;
+
+export declare function getPrefixFunctionsTransformer(): ts.TransformerFactory;
+
+export declare function getScrubFileTransformer(program: ts.Program): ts.TransformerFactory;
+
+export declare function getScrubFileTransformerForCore(program: ts.Program): ts.TransformerFactory;
+
+export declare function getWrapEnumsTransformer(): ts.TransformerFactory;
+
+export declare function transformJavascript(options: TransformJavascriptOptions): TransformJavascriptOutput;
diff --git a/etc/api/angular_devkit/core/node/_golden-api.d.ts b/etc/api/angular_devkit/core/node/_golden-api.d.ts
new file mode 100644
index 000000000000..6577971a1802
--- /dev/null
+++ b/etc/api/angular_devkit/core/node/_golden-api.d.ts
@@ -0,0 +1,62 @@
+export declare function createConsoleLogger(verbose?: boolean, stdout?: ProcessOutput, stderr?: ProcessOutput, colors?: Partial string>>): logging.Logger;
+
+export declare function isDirectory(filePath: string): boolean;
+
+export declare function isFile(filePath: string): boolean;
+
+export declare class ModuleNotFoundException extends BaseException {
+ readonly basePath: string;
+ readonly code: string;
+ readonly moduleName: string;
+ constructor(moduleName: string, basePath: string);
+}
+
+export declare class NodeJsAsyncHost implements virtualFs.Host {
+ readonly capabilities: virtualFs.HostCapabilities;
+ delete(path: Path): Observable;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ rename(from: Path, to: Path): Observable;
+ stat(path: Path): Observable> | null;
+ watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null;
+ write(path: Path, content: virtualFs.FileBuffer): Observable;
+}
+
+export declare class NodeJsSyncHost implements virtualFs.Host {
+ readonly capabilities: virtualFs.HostCapabilities;
+ delete(path: Path): Observable;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ rename(from: Path, to: Path): Observable;
+ stat(path: Path): Observable>;
+ watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable | null;
+ write(path: Path, content: virtualFs.FileBuffer): Observable;
+}
+
+export declare class NodeModuleJobRegistry implements core_experimental.jobs.Registry {
+ constructor(_resolveLocal?: boolean, _resolveGlobal?: boolean);
+ protected _resolve(name: string): string | null;
+ get(name: core_experimental.jobs.JobName): Observable | null>;
+}
+
+export interface ProcessOutput {
+ write(buffer: string | Buffer): boolean;
+}
+
+export declare function resolve(x: string, options: ResolveOptions): string;
+
+export interface ResolveOptions {
+ basedir: string;
+ checkGlobal?: boolean;
+ checkLocal?: boolean;
+ extensions?: string[];
+ paths?: string[];
+ preserveSymlinks?: boolean;
+ resolvePackageJson?: boolean;
+}
diff --git a/etc/api/angular_devkit/core/node/testing/index.d.ts b/etc/api/angular_devkit/core/node/testing/index.d.ts
new file mode 100644
index 000000000000..0c9c161d0878
--- /dev/null
+++ b/etc/api/angular_devkit/core/node/testing/index.d.ts
@@ -0,0 +1,8 @@
+export declare class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost {
+ protected _root: Path;
+ protected _sync: virtualFs.SyncDelegateHost;
+ readonly files: Path[];
+ readonly root: Path;
+ readonly sync: virtualFs.SyncDelegateHost;
+ constructor();
+}
diff --git a/etc/api/angular_devkit/core/src/_golden-api.d.ts b/etc/api/angular_devkit/core/src/_golden-api.d.ts
new file mode 100644
index 000000000000..bd578e135b04
--- /dev/null
+++ b/etc/api/angular_devkit/core/src/_golden-api.d.ts
@@ -0,0 +1,1285 @@
+export interface AdditionalPropertiesValidatorError extends SchemaValidatorErrorBase {
+ keyword: 'additionalProperties';
+ params: {
+ additionalProperty: string;
+ };
+}
+
+export declare function addUndefinedDefaults(value: JsonValue, _pointer: JsonPointer, schema?: JsonSchema): JsonValue;
+
+export declare class AliasHost extends ResolverHost {
+ protected _aliases: Map;
+ readonly aliases: Map;
+ protected _resolve(path: Path): Path;
+}
+
+export declare class AmbiguousProjectPathException extends BaseException {
+ readonly path: Path;
+ readonly projects: ReadonlyArray;
+ constructor(path: Path, projects: ReadonlyArray);
+}
+
+export interface Analytics {
+ event(category: string, action: string, options?: EventOptions): void;
+ flush(): Promise;
+ pageview(path: string, options?: PageviewOptions): void;
+ screenview(screenName: string, appName: string, options?: ScreenviewOptions): void;
+ timing(category: string, variable: string, time: string | number, options?: TimingOptions): void;
+}
+
+export declare type AnalyticsForwarderFn = (report: JsonObject & AnalyticsReport) => void;
+
+export declare type AnalyticsReport = AnalyticsReportEvent | AnalyticsReportScreenview | AnalyticsReportPageview | AnalyticsReportTiming;
+
+export interface AnalyticsReportBase extends JsonObject {
+ kind: AnalyticsReportKind;
+}
+
+export declare class AnalyticsReporter {
+ protected _analytics: Analytics;
+ constructor(_analytics: Analytics);
+ report(report: AnalyticsReport): void;
+}
+
+export interface AnalyticsReportEvent extends AnalyticsReportBase {
+ action: string;
+ category: string;
+ kind: AnalyticsReportKind.Event;
+ options: JsonObject & EventOptions;
+}
+
+export declare enum AnalyticsReportKind {
+ Event = "event",
+ Screenview = "screenview",
+ Pageview = "pageview",
+ Timing = "timing"
+}
+
+export interface AnalyticsReportPageview extends AnalyticsReportBase {
+ kind: AnalyticsReportKind.Pageview;
+ options: JsonObject & PageviewOptions;
+ path: string;
+}
+
+export interface AnalyticsReportScreenview extends AnalyticsReportBase {
+ appName: string;
+ kind: AnalyticsReportKind.Screenview;
+ options: JsonObject & ScreenviewOptions;
+ screenName: string;
+}
+
+export interface AnalyticsReportTiming extends AnalyticsReportBase {
+ category: string;
+ kind: AnalyticsReportKind.Timing;
+ options: JsonObject & TimingOptions;
+ time: string | number;
+ variable: string;
+}
+
+export declare function asPosixPath(path: Path): PosixPath;
+
+export declare function asWindowsPath(path: Path): WindowsPath;
+
+export declare class BaseException extends Error {
+ constructor(message?: string);
+}
+
+export declare function basename(path: Path): PathFragment;
+
+export declare const bgBlack: (x: string) => string;
+
+export declare const bgBlue: (x: string) => string;
+
+export declare const bgCyan: (x: string) => string;
+
+export declare const bgGreen: (x: string) => string;
+
+export declare const bgMagenta: (x: string) => string;
+
+export declare const bgRed: (x: string) => string;
+
+export declare const bgWhite: (x: string) => string;
+
+export declare const bgYellow: (x: string) => string;
+
+export declare const black: (x: string) => string;
+
+export declare const blue: (x: string) => string;
+
+export declare const bold: (x: string) => string;
+
+export declare function buildJsonPointer(fragments: string[]): JsonPointer;
+
+export declare function camelize(str: string): string;
+
+export declare function capitalize(str: string): string;
+
+export declare class CircularDependencyFoundException extends BaseException {
+ constructor();
+}
+
+export declare function classify(str: string): string;
+
+export declare function clean(array: Array): Array;
+
+export declare namespace colors {
+ const reset: (x: string) => string;
+ const bold: (x: string) => string;
+ const dim: (x: string) => string;
+ const italic: (x: string) => string;
+ const underline: (x: string) => string;
+ const inverse: (x: string) => string;
+ const hidden: (x: string) => string;
+ const strikethrough: (x: string) => string;
+ const black: (x: string) => string;
+ const red: (x: string) => string;
+ const green: (x: string) => string;
+ const yellow: (x: string) => string;
+ const blue: (x: string) => string;
+ const magenta: (x: string) => string;
+ const cyan: (x: string) => string;
+ const white: (x: string) => string;
+ const grey: (x: string) => string;
+ const gray: (x: string) => string;
+ const bgBlack: (x: string) => string;
+ const bgRed: (x: string) => string;
+ const bgGreen: (x: string) => string;
+ const bgYellow: (x: string) => string;
+ const bgBlue: (x: string) => string;
+ const bgMagenta: (x: string) => string;
+ const bgCyan: (x: string) => string;
+ const bgWhite: (x: string) => string;
+}
+
+export declare class ContentHasMutatedException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class CordHost extends SimpleMemoryHost {
+ protected _back: ReadonlyHost;
+ protected _filesToCreate: Set;
+ protected _filesToDelete: Set;
+ protected _filesToOverwrite: Set;
+ protected _filesToRename: Map;
+ protected _filesToRenameRevert: Map;
+ readonly backend: ReadonlyHost;
+ readonly capabilities: HostCapabilities;
+ constructor(_back: ReadonlyHost);
+ clone(): CordHost;
+ commit(host: Host, force?: boolean): Observable;
+ create(path: Path, content: FileBuffer): Observable;
+ delete(path: Path): Observable;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ overwrite(path: Path, content: FileBuffer): Observable;
+ read(path: Path): Observable;
+ records(): CordHostRecord[];
+ rename(from: Path, to: Path): Observable;
+ stat(path: Path): Observable | null;
+ watch(path: Path, options?: HostWatchOptions): null;
+ willCreate(path: Path): boolean;
+ willDelete(path: Path): boolean;
+ willOverwrite(path: Path): boolean;
+ willRename(path: Path): boolean;
+ willRenameTo(path: Path, to: Path): boolean;
+ write(path: Path, content: FileBuffer): Observable;
+}
+
+export interface CordHostCreate {
+ content: FileBuffer;
+ kind: 'create';
+ path: Path;
+}
+
+export interface CordHostDelete {
+ kind: 'delete';
+ path: Path;
+}
+
+export interface CordHostOverwrite {
+ content: FileBuffer;
+ kind: 'overwrite';
+ path: Path;
+}
+
+export declare type CordHostRecord = CordHostCreate | CordHostOverwrite | CordHostRename | CordHostDelete;
+
+export interface CordHostRename {
+ from: Path;
+ kind: 'rename';
+ to: Path;
+}
+
+export declare class CoreSchemaRegistry implements SchemaRegistry {
+ constructor(formats?: SchemaFormat[]);
+ protected _resolver(ref: string, validate: ajv.ValidateFunction): {
+ context?: ajv.ValidateFunction;
+ schema?: JsonObject;
+ };
+ addFormat(format: SchemaFormat): void;
+ addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
+ addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
+ addSmartDefaultProvider(source: string, provider: SmartDefaultProvider): void;
+ compile(schema: JsonSchema): Observable;
+ flatten(schema: JsonObject): Observable;
+ registerUriHandler(handler: UriHandler): void;
+ usePromptProvider(provider: PromptProvider): void;
+}
+
+export declare function createWorkspaceHost(host: virtualFs.Host): WorkspaceHost;
+
+export interface CustomDimensionsAndMetricsOptions {
+ dimensions?: (boolean | number | string)[];
+ metrics?: (boolean | number | string)[];
+}
+
+export declare const cyan: (x: string) => string;
+
+export declare function dasherize(str: string): string;
+
+export declare function decamelize(str: string): string;
+
+export declare function deepCopy(value: T): T;
+
+export declare type DefinitionCollectionListener = (name: string, action: 'add' | 'remove' | 'replace', newValue: V | undefined, oldValue: V | undefined) => void;
+
+export declare class DependencyNotFoundException extends BaseException {
+ constructor();
+}
+
+export declare const dim: (x: string) => string;
+
+export declare function dirname(path: Path): Path;
+
+export declare class Empty implements ReadonlyHost {
+ readonly capabilities: HostCapabilities;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ stat(path: Path): Observable | null>;
+}
+
+export interface EventOptions extends CustomDimensionsAndMetricsOptions {
+ label?: string;
+ value?: string;
+}
+
+export declare function extname(path: Path): string;
+
+export declare class FileAlreadyExistException extends BaseException {
+ constructor(path: string);
+}
+
+export declare const fileBuffer: TemplateTag;
+
+export declare type FileBuffer = ArrayBuffer;
+
+export declare type FileBufferLike = ArrayBufferLike;
+
+export declare function fileBufferToString(fileBuffer: FileBuffer): string;
+
+export declare class FileDoesNotExistException extends BaseException {
+ constructor(path: string);
+}
+
+export interface FormatValidatorError extends SchemaValidatorErrorBase {
+ keyword: 'format';
+ params: {
+ format: string;
+ };
+}
+
+export declare class ForwardingAnalytics implements Analytics {
+ protected _fn: AnalyticsForwarderFn;
+ constructor(_fn: AnalyticsForwarderFn);
+ event(category: string, action: string, options?: EventOptions): void;
+ flush(): Promise;
+ pageview(path: string, options?: PageviewOptions): void;
+ screenview(screenName: string, appName: string, options?: ScreenviewOptions): void;
+ timing(category: string, variable: string, time: string | number, options?: TimingOptions): void;
+}
+
+export declare function fragment(path: string): PathFragment;
+
+export declare function getSystemPath(path: Path): string;
+
+export declare function getTypesOfSchema(schema: JsonSchema): Set;
+
+export declare const gray: (x: string) => string;
+
+export declare const green: (x: string) => string;
+
+export declare const grey: (x: string) => string;
+
+export declare const hidden: (x: string) => string;
+
+export interface Host extends ReadonlyHost {
+ delete(path: Path): Observable;
+ rename(from: Path, to: Path): Observable;
+ watch(path: Path, options?: HostWatchOptions): Observable | null;
+ write(path: Path, content: FileBufferLike): Observable;
+}
+
+export interface HostCapabilities {
+ synchronous: boolean;
+}
+
+export interface HostWatchEvent {
+ readonly path: Path;
+ readonly time: Date;
+ readonly type: HostWatchEventType;
+}
+
+export declare const enum HostWatchEventType {
+ Changed = 0,
+ Created = 1,
+ Deleted = 2,
+ Renamed = 3
+}
+
+export interface HostWatchOptions {
+ readonly persistent?: boolean;
+ readonly recursive?: boolean;
+}
+
+export declare function indentBy(indentations: number): TemplateTag;
+
+export declare class IndentLogger extends Logger {
+ constructor(name: string, parent?: Logger | null, indentation?: string);
+}
+
+export declare class InvalidJsonCharacterException extends JsonException {
+ character: number;
+ invalidChar: string;
+ line: number;
+ offset: number;
+ constructor(context: JsonParserContext);
+}
+
+export declare class InvalidPathException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class InvalidUpdateRecordException extends BaseException {
+ constructor();
+}
+
+export declare const inverse: (x: string) => string;
+
+export declare function isAbsolute(p: Path): boolean;
+
+export declare function isJsonArray(value: JsonValue): value is JsonArray;
+
+export declare function isJsonObject(value: JsonValue): value is JsonObject;
+
+export declare function isObservable(obj: any | Observable): obj is Observable;
+
+export declare function isPromise(obj: any): obj is Promise;
+
+export declare const italic: (x: string) => string;
+
+export declare function join(p1: Path, ...others: string[]): Path;
+
+export declare function joinJsonPointer(root: JsonPointer, ...others: string[]): JsonPointer;
+
+export interface JsonArray extends Array {
+}
+
+export interface JsonAstArray extends JsonAstNodeBase {
+ readonly elements: JsonAstNode[];
+ readonly kind: 'array';
+ readonly value: JsonArray;
+}
+
+export interface JsonAstComment extends JsonAstNodeBase {
+ readonly content: string;
+ readonly kind: 'comment';
+}
+
+export interface JsonAstConstantFalse extends JsonAstNodeBase {
+ readonly kind: 'false';
+ readonly value: false;
+}
+
+export interface JsonAstConstantNull extends JsonAstNodeBase {
+ readonly kind: 'null';
+ readonly value: null;
+}
+
+export interface JsonAstConstantTrue extends JsonAstNodeBase {
+ readonly kind: 'true';
+ readonly value: true;
+}
+
+export interface JsonAstIdentifier extends JsonAstNodeBase {
+ readonly kind: 'identifier';
+ readonly value: string;
+}
+
+export interface JsonAstKeyValue extends JsonAstNodeBase {
+ readonly key: JsonAstString | JsonAstIdentifier;
+ readonly kind: 'keyvalue';
+ readonly value: JsonAstNode;
+}
+
+export interface JsonAstMultilineComment extends JsonAstNodeBase {
+ readonly content: string;
+ readonly kind: 'multicomment';
+}
+
+export declare type JsonAstNode = JsonAstNumber | JsonAstString | JsonAstIdentifier | JsonAstArray | JsonAstObject | JsonAstConstantFalse | JsonAstConstantNull | JsonAstConstantTrue;
+
+export interface JsonAstNodeBase {
+ readonly comments?: (JsonAstComment | JsonAstMultilineComment)[];
+ readonly end: Position;
+ readonly start: Position;
+ readonly text: string;
+}
+
+export interface JsonAstNumber extends JsonAstNodeBase {
+ readonly kind: 'number';
+ readonly value: number;
+}
+
+export interface JsonAstObject extends JsonAstNodeBase {
+ readonly kind: 'object';
+ readonly properties: JsonAstKeyValue[];
+ readonly value: JsonObject;
+}
+
+export interface JsonAstString extends JsonAstNodeBase {
+ readonly kind: 'string';
+ readonly value: string;
+}
+
+export declare class JsonException extends BaseException {
+}
+
+export interface JsonObject {
+ [prop: string]: JsonValue;
+}
+
+export declare enum JsonParseMode {
+ Strict = 0,
+ CommentsAllowed = 1,
+ SingleQuotesAllowed = 2,
+ IdentifierKeyNamesAllowed = 4,
+ TrailingCommasAllowed = 8,
+ HexadecimalNumberAllowed = 16,
+ MultiLineStringAllowed = 32,
+ LaxNumberParsingAllowed = 64,
+ NumberConstantsAllowed = 128,
+ Default = 0,
+ Loose = 255,
+ Json = 0,
+ Json5 = 255
+}
+
+export interface JsonParserContext {
+ readonly mode: JsonParseMode;
+ readonly original: string;
+ position: Position;
+ previous: Position;
+}
+
+export declare type JsonPointer = string & {
+ __PRIVATE_DEVKIT_JSON_POINTER: void;
+};
+
+export interface JsonSchemaVisitor {
+ (current: JsonObject | JsonArray, pointer: JsonPointer, parentSchema?: JsonObject | JsonArray, index?: string): void;
+}
+
+export declare type JsonValue = JsonAstNode['value'];
+
+export interface JsonVisitor {
+ (value: JsonValue, pointer: JsonPointer, schema?: JsonObject, root?: JsonObject | JsonArray): Observable | JsonValue;
+}
+
+export declare class LevelCapLogger extends LevelTransformLogger {
+ readonly levelCap: LogLevel;
+ readonly name: string;
+ readonly parent: Logger | null;
+ constructor(name: string, parent: Logger | null, levelCap: LogLevel);
+ static levelMap: {
+ [cap: string]: {
+ [level: string]: string;
+ };
+ };
+}
+
+export declare class LevelTransformLogger extends Logger {
+ readonly levelTransform: (level: LogLevel) => LogLevel;
+ readonly name: string;
+ readonly parent: Logger | null;
+ constructor(name: string, parent: Logger | null, levelTransform: (level: LogLevel) => LogLevel);
+ createChild(name: string): Logger;
+ log(level: LogLevel, message: string, metadata?: JsonObject): void;
+}
+
+export declare function levenshtein(a: string, b: string): number;
+
+export interface LimitValidatorError extends SchemaValidatorErrorBase {
+ keyword: 'maxItems' | 'minItems' | 'maxLength' | 'minLength' | 'maxProperties' | 'minProperties';
+ params: {
+ limit: number;
+ };
+}
+
+export interface LogEntry extends LoggerMetadata {
+ level: LogLevel;
+ message: string;
+ timestamp: number;
+}
+
+export declare class Logger extends Observable implements LoggerApi {
+ protected _metadata: LoggerMetadata;
+ protected _observable: Observable;
+ protected readonly _subject: Subject;
+ readonly name: string;
+ readonly parent: Logger | null;
+ constructor(name: string, parent?: Logger | null);
+ asApi(): LoggerApi;
+ complete(): void;
+ createChild(name: string): Logger;
+ debug(message: string, metadata?: JsonObject): void;
+ error(message: string, metadata?: JsonObject): void;
+ fatal(message: string, metadata?: JsonObject): void;
+ forEach(next: (value: LogEntry) => void, PromiseCtor?: typeof Promise): Promise;
+ info(message: string, metadata?: JsonObject): void;
+ lift(operator: Operator): Observable;
+ log(level: LogLevel, message: string, metadata?: JsonObject): void;
+ next(entry: LogEntry): void;
+ subscribe(): Subscription;
+ subscribe(observer: PartialObserver): Subscription;
+ subscribe(next?: (value: LogEntry) => void, error?: (error: Error) => void, complete?: () => void): Subscription;
+ toString(): string;
+ warn(message: string, metadata?: JsonObject): void;
+}
+
+export interface LoggerApi {
+ createChild(name: string): Logger;
+ debug(message: string, metadata?: JsonObject): void;
+ error(message: string, metadata?: JsonObject): void;
+ fatal(message: string, metadata?: JsonObject): void;
+ info(message: string, metadata?: JsonObject): void;
+ log(level: LogLevel, message: string, metadata?: JsonObject): void;
+ warn(message: string, metadata?: JsonObject): void;
+}
+
+export interface LoggerMetadata extends JsonObject {
+ name: string;
+ path: string[];
+}
+
+export declare class LoggingAnalytics implements Analytics {
+ protected _logger: Logger;
+ constructor(_logger: Logger);
+ event(category: string, action: string, options?: EventOptions): void;
+ flush(): Promise;
+ pageview(path: string, options?: PageviewOptions): void;
+ screenview(screenName: string, appName: string, options?: ScreenviewOptions): void;
+ timing(category: string, variable: string, time: string | number, options?: TimingOptions): void;
+}
+
+export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
+
+export declare const magenta: (x: string) => string;
+
+export declare function mapObject(obj: {
+ [k: string]: T;
+}, mapper: (k: string, v: T) => V): {
+ [k: string]: V;
+};
+
+export declare class MergeConflictException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class MultiAnalytics implements Analytics {
+ protected _backends: Analytics[];
+ constructor(_backends?: Analytics[]);
+ event(category: string, action: string, options?: EventOptions): void;
+ flush(): Promise;
+ pageview(path: string, options?: PageviewOptions): void;
+ push(...backend: Analytics[]): void;
+ screenview(screenName: string, appName: string, options?: ScreenviewOptions): void;
+ timing(category: string, variable: string, time: string | number, options?: TimingOptions): void;
+}
+
+export declare enum NgCliAnalyticsDimensions {
+ CpuCount = 1,
+ CpuSpeed = 2,
+ RamInGigabytes = 3,
+ NodeVersion = 4,
+ NgAddCollection = 6,
+ NgBuildBuildEventLog = 7,
+ BuildErrors = 20
+}
+
+export declare const NgCliAnalyticsDimensionsFlagInfo: {
+ [name: string]: [string, string];
+};
+
+export declare enum NgCliAnalyticsMetrics {
+ NgComponentCount = 1,
+ UNUSED_2 = 2,
+ UNUSED_3 = 3,
+ UNUSED_4 = 4,
+ BuildTime = 5,
+ NgOnInitCount = 6,
+ InitialChunkSize = 7,
+ TotalChunkCount = 8,
+ TotalChunkSize = 9,
+ LazyChunkCount = 10,
+ LazyChunkSize = 11,
+ AssetCount = 12,
+ AssetSize = 13,
+ PolyfillSize = 14,
+ CssSize = 15
+}
+
+export declare const NgCliAnalyticsMetricsFlagInfo: {
+ [name: string]: [string, string];
+};
+
+export declare function noCacheNormalize(path: string): Path;
+
+export declare class NoopAnalytics implements Analytics {
+ event(): void;
+ flush(): Promise;
+ pageview(): void;
+ screenview(): void;
+ timing(): void;
+}
+
+export declare function normalize(path: string): Path;
+
+export declare const NormalizedRoot: Path;
+
+export declare const NormalizedSep: Path;
+
+export declare class NullLogger extends Logger {
+ constructor(parent?: Logger | null);
+ asApi(): LoggerApi;
+}
+
+export declare function oneLine(strings: TemplateStringsArray, ...values: any[]): string;
+
+export interface PageviewOptions extends CustomDimensionsAndMetricsOptions {
+ hostname?: string;
+ title?: string;
+}
+
+export declare function parseJson(input: string, mode?: JsonParseMode, options?: ParseJsonOptions): JsonValue;
+
+export declare function parseJsonAst(input: string, mode?: JsonParseMode): JsonAstNode;
+
+export interface ParseJsonOptions {
+ path?: string;
+}
+
+export declare function parseJsonPointer(pointer: JsonPointer): string[];
+
+export declare class PartiallyOrderedSet implements Set {
+ readonly [Symbol.toStringTag]: 'Set';
+ readonly size: number;
+ [Symbol.iterator](): IterableIterator;
+ protected _checkCircularDependencies(item: T, deps: Set): void;
+ add(item: T, deps?: (Set | T[])): this;
+ clear(): void;
+ delete(item: T): boolean;
+ entries(): IterableIterator<[T, T]>;
+ forEach(callbackfn: (value: T, value2: T, set: PartiallyOrderedSet) => void, thisArg?: any): void;
+ has(item: T): boolean;
+ keys(): IterableIterator;
+ values(): IterableIterator;
+}
+
+export declare const path: TemplateTag;
+
+export declare type Path = string & {
+ __PRIVATE_DEVKIT_PATH: void;
+};
+
+export declare class PathCannotBeFragmentException extends BaseException {
+ constructor(path: string);
+}
+
+export declare type PathFragment = Path & {
+ __PRIVATE_DEVKIT_PATH_FRAGMENT: void;
+};
+
+export declare class PathIsDirectoryException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class PathIsFileException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class PathMustBeAbsoluteException extends BaseException {
+ constructor(path: string);
+}
+
+export declare class PathSpecificJsonException extends JsonException {
+ exception: JsonException;
+ path: string;
+ constructor(path: string, exception: JsonException);
+}
+
+export declare class PatternMatchingHost extends ResolverHost {
+ protected _patterns: Map;
+ protected _resolve(path: Path): Path;
+ addPattern(pattern: string | string[], replacementFn: ReplacementFunction): void;
+}
+
+export interface Position {
+ readonly character: number;
+ readonly line: number;
+ readonly offset: number;
+}
+
+export declare type PosixPath = string & {
+ __PRIVATE_DEVKIT_POSIX_PATH: void;
+};
+
+export declare class PriorityQueue {
+ readonly size: number;
+ constructor(_comparator: (x: T, y: T) => number);
+ clear(): void;
+ peek(): T | undefined;
+ pop(): T | undefined;
+ push(item: T): void;
+ toArray(): Array;
+}
+
+export interface ProjectDefinition {
+ readonly extensions: Record;
+ prefix?: string;
+ root: string;
+ sourceRoot?: string;
+ readonly targets: TargetDefinitionCollection;
+}
+
+export declare class ProjectDefinitionCollection extends DefinitionCollection {
+ constructor(initial?: Record, listener?: DefinitionCollectionListener);
+ add(definition: {
+ name: string;
+ root: string;
+ sourceRoot?: string;
+ prefix?: string;
+ targets?: Record;
+ [key: string]: unknown;
+ }): ProjectDefinition;
+ set(name: string, value: ProjectDefinition): this;
+}
+
+export declare class ProjectNotFoundException extends BaseException {
+ constructor(name: string);
+}
+
+export declare class ProjectToolNotFoundException extends BaseException {
+ constructor(name: string);
+}
+
+export interface PromptDefinition {
+ default?: string | string[] | number | boolean | null;
+ id: string;
+ items?: Array;
+ message: string;
+ multiselect?: boolean;
+ raw?: string | JsonObject;
+ type: string;
+ validator?: (value: string) => boolean | string | Promise;
+}
+
+export declare type PromptProvider = (definitions: Array) => SubscribableOrPromise<{
+ [id: string]: JsonValue;
+}>;
+
+export interface ReadonlyHost {
+ readonly capabilities: HostCapabilities;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ stat(path: Path): Observable | null> | null;
+}
+
+export declare function readWorkspace(path: string, host: WorkspaceHost, format?: WorkspaceFormat): Promise<{
+ workspace: WorkspaceDefinition;
+}>;
+
+export declare const red: (x: string) => string;
+
+export interface ReferenceResolver {
+ (ref: string, context?: ContextT): {
+ context?: ContextT;
+ schema?: JsonObject;
+ };
+}
+
+export interface RefValidatorError extends SchemaValidatorErrorBase {
+ keyword: '$ref';
+ params: {
+ ref: string;
+ };
+}
+
+export declare function relative(from: Path, to: Path): Path;
+
+export declare type ReplacementFunction = (path: Path) => Path;
+
+export interface RequiredValidatorError extends SchemaValidatorErrorBase {
+ keyword: 'required';
+ params: {
+ missingProperty: string;
+ };
+}
+
+export declare const reset: (x: string) => string;
+
+export declare function resetNormalizeCache(): void;
+
+export declare function resolve(p1: Path, p2: Path): Path;
+
+export declare abstract class ResolverHost implements Host {
+ protected _delegate: Host;
+ readonly capabilities: HostCapabilities;
+ constructor(_delegate: Host);
+ protected abstract _resolve(path: Path): Path;
+ delete(path: Path): Observable;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ rename(from: Path, to: Path): Observable;
+ stat(path: Path): Observable | null> | null;
+ watch(path: Path, options?: HostWatchOptions): Observable | null;
+ write(path: Path, content: FileBuffer): Observable;
+}
+
+export declare class SafeReadonlyHost implements ReadonlyHost {
+ readonly capabilities: HostCapabilities;
+ constructor(_delegate: ReadonlyHost);
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ stat(path: Path): Observable | null> | null;
+}
+
+export interface SchemaFormat {
+ formatter: SchemaFormatter;
+ name: string;
+}
+
+export interface SchemaFormatter {
+ readonly async: boolean;
+ validate(data: any): boolean | Observable;
+}
+
+export interface SchemaKeywordValidator {
+ (data: JsonValue, schema: JsonValue, parent: JsonObject | JsonArray | undefined, parentProperty: string | number | undefined, pointer: JsonPointer, rootData: JsonValue): boolean | Observable;
+}
+
+export interface SchemaRegistry {
+ addFormat(format: SchemaFormat): void;
+ addPostTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
+ addPreTransform(visitor: JsonVisitor, deps?: JsonVisitor[]): void;
+ addSmartDefaultProvider(source: string, provider: SmartDefaultProvider): void;
+ compile(schema: Object): Observable;
+ flatten(schema: JsonObject | string): Observable;
+ usePromptProvider(provider: PromptProvider): void;
+}
+
+export declare class SchemaValidationException extends BaseException {
+ readonly errors: SchemaValidatorError[];
+ constructor(errors?: SchemaValidatorError[], baseMessage?: string);
+ static createMessages(errors?: SchemaValidatorError[]): string[];
+}
+
+export interface SchemaValidator {
+ (data: JsonValue, options?: SchemaValidatorOptions): Observable;
+}
+
+export declare type SchemaValidatorError = RefValidatorError | LimitValidatorError | AdditionalPropertiesValidatorError | FormatValidatorError | RequiredValidatorError;
+
+export interface SchemaValidatorErrorBase {
+ data?: JsonValue;
+ dataPath: string;
+ keyword: string;
+ message?: string;
+}
+
+export interface SchemaValidatorOptions {
+ applyPostTransforms?: boolean;
+ applyPreTransforms?: boolean;
+ withPrompts?: boolean;
+}
+
+export interface SchemaValidatorResult {
+ data: JsonValue;
+ errors?: SchemaValidatorError[];
+ success: boolean;
+}
+
+export declare class ScopedHost extends ResolverHost {
+ protected _root: Path;
+ constructor(delegate: Host, _root?: Path);
+ protected _resolve(path: Path): Path;
+}
+
+export interface ScreenviewOptions extends CustomDimensionsAndMetricsOptions {
+ appId?: string;
+ appInstallerId?: string;
+ appVersion?: string;
+}
+
+export declare class SimpleMemoryHost implements Host<{}> {
+ protected _cache: Map>;
+ readonly capabilities: HostCapabilities;
+ constructor();
+ protected _delete(path: Path): void;
+ protected _exists(path: Path): boolean;
+ protected _isDirectory(path: Path): boolean;
+ protected _isFile(path: Path): boolean;
+ protected _list(path: Path): PathFragment[];
+ protected _newDirStats(): {
+ inspect(): string;
+ isFile(): boolean;
+ isDirectory(): boolean;
+ size: number;
+ atime: Date;
+ ctime: Date;
+ mtime: Date;
+ birthtime: Date;
+ content: null;
+ };
+ protected _newFileStats(content: FileBuffer, oldStats?: Stats): {
+ inspect(): string;
+ isFile(): boolean;
+ isDirectory(): boolean;
+ size: number;
+ atime: Date;
+ ctime: Date;
+ mtime: Date;
+ birthtime: Date;
+ content: ArrayBuffer;
+ };
+ protected _read(path: Path): FileBuffer;
+ protected _rename(from: Path, to: Path): void;
+ protected _stat(path: Path): Stats | null;
+ protected _toAbsolute(path: Path): Path;
+ protected _updateWatchers(path: Path, type: HostWatchEventType): void;
+ protected _watch(path: Path, options?: HostWatchOptions): Observable;
+ protected _write(path: Path, content: FileBuffer): void;
+ delete(path: Path): Observable;
+ exists(path: Path): Observable;
+ isDirectory(path: Path): Observable;
+ isFile(path: Path): Observable;
+ list(path: Path): Observable;
+ read(path: Path): Observable;
+ rename(from: Path, to: Path): Observable;
+ stat(path: Path): Observable | null> | null;
+ watch(path: Path, options?: HostWatchOptions): Observable | null;
+ write(path: Path, content: FileBuffer): Observable;
+}
+
+export interface SimpleMemoryHostStats {
+ readonly content: FileBuffer | null;
+}
+
+export interface SmartDefaultProvider {
+ (schema: JsonObject): T | Observable;
+}
+
+export declare function split(path: Path): PathFragment[];
+
+export declare type Stats = T & {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ readonly size: number;
+ readonly atime: Date;
+ readonly mtime: Date;
+ readonly ctime: Date;
+ readonly birthtime: Date;
+};
+
+export declare const strikethrough: (x: string) => string;
+
+export declare function stringToFileBuffer(str: string): FileBuffer;
+
+export declare function stripIndent(strings: TemplateStringsArray, ...values: any[]): string;
+
+export declare function stripIndents(strings: TemplateStringsArray, ...values: any[]): string;
+
+export declare class SyncDelegateHost {
+ protected _delegate: Host;
+ readonly capabilities: HostCapabilities;
+ readonly delegate: Host;
+ constructor(_delegate: Host);
+ protected _doSyncCall(observable: Observable): ResultT;
+ delete(path: Path): void;
+ exists(path: Path): boolean;
+ isDirectory(path: Path): boolean;
+ isFile(path: Path): boolean;
+ list(path: Path): PathFragment[];
+ read(path: Path): FileBuffer;
+ rename(from: Path, to: Path): void;
+ stat(path: Path): Stats | null;
+ watch(path: Path, options?: HostWatchOptions): Observable | null;
+ write(path: Path, content: FileBufferLike): void;
+}
+
+export declare class SynchronousDelegateExpectedException extends BaseException {
+ constructor();
+}
+
+export interface TargetDefinition {
+ builder: string;
+ configurations?: Record | undefined>;
+ options?: Record;
+}
+
+export declare class TargetDefinitionCollection extends DefinitionCollection {
+ constructor(initial?: Record, listener?: DefinitionCollectionListener