UNPKG

npm-pkgbuild

Version:

create ArchLinux, RPM and Debian packages from npm packages

134 lines (133 loc) 3.68 kB
/** * @typedef {import('../publish.mjs').PublishingDetail} PublishingDetail */ /** * @typedef {Object} Field * @property {string} alias interchangeable field name * @property {string} type * @property {any} default * @property {boolean} mandatory */ /** * Base Packager * @param {Object} properties */ export class Packager { static attributes: {}; /** * @return {{named:object,others:string[]}} */ static get workspaceLayout(): { named: object; others: string[]; }; /** * @param {Object} options * @param {Object} variant * @return {Promise<boolean>} */ static prepare(options: any, variant: any): Promise<boolean>; /** * Base Packager * @param {Object} properties */ constructor(properties: any); /** * What is the package name in the package eco-system. * @param {string} name * @return {string} package name in the target eco-system */ packageName(name: string): string; get hookMapping(): {}; hookContent(): AsyncGenerator<StringContentEntry, void, unknown>; dependencyExpression(name: any, expression: any): any; makeDepends(dependencies: any): any[]; get fileNameExtension(): any; get attributes(): any; get properties(): any; /** * Create tmp directory. * @return {Promise<string>} directory path */ get tmpdir(): Promise<string>; /** * Prepares artifact generation. * @param {Object} options * @param {Object} [publishingDetail] * @returns {Promise<{properties:Object, destination:string, tmpdir:string, staging:string}>} */ prepare(options: any, publishingDetail?: any): Promise<{ properties: any; destination: string; tmpdir: string; staging: string; }>; /** * Execute package generation. * @param {Object} sources * @param {Object[]} transformer * @param {PublishingDetail[]} publishingDetails * @param {Object} options * @param {function(string):string?} expander * @return {Promise<string>} identifier of the resulting package */ create(sources: any, transformer: any[], publishingDetails: PublishingDetail[], options: any, expander: (arg0: string) => string | null): Promise<string>; publish(artifact: any, publishingDetails: any, logger: any): Promise<void>; #private; } export const pkgbuild_name_attribute: { alias: string; mandatory: boolean; type: string; isKey: boolean; writable: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; export const pkgbuild_version_attribute: { alias: string; mandatory: boolean; set: (v: any) => any; type: string; isKey: boolean; writable: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; get?: Function; env?: string[] | string; }; export const pkgbuild_description_attribute: { alias: string; mandatory: boolean; type: string; isKey: boolean; writable: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; export type PublishingDetail = import("../publish.mjs").PublishingDetail; export type Field = { /** * interchangeable field name */ alias: string; type: string; default: any; mandatory: boolean; }; import { StringContentEntry } from "content-entry";