UNPKG

2.52 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 helpClass?: string;
25 aliases?: {
26 [name: string]: string | null;
27 };
28 repositoryPrefix?: string;
29 update: {
30 s3: S3;
31 autoupdate?: {
32 rollout?: number;
33 debounce?: number;
34 };
35 node: {
36 version?: string;
37 targets?: string[];
38 };
39 };
40 topics?: {
41 [k: string]: {
42 description?: string;
43 subtopics?: Plugin['oclif']['topics'];
44 hidden?: boolean;
45 };
46 };
47 };
48 }
49 interface S3 {
50 acl?: string;
51 bucket?: string;
52 host?: string;
53 xz?: boolean;
54 gz?: boolean;
55 templates: {
56 target: S3.Templates;
57 vanilla: S3.Templates;
58 };
59 }
60 namespace S3 {
61 interface Templates {
62 baseDir: string;
63 versioned: string;
64 unversioned: string;
65 manifest: string;
66 }
67 }
68 interface CLI extends Plugin {
69 oclif: Plugin['oclif'] & {
70 schema?: number;
71 bin?: string;
72 npmRegistry?: string;
73 scope?: string;
74 dirname?: string;
75 };
76 }
77 interface User extends PJSON {
78 private?: boolean;
79 oclif: PJSON['oclif'] & {
80 plugins?: (string | PluginTypes.User | PluginTypes.Link)[];
81 };
82 }
83 type PluginTypes = PluginTypes.User | PluginTypes.Link | {
84 root: string;
85 };
86 namespace PluginTypes {
87 interface User {
88 type: 'user';
89 name: string;
90 url?: string;
91 tag?: string;
92 }
93 interface Link {
94 type: 'link';
95 name: string;
96 root: string;
97 }
98 }
99}