UNPKG

@shockpkg/ria-packager

Version:

Package for creating Adobe AIR packages

159 lines (158 loc) 4.53 kB
/// <reference types="node" /> import { TranscodeEncoding } from 'buffer'; import { Packager } from '../packager'; export interface IIcon { image16x16: string | null; image29x29: string | null; image32x32: string | null; image36x36: string | null; image48x48: string | null; image50x50: string | null; image57x57: string | null; image58x58: string | null; image72x72: string | null; image96x96: string | null; image100x100: string | null; image114x114: string | null; image128x128: string | null; image144x144: string | null; image512x512: string | null; image732x412: string | null; image1024x1024: string | null; } export interface IFileTypeInfo { name: string; contentType: string; description: string | null; icon: IIcon | null; } /** * PackagerBundle constructor. * * @param path Output path. */ export declare abstract class PackagerBundle extends Packager { /** * Path to the SDK, an archive or directory. */ sdkPath: string | null; /** * Application info from the id tag. */ protected _applicationInfoId: string | null; /** * Application info from the versionNumber tag. */ protected _applicationInfoVersionNumber: string | null; /** * Application info from the filename tag. */ protected _applicationInfoFilename: string | null; /** * Application info from the copyright tag. */ protected _applicationInfoCopyright: string | null; /** * Application info from the icon tag. */ protected _applicationInfoIcon: Readonly<IIcon> | null; /** * Application info from the fileTypes tag. */ protected _applicationInfoFileTypes: Map<string, IFileTypeInfo> | null; /** * Application info from the supportedLanguages tag. */ protected _applicationInfoSupportedLanguages: string | null; /** * Application info from the initialWindow.requestedDisplayResolution tag. */ protected _applicationInfoRequestedDisplayResolution: string | null; /** * Application info from the architecture tag. */ protected _applicationInfoArchitecture: string | null; constructor(path: string); /** * Package mimetype. * * @returns Mimetype string. */ get mimetype(): string; /** * Package signed. * * @returns Boolean for if package is signed or not. */ get signed(): boolean; /** * Open the configured SDK. * * @returns Archive instance. */ protected _openSdk(): Promise<import("@shockpkg/archive-files").Archive>; /** * Init application info from descriptor data. * * @param applicationData The application descriptor data. */ protected _applicationInfoInit(applicationData: Readonly<Buffer>): void; /** * Get the application ID. * * @returns The ID. */ protected _getId(): string; /** * Get the application version number. * * @returns The version number. */ protected _getVersionNumber(): string; /** * Get the application filename. * * @returns The filename. */ protected _getFilename(): string; /** * Get the application copyright if present. * * @returns Copyright string or null. */ protected _getCopyright(): string | null; /** * Get the application icon. * * @returns Application icon. */ protected _getIcon(): Readonly<IIcon> | null; /** * The the application file types if present. * * @returns File types map or null. */ protected _getFileTypes(): Map<string, IFileTypeInfo> | null; /** * Clear application info from descriptor data. */ protected _applicationInfoClear(): void; /** * Get data from buffer or file. * * @param data Data buffer. * @param file File path. * @returns Data buffer. */ protected _dataFromBufferOrFile(data: Readonly<Buffer> | null, file: string | null): Promise<Buffer | null>; /** * Get data from value or file. * * @param data Data value. * @param file File path. * @param newline Newline string. * @param encoding String encoding. * @returns Data buffer. */ protected _dataFromValueOrFile(data: Readonly<string[]> | string | Readonly<Buffer> | null, file: string | null, newline: string | null, encoding: TranscodeEncoding | null): Promise<Buffer | null>; }