@keymanapp/kmc-model-info 18.0.17-alpha → 18.0.19-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,5 +1,6 @@
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]="d16ceb69-2eb7-58fd-8883-8eb9c35af085")}catch(e){}}();
2
- export { ModelInfoSources, ModelInfoCompiler } from './model-info-compiler.js';
3
- export { ModelInfoCompilerMessages } from './model-info-compiler-messages.js';
4
- //# debugId=d16ceb69-2eb7-58fd-8883-8eb9c35af085
1
+
2
+ !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]="e8aadc91-fccc-5f75-a188-425f385ac749")}catch(e){}}();
3
+ export { ModelInfoSources, ModelInfoCompiler } from './model-info-compiler.js';
4
+ export { ModelInfoCompilerMessages } from './model-info-compiler-messages.js';
5
5
  //# sourceMappingURL=index.js.map
6
+ //# debugId=e8aadc91-fccc-5f75-a188-425f385ac749
@@ -1 +1 @@
1
- {"debug_id":"d16ceb69-2eb7-58fd-8883-8eb9c35af085","file":"index.js","mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAiF,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9J,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC","names":[],"sourceRoot":"","sources":["../../src/index.ts"],"version":3}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAiF,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9J,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC","debug_id":"e8aadc91-fccc-5f75-a188-425f385ac749"}
@@ -1,4 +1,5 @@
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]="4e395607-c79d-5c87-a45e-53071ac96436")}catch(e){}}();
2
- export const minKeymanVersion = '12.0';
3
- //# debugId=4e395607-c79d-5c87-a45e-53071ac96436
1
+
2
+ !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]="3eeebeae-6b50-50bd-86e1-c2d19a89d42c")}catch(e){}}();
3
+ export const minKeymanVersion = '12.0';
4
4
  //# sourceMappingURL=min-keyman-version.js.map
