scouting: Migrate to using npm-style packages for deps

Using the npm style for tracking dependencies makes it easier to write
common modules that our existing modules can import.

I was trying to set up a shared `Pipe` class for some modules and
couldn't work around this issue:

    scouting/www/entry/entry.module.ts:10:13 - error NG3004: Unable to import class PipeModule.
      The file /dev/shm/bazel-sandbox.62240ff599163761312fdbd652f7452abc23edc253dee6214f406f29dde5568b/linux-sandbox/192/execroot/org_frc971/bazel-out/k8-fastbuild/bin/scouting/www/pipes/pipes.module.d.ts is outside of the configured 'rootDir'.

    10   exports: [PipeModule, EntryComponent],

The simplest way to work around it is by using npm modules everywhere.
This meant that I had to convert the existing fbs messages into an npm
module too.

There should be no functional changes.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I4813fd304302a8bd664443023ef21aa147b80d2e
diff --git a/scouting/webserver/requests/messages/BUILD b/scouting/webserver/requests/messages/BUILD
index d0534a51..6dee54d 100644
--- a/scouting/webserver/requests/messages/BUILD
+++ b/scouting/webserver/requests/messages/BUILD
@@ -1,3 +1,4 @@
+load("@aspect_rules_js//npm:defs.bzl", "npm_package")
 load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_go_library")
 load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
 
@@ -60,3 +61,14 @@
         visibility = ["//visibility:public"],
     ),
 ) for name in FILE_NAMES]
+
+npm_package(
+    name = "messages",
+    srcs = [
+        ":package.json",
+    ] + [
+        ":{}_ts_fbs_ts".format(lib)
+        for lib in FILE_NAMES
+    ],
+    visibility = ["//visibility:public"],
+)
diff --git a/scouting/webserver/requests/messages/package.json b/scouting/webserver/requests/messages/package.json
new file mode 100644
index 0000000..323b3c4
--- /dev/null
+++ b/scouting/webserver/requests/messages/package.json
@@ -0,0 +1,6 @@
+{
+    "name": "@org_frc971/scouting/webserver/requests/messages",
+    "private": true,
+    "dependencies": {
+    }
+}