@webda/shell
Version:
Deploy a Webda app or configure it
66 lines (65 loc) • 1.94 kB
TypeScript
import { Configuration, DeployerResources } from "@webda/core";
import { Deployer } from "./deployer.js";
export interface PackagerResources extends DeployerResources {
zipPath: string;
entrypoint?: string;
package?: {
ignores?: string[];
excludePatterns?: string[];
modules?: {
excludes?: string[];
includes?: string[];
};
};
includeLinkModules?: boolean;
}
/**
* Generate a ZIP Package of the application
*
* It can add a file as entrypoint
*
* @param zipPath path to store the package
* @param entrypoint file to integrate as entrypoint.js
* @WebdaDeployer WebdaDeployer/Packager
*/
export default class Packager<T extends PackagerResources> extends Deployer<T> {
packagesGenerated: {
[key: string]: boolean;
};
static loadPackageInfo(dir: any): any;
static getWorkspacesPackages(dir?: string): string[];
/**
* Retrieve Yarn workspaces root
*/
static getWorkspacesRoot(dir?: string): string;
static getPackageLastChanges(pkg: string, includeWorkspace?: boolean): string;
static getDependencies(pkg: string): {
[key: string]: {
name: string;
version: string;
}[];
};
static getResolvedDependencies(pkg: string): {
[key: string]: string;
};
loadDefaults(): Promise<void>;
/**
* Import the archiver
* @returns
*/
getArchiver(): Promise<any>;
/**
* Generate a full code package including dependencies
*/
deploy(): Promise<any>;
protected getPackagedConfiguration(): Configuration;
/**
* Add a symbolic linked package from dependency
*
* @param archive to add to
* @param fromPath absolutePath of package
* @param toPath relative path within archive
*/
protected addLinkPackage(archive: any, fromPath: string, toPath: string): void;
}
export { Packager };