spiegel-keyman/developer/docs/api/etc/kmc-package.api.md
Marc Durdin 9de8371cfe docs(developer): add/update API docs
Test-bot: skip
Build-bot: skip
2025-12-03 13:51:30 +01:00

347 lines
12 KiB
Markdown

## API Report File for "@keymanapp/kmc-package"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { CompilerCallbacks } from '@keymanapp/developer-utils';
import { CompilerEvent } from '@keymanapp/developer-utils';
import { CompilerOptions } from '@keymanapp/developer-utils';
import { KeymanCompiler } from '@keymanapp/developer-utils';
import { KeymanCompilerArtifact } from '@keymanapp/developer-utils';
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
import { KmpJsonFile } from '@keymanapp/common-types';
import { KpsFile } from '@keymanapp/developer-utils';
// @public
export class KmpCompiler implements KeymanCompiler {
// @internal
buildKmpFile(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile): Promise<Uint8Array>;
init(callbacks: CompilerCallbacks, options: KmpCompilerOptions): Promise<boolean>;
// (undocumented)
readonly normalizePath: (path: string) => string;
run(inputFilename: string, outputFilename?: string): Promise<KmpCompilerResult>;
// @internal (undocumented)
transformKpsFileToKmpObject(kpsFilename: string, kps: KpsFile.KpsFile): KmpJsonFile.KmpJsonFile;
// @internal (undocumented)
transformKpsToKmpObject(kpsFilename: string): KmpJsonFile.KmpJsonFile;
write(artifacts: KmpCompilerArtifacts): Promise<boolean>;
}
// @public
export interface KmpCompilerArtifacts extends KeymanCompilerArtifacts {
kmp: KeymanCompilerArtifact;
}
// @public
export interface KmpCompilerOptions extends CompilerOptions {
}
// @public
export interface KmpCompilerResult extends KeymanCompilerResult {
artifacts: KmpCompilerArtifacts;
}
// Warning: (ae-internal-missing-underscore) The name "PackageCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export class PackageCompilerMessages {
// (undocumented)
static ERROR_FileCouldNotBeRead: number;
// (undocumented)
static Error_FileCouldNotBeRead: (o: {
filename: string;
e: any;
}) => CompilerEvent;
// (undocumented)
static ERROR_FileDoesNotExist: number;
// (undocumented)
static Error_FileDoesNotExist: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_FileRecordIsMissingName: number;
// (undocumented)
static Error_FileRecordIsMissingName: (o: {
description: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_FollowKeyboardVersionButNoKeyboards: number;
// (undocumented)
static Error_FollowKeyboardVersionButNoKeyboards: () => CompilerEvent;
// (undocumented)
static ERROR_FollowKeyboardVersionNotAllowedForModelPackages: number;
// (undocumented)
static Error_FollowKeyboardVersionNotAllowedForModelPackages: () => CompilerEvent;
// (undocumented)
static ERROR_InvalidAuthorEmail: number;
// (undocumented)
static Error_InvalidAuthorEmail: (o: {
email: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_KeyboardContentFileNotFound: number;
// (undocumented)
static Error_KeyboardContentFileNotFound: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_KeyboardFileNotFound: number;
// (undocumented)
static Error_KeyboardFileNotFound: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_KeyboardFileNotValid: number;
// (undocumented)
static Error_KeyboardFileNotValid: (o: {
filename: string;
e: any;
}) => CompilerEvent;
// (undocumented)
static ERROR_LanguageTagIsNotValid: number;
// (undocumented)
static Error_LanguageTagIsNotValid: (o: {
resourceType: string;
id: string;
lang: string;
e: any;
}) => CompilerEvent;
// (undocumented)
static ERROR_MissingKeyboardId: number;
// (undocumented)
static Error_MissingKeyboardId: (o: {
index: number;
}) => CompilerEvent;
// (undocumented)
static ERROR_MissingModelId: number;
// (undocumented)
static Error_MissingModelId: (o: {
index: number;
}) => CompilerEvent;
// (undocumented)
static ERROR_ModelMustHaveAtLeastOneLanguage: number;
// (undocumented)
static Error_ModelMustHaveAtLeastOneLanguage: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_PackageCannotContainBothModelsAndKeyboards: number;
// (undocumented)
static Error_PackageCannotContainBothModelsAndKeyboards: () => CompilerEvent;
// (undocumented)
static ERROR_PackageFileHasEmptyVersion: number;
// (undocumented)
static Error_PackageFileHasEmptyVersion: () => CompilerEvent;
// (undocumented)
static ERROR_PackageMustContainAModelOrAKeyboard: number;
// (undocumented)
static Error_PackageMustContainAModelOrAKeyboard: () => CompilerEvent;
// (undocumented)
static ERROR_PackageMustNotContainItself: number;
// (undocumented)
static Error_PackageMustNotContainItself: (o: {
outputFilename: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_PackageNameCannotBeBlank: number;
// (undocumented)
static Error_PackageNameCannotBeBlank: () => CompilerEvent;
// (undocumented)
static ERROR_RequiredParameterMissing: number;
// (undocumented)
static Error_RequiredParameterMissing: (o: {
param: string;
}) => CompilerEvent;
// (undocumented)
static FATAL_UnexpectedException: number;
// (undocumented)
static Fatal_UnexpectedException: (o: {
e: any;
}) => CompilerEvent;
// (undocumented)
static HINT_JsKeyboardFileHasNoTouchTargets: number;
// (undocumented)
static Hint_JsKeyboardFileHasNoTouchTargets: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static HINT_LanguageTagIsNotMinimal: number;
// (undocumented)
static Hint_LanguageTagIsNotMinimal: (o: {
resourceType: string;
id: string;
actual: string;
expected: string;
}) => CompilerEvent;
// (undocumented)
static HINT_PackageContainsSourceFile: number;
// (undocumented)
static Hint_PackageContainsSourceFile: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static HINT_PackageShouldNotRepeatLanguages: number;
// (undocumented)
static Hint_PackageShouldNotRepeatLanguages: (o: {
resourceType: string;
id: string;
minimalTag: string;
firstTag: string;
secondTag: string;
}) => CompilerEvent;
// (undocumented)
static INFO_KeyboardFileHasNoKeyboardVersion: number;
// (undocumented)
static Info_KeyboardFileHasNoKeyboardVersion: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_AbsolutePath: number;
// (undocumented)
static Warn_AbsolutePath: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_CannotFindFontForKeyboard: number;
// (undocumented)
static Warn_CannotFindFontForKeyboard: (o: {
id: string;
fontFilename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_CannotFindMatchingKeyboardForVisualKeyboard: number;
// (undocumented)
static Warn_CannotFindMatchingKeyboardForVisualKeyboard: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_CannotReadFont: number;
// (undocumented)
static Warn_CannotReadFont: (o: {
fontFilename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_DocFileDangerous: number;
// (undocumented)
static Warn_DocFileDangerous: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_FileInPackageDoesNotFollowFilenameConventions: number;
// (undocumented)
static Warn_FileInPackageDoesNotFollowFilenameConventions: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_FileIsNotABinaryKvkFile: number;
// (undocumented)
static Warn_FileIsNotABinaryKvkFile: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_JsKeyboardFileIsMissing: number;
// (undocumented)
static Warn_JsKeyboardFileIsMissing: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static WARN_KeyboardShouldHaveAtLeastOneLanguage: number;
// (undocumented)
static Warn_KeyboardShouldHaveAtLeastOneLanguage: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static WARN_KeyboardVersionsDoNotMatch: number;
// (undocumented)
static Warn_KeyboardVersionsDoNotMatch: (o: {
keyboard: string;
version: string;
firstKeyboard: string;
firstVersion: string;
}) => CompilerEvent;
// (undocumented)
static WARN_PackageNameDoesNotFollowKeyboardConventions: number;
// (undocumented)
static Warn_PackageNameDoesNotFollowKeyboardConventions: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_PackageNameDoesNotFollowLexicalModelConventions: number;
// (undocumented)
static Warn_PackageNameDoesNotFollowLexicalModelConventions: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_PackageVersionIsUnrecognizedFormat: number;
// (undocumented)
static Warn_PackageVersionIsUnrecognizedFormat: (o: {
version: string;
}) => CompilerEvent;
// (undocumented)
static WARN_RedistFileShouldNotBeInPackage: number;
// (undocumented)
static Warn_RedistFileShouldNotBeInPackage: (o: {
filename: string;
}) => CompilerEvent;
// (undocumented)
static WARN_VisualKeyboardFileIsInvalid: number;
// (undocumented)
static Warn_VisualKeyboardFileIsInvalid: (o: {
filename: string;
}) => CompilerEvent;
}
// Warning: (ae-internal-missing-underscore) The name "PackageValidation" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export class PackageValidation {
constructor(callbacks: CompilerCallbacks, options: CompilerOptions);
// (undocumented)
validate(filename: string, outputFilename: string, kmpJson: KmpJsonFile.KmpJsonFile): boolean;
}
// @public
export class WindowsPackageInstallerCompiler implements KeymanCompiler {
init(callbacks: CompilerCallbacks, options: WindowsPackageInstallerCompilerOptions): Promise<boolean>;
run(inputFilename: string, outputFilename?: string): Promise<WindowsPackageInstallerCompilerResult>;
write(artifacts: WindowsPackageInstallerCompilerArtifacts): Promise<boolean>;
}
// @public
export interface WindowsPackageInstallerCompilerArtifacts extends KeymanCompilerArtifacts {
exe: KeymanCompilerArtifact;
}
// @public
export interface WindowsPackageInstallerCompilerOptions extends KmpCompilerOptions {
sources: WindowsPackageInstallerSources;
}
// @public
export interface WindowsPackageInstallerCompilerResult extends KeymanCompilerResult {
artifacts: WindowsPackageInstallerCompilerArtifacts;
}
// @public
export interface WindowsPackageInstallerSources {
// (undocumented)
appName?: string;
// (undocumented)
licenseFilename: string;
// (undocumented)
msiFilename: string;
// (undocumented)
setupExeFilename: string;
// (undocumented)
startDisabled: boolean;
// (undocumented)
startWithConfiguration: boolean;
// (undocumented)
titleImageFilename?: string;
}
// (No @packageDocumentation comment for this package)
```