/// import { Package } from 'read-pkg-up'; export interface IRawPJSONBase extends Package { name: string; version: string; dxcli?: { bin?: string; dirname?: string; commands?: string; hooks?: { [name: string]: string | string[]; }; plugins?: string[] | string; topics?: { [k: string]: { description?: string; subtopics?: IPJSONBase['dxcli']['topics']; hidden?: boolean; }; }; }; } export interface IRawPluginPJSON extends IRawPJSONBase { dxcli?: IRawPJSONBase['dxcli'] & { type?: 'plugin'; }; } export interface IRawCLIPJSON extends IRawPJSONBase { dxcli: IRawPJSONBase['dxcli'] & { type: 'cli'; npmRegistry?: string; }; } export interface IPJSONBase extends IRawPJSONBase { name: string; version: string; dxcli: { bin: string; dirname: string; commands?: string; hooks: { [name: string]: string[]; }; plugins?: string[] | string; topics: { [k: string]: { description?: string; subtopics?: IPJSONBase['dxcli']['topics']; hidden?: boolean; }; }; }; } export interface IPluginPJSON extends IPJSONBase { dxcli: IPJSONBase['dxcli'] & { type: 'plugin'; }; } export interface ICLIPJSON extends IPJSONBase { dxcli: IPJSONBase['dxcli'] & { type: 'cli'; npmRegistry?: string; }; } export declare type IPJSON = IPluginPJSON | ICLIPJSON; export declare function normalizePJSON(pjson: IRawCLIPJSON): ICLIPJSON; export declare function normalizePJSON(pjson: IRawPluginPJSON): IPluginPJSON;