piral-cli
Version:
The standard CLI for creating and building a Piral instance or a Pilet.
68 lines (67 loc) • 1.93 kB
TypeScript
import { LogLevels, PiralPublishType, PublishScheme } from '../types';
export interface PublishPiralOptions {
/**
* The source folder, which was the target folder of `piral build`.
*/
source?: string;
/**
* Sets the URL of the feed service to deploy to.
*/
url?: string;
/**
* Sets the API key to use.
*/
apiKey?: string;
/**
* Sets the log level to use (1-5).
*/
logLevel?: LogLevels;
/**
* Specifies if the Piral instance should be built before publishing.
* If yes, then the tarball is created from fresh build artifacts.
*/
fresh?: boolean;
/**
* Defines a custom certificate for the feed service.
*/
cert?: string;
/**
* Allow self-signed certificates.
*/
allowSelfSigned?: boolean;
/**
* Places additional headers that should be posted to the feed service.
*/
headers?: Record<string, string>;
/**
* Defines if authorization tokens can be retrieved interactively.
*/
interactive?: boolean;
/**
* Sets the bundler to use for building, if any specific.
*/
bundlerName?: string;
/**
* Sets the authorization scheme to use.
*/
mode?: PublishScheme;
/**
* Additional arguments for a specific bundler.
*/
_?: Record<string, any>;
/**
* Hooks to be triggered at various stages.
*/
hooks?: {
beforeEmulator?(e: any): Promise<void>;
afterEmulator?(e: any): Promise<void>;
beforePackage?(e: any): Promise<void>;
afterPackage?(e: any): Promise<void>;
};
/**
* Selects the target type of the build (e.g. 'release'). "all" builds all target types.
*/
type?: PiralPublishType;
}
export declare const publishPiralDefaults: PublishPiralOptions;
export declare function publishPiral(baseDir?: string, options?: PublishPiralOptions): Promise<void>;