UNPKG

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