Tweaks to @gerritcodereview/typescript-api

[publish.sh]
Ensure script exits immediately in case of failure. Useful when
chaining the invocation with another command:

 polygerrit-ui/app/api/publish.sh \
 && diff original bazel-bin/polygerrit-ui/app/api/js_plugin_api_npm_package

[tsconfig.json]
Remove trailing commas to make the file pure json.

[BUILD] (sic)
Exclude `BUILD_for_publishing_api_only` from the package files.

Release-Notes: No more include `BUILD_for_publishing_api_only` file when building npm package @gerritcodereview/typescript-api.
Change-Id: I5bf121ba502cb20172904974931e9ff548743615
diff --git a/polygerrit-ui/app/api/BUILD_for_publishing_api_only b/polygerrit-ui/app/api/BUILD_for_publishing_api_only
index 67a26cd..372e41e 100644
--- a/polygerrit-ui/app/api/BUILD_for_publishing_api_only
+++ b/polygerrit-ui/app/api/BUILD_for_publishing_api_only
@@ -43,6 +43,7 @@
         ["**/*"],
         exclude = [
             "BUILD",
+            "BUILD_for_publishing_api_only",
             "tsconfig.json",
             "publish.sh",
         ],
diff --git a/polygerrit-ui/app/api/publish.sh b/polygerrit-ui/app/api/publish.sh
index 16de4c9..adba9a0 100755
--- a/polygerrit-ui/app/api/publish.sh
+++ b/polygerrit-ui/app/api/publish.sh
@@ -7,6 +7,8 @@
 #
 # Adding the `--upload` argument will also publish the package.
 
+set -e
+
 bazel_bin=$(which bazelisk 2>/dev/null)
 if [[ -z "$bazel_bin" ]]; then
     echo "Warning: bazelisk is not installed; falling back to bazel."
diff --git a/polygerrit-ui/app/api/tsconfig.json b/polygerrit-ui/app/api/tsconfig.json
index 037e4f2..6960192 100644
--- a/polygerrit-ui/app/api/tsconfig.json
+++ b/polygerrit-ui/app/api/tsconfig.json
@@ -1,9 +1,9 @@
 {
   "extends": "../../../plugins/tsconfig-plugins-base.json",
   "compilerOptions": {
-    "rootDir": ".",
+    "rootDir": "."
   },
   "include": [
-    "**/*",
-  ],
+    "**/*"
+  ]
 }