Commit graph

100 commits

Author SHA1 Message Date
Marc Durdin
e9175de00f fix(developer): test existence of ngrok.exe before atttempting to start
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
2024-05-27 08:21:13 +07:00
Marc Durdin
fa57d5c674 chore(developer): final work on build.sh for developer
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.
2024-05-20 06:34:53 +07:00
Marc Durdin
41df6d1cd7 chore(developer): refactor remaining build scripts
This finishes the changes for all build infrastructure for Keyman
Developer to use build.sh.
2024-05-20 06:34:50 +07:00
Marc Durdin
2499ebf4bb chore(developer): move windows common Makefiles to build scripts
Relates to #11317.
2024-05-20 06:34:38 +07:00
Marc Durdin
86c62ff36c chore(developer): transition remaining projects to build.sh
Relates to #11317.

All projects now have a build.sh. Still need to work on inst/, remove
old Makefiles, and update CI.
2024-05-20 06:33:51 +07:00
Joshua Horton
887a47930f
Merge pull request #11318 from keymanapp/chore/web/chai-update
chore(web): updates chai, @types/chai dependencies 🏃
2024-05-15 14:10:27 +07:00
Darcy Wong
cbf1fd5cb1 chore(common): Merge beta to master for sprint A18S1 part 2 2024-05-10 06:27:02 +07:00
Joshua A. Horton
398b9e0ae2 chore(common): drops package-specific 'chai', '@types/chai' versions
chore(web): missed leaving these out of the rebase
2024-05-07 14:35:09 +07:00
Marc Durdin
8474372baa fix(developer): define lastSelLength variable
Fixes #11361.
2024-05-06 10:25:04 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
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.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
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
2024-05-02 15:54:29 +07:00
Marc Durdin
e8d3600e60 chore: Merge branch 'master' into chore/merge-beta-into-master-B17S6 2024-04-23 16:41:44 +07:00
Marc Durdin
5658a177a2
Merge pull request #11276 from keymanapp/fix/developer/11274-use-strict-for-downlevel-browsers
fix(developer): "use strict" for downlevel browsers in Server
2024-04-23 18:55:33 +10:00
Marc Durdin
d3c2ddf671
Merge pull request #11275 from keymanapp/fix/developer/11273-initdroparea-lazy-init
fix(developer): lazy initialization of test window
2024-04-22 18:29:05 +10:00
Marc Durdin
f870e912f3 fix(developer): "use strict" for downlevel browsers in Server
Fixes #11274.
2024-04-22 10:57:53 +07:00
Marc Durdin
d296100feb fix(developer): lazy initialization of test window
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.
2024-04-22 10:56:01 +07:00
Marc Durdin
dfdda1a4b2 fix(developer): handle multiple instances of Server starting
Fixes #11261.
2024-04-22 10:32:55 +07:00
dependabot[bot]
7f79017eb8
chore(deps): bump express from 4.17.3 to 4.19.2
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 08:36:50 +00:00
Marc Durdin
2e2af5b0fa refactor(developer): tidy up the sourcemap path fixup 2024-03-25 10:23:14 +07:00
Marc Durdin
e64103a02f chore(developer): consolidate external links in Developer messages
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.
2024-03-04 12:38:07 +07:00
Marc Durdin
e50966f265 chore(developer): sentry 7.102.0 for Server 2024-02-22 12:45:28 +07:00
Marc Durdin
9a3d4e30f4 chore(developer): restore previous tags 2024-02-22 12:45:12 +07:00
Marc Durdin
d7411ec4c4 fix(developer): version string matches for sentry
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.
2024-02-22 11:48:56 +07:00
Marc Durdin
5111e5b32b
Merge pull request #10359 from keymanapp/chore/developer/10357-ngrok-v3
chore(developer): upgrade ngrok to v3
2024-01-24 19:29:02 +11:00
Marc Durdin
11359737f3 chore(developer): remove ngrok region entirely 2024-01-24 12:16:10 +07:00
Marc Durdin
5df9464a30 chore(developer): let ngrok choose region -- experimental 2024-01-19 13:56:51 +07:00
Marc Durdin
a24b672a88 chore(developer): upgrade ngrok package to 5.0 beta 2024-01-11 09:57:32 +07:00
Joshua A. Horton
3870509465 fix(developer): model should activate instantly if matching keyboard exists when registered 2024-01-08 10:00:07 +07:00
Joshua A. Horton
b4944c7b5a fix(developer): fixes test-page model registration hook 2024-01-08 09:44:37 +07:00
Marc Durdin
662ed0e50c fix(common): publish @keymanapp/developer-utils as npm module
Fixes #10111.
2023-12-01 14:05:51 +07:00
Marc Durdin
65b73b7c54
Merge branch 'fix/developer/9939-sentry-support-in-server' into fix/developer/9848-resilient-cache-state-loading 2023-11-06 14:47:08 +11:00
Marc Durdin
ea038c6db8 chore(developer): developer-utils embed 2023-11-06 10:46:48 +07:00
Marc Durdin
8e21925c26 fix(developer): resilience in loading Server config and cache files
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.
2023-11-06 08:30:05 +07:00
Marc Durdin
716cb526b7 fix(developer): Sentry in Server should honour reporting settings
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.
2023-11-06 08:18:24 +07:00
Marc Durdin
4ce16a08fc fix(developer): don't use osk-always-visible on touch devices
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.
2023-11-01 05:57:13 +07:00
Marc Durdin
8aee151b5d chore: add comments to note internal APIs 2023-10-24 12:35:24 +07:00
Marc Durdin
f3333bfe3b fix(developer): server download Keyman link
Fixes #9702.
2023-10-23 05:22:50 +07:00
Marc Durdin
738ef9570a chore(developer): fixup signcode paths for server
Two conflicting merges meant that paths diverged. Fixes that.
2023-10-10 10:33:59 +07:00
Marc Durdin
6b4497b516
Merge pull request #9695 from keymanapp/fix/windows/9692-re-enable-signature-check
fix(windows): re-enable signature check 🔥
2023-10-09 16:09:54 +11:00
Marc Durdin
c970b1e246 chore(developer): fix paths for addon signing 2023-10-06 11:38:55 +07:00
Marc Durdin
7c2d3624cd chore(developer): sign addons in server 2023-10-06 10:37:25 +07:00
Marc Durdin
a1d7095c58
Merge pull request #9681 from keymanapp/chore/common/9262-cleanup-final-non-esm
chore(common): cleanup final Typescript non-ESM metadata
2023-10-06 13:37:54 +11:00
Marc Durdin
a314ba46a6 fix(developer): server node addin paths 2023-10-05 14:42:33 +07:00
Marc Durdin
33b6b5abc2 chore: update tsconfig 2023-10-04 15:16:34 +07:00
Marc Durdin
3e51389e17
Merge branch 'chore/common/9679-keyman-version-esm-only' into chore/common/9262-cleanup-final-non-esm 2023-10-04 19:07:37 +11:00
Marc Durdin
75a0977cdb chore(developer): fix server tests 2023-10-04 14:17:59 +07:00
Marc Durdin
d4e4992714 chore(common): cleanup final Typescript non-ESM metadata
Fixes #9262.
2023-10-04 12:55:51 +07:00
Marc Durdin
e7ac526c69 chore(developer): fixup Makefile for server 2023-10-04 11:50:03 +07:00
Marc Durdin
8e23b11dfc chore(developer): convert Server to ES Modules
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.
2023-10-04 09:38:48 +07:00
Joshua Horton
f4ba29926d
chore(developer): apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-06-08 11:57:35 +07:00