@capuchoo/cli 0.7.0 → 0.9.0
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/README.md +231 -22
- package/bin/run.js +22 -0
- package/dist/cli/members.d.ts +23 -0
- package/dist/cli/members.d.ts.map +1 -0
- package/dist/cli/members.js +38 -0
- package/dist/cli/members.js.map +1 -0
- package/dist/cli/menu.d.ts +38 -0
- package/dist/cli/menu.d.ts.map +1 -0
- package/dist/cli/menu.js +62 -0
- package/dist/cli/menu.js.map +1 -0
- package/dist/cli/onboarding.d.ts +41 -0
- package/dist/cli/onboarding.d.ts.map +1 -0
- package/dist/cli/onboarding.js +94 -0
- package/dist/cli/onboarding.js.map +1 -0
- package/dist/cli/prompts.d.ts +15 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +42 -0
- package/dist/cli/prompts.js.map +1 -1
- package/dist/cli/team.d.ts +16 -0
- package/dist/cli/team.d.ts.map +1 -0
- package/dist/cli/team.js +32 -0
- package/dist/cli/team.js.map +1 -0
- package/dist/commands/app/grant.d.ts +11 -0
- package/dist/commands/app/grant.d.ts.map +1 -0
- package/dist/commands/app/grant.js +31 -0
- package/dist/commands/app/grant.js.map +1 -0
- package/dist/commands/app/list.d.ts.map +1 -1
- package/dist/commands/app/list.js +2 -1
- package/dist/commands/app/list.js.map +1 -1
- package/dist/commands/app/revoke.d.ts +13 -0
- package/dist/commands/app/revoke.d.ts.map +1 -0
- package/dist/commands/app/revoke.js +40 -0
- package/dist/commands/app/revoke.js.map +1 -0
- package/dist/commands/app/roles.d.ts +7 -0
- package/dist/commands/app/roles.d.ts.map +1 -0
- package/dist/commands/app/roles.js +30 -0
- package/dist/commands/app/roles.js.map +1 -0
- package/dist/commands/auth/issue.d.ts +12 -0
- package/dist/commands/auth/issue.d.ts.map +1 -0
- package/dist/commands/auth/issue.js +52 -0
- package/dist/commands/auth/issue.js.map +1 -0
- package/dist/commands/auth/keys.d.ts +7 -0
- package/dist/commands/auth/keys.d.ts.map +1 -0
- package/dist/commands/auth/keys.js +39 -0
- package/dist/commands/auth/keys.js.map +1 -0
- package/dist/commands/auth/login.d.ts +20 -0
- package/dist/commands/auth/login.d.ts.map +1 -1
- package/dist/commands/auth/login.js +90 -11
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/revoke.d.ts +13 -0
- package/dist/commands/auth/revoke.d.ts.map +1 -0
- package/dist/commands/auth/revoke.js +48 -0
- package/dist/commands/auth/revoke.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts.map +1 -1
- package/dist/commands/auth/whoami.js +2 -1
- package/dist/commands/auth/whoami.js.map +1 -1
- package/dist/commands/channel/list.d.ts.map +1 -1
- package/dist/commands/channel/list.js +2 -1
- package/dist/commands/channel/list.js.map +1 -1
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +86 -13
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +35 -3
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +121 -29
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/menu.d.ts +42 -0
- package/dist/commands/menu.d.ts.map +1 -0
- package/dist/commands/menu.js +185 -0
- package/dist/commands/menu.js.map +1 -0
- package/dist/commands/org/invite.d.ts +14 -0
- package/dist/commands/org/invite.d.ts.map +1 -0
- package/dist/commands/org/invite.js +52 -0
- package/dist/commands/org/invite.js.map +1 -0
- package/dist/commands/org/members.d.ts +10 -0
- package/dist/commands/org/members.d.ts.map +1 -0
- package/dist/commands/org/members.js +49 -0
- package/dist/commands/org/members.js.map +1 -0
- package/dist/deploy/execute.d.ts.map +1 -1
- package/dist/deploy/execute.js +25 -5
- package/dist/deploy/execute.js.map +1 -1
- package/dist/deploy/signing.d.ts +24 -0
- package/dist/deploy/signing.d.ts.map +1 -0
- package/dist/deploy/signing.js +57 -0
- package/dist/deploy/signing.js.map +1 -0
- package/dist/pipeline/android-signing.d.ts +41 -0
- package/dist/pipeline/android-signing.d.ts.map +1 -0
- package/dist/pipeline/android-signing.js +82 -0
- package/dist/pipeline/android-signing.js.map +1 -0
- package/dist/pipeline/app-identity.d.ts +35 -0
- package/dist/pipeline/app-identity.d.ts.map +1 -0
- package/dist/pipeline/app-identity.js +109 -0
- package/dist/pipeline/app-identity.js.map +1 -0
- package/dist/pipeline/capacitor-support.d.ts +1 -1
- package/dist/pipeline/capacitor-support.js +1 -1
- package/dist/services/cloud.d.ts +82 -2
- package/dist/services/cloud.d.ts.map +1 -1
- package/dist/services/cloud.js +85 -4
- package/dist/services/cloud.js.map +1 -1
- package/dist/utils/http.d.ts +5 -0
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/http.js +13 -2
- package/dist/utils/http.js.map +1 -1
- package/oclif.manifest.json +397 -84
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ $ npm install -g @capuchoo/cli
|
|
|
29
29
|
$ capuchoo COMMAND
|
|
30
30
|
running command...
|
|
31
31
|
$ capuchoo (--version)
|
|
32
|
-
@capuchoo/cli/0.
|
|
32
|
+
@capuchoo/cli/0.9.0 win32-x64 node-v24.20.0
|
|
33
33
|
$ capuchoo --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ capuchoo COMMAND
|
|
@@ -43,9 +43,15 @@ USAGE
|
|
|
43
43
|
<!-- commands -->
|
|
44
44
|
|
|
45
45
|
- [`capuchoo app delete [APPID]`](#capuchoo-app-delete-appid)
|
|
46
|
+
- [`capuchoo app grant EMAIL ROLE`](#capuchoo-app-grant-email-role)
|
|
46
47
|
- [`capuchoo app list`](#capuchoo-app-list)
|
|
48
|
+
- [`capuchoo app revoke EMAIL`](#capuchoo-app-revoke-email)
|
|
49
|
+
- [`capuchoo app roles`](#capuchoo-app-roles)
|
|
50
|
+
- [`capuchoo auth issue`](#capuchoo-auth-issue)
|
|
51
|
+
- [`capuchoo auth keys`](#capuchoo-auth-keys)
|
|
47
52
|
- [`capuchoo auth login`](#capuchoo-auth-login)
|
|
48
53
|
- [`capuchoo auth logout`](#capuchoo-auth-logout)
|
|
54
|
+
- [`capuchoo auth revoke ID`](#capuchoo-auth-revoke-id)
|
|
49
55
|
- [`capuchoo auth whoami`](#capuchoo-auth-whoami)
|
|
50
56
|
- [`capuchoo channel create [NAME]`](#capuchoo-channel-create-name)
|
|
51
57
|
- [`capuchoo channel delete [NAME]`](#capuchoo-channel-delete-name)
|
|
@@ -57,8 +63,11 @@ USAGE
|
|
|
57
63
|
- [`capuchoo doctor`](#capuchoo-doctor)
|
|
58
64
|
- [`capuchoo help [COMMAND]`](#capuchoo-help-command)
|
|
59
65
|
- [`capuchoo init`](#capuchoo-init)
|
|
66
|
+
- [`capuchoo menu`](#capuchoo-menu)
|
|
60
67
|
- [`capuchoo org create [NAME]`](#capuchoo-org-create-name)
|
|
68
|
+
- [`capuchoo org invite EMAIL ROLE`](#capuchoo-org-invite-email-role)
|
|
61
69
|
- [`capuchoo org list`](#capuchoo-org-list)
|
|
70
|
+
- [`capuchoo org members`](#capuchoo-org-members)
|
|
62
71
|
- [`capuchoo setup`](#capuchoo-setup)
|
|
63
72
|
- [`capuchoo version bump TYPE`](#capuchoo-version-bump-type)
|
|
64
73
|
- [`capuchoo version sync`](#capuchoo-version-sync)
|
|
@@ -85,7 +94,31 @@ EXAMPLES
|
|
|
85
94
|
```
|
|
86
95
|
|
|
87
96
|
_See code:
|
|
88
|
-
[src/commands/app/delete.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
97
|
+
[src/commands/app/delete.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/app/delete.ts)_
|
|
98
|
+
|
|
99
|
+
## `capuchoo app grant EMAIL ROLE`
|
|
100
|
+
|
|
101
|
+
Give someone a role on this app
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
USAGE
|
|
105
|
+
$ capuchoo app grant EMAIL ROLE
|
|
106
|
+
|
|
107
|
+
ARGUMENTS
|
|
108
|
+
EMAIL Account to grant
|
|
109
|
+
ROLE (admin|developer|tester|viewer) One of admin, developer, tester, viewer
|
|
110
|
+
|
|
111
|
+
DESCRIPTION
|
|
112
|
+
Give someone a role on this app
|
|
113
|
+
|
|
114
|
+
EXAMPLES
|
|
115
|
+
$ capuchoo app grant dev@company.com developer
|
|
116
|
+
|
|
117
|
+
$ capuchoo app grant qa@company.com tester
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
_See code:
|
|
121
|
+
[src/commands/app/grant.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/app/grant.ts)_
|
|
89
122
|
|
|
90
123
|
## `capuchoo app list`
|
|
91
124
|
|
|
@@ -103,11 +136,97 @@ DESCRIPTION
|
|
|
103
136
|
```
|
|
104
137
|
|
|
105
138
|
_See code:
|
|
106
|
-
[src/commands/app/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
139
|
+
[src/commands/app/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/app/list.ts)_
|
|
140
|
+
|
|
141
|
+
## `capuchoo app revoke EMAIL`
|
|
142
|
+
|
|
143
|
+
Remove someone's role on this app
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
USAGE
|
|
147
|
+
$ capuchoo app revoke EMAIL [-y]
|
|
148
|
+
|
|
149
|
+
ARGUMENTS
|
|
150
|
+
EMAIL Account to revoke
|
|
151
|
+
|
|
152
|
+
FLAGS
|
|
153
|
+
-y, --yes Skip the confirmation
|
|
154
|
+
|
|
155
|
+
DESCRIPTION
|
|
156
|
+
Remove someone's role on this app
|
|
157
|
+
|
|
158
|
+
EXAMPLES
|
|
159
|
+
$ capuchoo app revoke dev@company.com
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
_See code:
|
|
163
|
+
[src/commands/app/revoke.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/app/revoke.ts)_
|
|
164
|
+
|
|
165
|
+
## `capuchoo app roles`
|
|
166
|
+
|
|
167
|
+
Show who can do what on this app
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
USAGE
|
|
171
|
+
$ capuchoo app roles
|
|
172
|
+
|
|
173
|
+
DESCRIPTION
|
|
174
|
+
Show who can do what on this app
|
|
175
|
+
|
|
176
|
+
EXAMPLES
|
|
177
|
+
$ capuchoo app roles
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
_See code:
|
|
181
|
+
[src/commands/app/roles.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/app/roles.ts)_
|
|
182
|
+
|
|
183
|
+
## `capuchoo auth issue`
|
|
184
|
+
|
|
185
|
+
Create an API key, optionally limited to one app and one role
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
USAGE
|
|
189
|
+
$ capuchoo auth issue [--name <value>] [--role viewer|tester|developer|admin] [--this-app]
|
|
190
|
+
|
|
191
|
+
FLAGS
|
|
192
|
+
--name=<value> Label shown in capuchoo auth keys
|
|
193
|
+
--role=<option> Ceiling on what the key may do: viewer, tester, developer, admin
|
|
194
|
+
<options: viewer|tester|developer|admin>
|
|
195
|
+
--this-app Restrict the key to the app this directory is linked to
|
|
196
|
+
|
|
197
|
+
DESCRIPTION
|
|
198
|
+
Create an API key, optionally limited to one app and one role
|
|
199
|
+
|
|
200
|
+
EXAMPLES
|
|
201
|
+
$ capuchoo auth issue --name ci --role developer --this-app
|
|
202
|
+
|
|
203
|
+
$ capuchoo auth issue --name readonly --role viewer
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
_See code:
|
|
207
|
+
[src/commands/auth/issue.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/issue.ts)_
|
|
208
|
+
|
|
209
|
+
## `capuchoo auth keys`
|
|
210
|
+
|
|
211
|
+
List the API keys on this account
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
USAGE
|
|
215
|
+
$ capuchoo auth keys
|
|
216
|
+
|
|
217
|
+
DESCRIPTION
|
|
218
|
+
List the API keys on this account
|
|
219
|
+
|
|
220
|
+
EXAMPLES
|
|
221
|
+
$ capuchoo auth keys
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
_See code:
|
|
225
|
+
[src/commands/auth/keys.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/keys.ts)_
|
|
107
226
|
|
|
108
227
|
## `capuchoo auth login`
|
|
109
228
|
|
|
110
|
-
|
|
229
|
+
Sign in to a Capuchoo backend
|
|
111
230
|
|
|
112
231
|
```
|
|
113
232
|
USAGE
|
|
@@ -118,7 +237,7 @@ FLAGS
|
|
|
118
237
|
-k, --api-key=<value> API key from Settings > API Keys in the dashboard
|
|
119
238
|
|
|
120
239
|
DESCRIPTION
|
|
121
|
-
|
|
240
|
+
Sign in to a Capuchoo backend
|
|
122
241
|
|
|
123
242
|
EXAMPLES
|
|
124
243
|
$ capuchoo auth login
|
|
@@ -127,7 +246,7 @@ EXAMPLES
|
|
|
127
246
|
```
|
|
128
247
|
|
|
129
248
|
_See code:
|
|
130
|
-
[src/commands/auth/login.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
249
|
+
[src/commands/auth/login.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/login.ts)_
|
|
131
250
|
|
|
132
251
|
## `capuchoo auth logout`
|
|
133
252
|
|
|
@@ -142,7 +261,31 @@ DESCRIPTION
|
|
|
142
261
|
```
|
|
143
262
|
|
|
144
263
|
_See code:
|
|
145
|
-
[src/commands/auth/logout.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
264
|
+
[src/commands/auth/logout.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/logout.ts)_
|
|
265
|
+
|
|
266
|
+
## `capuchoo auth revoke ID`
|
|
267
|
+
|
|
268
|
+
Revoke an API key
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
USAGE
|
|
272
|
+
$ capuchoo auth revoke ID [-y]
|
|
273
|
+
|
|
274
|
+
ARGUMENTS
|
|
275
|
+
ID Key id, from capuchoo auth keys
|
|
276
|
+
|
|
277
|
+
FLAGS
|
|
278
|
+
-y, --yes Skip the confirmation
|
|
279
|
+
|
|
280
|
+
DESCRIPTION
|
|
281
|
+
Revoke an API key
|
|
282
|
+
|
|
283
|
+
EXAMPLES
|
|
284
|
+
$ capuchoo auth revoke <id>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
_See code:
|
|
288
|
+
[src/commands/auth/revoke.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/revoke.ts)_
|
|
146
289
|
|
|
147
290
|
## `capuchoo auth whoami`
|
|
148
291
|
|
|
@@ -160,7 +303,7 @@ DESCRIPTION
|
|
|
160
303
|
```
|
|
161
304
|
|
|
162
305
|
_See code:
|
|
163
|
-
[src/commands/auth/whoami.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
306
|
+
[src/commands/auth/whoami.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/auth/whoami.ts)_
|
|
164
307
|
|
|
165
308
|
## `capuchoo channel create [NAME]`
|
|
166
309
|
|
|
@@ -191,7 +334,7 @@ EXAMPLES
|
|
|
191
334
|
```
|
|
192
335
|
|
|
193
336
|
_See code:
|
|
194
|
-
[src/commands/channel/create.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
337
|
+
[src/commands/channel/create.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/channel/create.ts)_
|
|
195
338
|
|
|
196
339
|
## `capuchoo channel delete [NAME]`
|
|
197
340
|
|
|
@@ -217,7 +360,7 @@ EXAMPLES
|
|
|
217
360
|
```
|
|
218
361
|
|
|
219
362
|
_See code:
|
|
220
|
-
[src/commands/channel/delete.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
363
|
+
[src/commands/channel/delete.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/channel/delete.ts)_
|
|
221
364
|
|
|
222
365
|
## `capuchoo channel list`
|
|
223
366
|
|
|
@@ -235,7 +378,7 @@ DESCRIPTION
|
|
|
235
378
|
```
|
|
236
379
|
|
|
237
380
|
_See code:
|
|
238
|
-
[src/commands/channel/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
381
|
+
[src/commands/channel/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/channel/list.ts)_
|
|
239
382
|
|
|
240
383
|
## `capuchoo config list`
|
|
241
384
|
|
|
@@ -253,7 +396,7 @@ DESCRIPTION
|
|
|
253
396
|
```
|
|
254
397
|
|
|
255
398
|
_See code:
|
|
256
|
-
[src/commands/config/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
399
|
+
[src/commands/config/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/config/list.ts)_
|
|
257
400
|
|
|
258
401
|
## `capuchoo config set KEY VALUE`
|
|
259
402
|
|
|
@@ -277,7 +420,7 @@ EXAMPLES
|
|
|
277
420
|
```
|
|
278
421
|
|
|
279
422
|
_See code:
|
|
280
|
-
[src/commands/config/set.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
423
|
+
[src/commands/config/set.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/config/set.ts)_
|
|
281
424
|
|
|
282
425
|
## `capuchoo deploy native`
|
|
283
426
|
|
|
@@ -321,7 +464,7 @@ EXAMPLES
|
|
|
321
464
|
```
|
|
322
465
|
|
|
323
466
|
_See code:
|
|
324
|
-
[src/commands/deploy/native.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
467
|
+
[src/commands/deploy/native.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/deploy/native.ts)_
|
|
325
468
|
|
|
326
469
|
## `capuchoo deploy ota`
|
|
327
470
|
|
|
@@ -358,7 +501,7 @@ EXAMPLES
|
|
|
358
501
|
```
|
|
359
502
|
|
|
360
503
|
_See code:
|
|
361
|
-
[src/commands/deploy/ota.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
504
|
+
[src/commands/deploy/ota.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/deploy/ota.ts)_
|
|
362
505
|
|
|
363
506
|
## `capuchoo doctor`
|
|
364
507
|
|
|
@@ -376,7 +519,7 @@ EXAMPLES
|
|
|
376
519
|
```
|
|
377
520
|
|
|
378
521
|
_See code:
|
|
379
|
-
[src/commands/doctor.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
522
|
+
[src/commands/doctor.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/doctor.ts)_
|
|
380
523
|
|
|
381
524
|
## `capuchoo help [COMMAND]`
|
|
382
525
|
|
|
@@ -430,7 +573,27 @@ EXAMPLES
|
|
|
430
573
|
```
|
|
431
574
|
|
|
432
575
|
_See code:
|
|
433
|
-
[src/commands/init.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
576
|
+
[src/commands/init.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/init.ts)_
|
|
577
|
+
|
|
578
|
+
## `capuchoo menu`
|
|
579
|
+
|
|
580
|
+
Browse and run commands interactively
|
|
581
|
+
|
|
582
|
+
```
|
|
583
|
+
USAGE
|
|
584
|
+
$ capuchoo menu
|
|
585
|
+
|
|
586
|
+
DESCRIPTION
|
|
587
|
+
Browse and run commands interactively
|
|
588
|
+
|
|
589
|
+
EXAMPLES
|
|
590
|
+
$ capuchoo
|
|
591
|
+
|
|
592
|
+
$ capuchoo menu
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
_See code:
|
|
596
|
+
[src/commands/menu.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/menu.ts)_
|
|
434
597
|
|
|
435
598
|
## `capuchoo org create [NAME]`
|
|
436
599
|
|
|
@@ -456,7 +619,32 @@ EXAMPLES
|
|
|
456
619
|
```
|
|
457
620
|
|
|
458
621
|
_See code:
|
|
459
|
-
[src/commands/org/create.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
622
|
+
[src/commands/org/create.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/org/create.ts)_
|
|
623
|
+
|
|
624
|
+
## `capuchoo org invite EMAIL ROLE`
|
|
625
|
+
|
|
626
|
+
Add an existing account to an organization
|
|
627
|
+
|
|
628
|
+
```
|
|
629
|
+
USAGE
|
|
630
|
+
$ capuchoo org invite EMAIL ROLE [--org <value>]
|
|
631
|
+
|
|
632
|
+
ARGUMENTS
|
|
633
|
+
EMAIL Account to add
|
|
634
|
+
ROLE (owner|admin|member) One of owner, admin, member
|
|
635
|
+
|
|
636
|
+
FLAGS
|
|
637
|
+
--org=<value> Organization by name or id
|
|
638
|
+
|
|
639
|
+
DESCRIPTION
|
|
640
|
+
Add an existing account to an organization
|
|
641
|
+
|
|
642
|
+
EXAMPLES
|
|
643
|
+
$ capuchoo org invite dev@company.com member
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
_See code:
|
|
647
|
+
[src/commands/org/invite.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/org/invite.ts)_
|
|
460
648
|
|
|
461
649
|
## `capuchoo org list`
|
|
462
650
|
|
|
@@ -474,7 +662,28 @@ DESCRIPTION
|
|
|
474
662
|
```
|
|
475
663
|
|
|
476
664
|
_See code:
|
|
477
|
-
[src/commands/org/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
665
|
+
[src/commands/org/list.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/org/list.ts)_
|
|
666
|
+
|
|
667
|
+
## `capuchoo org members`
|
|
668
|
+
|
|
669
|
+
List the people in an organization
|
|
670
|
+
|
|
671
|
+
```
|
|
672
|
+
USAGE
|
|
673
|
+
$ capuchoo org members [--org <value>]
|
|
674
|
+
|
|
675
|
+
FLAGS
|
|
676
|
+
--org=<value> Organization by name or id
|
|
677
|
+
|
|
678
|
+
DESCRIPTION
|
|
679
|
+
List the people in an organization
|
|
680
|
+
|
|
681
|
+
EXAMPLES
|
|
682
|
+
$ capuchoo org members
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
_See code:
|
|
686
|
+
[src/commands/org/members.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/org/members.ts)_
|
|
478
687
|
|
|
479
688
|
## `capuchoo setup`
|
|
480
689
|
|
|
@@ -503,7 +712,7 @@ EXAMPLES
|
|
|
503
712
|
```
|
|
504
713
|
|
|
505
714
|
_See code:
|
|
506
|
-
[src/commands/setup.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
715
|
+
[src/commands/setup.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/setup.ts)_
|
|
507
716
|
|
|
508
717
|
## `capuchoo version bump TYPE`
|
|
509
718
|
|
|
@@ -530,7 +739,7 @@ EXAMPLES
|
|
|
530
739
|
```
|
|
531
740
|
|
|
532
741
|
_See code:
|
|
533
|
-
[src/commands/version/bump.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
742
|
+
[src/commands/version/bump.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/version/bump.ts)_
|
|
534
743
|
|
|
535
744
|
## `capuchoo version sync`
|
|
536
745
|
|
|
@@ -556,5 +765,5 @@ EXAMPLES
|
|
|
556
765
|
```
|
|
557
766
|
|
|
558
767
|
_See code:
|
|
559
|
-
[src/commands/version/sync.ts](https://github.com/aybinv7/capuchoo/blob/v0.
|
|
768
|
+
[src/commands/version/sync.ts](https://github.com/aybinv7/capuchoo/blob/v0.9.0/src/commands/version/sync.ts)_
|
|
560
769
|
<!-- commandsstop -->
|
package/bin/run.js
CHANGED
|
@@ -2,4 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
import { execute } from "@oclif/core";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A bare `capuchoo` in a terminal opens the menu.
|
|
7
|
+
*
|
|
8
|
+
* oclif's default is to print help and exit, which is a dead end: you read a
|
|
9
|
+
* list of topics, type one, read another list, type a subcommand, and get
|
|
10
|
+
* `command channeml not found` for a typo. `menu` is a loop instead.
|
|
11
|
+
*
|
|
12
|
+
* Done here rather than with a `commands/index.ts`, which is how oclif is
|
|
13
|
+
* usually told about a root command - that file makes it treat the whole CLI as
|
|
14
|
+
* a *single-command* program, and every other command stops resolving with
|
|
15
|
+
* `MODULE_NOT_FOUND ... Symbol(SINGLE_COMMAND_CLI)`. Injecting the argument
|
|
16
|
+
* leaves oclif's multi-command resolution alone.
|
|
17
|
+
*
|
|
18
|
+
* Only with a real terminal on both ends. A script or CI job that runs
|
|
19
|
+
* `capuchoo` with no arguments still gets help and exits, rather than blocking
|
|
20
|
+
* forever on a prompt nothing can answer.
|
|
21
|
+
*/
|
|
22
|
+
const bare = process.argv.length === 2;
|
|
23
|
+
const interactive = process.stdin.isTTY && process.stdout.isTTY;
|
|
24
|
+
|
|
25
|
+
if (bare && interactive) process.argv.push("menu");
|
|
26
|
+
|
|
5
27
|
await execute({ dir: import.meta.url });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Membership } from "../services/cloud.js";
|
|
2
|
+
/** The email on a membership row, or the raw user id when the join came back empty. */
|
|
3
|
+
export declare function emailOf(member: Membership): string;
|
|
4
|
+
export interface Resolution {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
userId?: string;
|
|
7
|
+
/** What to tell the caller when it failed. */
|
|
8
|
+
problem?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Finds a member by email, case-insensitively.
|
|
12
|
+
*
|
|
13
|
+
* Resolved from a list the caller already has rather than by asking the server
|
|
14
|
+
* to look an address up: there is no such endpoint, and adding one would be an
|
|
15
|
+
* email enumeration surface.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveByEmail(members: Membership[], email: string): Resolution;
|
|
18
|
+
/** Rows for a table, widest-email-first so the roles line up. */
|
|
19
|
+
export declare function membershipRows(members: Membership[]): Array<{
|
|
20
|
+
email: string;
|
|
21
|
+
role: string;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/cli/members.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAElD;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAwB/E;AAED,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAI5F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** The email on a membership row, or the raw user id when the join came back empty. */
|
|
2
|
+
export function emailOf(member) {
|
|
3
|
+
return member.users?.email ?? member.user_id;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Finds a member by email, case-insensitively.
|
|
7
|
+
*
|
|
8
|
+
* Resolved from a list the caller already has rather than by asking the server
|
|
9
|
+
* to look an address up: there is no such endpoint, and adding one would be an
|
|
10
|
+
* email enumeration surface.
|
|
11
|
+
*/
|
|
12
|
+
export function resolveByEmail(members, email) {
|
|
13
|
+
const wanted = email.trim().toLowerCase();
|
|
14
|
+
if (!wanted)
|
|
15
|
+
return { ok: false, problem: "An email is required." };
|
|
16
|
+
const matches = members.filter((member) => emailOf(member).toLowerCase() === wanted);
|
|
17
|
+
if (matches.length === 0) {
|
|
18
|
+
const known = members.map(emailOf).sort();
|
|
19
|
+
return {
|
|
20
|
+
ok: false,
|
|
21
|
+
problem: `No member with the email "${email}". ` +
|
|
22
|
+
(known.length > 0 ? `Present: ${known.join(", ")}.` : "There are none yet."),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
// A duplicate would make the choice arbitrary, and removing the wrong person
|
|
26
|
+
// is not recoverable from here.
|
|
27
|
+
if (matches.length > 1) {
|
|
28
|
+
return { ok: false, problem: `"${email}" matches ${matches.length} members. Resolve by hand.` };
|
|
29
|
+
}
|
|
30
|
+
return { ok: true, userId: matches[0].user_id };
|
|
31
|
+
}
|
|
32
|
+
/** Rows for a table, widest-email-first so the roles line up. */
|
|
33
|
+
export function membershipRows(members) {
|
|
34
|
+
return members
|
|
35
|
+
.map((member) => ({ email: emailOf(member), role: member.role }))
|
|
36
|
+
.sort((a, b) => a.email.localeCompare(b.email));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/cli/members.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,MAAM,UAAU,OAAO,CAAC,MAAkB;IACxC,OAAO,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC;AAC/C,CAAC;AASD;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAqB,EAAE,KAAa;IACjE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAE1C,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IAEpE,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC;IAErF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,OAAO;YACL,EAAE,EAAE,KAAK;YACT,OAAO,EACL,6BAA6B,KAAK,KAAK;gBACvC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,qBAAqB,CAAC;SAC/E,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,gCAAgC;IAChC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,KAAK,aAAa,OAAO,CAAC,MAAM,4BAA4B,EAAE,CAAC;IAClG,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAE,CAAC,OAAO,EAAE,CAAC;AACnD,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,cAAc,CAAC,OAAqB;IAClD,OAAO,OAAO;SACX,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SAChE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of the interactive menu, built from oclif's command registry so it
|
|
3
|
+
* cannot drift. Pure, so the entries and their order are testable.
|
|
4
|
+
*/
|
|
5
|
+
export interface MenuCommand {
|
|
6
|
+
/** oclif command id, e.g. `deploy:ota`. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** What to show: the last segment, e.g. `ota`. */
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MenuTopic {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
commands: MenuCommand[];
|
|
16
|
+
}
|
|
17
|
+
export interface Menu {
|
|
18
|
+
/** Commands that live under a topic. */
|
|
19
|
+
topics: MenuTopic[];
|
|
20
|
+
/** Commands with no topic, e.g. `doctor`. */
|
|
21
|
+
commands: MenuCommand[];
|
|
22
|
+
}
|
|
23
|
+
export interface CommandLike {
|
|
24
|
+
id: string;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
hidden?: boolean | undefined;
|
|
27
|
+
}
|
|
28
|
+
export interface TopicLike {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare function buildMenu(input: {
|
|
33
|
+
commands: CommandLike[];
|
|
34
|
+
topics: TopicLike[];
|
|
35
|
+
}): Menu;
|
|
36
|
+
/** How many runnable commands the menu offers, for the header line. */
|
|
37
|
+
export declare function menuSize(menu: Menu): number;
|
|
38
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/cli/menu.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,IAAI;IACnB,wCAAwC;IACxC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAwBD,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG,IAAI,CAwCvF;AAED,uEAAuE;AACvE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE3C"}
|
package/dist/cli/menu.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of the interactive menu, built from oclif's command registry so it
|
|
3
|
+
* cannot drift. Pure, so the entries and their order are testable.
|
|
4
|
+
*/
|
|
5
|
+
/** Never offered: `help` duplicates the menu, and the others are the menu. */
|
|
6
|
+
const HIDDEN_IDS = new Set(["", "help", "menu"]);
|
|
7
|
+
/** First-session order; everything else follows alphabetically. */
|
|
8
|
+
const PRIORITY = ["setup", "init", "doctor", "deploy", "channel", "version", "config"];
|
|
9
|
+
function byPriorityThenName(a, b) {
|
|
10
|
+
const rankA = PRIORITY.indexOf(a);
|
|
11
|
+
const rankB = PRIORITY.indexOf(b);
|
|
12
|
+
if (rankA !== -1 && rankB !== -1)
|
|
13
|
+
return rankA - rankB;
|
|
14
|
+
if (rankA !== -1)
|
|
15
|
+
return -1;
|
|
16
|
+
if (rankB !== -1)
|
|
17
|
+
return 1;
|
|
18
|
+
return a.localeCompare(b);
|
|
19
|
+
}
|
|
20
|
+
/** The segment shown in a menu: `deploy:ota` reads as `ota` under `deploy`. */
|
|
21
|
+
function lastSegment(id) {
|
|
22
|
+
const parts = id.split(":");
|
|
23
|
+
return parts[parts.length - 1] ?? id;
|
|
24
|
+
}
|
|
25
|
+
export function buildMenu(input) {
|
|
26
|
+
const visible = input.commands.filter((command) => !command.hidden && !HIDDEN_IDS.has(command.id));
|
|
27
|
+
const describedTopics = new Map(input.topics.map((topic) => [topic.name, topic.description]));
|
|
28
|
+
const grouped = new Map();
|
|
29
|
+
const loose = [];
|
|
30
|
+
for (const command of visible) {
|
|
31
|
+
const entry = {
|
|
32
|
+
id: command.id,
|
|
33
|
+
label: lastSegment(command.id),
|
|
34
|
+
description: command.description ?? "",
|
|
35
|
+
};
|
|
36
|
+
const topic = command.id.includes(":") ? command.id.split(":")[0] : null;
|
|
37
|
+
if (topic) {
|
|
38
|
+
grouped.set(topic, [...(grouped.get(topic) ?? []), entry]);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
loose.push(entry);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const topics = [...grouped.entries()]
|
|
45
|
+
.map(([name, commands]) => ({
|
|
46
|
+
name,
|
|
47
|
+
// A topic with no description in package.json still has to read as
|
|
48
|
+
// something, so it falls back to its own name rather than an empty line.
|
|
49
|
+
description: describedTopics.get(name) ?? name,
|
|
50
|
+
commands: commands.sort((a, b) => byPriorityThenName(a.label, b.label)),
|
|
51
|
+
}))
|
|
52
|
+
.sort((a, b) => byPriorityThenName(a.name, b.name));
|
|
53
|
+
return {
|
|
54
|
+
topics,
|
|
55
|
+
commands: loose.sort((a, b) => byPriorityThenName(a.label, b.label)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** How many runnable commands the menu offers, for the header line. */
|
|
59
|
+
export function menuSize(menu) {
|
|
60
|
+
return menu.commands.length + menu.topics.reduce((total, t) => total + t.commands.length, 0);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=menu.js.map
|
|
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AC,IAAI,IAAI;QAC9C,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;KACxE,CAAC,CAAC;SACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtD,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;KACrE,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** What the CLI can see about this machine and this directory. */
|
|
2
|
+
export interface OnboardingFacts {
|
|
3
|
+
signedIn: boolean;
|
|
4
|
+
/** Whether this looks like an application at all - a package.json. */
|
|
5
|
+
inAppDirectory: boolean;
|
|
6
|
+
/** Whether .capuchoo/project.json exists. */
|
|
7
|
+
linked: boolean;
|
|
8
|
+
updaterInstalled: boolean;
|
|
9
|
+
/** null when not fetched, or when the backend could not be reached. */
|
|
10
|
+
channels?: Array<{
|
|
11
|
+
name: string;
|
|
12
|
+
servingBundle: boolean;
|
|
13
|
+
}> | null | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface NextStep {
|
|
16
|
+
/** oclif command id. */
|
|
17
|
+
command: string;
|
|
18
|
+
label: string;
|
|
19
|
+
why: string;
|
|
20
|
+
}
|
|
21
|
+
export type Stage = "signed-out" | "not-an-app" | "unlinked" | "incomplete" | "no-channels" | "nothing-served" | "ready";
|
|
22
|
+
export interface OnboardingState {
|
|
23
|
+
stage: Stage;
|
|
24
|
+
/** The one thing to do now, or null when there is nothing to recommend. */
|
|
25
|
+
next: NextStep | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The single next action, so the first thing someone sees is a step rather than
|
|
29
|
+
* a list to guess from.
|
|
30
|
+
*
|
|
31
|
+
* Order is by dependency: nothing can be done unsigned, nothing app-specific
|
|
32
|
+
* without an app, nothing published without a channel.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveOnboarding(facts: OnboardingFacts): OnboardingState;
|
|
35
|
+
/** Commands worth hiding in this state, by oclif id. */
|
|
36
|
+
export declare function hiddenCommands(facts: OnboardingFacts): Set<string>;
|
|
37
|
+
/** A label that reads correctly for the current state, or null to keep the default. */
|
|
38
|
+
export declare function labelFor(command: string, facts: OnboardingFacts): string | null;
|
|
39
|
+
/** Whether only the next step should be offered, rather than the whole menu. */
|
|
40
|
+
export declare function isBlocked(state: OnboardingState): boolean;
|
|
41
|
+
//# sourceMappingURL=onboarding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/cli/onboarding.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,cAAc,EAAE,OAAO,CAAC;IACxB,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA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