Fixes the scenario where the `%AppData%\Keyman\Keyman Developer\Server\bin`
folder exists, but ngrok.exe is not in the folder, which caused Keyman
Developer Server to crash.
Fixes: #11542
Fixes: KEYMAN-DEVELOPER-1JE
Now builds from a clean repo:
developer/src/build.sh configure build test publish
* Splits kmbrowserhost into kmdbrowserhost for Developer; this means
that Developer Browser Host now inherits the Developer settings rather
than the Keyman for Windows settings, and simplifies distribution and
management. The only difference between the two is in the startup code
so this seems like a good split.
* Cleanup of various build scripts and dependencies.
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).
This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
Fixes#11324.
* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
Fixes#11273.
On some devices, the fetch() would return faster than the remaining
script loads, which caused this script error. Lazy initialization should
address this.
Establishes keyman-urls.ts as a single place for any links to external
websites.
I searched all .ts files in Keyman Developer source and replaced
references to websites with function calls here. Note that the names of
individual functions within this class can be easily changed as needed,
as the hard part was the consolidation.
Fixes two things:
* $VERSION_GIT_TAG was being misinterpreted by mkver as
$VERSION + "_GIT_TAG". This has been addressed by making the $VERSION
match the last one in the replaceVersionStrings_Mkver function, and
also have moved to using the newer $VersionGitTag and $Environment
vartiables instead.
* The 'dist' property was being set in sentry-cli sourcemap uploads,
though we never set the dist prop when we initialize sentry.
Fixes#9848.
Root cause of #9848 is unknown, because the cache state file was filled
with nul bytes. It is unclear how that could have happened, but seems
likely to be external interference.
The cascade was that Server failed to start because it would crash when
attempting to load the cache state file. So this fix resolves that by
handling invalid file exceptions.
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#9845.
It seems that the logic for `osk-always-visible` is not quite right on
touch devices -- the OSK disappears on blur but remains touchable -- so
presses in the OSK region emit key events. For Keyman Developer Server,
the simple workaround is to only use `<body class="osk-always-visible">`
when on desktop devices.
We should review the logic for `osk-always-visible` in KeymanWeb, so
that this issue does not arise on touch devices. This patch addresses
the issue in Keyman Developer Server, and matches the behaviour we want
on touch devices in any case, as we don't really want the OSK visible
when blurred, unlike on desktop.
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.