@keymanapp/kmc 18.0.40-alpha → 18.0.45-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.
- package/build/src/commands/analyze.d.ts +22 -22
- package/build/src/commands/analyze.js +105 -105
- package/build/src/commands/analyze.js.map +1 -1
- package/build/src/commands/build.d.ts +12 -12
- package/build/src/commands/build.js +154 -154
- package/build/src/commands/build.js.map +1 -1
- package/build/src/commands/buildClasses/BuildActivity.d.ts +10 -10
- package/build/src/commands/buildClasses/BuildActivity.js +30 -30
- package/build/src/commands/buildClasses/BuildActivity.js.map +1 -1
- package/build/src/commands/buildClasses/BuildKeyboardInfo.d.ts +10 -10
- package/build/src/commands/buildClasses/BuildKeyboardInfo.js +46 -46
- package/build/src/commands/buildClasses/BuildKeyboardInfo.js.map +1 -1
- package/build/src/commands/buildClasses/BuildKmnKeyboard.d.ts +9 -9
- package/build/src/commands/buildClasses/BuildKmnKeyboard.js +34 -34
- package/build/src/commands/buildClasses/BuildKmnKeyboard.js.map +1 -1
- package/build/src/commands/buildClasses/BuildLdmlKeyboard.d.ts +9 -9
- package/build/src/commands/buildClasses/BuildLdmlKeyboard.js +18 -18
- package/build/src/commands/buildClasses/BuildModel.d.ts +9 -9
- package/build/src/commands/buildClasses/BuildModel.js +12 -12
- package/build/src/commands/buildClasses/BuildModelInfo.d.ts +20 -20
- package/build/src/commands/buildClasses/BuildModelInfo.js +72 -72
- package/build/src/commands/buildClasses/BuildModelInfo.js.map +1 -1
- package/build/src/commands/buildClasses/BuildPackage.d.ts +9 -9
- package/build/src/commands/buildClasses/BuildPackage.js +12 -12
- package/build/src/commands/buildClasses/BuildProject.d.ts +10 -10
- package/build/src/commands/buildClasses/BuildProject.js +115 -115
- package/build/src/commands/buildClasses/BuildProject.js.map +1 -1
- package/build/src/commands/buildClasses/buildActivities.d.ts +6 -6
- package/build/src/commands/buildClasses/buildActivities.js +20 -20
- package/build/src/commands/buildTestData/index.d.ts +1 -1
- package/build/src/commands/buildTestData/index.js +38 -38
- package/build/src/commands/buildTestData/index.js.map +1 -1
- package/build/src/commands/buildWindowsPackageInstaller/index.d.ts +1 -1
- package/build/src/commands/buildWindowsPackageInstaller/index.js +42 -42
- package/build/src/commands/buildWindowsPackageInstaller/index.js.map +1 -1
- package/build/src/commands/messageCommand.d.ts +2 -2
- package/build/src/commands/messageCommand.js +208 -208
- package/build/src/commands/messageCommand.js.map +1 -1
- package/build/src/kmc.d.ts +5 -5
- package/build/src/kmc.js +56 -56
- package/build/src/kmc.js.map +1 -1
- package/build/src/kmlmc.d.ts +5 -5
- package/build/src/kmlmc.js +56 -56
- package/build/src/kmlmc.js.map +1 -1
- package/build/src/kmlmp.d.ts +5 -5
- package/build/src/kmlmp.js +45 -45
- package/build/src/kmlmp.js.map +1 -1
- package/build/src/messages/infrastructureMessages.d.ts +151 -151
- package/build/src/messages/infrastructureMessages.js +74 -74
- package/build/src/messages/messageNamespaces.d.ts +7 -7
- package/build/src/messages/messageNamespaces.js +38 -38
- package/build/src/util/NodeCompilerCallbacks.d.ts +43 -43
- package/build/src/util/NodeCompilerCallbacks.js +220 -220
- package/build/src/util/NodeCompilerCallbacks.js.map +1 -1
- package/build/src/util/TestKeymanSentry.d.ts +6 -6
- package/build/src/util/TestKeymanSentry.js +50 -50
- package/build/src/util/TestKeymanSentry.js.map +1 -1
- package/build/src/util/baseOptions.d.ts +20 -20
- package/build/src/util/baseOptions.js +23 -23
- package/build/src/util/calculateSourcePath.d.ts +10 -10
- package/build/src/util/calculateSourcePath.js +17 -17
- package/build/src/util/calculateSourcePath.js.map +1 -1
- package/build/src/util/extendedCompilerOptions.d.ts +56 -56
- package/build/src/util/extendedCompilerOptions.js +122 -122
- package/build/src/util/extendedCompilerOptions.js.map +1 -1
- package/build/src/util/fileLists.d.ts +15 -15
- package/build/src/util/fileLists.js +45 -45
- package/build/src/util/fileLists.js.map +1 -1
- package/build/src/util/getDeveloperBinPath.d.ts +8 -8
- package/build/src/util/getDeveloperBinPath.js +35 -35
- package/build/src/util/getDeveloperBinPath.js.map +1 -1
- package/build/src/util/getLastGitCommitDate.d.ts +7 -7
- package/build/src/util/getLastGitCommitDate.js +43 -43
- package/build/src/util/getLastGitCommitDate.js.map +1 -1
- package/build/src/util/kmcSentryOptions.d.ts +7 -7
- package/build/src/util/kmcSentryOptions.js +19 -19
- package/build/src/util/kmcSentryOptions.js.map +1 -1
- package/build/src/util/projectLoader.d.ts +3 -3
- package/build/src/util/projectLoader.js +50 -50
- package/build/src/util/projectLoader.js.map +1 -1
- package/build/src/util/projectRunner.d.ts +2 -2
- package/build/src/util/projectRunner.js +26 -26
- package/build/src/util/projectRunner.js.map +1 -1
- package/build/src/util/sysexits.d.ts +9 -9
- package/build/src/util/sysexits.js +6 -6
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extendedCompilerOptions.js","sourceRoot":"","sources":["../../../src/util/extendedCompilerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,qBAAqB,EAAwE,MAAM,yBAAyB,CAAC;AACxK,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAavF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,SAAS,6CAA6C,CAAC,OAAe,EAAE,SAA4B;IAClG,MAAM,OAAO,GAAG,iEAAiE,CAAC;IAClF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,IAAG,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"extendedCompilerOptions.js","sourceRoot":"","sources":["../../../src/util/extendedCompilerOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,qBAAqB,EAAwE,MAAM,yBAAyB,CAAC;AACxK,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC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S;QAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,kBAAkB;QAClB,wBAAwB,EAAE,OAAO,CAAC,eAAe;QACjD,SAAS,EAAE,OAAO,CAAC,KAAK;QACxB,wBAAwB,EAAE,OAAO,CAAC,wBAAwB;QAC1D,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,kBAAkB;QAClB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,gBAAgB,EAAE,SAAS;KAC5B,CAAA;AACH,CAAC;AAGD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,oBAAoB;IACpB,6CAA6C;CAC9C,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CompilerCallbacks } from "@keymanapp/common-types";
|
|
2
|
-
/**
|
|
3
|
-
* Replaces each entry starting with `@` with the content of the file, with one
|
|
4
|
-
* line per file, filenames trimmed, and any lines that are blank or starting
|
|
5
|
-
* with `#` (marking a comment) removed. Note: `#` anywhere else is treated as
|
|
6
|
-
* part of the filename.
|
|
7
|
-
*
|
|
8
|
-
* If any filelist does not exist, reports an error and returns false.
|
|
9
|
-
*
|
|
10
|
-
* @param filenames
|
|
11
|
-
* @param callbacks
|
|
12
|
-
* @returns false on failure
|
|
13
|
-
*/
|
|
14
|
-
export declare function expandFileLists(filenames: string[], callbacks: CompilerCallbacks): boolean;
|
|
15
|
-
export declare function expandFileList(filename: string, callbacks: CompilerCallbacks): string[];
|
|
1
|
+
import { CompilerCallbacks } from "@keymanapp/common-types";
|
|
2
|
+
/**
|
|
3
|
+
* Replaces each entry starting with `@` with the content of the file, with one
|
|
4
|
+
* line per file, filenames trimmed, and any lines that are blank or starting
|
|
5
|
+
* with `#` (marking a comment) removed. Note: `#` anywhere else is treated as
|
|
6
|
+
* part of the filename.
|
|
7
|
+
*
|
|
8
|
+
* If any filelist does not exist, reports an error and returns false.
|
|
9
|
+
*
|
|
10
|
+
* @param filenames
|
|
11
|
+
* @param callbacks
|
|
12
|
+
* @returns false on failure
|
|
13
|
+
*/
|
|
14
|
+
export declare function expandFileLists(filenames: string[], callbacks: CompilerCallbacks): boolean;
|
|
15
|
+
export declare function expandFileList(filename: string, callbacks: CompilerCallbacks): string[];
|
|
16
16
|
//# sourceMappingURL=fileLists.d.ts.map
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { InfrastructureMessages } from "../messages/infrastructureMessages.js";
|
|
4
|
-
/**
|
|
5
|
-
* Replaces each entry starting with `@` with the content of the file, with one
|
|
6
|
-
* line per file, filenames trimmed, and any lines that are blank or starting
|
|
7
|
-
* with `#` (marking a comment) removed. Note: `#` anywhere else is treated as
|
|
8
|
-
* part of the filename.
|
|
9
|
-
*
|
|
10
|
-
* If any filelist does not exist, reports an error and returns false.
|
|
11
|
-
*
|
|
12
|
-
* @param filenames
|
|
13
|
-
* @param callbacks
|
|
14
|
-
* @returns false on failure
|
|
15
|
-
*/
|
|
16
|
-
export function expandFileLists(filenames, callbacks) {
|
|
17
|
-
let i = 0;
|
|
18
|
-
while (i < filenames.length) {
|
|
19
|
-
if (filenames[i].startsWith('@')) {
|
|
20
|
-
const fileList = expandFileList(filenames[i].substring(1), callbacks);
|
|
21
|
-
if (fileList === null) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
filenames.splice(i, 1, ...fileList);
|
|
25
|
-
i += fileList.length;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
i++;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
export function expandFileList(filename, callbacks) {
|
|
34
|
-
if (!fs.existsSync(filename)) {
|
|
35
|
-
callbacks.reportMessage(InfrastructureMessages.Error_FileDoesNotExist({ filename }));
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
const files = fs.readFileSync(filename, 'utf-8').split('\n').map(item => {
|
|
39
|
-
item = item.trim();
|
|
40
|
-
return item.startsWith('#') || item == ''
|
|
41
|
-
? ''
|
|
42
|
-
: path.resolve(path.dirname(filename), item);
|
|
43
|
-
}).filter(item => item.length > 0);
|
|
44
|
-
return files;
|
|
45
|
-
}
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { InfrastructureMessages } from "../messages/infrastructureMessages.js";
|
|
4
|
+
/**
|
|
5
|
+
* Replaces each entry starting with `@` with the content of the file, with one
|
|
6
|
+
* line per file, filenames trimmed, and any lines that are blank or starting
|
|
7
|
+
* with `#` (marking a comment) removed. Note: `#` anywhere else is treated as
|
|
8
|
+
* part of the filename.
|
|
9
|
+
*
|
|
10
|
+
* If any filelist does not exist, reports an error and returns false.
|
|
11
|
+
*
|
|
12
|
+
* @param filenames
|
|
13
|
+
* @param callbacks
|
|
14
|
+
* @returns false on failure
|
|
15
|
+
*/
|
|
16
|
+
export function expandFileLists(filenames, callbacks) {
|
|
17
|
+
let i = 0;
|
|
18
|
+
while (i < filenames.length) {
|
|
19
|
+
if (filenames[i].startsWith('@')) {
|
|
20
|
+
const fileList = expandFileList(filenames[i].substring(1), callbacks);
|
|
21
|
+
if (fileList === null) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
filenames.splice(i, 1, ...fileList);
|
|
25
|
+
i += fileList.length;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
i++;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
export function expandFileList(filename, callbacks) {
|
|
34
|
+
if (!fs.existsSync(filename)) {
|
|
35
|
+
callbacks.reportMessage(InfrastructureMessages.Error_FileDoesNotExist({ filename }));
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const files = fs.readFileSync(filename, 'utf-8').split('\n').map(item => {
|
|
39
|
+
item = item.trim();
|
|
40
|
+
return item.startsWith('#') || item == ''
|
|
41
|
+
? ''
|
|
42
|
+
: path.resolve(path.dirname(filename), item);
|
|
43
|
+
}).filter(item => item.length > 0);
|
|
44
|
+
return files;
|
|
45
|
+
}
|
|
46
46
|
//# sourceMappingURL=fileLists.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileLists.js","sourceRoot":"","sources":["../../../src/util/fileLists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,SAAmB,EAAE,SAA4B;IAC/E,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAM,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"fileLists.js","sourceRoot":"","sources":["../../../src/util/fileLists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,SAAmB,EAAE,SAA4B;IAC/E,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAM,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;QAC3B,IAAG,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,QAAQ,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YACtE,IAAG,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,KAAK,CAAC;YACf,CAAC;YACD,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC;YACpC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,CAAC,EAAE,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,SAA4B;IAC3E,IAAG,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,SAAS,CAAC,aAAa,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACtE,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE;YACvC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;IAChD,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEnC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Locates the Keyman Developer bin folder, checking first if this is running
|
|
3
|
-
* from the source repository (using the presence of the KEYMAN_ROOT environment
|
|
4
|
-
* variable), and if not, checking for the presence of kmconvert.exe in each
|
|
5
|
-
* parent folder recursively until we reach the root of the filesystem.
|
|
6
|
-
* @returns string | null
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDeveloperBinPath(): string;
|
|
1
|
+
/**
|
|
2
|
+
* Locates the Keyman Developer bin folder, checking first if this is running
|
|
3
|
+
* from the source repository (using the presence of the KEYMAN_ROOT environment
|
|
4
|
+
* variable), and if not, checking for the presence of kmconvert.exe in each
|
|
5
|
+
* parent folder recursively until we reach the root of the filesystem.
|
|
6
|
+
* @returns string | null
|
|
7
|
+
*/
|
|
8
|
+
export declare function getDeveloperBinPath(): string;
|
|
9
9
|
//# sourceMappingURL=getDeveloperBinPath.d.ts.map
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { fileURLToPath } from 'url';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import * as fs from 'fs';
|
|
4
|
-
/**
|
|
5
|
-
* Locates the Keyman Developer bin folder, checking first if this is running
|
|
6
|
-
* from the source repository (using the presence of the KEYMAN_ROOT environment
|
|
7
|
-
* variable), and if not, checking for the presence of kmconvert.exe in each
|
|
8
|
-
* parent folder recursively until we reach the root of the filesystem.
|
|
9
|
-
* @returns string | null
|
|
10
|
-
*/
|
|
11
|
-
export function getDeveloperBinPath() {
|
|
12
|
-
// if running in source repo, then we always look in developer/bin/
|
|
13
|
-
const keymanRoot = process.env['KEYMAN_ROOT'];
|
|
14
|
-
if (keymanRoot) {
|
|
15
|
-
// https://stackoverflow.com/a/45242825/1836776 (imperfect due to
|
|
16
|
-
// possibility of '..foo', but good enough)
|
|
17
|
-
const rel = path.relative(keymanRoot, import.meta.url);
|
|
18
|
-
if (rel && !rel.startsWith('..') && !path.isAbsolute(rel)) {
|
|
19
|
-
return path.join(keymanRoot, 'developer', 'bin');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
// Otherwise, we will look in parent folders until we find kmconvert.exe
|
|
23
|
-
// TODO: if we eliminate kmconvert.exe, we'll need to do this some other way?
|
|
24
|
-
let p = fileURLToPath(import.meta.url);
|
|
25
|
-
const root = path.parse(p).root.toLowerCase(); // lower-case for drive letter on Windows
|
|
26
|
-
p = path.dirname(p);
|
|
27
|
-
do {
|
|
28
|
-
if (fs.existsSync(path.join(p, 'kmconvert.exe'))) {
|
|
29
|
-
return p;
|
|
30
|
-
}
|
|
31
|
-
p = path.dirname(p);
|
|
32
|
-
} while (p.toLowerCase() != root);
|
|
33
|
-
// kmconvert.exe was not found on the path
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
1
|
+
import { fileURLToPath } from 'url';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
/**
|
|
5
|
+
* Locates the Keyman Developer bin folder, checking first if this is running
|
|
6
|
+
* from the source repository (using the presence of the KEYMAN_ROOT environment
|
|
7
|
+
* variable), and if not, checking for the presence of kmconvert.exe in each
|
|
8
|
+
* parent folder recursively until we reach the root of the filesystem.
|
|
9
|
+
* @returns string | null
|
|
10
|
+
*/
|
|
11
|
+
export function getDeveloperBinPath() {
|
|
12
|
+
// if running in source repo, then we always look in developer/bin/
|
|
13
|
+
const keymanRoot = process.env['KEYMAN_ROOT'];
|
|
14
|
+
if (keymanRoot) {
|
|
15
|
+
// https://stackoverflow.com/a/45242825/1836776 (imperfect due to
|
|
16
|
+
// possibility of '..foo', but good enough)
|
|
17
|
+
const rel = path.relative(keymanRoot, import.meta.url);
|
|
18
|
+
if (rel && !rel.startsWith('..') && !path.isAbsolute(rel)) {
|
|
19
|
+
return path.join(keymanRoot, 'developer', 'bin');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// Otherwise, we will look in parent folders until we find kmconvert.exe
|
|
23
|
+
// TODO: if we eliminate kmconvert.exe, we'll need to do this some other way?
|
|
24
|
+
let p = fileURLToPath(import.meta.url);
|
|
25
|
+
const root = path.parse(p).root.toLowerCase(); // lower-case for drive letter on Windows
|
|
26
|
+
p = path.dirname(p);
|
|
27
|
+
do {
|
|
28
|
+
if (fs.existsSync(path.join(p, 'kmconvert.exe'))) {
|
|
29
|
+
return p;
|
|
30
|
+
}
|
|
31
|
+
p = path.dirname(p);
|
|
32
|
+
} while (p.toLowerCase() != root);
|
|
33
|
+
// kmconvert.exe was not found on the path
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=getDeveloperBinPath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDeveloperBinPath.js","sourceRoot":"","sources":["../../../src/util/getDeveloperBinPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB;IACjC,mEAAmE;IACnE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9C,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"getDeveloperBinPath.js","sourceRoot":"","sources":["../../../src/util/getDeveloperBinPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB;IACjC,mEAAmE;IACnE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC9C,IAAI,UAAU,EAAE,CAAC;QACf,iEAAiE;QACjE,2CAA2C;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvD,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,wEAAwE;IACxE,6EAA6E;IAC7E,IAAI,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,yCAAyC;IACxF,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,GAAG,CAAC;QACF,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC;YACjD,OAAO,CAAC,CAAC;QACX,CAAC;QACD,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE;IAElC,0CAA0C;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const expectedGitDateFormat: RegExp;
|
|
2
|
-
/**
|
|
3
|
-
* Returns the date and time of the last commit from git for the passed in path
|
|
4
|
-
* @param path Path for which to retrieve the last commit message
|
|
5
|
-
* @returns string, in RFC3339, 'YYYY-MM-DDThh:nn:ssZ'
|
|
6
|
-
*/
|
|
7
|
-
export declare function getLastGitCommitDate(path: string): string;
|
|
1
|
+
export declare const expectedGitDateFormat: RegExp;
|
|
2
|
+
/**
|
|
3
|
+
* Returns the date and time of the last commit from git for the passed in path
|
|
4
|
+
* @param path Path for which to retrieve the last commit message
|
|
5
|
+
* @returns string, in RFC3339, 'YYYY-MM-DDThh:nn:ssZ'
|
|
6
|
+
*/
|
|
7
|
+
export declare function getLastGitCommitDate(path: string): string;
|
|
8
8
|
//# sourceMappingURL=getLastGitCommitDate.d.ts.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { execFileSync } from 'child_process';
|
|
2
|
-
// RFC3339 pattern, UTC
|
|
3
|
-
export const expectedGitDateFormat = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$/;
|
|
4
|
-
/**
|
|
5
|
-
* Returns the date and time of the last commit from git for the passed in path
|
|
6
|
-
* @param path Path for which to retrieve the last commit message
|
|
7
|
-
* @returns string, in RFC3339, 'YYYY-MM-DDThh:nn:ssZ'
|
|
8
|
-
*/
|
|
9
|
-
export function getLastGitCommitDate(path) {
|
|
10
|
-
// TZ=UTC0 git log -1 --no-merges --date=format:%Y-%m-%dT%H:%M:%SZ --format=%ad
|
|
11
|
-
let result = null;
|
|
12
|
-
try {
|
|
13
|
-
result = execFileSync('git', [
|
|
14
|
-
'log',
|
|
15
|
-
'-1',
|
|
16
|
-
'--no-merges',
|
|
17
|
-
'--date=format:%Y-%m-%dT%H:%M:%SZ',
|
|
18
|
-
'--format=%ad' // emit only the commit date
|
|
19
|
-
], {
|
|
20
|
-
env: { ...process.env, TZ: 'TZ0' },
|
|
21
|
-
encoding: 'utf-8',
|
|
22
|
-
windowsHide: true,
|
|
23
|
-
cwd: path,
|
|
24
|
-
stdio: ['pipe', 'pipe', 'pipe'] // all output via pipe, so we don't get git errors on console
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
// If git is not available, or the file is not in-repo, then it is probably
|
|
29
|
-
// fine to just silently return null, as the only machines where this is
|
|
30
|
-
// critical are the CI machines where we build and deploy .keyboard_info
|
|
31
|
-
// files, and where git will always be available. It would be possible to
|
|
32
|
-
// have this raise an error in CI environments, but the chance of error
|
|
33
|
-
// seems low.
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
result = result.trim();
|
|
37
|
-
// We'll only return the result if it walks like a date, swims like a date,
|
|
38
|
-
// and quacks like a date.
|
|
39
|
-
if (!result.match(expectedGitDateFormat)) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
1
|
+
import { execFileSync } from 'child_process';
|
|
2
|
+
// RFC3339 pattern, UTC
|
|
3
|
+
export const expectedGitDateFormat = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ$/;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the date and time of the last commit from git for the passed in path
|
|
6
|
+
* @param path Path for which to retrieve the last commit message
|
|
7
|
+
* @returns string, in RFC3339, 'YYYY-MM-DDThh:nn:ssZ'
|
|
8
|
+
*/
|
|
9
|
+
export function getLastGitCommitDate(path) {
|
|
10
|
+
// TZ=UTC0 git log -1 --no-merges --date=format:%Y-%m-%dT%H:%M:%SZ --format=%ad
|
|
11
|
+
let result = null;
|
|
12
|
+
try {
|
|
13
|
+
result = execFileSync('git', [
|
|
14
|
+
'log', // git log
|
|
15
|
+
'-1', // one commit only
|
|
16
|
+
'--no-merges', // we're only interested in 'real' commits
|
|
17
|
+
'--date=format:%Y-%m-%dT%H:%M:%SZ', // format the date in our expected RFC3339 format
|
|
18
|
+
'--format=%ad' // emit only the commit date
|
|
19
|
+
], {
|
|
20
|
+
env: { ...process.env, TZ: 'TZ0' }, // use UTC timezone, not local
|
|
21
|
+
encoding: 'utf-8', // force a string result rather than Buffer
|
|
22
|
+
windowsHide: true, // on windows, we may need this to suppress a console window popup
|
|
23
|
+
cwd: path, // path to run git from
|
|
24
|
+
stdio: ['pipe', 'pipe', 'pipe'] // all output via pipe, so we don't get git errors on console
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
// If git is not available, or the file is not in-repo, then it is probably
|
|
29
|
+
// fine to just silently return null, as the only machines where this is
|
|
30
|
+
// critical are the CI machines where we build and deploy .keyboard_info
|
|
31
|
+
// files, and where git will always be available. It would be possible to
|
|
32
|
+
// have this raise an error in CI environments, but the chance of error
|
|
33
|
+
// seems low.
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
result = result.trim();
|
|
37
|
+
// We'll only return the result if it walks like a date, swims like a date,
|
|
38
|
+
// and quacks like a date.
|
|
39
|
+
if (!result.match(expectedGitDateFormat)) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
44
|
//# sourceMappingURL=getLastGitCommitDate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLastGitCommitDate.js","sourceRoot":"","sources":["../../../src/util/getLastGitCommitDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,uBAAuB;AACvB,MAAM,CAAC,MAAM,qBAAqB,GAAG,sCAAsC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,+EAA+E;IAC/E,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI;
|
|
1
|
+
{"version":3,"file":"getLastGitCommitDate.js","sourceRoot":"","sources":["../../../src/util/getLastGitCommitDate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,uBAAuB;AACvB,MAAM,CAAC,MAAM,qBAAqB,GAAG,sCAAsC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,+EAA+E;IAC/E,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI,CAAC;QACH,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE;YAC3B,KAAK,EAAiC,UAAU;YAChD,IAAI,EAAkC,kBAAkB;YACxD,aAAa,EAAyB,0CAA0C;YAChF,kCAAkC,EAAI,iDAAiD;YACvF,cAAc,CAAwB,4BAA4B;SACnE,EAAE;YACD,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAI,8BAA8B;YACpE,QAAQ,EAAE,OAAO,EAAqB,2CAA2C;YACjF,WAAW,EAAE,IAAI,EAAqB,kEAAkE;YACxG,GAAG,EAAE,IAAI,EAA6B,uBAAuB;YAC7D,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAO,6DAA6D;SACpG,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,yEAAyE;QACzE,uEAAuE;QACvE,aAAa;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAEvB,2EAA2E;IAC3E,0BAA0B;IAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SentryNodeOptions } from "@keymanapp/developer-utils";
|
|
2
|
-
/**
|
|
3
|
-
* Rewrites sourcemap paths for the esbuild distribution of kmc (as used in
|
|
4
|
-
* Keyman Developer itself) /<arbitrary-path>/kmc.mjs to /dist/kmc.mjs, so that
|
|
5
|
-
* Sentry can pick up the mapping
|
|
6
|
-
*/
|
|
7
|
-
export declare const kmcSentryOptions: SentryNodeOptions;
|
|
1
|
+
import { SentryNodeOptions } from "@keymanapp/developer-utils";
|
|
2
|
+
/**
|
|
3
|
+
* Rewrites sourcemap paths for the esbuild distribution of kmc (as used in
|
|
4
|
+
* Keyman Developer itself) /<arbitrary-path>/kmc.mjs to /dist/kmc.mjs, so that
|
|
5
|
+
* Sentry can pick up the mapping
|
|
6
|
+
*/
|
|
7
|
+
export declare const kmcSentryOptions: SentryNodeOptions;
|
|
8
8
|
//# sourceMappingURL=kmcSentryOptions.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rewrites sourcemap paths for the esbuild distribution of kmc (as used in
|
|
3
|
-
* Keyman Developer itself) /<arbitrary-path>/kmc.mjs to /dist/kmc.mjs, so that
|
|
4
|
-
* Sentry can pick up the mapping
|
|
5
|
-
*/
|
|
6
|
-
export const kmcSentryOptions = {
|
|
7
|
-
beforeSend: function (event) {
|
|
8
|
-
const frames = event?.exception?.values?.[0]?.stacktrace?.frames;
|
|
9
|
-
if (frames) {
|
|
10
|
-
frames.forEach(frame => {
|
|
11
|
-
const filename = frame.filename.match(/[^/]+$/)[0];
|
|
12
|
-
if (filename.endsWith('.mjs')) {
|
|
13
|
-
frame.filename = `/dist/${filename}`;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return event;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Rewrites sourcemap paths for the esbuild distribution of kmc (as used in
|
|
3
|
+
* Keyman Developer itself) /<arbitrary-path>/kmc.mjs to /dist/kmc.mjs, so that
|
|
4
|
+
* Sentry can pick up the mapping
|
|
5
|
+
*/
|
|
6
|
+
export const kmcSentryOptions = {
|
|
7
|
+
beforeSend: function (event) {
|
|
8
|
+
const frames = event?.exception?.values?.[0]?.stacktrace?.frames;
|
|
9
|
+
if (frames) {
|
|
10
|
+
frames.forEach(frame => {
|
|
11
|
+
const filename = frame.filename.match(/[^/]+$/)[0];
|
|
12
|
+
if (filename.endsWith('.mjs')) {
|
|
13
|
+
frame.filename = `/dist/${filename}`;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return event;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
20
|
//# sourceMappingURL=kmcSentryOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kmcSentryOptions.js","sourceRoot":"","sources":["../../../src/util/kmcSentryOptions.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,UAAU,EAAE,UAAU,KAAK;QACzB,MAAM,MAAM,GAAG,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC;QACjE,IAAI,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"kmcSentryOptions.js","sourceRoot":"","sources":["../../../src/util/kmcSentryOptions.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,UAAU,EAAE,UAAU,KAAK;QACzB,MAAM,MAAM,GAAG,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC;QACjE,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnD,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC9B,KAAK,CAAC,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAAC;gBACvC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerCallbacks, KeymanDeveloperProject } from "@keymanapp/common-types";
|
|
2
|
-
export declare const isProject: (filename: string) => boolean;
|
|
3
|
-
export declare function loadProject(infile: string, callbacks: CompilerCallbacks): KeymanDeveloperProject;
|
|
1
|
+
import { CompilerCallbacks, KeymanDeveloperProject } from "@keymanapp/common-types";
|
|
2
|
+
export declare const isProject: (filename: string) => boolean;
|
|
3
|
+
export declare function loadProject(infile: string, callbacks: CompilerCallbacks): KeymanDeveloperProject;
|
|
4
4
|
//# sourceMappingURL=projectLoader.d.ts.map
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import { KeymanDeveloperProject, KeymanFileTypes, KPJFileReader } from "@keymanapp/common-types";
|
|
4
|
-
import { InfrastructureMessages } from "../messages/infrastructureMessages.js";
|
|
5
|
-
export const isProject = (filename) => fs.existsSync(filename) && (fs.statSync(filename).isDirectory() ||
|
|
6
|
-
KeymanFileTypes.sourceTypeFromFilename(filename) == ".kpj" /* KeymanFileTypes.Source.Project */);
|
|
7
|
-
export function loadProject(infile, callbacks) {
|
|
8
|
-
infile = path.resolve(infile.replace(/\\/g, '/'));
|
|
9
|
-
if (fs.existsSync(infile) && fs.statSync(infile).isDirectory()) {
|
|
10
|
-
// This is a project folder, look for folder-name.kpj
|
|
11
|
-
infile = path.join(infile, path.basename(infile) + ".kpj" /* KeymanFileTypes.Source.Project */);
|
|
12
|
-
}
|
|
13
|
-
// infile should be the .kpj
|
|
14
|
-
if (!infile.endsWith(".kpj" /* KeymanFileTypes.Source.Project */)) {
|
|
15
|
-
callbacks.reportMessage(InfrastructureMessages.Error_NotAProjectFile({ filename: infile }));
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
const project = callbacks.fs.existsSync(infile) ?
|
|
19
|
-
loadProjectFromFile(infile, callbacks) :
|
|
20
|
-
loadDefaultProjectFromFolder(infile, callbacks);
|
|
21
|
-
return project;
|
|
22
|
-
}
|
|
23
|
-
function loadDefaultProjectFromFolder(infile, callbacks) {
|
|
24
|
-
// The folder does not contain a .kpj, so construct a default 2.0 .kpj
|
|
25
|
-
const project = new KeymanDeveloperProject(infile, '2.0', callbacks);
|
|
26
|
-
if (!project.populateFiles()) {
|
|
27
|
-
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFolder({ folderName: path.dirname(infile) }));
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
return project;
|
|
31
|
-
}
|
|
32
|
-
function loadProjectFromFile(infile, callbacks) {
|
|
33
|
-
const kpjData = callbacks.loadFile(infile);
|
|
34
|
-
const reader = new KPJFileReader(callbacks);
|
|
35
|
-
let kpj = null;
|
|
36
|
-
try {
|
|
37
|
-
kpj = reader.read(kpjData);
|
|
38
|
-
if (kpj.KeymanDeveloperProject?.Options?.Version && kpj.KeymanDeveloperProject.Options.Version != "1.0" && kpj.KeymanDeveloperProject.Options.Version != "2.0") {
|
|
39
|
-
callbacks.reportMessage(InfrastructureMessages.Error_UnsupportedProjectVersion({ version: kpj.KeymanDeveloperProject.Options.Version }));
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
reader.validate(kpj);
|
|
43
|
-
}
|
|
44
|
-
catch (e) {
|
|
45
|
-
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFile({ message: (e ?? '').toString() }));
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
const project = reader.transform(infile, kpj);
|
|
49
|
-
return project;
|
|
50
|
-
}
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
import * as fs from 'fs';
|
|
3
|
+
import { KeymanDeveloperProject, KeymanFileTypes, KPJFileReader } from "@keymanapp/common-types";
|
|
4
|
+
import { InfrastructureMessages } from "../messages/infrastructureMessages.js";
|
|
5
|
+
export const isProject = (filename) => fs.existsSync(filename) && (fs.statSync(filename).isDirectory() ||
|
|
6
|
+
KeymanFileTypes.sourceTypeFromFilename(filename) == ".kpj" /* KeymanFileTypes.Source.Project */);
|
|
7
|
+
export function loadProject(infile, callbacks) {
|
|
8
|
+
infile = path.resolve(infile.replace(/\\/g, '/'));
|
|
9
|
+
if (fs.existsSync(infile) && fs.statSync(infile).isDirectory()) {
|
|
10
|
+
// This is a project folder, look for folder-name.kpj
|
|
11
|
+
infile = path.join(infile, path.basename(infile) + ".kpj" /* KeymanFileTypes.Source.Project */);
|
|
12
|
+
}
|
|
13
|
+
// infile should be the .kpj
|
|
14
|
+
if (!infile.endsWith(".kpj" /* KeymanFileTypes.Source.Project */)) {
|
|
15
|
+
callbacks.reportMessage(InfrastructureMessages.Error_NotAProjectFile({ filename: infile }));
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const project = callbacks.fs.existsSync(infile) ?
|
|
19
|
+
loadProjectFromFile(infile, callbacks) :
|
|
20
|
+
loadDefaultProjectFromFolder(infile, callbacks);
|
|
21
|
+
return project;
|
|
22
|
+
}
|
|
23
|
+
function loadDefaultProjectFromFolder(infile, callbacks) {
|
|
24
|
+
// The folder does not contain a .kpj, so construct a default 2.0 .kpj
|
|
25
|
+
const project = new KeymanDeveloperProject(infile, '2.0', callbacks);
|
|
26
|
+
if (!project.populateFiles()) {
|
|
27
|
+
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFolder({ folderName: path.dirname(infile) }));
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return project;
|
|
31
|
+
}
|
|
32
|
+
function loadProjectFromFile(infile, callbacks) {
|
|
33
|
+
const kpjData = callbacks.loadFile(infile);
|
|
34
|
+
const reader = new KPJFileReader(callbacks);
|
|
35
|
+
let kpj = null;
|
|
36
|
+
try {
|
|
37
|
+
kpj = reader.read(kpjData);
|
|
38
|
+
if (kpj.KeymanDeveloperProject?.Options?.Version && kpj.KeymanDeveloperProject.Options.Version != "1.0" && kpj.KeymanDeveloperProject.Options.Version != "2.0") {
|
|
39
|
+
callbacks.reportMessage(InfrastructureMessages.Error_UnsupportedProjectVersion({ version: kpj.KeymanDeveloperProject.Options.Version }));
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
reader.validate(kpj);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFile({ message: (e ?? '').toString() }));
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const project = reader.transform(infile, kpj);
|
|
49
|
+
return project;
|
|
50
|
+
}
|
|
51
51
|
//# sourceMappingURL=projectLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectLoader.js","sourceRoot":"","sources":["../../../src/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are function runOnFiles(callbacks: CompilerCallbacks, filenames: string[], callback: (filename: string) => Promise<boolean>): Promise<boolean>;
|
|
1
|
+
import { CompilerCallbacks } from "@keymanapp/common-types";
|
|
2
|
+
export declare function runOnFiles(callbacks: CompilerCallbacks, filenames: string[], callback: (filename: string) => Promise<boolean>): Promise<boolean>;
|
|
3
3
|
//# sourceMappingURL=projectRunner.d.ts.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { KeymanFileTypes } from "@keymanapp/common-types";
|
|
2
|
-
import { isProject, loadProject } from './projectLoader.js';
|
|
3
|
-
async function runProject(callbacks, filename, callback) {
|
|
4
|
-
const project = loadProject(filename, callbacks);
|
|
5
|
-
for (const file of project.files) {
|
|
6
|
-
if (KeymanFileTypes.filenameIs(file.filename, ".kpj" /* KeymanFileTypes.Source.Project */)) {
|
|
7
|
-
// Don't accidentally recurse into projects
|
|
8
|
-
continue;
|
|
9
|
-
}
|
|
10
|
-
if (!await callback(project.resolveInputFilePath(file))) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
export async function runOnFiles(callbacks, filenames, callback) {
|
|
17
|
-
for (let filename of filenames) {
|
|
18
|
-
const result = isProject(filename) ?
|
|
19
|
-
await runProject(callbacks, filename, callback) :
|
|
20
|
-
await callback(filename);
|
|
21
|
-
if (!result) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
1
|
+
import { KeymanFileTypes } from "@keymanapp/common-types";
|
|
2
|
+
import { isProject, loadProject } from './projectLoader.js';
|
|
3
|
+
async function runProject(callbacks, filename, callback) {
|
|
4
|
+
const project = loadProject(filename, callbacks);
|
|
5
|
+
for (const file of project.files) {
|
|
6
|
+
if (KeymanFileTypes.filenameIs(file.filename, ".kpj" /* KeymanFileTypes.Source.Project */)) {
|
|
7
|
+
// Don't accidentally recurse into projects
|
|
8
|
+
continue;
|
|
9
|
+
}
|
|
10
|
+
if (!await callback(project.resolveInputFilePath(file))) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export async function runOnFiles(callbacks, filenames, callback) {
|
|
17
|
+
for (let filename of filenames) {
|
|
18
|
+
const result = isProject(filename) ?
|
|
19
|
+
await runProject(callbacks, filename, callback) :
|
|
20
|
+
await callback(filename);
|
|
21
|
+
if (!result) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
27
|
//# sourceMappingURL=projectRunner.js.map
|