diff --git a/web/README.md b/web/README.md index 7cd9e02f002..4f35643e1a9 100644 --- a/web/README.md +++ b/web/README.md @@ -120,8 +120,8 @@ graph TD; Device----->WebUtils; Elements["/web/src/engine/element-wrappers"]; Elements-->JSProc; - KeyboardCache["/web/src/engine/package-cache"]; - KeyboardCache-->Interfaces; + KeyboardStorage["/web/src/engine/keyboard-storage"]; + KeyboardStorage-->Interfaces; DomUtils["/web/src/engine/dom-utils"]; DomUtils-->WebUtils; DomUtils-->KP; @@ -133,7 +133,7 @@ graph TD; OSK-->Interfaces; CommonEngine["/web/src/engine/main"]; 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 c3e17e9d433..4705bc55de9 100755 --- a/web/build.sh +++ b/web/build.sh @@ -29,9 +29,9 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \ ":engine/element-wrappers Subset used to integrate with website elements" \ ":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" \ ":samples Builds all needed resources for the KMW sample-page set" \ ":tools Builds engine-related development resources" \ @@ -61,9 +61,9 @@ builder_describe_outputs \ build:engine/element-wrappers "/web/build/engine/element-wrappers/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:samples "/web/src/samples/simplest/keymanweb.js" \ build:tools "/web/build/tools/building/sourcemap-root/index.js" \ @@ -152,9 +152,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/package.json b/web/package.json index b5727dd0095..96a11c0cd3e 100644 --- a/web/package.json +++ b/web/package.json @@ -57,21 +57,21 @@ "types": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.d.ts", "import": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.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/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", diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index f17a17a5299..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 'keyman/engine/keyboard'; -import { type KeyboardStub } from 'keyman/engine/package-cache'; +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/keymanEngine.ts b/web/src/app/browser/src/keymanEngine.ts index dc912f257be..324394bae22 100644 --- a/web/src/app/browser/src/keymanEngine.ts +++ b/web/src/app/browser/src/keymanEngine.ts @@ -6,7 +6,7 @@ import { TwoStateActivator, VisualKeyboard } from 'keyman/engine/osk'; -import { ErrorStub, KeyboardStub, CloudQueryResult, toPrefixedKeyboardId as prefixed } from 'keyman/engine/package-cache'; +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'; 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 2b242de39c6..b0b90b4d96c 100644 --- a/web/src/app/webview/src/contextManager.ts +++ b/web/src/app/webview/src/contextManager.ts @@ -1,6 +1,6 @@ import { type Keyboard } from 'keyman/engine/keyboard'; import { Mock, OutputTarget, Transcription, findCommonSubstringEndIndex, isEmptyTransform, TextTransform } from 'keyman/engine/js-processor'; -import { KeyboardStub } from 'keyman/engine/package-cache'; +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 ca0c39fd438..d390a6ce1b2 100644 --- a/web/src/app/webview/src/keymanEngine.ts +++ b/web/src/app/webview/src/keymanEngine.ts @@ -3,7 +3,7 @@ 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/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 100% rename from web/src/engine/package-cache/src/cloud/queryEngine.ts rename to web/src/engine/keyboard-storage/src/cloud/queryEngine.ts diff --git a/web/src/engine/package-cache/src/cloud/requesterInterface.ts b/web/src/engine/keyboard-storage/src/cloud/requesterInterface.ts similarity index 100% rename from web/src/engine/package-cache/src/cloud/requesterInterface.ts rename to web/src/engine/keyboard-storage/src/cloud/requesterInterface.ts diff --git a/web/src/engine/package-cache/src/domCloudRequester.ts b/web/src/engine/keyboard-storage/src/domCloudRequester.ts similarity index 100% rename from web/src/engine/package-cache/src/domCloudRequester.ts rename to web/src/engine/keyboard-storage/src/domCloudRequester.ts 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 100% rename from web/src/engine/package-cache/src/keyboardRequisitioner.ts rename to web/src/engine/keyboard-storage/src/keyboardRequisitioner.ts diff --git a/web/src/engine/package-cache/src/keyboardStub.ts b/web/src/engine/keyboard-storage/src/keyboardStub.ts similarity index 100% rename from web/src/engine/package-cache/src/keyboardStub.ts rename to web/src/engine/keyboard-storage/src/keyboardStub.ts 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 100% rename from web/src/engine/package-cache/src/nodeCloudRequester.ts rename to web/src/engine/keyboard-storage/src/nodeCloudRequester.ts diff --git a/web/src/engine/package-cache/src/stubAndKeyboardCache.ts b/web/src/engine/keyboard-storage/src/stubAndKeyboardCache.ts similarity index 100% rename from web/src/engine/package-cache/src/stubAndKeyboardCache.ts rename to web/src/engine/keyboard-storage/src/stubAndKeyboardCache.ts 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/web/src/engine/main/build.sh b/web/src/engine/main/build.sh index 15eaf770f2e..737ca9a5bd4 100755 --- a/web/src/engine/main/build.sh +++ b/web/src/engine/main/build.sh @@ -19,7 +19,7 @@ builder_describe "Builds the Keyman Engine for Web's common top-level base class "@/web/src/engine/interfaces build" \ "@/web/src/engine/device-detect build" \ "@/web/src/engine/js-processor build" \ - "@/web/src/engine/package-cache build" \ + "@/web/src/engine/keyboard-storage build" \ "@/web/src/engine/osk build" \ "@/developer/src/kmc-model test" \ "clean" \ diff --git a/web/src/engine/main/src/contextManagerBase.ts b/web/src/engine/main/src/contextManagerBase.ts index 5c774aa72d0..17fed71bd2e 100644 --- a/web/src/engine/main/src/contextManagerBase.ts +++ b/web/src/engine/main/src/contextManagerBase.ts @@ -1,7 +1,7 @@ import { EventEmitter } from 'eventemitter3'; 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/package-cache'; +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 050a7be11e5..aac559acabd 100644 --- a/web/src/engine/main/src/engineConfiguration.ts +++ b/web/src/engine/main/src/engineConfiguration.ts @@ -4,7 +4,7 @@ import { DeviceSpec, KeyboardProperties, ManagedPromise, physicalKeyDeviceAlias, 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/keyboardInterface.ts b/web/src/engine/main/src/keyboardInterface.ts index 9d922477b20..10194785948 100644 --- a/web/src/engine/main/src/keyboardInterface.ts +++ b/web/src/engine/main/src/keyboardInterface.ts @@ -1,6 +1,6 @@ import { KeyboardObject } from "keyman/engine/keyboard"; import { KeyboardInterface as KeyboardInterfaceBase } from 'keyman/engine/js-processor'; -import { KeyboardStub, RawKeyboardStub, toUnprefixedKeyboardId as unprefixed } from 'keyman/engine/package-cache'; +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 b91920e70d3..30160e683c8 100644 --- a/web/src/engine/main/src/keymanEngine.ts +++ b/web/src/engine/main/src/keymanEngine.ts @@ -3,7 +3,7 @@ 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"; @@ -12,7 +12,7 @@ import { ContextManagerBase } from "./contextManagerBase.js"; import HardKeyboardBase from "./hardKeyboard.js"; import { LegacyAPIEvents } from "./legacyAPIEvents.js"; import { EventNames, EventListener, LegacyEventEmitter } from "keyman/engine/events"; -import DOMCloudRequester from "keyman/engine/package-cache/dom-requester"; +import DOMCloudRequester from "keyman/engine/keyboard-storage/dom-requester"; import KEYMAN_VERSION from "@keymanapp/keyman-version"; // From https://stackoverflow.com/a/69328045 diff --git a/web/src/engine/main/tsconfig.json b/web/src/engine/main/tsconfig.json index e3b2b0616cc..d2e0580161c 100644 --- a/web/src/engine/main/tsconfig.json +++ b/web/src/engine/main/tsconfig.json @@ -13,7 +13,7 @@ "references": [ { "path": "../device-detect" }, { "path": "../osk" }, - { "path": "../package-cache" }, + { "path": "../keyboard-storage" }, { "path": "../interfaces" }, { "path": "../js-processor" } ] 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 291c299b2b0..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,7 +3,7 @@ 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 'keyman/engine/keyboard'; import { DOMKeyboardLoader } from 'keyman/engine/keyboard/dom-keyboard-loader'; 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 95% 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 7ad8356a322..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 @@ -4,8 +4,8 @@ import sinon from 'sinon'; 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/web/src/test/auto/dom/kbdLoader.ts b/web/src/test/auto/dom/kbdLoader.ts index 8b5c081c758..b0d092c12d5 100644 --- a/web/src/test/auto/dom/kbdLoader.ts +++ b/web/src/test/auto/dom/kbdLoader.ts @@ -9,7 +9,7 @@ import { } from 'keyman/engine/keyboard'; import { KeyboardInterface } from 'keyman/engine/js-processor'; -import { KeyboardStub } from 'keyman/engine/package-cache'; +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/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 98% 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 2ca0578790e..b158f4ef9a2 100644 --- a/web/src/test/auto/headless/engine/package-cache/keyboardRequisitioner.js +++ b/web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js @@ -7,9 +7,9 @@ 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 99% 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 f49bb1238f6..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,7 +2,7 @@ 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 'keyman/engine/keyboard/node-keyboard-loader'; import { KeyboardHarness, MinimalKeymanGlobal } from 'keyman/engine/keyboard'; 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;