Sandbox javascript build further

postgresql was failing to find configuration, add it to the sandbox.

When building JS, we were getting the following error:
  [!] RollupError: Node tried to load your configuration file as CommonJS
  even though it is likely an ES module. To resolve this, change the
  extension of your configuration to ".mjs", set "type": "module" in your
  package.json file or pass the "--bundleConfigAsCjs" flag.

Rename the configuration to be mjs to make it happy, and fix other leaks
found at the same time.

Change-Id: I59d8f9624b349ff5b27a6eeed8923f8d13d56744
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index bb15c2c..a41f30c 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -174,6 +174,10 @@
         entry_points = [entry_point],
         srcs = entry_deps,
         define = NG_PROD_DEFINE if production else NG_DEV_DEFINE,
+        deps = [
+            "//:node_modules/@babel/core",
+            "//:node_modules/@angular/compiler-cli",
+        ],
         format = "esm",
         output_dir = True,
         splitting = True,
@@ -301,7 +305,7 @@
     copy_file(
         name = name + "__rollup_config",
         src = "//:rollup.config.js",
-        out = name + "__rollup_config.js",
+        out = name + "__rollup_config.mjs",
     )
 
     upstream_rollup_bundle(
@@ -312,7 +316,7 @@
         ],
         node_modules = node_modules,
         sourcemap = "false",
-        config_file = ":%s__rollup_config.js" % name,
+        config_file = ":%s__rollup_config.mjs" % name,
         entry_point = entry_point,
         **kwargs
     )
@@ -387,7 +391,7 @@
 
     copy_file(
         name = name + "_config",
-        out = name + "_cypress.config.js",
+        out = name + "_cypress.config.mjs",
         src = "//tools/build_rules/js:cypress.config.js",
         visibility = ["//visibility:private"],
     )
@@ -401,7 +405,7 @@
         name = name,
         args = [
             "run",
-            "--config-file=%s_cypress.config.js" % name,
+            "--config-file=%s_cypress.config.mjs" % name,
             "--browser=" + chrome_location,
         ],
         browsers = ["@chrome_linux//:all"],