spiegel-keyman/developer/docs/api/etc/kmc-package.api.md
2024-07-26 09:23:17 +07:00

9.9 KiB

API Report File for "@keymanapp/kmc-package"

Do not edit this file. It is a report generated by API Extractor.


import { CompilerCallbacks } from '@keymanapp/common-types';
import { CompilerEvent } from '@keymanapp/common-types';
import { CompilerOptions } from '@keymanapp/common-types';
import { KeymanCompiler } from '@keymanapp/common-types';
import { KeymanCompilerArtifact } from '@keymanapp/common-types';
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
import { KeymanCompilerResult } from '@keymanapp/common-types';
import { KmpJsonFile } from '@keymanapp/common-types';
import { KpsFile } from '@keymanapp/common-types';

// @public
export class KmpCompiler implements KeymanCompiler {
    // @internal
    buildKmpFile(kpsFilename: string, kmpJsonData: KmpJsonFile.KmpJsonFile): Promise<Uint8Array>;
    init(callbacks: CompilerCallbacks, options: KmpCompilerOptions): Promise<boolean>;
    // @internal (undocumented)
    loadKpsFile(kpsFilename: string): KpsFile.KpsFile;
    // (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_InvalidPackageFile: number;
    // (undocumented)
    static Error_InvalidPackageFile: (o: {
        e: any;
    }) => 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_ModelMustHaveAtLeastOneLanguage: number;
    // (undocumented)
    static Error_ModelMustHaveAtLeastOneLanguage: (o: {
        id: string;
    }) => CompilerEvent;
    // (undocumented)
    static ERROR_PackageCannotContainBothModelsAndKeyboards: number;
    // (undocumented)
    static Error_PackageCannotContainBothModelsAndKeyboards: () => CompilerEvent;
    // (undocumented)
    static ERROR_PackageMustContainAModelOrAKeyboard: number;
    // (undocumented)
    static Error_PackageMustContainAModelOrAKeyboard: () => CompilerEvent;
    // (undocumented)
    static ERROR_PackageNameCannotBeBlank: number;
    // (undocumented)
    static Error_PackageNameCannotBeBlank: () => 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_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_RedistFileShouldNotBeInPackage: number;
    // (undocumented)
    static Warn_RedistFileShouldNotBeInPackage: (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, 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)