5
+ //# debugId=3eeebeae-6b50-50bd-86e1-c2d19a89d42c
@@ -1 +1 @@
1
- {"debug_id":"4e395607-c79d-5c87-a45e-53071ac96436","file":"min-keyman-version.js","mappings":";AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC","names":[],"sourceRoot":"","sources":["../../src/min-keyman-version.ts"],"version":3}
1
+ {"version":3,"file":"min-keyman-version.js","sources":["../../src/min-keyman-version.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC","debug_id":"3eeebeae-6b50-50bd-86e1-c2d19a89d42c"}
@@ -1,33 +1,34 @@
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]="d9cea1f9-b8d3-5503-8238-b8a3eba7c24f")}catch(e){}}();
2
- import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
3
- const Namespace = CompilerErrorNamespace.ModelInfoCompiler;
4
- // const SevInfo = CompilerErrorSeverity.Info | Namespace;
5
- // const SevHint = CompilerErrorSeverity.Hint | Namespace;
6
- const SevWarn = CompilerErrorSeverity.Warn | Namespace;
7
- const SevError = CompilerErrorSeverity.Error | Namespace;
8
- const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
9
- /**
10
- * @internal
11
- */
12
- export class ModelInfoCompilerMessages {
13
- static FATAL_UnexpectedException = SevFatal | 0x0001;
14
- static Fatal_UnexpectedException = (o) => CompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error');
15
- static ERROR_FileDoesNotExist = SevError | 0x0002;
16
- static Error_FileDoesNotExist = (o) => m(this.ERROR_FileDoesNotExist, `File ${def(o.filename)} does not exist.`);
17
- static ERROR_FileIsNotValid = SevError | 0x0003;
18
- static Error_FileIsNotValid = (o) => m(this.ERROR_FileIsNotValid, `File ${def(o.filename)} could not be parsed: ${(o.e ?? 'unknown error').toString()}.`);
19
- static WARN_MetadataFieldInconsistent = SevWarn | 0x0004;
20
- static Warn_MetadataFieldInconsistent = (o) => m(this.WARN_MetadataFieldInconsistent, `Warning: field ${def(o.field)} value "${def(o.value)}" does not match "${def(o.expected)}" found in source file metadata.`);
21
- static ERROR_InvalidAuthorEmail = SevError | 0x0005;
22
- static Error_InvalidAuthorEmail = (o) => m(this.ERROR_InvalidAuthorEmail, `Invalid author email: ${def(o.email)}`);
23
- static ERROR_LicenseFileIsMissing = SevError | 0x0006;
24
- static Error_LicenseFileIsMissing = (o) => m(this.ERROR_LicenseFileIsMissing, `License file ${def(o.filename)} does not exist.`);
25
- static ERROR_LicenseFileIsDamaged = SevError | 0x0007;
26
- static Error_LicenseFileIsDamaged = (o) => m(this.ERROR_LicenseFileIsDamaged, `License file ${def(o.filename)} could not be loaded or decoded.`);
27
- static ERROR_LicenseIsNotValid = SevError | 0x0008;
28
- static Error_LicenseIsNotValid = (o) => m(this.ERROR_LicenseIsNotValid, `An error was encountered parsing license file ${def(o.filename)}: ${def(o.message)}.`);
29
- static ERROR_NoLicenseFound = SevError | 0x0009;
30
- static Error_NoLicenseFound = () => m(this.ERROR_NoLicenseFound, `No license for the model was found. MIT license is required for publication to Keyman lexical-models repository.`);
31
- }
32
- //# debugId=d9cea1f9-b8d3-5503-8238-b8a3eba7c24f
1
+
2
+ !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]="002e68f2-db80-5297-a18a-e54b82c99814")}catch(e){}}();
3
+ import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/common-types";
4
+ const Namespace = CompilerErrorNamespace.ModelInfoCompiler;
5
+ // const SevInfo = CompilerErrorSeverity.Info | Namespace;
6
+ // const SevHint = CompilerErrorSeverity.Hint | Namespace;
7
+ const SevWarn = CompilerErrorSeverity.Warn | Namespace;
8
+ const SevError = CompilerErrorSeverity.Error | Namespace;
9
+ const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
10
+ /**
11
+ * @internal
12
+ */
13
+ export class ModelInfoCompilerMessages {
14
+ static FATAL_UnexpectedException = SevFatal | 0x0001;
15
+ static Fatal_UnexpectedException = (o) => CompilerMessageSpecWithException(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error');
16
+ static ERROR_FileDoesNotExist = SevError | 0x0002;
17
+ static Error_FileDoesNotExist = (o) => m(this.ERROR_FileDoesNotExist, `File ${def(o.filename)} does not exist.`);
18
+ static ERROR_FileIsNotValid = SevError | 0x0003;
19
+ static Error_FileIsNotValid = (o) => m(this.ERROR_FileIsNotValid, `File ${def(o.filename)} could not be parsed: ${(o.e ?? 'unknown error').toString()}.`);
20
+ static WARN_MetadataFieldInconsistent = SevWarn | 0x0004;
21
+ static Warn_MetadataFieldInconsistent = (o) => m(this.WARN_MetadataFieldInconsistent, `Warning: field ${def(o.field)} value "${def(o.value)}" does not match "${def(o.expected)}" found in source file metadata.`);
22
+ static ERROR_InvalidAuthorEmail = SevError | 0x0005;
23
+ static Error_InvalidAuthorEmail = (o) => m(this.ERROR_InvalidAuthorEmail, `Invalid author email: ${def(o.email)}`);
24
+ static ERROR_LicenseFileIsMissing = SevError | 0x0006;
25
+ static Error_LicenseFileIsMissing = (o) => m(this.ERROR_LicenseFileIsMissing, `License file ${def(o.filename)} does not exist.`);
26
+ static ERROR_LicenseFileIsDamaged = SevError | 0x0007;
27
+ static Error_LicenseFileIsDamaged = (o) => m(this.ERROR_LicenseFileIsDamaged, `License file ${def(o.filename)} could not be loaded or decoded.`);
28
+ static ERROR_LicenseIsNotValid = SevError | 0x0008;
29
+ static Error_LicenseIsNotValid = (o) => m(this.ERROR_LicenseIsNotValid, `An error was encountered parsing license file ${def(o.filename)}: ${def(o.message)}.`);
30
+ static ERROR_NoLicenseFound = SevError | 0x0009;
31
+ static Error_NoLicenseFound = () => m(this.ERROR_NoLicenseFound, `No license for the model was found. MIT license is required for publication to Keyman lexical-models repository.`);
32
+ }
33
33
  //# sourceMappingURL=model-info-compiler-messages.js.map
34
+ //# debugId=002e68f2-db80-5297-a18a-e54b82c99814
@@ -1 +1 @@
1
- {"debug_id":"d9cea1f9-b8d3-5503-8238-b8a3eba7c24f","file":"model-info-compiler-messages.js","mappings":";AAAA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,IAAI,CAAC,EAAE,kBAAkB,IAAI,GAAG,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAE/K,MAAM,SAAS,GAAG,sBAAsB,CAAC,iBAAiB,CAAC;AAC3D,0DAA0D;AAC1D,0DAA0D;AAC1D,MAAM,OAAO,GAAG,qBAAqB,CAAC,IAAI,GAAG,SAAS,CAAC;AACvD,MAAM,QAAQ,GAAG,qBAAqB,CAAC,KAAK,GAAG,SAAS,CAAC;AACzD,MAAM,QAAQ,GAAG,qBAAqB,CA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,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,EACrF,yBAAyB,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE3C,MAAM,CAAC,0BAA0B,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtD,MAAM,CAAC,0BAA0B,GAAG,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,EAC5F,gBAAgB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAErD,MAAM,CAAC,0BAA0B,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtD,MAAM,CAAC,0BAA0B,GAAG,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,EAC5F,gBAAgB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC,CAAC;IAErE,MAAM,CAAC,uBAAuB,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnD,MAAM,CAAC,uBAAuB,GAAG,CAAC,CAAkC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,EACrG,iDAAiD,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAE1F,MAAM,CAAC,oBAAoB,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,MAAM,CAAC,oBAAoB,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAC7D,kHAAkH,CAAC,CAAC","names":[],"sourceRoot":"","sources":["../../src/model-info-compiler-messages.ts"],"version":3}
1
+ {"version":3,"file":"model-info-compiler-messages.js","sources":["../../src/model-info-compiler-messages.ts"],"sourceRoot":"","names":[],"mappings":";;AAAA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,IAAI,CAAC,EAAE,kBAAkB,IAAI,GAAG,E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C,CAAC,IAAI,CAAC,oBAAoB,EAC7D,kHAAkH,CAAC,CAAC","debug_id":"002e68f2-db80-5297-a18a-e54b82c99814"}
@@ -1,234 +1,235 @@
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]="c1f01084-58ba-5447-93df-d09b57dafddd")}catch(e){}}();
2
- /**
3
- * Builds a source .model_info file with metadata extracted from .kps file and
4
- * compiled files to produce a comprehensive .model_info file.
5
- */
6
- import { minKeymanVersion } from "./min-keyman-version.js";
7
- import { ModelInfoCompilerMessages } from "./model-info-compiler-messages.js";
8
- import { KeymanUrls, validateMITLicense } from "@keymanapp/developer-utils";
9
- /* c8 ignore start */
10
- /**
11
- * @public
12
- * Description of sources and metadata required to build a .model_info file
13
- */
14
- export class ModelInfoSources {
15
- /** The identifier for the model */
16
- model_id;
17
- /** The data from the .kps file, transformed to kmp.json */
18
- kmpJsonData;
19
- /** The path in the keymanapp/lexical-models repo where this model may be found */
20
- sourcePath;
21
- /** The compiled model filename and relative path (.js) */
22
- modelFileName;
23
- /** The compiled package filename and relative path (.kmp) */
24
- kmpFileName;
25
- /** The source package filename and relative path (.kps) */
26
- kpsFilename;
27
- /** Last modification date for files in the project folder 'YYYY-MM-DDThh:mm:ssZ' */
28
- lastCommitDate;
29
- /** Return an error if project does not meet requirements of lexical-models repository */
30
- forPublishing;
31
- }
32
- ;
33
- ;
34
- ;
35
- ;
36
- /**
37
- * @public
38
- * Compiles source data from a lexical model project to a .model_info. The
39
- * compiler does not read or write from filesystem or network directly, but
40
- * relies on callbacks for all external IO.
41
- */
42
- export class ModelInfoCompiler {
43
- callbacks;
44
- options;
45
- constructor() {
46
- }
47
- /**
48
- * Initialize the compiler.
49
- * Copies options.
50
- * @param callbacks - Callbacks for external interfaces, including message
51
- * reporting and file io
52
- * @param options - Compiler options
53
- * @returns false if initialization fails
54
- */
55
- async init(callbacks, options) {
56
- this.callbacks = callbacks;
57
- this.options = { ...options };
58
- return true;
59
- }
60
- /**
61
- * Builds .model_info file with metadata from the model and package source
62
- * file. Returns an object containing binary artifacts on success. The files
63
- * are passed in by name, and the compiler will use callbacks as passed to the
64
- * {@link ModelInfoCompiler.init} function to read any input files by disk.
65
- *
66
- * This function is intended for use within the lexical-models repository.
67
- * While many of the parameters could be deduced from each other, they are
68
- * specified here to reduce the number of places the filenames are
69
- * constructed.
70
- *
71
- * @param infile - Path to source file. Path will be parsed to find relative
72
- * references in the .kpj file, such as .model.ts or
73
- * .model.kps file
74
- * @param outfile - Path to output file. The file will not be written to, but
75
- * will be included in the result for use by
76
- * {@link ModelInfoCompiler.write}.
77
- * @returns Binary artifacts on success, null on failure.
78
- *
79
- * @param sources - Details on files from which to extract additional metadata
80
- */
81
- async run(inputFilename, outputFilename) {
82
- const sources = this.options.sources;
83
- /*
84
- * Model info looks like this:
85
- *
86
- * {
87
- * "name": "Example Template Model"
88
- * "license": "mit",
89
- * "version": "1.0.0",
90
- * "languages": ["en"],
91
- * "authorName": "Example Author",
92
- * "authorEmail": "nobody@example.com",
93
- * "description": "Example wordlist model"
94
- * }
95
- *
96
- * For full documentation, see:
97
- * https://help.keyman.com/developer/cloud/model_info/1.0/
98
- */
99
- let jsFile = null;
100
- if (sources.modelFileName) {
101
- jsFile = this.loadJsFile(sources.modelFileName);
102
- if (!jsFile) {
103
- return null;
104
- }
105
- }
106
- let model_info = {
107
- languages: [],
108
- };
109
- //
110
- // Build .model_info file -- some fields have "special" behaviours -- see below
111
- // https://api.keyman.com/schemas/model_info.source.json and
112
- // https://api.keyman.com/schemas/model_info.distribution.json
113
- // https://help.keyman.com/developer/cloud/model_info/1.0
114
- //
115
- model_info.id = sources.model_id;
116
- model_info.name = sources.kmpJsonData.info.name.description;
117
- // License
118
- if (!sources.kmpJsonData.options?.licenseFile) {
119
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_NoLicenseFound());
120
- return null;
121
- }
122
- if (!this.isLicenseMIT(this.callbacks.resolveFilename(sources.kpsFilename, sources.kmpJsonData.options.licenseFile))) {
123
- return null;
124
- }
125
- model_info.license = 'mit';
126
- const author = sources.kmpJsonData.info.author;
127
- model_info.authorName = author?.description ?? '';
128
- if (author?.url) {
129
- // we strip the mailto: from the .kps file for the .model_info
130
- const match = author.url.match(/^(mailto\:)?(.+)$/);
131
- /* c8 ignore next 3 */
132
- if (match === null) {
133
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_InvalidAuthorEmail({ email: author.url }));
134
- return null;
135
- }
136
- model_info.authorEmail = match[2];
137
- }
138
- // description
139
- if (sources.kmpJsonData.info.description?.description) {
140
- model_info.description = sources.kmpJsonData.info.description.description.trim();
141
- }
142
- // isRTL -- this is a little bit of a heuristic from a compiled .js
143
- // which may need modification if compilers change
144
- if (jsFile?.match(/("?)isRTL("?):\s*true/)) {
145
- model_info.isRTL = true;
146
- }
147
- // extract the language identifiers from the language metadata
148
- // arrays for each of the lexical models in the kmp.json file,
149
- // and merge into a single array of identifiers in the
150
- // .model_info file.
151
- model_info.languages = sources.kmpJsonData.lexicalModels.reduce((a, e) => [].concat(a, e.languages.map((f) => f.id)), []);
152
- // If a last commit date is not given, then just use the current time
153
- model_info.lastModifiedDate = sources.lastCommitDate ?? (new Date).toISOString();
154
- model_info.packageFilename = this.callbacks.path.basename(sources.kmpFileName);
155
- model_info.packageFileSize = this.callbacks.fileSize(sources.kmpFileName);
156
- if (model_info.packageFileSize === undefined) {
157
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename: sources.kmpFileName }));
158
- return null;
159
- }
160
- model_info.jsFilename = this.callbacks.path.basename(sources.modelFileName);
161
- model_info.jsFileSize = this.callbacks.fileSize(sources.modelFileName);
162
- if (model_info.jsFileSize === undefined) {
163
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename: sources.modelFileName }));
164
- return null;
165
- }
166
- model_info.packageIncludes = sources.kmpJsonData.files.filter((e) => !!e.name.match(/.[ot]tf$/i)).length ? ['fonts'] : [];
167
- model_info.version = sources.kmpJsonData.info.version.description;
168
- model_info.minKeymanVersion = minKeymanVersion;
169
- model_info.helpLink = KeymanUrls.HELP_MODEL(model_info.id);
170
- if (sources.sourcePath) {
171
- model_info.sourcePath = sources.sourcePath;
172
- }
173
- const jsonOutput = JSON.stringify(model_info, null, 2);
174
- const data = new TextEncoder().encode(jsonOutput);
175
- const result = {
176
- artifacts: {
177
- model_info: {
178
- data,
179
- filename: outputFilename ?? inputFilename.replace(/\.kpj$/, '.model_info')
180
- }
181
- }
182
- };
183
- return result;
184
- }
185
- /**
186
- * Write artifacts from a successful compile to disk, via callbacks methods.
187
- * The artifacts written may include:
188
- *
189
- * - .model_info file - metadata file used by keyman.com
190
- *
191
- * @param artifacts - object containing artifact binary data to write out
192
- * @returns true on success
193
- */
194
- async write(artifacts) {
195
- this.callbacks.fs.writeFileSync(artifacts.model_info.filename, artifacts.model_info.data);
196
- return true;
197
- }
198
- isLicenseMIT(filename) {
199
- const data = this.callbacks.loadFile(filename);
200
- if (!data) {
201
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsMissing({ filename }));
202
- return false;
203
- }
204
- let license = null;
205
- try {
206
- license = new TextDecoder().decode(data);
207
- }
208
- catch (e) {
209
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsDamaged({ filename }));
210
- return false;
211
- }
212
- if (!license) {
213
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsDamaged({ filename }));
214
- return false;
215
- }
216
- const message = validateMITLicense(license);
217
- if (message != null) {
218
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseIsNotValid({ filename, message }));
219
- return false;
220
- }
221
- return true;
222
- }
223
- loadJsFile(filename) {
224
- const data = this.callbacks.loadFile(filename);
225
- if (!data) {
226
- this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename }));
227
- return null;
228
- }
229
- const text = new TextDecoder('utf-8', { fatal: true }).decode(data);
230
- return text;
231
- }
232
- }
233
- //# debugId=c1f01084-58ba-5447-93df-d09b57dafddd
1
+ /**
2
+ * Builds a source .model_info file with metadata extracted from .kps file and
3
+ * compiled files to produce a comprehensive .model_info file.
4
+ */
5
+
6
+ !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]="4d908771-d902-523f-90aa-7d5f79acdb2c")}catch(e){}}();
7
+ import { minKeymanVersion } from "./min-keyman-version.js";
8
+ import { ModelInfoCompilerMessages } from "./model-info-compiler-messages.js";
9
+ import { KeymanUrls, validateMITLicense } from "@keymanapp/developer-utils";
10
+ /* c8 ignore start */
11
+ /**
12
+ * @public
13
+ * Description of sources and metadata required to build a .model_info file
14
+ */
15
+ export class ModelInfoSources {
16
+ /** The identifier for the model */
17
+ model_id;
18
+ /** The data from the .kps file, transformed to kmp.json */
19
+ kmpJsonData;
20
+ /** The path in the keymanapp/lexical-models repo where this model may be found */
21
+ sourcePath;
22
+ /** The compiled model filename and relative path (.js) */
23
+ modelFileName;
24
+ /** The compiled package filename and relative path (.kmp) */
25
+ kmpFileName;
26
+ /** The source package filename and relative path (.kps) */
27
+ kpsFilename;
28
+ /** Last modification date for files in the project folder 'YYYY-MM-DDThh:mm:ssZ' */
29
+ lastCommitDate;
30
+ /** Return an error if project does not meet requirements of lexical-models repository */
31
+ forPublishing;
32
+ }
33
+ ;
34
+ ;
35
+ ;
36
+ ;
37
+ /**
38
+ * @public
39
+ * Compiles source data from a lexical model project to a .model_info. The
40
+ * compiler does not read or write from filesystem or network directly, but
41
+ * relies on callbacks for all external IO.
42
+ */
43
+ export class ModelInfoCompiler {
44
+ callbacks;
45
+ options;
46
+ constructor() {
47
+ }
48
+ /**
49
+ * Initialize the compiler.
50
+ * Copies options.
51
+ * @param callbacks - Callbacks for external interfaces, including message
52
+ * reporting and file io
53
+ * @param options - Compiler options
54
+ * @returns false if initialization fails
55
+ */
56
+ async init(callbacks, options) {
57
+ this.callbacks = callbacks;
58
+ this.options = { ...options };
59
+ return true;
60
+ }
61
+ /**
62
+ * Builds .model_info file with metadata from the model and package source
63
+ * file. Returns an object containing binary artifacts on success. The files
64
+ * are passed in by name, and the compiler will use callbacks as passed to the
65
+ * {@link ModelInfoCompiler.init} function to read any input files by disk.
66
+ *
67
+ * This function is intended for use within the lexical-models repository.
68
+ * While many of the parameters could be deduced from each other, they are
69
+ * specified here to reduce the number of places the filenames are
70
+ * constructed.
71
+ *
72
+ * @param infile - Path to source file. Path will be parsed to find relative
73
+ * references in the .kpj file, such as .model.ts or
74
+ * .model.kps file
75
+ * @param outfile - Path to output file. The file will not be written to, but
76
+ * will be included in the result for use by
77
+ * {@link ModelInfoCompiler.write}.
78
+ * @returns Binary artifacts on success, null on failure.
79
+ *
80
+ * @param sources - Details on files from which to extract additional metadata
81
+ */
82
+ async run(inputFilename, outputFilename) {
83
+ const sources = this.options.sources;
84
+ /*
85
+ * Model info looks like this:
86
+ *
87
+ * {
88
+ * "name": "Example Template Model"
89
+ * "license": "mit",
90
+ * "version": "1.0.0",
91
+ * "languages": ["en"],
92
+ * "authorName": "Example Author",
93
+ * "authorEmail": "nobody@example.com",
94
+ * "description": "Example wordlist model"
95
+ * }
96
+ *
97
+ * For full documentation, see:
98
+ * https://help.keyman.com/developer/cloud/model_info/1.0/
99
+ */
100
+ let jsFile = null;
101
+ if (sources.modelFileName) {
102
+ jsFile = this.loadJsFile(sources.modelFileName);
103
+ if (!jsFile) {
104
+ return null;
105
+ }
106
+ }
107
+ let model_info = {
108
+ languages: [],
109
+ };
110
+ //
111
+ // Build .model_info file -- some fields have "special" behaviours -- see below
112
+ // https://api.keyman.com/schemas/model_info.source.json and
113
+ // https://api.keyman.com/schemas/model_info.distribution.json
114
+ // https://help.keyman.com/developer/cloud/model_info/1.0
115
+ //
116
+ model_info.id = sources.model_id;
117
+ model_info.name = sources.kmpJsonData.info.name.description;
118
+ // License
119
+ if (!sources.kmpJsonData.options?.licenseFile) {
120
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_NoLicenseFound());
121
+ return null;
122
+ }
123
+ if (!this.isLicenseMIT(this.callbacks.resolveFilename(sources.kpsFilename, sources.kmpJsonData.options.licenseFile))) {
124
+ return null;
125
+ }
126
+ model_info.license = 'mit';
127
+ const author = sources.kmpJsonData.info.author;
128
+ model_info.authorName = author?.description ?? '';
129
+ if (author?.url) {
130
+ // we strip the mailto: from the .kps file for the .model_info
131
+ const match = author.url.match(/^(mailto\:)?(.+)$/);
132
+ /* c8 ignore next 3 */
133
+ if (match === null) {
134
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_InvalidAuthorEmail({ email: author.url }));
135
+ return null;
136
+ }
137
+ model_info.authorEmail = match[2];
138
+ }
139
+ // description
140
+ if (sources.kmpJsonData.info.description?.description) {
141
+ model_info.description = sources.kmpJsonData.info.description.description.trim();
142
+ }
143
+ // isRTL -- this is a little bit of a heuristic from a compiled .js
144
+ // which may need modification if compilers change
145
+ if (jsFile?.match(/("?)isRTL("?):\s*true/)) {
146
+ model_info.isRTL = true;
147
+ }
148
+ // extract the language identifiers from the language metadata
149
+ // arrays for each of the lexical models in the kmp.json file,
150
+ // and merge into a single array of identifiers in the
151
+ // .model_info file.
152
+ model_info.languages = sources.kmpJsonData.lexicalModels.reduce((a, e) => [].concat(a, e.languages.map((f) => f.id)), []);
153
+ // If a last commit date is not given, then just use the current time
154
+ model_info.lastModifiedDate = sources.lastCommitDate ?? (new Date).toISOString();
155
+ model_info.packageFilename = this.callbacks.path.basename(sources.kmpFileName);
156
+ model_info.packageFileSize = this.callbacks.fileSize(sources.kmpFileName);
157
+ if (model_info.packageFileSize === undefined) {
158
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename: sources.kmpFileName }));
159
+ return null;
160
+ }
161
+ model_info.jsFilename = this.callbacks.path.basename(sources.modelFileName);
162
+ model_info.jsFileSize = this.callbacks.fileSize(sources.modelFileName);
163
+ if (model_info.jsFileSize === undefined) {
164
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename: sources.modelFileName }));
165
+ return null;
166
+ }
167
+ model_info.packageIncludes = sources.kmpJsonData.files.filter((e) => !!e.name.match(/.[ot]tf$/i)).length ? ['fonts'] : [];
168
+ model_info.version = sources.kmpJsonData.info.version.description;
169
+ model_info.minKeymanVersion = minKeymanVersion;
170
+ model_info.helpLink = KeymanUrls.HELP_MODEL(model_info.id);
171
+ if (sources.sourcePath) {
172
+ model_info.sourcePath = sources.sourcePath;
173
+ }
174
+ const jsonOutput = JSON.stringify(model_info, null, 2);
175
+ const data = new TextEncoder().encode(jsonOutput);
176
+ const result = {
177
+ artifacts: {
178
+ model_info: {
179
+ data,
180
+ filename: outputFilename ?? inputFilename.replace(/\.kpj$/, '.model_info')
181
+ }
182
+ }
183
+ };
184
+ return result;
185
+ }
186
+ /**
187
+ * Write artifacts from a successful compile to disk, via callbacks methods.
188
+ * The artifacts written may include:
189
+ *
190
+ * - .model_info file - metadata file used by keyman.com
191
+ *
192
+ * @param artifacts - object containing artifact binary data to write out
193
+ * @returns true on success
194
+ */
195
+ async write(artifacts) {
196
+ this.callbacks.fs.writeFileSync(artifacts.model_info.filename, artifacts.model_info.data);
197
+ return true;
198
+ }
199
+ isLicenseMIT(filename) {
200
+ const data = this.callbacks.loadFile(filename);
201
+ if (!data) {
202
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsMissing({ filename }));
203
+ return false;
204
+ }
205
+ let license = null;
206
+ try {
207
+ license = new TextDecoder().decode(data);
208
+ }
209
+ catch (e) {
210
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsDamaged({ filename }));
211
+ return false;
212
+ }
213
+ if (!license) {
214
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseFileIsDamaged({ filename }));
215
+ return false;
216
+ }
217
+ const message = validateMITLicense(license);
218
+ if (message != null) {
219
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_LicenseIsNotValid({ filename, message }));
220
+ return false;
221
+ }
222
+ return true;
223
+ }
224
+ loadJsFile(filename) {
225
+ const data = this.callbacks.loadFile(filename);
226
+ if (!data) {
227
+ this.callbacks.reportMessage(ModelInfoCompilerMessages.Error_FileDoesNotExist({ filename }));
228
+ return null;
229
+ }
230
+ const text = new TextDecoder('utf-8', { fatal: true }).decode(data);
231
+ return text;
232
+ }
233
+ }
234
234
  //# sourceMappingURL=model-info-compiler.js.map
