This commit is contained in:
Stuart Axelbrooke 2025-07-10 23:20:24 -07:00
parent 44638b8911
commit 4e109bed1d
10 changed files with 692 additions and 49 deletions

2
.gitignore vendored
View file

@ -7,3 +7,5 @@ examples/podcast_reviews/data
.bazelbsp
.aider*
.venv
node_modules
**/node_modules

View file

@ -127,9 +127,10 @@ use_repo(crate, "crates")
# TypeScript and Node.js dependencies for dashboard
bazel_dep(name = "aspect_rules_ts", version = "3.6.3")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
rules_ts_ext.deps(ts_version_from = "//databuild/dashboard:package.json")
use_repo(rules_ts_ext, "npm_typescript")

View file

@ -64,13 +64,25 @@ rust_library(
],
)
# OpenAPI Spec Generator binary (no dashboard dependency)
rust_binary(
name = "openapi_spec_generator",
srcs = ["service/openapi_spec_generator.rs"],
edition = "2021",
visibility = ["//visibility:public"],
deps = [
":databuild",
"@crates//:log",
"@crates//:serde_json",
"@crates//:tokio",
],
)
# Build Graph Service binary
rust_binary(
name = "build_graph_service",
srcs = ["service/main.rs"],
data = [
"//databuild/dashboard:dist",
],
data = ["//databuild/dashboard:dist"],
edition = "2021",
visibility = ["//visibility:public"],
deps = [

View file

@ -1,13 +1,13 @@
# Extract OpenAPI spec from the service binary
# Extract OpenAPI spec from the dedicated spec generator binary
genrule(
name = "extract_openapi_spec",
srcs = [],
outs = ["openapi.json"],
cmd = """
$(location //databuild:build_graph_service) --print-openapi-spec > $@
$(location //databuild:openapi_spec_generator) > $@
""",
tools = [
"//databuild:build_graph_service",
"//databuild:openapi_spec_generator",
],
visibility = ["//visibility:public"],
)

View file

@ -19,3 +19,6 @@ run:quiet --noannounce_rc
run:loud --ui_event_filters=
run:loud --show_progress
run:loud --announce_rc
# TypeScript configuration
common --@aspect_rules_ts//ts:skipLibCheck=always

View file

@ -57,3 +57,6 @@ use_repo(oci, "debian", "debian_linux_amd64", "debian_linux_arm64_v8")
# Platforms for specifying linux/arm
bazel_dep(name = "platforms", version = "0.0.11")
# TypeScript rules for handling skipLibCheck flag
bazel_dep(name = "aspect_rules_ts", version = "3.6.3")

File diff suppressed because one or more lines are too long

View file

@ -1 +1,4 @@
import ../../.bazelrc
# TypeScript configuration
common --@aspect_rules_ts//ts:skipLibCheck=always

View file

@ -50,3 +50,6 @@ use_repo(oci, "debian", "debian_linux_amd64", "debian_linux_arm64_v8")
# Platforms for specifying linux/arm
bazel_dep(name = "platforms", version = "0.0.11")
# TypeScript rules for handling skipLibCheck flag
bazel_dep(name = "aspect_rules_ts", version = "3.6.3")

File diff suppressed because one or more lines are too long