@keymanapp/kmc 18.0.41-alpha → 18.0.46-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.
Files changed (86) hide show
  1. package/build/src/commands/analyze.d.ts +22 -22
  2. package/build/src/commands/analyze.js +105 -105
  3. package/build/src/commands/analyze.js.map +1 -1
  4. package/build/src/commands/build.d.ts +12 -12
  5. package/build/src/commands/build.js +154 -154
  6. package/build/src/commands/build.js.map +1 -1
  7. package/build/src/commands/buildClasses/BuildActivity.d.ts +10 -10
  8. package/build/src/commands/buildClasses/BuildActivity.js +30 -30
  9. package/build/src/commands/buildClasses/BuildActivity.js.map +1 -1
  10. package/build/src/commands/buildClasses/BuildKeyboardInfo.d.ts +10 -10
  11. package/build/src/commands/buildClasses/BuildKeyboardInfo.js +46 -46
  12. package/build/src/commands/buildClasses/BuildKeyboardInfo.js.map +1 -1
  13. package/build/src/commands/buildClasses/BuildKmnKeyboard.d.ts +9 -9
  14. package/build/src/commands/buildClasses/BuildKmnKeyboard.js +34 -34
  15. package/build/src/commands/buildClasses/BuildKmnKeyboard.js.map +1 -1
  16. package/build/src/commands/buildClasses/BuildLdmlKeyboard.d.ts +9 -9
  17. package/build/src/commands/buildClasses/BuildLdmlKeyboard.js +18 -18
  18. package/build/src/commands/buildClasses/BuildModel.d.ts +9 -9
  19. package/build/src/commands/buildClasses/BuildModel.js +12 -12
  20. package/build/src/commands/buildClasses/BuildModelInfo.d.ts +20 -20
  21. package/build/src/commands/buildClasses/BuildModelInfo.js +72 -72
  22. package/build/src/commands/buildClasses/BuildModelInfo.js.map +1 -1
  23. package/build/src/commands/buildClasses/BuildPackage.d.ts +9 -9
  24. package/build/src/commands/buildClasses/BuildPackage.js +12 -12
  25. package/build/src/commands/buildClasses/BuildProject.d.ts +10 -10
  26. package/build/src/commands/buildClasses/BuildProject.js +115 -115
  27. package/build/src/commands/buildClasses/BuildProject.js.map +1 -1
  28. package/build/src/commands/buildClasses/buildActivities.d.ts +6 -6
  29. package/build/src/commands/buildClasses/buildActivities.js +20 -20
  30. package/build/src/commands/buildTestData/index.d.ts +1 -1
  31. package/build/src/commands/buildTestData/index.js +38 -38
  32. package/build/src/commands/buildTestData/index.js.map +1 -1
  33. package/build/src/commands/buildWindowsPackageInstaller/index.d.ts +1 -1
  34. package/build/src/commands/buildWindowsPackageInstaller/index.js +42 -42
  35. package/build/src/commands/buildWindowsPackageInstaller/index.js.map +1 -1
  36. package/build/src/commands/messageCommand.d.ts +2 -2
  37. package/build/src/commands/messageCommand.js +208 -208
  38. package/build/src/commands/messageCommand.js.map +1 -1
  39. package/build/src/kmc.d.ts +5 -5
  40. package/build/src/kmc.js +56 -56
  41. package/build/src/kmc.js.map +1 -1
  42. package/build/src/kmlmc.d.ts +5 -5
  43. package/build/src/kmlmc.js +56 -56
  44. package/build/src/kmlmc.js.map +1 -1
  45. package/build/src/kmlmp.d.ts +5 -5
  46. package/build/src/kmlmp.js +45 -45
  47. package/build/src/kmlmp.js.map +1 -1
  48. package/build/src/messages/infrastructureMessages.d.ts +151 -151
  49. package/build/src/messages/infrastructureMessages.js +74 -74
  50. package/build/src/messages/messageNamespaces.d.ts +7 -7
  51. package/build/src/messages/messageNamespaces.js +38 -38
  52. package/build/src/util/NodeCompilerCallbacks.d.ts +43 -43
  53. package/build/src/util/NodeCompilerCallbacks.js +220 -220
  54. package/build/src/util/NodeCompilerCallbacks.js.map +1 -1
  55. package/build/src/util/TestKeymanSentry.d.ts +6 -6
  56. package/build/src/util/TestKeymanSentry.js +50 -50
  57. package/build/src/util/TestKeymanSentry.js.map +1 -1
  58. package/build/src/util/baseOptions.d.ts +20 -20
  59. package/build/src/util/baseOptions.js +23 -23
  60. package/build/src/util/calculateSourcePath.d.ts +10 -10
  61. package/build/src/util/calculateSourcePath.js +17 -17
  62. package/build/src/util/calculateSourcePath.js.map +1 -1
  63. package/build/src/util/extendedCompilerOptions.d.ts +56 -56
  64. package/build/src/util/extendedCompilerOptions.js +122 -122
  65. package/build/src/util/extendedCompilerOptions.js.map +1 -1
  66. package/build/src/util/fileLists.d.ts +15 -15
  67. package/build/src/util/fileLists.js +45 -45
  68. package/build/src/util/fileLists.js.map +1 -1
  69. package/build/src/util/getDeveloperBinPath.d.ts +8 -8
  70. package/build/src/util/getDeveloperBinPath.js +35 -35
  71. package/build/src/util/getDeveloperBinPath.js.map +1 -1
  72. package/build/src/util/getLastGitCommitDate.d.ts +7 -7
  73. package/build/src/util/getLastGitCommitDate.js +43 -43
  74. package/build/src/util/getLastGitCommitDate.js.map +1 -1
  75. package/build/src/util/kmcSentryOptions.d.ts +7 -7
  76. package/build/src/util/kmcSentryOptions.js +19 -19
  77. package/build/src/util/kmcSentryOptions.js.map +1 -1
  78. package/build/src/util/projectLoader.d.ts +3 -3
  79. package/build/src/util/projectLoader.js +50 -50
  80. package/build/src/util/projectLoader.js.map +1 -1
  81. package/build/src/util/projectRunner.d.ts +2 -2
  82. package/build/src/util/projectRunner.js +26 -26
  83. package/build/src/util/projectRunner.js.map +1 -1
  84. package/build/src/util/sysexits.d.ts +9 -9
  85. package/build/src/util/sysexits.js +6 -6
  86. package/package.json +12 -12
