3
3
* @file modules/sfdx-falcon-types/index.d.ts
4
4
* @copyright Vivek M. Chawla - 2018
5
5
* @author Vivek M. Chawla <@VivekMChawla>
6
- * @summary ???
7
- * @description ???
6
+ * @summary Collection of interfaces and types used across SFDX-Falcon modules.
7
+ * @description Collection of interfaces and types used across SFDX-Falcon modules.
8
8
* @version 1.0.0
9
9
* @license MIT
10
10
*/
11
11
//─────────────────────────────────────────────────────────────────────────────────────────────────┘
12
12
// Import External Modules/Types
13
- import { AnyJson } from '@salesforce/ts-types' ;
14
- import { Observable } from 'rx' ;
13
+ import { AnyJson } from '@salesforce/ts-types' ;
14
+ import * as inquirer from 'inquirer' ;
15
+ import { Observable } from 'rx' ;
15
16
17
+ /**
18
+ * Represents the local config options for an AppX Demo project.
19
+ * TODO: Delete this interface if not used.
20
+ */
21
+ /*
16
22
export interface AppxDemoLocalConfig {
17
23
demoValidationOrgAlias: string;
18
24
demoDeploymentOrgAlias: string;
19
25
devHubAlias: string;
20
26
envHubAlias: string;
21
- }
22
-
27
+ }//*/
28
+ /**
29
+ * Represents the configuration schema of an AppX Demo Project.
30
+ */
31
+ /*
23
32
export interface AppxDemoProjectConfig {
24
33
demoAlias: string;
25
34
demoConfig: string;
@@ -31,21 +40,32 @@ export interface AppxDemoProjectConfig {
31
40
partnerAlias: string;
32
41
partnerName: string;
33
42
schemaVersion: string;
34
- }
35
-
43
+ }//*/
44
+ /**
45
+ * Represents the sequence options for an AppX Demo project
46
+ * TODO: Delete this if left unused.
47
+ */
48
+ /*
36
49
export interface AppxDemoSequenceOptions {
37
50
scratchDefJson: string;
38
51
rebuildValidationOrg: boolean;
39
52
skipActions: [string];
40
- }
41
-
53
+ }//*/
54
+ /**
55
+ * Represents local config settings for an APK (AppX Package) project
56
+ * TODO: Delete this if left unused.
57
+ */
58
+ /*
42
59
export interface AppxPackageLocalConfig {
43
60
demoValidationOrgAlias: string;
44
61
demoDeploymentOrgAlias: string;
45
62
devHubAlias: string;
46
63
envHubAlias: string;
47
- }
48
-
64
+ }//*/
65
+ /**
66
+ * TODO: Delete this if left unused.
67
+ */
68
+ /*
49
69
export interface AppxPackageProjectConfig {
50
70
gitHubUrl: string;
51
71
gitRemoteUri: string;
@@ -62,26 +82,40 @@ export interface AppxPackageProjectConfig {
62
82
projectName: string;
63
83
projectType: string;
64
84
schemaVersion: string;
65
- }
66
-
85
+ }//*/
86
+ /**
87
+ * TODO: Delete this if left unused
88
+ */
89
+ /*
67
90
export interface AppxPackageSequenceOptions {
68
91
scratchDefJson: string;
69
- }
70
-
92
+ }//*/
93
+ /**
94
+ * TODO: Delete this if left unused
95
+ */
96
+ /*
71
97
export interface FalconConfig {
72
98
appxProject?: AppxPackageProjectConfig;
73
99
appxDemo?: AppxDemoProjectConfig;
74
- }
75
-
100
+ }//*/
101
+ /**
102
+ * TODO: Delete this if left unused
103
+ */
104
+ /*
76
105
export interface FalconCommandContext extends FalconSequenceContext {
77
106
commandObserver: any; // tslint:disable-line: no-any
78
- }
79
-
80
- // TODO: Need to finish defining FalconCommandHandler
107
+ }//*/
108
+ /**
109
+ * TODO: Delete this if left unused.
110
+ */
111
+ /*
81
112
export interface FalconCommandHandler {
82
113
changeMe: string;
83
- }
84
-
114
+ }//*/
115
+ /**
116
+ * Delete this if left unused.
117
+ */
118
+ /*
85
119
export interface FalconCommandSequence {
86
120
sequenceName: string;
87
121
sequenceType: string;
@@ -91,15 +125,21 @@ export interface FalconCommandSequence {
91
125
sequenceGroups: [FalconCommandSequenceGroup];
92
126
handlers: [FalconCommandHandler];
93
127
schemaVersion: string;
94
- }
95
-
128
+ }//*/
129
+ /**
130
+ * Delete this if left unused.
131
+ */
132
+ /*
96
133
export interface FalconCommandSequenceGroup {
97
134
groupId: string;
98
135
groupName: string;
99
136
description: string;
100
137
sequenceSteps: FalconCommandSequenceStep[];
101
- }
102
-
138
+ }//*/
139
+ /**
140
+ * Delete this if left unused.
141
+ */
142
+ /*
103
143
export interface FalconCommandSequenceStep {
104
144
stepName: string;
105
145
description: string;
@@ -111,13 +151,24 @@ export interface FalconCommandSequenceStep {
111
151
onError?: {
112
152
handler: string;
113
153
};
114
- }
154
+ }//*/
115
155
156
+ export type InquirerChoice = inquirer . objects . Choice ;
157
+ export type InquirerChoices = inquirer . objects . Choices ;
158
+ export type InquirerQuestion = inquirer . Question ;
159
+ export type InquirerQuestions = inquirer . Questions ;
160
+ export type InquirerAnswers = inquirer . Answers ;
161
+ /**
162
+ * Represents the status code and JSON result that is sent to the caller when SFDX-Falcon CLI Commands are run.
163
+ */
116
164
export interface SfdxFalconJsonResponse {
117
165
falconStatus : number ;
118
166
falconResult : AnyJson ;
119
167
}
120
-
168
+ /**
169
+ * Delete this if left unused.
170
+ */
171
+ /*
121
172
export interface FalconSequenceContext {
122
173
devHubAlias: string;
123
174
targetOrgAlias: string;
@@ -128,33 +179,50 @@ export interface FalconSequenceContext {
128
179
dataPath: string;
129
180
logLevel: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
130
181
sequenceObserver: any; // tslint:disable-line: no-any
131
- }
132
-
182
+ }//*/
183
+ /**
184
+ * Represents a Listr Task object that can be executed by a Listr Task Runner.
185
+ */
133
186
export interface ListrTask {
134
187
title : string ;
135
188
task : ListrTaskFunction ;
136
189
skip ?: boolean | ListrSkipFunction ;
137
190
enabled ?: boolean | ListrEnabledFunction ;
138
191
}
139
-
192
+ /**
193
+ * Represents an "enabled" function for use in a Listr Task.
194
+ */
140
195
export type ListrEnabledFunction =
141
196
( context ?:any ) => boolean ; // tslint:disable-line: no-any
142
-
197
+ /**
198
+ * Represents a "skip" function for use in a Listr Task.
199
+ */
143
200
export type ListrSkipFunction =
144
201
( context ?:any ) => boolean | string | Promise < boolean | string > ; // tslint:disable-line: no-any
145
-
202
+ /**
203
+ * Represents a "task" function for use in a Listr Task.
204
+ */
146
205
export type ListrTaskFunction =
147
206
( context ?:ListrContext , task ?:ListrTask ) => void | Promise < void > | Observable < any > ; // tslint:disable-line: no-any
148
-
207
+ /**
208
+ * Represents the set of "execution options" related to the use of Listr.
209
+ */
149
210
export interface ListrExecutionOptions {
150
211
listrContext : any ; // tslint:disable-line: no-any
151
212
listrTask : any ; // tslint:disable-line: no-any
152
213
observer : any ; // tslint:disable-line: no-any
153
214
}
154
-
215
+ /**
216
+ * Represents the Listr "Context" that's passed to various functions set up inside Listr Tasks.
217
+ */
155
218
export type ListrContext = any ; // tslint:disable-line: no-any
219
+ /**
220
+ * Represents an Observable for use with Listr.
221
+ */
156
222
export type ListrObservable = any ; // tslint:disable-line: no-any
157
-
223
+ /**
224
+ * Enum that stores the various CLI log level flag values.
225
+ */
158
226
export enum SfdxCliLogLevel {
159
227
TRACE = 'trace' ,
160
228
DEBUG = 'debug' ,
0 commit comments