load(
"@prelude-si//:deno.bzl",
"deno_compile",
"deno_format",
"deno_test",
)
load(
"@prelude-si//:macros.bzl",
"alias",
"export_file",
)
deno_compile(
name = "si-conduit",
main = "main.ts",
out = "si-conduit",
srcs = glob([
"src/**/*.ts",
"main.ts",
]),
permissions = [
"allow-env",
"allow-net",
"allow-read",
"allow-write",
],
visibility = ["PUBLIC"],
)
deno_format(
name = "fix-format",
srcs = glob(["**/*.ts"]),
ignore = ["node_modules"],
)
deno_format(
name = "check-format",
srcs = glob(["**/*.ts"]),
check = True,
)
# TODO(fnichol): this is temporary until there are tests to run. Until then, 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-conduit",
)