@keymanapp/kmc-analyze 17.0.236-alpha → 17.0.237-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
1
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7f4d473e-a952-5494-a743-c25c972953ee")}catch(e){}}();
|
|
2
2
|
import { KMX, KmxFileReader } from "@keymanapp/common-types";
|
|
3
3
|
import { KmnCompiler } from "@keymanapp/kmc-kmn";
|
|
4
4
|
export async function getOskFromKmnFile(callbacks, filename) {
|
|
5
5
|
let kvksFilename;
|
|
6
6
|
let touchLayoutFilename;
|
|
7
7
|
const kmnCompiler = new KmnCompiler();
|
|
8
|
-
if (!await kmnCompiler.init(callbacks
|
|
8
|
+
if (!await kmnCompiler.init(callbacks, {
|
|
9
|
+
shouldAddCompilerVersion: false,
|
|
10
|
+
saveDebug: false,
|
|
11
|
+
})) {
|
|
9
12
|
// kmnCompiler will report errors
|
|
10
13
|
return null;
|
|
11
14
|
}
|
|
12
|
-
let result = kmnCompiler.
|
|
13
|
-
shouldAddCompilerVersion: false,
|
|
14
|
-
saveDebug: false,
|
|
15
|
-
});
|
|
15
|
+
let result = await kmnCompiler.run(filename, null);
|
|
16
16
|
if (!result) {
|
|
17
17
|
// kmnCompiler will report any errors
|
|
18
18
|
return null;
|
|
@@ -21,12 +21,12 @@ export async function getOskFromKmnFile(callbacks, filename) {
|
|
|
21
21
|
kvksFilename = callbacks.resolveFilename(filename, result.extra.kvksFilename);
|
|
22
22
|
}
|
|
23
23
|
const reader = new KmxFileReader();
|
|
24
|
-
const keyboard = reader.read(result.kmx.data);
|
|
24
|
+
const keyboard = reader.read(result.artifacts.kmx.data);
|
|
25
25
|
const touchLayoutStore = keyboard.stores.find(store => store.dwSystemID == KMX.KMXFile.TSS_LAYOUTFILE);
|
|
26
26
|
if (touchLayoutStore) {
|
|
27
27
|
touchLayoutFilename = callbacks.resolveFilename(filename, touchLayoutStore.dpString);
|
|
28
28
|
}
|
|
29
29
|
return { kvksFilename, touchLayoutFilename };
|
|
30
30
|
}
|
|
31
|
-
//# debugId=
|
|
31
|
+
//# debugId=7f4d473e-a952-5494-a743-c25c972953ee
|
|
32
32
|
//# sourceMappingURL=get-osk-from-kmn-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"debug_id":"
|
|
1
|
+
{"debug_id":"7f4d473e-a952-5494-a743-c25c972953ee","file":"get-osk-from-kmn-file.js","mappings":";AAAA,OAAO,EAAqB,GAAG,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAA4B,EAAE,QAAgB;IAIpF,IAAI,YAAoB,CAAC;IACzB,IAAI,mBAA2B,CAAC;IAEhC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;IACtC,IAAG,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE;QACpC,wBAAwB,EAAE,KAAK;QAC/B,SAAS,EAAE,KAAK;KACjB,CAAC,EAAE;QACF,iCAAiC;QACjC,OAAO,IAAI,CAAC;KACb;IAED,IAAI,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAEnD,IAAG,CAAC,MAAM,EAAE;QACV,qCAAqC;QACrC,OAAO,IAAI,CAAC;KACb;IAED,IAAG,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE;QAC5B,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;KAC/E;IAED,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAiB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,IAAI,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAEvG,IAAG,gBAAgB,EAAE;QACnB,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;KACtF;IAED,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAA;AAC9C,CAAC","names":[],"sourceRoot":"","sources":["../../../src/util/get-osk-from-kmn-file.ts"],"version":3}
|
package/package.json
CHANGED
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"build/src/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@keymanapp/common-types": "17.0.
|
|
25
|
-
"@keymanapp/kmc-kmn": "17.0.
|
|
24
|
+
"@keymanapp/common-types": "17.0.237-alpha",
|
|
25
|
+
"@keymanapp/kmc-kmn": "17.0.237-alpha",
|
|
26
26
|
"commander": "^10.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@keymanapp/resources-gosh": "17.0.
|
|
29
|
+
"@keymanapp/resources-gosh": "17.0.237-alpha",
|
|
30
30
|
"@types/chai": "^4.1.7",
|
|
31
31
|
"@types/mocha": "^5.2.7",
|
|
32
32
|
"@types/node": "^20.4.1",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"type": "git",
|
|
43
43
|
"url": "git+https://github.com/keymanapp/keyman.git"
|
|
44
44
|
},
|
|
45
|
-
"version": "17.0.
|
|
45
|
+
"version": "17.0.237-alpha"
|
|
46
46
|
}
|