Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(web): engine/configuration -> engine/paths 🧩 #8459

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \
"build" \
"test" \
":app/webview A puppetable version of KMW designed for use in a host app's WebView" \
":engine/configuration Subset used to configure KMW" \
":engine/paths Subset used to configure KMW" \
":engine/device-detect Subset used for device-detection " \
":engine/dom-utils A common subset of function used for DOM calculations, layout, etc" \
":engine/element-wrappers Subset used to integrate with website elements" \
Expand Down Expand Up @@ -86,13 +86,13 @@ builder_run_child_actions build:engine/element-wrappers
builder_run_child_actions build:engine/osk

# Uses engine/osk (due to resource-path config interface)
builder_run_child_actions build:engine/configuration
builder_run_child_actions build:engine/paths

# Uses engine/config (also due to resource-path config interface, but for the
# more complete version of that interface)
builder_run_child_actions build:engine/keyboard-cache

# Uses engine/configuration, engine/device-detect, engine/keyboard-cache, & engine/osk
# Uses engine/paths, engine/device-detect, engine/keyboard-cache, & engine/osk
builder_run_child_actions build:engine/main

# Uses all but engine/element-wrappers
Expand Down
6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "keyman",
"description": "Facilitates text input in any language.",
"exports": {
"./engine/configuration": {
"types": "./build/engine/configuration/obj/index.d.ts",
"import": "./build/engine/configuration/obj/index.js"
"./engine/paths": {
"types": "./build/engine/paths/obj/index.d.ts",
"import": "./build/engine/paths/obj/index.js"
},
"./engine/device-detect": {
"types": "./build/engine/device-detect/obj/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/browser/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SUBPROJECT_NAME=app/browser
builder_describe "Builds the Keyman Engine for Web's website-integrating version for use in non-puppeted browsers." \
"@/common/web/input-processor build" \
"@/web/src/engine/device-detect build" \
"@/web/src/engine/configuration build" \
"@/web/src/engine/paths build" \
"@/web/src/engine/keyboard-cache build" \
"@/web/src/engine/osk build" \
"@/web/src/engine/element-wrappers build" \
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/webview/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SUBPROJECT_NAME=app/webview
builder_describe "Builds the Keyman Engine for Web's puppetable version designed for use within WebViews." \
"@/common/web/input-processor build" \
"@/web/src/engine/device-detect build" \
"@/web/src/engine/configuration build" \
"@/web/src/engine/paths build" \
"@/web/src/engine/keyboard-cache build" \
"@/web/src/engine/osk build" \
"@/web/src/engine/main build" \
Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/keyboard-cache/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SUBPROJECT_NAME=engine/keyboard-cache

builder_describe "Builds keyboard cloud-querying & caching modules used by the Keyman Engine for Web (KMW)." \
"@/common/web/keyboard-processor build" \
"@/web/src/engine/configuration" \
"@/web/src/engine/paths" \
"clean" \
"configure" \
"build" \
Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/keyboard-cache/src/cloud/queryEngine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PathConfiguration } from 'keyman/engine/configuration';
import { PathConfiguration } from 'keyman/engine/paths';

import { default as KeyboardStub, ErrorStub, KeyboardAPISpec, mergeAndResolveStubPromises } from '../keyboardStub.js';
import { LanguageAPIPropertySpec, ManagedPromise, Version } from '@keymanapp/keyboard-processor';
Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/keyboard-cache/src/keyboardRequisitioner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
LanguageAPIPropertySpec,
RawKeyboardMetadata
} from "@keymanapp/keyboard-processor";
import { PathConfiguration } from "keyman/engine/configuration";
import { PathConfiguration } from "keyman/engine/paths";

// TODO: is cleanup needed here, to use local paths instead?
import { CloudQueryEngine, type ErrorStub, KeyboardAPISpec, KeyboardStub, StubAndKeyboardCache, RawKeyboardStub, mergeAndResolveStubPromises } from "./index.js";
Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/keyboard-cache/src/stubAndKeyboardCache.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Keyboard, KeyboardLoaderBase as KeyboardLoader } from "@keymanapp/keyboard-processor";
import EventEmitter from "eventemitter3";
import { type PathConfiguration } from "keyman/engine/configuration";
import { type PathConfiguration } from "keyman/engine/paths";

import KeyboardStub from "./keyboardStub.js";

Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/main/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SUBPROJECT_NAME=engine/main

