@front10/danger-plugins 2.0.0-alpha.3 → 2.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.d.ts DELETED
@@ -1,223 +0,0 @@
1
- declare module "netlify" {
2
- export interface NetlifyApiOptions {
3
- userAgent?: string;
4
- scheme?: string;
5
- host?: string;
6
- pathPrefix?: string;
7
- globalParams?: {};
8
- }
9
-
10
- export interface NetlifyException {
11
- code: string;
12
- message: string;
13
- }
14
-
15
- export interface NetlifySite {
16
- id: string;
17
- state: string;
18
- plan: string;
19
- name: string;
20
- custom_domain: string;
21
- domain_aliases: string[];
22
- password: string;
23
- notification_email: string;
24
- url: string;
25
- ssl_url: string;
26
- admin_url: string;
27
- screenshot_url: string;
28
- created_at: string;
29
- updated_at: string;
30
- user_id: string;
31
- session_id: string;
32
- ssl: boolean;
33
- force_ssl: boolean;
34
- managed_dns: boolean;
35
- deploy_url: string;
36
- published_deploy: PublishedDeploy;
37
- account_name: string;
38
- account_slug: string;
39
- git_provider: string;
40
- deploy_hook: string;
41
- capabilities: Capabilities;
42
- processing_settings: ProcessingSettings;
43
- build_settings: BuildSettings;
44
- id_domain: string;
45
- default_hooks_data: DefaultHooksData;
46
- build_image: string;
47
- }
48
-
49
- export interface ListSites {
50
- name?: string;
51
- filter?: "all" | "owner" | "guest";
52
- }
53
-
54
- export interface DeleteSite {
55
- site_id: string;
56
- }
57
-
58
- export interface BuildSettings {
59
- id: number;
60
- provider: string;
61
- deploy_key_id: string;
62
- repo_path: string;
63
- repo_branch: string;
64
- dir: string;
65
- cmd: string;
66
- allowed_branches: string[];
67
- public_repo: boolean;
68
- private_logs: boolean;
69
- repo_url: string;
70
- env: Env;
71
- installation_id: number;
72
- }
73
-
74
- export interface Env {
75
- property1: string;
76
- property2: string;
77
- }
78
-
79
- export interface Capabilities {
80
- property1: Property;
81
- property2: Property;
82
- }
83
-
84
- export interface Property {}
85
-
86
- export interface DefaultHooksData {
87
- access_token: string;
88
- }
89
-
90
- export interface ProcessingSettings {
91
- skip: boolean;
92
- css: CSS;
93
- js: JS;
94
- images: Images;
95
- html: HTML;
96
- }
97
-
98
- export interface CSS {
99
- bundle: boolean;
100
- minify: boolean;
101
- }
102
-
103
- export interface JS {
104
- bundle: boolean;
105
- minify: boolean;
106
- }
107
-
108
- export interface HTML {
109
- pretty_urls: boolean;
110
- }
111
-
112
- export interface Images {
113
- optimize: boolean;
114
- }
115
-
116
- export interface PublishedDeploy {
117
- id: string;
118
- site_id: string;
119
- user_id: string;
120
- build_id: string;
121
- state: string;
122
- name: string;
123
- url: string;
124
- ssl_url: string;
125
- admin_url: string;
126
- deploy_url: string;
127
- deploy_ssl_url: string;
128
- screenshot_url: string;
129
- review_id: number;
130
- draft: boolean;
131
- required: string[];
132
- required_functions: string[];
133
- error_message: string;
134
- branch: string;
135
- commit_ref: string;
136
- commit_url: string;
137
- skipped: boolean;
138
- created_at: string;
139
- updated_at: string;
140
- published_at: string;
141
- title: string;
142
- context: string;
143
- locked: boolean;
144
- review_url: string;
145
- site_capabilities: SiteCapabilities;
146
- }
147
-
148
- export interface SiteCapabilities {
149
- large_media_enabled: boolean;
150
- }
151
-
152
- export interface CreateSiteRequest extends Partial<NetlifySite> {
153
- repo?: BuildSettings;
154
- }
155
-
156
- export interface CreateSiteResponse extends NetlifySite {
157
- repo: BuildSettings;
158
- }
159
-
160
- interface StatusObject {
161
- type: string;
162
- msg: string;
163
- phase: "start" | "progress" | "stop";
164
- }
165
-
166
- export interface DeployOptions {
167
- fnDir?: string; // path to a folder of functions to deploy
168
- configPath?: string; // path to a netlify.toml file to include in the deploy (e.g. redirect support for manual deploys)
169
- draft?: boolean; // draft deploy or production deploy
170
- message?: string; // a short message to associate with the deploy
171
- deployTimeout?: number; // 1.2e6 = 20 mins
172
- parallelHash?: number; // number of parallel hashing calls
173
- parallelUpload?: number; // number of files to upload in parallel
174
- maxRetry?: number; // number of times to try on failed file uploads
175
- filter?: (filepath: string) => boolean; // return false to filter a file from the deploy
176
- tmpDir?: string; // a temporary directory to zip functions into
177
- statusCb?: (statusObj: StatusObject) => void;
178
- }
179
-
180
- export interface DeployResult {
181
- deployId: string;
182
- deploy: PublishedDeploy;
183
- uploadList: any[];
184
- }
185
-
186
- /**
187
- * Netlify API
188
- */
189
- class NetlifyAPI {
190
- /**
191
- *
192
- * @param netlifyToken Pass netlify token
193
- */
194
- constructor(netlifyToken: string, ops?: NetlifyApiOptions);
195
-
196
- /**
197
- * List netlify sites
198
- */
199
- listSites: (data?: ListSites) => Promise<NetlifySite[]>;
200
-
201
- /**
202
- * Create a netlify site
203
- */
204
- createSite: (site: {
205
- body: CreateSiteRequest;
206
- }) => Promise<CreateSiteResponse>;
207
-
208
- deploy: (
209
- siteId: string,
210
- buildDir: string,
211
- opts?: DeployOptions
212
- ) => Promise<DeployResult>;
213
-
214
- /**
215
- * Delet a netlify site
216
- */
217
- deleteSite: (site: DeleteSite) => Promise<void>;
218
-
219
- getSite: (site: { id: string }) => Promise<NetlifySite>;
220
- }
221
-
222
- export default NetlifyAPI;
223
- }