235
+ //# debugId=4d908771-d902-523f-90aa-7d5f79acdb2c
@@ -1 +1 @@
1
- {"debug_id":"c1f01084-58ba-5447-93df-d09b57dafddd","file":"model-info-compiler.js","mappings":";AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE5E,qBAAqB;AACrB;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAC3B,mCAAmC;IACnC,QAAQ,CAAS;IAEjB,2DAA2D;IAC3D,WAAW,CAA0B;IAErC,kFAAkF;IAClF,UAAU,CAAS;IAEnB,0DAA0D;IAC1D,aAAa,CAAS;IAEtB,6DAA6D;IAC7D,WAAW,CAAS;IAEpB,2DAA2D;IAC3D,WAAW,CAAS;IAEpB,oFAAoF;IACpF,cAAc,CAAU;IAExB,yFAAyF;IACzF,aAAa,CAAU;CACxB;AAAA,CAAC;AAYD,CAAC;AAWD,CAAC;AAYD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IACpB,SAAS,CAAoB;IAC7B,OAAO,CAA2B;IAE1C;IACA,CAAC;IAED;;;;;;;OAOG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AC,OAAO,CAAC,CAAC;QAC5C,IAAG,OAAO,IAAI,IAAI,EAAE;YAClB,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,uBAAuB,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;YACrG,OAAO,KAAK,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,UAAU,CAAC,QAAgB;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAG,CAAC,IAAI,EAAE;YACR,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;YAC3F,OAAO,IAAI,CAAC;SACb;QACD,MAAM,IAAI,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;CACF","debug_id":"4d908771-d902-523f-90aa-7d5f79acdb2c"}
@@ -1,4 +1,5 @@
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]="dba5a239-2e02-5adc-b46b-4f2141609c45")}catch(e){}}();
2
- export {};
3
- //# debugId=dba5a239-2e02-5adc-b46b-4f2141609c45
1
+
2
+ !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]="17f5bb68-283d-5dc9-ab7b-bae0b88a8ab5")}catch(e){}}();
3
+ export {};
4
4
  //# sourceMappingURL=model-info-file.js.map