@@ -1,152 +1,152 @@
1
- export declare class InfrastructureMessages {
2
- static FATAL_UnexpectedException: number;
3
- static Fatal_UnexpectedException: (o: {
4
- e: any;
5
- }) => import("@keymanapp/common-types").CompilerEvent;
6
- static INFO_BuildingFile: number;
7
- static Info_BuildingFile: (o: {
8
- filename: string;
9
- relativeFilename: string;
10
- }) => {
11
- filename: string;
12
- line?: number;
13
- code: number;
14
- message: string;
15
- detail?: string;
16
- exceptionVar?: any;
17
- };
18
- static ERROR_FileDoesNotExist: number;
19
- static Error_FileDoesNotExist: (o: {
20
- filename: string;
21
- }) => import("@keymanapp/common-types").CompilerEvent;
22
- static ERROR_FileTypeNotRecognized: number;
23
- static Error_FileTypeNotRecognized: (o: {
24
- filename: string;
25
- extensions: string;
26
- }) => import("@keymanapp/common-types").CompilerEvent;
27
- static ERROR_OutFileNotValidForProjects: number;
28
- static Error_OutFileNotValidForProjects: () => import("@keymanapp/common-types").CompilerEvent;
29
- static INFO_FileBuiltSuccessfully: number;
30
- static Info_FileBuiltSuccessfully: (o: {
31
- filename: string;
32
- relativeFilename: string;
33
- }) => {
34
- filename: string;
35
- line?: number;
36
- code: number;
37
- message: string;
38
- detail?: string;
39
- exceptionVar?: any;
40
- };
41
- static INFO_FileNotBuiltSuccessfully: number;
42
- static Info_FileNotBuiltSuccessfully: (o: {
43
- filename: string;
44
- relativeFilename: string;
45
- }) => {
46
- filename: string;
47
- line?: number;
48
- code: number;
49
- message: string;
50
- detail?: string;
51
- exceptionVar?: any;
52
- };
53
- static ERROR_InvalidProjectFile: number;
54
- static Error_InvalidProjectFile: (o: {
55
- message: string;
56
- }) => import("@keymanapp/common-types").CompilerEvent;
57
- static HINT_FilenameHasDifferingCase: number;
58
- static Hint_FilenameHasDifferingCase: (o: {
59
- reference: string;
60
- filename: string;
61
- }) => import("@keymanapp/common-types").CompilerEvent;
62
- static ERROR_UnknownFileFormat: number;
63
- static Error_UnknownFileFormat: (o: {
64
- format: string;
65
- }) => import("@keymanapp/common-types").CompilerEvent;
66
- static INFO_ProjectBuiltSuccessfully: number;
67
- static Info_ProjectBuiltSuccessfully: (o: {
68
- filename: string;
69
- relativeFilename: string;
70
- }) => {
71
- filename: string;
72
- line?: number;
73
- code: number;
74
- message: string;
75
- detail?: string;
76
- exceptionVar?: any;
77
- };
78
- static INFO_ProjectNotBuiltSuccessfully: number;
79
- static Info_ProjectNotBuiltSuccessfully: (o: {
80
- filename: string;
81
- relativeFilename: string;
82
- }) => {
83
- filename: string;
84
- line?: number;
85
- code: number;
86
- message: string;
87
- detail?: string;
88
- exceptionVar?: any;
89
- };
90
- static INFO_TooManyMessages: number;
91
- static Info_TooManyMessages: (o: {
92
- count: number;
93
- }) => import("@keymanapp/common-types").CompilerEvent;
94
- static ERROR_FileTypeNotFound: number;
95
- static Error_FileTypeNotFound: (o: {
96
- ext: string;
97
- }) => import("@keymanapp/common-types").CompilerEvent;
98
- static ERROR_NotAProjectFile: number;
99
- static Error_NotAProjectFile: (o: {
100
- filename: string;
101
- }) => import("@keymanapp/common-types").CompilerEvent;
102
- static INFO_WarningsHaveFailedBuild: number;
103
- static Info_WarningsHaveFailedBuild: () => import("@keymanapp/common-types").CompilerEvent;
104
- static ERROR_CannotCreateFolder: number;
105
- static Error_CannotCreateFolder: (o: {
106
- folderName: string;
107
- e: any;
108
- }) => import("@keymanapp/common-types").CompilerEvent;
109
- static ERROR_InvalidProjectFolder: number;
110
- static Error_InvalidProjectFolder: (o: {
111
- folderName: string;
112
- }) => import("@keymanapp/common-types").CompilerEvent;
113
- static ERROR_UnsupportedProjectVersion: number;
114
- static Error_UnsupportedProjectVersion: (o: {
115
- version: string;
116
- }) => import("@keymanapp/common-types").CompilerEvent;
117
- static HINT_ProjectIsVersion10: number;
118
- static Hint_ProjectIsVersion10: () => import("@keymanapp/common-types").CompilerEvent;
119
- static ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile: number;
120
- static Error_OutFileCanOnlyBeSpecifiedWithSingleInfile: () => import("@keymanapp/common-types").CompilerEvent;
121
- static ERROR_InvalidMessageFormat: number;
122
- static Error_InvalidMessageFormat: (o: {
123
- message: string;
124
- }) => import("@keymanapp/common-types").CompilerEvent;
125
- static ERROR_MessageNamespaceNotFound: number;
126
- static Error_MessageNamespaceNotFound: (o: {
127
- code: number;
128
- }) => import("@keymanapp/common-types").CompilerEvent;
129
- static ERROR_MessageCodeNotFound: number;
130
- static Error_MessageCodeNotFound: (o: {
131
- code: number;
132
- }) => import("@keymanapp/common-types").CompilerEvent;
133
- static ERROR_MessageCannotBeCoerced: number;
134
- static Error_MessageCannotBeCoerced: (o: {
135
- code: number;
136
- }) => import("@keymanapp/common-types").CompilerEvent;
137
- static ERROR_UnrecognizedMessageCode: number;
138
- static Error_UnrecognizedMessageCode: (o: {
139
- message: string;
140
- }) => import("@keymanapp/common-types").CompilerEvent;
141
- static ERROR_MustSpecifyMessageCode: number;
142
- static Error_MustSpecifyMessageCode: () => import("@keymanapp/common-types").CompilerEvent;
143
- static ERROR_MessagesCannotBeFilteredForMarkdownFormat: number;
144
- static Error_MessagesCannotBeFilteredForMarkdownFormat: () => import("@keymanapp/common-types").CompilerEvent;
145
- static ERROR_OutputPathMustBeSpecifiedForMarkdownFormat: number;
146
- static Error_OutputPathMustBeSpecifiedForMarkdownFormat: () => import("@keymanapp/common-types").CompilerEvent;
147
- static ERROR_OutputPathMustExistAndBeADirectory: number;
148
- static Error_OutputPathMustExistAndBeADirectory: (o: {
149
- outPath: string;
150
- }) => import("@keymanapp/common-types").CompilerEvent;
151
- }
1
+ export declare class InfrastructureMessages {
2
+ static FATAL_UnexpectedException: number;
3
+ static Fatal_UnexpectedException: (o: {
4
+ e: any;
5
+ }) => import("@keymanapp/common-types").CompilerEvent;
6
+ static INFO_BuildingFile: number;
7
+ static Info_BuildingFile: (o: {
8
+ filename: string;
9
+ relativeFilename: string;
10
+ }) => {
11
+ filename: string;
12
+ line?: number;
13
+ code: number;
14
+ message: string;
15
+ detail?: string;
16
+ exceptionVar?: any;
17
+ };
18
+ static ERROR_FileDoesNotExist: number;
19
+ static Error_FileDoesNotExist: (o: {
20
+ filename: string;
21
+ }) => import("@keymanapp/common-types").CompilerEvent;
22
+ static ERROR_FileTypeNotRecognized: number;
23
+ static Error_FileTypeNotRecognized: (o: {
24
+ filename: string;
25
+ extensions: string;
26
+ }) => import("@keymanapp/common-types").CompilerEvent;
27
+ static ERROR_OutFileNotValidForProjects: number;
28
+ static Error_OutFileNotValidForProjects: () => import("@keymanapp/common-types").CompilerEvent;
29
+ static INFO_FileBuiltSuccessfully: number;
30
+ static Info_FileBuiltSuccessfully: (o: {
31
+ filename: string;
32
+ relativeFilename: string;
33
+ }) => {
34
+ filename: string;
35
+ line?: number;
36
+ code: number;
37
+ message: string;
38
+ detail?: string;
39
+ exceptionVar?: any;
40
+ };
41
+ static INFO_FileNotBuiltSuccessfully: number;
42
+ static Info_FileNotBuiltSuccessfully: (o: {
43
+ filename: string;
44
+ relativeFilename: string;
45
+ }) => {
46
+ filename: string;
47
+ line?: number;
48
+ code: number;
49
+ message: string;
50
+ detail?: string;
51
+ exceptionVar?: any;
52
+ };
53
+ static ERROR_InvalidProjectFile: number;
54
+ static Error_InvalidProjectFile: (o: {
55
+ message: string;
56
+ }) => import("@keymanapp/common-types").CompilerEvent;
57
+ static HINT_FilenameHasDifferingCase: number;
58
+ static Hint_FilenameHasDifferingCase: (o: {
59
+ reference: string;
60
+ filename: string;
61
+ }) => import("@keymanapp/common-types").CompilerEvent;
62
+ static ERROR_UnknownFileFormat: number;
63
+ static Error_UnknownFileFormat: (o: {
64
+ format: string;
65
+ }) => import("@keymanapp/common-types").CompilerEvent;
66
+ static INFO_ProjectBuiltSuccessfully: number;
67
+ static Info_ProjectBuiltSuccessfully: (o: {
68
+ filename: string;
69
+ relativeFilename: string;
70
+ }) => {
71
+ filename: string;
72
+ line?: number;
73
+ code: number;
74
+ message: string;
75
+ detail?: string;
76
+ exceptionVar?: any;
77
+ };
78
+ static INFO_ProjectNotBuiltSuccessfully: number;
79
+ static Info_ProjectNotBuiltSuccessfully: (o: {
80
+ filename: string;
81
+ relativeFilename: string;
82
+ }) => {
83
+ filename: string;
84
+ line?: number;
85
+ code: number;
86
+ message: string;
87
+ detail?: string;
88
+ exceptionVar?: any;
89
+ };
90
+ static INFO_TooManyMessages: number;
91
+ static Info_TooManyMessages: (o: {
92
+ count: number;
93
+ }) => import("@keymanapp/common-types").CompilerEvent;
94
+ static ERROR_FileTypeNotFound: number;
95
+ static Error_FileTypeNotFound: (o: {
96
+ ext: string;
97
+ }) => import("@keymanapp/common-types").CompilerEvent;
98
+ static ERROR_NotAProjectFile: number;
99
+ static Error_NotAProjectFile: (o: {
100
+ filename: string;
101
+ }) => import("@keymanapp/common-types").CompilerEvent;
102
+ static INFO_WarningsHaveFailedBuild: number;
103
+ static Info_WarningsHaveFailedBuild: () => import("@keymanapp/common-types").CompilerEvent;
104
+ static ERROR_CannotCreateFolder: number;
105
+ static Error_CannotCreateFolder: (o: {
106
+ folderName: string;
107
+ e: any;
108
+ }) => import("@keymanapp/common-types").CompilerEvent;
109
+ static ERROR_InvalidProjectFolder: number;
110
+ static Error_InvalidProjectFolder: (o: {
111
+ folderName: string;
112
+ }) => import("@keymanapp/common-types").CompilerEvent;
113
+ static ERROR_UnsupportedProjectVersion: number;
114
+ static Error_UnsupportedProjectVersion: (o: {
115
+ version: string;
116
+ }) => import("@keymanapp/common-types").CompilerEvent;
117
+ static HINT_ProjectIsVersion10: number;
118
+ static Hint_ProjectIsVersion10: () => import("@keymanapp/common-types").CompilerEvent;
119
+ static ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile: number;
120
+ static Error_OutFileCanOnlyBeSpecifiedWithSingleInfile: () => import("@keymanapp/common-types").CompilerEvent;
121
+ static ERROR_InvalidMessageFormat: number;
122
+ static Error_InvalidMessageFormat: (o: {
123
+ message: string;
124
+ }) => import("@keymanapp/common-types").CompilerEvent;
125
+ static ERROR_MessageNamespaceNotFound: number;
126
+ static Error_MessageNamespaceNotFound: (o: {
127
+ code: number;
128
+ }) => import("@keymanapp/common-types").CompilerEvent;
129
+ static ERROR_MessageCodeNotFound: number;
130
+ static Error_MessageCodeNotFound: (o: {
131
+ code: number;
132
+ }) => import("@keymanapp/common-types").CompilerEvent;
133
+ static ERROR_MessageCannotBeCoerced: number;
134
+ static Error_MessageCannotBeCoerced: (o: {
135
+ code: number;
136
+ }) => import("@keymanapp/common-types").CompilerEvent;
137
+ static ERROR_UnrecognizedMessageCode: number;
138
+ static Error_UnrecognizedMessageCode: (o: {
139
+ message: string;
140
+ }) => import("@keymanapp/common-types").CompilerEvent;
141
+ static ERROR_MustSpecifyMessageCode: number;
142
+ static Error_MustSpecifyMessageCode: () => import("@keymanapp/common-types").CompilerEvent;
143
+ static ERROR_MessagesCannotBeFilteredForMarkdownFormat: number;
144
+ static Error_MessagesCannotBeFilteredForMarkdownFormat: () => import("@keymanapp/common-types").CompilerEvent;
145
+ static ERROR_OutputPathMustBeSpecifiedForMarkdownFormat: number;
146
+ static Error_OutputPathMustBeSpecifiedForMarkdownFormat: () => import("@keymanapp/common-types").CompilerEvent;
147
+ static ERROR_OutputPathMustExistAndBeADirectory: number;
148
+ static Error_OutputPathMustExistAndBeADirectory: (o: {
149
+ outPath: string;
150
+ }) => import("@keymanapp/common-types").CompilerEvent;
151
+ }
152
152
  //# sourceMappingURL=infrastructureMessages.d.ts.map
