import { BasePlugin } from '@winfe/cli-core'; import { AddOptions } from './interface'; export default class AddPlugin extends BasePlugin { cwd: string; commands: { add: { usage: string; lifecycleEvents: string[]; options: { "--plugin ": { usage: string; shortcut: string; }; "--pm [pm]": { usage: string; shortcut: string; config: { default: string; }; }; }; }; }; hooks: { 'before:add:add': () => Promise; 'add:add': (content: any) => Promise; }; beforeAdd(): Promise; add(content: any): Promise; /** * * @param {String} pluginName -- full name of the package to get * @param {String} pluginVersion -- version to download * @param {String} pm -- node * @param {String} registry * * npm install and create config */ npmInstall({ pluginName, pluginVersion, pm, registry }: AddOptions): Promise; /** * * @param {String} pluginName -- full name of the package to get * @param {String} tarball -- the url of dist tgz * @param {String} core * @param {String} pm * @param {String} remoteDeps * * Download tgz and decompression */ download({ pluginName, pm, remoteDeps, registry }: AddOptions): Promise; }