mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(devtools): bring the angular devtools directory into the root bazel workspace
Previously devtools used a nested workspace for its bazel configurations. This meant framework dependencies were consumed via npm. Now devtools is part of the root bazel directory that all other files in this codebase fall under. This allows us to build devtools using local angular packages, removing the need to consume these dependencies with npn. This is useful because we no longer have to update these dependencies with an automated tool like renovate, and our CI tests will always run against the most up to date framework packages.
This commit is contained in:
@@ -8,7 +8,6 @@ dist
|
||||
aio/content
|
||||
aio/node_modules
|
||||
aio/tools/examples/shared/node_modules
|
||||
devtools/node_modules
|
||||
packages/bazel/node_modules
|
||||
|
||||
# All integration test node_modules folders
|
||||
|
||||
@@ -277,6 +277,7 @@ jobs:
|
||||
paths:
|
||||
- ./ng
|
||||
- ./bazel_repository_cache
|
||||
- .cache/Cypress
|
||||
|
||||
lint:
|
||||
executor: default-executor
|
||||
@@ -312,7 +313,7 @@ jobs:
|
||||
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
||||
# not be able to easily find the output bin directory when uploading artifacts for size
|
||||
# measurements.
|
||||
command: yarn test --symlink_prefix=dist/ -- //...
|
||||
command: yarn test:ci
|
||||
no_output_timeout: 20m
|
||||
# Publish bundle artifacts which will be used to calculate the size change. **Note**: Make
|
||||
# sure that the size plugin from the Angular robot fetches the artifacts from this CircleCI
|
||||
@@ -738,18 +739,15 @@ jobs:
|
||||
steps:
|
||||
- custom_attach_workspace
|
||||
- init_environment
|
||||
- run:
|
||||
name: Install DevTools dependencies
|
||||
command: yarn --cwd devtools install --frozen-lockfile --non-interactive --cache-folder ~/.cache/yarn
|
||||
- run:
|
||||
name: Run unit tests
|
||||
command: yarn --cwd devtools test:ci
|
||||
command: yarn devtools:test
|
||||
- run:
|
||||
name: Test production build
|
||||
command: yarn --cwd devtools build:chrome:ci
|
||||
command: yarn devtools:build:chrome
|
||||
- run:
|
||||
name: Run e2e tests
|
||||
command: yarn --cwd devtools cy:ci
|
||||
command: yarn devtools:e2e
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
@@ -79,7 +79,17 @@ cldr_data_repository(
|
||||
},
|
||||
)
|
||||
|
||||
local_repository(
|
||||
name = "devtools",
|
||||
path = "devtools",
|
||||
# sass rules
|
||||
http_archive(
|
||||
name = "io_bazel_rules_sass",
|
||||
sha256 = "435efe759f1c8baffadc320ecc1830454da181fa790aa83bb4326f07e903a0f4",
|
||||
strip_prefix = "rules_sass-1.41.0",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/rules_sass/archive/1.41.0.zip",
|
||||
],
|
||||
)
|
||||
|
||||
# Setup the rules_sass toolchain
|
||||
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
||||
|
||||
sass_repositories()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# NB: sematics here are not the same as .gitignore
|
||||
# see https://github.com/bazelbuild/bazel/issues/8106
|
||||
.git
|
||||
bazel-out
|
||||
|
||||
# **/symlinked_node_modules_yarn
|
||||
node_modules
|
||||
e2e/symlinked_node_modules_yarn/node_modules
|
||||
e2e/symlinked_node_modules_npm/node_modules
|
||||
packages/angular/node_modules
|
||||
examples/angular/node_modules
|
||||
examples/user_managed_deps/node_modules
|
||||
|
||||
# **/dist
|
||||
dist
|
||||
examples/user_managed_deps/dist
|
||||
@@ -1,6 +0,0 @@
|
||||
import ../.bazelrc
|
||||
|
||||
build --flag_alias=partial_compilation=@npm//@angular/bazel/src:partial_compilation
|
||||
|
||||
build --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot"
|
||||
build --stamp
|
||||
@@ -1 +0,0 @@
|
||||
4.0.0
|
||||
@@ -1,12 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
@@ -1 +0,0 @@
|
||||
scripts-prepend-node-path=true
|
||||
@@ -11,6 +11,6 @@ ts_config(
|
||||
name = "tsconfig_spec",
|
||||
src = "tsconfig.spec.json",
|
||||
deps = [
|
||||
"//:tsconfig.json",
|
||||
"//devtools:tsconfig.json",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# Contributor Code of Conduct
|
||||
## Version 0.3b-angular
|
||||
|
||||
As contributors and maintainers of the Angular DevTools project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
|
||||
|
||||
Communication through any of Angular's channels (GitHub, Gitter, IRC, mailing lists, Google+, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
||||
|
||||
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Angular DevTools project to do the same.
|
||||
|
||||
If any member of the community violates this code of conduct, the maintainers of the Angular DevTools project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
|
||||
|
||||
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [conduct@angular.io](mailto:conduct@angular.io).
|
||||
+6
-7
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2020 Rangle.io
|
||||
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -9,14 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
# The WORKSPACE file tells Bazel that this directory is a "workspace", which is like a project root.
|
||||
# The content of this file specifies all the external dependencies Bazel needs to perform a build.
|
||||
|
||||
####################################
|
||||
# ESModule imports (and TypeScript imports) can be absolute starting with the workspace name.
|
||||
# The name of the workspace should match the npm package where we publish, so that these
|
||||
# imports also make sense when referencing the published package.
|
||||
workspace(
|
||||
name = "angular_devtools",
|
||||
managed_directories = {"@npm": ["node_modules"]},
|
||||
)
|
||||
|
||||
# These rules are built-into Bazel but we need to load them first to download more rules
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
||||
|
||||
bazel_skylib_workspace()
|
||||
|
||||
# Fetch rules_nodejs so we can install our npm dependencies
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
|
||||
)
|
||||
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
|
||||
|
||||
# Setup the Node.js toolchain
|
||||
node_repositories(
|
||||
node_version = "14.16.1",
|
||||
package_json = ["//:package.json"],
|
||||
)
|
||||
|
||||
# sass rules
|
||||
http_archive(
|
||||
name = "io_bazel_rules_sass",
|
||||
sha256 = "435efe759f1c8baffadc320ecc1830454da181fa790aa83bb4326f07e903a0f4",
|
||||
strip_prefix = "rules_sass-1.41.0",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/rules_sass/archive/1.41.0.zip",
|
||||
],
|
||||
)
|
||||
|
||||
# Setup the Node.js toolchain & install our npm dependencies into @npm
|
||||
yarn_install(
|
||||
name = "npm",
|
||||
package_json = "//:package.json",
|
||||
yarn_lock = "//:yarn.lock",
|
||||
)
|
||||
|
||||
# Load karma_web_test dependencies
|
||||
http_archive(
|
||||
name = "io_bazel_rules_webtesting",
|
||||
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
|
||||
urls = ["https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz"],
|
||||
)
|
||||
|
||||
# Setup the rules_webtesting toolchain
|
||||
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
||||
|
||||
web_test_repositories()
|
||||
|
||||
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
|
||||
|
||||
browser_repositories(
|
||||
chromium = True,
|
||||
firefox = True,
|
||||
)
|
||||
|
||||
# Setup the rules_sass toolchain
|
||||
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
||||
|
||||
sass_repositories()
|
||||
|
||||
# Setup esbuild repositories
|
||||
load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
|
||||
|
||||
esbuild_repositories()
|
||||
|
||||
# Setup repositories for browsers provided by the shared dev-infra package.
|
||||
load(
|
||||
"@npm//@angular/dev-infra-private/bazel/browsers:browser_repositories.bzl",
|
||||
_dev_infra_browser_repositories = "browser_repositories",
|
||||
)
|
||||
|
||||
_dev_infra_browser_repositories()
|
||||
|
||||
load("@build_bazel_rules_nodejs//toolchains/cypress:cypress_repositories.bzl", "cypress_repositories")
|
||||
|
||||
# The name you pass here names the external repository you can load cypress_web_test from
|
||||
cypress_repositories(
|
||||
name = "cypress",
|
||||
version = "8.7.0",
|
||||
)
|
||||
@@ -1,509 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"shell-dev": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "ngx-build-plus:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/shell-dev",
|
||||
"index": "src/_index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"vendorChunk": false,
|
||||
"aot": true,
|
||||
"assets": ["src/assets"],
|
||||
"styles": ["src/styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["node_modules"]
|
||||
},
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": {
|
||||
"scripts": true,
|
||||
"styles": {
|
||||
"minify": true,
|
||||
"inlineCritical": false
|
||||
},
|
||||
"fonts": {
|
||||
"inline": false
|
||||
}
|
||||
},
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "10kb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"e2e": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.e2e.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "ngx-build-plus:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "shell-dev:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "shell-dev:build:production"
|
||||
},
|
||||
"e2e": {
|
||||
"browserTarget": "shell-dev:build:e2e"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "shell-dev:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": ["src/assets"],
|
||||
"styles": ["src/styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["node_modules"]
|
||||
},
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "shell-dev:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "shell-dev:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"shell-chrome": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "projects/shell-chrome",
|
||||
"sourceRoot": "projects/shell-chrome/src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "ngx-build-plus:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/shell-chrome",
|
||||
"index": "projects/shell-chrome/src/index.html",
|
||||
"main": "projects/shell-chrome/src/main.ts",
|
||||
"polyfills": "projects/shell-chrome/src/polyfills.ts",
|
||||
"tsConfig": "projects/shell-chrome/tsconfig.app.json",
|
||||
"vendorChunk": false,
|
||||
"aot": true,
|
||||
"assets": [
|
||||
"projects/shell-chrome/src/assets",
|
||||
"projects/shell-chrome/src/manifest.json",
|
||||
"projects/shell-chrome/src/devtools.html",
|
||||
"projects/shell-chrome/src/popups"
|
||||
],
|
||||
"styles": ["projects/shell-chrome/src/styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["node_modules"]
|
||||
},
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "projects/shell-chrome/src/environments/environment.ts",
|
||||
"with": "projects/shell-chrome/src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": {
|
||||
"scripts": true,
|
||||
"styles": {
|
||||
"minify": true,
|
||||
"inlineCritical": false
|
||||
},
|
||||
"fonts": {
|
||||
"inline": false
|
||||
}
|
||||
},
|
||||
"outputHashing": "none",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "ngx-build-plus:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "shell-chrome:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "shell-chrome:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "shell-chrome:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "ngx-build-plus:karma",
|
||||
"options": {
|
||||
"main": "projects/shell-chrome/src/test.ts",
|
||||
"polyfills": "projects/shell-chrome/src/polyfills.ts",
|
||||
"tsConfig": "projects/shell-chrome/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/shell-chrome/karma.conf.js",
|
||||
"assets": ["projects/shell-chrome/src/assets"],
|
||||
"styles": ["projects/shell-chrome/src/styles.scss"],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["node_modules"]
|
||||
},
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"projects/shell-chrome/tsconfig.app.json",
|
||||
"projects/shell-chrome/tsconfig.spec.json",
|
||||
"projects/shell-chrome/e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "projects/shell-chrome/e2e/protractor.conf.js",
|
||||
"devServerTarget": "shell-chrome:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "shell-chrome:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ng-devtools": {
|
||||
"projectType": "library",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "projects/ng-devtools",
|
||||
"sourceRoot": "projects/ng-devtools/src",
|
||||
"prefix": "lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"options": {
|
||||
"tsConfig": "projects/ng-devtools/tsconfig.lib.json",
|
||||
"project": "projects/ng-devtools/ng-package.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/ng-devtools/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "projects/ng-devtools/src/test.ts",
|
||||
"tsConfig": "projects/ng-devtools/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/ng-devtools/karma.conf.js",
|
||||
"codeCoverage": true,
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["node_modules"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": ["projects/ng-devtools/tsconfig.lib.json", "projects/ng-devtools/tsconfig.spec.json"],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ng-devtools-backend": {
|
||||
"projectType": "library",
|
||||
"root": "projects/ng-devtools-backend",
|
||||
"sourceRoot": "projects/ng-devtools-backend/src",
|
||||
"prefix": "lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"options": {
|
||||
"tsConfig": "projects/ng-devtools-backend/tsconfig.lib.json",
|
||||
"project": "projects/ng-devtools-backend/ng-package.json"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "projects/ng-devtools-backend/src/test.ts",
|
||||
"tsConfig": "projects/ng-devtools-backend/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/ng-devtools-backend/karma.conf.js",
|
||||
"codeCoverage": true
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"projects/ng-devtools-backend/tsconfig.lib.json",
|
||||
"projects/ng-devtools-backend/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"protocol": {
|
||||
"projectType": "library",
|
||||
"root": "projects/protocol",
|
||||
"sourceRoot": "projects/protocol/src",
|
||||
"prefix": "lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"options": {
|
||||
"tsConfig": "projects/protocol/tsconfig.lib.json",
|
||||
"project": "projects/protocol/ng-package.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/protocol/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "projects/protocol/src/test.ts",
|
||||
"tsConfig": "projects/protocol/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/protocol/karma.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": ["projects/protocol/tsconfig.lib.json", "projects/protocol/tsconfig.spec.json"],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"shared-utils": {
|
||||
"projectType": "library",
|
||||
"root": "projects/shared-utils",
|
||||
"sourceRoot": "projects/shared-utils/src",
|
||||
"prefix": "lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||
"options": {
|
||||
"tsConfig": "projects/shared-utils/tsconfig.lib.json",
|
||||
"project": "projects/shared-utils/ng-package.json"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "projects/shared-utils/src/test.ts",
|
||||
"tsConfig": "projects/shared-utils/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/shared-utils/karma.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": ["projects/shared-utils/tsconfig.lib.json", "projects/shared-utils/tsconfig.spec.json"],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"demo-no-zone": {
|
||||
"projectType": "application",
|
||||
"schematics": {},
|
||||
"root": "projects/demo-no-zone",
|
||||
"sourceRoot": "projects/demo-no-zone/src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/demo-no-zone",
|
||||
"index": "projects/demo-no-zone/src/_index.html",
|
||||
"main": "projects/demo-no-zone/src/main.ts",
|
||||
"polyfills": "projects/demo-no-zone/src/polyfills.ts",
|
||||
"tsConfig": "projects/demo-no-zone/tsconfig.app.json",
|
||||
"assets": ["projects/demo-no-zone/src/assets"],
|
||||
"styles": ["projects/demo-no-zone/src/styles.css"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "projects/demo-no-zone/src/environments/environment.ts",
|
||||
"with": "projects/demo-no-zone/src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "demo-no-zone:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "demo-no-zone:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "demo-no-zone:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "projects/demo-no-zone/src/test.ts",
|
||||
"polyfills": "projects/demo-no-zone/src/polyfills.ts",
|
||||
"tsConfig": "projects/demo-no-zone/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/demo-no-zone/karma.conf.js",
|
||||
"assets": ["projects/demo-no-zone/src/assets"],
|
||||
"styles": ["projects/demo-no-zone/src/styles.css"],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"projects/demo-no-zone/tsconfig.app.json",
|
||||
"projects/demo-no-zone/tsconfig.spec.json",
|
||||
"projects/demo-no-zone/e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "projects/demo-no-zone/e2e/protractor.conf.js",
|
||||
"devServerTarget": "demo-no-zone:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "demo-no-zone:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "shell-dev",
|
||||
"cli": {
|
||||
"analytics": "75d6cb59-b4f8-48d8-8eaa-ccb9d55ea19a"
|
||||
}
|
||||
}
|
||||
+12
-1
@@ -1,4 +1,15 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:4200",
|
||||
"video": false
|
||||
"video": false,
|
||||
"chromeWebSecurity": false,
|
||||
"downloadsFolder": "devtools/cypress/downloads",
|
||||
"fileServerFolder": "devtools",
|
||||
"fixturesFolder": "devtools/cypress/fixtures",
|
||||
"ignoreTestFiles": "devtools/*.hot-update.js",
|
||||
"integrationFolder": "devtools/cypress/integration",
|
||||
"pluginsFile": "devtools/cypress/plugins/index.js",
|
||||
"screenshotsFolder": "devtools/cypress/screenshots",
|
||||
"supportFile": "devtools/cypress/support/index.js",
|
||||
"testFiles": "**/*.*",
|
||||
"videosFolder": "devtools/cypress/videos"
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const {SpecReporter} = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: ['./src/**/*.e2e-spec.ts'],
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {},
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json'),
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
|
||||
},
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, logging} from 'protractor';
|
||||
|
||||
import {AppPage} from './app.po';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('angular-devtools app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, by, element} from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo(): Promise<any> {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText(): Promise<string> {
|
||||
return element(by.css('app-root .content span')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/angular-devtools'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
@@ -1,114 +0,0 @@
|
||||
{
|
||||
"name": "angular-devtools",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"postinstall": "node_modules/.bin/ngcc --async --properties fesm2015",
|
||||
"ng": "ng",
|
||||
"cypress:verify": "cypress verify",
|
||||
"start": "ibazel run src:devserver",
|
||||
"start-no-animations": "bazelisk run src:devserver-e2e",
|
||||
"build:chrome": "bazelisk build projects/shell-chrome/src:prodapp",
|
||||
"build:chrome:watch": "ibazel build projects/shell-chrome/src:prodapp",
|
||||
"release": "node projects/shell-chrome/set-version.js && build:chrome",
|
||||
"test": "bazelisk test //...",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"lint:fix": "tslint -p tsconfig.json -c tslint.json --fix",
|
||||
"e2e": "yarn cy:run",
|
||||
"cy:verify": "$(yarn bin)/cypress verify",
|
||||
"cy:version": "$(yarn bin)/cypress version",
|
||||
"cy:run": "yarn cypress run",
|
||||
"cy:open": "yarn cypress open",
|
||||
"cy:watch": "start-server-and-test start http-get://localhost:4200 cy:open",
|
||||
"start:ci": "bazelisk run src:devserver",
|
||||
"cy:ci": "start-server-and-test start:ci http-get://localhost:4200 cy:run",
|
||||
"test:ci": "bazelisk test //...",
|
||||
"build:chrome:ci": "bazelisk build projects/shell-chrome/src:prodapp"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "github:angular/animations-builds#e814a6149fd654e265a465837f17bdebdc976a9d",
|
||||
"@angular/cdk": "~13.0.1",
|
||||
"@angular/common": "github:angular/common-builds#f1e665ee23545ee54adf517450083125aea33357",
|
||||
"@angular/compiler": "github:angular/compiler-builds#11a9d99b5540a189c393686b078b0ef4692573cf",
|
||||
"@angular/core": "github:angular/core-builds#7cda5ccc3ab33ca2230b67b38a0cea0d43035531",
|
||||
"@angular/forms": "github:angular/forms-builds#380d3f7831ae2b40390dbc2ed0f457740e3b310f",
|
||||
"@angular/material": "~13.0.1",
|
||||
"@angular/platform-browser": "github:angular/platform-browser-builds#7f38db5e7693cd7a1e76c0f21978eb44b89b799f",
|
||||
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#9e478221d7065200684a1eece31b99d287674da8",
|
||||
"@angular/platform-server": "13.0.1",
|
||||
"@babel/cli": "^7.16.0",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@types/node": "^16.7.1",
|
||||
"d3": "^5.7.0",
|
||||
"memo-decorator": "^2.0.1",
|
||||
"ngx-flamegraph": "0.0.10",
|
||||
"puppeteer": "^10.2.0",
|
||||
"rxjs": "~6.6.0",
|
||||
"semver-dsl": "^1.0.1",
|
||||
"tslib": "^2.3.0",
|
||||
"webtreemap": "^2.0.1",
|
||||
"zone.js": "~0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "github:angular/angular-devkit-build-angular-builds#7c4c781be8e3666f14360d3fe5dac0d35a851227",
|
||||
"@angular-devkit/build-ng-packagr": "~0.1002.0",
|
||||
"@angular/bazel": "13.0.1",
|
||||
"@angular/cli": "github:angular/cli-builds#858ee211470523d39a9ff16b57b676be740f77cc",
|
||||
"@angular/compiler-cli": "github:angular/compiler-cli-builds#89c6b3464f3f46a9f46334825bbff3d784af4136",
|
||||
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#c55a3937d45945489714273bfbbe9b803ceff89e",
|
||||
"@angular/elements": "github:angular/elements-builds#55c36f9d5381ffc06649a03bff3c2934b18ddd02",
|
||||
"@angular/language-service": "github:angular/language-service-builds#e16ca91c029934dde01557efcf860e2465629655",
|
||||
"@angular/localize": "13.0.1",
|
||||
"@angular/router": "github:angular/router-builds#5485647d9f68a01041285dfa0b92d841d7fa8c0f",
|
||||
"@bazel/angular": "^4.4.2",
|
||||
"@bazel/bazelisk": "^1.7.5",
|
||||
"@bazel/buildifier": "4.2.3",
|
||||
"@bazel/concatjs": "4.3.0",
|
||||
"@bazel/cypress": "^4.4.5",
|
||||
"@bazel/esbuild": "^4.4.2",
|
||||
"@bazel/ibazel": "^0.15.10",
|
||||
"@bazel/rollup": "^4.4.2",
|
||||
"@bazel/terser": "^4.4.2",
|
||||
"@bazel/typescript": "~4.4.2",
|
||||
"@rollup/plugin-commonjs": "^14.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@types/chrome": "^0.0.159",
|
||||
"@types/clone-deep": "^4.0.1",
|
||||
"@types/filesystem": "^0.0.32",
|
||||
"@types/jasmine": "~3.9.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/resize-observer-browser": "^0.1.5",
|
||||
"@types/semver": "^7.1.0",
|
||||
"codelyzer": "^6.0.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"cypress": "8.7.0",
|
||||
"cypress-iframe": "^1.0.1",
|
||||
"document-register-element": "^1.7.2",
|
||||
"history-server": "^1.3.1",
|
||||
"html-insert-assets": "^0.14.2",
|
||||
"jasmine-core": "~3.10.0",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"karma": "~4.1.0",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-firefox-launcher": "1.1.0",
|
||||
"karma-jasmine": "2.0.1",
|
||||
"karma-junit-reporter": "2.0.1",
|
||||
"karma-requirejs": "1.1.0",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"ng-packagr": "^12.0.0",
|
||||
"ngx-build-plus": "^11.0.0",
|
||||
"protractor": "~7.0.0",
|
||||
"requirejs": "2.3.6",
|
||||
"rollup": "2.44.0",
|
||||
"rollup-plugin-amd": "4.0.0",
|
||||
"start-server-and-test": "^1.10.11",
|
||||
"todomvc-app-css": "^2.3.0",
|
||||
"todomvc-common": "^1.0.5",
|
||||
"ts-node": "~10.3.0",
|
||||
"tsickle": "0.40.0",
|
||||
"tslint": "~5.20.0",
|
||||
"typescript": "~4.4.3",
|
||||
"wait-on": "^6.0.0",
|
||||
"webpack": "5.59.1"
|
||||
}
|
||||
}
|
||||
+39
-1
@@ -1,5 +1,43 @@
|
||||
_CDK_ENTRY_POINTS = [
|
||||
"scrolling",
|
||||
"tree",
|
||||
"keycodes",
|
||||
"collections",
|
||||
"overlay",
|
||||
"table",
|
||||
"text-field",
|
||||
"accordion",
|
||||
"drag-drop",
|
||||
"a11y",
|
||||
"platform",
|
||||
]
|
||||
|
||||
_MATERIAL_ENTRY_POINTS = [
|
||||
"dialog",
|
||||
"menu",
|
||||
"slide-toggle",
|
||||
"grid-list",
|
||||
"tree",
|
||||
"expansion",
|
||||
"checkbox",
|
||||
"select",
|
||||
"input",
|
||||
"button",
|
||||
"core",
|
||||
"progress-bar",
|
||||
"snack-bar",
|
||||
"icon",
|
||||
"progress-spinner",
|
||||
"tabs",
|
||||
"card",
|
||||
"form-field",
|
||||
"tooltip",
|
||||
"toolbar",
|
||||
]
|
||||
|
||||
ANGULAR_PACKAGES_CONFIG = [
|
||||
("@angular/platform-browser-dynamic", struct(entry_points = ["testing"])),
|
||||
("@angular/cdk", struct(entry_points = _CDK_ENTRY_POINTS)),
|
||||
("@angular/material", struct(entry_points = _MATERIAL_ENTRY_POINTS)),
|
||||
]
|
||||
|
||||
ANGULAR_PACKAGES = [
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
bazel-out
|
||||
@@ -1,9 +1 @@
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_app",
|
||||
src = "tsconfig.app.json",
|
||||
deps = ["//:tsconfig.json"],
|
||||
)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const {SpecReporter} = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: ['./src/**/*.e2e-spec.ts'],
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {},
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json'),
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
|
||||
},
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, logging} from 'protractor';
|
||||
|
||||
import {AppPage} from './app.po';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('Welcome to demo-no-zone!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, by, element} from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo(): Promise<any> {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText(): Promise<any> {
|
||||
return element(by.css('app-root h1')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: true, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/demo-no-zone'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
@@ -1,76 +1,62 @@
|
||||
load("@npm//html-insert-assets:index.bzl", "html_insert_assets")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
|
||||
load("@npm//history-server:index.bzl", "history_server")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
|
||||
load("//tools:defaults.bzl", "esbuild")
|
||||
load("//devtools/tools/dev-server:index.bzl", "dev_server")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
|
||||
_ASSETS = [
|
||||
":styles.css",
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
]
|
||||
|
||||
html_insert_assets(
|
||||
name = "inject_scripts_for_dev",
|
||||
outs = ["index.html"],
|
||||
args = [
|
||||
"--html=$(execpath //projects/demo-no-zone/src:_index.html)",
|
||||
"--out=$@",
|
||||
"--roots=. $(RULEDIR)",
|
||||
"--assets",
|
||||
] + ["$(execpath %s)" % s for s in _ASSETS] + [
|
||||
"--scripts --module $(execpath :bundle_es2015)/index.js",
|
||||
],
|
||||
data = [
|
||||
"//projects/demo-no-zone/src:_index.html",
|
||||
":bundle_es2015",
|
||||
] + _ASSETS,
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "src",
|
||||
srcs = ["main.ts"],
|
||||
tsconfig = "//projects/demo-no-zone:tsconfig_app",
|
||||
deps = [
|
||||
"//projects/demo-no-zone/src/app",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"//devtools/projects/demo-no-zone/src/app",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
rollup_bundle(
|
||||
name = "bundle_es2015",
|
||||
config_file = "rollup.config.js",
|
||||
entry_points = {
|
||||
":main.ts": "index",
|
||||
},
|
||||
output_dir = True,
|
||||
deps = [
|
||||
":src",
|
||||
"@npm//@rollup/plugin-commonjs",
|
||||
"@npm//@rollup/plugin-node-resolve",
|
||||
esbuild(
|
||||
name = "bundle",
|
||||
config = "//devtools/tools/esbuild:esbuild_config_esm",
|
||||
entry_points = [":main.ts"],
|
||||
platform = "browser",
|
||||
splitting = False,
|
||||
target = "es2016",
|
||||
deps = [":src"],
|
||||
)
|
||||
|
||||
exports_files([
|
||||
"index.html",
|
||||
"styles.css",
|
||||
])
|
||||
|
||||
filegroup(
|
||||
name = "dev_app_static_files",
|
||||
srcs = [
|
||||
":index.html",
|
||||
":styles.css",
|
||||
"//packages/zone.js/bundles:zone.umd.js",
|
||||
],
|
||||
)
|
||||
|
||||
pkg_web(
|
||||
name = "devapp",
|
||||
srcs = _ASSETS + [
|
||||
":bundle_es2015",
|
||||
":inject_scripts_for_dev",
|
||||
srcs = [
|
||||
":bundle",
|
||||
":dev_app_static_files",
|
||||
],
|
||||
additional_root_paths = [],
|
||||
)
|
||||
|
||||
history_server(
|
||||
dev_server(
|
||||
name = "devserver",
|
||||
data = [":devapp"],
|
||||
templated_args = [
|
||||
"-a $$(rlocation $(rootpath :devapp))",
|
||||
"--port 4200",
|
||||
srcs = [":dev_app_static_files"],
|
||||
additional_root_paths = ["angular/devtools/projects/demo-no-zone/src/devapp"],
|
||||
tags = ["manual"],
|
||||
deps = [
|
||||
":devapp",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "app",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
),
|
||||
angular_assets = ["app.component.html"],
|
||||
tsconfig = "//projects/demo-no-zone:tsconfig_app",
|
||||
deps = [
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
+4
@@ -9,5 +9,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
|
||||
|
||||
<script src="./angular/packages/zone.js/bundles/zone.umd.js"></script>
|
||||
<script type="module" src="./bundle/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags.ts';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch
|
||||
* requestAnimationFrame (window as any).__Zone_disable_on_property = true; // disable patch
|
||||
* onProperty such as onclick (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll',
|
||||
* 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
// import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const {nodeResolve} = require('@rollup/plugin-node-resolve');
|
||||
const commonjs = require('@rollup/plugin-commonjs');
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
nodeResolve({
|
||||
mainFields: ['browser', 'es2015', 'module', 'jsnext:main', 'main'],
|
||||
}),
|
||||
commonjs(),
|
||||
],
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
|
||||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/app",
|
||||
"declaration": true,
|
||||
"types": []
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["src/test.ts", "src/**/*.spec.ts"]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts", "src/polyfills.ts"],
|
||||
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
||||
}
|
||||
@@ -1,21 +1,13 @@
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_lib",
|
||||
src = "tsconfig.lib.json",
|
||||
deps = ["//:tsconfig.json"],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "ng_devtools_backend_ts",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = ":tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src",
|
||||
"//devtools/projects/ng-devtools-backend/src",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: true, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/ng-devtools-backend'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/ng-devtools-backend",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "ng-devtools-backend",
|
||||
"version": "0.0.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^13.0.0",
|
||||
"@angular/core": "^13.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "src",
|
||||
srcs = ["public-api.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib",
|
||||
"//projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:component_tree",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "lib",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
":client_event_subscribers",
|
||||
"//projects/ng-devtools-backend/src/lib/component-inspector",
|
||||
"//projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/component-inspector",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -24,31 +23,29 @@ karma_web_test_suite(
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "highlighter_test_lib",
|
||||
srcs = [
|
||||
"highlighter.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":highlighter",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "highlighter",
|
||||
srcs = ["highlighter.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "interfaces",
|
||||
srcs = ["interfaces.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -59,57 +56,52 @@ karma_web_test_suite(
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "router_tree_test_lib",
|
||||
srcs = [
|
||||
"router-tree.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":router_tree",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"@npm//@angular/router",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"//packages/router",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "router_tree",
|
||||
srcs = ["router-tree.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "set_console_reference",
|
||||
srcs = ["set-console-reference.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
":interfaces",
|
||||
"//projects/protocol",
|
||||
"//projects/shared-utils",
|
||||
"//devtools/projects/protocol",
|
||||
"//devtools/projects/shared-utils",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "utils",
|
||||
srcs = ["utils.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "version",
|
||||
srcs = ["version.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "client_event_subscribers",
|
||||
srcs = ["client-event-subscribers.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
":angular_check",
|
||||
":component_tree",
|
||||
@@ -117,23 +109,22 @@ ts_project(
|
||||
":interfaces",
|
||||
":set_console_reference",
|
||||
":utils",
|
||||
"//projects/ng-devtools-backend/src/lib/component-inspector",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/component-inspector",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "component_tree",
|
||||
srcs = ["component-tree.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
":interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/state-serializer",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -144,7 +135,7 @@ karma_web_test_suite(
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "angular_check_test_lib",
|
||||
srcs = [
|
||||
"angular-check.spec.ts",
|
||||
@@ -155,8 +146,7 @@ ts_test_project(
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "angular_check",
|
||||
srcs = ["angular-check.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
)
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "component-inspector",
|
||||
srcs = ["component-inspector.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -21,20 +20,20 @@ karma_web_test_suite(
|
||||
deps = [":test_lib"],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"component-inspector.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":component-inspector",
|
||||
"//projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib:utils",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -120,17 +120,22 @@ const getRootLViewsHelper = (element: Element, rootLViews = new Set<any>()): Set
|
||||
};
|
||||
|
||||
const getRoots = () => {
|
||||
const roots = Array.from(document.documentElement.querySelectorAll('[ng-version]'));
|
||||
const roots =
|
||||
Array.from(document.documentElement.querySelectorAll('[ng-version]')) as HTMLElement[];
|
||||
|
||||
const isTopLevel = (element: HTMLElement) => {
|
||||
let parent: HTMLElement|null = element;
|
||||
|
||||
while (parent?.parentElement) {
|
||||
parent = parent.parentElement;
|
||||
if (parent.hasAttribute('ng-version')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
return roots.filter(isTopLevel);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "directive-forest",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
exclude = ["*.spec.ts"],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib:utils",
|
||||
"//projects/ng-devtools-backend/src/lib:version",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:version",
|
||||
"@npm//semver-dsl",
|
||||
],
|
||||
)
|
||||
@@ -26,15 +25,15 @@ karma_web_test_suite(
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"render-tree.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":directive-forest",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "hooks",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
@@ -11,24 +11,22 @@ ts_project(
|
||||
"identity-tracker.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
":identity_tracker",
|
||||
"//projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/ng-devtools-backend/src/lib:utils",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks/profiler",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks/profiler",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "identity_tracker",
|
||||
srcs = ["identity-tracker.ts"],
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:component_tree",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:interfaces",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "profiler",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
exclude = ["*.spec.ts"],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib:utils",
|
||||
"//projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//projects/ng-devtools-backend/src/lib/hooks:identity_tracker",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/hooks:identity_tracker",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "state-serializer",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
exclude = ["*.spec.ts"],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools-backend:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -24,14 +23,14 @@ karma_web_test_suite(
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"state-serializer.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":state-serializer",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
|
||||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"target": "es2015",
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
"lib": ["dom", "es2018"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": false,
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts"],
|
||||
"include": ["**/*.ts", "**/*.d.ts"]
|
||||
}
|
||||
@@ -1,31 +1,23 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(["tsconfig.lib.json"])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_lib",
|
||||
src = "tsconfig.lib.json",
|
||||
deps = ["//:tsconfig.json"],
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "ng_devtools_ts",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = ":tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/animations",
|
||||
"//devtools/projects/ng-devtools/src",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/animations",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/forms",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/forms",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
"@npm//d3",
|
||||
"@npm//memo-decorator",
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: true, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/ng-devtools'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/ng-devtools",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "ng-devtools",
|
||||
"version": "0.0.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^13.0.0",
|
||||
"@angular/core": "^13.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "src",
|
||||
srcs = ["public-api.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib",
|
||||
"//projects/ng-devtools/src/lib/application-environment",
|
||||
"//projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-environment",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "devtools.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "lib",
|
||||
srcs = glob(
|
||||
include = ["*.ts"],
|
||||
@@ -18,31 +18,29 @@ ng_ts_project(
|
||||
"devtools.component.html",
|
||||
":devtools_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
":theme",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/animations",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/animations",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/forms",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/forms",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "theme",
|
||||
srcs = glob(
|
||||
include = ["theme-service.ts"],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"@npm//@angular/core",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "application-environment",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "application-operations",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -10,7 +10,7 @@ sass_binary(
|
||||
src = "devtools-tabs.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "devtools-tabs",
|
||||
srcs = [
|
||||
"devtools-tabs.component.ts",
|
||||
@@ -20,37 +20,56 @@ ng_ts_project(
|
||||
"devtools-tabs.component.html",
|
||||
":devtools_tabs_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib:theme",
|
||||
"//projects/ng-devtools/src/lib/application-environment",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/router-tree",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib:theme",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-environment",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/router-tree",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/core/src/util",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "devtools_tabs_test",
|
||||
srcs = ["devtools-tabs.spec.ts"],
|
||||
deps = [
|
||||
":devtools-tabs",
|
||||
"//projects/ng-devtools/src/lib/application-environment",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-environment",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/core/src/util",
|
||||
],
|
||||
)
|
||||
|
||||
# todo(aleksanderbodurri): fix this test suite
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
":devtools_tabs_test",
|
||||
"//packages/common/http",
|
||||
"//packages/platform-browser/animations",
|
||||
],
|
||||
)
|
||||
|
||||
# spec_bundle(
|
||||
# name = "test_bundle",
|
||||
# deps = [
|
||||
# ":devtools_tabs_test",
|
||||
# "//packages/platform-browser/animations",
|
||||
# "//packages/animations",
|
||||
# "//packages/common/http",
|
||||
# "//packages/core",
|
||||
# "//packages/core/src/util",
|
||||
# ],
|
||||
# platform = "browser",
|
||||
# )
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "diffing",
|
||||
srcs = glob(
|
||||
include = [
|
||||
"index.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"@npm//@angular/core",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
|
||||
@@ -50,7 +50,7 @@ export const diff = <T>(differ: DefaultIterableDiffer<T>, a: T[], b: T[]):
|
||||
if (record.currentIndex === null) {
|
||||
return;
|
||||
}
|
||||
a[record.currentIndex][prop] = b[record.currentIndex][prop];
|
||||
(a[record.currentIndex] as any)[prop] = (b[record.currentIndex] as any)[prop];
|
||||
});
|
||||
if (!alreadySet[record.previousIndex]) {
|
||||
// tslint:disable-next-line: no-non-null-assertion
|
||||
|
||||
+24
-21
@@ -1,7 +1,7 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -10,7 +10,7 @@ sass_binary(
|
||||
src = "directive-explorer.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "directive-explorer",
|
||||
srcs = [
|
||||
"directive-explorer.component.ts",
|
||||
@@ -20,41 +20,44 @@ ng_ts_project(
|
||||
"directive-explorer.component.html",
|
||||
":directive_explorer_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/application-operations",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab",
|
||||
"//projects/ng-devtools/src/lib/vendor/angular-split",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/angular-split",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "directive_explorer_test",
|
||||
srcs = ["directive-explorer.spec.ts"],
|
||||
deps = [
|
||||
":directive-explorer",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
# todo(aleksanderbodurri): fix this test suite
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
":directive_explorer_test",
|
||||
"//packages/common/http",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
],
|
||||
)
|
||||
|
||||
+11
-12
@@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "directive-forest.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "directive-forest",
|
||||
srcs = [
|
||||
"directive-forest.component.ts",
|
||||
@@ -19,18 +19,17 @@ ng_ts_project(
|
||||
"directive-forest.component.html",
|
||||
":directive_forest_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/filter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/filter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
+5
-6
@@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "breadcrumbs.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "breadcrumbs",
|
||||
srcs = [
|
||||
"breadcrumbs.component.ts",
|
||||
@@ -18,11 +18,10 @@ ng_ts_project(
|
||||
"breadcrumbs.component.html",
|
||||
":breadcrumbs_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
+13
-10
@@ -1,37 +1,40 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "component-data-source",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "component_data_source_test",
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":component-data-source",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@angular/cdk",
|
||||
],
|
||||
)
|
||||
|
||||
# todo(aleksanderbodurri): fix this test suite
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
":component_data_source_test",
|
||||
"//packages/common/http",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
],
|
||||
)
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ export class ComponentDataSource extends DataSource<FlatNode> {
|
||||
return {newItems, movedItems, removedItems};
|
||||
}
|
||||
|
||||
connect(collectionViewer: CollectionViewer): Observable<FlatNode[]> {
|
||||
override connect(collectionViewer: CollectionViewer): Observable<FlatNode[]> {
|
||||
const changes = [
|
||||
collectionViewer.viewChange, this._treeControl.expansionModel.changed, this._flattenedData
|
||||
];
|
||||
@@ -174,5 +174,5 @@ export class ComponentDataSource extends DataSource<FlatNode> {
|
||||
}));
|
||||
}
|
||||
|
||||
disconnect(): void {}
|
||||
override disconnect(): void {}
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "filter.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "filter",
|
||||
srcs = [
|
||||
"filter.component.ts",
|
||||
@@ -18,10 +18,9 @@ ng_ts_project(
|
||||
"filter.component.html",
|
||||
":filter_component_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
+5
-6
@@ -1,19 +1,18 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "index-forest",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@angular/material",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "index_forest_test",
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
|
||||
+14
-11
@@ -1,10 +1,10 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "property-resolver",
|
||||
srcs = [
|
||||
"arrayify-props.ts",
|
||||
@@ -14,20 +14,19 @@ ng_ts_project(
|
||||
"property-data-source.ts",
|
||||
"property-expanded-directive-properties.ts",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/diffing",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "property_resolver_test",
|
||||
srcs = [
|
||||
"arrayify-props.spec.ts",
|
||||
@@ -37,16 +36,20 @@ ts_test_project(
|
||||
],
|
||||
deps = [
|
||||
":property-resolver",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/protocol",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/material",
|
||||
],
|
||||
)
|
||||
|
||||
# todo(aleksanderbodurri): fix this test suite
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
":property_resolver_test",
|
||||
"//packages/common/http",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
"@npm//@angular/material",
|
||||
],
|
||||
)
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ export class PropertyDataSource extends DataSource<FlatNode> {
|
||||
this._data.next(this.data);
|
||||
}
|
||||
|
||||
connect(collectionViewer: CollectionViewer): Observable<FlatNode[]> {
|
||||
override connect(collectionViewer: CollectionViewer): Observable<FlatNode[]> {
|
||||
const changed = this._treeControl.expansionModel.changed;
|
||||
if (!changed) {
|
||||
throw new Error('Unable to subscribe to the expansion model change');
|
||||
@@ -76,7 +76,7 @@ export class PropertyDataSource extends DataSource<FlatNode> {
|
||||
}));
|
||||
}
|
||||
|
||||
disconnect(): void {
|
||||
override disconnect(): void {
|
||||
this._subscriptions.forEach((s) => s.unsubscribe());
|
||||
this._subscriptions = [];
|
||||
}
|
||||
|
||||
+28
-20
@@ -1,18 +1,28 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
multi_sass_binary(
|
||||
name = "property_tab_styles",
|
||||
srcs = [
|
||||
"component-metadata.component.scss",
|
||||
"property-tab.component.scss",
|
||||
"property-tab-header.component.scss",
|
||||
],
|
||||
)
|
||||
_STYLE_SRCS = [
|
||||
"component-metadata.component.scss",
|
||||
"property-tab.component.scss",
|
||||
"property-tab-header.component.scss",
|
||||
]
|
||||
|
||||
ng_ts_project(
|
||||
_STYLE_LABELS = [
|
||||
src[:-len(".component.scss")].replace("-", "_") + "_styles"
|
||||
for src in _STYLE_SRCS
|
||||
]
|
||||
|
||||
[
|
||||
sass_binary(
|
||||
name = label,
|
||||
src = src,
|
||||
)
|
||||
for label, src in zip(_STYLE_LABELS, _STYLE_SRCS)
|
||||
]
|
||||
|
||||
ng_module(
|
||||
name = "property-tab",
|
||||
srcs = [
|
||||
"component-metadata.component.ts",
|
||||
@@ -24,16 +34,14 @@ ng_ts_project(
|
||||
"property-tab.component.html",
|
||||
"property-tab-header.component.html",
|
||||
"component-metadata.component.html",
|
||||
":property_tab_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
] + _STYLE_LABELS,
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
+32
-24
@@ -1,22 +1,32 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
multi_sass_binary(
|
||||
name = "property_view_styles",
|
||||
srcs = [
|
||||
"property-editor.component.scss",
|
||||
"property-preview.component.scss",
|
||||
"property-tab-body.component.scss",
|
||||
"property-view.component.scss",
|
||||
"property-view-body.component.scss",
|
||||
"property-view-header.component.scss",
|
||||
"property-view-tree.component.scss",
|
||||
],
|
||||
)
|
||||
_STYLE_SRCS = [
|
||||
"property-editor.component.scss",
|
||||
"property-preview.component.scss",
|
||||
"property-tab-body.component.scss",
|
||||
"property-view.component.scss",
|
||||
"property-view-body.component.scss",
|
||||
"property-view-header.component.scss",
|
||||
"property-view-tree.component.scss",
|
||||
]
|
||||
|
||||
ng_ts_project(
|
||||
_STYLE_LABELS = [
|
||||
src[:-len(".component.scss")].replace("-", "_") + "_styles"
|
||||
for src in _STYLE_SRCS
|
||||
]
|
||||
|
||||
[
|
||||
sass_binary(
|
||||
name = label,
|
||||
src = src,
|
||||
)
|
||||
for label, src in zip(_STYLE_LABELS, _STYLE_SRCS)
|
||||
]
|
||||
|
||||
ng_module(
|
||||
name = "property-view",
|
||||
srcs = [
|
||||
"property-editor.component.ts",
|
||||
@@ -36,17 +46,15 @@ ng_ts_project(
|
||||
"property-preview.component.html",
|
||||
"property-editor.component.html",
|
||||
"property-tab-body.component.html",
|
||||
":property_view_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
] + _STYLE_LABELS,
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/forms",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/forms",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
multi_sass_binary(
|
||||
name = "profiler-styles",
|
||||
srcs = [
|
||||
"profiler.component.scss",
|
||||
"profiler-import-dialog.component.scss",
|
||||
],
|
||||
)
|
||||
_STYLE_SRCS = [
|
||||
"profiler.component.scss",
|
||||
"profiler-import-dialog.component.scss",
|
||||
]
|
||||
|
||||
ng_ts_project(
|
||||
_STYLE_LABELS = [
|
||||
src[:-len(".component.scss")].replace("-", "_") + "_styles"
|
||||
for src in _STYLE_SRCS
|
||||
]
|
||||
|
||||
[
|
||||
sass_binary(
|
||||
name = label,
|
||||
src = src,
|
||||
)
|
||||
for label, src in zip(_STYLE_LABELS, _STYLE_SRCS)
|
||||
]
|
||||
|
||||
ng_module(
|
||||
name = "profiler",
|
||||
srcs = [
|
||||
"file-api-service.ts",
|
||||
@@ -22,16 +32,14 @@ ng_ts_project(
|
||||
angular_assets = [
|
||||
"profiler.component.html",
|
||||
"profiler-import-dialog.component.html",
|
||||
":profiler-styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
] + _STYLE_LABELS,
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline",
|
||||
"//projects/ng-devtools/src/lib/vendor/chromium",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/forms",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/chromium",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/forms",
|
||||
"@npm//@angular/material",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary", "sass_binary")
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
multi_sass_binary(
|
||||
name = "timeline_styles",
|
||||
srcs = [
|
||||
"frame-selector.component.scss",
|
||||
"recording-dialog.component.scss",
|
||||
"timeline.component.scss",
|
||||
"timeline-controls.component.scss",
|
||||
],
|
||||
)
|
||||
_STYLE_SRCS = [
|
||||
"frame-selector.component.scss",
|
||||
"recording-dialog.component.scss",
|
||||
"timeline.component.scss",
|
||||
"timeline-controls.component.scss",
|
||||
]
|
||||
|
||||
_STYLE_LABELS = [
|
||||
src[:-len(".component.scss")].replace("-", "_") + "_styles"
|
||||
for src in _STYLE_SRCS
|
||||
]
|
||||
|
||||
[
|
||||
sass_binary(
|
||||
name = label,
|
||||
src = src,
|
||||
)
|
||||
for label, src in zip(_STYLE_LABELS, _STYLE_SRCS)
|
||||
]
|
||||
|
||||
sass_binary(
|
||||
name = "recording_modal_styles",
|
||||
@@ -21,7 +31,7 @@ sass_binary(
|
||||
include_paths = ["node_modules"],
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "timeline",
|
||||
srcs = [
|
||||
"filter.ts",
|
||||
@@ -38,27 +48,25 @@ ng_ts_project(
|
||||
"recording-modal.component.html",
|
||||
"recording-dialog.component.html",
|
||||
"frame-selector.component.html",
|
||||
":timeline_styles",
|
||||
":recording_modal_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
] + _STYLE_LABELS,
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/recording-visualizer",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/visualization-mode",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/recording-visualizer",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/visualization-mode",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/forms",
|
||||
"@npm//@angular/cdk",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/forms",
|
||||
"@npm//@angular/material",
|
||||
"@npm//ngx-flamegraph",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"filter.spec.ts",
|
||||
@@ -69,9 +77,13 @@ ts_test_project(
|
||||
],
|
||||
)
|
||||
|
||||
# todo(aleksanderbodurri): fix this test suite
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
":test_lib",
|
||||
"//packages/common/http",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
],
|
||||
)
|
||||
|
||||
+12
-14
@@ -1,9 +1,9 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "record-formatter",
|
||||
srcs = glob(
|
||||
include = [
|
||||
@@ -15,29 +15,27 @@ ts_project(
|
||||
"frame-merger.spec.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "record_formatter_spec_constants",
|
||||
srcs = ["record-formatter-spec-constants.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"frame-merger.spec.ts",
|
||||
@@ -46,8 +44,8 @@ ts_test_project(
|
||||
deps = [
|
||||
":record-formatter",
|
||||
":record_formatter_spec_constants",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+7
-8
@@ -1,21 +1,20 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "bargraph-formatter",
|
||||
srcs = glob(
|
||||
include = [
|
||||
"*.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib:theme",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/ng-devtools/src/lib/vendor/memo-decorator",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib:theme",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/memo-decorator",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//ngx-flamegraph",
|
||||
"@npm//rxjs",
|
||||
|
||||
+12
-13
@@ -1,10 +1,10 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//tools:typescript.bzl", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("//devtools/tools:typescript.bzl", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "flamegraph-formatter",
|
||||
srcs = glob(
|
||||
include = [
|
||||
@@ -12,28 +12,27 @@ ng_ts_project(
|
||||
],
|
||||
exclude = ["flamegraph-formatter.spec.ts"],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib:theme",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib:theme",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//memo-decorator",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"flamegraph-formatter.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":flamegraph-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter:record_formatter_spec_constants",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter:record_formatter_spec_constants",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+10
-11
@@ -1,9 +1,9 @@
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "tree-map-formatter",
|
||||
srcs = glob(
|
||||
include = [
|
||||
@@ -13,24 +13,23 @@ ts_project(
|
||||
"tree-map-formatter.spec.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/ng-devtools/src/lib/vendor/memo-decorator",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/memo-decorator",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
ts_test_library(
|
||||
name = "test_lib",
|
||||
srcs = [
|
||||
"tree-map-formatter.spec.ts",
|
||||
],
|
||||
deps = [
|
||||
":tree-map-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter:record_formatter_spec_constants",
|
||||
"//projects/protocol",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter:record_formatter_spec_constants",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+36
-28
@@ -1,21 +1,31 @@
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary")
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
multi_sass_binary(
|
||||
name = "recording_visualizer_styles",
|
||||
srcs = [
|
||||
"bar-chart.component.scss",
|
||||
"bargraph-visualizer.component.scss",
|
||||
"execution-details.component.scss",
|
||||
"flamegraph-visualizer.component.scss",
|
||||
"timeline-visualizer.component.scss",
|
||||
"tree-map-visualizer.component.scss",
|
||||
],
|
||||
)
|
||||
_STYLE_SRCS = [
|
||||
"bar-chart.component.scss",
|
||||
"bargraph-visualizer.component.scss",
|
||||
"execution-details.component.scss",
|
||||
"flamegraph-visualizer.component.scss",
|
||||
"timeline-visualizer.component.scss",
|
||||
"tree-map-visualizer.component.scss",
|
||||
]
|
||||
|
||||
ng_ts_project(
|
||||
_STYLE_LABELS = [
|
||||
src[:-len(".component.scss")].replace("-", "_") + "_styles"
|
||||
for src in _STYLE_SRCS
|
||||
]
|
||||
|
||||
[
|
||||
sass_binary(
|
||||
name = label,
|
||||
src = src,
|
||||
)
|
||||
for label, src in zip(_STYLE_LABELS, _STYLE_SRCS)
|
||||
]
|
||||
|
||||
ng_module(
|
||||
name = "recording-visualizer",
|
||||
srcs = [
|
||||
"bar-chart.component.ts",
|
||||
@@ -34,21 +44,19 @@ ng_ts_project(
|
||||
"bargraph-visualizer.component.html",
|
||||
"bar-chart.component.html",
|
||||
"execution-details.component.html",
|
||||
":recording_visualizer_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
] + _STYLE_LABELS,
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib:theme",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/bargraph-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/tree-map-formatter",
|
||||
"//projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/visualization-mode",
|
||||
"//projects/ng-devtools/src/lib/vendor/angular-split",
|
||||
"//projects/ng-devtools/src/lib/vendor/webtreemap",
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/animations",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib:theme",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/bargraph-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/flamegraph-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/record-formatter/tree-map-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/timeline/visualization-mode",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/angular-split",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/webtreemap",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/animations",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//ngx-flamegraph",
|
||||
|
||||
+2
-3
@@ -1,9 +1,8 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "visualization-mode",
|
||||
srcs = ["index.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "router-tree.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "router-tree",
|
||||
srcs = [
|
||||
"router-tree.component.ts",
|
||||
@@ -18,11 +18,10 @@ ng_ts_project(
|
||||
":router-tree.component.html",
|
||||
":router_tree_styles",
|
||||
],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/protocol",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/protocol",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@angular/material",
|
||||
"@npm//@types",
|
||||
"@npm//d3",
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "tab-update",
|
||||
srcs = glob(
|
||||
include = [
|
||||
"index.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "angular-split",
|
||||
srcs = ["public_api.ts"],
|
||||
tsconfig = "//projects/ng-devtools:tsconfig_lib",
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/vendor/angular-split/lib",
|
||||
"//projects/ng-devtools/src/lib/vendor/angular-split/lib/component:split",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component:split",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
|
||||
+5
-14
@@ -1,27 +1,18 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
sass_binary(
|
||||
name = "split_component_styles",
|
||||
src = "//projects/ng-devtools/src/lib/vendor/angular-split/lib/component:split.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "lib",
|
||||
srcs = glob(
|
||||
include = [
|
||||
"*.ts",
|
||||
],
|
||||
),
|
||||
angular_assets = [
|
||||
":split_component_styles",
|
||||
],
|
||||
deps = [
|
||||
"//projects/ng-devtools/src/lib/vendor/angular-split/lib/component:split",
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/vendor/angular-split/lib/component:split",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//@types",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
load("//tools:angular_ts_project.bzl", "ng_ts_project")
|
||||
load("//devtools/tools:ng_module.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
@@ -8,7 +8,7 @@ sass_binary(
|
||||
src = "split.component.scss",
|
||||
)
|
||||
|
||||
ng_ts_project(
|
||||
ng_module(
|
||||
name = "split",
|
||||
srcs = [
|
||||
"interface.ts",
|
||||
@@ -21,8 +21,8 @@ ng_ts_project(
|
||||
":split_styles",
|
||||
],
|
||||
deps = [
|
||||
"@npm//@angular/common",
|
||||
"@npm//@angular/core",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
Vendored
+1
-1
@@ -217,7 +217,7 @@ export class SplitComponent implements AfterViewInit, OnDestroy {
|
||||
@Output()
|
||||
get transitionEnd(): Observable<IOutputAreaSizes> {
|
||||
return new Observable((subscriber) => (this.transitionEndSubscriber = subscriber))
|
||||
.pipe(debounceTime<IOutputAreaSizes>(20));
|
||||
.pipe(debounceTime<any>(20));
|
||||
}
|
||||
|
||||
private dragProgressSubject: Subject<IOutputData> = new Subject();
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ export function getInputPositiveNumber<T>(v: any, defaultValue: T): number|T {
|
||||
}
|
||||
|
||||
export function isUserSizesValid(unit: 'percent'|'pixel', sizes: Array<number|null>): boolean|
|
||||
undefined {
|
||||
undefined|void {
|
||||
// All sizes have to be not null and total should be 100
|
||||
if (unit === 'percent') {
|
||||
const total = sizes.reduce((total, s) => (s !== null ? total! + s : total), 0);
|
||||
@@ -106,7 +106,7 @@ export function getGutterSideAbsorptionCapacity(
|
||||
|
||||
function getAreaAbsorptionCapacity(
|
||||
unit: 'percent'|'pixel', areaSnapshot: IAreaSnapshot, pixels: number,
|
||||
allAreasSizePixel: number): IAreaAbsorptionCapacity|undefined {
|
||||
allAreasSizePixel: number): IAreaAbsorptionCapacity|undefined|void {
|
||||
// No pain no gain
|
||||
if (pixels === 0) {
|
||||
return {
|
||||
@@ -138,7 +138,7 @@ function getAreaAbsorptionCapacity(
|
||||
|
||||
function getAreaAbsorptionCapacityPercent(
|
||||
areaSnapshot: IAreaSnapshot, pixels: number,
|
||||
allAreasSizePixel: number): IAreaAbsorptionCapacity|undefined {
|
||||
allAreasSizePixel: number): IAreaAbsorptionCapacity|undefined|void {
|
||||
const tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
|
||||
const tempPercentSize = (tempPixelSize / allAreasSizePixel) * 100;
|
||||
|
||||
@@ -198,7 +198,7 @@ function getAreaAbsorptionCapacityPercent(
|
||||
|
||||
function getAreaAbsorptionCapacityPixel(
|
||||
areaSnapshot: IAreaSnapshot, pixels: number,
|
||||
containerSizePixel: number): IAreaAbsorptionCapacity|undefined {
|
||||
containerSizePixel: number): IAreaAbsorptionCapacity|undefined|void {
|
||||
const tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
|
||||
|
||||
// ENLARGE AREA
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "chromium",
|
||||
srcs = ["date-utilities.ts"],
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "memo-decorator",
|
||||
srcs = ["index.ts"],
|
||||
)
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface Config {
|
||||
function memoize(func: Function, resolver: Resolver, cache: MapLike) {
|
||||
const memoized = function() {
|
||||
const args = arguments;
|
||||
// @ts-ignore: ignore implicit any type
|
||||
const key = resolver.apply(this, args);
|
||||
const cache = memoized.cache;
|
||||
|
||||
@@ -21,6 +22,7 @@ function memoize(func: Function, resolver: Resolver, cache: MapLike) {
|
||||
return cache.get(key);
|
||||
}
|
||||
|
||||
// @ts-ignore: ignore implicit any type
|
||||
const result = func.apply(this, args);
|
||||
memoized.cache = cache.set(key, result) ?? cache;
|
||||
return result;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
load("//tools:typescript.bzl", "ts_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library")
|
||||
|
||||
package(default_visibility = ["//:__subpackages__"])
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "webtreemap",
|
||||
srcs = [
|
||||
"tree.ts",
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone';
|
||||
import 'zone.js/dist/zone-testing';
|
||||
|
||||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"target": "es2015",
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
"lib": ["dom", "es2018"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": false
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts"],
|
||||
"include": ["**/*.ts", "**/*.d.ts"]
|
||||
}
|
||||
@@ -1,29 +1,15 @@
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("//tools:typescript.bzl", "ts_project", "ts_test_project")
|
||||
load("//devtools/tools:typescript.bzl", "ts_library", "ts_test_library")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//tools:defaults.bzl", "karma_web_test_suite")
|
||||
load("//devtools/tools:defaults.bzl", "karma_web_test_suite")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files([
|
||||
"tsconfig.lib.json",
|
||||
"tsconfig.spec.json",
|
||||
"karma.conf.js",
|
||||
])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_lib",
|
||||
src = "tsconfig.lib.json",
|
||||
deps = ["//:tsconfig.json"],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig_spec",
|
||||
src = "tsconfig.spec.json",
|
||||
deps = ["//:tsconfig.json"],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
ts_library(
|
||||
name = "protocol_ts",
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
@@ -32,10 +18,22 @@ ts_project(
|
||||
"src/test.ts",
|
||||
],
|
||||
),
|
||||
tsconfig = ":tsconfig_lib",
|
||||
deps = [
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
ts_test_library(
|
||||
name = "protocol_test",
|
||||
srcs = glob(
|
||||
["**/*.spec.ts"],
|
||||
),
|
||||
deps = [
|
||||
":protocol_ts",
|
||||
"//packages/core/testing",
|
||||
"//packages/platform-browser-dynamic/testing",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
@@ -46,20 +44,9 @@ js_library(
|
||||
deps = [":protocol_ts"],
|
||||
)
|
||||
|
||||
ts_test_project(
|
||||
name = "protocol_test",
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":protocol",
|
||||
"@npm//@angular/core",
|
||||
"@npm//@angular/platform-browser-dynamic",
|
||||
"@npm//@types",
|
||||
],
|
||||
)
|
||||
|
||||
karma_web_test_suite(
|
||||
name = "test",
|
||||
deps = [
|
||||
"//projects/protocol:protocol_test",
|
||||
"//devtools/projects/protocol:protocol_test",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma'),
|
||||
],
|
||||
client: {
|
||||
clearContext: true, // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/protocol'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true,
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
singleRun: false,
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/protocol",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user