@@ -8,11 +8,205 @@ const envNameGenerator: Fig.Generator = {
8
8
} ,
9
9
} ;
10
10
11
+ const amplifyCategories : Fig . Subcommand [ ] = [
12
+ {
13
+ name : "notifications" ,
14
+ } ,
15
+ {
16
+ name : "analytics" ,
17
+ } ,
18
+ {
19
+ name : "api" ,
20
+ } ,
21
+ {
22
+ name : "auth" ,
23
+ } ,
24
+ {
25
+ name : "function" ,
26
+ } ,
27
+ {
28
+ name : "hosting" ,
29
+ } ,
30
+ {
31
+ name : "interactions" ,
32
+ } ,
33
+ {
34
+ name : "predictions" ,
35
+ } ,
36
+ {
37
+ name : "storage" ,
38
+ } ,
39
+ {
40
+ name : "xr" ,
41
+ } ,
42
+ ] ;
43
+
44
+ const categoryCommands : Fig . Subcommand [ ] = [
45
+ {
46
+ name : "add" ,
47
+ description :
48
+ "Adds a resource for an Amplify category in your local backend" ,
49
+ } ,
50
+ {
51
+ name : "update" ,
52
+ description :
53
+ "Update resource for an Amplify category in your local backend" ,
54
+ } ,
55
+ {
56
+ name : "remove" ,
57
+ description :
58
+ "Removes a resource for an Amplify category in your local backend" ,
59
+ } ,
60
+ {
61
+ name : "push" ,
62
+ description :
63
+ "Provisions cloud resources with the latest local developments" ,
64
+ subcommands : [
65
+ {
66
+ name : "--y" ,
67
+ description : "Respond 'y' to all options" ,
68
+ } ,
69
+ ] ,
70
+ } ,
71
+ ] ;
72
+
11
73
const completionSpec : Fig . Spec = {
12
74
name : "amplify" ,
13
75
description :
14
76
"A set of tools and services to help front-end web and mobile developers build scalable full stack applications" ,
15
77
subcommands : [
78
+ {
79
+ name : "init" ,
80
+ description :
81
+ "Initializes a new project, sets up deployment resources in the cloud, and makes your project ready for Amplify" ,
82
+ } ,
83
+ {
84
+ name : "configure" ,
85
+ description :
86
+ "Configures the attributes of your project for amplify-cli, such as switching front-end framework and adding/removing cloud-provider plugins" ,
87
+ } ,
88
+ {
89
+ name : "push" ,
90
+ description :
91
+ "Provisions cloud resources with the latest local developments" ,
92
+ subcommands : [
93
+ {
94
+ name : "--y" ,
95
+ description : "Respond 'y' to all options" ,
96
+ } ,
97
+ ...amplifyCategories ,
98
+ ] ,
99
+ } ,
100
+ {
101
+ name : "pull" ,
102
+ description :
103
+ "Fetch upstream backend environment definition changes from the cloud and updates the local environment to match that definition" ,
104
+ } ,
105
+ {
106
+ name : "publish" ,
107
+ description :
108
+ "Executes amplify push, and then builds and publishes client-side application for hosting" ,
109
+ } ,
110
+ {
111
+ name : "serve" ,
112
+ description :
113
+ "Executes amplify push, and then executes the project's start command to test run the client-side application locally" ,
114
+ } ,
115
+ {
116
+ name : "status" ,
117
+ description :
118
+ "Shows the state of local resources not yet pushed to the cloud (Create/Update/Delete)" ,
119
+ subcommands : [
120
+ ...amplifyCategories ,
121
+ {
122
+ name : "-v" ,
123
+ description :
124
+ "Shows the detailed verbose diff between local and deployed resources, including cloudformation-diff" ,
125
+ } ,
126
+ ] ,
127
+ } ,
128
+ {
129
+ name : "delete" ,
130
+ description :
131
+ "Deletes all of the resources tied to the project from the cloud" ,
132
+ } ,
133
+ {
134
+ name : "add" ,
135
+ description :
136
+ "Adds a resource for an Amplify category in your local backend" ,
137
+ subcommands : amplifyCategories ,
138
+ } ,
139
+ {
140
+ name : "update" ,
141
+ description :
142
+ "Update resource for an Amplify category in your local backend" ,
143
+ subcommands : amplifyCategories ,
144
+ } ,
145
+ {
146
+ name : "remove" ,
147
+ description :
148
+ "Removes a resource for an Amplify category in your local backend" ,
149
+ subcommands : amplifyCategories ,
150
+ } ,
151
+ {
152
+ name : "notifications" ,
153
+ subcommands : categoryCommands ,
154
+ } ,
155
+ {
156
+ name : "analytics" ,
157
+ subcommands : categoryCommands ,
158
+ } ,
159
+ {
160
+ name : "api" ,
161
+ subcommands : categoryCommands ,
162
+ } ,
163
+ {
164
+ name : "auth" ,
165
+ subcommands : categoryCommands ,
166
+ } ,
167
+ {
168
+ name : "function" ,
169
+ subcommands : categoryCommands ,
170
+ } ,
171
+ {
172
+ name : "hosting" ,
173
+ subcommands : categoryCommands ,
174
+ } ,
175
+ {
176
+ name : "interactions" ,
177
+ subcommands : categoryCommands ,
178
+ } ,
179
+ {
180
+ name : "predictions" ,
181
+ subcommands : categoryCommands ,
182
+ } ,
183
+ {
184
+ name : "storage" ,
185
+ subcommands : categoryCommands ,
186
+ } ,
187
+ {
188
+ name : "xr" ,
189
+ subcommands : categoryCommands ,
190
+ } ,
191
+ {
192
+ name : "mock" ,
193
+ description : "Run mock server for testing categories locally" ,
194
+ } ,
195
+ {
196
+ name : "codegen" ,
197
+ description :
198
+ "Generates GraphQL statements(queries, mutations and eventHandlers) and type annotations" ,
199
+ } ,
200
+ {
201
+ name : "console" ,
202
+ description : "Opens the web console for the selected cloud resource" ,
203
+ } ,
204
+ {
205
+ name : "logout" ,
206
+ description :
207
+ "If using temporary cloud provider credentials, this logs out of the account" ,
208
+ } ,
209
+
16
210
{
17
211
name : "env" ,
18
212
description : "Display all commands available for new Amplify project" ,
0 commit comments