5
+ //# debugId=17f5bb68-283d-5dc9-ab7b-bae0b88a8ab5
@@ -1 +1 @@
1
- {"debug_id":"dba5a239-2e02-5adc-b46b-4f2141609c45","file":"model-info-file.js","mappings":";","names":[],"sourceRoot":"","sources":["../../src/model-info-file.ts"],"version":3}
1
+ {"version":3,"file":"model-info-file.js","sources":["../../src/model-info-file.ts"],"sourceRoot":"","names":[],"mappings":"","debug_id":"17f5bb68-283d-5dc9-ab7b-bae0b88a8ab5"}
package/package.json CHANGED
@@ -30,9 +30,9 @@
30
30
  "url": "https://github.com/keymanapp/keyman/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@keymanapp/common-types": "18.0.17-alpha",
34
- "@keymanapp/models-types": "18.0.17-alpha",
35
- "@keymanapp/developer-utils": "18.0.17-alpha"
33
+ "@keymanapp/common-types": "18.0.19-alpha",
34
+ "@keymanapp/models-types": "18.0.19-alpha",
35
+ "@keymanapp/developer-utils": "18.0.19-alpha"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/chai": "^4.1.7",
@@ -55,5 +55,5 @@
55
55
  "type": "git",
56
56
  "url": "git+https://github.com/keymanapp/keyman.git"
57
57
  },
58
- "version": "18.0.17-alpha"
58
+ "version": "18.0.19-alpha"
59
59
  }