/
pjson.ts
106 lines (99 loc) · 2.34 KB
/
pjson.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import {HelpOptions} from './help'
export interface PJSON {
[k: string]: any;
dependencies?: {[name: string]: string};
devDependencies?: {[name: string]: string};
oclif: {
schema?: number;
};
}
export namespace PJSON {
export interface Plugin extends PJSON {
name: string;
version: string;
oclif: PJSON['oclif'] & {
schema?: number;
description?: string;
topicSeparator?: ':' | ' ';
flexibleTaxonomy?: boolean;
hooks?: { [name: string]: (string | string[]) };
commands?: string;
default?: string;
plugins?: string[];
devPlugins?: string[];
helpClass?: string;
helpOptions?: HelpOptions;
aliases?: { [name: string]: string | null };
repositoryPrefix?: string;
update: {
s3: S3;
autoupdate?: {
rollout?: number;
debounce?: number;
};
node: {
version?: string;
targets?: string[];
};
};
topics?: {
[k: string]: {
description?: string;
subtopics?: Plugin['oclif']['topics'];
hidden?: boolean;
};
};
additionalHelpFlags?: string[];
additionalVersionFlags?: string[];
state?: 'beta' | 'deprecated' | string;
};
}
export interface S3 {
acl?: string;
bucket?: string;
host?: string;
xz?: boolean;
gz?: boolean;
templates: {
target: S3.Templates;
vanilla: S3.Templates;
};
}
export namespace S3 {
export interface Templates {
baseDir?: string;
versioned?: string;
unversioned?: string;
manifest?: string;
}
}
export interface CLI extends Plugin {
oclif: Plugin['oclif'] & {
schema?: number;
bin?: string;
npmRegistry?: string;
scope?: string;
dirname?: string;
flexibleTaxonomy?: boolean;
};
}
export interface User extends PJSON {
private?: boolean;
oclif: PJSON['oclif'] & {
plugins?: (string | PluginTypes.User | PluginTypes.Link)[]; };
}
export type PluginTypes = PluginTypes.User | PluginTypes.Link | {root: string}
export namespace PluginTypes {
export interface User {
type: 'user';
name: string;
url?: string;
tag?: string;
}
export interface Link {
type: 'link';
name: string;
root: string;
}
}
}