Skip to content

Commit 51055fb

Browse files
clydinalan-agius4
authored andcommitted
build: use rules_angular to build MCP find examples tool database
This commit refactors the build process for the Model Context Protocol (MCP) examples database to leverage `rules_angular`. Previously, the MCP examples database was built using a custom Bazel rule. This change transitions to using the build rules provided by rules_angular.
1 parent ec19c26 commit 51055fb

File tree

7 files changed

+6
-258
lines changed

7 files changed

+6
-258
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
"unenv": "^1.10.0",
140140
"verdaccio": "6.2.3",
141141
"verdaccio-auth-memory": "^10.0.0",
142-
"zod": "4.1.13",
143142
"zone.js": "^0.16.0"
144143
},
145144
"dependenciesMeta": {

packages/angular/cli/BUILD.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# found in the LICENSE file at https://angular.dev/license
55

66
load("@npm//:defs.bzl", "npm_link_all_packages")
7-
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
8-
load("//tools:example_db_generator.bzl", "cli_example_db")
7+
load("//tools:defaults.bzl", "jasmine_test", "ng_examples_db", "npm_package", "ts_project")
98
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
109
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1110

@@ -90,7 +89,7 @@ ts_project(
9089
],
9190
)
9291

93-
cli_example_db(
92+
ng_examples_db(
9493
name = "cli_example_database",
9594
srcs = glob(
9695
include = [

pnpm-lock.yaml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/BUILD.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,3 @@ js_binary(
3030
],
3131
entry_point = "quicktype_runner.js",
3232
)
33-
34-
js_binary(
35-
name = "ng_example_db",
36-
data = [
37-
"example_db_generator.js",
38-
"//:node_modules/zod",
39-
],
40-
entry_point = "example_db_generator.js",
41-
)

tools/defaults.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@aspect_bazel_lib//lib:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin")
22
load("@aspect_rules_jasmine//jasmine:defs.bzl", _jasmine_test = "jasmine_test")
33
load("@aspect_rules_js//js:defs.bzl", _js_binary = "js_binary")
44
load("@devinfra//bazel/ts_project:index.bzl", "strict_deps_test")
5+
load("@rules_angular//src/ng_examples_db:index.bzl", _ng_examples_db = "ng_examples_db")
56
load("@rules_angular//src/ng_package:index.bzl", _ng_package = "ng_package")
67
load("@rules_angular//src/ts_project:index.bzl", _ts_project = "ts_project")
78
load("//tools:substitutions.bzl", "substitutions")
@@ -77,3 +78,6 @@ def jasmine_test(data = [], args = [], **kwargs):
7778
data = data + ["//:node_modules/source-map-support"],
7879
**kwargs
7980
)
81+
82+
def ng_examples_db(**kwargs):
83+
_ng_examples_db(**kwargs)

tools/example_db_generator.bzl

Lines changed: 0 additions & 12 deletions
This file was deleted.

tools/example_db_generator.js

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)