UNPKG

1.6 kBTypeScriptView Raw
1export interface PJSON {
2 [k: string]: any;
3 dependencies?: {
4 [name: string]: string;
5 };
6 oclif: {
7 schema?: number;
8 };
9}
10export declare namespace PJSON {
11 interface Plugin extends PJSON {
12 name: string;
13 version: string;
14 oclif: PJSON['oclif'] & {
15 schema?: number;
16 title?: string;
17 description?: string;
18 hooks?: {
19 [name: string]: (string | string[]);
20 };
21 commands?: string;
22 plugins?: string[];
23 devPlugins?: string[];
24 topics?: {
25 [k: string]: {
26 description?: string;
27 subtopics?: Plugin['oclif']['topics'];
28 hidden?: boolean;
29 };
30 };
31 };
32 }
33 interface CLI extends Plugin {
34 oclif: Plugin['oclif'] & {
35 schema?: number;
36 bin?: string;
37 npmRegistry?: string;
38 scope?: string;
39 dirname?: string;
40 };
41 }
42 interface User extends PJSON {
43 private?: boolean;
44 oclif: PJSON['oclif'] & {
45 plugins?: (string | PluginTypes.User | PluginTypes.Link)[];
46 };
47 }
48 type PluginTypes = PluginTypes.User | PluginTypes.Link | {
49 root: string;
50 };
51 namespace PluginTypes {
52 interface User {
53 type: 'user';
54 name: string;
55 tag?: string;
56 }
57 interface Link {
58 type: 'link';
59 name: string;
60 root: string;
61 }
62 }
63}