@@ -1,75 +1,75 @@
1
- import { CompilerError, CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
2
- const Namespace = CompilerErrorNamespace.Infrastructure;
3
- const SevInfo = CompilerErrorSeverity.Info | Namespace;
4
- const SevHint = CompilerErrorSeverity.Hint | Namespace;
5
- // const SevWarn = CompilerErrorSeverity.Warn | Namespace;
6
- const SevError = CompilerErrorSeverity.Error | Namespace;
7
- const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
8
- export class InfrastructureMessages {
9
- static FATAL_UnexpectedException = SevFatal | 0x0001;
10
- static Fatal_UnexpectedException = (o) => CompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error');
11
- // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
12
- static INFO_BuildingFile = SevInfo | 0x0002;
13
- static Info_BuildingFile = (o) => ({ filename: o.filename, ...m(this.INFO_BuildingFile, `Building ${def(o.relativeFilename)}`) });
14
- static ERROR_FileDoesNotExist = SevError | 0x0003;
15
- static Error_FileDoesNotExist = (o) => m(this.ERROR_FileDoesNotExist, `File ${def(o.filename)} does not exist`);
16
- static ERROR_FileTypeNotRecognized = SevError | 0x0004;
17
- static Error_FileTypeNotRecognized = (o) => m(this.ERROR_FileTypeNotRecognized, `Unrecognised input file ${def(o.filename)}, expecting ${def(o.extensions)}, or project folder`);
18
- static ERROR_OutFileNotValidForProjects = SevError | 0x0005;
19
- static Error_OutFileNotValidForProjects = () => m(this.ERROR_OutFileNotValidForProjects, `--out-file should not be specified for project builds`);
20
- // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
21
- static INFO_FileBuiltSuccessfully = SevInfo | 0x0006;
22
- static Info_FileBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_FileBuiltSuccessfully, `${def(o.relativeFilename)} built successfully.`) });
23
- // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
24
- static INFO_FileNotBuiltSuccessfully = SevInfo | 0x0007;
25
- static Info_FileNotBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_FileNotBuiltSuccessfully, `${def(o.relativeFilename)} failed to build.`) });
26
- static ERROR_InvalidProjectFile = SevError | 0x0008;
27
- static Error_InvalidProjectFile = (o) => m(this.ERROR_InvalidProjectFile, `Project file is not valid: ${def(o.message)}`);
28
- static HINT_FilenameHasDifferingCase = SevHint | 0x0009;
29
- static Hint_FilenameHasDifferingCase = (o) => m(this.HINT_FilenameHasDifferingCase, `File on disk '${def(o.filename)}' does not match case of '${def(o.reference)}' in source file; this is an error on platforms with case-sensitive filesystems.`);
30
- static ERROR_UnknownFileFormat = SevError | 0x000A;
31
- static Error_UnknownFileFormat = (o) => m(this.ERROR_UnknownFileFormat, `Unknown file format ${def(o.format)}; only Markdown (.md), JSON (.json), and Text (.txt) are supported.`);
32
- // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
33
- static INFO_ProjectBuiltSuccessfully = SevInfo | 0x000B;
34
- static Info_ProjectBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_ProjectBuiltSuccessfully, `Project ${def(o.relativeFilename)} built successfully.`) });
35
- // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
36
- static INFO_ProjectNotBuiltSuccessfully = SevInfo | 0x000C;
37
- static Info_ProjectNotBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_ProjectNotBuiltSuccessfully, `Project ${def(o.relativeFilename)} failed to build.`) });
38
- static INFO_TooManyMessages = SevInfo | 0x000D;
39
- static Info_TooManyMessages = (o) => m(this.INFO_TooManyMessages, `More than ${def(o.count)} warnings or errors received; suppressing further messages.`);
40
- static ERROR_FileTypeNotFound = SevError | 0x000E;
41
- static Error_FileTypeNotFound = (o) => m(this.ERROR_FileTypeNotFound, `A file of type ${def(o.ext)} was not found in the project.`);
42
- static ERROR_NotAProjectFile = SevError | 0x000F;
43
- static Error_NotAProjectFile = (o) => m(this.ERROR_NotAProjectFile, `File ${def(o.filename)} must have a .kpj extension to be treated as a project.`);
44
- static INFO_WarningsHaveFailedBuild = SevInfo | 0x0010;
45
- static Info_WarningsHaveFailedBuild = () => m(this.INFO_WarningsHaveFailedBuild, `The build failed because option "treat warnings as errors" is enabled and there are one or more warnings.`);
46
- static ERROR_CannotCreateFolder = SevError | 0x0011;
47
- static Error_CannotCreateFolder = (o) => CompilerMessageSpecWithException(this.ERROR_CannotCreateFolder, null, `Unable to create folder ${def(o.folderName)}: ${o.e ?? 'unknown error'}`);
48
- static ERROR_InvalidProjectFolder = SevError | 0x0012;
49
- static Error_InvalidProjectFolder = (o) => m(this.ERROR_InvalidProjectFolder, `The folder ${def(o.folderName)} does not appear to be a Keyman Developer project.`);
50
- static ERROR_UnsupportedProjectVersion = SevError | 0x0013;
51
- static Error_UnsupportedProjectVersion = (o) => m(this.ERROR_UnsupportedProjectVersion, `Project version ${def(o.version)} is not supported by this version of Keyman Developer.`);
52
- static HINT_ProjectIsVersion10 = SevHint | 0x0014;
53
- static Hint_ProjectIsVersion10 = () => m(this.HINT_ProjectIsVersion10, `The project file is an older version and can be upgraded to version 17.0`);
54
- static ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile = SevError | 0x0015;
55
- static Error_OutFileCanOnlyBeSpecifiedWithSingleInfile = () => m(this.ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile, `Parameter --out-file can only be used with a single input file.`);
56
- static ERROR_InvalidMessageFormat = SevError | 0x0016;
57
- static Error_InvalidMessageFormat = (o) => m(this.ERROR_InvalidMessageFormat, `Invalid parameter: --message ${def(o.message)} must match format '[KM]#####[:Disable|Info|Hint|Warn|Error]'`);
58
- static ERROR_MessageNamespaceNotFound = SevError | 0x0017;
59
- static Error_MessageNamespaceNotFound = (o) => m(this.ERROR_MessageNamespaceNotFound, `Invalid parameter: --message ${def(o.code ? CompilerError.formatCode(o.code) : undefined)} does not have a recognized namespace`);
60
- static ERROR_MessageCodeNotFound = SevError | 0x0018;
61
- static Error_MessageCodeNotFound = (o) => m(this.ERROR_MessageCodeNotFound, `Invalid parameter: --message ${o.code ? CompilerError.formatCode(o.code) : undefined} is not a recognized code`);
62
- static ERROR_MessageCannotBeCoerced = SevError | 0x0019;
63
- static Error_MessageCannotBeCoerced = (o) => m(this.ERROR_MessageCannotBeCoerced, `Invalid parameter: --message ${def(o.code ? CompilerError.formatCode(o.code) : undefined)} is not of type 'info', 'hint' or 'warn', and cannot be coerced`);
64
- static ERROR_UnrecognizedMessageCode = SevError | 0x001a;
65
- static Error_UnrecognizedMessageCode = (o) => m(this.ERROR_UnrecognizedMessageCode, `Invalid parameter: message identifier '${def(o.message)}' must match format '[KM]#####'`);
66
- static ERROR_MustSpecifyMessageCode = SevError | 0x001b;
67
- static Error_MustSpecifyMessageCode = () => m(this.ERROR_MustSpecifyMessageCode, `Must specify at least one message code or -a for all messages`);
68
- static ERROR_MessagesCannotBeFilteredForMarkdownFormat = SevError | 0x001c;
69
- static Error_MessagesCannotBeFilteredForMarkdownFormat = () => m(this.ERROR_MessagesCannotBeFilteredForMarkdownFormat, `Messages cannot be filtered for markdown format`);
70
- static ERROR_OutputPathMustBeSpecifiedForMarkdownFormat = SevError | 0x001d;
71
- static Error_OutputPathMustBeSpecifiedForMarkdownFormat = () => m(this.ERROR_OutputPathMustBeSpecifiedForMarkdownFormat, `Output path must be specified with -o for markdown output format`);
72
- static ERROR_OutputPathMustExistAndBeADirectory = SevError | 0x001e;
73
- static Error_OutputPathMustExistAndBeADirectory = (o) => m(this.ERROR_OutputPathMustExistAndBeADirectory, `Output path ${def(o.outPath)} must exist and must be a folder`);
74
- }
1
+ import { CompilerError, CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
2
+ const Namespace = CompilerErrorNamespace.Infrastructure;
3
+ const SevInfo = CompilerErrorSeverity.Info | Namespace;
4
+ const SevHint = CompilerErrorSeverity.Hint | Namespace;
5
+ // const SevWarn = CompilerErrorSeverity.Warn | Namespace;
6
+ const SevError = CompilerErrorSeverity.Error | Namespace;
7
+ const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
8
+ export class InfrastructureMessages {
9
+ static FATAL_UnexpectedException = SevFatal | 0x0001;
10
+ static Fatal_UnexpectedException = (o) => CompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error');
11
+ // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
12
+ static INFO_BuildingFile = SevInfo | 0x0002;
13
+ static Info_BuildingFile = (o) => ({ filename: o.filename, ...m(this.INFO_BuildingFile, `Building ${def(o.relativeFilename)}`) });
14
+ static ERROR_FileDoesNotExist = SevError | 0x0003;
15
+ static Error_FileDoesNotExist = (o) => m(this.ERROR_FileDoesNotExist, `File ${def(o.filename)} does not exist`);
16
+ static ERROR_FileTypeNotRecognized = SevError | 0x0004;
17
+ static Error_FileTypeNotRecognized = (o) => m(this.ERROR_FileTypeNotRecognized, `Unrecognised input file ${def(o.filename)}, expecting ${def(o.extensions)}, or project folder`);
18
+ static ERROR_OutFileNotValidForProjects = SevError | 0x0005;
19
+ static Error_OutFileNotValidForProjects = () => m(this.ERROR_OutFileNotValidForProjects, `--out-file should not be specified for project builds`);
20
+ // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
21
+ static INFO_FileBuiltSuccessfully = SevInfo | 0x0006;
22
+ static Info_FileBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_FileBuiltSuccessfully, `${def(o.relativeFilename)} built successfully.`) });
23
+ // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
24
+ static INFO_FileNotBuiltSuccessfully = SevInfo | 0x0007;
25
+ static Info_FileNotBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_FileNotBuiltSuccessfully, `${def(o.relativeFilename)} failed to build.`) });
26
+ static ERROR_InvalidProjectFile = SevError | 0x0008;
27
+ static Error_InvalidProjectFile = (o) => m(this.ERROR_InvalidProjectFile, `Project file is not valid: ${def(o.message)}`);
28
+ static HINT_FilenameHasDifferingCase = SevHint | 0x0009;
29
+ static Hint_FilenameHasDifferingCase = (o) => m(this.HINT_FilenameHasDifferingCase, `File on disk '${def(o.filename)}' does not match case of '${def(o.reference)}' in source file; this is an error on platforms with case-sensitive filesystems.`);
30
+ static ERROR_UnknownFileFormat = SevError | 0x000A;
31
+ static Error_UnknownFileFormat = (o) => m(this.ERROR_UnknownFileFormat, `Unknown file format ${def(o.format)}; only Markdown (.md), JSON (.json), and Text (.txt) are supported.`);
32
+ // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
33
+ static INFO_ProjectBuiltSuccessfully = SevInfo | 0x000B;
34
+ static Info_ProjectBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_ProjectBuiltSuccessfully, `Project ${def(o.relativeFilename)} built successfully.`) });
35
+ // For this message, we override the filename with the passed-in file. A bit of a hack but does the job
36
+ static INFO_ProjectNotBuiltSuccessfully = SevInfo | 0x000C;
37
+ static Info_ProjectNotBuiltSuccessfully = (o) => ({ filename: o.filename, ...m(this.INFO_ProjectNotBuiltSuccessfully, `Project ${def(o.relativeFilename)} failed to build.`) });
38
+ static INFO_TooManyMessages = SevInfo | 0x000D;
39
+ static Info_TooManyMessages = (o) => m(this.INFO_TooManyMessages, `More than ${def(o.count)} warnings or errors received; suppressing further messages.`);
40
+ static ERROR_FileTypeNotFound = SevError | 0x000E;
41
+ static Error_FileTypeNotFound = (o) => m(this.ERROR_FileTypeNotFound, `A file of type ${def(o.ext)} was not found in the project.`);
42
+ static ERROR_NotAProjectFile = SevError | 0x000F;
43
+ static Error_NotAProjectFile = (o) => m(this.ERROR_NotAProjectFile, `File ${def(o.filename)} must have a .kpj extension to be treated as a project.`);
44
+ static INFO_WarningsHaveFailedBuild = SevInfo | 0x0010;
45
+ static Info_WarningsHaveFailedBuild = () => m(this.INFO_WarningsHaveFailedBuild, `The build failed because option "treat warnings as errors" is enabled and there are one or more warnings.`);
46
+ static ERROR_CannotCreateFolder = SevError | 0x0011;
47
+ static Error_CannotCreateFolder = (o) => CompilerMessageSpecWithException(this.ERROR_CannotCreateFolder, null, `Unable to create folder ${def(o.folderName)}: ${o.e ?? 'unknown error'}`);
48
+ static ERROR_InvalidProjectFolder = SevError | 0x0012;
49
+ static Error_InvalidProjectFolder = (o) => m(this.ERROR_InvalidProjectFolder, `The folder ${def(o.folderName)} does not appear to be a Keyman Developer project.`);
50
+ static ERROR_UnsupportedProjectVersion = SevError | 0x0013;
51
+ static Error_UnsupportedProjectVersion = (o) => m(this.ERROR_UnsupportedProjectVersion, `Project version ${def(o.version)} is not supported by this version of Keyman Developer.`);
52
+ static HINT_ProjectIsVersion10 = SevHint | 0x0014;
53
+ static Hint_ProjectIsVersion10 = () => m(this.HINT_ProjectIsVersion10, `The project file is an older version and can be upgraded to version 17.0`);
54
+ static ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile = SevError | 0x0015;
55
+ static Error_OutFileCanOnlyBeSpecifiedWithSingleInfile = () => m(this.ERROR_OutFileCanOnlyBeSpecifiedWithSingleInfile, `Parameter --out-file can only be used with a single input file.`);
56
+ static ERROR_InvalidMessageFormat = SevError | 0x0016;
57
+ static Error_InvalidMessageFormat = (o) => m(this.ERROR_InvalidMessageFormat, `Invalid parameter: --message ${def(o.message)} must match format '[KM]#####[:Disable|Info|Hint|Warn|Error]'`);
58
+ static ERROR_MessageNamespaceNotFound = SevError | 0x0017;
59
+ static Error_MessageNamespaceNotFound = (o) => m(this.ERROR_MessageNamespaceNotFound, `Invalid parameter: --message ${def(o.code ? CompilerError.formatCode(o.code) : undefined)} does not have a recognized namespace`);
60
+ static ERROR_MessageCodeNotFound = SevError | 0x0018;
61
+ static Error_MessageCodeNotFound = (o) => m(this.ERROR_MessageCodeNotFound, `Invalid parameter: --message ${o.code ? CompilerError.formatCode(o.code) : undefined} is not a recognized code`);
62
+ static ERROR_MessageCannotBeCoerced = SevError | 0x0019;
63
+ static Error_MessageCannotBeCoerced = (o) => m(this.ERROR_MessageCannotBeCoerced, `Invalid parameter: --message ${def(o.code ? CompilerError.formatCode(o.code) : undefined)} is not of type 'info', 'hint' or 'warn', and cannot be coerced`);
64
+ static ERROR_UnrecognizedMessageCode = SevError | 0x001a;
65
+ static Error_UnrecognizedMessageCode = (o) => m(this.ERROR_UnrecognizedMessageCode, `Invalid parameter: message identifier '${def(o.message)}' must match format '[KM]#####'`);
66
+ static ERROR_MustSpecifyMessageCode = SevError | 0x001b;
67
+ static Error_MustSpecifyMessageCode = () => m(this.ERROR_MustSpecifyMessageCode, `Must specify at least one message code or -a for all messages`);
68
+ static ERROR_MessagesCannotBeFilteredForMarkdownFormat = SevError | 0x001c;
69
+ static Error_MessagesCannotBeFilteredForMarkdownFormat = () => m(this.ERROR_MessagesCannotBeFilteredForMarkdownFormat, `Messages cannot be filtered for markdown format`);
70
+ static ERROR_OutputPathMustBeSpecifiedForMarkdownFormat = SevError | 0x001d;
71
+ static Error_OutputPathMustBeSpecifiedForMarkdownFormat = () => m(this.ERROR_OutputPathMustBeSpecifiedForMarkdownFormat, `Output path must be specified with -o for markdown output format`);
72
+ static ERROR_OutputPathMustExistAndBeADirectory = SevError | 0x001e;
73
+ static Error_OutputPathMustExistAndBeADirectory = (o) => m(this.ERROR_OutputPathMustExistAndBeADirectory, `Output path ${def(o.outPath)} must exist and must be a folder`);
74
+ }
75
75
  //# sourceMappingURL=infrastructureMessages.js.map
