Paul Gschwendtner 087ab46ca9 build: update dev-infra packages and account for build-tooling split from ng-dev
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.
2022-07-27 12:35:15 +02:00

130 lines
3.3 KiB
Python

# Copyright Google Inc. 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
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
# @external_begin
load("//tools:ts_json_schema.bzl", "ts_json_schema")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
# @external_end
licenses(["notice"]) # MIT
package(default_visibility = ["//visibility:public"])
# @external_begin
ts_json_schema(
name = "builder_input_schema",
src = "src/input-schema.json",
)
ts_json_schema(
name = "builder_output_schema",
src = "src/output-schema.json",
)
ts_json_schema(
name = "builder_builders_schema",
src = "src/builders-schema.json",
)
ts_json_schema(
name = "progress_schema",
src = "src/progress-schema.json",
)
ts_json_schema(
name = "operator_schema",
src = "builders/operator-schema.json",
)
# @external_end
ts_library(
name = "architect",
package_name = "@angular-devkit/architect",
srcs = glob(
include = [
"src/**/*.ts",
"builders/*.ts",
],
exclude = ["**/*_spec.ts"],
) + [
# These files are generated from the JSON schema
"//packages/angular_devkit/architect:src/input-schema.ts",
"//packages/angular_devkit/architect:src/output-schema.ts",
"//packages/angular_devkit/architect:src/builders-schema.ts",
"//packages/angular_devkit/architect:src/progress-schema.ts",
"//packages/angular_devkit/architect:builders/operator-schema.ts",
],
# strict_checks = False,
data = glob(
include = ["**/*.json"],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
),
module_name = "@angular-devkit/architect",
module_root = "src/index.d.ts",
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"@npm//@types/node",
"@npm//rxjs",
],
)
ts_library(
name = "architect_test_lib",
testonly = True,
srcs = glob(["src/**/*_spec.ts"]),
# strict_checks = False,
deps = [
":architect",
"//packages/angular_devkit/architect/testing",
"//packages/angular_devkit/core",
"@npm//rxjs",
],
)
jasmine_node_test(
name = "architect_test",
srcs = [":architect_test_lib"],
)
# @external_begin
genrule(
name = "license",
srcs = ["//:LICENSE"],
outs = ["LICENSE"],
cmd = "cp $(execpath //:LICENSE) $@",
)
pkg_npm(
name = "npm_package",
pkg_deps = [
"//packages/angular_devkit/core:package.json",
],
deps = [
":README.md",
":architect",
":license",
"//packages/angular_devkit/architect/node",
"//packages/angular_devkit/architect/testing",
],
)
api_golden_test_npm_package(
name = "architect_api",
data = [
":npm_package",
"//goldens:public-api",
],
golden_dir = "angular_cli/goldens/public-api/angular_devkit/architect",
npm_package = "angular_cli/packages/angular_devkit/architect/npm_package",
)
# @external_end