Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy. As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.
Test-bot: skip
The way that Server is built for local distribution does not currently
handle transitive dependencies for @keymanapp dependencies well. So,
this adds four dependencies from @keymanapp/developer-utils to Server so
that they will be available in the packaged deployment.
A future improvement could be to package developer-utils using npm
packaging tools, but these struggled with bundling monorepo dependencies
in the past also.
Fixes#9939.
Uses refactored KeymanSentry.ts in developer-utils and updates the
loader in Server to run from that.
The changes to tray.ts and friends are required to deal with a top-level
await issue with the shutdown call.
The top-level await issue is described in detail at
https://marc.durdin.net/2023/11/dynamic-import-on-node-js-with-circular-dependencies-leads-to-interesting-failure-modes/
tl;dr: shutdown needed to do a proper Sentry shutdown. The shutdown code
was in index.ts. This led to a circular dependency and caused a silent
and abrupt exit code 13 in Node.js. Moved shutdown code into shutdown.ts
to resolve this.
Fixes#9672.
Also rewrote build.sh as a builder script in order to simplify some of
the build changes.
Makes /web a dependency of Keyman Developer Server, which is a
significant improvement, but we need to consider if we want to use web's
debug build as we did in the past.
Removes Keyman Developer Server's transitive dependency on dicer by
updating multer to `1.4.5-lts.1`, which updates its dependency on
busboy.
See
https://github.com/expressjs/multer/pull/1097#issuecomment-1141286771
for reasoning behind use of `-lts.1` rather than a full release
version.
At some point in the future, multer will publish a full release with
this fix, at which point we can move back to a full release version.
When rebuilding a model, Keyman Developer would query for the
registered model, but a missing simplifyId call meant that it never
matched the model name (due to `.` vs `_`).