@@ -1,8 +1,8 @@
1
- import { CompilerErrorNamespace } from '@keymanapp/common-types';
2
- export declare const messageNamespaceKeys: number[];
3
- export type CompilerMessageSource = {
4
- module: string;
5
- class: any;
6
- };
7
- export declare const messageSources: Record<CompilerErrorNamespace, CompilerMessageSource>;
1
+ import { CompilerErrorNamespace } from '@keymanapp/common-types';
2
+ export declare const messageNamespaceKeys: number[];
3
+ export type CompilerMessageSource = {
4
+ module: string;
5
+ class: any;
6
+ };
7
+ export declare const messageSources: Record<CompilerErrorNamespace, CompilerMessageSource>;
8
8
  //# sourceMappingURL=messageNamespaces.d.ts.map
@@ -1,39 +1,39 @@
1
- import { CommonTypesMessages, CompilerErrorNamespace } from '@keymanapp/common-types';
2
- import { AnalyzerMessages } from '@keymanapp/kmc-analyze';
3
- import { KeyboardInfoCompilerMessages } from '@keymanapp/kmc-keyboard-info';
4
- import { KmnCompilerMessages, KmwCompilerMessages } from '@keymanapp/kmc-kmn';
5
- import { LdmlKeyboardCompilerMessages } from '@keymanapp/kmc-ldml';
6
- import { ModelCompilerMessages } from '@keymanapp/kmc-model';
7
- import { ModelInfoCompilerMessages } from '@keymanapp/kmc-model-info';
8
- import { PackageCompilerMessages } from '@keymanapp/kmc-package';
9
- import { InfrastructureMessages } from './infrastructureMessages.js';
10
- // Maps every compiler error namespace to the corresponding implementation
11
- const messageNamespaces = {
12
- [CompilerErrorNamespace.LdmlKeyboardCompiler]: LdmlKeyboardCompilerMessages,
13
- [CompilerErrorNamespace.CommonTypes]: CommonTypesMessages,
14
- [CompilerErrorNamespace.KmnCompiler]: KmnCompilerMessages,
15
- [CompilerErrorNamespace.ModelCompiler]: ModelCompilerMessages,
16
- [CompilerErrorNamespace.PackageCompiler]: PackageCompilerMessages,
17
- [CompilerErrorNamespace.Infrastructure]: InfrastructureMessages,
18
- [CompilerErrorNamespace.Analyzer]: AnalyzerMessages,
19
- [CompilerErrorNamespace.KmwCompiler]: KmwCompilerMessages,
20
- [CompilerErrorNamespace.ModelInfoCompiler]: ModelInfoCompilerMessages,
21
- [CompilerErrorNamespace.KeyboardInfoCompiler]: KeyboardInfoCompilerMessages,
22
- };
23
- // This works around pain points in enumerating enum members in Typescript
24
- // ref https://www.totaltypescript.com/iterate-over-object-keys-in-typescript
25
- export const messageNamespaceKeys = Object.keys(messageNamespaces).map(v => Number.parseInt(v));
26
- // TODO: consolidate with messageNamespaces above
27
- export const messageSources = {
28
- [CompilerErrorNamespace.LdmlKeyboardCompiler]: { module: 'kmc-ldml', class: LdmlKeyboardCompilerMessages },
29
- [CompilerErrorNamespace.CommonTypes]: { module: 'common-types', class: CommonTypesMessages },
30
- [CompilerErrorNamespace.KmnCompiler]: { module: 'kmc-kmn', class: KmnCompilerMessages },
31
- [CompilerErrorNamespace.ModelCompiler]: { module: 'kmc-model', class: ModelCompilerMessages },
32
- [CompilerErrorNamespace.PackageCompiler]: { module: 'kmc-package', class: PackageCompilerMessages },
33
- [CompilerErrorNamespace.Infrastructure]: { module: 'kmc', class: InfrastructureMessages },
34
- [CompilerErrorNamespace.Analyzer]: { module: 'kmc-analyze', class: AnalyzerMessages },
35
- [CompilerErrorNamespace.KmwCompiler]: { module: 'kmc-kmn', class: KmwCompilerMessages },
36
- [CompilerErrorNamespace.ModelInfoCompiler]: { module: 'kmc-model-info', class: ModelInfoCompilerMessages },
37
- [CompilerErrorNamespace.KeyboardInfoCompiler]: { module: 'kmc-keyboard-info', class: KeyboardInfoCompilerMessages },
38
- };
1
+ import { CommonTypesMessages, CompilerErrorNamespace } from '@keymanapp/common-types';
2
+ import { AnalyzerMessages } from '@keymanapp/kmc-analyze';
3
+ import { KeyboardInfoCompilerMessages } from '@keymanapp/kmc-keyboard-info';
4
+ import { KmnCompilerMessages, KmwCompilerMessages } from '@keymanapp/kmc-kmn';
5
+ import { LdmlKeyboardCompilerMessages } from '@keymanapp/kmc-ldml';
6
+ import { ModelCompilerMessages } from '@keymanapp/kmc-model';
7
+ import { ModelInfoCompilerMessages } from '@keymanapp/kmc-model-info';
8
+ import { PackageCompilerMessages } from '@keymanapp/kmc-package';
9
+ import { InfrastructureMessages } from './infrastructureMessages.js';
10
+ // Maps every compiler error namespace to the corresponding implementation
11
+ const messageNamespaces = {
12
+ [CompilerErrorNamespace.LdmlKeyboardCompiler]: LdmlKeyboardCompilerMessages,
13
+ [CompilerErrorNamespace.CommonTypes]: CommonTypesMessages,
14
+ [CompilerErrorNamespace.KmnCompiler]: KmnCompilerMessages,
15
+ [CompilerErrorNamespace.ModelCompiler]: ModelCompilerMessages,
16
+ [CompilerErrorNamespace.PackageCompiler]: PackageCompilerMessages,
17
+ [CompilerErrorNamespace.Infrastructure]: InfrastructureMessages,
18
+ [CompilerErrorNamespace.Analyzer]: AnalyzerMessages,
19
+ [CompilerErrorNamespace.KmwCompiler]: KmwCompilerMessages,
20
+ [CompilerErrorNamespace.ModelInfoCompiler]: ModelInfoCompilerMessages,
21
+ [CompilerErrorNamespace.KeyboardInfoCompiler]: KeyboardInfoCompilerMessages,
22
+ };
23
+ // This works around pain points in enumerating enum members in Typescript
24
+ // ref https://www.totaltypescript.com/iterate-over-object-keys-in-typescript
25
+ export const messageNamespaceKeys = Object.keys(messageNamespaces).map(v => Number.parseInt(v));
26
+ // TODO: consolidate with messageNamespaces above
27
+ export const messageSources = {
28
+ [CompilerErrorNamespace.LdmlKeyboardCompiler]: { module: 'kmc-ldml', class: LdmlKeyboardCompilerMessages },
29
+ [CompilerErrorNamespace.CommonTypes]: { module: 'common-types', class: CommonTypesMessages },
30
+ [CompilerErrorNamespace.KmnCompiler]: { module: 'kmc-kmn', class: KmnCompilerMessages },
31
+ [CompilerErrorNamespace.ModelCompiler]: { module: 'kmc-model', class: ModelCompilerMessages },
32
+ [CompilerErrorNamespace.PackageCompiler]: { module: 'kmc-package', class: PackageCompilerMessages },
33
+ [CompilerErrorNamespace.Infrastructure]: { module: 'kmc', class: InfrastructureMessages },
34
+ [CompilerErrorNamespace.Analyzer]: { module: 'kmc-analyze', class: AnalyzerMessages },
35
+ [CompilerErrorNamespace.KmwCompiler]: { module: 'kmc-kmn', class: KmwCompilerMessages },
36
+ [CompilerErrorNamespace.ModelInfoCompiler]: { module: 'kmc-model-info', class: ModelInfoCompilerMessages },
37
+ [CompilerErrorNamespace.KeyboardInfoCompiler]: { module: 'kmc-keyboard-info', class: KeyboardInfoCompilerMessages },
38
+ };
39
39
  //# sourceMappingURL=messageNamespaces.js.map