load(
"@prelude-si//:deno.bzl",
"deno_format",
"deno_test",
)
load(
"@prelude-si//:macros.bzl",
"alias",
"deno_binary",
"docker_image",
"export_file",
)
export_file(
name = "deno.json",
)
export_file(
name = "deno.lock",
)
filegroup(
name = "srcs",
srcs = glob([
"**/*",
]),
visibility = ["PUBLIC"],
)
deno_binary(
name = "si-mcp-server",
srcs = [
"main.ts",
"deno.json",
"deno.lock",
],
extra_srcs = {
"../si": "//bin/si:mcp-server-src",
},
permissions = [
"allow-all",
],
)
deno_format(
name = "fix-format",
srcs = glob(["**/*.ts"]),
ignore = ["node_modules"],
)
deno_format(
name = "check-format",
srcs = glob(["**/*.ts"]),
check = True,
)
# TODO(Paul): This tricks the build system into building the binary as its unit test
# suite which will force a lint and basic compile correctness check.
alias(
name = "test-unit",
actual = ":si-mcp-server",
)
docker_image(
name = "image",
image_name = "si-mcp-server",
flake_lock = "//:flake.lock",
build_deps = [
"//bin/si-mcp-server:si-mcp-server",
],
)