builder_describe "Builds the Keyman Engine for Web's common top-level base classes." \
"@/common/web/input-processor build" \
"@/web/src/engine/configuration build" \
"@/web/src/engine/paths build" \
"@/web/src/engine/device-detect build" \
"@/web/src/engine/keyboard-cache build" \
"@/web/src/engine/osk build" \
Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/main/src/engineConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeviceSpec, ManagedPromise, physicalKeyDeviceAlias, SpacebarText } from "@keymanapp/keyboard-processor";
import { PathConfiguration, PathOptionDefaults, PathOptionSpec } from "keyman/engine/configuration";
import { PathConfiguration, PathOptionDefaults, PathOptionSpec } from "keyman/engine/paths";
import { Device } from "keyman/engine/device-detect";
import { KeyboardStub } from "keyman/engine/keyboard-cache";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ await esbuild.build({
format: "esm",
nodePaths: ['../../../../node_modules'],
entryPoints: {
'index': '../../../build/engine/configuration/obj/index.js',
'index': '../../../build/engine/paths/obj/index.js',
},
external: ['fs', 'vm'],
outdir: '../../../build/engine/configuration/lib/',
outdir: '../../../build/engine/paths/lib/',
outExtension: { '.js': '.mjs' },
tsconfig: './tsconfig.json',
target: "es5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
cd "$THIS_SCRIPT_PATH"

# Imports common Web build-script definitions & functions
SUBPROJECT_NAME=engine/configuration
SUBPROJECT_NAME=engine/paths
. "$KEYMAN_ROOT/web/common.inc.sh"

# ################################ Main script ################################
Expand Down Expand Up @@ -59,6 +59,6 @@ fi

if builder_start_action test; then
# TODO: CI vs manual: how the tests are reported.
mocha --recursive "${KEYMAN_ROOT}/web/src/test/auto/headless/configuration"
mocha --recursive "${KEYMAN_ROOT}/web/src/test/auto/headless/paths"
builder_finish_action success test
fi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"sourceMap": true,
"target": "es5",
"baseUrl": "./",
"outDir": "../../../build/engine/configuration/obj/",
"tsBuildInfoFile": "../../../build/engine/configuration/obj/tsconfig.tsbuildinfo",
"outDir": "../../../build/engine/paths/obj/",
"tsBuildInfoFile": "../../../build/engine/paths/obj/tsconfig.tsbuildinfo",
"rootDir": "./src"
},

Expand Down
2 changes: 1 addition & 1 deletion web/src/test/auto/dom/cases/keyboard-cache/cloudQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const assert = chai.assert;
import sinon from '/node_modules/sinon/pkg/sinon-esm.js';

import { CloudQueryEngine } from '/@keymanapp/keyman/build/engine/keyboard-cache/lib/index.mjs';
import { PathConfiguration } from '/@keymanapp/keyman/build/engine/configuration/lib/index.mjs';
import { PathConfiguration } from '/@keymanapp/keyman/build/engine/paths/lib/index.mjs';
import DOMCloudRequester from '/@keymanapp/keyman/build/engine/keyboard-cache/lib/dom-cloud-requester.mjs';

const pathConfig = new PathConfiguration({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from '/node_modules/sinon/pkg/sinon-esm.js';

import { KeyboardHarness, MinimalKeymanGlobal } from '/@keymanapp/keyboard-processor/build/lib/index.mjs';
import { DOMKeyboardLoader } from '/@keymanapp/keyboard-processor/build/lib/dom-keyboard-loader.mjs';
import { PathConfiguration } from '/@keymanapp/keyman/build/engine/configuration/lib/index.mjs';
import { PathConfiguration } from '/@keymanapp/keyman/build/engine/paths/lib/index.mjs';
import { KeyboardRequisitioner } from '/@keymanapp/keyman/build/engine/keyboard-cache/lib/index.mjs';
import DOMCloudRequester from '/@keymanapp/keyman/build/engine/keyboard-cache/lib/dom-cloud-requester.mjs';

Expand Down
2 changes: 1 addition & 1 deletion web/src/test/auto/headless/keyboard-cache/cloudQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from 'sinon';

import { ManagedPromise } from '@keymanapp/web-utils';
import { CloudQueryEngine, StubAndKeyboardCache, toPrefixedKeyboardId as prefixed } from 'keyman/engine/keyboard-cache';
import { PathConfiguration } from 'keyman/engine/configuration';
import { PathConfiguration } from 'keyman/engine/paths';
import NodeCloudRequester from 'keyman/engine/keyboard-cache/node-requester';

import path from 'path';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
KeyboardRequisitioner,
toPrefixedKeyboardId as prefixed
} from 'keyman/engine/keyboard-cache';
import { PathConfiguration } from 'keyman/engine/configuration';
import { PathConfiguration } from 'keyman/engine/paths';
import NodeCloudRequester from 'keyman/engine/keyboard-cache/node-requester';

import path from 'path';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from 'chai';
import sinon from 'sinon';

import { PathOptionDefaults, PathConfiguration } from 'keyman/engine/configuration';
import { PathOptionDefaults, PathConfiguration } from 'keyman/engine/paths';

// Tests the activation-state logic abstraction & implementations used to model and control OSK visibility.

Expand Down