diff --git a/HISTORY.md b/HISTORY.md index f45e1e85cda..b58c086466b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,32 @@ # Keyman Version History +## 18.0.91 alpha 2024-08-16 + +* refactor(web): move `predictive-text` → `worker-main` (#12146) +* fix(web): restore flick functionality (#12187) +* refactor(web): move `lm-message-types` → `predictive-text/types` (#12149) +* fix(developer): enforce presence of kps Info.Description field in info compilers (#12204) +* fix(developer): enforce presence of Version field when FollowKeyboardVersion is not set, in package compiler (#12205) + +## 18.0.90 alpha 2024-08-15 + +* refactor(web): move parts of `keyboard-processor` → `js-processor` (#12111) +* fix(web): allow `lm-worker` to build on Linux (#12181) +* refactor(web): move remaining parts of `keyboard-processor` → `keyboard` (#12131) +* docs: update .kmx documentation around bitmaps, modifier state (#12183) +* refactor(web): rename `package-cache` → `keyboard-storage` (#12135) + +## 18.0.89 alpha 2024-08-14 + +* feat(web): test skipped prediction round handling (#12169) +* fix(web): support live configuration of longpress delay (#12175) +* feat(web): add osk.gestureParams for better gesture-config persistence (#12176) +* refactor(core): move utfcodec to common (#12171) +* refactor: move kmx_u16 to common and rename to km_u16 (#12177) +* refactor(developer): use npm or local source for server addons instead of github references (#12090) +* fix(developer): fix crash with Windows Clipboard by ignoring zero scan code in debugger (#12166) +* chore(developer): update SIL logo (#12168) + ## 18.0.88 alpha 2024-08-13 * docs: add .kmx specification (#12163) diff --git a/LICENSE.md b/LICENSE.md index e031c6cc139..5b203762357 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # License -Copyright (c) 2017-2022 SIL International. All rights reserved. +Copyright (c) 2017-2024 SIL Global. All rights reserved. Licensed under the MIT License. @@ -10,7 +10,7 @@ Licensed under the MIT License. The MIT License -Copyright (c) 2017-2022 SIL International +Copyright (c) 2017-2024 SIL Global Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index acd890cc452..caab39c2f9d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # License -Copyright (c) SIL International. +Copyright (c) SIL Global. Keyman is an open source project distributed under the [MIT license](LICENSE.md). diff --git a/VERSION.md b/VERSION.md index 06ebe83646e..ce8cfb73ead 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -18.0.89 \ No newline at end of file +18.0.92 \ No newline at end of file diff --git a/common/predictive-text/.build-builder b/common/predictive-text/.build-builder deleted file mode 100644 index 4e15741a629..00000000000 --- a/common/predictive-text/.build-builder +++ /dev/null @@ -1 +0,0 @@ -The presence of this file tells CI to use the new builder_ style parameters for build.sh and unit_tests/test.sh. \ No newline at end of file diff --git a/common/web/build.sh b/common/web/build.sh index 554b1e8ebb3..fbc015613fd 100755 --- a/common/web/build.sh +++ b/common/web/build.sh @@ -10,7 +10,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # # TODO: future modules may include -# :lm-message-types \ # :sentry-manager \ # diff --git a/common/web/keyboard-processor/build.sh b/common/web/keyboard-processor/build.sh deleted file mode 100755 index 3921063bb93..00000000000 --- a/common/web/keyboard-processor/build.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash -# -# Compile KeymanWeb's 'keyboard-processor' module, one of the components of Web's 'core' module. -# -## START STANDARD BUILD SCRIPT INCLUDE -# adjust relative paths as necessary -THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" -## END STANDARD BUILD SCRIPT INCLUDE - -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" - -BUNDLE_CMD="node ${KEYMAN_ROOT}/common/web/es-bundling/build/common-bundle.mjs" - -################################ Main script ################################ - -builder_describe \ - "Compiles the web-oriented utility function module." \ - "@/web/src/tools/testing/recorder-core test" \ - "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ - "@/common/web/types" \ - "@/common/web/utils" \ - configure \ - clean \ - build \ - test \ - "--ci For use with action $(builder_term test) - emits CI-friendly test reports" - -builder_describe_outputs \ - configure /node_modules \ - build /common/web/keyboard-processor/build/lib/index.mjs - -builder_parse "$@" - -function do_configure() { - verify_npm_setup - - # Configure Web browser-engine testing environments. As is, this should only - # make changes when we update the dependency, even on our CI build agents. - playwright install -} - -function do_build() { - tsc --build "${THIS_SCRIPT_PATH}/tsconfig.all.json" - - # Base product - the main keyboard processor - builder_echo "Bundle base product - the main keyboard processor" - ${BUNDLE_CMD} "${KEYMAN_ROOT}/common/web/keyboard-processor/build/obj/index.js" \ - --out "${KEYMAN_ROOT}/common/web/keyboard-processor/build/lib/index.mjs" \ - --format esm - - # The DOM-oriented keyboard loader - builder_echo "Bundle the DOM-oriented keyboard loader" - ${BUNDLE_CMD} "${KEYMAN_ROOT}/common/web/keyboard-processor/build/obj/keyboards/loaders/dom-keyboard-loader.js" \ - --out "${KEYMAN_ROOT}/common/web/keyboard-processor/build/lib/dom-keyboard-loader.mjs" \ - --format esm - - # The Node-oriented keyboard loader - builder_echo "Bundle the Node-oriented keyboard loader" - ${BUNDLE_CMD} "${KEYMAN_ROOT}/common/web/keyboard-processor/build/obj/keyboards/loaders/node-keyboard-loader.js" \ - --out "${KEYMAN_ROOT}/common/web/keyboard-processor/build/lib/node-keyboard-loader.mjs" \ - --format esm \ - --platform node - - # Tests - builder_echo "Bundle tests" - ${BUNDLE_CMD} "${KEYMAN_ROOT}/common/web/keyboard-processor/build/tests/dom/cases/domKeyboardLoader.spec.js" \ - --out "${KEYMAN_ROOT}/common/web/keyboard-processor/build/tests/dom/domKeyboardLoader.spec.mjs" \ - --format esm - - # Declaration bundling. - builder_echo "Declaration bundling" - tsc --emitDeclarationOnly --outFile ./build/lib/index.d.ts - tsc --emitDeclarationOnly --outFile ./build/lib/dom-keyboard-loader.d.ts -p src/keyboards/loaders/tsconfig.dom.json - tsc --emitDeclarationOnly --outFile ./build/lib/node-keyboard-loader.d.ts -p src/keyboards/loaders/tsconfig.node.json -} - -function do_test() { - local MOCHA_FLAGS= - local WTR_CONFIG= - if builder_has_option --ci; then - echo "Replacing user-friendly test reports with CI-friendly versions." - MOCHA_FLAGS="$MOCHA_FLAGS --reporter mocha-teamcity-reporter" - WTR_CONFIG=.CI - fi - - c8 mocha --recursive $MOCHA_FLAGS ./tests/node/ - web-test-runner --config tests/dom/web-test-runner${WTR_CONFIG}.config.mjs -} - -builder_run_action configure do_configure -builder_run_action clean rm -rf ./build -builder_run_action build do_build -builder_run_action test do_test diff --git a/common/web/keyboard-processor/package.json b/common/web/keyboard-processor/package.json deleted file mode 100644 index 3f0a5958970..00000000000 --- a/common/web/keyboard-processor/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@keymanapp/keyboard-processor", - "description": "Core module for Keyman keyboard support in KeymanWeb.", - "repository": { - "type": "git", - "url": "git+https://github.com/keymanapp/keyman.git" - }, - "keywords": [ - "input", - "languages", - "keyboards" - ], - "author": "SIL International", - "license": "MIT", - "bugs": { - "url": "https://github.com/keymanapp/keyman/issues" - }, - "homepage": "https://github.com/keymanapp/keyman#readme", - "devDependencies": { - "@keymanapp/resources-gosh": "*", - "c8": "^7.12.0", - "mocha": "^10.0.0", - "mocha-teamcity-reporter": "^4.0.0", - "typescript": "^5.4.5" - }, - "scripts": { - "build": "gosh build.sh", - "clean": "gosh build.sh clean", - "test": "gosh build.sh test" - }, - "dependencies": { - "@keymanapp/common-types": "*", - "@keymanapp/models-types": "*", - "@keymanapp/keyman-version": "*", - "@keymanapp/web-utils": "*" - }, - "type": "module", - "main": "./build/obj/index.js", - "types": "./build/obj/index.d.ts", - "exports": { - ".": { - "es6-bundling": "./src/index.ts", - "default": "./build/obj/index.js" - }, - "./node-keyboard-loader": { - "es6-bundling": "./src/keyboards/loaders/node-keyboard-loader.ts", - "types": "./build/obj/keyboards/loaders/node-keyboard-loader.d.ts", - "import": "./build/obj/keyboards/loaders/node-keyboard-loader.js" - }, - "./dom-keyboard-loader": { - "es6-bundling": "./src/keyboards/loaders/dom-keyboard-loader.ts", - "types": "./build/obj/keyboards/loaders/dom-keyboard-loader.d.ts", - "import": "./build/obj/keyboards/loaders/dom-keyboard-loader.js" - }, - "./lib": { - "types": "./build/lib/index.d.ts", - "import": "./build/lib/index.mjs" - }, - "./lib/node-keyboard-loader": { - "types": "./build/lib/node-keyboard-loader.d.ts", - "import": "./build/lib/node-keyboard-loader.mjs" - }, - "./lib/dom-keyboard-loader": { - "types": "./build/lib/dom-keyboard-loader.d.ts", - "import": "./build/lib/dom-keyboard-loader.mjs" - }, - "./obj/*.js": "./build/obj/*.js" - } -} diff --git a/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.dom.json b/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.dom.json deleted file mode 100644 index 7ba2abe026a..00000000000 --- a/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.dom.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../../../tsconfig.kmw-main-base.json", - "compilerOptions": { - "baseUrl": "../../../", - "outDir": "../../../build/obj/keyboards/loaders/", - "tsBuildInfoFile": "../../../build/obj/keyboards/loaders/tsconfig.dom.tsbuildinfo", - "rootDir": "." - }, - "references": [ - { "path": "../../../tsconfig.json" } - ], - "include": ["dom-keyboard-loader.ts", "domKeyboardLoader.ts"], -} diff --git a/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.node.json b/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.node.json deleted file mode 100644 index 0be3f169ad3..00000000000 --- a/common/web/keyboard-processor/src/keyboards/loaders/tsconfig.node.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../../../../tsconfig.kmw-main-base.json", - "compilerOptions": { - "types": [ "node" ], - "baseUrl": "../../../", - "outDir": "../../../build/obj/keyboards/loaders/", - "tsBuildInfoFile": "../../../build/obj/keyboards/loaders/tsconfig.node.tsbuildinfo", - "rootDir": "." - }, - "references": [ - { "path": "../../../tsconfig.json" } - ], - "include": ["node-keyboard-loader.ts", "nodeKeyboardLoader.ts"], -} diff --git a/common/web/keyboard-processor/tests/dom/readme.md b/common/web/keyboard-processor/tests/dom/readme.md deleted file mode 100644 index 153b7f4a1e8..00000000000 --- a/common/web/keyboard-processor/tests/dom/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -Automated tests in this subfolder and its children are designed to facilitate simple, browser-independent -unit tests that are DOM-reliant. - -Tests for anything that may reasonably vary depending upon the browser used to run the code should go under -the "integrated" folder instead. \ No newline at end of file diff --git a/common/web/keyboard-processor/tests/dom/web-test-runner.CI.config.mjs b/common/web/keyboard-processor/tests/dom/web-test-runner.CI.config.mjs deleted file mode 100644 index d18a8a9cb09..00000000000 --- a/common/web/keyboard-processor/tests/dom/web-test-runner.CI.config.mjs +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-check -import BASE_CONFIG from './web-test-runner.config.mjs'; -import teamcityReporter from '@keymanapp/common-test-resources/test-runner-TC-reporter.mjs'; -import { sessionStabilityReporter } from '@keymanapp/common-test-resources/test-runner-stability-reporter.mjs'; - -/** @type {import('@web/test-runner').TestRunnerConfig} */ -export default { - ...BASE_CONFIG, - reporters: [ - teamcityReporter(), /* custom-written, for CI-friendly reports */ - sessionStabilityReporter({ciMode: true}) - ] -} \ No newline at end of file diff --git a/common/web/keyboard-processor/tests/dom/web-test-runner.config.mjs b/common/web/keyboard-processor/tests/dom/web-test-runner.config.mjs deleted file mode 100644 index 76651182acb..00000000000 --- a/common/web/keyboard-processor/tests/dom/web-test-runner.config.mjs +++ /dev/null @@ -1,62 +0,0 @@ -// @ts-check -import { devices, playwrightLauncher } from '@web/test-runner-playwright'; -import { esbuildPlugin } from '@web/dev-server-esbuild'; -import { defaultReporter, summaryReporter } from '@web/test-runner'; -import { LauncherWrapper, sessionStabilityReporter } from '@keymanapp/common-test-resources/test-runner-stability-reporter.mjs'; -import { importMapsPlugin } from '@web/dev-server-import-maps'; -import { dirname, resolve } from 'path'; -import { fileURLToPath } from 'url'; - -const dir = dirname(fileURLToPath(import.meta.url)); -const KEYMAN_ROOT = resolve(dir, '../../../../..'); - -/** @type {import('@web/test-runner').TestRunnerConfig} */ -export default { - // debug: true, - browsers: [ - new LauncherWrapper(playwrightLauncher({ product: 'chromium' })), - new LauncherWrapper(playwrightLauncher({ product: 'firefox' })), - new LauncherWrapper(playwrightLauncher({ product: 'webkit', concurrency: 1 })), - ], - concurrency: 10, - nodeResolve: true, - files: [ - 'build/tests/dom/**/*.spec.mjs' - ], - middleware: [ - // Rewrites short-hand paths for test resources, making them fully relative to the repo root. - function rewriteResourcePath(context, next) { - if(context.url.startsWith('/resources/')) { - context.url = '/common/test' + context.url; - } - - return next(); - } - ], - plugins: [ - esbuildPlugin({ts: true, target: 'auto'}), - importMapsPlugin({ - inject: { - importMap: { - // Redirects `eventemitter3` imports to the bundled ESM library. The standard import is an - // ESM wrapper around the CommonJS implementation, and WTR fails when it hits the CommonJS. - imports: { - 'eventemitter3': '/node_modules/eventemitter3/dist/eventemitter3.esm.js' - } - } - } - }) - ], - reporters: [ - summaryReporter({}), /* local-dev mocha-style */ - sessionStabilityReporter({}), - defaultReporter({}) - ], - /* - Un-comment the next two lines for easy interactive debugging; it'll launch the - test page in your preferred browser. - */ - // open: true, - // manual: true, - rootDir: KEYMAN_ROOT -} diff --git a/common/web/keyboard-processor/tests/tsconfig.json b/common/web/keyboard-processor/tests/tsconfig.json deleted file mode 100644 index 0e978545b81..00000000000 --- a/common/web/keyboard-processor/tests/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": "../", - "outDir": "../build/tests/", - "tsBuildInfoFile": "../build/tests/tsconfig.tsbuildinfo", - "rootDir": "./" - }, - "include": [ "./dom/**/*.ts"], - "exclude": [] -} diff --git a/common/web/keyboard-processor/tsconfig.json b/common/web/keyboard-processor/tsconfig.json deleted file mode 100644 index 728935b74f6..00000000000 --- a/common/web/keyboard-processor/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -// Is used by the keyboard-loader submodules. -{ - "extends": "../tsconfig.kmw-main-base.json", - "compilerOptions": { - "baseUrl": "./", - "outDir": "build/obj/", - "tsBuildInfoFile": "build/obj/tsconfig.tsbuildinfo", - "rootDir": "./src/" - }, - "references": [ - { "path": "../types" }, - { "path": "../../models/types" }, - { "path": "../keyman-version/" }, - { "path": "../utils/" } - ], - "include": [ "./src/**/*.ts"], - "exclude": ["./src/keyboards/loaders/**/*.ts"] -} diff --git a/common/web/lm-message-types/tsconfig.json b/common/web/lm-message-types/tsconfig.json deleted file mode 100644 index 559b764980e..00000000000 --- a/common/web/lm-message-types/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "declaration": true, - "outDir": "build/", - "sourceMap": true, - "lib": ["es6"], - "target": "es6" - }, - "include": ["./*.ts"], - "exclude": ["test.ts"] -} diff --git a/common/web/lm-worker/build.sh b/common/web/lm-worker/build.sh index 22ffa9208c5..0343d151c8f 100755 --- a/common/web/lm-worker/build.sh +++ b/common/web/lm-worker/build.sh @@ -98,7 +98,7 @@ function do_test() { if builder_has_option --ci; then MOCHA_FLAGS="$MOCHA_FLAGS --reporter mocha-teamcity-reporter" - WTR_CONFIG=.ci + WTR_CONFIG=.CI fi if builder_has_option --debug; then diff --git a/common/web/lm-worker/tsconfig.json b/common/web/lm-worker/tsconfig.json index f439e969409..95b403c768b 100644 --- a/common/web/lm-worker/tsconfig.json +++ b/common/web/lm-worker/tsconfig.json @@ -13,7 +13,7 @@ "references": [ // types { "path": "../../models/types" }, - { "path": "../lm-message-types" }, + { "path": "../../../web/src/engine/predictive-text/types" }, // modules { "path": "../keyman-version" }, { "path": "../utils" }, diff --git a/common/web/types/src/keyman-touch-layout/keyman-touch-layout-file.ts b/common/web/types/src/keyman-touch-layout/keyman-touch-layout-file.ts index 757316a70a9..786d9213e2b 100644 --- a/common/web/types/src/keyman-touch-layout/keyman-touch-layout-file.ts +++ b/common/web/types/src/keyman-touch-layout/keyman-touch-layout-file.ts @@ -58,7 +58,7 @@ export const PRIVATE_USE_IDS = [ ] as const; /* A map of key field names with values matching the `typeof` the corresponding property - * exists in common/web/keyboard-processor, keyboards/activeLayout.ts. + * exists in /web/src/engine/keyboard/src/keyboards/activeLayout.ts. * * Make sure that when one is updated, the other also is. TS types are compile-time only, * so the run-time-accessible mapping in activeLayout.ts cannot be auto-generated by TS. */ diff --git a/developer/src/common/web/utils/package.json b/developer/src/common/web/utils/package.json index 79b0d6a7f09..488051f8f0e 100644 --- a/developer/src/common/web/utils/package.json +++ b/developer/src/common/web/utils/package.json @@ -10,6 +10,8 @@ ], "dependencies": { "@sentry/node": "^7.57.0", + "@keymanapp/common-types": "*", + "eventemitter3": "^5.0.0", "restructure": "^3.0.1", "semver": "^7.5.2", "sax": ">=0.6.0", diff --git a/developer/src/kmc-keyboard-info/src/keyboard-info-compiler-messages.ts b/developer/src/kmc-keyboard-info/src/keyboard-info-compiler-messages.ts index 285e272da5b..bf5d989718b 100644 --- a/developer/src/kmc-keyboard-info/src/keyboard-info-compiler-messages.ts +++ b/developer/src/kmc-keyboard-info/src/keyboard-info-compiler-messages.ts @@ -52,8 +52,14 @@ export class KeyboardInfoCompilerMessages { static Error_FontFileCannotBeRead = (o:{filename: string}) => m(this.ERROR_FontFileCannotBeRead, `Font ${def(o.filename)} could not be parsed to extract a font family.`); -static ERROR_FontFileMetaDataIsInvalid = SevError | 0x000F; -static Error_FontFileMetaDataIsInvalid = (o:{filename: string,message:string}) => m(this.ERROR_FontFileMetaDataIsInvalid, + static ERROR_FontFileMetaDataIsInvalid = SevError | 0x000F; + static Error_FontFileMetaDataIsInvalid = (o:{filename: string,message:string}) => m( + this.ERROR_FontFileMetaDataIsInvalid, `Font ${def(o.filename)} meta data invalid: ${def(o.message)}.`); + + static ERROR_DescriptionIsMissing = SevError | 0x0010; + static Error_DescriptionIsMissing = (o:{filename:string}) => m( + this.ERROR_DescriptionIsMissing, + `The Info.Description field in the package ${def(o.filename)} is required, but is missing or empty.`); } diff --git a/developer/src/kmc-keyboard-info/src/keyboard-info-compiler.ts b/developer/src/kmc-keyboard-info/src/keyboard-info-compiler.ts index 74699556988..8e89bb81646 100644 --- a/developer/src/kmc-keyboard-info/src/keyboard-info-compiler.ts +++ b/developer/src/kmc-keyboard-info/src/keyboard-info-compiler.ts @@ -251,6 +251,9 @@ export class KeyboardInfoCompiler implements KeymanCompiler { if(kmpJsonData.info.description?.description) { keyboard_info.description = kmpJsonData.info.description.description.trim(); + } else { + this.callbacks.reportMessage(KeyboardInfoCompilerMessages.Error_DescriptionIsMissing({filename:sources.kpsFilename})); + return null; } // extract the language identifiers from the language metadata arrays for diff --git a/developer/src/kmc-keyboard-info/test/test-keyboard-info-compiler.ts b/developer/src/kmc-keyboard-info/test/test-keyboard-info-compiler.ts index 9b61b8e93d9..99c244be2dd 100644 --- a/developer/src/kmc-keyboard-info/test/test-keyboard-info-compiler.ts +++ b/developer/src/kmc-keyboard-info/test/test-keyboard-info-compiler.ts @@ -835,17 +835,4 @@ describe('keyboard-info-compiler', function () { const result = await compiler['fontSourceToKeyboardInfoFont'](KHMER_ANGKOR_KPS, kmpJsonData, fonts); assert.deepEqual(result, KHMER_ANGKOR_DISPLAY_FONT_INFO); }); - - it('handles missing info.version in a package file', async function() { - const sources = { - ...KHMER_ANGKOR_SOURCES, - kpsFilename: makePathToFixture('missing-info-version-in-kps-11856', 'khmer_angkor.kps') - }; - const compiler = new KeyboardInfoCompiler(); - assert.isTrue(await compiler.init(callbacks, {sources})); - const kpjFilename = KHMER_ANGKOR_KPJ; - const result = await compiler.run(kpjFilename); - const actual = JSON.parse(new TextDecoder().decode(result.artifacts.keyboard_info.data)); - assert.equal(actual.version, '1.0'); - }); }); diff --git a/developer/src/kmc-model-info/src/model-info-compiler-messages.ts b/developer/src/kmc-model-info/src/model-info-compiler-messages.ts index e033d6c021c..cbf6b57eb90 100644 --- a/developer/src/kmc-model-info/src/model-info-compiler-messages.ts +++ b/developer/src/kmc-model-info/src/model-info-compiler-messages.ts @@ -44,5 +44,10 @@ export class ModelInfoCompilerMessages { static ERROR_NoLicenseFound = SevError | 0x0009; static Error_NoLicenseFound = () => m(this.ERROR_NoLicenseFound, `No license for the model was found. MIT license is required for publication to Keyman lexical-models repository.`); + + static ERROR_DescriptionIsMissing = SevError | 0x000A; + static Error_DescriptionIsMissing = (o:{filename:string}) => m( + this.ERROR_DescriptionIsMissing, + `The Info.Description field in the package ${def(o.filename)} is required, but is missing or empty.`); } diff --git a/developer/src/kmc-model-info/src/model-info-compiler.ts b/developer/src/kmc-model-info/src/model-info-compiler.ts index d4f3d10d435..a5fb62cbcda 100644 --- a/developer/src/kmc-model-info/src/model-info-compiler.ts +++ b/developer/src/kmc-model-info/src/model-info-compiler.ts @@ -204,6 +204,9 @@ export class ModelInfoCompiler implements KeymanCompiler { if(sources.kmpJsonData.info.description?.description) { model_info.description = sources.kmpJsonData.info.description.description.trim(); + } else { + this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_DescriptionIsMissing({filename:sources.kpsFilename})); + return null; } // isRTL -- this is a little bit of a heuristic from a compiled .js diff --git a/developer/src/kmc-package/src/compiler/package-compiler-messages.ts b/developer/src/kmc-package/src/compiler/package-compiler-messages.ts index 154cb2143e7..00d8a380b5e 100644 --- a/developer/src/kmc-package/src/compiler/package-compiler-messages.ts +++ b/developer/src/kmc-package/src/compiler/package-compiler-messages.ts @@ -138,5 +138,11 @@ export class PackageCompilerMessages { static ERROR_InvalidAuthorEmail = SevError | 0x0020; static Error_InvalidAuthorEmail = (o:{email:string}) => m(this.ERROR_InvalidAuthorEmail, `Invalid author email: ${def(o.email)}`); + + static ERROR_PackageFileHasEmptyVersion = SevError | 0x0021; + static Error_PackageFileHasEmptyVersion = () => m( + this.ERROR_PackageFileHasEmptyVersion, + `Package version is not following keyboard version, but the package version field is blank.` + ); } diff --git a/developer/src/kmc-package/src/compiler/package-version-validator.ts b/developer/src/kmc-package/src/compiler/package-version-validator.ts index 1aad375d400..b20e086aec7 100644 --- a/developer/src/kmc-package/src/compiler/package-version-validator.ts +++ b/developer/src/kmc-package/src/compiler/package-version-validator.ts @@ -42,6 +42,11 @@ export class PackageVersionValidator { if(!this.checkFollowKeyboardVersion(kmp)) { return false; } + } else { + if(!kmp.info.version) { + this.callbacks.reportMessage(PackageCompilerMessages.Error_PackageFileHasEmptyVersion()); + return false; + } } if(!kmp.keyboards) { diff --git a/developer/src/kmc-package/test/fixtures/absolute_path/source/absolute_path.kps b/developer/src/kmc-package/test/fixtures/absolute_path/source/absolute_path.kps index e7c4a8b8512..b5a74c06ee1 100644 --- a/developer/src/kmc-package/test/fixtures/absolute_path/source/absolute_path.kps +++ b/developer/src/kmc-package/test/fixtures/absolute_path/source/absolute_path.kps @@ -17,6 +17,7 @@ Absolute Path + 1.0 diff --git a/developer/src/kmc-package/test/fixtures/invalid/error_package_file_has_empty_version.kps b/developer/src/kmc-package/test/fixtures/invalid/error_package_file_has_empty_version.kps new file mode 100644 index 00000000000..386b4e2e03e --- /dev/null +++ b/developer/src/kmc-package/test/fixtures/invalid/error_package_file_has_empty_version.kps @@ -0,0 +1,32 @@ + + + + 15.0.266.0 + 7.0 + + + + Invalid Email Address + © 2019 National Research Council Canada + Eddie Antonio Santos + + + + + basic.kmx + Keyboard Basic + 0 + .kmx + + + + + Basic + basic + 1.0 + + Central Khmer (Khmer, Cambodia) + + + + diff --git a/developer/src/kmc-package/test/test-messages.ts b/developer/src/kmc-package/test/test-messages.ts index e8fdfa842a5..2d8df44eb50 100644 --- a/developer/src/kmc-package/test/test-messages.ts +++ b/developer/src/kmc-package/test/test-messages.ts @@ -236,4 +236,8 @@ describe('PackageCompilerMessages', function () { PackageCompilerMessages.ERROR_InvalidAuthorEmail); }); + it('should generate ERROR_PackageFileHasEmptyVersion if FollowKeyboardVersion is not present and Version is empty', async function() { + await testForMessage(this, ['invalid', 'error_package_file_has_empty_version.kps'], + PackageCompilerMessages.ERROR_PackageFileHasEmptyVersion); + }); }); diff --git a/developer/src/kmc-package/test/test-package-compiler.ts b/developer/src/kmc-package/test/test-package-compiler.ts index 3f0e8d28fd2..7952e2145a2 100644 --- a/developer/src/kmc-package/test/test-package-compiler.ts +++ b/developer/src/kmc-package/test/test-package-compiler.ts @@ -209,6 +209,8 @@ describe('KmpCompiler', function () { kmpJson = kmpCompiler.transformKpsToKmpObject(kpsPath); }); + assert.isNotNull(kmpJson); + await assert.isNull(kmpCompiler.buildKmpFile(kpsPath, kmpJson)); if(debug) callbacks.printMessages(); diff --git a/developer/src/server/build-addins.inc.sh b/developer/src/server/build-addins.inc.sh index d48d44d1e74..052a24d77b9 100644 --- a/developer/src/server/build-addins.inc.sh +++ b/developer/src/server/build-addins.inc.sh @@ -41,9 +41,10 @@ do_build_addins() { # Build node-windows-trayicon # - pushd "$KEYMAN_ROOT/node_modules/node-windows-trayicon" + pushd "$KEYMAN_ROOT/developer/src/server/src/win32/trayicon/addon-src" rm -rf build - npx node-gyp clean configure build --arch=$ARCH --silent + npm ci + "$KEYMAN_ROOT/node_modules/.bin/node-gyp" clean configure build --arch=$ARCH --silent cp build/Release/addon.node "$TRAYICON_SRC_TARGET" cp build/Release/addon.node "$TRAYICON_BIN_TARGET" popd @@ -52,9 +53,9 @@ do_build_addins() { # Build hetrodo-node-hide-console-window-napi # - pushd "$KEYMAN_ROOT/node_modules/hetrodo-node-hide-console-window-napi" + pushd "$KEYMAN_ROOT/node_modules/node-hide-console-window" rm -rf build - npx node-gyp clean configure build --arch=$ARCH --silent + "$KEYMAN_ROOT/node_modules/.bin/node-gyp" clean configure build --arch=$ARCH --silent cp build/Release/node-hide-console-window.node "$HIDECONSOLE_SRC_TARGET" cp build/Release/node-hide-console-window.node "$HIDECONSOLE_BIN_TARGET" popd diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index e053d72b96e..c73ed853f77 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -87,9 +87,16 @@ function build_server() { # Post build mkdir -p "$THIS_SCRIPT_PATH/build/src/site/" - mkdir -p "$THIS_SCRIPT_PATH/build/src/win32/" cp -r "$THIS_SCRIPT_PATH/src/site/"** "$THIS_SCRIPT_PATH/build/src/site/" - cp -r "$THIS_SCRIPT_PATH/src/win32/"** "$THIS_SCRIPT_PATH/build/src/win32/" + + mkdir -p "$THIS_SCRIPT_PATH/build/src/win32/" + mkdir -p "$THIS_SCRIPT_PATH/build/src/win32/console" + mkdir -p "$THIS_SCRIPT_PATH/build/src/win32/trayicon" + cp "$THIS_SCRIPT_PATH/src/win32/README.md" "$THIS_SCRIPT_PATH/build/src/win32/" + cp "$THIS_SCRIPT_PATH/src/win32/console/node-hide-console-window.node" "$THIS_SCRIPT_PATH/build/src/win32/console/" + cp "$THIS_SCRIPT_PATH/src/win32/console/node-hide-console-window.x64.node" "$THIS_SCRIPT_PATH/build/src/win32/console/" + cp "$THIS_SCRIPT_PATH/src/win32/trayicon/addon.node" "$THIS_SCRIPT_PATH/build/src/win32/trayicon/" + cp "$THIS_SCRIPT_PATH/src/win32/trayicon/addon.x64.node" "$THIS_SCRIPT_PATH/build/src/win32/trayicon/" replaceVersionStrings "$THIS_SCRIPT_PATH/build/src/site/lib/sentry/init.js.in" "$THIS_SCRIPT_PATH/build/src/site/lib/sentry/init.js" rm "$THIS_SCRIPT_PATH/build/src/site/lib/sentry/init.js.in" @@ -114,10 +121,13 @@ function installer_server() { rm -f node_modules/ngrok/bin/ngrok.exe popd - # @keymanapp/keyman-version is required in build/ now but we need to copy it in manually + # Dependencies are required in build/ but we need to copy them in manually mkdir -p "$PRODBUILDTEMP/node_modules/@keymanapp/" cp -R "$KEYMAN_ROOT/node_modules/@keymanapp/keyman-version/" "$PRODBUILDTEMP/node_modules/@keymanapp/" cp -R "$KEYMAN_ROOT/node_modules/@keymanapp/developer-utils/" "$PRODBUILDTEMP/node_modules/@keymanapp/" + cp -R "$KEYMAN_ROOT/node_modules/@keymanapp/common-types/" "$PRODBUILDTEMP/node_modules/@keymanapp/" + cp -R "$KEYMAN_ROOT/node_modules/@keymanapp/ldml-keyboard-constants/" "$PRODBUILDTEMP/node_modules/@keymanapp/" + cp -R "$KEYMAN_ROOT/node_modules/eventemitter3/" "$PRODBUILDTEMP/node_modules/" # We'll build in the $KEYMAN_ROOT/developer/bin/server/ folder rm -rf "$KEYMAN_ROOT/developer/bin/server/" @@ -144,8 +154,8 @@ function publish_server() { builder_run_action clean:server clean_server builder_run_action configure:server configure_server -builder_run_action build:server build_server builder_run_action build:addins build_addins +builder_run_action build:server build_server builder_run_action test:server test_server # builder_run_action test:addins # no op builder_run_action installer:server installer_server # TODO: rename to install-prep diff --git a/developer/src/server/package.json b/developer/src/server/package.json index c4c195ae1b7..b0e438ad15e 100644 --- a/developer/src/server/package.json +++ b/developer/src/server/package.json @@ -16,11 +16,14 @@ "multer": "^1.4.5-lts.1", "ngrok": "^5.0.0-beta.2", "open": "^8.4.0", - "ws": "^8.17.1" - }, + "restructure": "^3.0.1", + "sax": ">=0.6.0", + "semver": "^7.5.2", + "ws": "^8.17.1", + "xmlbuilder": "~11.0.0" +}, "optionalDependencies": { - "hetrodo-node-hide-console-window-napi": "keymanapp/hetrodo-node-hide-console-window-napi#keyman-15.0", - "node-windows-trayicon": "keymanapp/node-windows-trayicon#keyman-16.0" + "node-hide-console-window": "^2.2.0" }, "devDependencies": { "@keymanapp/keyman-version": "*", @@ -32,6 +35,7 @@ "@types/ws": "^8.2.2", "copyfiles": "^2.4.1", "mocha": "^10.0.0", + "node-gyp": "^10.2.0", "tsc-watch": "^4.5.0", "typescript": "^5.4.5" } diff --git a/developer/src/server/src/win32/trayicon/README.md b/developer/src/server/src/win32/trayicon/README.md index 2a6dfcff37c..9dbc4b19f5a 100644 --- a/developer/src/server/src/win32/trayicon/README.md +++ b/developer/src/server/src/win32/trayicon/README.md @@ -8,3 +8,8 @@ bundled libraries target for specific versions of node. * Tree: https://github.com/mceSystems/node-windows-trayicon/tree/cbd7543ac186ca15ee8d7141aac43f26ceae1655 * License: MIT * Built from: /developer/src/server/win32/node-windows-trayicon + +--- + +The source for trayicon is currently in addon-src, as the original package is +unmaintained. \ No newline at end of file diff --git a/developer/src/server/src/win32/trayicon/addon-src/.gitignore b/developer/src/server/src/win32/trayicon/addon-src/.gitignore new file mode 100644 index 00000000000..c6bf5be1c71 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/.gitignore @@ -0,0 +1,62 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +.vscode +build/ +test/icon.ico \ No newline at end of file diff --git a/developer/src/server/src/win32/trayicon/addon-src/LICENSE b/developer/src/server/src/win32/trayicon/addon-src/LICENSE new file mode 100644 index 00000000000..454c5bc10ab --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 mceSystems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/developer/src/server/src/win32/trayicon/addon-src/README.md b/developer/src/server/src/win32/trayicon/addon-src/README.md new file mode 100644 index 00000000000..6c429beb599 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/README.md @@ -0,0 +1,57 @@ +# windows-trayicon +Native addon to add a windows tray icon with menu, built on windows-native libraries (no .NET dependency) + +# Installation +``` +npm install --save windows-trayicon +``` + +# Usage +``` +const WindowsTrayicon = require("windows-trayicon"); +const path = require("path"); +const fs = require("fs"); + +const myTrayApp = new WindowsTrayicon({ + title: "Trayicon Test", + icon: path.resolve(__dirname, "icon.ico"), + menu: [ + { + id: "item-1-id", + caption: "First Item" + }, + { + id: "item-2-id", + caption: "Second Item" + }, + { + id: "item-3-id-exit", + caption: "Exit" + } + ] +}); + +myTrayApp.item((id) => { + console.log(`Menu id selected=${id}`); + switch (id) { + case "item-1-id": { + console.log("First item selected..."); + break; + } + case "item-2-id": { + myTrayApp.balloon("Hello There!", "This is my message to you").then(() => { + console.log("Balloon clicked"); + }) + break; + } + case "item-3-id-exit": { + myTrayApp.exit(); + process.exit(0) + break; + } + } +}); + +process.stdin.resume() + +``` \ No newline at end of file diff --git a/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.cpp b/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.cpp new file mode 100644 index 00000000000..549ff935e39 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.cpp @@ -0,0 +1,512 @@ +/* +* Copyright (c) Istvan Pasztor +* This source has been published on www.codeproject.com under the CPOL license. +*/ +#include "stdafx.h" +#include "TrayIcon.h" +#include + +#define TRAY_WINDOW_MESSAGE (WM_USER + 100) + +namespace +{ +// A map that never holds allocated memory when it is empty. This map will be created with placement new as a static variable, +// and its destructor will be never called, and it shouldn't leak memory if it contains no items at program exit. +// This dirty trick is useful when you create your trayicon object as static. In this case we can not control the +// order of destruction of this map object and the static trayicon object. However this dirty trick ensures that +// the map is freed exactly when the destructor of the last static trayicon is unregistering itself. +class CIdToTrayIconMap +{ + public: + typedef UINT KeyType; + typedef CTrayIcon *ValueType; + + // typedef didn't work with VC++6 + struct StdMap : public std::map + { + }; + typedef StdMap::iterator iterator; + + CIdToTrayIconMap() : m_Empty(true) {} + ValueType &operator[](KeyType k) + { + return GetOrCreateStdMap()[k]; + } + ValueType *find(KeyType k) + { + if (m_Empty) + return false; + StdMap::iterator it = GetStdMap().find(k); + if (it == GetStdMap().end()) + return NULL; + return &it->second; + } + int erase(KeyType k) + { + if (m_Empty) + return 0; + StdMap &m = GetStdMap(); + int res = (int)m.erase(k); + if (m.empty()) + { + m.~StdMap(); + m_Empty = true; + } + return res; + } + bool empty() const + { + return m_Empty; + } + // Call this only when the container is not empty!!! + iterator begin() + { + assert(!m_Empty); // Call this only when the container is not empty!!! + return m_Empty ? iterator() : GetStdMap().begin(); + } + // Call this only when the container is not empty!!! + iterator end() + { + assert(!m_Empty); // Call this only when the container is not empty!!! + return m_Empty ? iterator() : GetStdMap().end(); + } + + private: + StdMap &GetStdMap() + { + assert(!m_Empty); + return (StdMap &)m_MapBuffer; + } + StdMap &GetOrCreateStdMap() + { + if (m_Empty) + { + new ((void *)&m_MapBuffer) StdMap(); + m_Empty = false; + } + return (StdMap &)m_MapBuffer; + } + + private: + bool m_Empty; + char m_MapBuffer[sizeof(StdMap)]; +}; + +static CIdToTrayIconMap &GetIdToTrayIconMap() +{ + // This hack prevents running the destructor of our map, so it isn't problem if someone tries to reach this from a static destructor. + // Because of using MyMap this will not cause a memory leak if the user removes all items from the container before exiting. + static char id_to_tray_icon_buffer[sizeof(CIdToTrayIconMap)]; + static bool initialized = false; + if (!initialized) + { + initialized = true; + new ((void *)id_to_tray_icon_buffer) CIdToTrayIconMap(); + } + return (CIdToTrayIconMap &)id_to_tray_icon_buffer; +} + +static UINT GetNextTrayIconId() +{ + static UINT next_id = 1; + return next_id++; +} +} + +void CallJsWithOptionalString(Napi::Env env, Function callback, Context *context, std::string* data) { + if (env != nullptr) { + if (callback != nullptr) { + if (data) { + callback.Call(context->Value(), { String::New(env, *data) }); + } else { + callback.Call(context->Value(), {}); + } + + } + } + if (data != nullptr) { + delete data; + } +} + +static const UINT g_WndMsgTaskbarCreated = RegisterWindowMessage(TEXT("TaskbarCreated")); +LRESULT CALLBACK CTrayIcon::MessageProcessorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + if (uMsg == TRAY_WINDOW_MESSAGE) + { + if (CTrayIcon **ppIcon = GetIdToTrayIconMap().find((UINT)wParam)) + (*ppIcon)->OnMessage((UINT)lParam); + return 0; + } + else if (uMsg == g_WndMsgTaskbarCreated) + { + CIdToTrayIconMap &id_to_tray = GetIdToTrayIconMap(); + if (!id_to_tray.empty()) + { + for (std::map::const_iterator it = id_to_tray.begin(), eit = id_to_tray.end(); it != eit; ++it) + { + CTrayIcon *pTrayIcon = it->second; + pTrayIcon->OnTaskbarCreated(); + } + } + } + return DefWindowProc(hWnd, uMsg, wParam, lParam); +} + +HWND CTrayIcon::GetMessageProcessorHWND() +{ + static HWND hWnd = NULL; + if (!hWnd) + { + static const TCHAR TRAY_ICON_MESSAGE_PROCESSOR_WND_CLASSNAME[] = TEXT("TRAY_ICON_MESSAGE_PROCESSOR_WND_CLASS"); + HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL); + + WNDCLASSEX wc; + wc.cbSize = sizeof(wc); + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); + wc.hIconSm = NULL; + wc.hInstance = hInstance; + wc.lpfnWndProc = MessageProcessorWndProc; + wc.lpszClassName = TRAY_ICON_MESSAGE_PROCESSOR_WND_CLASSNAME; + wc.lpszMenuName = NULL; + wc.style = 0; + if (!RegisterClassEx(&wc)) + return NULL; + + hWnd = CreateWindowEx( + 0, + TRAY_ICON_MESSAGE_PROCESSOR_WND_CLASSNAME, + TEXT("TRAY_ICON_MESSAGE_PROCESSOR_WND"), + WS_POPUP, + 0, 0, 0, 0, + NULL, + NULL, + hInstance, + NULL); + } + return hWnd; +} + +CTrayIcon::CTrayIcon(const char *name, bool visible, HICON hIcon, bool destroy_icon_in_destructor) + : m_Id(GetNextTrayIconId()), m_Name(name), m_hIcon(hIcon), m_Visible(false), m_DestroyIconInDestructor(destroy_icon_in_destructor), m_pOnMessageFunc(NULL), m_pListener(NULL) +{ + GetIdToTrayIconMap()[m_Id] = this; + SetVisible(visible); +} + +CTrayIcon::~CTrayIcon() +{ + SetVisible(false); + SetIcon(NULL, m_DestroyIconInDestructor); + GetIdToTrayIconMap().erase(m_Id); +} + +HICON CTrayIcon::InternalGetIcon() const +{ + return m_hIcon ? m_hIcon : ::LoadIcon(NULL, IDI_APPLICATION); +} + +bool CTrayIcon::AddIcon() +{ + NOTIFYICONDATAA data; + FillNotifyIconData(data); + data.uFlags |= NIF_MESSAGE | NIF_ICON | NIF_TIP; + data.uCallbackMessage = TRAY_WINDOW_MESSAGE; + data.hIcon = InternalGetIcon(); + + size_t tip_len = max(sizeof(data.szTip) - 1, strlen(m_Name.c_str())); + memcpy(data.szTip, m_Name.c_str(), tip_len); + data.szTip[tip_len] = 0; + + return FALSE != Shell_NotifyIconA(NIM_ADD, &data); +} + +bool CTrayIcon::RemoveIcon() +{ + NOTIFYICONDATAA data; + FillNotifyIconData(data); + return FALSE != Shell_NotifyIconA(NIM_DELETE, &data); +} + +void CTrayIcon::OnTaskbarCreated() +{ + if (m_Visible) + AddIcon(); +} + +void CTrayIcon::SetName(const char *name) +{ + m_Name = name; + if (m_Visible) + { + NOTIFYICONDATAA data; + FillNotifyIconData(data); + data.uFlags |= NIF_TIP; + + size_t tip_len = max(sizeof(data.szTip) - 1, strlen(name)); + memcpy(data.szTip, name, tip_len); + data.szTip[tip_len] = 0; + + Shell_NotifyIconA(NIM_MODIFY, &data); + } +} + +bool CTrayIcon::SetVisible(bool visible) +{ + if (m_Visible == visible) + return true; + m_Visible = visible; + if (m_Visible) + return AddIcon(); + return RemoveIcon(); +} + +void CTrayIcon::SetIcon(HICON hNewIcon, bool destroy_current_icon) +{ + if (m_hIcon == hNewIcon) + return; + if (destroy_current_icon && m_hIcon) + DestroyIcon(m_hIcon); + m_hIcon = hNewIcon; + + if (m_Visible) + { + NOTIFYICONDATAA data; + FillNotifyIconData(data); + data.uFlags |= NIF_ICON; + data.hIcon = InternalGetIcon(); + Shell_NotifyIconA(NIM_MODIFY, &data); + } +} + +bool CTrayIcon::ShowBalloonTooltip(const char *title, const char *msg, ETooltipIcon icon) +{ +#ifndef NOTIFYICONDATA_V2_SIZE + return false; +#else + if (!m_Visible) + return false; + + NOTIFYICONDATAA data; + FillNotifyIconData(data); + data.cbSize = NOTIFYICONDATAA_V2_SIZE; // win2k and later + data.uFlags |= NIF_INFO; + data.dwInfoFlags = icon; + data.uTimeout = 10000; // deprecated as of Windows Vista, it has a min(10000) and max(30000) value on previous Windows versions. + + strcpy_s(data.szInfoTitle, title); + strcpy_s(data.szInfo, msg); + + return FALSE != Shell_NotifyIconA(NIM_MODIFY, &data); +#endif +} + +void CTrayIcon::OnMessage(UINT uMsg) +{ + if (m_pOnMessageFunc) + m_pOnMessageFunc(this, uMsg); + if (m_pListener) + m_pListener->OnTrayIconMessage(this, uMsg); +} + +void CTrayIcon::FillNotifyIconData(NOTIFYICONDATAA &data) +{ + memset(&data, 0, sizeof(data)); + // the basic functions need only V1 +#ifdef NOTIFYICONDATA_V1_SIZE + data.cbSize = NOTIFYICONDATA_V1_SIZE; +#else + data.cbSize = sizeof(data); +#endif + data.hWnd = GetMessageProcessorHWND(); + assert(data.hWnd); + data.uID = m_Id; +} + +void TrayOnMessage(CTrayIcon *pTrayIcon, UINT uMsg) +{ + switch (uMsg) + { + case WM_LBUTTONUP: + case WM_RBUTTONUP: + ((CTrayIconContainer *)pTrayIcon->GetUserData())->PopupMenu(); + break; + + case NIN_BALLOONUSERCLICK: + ((CTrayIconContainer *)pTrayIcon->GetUserData())->BalloonClick(); + break; + } +} + +HICON GetIconHandle(std::string iconPath) +{ + return (HICON)LoadImage(NULL, iconPath.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE | LR_SHARED); +} + + +CTrayIconContainer::CTrayIconContainer(const CallbackInfo& info) : ObjectWrap(info), m_OnBalloonClick(nullptr), m_OnMenuItem(nullptr) {} + +Object CTrayIconContainer::Init(Napi::Env env, Object exports){ + Function func = + DefineClass(env, + "CTrayIconContainer", + { + InstanceMethod("Start", &CTrayIconContainer::Start), + InstanceMethod("SetIconPath", &CTrayIconContainer::SetIconPath), + InstanceMethod("SetTitle", &CTrayIconContainer::SetTitle), + InstanceMethod("Stop", &CTrayIconContainer::Stop), + InstanceMethod("AddMenuItem", &CTrayIconContainer::AddMenuItem), + InstanceMethod("OnMenuItem", &CTrayIconContainer::OnMenuItem), + InstanceMethod("ShowBalloon", &CTrayIconContainer::ShowBalloon), + } + ); + + FunctionReference* constructor = new FunctionReference(); + *constructor = Napi::Persistent(func); + env.SetInstanceData(constructor); + + exports.Set("CTrayIconContainer", func); + return exports; +} + +void CTrayIconContainer::Stop(const CallbackInfo& info) +{ + if (m_OnMenuItem) { + m_OnMenuItem.Release(); + m_OnMenuItem = nullptr; + } + if (m_OnBalloonClick) { + m_OnBalloonClick.Release(); + m_OnBalloonClick = nullptr; + } + PostThreadMessage(GetThreadId(m_worker->native_handle()), WM_QUIT, NULL, NULL); + m_worker->join(); + delete m_worker; + m_worker = nullptr; + m_tray.SetVisible(false); +} + +LRESULT CALLBACK pWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return DefWindowProc(hWnd, uMsg, wParam, lParam); +} + +void CTrayIconContainer::SetIconPath(const CallbackInfo& info) +{ + std::string iconPath = info[0].As(); + m_tray.SetIcon(GetIconHandle(iconPath)); +} +void CTrayIconContainer::SetTitle(const CallbackInfo& info) +{ + std::string title = info[0].As(); + m_tray.SetName(title.c_str()); +} +void CTrayIconContainer::Start(const CallbackInfo& info) +{ + HANDLE ready = CreateEvent(nullptr, true, false, nullptr); + + m_worker = new std::thread([this, ready] { + m_tray.SetUserData(this); + m_tray.SetVisible(true); + m_tray.SetListener(TrayOnMessage); + + SetEvent(ready); + + static const TCHAR *class_name = TEXT("MCE_HWND_MESSAGE"); + WNDCLASSEX wx = {}; + wx.cbSize = sizeof(WNDCLASSEX); + wx.lpfnWndProc = pWndProc; + wx.hInstance = 0; + wx.lpszClassName = class_name; + RegisterClassEx(&wx); + m_hwnd = CreateWindowEx(0, class_name, TEXT("MCE_HWND_MESSAGE"), 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); + + MSG msg; + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + DestroyWindow(m_hwnd); + + return 0; + }); + + WaitForSingleObject(ready, INFINITE); + CloseHandle(ready); +} + +void CTrayIconContainer::BalloonClick() +{ + m_OnBalloonClick.BlockingCall(nullptr); +} + +void CTrayIconContainer::PopupMenu() +{ + POINT pt; + if (GetCursorPos(&pt)) + { + HMENU menu = CreatePopupMenu(); + int i = 1; + for (auto const &item : m_menuItems) + { + if(item.m_caption == "-") + { + AppendMenuA(menu, MF_SEPARATOR, -1, NULL); + } + else + { + AppendMenuA(menu, MF_STRING, i, item.m_caption.c_str()); + } + i++; + } + + HWND activeHwnd = GetForegroundWindow(); + SetForegroundWindow(m_hwnd); + UINT cmd = TrackPopupMenu(menu, TPM_RETURNCMD | TPM_RIGHTBUTTON, pt.x, pt.y, 0, m_hwnd, NULL); + PostMessage(m_hwnd, WM_NULL, 0, 0); + SetForegroundWindow(activeHwnd); + if(cmd > 0) { + m_OnMenuItem.BlockingCall(new std::string(m_menuItems[cmd-1].m_id)); + } + } +} + +void CTrayIconContainer::AddMenuItem(const CallbackInfo& info) +{ + std::string id = info[0].As(); + std::string caption = info[1].As(); + m_menuItems.push_back(CTrayIconMenuItem(id, caption)); +} + +void CTrayIconContainer::OnMenuItem(const CallbackInfo& info) +{ + Function cb = info[0].As(); + Context *context = new Reference(Persistent(info.This())); + if (m_OnMenuItem) { + m_OnMenuItem.Release(); + } + m_OnMenuItem = TSFNOptString::New(info.Env(), cb, "wintrayicon_OnMenuItem", 0, 1, context); +} + +void CTrayIconContainer::ShowBalloon(const CallbackInfo& info) +{ + std::string title = info[0].As(); + std::string text = info[1].As(); + int timeout = info[2].As(); + Function cb = info[3].As(); + + Context *context = new Reference(Persistent(info.This())); + + if (m_OnBalloonClick) { + m_OnBalloonClick.Release(); + } + + m_OnBalloonClick = TSFNOptString::New(info.Env(), cb, "wintrayicon_ShowBalloon", 0, 1, context); + m_tray.ShowBalloonTooltip(title.c_str(), text.c_str()); +} diff --git a/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.h b/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.h new file mode 100644 index 00000000000..ee0c85561ec --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/TrayIcon.h @@ -0,0 +1,193 @@ +/* +* Copyright (c) Istvan Pasztor +* This source has been published on www.codeproject.com under the CPOL license. +*/ +#ifndef __TRAY_ICON_H__ +#define __TRAY_ICON_H__ +#pragma once + +// NOTE: include the following headers in your stdafx.h: +#include +#include +#include +#include +#include +#include +#include +#include +#include "napi.h" + +using namespace Napi; + +using Context = Reference; +void CallJsWithOptionalString(Napi::Env env, Function callback, Context *context, std::string* data); +using TSFNOptString = TypedThreadSafeFunction; + +struct ITrayIconListener; + +class CTrayIconMenuItem +{ +public: + CTrayIconMenuItem(std::string id, std::string caption) : + m_id(id), m_caption(caption) {} + + std::string m_id; + std::string m_caption; +}; + + +// You can use this class either by inheriting from it and overriding the OnMessage() method, +// or by instantiating this class directly and setting its listener object or function. +class CTrayIcon +{ +public: + CTrayIcon(const char* name="tray_icon", bool visible=false, HICON hIcon=NULL, bool destroy_icon_in_destructor=false); + // destroys the current m_hIcon if set + virtual ~CTrayIcon(); + + virtual void SetName(const char* name); + const char* GetName() const { return m_Name.c_str(); } + + virtual bool SetVisible(bool visible); + bool IsVisible() const { return m_Visible; } + + // The destructor may destroy the specified hIcon. If you want to avoid that, call + // SetIcon(NULL, false) or SetDestroyIconInDestructor(false). + virtual void SetIcon(HICON hNewIcon, bool destroy_current_icon=true); + HICON GetIcon() const { return m_hIcon; } + + void SetDestroyIconInDestructor(bool b) { m_DestroyIconInDestructor = b; } + bool GetDestroyIconInDestructor() const { return m_DestroyIconInDestructor; } + + enum ETooltipIcon + { + eTI_None, // NIIF_NONE(0) + eTI_Info, // NIIF_INFO(1) + eTI_Warning, // NIIF_WARNING(2) + eTI_Error // NIIF_ERROR(3) + }; + // ShowBalloonTooltip() works only on win2k and later + bool ShowBalloonTooltip(const char* title, const char* msg, ETooltipIcon icon=eTI_None); + + typedef void (*POnMessageFunc)(CTrayIcon* pTrayIcon, UINT uMsg); + void SetListener(POnMessageFunc pOnMessageFunc) { m_pOnMessageFunc = pOnMessageFunc; } + void SetListener(ITrayIconListener *pListener) { m_pListener = pListener; } + void SetUserData(const void* UserData) { m_userData = UserData; } + const void* GetUserData() { return m_userData; } + +protected: + // uMsg can be one of the following window messages: + // - WM_MOUSEMOVE + // - WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK + // - WM_RBUTTONDOWN, WM_RBUTTONUP, WM_RBUTTONDBLCLK + // - WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MBUTTONDBLCLK + // WinXP and later: + // - NIN_BALLOONXXX messages (eg.: NIN_BALLOONUSERCLICK) + // + // Use GetCursorPos() if you need the location of the cursor. + // The default implementation calls the listener. + virtual void OnMessage(UINT uMsg); + +private: + void FillNotifyIconData(NOTIFYICONDATAA& data); + // Never returns NULL! If GetIcon()==NULL, then this returns a system icon + HICON InternalGetIcon() const; + bool AddIcon(); + bool RemoveIcon(); + void OnTaskbarCreated(); + +private: + UINT m_Id; + std::string m_Name; + bool m_Visible; + HICON m_hIcon; + bool m_DestroyIconInDestructor; + POnMessageFunc m_pOnMessageFunc; + ITrayIconListener* m_pListener; + + static LRESULT CALLBACK MessageProcessorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + static HWND GetMessageProcessorHWND(); + const void* m_userData; +}; + + +//------------------------------------------------------------------------------------------------- + + +struct ITrayIconListener +{ + virtual void OnTrayIconMouseMove(CTrayIcon* pTrayIcon) {} + + virtual void OnTrayIconLButtonDown(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconLButtonUp(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconLButtonDblClk(CTrayIcon* pTrayIcon) {} + + virtual void OnTrayIconRButtonDown(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconRButtonUp(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconRButtonDblClk(CTrayIcon* pTrayIcon) {} + + virtual void OnTrayIconMButtonDown(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconMButtonUp(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconMButtonDblClk(CTrayIcon* pTrayIcon) {} + + // WinXP and later + virtual void OnTrayIconSelect(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconBalloonShow(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconBalloonHide(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconBalloonTimeout(CTrayIcon* pTrayIcon) {} + virtual void OnTrayIconBalloonUserClick(CTrayIcon* pTrayIcon) {} + + // Use GetCursorPos() if you need the location of the cursor. + virtual void OnTrayIconMessage(CTrayIcon* pTrayIcon, UINT uMsg) + { + switch (uMsg) + { + case WM_MOUSEMOVE: OnTrayIconMouseMove(pTrayIcon); break; + case WM_LBUTTONDOWN: OnTrayIconLButtonDown(pTrayIcon); break; + case WM_LBUTTONUP: OnTrayIconLButtonUp(pTrayIcon); break; + case WM_LBUTTONDBLCLK: OnTrayIconLButtonDblClk(pTrayIcon); break; + case WM_RBUTTONDOWN: OnTrayIconRButtonDown(pTrayIcon); break; + case WM_RBUTTONUP: OnTrayIconRButtonUp(pTrayIcon); break; + case WM_RBUTTONDBLCLK: OnTrayIconRButtonDblClk(pTrayIcon); break; + case WM_MBUTTONDOWN: OnTrayIconMButtonDown(pTrayIcon); break; + case WM_MBUTTONUP: OnTrayIconMButtonUp(pTrayIcon); break; + case WM_MBUTTONDBLCLK: OnTrayIconMButtonDblClk(pTrayIcon); break; + +#ifdef NIN_SELECT + case NIN_SELECT: OnTrayIconSelect(pTrayIcon); break; + case NIN_BALLOONSHOW: OnTrayIconBalloonShow(pTrayIcon); break; + case NIN_BALLOONHIDE: OnTrayIconBalloonHide(pTrayIcon); break; + case NIN_BALLOONTIMEOUT: OnTrayIconBalloonTimeout(pTrayIcon); break; + case NIN_BALLOONUSERCLICK: OnTrayIconBalloonUserClick(pTrayIcon); break; +#endif + } + } +}; + + + +class CTrayIconContainer : public ObjectWrap +{ +public: + CTrayIconContainer(const CallbackInfo& info); + static Object Init(Napi::Env env, Object exports); + void Start(const CallbackInfo& info); + void SetIconPath(const CallbackInfo& info); + void SetTitle(const CallbackInfo& info); + void AddMenuItem(const CallbackInfo& info); + void OnMenuItem(const CallbackInfo& info); + void ShowBalloon(const CallbackInfo& info); + void Stop(const CallbackInfo& info); + void PopupMenu(); + void BalloonClick(); + +private: + CTrayIcon m_tray; + std::thread* m_worker; + HWND m_hwnd; + std::vector m_menuItems; + TSFNOptString m_OnMenuItem; + TSFNOptString m_OnBalloonClick; +}; + +#endif //!__TRAY_ICON_H__ diff --git a/developer/src/server/src/win32/trayicon/addon-src/TrayWrapper.cpp b/developer/src/server/src/win32/trayicon/addon-src/TrayWrapper.cpp new file mode 100644 index 00000000000..5ff13e6a049 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/TrayWrapper.cpp @@ -0,0 +1,8 @@ +#include "TrayIcon.h" + +Object Init(Env env, Object exports) { + CTrayIconContainer::Init(env, exports); + return exports; +} + +NODE_API_MODULE(addon, Init) \ No newline at end of file diff --git a/developer/src/server/src/win32/trayicon/addon-src/binding.gyp b/developer/src/server/src/win32/trayicon/addon-src/binding.gyp new file mode 100644 index 00000000000..b560112b45d --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/binding.gyp @@ -0,0 +1,23 @@ +{ + "targets": [ + { + "target_name": "addon", + "conditions": [ + ['OS=="win"', { + "sources": [ + "TrayWrapper.cpp", + "TrayIcon.cpp" + ], + "include_dirs": [ + " { + for (const cb of this.__itemCallbacks) { + cb(id); + } + }) + this.__nativeTray.SetTitle(this.__trayTitle); + if(this.__icon && "string" === typeof this.__icon){ + this.__nativeTray.SetIconPath(this.__icon); + } + this.__nativeTray.Start(); + } + item(cb) { + if ("function" === typeof cb) { + this.__itemCallbacks.push(cb); + } + } + balloon(title, text, timeout = 5000) { + return new Promise((resolve) => { + this.__nativeTray.ShowBalloon(title, text, timeout, () => { + resolve(); + }) + }); + } + exit() { + this.__nativeTray.Stop(); + } +} + +module.exports = WindowsTrayicon; diff --git a/developer/src/server/src/win32/trayicon/addon-src/package-lock.json b/developer/src/server/src/win32/trayicon/addon-src/package-lock.json new file mode 100644 index 00000000000..d16aad04aa6 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/package-lock.json @@ -0,0 +1,1905 @@ +{ + "name": "windows-trayicon", + "version": "3.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "windows-trayicon", + "version": "3.0.0", + "hasInstallScript": true, + "license": "MIT", + "os": [ + "win32" + ], + "dependencies": { + "bindings": "^1.5.0", + "node-addon-api": "^3.1.0", + "node-gyp": "^10.2.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache": { + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/env-paths": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz", + "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==" + }, + "node_modules/node-gyp": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz", + "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "node_modules/ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + }, + "dependencies": { + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + } + }, + "@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "requires": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + } + }, + "@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "requires": { + "semver": "^7.3.5" + } + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true + }, + "abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==" + }, + "agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "requires": { + "debug": "^4.3.4" + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "requires": { + "ms": "2.1.2" + } + }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "env-paths": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" + }, + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, + "exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + } + }, + "fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "requires": { + "minipass": "^7.0.3" + } + }, + "glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + } + }, + "https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "requires": { + "agent-base": "^7.0.2", + "debug": "4" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==" + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" + }, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "requires": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==" + }, + "jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "make-fetch-happen": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "requires": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" + }, + "minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "requires": { + "minipass": "^7.0.3" + } + }, + "minipass-fetch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "node-addon-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz", + "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==" + }, + "node-gyp": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz", + "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==", + "requires": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + } + }, + "nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "requires": { + "abbrev": "^2.0.0" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + } + }, + "proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==" + }, + "promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + }, + "socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "requires": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "requires": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + } + }, + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "ssri": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "requires": { + "minipass": "^7.0.3" + } + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + } + } + }, + "tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + } + } + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "requires": { + "isexe": "^3.1.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/developer/src/server/src/win32/trayicon/addon-src/package.json b/developer/src/server/src/win32/trayicon/addon-src/package.json new file mode 100644 index 00000000000..54dcd5578a4 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/package.json @@ -0,0 +1,23 @@ +{ + "name": "windows-trayicon", + "version": "3.0.0", + "description": "Create tray icon for windows", + "main": "index.js", + "os": [ + "win32" + ], + "scripts": { + "install": "node-gyp configure build" + }, + "author": "mce", + "license": "MIT", + "dependencies": { + "node-gyp": "^10.2.0", + "bindings": "^1.5.0", + "node-addon-api": "^3.1.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/mceSystems/node-windows-trayicon" + } +} diff --git a/developer/src/server/src/win32/trayicon/addon-src/stdafx.cpp b/developer/src/server/src/win32/trayicon/addon-src/stdafx.cpp new file mode 100644 index 00000000000..f1d63e0b438 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// ConsoleApplication1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/developer/src/server/src/win32/trayicon/addon-src/stdafx.h b/developer/src/server/src/win32/trayicon/addon-src/stdafx.h new file mode 100644 index 00000000000..b005a839def --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/developer/src/server/src/win32/trayicon/addon-src/targetver.h b/developer/src/server/src/win32/trayicon/addon-src/targetver.h new file mode 100644 index 00000000000..87c0086de75 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/developer/src/server/src/win32/trayicon/addon-src/test/index.js b/developer/src/server/src/win32/trayicon/addon-src/test/index.js new file mode 100644 index 00000000000..1f0a0326023 --- /dev/null +++ b/developer/src/server/src/win32/trayicon/addon-src/test/index.js @@ -0,0 +1,45 @@ +const WindowsTrayicon = require(".."); +const path = require("path"); +const fs = require("fs"); + +const myTrayApp = new WindowsTrayicon({ + title: "Trayicon Test", + icon: path.resolve(__dirname, "icon.ico"), + menu: [ + { + id: "item-1-id", + caption: "First Item" + }, + { + id: "item-2-id", + caption: "Second Item" + }, + { + id: "item-3-id-exit", + caption: "Exit" + } + ] +}); + +myTrayApp.item((id) => { + console.log(`Menu id selected=${id}`); + switch (id) { + case "item-1-id": { + console.log("First item selected..."); + break; + } + case "item-2-id": { + myTrayApp.balloon("Hello There!", "This is my message to you").then(() => { + console.log("Balloon clicked"); + }) + break; + } + case "item-3-id-exit": { + myTrayApp.exit(); + process.exit(0) + break; + } + } +}); + +process.stdin.resume() \ No newline at end of file diff --git a/developer/src/tike/child/UfrmDebug.pas b/developer/src/tike/child/UfrmDebug.pas index d40993af4c9..66116034dc6 100644 --- a/developer/src/tike/child/UfrmDebug.pas +++ b/developer/src/tike/child/UfrmDebug.pas @@ -424,14 +424,21 @@ function TfrmDebug.ProcessKeyEvent(var Message: TMessage): Boolean; end; end; var - vkey, modifier: uint16_t; + scan, vkey, modifier: uint16_t; begin Assert(Assigned(FDebugCore)); // We always use the US virtual key code as a basis for our keystroke // mapping; the best way to do this is to extract the scan code from // the message data and work from that - vkey := MapScanCodeToUSVK((Message.LParam and $FF0000) shr 16); + + // Note: if a key event has a zero scan code, it has probably been + // injected, so we will do our best with it, using the VK as provided. + // See also #11978 + scan := (Message.LParam and $FF0000) shr 16; + if scan = 0 + then vkey := Message.WParam + else vkey := MapScanCodeToUSVK(scan); // We don't support the Right Shift modifier in Keyman; // we treat it as Left Shift, even though MapScanCodeToUSVK diff --git a/developer/src/tike/dialogs/UfrmAboutTike.dfm b/developer/src/tike/dialogs/UfrmAboutTike.dfm index 3210c1e0e3a..d1146e625b0 100644 --- a/developer/src/tike/dialogs/UfrmAboutTike.dfm +++ b/developer/src/tike/dialogs/UfrmAboutTike.dfm @@ -504,12 +504,12 @@ inherited frmAboutTike: TfrmAboutTike 6082} end object lblCopyright: TLabel - Left = 125 - Top = 347 + Left = 156 + Top = 304 Width = 200 Height = 11 Anchors = [akLeft, akBottom] - Caption = 'Copyright SIL International. All Rights Reserved' + Caption = 'Copyright SIL Global. All Rights Reserved' Font.Charset = ANSI_CHARSET Font.Color = clBlack Font.Height = -9 @@ -544,50 +544,98 @@ inherited frmAboutTike: TfrmAboutTike ExplicitWidth = 634 end object Image1: TImage - Left = 55 + Left = 39 Top = 256 - Width = 52 - Height = 58 + Width = 107 + Height = 64 AutoSize = True Picture.Data = { - 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000340000 - 003A08020000007010EDCC000000097048597300000B1100000B11017F645F91 - 0000001674455874536F667477617265007061696E742E6E657420342E314CEF - C5FF000003664944415478DA6364889DC9305801E3A8E3461D37EAB851C78D3A - 6ED471A38E1B75DCA000A38E1B75DCA8E348751C2323839182A8BD86A48A181F - 2323E3C3379F2F3E7A7BEEC19B979FBE232B6366022A6484B0FF31FCFFF7EF3F - 5C8A152C0707BFFF20C951E2384B55F149315646F2A2C8A683ACFFFFBF76ED99 - F6CDE7215C0E56E6CB6DA10AA2BC10EEB26377E267ED872B3E54ED67A52A0EE7 - 8AE72C7EFBE507A58EF337525891E5CCCECA8C55367DFEE1D907AEC31D77B53D - 4C11E6B8A5C76EC7CE4438EE488D3FB2E344B31751EA38097ECEEB9DE1FC9C6C - B81418D5ADBDF0F0EDC038AE23CCACCCDB0059E4EBCFDFB75F7CFAF3EF9FB420 - B700179B40C682DF7FFF0D80E38049F86C53908E8C105CE4D8ED97811377BEFD - F213226BA8207CF2CE2B78BAA6ABE37838586F76854BF273C1451CDB371FBCF1 - 1C974174775C67B8A400C2712E9D5BF75D7B3A281C072C980ED7F85928234CDC - 7BEDA9FF849DDF7EFE1978C7014182ADDABC14076491D3F75F27CC3A70FDD9FB - 81771C30D5EFAFF44536140880213761D7E5E60DE77EFEF93B908E030259219E - DDE5DE6A12FC68E2C0200C99B4EBF1BBAF03E9382010E1E5589CEEE8AA23C384 - 5A7FDD7CFEC1AA69E3FB6F3F07D2710CE0CC116DA53A39D69A978315597CC1E1 - 5BC9730EFC1F58C7410030723716B8AB4B0AC045BEFCF8AD5CB2FCF5E71F03EF - 38205095E0BFDC1ACAC6C20417899CB677E5C9BB83C271C0F83DD51064282F0C - 17A9597BBA6DD3F941E1381626C68BADA19A5288982D5E7EA27FC7255A398E2D - 710E234E4906B814331313B00595EEA459E2A98FACC4AE75D3915B2F48759C6C - C1D2775F7FFEFF8FAF390C94637CFFE527FE9085D340EBD958505A9D0FDF7ED1 - AA58F5FDD71F521DF7F9FBEF7F0C841BEA8CFF886ACD6307590B8FCCD8770DC2 - 26C9714402321DF7F7DFFF093B2F97AD38415E7B8E568E0356A9579FBC6F587F - 66EBC547C86986268E2B5A761C1EFBFF71A4038823FEFCFDF7E4FDD7F30FDF3C - 7DF715B36BC7C2CC54EAA527C4CD0EE19E7BF076F9893B70D96C176D05111E92 - 1D37E43BD5A38E1B75DCA8E306011875DC30701CB0FF1466AE2C2BC4FDF0CD97 - 35A7EEFD1F548E9311E276D39171D395D97BF5E9B2E377BEFEFC33881CC7C3C1 - 5AE8AEFBE0CD676531BEB6CDE77FFDF937881C0704DCECAC5A5202D79E7DF8FA - F33703385A670DB4937002000B26443581ED65730000000049454E44AE426082} + 0954506E67496D61676589504E470D0A1A0A0000000D494844520000006B0000 + 004008060000001DD489F9000000017352474200AECE1CE90000000467414D41 + 0000B18F0BFC6105000000097048597300002E2200002E2201AAE2DD92000009 + 584944415478DAED9C7D6C55E51DC77FF7BDEFF6B65494F262CB4A41A0142302 + CA26533A20CE85B0CD04D1A0C365739B714BD438CDD8CCD8B24463BA65CB92C5 + B89704131707D9FE603AC44DDBA1825005456094BE496BDFDBDBDEB6F7F5ECF9 + 5E7AEF3DE7DCE79C7BCE6DE1DE933EDFA494F39C7BCE7D389FE7F77B7EBFDFF3 + 1C6C246419D9B2DD0121E312B02C2401CB4212B02C2401CB42D2845572A0CDCB + 7EDD96ED0EF254E6B1D38A52774ADF4702D1F677EFA93C173FAE79F86F2BA212 + 2DC9767FCDC861B39DB8F0C79D83BC737AB0EE60BF9AB3DD799E567BDD749DDB + AE689B8C48746628D838B0EBA61FC5DBAAF7BCD62849F478B6FB6B4676BBADA1 + F54F5F7F9377CE72B02A0B9C5455EC54B431EBA1D343411A0F471B7DBBAB04AC + 5C509EC346B7947BC8AEEA75DB58982E4F84F157012B57B4B2D44D5E8FD2FDF9 + 4251B83F92AE1C0A58B920041537335872C1FDB50C0568322CC59B04AC6C0B9D + 5CCBDC5F8153D9DD2E7F983AC6C3F226012BDB9A9FEFA09A1297A22DC0A2BF93 + 83819875C924606553E8E02DF33C94EF5076F5C26888FAA622EA8F0B58D9D4BC + 3C072DBF4E6955136C8E6A615625A57E5CC0E20903BDDCE3A012969C62D4E338 + C49EDE68304A3D2C8C8E48342BAA2B7353894B19019E6756D59F6A559080A5B8 + 19BB6251A19316B0E4D4A17135E6934F4682310B9889105020AF52DFFB8301AE + 554102565C456C84D7329794EF485FFFC54385AB9A092F542A50B190AB9D457F + 9FF9C35A97085810E68E652C22B39BA8D3E3A1B68F878D5FA0D23A1658786403 + 03DC4FF4072818D51C0102D6F50C540DB328AD0F4B1A370AB1877ABC5FD365E9 + AA9859F19A3265123C1C88C6DCAB8EE636AC521640ACF4BAB91F1C61C10492D2 + B1503466012807A913D78F8682B1F366B5A4C8199B1BE5FA9F2F44BD9311BDCB + E62EAC3C87ADB99E8D6E27C7F7753217D7A9727115CC026B5561F645F6803FD7 + 7FC05CE17B8B5451E0FBCC4A43515D3B9D9BB0BCAFB4DDC12CAA591D3643B0A6 + 2ECE24CF735D3CA8E904E35C7F7D9EA273FE7094052CC17497CE4D585B8FF46C + 629EAD49DD8EAA01AA073C016C9D0A5626418677DAF5CAD53D11A14B63A17497 + 660CCB6EB3D19A6A2FDDBCA4940AF39C34E80BD0B9AED1D84F243A4B49A3917E + 64026BFB9B3D9BD849052CACC67EC8C271AD8417F3DB2AD543E6145BD30A7315 + E62CB9741261B932827567DD7CDAB7BB9EAA6E284A3937EA0FD237F6FF875ABB + C7126DAF3E73272D5D509C38BEFD878729184ECECBEFFDFA1ECA733B12C7F7EE + 3B4A5DFD7E43FFF6598375663818AB506889571AD272997AC23D702FB94EB141 + 6220C9360DEB6B1B17D18BDF5917B32C9ED8F554FFE83F686C3269D5FFFC4503 + D52E2C49F677EF2105AC4F5FDA411E57B2FF5F7EEA0DEAE81D37F46F9F15587A + EE2F2E5435AA554BEEADCC75F54C980B30B01C52E854E657C77AA78CA400A660 + 95157BE8ED17B6C5DC9E963AFBFCB4F9C9D7156D390D0B2E1BCB11813405BFEA + 621703A6B488730CF0407AF7A5D046165CC88B2470BF270702462E3505EBA186 + 2FD0BE07D628DACEB40DD36B4D1DE46396B4F4C6622AF03868FF2BA7159FC969 + 58062777EEB2BBD93C0B69C2860A653D10AE172ED8804CC17AE1DBB7D2CE4DC9 + 9D6A7D2353B4F989D7692AA43FB87216166C0985D3745605DD3ACF13DBD422D7 + 71FDF2508A78C55B0416E747D30F163209EB773FD840DBD755268E4F5F1AA61D + CFBD95F64B721696D10785BC79A32A3702A3637D53863A19172FFCC79CD76AC0 + B2C924AC27BFB98A1EFD6A6DE2381C89D28E9FFD9BCE768EE87E49CEC2C27E3C + 9F0137C6B308446F88E2CC88976399C8D54CC15AC61EF8E1FD5B1491A06F2244 + 3FFD4B0BFDFDDD2ECD2FC949585311A9C9E0C4CE0DDB8702513A3B6268AE49A8 + FCCAD668451B2A209DC6C27FD3A1FBB3F7D7D1DEAD3529EDCD1FF7D2D32F9FA2 + EEC18994733909AB6B3CDC64F021D16296C82E5625B2D878890D986684D5E715 + A519E76AA6613998FF7E9E051A3B6E5F9C726E682C407B9E6FA64F3A946E3127 + 61B50C069A8CAEF6A2805BA14A643329E25E6B58F187F0C0DD4BE9A9FB56A5E4 + 5C8810B73F7B8486C7931E22E7602D3FD4B98985EC4D6450BC2AF9C72CDC1E09 + 9A5B1EE16DE63451B29A512177514521FDF6FBEB69759557D1FE87C317E857AF + 9E491CE71C2CB3BB9BD4892C84907FCAE4CE19BC1DB25A15609870A733AEBA17 + E5BB188C2D54595E9068FBACDF4F5F7A2259C5B0342C17F3FBEB5589AC891291 + F26139ED545FAE8405570A976A40B3B244F2CCAE3A7A645B32E8407D70D9B70E + 26AAEF9686853ADE5A55D81E9C5ED2372A9402115162CE525741609C58CF4225 + 0335CAC9F0D5DD83F1F33D6B69F75DD589E310FBEEE58F1C8A41832C0D8BE7BA + 0C2E16C6AC7261A1836EC8D7DEDAA61612F54BCC2D72568D15B0B6FEF85F8DEC + 135C58BCAF2A2A70D11757CDA7EFDD5B4B2E4772C09C6E1B66C972B2B26116D6 + DE17FF9B920248893F946D2CE56B78E3975FB97AB0784101126924D45A42C563 + 6181932A0B8D43920B967B76388417E8E4CD0A5892243512CD7CA5F8277F6EA1 + 036F5D4A1C9B8565525B6C36DB51DE895981C50BB7F560012E2AF47999509209 + 968542B12C88997558C7CEF6C5722DF96AB1A561618E59A9B22CDE9C85CDA155 + 0C5299C7AE7B3F148D3D2A9028398109AE2D96A508AAED69B3060B70FEFA4E3B + ED3FF0114D0695B9A2A561F1EA82D0C5E9AD63F9EC3C1626F1EA8E9E2D217800 + 1424E2D8782387D2C7EE73613A2254BF577C22B92AA08075B0B9C3102C494A5A + CD4480459EDD3E3AFA610F5D1E98E07EFEB907EBA9725E32B4FFEE6FDE8B1581 + E3FAFD631BC8E5D41F903A6AB87BED82AB3767E1261B3879965161DE69F58515 + EB5EBCEABBBC228254C135BD454E967CCFCDDD4D669362BCEC06CB31230C68D4 + 1E614DBC60FCA622278B1495E59F4136F23147C152E39D97AD0C085846A4F526 + BD96FCCCD5614F873FAC5D8EC2AD96716A8E7261DE7FBF7F2ABEE34AC0322A24 + B5B5CCC26C3AC010C1A1D6870545A3D50D6C4D43559F775FD5265201CB8C50CD + C05289D7ED485819463FDC149259FC64B26712967B63FE9597F7B04F03D01174 + A8AAFA025626C28DE37BE443D76E47AB80652109581692806521590ED6AECD55 + 545AE4A6931707E9F8B901012BDB9DD292D361A7BDDB6A28128952479F9F8E9C + EA16B0B2DD293D6D5C51117BE3A4EDF3716AEF1D17B0B2DD2933CA1416CACAF5 + D9EEBC495D66B05AE307350F1FAC952469F14C6E78ADE5B0DB4E9E7F79E710EF + 9CF80F8D2D2401CB4212B02C2401CB4212B02C2401CB42FA3FF896A69B0C9D8C + 0A0000000049454E44AE426082} end object Label1: TLabel - Left = 125 + Left = 156 Top = 284 Width = 184 Height = 18 - Caption = 'Created by SIL International' + Caption = 'Created by SIL Global' Color = clWhite Font.Charset = ANSI_CHARSET Font.Color = clBlack diff --git a/developer/src/tike/xml/project/globalwelcome.xsl b/developer/src/tike/xml/project/globalwelcome.xsl index aecd70d90ff..5ef8c4a7e1f 100644 --- a/developer/src/tike/xml/project/globalwelcome.xsl +++ b/developer/src/tike/xml/project/globalwelcome.xsl @@ -18,8 +18,8 @@

Version

-
Created by SIL International - +
Created by SIL Global +
diff --git a/developer/src/tike/xml/project/project.css b/developer/src/tike/xml/project/project.css index c9486e4ac6e..cd29ef360f7 100644 --- a/developer/src/tike/xml/project/project.css +++ b/developer/src/tike/xml/project/project.css @@ -281,7 +281,8 @@ k\:menuitem.down { #header-sil img { vertical-align: top; - margin-left: 4px; + margin-left: -6px; + margin-top: 7px; } #header-sil > div { diff --git a/developer/src/tike/xml/project/sil.png b/developer/src/tike/xml/project/sil.png index 08a4291d5e8..b65c2a4e086 100644 Binary files a/developer/src/tike/xml/project/sil.png and b/developer/src/tike/xml/project/sil.png differ diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index 7902ce7a682..75530e6bde1 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -3,30 +3,30 @@ # # @darcywong00 @mcdurdin @ermshiperete @rc-swag @SabineSIL @sgschantz -/android/ @darcywong00 @sgschantz +/android/ @darcywong00 @sgschantz -/common/ @mcdurdin @rc-swag -/core/ @mcdurdin @rc-swag -/common/lexical-model-types/ @jahorton @mcdurdin -/common/models/ @jahorton @mcdurdin -/common/predictive-text/ @jahorton @mcdurdin -/common/schemas/ @mcdurdin @jahorton -/common/test/ @mcdurdin @ermshiperete -/common/web/ @jahorton @mcdurdin +/common/ @mcdurdin @rc-swag +/core/ @mcdurdin @rc-swag +/common/lexical-model-types/ @jahorton @mcdurdin +/common/models/ @jahorton @mcdurdin +/common/schemas/ @mcdurdin @jahorton +/common/test/ @mcdurdin @ermshiperete +/common/web/ @jahorton @mcdurdin -/developer/ @mcdurdin @darcywong00 -/docs/ @mcdurdin @jahorton -/ios/ @sgschantz @jahorton -/linux/ @ermshiperete @darcywong00 -/mac/ @sgschantz @SabineSIL +/developer/ @mcdurdin @darcywong00 +/docs/ @mcdurdin @jahorton +/ios/ @sgschantz @jahorton +/linux/ @ermshiperete @darcywong00 +/mac/ @sgschantz @SabineSIL -/oem/firstvoices/android/ @darcywong00 @sgschantz -/oem/firstvoices/common/ @mcdurdin @rc-swag -/oem/firstvoices/ios/ @sgschantz @jahorton -/oem/firstvoices/windows/ @rc-swag @ermshiperete -/resources/ @mcdurdin @jahorton +/oem/firstvoices/android/ @darcywong00 @sgschantz +/oem/firstvoices/common/ @mcdurdin @rc-swag +/oem/firstvoices/ios/ @sgschantz @jahorton +/oem/firstvoices/windows/ @rc-swag @ermshiperete +/resources/ @mcdurdin @jahorton # Web is currently shared between Eberhard and Joshua: -/web/ @ermshiperete @jahorton +/web/ @ermshiperete @jahorton +/web/src/engine/predictive-text/ @jahorton @mcdurdin -/windows/ @rc-swag @ermshiperete +/windows/ @rc-swag @ermshiperete diff --git a/docs/file-formats/kmx-file-format.md b/docs/file-formats/kmx-file-format.md index 6de14df56fe..67288bc123c 100644 --- a/docs/file-formats/kmx-file-format.md +++ b/docs/file-formats/kmx-file-format.md @@ -44,12 +44,14 @@ The very first section is a header that describes the remainder of the file. |44 | 32 | `StartGroup_Unicode` | index of starting Unicode `COMP_GROUP`, `0xFFFFFFFF` means unused | |48 | 32 | `dwFlags` | global flags for the keyboard, see description below | |52 | 32 | `dwHotKey` | default hotkey for keyboard, from [`&Hotkey`], see description below | -|56 | 32 | `dpBitmapOffset` | offset of keyboard icon, `0x0` if not present | +|56 | 32 | `dpBitmapOffset` | offset of keyboard icon | |60 | 32 | `dwBitmapSize` | size in bytes of keyboard icon, `0x0` if not present | This structure is present at the start of every .kmx file. The `KXTS` identifier can be used as a 'magic' to determine whether a binary file is a .kmx file. +Note that `dpBitmapOffset` should be ignored if `dwBitmapSize` is `0x0` -- it may be a non-zero value. + ### `dwFileVersion`: Minimum version of Keyman required to read the file The `dwFileVersion` property should be checked before attempting to read any @@ -220,7 +222,7 @@ file and is never written to the binary format. | ∆ | Bits | Name | Description | |----|------|--------------|------------------------------------------------------------------------------------------------| -| 0 | 16 | `Key` | Keyman virtual key for the rule, 0 if unused | +| 0 | 16 | `Key` | [Keyman virtual key], virtual character key, or character, for the rule, 0 if unused | | 2 | 16 | (unused) | padding, reserved | | 4 | 32 | `Line` | Line number for the rule, 0 if not compiled with debug information | | 8 | 32 | `ShiftFlags` | Modifier flags for the key, see description below | @@ -232,6 +234,58 @@ compiler expands `any()` statements found in the key part of a rule into multiple rules -- so the key part of the rule is always only ever matching a single key combination. +`ShiftFlags` contains a set of modifier and state key flags, and some additional +flags that determine how to interpret `Key`. + +### Modifier and state key flags + +The modifier and state key flags are: + +| Bit mask | Name | Description | +|--------------|------------------|-----------------------------------------------------------| +| `0x00000001` | `LCTRLFLAG` | Left Control key | +| `0x00000002` | `RCTRLFLAG` | Right Control key | +| `0x00000004` | `LALTFLAG` | Left Alt key (Option on macOS) | +| `0x00000008` | `RALTFLAG` | Right Alt key | +| `0x00000010` | `K_SHIFTFLAG` | Either Shift key | +| `0x00000020` | `K_CTRLFLAG` | Either Ctrl key | +| `0x00000040` | `K_ALTFLAG` | Either Alt key | +| `0x00000080` | `K_METAFLAG` | Either Meta key. Reserved, not for use in .kmx | +| `0x00000100` | `CAPITALFLAG` | Caps lock on | +| `0x00000200` | `NOTCAPITALFLAG` | Caps lock NOT on | +| `0x00000400` | `NUMLOCKFLAG` | Num lock on | +| `0x00000800` | `NOTNUMLOCKFLAG` | Num lock NOT on | +| `0x00001000` | `SCROLLFLAG` | Scroll lock on | +| `0x00002000` | `NOTSCROLLFLAG` | Scroll lock NOT on | + +* The chiral (left/right) modifier flags should not be used together with the + non-chiral flags. +* If neither `CAPITALFLAG` nor `NOTCAPITALFLAG` are set, then the state of the + Caps Lock key is ignored, and the same principle applies for Num lock and + Scroll lock. +* The Meta key may be the Windows key on Windows, or the + Command key on macOS. This flag is reserved for internal use, and + is not valid in a .kmx file. + +### Additional flags + +The meaning of `Key` is determined by the flags `ISVIRTUALKEY` and +`VIRTUALCHARKEY` in `ShiftFlags` (mask `0x0000C000`): + +* `0`: `Key` is a character on a key cap (US English unless the keyboard is a + mnemonic layout). All other shift flags are ignord +* `ISVIRTUALKEY`: `Key` is a US English virtual key +* `VIRTUALCHARKEY`: `Key` is a character on a key cap, combined with the shift + flags (US English unless the keyboard is a mnemonic layout) + +| Bit mask | Name | Description | +|--------------|------------------|-----------------------------------------------| +| `0x00004000` | `ISVIRTUALKEY` | `Key` is a virtual key | +| `0x00008000` | `VIRTUALCHARKEY` | Keyman 6.0+: `Key` is a Virtual character key | + +Note that the shift flags for key rules do not use the same values as hotkeys +for historical reasons. + ## Debug information for keyboards When debug information is present, it will be found in four places in compiled diff --git a/linux/scripts/dist.sh b/linux/scripts/dist.sh index 0038034d421..6ef0be7d8bb 100755 --- a/linux/scripts/dist.sh +++ b/linux/scripts/dist.sh @@ -30,28 +30,37 @@ cp -a debian ../ cd .. echo "3.0 (native)" > debian/source/format dch keyman --newversion "${VERSION}" --force-bad-version --nomultimaint -dpkg-source --tar-ignore=*~ --tar-ignore=.git --tar-ignore=.gitattributes \ - --tar-ignore=.gitignore --tar-ignore=experiments --tar-ignore=debian \ - --tar-ignore=.github --tar-ignore=.vscode --tar-ignore=android \ +dpkg-source --tar-ignore=*~ \ + --tar-ignore=.git \ + --tar-ignore=.gitattributes \ + --tar-ignore=.gitignore \ + --tar-ignore=experiments \ + --tar-ignore=debian \ + --tar-ignore=.github \ + --tar-ignore=.vscode \ + --tar-ignore=android \ --tar-ignore=.devcontainer \ --tar-ignore=artifacts \ \ --tar-ignore=common/models \ - --tar-ignore=common/predictive-text \ --tar-ignore=common/resources \ --tar-ignore=common/schemas \ --tar-ignore=common/test/keyboards/build.* \ - --tar-ignore=common/test/predictive-text \ --tar-ignore=common/test/resources \ --tar-ignore=common/web \ --tar-ignore=common/windows \ \ --tar-ignore=core/build \ - --tar-ignore=developer --tar-ignore=docs --tar-ignore=ios \ + --tar-ignore=developer \ + --tar-ignore=docs \ + --tar-ignore=ios \ --tar-ignore=linux/keyman-config/keyman_config/version.py \ - --tar-ignore=linux/keyman-config/buildtools/build-langtags.py --tar-ignore=__pycache__ \ + --tar-ignore=linux/keyman-config/buildtools/build-langtags.py \ + --tar-ignore=__pycache__ \ --tar-ignore=linux/help \ - --tar-ignore=mac --tar-ignore=node_modules --tar-ignore=oem \ + --tar-ignore=mac \ + --tar-ignore=node_modules \ + --tar-ignore=oem \ --tar-ignore=linux/build \ --tar-ignore=linux/builddebs \ --tar-ignore=linux/ibus-keyman/build \ @@ -60,11 +69,17 @@ dpkg-source --tar-ignore=*~ --tar-ignore=.git --tar-ignore=.gitattributes \ --tar-ignore=resources/environment.sh \ --tar-ignore=resources/git-hooks \ --tar-ignore=resources/scopes \ - --tar-ignore=resources/build/*.lua --tar-ignore=resources/build/jq* \ + --tar-ignore=resources/build/*.lua \ + --tar-ignore=resources/build/jq* \ --tar-ignore=results \ --tar-ignore=tmp \ - --tar-ignore=web --tar-ignore=windows --tar-ignore=keyman_1* \ - --tar-ignore=dist --tar-ignore=VERSION -Zgzip -b . + --tar-ignore=web \ + --tar-ignore=windows \ + --tar-ignore=keyman_1* \ + --tar-ignore=dist \ + --tar-ignore=VERSION \ + \ + -Zgzip -b . mv ../keyman_"${VERSION}".tar.gz linux/dist/keyman-"${VERSION}".tar.gz echo "3.0 (quilt)" > debian/source/format cd "$BASEDIR" diff --git a/package-lock.json b/package-lock.json index 6b1a73ef408..99a3d2f934b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,9 +25,9 @@ "common/test/resources", "common/tools/*", "common/web/*", - "common/predictive-text", "common/tools/hextobin", - "web" + "web", + "web/src/engine/predictive-text/*" ], "dependencies": { "@keymanapp/common-types": "file:common/web/types", @@ -108,7 +108,7 @@ "typescript": "^5.4.5" } }, - "common/predictive-text": { + "web/src/engine/predictive-text/worker-main": { "name": "@keymanapp/lexical-model-layer", "license": "MIT", "dependencies": { @@ -191,23 +191,6 @@ "typescript": "^5.4.5" } }, - "common/web/keyboard-processor": { - "name": "@keymanapp/keyboard-processor", - "license": "MIT", - "dependencies": { - "@keymanapp/common-types": "*", - "@keymanapp/keyman-version": "*", - "@keymanapp/models-types": "*", - "@keymanapp/web-utils": "*" - }, - "devDependencies": { - "@keymanapp/resources-gosh": "*", - "c8": "^7.12.0", - "mocha": "^10.0.0", - "mocha-teamcity-reporter": "^4.0.0", - "typescript": "^5.4.5" - } - }, "common/web/keyman-version": { "name": "@keymanapp/keyman-version", "license": "MIT", @@ -215,7 +198,7 @@ "typescript": "^5.4.5" } }, - "common/web/lm-message-types": { + "web/src/engine/predictive-text/types": { "name": "@keymanapp/lm-message-types", "license": "MIT", "devDependencies": { @@ -245,19 +228,6 @@ "typescript": "^5.4.5" } }, - "web/src/tools/testing/recorder-core": { - "name": "@keymanapp/recorder-core", - "license": "MIT", - "dependencies": { - "@keymanapp/keyboard-processor": "*", - "@keymanapp/keyman-version": "*", - "@keymanapp/models-types": "*", - "@keymanapp/web-utils": "*" - }, - "devDependencies": { - "typescript": "^5.4.5" - } - }, "common/web/sentry-manager": { "name": "@keymanapp/web-sentry-manager", "license": "MIT", @@ -478,7 +448,9 @@ "name": "@keymanapp/developer-utils", "license": "MIT", "dependencies": { + "@keymanapp/common-types": "*", "@sentry/node": "^7.57.0", + "eventemitter3": "^5.0.0", "restructure": "^3.0.1", "sax": ">=0.6.0", "semver": "^7.5.2", @@ -2017,7 +1989,11 @@ "multer": "^1.4.5-lts.1", "ngrok": "^5.0.0-beta.2", "open": "^8.4.0", - "ws": "^8.17.1" + "restructure": "^3.0.1", + "sax": ">=0.6.0", + "semver": "^7.5.2", + "ws": "^8.17.1", + "xmlbuilder": "~11.0.0" }, "devDependencies": { "@keymanapp/keyman-version": "*", @@ -2029,12 +2005,12 @@ "@types/ws": "^8.2.2", "copyfiles": "^2.4.1", "mocha": "^10.0.0", + "node-gyp": "^10.2.0", "tsc-watch": "^4.5.0", "typescript": "^5.4.5" }, "optionalDependencies": { - "hetrodo-node-hide-console-window-napi": "keymanapp/hetrodo-node-hide-console-window-napi#keyman-15.0", - "node-windows-trayicon": "keymanapp/node-windows-trayicon#keyman-16.0" + "node-hide-console-window": "^2.2.0" } }, "developer/src/server/node_modules/@types/mocha": { @@ -2674,12 +2650,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "optional": true - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -2721,6 +2691,102 @@ "integrity": "sha512-tWZNBIS1CoekcwlMuyG2mr0a1Wo5lb5lEHwwWvZo+5GLgr3e9LLDTtmgtCWEwBpXMkxn9D+2W9j2FY6eZQq0tA==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "dev": true, @@ -2785,10 +2851,6 @@ "resolved": "common/tools/hextobin", "link": true }, - "node_modules/@keymanapp/keyboard-processor": { - "resolved": "common/web/keyboard-processor", - "link": true - }, "node_modules/@keymanapp/keyman-version": { "resolved": "common/web/keyman-version", "link": true @@ -2830,11 +2892,11 @@ "link": true }, "node_modules/@keymanapp/lexical-model-layer": { - "resolved": "common/predictive-text", + "resolved": "web/src/engine/predictive-text/worker-main", "link": true }, "node_modules/@keymanapp/lm-message-types": { - "resolved": "common/web/lm-message-types", + "resolved": "web/src/engine/predictive-text/types", "link": true }, "node_modules/@keymanapp/lm-worker": { @@ -3230,43 +3292,80 @@ "node": ">= 8" } }, - "node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "optional": true, + "node_modules/@npmcli/agent": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", + "dev": true, "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "optional": true, + "node_modules/@npmcli/agent/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "debug": "^4.3.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 14" } }, - "node_modules/@npmcli/move-file/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "optional": true, - "bin": { - "mkdirp": "bin/cmd.js" + "node_modules/@npmcli/agent/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" }, "engines": { - "node": ">=10" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@npmcli/agent/node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/@npmcli/fs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.1.tgz", + "integrity": "sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@octokit/auth-token": { @@ -3421,6 +3520,16 @@ "@octokit/openapi-types": "^11.2.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@puppeteer/browsers": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.2.tgz", @@ -4264,15 +4373,6 @@ "node": ">=10" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "optional": true, - "engines": { - "node": ">= 10" - } - }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -5502,10 +5602,13 @@ } }, "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "optional": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/accepts": { "version": "1.3.8", @@ -5551,7 +5654,7 @@ }, "node_modules/agent-base": { "version": "6.0.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -5560,25 +5663,11 @@ "node": ">= 6.0.0" } }, - "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "optional": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "optional": true, + "dev": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -5752,36 +5841,6 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/aproba": { - "version": "2.0.0", - "license": "ISC", - "optional": true - }, - "node_modules/are-we-there-yet": { - "version": "3.0.1", - "license": "ISC", - "optional": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/are-we-there-yet/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "optional": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/arg": { "version": "4.1.3", "dev": true, @@ -5953,7 +6012,7 @@ }, "node_modules/balanced-match": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/bare-events": { @@ -6043,15 +6102,6 @@ "node": ">=8" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -6107,7 +6157,7 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -6233,93 +6283,104 @@ } }, "node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "optional": true, + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.4.tgz", + "integrity": "sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==", + "dev": true, "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/cacache/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "optional": true, + "dev": true, "dependencies": { "balanced-match": "^1.0.0" } }, - "node_modules/cacache/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "optional": true, + "node_modules/cacache/node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=12" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/node_modules/lru-cache": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.16.1.tgz", - "integrity": "sha512-9kkuMZHnLH/8qXARvYSjNvq8S1GYFFzynQTAfKeaJ0sIrR3PUPuu37Z+EiIANiZBvpfTf2B5y8ecDLSMWlLv+w==", - "optional": true, - "engines": { - "node": ">=12" + "node_modules/cacache/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "optional": true, + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "optional": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, + "node_modules/cacache/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/cache-content-type": { @@ -6496,7 +6557,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "optional": true, + "dev": true, "engines": { "node": ">=10" } @@ -6549,7 +6610,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "optional": true, + "dev": true, "engines": { "node": ">=6" } @@ -6676,14 +6737,6 @@ "version": "1.1.4", "license": "MIT" }, - "node_modules/color-support": { - "version": "1.1.3", - "license": "ISC", - "optional": true, - "bin": { - "color-support": "bin.js" - } - }, "node_modules/combine-source-map": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", @@ -6792,7 +6845,7 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/concat-stream": { @@ -6808,11 +6861,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "license": "ISC", - "optional": true - }, "node_modules/content-disposition": { "version": "0.5.4", "license": "MIT", @@ -7119,12 +7167,12 @@ }, "node_modules/delegates": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/depd": { "version": "1.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -7194,6 +7242,12 @@ "dev": true, "license": "MIT" }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", "license": "MIT" @@ -7252,7 +7306,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "optional": true, + "dev": true, "engines": { "node": ">=6" } @@ -7261,7 +7315,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "optional": true + "dev": true }, "node_modules/errorstacks": { "version": "2.4.1", @@ -8499,6 +8553,12 @@ "which": "bin/which" } }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, "node_modules/express": { "version": "4.19.2", "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", @@ -8706,12 +8766,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "optional": true - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -8865,20 +8919,20 @@ } }, "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "optional": true, + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, "dependencies": { - "minipass": "^3.0.0" + "minipass": "^7.0.3" }, "engines": { - "node": ">= 8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/fs.realpath": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -8928,72 +8982,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "4.0.4", - "license": "ISC", - "optional": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/gauge/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "optional": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/wide-align": { - "version": "1.1.5", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "license": "ISC", @@ -9191,7 +9179,7 @@ }, "node_modules/glob": { "version": "7.1.6", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -9306,7 +9294,7 @@ }, "node_modules/graceful-fs": { "version": "4.2.10", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -9399,11 +9387,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC", - "optional": true - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -9424,17 +9407,6 @@ "he": "bin/he" } }, - "node_modules/hetrodo-node-hide-console-window-napi": { - "name": "node-hide-console-window", - "version": "2.0.1", - "resolved": "git+ssh://git@github.com/keymanapp/hetrodo-node-hide-console-window-napi.git#858b23036a9963b40ad6ff3c5bacd421e5839b92", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/hexy": { "version": "0.3.4", "dev": true, @@ -9498,8 +9470,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "license": "BSD-2-Clause" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-errors": { "version": "2.0.0", @@ -9533,17 +9506,45 @@ } }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "optional": true, + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/http2-wrapper": { @@ -9561,7 +9562,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "devOptional": true, + "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -9570,15 +9571,6 @@ "node": ">= 6" } }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "optional": true, - "dependencies": { - "ms": "^2.0.0" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -9652,7 +9644,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.8.19" } @@ -9661,17 +9653,11 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "optional": true, + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "optional": true - }, "node_modules/inflation": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.1.0.tgz", @@ -9683,7 +9669,7 @@ }, "node_modules/inflight": { "version": "1.0.6", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -9738,7 +9724,26 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==", - "devOptional": true + "dev": true + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -9920,7 +9925,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "optional": true + "dev": true }, "node_modules/is-module": { "version": "1.0.0", @@ -10157,6 +10162,21 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -10180,6 +10200,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/jsdom": { "version": "23.0.1", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", @@ -10249,19 +10275,6 @@ } } }, - "node_modules/jsdom/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/jsdom/node_modules/https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -10824,39 +10837,26 @@ "peer": true }, "node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "optional": true, + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", + "dev": true, "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", + "proc-log": "^4.2.0", "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.16.1.tgz", - "integrity": "sha512-9kkuMZHnLH/8qXARvYSjNvq8S1GYFFzynQTAfKeaJ0sIrR3PUPuu37Z+EiIANiZBvpfTf2B5y8ecDLSMWlLv+w==", - "optional": true, - "engines": { - "node": ">=12" + "node": "^16.14.0 || >=18.0.0" } }, "node_modules/map-stream": { @@ -10955,7 +10955,7 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -10969,41 +10969,38 @@ "license": "MIT" }, "node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "optional": true, - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" } }, "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "optional": true, + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, "dependencies": { - "minipass": "^3.0.0" + "minipass": "^7.0.3" }, "engines": { - "node": ">= 8" + "node": ">=16 || 14 >=14.17" } }, "node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "optional": true, + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.5.tgz", + "integrity": "sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg==", + "dev": true, "dependencies": { - "minipass": "^3.1.6", + "minipass": "^7.0.3", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -11013,7 +11010,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "optional": true, + "dev": true, "dependencies": { "minipass": "^3.0.0" }, @@ -11021,11 +11018,23 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "optional": true, + "dev": true, "dependencies": { "minipass": "^3.0.0" }, @@ -11033,13 +11042,37 @@ "node": ">=8" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" }, "engines": { "node": ">=8" @@ -11049,7 +11082,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "optional": true, + "dev": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -11058,6 +11091,18 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -11413,12 +11458,6 @@ "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", "dev": true }, - "node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "optional": true - }, "node_modules/node-cleanup": { "version": "2.1.2", "dev": true, @@ -11443,44 +11482,134 @@ } }, "node_modules/node-gyp": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", - "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", - "optional": true, + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz", + "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==", + "dev": true, "dependencies": { "env-paths": "^2.2.0", - "glob": "^7.1.4", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" + "tar": "^6.2.1", + "which": "^4.0.0" }, "bin": { "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": "^12.13 || ^14.13 || >=16" + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/node-windows-trayicon": { - "name": "windows-trayicon", - "version": "3.0.0", - "resolved": "git+ssh://git@github.com/keymanapp/node-windows-trayicon.git#b3dda72327141cd99b4e21d3f5d7002bb17c2131", + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/node-gyp/node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/node-hide-console-window": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-hide-console-window/-/node-hide-console-window-2.2.0.tgz", + "integrity": "sha512-CNLpd14IJbDQqzl6ryrpc4tjB2modRV+OvKekuu0KvLhqBj7ybmDWTXxHexG6LRrWW55Hfky/ZyZheh0xVXxDg==", "hasInstallScript": true, - "license": "MIT", "optional": true, "os": [ "win32" - ], - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^3.1.0", - "node-gyp": "^9.1.0" - } + ] }, "node_modules/noms": { "version": "0.0.0", @@ -11513,18 +11642,18 @@ "license": "MIT" }, "node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "optional": true, + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "dev": true, "dependencies": { - "abbrev": "^1.0.0" + "abbrev": "^2.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/normalize-path": { @@ -11562,20 +11691,6 @@ "node": ">=4" } }, - "node_modules/npmlog": { - "version": "6.0.2", - "license": "ISC", - "optional": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, "node_modules/number-is-nan": { "version": "1.0.1", "dev": true, @@ -11781,7 +11896,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "optional": true, + "dev": true, "dependencies": { "aggregate-error": "^3.0.0" }, @@ -11840,19 +11955,6 @@ } } }, - "node_modules/pac-proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", @@ -11866,20 +11968,6 @@ "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.1", - "debug": "^4.3.4", - "socks": "^2.7.1" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/pac-resolver": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", @@ -11893,6 +11981,12 @@ "node": ">= 14" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/pako": { "version": "1.0.11", "license": "(MIT AND Zlib)" @@ -11950,7 +12044,7 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -11969,6 +12063,28 @@ "dev": true, "license": "MIT" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/path-to-regexp": { "version": "0.1.7", "license": "MIT" @@ -12077,6 +12193,15 @@ "node": ">= 0.8.0" } }, + "node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "license": "MIT" @@ -12089,17 +12214,11 @@ "node": ">=0.4.0" } }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "optional": true - }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "optional": true, + "dev": true, "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -12173,19 +12292,6 @@ } } }, - "node_modules/proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/proxy-agent/node_modules/https-proxy-agent": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", @@ -12208,20 +12314,6 @@ "node": ">=12" } }, - "node_modules/proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", - "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.1", - "debug": "^4.3.4", - "socks": "^2.7.1" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "dev": true, @@ -12600,7 +12692,7 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "optional": true, + "dev": true, "engines": { "node": ">= 4" } @@ -12617,7 +12709,7 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -12860,11 +12952,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC", - "optional": true - }, "node_modules/set-immediate-shim": { "version": "1.0.1", "license": "MIT", @@ -13050,45 +13137,57 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "devOptional": true, + "dev": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "devOptional": true, + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "optional": true, + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dev": true, "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" }, "engines": { - "node": ">= 10" + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "optional": true, + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -13137,15 +13236,15 @@ "dev": true }, "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "optional": true, + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", + "dev": true, "dependencies": { - "minipass": "^3.1.1" + "minipass": "^7.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/statuses": { @@ -13218,6 +13317,51 @@ "node": ">=0.10.0" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.codepointat": { "version": "0.2.1", "license": "MIT" @@ -13281,6 +13425,28 @@ "node": ">=0.10.0" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -13391,7 +13557,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "optional": true, + "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -13429,11 +13595,35 @@ "streamx": "^2.15.0" } }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tar/node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "optional": true, + "dev": true, "engines": { "node": ">=8" } @@ -13442,7 +13632,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "optional": true, + "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -13834,27 +14024,27 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "optional": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, "dependencies": { - "unique-slug": "^3.0.0" + "unique-slug": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "optional": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, "dependencies": { "imurmurhash": "^0.1.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/universal-user-agent": { @@ -14030,7 +14220,7 @@ }, "node_modules/which": { "version": "2.0.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -14137,6 +14327,68 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "5.0.1", "license": "MIT", @@ -14548,7 +14800,6 @@ "name": "keyman", "license": "MIT", "dependencies": { - "@keymanapp/keyboard-processor": "*", "@keymanapp/keyman-version": "*", "@keymanapp/lexical-model-layer": "*", "@keymanapp/models-types": "*", @@ -14567,6 +14818,19 @@ "jsdom": "^23.0.1", "mocha": "^10.0.0" } + }, + "web/src/tools/testing/recorder-core": { + "name": "@keymanapp/recorder-core", + "license": "MIT", + "dependencies": { + "@keymanapp/keyboard-processor": "*", + "@keymanapp/keyman-version": "*", + "@keymanapp/models-types": "*", + "@keymanapp/web-utils": "*" + }, + "devDependencies": { + "typescript": "^5.4.5" + } } } } diff --git a/package.json b/package.json index 638f2b2fad1..3f0012db10c 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,9 @@ "common/test/resources", "common/tools/*", "common/web/*", - "common/predictive-text", "common/tools/hextobin", - "web" + "web", + "web/src/engine/predictive-text/*" ], "dependencies": { "@keymanapp/common-types": "file:common/web/types", diff --git a/tsconfig.base.json b/tsconfig.base.json index e34839a52ce..7f69376372d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,13 +26,12 @@ "paths": { "@keymanapp/common-types": ["./common/web/types/src/main"], - "@keymanapp/keyboard-processor": ["./common/web/keyboard-processor/src"], "@keymanapp/keyman": ["./web" ], "@keymanapp/models-types": ["./common/models/types"], "@keymanapp/models-templates": ["./common/models/templates"], "@keymanapp/models-wordbreakers": ["./common/models/wordbreakers"], "@keymanapp/web-utils": ["./common/web/utils"], - "@keymanapp/lm-message-types": ["./common/web/lm-message-types"], + "@keymanapp/lm-message-types": ["./web/src/engine/predictive-text/types"], "@keymanapp/keyman-version": ["./common/web/keyman-version"], "@keymanapp/ldml-keyboard-constants": [ "./core/include/ldml" ], } diff --git a/tsconfig.json b/tsconfig.json index 093cec46f4a..252fd738dc3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,14 +5,11 @@ { "path": "./common/models/templates/tsconfig.json" }, { "path": "./common/models/types/tsconfig.json" }, { "path": "./common/models/wordbreakers/tsconfig.json" }, - { "path": "./common/predictive-text/tsconfig.all.json" }, { "path": "./common/tools/hextobin/" }, { "path": "./common/web/gesture-recognizer/tsconfig.json" }, { "path": "./common/web/gesture-recognizer/src/tools/unit-test-resources/tsconfig.json" }, - { "path": "./common/web/keyboard-processor/tsconfig.json" }, { "path": "./common/web/keyman-version" }, - { "path": "./common/web/lm-message-types/" }, { "path": "./common/web/lm-worker/" }, { "path": "./common/web/recorder/tsconfig.json" }, { "path": "./common/web/sentry-manager/src/tsconfig.json" }, @@ -44,6 +41,8 @@ { "path": "./resources/build/version/" }, { "path": "./web/src/tsconfig.all.json" }, + { "path": "./web/src/engine/predictive-text/types/" }, + { "path": "./web/src/engine/predictive-text/worker-main/tsconfig.all.json" }, // { "path": "./web/tools/recorder/tsconfig.json" }, // { "path": "./web/tools/sourcemap-root/tsconfig.json" }, ] diff --git a/web/README.md b/web/README.md index 1249805165e..1e41497657c 100644 --- a/web/README.md +++ b/web/README.md @@ -81,7 +81,8 @@ title: Dependency Graph %%{init: {"flowchart": {"htmlLabels": false}} }%% graph TD; OSK["/web/src/engine/osk"]; - KP["@keymanapp/keyboard-processor
(/common/web/keyboard-processor)"]; + KP["/web/src/engine/keyboard"]; + JSProc["/web/src/engine/js-processor"]; OSK-->KP; WebUtils["@keymanapp/web-utils
(/common/web/utils)"]; KP---->WebUtils; @@ -91,7 +92,7 @@ graph TD; LMWorker["@keymanapp/lm-worker
(/common/web/lm-worker)"]; LMWorker-->Models; LMWorker-->Wordbreakers; - LMLayer["@keymanapp/lexical-model-layer
(/common/predictive-text)"]; + LMLayer["@keymanapp/lexical-model-layer
(/web/src/engine/predictive-text/worker-main)"]; LMLayer-->LMWorker; Gestures["@keymanapp/gesture-recognizer
(/common/web/gesture-recognizer)"]; Gestures-->WebUtils; @@ -107,6 +108,7 @@ graph TD; Fully headless components`"] direction LR KP; + JSProc-->KP; WebUtils; PredText; Gestures; @@ -117,9 +119,9 @@ graph TD; Device["/web/src/engine/device-detect"]; Device----->WebUtils; Elements["/web/src/engine/element-wrappers"]; - Elements-->KP; - KeyboardCache["/web/src/engine/package-cache"]; - KeyboardCache-->Interfaces; + Elements-->JSProc; + KeyboardStorage["/web/src/engine/keyboard-storage"]; + KeyboardStorage-->Interfaces; DomUtils["/web/src/engine/dom-utils"]; DomUtils-->WebUtils; DomUtils-->KP; @@ -127,11 +129,11 @@ graph TD; OSK-->Gestures; Interfaces["/web/src/engine/interfaces"]; Interfaces-->KP; + Interfaces-->JSProc; OSK-->Interfaces; CommonEngine["/web/src/engine/main"]; - CommonEngine-->Interfaces; CommonEngine-->Device; - CommonEngine-->KeyboardCache; + CommonEngine-->KeyboardStorage; CommonEngine-->OSK; Attachment["/web/src/engine/attachment"]; Attachment-->DomUtils; diff --git a/web/build.sh b/web/build.sh index 7248f5c35af..f0dd201bc8d 100755 --- a/web/build.sh +++ b/web/build.sh @@ -27,10 +27,13 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \ ":engine/dom-utils A common subset of function used for DOM calculations, layout, etc" \ ":engine/events Specialized classes utilized to support KMW API events" \ ":engine/element-wrappers Subset used to integrate with website elements" \ + ":engine/interfaces Subset used to configure KMW" \ + ":engine/js-processor Build JS processor for KMW" \ + ":engine/keyboard Builds KMW's keyboard-loading and caching code" \ + ":engine/keyboard-storage Subset used to collate keyboards and request them from the cloud" \ ":engine/main Builds all common code used by KMW's app/-level targets" \ ":engine/osk Builds the Web OSK module" \ - ":engine/package-cache Subset used to collate keyboards and request them from the cloud" \ - ":engine/interfaces Subset used to configure KMW" \ + ":engine/predictive-text=src/engine/predictive-text/worker-main Builds KMW's predictive text module" \ ":samples Builds all needed resources for the KMW sample-page set" \ ":tools Builds engine-related development resources" \ ":test-pages=src/test/manual Builds resources needed for the KMW manual testing pages" \ @@ -57,10 +60,13 @@ builder_describe_outputs \ build:engine/dom-utils "/web/build/engine/dom-utils/obj/index.js" \ build:engine/events "/web/build/engine/events/lib/index.mjs" \ build:engine/element-wrappers "/web/build/engine/element-wrappers/lib/index.mjs" \ + build:engine/interfaces "/web/build/engine/interfaces/lib/index.mjs" \ + build:engine/js-processor "/web/build/engine/js-processor/lib/index.mjs" \ + build:engine/keyboard "/web/build/engine/keyboard/lib/index.mjs" \ + build:engine/keyboard-storage "/web/build/engine/keyboard-storage/lib/index.mjs" \ build:engine/main "/web/build/engine/main/lib/index.mjs" \ build:engine/osk "/web/build/engine/osk/lib/index.mjs" \ - build:engine/package-cache "/web/build/engine/package-cache/lib/index.mjs" \ - build:engine/interfaces "/web/build/engine/interfaces/lib/index.mjs" \ + build:engine/predictive-text "/web/src/engine/predictive-text/worker-main/build/lib/web/index.mjs" \ build:samples "/web/src/samples/simplest/keymanweb.js" \ build:tools "/web/build/tools/building/sourcemap-root/index.js" \ build:test-pages "/web/build/test-resources/sentry-manager.js" @@ -148,9 +154,9 @@ builder_run_child_actions build:engine/osk builder_run_child_actions build:engine/attachment # Uses engine/interfaces (due to resource-path config interface) -builder_run_child_actions build:engine/package-cache +builder_run_child_actions build:engine/keyboard-storage -# Uses engine/interfaces, engine/device-detect, engine/package-cache, & engine/osk +# Uses engine/interfaces, engine/device-detect, engine/keyboard-storage, & engine/osk builder_run_child_actions build:engine/main # Uses all but engine/element-wrappers and engine/attachment diff --git a/web/ci.sh b/web/ci.sh index 6e5bc3b06ac..5e26a1e30e2 100755 --- a/web/ci.sh +++ b/web/ci.sh @@ -85,7 +85,7 @@ if builder_start_action test; then # No --reporter option exists yet for the headless modules. - "$KEYMAN_ROOT/common/web/keyboard-processor/build.sh" test $OPTIONS + "$KEYMAN_ROOT/web/src/engine/keyboard/build.sh" test $OPTIONS "$KEYMAN_ROOT/common/web/gesture-recognizer/test.sh" $OPTIONS ./build.sh test $OPTIONS diff --git a/web/package.json b/web/package.json index 458ea85de01..96a11c0cd3e 100644 --- a/web/package.json +++ b/web/package.json @@ -37,21 +37,41 @@ "types": "./build/engine/events/obj/index.d.ts", "import": "./build/engine/events/obj/index.js" }, - "./engine/package-cache": { - "es6-bundling": "./src/engine/package-cache/src/index.ts", - "types": "./build/engine/package-cache/obj/index.d.ts", - "import": "./build/engine/package-cache/obj/index.js", - "require": "./build/engine/package-cache/obj/index.js" - }, - "./engine/package-cache/dom-requester": { - "es6-bundling": "./src/engine/package-cache/src/domCloudRequester.ts", - "types": "./build/engine/package-cache/obj/domCloudRequester.d.ts", - "import": "./build/engine/package-cache/obj/domCloudRequester.js" - }, - "./engine/package-cache/node-requester": { - "es6-bundling": "./src/engine/package-cache/src/nodeCloudRequester.ts", - "types": "./build/engine/package-cache/obj/nodeCloudRequester.d.ts", - "import": "./build/engine/package-cache/obj/nodeCloudRequester.js" + "./engine/js-processor": { + "es6-bundling": "./src/engine/js-processor/src/index.ts", + "types": "./build/engine/js-processor/obj/index.d.ts", + "import": "./build/engine/js-processor/obj/index.js" + }, + "./engine/keyboard": { + "es6-bundling": "./src/engine/keyboard/src/index.ts", + "types": "./build/engine/keyboard/obj/index.d.ts", + "import": "./build/engine/keyboard/obj/index.js" + }, + "./engine/keyboard/node-keyboard-loader": { + "es6-bundling": "./src/engine/keyboard/src/keyboards/loaders/node-keyboard-loader.ts", + "types": "./build/engine/keyboard/obj/keyboards/loaders/node-keyboard-loader.d.ts", + "import": "./build/engine/keyboard/obj/keyboards/loaders/node-keyboard-loader.js" + }, + "./engine/keyboard/dom-keyboard-loader": { + "es6-bundling": "./src/engine/keyboard/src/keyboards/loaders/dom-keyboard-loader.ts", + "types": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.d.ts", + "import": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.js" + }, + "./engine/keyboard-storage": { + "es6-bundling": "./src/engine/keyboard-storage/src/index.ts", + "types": "./build/engine/keyboard-storage/obj/index.d.ts", + "import": "./build/engine/keyboard-storage/obj/index.js", + "require": "./build/engine/keyboard-storage/obj/index.js" + }, + "./engine/keyboard-storage/dom-requester": { + "es6-bundling": "./src/engine/keyboard-storage/src/domCloudRequester.ts", + "types": "./build/engine/keyboard-storage/obj/domCloudRequester.d.ts", + "import": "./build/engine/keyboard-storage/obj/domCloudRequester.js" + }, + "./engine/keyboard-storage/node-requester": { + "es6-bundling": "./src/engine/keyboard-storage/src/nodeCloudRequester.ts", + "types": "./build/engine/keyboard-storage/obj/nodeCloudRequester.d.ts", + "import": "./build/engine/keyboard-storage/obj/nodeCloudRequester.js" }, "./engine/main": { "es6-bundling": "./src/engine/main/src/index.ts", @@ -99,7 +119,6 @@ "test": "gosh ./test.sh" }, "dependencies": { - "@keymanapp/keyboard-processor": "*", "@keymanapp/keyman-version": "*", "@keymanapp/lexical-model-layer": "*", "@keymanapp/models-types": "*", diff --git a/web/src/app/browser/src/beepHandler.ts b/web/src/app/browser/src/beepHandler.ts index 3659f8d7fdb..eb6d6583ee4 100644 --- a/web/src/app/browser/src/beepHandler.ts +++ b/web/src/app/browser/src/beepHandler.ts @@ -1,4 +1,4 @@ -import { type KeyboardInterface } from '@keymanapp/keyboard-processor'; +import { type KeyboardInterface } from 'keyman/engine/js-processor'; import { DesignIFrame, OutputTarget } from 'keyman/engine/element-wrappers'; // Utility object used to handle beep (keyboard error response) operations. diff --git a/web/src/app/browser/src/configuration.ts b/web/src/app/browser/src/configuration.ts index 07be8264e78..df2153df828 100644 --- a/web/src/app/browser/src/configuration.ts +++ b/web/src/app/browser/src/configuration.ts @@ -1,7 +1,7 @@ import { EngineConfiguration, InitOptionSpec, InitOptionDefaults } from "keyman/engine/main"; import { OutputTarget as DOMOutputTarget } from 'keyman/engine/element-wrappers'; -import { isEmptyTransform, OutputTarget, RuleBehavior } from '@keymanapp/keyboard-processor'; +import { isEmptyTransform, OutputTarget, RuleBehavior } from 'keyman/engine/js-processor'; import { AlertHost } from "./utils/alertHost.js"; import { whenDocumentReady } from "./utils/documentReady.js"; diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index 1511269bbe8..1fbc9052033 100644 --- a/web/src/app/browser/src/contextManager.ts +++ b/web/src/app/browser/src/contextManager.ts @@ -1,5 +1,5 @@ -import { type Keyboard, KeyboardScriptError } from '@keymanapp/keyboard-processor'; -import { type KeyboardStub } from 'keyman/engine/package-cache'; +import { type Keyboard, KeyboardScriptError } from 'keyman/engine/keyboard'; +import { type KeyboardStub } from 'keyman/engine/keyboard-storage'; import { CookieSerializer } from 'keyman/engine/dom-utils'; import { eventOutputTarget, outputTargetForElement, PageContextAttachment } from 'keyman/engine/attachment'; import { DomEventTracker, LegacyEventEmitter } from 'keyman/engine/events'; diff --git a/web/src/app/browser/src/defaultBrowserRules.ts b/web/src/app/browser/src/defaultBrowserRules.ts index 1ac48016892..4f0ffbe012e 100644 --- a/web/src/app/browser/src/defaultBrowserRules.ts +++ b/web/src/app/browser/src/defaultBrowserRules.ts @@ -2,9 +2,9 @@ import { ModifierKeyConstants } from '@keymanapp/common-types'; import { Codes, DefaultRules, - type KeyEvent, - type OutputTarget -} from '@keymanapp/keyboard-processor'; + type KeyEvent +} from 'keyman/engine/keyboard'; +import { type OutputTarget } from 'keyman/engine/js-processor'; import ContextManager from './contextManager.js'; diff --git a/web/src/app/browser/src/hardwareEventKeyboard.ts b/web/src/app/browser/src/hardwareEventKeyboard.ts index 29e867aa13c..0bb594e8975 100644 --- a/web/src/app/browser/src/hardwareEventKeyboard.ts +++ b/web/src/app/browser/src/hardwareEventKeyboard.ts @@ -1,4 +1,5 @@ -import { Codes, DeviceSpec, KeyEvent, KeyMapping, Keyboard, KeyboardProcessor } from '@keymanapp/keyboard-processor'; +import { Codes, DeviceSpec, KeyEvent, KeyMapping, Keyboard } from 'keyman/engine/keyboard'; +import { KeyboardProcessor } from 'keyman/engine/js-processor'; import { ModifierKeyConstants } from '@keymanapp/common-types'; import { HardKeyboard, processForMnemonicsAndLegacy } from 'keyman/engine/main'; diff --git a/web/src/app/browser/src/keymanEngine.ts b/web/src/app/browser/src/keymanEngine.ts index d807c415eb3..324394bae22 100644 --- a/web/src/app/browser/src/keymanEngine.ts +++ b/web/src/app/browser/src/keymanEngine.ts @@ -6,8 +6,8 @@ import { TwoStateActivator, VisualKeyboard } from 'keyman/engine/osk'; -import { ErrorStub, KeyboardStub, CloudQueryResult, toPrefixedKeyboardId as prefixed } from 'keyman/engine/package-cache'; -import { DeviceSpec, Keyboard, KeyboardObject } from "@keymanapp/keyboard-processor"; +import { ErrorStub, KeyboardStub, CloudQueryResult, toPrefixedKeyboardId as prefixed } from 'keyman/engine/keyboard-storage'; +import { DeviceSpec, Keyboard, KeyboardObject } from "keyman/engine/keyboard"; import * as views from './viewsAnchorpoint.js'; import { BrowserConfiguration, BrowserInitOptionDefaults, BrowserInitOptionSpec } from './configuration.js'; diff --git a/web/src/app/browser/src/languageMenu.ts b/web/src/app/browser/src/languageMenu.ts index eb9361ccba3..d3144de6e5f 100644 --- a/web/src/app/browser/src/languageMenu.ts +++ b/web/src/app/browser/src/languageMenu.ts @@ -1,6 +1,6 @@ // Manages the language selection UI for touch-form factors, which is triggered by an OSK key. import { getAbsoluteX, landscapeView } from "keyman/engine/dom-utils"; -import { KeyboardStub } from "keyman/engine/package-cache"; +import { KeyboardStub } from "keyman/engine/keyboard-storage"; import KeymanEngine from "./keymanEngine.js"; import * as util from "./utils/index.js"; diff --git a/web/src/app/webview/src/contextManager.ts b/web/src/app/webview/src/contextManager.ts index b0c322ea29d..b0b90b4d96c 100644 --- a/web/src/app/webview/src/contextManager.ts +++ b/web/src/app/webview/src/contextManager.ts @@ -1,5 +1,6 @@ -import { type Keyboard, Mock, OutputTarget, Transcription, findCommonSubstringEndIndex, isEmptyTransform, TextTransform } from '@keymanapp/keyboard-processor'; -import { KeyboardStub } from 'keyman/engine/package-cache'; +import { type Keyboard } from 'keyman/engine/keyboard'; +import { Mock, OutputTarget, Transcription, findCommonSubstringEndIndex, isEmptyTransform, TextTransform } from 'keyman/engine/js-processor'; +import { KeyboardStub } from 'keyman/engine/keyboard-storage'; import { ContextManagerBase } from 'keyman/engine/main'; import { WebviewConfiguration } from './configuration.js'; diff --git a/web/src/app/webview/src/keymanEngine.ts b/web/src/app/webview/src/keymanEngine.ts index ba98f8c4776..d390a6ce1b2 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -1,8 +1,9 @@ -import { DefaultRules, DeviceSpec, RuleBehavior } from '@keymanapp/keyboard-processor' +import { DeviceSpec, DefaultRules } from 'keyman/engine/keyboard'; +import { RuleBehavior } from 'keyman/engine/js-processor'; import { KeymanEngine as KeymanEngineBase, KeyboardInterface } from 'keyman/engine/main'; import { AnchoredOSKView, ViewConfiguration, StaticActivator } from 'keyman/engine/osk'; import { getAbsoluteX, getAbsoluteY } from 'keyman/engine/dom-utils'; -import { toPrefixedKeyboardId, toUnprefixedKeyboardId } from 'keyman/engine/package-cache'; +import { toPrefixedKeyboardId, toUnprefixedKeyboardId } from 'keyman/engine/keyboard-storage'; import { WebviewConfiguration, WebviewInitOptionDefaults, WebviewInitOptionSpec } from './configuration.js'; import ContextManager, { ContextHost } from './contextManager.js'; diff --git a/web/src/app/webview/src/oskConfiguration.ts b/web/src/app/webview/src/oskConfiguration.ts index 26ceeb28721..9250b5a2a1d 100644 --- a/web/src/app/webview/src/oskConfiguration.ts +++ b/web/src/app/webview/src/oskConfiguration.ts @@ -1,5 +1,5 @@ import { OSKView } from "keyman/engine/osk"; -import { DeviceSpec } from "@keymanapp/keyboard-processor"; +import { DeviceSpec } from "keyman/engine/keyboard"; import { type EmbeddedGestureConfig } from "keyman/engine/osk"; import { GlobeHint } from './osk/globeHint.js'; diff --git a/web/src/app/webview/src/passthroughKeyboard.ts b/web/src/app/webview/src/passthroughKeyboard.ts index d74ab7f99a7..25dec7a8e68 100644 --- a/web/src/app/webview/src/passthroughKeyboard.ts +++ b/web/src/app/webview/src/passthroughKeyboard.ts @@ -1,4 +1,4 @@ -import { DeviceSpec, Keyboard, KeyEvent, ManagedPromise } from '@keymanapp/keyboard-processor'; +import { DeviceSpec, Keyboard, KeyEvent, ManagedPromise } from 'keyman/engine/keyboard'; import { HardKeyboard, processForMnemonicsAndLegacy } from 'keyman/engine/main'; diff --git a/web/src/engine/attachment/src/pageContextAttachment.ts b/web/src/engine/attachment/src/pageContextAttachment.ts index d63c113d5e2..4325c88f15d 100644 --- a/web/src/engine/attachment/src/pageContextAttachment.ts +++ b/web/src/engine/attachment/src/pageContextAttachment.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'eventemitter3'; -import { DeviceSpec, InternalKeyboardFont } from "@keymanapp/keyboard-processor"; +import { DeviceSpec, InternalKeyboardFont } from "keyman/engine/keyboard"; import { Input, nestedInstanceOf, wrapElement } from "keyman/engine/element-wrappers"; import { arrayFromNodeList, diff --git a/web/src/engine/dom-utils/build.sh b/web/src/engine/dom-utils/build.sh index 74b46051c42..d2e424db209 100755 --- a/web/src/engine/dom-utils/build.sh +++ b/web/src/engine/dom-utils/build.sh @@ -16,7 +16,7 @@ SUBPROJECT_NAME=engine/dom-utils builder_describe "Builds DOM-utility modules used by the Keyman Engine for Web (KMW)." \ "@/common/web/utils" \ - "@/common/web/keyboard-processor" \ + "@/web/src/engine/keyboard" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/dom-utils/src/stylesheets.ts b/web/src/engine/dom-utils/src/stylesheets.ts index 7312a62f055..977f253ff79 100644 --- a/web/src/engine/dom-utils/src/stylesheets.ts +++ b/web/src/engine/dom-utils/src/stylesheets.ts @@ -1,5 +1,5 @@ import { DeviceSpec, ManagedPromise } from '@keymanapp/web-utils'; -import { type InternalKeyboardFont as KeyboardFont } from '@keymanapp/keyboard-processor'; +import { type InternalKeyboardFont as KeyboardFont } from 'keyman/engine/keyboard'; type FontFamilyStyleMap = {[family: string]: HTMLStyleElement}; diff --git a/web/src/engine/dom-utils/tsconfig.json b/web/src/engine/dom-utils/tsconfig.json index c0b4a7d79dd..dadf4db5c8c 100644 --- a/web/src/engine/dom-utils/tsconfig.json +++ b/web/src/engine/dom-utils/tsconfig.json @@ -11,7 +11,7 @@ "include": [ "src/**/*.ts" ], "references": [ - { "path": "../../../../common/web/keyboard-processor" }, + { "path": "../keyboard" }, { "path": "../../../../common/web/utils" } ] } diff --git a/web/src/engine/element-wrappers/build.sh b/web/src/engine/element-wrappers/build.sh index cfcc58a44f2..e188c7dd414 100755 --- a/web/src/engine/element-wrappers/build.sh +++ b/web/src/engine/element-wrappers/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/element-wrappers # ################################ Main script ################################ builder_describe "Builds DOM-based OutputTarget subclasses used by the Keyman Engine for Web (KMW)." \ - "@/common/web/keyboard-processor" \ + "@/web/src/engine/js-processor" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/element-wrappers/readme.md b/web/src/engine/element-wrappers/readme.md index 1237237c7be..2a7685edbcb 100644 --- a/web/src/engine/element-wrappers/readme.md +++ b/web/src/engine/element-wrappers/readme.md @@ -1,4 +1,4 @@ ## engine/element-wrappers This submodule provides a subset of the main engine's Web-oriented code that's used to 'wrap' webpage -elements as part of KMW attachment and interface the element with the `keyboard-processor` submodule. \ No newline at end of file +elements as part of KMW attachment and interface the element with the `keyboard` submodule. \ No newline at end of file diff --git a/web/src/engine/element-wrappers/src/outputTarget.ts b/web/src/engine/element-wrappers/src/outputTarget.ts index 3a288c13471..43623af7812 100644 --- a/web/src/engine/element-wrappers/src/outputTarget.ts +++ b/web/src/engine/element-wrappers/src/outputTarget.ts @@ -1,4 +1,4 @@ -import { OutputTarget as OutputTargetBase } from "@keymanapp/keyboard-processor"; +import { OutputTarget as OutputTargetBase } from "keyman/engine/js-processor"; import { EventEmitter } from 'eventemitter3'; export default abstract class OutputTarget extends OutputTargetBase { diff --git a/web/src/engine/element-wrappers/tsconfig.json b/web/src/engine/element-wrappers/tsconfig.json index ab6aa238a80..15a58bbf2a8 100644 --- a/web/src/engine/element-wrappers/tsconfig.json +++ b/web/src/engine/element-wrappers/tsconfig.json @@ -11,6 +11,6 @@ "include": [ "src/**/*.ts" ], "references": [ - { "path": "../../../../common/web/keyboard-processor" } + { "path": "../keyboard" } ] } diff --git a/web/src/engine/events/build.sh b/web/src/engine/events/build.sh index 438d075c2ce..1b8993f5705 100755 --- a/web/src/engine/events/build.sh +++ b/web/src/engine/events/build.sh @@ -14,7 +14,7 @@ SUBPROJECT_NAME=engine/events builder_describe "Builds specialized event-related modules utilized by Keyman Engine for Web." \ "@/common/web/utils build" \ - "@/common/web/keyboard-processor build" \ + "@/web/src/engine/keyboard build" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/events/src/index.ts b/web/src/engine/events/src/index.ts index 2d95307bc9f..ee5674b66c8 100644 --- a/web/src/engine/events/src/index.ts +++ b/web/src/engine/events/src/index.ts @@ -1,4 +1,3 @@ export { DomEventTracker } from './domEventTracker.js'; export { EmitterListenerSpy } from './emitterListenerSpy.js'; -export * from './keyEventSource.interface.js'; export * from './legacyEventEmitter.js'; \ No newline at end of file diff --git a/web/src/engine/events/tsconfig.json b/web/src/engine/events/tsconfig.json index bb25ac9c99b..5d0a45bbab9 100644 --- a/web/src/engine/events/tsconfig.json +++ b/web/src/engine/events/tsconfig.json @@ -12,6 +12,6 @@ "references": [ { "path": "../../../../common/web/utils" }, - { "path": "../../../../common/web/keyboard-processor" } + { "path": "../keyboard" } ] } diff --git a/web/src/engine/interfaces/build.sh b/web/src/engine/interfaces/build.sh index ca61e648653..568bd7940d6 100755 --- a/web/src/engine/interfaces/build.sh +++ b/web/src/engine/interfaces/build.sh @@ -14,7 +14,8 @@ SUBPROJECT_NAME=engine/interfaces builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \ "@/common/web/es-bundling" \ - "@/common/web/keyboard-processor" \ + "@/web/src/engine/keyboard" \ + "@/web/src/engine/js-processor" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/interfaces/src/prediction/languageProcessor.interface.ts b/web/src/engine/interfaces/src/prediction/languageProcessor.interface.ts index 7265d51f463..df5ebae8968 100644 --- a/web/src/engine/interfaces/src/prediction/languageProcessor.interface.ts +++ b/web/src/engine/interfaces/src/prediction/languageProcessor.interface.ts @@ -1,7 +1,7 @@ /// import { EventEmitter } from "eventemitter3"; -import { OutputTarget } from "@keymanapp/keyboard-processor"; +import { OutputTarget } from "keyman/engine/js-processor"; export class ReadySuggestions { suggestions: Suggestion[]; diff --git a/web/src/engine/interfaces/src/prediction/predictionContext.ts b/web/src/engine/interfaces/src/prediction/predictionContext.ts index d47bf4b8e2d..221875e62cb 100644 --- a/web/src/engine/interfaces/src/prediction/predictionContext.ts +++ b/web/src/engine/interfaces/src/prediction/predictionContext.ts @@ -1,6 +1,6 @@ import { EventEmitter } from "eventemitter3"; import { type LanguageProcessorSpec , ReadySuggestions, type InvalidateSourceEnum, StateChangeHandler } from './languageProcessor.interface.js'; -import { type KeyboardProcessor, type OutputTarget } from "@keymanapp/keyboard-processor"; +import { type KeyboardProcessor, type OutputTarget } from 'keyman/engine/js-processor'; interface PredictionContextEventMap { update: (suggestions: Suggestion[]) => void; diff --git a/web/src/engine/interfaces/tsconfig.json b/web/src/engine/interfaces/tsconfig.json index d5a193e0213..e53a8086820 100644 --- a/web/src/engine/interfaces/tsconfig.json +++ b/web/src/engine/interfaces/tsconfig.json @@ -12,6 +12,7 @@ "include": [ "**/*.ts" ], "references": [ - { "path": "../../../../common/web/keyboard-processor" }, + { "path": "../keyboard" }, + { "path": "../js-processor" } ] } diff --git a/web/src/engine/js-processor/build.sh b/web/src/engine/js-processor/build.sh new file mode 100755 index 00000000000..db00593166a --- /dev/null +++ b/web/src/engine/js-processor/build.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +SUBPROJECT_NAME=engine/js-processor + +. "${KEYMAN_ROOT}/web/common.inc.sh" +. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" + +# ################################ Main script ################################ + +builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \ + "clean" \ + "configure" \ + "build" \ + "test" \ + "--ci+ Set to utilize CI-based test configurations & reporting." + +builder_describe_outputs \ + configure "/node_modules" \ + build "/web/build/${SUBPROJECT_NAME}/lib/index.mjs" + +builder_parse "$@" + +#### Build action definitions #### + +do_build () { + compile "${SUBPROJECT_NAME}" + + ${BUNDLE_CMD} "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \ + --out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \ + --format esm +} + +builder_run_action configure verify_npm_setup +builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}" +builder_run_action build do_build +builder_run_action test test-headless "${SUBPROJECT_NAME}" "" diff --git a/common/web/keyboard-processor/src/text/deadkeys.ts b/web/src/engine/js-processor/src/deadkeys.ts similarity index 100% rename from common/web/keyboard-processor/src/text/deadkeys.ts rename to web/src/engine/js-processor/src/deadkeys.ts diff --git a/web/src/engine/js-processor/src/index.ts b/web/src/engine/js-processor/src/index.ts new file mode 100644 index 00000000000..1755499119c --- /dev/null +++ b/web/src/engine/js-processor/src/index.ts @@ -0,0 +1,11 @@ +export { default as KeyboardProcessor } from "./keyboardProcessor.js"; +export * from "./keyboardProcessor.js"; +export { default as RuleBehavior } from "./ruleBehavior.js"; +export * from './kbdInterface.js'; +export { default as KeyboardInterface } from "./kbdInterface.js"; +export * from "./systemStores.js"; +export * from "./deadkeys.js"; +export { default as OutputTarget } from "./outputTarget.js"; +export * from "./outputTarget.js"; +export { Mock } from "./mock.js"; +export * from "./stringDivergence.js"; diff --git a/common/web/keyboard-processor/src/text/kbdInterface.ts b/web/src/engine/js-processor/src/kbdInterface.ts similarity index 96% rename from common/web/keyboard-processor/src/text/kbdInterface.ts rename to web/src/engine/js-processor/src/kbdInterface.ts index 438d328f0dc..b39b2baea25 100644 --- a/common/web/keyboard-processor/src/text/kbdInterface.ts +++ b/web/src/engine/js-processor/src/kbdInterface.ts @@ -7,18 +7,12 @@ import { type DeviceSpec } from "@keymanapp/web-utils"; import { ModifierKeyConstants } from '@keymanapp/common-types'; - -import Codes from "./codes.js"; -import type KeyEvent from "./keyEvent.js"; -import type { Deadkey } from "./deadkeys.js"; -import KeyMapping from "./keyMapping.js"; -import { SystemStore, MutableSystemStore, PlatformSystemStore } from "./systemStores.js"; -import type { VariableStoreSerializer } from "./keyboardProcessor.js"; -import type OutputTarget from "./outputTarget.js"; -import { Mock } from "./outputTarget.js"; +import { Codes, type KeyEvent, KeyMapping, Keyboard, KeyboardHarness, KeyboardKeymanGlobal, VariableStoreDictionary } from "keyman/engine/keyboard"; +import type OutputTarget from './outputTarget.js'; +import { type Deadkey } from './deadkeys.js'; +import { Mock } from "./mock.js"; import RuleBehavior from "./ruleBehavior.js"; -import Keyboard, { VariableStoreDictionary } from "../keyboards/keyboard.js"; -import { KeyboardHarness, KeyboardKeymanGlobal } from "../keyboards/keyboardHarness.js"; +import { ComplexKeyboardStore, type KeyboardStore, KeyboardStoreElement, SystemStoreIDs, SystemStore, MutableSystemStore, PlatformSystemStore, VariableStore, VariableStoreSerializer } from "./systemStores.js"; //#endregion @@ -30,20 +24,6 @@ export class KeyInformation { modifiers: number; } -/* -* Type alias definitions to reflect the parameters of the fullContextMatch() callback (KMW 10+). -* No constructors or methods since keyboards will not utilize the same backing prototype, and -* property names are shorthanded to promote minification. -*/ -type PlainKeyboardStore = string; - -export type KeyboardStoreElement = (string|StoreNonCharEntry); -export type ComplexKeyboardStore = KeyboardStoreElement[]; - -type KeyboardStore = PlainKeyboardStore | ComplexKeyboardStore; - -export type VariableStore = {[name: string]: string}; - type RuleChar = string; class RuleDeadkey { @@ -70,7 +50,7 @@ class ContextAny { /** * If set to true, negates the 'any'. */ - ['n']: boolean|0|1; + ['n']: boolean | 0 | 1; } class RuleIndex { @@ -115,7 +95,7 @@ class StoreBeep { type ContextNonCharEntry = RuleDeadkey | ContextAny | RuleIndex | ContextEx | ContextNul; type ContextEntry = RuleChar | ContextNonCharEntry; -type StoreNonCharEntry = RuleDeadkey | StoreBeep; +export type StoreNonCharEntry = RuleDeadkey | StoreBeep; /** * Cache of context storing and retrieving return values from KC @@ -183,13 +163,6 @@ class CachedContextEx { } }; -export enum SystemStoreIDs { - TSS_LAYER = 33, - TSS_PLATFORM = 31, - TSS_NEWLAYER = 42, - TSS_OLDLAYER = 43 -} - //#endregion export default class KeyboardInterface extends KeyboardHarness { @@ -1177,6 +1150,6 @@ export default class KeyboardInterface extends KeyboardHarness { } (function() { - // This will be the only call within the keyboard-processor module. + // This will be the only call within the keyboard module. KeyboardInterface.__publishShorthandAPI(); }()); diff --git a/common/web/keyboard-processor/src/text/keyboardProcessor.ts b/web/src/engine/js-processor/src/keyboardProcessor.ts similarity index 95% rename from common/web/keyboard-processor/src/text/keyboardProcessor.ts rename to web/src/engine/js-processor/src/keyboardProcessor.ts index 836c9912a64..dea537dfdf6 100644 --- a/common/web/keyboard-processor/src/text/keyboardProcessor.ts +++ b/web/src/engine/js-processor/src/keyboardProcessor.ts @@ -1,23 +1,23 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * Implementation of the JavaScript keyboard processor + */ + // #region Big ol' list of imports import { EventEmitter } from 'eventemitter3'; - -import Codes from "./codes.js"; -import type Keyboard from "../keyboards/keyboard.js"; -import { MinimalKeymanGlobal } from '../keyboards/keyboardHarness.js'; -import KeyEvent from "./keyEvent.js"; -import { Layouts } from "../keyboards/defaultLayouts.js"; -import type { MutableSystemStore } from "./systemStores.js"; - -import DefaultRules, { EmulationKeystrokes } from "./defaultRules.js"; +import { ModifierKeyConstants } from '@keymanapp/common-types'; +import { + Codes, type Keyboard, MinimalKeymanGlobal, KeyEvent, Layouts, + DefaultRules, EmulationKeystrokes +} from "keyman/engine/keyboard"; +import { Mock } from "./mock.js"; import type OutputTarget from "./outputTarget.js"; -import { Mock } from "./outputTarget.js"; - -import KeyboardInterface, { SystemStoreIDs, VariableStore } from "./kbdInterface.js"; import RuleBehavior from "./ruleBehavior.js"; - +import KeyboardInterface from './kbdInterface.js'; import { DeviceSpec, globalObject } from "@keymanapp/web-utils"; -import { ModifierKeyConstants } from '@keymanapp/common-types'; +import { type MutableSystemStore, SystemStoreIDs } from "./systemStores.js"; // #endregion @@ -26,11 +26,6 @@ import { ModifierKeyConstants } from '@keymanapp/common-types'; export type BeepHandler = (outputTarget: OutputTarget) => void; export type LogMessageHandler = (str: string) => void; -export interface VariableStoreSerializer { - loadStore(keyboardID: string, storeName: string): VariableStore; - saveStore(keyboardID: string, storeName: string, storeMap: VariableStore): void; -} - export interface ProcessorInitOptions { baseLayout?: string; keyboardInterface?: KeyboardInterface; @@ -174,7 +169,7 @@ export default class KeyboardProcessor extends EventEmitter { let isMnemonic = this.activeKeyboard && this.activeKeyboard.isMnemonic; if(!matched) { - if((char = this.defaultRules.forAny(Lkc, isMnemonic)) != null) { + if((char = this.defaultRules.forAny(Lkc, isMnemonic, ruleBehavior)) != null) { special = this.defaultRules.forSpecialEmulation(Lkc) if(special == EmulationKeystrokes.Backspace) { // A browser's default backspace may fail to delete both parts of an SMP character. @@ -277,7 +272,8 @@ export default class KeyboardProcessor extends EventEmitter { const lockNames = ['CAPS', 'NUM_LOCK', 'SCROLL_LOCK'] as const; const lockKeys = ['K_CAPS', 'K_NUMLOCK', 'K_SCROLL'] as const; - const lockModifiers = [ ModifierKeyConstants.CAPITALFLAG, ModifierKeyConstants.NUMLOCKFLAG, ModifierKeyConstants.SCROLLFLAG] as const; + const lockModifiers = [ModifierKeyConstants.CAPITALFLAG, ModifierKeyConstants.NUMLOCKFLAG, ModifierKeyConstants.SCROLLFLAG] as const; + if(!this.activeKeyboard) { return true; @@ -329,6 +325,8 @@ export default class KeyboardProcessor extends EventEmitter { const lockModifiers = [ModifierKeyConstants.CAPITALFLAG, ModifierKeyConstants.NUMLOCKFLAG, ModifierKeyConstants.SCROLLFLAG] as const; const noLockModifers = [ModifierKeyConstants.NOTCAPITALFLAG, ModifierKeyConstants.NOTNUMLOCKFLAG, ModifierKeyConstants.NOTSCROLLFLAG] as const; + + for(let i=0; i < lockKeys.length; i++) { const key = lockKeys[i]; const flag = this.stateKeys[key]; diff --git a/web/src/engine/js-processor/src/mock.ts b/web/src/engine/js-processor/src/mock.ts new file mode 100644 index 00000000000..151d8313caa --- /dev/null +++ b/web/src/engine/js-processor/src/mock.ts @@ -0,0 +1,157 @@ +import OutputTarget from './outputTarget.js'; + +// Due to some interesting requirements on compile ordering in TS, +// this needs to be in the same file as OutputTarget now. +export class Mock extends OutputTarget { + text: string; + + selStart: number; + selEnd: number; + selForward: boolean = true; + + constructor(text?: string, caretPos?: number); + constructor(text?: string, selStart?: number, selEnd?: number); + constructor(text?: string, selStart?: number, selEnd?: number) { + super(); + + this.text = text ? text : ""; + var defaultLength = this.text._kmwLength(); + + // Ensures that `caretPos == 0` is handled correctly. + this.selStart = typeof selStart == "number" ? selStart : defaultLength; + + // If no selection-end is set, selection length is implied to be 0. + this.selEnd = typeof selEnd == "number" ? selEnd : this.selStart; + + this.selForward = this.selEnd >= this.selStart; + } + + // Clones the state of an existing EditableElement, creating a Mock version of its state. + static from(outputTarget: OutputTarget, readonly?: boolean) { + let clone: Mock; + + if (outputTarget instanceof Mock) { + // Avoids the need to run expensive kmwstring.ts / `_kmwLength()` + // calculations when deep-copying Mock instances. + let priorMock = outputTarget as Mock; + clone = new Mock(priorMock.text, priorMock.selStart, priorMock.selEnd); + } else { + const text = outputTarget.getText(); + const textLen = text._kmwLength(); + + // If !hasSelection() + let selectionStart: number = textLen; + let selectionEnd: number = 0; + + if (outputTarget.hasSelection()) { + let beforeText = outputTarget.getTextBeforeCaret(); + let afterText = outputTarget.getTextAfterCaret(); + selectionStart = beforeText._kmwLength(); + selectionEnd = textLen - afterText._kmwLength(); + } + + // readonly group or not, the returned Mock remains the same. + // New-context events should act as if the caret were at the earlier-in-context + // side of the selection, same as standard keyboard rules. + clone = new Mock(text, selectionStart, selectionEnd); + } + + // Also duplicate deadkey state! (Needed for fat-finger ops.) + clone.setDeadkeys(outputTarget.deadkeys()); + + return clone; + } + + clearSelection(): void { + this.text = this.getTextBeforeCaret() + this.getTextAfterCaret(); + this.selEnd = this.selStart; + this.selForward = true; + } + + invalidateSelection(): void { + return; + } + + isSelectionEmpty(): boolean { + return this.selStart == this.selEnd; + } + + hasSelection(): boolean { + return true; + } + + getDeadkeyCaret(): number { + return this.selStart; + } + + setSelection(start: number, end?: number) { + this.selStart = start; + this.selEnd = typeof end == 'number' ? end : start; + + this.selForward = end >= start; + if (!this.selForward) { + let temp = this.selStart; + this.selStart = this.selEnd; + this.selEnd = temp; + } + } + + getTextBeforeCaret(): string { + return this.text.kmwSubstr(0, this.selStart); + } + + getSelectedText(): string { + return this.text.kmwSubstr(this.selStart, this.selEnd - this.selStart); + } + + getTextAfterCaret(): string { + return this.text.kmwSubstr(this.selEnd); + } + + getText(): string { + return this.text; + } + + deleteCharsBeforeCaret(dn: number): void { + if (dn >= 0) { + if (dn > this.selStart) { + dn = this.selStart; + } + this.adjustDeadkeys(-dn); + this.text = this.text.kmwSubstr(0, this.selStart - dn) + this.text.kmwSubstr(this.selStart); + this.selStart -= dn; + this.selEnd -= dn; + } + } + + insertTextBeforeCaret(s: string): void { + this.adjustDeadkeys(s._kmwLength()); + this.text = this.getTextBeforeCaret() + s + this.text.kmwSubstr(this.selStart); + this.selStart += s.kmwLength(); + this.selEnd += s.kmwLength(); + } + + handleNewlineAtCaret(): void { + this.insertTextBeforeCaret('\n'); + } + + protected setTextAfterCaret(s: string): void { + this.text = this.getTextBeforeCaret() + s; + } + + /** + * Indicates if this Mock represents an identical context to that of another Mock. + * @param other + * @returns + */ + isEqual(other: Mock) { + return this.text == other.text + && this.selStart == other.selStart + && this.selEnd == other.selEnd + && this.deadkeys().equal(other.deadkeys()); + } + + doInputEvent() { + // Mock isn't backed by an element, so it won't have any event listeners. + } +} diff --git a/common/web/keyboard-processor/src/text/outputTarget.ts b/web/src/engine/js-processor/src/outputTarget.ts similarity index 69% rename from common/web/keyboard-processor/src/text/outputTarget.ts rename to web/src/engine/js-processor/src/outputTarget.ts index 63c4c8a042f..f48647092c7 100644 --- a/common/web/keyboard-processor/src/text/outputTarget.ts +++ b/web/src/engine/js-processor/src/outputTarget.ts @@ -2,11 +2,12 @@ import { extendString } from "@keymanapp/web-utils"; import { findCommonSubstringEndIndex } from "./stringDivergence.js"; +import { Mock } from "./mock.js"; extendString(); // Defines deadkey management in a manner attachable to each element interface. -import type KeyEvent from "./keyEvent.js"; +import { type KeyEvent } from 'keyman/engine/keyboard'; import { Deadkey, DeadkeyTracker } from "./deadkeys.js"; // Also relies on string-extensions provided by the web-utils package. @@ -307,159 +308,3 @@ export default abstract class OutputTarget { */ abstract doInputEvent(): void; } - -// Due to some interesting requirements on compile ordering in TS, -// this needs to be in the same file as OutputTarget now. -export class Mock extends OutputTarget { - text: string; - - selStart: number; - selEnd: number; - selForward: boolean = true; - - constructor(text?: string, caretPos?: number); - constructor(text?: string, selStart?: number, selEnd?: number); - constructor(text?: string, selStart?: number, selEnd?: number) { - super(); - - this.text = text ? text : ""; - var defaultLength = this.text._kmwLength(); - - // Ensures that `caretPos == 0` is handled correctly. - this.selStart = typeof selStart == "number" ? selStart : defaultLength; - - // If no selection-end is set, selection length is implied to be 0. - this.selEnd = typeof selEnd == "number" ? selEnd : this.selStart; - - this.selForward = this.selEnd >= this.selStart; - } - - // Clones the state of an existing EditableElement, creating a Mock version of its state. - static from(outputTarget: OutputTarget, readonly?: boolean) { - let clone: Mock; - - if(outputTarget instanceof Mock) { - // Avoids the need to run expensive kmwstring.ts / `_kmwLength()` - // calculations when deep-copying Mock instances. - let priorMock = outputTarget as Mock; - clone = new Mock(priorMock.text, priorMock.selStart, priorMock.selEnd); - } else { - const text = outputTarget.getText(); - const textLen = text._kmwLength(); - - // If !hasSelection() - let selectionStart: number = textLen; - let selectionEnd: number = 0; - - if(outputTarget.hasSelection()) { - let beforeText = outputTarget.getTextBeforeCaret(); - let afterText = outputTarget.getTextAfterCaret(); - selectionStart = beforeText._kmwLength(); - selectionEnd = textLen - afterText._kmwLength(); - } - - // readonly group or not, the returned Mock remains the same. - // New-context events should act as if the caret were at the earlier-in-context - // side of the selection, same as standard keyboard rules. - clone = new Mock(text, selectionStart, selectionEnd); - } - - // Also duplicate deadkey state! (Needed for fat-finger ops.) - clone.setDeadkeys(outputTarget.deadkeys()); - - return clone; - } - - clearSelection(): void { - this.text = this.getTextBeforeCaret() + this.getTextAfterCaret(); - this.selEnd = this.selStart; - this.selForward = true; - } - - invalidateSelection(): void { - return; - } - - isSelectionEmpty(): boolean { - return this.selStart == this.selEnd; - } - - hasSelection(): boolean { - return true; - } - - getDeadkeyCaret(): number { - return this.selStart; - } - - setSelection(start: number, end?: number) { - this.selStart = start; - this.selEnd = typeof end == 'number' ? end : start; - - this.selForward = end >= start; - if(!this.selForward) { - let temp = this.selStart; - this.selStart = this.selEnd; - this.selEnd = temp; - } - } - - getTextBeforeCaret(): string { - return this.text.kmwSubstr(0, this.selStart); - } - - getSelectedText(): string { - return this.text.kmwSubstr(this.selStart, this.selEnd - this.selStart); - } - - getTextAfterCaret(): string { - return this.text.kmwSubstr(this.selEnd); - } - - getText(): string { - return this.text; - } - - deleteCharsBeforeCaret(dn: number): void { - if(dn >= 0) { - if(dn > this.selStart) { - dn = this.selStart; - } - this.adjustDeadkeys(-dn); - this.text = this.text.kmwSubstr(0, this.selStart - dn) + this.text.kmwSubstr(this.selStart); - this.selStart -= dn; - this.selEnd -= dn; - } - } - - insertTextBeforeCaret(s: string): void { - this.adjustDeadkeys(s._kmwLength()); - this.text = this.getTextBeforeCaret() + s + this.text.kmwSubstr(this.selStart); - this.selStart += s.kmwLength(); - this.selEnd += s.kmwLength(); - } - - handleNewlineAtCaret(): void { - this.insertTextBeforeCaret('\n'); - } - - protected setTextAfterCaret(s: string): void { - this.text = this.getTextBeforeCaret() + s; - } - - /** - * Indicates if this Mock represents an identical context to that of another Mock. - * @param other - * @returns - */ - isEqual(other: Mock) { - return this.text == other.text - && this.selStart == other.selStart - && this.selEnd == other.selEnd - && this.deadkeys().equal(other.deadkeys()); - } - - doInputEvent() { - // Mock isn't backed by an element, so it won't have any event listeners. - } -} \ No newline at end of file diff --git a/common/web/keyboard-processor/src/text/ruleBehavior.ts b/web/src/engine/js-processor/src/ruleBehavior.ts similarity index 95% rename from common/web/keyboard-processor/src/text/ruleBehavior.ts rename to web/src/engine/js-processor/src/ruleBehavior.ts index e5d669e9092..a6b2c9973a1 100644 --- a/common/web/keyboard-processor/src/text/ruleBehavior.ts +++ b/web/src/engine/js-processor/src/ruleBehavior.ts @@ -1,9 +1,10 @@ /// import KeyboardProcessor from "./keyboardProcessor.js"; -import OutputTarget, { Mock, type Transcription } from "./outputTarget.js"; -import { VariableStoreDictionary } from "../keyboards/keyboard.js"; -import type { VariableStore } from "./kbdInterface.js"; +import { VariableStoreDictionary } from "keyman/engine/keyboard"; +import OutputTarget, { type Transcription } from './outputTarget.js'; +import { Mock } from "./mock.js"; +import { type VariableStore } from "./systemStores.js"; /** * Represents the commands and state changes that result from a matched keyboard rule. diff --git a/common/web/keyboard-processor/src/text/stringDivergence.ts b/web/src/engine/js-processor/src/stringDivergence.ts similarity index 100% rename from common/web/keyboard-processor/src/text/stringDivergence.ts rename to web/src/engine/js-processor/src/stringDivergence.ts diff --git a/common/web/keyboard-processor/src/text/systemStores.ts b/web/src/engine/js-processor/src/systemStores.ts similarity index 74% rename from common/web/keyboard-processor/src/text/systemStores.ts rename to web/src/engine/js-processor/src/systemStores.ts index 13184baafec..3288c9feff8 100644 --- a/common/web/keyboard-processor/src/text/systemStores.ts +++ b/web/src/engine/js-processor/src/systemStores.ts @@ -1,5 +1,31 @@ -import type KeyboardInterface from "./kbdInterface.js"; -import { SystemStoreIDs } from "./kbdInterface.js"; +import { type KeyboardHarness } from 'keyman/engine/keyboard'; +import { StoreNonCharEntry } from './kbdInterface.js'; + +export enum SystemStoreIDs { + TSS_LAYER = 33, + TSS_PLATFORM = 31, + TSS_NEWLAYER = 42, + TSS_OLDLAYER = 43 +} + +/* +* Type alias definitions to reflect the parameters of the fullContextMatch() callback (KMW 10+). +* No constructors or methods since keyboards will not utilize the same backing prototype, and +* property names are shorthanded to promote minification. +*/ +type PlainKeyboardStore = string; + +export type KeyboardStoreElement = (string | StoreNonCharEntry); +export type ComplexKeyboardStore = KeyboardStoreElement[]; + +export type KeyboardStore = PlainKeyboardStore | ComplexKeyboardStore; + +export type VariableStore = { [name: string]: string }; + +export interface VariableStoreSerializer { + loadStore(keyboardID: string, storeName: string): VariableStore; + saveStore(keyboardID: string, storeName: string, storeMap: VariableStore): void; +} /** * Defines common behaviors associated with system stores. @@ -61,9 +87,9 @@ export class MutableSystemStore extends SystemStore { * Handles checks against the current platform. */ export class PlatformSystemStore extends SystemStore { - private readonly kbdInterface: KeyboardInterface; + private readonly kbdInterface: KeyboardHarness; - constructor(keyboardInterface: KeyboardInterface) { + constructor(keyboardInterface: KeyboardHarness) { super(SystemStoreIDs.TSS_PLATFORM); this.kbdInterface = keyboardInterface; @@ -131,4 +157,4 @@ export class PlatformSystemStore extends SystemStore { // Everything we checked against was valid and had matches - it's a match! return true; } -} \ No newline at end of file +} diff --git a/web/src/engine/js-processor/tsconfig.json b/web/src/engine/js-processor/tsconfig.json new file mode 100644 index 00000000000..a57467139bd --- /dev/null +++ b/web/src/engine/js-processor/tsconfig.json @@ -0,0 +1,13 @@ +{ + // While the actual references themselves are headless, it compiles against the DOM-reliant OSK module. + "extends": "../../tsconfig.dom.json", + + "compilerOptions": { + "baseUrl": "./", + "outDir": "../../../build/engine/js-processor/obj/", + "tsBuildInfoFile": "../../../build/engine/js-processor/obj/tsconfig.tsbuildinfo", + "rootDir": "./src" + }, + + "include": [ "**/*.ts" ], +} diff --git a/web/src/engine/package-cache/.c8rc.json b/web/src/engine/keyboard-storage/.c8rc.json similarity index 100% rename from web/src/engine/package-cache/.c8rc.json rename to web/src/engine/keyboard-storage/.c8rc.json diff --git a/web/src/engine/package-cache/README.md b/web/src/engine/keyboard-storage/README.md similarity index 100% rename from web/src/engine/package-cache/README.md rename to web/src/engine/keyboard-storage/README.md diff --git a/web/src/engine/package-cache/build.sh b/web/src/engine/keyboard-storage/build.sh similarity index 97% rename from web/src/engine/package-cache/build.sh rename to web/src/engine/keyboard-storage/build.sh index b413dd5be8c..33873355ff1 100755 --- a/web/src/engine/package-cache/build.sh +++ b/web/src/engine/keyboard-storage/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -SUBPROJECT_NAME=engine/package-cache +SUBPROJECT_NAME=engine/keyboard-storage . "$KEYMAN_ROOT/web/common.inc.sh" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" diff --git a/web/src/engine/package-cache/src/cloud/index.ts b/web/src/engine/keyboard-storage/src/cloud/index.ts similarity index 100% rename from web/src/engine/package-cache/src/cloud/index.ts rename to web/src/engine/keyboard-storage/src/cloud/index.ts diff --git a/web/src/engine/package-cache/src/cloud/queryEngine.ts b/web/src/engine/keyboard-storage/src/cloud/queryEngine.ts similarity index 99% rename from web/src/engine/package-cache/src/cloud/queryEngine.ts rename to web/src/engine/keyboard-storage/src/cloud/queryEngine.ts index eb989d2f00a..5f38c32aead 100644 --- a/web/src/engine/package-cache/src/cloud/queryEngine.ts +++ b/web/src/engine/keyboard-storage/src/cloud/queryEngine.ts @@ -3,7 +3,7 @@ import { EventEmitter } from 'eventemitter3'; import { PathConfiguration } from 'keyman/engine/interfaces'; import { default as KeyboardStub, ErrorStub, KeyboardAPISpec, mergeAndResolveStubPromises } from '../keyboardStub.js'; -import { LanguageAPIPropertySpec, ManagedPromise, Version } from '@keymanapp/keyboard-processor'; +import { LanguageAPIPropertySpec, ManagedPromise, Version } from 'keyman/engine/keyboard'; import CloudRequesterInterface from './requesterInterface.js'; // For when the API call straight-up times out. diff --git a/web/src/engine/package-cache/src/cloud/requesterInterface.ts b/web/src/engine/keyboard-storage/src/cloud/requesterInterface.ts similarity index 68% rename from web/src/engine/package-cache/src/cloud/requesterInterface.ts rename to web/src/engine/keyboard-storage/src/cloud/requesterInterface.ts index c0f8e6baf14..6c612d9cb20 100644 --- a/web/src/engine/package-cache/src/cloud/requesterInterface.ts +++ b/web/src/engine/keyboard-storage/src/cloud/requesterInterface.ts @@ -1,4 +1,4 @@ -import { ManagedPromise } from '@keymanapp/keyboard-processor'; +import { ManagedPromise } from 'keyman/engine/keyboard'; export default interface CloudRequesterInterface { request(query: string): { diff --git a/web/src/engine/package-cache/src/domCloudRequester.ts b/web/src/engine/keyboard-storage/src/domCloudRequester.ts similarity index 97% rename from web/src/engine/package-cache/src/domCloudRequester.ts rename to web/src/engine/keyboard-storage/src/domCloudRequester.ts index ee80b0f0638..fe671d101ff 100644 --- a/web/src/engine/package-cache/src/domCloudRequester.ts +++ b/web/src/engine/keyboard-storage/src/domCloudRequester.ts @@ -1,4 +1,4 @@ -import { ManagedPromise } from '@keymanapp/keyboard-processor'; +import { ManagedPromise } from 'keyman/engine/keyboard'; import CloudRequesterInterface from './cloud/requesterInterface.js'; import { CLOUD_MALFORMED_OBJECT_ERR, CLOUD_TIMEOUT_ERR, CLOUD_STUB_REGISTRATION_ERR } from './cloud/queryEngine.js'; diff --git a/web/src/engine/package-cache/src/index.ts b/web/src/engine/keyboard-storage/src/index.ts similarity index 100% rename from web/src/engine/package-cache/src/index.ts rename to web/src/engine/keyboard-storage/src/index.ts diff --git a/web/src/engine/package-cache/src/keyboardRequisitioner.ts b/web/src/engine/keyboard-storage/src/keyboardRequisitioner.ts similarity index 99% rename from web/src/engine/package-cache/src/keyboardRequisitioner.ts rename to web/src/engine/keyboard-storage/src/keyboardRequisitioner.ts index 13cc7ecef83..fb2807de6ff 100644 --- a/web/src/engine/package-cache/src/keyboardRequisitioner.ts +++ b/web/src/engine/keyboard-storage/src/keyboardRequisitioner.ts @@ -3,7 +3,7 @@ import { KeyboardLoaderBase as KeyboardLoader, LanguageAPIPropertySpec, RawKeyboardMetadata -} from "@keymanapp/keyboard-processor"; +} from "keyman/engine/keyboard"; import { PathConfiguration } from "keyman/engine/interfaces"; // TODO: is cleanup needed here, to use local paths instead? diff --git a/web/src/engine/package-cache/src/keyboardStub.ts b/web/src/engine/keyboard-storage/src/keyboardStub.ts similarity index 99% rename from web/src/engine/package-cache/src/keyboardStub.ts rename to web/src/engine/keyboard-storage/src/keyboardStub.ts index 474d4cc9eff..a2b1d87d6fa 100644 --- a/web/src/engine/package-cache/src/keyboardStub.ts +++ b/web/src/engine/keyboard-storage/src/keyboardStub.ts @@ -3,7 +3,7 @@ import { type KeyboardAPIPropertyMultilangSpec as APICompoundKeyboard, KeyboardProperties, type LanguageAPIPropertySpec, -} from '@keymanapp/keyboard-processor'; +} from 'keyman/engine/keyboard'; import { toPrefixedKeyboardId as prefixed } from './stubAndKeyboardCache.js'; diff --git a/web/src/engine/package-cache/src/modelCache.ts b/web/src/engine/keyboard-storage/src/modelCache.ts similarity index 100% rename from web/src/engine/package-cache/src/modelCache.ts rename to web/src/engine/keyboard-storage/src/modelCache.ts diff --git a/web/src/engine/package-cache/src/nodeCloudRequester.ts b/web/src/engine/keyboard-storage/src/nodeCloudRequester.ts similarity index 97% rename from web/src/engine/package-cache/src/nodeCloudRequester.ts rename to web/src/engine/keyboard-storage/src/nodeCloudRequester.ts index bd9ff851597..e8461ff20d7 100644 --- a/web/src/engine/package-cache/src/nodeCloudRequester.ts +++ b/web/src/engine/keyboard-storage/src/nodeCloudRequester.ts @@ -1,4 +1,4 @@ -import { ManagedPromise } from '@keymanapp/keyboard-processor'; +import { ManagedPromise } from 'keyman/engine/keyboard'; import CloudRequesterInterface from './cloud/requesterInterface.js'; import { CLOUD_TIMEOUT_ERR, diff --git a/web/src/engine/package-cache/src/stubAndKeyboardCache.ts b/web/src/engine/keyboard-storage/src/stubAndKeyboardCache.ts similarity index 99% rename from web/src/engine/package-cache/src/stubAndKeyboardCache.ts rename to web/src/engine/keyboard-storage/src/stubAndKeyboardCache.ts index 9fd70e74724..67d62446bee 100644 --- a/web/src/engine/package-cache/src/stubAndKeyboardCache.ts +++ b/web/src/engine/keyboard-storage/src/stubAndKeyboardCache.ts @@ -1,4 +1,4 @@ -import { Keyboard, KeyboardLoaderBase as KeyboardLoader } from "@keymanapp/keyboard-processor"; +import { Keyboard, KeyboardLoaderBase as KeyboardLoader } from "keyman/engine/keyboard"; import { EventEmitter } from "eventemitter3"; import KeyboardStub from "./keyboardStub.js"; diff --git a/web/src/engine/package-cache/tsconfig.json b/web/src/engine/keyboard-storage/tsconfig.json similarity index 57% rename from web/src/engine/package-cache/tsconfig.json rename to web/src/engine/keyboard-storage/tsconfig.json index 7a2ab5f235d..f093be2cbc6 100644 --- a/web/src/engine/package-cache/tsconfig.json +++ b/web/src/engine/keyboard-storage/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "baseUrl": "./", - "outDir": "../../../build/engine/package-cache/obj/", - "tsBuildInfoFile": "../../../build/engine/package-cache/obj/tsconfig.tsbuildinfo", + "outDir": "../../../build/engine/keyboard-storage/obj/", + "tsBuildInfoFile": "../../../build/engine/keyboard-storage/obj/tsconfig.tsbuildinfo", "rootDir": "./src" }, diff --git a/common/web/keyboard-processor/.c8rc.json b/web/src/engine/keyboard/.c8rc.json similarity index 100% rename from common/web/keyboard-processor/.c8rc.json rename to web/src/engine/keyboard/.c8rc.json diff --git a/common/web/keyboard-processor/.gitignore b/web/src/engine/keyboard/.gitignore similarity index 100% rename from common/web/keyboard-processor/.gitignore rename to web/src/engine/keyboard/.gitignore diff --git a/common/web/keyboard-processor/README.md b/web/src/engine/keyboard/README.md similarity index 92% rename from common/web/keyboard-processor/README.md rename to web/src/engine/keyboard/README.md index 8ac9b8f9d05..a2a4eb89944 100644 --- a/common/web/keyboard-processor/README.md +++ b/web/src/engine/keyboard/README.md @@ -1,5 +1,6 @@ # Keyman: Keyboard Processor Module -The Original Code is (C) 2017-2020 SIL International + +The Original Code is (C) 2017-2024 SIL International The Keyboard Processor module is an internal component of KeymanWeb, seen within this repo at /web/. diff --git a/web/src/engine/keyboard/build.sh b/web/src/engine/keyboard/build.sh new file mode 100755 index 00000000000..226a7d9d754 --- /dev/null +++ b/web/src/engine/keyboard/build.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# +# Compile KeymanWeb's 'keyboard' module, one of the components of Web's 'core' module. +# +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +SUBPROJECT_NAME=engine/keyboard + +. "${KEYMAN_ROOT}/web/common.inc.sh" +. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" + +################################ Main script ################################ + +builder_describe \ + "Compiles the web-oriented utility function module." \ + "@/web/src/tools/testing/recorder-core test" \ + "@/common/web/keyman-version" \ + "@/common/web/es-bundling" \ + "@/common/web/types" \ + "@/common/web/utils" \ + configure \ + clean \ + build \ + test \ + "--ci For use with action $(builder_term test) - emits CI-friendly test reports" + +builder_describe_outputs \ + configure /node_modules \ + build /web/build/engine/keyboard/lib/index.mjs + +builder_parse "$@" + +function do_configure() { + verify_npm_setup + + # Configure Web browser-engine testing environments. As is, this should only + # make changes when we update the dependency, even on our CI build agents. + playwright install +} + +BUILD_DIR="${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}" + +function do_build() { + tsc --build "${THIS_SCRIPT_PATH}/tsconfig.all.json" + + # Base product - the main keyboard processor + builder_echo "Bundle base product - the main keyboard processor" + ${BUNDLE_CMD} "${BUILD_DIR}/obj/index.js" \ + --out "${BUILD_DIR}/lib/index.mjs" \ + --format esm + + # The DOM-oriented keyboard loader + builder_echo "Bundle the DOM-oriented keyboard loader" + ${BUNDLE_CMD} "${BUILD_DIR}/obj/keyboards/loaders/dom-keyboard-loader.js" \ + --out "${BUILD_DIR}/lib/dom-keyboard-loader.mjs" \ + --format esm + + # The Node-oriented keyboard loader + builder_echo "Bundle the Node-oriented keyboard loader" + ${BUNDLE_CMD} "${BUILD_DIR}/obj/keyboards/loaders/node-keyboard-loader.js" \ + --out "${BUILD_DIR}/lib/node-keyboard-loader.mjs" \ + --format esm \ + --platform node + + # # Tests + # builder_echo "Bundle tests" + # ${BUNDLE_CMD} "${BUILD_DIR}/tests/dom/cases/domKeyboardLoader.spec.js" \ + # --out "${BUILD_DIR}/tests/dom/domKeyboardLoader.spec.mjs" \ + # --format esm + + # Declaration bundling. + builder_echo "Declaration bundling" + tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/index.d.ts" + tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/dom-keyboard-loader.d.ts" -p src/keyboards/loaders/tsconfig.dom.json + tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/node-keyboard-loader.d.ts" -p src/keyboards/loaders/tsconfig.node.json +} + +builder_run_action configure do_configure +builder_run_action clean rm -rf "${BUILD_DIR}" +builder_run_action build do_build +builder_run_action test test-headless "${SUBPROJECT_NAME}" "" diff --git a/common/web/keyboard-processor/src/text/codes.ts b/web/src/engine/keyboard/src/codes.ts similarity index 100% rename from common/web/keyboard-processor/src/text/codes.ts rename to web/src/engine/keyboard/src/codes.ts diff --git a/common/web/keyboard-processor/src/text/defaultRules.ts b/web/src/engine/keyboard/src/defaultRules.ts similarity index 81% rename from common/web/keyboard-processor/src/text/defaultRules.ts rename to web/src/engine/keyboard/src/defaultRules.ts index 931eb5200b2..5512114d937 100644 --- a/common/web/keyboard-processor/src/text/defaultRules.ts +++ b/web/src/engine/keyboard/src/defaultRules.ts @@ -1,32 +1,28 @@ -// TODO: Move to separate folder: 'codes' -// We should start splitting off code needed by keyboards even without a KeyboardProcessor active. -// There's an upcoming `/common/web/types` package that 'codes' and 'keyboards' may fit well within. - -import { ModifierKeyConstants} from '@keymanapp/common-types'; -import Codes from "./codes.js"; -import type KeyEvent from "./keyEvent.js"; -import type OutputTarget from "./outputTarget.js"; - -// The only members referenced are to produce warning and error logs. A little abstraction -// via an optional 'logger' interface can maintain it while facilitating a the split alluded -// to above. -// -// Alternatively, we could just... not take in the parameter at all, which'd also facilitate -// the future modularization effort. -import RuleBehavior from "./ruleBehavior.js"; +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * Implementation of default rules + */ + +import { ModifierKeyConstants } from '@keymanapp/common-types'; +import Codes from './codes.js'; +import type KeyEvent from './keyEvent.js'; +import { type OutputTarget } from './outputTarget.interface.js'; export enum EmulationKeystrokes { Enter = '\n', Backspace = '\b' } +export class LogMessages { + errorLog?: string; + warningLog?: string; +} + /** * Defines a collection of static library functions that define KeymanWeb's default (implied) keyboard rule behaviors. */ export default class DefaultRules { - public constructor() { - } - codeForEvent(Lkc: KeyEvent) { return Codes.keyCodes[Lkc.kName] || Lkc.Lcode;; } @@ -35,7 +31,7 @@ export default class DefaultRules { * Serves as a default keycode lookup table. This may be referenced safely by mnemonic handling without fear of side-effects. * Also used by Processor.defaultRuleBehavior to generate output after filtering for special cases. */ - public forAny(Lkc: KeyEvent, isMnemonic: boolean, ruleBehavior?: RuleBehavior) { + public forAny(Lkc: KeyEvent, isMnemonic: boolean, logMessages?: LogMessages): string { var char = ''; // A pretty simple table of lookups, corresponding VERY closely to the original defaultKeyOutput. @@ -43,9 +39,9 @@ export default class DefaultRules { return char; } else if(!isMnemonic && ((char = this.forNumpadKeys(Lkc)) != null)) { return char; - } else if((char = this.forUnicodeKeynames(Lkc, ruleBehavior)) != null) { + } else if((char = this.forUnicodeKeynames(Lkc, logMessages)) != null) { return char; - } else if((char = this.forBaseKeys(Lkc, ruleBehavior)) != null) { + } else if((char = this.forBaseKeys(Lkc, logMessages)) != null) { return char; } else { // // For headless and embeddded, we may well allow '\t'. It's DOM mode that has other uses. @@ -152,7 +148,7 @@ export default class DefaultRules { // Test for fall back to U_xxxxxx key id // For this first test, we ignore the keyCode and use the keyName - public forUnicodeKeynames(Lkc: KeyEvent, ruleBehavior?: RuleBehavior) { + public forUnicodeKeynames(Lkc: KeyEvent, logMessages?: LogMessages) { const keyName = Lkc.kName; // Test for fall back to U_xxxxxx key id @@ -169,8 +165,8 @@ export default class DefaultRules { // Code points [U_0000 - U_001F] and [U_0080 - U_009F] refer to Unicode C0 and C1 control codes. // Check the codePoint number and do not allow output of these codes via U_xxxxxx shortcuts. // Also handles invalid identifiers (e.g. `U_ghij`) for which parseInt returns NaN - if(ruleBehavior) { - ruleBehavior.errorLog = ("Suppressing Unicode control code in " + keyName); + if(logMessages) { + logMessages.errorLog = ("Suppressing Unicode control code in " + keyName); } // We'll attempt to add valid chars continue; @@ -185,17 +181,17 @@ export default class DefaultRules { // Test for otherwise unimplemented keys on the the base default & shift layers. // Those keys must be blocked by keyboard rules if intentionally unimplemented; otherwise, this function will trigger. - public forBaseKeys(Lkc: KeyEvent, ruleBehavior?: RuleBehavior) { + public forBaseKeys(Lkc: KeyEvent, logMessages?: LogMessages) { let n = Lkc.Lcode; let keyShiftState = Lkc.Lmodifiers; // check if exact match to SHIFT's code. Only the 'default' and 'shift' layers should have default key outputs. // TODO: Extend to allow AltGr as well - better mnemonic support. - if(keyShiftState == ModifierKeyConstants.K_SHIFTFLAG) { + if (keyShiftState == ModifierKeyConstants.K_SHIFTFLAG) { keyShiftState = 1; } else if(keyShiftState != 0) { - if(ruleBehavior) { - ruleBehavior.warningLog = "KMW only defines default key output for the 'default' and 'shift' layers!"; + if(logMessages) { + logMessages.warningLog = "KMW only defines default key output for the 'default' and 'shift' layers!"; } return null; } @@ -216,8 +212,8 @@ export default class DefaultRules { return keyShiftState ? '|' : '\\'; } } catch (e) { - if(ruleBehavior) { - ruleBehavior.errorLog = "Error detected with default mapping for key: code = " + n + ", shift state = " + (keyShiftState == 1 ? 'shift' : 'default'); + if(logMessages) { + logMessages.errorLog = "Error detected with default mapping for key: code = " + n + ", shift state = " + (keyShiftState == 1 ? 'shift' : 'default'); } } diff --git a/common/web/keyboard-processor/src/index.ts b/web/src/engine/keyboard/src/index.ts similarity index 57% rename from common/web/keyboard-processor/src/index.ts rename to web/src/engine/keyboard/src/index.ts index f800691cfac..f5a4edea71d 100644 --- a/common/web/keyboard-processor/src/index.ts +++ b/web/src/engine/keyboard/src/index.ts @@ -24,23 +24,13 @@ export { export { default as SpacebarText } from "./keyboards/spacebarText.js"; export { default as StateKeyMap } from "./keyboards/stateKeyMap.js"; -export { default as Codes } from "./text/codes.js"; -export * from "./text/codes.js"; -export * from "./text/deadkeys.js"; -export { default as DefaultRules } from "./text/defaultRules.js"; -export * from "./text/defaultRules.js"; -export { default as KeyboardInterface } from "./text/kbdInterface.js"; -export * from "./text/kbdInterface.js"; -export { default as KeyboardProcessor } from "./text/keyboardProcessor.js"; -export * from "./text/keyboardProcessor.js"; -export { default as KeyEvent } from "./text/keyEvent.js"; -export * from "./text/keyEvent.js"; -export { default as KeyMapping } from "./text/keyMapping.js"; -export { default as OutputTarget } from "./text/outputTarget.js"; -export * from "./text/outputTarget.js"; -export { default as RuleBehavior } from "./text/ruleBehavior.js"; -export * from "./text/stringDivergence.js"; -export * from "./text/systemStores.js"; +export { default as Codes } from "./codes.js"; +export * from "./codes.js"; +export { default as DefaultRules } from "./defaultRules.js"; +export * from "./defaultRules.js"; +export { default as KeyEvent } from "./keyEvent.js"; +export * from "./keyEvent.js"; +export { default as KeyMapping } from "./keyMapping.js"; export * from "@keymanapp/web-utils"; @@ -48,4 +38,4 @@ export * from "@keymanapp/web-utils"; // Without the line below... OutputTarget would likely be aliased there, as it's // the last `export { default as _ }` => `export * from` pairing seen above. -export default undefined; \ No newline at end of file +export default undefined; diff --git a/common/web/keyboard-processor/src/text/keyEvent.ts b/web/src/engine/keyboard/src/keyEvent.ts similarity index 96% rename from common/web/keyboard-processor/src/text/keyEvent.ts rename to web/src/engine/keyboard/src/keyEvent.ts index a38992a3a14..c359558b1fe 100644 --- a/common/web/keyboard-processor/src/text/keyEvent.ts +++ b/web/src/engine/keyboard/src/keyEvent.ts @@ -6,16 +6,16 @@ // a key event. The most straightforward way to integrate Web OSK events on other platforms is to have // other platforms recognize and utilize this type. -import type Keyboard from "../keyboards/keyboard.js"; +import type Keyboard from "./keyboards/keyboard.js"; import { type DeviceSpec } from "@keymanapp/web-utils"; import Codes from './codes.js'; -import DefaultRules from './defaultRules.js'; -import { ActiveKeyBase } from "../index.js"; +import DefaultRules from "./defaultRules.js"; +import { ActiveKeyBase } from './keyboards/activeLayout.js'; // Represents a probability distribution over a keyboard's keys. // Defined here to avoid compilation issues. -export type KeyDistribution = {keySpec: ActiveKeyBase, p: number}[]; +export type KeyDistribution = { keySpec: ActiveKeyBase, p: number }[]; /** * A simple instance of the standard 'default rules' for keystroke processing from the @@ -188,4 +188,4 @@ export default class KeyEvent implements KeyEventSpec { } } } -}; \ No newline at end of file +}; diff --git a/common/web/keyboard-processor/src/text/keyMapping.ts b/web/src/engine/keyboard/src/keyMapping.ts similarity index 100% rename from common/web/keyboard-processor/src/text/keyMapping.ts rename to web/src/engine/keyboard/src/keyMapping.ts diff --git a/common/web/keyboard-processor/src/keyboards/activeLayout.ts b/web/src/engine/keyboard/src/keyboards/activeLayout.ts similarity index 99% rename from common/web/keyboard-processor/src/keyboards/activeLayout.ts rename to web/src/engine/keyboard/src/keyboards/activeLayout.ts index 7b293db93c3..c440511f172 100644 --- a/common/web/keyboard-processor/src/keyboards/activeLayout.ts +++ b/web/src/engine/keyboard/src/keyboards/activeLayout.ts @@ -1,6 +1,6 @@ -import Codes from "../text/codes.js"; -import KeyEvent, { KeyEventSpec } from "../text/keyEvent.js"; -import KeyMapping from "../text/keyMapping.js"; +import Codes from "../codes.js"; +import KeyEvent, { KeyEventSpec } from "../keyEvent.js"; +import KeyMapping from "../keyMapping.js"; import { ButtonClasses, Layouts } from "./defaultLayouts.js"; import type { LayoutKey, LayoutSubKey, LayoutRow, LayoutLayer, LayoutFormFactor, ButtonClass } from "./defaultLayouts.js"; import type Keyboard from "./keyboard.js"; @@ -105,7 +105,7 @@ export class ActiveKeyBase { pad: ActiveKeyBase.DEFAULT_PAD }; - /** WARNING - DO NOT USE DIRECTLY outside of @keymanapp/keyboard-processor! */ + /** WARNING - DO NOT USE DIRECTLY outside of keyman/engine/keyboard! */ id: TouchLayout.TouchLayoutKeyId; text: string; hint?: string; diff --git a/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts b/web/src/engine/keyboard/src/keyboards/defaultLayouts.ts similarity index 99% rename from common/web/keyboard-processor/src/keyboards/defaultLayouts.ts rename to web/src/engine/keyboard/src/keyboards/defaultLayouts.ts index 109da53a0e5..3b97659d4bb 100644 --- a/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts +++ b/web/src/engine/keyboard/src/keyboards/defaultLayouts.ts @@ -16,7 +16,7 @@ import ButtonClasses = TouchLayout.TouchLayoutKeySp; export { ButtonClasses }; -import Codes from "../text/codes.js"; +import Codes from "../codes.js"; import type Keyboard from "./keyboard.js"; export interface EncodedVisualKeyboard { diff --git a/common/web/keyboard-processor/src/keyboards/keyboard.ts b/web/src/engine/keyboard/src/keyboards/keyboard.ts similarity index 99% rename from common/web/keyboard-processor/src/keyboards/keyboard.ts rename to web/src/engine/keyboard/src/keyboards/keyboard.ts index 5312d825a65..42463cd6e7f 100644 --- a/common/web/keyboard-processor/src/keyboards/keyboard.ts +++ b/web/src/engine/keyboard/src/keyboards/keyboard.ts @@ -1,16 +1,16 @@ -import Codes from "../text/codes.js"; +import Codes from "../codes.js"; import { EncodedVisualKeyboard, LayoutSpec, Layouts } from "./defaultLayouts.js"; import { ActiveKey, ActiveLayout, ActiveSubKey } from "./activeLayout.js"; -import KeyEvent from "../text/keyEvent.js"; -import type OutputTarget from "../text/outputTarget.js"; +import KeyEvent from "../keyEvent.js"; +import { type OutputTarget } from "../outputTarget.interface.js"; import { ModifierKeyConstants, TouchLayout } from "@keymanapp/common-types"; type TouchLayoutSpec = TouchLayout.TouchLayoutPlatform & { isDefault?: boolean}; -import type { ComplexKeyboardStore } from "../text/kbdInterface.js"; - import { Version, DeviceSpec } from "@keymanapp/web-utils"; import StateKeyMap from "./stateKeyMap.js"; +type ComplexKeyboardStore = ( string | { t: 'd', d: number } | { ['t']: 'b' })[]; + /** * Stores preprocessed properties of a keyboard for quick retrieval later. */ diff --git a/common/web/keyboard-processor/src/keyboards/keyboardHarness.ts b/web/src/engine/keyboard/src/keyboards/keyboardHarness.ts similarity index 97% rename from common/web/keyboard-processor/src/keyboards/keyboardHarness.ts rename to web/src/engine/keyboard/src/keyboards/keyboardHarness.ts index 671c8fefd7c..bb2e2d5ccb1 100644 --- a/common/web/keyboard-processor/src/keyboards/keyboardHarness.ts +++ b/web/src/engine/keyboard/src/keyboards/keyboardHarness.ts @@ -1,5 +1,6 @@ import Keyboard from "./keyboard.js"; -import Codes from "../text/codes.js"; +import Codes from "../codes.js"; +import { DeviceSpec } from '@keymanapp/web-utils'; /** * Defines members of the top-level `keyman` global object necessary to guarantee @@ -40,6 +41,8 @@ export const MinimalKeymanGlobal: KeyboardKeymanGlobal = { export class KeyboardHarness { public readonly _jsGlobal: any; public readonly keymanGlobal: KeyboardKeymanGlobal; + activeDevice: DeviceSpec; + /** * Constructs and configures a harness for receiving dynamically-loaded Keyman keyboards. diff --git a/common/web/keyboard-processor/src/keyboards/keyboardLoaderBase.ts b/web/src/engine/keyboard/src/keyboards/keyboardLoaderBase.ts similarity index 100% rename from common/web/keyboard-processor/src/keyboards/keyboardLoaderBase.ts rename to web/src/engine/keyboard/src/keyboards/keyboardLoaderBase.ts diff --git a/common/web/keyboard-processor/src/keyboards/keyboardProperties.ts b/web/src/engine/keyboard/src/keyboards/keyboardProperties.ts similarity index 100% rename from common/web/keyboard-processor/src/keyboards/keyboardProperties.ts rename to web/src/engine/keyboard/src/keyboards/keyboardProperties.ts diff --git a/common/web/keyboard-processor/src/keyboards/loaders/dom-keyboard-loader.ts b/web/src/engine/keyboard/src/keyboards/loaders/dom-keyboard-loader.ts similarity index 100% rename from common/web/keyboard-processor/src/keyboards/loaders/dom-keyboard-loader.ts rename to web/src/engine/keyboard/src/keyboards/loaders/dom-keyboard-loader.ts diff --git a/common/web/keyboard-processor/src/keyboards/loaders/domKeyboardLoader.ts b/web/src/engine/keyboard/src/keyboards/loaders/domKeyboardLoader.ts similarity index 97% rename from common/web/keyboard-processor/src/keyboards/loaders/domKeyboardLoader.ts rename to web/src/engine/keyboard/src/keyboards/loaders/domKeyboardLoader.ts index ea9cddecd42..fcb2c764cd6 100644 --- a/common/web/keyboard-processor/src/keyboards/loaders/domKeyboardLoader.ts +++ b/web/src/engine/keyboard/src/keyboards/loaders/domKeyboardLoader.ts @@ -2,7 +2,7 @@ /// -import { Keyboard, KeyboardHarness, KeyboardLoaderBase, KeyboardLoadErrorBuilder, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; +import { Keyboard, KeyboardHarness, KeyboardLoaderBase, KeyboardLoadErrorBuilder, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; import { ManagedPromise } from '@keymanapp/web-utils'; diff --git a/common/web/keyboard-processor/src/keyboards/loaders/node-keyboard-loader.ts b/web/src/engine/keyboard/src/keyboards/loaders/node-keyboard-loader.ts similarity index 100% rename from common/web/keyboard-processor/src/keyboards/loaders/node-keyboard-loader.ts rename to web/src/engine/keyboard/src/keyboards/loaders/node-keyboard-loader.ts diff --git a/common/web/keyboard-processor/src/keyboards/loaders/nodeKeyboardLoader.ts b/web/src/engine/keyboard/src/keyboards/loaders/nodeKeyboardLoader.ts similarity index 95% rename from common/web/keyboard-processor/src/keyboards/loaders/nodeKeyboardLoader.ts rename to web/src/engine/keyboard/src/keyboards/loaders/nodeKeyboardLoader.ts index 143e1c16c11..b9f6a7cdfef 100644 --- a/common/web/keyboard-processor/src/keyboards/loaders/nodeKeyboardLoader.ts +++ b/web/src/engine/keyboard/src/keyboards/loaders/nodeKeyboardLoader.ts @@ -1,4 +1,4 @@ -import { Keyboard, KeyboardHarness, KeyboardLoaderBase, KeyboardLoadErrorBuilder, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; +import { Keyboard, KeyboardHarness, KeyboardLoaderBase, KeyboardLoadErrorBuilder, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; import vm from 'vm'; import fs from 'fs'; diff --git a/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.dom.json b/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.dom.json new file mode 100644 index 00000000000..1dd122f5485 --- /dev/null +++ b/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.dom.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../../../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "../../../", + "outDir": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/", + "tsBuildInfoFile": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/tsconfig.dom.tsbuildinfo", + "rootDir": "." + }, + "references": [ + { "path": "../../../tsconfig.json" } + ], + "include": ["dom-keyboard-loader.ts", "domKeyboardLoader.ts"], +} diff --git a/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.node.json b/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.node.json new file mode 100644 index 00000000000..4a06decf4c4 --- /dev/null +++ b/web/src/engine/keyboard/src/keyboards/loaders/tsconfig.node.json @@ -0,0 +1,14 @@ +{ + "extends": "../../../../../../tsconfig.base.json", + "compilerOptions": { + "types": [ "node" ], + "baseUrl": "../../../", + "outDir": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/", + "tsBuildInfoFile": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/tsconfig.node.tsbuildinfo", + "rootDir": "." + }, + "references": [ + { "path": "../../../tsconfig.json" } + ], + "include": ["node-keyboard-loader.ts", "nodeKeyboardLoader.ts"], +} diff --git a/common/web/keyboard-processor/src/keyboards/spacebarText.ts b/web/src/engine/keyboard/src/keyboards/spacebarText.ts similarity index 100% rename from common/web/keyboard-processor/src/keyboards/spacebarText.ts rename to web/src/engine/keyboard/src/keyboards/spacebarText.ts diff --git a/common/web/keyboard-processor/src/keyboards/stateKeyMap.ts b/web/src/engine/keyboard/src/keyboards/stateKeyMap.ts similarity index 65% rename from common/web/keyboard-processor/src/keyboards/stateKeyMap.ts rename to web/src/engine/keyboard/src/keyboards/stateKeyMap.ts index c8e9ee8b763..e82ff417c4e 100644 --- a/common/web/keyboard-processor/src/keyboards/stateKeyMap.ts +++ b/web/src/engine/keyboard/src/keyboards/stateKeyMap.ts @@ -1,5 +1,5 @@ /** - * Provided by @keymanapp/keyboard-processor's `KeyboardProcessor` class and utilized by the OSK + * Provided by keyman/engine/keyboard's `KeyboardProcessor` class and utilized by the OSK * to provide state feedback on any corresponding keys visible in the OSK. */ export default interface StateKeyMap { diff --git a/web/src/engine/keyboard/src/outputTarget.interface.ts b/web/src/engine/keyboard/src/outputTarget.interface.ts new file mode 100644 index 00000000000..410094c812c --- /dev/null +++ b/web/src/engine/keyboard/src/outputTarget.interface.ts @@ -0,0 +1,104 @@ +export interface OutputTarget { + /** + * Signifies that this OutputTarget has no default key processing behaviors. This should be false + * for OutputTargets backed by web elements like HTMLInputElement or HTMLTextAreaElement. + */ + get isSynthetic(): boolean; + + resetContext(): void; + + hasDeadkeyMatch(n: number, d: number): boolean; + + insertDeadkeyBeforeCaret(d: number): void; + + /** + * Clears any selected text within the wrapper's element(s). + * Silently does nothing if no such text exists. + */ + clearSelection(): void; + + /** + * Clears any cached selection-related state values. + */ + invalidateSelection(): void; + + /** + * Indicates whether or not the underlying element has its own selection (input, textarea) + * or is part of (or possesses) the DOM's active selection. Don't confuse with isSelectionEmpty(). + * + * TODO: rename to supportsOwnSelection + */ + hasSelection(): boolean; + + /** + * Returns true if there is no current selection -- that is, the selection range is empty + */ + isSelectionEmpty(): boolean; + + /** + * Returns an index corresponding to the caret's position for use with deadkeys. + */ + getDeadkeyCaret(): number; + + /** + * Relative to the caret, gets the current context within the wrapper's element. + */ + getTextBeforeCaret(): string; + + /** + * Gets the element's-currently selected text. + */ + getSelectedText(): string; + + /** + * Relative to the caret (and/or active selection), gets the element's text after the caret, + * excluding any actively selected text that would be immediately replaced upon text entry. + */ + getTextAfterCaret(): string; + + /** + * Gets the element's full text, including any text that is actively selected. + */ + getText(): string; + + /** + * Performs context deletions (from the left of the caret) as needed by the KeymanWeb engine and + * corrects the location of any affected deadkeys. + * + * Does not delete deadkeys (b/c KMW 1 & 2 behavior maintenance). + * @param dn The number of characters to delete. If negative, context will be left unchanged. + */ + deleteCharsBeforeCaret(dn: number): void; + + /** + * Inserts text immediately before the caret's current position, moving the caret after the + * newly inserted text in the process along with any affected deadkeys. + * + * @param s Text to insert before the caret's current position. + */ + insertTextBeforeCaret(s: string): void; + + /** + * Allows element-specific handling for ENTER key inputs. Conceptually, this should usually + * correspond to `insertTextBeforeCaret('\n'), but actual implementation will vary greatly among + * elements. + */ + handleNewlineAtCaret(): void; + + /** + * Saves element-specific state properties prone to mutation, enabling restoration after + * text-output operations. + */ + saveProperties(): void; + + /** + * Restores previously-saved element-specific state properties. Designed for use after text-output + * ops to facilitate more-seamless web-dev and user interactions. + */ + restoreProperties(): void; + + /** + * Generates a synthetic event on the underlying element, signalling that its value has changed. + */ + doInputEvent(): void; +} diff --git a/common/web/keyboard-processor/tsconfig.all.json b/web/src/engine/keyboard/tsconfig.all.json similarity index 66% rename from common/web/keyboard-processor/tsconfig.all.json rename to web/src/engine/keyboard/tsconfig.all.json index dabb262d9cb..1ee44d3e70e 100644 --- a/common/web/keyboard-processor/tsconfig.all.json +++ b/web/src/engine/keyboard/tsconfig.all.json @@ -1,15 +1,14 @@ { - "extends": "../tsconfig.kmw-main-base.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "baseUrl": "./", - "outDir": "build/obj/", - "tsBuildInfoFile": "build/obj/tsconfig.all.tsbuildinfo", + "outDir": "../../../build/engine/keyboard/obj/", + "tsBuildInfoFile": "../../../build/engine/keyboard/obj/tsconfig.all.tsbuildinfo", "rootDir": "./src/" }, "references": [ { "path": "./src/keyboards/loaders/tsconfig.dom.json" }, { "path": "./src/keyboards/loaders/tsconfig.node.json" }, - { "path": "./tests/tsconfig.json" }, ], // Actual main-body compilation is in tsconfig.json. This config is just a wrapper // to trigger all three components at once. diff --git a/web/src/engine/keyboard/tsconfig.json b/web/src/engine/keyboard/tsconfig.json new file mode 100644 index 00000000000..84d96c8591f --- /dev/null +++ b/web/src/engine/keyboard/tsconfig.json @@ -0,0 +1,12 @@ +// Is used by the keyboard-loader submodules. +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "../../../build/engine/keyboard/obj/", + "tsBuildInfoFile": "../../../build/engine/keyboard/obj/tsconfig.tsbuildinfo", + "rootDir": "./src/" + }, + "include": [ "./src/**/*.ts"], + "exclude": ["./src/keyboards/loaders/**/*.ts"] +} diff --git a/web/src/engine/main/build.sh b/web/src/engine/main/build.sh index cceb9b4b8b7..77673626e02 100755 --- a/web/src/engine/main/build.sh +++ b/web/src/engine/main/build.sh @@ -14,12 +14,13 @@ SUBPROJECT_NAME=engine/main builder_describe "Builds the Keyman Engine for Web's common top-level base classes." \ "@/common/web/keyman-version" \ - "@/common/web/keyboard-processor" \ - "@/common/predictive-text" \ + "@/web/src/engine/keyboard" \ "@/web/src/engine/interfaces build" \ "@/web/src/engine/device-detect build" \ - "@/web/src/engine/package-cache build" \ + "@/web/src/engine/js-processor build" \ + "@/web/src/engine/keyboard-storage build" \ "@/web/src/engine/osk build" \ + "@/web/src/engine/predictive-text/worker-main" \ "@/developer/src/kmc-model test" \ "clean" \ "configure" \ diff --git a/web/src/engine/main/src/contextManagerBase.ts b/web/src/engine/main/src/contextManagerBase.ts index c3f95810033..17fed71bd2e 100644 --- a/web/src/engine/main/src/contextManagerBase.ts +++ b/web/src/engine/main/src/contextManagerBase.ts @@ -1,6 +1,7 @@ import { EventEmitter } from 'eventemitter3'; -import { ManagedPromise, type Keyboard, type KeyboardInterface, type OutputTarget } from '@keymanapp/keyboard-processor'; -import { StubAndKeyboardCache, type KeyboardStub } from 'keyman/engine/package-cache'; +import { ManagedPromise, type Keyboard } from 'keyman/engine/keyboard'; +import { type KeyboardInterface, type OutputTarget } from 'keyman/engine/js-processor'; +import { StubAndKeyboardCache, type KeyboardStub } from 'keyman/engine/keyboard-storage'; import { PredictionContext } from 'keyman/engine/interfaces'; import { EngineConfiguration } from './engineConfiguration.js'; diff --git a/web/src/engine/main/src/engineConfiguration.ts b/web/src/engine/main/src/engineConfiguration.ts index c66d3bd805d..aac559acabd 100644 --- a/web/src/engine/main/src/engineConfiguration.ts +++ b/web/src/engine/main/src/engineConfiguration.ts @@ -1,9 +1,10 @@ import { EventEmitter } from "eventemitter3"; -import { DeviceSpec, KeyboardProperties, ManagedPromise, OutputTarget, physicalKeyDeviceAlias, RuleBehavior, SpacebarText } from "@keymanapp/keyboard-processor"; +import { DeviceSpec, KeyboardProperties, ManagedPromise, physicalKeyDeviceAlias, SpacebarText } from "keyman/engine/keyboard"; +import { OutputTarget, RuleBehavior } from 'keyman/engine/js-processor'; import { PathConfiguration, PathOptionDefaults, PathOptionSpec } from "keyman/engine/interfaces"; import { Device } from "keyman/engine/device-detect"; -import { KeyboardStub } from "keyman/engine/package-cache"; +import { KeyboardStub } from "keyman/engine/keyboard-storage"; interface EventMap { 'spacebartext': (mode: SpacebarText) => void; diff --git a/web/src/engine/main/src/hardKeyboard.ts b/web/src/engine/main/src/hardKeyboard.ts index a07904f4a6b..60f2b362004 100644 --- a/web/src/engine/main/src/hardKeyboard.ts +++ b/web/src/engine/main/src/hardKeyboard.ts @@ -1,6 +1,7 @@ import { EventEmitter } from "eventemitter3"; -import { Keyboard, KeyMapping, KeyEvent, type RuleBehavior, Codes } from "@keymanapp/keyboard-processor"; -import { KeyEventSourceInterface } from 'keyman/engine/events'; +import { Keyboard, KeyMapping, KeyEvent, Codes } from "keyman/engine/keyboard"; +import { type RuleBehavior } from 'keyman/engine/js-processor'; +import { KeyEventSourceInterface } from 'keyman/engine/osk'; import { ModifierKeyConstants } from '@keymanapp/common-types'; interface EventMap { diff --git a/web/src/engine/main/src/headless/contextWindow.ts b/web/src/engine/main/src/headless/contextWindow.ts index 2adb4f0b6a6..9fcd1458b2a 100644 --- a/web/src/engine/main/src/headless/contextWindow.ts +++ b/web/src/engine/main/src/headless/contextWindow.ts @@ -1,4 +1,4 @@ -import { Mock } from "@keymanapp/keyboard-processor"; +import { Mock } from "keyman/engine/js-processor"; export default class ContextWindow implements Context { // Used to limit the range of context replicated for use of keyboard rules within diff --git a/web/src/engine/main/src/headless/inputProcessor.ts b/web/src/engine/main/src/headless/inputProcessor.ts index 7b89a0e242a..6d8904c563d 100644 --- a/web/src/engine/main/src/headless/inputProcessor.ts +++ b/web/src/engine/main/src/headless/inputProcessor.ts @@ -7,20 +7,19 @@ import { LanguageProcessor } from "./languageProcessor.js"; import type { ModelSpec } from "keyman/engine/interfaces"; import { globalObject, DeviceSpec } from "@keymanapp/web-utils"; +import { Codes, type Keyboard, type KeyEvent } from "keyman/engine/keyboard"; import { type Alternate, - Codes, isEmptyTransform, - type Keyboard, KeyboardInterface, KeyboardProcessor, - type KeyEvent, Mock, type OutputTarget, - type ProcessorInitOptions, RuleBehavior, - SystemStoreIDs, -} from "@keymanapp/keyboard-processor"; + type ProcessorInitOptions, + SystemStoreIDs +} from 'keyman/engine/js-processor'; + import { TranscriptionCache } from "./transcriptionCache.js"; export class InputProcessor { diff --git a/web/src/engine/main/src/headless/languageProcessor.ts b/web/src/engine/main/src/headless/languageProcessor.ts index 30a676bb6aa..c1c1721484b 100644 --- a/web/src/engine/main/src/headless/languageProcessor.ts +++ b/web/src/engine/main/src/headless/languageProcessor.ts @@ -1,6 +1,6 @@ import { EventEmitter } from "eventemitter3"; import { LMLayer } from "@keymanapp/lexical-model-layer/web"; -import { OutputTarget, Transcription, Mock } from "@keymanapp/keyboard-processor"; +import { OutputTarget, Transcription, Mock } from "keyman/engine/js-processor"; import { LanguageProcessorEventMap, ModelSpec, StateChangeEnum, ReadySuggestions } from 'keyman/engine/interfaces'; import ContextWindow from "./contextWindow.js"; import { TranscriptionCache } from "./transcriptionCache.js"; diff --git a/web/src/engine/main/src/headless/transcriptionCache.ts b/web/src/engine/main/src/headless/transcriptionCache.ts index c173009171c..af05853e174 100644 --- a/web/src/engine/main/src/headless/transcriptionCache.ts +++ b/web/src/engine/main/src/headless/transcriptionCache.ts @@ -1,4 +1,4 @@ -import { Transcription } from "@keymanapp/keyboard-processor"; +import { Transcription } from "keyman/engine/js-processor"; const TRANSCRIPTION_BUFFER_SIZE = 10; diff --git a/web/src/engine/main/src/keyboardInterface.ts b/web/src/engine/main/src/keyboardInterface.ts index a18bafecd07..10194785948 100644 --- a/web/src/engine/main/src/keyboardInterface.ts +++ b/web/src/engine/main/src/keyboardInterface.ts @@ -1,7 +1,6 @@ -import { - KeyboardInterface as KeyboardInterfaceBase, KeyboardObject, -} from "@keymanapp/keyboard-processor"; -import { KeyboardStub, RawKeyboardStub, toUnprefixedKeyboardId as unprefixed } from 'keyman/engine/package-cache'; +import { KeyboardObject } from "keyman/engine/keyboard"; +import { KeyboardInterface as KeyboardInterfaceBase } from 'keyman/engine/js-processor'; +import { KeyboardStub, RawKeyboardStub, toUnprefixedKeyboardId as unprefixed } from 'keyman/engine/keyboard-storage'; import { ContextManagerBase } from './contextManagerBase.js'; import { VariableStoreCookieSerializer } from "./variableStoreCookieSerializer.js"; diff --git a/web/src/engine/main/src/keymanEngine.ts b/web/src/engine/main/src/keymanEngine.ts index eaa54e59945..30160e683c8 100644 --- a/web/src/engine/main/src/keymanEngine.ts +++ b/web/src/engine/main/src/keymanEngine.ts @@ -1,8 +1,9 @@ -import { type Keyboard, KeyboardKeymanGlobal, ProcessorInitOptions } from "@keymanapp/keyboard-processor"; -import { DOMKeyboardLoader as KeyboardLoader } from "@keymanapp/keyboard-processor/dom-keyboard-loader"; +import { type KeyEvent, type Keyboard, KeyboardKeymanGlobal } from "keyman/engine/keyboard"; +import { ProcessorInitOptions, RuleBehavior } from 'keyman/engine/js-processor'; +import { DOMKeyboardLoader as KeyboardLoader } from "keyman/engine/keyboard/dom-keyboard-loader"; import { InputProcessor } from './headless/inputProcessor.js'; import { OSKView } from "keyman/engine/osk"; -import { KeyboardRequisitioner, ModelCache, toUnprefixedKeyboardId as unprefixed } from "keyman/engine/package-cache"; +import { KeyboardRequisitioner, ModelCache, toUnprefixedKeyboardId as unprefixed } from "keyman/engine/keyboard-storage"; import { ModelSpec, PredictionContext } from "keyman/engine/interfaces"; import { EngineConfiguration, InitOptionSpec } from "./engineConfiguration.js"; @@ -10,8 +11,8 @@ import KeyboardInterface from "./keyboardInterface.js"; import { ContextManagerBase } from "./contextManagerBase.js"; import HardKeyboardBase from "./hardKeyboard.js"; import { LegacyAPIEvents } from "./legacyAPIEvents.js"; -import { KeyEventHandler, EventNames, EventListener, LegacyEventEmitter } from "keyman/engine/events"; -import DOMCloudRequester from "keyman/engine/package-cache/dom-requester"; +import { EventNames, EventListener, LegacyEventEmitter } from "keyman/engine/events"; +import DOMCloudRequester from "keyman/engine/keyboard-storage/dom-requester"; import KEYMAN_VERSION from "@keymanapp/keyman-version"; // From https://stackoverflow.com/a/69328045 @@ -29,6 +30,9 @@ function determineBaseLayout(): string { } } +export type KeyEventFullResultCallback = (result: RuleBehavior, error?: Error) => void; +export type KeyEventFullHandler = (event: KeyEvent, callback?: KeyEventFullResultCallback) => void; + export default class KeymanEngine< Configuration extends EngineConfiguration, ContextManager extends ContextManagerBase, @@ -47,7 +51,7 @@ export default class KeymanEngine< protected keyEventRefocus?: () => void; - private keyEventListener: KeyEventHandler = (event, callback) => { + private keyEventListener: KeyEventFullHandler = (event, callback) => { const outputTarget = this.contextManager.activeTarget; if(!this.contextManager.activeKeyboard || !outputTarget) { @@ -240,7 +244,7 @@ export default class KeymanEngine< this.contextManager.configure({ resetContext: (target) => { // Could reset the target's deadkeys here, but it's really more of a 'core' task. - // So we delegate that to keyboard-processor. + // So we delegate that to keyboard. if(this.osk) { this.osk.batchLayoutAfter(() => { this.core.resetContext(target); diff --git a/web/src/engine/main/src/variableStoreCookieSerializer.ts b/web/src/engine/main/src/variableStoreCookieSerializer.ts index 35b51150c0e..62c250329aa 100644 --- a/web/src/engine/main/src/variableStoreCookieSerializer.ts +++ b/web/src/engine/main/src/variableStoreCookieSerializer.ts @@ -1,4 +1,4 @@ -import { VariableStore, VariableStoreSerializer } from "@keymanapp/keyboard-processor"; +import { VariableStore, VariableStoreSerializer } from 'keyman/engine/js-processor'; import { CookieSerializer } from "keyman/engine/dom-utils"; // While there's little reason we couldn't store all of a keyboard's store values within diff --git a/web/src/engine/main/tsconfig.json b/web/src/engine/main/tsconfig.json index 9711d06a777..d2e0580161c 100644 --- a/web/src/engine/main/tsconfig.json +++ b/web/src/engine/main/tsconfig.json @@ -13,7 +13,8 @@ "references": [ { "path": "../device-detect" }, { "path": "../osk" }, - { "path": "../package-cache" }, + { "path": "../keyboard-storage" }, { "path": "../interfaces" }, + { "path": "../js-processor" } ] } diff --git a/web/src/engine/osk/build.sh b/web/src/engine/osk/build.sh index 4538b79d923..0d676a2d3ef 100755 --- a/web/src/engine/osk/build.sh +++ b/web/src/engine/osk/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/osk # ################################ Main script ################################ builder_describe "Builds the Keyman Engine for Web's On-Screen Keyboard package (OSK)." \ - "@/common/web/keyboard-processor build" \ + "@/web/src/engine/keyboard build" \ "@/common/web/gesture-recognizer build" \ "@/web/src/engine/interfaces build" \ "@/web/src/engine/dom-utils build" \ diff --git a/web/src/engine/osk/src/banner/banner.ts b/web/src/engine/osk/src/banner/banner.ts index 39b3ddc708c..e38b6b6625d 100644 --- a/web/src/engine/osk/src/banner/banner.ts +++ b/web/src/engine/osk/src/banner/banner.ts @@ -1,4 +1,4 @@ -import { Keyboard, KeyboardProperties } from '@keymanapp/keyboard-processor'; +import { Keyboard, KeyboardProperties } from 'keyman/engine/keyboard'; import { createUnselectableElement } from 'keyman/engine/dom-utils'; // Base class for a banner above the keyboard in the OSK diff --git a/web/src/engine/osk/src/banner/bannerController.ts b/web/src/engine/osk/src/banner/bannerController.ts index a53ea2f9e92..7fbc8ceb9bb 100644 --- a/web/src/engine/osk/src/banner/bannerController.ts +++ b/web/src/engine/osk/src/banner/bannerController.ts @@ -6,7 +6,7 @@ import { BannerView } from './bannerView.js'; import { Banner } from './banner.js'; import { BlankBanner } from './blankBanner.js'; import { HTMLBanner } from './htmlBanner.js'; -import { Keyboard, KeyboardProperties } from '@keymanapp/keyboard-processor'; +import { Keyboard, KeyboardProperties } from 'keyman/engine/keyboard'; export class BannerController { private container: BannerView; diff --git a/web/src/engine/osk/src/banner/suggestionBanner.ts b/web/src/engine/osk/src/banner/suggestionBanner.ts index adf6a5ea200..34455fd0619 100644 --- a/web/src/engine/osk/src/banner/suggestionBanner.ts +++ b/web/src/engine/osk/src/banner/suggestionBanner.ts @@ -13,7 +13,7 @@ import { import { BANNER_GESTURE_SET } from './bannerGestureSet.js'; -import { DeviceSpec, Keyboard, KeyboardProperties, timedPromise } from '@keymanapp/keyboard-processor'; +import { DeviceSpec, Keyboard, KeyboardProperties, timedPromise } from 'keyman/engine/keyboard'; import { Banner } from './banner.js'; import { ParsedLengthStyle } from '../lengthStyle.js'; import { getFontSizeStyle } from '../fontSizeUtils.js'; diff --git a/web/src/engine/osk/src/components/helpPageView.ts b/web/src/engine/osk/src/components/helpPageView.ts index 7c66708be9a..af489a2686f 100644 --- a/web/src/engine/osk/src/components/helpPageView.ts +++ b/web/src/engine/osk/src/components/helpPageView.ts @@ -1,4 +1,4 @@ -import { Keyboard } from '@keymanapp/keyboard-processor'; +import { Keyboard } from 'keyman/engine/keyboard'; import KeyboardView from './keyboardView.interface.js'; import { ParsedLengthStyle } from "../lengthStyle.js"; diff --git a/web/src/engine/osk/src/components/titleBar.ts b/web/src/engine/osk/src/components/titleBar.ts index 815b8a1e4e0..dd4eba3df7f 100644 --- a/web/src/engine/osk/src/components/titleBar.ts +++ b/web/src/engine/osk/src/components/titleBar.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'eventemitter3'; -import { Keyboard } from '@keymanapp/keyboard-processor'; +import { Keyboard } from 'keyman/engine/keyboard'; import OSKViewComponent from './oskViewComponent.interface.js'; import { ParsedLengthStyle } from '../lengthStyle.js'; diff --git a/web/src/engine/osk/src/correctionLayout.ts b/web/src/engine/osk/src/correctionLayout.ts index c3c0ffa8865..ba5f902ff47 100644 --- a/web/src/engine/osk/src/correctionLayout.ts +++ b/web/src/engine/osk/src/correctionLayout.ts @@ -1,4 +1,4 @@ -import { ActiveKey, ActiveKeyBase, ActiveLayer, ActiveRow, Codes } from "@keymanapp/keyboard-processor"; +import { ActiveKey, ActiveKeyBase, ActiveLayer, ActiveRow, Codes } from "keyman/engine/keyboard"; /** * Defines correction-layout mappings for keys to be considered by diff --git a/web/src/engine/osk/src/corrections.ts b/web/src/engine/osk/src/corrections.ts index 39c5ae2ef37..808e1c6dce5 100644 --- a/web/src/engine/osk/src/corrections.ts +++ b/web/src/engine/osk/src/corrections.ts @@ -1,4 +1,4 @@ -import { ActiveKeyBase, KeyDistribution } from "@keymanapp/keyboard-processor"; +import { ActiveKeyBase, KeyDistribution } from "keyman/engine/keyboard"; import { CorrectionLayout } from "./correctionLayout.js"; /** diff --git a/web/src/engine/osk/src/index.ts b/web/src/engine/osk/src/index.ts index 388ea32750b..f010697d966 100644 --- a/web/src/engine/osk/src/index.ts +++ b/web/src/engine/osk/src/index.ts @@ -1,9 +1,10 @@ -export { Codes, DeviceSpec, Keyboard, KeyboardProperties, SpacebarText } from '@keymanapp/keyboard-processor'; +export { Codes, DeviceSpec, Keyboard, KeyboardProperties, SpacebarText } from 'keyman/engine/keyboard'; export { default as OSKView } from './views/oskView.js'; export { default as FloatingOSKView, FloatingOSKViewConfiguration } from './views/floatingOskView.js'; export { default as AnchoredOSKView } from './views/anchoredOskView.js'; export { default as InlinedOSKView } from './views/inlinedOskView.js'; +export { type KeyEventResultCallback, type KeyEventHandler, KeyEventSourceInterface } from './views/keyEventSource.interface.js'; export { BannerController } from './banner/bannerController.js'; // Is referenced by at least one desktop UI module. export { FloatingOSKCookie as FloatingOSKViewCookie } from './views/floatingOskCookie.js'; diff --git a/web/src/engine/osk/src/input/gestures/browser/flick.ts b/web/src/engine/osk/src/input/gestures/browser/flick.ts index c83a85121ed..91d20718714 100644 --- a/web/src/engine/osk/src/input/gestures/browser/flick.ts +++ b/web/src/engine/osk/src/input/gestures/browser/flick.ts @@ -1,7 +1,7 @@ import { type KeyElement } from '../../../keyElement.js'; import VisualKeyboard from '../../../visualKeyboard.js'; -import { ActiveKey, ActiveKeyBase, ActiveSubKey, KeyDistribution, KeyEvent } from '@keymanapp/keyboard-processor'; +import { ActiveKey, ActiveKeyBase, ActiveSubKey, KeyDistribution, KeyEvent } from 'keyman/engine/keyboard'; import { ConfigChangeClosure, CumulativePathStats, GestureRecognizerConfiguration, GestureSequence, GestureSource, GestureSourceSubview, InputSample, RecognitionZoneSource } from '@keymanapp/gesture-recognizer'; import { GestureHandler } from '../gestureHandler.js'; import { distributionFromDistanceMaps } from '../../../corrections.js'; diff --git a/web/src/engine/osk/src/input/gestures/browser/modipress.ts b/web/src/engine/osk/src/input/gestures/browser/modipress.ts index f3670944a46..3ffd4c206c9 100644 --- a/web/src/engine/osk/src/input/gestures/browser/modipress.ts +++ b/web/src/engine/osk/src/input/gestures/browser/modipress.ts @@ -1,7 +1,7 @@ import { type KeyElement } from '../../../keyElement.js'; import VisualKeyboard from '../../../visualKeyboard.js'; -import { KeyDistribution, ActiveKeyBase } from '@keymanapp/keyboard-processor'; +import { KeyDistribution, ActiveKeyBase } from 'keyman/engine/keyboard'; import { GestureSequence } from '@keymanapp/gesture-recognizer'; import { GestureHandler } from '../gestureHandler.js'; diff --git a/web/src/engine/osk/src/input/gestures/browser/multitap.ts b/web/src/engine/osk/src/input/gestures/browser/multitap.ts index 23c4898ff0f..99e50810f9c 100644 --- a/web/src/engine/osk/src/input/gestures/browser/multitap.ts +++ b/web/src/engine/osk/src/input/gestures/browser/multitap.ts @@ -1,7 +1,7 @@ import { type KeyElement } from '../../../keyElement.js'; import VisualKeyboard from '../../../visualKeyboard.js'; -import { ActiveSubKey, ActiveKey, KeyDistribution, ActiveKeyBase } from '@keymanapp/keyboard-processor'; +import { ActiveSubKey, ActiveKey, KeyDistribution, ActiveKeyBase } from 'keyman/engine/keyboard'; import { GestureSequence, GestureStageReport } from '@keymanapp/gesture-recognizer'; import { GestureHandler } from '../gestureHandler.js'; import { distributionFromDistanceMaps } from '../../../corrections.js'; diff --git a/web/src/engine/osk/src/input/gestures/browser/oskSubKey.ts b/web/src/engine/osk/src/input/gestures/browser/oskSubKey.ts index 7640c3b20e7..abf3a9fb801 100644 --- a/web/src/engine/osk/src/input/gestures/browser/oskSubKey.ts +++ b/web/src/engine/osk/src/input/gestures/browser/oskSubKey.ts @@ -1,4 +1,4 @@ -import { ActiveSubKey } from '@keymanapp/keyboard-processor'; +import { ActiveSubKey } from 'keyman/engine/keyboard'; import OSKKey from '../../../keyboard-layout/oskKey.js'; import { KeyData, KeyElement, link } from '../../../keyElement.js'; import VisualKeyboard from '../../../visualKeyboard.js'; diff --git a/web/src/engine/osk/src/input/gestures/browser/subkeyPopup.ts b/web/src/engine/osk/src/input/gestures/browser/subkeyPopup.ts index e9388e96f2a..d33d3192116 100644 --- a/web/src/engine/osk/src/input/gestures/browser/subkeyPopup.ts +++ b/web/src/engine/osk/src/input/gestures/browser/subkeyPopup.ts @@ -3,7 +3,7 @@ import { type KeyElement } from '../../../keyElement.js'; import OSKBaseKey from '../../../keyboard-layout/oskBaseKey.js'; import VisualKeyboard from '../../../visualKeyboard.js'; -import { DeviceSpec, ActiveSubKey, KeyDistribution, ActiveKeyBase } from '@keymanapp/keyboard-processor'; +import { DeviceSpec, ActiveSubKey, KeyDistribution, ActiveKeyBase } from 'keyman/engine/keyboard'; import { ConfigChangeClosure, GestureRecognizerConfiguration, GestureSequence, PaddedZoneSource, RecognitionZoneSource } from '@keymanapp/gesture-recognizer'; import { GestureHandler } from '../gestureHandler.js'; import { CorrectionLayout, CorrectionLayoutEntry } from '../../../correctionLayout.js'; diff --git a/web/src/engine/osk/src/input/gestures/gestureHandler.ts b/web/src/engine/osk/src/input/gestures/gestureHandler.ts index 4c45c39e776..3c585de6465 100644 --- a/web/src/engine/osk/src/input/gestures/gestureHandler.ts +++ b/web/src/engine/osk/src/input/gestures/gestureHandler.ts @@ -1,4 +1,4 @@ -import { ActiveKeyBase, KeyDistribution } from "@keymanapp/keyboard-processor"; +import { ActiveKeyBase, KeyDistribution } from "keyman/engine/keyboard"; export interface GestureHandler { /** diff --git a/web/src/engine/osk/src/input/gestures/heldRepeater.ts b/web/src/engine/osk/src/input/gestures/heldRepeater.ts index 0f74677ddab..025d8989125 100644 --- a/web/src/engine/osk/src/input/gestures/heldRepeater.ts +++ b/web/src/engine/osk/src/input/gestures/heldRepeater.ts @@ -1,5 +1,5 @@ import { GestureSequence } from "@keymanapp/gesture-recognizer"; -import { KeyDistribution } from "@keymanapp/keyboard-processor"; +import { KeyDistribution } from "keyman/engine/keyboard"; import { KeyElement } from "../../keyElement.js"; import { GestureHandler } from './gestureHandler.js'; diff --git a/web/src/engine/osk/src/input/gestures/specsForLayout.ts b/web/src/engine/osk/src/input/gestures/specsForLayout.ts index 34d5576e236..5e53a443f50 100644 --- a/web/src/engine/osk/src/input/gestures/specsForLayout.ts +++ b/web/src/engine/osk/src/input/gestures/specsForLayout.ts @@ -12,7 +12,7 @@ import ButtonClasses = TouchLayout.TouchLayoutKeySp; import { ActiveLayout, deepCopy -} from '@keymanapp/keyboard-processor'; +} from 'keyman/engine/keyboard'; import { type KeyElement } from '../../keyElement.js'; @@ -20,20 +20,8 @@ import { calcLockedDistance, lockedAngleForDir, MAX_TOLERANCE_ANGLE_SKEW, type O import specs = gestures.specs; -export interface GestureParams { +export interface GestureParams { readonly longpress: { - /** - * Allows enabling or disabling the longpress up-flick shortcut for - * keyboards that do not include any defined flick gestures. - * - * Will be ignored (in favor of `false`) for keyboards that do have defined - * flicks. - * - * Note: this is automatically overwritten during keyboard initialization - * to match the keyboard's properties. - */ - permitsFlick: (item?: Item) => boolean, - /** * The minimum _net_ distance traveled before a longpress flick-shortcut will cancel any * conflicting flick models. @@ -98,19 +86,31 @@ export interface GestureParams { * Is currently also used as the max radius for valid flick-reset recentering targets. */ dirLockDist: number + } +} + +export interface FullGestureParams extends GestureParams { + readonly longpress: GestureParams["longpress"] & { + /** + * Allows enabling or disabling the longpress up-flick shortcut for + * keyboards that do not include any defined flick gestures. + * + * Will be ignored (in favor of `false`) for keyboards that do have defined + * flicks. + * + * Note: this is automatically overwritten during keyboard initialization + * to match the keyboard's properties. + */ + permitsFlick: (item?: Item) => boolean }, /** * Indicates whether roaming-touch oriented behaviors should be enabled. - * - * Note that run-time adjustments to this property after initialization will - * not take affect, unlike the other properties of the overall parameter object. */ roamingEnabled?: boolean; } export const DEFAULT_GESTURE_PARAMS: GestureParams = { longpress: { - permitsFlick: () => true, // Note: actual runtime value is determined at runtime based upon row height. // See `VisualKeyboard.refreshLayout`, CTRL-F "Step 3". flickDistStart: 8, @@ -206,17 +206,16 @@ let dummy: ActiveLayout; let dummy2: LayoutGestureSupportFlags = dummy; /** - * Defines the set of gestures appropriate for use with the specified Keyman keyboard. + * Defines the set of gestures appropriate for use with the specified Keyman + * keyboard. * @param layerGroup The active keyboard's layer group - * @param params A set of tweakable gesture parameters. It will be closure-captured - * and referred to by reference; changes to its values will take - * immediate effect during gesture processing. - * - * If params.roamingEnabled is unset, it will be initialized by this - * method based upon layout properties. + * @param paramObj A set of tweakable gesture parameters. It will be + * closure-captured and referred to by reference; changes to + * its values will take immediate effect during gesture + * processing. * @returns */ -export function gestureSetForLayout(flags: LayoutGestureSupportFlags, params: GestureParams): GestureModelDefs { +export function gestureSetForLayout(flags: LayoutGestureSupportFlags, paramObj: GestureParams): GestureModelDefs { // To be used among the `allowsInitialState` contact-model specifications as needed. const gestureKeyFilter = (key: KeyElement, gestureId: string) => { if(!key) { @@ -248,18 +247,33 @@ export function gestureSetForLayout(flags: LayoutGestureSupportFlags, params: Ge } }; - const doRoaming = params.roamingEnabled ||= !flags.hasFlicks; + const params = paramObj as FullGestureParams; + + // Override any prior entries for keyboard-specific configuration. + params.longpress.permitsFlick = (key) => { + const flickSpec = key?.key.spec.flick; + return !flickSpec || !(flickSpec.n || flickSpec.nw || flickSpec.ne); + }; + const doRoaming = params.roamingEnabled = !flags.hasFlicks; const _initialTapModel: GestureModel = deepCopy(!doRoaming ? initialTapModel(params) : initialTapModelWithReset(params)); const _simpleTapModel: GestureModel = deepCopy(!doRoaming ? simpleTapModel(params) : simpleTapModelWithReset(params)); // Ensure all deep-copy operations for longpress modeling occur before the property-redefining block. const _longpressModel: GestureModel = withKeySpecFiltering(deepCopy(longpressModel(params, true, doRoaming)), 0); + const _multitapStartModel: GestureModel = withKeySpecFiltering(multitapStartModel(params), 0); + const _modipressMultitapStartModel: GestureModel = withKeySpecFiltering(modipressMultitapStartModel(params), 0); // `deepCopy` does not preserve property definitions, instead raw-copying its value. // We need to re-instate the longpress delay property here. Object.defineProperty(_longpressModel.contacts[0].model.timer, 'duration', { get: () => params.longpress.waitLength }); + Object.defineProperty(_multitapStartModel.sustainTimer, 'duration', { + get: () => params.multitap.waitLength + }); + Object.defineProperty(_modipressMultitapStartModel.sustainTimer, 'duration', { + get: () => params.multitap.waitLength + }); // #region Functions for implementing and/or extending path initial-state checks function withKeySpecFiltering(model: GestureModel, contactIndices: number | number[]) { @@ -293,7 +307,7 @@ export function gestureSetForLayout(flags: LayoutGestureSupportFlags, params: Ge const _modipressStartModel = modipressStartModel(); const gestureModels: GestureModel[] = [ _longpressModel, - withKeySpecFiltering(multitapStartModel(params), 0), + _multitapStartModel, multitapEndModel(params), _initialTapModel, _simpleTapModel, @@ -304,7 +318,7 @@ export function gestureSetForLayout(flags: LayoutGestureSupportFlags, params: Ge modipressHoldModel(params), modipressEndModel(), modipressMultitapTransitionModel(), - withKeySpecFiltering(modipressMultitapStartModel(params), 0), + _modipressMultitapStartModel, modipressMultitapEndModel(params), modipressMultitapLockModel() ]; @@ -367,7 +381,7 @@ export function instantContactResolutionModel(): ContactModel { }; } -export function flickStartContactModel(params: GestureParams): gestures.specs.ContactModel { +export function flickStartContactModel(params: FullGestureParams): gestures.specs.ContactModel { const flickParams = params.flick; return { @@ -426,7 +440,7 @@ function determineLockFromStats(pathStats: CumulativePathStats, base } } -export function flickMidContactModel(params: GestureParams): gestures.specs.ContactModel { +export function flickMidContactModel(params: FullGestureParams): gestures.specs.ContactModel { return { itemPriority: 1, pathModel: { @@ -461,7 +475,7 @@ export function flickMidContactModel(params: GestureParams): gestures.specs.Cont } -export function flickEndContactModel(params: GestureParams): ContactModel { +export function flickEndContactModel(params: FullGestureParams): ContactModel { return { itemPriority: 1, pathModel: { @@ -485,7 +499,7 @@ export function flickEndContactModel(params: GestureParams): ContactModel { } } -export function longpressContactModel(params: GestureParams, enabledFlicks: boolean, resetForRoaming: boolean): ContactModel { +export function longpressContactModel(params: FullGestureParams, enabledFlicks: boolean, resetForRoaming: boolean): ContactModel { const spec = params.longpress; return { @@ -581,7 +595,7 @@ export function modipressContactEndModel(): ContactModel { }; } -export function simpleTapContactModel(params: GestureParams, isNotInitial?: boolean): ContactModel { +export function simpleTapContactModel(params: FullGestureParams, isNotInitial?: boolean): ContactModel { // Snapshot at model construction; do not update if changed. const roamingEnabled = params?.roamingEnabled ?? true; // ?? true - used by the banner. @@ -650,7 +664,7 @@ export function specialKeyStartModel(): GestureModel { }; } -export function specialKeyEndModel(params: GestureParams): GestureModel { +export function specialKeyEndModel(params: FullGestureParams): GestureModel { return { id: 'special-key-end', resolutionPriority: 0, @@ -682,7 +696,7 @@ export function specialKeyEndModel(params: GestureParams): GestureModel { * - the common gesture configuration permits the shortcut where supported * @param allowRoaming Indicates whether "roaming touch" mode should be supported. */ -export function longpressModel(params: GestureParams, allowShortcut: boolean, allowRoaming: boolean): GestureModel { +export function longpressModel(params: FullGestureParams, allowShortcut: boolean, allowRoaming: boolean): GestureModel { const base: GestureModel = { id: 'longpress', // Needs to beat flick-start priority. @@ -732,7 +746,7 @@ export function longpressModel(params: GestureParams, allowShortcut: boolean, al /** * For use for transitioning out of roaming-touch. */ -export function longpressModelAfterRoaming(params: GestureParams): GestureModel { +export function longpressModelAfterRoaming(params: FullGestureParams): GestureModel { // The longpress-shortcut is always disabled for keys reached by roaming (param 2) // Only used when roaming is permitted; continued roaming should be allowed. (param 3) const base = longpressModel(params, false, true); @@ -782,7 +796,7 @@ export function longpressRoamRestoration(): GestureModel { } } -export function flickStartModel(params: GestureParams): GestureModel { +export function flickStartModel(params: FullGestureParams): GestureModel { return { id: 'flick-start', resolutionPriority: 3, @@ -799,7 +813,7 @@ export function flickStartModel(params: GestureParams): GestureModel { } } -export function flickRestartModel(params: GestureParams): GestureModel { +export function flickRestartModel(params: FullGestureParams): GestureModel { const base = flickStartModel(params); return { ...base, @@ -859,7 +873,7 @@ export function flickRestartModel(params: GestureParams): GestureModel { +export function flickMidModel(params: FullGestureParams): GestureModel { return { id: 'flick-mid', resolutionPriority: 0, @@ -889,7 +903,7 @@ export function flickMidModel(params: GestureParams): GestureModel { } // Clears existing flick-scrolling & primes the flick-reset recentering mechanism. -export function flickResetModel(params: GestureParams): GestureModel { +export function flickResetModel(params: FullGestureParams): GestureModel { return { id: 'flick-reset', resolutionPriority: 1, @@ -909,7 +923,7 @@ export function flickResetModel(params: GestureParams): GestureModel { }; } -export function flickResetCenteringModel(params: GestureParams): GestureModel { +export function flickResetCenteringModel(params: FullGestureParams): GestureModel { return { id: 'flick-reset-centering', resolutionPriority: 1, @@ -963,7 +977,7 @@ export function flickResetEndModel(): GestureModel { }; }; -export function flickEndModel(params: GestureParams): GestureModel { +export function flickEndModel(params: FullGestureParams): GestureModel { return { id: 'flick-end', resolutionPriority: 0, @@ -990,7 +1004,7 @@ export function flickEndModel(params: GestureParams): GestureModel { } } -export function multitapStartModel(params: GestureParams): GestureModel { +export function multitapStartModel(params: FullGestureParams): GestureModel { return { id: 'multitap-start', resolutionPriority: 2, @@ -1019,7 +1033,7 @@ export function multitapStartModel(params: GestureParams): GestureModel { } } -export function multitapEndModel(params: GestureParams): GestureModel { +export function multitapEndModel(params: FullGestureParams): GestureModel { return { id: 'multitap-end', resolutionPriority: 2, @@ -1053,7 +1067,7 @@ export function multitapEndModel(params: GestureParams): GestureModel { } } -export function initialTapModel(params: GestureParams): GestureModel { +export function initialTapModel(params: FullGestureParams): GestureModel { return { id: 'initial-tap', resolutionPriority: 1, @@ -1089,7 +1103,7 @@ export function initialTapModel(params: GestureParams): GestureModel { } } -export function simpleTapModel(params: GestureParams): GestureModel { +export function simpleTapModel(params: FullGestureParams): GestureModel { return { id: 'simple-tap', resolutionPriority: 1, @@ -1113,7 +1127,7 @@ export function simpleTapModel(params: GestureParams): GestureModel { }; } -export function initialTapModelWithReset(params: GestureParams): GestureModel { +export function initialTapModelWithReset(params: FullGestureParams): GestureModel { const base = initialTapModel(params); return { ...base, @@ -1127,7 +1141,7 @@ export function initialTapModelWithReset(params: GestureParams): GestureModel { +export function simpleTapModelWithReset(params: FullGestureParams): GestureModel { const simpleModel = simpleTapModel(params); return { ...simpleModel, @@ -1189,7 +1203,7 @@ export function modipressStartModel(): GestureModel { } } -export function modipressHoldModel(params: GestureParams): GestureModel { +export function modipressHoldModel(params: FullGestureParams): GestureModel { return { id: 'modipress-hold', resolutionPriority: 5, @@ -1281,7 +1295,7 @@ export function modipressEndModel(): GestureModel { } } -export function modipressMultitapStartModel(params: GestureParams): GestureModel { +export function modipressMultitapStartModel(params: FullGestureParams): GestureModel { return { id: 'modipress-multitap-start', resolutionPriority: 6, @@ -1316,7 +1330,7 @@ export function modipressMultitapStartModel(params: GestureParams): GestureModel } } -export function modipressMultitapEndModel(params: GestureParams): GestureModel { +export function modipressMultitapEndModel(params: FullGestureParams): GestureModel { return { id: 'modipress-multitap-end', resolutionPriority: 5, diff --git a/web/src/engine/osk/src/keyElement.ts b/web/src/engine/osk/src/keyElement.ts index 01ae3a0c99d..c913bdfbff5 100644 --- a/web/src/engine/osk/src/keyElement.ts +++ b/web/src/engine/osk/src/keyElement.ts @@ -1,4 +1,4 @@ -import { ActiveSubKey } from '@keymanapp/keyboard-processor'; +import { ActiveSubKey } from 'keyman/engine/keyboard'; import OSKKey from "./keyboard-layout/oskKey.js"; export class KeyData { diff --git a/web/src/engine/osk/src/keyboard-layout/gesturePreviewHost.ts b/web/src/engine/osk/src/keyboard-layout/gesturePreviewHost.ts index 321de328b83..32a30c3f5d7 100644 --- a/web/src/engine/osk/src/keyboard-layout/gesturePreviewHost.ts +++ b/web/src/engine/osk/src/keyboard-layout/gesturePreviewHost.ts @@ -1,4 +1,4 @@ -import { ActiveKeyBase } from "@keymanapp/keyboard-processor"; +import { ActiveKeyBase } from "keyman/engine/keyboard"; import { EventEmitter } from "eventemitter3"; import { KeyElement } from "../keyElement.js"; diff --git a/web/src/engine/osk/src/keyboard-layout/oskBaseKey.ts b/web/src/engine/osk/src/keyboard-layout/oskBaseKey.ts index e48253df60d..3d70ed40100 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskBaseKey.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskBaseKey.ts @@ -1,4 +1,4 @@ -import { ActiveKey, Codes } from '@keymanapp/keyboard-processor'; +import { ActiveKey, Codes } from 'keyman/engine/keyboard'; import OSKKey, { KeyLayoutParams, renameSpecialKey } from './oskKey.js'; import { KeyData, KeyElement, link } from '../keyElement.js'; diff --git a/web/src/engine/osk/src/keyboard-layout/oskKey.ts b/web/src/engine/osk/src/keyboard-layout/oskKey.ts index 6404658ef67..2b9381afe30 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskKey.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskKey.ts @@ -1,4 +1,4 @@ -import { ActiveKey, ActiveSubKey, ButtonClass, ButtonClasses, DeviceSpec } from '@keymanapp/keyboard-processor'; +import { ActiveKey, ActiveSubKey, ButtonClass, ButtonClasses, DeviceSpec } from 'keyman/engine/keyboard'; // At present, we don't use @keymanapp/keyman. Just `keyman`. (Refer to /web/package.json.) import specialChars from '../specialCharacters.js'; diff --git a/web/src/engine/osk/src/keyboard-layout/oskLayer.ts b/web/src/engine/osk/src/keyboard-layout/oskLayer.ts index 61c43f22cf8..a08d2921a55 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskLayer.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskLayer.ts @@ -1,4 +1,4 @@ -import { ActiveLayer, ActiveLayout } from '@keymanapp/keyboard-processor'; +import { ActiveLayer, ActiveLayout } from 'keyman/engine/keyboard'; import OSKRow from './oskRow.js'; import OSKBaseKey from './oskBaseKey.js'; diff --git a/web/src/engine/osk/src/keyboard-layout/oskLayerGroup.ts b/web/src/engine/osk/src/keyboard-layout/oskLayerGroup.ts index 5f4a3f45a3b..4bf4bc01b49 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskLayerGroup.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskLayerGroup.ts @@ -1,4 +1,4 @@ -import { type DeviceSpec, Keyboard, ActiveLayout, ButtonClasses } from '@keymanapp/keyboard-processor'; +import { type DeviceSpec, Keyboard, ActiveLayout, ButtonClasses } from 'keyman/engine/keyboard'; import { InputSample } from '@keymanapp/gesture-recognizer'; diff --git a/web/src/engine/osk/src/keyboard-layout/oskRow.ts b/web/src/engine/osk/src/keyboard-layout/oskRow.ts index 8012e8438a1..91c6409cd77 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskRow.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskRow.ts @@ -1,4 +1,4 @@ -import { ActiveKey, ActiveLayer, ActiveRow } from '@keymanapp/keyboard-processor'; +import { ActiveKey, ActiveLayer, ActiveRow } from 'keyman/engine/keyboard'; import OSKBaseKey from './oskBaseKey.js'; import { ParsedLengthStyle } from '../lengthStyle.js'; diff --git a/web/src/engine/osk/src/views/anchoredOskView.ts b/web/src/engine/osk/src/views/anchoredOskView.ts index fe2670c0b90..25ab819e3cd 100644 --- a/web/src/engine/osk/src/views/anchoredOskView.ts +++ b/web/src/engine/osk/src/views/anchoredOskView.ts @@ -1,4 +1,4 @@ -import { DeviceSpec } from '@keymanapp/keyboard-processor'; +import { DeviceSpec } from 'keyman/engine/keyboard'; import { landscapeView } from 'keyman/engine/dom-utils'; import OSKView, { OSKPos, OSKRect } from './oskView.js'; diff --git a/web/src/engine/osk/src/views/floatingOskView.ts b/web/src/engine/osk/src/views/floatingOskView.ts index c296bd374bf..ba186fc99e2 100644 --- a/web/src/engine/osk/src/views/floatingOskView.ts +++ b/web/src/engine/osk/src/views/floatingOskView.ts @@ -1,4 +1,4 @@ -import { DeviceSpec, ManagedPromise, Version } from '@keymanapp/keyboard-processor'; +import { DeviceSpec, ManagedPromise, Version } from 'keyman/engine/keyboard'; import { getAbsoluteX, getAbsoluteY, landscapeView } from 'keyman/engine/dom-utils'; import { EmitterListenerSpy } from 'keyman/engine/events'; diff --git a/web/src/engine/osk/src/views/inlinedOskView.ts b/web/src/engine/osk/src/views/inlinedOskView.ts index 06f89c0a921..d4dc48fd664 100644 --- a/web/src/engine/osk/src/views/inlinedOskView.ts +++ b/web/src/engine/osk/src/views/inlinedOskView.ts @@ -1,4 +1,4 @@ -import { DeviceSpec } from '@keymanapp/keyboard-processor'; +import { DeviceSpec } from 'keyman/engine/keyboard'; import OSKView, { OSKPos, OSKRect } from './oskView.js'; import VisualKeyboard from '../visualKeyboard.js'; diff --git a/web/src/engine/events/src/keyEventSource.interface.ts b/web/src/engine/osk/src/views/keyEventSource.interface.ts similarity index 79% rename from web/src/engine/events/src/keyEventSource.interface.ts rename to web/src/engine/osk/src/views/keyEventSource.interface.ts index d3c39fa49d7..827a0b9af8f 100644 --- a/web/src/engine/events/src/keyEventSource.interface.ts +++ b/web/src/engine/osk/src/views/keyEventSource.interface.ts @@ -1,5 +1,6 @@ import { EventEmitter } from "eventemitter3"; -import { type KeyEvent, type RuleBehavior } from "@keymanapp/keyboard-processor"; +import { type KeyEvent } from 'keyman/engine/keyboard'; +import { type RuleBehavior } from 'keyman/engine/js-processor'; export type KeyEventResultCallback = (result: RuleBehavior, error?: Error) => void; export type KeyEventHandler = (event: KeyEvent, callback?: KeyEventResultCallback) => void; diff --git a/web/src/engine/osk/src/views/oskView.ts b/web/src/engine/osk/src/views/oskView.ts index d55eb8a8f8d..b51c18fbcd9 100644 --- a/web/src/engine/osk/src/views/oskView.ts +++ b/web/src/engine/osk/src/views/oskView.ts @@ -16,16 +16,16 @@ import { Keyboard, KeyboardProperties, ManagedPromise, - type MinimalCodesInterface, - type MutableSystemStore, - type SystemStoreMutationHandler -} from '@keymanapp/keyboard-processor'; + type MinimalCodesInterface +} from 'keyman/engine/keyboard'; import { createUnselectableElement, getAbsoluteX, getAbsoluteY, StylesheetManager } from 'keyman/engine/dom-utils'; -import { EventListener, KeyEventHandler, KeyEventSourceInterface, LegacyEventEmitter } from 'keyman/engine/events'; +import { EventListener, LegacyEventEmitter } from 'keyman/engine/events'; +import { type MutableSystemStore, type SystemStoreMutationHandler } from 'keyman/engine/js-processor'; import Configuration from '../config/viewConfiguration.js'; import Activator, { StaticActivator } from './activator.js'; import TouchEventPromiseMap from './touchEventPromiseMap.js'; +import { KeyEventHandler, KeyEventSourceInterface } from './keyEventSource.interface.js'; import { DEFAULT_GESTURE_PARAMS, GestureParams } from '../input/gestures/specsForLayout.js'; // These will likely be eliminated from THIS file at some point.\ diff --git a/web/src/engine/osk/src/visualKeyboard.ts b/web/src/engine/osk/src/visualKeyboard.ts index a8152a0db0a..26b269d7f26 100644 --- a/web/src/engine/osk/src/visualKeyboard.ts +++ b/web/src/engine/osk/src/visualKeyboard.ts @@ -13,9 +13,9 @@ import { StateKeyMap, ActiveSubKey, timedPromise, - ActiveKeyBase, - isEmptyTransform -} from '@keymanapp/keyboard-processor'; + ActiveKeyBase +} from 'keyman/engine/keyboard'; +import { isEmptyTransform } from 'keyman/engine/js-processor'; import { buildCorrectiveLayout } from './correctionLayout.js'; import { distributionFromDistanceMaps, keyTouchDistances } from './corrections.js'; @@ -31,7 +31,7 @@ import { import { createStyleSheet, StylesheetManager } from 'keyman/engine/dom-utils'; -import { KeyEventHandler, KeyEventResultCallback } from 'keyman/engine/events'; +import { KeyEventHandler, KeyEventResultCallback } from './views/keyEventSource.interface.js'; import GlobeHint from './globehint.interface.js'; import KeyboardView from './components/keyboardView.interface.js'; @@ -151,7 +151,7 @@ export default class VisualKeyboard extends EventEmitter implements Ke /** * Tweakable gesture parameters referenced by supported gestures and the gesture engine. */ - get gestureParams(): GestureParams { + get gestureParams(): GestureParams { return this.config.gestureParams; }; @@ -423,11 +423,6 @@ export default class VisualKeyboard extends EventEmitter implements Ke historyLength: DEBUG_HISTORY_COUNT }; - this.gestureParams.longpress.permitsFlick = (key) => { - const flickSpec = key?.key.spec.flick; - return !flickSpec || !(flickSpec.n || flickSpec.nw || flickSpec.ne); - }; - const recognizer = new GestureRecognizer(gestureSetForLayout(this.kbdLayout, this.gestureParams), config); recognizer.stateToken = this.layerId; diff --git a/common/web/lm-message-types/message.d.ts b/web/src/engine/predictive-text/types/message.d.ts similarity index 100% rename from common/web/lm-message-types/message.d.ts rename to web/src/engine/predictive-text/types/message.d.ts diff --git a/common/web/lm-message-types/package.json b/web/src/engine/predictive-text/types/package.json similarity index 100% rename from common/web/lm-message-types/package.json rename to web/src/engine/predictive-text/types/package.json diff --git a/web/src/engine/predictive-text/types/tsconfig.json b/web/src/engine/predictive-text/types/tsconfig.json new file mode 100644 index 00000000000..8b87ca26672 --- /dev/null +++ b/web/src/engine/predictive-text/types/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "build/", + "tsBuildInfoFile": "build/tsconfig.tsbuildinfo", + "rootDir": "./src" + }, + "include": ["./*.ts"], + "exclude": ["test.ts"] +} diff --git a/common/predictive-text/.gitignore b/web/src/engine/predictive-text/worker-main/.gitignore similarity index 100% rename from common/predictive-text/.gitignore rename to web/src/engine/predictive-text/worker-main/.gitignore diff --git a/common/predictive-text/README.md b/web/src/engine/predictive-text/worker-main/README.md similarity index 100% rename from common/predictive-text/README.md rename to web/src/engine/predictive-text/worker-main/README.md diff --git a/common/predictive-text/build.sh b/web/src/engine/predictive-text/worker-main/build.sh similarity index 84% rename from common/predictive-text/build.sh rename to web/src/engine/predictive-text/worker-main/build.sh index b9ab6016914..4120fce53b1 100755 --- a/common/predictive-text/build.sh +++ b/web/src/engine/predictive-text/worker-main/build.sh @@ -8,7 +8,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" @@ -31,7 +31,7 @@ builder_describe "Builds the lm-layer module" \ builder_describe_outputs \ configure /node_modules \ - build /common/predictive-text/build/lib/web/index.mjs # is built by the final step. + build /web/src/engine/predictive-text/worker-main/build/lib/web/index.mjs # is built by the final step. builder_parse "$@" @@ -48,8 +48,8 @@ function do_build() { tsc -b ./tsconfig.all.json # esbuild-bundled products at this level are not intended to be used for anything but testing. - $BUNDLE_CMD "${KEYMAN_ROOT}/common/predictive-text/build/obj/web/index.js" \ - --out "${KEYMAN_ROOT}/common/predictive-text/build/lib/web/index.mjs" \ + $BUNDLE_CMD "${KEYMAN_ROOT}/web/src/engine/predictive-text/worker-main/build/obj/web/index.js" \ + --out "${KEYMAN_ROOT}/web/src/engine/predictive-text/worker-main/build/lib/web/index.mjs" \ --format esm } diff --git a/common/predictive-text/docs/build.sh b/web/src/engine/predictive-text/worker-main/docs/build.sh similarity index 100% rename from common/predictive-text/docs/build.sh rename to web/src/engine/predictive-text/worker-main/docs/build.sh diff --git a/common/predictive-text/docs/lmlayer-states.dot b/web/src/engine/predictive-text/worker-main/docs/lmlayer-states.dot similarity index 100% rename from common/predictive-text/docs/lmlayer-states.dot rename to web/src/engine/predictive-text/worker-main/docs/lmlayer-states.dot diff --git a/common/predictive-text/docs/lmlayer-states.png b/web/src/engine/predictive-text/worker-main/docs/lmlayer-states.png similarity index 100% rename from common/predictive-text/docs/lmlayer-states.png rename to web/src/engine/predictive-text/worker-main/docs/lmlayer-states.png diff --git a/common/predictive-text/docs/predictive-text-sequence.png b/web/src/engine/predictive-text/worker-main/docs/predictive-text-sequence.png similarity index 100% rename from common/predictive-text/docs/predictive-text-sequence.png rename to web/src/engine/predictive-text/worker-main/docs/predictive-text-sequence.png diff --git a/common/predictive-text/docs/worker-communication-protocol.md b/web/src/engine/predictive-text/worker-main/docs/worker-communication-protocol.md similarity index 100% rename from common/predictive-text/docs/worker-communication-protocol.md rename to web/src/engine/predictive-text/worker-main/docs/worker-communication-protocol.md diff --git a/common/predictive-text/package.json b/web/src/engine/predictive-text/worker-main/package.json similarity index 100% rename from common/predictive-text/package.json rename to web/src/engine/predictive-text/worker-main/package.json diff --git a/common/predictive-text/src/index.ts b/web/src/engine/predictive-text/worker-main/src/index.ts similarity index 100% rename from common/predictive-text/src/index.ts rename to web/src/engine/predictive-text/worker-main/src/index.ts diff --git a/common/predictive-text/src/lmlayer.ts b/web/src/engine/predictive-text/worker-main/src/lmlayer.ts similarity index 100% rename from common/predictive-text/src/lmlayer.ts rename to web/src/engine/predictive-text/worker-main/src/lmlayer.ts diff --git a/common/predictive-text/src/node/index.ts b/web/src/engine/predictive-text/worker-main/src/node/index.ts similarity index 100% rename from common/predictive-text/src/node/index.ts rename to web/src/engine/predictive-text/worker-main/src/node/index.ts diff --git a/common/predictive-text/src/node/mappedWorker.ts b/web/src/engine/predictive-text/worker-main/src/node/mappedWorker.ts similarity index 100% rename from common/predictive-text/src/node/mappedWorker.ts rename to web/src/engine/predictive-text/worker-main/src/node/mappedWorker.ts diff --git a/common/predictive-text/src/node/sourcemappedWorker.ts b/web/src/engine/predictive-text/worker-main/src/node/sourcemappedWorker.ts similarity index 100% rename from common/predictive-text/src/node/sourcemappedWorker.ts rename to web/src/engine/predictive-text/worker-main/src/node/sourcemappedWorker.ts diff --git a/common/predictive-text/src/node/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json similarity index 89% rename from common/predictive-text/src/node/tsconfig.json rename to web/src/engine/predictive-text/worker-main/src/node/tsconfig.json index f95364c4175..a1ab0f2f7cd 100644 --- a/common/predictive-text/src/node/tsconfig.json +++ b/web/src/engine/predictive-text/worker-main/src/node/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../web/tsconfig.kmw-main-base.json", + "extends": "../../../../../../tsconfig.base.json", "compilerOptions": { // The Worker class needs access to the `new` keyword, else Node will throw an // error when constructing the Worker for unit tests. ES6 is sufficient. diff --git a/common/predictive-text/src/node/worker.ts b/web/src/engine/predictive-text/worker-main/src/node/worker.ts similarity index 100% rename from common/predictive-text/src/node/worker.ts rename to web/src/engine/predictive-text/worker-main/src/node/worker.ts diff --git a/common/predictive-text/src/promise-store.ts b/web/src/engine/predictive-text/worker-main/src/promise-store.ts similarity index 100% rename from common/predictive-text/src/promise-store.ts rename to web/src/engine/predictive-text/worker-main/src/promise-store.ts diff --git a/common/predictive-text/src/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/tsconfig.json similarity index 54% rename from common/predictive-text/src/tsconfig.json rename to web/src/engine/predictive-text/worker-main/src/tsconfig.json index 675bf7cd537..edf6195b3ab 100644 --- a/common/predictive-text/src/tsconfig.json +++ b/web/src/engine/predictive-text/worker-main/src/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../web/tsconfig.kmw-main-base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "baseUrl": "./", @@ -8,11 +8,9 @@ "rootDir": "./" }, "references": [ - { "path": "../../web/utils" }, - { "path": "../../models/types"}, - { "path": "../../models/wordbreakers"}, - { "path": "../../web/lm-message-types"}, - { "path": "../../models/templates"} + { "path": "../../../../../../common/web/utils" }, + { "path": "../../../../../../common/models/types"}, + { "path": "../../types"} ], "include" : [ "./*.ts" ], "exclude" : [ diff --git a/common/predictive-text/src/unwrap.ts b/web/src/engine/predictive-text/worker-main/src/unwrap.ts similarity index 100% rename from common/predictive-text/src/unwrap.ts rename to web/src/engine/predictive-text/worker-main/src/unwrap.ts diff --git a/common/predictive-text/src/web/index.ts b/web/src/engine/predictive-text/worker-main/src/web/index.ts similarity index 100% rename from common/predictive-text/src/web/index.ts rename to web/src/engine/predictive-text/worker-main/src/web/index.ts diff --git a/common/predictive-text/src/web/sourcemappedWorker.ts b/web/src/engine/predictive-text/worker-main/src/web/sourcemappedWorker.ts similarity index 100% rename from common/predictive-text/src/web/sourcemappedWorker.ts rename to web/src/engine/predictive-text/worker-main/src/web/sourcemappedWorker.ts diff --git a/common/predictive-text/src/web/tsconfig.json b/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json similarity index 83% rename from common/predictive-text/src/web/tsconfig.json rename to web/src/engine/predictive-text/worker-main/src/web/tsconfig.json index c16936db12d..769c97d589d 100644 --- a/common/predictive-text/src/web/tsconfig.json +++ b/web/src/engine/predictive-text/worker-main/src/web/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../web/tsconfig.kmw-main-base.json", + "extends": "../../../../../../tsconfig.base.json", "compilerOptions": { "lib": ["es6", "DOM"], "baseUrl": "../", diff --git a/common/predictive-text/src/web/worker.ts b/web/src/engine/predictive-text/worker-main/src/web/worker.ts similarity index 100% rename from common/predictive-text/src/web/worker.ts rename to web/src/engine/predictive-text/worker-main/src/web/worker.ts diff --git a/common/predictive-text/src/worker-interface.d.ts b/web/src/engine/predictive-text/worker-main/src/worker-interface.d.ts similarity index 100% rename from common/predictive-text/src/worker-interface.d.ts rename to web/src/engine/predictive-text/worker-main/src/worker-interface.d.ts diff --git a/common/predictive-text/tsconfig.all.json b/web/src/engine/predictive-text/worker-main/tsconfig.all.json similarity index 70% rename from common/predictive-text/tsconfig.all.json rename to web/src/engine/predictive-text/worker-main/tsconfig.all.json index f47b208edaf..722ce0114bd 100644 --- a/common/predictive-text/tsconfig.all.json +++ b/web/src/engine/predictive-text/worker-main/tsconfig.all.json @@ -3,7 +3,7 @@ // require separate sub-tsconfigs, both of which require common references. The multi-config // setup in this project and its subfolders ensure all modules can compile cleanly and in the // necessary compilation order. - "extends": "../web/tsconfig.kmw-main-base.json", + "extends": "../../../../tsconfig.base.json", "compilerOptions": { "baseUrl": "./", @@ -13,11 +13,9 @@ }, "files": [], "references": [ - { "path": "../web/utils" }, - { "path": "../models/types"}, - { "path": "../models/wordbreakers"}, - { "path": "../web/lm-message-types"}, - { "path": "../models/templates"}, + { "path": "../../../../../common/web/utils" }, + { "path": "../../../../../common/models/types"}, + { "path": "../types"}, { "path": "src/node" }, { "path": "src/web" } ], diff --git a/common/predictive-text/unit_tests/headless/promise-store.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.js similarity index 100% rename from common/predictive-text/unit_tests/headless/promise-store.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.js diff --git a/common/predictive-text/unit_tests/headless/top-level-lmlayer.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.js similarity index 100% rename from common/predictive-text/unit_tests/headless/top-level-lmlayer.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.js diff --git a/common/predictive-text/unit_tests/headless/worker-dummy-integration.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.js similarity index 100% rename from common/predictive-text/unit_tests/headless/worker-dummy-integration.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.js diff --git a/common/predictive-text/unit_tests/headless/worker-trie-integration.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.js similarity index 100% rename from common/predictive-text/unit_tests/headless/worker-trie-integration.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.js diff --git a/common/predictive-text/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts similarity index 100% rename from common/predictive-text/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts diff --git a/common/predictive-text/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts similarity index 100% rename from common/predictive-text/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts diff --git a/common/predictive-text/unit_tests/in_browser/cases/worker-trie-integration.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.spec.ts similarity index 100% rename from common/predictive-text/unit_tests/in_browser/cases/worker-trie-integration.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.spec.ts diff --git a/common/predictive-text/unit_tests/in_browser/helpers.mjs b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/helpers.mjs similarity index 100% rename from common/predictive-text/unit_tests/in_browser/helpers.mjs rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/helpers.mjs diff --git a/common/predictive-text/unit_tests/in_browser/web-test-runner.CI.config.mjs b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.CI.config.mjs similarity index 100% rename from common/predictive-text/unit_tests/in_browser/web-test-runner.CI.config.mjs rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.CI.config.mjs diff --git a/common/predictive-text/unit_tests/in_browser/web-test-runner.config.mjs b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs similarity index 96% rename from common/predictive-text/unit_tests/in_browser/web-test-runner.config.mjs rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs index 523cd254577..6f9df64ddbf 100644 --- a/common/predictive-text/unit_tests/in_browser/web-test-runner.config.mjs +++ b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs @@ -7,7 +7,7 @@ import { dirname, resolve } from 'path'; import { sessionStabilityReporter } from '@keymanapp/common-test-resources/test-runner-stability-reporter.mjs'; const dir = dirname(fileURLToPath(import.meta.url)); -const KEYMAN_ROOT = resolve(dir, '../../../../'); +const KEYMAN_ROOT = resolve(dir, '../../../../../../../'); /** @type {import('@web/test-runner').TestRunnerConfig} */ export default { diff --git a/common/predictive-text/unit_tests/test.sh b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh similarity index 98% rename from common/predictive-text/unit_tests/test.sh rename to web/src/engine/predictive-text/worker-main/unit_tests/test.sh index 3eb87bae569..007bf363576 100755 --- a/common/predictive-text/unit_tests/test.sh +++ b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../../../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" diff --git a/web/src/test/auto/dom/cases/browser/contextManager.spec.ts b/web/src/test/auto/dom/cases/browser/contextManager.spec.ts index f31cc453185..eabf6eefdd8 100644 --- a/web/src/test/auto/dom/cases/browser/contextManager.spec.ts +++ b/web/src/test/auto/dom/cases/browser/contextManager.spec.ts @@ -3,10 +3,10 @@ import { outputTargetForElement } from 'keyman/engine/attachment'; import { LegacyEventEmitter } from 'keyman/engine/events'; -import { StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/package-cache'; +import { StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/keyboard-storage'; -import { KeyboardHarness, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { DOMKeyboardLoader } from '@keymanapp/keyboard-processor/dom-keyboard-loader'; +import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { DOMKeyboardLoader } from 'keyman/engine/keyboard/dom-keyboard-loader'; import { loadKeyboardsFromStubs } from '../../kbdLoader.js'; import { DeviceSpec, ManagedPromise, timedPromise } from '@keymanapp/web-utils'; diff --git a/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts b/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts index cee86cc35e3..cdfc8814af3 100644 --- a/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts +++ b/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts @@ -1,6 +1,7 @@ import { assert } from 'chai'; -import { extendString, Mock } from '@keymanapp/keyboard-processor'; +import { extendString } from 'keyman/engine/keyboard'; +import { Mock } from 'keyman/engine/js-processor'; import * as wrappers from 'keyman/engine/element-wrappers'; import { DynamicElements } from '../../test_utils.js'; @@ -1385,7 +1386,7 @@ describe('Element Input/Output Interfacing', function () { // Unique to the Mock type - element interface cloning tests. Is element state properly copied? // As those require a very different setup, they're in the target_mocks.js test case file instead. - // Basic text-retrieval unit tests are now done headlessly in @keymanapp/keyboard-processor. + // Basic text-retrieval unit tests are now done headlessly in keyman/engine/keyboard. describe('Text Mutation', function () { describe('deleteCharsBeforeCaret', function () { diff --git a/web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts b/web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts index e850efaa550..707d8638997 100644 --- a/web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts +++ b/web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts @@ -1,6 +1,7 @@ import { assert } from 'chai'; -import { extendString, Mock } from '@keymanapp/keyboard-processor'; +import { extendString } from 'keyman/engine/keyboard'; +import { Mock } from 'keyman/engine/js-processor'; import { Input } from 'keyman/engine/element-wrappers'; import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs'; diff --git a/web/src/test/auto/dom/cases/packages/cloudQueries.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.spec.ts similarity index 98% rename from web/src/test/auto/dom/cases/packages/cloudQueries.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.spec.ts index 9a2fe93c45a..4af873b23cd 100644 --- a/web/src/test/auto/dom/cases/packages/cloudQueries.spec.ts +++ b/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.spec.ts @@ -1,9 +1,9 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import { CloudQueryEngine, type KeyboardStub } from 'keyman/engine/package-cache'; +import { CloudQueryEngine, type KeyboardStub } from 'keyman/engine/keyboard-storage'; import { PathConfiguration } from 'keyman/engine/interfaces'; -import DOMCloudRequester from 'keyman/engine/package-cache/dom-requester'; +import DOMCloudRequester from 'keyman/engine/keyboard-storage/dom-requester'; import { ManagedPromise } from '@keymanapp/web-utils'; const pathConfig = new PathConfiguration({ diff --git a/web/src/test/auto/dom/cases/packages/domCloudRequester.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.spec.ts similarity index 97% rename from web/src/test/auto/dom/cases/packages/domCloudRequester.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.spec.ts index 840acf9d991..7101bfd9f7e 100644 --- a/web/src/test/auto/dom/cases/packages/domCloudRequester.spec.ts +++ b/web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.spec.ts @@ -1,7 +1,7 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import DOMCloudRequester from 'keyman/engine/package-cache/dom-requester'; +import DOMCloudRequester from 'keyman/engine/keyboard-storage/dom-requester'; describe("Mocked cloud query results ('canary' testing)", () => { function performMockedRequest(mockedResultsPath: string) { diff --git a/web/src/test/auto/dom/cases/packages/keyboardRequisitioner.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.spec.ts similarity index 92% rename from web/src/test/auto/dom/cases/packages/keyboardRequisitioner.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.spec.ts index ab585bc9e07..bada557bf89 100644 --- a/web/src/test/auto/dom/cases/packages/keyboardRequisitioner.spec.ts +++ b/web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.spec.ts @@ -1,11 +1,11 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import { KeyboardHarness, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { DOMKeyboardLoader } from '@keymanapp/keyboard-processor/dom-keyboard-loader'; +import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { DOMKeyboardLoader } from 'keyman/engine/keyboard/dom-keyboard-loader'; import { PathConfiguration } from 'keyman/engine/interfaces'; -import { CloudQueryEngine, KeyboardRequisitioner, type KeyboardStub } from 'keyman/engine/package-cache'; -import DOMCloudRequester from 'keyman/engine/package-cache/dom-requester'; +import { CloudQueryEngine, KeyboardRequisitioner, type KeyboardStub } from 'keyman/engine/keyboard-storage'; +import DOMCloudRequester from 'keyman/engine/keyboard-storage/dom-requester'; const pathConfig = new PathConfiguration({ root: '', @@ -14,7 +14,7 @@ const pathConfig = new PathConfiguration({ fonts: '', // The primary / top-level module here is the keyboard-cache bundle. // So, we set up our path config based upon that module for verification purposes. -}, 'http://localhost:9876/@keymanapp/keyman/build/engine/package-cache/lib'); // TODO: set up the current path like actual KMW does it. +}, 'http://localhost:9876/@keymanapp/keyman/build/engine/keyboard-storage/lib'); // TODO: set up the current path like actual KMW does it. /** * Performs mocking setup to facilitate unit testing for the `CloudQueryEngine` class. diff --git a/common/web/keyboard-processor/tests/dom/cases/domKeyboardLoader.spec.ts b/web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.spec.ts similarity index 93% rename from common/web/keyboard-processor/tests/dom/cases/domKeyboardLoader.spec.ts rename to web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.spec.ts index 1965adc8534..da610402eb0 100644 --- a/common/web/keyboard-processor/tests/dom/cases/domKeyboardLoader.spec.ts +++ b/web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.spec.ts @@ -1,7 +1,8 @@ import { assert } from 'chai'; -import { DOMKeyboardLoader } from '@keymanapp/keyboard-processor/dom-keyboard-loader'; -import { extendString, KeyboardHarness, Keyboard, KeyboardInterface, MinimalKeymanGlobal, Mock, DeviceSpec, KeyboardKeymanGlobal } from '@keymanapp/keyboard-processor'; +import { DOMKeyboardLoader } from 'keyman/engine/keyboard/dom-keyboard-loader'; +import { extendString, KeyboardHarness, Keyboard, MinimalKeymanGlobal, DeviceSpec, KeyboardKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, Mock } from 'keyman/engine/js-processor'; declare let window: typeof globalThis; // KeymanEngine from the web/ folder... when available. diff --git a/web/src/test/auto/dom/kbdLoader.ts b/web/src/test/auto/dom/kbdLoader.ts index 629ade205e9..b0d092c12d5 100644 --- a/web/src/test/auto/dom/kbdLoader.ts +++ b/web/src/test/auto/dom/kbdLoader.ts @@ -1,15 +1,15 @@ import { DOMKeyboardLoader -} from '@keymanapp/keyboard-processor/dom-keyboard-loader'; +} from 'keyman/engine/keyboard/dom-keyboard-loader'; import { Keyboard, - KeyboardInterface, KeyboardProperties, MinimalKeymanGlobal -} from '@keymanapp/keyboard-processor'; +} from 'keyman/engine/keyboard'; -import { KeyboardStub } from 'keyman/engine/package-cache'; +import { KeyboardInterface } from 'keyman/engine/js-processor'; +import { KeyboardStub } from 'keyman/engine/keyboard-storage'; const loader = new DOMKeyboardLoader(new KeyboardInterface(window, MinimalKeymanGlobal)); diff --git a/web/src/test/auto/dom/web-test-runner.config.mjs b/web/src/test/auto/dom/web-test-runner.config.mjs index 1cd8ed0ca29..62edfc7dbf9 100644 --- a/web/src/test/auto/dom/web-test-runner.config.mjs +++ b/web/src/test/auto/dom/web-test-runner.config.mjs @@ -56,9 +56,9 @@ export default { files: ['build/test/dom/cases/osk/**/*.spec.mjs'] }, { - name: 'engine/package-cache', + name: 'engine/keyboard-storage', // Relative, from the containing package.json - files: ['build/test/dom/cases/packages/**/*.spec.mjs'] + files: ['build/test/dom/cases/keyboard-storage/**/*.spec.mjs'] } ], middleware: [ diff --git a/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts b/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts index 447b2b1806e..d00425362d1 100644 --- a/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts +++ b/web/src/test/auto/headless/app/browser/hardware-event-processing.tests.ts @@ -4,14 +4,14 @@ import { preprocessKeyboardEvent } from 'keyman/app/browser'; import { processForMnemonicsAndLegacy } from 'keyman/engine/main'; import { PhysicalInputEventSpec } from '@keymanapp/recorder-core'; import { DeviceSpec } from '@keymanapp/web-utils'; -import { Codes, Keyboard, KeyEvent } from '@keymanapp/keyboard-processor'; +import { Codes, Keyboard, KeyEvent } from 'keyman/engine/keyboard'; const ModifierCodes = Codes.modifierCodes; const KeyCodes = Codes.keyCodes; const DUMMY_DEVICE = new DeviceSpec('chrome', 'desktop', 'windows', false); -// Compare and contrast the unit tests here with those for keyboard-processor unit testing +// Compare and contrast the unit tests here with those for keyboard unit testing // in the non-positional-rules set; the output objects here should have the same format // as the inputs for rules as used there. diff --git a/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js b/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js index 6bd0f7555cb..f0d5a5a6dbc 100644 --- a/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js +++ b/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js @@ -4,7 +4,8 @@ import sinon from 'sinon'; import { LanguageProcessor, TranscriptionCache } from 'keyman/engine/main'; import { PredictionContext } from 'keyman/engine/interfaces'; import { Worker as LMWorker } from "@keymanapp/lexical-model-layer/node"; -import { DeviceSpec, KeyboardProcessor, Mock } from '@keymanapp/keyboard-processor'; +import { DeviceSpec } from 'keyman/engine/keyboard'; +import { KeyboardProcessor, Mock } from 'keyman/engine/js-processor'; function compileDummyModel(suggestionSets) { return ` diff --git a/common/web/keyboard-processor/tests/node/basic-engine.js b/web/src/test/auto/headless/engine/js-processor/basic-engine.js similarity index 87% rename from common/web/keyboard-processor/tests/node/basic-engine.js rename to web/src/test/auto/headless/engine/js-processor/basic-engine.js index 1e7ff3a205e..68eb5136e3d 100644 --- a/common/web/keyboard-processor/tests/node/basic-engine.js +++ b/web/src/test/auto/headless/engine/js-processor/basic-engine.js @@ -4,8 +4,9 @@ import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardTest, NodeProctor } from '@keymanapp/recorder-core'; describe('Engine - Basic Simulation', function() { @@ -24,7 +25,7 @@ describe('Engine - Basic Simulation', function() { before(async function() { // -- START: Standard Recorder-based unit test loading boilerplate -- let keyboardLoader = new NodeKeyboardLoader(new KeyboardInterface({}, MinimalKeymanGlobal)); - let keyboard = await keyboardLoader.loadKeyboardFromPath('../../test/' + testSuite.keyboard.filename); + let keyboard = await keyboardLoader.loadKeyboardFromPath('../../../../../common/test/' + testSuite.keyboard.filename); keyboardWithHarness = keyboardLoader.harness; keyboardWithHarness.activeKeyboard = keyboard; diff --git a/common/web/keyboard-processor/tests/node/basic-init.js b/web/src/test/auto/headless/engine/js-processor/basic-init.js similarity index 92% rename from common/web/keyboard-processor/tests/node/basic-init.js rename to web/src/test/auto/headless/engine/js-processor/basic-init.js index 8f04a6a6e8b..cabdb9d4322 100644 --- a/common/web/keyboard-processor/tests/node/basic-init.js +++ b/web/src/test/auto/headless/engine/js-processor/basic-init.js @@ -3,8 +3,8 @@ import { assert } from 'chai'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardProcessor } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { KeyboardProcessor } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; global.keyman = {}; // So that keyboard-based checks against the global `keyman` succeed. // 10.0+ dependent keyboards, like khmer_angkor, will otherwise fail to load. diff --git a/common/web/keyboard-processor/tests/node/bundled-module.js b/web/src/test/auto/headless/engine/js-processor/bundled-module.js similarity index 74% rename from common/web/keyboard-processor/tests/node/bundled-module.js rename to web/src/test/auto/headless/engine/js-processor/bundled-module.js index bfff937b626..a6b80d50043 100644 --- a/common/web/keyboard-processor/tests/node/bundled-module.js +++ b/web/src/test/auto/headless/engine/js-processor/bundled-module.js @@ -1,5 +1,6 @@ import { assert } from "chai"; -import * as Package from "../../build/lib/index.mjs"; +import * as Package from "keyman/engine/js-processor"; +import * as Package2 from "keyman/engine/keyboard"; // A few small tests to ensure that the ES Module bundle was successfully constructed and is usable. @@ -12,7 +13,7 @@ var toSupplementaryPairString = function(code){ let u = toSupplementaryPairString; -describe('Bundled ES Module', function() { +describe('Bundled ES Module for js-processor', function() { describe('KeyboardProcessor', function () { it('should initialize without errors', function () { let kp = new Package.KeyboardProcessor(); @@ -40,11 +41,20 @@ describe('Bundled ES Module', function() { } }); }); +}); - describe("Imported `utils`", function() { +describe('Bundled ES Module for keyboard', function () { + describe('Keyboard', function () { + it('should initialize without errors', function () { + let kp = new Package2.Keyboard(); + assert.isNotNull(kp); + }); + }); + + describe("Imported `utils`", function () { it("should include `utils` package's Version class", () => { - let v16 = new Package.Version([16, 1]); + let v16 = new Package2.Version([16, 1]); assert.equal(v16.toString(), "16.1"); }); - }) -}); \ No newline at end of file + }); +}); diff --git a/common/web/keyboard-processor/tests/node/chirality.js b/web/src/test/auto/headless/engine/js-processor/chirality.js similarity index 97% rename from common/web/keyboard-processor/tests/node/chirality.js rename to web/src/test/auto/headless/engine/js-processor/chirality.js index 70dca3d47fd..c2220b7f5d2 100644 --- a/common/web/keyboard-processor/tests/node/chirality.js +++ b/web/src/test/auto/headless/engine/js-processor/chirality.js @@ -4,8 +4,9 @@ import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardTest, NodeProctor } from '@keymanapp/recorder-core'; import { ModifierKeyConstants } from '@keymanapp/common-types'; @@ -25,7 +26,7 @@ describe('Engine - Chirality', function() { before(async function() { // -- START: Standard Recorder-based unit test loading boilerplate -- let keyboardLoader = new NodeKeyboardLoader(new KeyboardInterface({}, MinimalKeymanGlobal)); - let keyboard = await keyboardLoader.loadKeyboardFromPath('../../test/' + testSuite.keyboard.filename); + let keyboard = await keyboardLoader.loadKeyboardFromPath('../../../../../common/test/' + testSuite.keyboard.filename); keyboardWithHarness = keyboardLoader.harness; keyboardWithHarness.activeKeyboard = keyboard; diff --git a/common/web/keyboard-processor/tests/node/deadkeys.js b/web/src/test/auto/headless/engine/js-processor/deadkeys.js similarity index 87% rename from common/web/keyboard-processor/tests/node/deadkeys.js rename to web/src/test/auto/headless/engine/js-processor/deadkeys.js index e2fe70837eb..fd5d1457d3d 100644 --- a/common/web/keyboard-processor/tests/node/deadkeys.js +++ b/web/src/test/auto/headless/engine/js-processor/deadkeys.js @@ -4,8 +4,9 @@ import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardTest, NodeProctor } from '@keymanapp/recorder-core'; describe('Engine - Deadkeys', function() { @@ -24,7 +25,7 @@ describe('Engine - Deadkeys', function() { before(async function() { // -- START: Standard Recorder-based unit test loading boilerplate -- let keyboardLoader = new NodeKeyboardLoader(new KeyboardInterface({}, MinimalKeymanGlobal)); - let keyboard = await keyboardLoader.loadKeyboardFromPath('../../test/' + testSuite.keyboard.filename); + let keyboard = await keyboardLoader.loadKeyboardFromPath('../../../../../common/test/' + testSuite.keyboard.filename); keyboardWithHarness = keyboardLoader.harness; keyboardWithHarness.activeKeyboard = keyboard; diff --git a/common/web/keyboard-processor/tests/node/engine/context.js b/web/src/test/auto/headless/engine/js-processor/engine/context.js similarity index 99% rename from common/web/keyboard-processor/tests/node/engine/context.js rename to web/src/test/auto/headless/engine/js-processor/engine/context.js index a1fe5863df9..a355ead2650 100644 --- a/common/web/keyboard-processor/tests/node/engine/context.js +++ b/web/src/test/auto/headless/engine/js-processor/engine/context.js @@ -3,8 +3,9 @@ import { assert } from 'chai'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, KeyboardProcessor, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, KeyboardProcessor, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { NodeProctor, RecordedKeystrokeSequence } from '@keymanapp/recorder-core'; diff --git a/common/web/keyboard-processor/tests/node/engine/notany_context.js b/web/src/test/auto/headless/engine/js-processor/engine/notany_context.js similarity index 94% rename from common/web/keyboard-processor/tests/node/engine/notany_context.js rename to web/src/test/auto/headless/engine/js-processor/engine/notany_context.js index 2329463d465..ecc7dd92d0d 100644 --- a/common/web/keyboard-processor/tests/node/engine/notany_context.js +++ b/web/src/test/auto/headless/engine/js-processor/engine/notany_context.js @@ -3,8 +3,9 @@ import { assert } from 'chai'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { NodeProctor, RecordedKeystrokeSequence } from '@keymanapp/recorder-core'; import { extendString } from '@keymanapp/web-utils'; diff --git a/common/web/keyboard-processor/tests/node/engine/stores.js b/web/src/test/auto/headless/engine/js-processor/engine/stores.js similarity index 94% rename from common/web/keyboard-processor/tests/node/engine/stores.js rename to web/src/test/auto/headless/engine/js-processor/engine/stores.js index ade1c2bd471..8174cbe0779 100644 --- a/common/web/keyboard-processor/tests/node/engine/stores.js +++ b/web/src/test/auto/headless/engine/js-processor/engine/stores.js @@ -1,6 +1,7 @@ import { assert } from 'chai'; -import { Keyboard, KeyboardProcessor } from '@keymanapp/keyboard-processor'; +import { Keyboard } from 'keyman/engine/keyboard'; +import { KeyboardProcessor } from 'keyman/engine/js-processor'; import { extendString } from '@keymanapp/web-utils'; extendString(); diff --git a/common/web/keyboard-processor/tests/node/engine/unmatched_final_group.js b/web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.js similarity index 84% rename from common/web/keyboard-processor/tests/node/engine/unmatched_final_group.js rename to web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.js index 81f9765da4c..8bfee041ebe 100644 --- a/common/web/keyboard-processor/tests/node/engine/unmatched_final_group.js +++ b/web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.js @@ -4,8 +4,9 @@ import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardInterface, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardTest, NodeProctor } from '@keymanapp/recorder-core'; describe('Engine - Unmatched Final Groups', function() { @@ -23,7 +24,7 @@ describe('Engine - Unmatched Final Groups', function() { before(async function() { // -- START: Standard Recorder-based unit test loading boilerplate -- let keyboardLoader = new NodeKeyboardLoader(new KeyboardInterface({}, MinimalKeymanGlobal)); - const keyboard = await keyboardLoader.loadKeyboardFromPath('../../test/' + testSuite.keyboard.filename); + const keyboard = await keyboardLoader.loadKeyboardFromPath('../../../../../common/test/' + testSuite.keyboard.filename); keyboardWithHarness = keyboardLoader.harness; keyboardWithHarness.activeKeyboard = keyboard; diff --git a/web/src/test/auto/headless/engine/js-processor/kbdInterface.tests.js b/web/src/test/auto/headless/engine/js-processor/kbdInterface.tests.js new file mode 100644 index 00000000000..0d084964425 --- /dev/null +++ b/web/src/test/auto/headless/engine/js-processor/kbdInterface.tests.js @@ -0,0 +1,91 @@ +import { assert } from 'chai'; + +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); + +import { MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; + +describe('Headless keyboard loading', function () { + const laoPath = require.resolve('@keymanapp/common-test-resources/keyboards/lao_2008_basic.js'); + const khmerPath = require.resolve('@keymanapp/common-test-resources/keyboards/khmer_angkor.js'); + const nonKeyboardPath = require.resolve('@keymanapp/common-test-resources/index.mjs'); + const ipaPath = require.resolve('@keymanapp/common-test-resources/keyboards/sil_ipa.js'); + // Common test suite setup. + + let device = { + formFactor: 'desktop', + OS: 'windows', + browser: 'native' + } + + describe('Full harness loading', () => { + it('successfully loads', async function () { + // -- START: Standard Recorder-based unit test loading boilerplate -- + let harness = new KeyboardInterface({}, MinimalKeymanGlobal); + let keyboardLoader = new NodeKeyboardLoader(harness); + let keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); + harness.activeKeyboard = keyboard; + // -- END: Standard Recorder-based unit test loading boilerplate -- + + // This part provides assurance that the keyboard properly loaded. + assert.equal(keyboard.id, "Keyboard_lao_2008_basic"); + }); + + it('can evaluate rules', async function () { + // -- START: Standard Recorder-based unit test loading boilerplate -- + let harness = new KeyboardInterface({}, MinimalKeymanGlobal); + let keyboardLoader = new NodeKeyboardLoader(harness); + let keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); + harness.activeKeyboard = keyboard; + // -- END: Standard Recorder-based unit test loading boilerplate -- + + // Runs a blank KeyEvent through the keyboard's rule processing. + harness.processKeystroke(new Mock(), keyboard.constructNullKeyEvent(device)); + }); + + it('does not change the active kehboard', async function () { + let harness = new KeyboardInterface({}, MinimalKeymanGlobal); + let keyboardLoader = new NodeKeyboardLoader(harness); + const lao_keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); + assert.isNotOk(harness.activeKeyboard); + assert.isOk(lao_keyboard); + + // This part provides assurance that the keyboard properly loaded. + assert.equal(lao_keyboard.id, "Keyboard_lao_2008_basic"); + + harness.activeKeyboard = lao_keyboard; + + const khmer_keyboard = await keyboardLoader.loadKeyboardFromPath(khmerPath); + assert.strictEqual(lao_keyboard, harness.activeKeyboard); + + assert.equal(khmer_keyboard.id, "Keyboard_khmer_angkor"); + }); + + it('throws distinct errors', async function () { + const invalidPath = 'totally_invalid_path.js'; + + let harness = new KeyboardInterface({}, MinimalKeymanGlobal); + let keyboardLoader = new NodeKeyboardLoader(harness); + let missingError; + try { + await keyboardLoader.loadKeyboardFromPath(invalidPath); + } catch (err) { + missingError = err; + } + assert.isOk(missingError); + + let scriptLoadError; + try { + await keyboardLoader.loadKeyboardFromPath(nonKeyboardPath); + } catch (err) { + scriptLoadError = err; + } + assert.isOk(scriptLoadError); + + // The main test: do the errors match? + assert.notEqual(scriptLoadError.message, missingError.message); + }); + }) +}); diff --git a/common/web/keyboard-processor/tests/node/mocks.js b/web/src/test/auto/headless/engine/js-processor/mocks.js similarity index 98% rename from common/web/keyboard-processor/tests/node/mocks.js rename to web/src/test/auto/headless/engine/js-processor/mocks.js index 9a84e2a8cc0..bad81bfcca4 100644 --- a/common/web/keyboard-processor/tests/node/mocks.js +++ b/web/src/test/auto/headless/engine/js-processor/mocks.js @@ -1,5 +1,5 @@ import { assert } from 'chai'; -import { Mock } from '@keymanapp/keyboard-processor'; +import { Mock } from 'keyman/engine/js-processor'; describe('Mocks', function() { describe('app|les', () => { diff --git a/common/web/keyboard-processor/tests/node/non-positional-rules.js b/web/src/test/auto/headless/engine/js-processor/non-positional-rules.js similarity index 97% rename from common/web/keyboard-processor/tests/node/non-positional-rules.js rename to web/src/test/auto/headless/engine/js-processor/non-positional-rules.js index aba54643aee..a65cec6708d 100644 --- a/common/web/keyboard-processor/tests/node/non-positional-rules.js +++ b/web/src/test/auto/headless/engine/js-processor/non-positional-rules.js @@ -4,8 +4,9 @@ import { ModifierKeyConstants } from '@keymanapp/common-types'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { Codes, KeyboardInterface, KeyEvent, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { Codes, KeyEvent, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; // Compare and contrast the unit tests here with those for app/browser key-event unit testing // in the hardware-event-processing set; the output objects there should have the same format diff --git a/common/web/keyboard-processor/tests/node/specialized-backspace.js b/web/src/test/auto/headless/engine/js-processor/specialized-backspace.js similarity index 98% rename from common/web/keyboard-processor/tests/node/specialized-backspace.js rename to web/src/test/auto/headless/engine/js-processor/specialized-backspace.js index db2be071e8f..7e35817f07f 100644 --- a/common/web/keyboard-processor/tests/node/specialized-backspace.js +++ b/web/src/test/auto/headless/engine/js-processor/specialized-backspace.js @@ -4,8 +4,9 @@ import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { Codes, KeyboardInterface, KeyboardProcessor, KeyEvent, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { Codes, KeyEvent, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, KeyboardProcessor, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { ModifierKeyConstants } from '@keymanapp/common-types'; diff --git a/common/web/keyboard-processor/tests/node/transcriptions.js b/web/src/test/auto/headless/engine/js-processor/transcriptions.js similarity index 99% rename from common/web/keyboard-processor/tests/node/transcriptions.js rename to web/src/test/auto/headless/engine/js-processor/transcriptions.js index b071532bf2a..45c09b3b80c 100644 --- a/common/web/keyboard-processor/tests/node/transcriptions.js +++ b/web/src/test/auto/headless/engine/js-processor/transcriptions.js @@ -1,6 +1,6 @@ import { assert } from 'chai'; -import { Mock, findCommonSubstringEndIndex } from '@keymanapp/keyboard-processor'; +import { Mock, findCommonSubstringEndIndex } from 'keyman/engine/js-processor'; import { extendString } from '@keymanapp/web-utils'; extendString(); // Ensure KMW's string-extension functionality is available. diff --git a/web/src/test/auto/headless/engine/package-cache/cloudQueries.js b/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.js similarity index 98% rename from web/src/test/auto/headless/engine/package-cache/cloudQueries.js rename to web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.js index 4f379ea5636..eb078c17681 100644 --- a/web/src/test/auto/headless/engine/package-cache/cloudQueries.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.js @@ -2,9 +2,9 @@ import { assert } from 'chai'; import sinon from 'sinon'; import { ManagedPromise } from '@keymanapp/web-utils'; -import { CloudQueryEngine, StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/package-cache'; +import { CloudQueryEngine, StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/keyboard-storage'; import { PathConfiguration } from 'keyman/engine/interfaces'; -import NodeCloudRequester from 'keyman/engine/package-cache/node-requester'; +import NodeCloudRequester from 'keyman/engine/keyboard-storage/node-requester'; import path from 'path'; import { fileURLToPath } from 'url'; diff --git a/web/src/test/auto/headless/engine/package-cache/keyboardRequisitioner.js b/web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js similarity index 97% rename from web/src/test/auto/headless/engine/package-cache/keyboardRequisitioner.js rename to web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js index b2d64c05538..b158f4ef9a2 100644 --- a/web/src/test/auto/headless/engine/package-cache/keyboardRequisitioner.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js @@ -2,14 +2,14 @@ import { assert } from 'chai'; import sinon from 'sinon'; import fs from 'fs'; -import { KeyboardHarness, ManagedPromise, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { KeyboardHarness, ManagedPromise, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardRequisitioner, toPrefixedKeyboardId as prefixed -} from 'keyman/engine/package-cache'; +} from 'keyman/engine/keyboard-storage'; import { PathConfiguration } from 'keyman/engine/interfaces'; -import NodeCloudRequester from 'keyman/engine/package-cache/node-requester'; +import NodeCloudRequester from 'keyman/engine/keyboard-storage/node-requester'; import path from 'path'; import { fileURLToPath } from 'url'; @@ -33,7 +33,7 @@ const pathConfig = new PathConfiguration({ // Keyboard paths in fixtures are relative to the repository root. keyboards: `file:///${resolvedResourcePackage}/../../..`, // the one part NEEDED for unit tests below. fonts: '', -}, `file:///${path.dirname(require.resolve('keyman/engine/package-cache'))}`); +}, `file:///${path.dirname(require.resolve('keyman/engine/keyboard-storage'))}`); /** * Performs mocking setup to facilitate unit testing for the `CloudQueryEngine` class. diff --git a/web/src/test/auto/headless/engine/package-cache/keyboardStub.js b/web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.js similarity index 96% rename from web/src/test/auto/headless/engine/package-cache/keyboardStub.js rename to web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.js index 6b81e187a46..af7d6b6a57b 100644 --- a/web/src/test/auto/headless/engine/package-cache/keyboardStub.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.js @@ -1,8 +1,8 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import { KeyboardStub } from 'keyman/engine/package-cache'; -import NodeCloudRequester from 'keyman/engine/package-cache/node-requester'; +import { KeyboardStub } from 'keyman/engine/keyboard-storage'; +import NodeCloudRequester from 'keyman/engine/keyboard-storage/node-requester'; import path from 'path'; import { fileURLToPath } from 'url'; diff --git a/web/src/test/auto/headless/engine/package-cache/nodeCloudRequester.js b/web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.js similarity index 97% rename from web/src/test/auto/headless/engine/package-cache/nodeCloudRequester.js rename to web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.js index 708781932c2..07ac9e98fb6 100644 --- a/web/src/test/auto/headless/engine/package-cache/nodeCloudRequester.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.js @@ -1,7 +1,7 @@ import { assert } from 'chai'; import sinon from 'sinon'; -import NodeCloudRequester from 'keyman/engine/package-cache/node-requester'; +import NodeCloudRequester from 'keyman/engine/keyboard-storage/node-requester'; import path from 'path'; import { fileURLToPath } from 'url'; diff --git a/web/src/test/auto/headless/engine/package-cache/stubAndKeyboardCache.js b/web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.js similarity index 97% rename from web/src/test/auto/headless/engine/package-cache/stubAndKeyboardCache.js rename to web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.js index 03f6fbf5c5a..7260b9982e7 100644 --- a/web/src/test/auto/headless/engine/package-cache/stubAndKeyboardCache.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.js @@ -2,10 +2,10 @@ import { assert } from 'chai'; import sinon from 'sinon'; import fs from 'fs'; -import { KeyboardStub, StubAndKeyboardCache } from 'keyman/engine/package-cache'; +import { KeyboardStub, StubAndKeyboardCache } from 'keyman/engine/keyboard-storage'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; -import { KeyboardHarness, MinimalKeymanGlobal } from '@keymanapp/keyboard-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; +import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; import path from 'path'; diff --git a/common/web/keyboard-processor/tests/node/keyboard-loading.js b/web/src/test/auto/headless/engine/keyboard/keyboard-loading.js similarity index 56% rename from common/web/keyboard-processor/tests/node/keyboard-loading.js rename to web/src/test/auto/headless/engine/keyboard/keyboard-loading.js index 500780dfedb..0dd89a36148 100644 --- a/common/web/keyboard-processor/tests/node/keyboard-loading.js +++ b/web/src/test/auto/headless/engine/keyboard/keyboard-loading.js @@ -1,11 +1,11 @@ import { assert } from 'chai'; -import fs from 'fs'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardHarness, KeyboardInterface, KeyboardLoaderBase, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; +import { KeyboardInterface, Mock } from 'keyman/engine/js-processor'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; describe('Headless keyboard loading', function() { const laoPath = require.resolve('@keymanapp/common-test-resources/keyboards/lao_2008_basic.js'); @@ -40,7 +40,7 @@ describe('Headless keyboard loading', function() { it('successfully loads (has variable stores)', async () => { // -- START: Standard Recorder-based unit test loading boilerplate -- - let harness = new KeyboardInterface({}, MinimalKeymanGlobal); + let harness = new KeyboardHarness({}, MinimalKeymanGlobal); let keyboardLoader = new NodeKeyboardLoader(harness); let keyboard = await keyboardLoader.loadKeyboardFromPath(ipaPath); // -- END: Standard Recorder-based unit test loading boilerplate -- @@ -91,73 +91,4 @@ describe('Headless keyboard loading', function() { assert.isFalse(mobileLayout.hasMultitaps); }); }); - - describe('Full harness loading', () => { - it('successfully loads', async function() { - // -- START: Standard Recorder-based unit test loading boilerplate -- - let harness = new KeyboardInterface({}, MinimalKeymanGlobal); - let keyboardLoader = new NodeKeyboardLoader(harness); - let keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); - harness.activeKeyboard = keyboard; - // -- END: Standard Recorder-based unit test loading boilerplate -- - - // This part provides assurance that the keyboard properly loaded. - assert.equal(keyboard.id, "Keyboard_lao_2008_basic"); - }); - - it('can evaluate rules', async function() { - // -- START: Standard Recorder-based unit test loading boilerplate -- - let harness = new KeyboardInterface({}, MinimalKeymanGlobal); - let keyboardLoader = new NodeKeyboardLoader(harness); - let keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); - harness.activeKeyboard = keyboard; - // -- END: Standard Recorder-based unit test loading boilerplate -- - - // Runs a blank KeyEvent through the keyboard's rule processing. - harness.processKeystroke(new Mock(), keyboard.constructNullKeyEvent(device)); - }); - - it('does not change the active kehboard', async function() { - let harness = new KeyboardInterface({}, MinimalKeymanGlobal); - let keyboardLoader = new NodeKeyboardLoader(harness); - const lao_keyboard = await keyboardLoader.loadKeyboardFromPath(laoPath); - assert.isNotOk(harness.activeKeyboard); - assert.isOk(lao_keyboard); - - // This part provides assurance that the keyboard properly loaded. - assert.equal(lao_keyboard.id, "Keyboard_lao_2008_basic"); - - harness.activeKeyboard = lao_keyboard; - - const khmer_keyboard = await keyboardLoader.loadKeyboardFromPath(khmerPath); - assert.strictEqual(lao_keyboard, harness.activeKeyboard); - - assert.equal(khmer_keyboard.id, "Keyboard_khmer_angkor"); - }); - - it('throws distinct errors', async function() { - const invalidPath = 'totally_invalid_path.js'; - - let harness = new KeyboardInterface({}, MinimalKeymanGlobal); - let keyboardLoader = new NodeKeyboardLoader(harness); - let missingError; - try { - await keyboardLoader.loadKeyboardFromPath(invalidPath); - } catch (err) { - missingError = err; - } - assert.isOk(missingError); - - let scriptLoadError; - try { - await keyboardLoader.loadKeyboardFromPath(nonKeyboardPath); - } catch (err) { - scriptLoadError = err; - } - assert.isOk(scriptLoadError); - - // The main test: do the errors match? - assert.notEqual(scriptLoadError.message, missingError.message); - }); - }) -}); \ No newline at end of file +}); diff --git a/common/web/keyboard-processor/tests/node/keyboard-properties.js b/web/src/test/auto/headless/engine/keyboard/keyboard-properties.js similarity index 98% rename from common/web/keyboard-processor/tests/node/keyboard-properties.js rename to web/src/test/auto/headless/engine/keyboard/keyboard-properties.js index b6ec2dbf8d2..f23d56e3b52 100644 --- a/common/web/keyboard-processor/tests/node/keyboard-properties.js +++ b/web/src/test/auto/headless/engine/keyboard/keyboard-properties.js @@ -5,7 +5,7 @@ import path from 'path'; import { createRequire } from 'module'; const require = createRequire(import.meta.url); -import { KeyboardProperties, SpacebarText } from '@keymanapp/keyboard-processor'; +import { KeyboardProperties, SpacebarText } from 'keyman/engine/keyboard'; describe('Keyboard Properties', function() { let commonResourcesPackage = '@keymanapp/common-test-resources'; diff --git a/web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js b/web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js index d1b728e6253..56aa2f3e5ed 100644 --- a/web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js +++ b/web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js @@ -5,8 +5,8 @@ import { createRequire } from 'module'; const require = createRequire(import.meta.url); import { InputProcessor } from 'keyman/engine/main'; -import { KeyboardInterface, MinimalKeymanGlobal, Mock } from '@keymanapp/keyboard-processor'; -import { NodeKeyboardLoader } from '@keymanapp/keyboard-processor/node-keyboard-loader'; +import { KeyboardInterface, MinimalKeymanGlobal, Mock } from 'keyman/engine/keyboard'; +import { NodeKeyboardLoader } from 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardTest } from '@keymanapp/recorder-core'; import { Worker } from '@keymanapp/lexical-model-layer/node'; @@ -48,8 +48,8 @@ describe('InputProcessor', function() { assert.isUndefined(core.activeKeyboard); // No keyboard should be loaded yet. assert.isUndefined(core.activeModel); // Same for the model. - // These checks are lifted from the keyboard-processor init checks found in - // common/web/keyboard-processor/tests/cases/basic-init.js. + // These checks are lifted from the keyboard init checks found in + // web/src/test/auto/headless/engine/js-processor/basic-init.js. assert.equal('us', core.keyboardProcessor.baseLayout, 'KeyboardProcessor has unexpected base layout') assert.isNotNull(global.KeymanWeb, 'KeymanWeb global was not automatically installed'); assert.equal('default', core.keyboardProcessor.layerId, 'Default layer is not set to "default"'); diff --git a/web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js b/web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js index a0eec4c5319..e4572de21d0 100644 --- a/web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js +++ b/web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js @@ -2,7 +2,7 @@ import { assert } from 'chai'; import { LanguageProcessor, TranscriptionCache } from 'keyman/engine/main'; import { SourcemappedWorker as LMWorker } from "@keymanapp/lexical-model-layer/node"; -import { Mock } from '@keymanapp/keyboard-processor'; +import { Mock } from 'keyman/engine/keyboard'; /* * Unit tests for the Dummy prediction model. @@ -43,8 +43,8 @@ describe('LanguageProcessor', function() { it('has expected default values after initialization', function () { let languageProcessor = new LanguageProcessor(worker, new TranscriptionCache()); - // These checks are lifted from the keyboard-processor init checks found in - // common/web/keyboard-processor/tests/cases/basic-init.js. + // These checks are lifted from the keyboard init checks found in + // web/src/test/auto/headless/engine/js-processor/basic-init.js. assert.isDefined(languageProcessor.lmEngine); assert.isUndefined(languageProcessor.activeModel); assert.isFalse(languageProcessor.isActive); diff --git a/web/src/test/auto/headless/engine/osk/input/gestures/browser/subkeyPopup.tests.ts b/web/src/test/auto/headless/engine/osk/input/gestures/browser/subkeyPopup.tests.ts index b70c17d7dc1..72679897f37 100644 --- a/web/src/test/auto/headless/engine/osk/input/gestures/browser/subkeyPopup.tests.ts +++ b/web/src/test/auto/headless/engine/osk/input/gestures/browser/subkeyPopup.tests.ts @@ -4,7 +4,7 @@ import { JSDOM } from 'jsdom'; import sinon from 'sinon'; import { GesturePath, GestureSequence, GestureSource, GestureSourceSubview } from '@keymanapp/gesture-recognizer'; -import { ActiveSubKey, DeviceSpec } from '@keymanapp/keyboard-processor'; +import { ActiveSubKey, DeviceSpec } from 'keyman/engine/keyboard'; import { DEFAULT_GESTURE_PARAMS, KeyElement, VisualKeyboard } from 'keyman/engine/osk'; import { OSKBaseKey, OSKRow, SubkeyPopup, link } from 'keyman/engine/osk/internals'; diff --git a/web/src/test/auto/integrated/cases/engine.spec.ts b/web/src/test/auto/integrated/cases/engine.spec.ts index 1ef78358a2e..a7e624cbf44 100644 --- a/web/src/test/auto/integrated/cases/engine.spec.ts +++ b/web/src/test/auto/integrated/cases/engine.spec.ts @@ -9,7 +9,7 @@ import { import * as KMWRecorder from '#recorder'; import { type KeymanEngine, type KeyboardInterface } from 'keyman/app/browser'; -import { type KeyboardStub } from 'keyman/engine/package-cache'; +import { type KeyboardStub } from 'keyman/engine/keyboard-storage'; import { type OSKInputEventSpec } from '#recorder'; type WindowKey = keyof typeof window; diff --git a/web/src/test/auto/integrated/test_utils.ts b/web/src/test/auto/integrated/test_utils.ts index e3c49ef0ee2..6e04885b1a5 100644 --- a/web/src/test/auto/integrated/test_utils.ts +++ b/web/src/test/auto/integrated/test_utils.ts @@ -3,7 +3,7 @@ import Device from 'keyman/engine/device-detect'; import * as KMWRecorder from '#recorder'; import { type BrowserInitOptionSpec, type KeymanEngine } from 'keyman/app/browser'; -import { ErrorStub, type KeyboardAPISpec, type KeyboardStub } from 'keyman/engine/package-cache'; +import { ErrorStub, type KeyboardAPISpec, type KeyboardStub } from 'keyman/engine/keyboard-storage'; type WindowKey = keyof typeof window; const keyman_window = 'keyman' as WindowKey; diff --git a/common/test/predictive-text/.gitignore b/web/src/test/manual/predictive-text/.gitignore similarity index 100% rename from common/test/predictive-text/.gitignore rename to web/src/test/manual/predictive-text/.gitignore diff --git a/common/test/predictive-text/README.md b/web/src/test/manual/predictive-text/README.md similarity index 96% rename from common/test/predictive-text/README.md rename to web/src/test/manual/predictive-text/README.md index ddf89bb8be5..0ab038ca11a 100644 --- a/common/test/predictive-text/README.md +++ b/web/src/test/manual/predictive-text/README.md @@ -9,10 +9,9 @@ Install **NOTE**: Requires Node >= 10.0 First, ensure that Keyman web and the LMLayer are built. You can run the -build script in `/web/source` to do this for you: +build script in `/web` to do this for you: - cd ../../../web/source - ./build.sh + ../../../../web/build.sh Then, you can install locally with `npm`: diff --git a/common/test/predictive-text/index.js b/web/src/test/manual/predictive-text/index.mjs similarity index 96% rename from common/test/predictive-text/index.js rename to web/src/test/manual/predictive-text/index.mjs index 934dcf67a6c..33398a69577 100755 --- a/common/test/predictive-text/index.js +++ b/web/src/test/manual/predictive-text/index.mjs @@ -5,16 +5,17 @@ * model. */ -const fs = require('fs'); -const path = require('path'); -const readline = require('readline'); +import fs from 'fs'; +import path from 'path'; +import readline from 'readline'; +import vm from 'vm'; -const {EventIterator} = require('event-iterator'); -const program = require('commander'); +import {EventIterator} from 'event-iterator'; +import program from 'commander'; // Load the most recent LMLayer code locally. -const LMLayer = require('../../predictive-text'); - +import { LMLayer } from 'keyman/engine/predictive-text/worker-main'; +import { LMLayerWorker } from '@keymanapp/lm-worker'; ///////////////////////////////// Constants ///////////////////////////////// @@ -22,7 +23,7 @@ const WORKER_DEBUG = false; const EXIT_USAGE = 1; /** "Control sequence introducer" for ANSI escape codes: */ -const CSI = '\033['; +const CSI = '\u001b['; /** * ANSI escape codes to deal with the screen and the cursor. * See https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_sequences @@ -47,8 +48,7 @@ main(); function main() { // Command line options: program - .name(require('./package.json').name) - .version(require('./package.json').version) + .name('lmlayer-cli') .usage('[-i | -p [-p ...]] (-f | )') .description('CLI for trying lexical models.') .arguments('[model-id]') @@ -330,9 +330,6 @@ async function asyncRepl(modelFile) { function createAsyncWorker() { - // XXX: import the LMLayerWorker directly -- I know where it is built. - const LMLayerWorker = require('../../predictive-text/build/intermediate'); - const vm = require('vm'); let worker = { postMessage(message) { diff --git a/common/test/predictive-text/package.json b/web/src/test/manual/predictive-text/package.json similarity index 100% rename from common/test/predictive-text/package.json rename to web/src/test/manual/predictive-text/package.json diff --git a/web/src/test/manual/web/chirality/chirality.js b/web/src/test/manual/web/chirality/chirality.js index eaf349463c1..68740ffc308 100644 --- a/web/src/test/manual/web/chirality/chirality.js +++ b/web/src/test/manual/web/chirality/chirality.js @@ -10,10 +10,10 @@ */ function Keyboard_chirality() { - // Refer to $KEYMAN_ROOT/common/web/keyboard-processor/src/text/codes.ts, same method name. + // Refer to $KEYMAN_ROOT/web/src/engine/keyboard/src/text/codes.ts, same method name. // May be moved within common/web/types at some point in the future. var getModifierState = function(layerId) { - // Refer to C:\keymanapp\keyman\common\web\keyboard-processor\src\keyboards\keyboardHarness.ts, + // Refer to C:\keymanapp\keyman\web\src\engine\keyboard\src\keyboards\keyboardHarness.ts, // `MinimalKeyboardHarness`. let osk = keyman.osk; // Codes endpoint, as part of the standard keyboard harness. @@ -86,7 +86,7 @@ function Keyboard_chirality() { this.g0 = function (t, e) { var k = KeymanWeb, r = 0, m = 0; - // Refer to C:\keymanapp\keyman\common\web\keyboard-processor\src\keyboards\keyboardHarness.ts, + // Refer to C:\keymanapp\keyman\web\src\engine\keyboard\src\keyboards\keyboardHarness.ts, // `MinimalKeyboardHarness`. var Constants = keyman.osk; // Holds anchor points for relevant Codes properties. diff --git a/web/src/test/manual/web/osk/kbdLoader.mjs b/web/src/test/manual/web/osk/kbdLoader.mjs index a9db786c33d..edf2d3a6484 100644 --- a/web/src/test/manual/web/osk/kbdLoader.mjs +++ b/web/src/test/manual/web/osk/kbdLoader.mjs @@ -1,16 +1,16 @@ import { Keyboard, KeyboardProperties, Codes } from '../../../../../build/engine/osk/lib/index.mjs'; // // The following block would be sufficient to replace the `loadKeyboardFromPath` func below... -// // were it not for common/web/keyboard-processor being outside of the standard `localhost` config +// // were it not for web/src/engine/keyboard/ being outside of the standard `localhost` config // // used for manual Web testing. // import { // DOMKeyboardLoader -// } from '../../../../../../common/web/keyboard-processor/build/lib/dom-keyboard-loader.mjs'; +// } from '../../../keyboard/build/lib/dom-keyboard-loader.mjs'; // import { // KeyboardInterface, // MinimalKeymanGlobal -// } from '../../../../../../common/web/keyboard-processor/build/lib/index.mjs'; +// } from '../../../keyboard/build/lib/index.mjs'; // // This script may or may not be temporary; the KMW "KeyboardManager" class may be spun off in a manner // // that could replace this. diff --git a/web/src/tools/build.sh b/web/src/tools/build.sh index 24d455bc8fd..b7670418ab3 100755 --- a/web/src/tools/build.sh +++ b/web/src/tools/build.sh @@ -14,7 +14,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" builder_describe "Builds the Keyman Engine for Web's development & unit-testing tools" \ "@/common/web/keyman-version" \ - "@/common/web/keyboard-processor" \ + "@/web/src/engine/keyboard" \ "configure" \ "clean" \ "build" \ diff --git a/web/src/tools/testing/recorder-core/package.json b/web/src/tools/testing/recorder-core/package.json index 4812d8a7787..426595e567e 100644 --- a/web/src/tools/testing/recorder-core/package.json +++ b/web/src/tools/testing/recorder-core/package.json @@ -19,7 +19,6 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "*", "@keymanapp/models-types": "*", "@keymanapp/keyman-version": "*", "@keymanapp/web-utils": "*" diff --git a/web/src/tools/testing/recorder-core/src/index.ts b/web/src/tools/testing/recorder-core/src/index.ts index 94c2c9dc4d8..2a739710232 100644 --- a/web/src/tools/testing/recorder-core/src/index.ts +++ b/web/src/tools/testing/recorder-core/src/index.ts @@ -1,5 +1,5 @@ -import { type OutputTarget } from "@keymanapp/keyboard-processor"; -import { KeyDistribution, KeyEvent, Mock } from "@keymanapp/keyboard-processor"; +import { Mock, type OutputTarget } from "keyman/engine/js-processor"; +import { KeyDistribution, KeyEvent } from "keyman/engine/keyboard"; import Proctor from "./proctor.js"; diff --git a/web/src/tools/testing/recorder-core/src/nodeProctor.ts b/web/src/tools/testing/recorder-core/src/nodeProctor.ts index 6f6d7fd6a0d..204ef219394 100644 --- a/web/src/tools/testing/recorder-core/src/nodeProctor.ts +++ b/web/src/tools/testing/recorder-core/src/nodeProctor.ts @@ -8,8 +8,10 @@ import { RecordedSyntheticKeystroke } from "./index.js"; -import { KeyboardInterface, KeyEvent, KeyEventSpec, KeyboardProcessor, Mock, type OutputTarget, KeyboardHarness } from "@keymanapp/keyboard-processor"; +import { KeyEvent, KeyEventSpec, KeyboardHarness } from "keyman/engine/keyboard"; +import { Mock, type OutputTarget } from "keyman/engine/js-processor"; import { DeviceSpec } from "@keymanapp/web-utils"; +import { KeyboardInterface, KeyboardProcessor } from 'keyman/engine/js-processor'; export default class NodeProctor extends Proctor { private keyboardWithHarness: KeyboardHarness; diff --git a/web/src/tools/testing/recorder-core/src/proctor.ts b/web/src/tools/testing/recorder-core/src/proctor.ts index 940fa4a76b1..ec4f584b048 100644 --- a/web/src/tools/testing/recorder-core/src/proctor.ts +++ b/web/src/tools/testing/recorder-core/src/proctor.ts @@ -1,5 +1,5 @@ import { type DeviceSpec } from "@keymanapp/web-utils"; -import { type OutputTarget } from "@keymanapp/keyboard-processor"; +import { type OutputTarget } from "keyman/engine/js-processor"; import type { KeyboardTest, TestSet, TestSequence } from "./index.js"; @@ -9,7 +9,7 @@ export type AssertCallback = (s1: any, s2: any, msg?: string) => void; * Facilitates running Recorder-generated tests on various platforms. * * Note that DOM-aware KeymanWeb will implement a Browser-based version, while - * keyboard-processor and input-processor will use a Node-based version instead. + * keyboard and input-processor will use a Node-based version instead. */ export default abstract class Proctor { device: DeviceSpec; diff --git a/web/src/tools/testing/recorder-core/tsconfig.json b/web/src/tools/testing/recorder-core/tsconfig.json index a7bd08c3745..01e14319451 100644 --- a/web/src/tools/testing/recorder-core/tsconfig.json +++ b/web/src/tools/testing/recorder-core/tsconfig.json @@ -16,7 +16,8 @@ "references": [ { "path": "../../../../../common/web/keyman-version" }, { "path": "../../../../../common/web/utils/" }, - { "path": "../../../../../common/web/keyboard-processor/" }, - { "path": "../../../../../common/web/lm-message-types" } + { "path": "../../../engine/predictive-text/types" }, + { "path": "../../../engine/js-processor" }, + { "path": "../../../engine/keyboard" }, ], } diff --git a/web/src/tools/testing/recorder/browserProctor.ts b/web/src/tools/testing/recorder/browserProctor.ts index 40e7247423a..a48e5572cbe 100644 --- a/web/src/tools/testing/recorder/browserProctor.ts +++ b/web/src/tools/testing/recorder/browserProctor.ts @@ -4,7 +4,7 @@ import { type DeviceSpec } from "@keymanapp/web-utils"; -import { type OutputTarget } from "@keymanapp/keyboard-processor"; +import { type OutputTarget } from "keyman/engine/js-processor"; import { type KeymanEngine } from 'keyman/app/browser'; diff --git a/web/src/tools/testing/recorder/build.sh b/web/src/tools/testing/recorder/build.sh index 28cc43a767d..91f27d09e57 100755 --- a/web/src/tools/testing/recorder/build.sh +++ b/web/src/tools/testing/recorder/build.sh @@ -16,7 +16,7 @@ SUBPROJECT_NAME=tools/testing/recorder builder_describe "Builds the Keyman Engine for Web's test-sequence recording tool" \ "@/common/web/keyman-version" \ - "@/common/web/keyboard-processor" \ + "@/web/src/engine/keyboard" \ "@../recorder-core" \ "clean" \ "configure" \ diff --git a/web/src/tools/testing/recorder/scribe.ts b/web/src/tools/testing/recorder/scribe.ts index 371afadeefe..c266f1a5ccf 100644 --- a/web/src/tools/testing/recorder/scribe.ts +++ b/web/src/tools/testing/recorder/scribe.ts @@ -1,7 +1,7 @@ import { EventEmitter } from "eventemitter3"; -import type { KeyEvent } from "@keymanapp/keyboard-processor"; +import type { KeyEvent } from "keyman/engine/keyboard"; import { Constraint, diff --git a/web/src/tools/testing/recorder/tsconfig.json b/web/src/tools/testing/recorder/tsconfig.json index 63cb543efa1..e25a4f60341 100644 --- a/web/src/tools/testing/recorder/tsconfig.json +++ b/web/src/tools/testing/recorder/tsconfig.json @@ -12,9 +12,9 @@ "references": [ { "path": "../../../../../common/web/keyman-version" }, { "path": "../../../../../common/web/utils" }, - { "path": "../../../../../common/web/keyboard-processor" }, - { "path": "../../../../../common/web/lm-message-types" }, - { "path": "../../../../../web/src/app/browser" }, + { "path": "../../../engine/predictive-text/types" }, + { "path": "../../../app/browser" }, { "path": "../recorder-core" }, + { "path": "../../../engine/keyboard" }, ] }