/
options.d.ts
94 lines (83 loc) · 2.69 KB
/
options.d.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
export type UploadChannel = 'unlisted'|'listed';
export interface ISignAddonLibOptions {
/**
* @default "https://addons.mozilla.org/api/v3"
*/
apiUrlPrefix?: string;
/**
* Optional override to the number of seconds until the JWT token for
* the API request expires. This must match the expiration time that
* the API server accepts.
*/
apiJwtExpiresIn?: number;
/** @default false */
verbose?: boolean;
/**
* The release channel (listed or unlisted).
* Ignored for new add-ons, which are always unlisted.
* Default: most recently used channel.
*/
channel?: string;
/**
* Number of milliseconds to wait before aborting the request.
* Default: 2 minutes.
*/
timeout?: number;
/**
* Optional proxy to use for all API requests,
* such as "http://yourproxy:6000"
* Read this for details on how proxy requests work:
* https://github.com/request/request#proxies
*/
apiProxy?: string;
/**
* Optional object to pass to request() for additional configuration.
* Some properties such as 'url' cannot be defined here.
* Available options:
* https://github.com/request/request#requestoptions-callback
*/
apiRequestConfig?: object;
/**
* Not typed yet
*/
AMOClient?: any;
}
/**
* Signing for offline dist performs via Firefox Addons API
*/
export interface IFirefoxAddonsOptions {
api: {
/** JWT issuer also called 'apiKey' obtained from created credentials */
jwtIssuer: string;
/** JWT secret also called 'apiSecret' obtained from created credentials */
jwtSecret: string;
},
deploy?: {
/**
* Id of extension which was already uploaded to Firefox Addons
*/
extensionId: string;
/**
* The version channel, which determines its visibility on the site. Can be either unlisted or listed
* @default 'listed'
*/
channel?: UploadChannel;
/**
* Number of milliseconds to wait until uploaded item becomes processed
* Throw PollTimedOutError in case of timeout
* @default undefined
*/
pollTimeoutMs?: number
},
signXpi?: {
/**
* Id of extension uploaded to Firefox Addons especially for offline distribution
* If not specified, new extension will be added for every build (not recommended)
*/
extensionId?: string;
/** Target path for built and signed xpi file. Could be undefined for temporary build output */
xpiOutPath?: string;
/** Options for underlying 'signAddon' lib */
signAddonLib?: ISignAddonLibOptions;
}
}