@dxos/cli 0.1.53-main.09c4c35 → 0.1.53-main.0cd4c62
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 +64 -129
- package/dist/src/base-command.d.ts +3 -1
- package/dist/src/base-command.d.ts.map +1 -1
- package/dist/src/base-command.js +24 -14
- package/dist/src/base-command.js.map +1 -1
- package/dist/src/commands/agent/agent.test.d.ts +2 -0
- package/dist/src/commands/agent/agent.test.d.ts.map +1 -0
- package/dist/src/commands/agent/agent.test.js +186 -0
- package/dist/src/commands/agent/agent.test.js.map +1 -0
- package/dist/src/commands/agent/list.d.ts.map +1 -1
- package/dist/src/commands/agent/list.js +19 -1
- package/dist/src/commands/agent/list.js.map +1 -1
- package/dist/src/commands/agent/restart.d.ts.map +1 -1
- package/dist/src/commands/agent/restart.js +4 -2
- package/dist/src/commands/agent/restart.js.map +1 -1
- package/dist/src/commands/agent/start.d.ts +1 -0
- package/dist/src/commands/agent/start.d.ts.map +1 -1
- package/dist/src/commands/agent/start.js +10 -7
- package/dist/src/commands/agent/start.js.map +1 -1
- package/dist/src/commands/agent/stop.d.ts +2 -0
- package/dist/src/commands/agent/stop.d.ts.map +1 -1
- package/dist/src/commands/agent/stop.js +17 -7
- package/dist/src/commands/agent/stop.js.map +1 -1
- package/dist/src/commands/app/create.d.ts +1 -0
- package/dist/src/commands/app/create.d.ts.map +1 -1
- package/dist/src/commands/app/open.d.ts +1 -0
- package/dist/src/commands/app/open.d.ts.map +1 -1
- package/dist/src/commands/app/open.js +4 -4
- package/dist/src/commands/app/open.js.map +1 -1
- package/dist/src/commands/app/publish.d.ts +1 -0
- package/dist/src/commands/app/publish.d.ts.map +1 -1
- package/dist/src/commands/config/index.d.ts.map +1 -1
- package/dist/src/commands/config/index.js +3 -1
- package/dist/src/commands/config/index.js.map +1 -1
- package/dist/src/commands/debug/stats.d.ts +1 -0
- package/dist/src/commands/debug/stats.d.ts.map +1 -1
- package/dist/src/commands/debug/stats.js +21 -16
- package/dist/src/commands/debug/stats.js.map +1 -1
- package/dist/src/commands/function/dev-server.d.ts +2 -1
- package/dist/src/commands/function/dev-server.d.ts.map +1 -1
- package/dist/src/commands/function/dev-server.js +1 -1
- package/dist/src/commands/function/dev-server.js.map +1 -1
- package/dist/src/commands/halo/credential/list.d.ts +1 -0
- package/dist/src/commands/halo/credential/list.d.ts.map +1 -1
- package/dist/src/commands/halo/join.d.ts +1 -0
- package/dist/src/commands/halo/join.d.ts.map +1 -1
- package/dist/src/commands/halo/join.js +2 -2
- package/dist/src/commands/halo/join.js.map +1 -1
- package/dist/src/commands/halo/share.d.ts +1 -0
- package/dist/src/commands/halo/share.d.ts.map +1 -1
- package/dist/src/commands/halo/share.js +4 -4
- package/dist/src/commands/halo/share.js.map +1 -1
- package/dist/src/commands/kube/deploy.d.ts +1 -0
- package/dist/src/commands/kube/deploy.d.ts.map +1 -1
- package/dist/src/commands/reset/index.d.ts +1 -0
- package/dist/src/commands/reset/index.d.ts.map +1 -1
- package/dist/src/commands/reset/index.js +1 -1
- package/dist/src/commands/reset/index.js.map +1 -1
- package/dist/src/commands/space/create.d.ts.map +1 -1
- package/dist/src/commands/space/create.js +1 -29
- package/dist/src/commands/space/create.js.map +1 -1
- package/dist/src/commands/space/epoch.d.ts +1 -0
- package/dist/src/commands/space/epoch.d.ts.map +1 -1
- package/dist/src/commands/space/invite.d.ts.map +1 -1
- package/dist/src/commands/space/invite.js +2 -2
- package/dist/src/commands/space/invite.js.map +1 -1
- package/dist/src/commands/space/join.d.ts +1 -0
- package/dist/src/commands/space/join.d.ts.map +1 -1
- package/dist/src/commands/space/join.js +2 -2
- package/dist/src/commands/space/join.js.map +1 -1
- package/dist/src/commands/space/list.d.ts +1 -0
- package/dist/src/commands/space/list.d.ts.map +1 -1
- package/dist/src/commands/space/members.d.ts +1 -0
- package/dist/src/commands/space/members.d.ts.map +1 -1
- package/dist/src/commands/tunnel/set.d.ts +1 -0
- package/dist/src/commands/tunnel/set.d.ts.map +1 -1
- package/dist/src/help.d.ts +6 -0
- package/dist/src/help.d.ts.map +1 -0
- package/dist/src/help.js +31 -0
- package/dist/src/help.js.map +1 -0
- package/dist/src/hooks/command-not-found.d.ts +4 -0
- package/dist/src/hooks/command-not-found.d.ts.map +1 -0
- package/dist/src/hooks/command-not-found.js +14 -0
- package/dist/src/hooks/command-not-found.js.map +1 -0
- package/dist/src/util/invitation.d.ts +1 -1
- package/dist/src/util/invitation.d.ts.map +1 -1
- package/dist/src/util/invitation.js +7 -7
- package/dist/src/util/invitation.js.map +1 -1
- package/dist/src/util/print.d.ts +3 -4
- package/dist/src/util/print.d.ts.map +1 -1
- package/dist/src/util/print.js +2 -2
- package/dist/src/util/print.js.map +1 -1
- package/dist/src/util/publish/publisher-rpc-peer.d.ts.map +1 -1
- package/dist/src/util/publish/publisher-rpc-peer.js +4 -5
- package/dist/src/util/publish/publisher-rpc-peer.js.map +1 -1
- package/dist/src/util/supervisor/supervisor-rpc-peer.d.ts.map +1 -1
- package/dist/src/util/supervisor/supervisor-rpc-peer.js +4 -5
- package/dist/src/util/supervisor/supervisor-rpc-peer.js.map +1 -1
- package/dist/src/util/telemetry.d.ts.map +1 -1
- package/dist/src/util/telemetry.js.map +1 -1
- package/dist/src/util/telemetryrc.json +1 -1
- package/dist/src/util/test-util.d.ts +1 -0
- package/dist/src/util/test-util.d.ts.map +1 -1
- package/dist/src/util/test-util.js +14 -5
- package/dist/src/util/test-util.js.map +1 -1
- package/dist/src/util/tunnel/tunnel-rpc-peer.d.ts.map +1 -1
- package/dist/src/util/tunnel/tunnel-rpc-peer.js +4 -5
- package/dist/src/util/tunnel/tunnel-rpc-peer.js.map +1 -1
- package/dist/src/util/util.d.ts +1 -1
- package/dist/src/util/util.d.ts.map +1 -1
- package/oclif.manifest.json +29 -197
- package/package.json +31 -31
- package/dist/src/commands/debug/echo-test-data.d.ts +0 -19
- package/dist/src/commands/debug/echo-test-data.d.ts.map +0 -1
- package/dist/src/commands/debug/echo-test-data.js +0 -63
- package/dist/src/commands/debug/echo-test-data.js.map +0 -1
- package/dist/src/commands/device/invite.d.ts +0 -6
- package/dist/src/commands/device/invite.d.ts.map +0 -1
- package/dist/src/commands/device/invite.js +0 -36
- package/dist/src/commands/device/invite.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,21 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
DXOS command line interface.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!-- toc -->
|
|
6
|
+
* [DX CLI](#dx-cli)
|
|
7
|
+
* [Development](#development)
|
|
8
|
+
* [Usage](#usage)
|
|
9
|
+
<!-- tocstop -->
|
|
10
|
+
|
|
6
11
|
|
|
7
12
|
# Development
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
To build the CLI:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
nx run cli:build --watch=true
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run the CLI from the local directory:
|
|
10
21
|
|
|
11
22
|
```bash
|
|
12
|
-
|
|
23
|
+
./bin/run config --json
|
|
13
24
|
```
|
|
14
25
|
|
|
15
|
-
|
|
26
|
+
Or source the following script to set the `dx` alias from any directory in the repo.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
. $(git rev-parse --show-toplevel)/packages/devtools/cli/scripts/dev.sh
|
|
30
|
+
|
|
31
|
+
dx config --json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Resetting the CLI
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Reporting errors
|
|
40
|
+
|
|
41
|
+
Run the following command to create a gist of the debug stats.
|
|
16
42
|
|
|
17
43
|
```bash
|
|
18
|
-
|
|
19
|
-
$ ./bin/run config --json
|
|
44
|
+
dx debug stats --json --no-agent | gh gist create
|
|
20
45
|
```
|
|
21
46
|
|
|
22
47
|
# Usage
|
|
@@ -27,7 +52,7 @@ $ npm install -g @dxos/cli
|
|
|
27
52
|
$ dx COMMAND
|
|
28
53
|
running command...
|
|
29
54
|
$ dx (--version)
|
|
30
|
-
@dxos/cli/0.1.53-main.
|
|
55
|
+
@dxos/cli/0.1.53-main.0cd4c62 linux-x64 node-v18.16.1
|
|
31
56
|
$ dx --help [COMMAND]
|
|
32
57
|
USAGE
|
|
33
58
|
$ dx COMMAND
|
|
@@ -35,7 +60,7 @@ USAGE
|
|
|
35
60
|
```
|
|
36
61
|
<!-- usagestop -->
|
|
37
62
|
|
|
38
|
-
|
|
63
|
+
## Commands
|
|
39
64
|
|
|
40
65
|
<!-- commands -->
|
|
41
66
|
* [`dx agent list`](#dx-agent-list)
|
|
@@ -47,10 +72,8 @@ USAGE
|
|
|
47
72
|
* [`dx app open URL`](#dx-app-open-url)
|
|
48
73
|
* [`dx app publish`](#dx-app-publish)
|
|
49
74
|
* [`dx config`](#dx-config)
|
|
50
|
-
* [`dx debug echo-test-data [KEY]`](#dx-debug-echo-test-data-key)
|
|
51
75
|
* [`dx debug stats`](#dx-debug-stats)
|
|
52
76
|
* [`dx device`](#dx-device)
|
|
53
|
-
* [`dx device invite`](#dx-device-invite)
|
|
54
77
|
* [`dx device list`](#dx-device-list)
|
|
55
78
|
* [`dx function dev`](#dx-function-dev)
|
|
56
79
|
* [`dx function dev-server`](#dx-function-dev-server)
|
|
@@ -148,15 +171,13 @@ FLAGS
|
|
|
148
171
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
149
172
|
--dry-run Dry run.
|
|
150
173
|
--echo=port Expose ECHO REST API.
|
|
174
|
+
--json Output as JSON.
|
|
151
175
|
--monitor Run epoch monitoring.
|
|
152
176
|
--no-agent Auto-start agent.
|
|
153
177
|
--profile=<value> [default: default] User profile.
|
|
154
178
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
155
179
|
--web-socket=port Expose web socket port.
|
|
156
180
|
|
|
157
|
-
GLOBAL FLAGS
|
|
158
|
-
--json Format output as json.
|
|
159
|
-
|
|
160
181
|
DESCRIPTION
|
|
161
182
|
Starts the agent.
|
|
162
183
|
```
|
|
@@ -168,20 +189,19 @@ Stop agent daemon.
|
|
|
168
189
|
```
|
|
169
190
|
USAGE
|
|
170
191
|
$ dx agent stop [--json] [--dry-run] [-v] [--config <value> --profile <value>] [--no-agent] [--timeout
|
|
171
|
-
<value>] [
|
|
192
|
+
<value>] [--all] [--force]
|
|
172
193
|
|
|
173
194
|
FLAGS
|
|
174
|
-
-a, --all Stop all agents.
|
|
175
195
|
-v, --verbose Verbose output
|
|
196
|
+
--all Stop all agents.
|
|
176
197
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
177
198
|
--dry-run Dry run.
|
|
199
|
+
--force Force stop.
|
|
200
|
+
--json Output as JSON.
|
|
178
201
|
--no-agent Auto-start agent.
|
|
179
202
|
--profile=<value> [default: default] User profile.
|
|
180
203
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
181
204
|
|
|
182
|
-
GLOBAL FLAGS
|
|
183
|
-
--json Format output as json.
|
|
184
|
-
|
|
185
205
|
DESCRIPTION
|
|
186
206
|
Stop agent daemon.
|
|
187
207
|
```
|
|
@@ -205,14 +225,12 @@ FLAGS
|
|
|
205
225
|
-v, --verbose Verbose output
|
|
206
226
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
207
227
|
--dry-run Dry run.
|
|
228
|
+
--json Output as JSON.
|
|
208
229
|
--no-agent Auto-start agent.
|
|
209
230
|
--profile=<value> [default: default] User profile.
|
|
210
231
|
--tag=<value> Git tag or branch of the DXOS repo to checkout.
|
|
211
232
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
212
233
|
|
|
213
|
-
GLOBAL FLAGS
|
|
214
|
-
--json Format output as json.
|
|
215
|
-
|
|
216
234
|
DESCRIPTION
|
|
217
235
|
Manage applications.
|
|
218
236
|
```
|
|
@@ -284,15 +302,13 @@ FLAGS
|
|
|
284
302
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
285
303
|
--configPath=<value> Path to dx.yml
|
|
286
304
|
--dry-run Dry run.
|
|
305
|
+
--json Output as JSON.
|
|
287
306
|
--no-agent Auto-start agent.
|
|
288
307
|
--profile=<value> [default: default] User profile.
|
|
289
308
|
--skipExisting Do not update content on KUBE if version already exists.
|
|
290
309
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
291
310
|
--version=<value> Version of modules to publish.
|
|
292
311
|
|
|
293
|
-
GLOBAL FLAGS
|
|
294
|
-
--json Format output as json.
|
|
295
|
-
|
|
296
312
|
DESCRIPTION
|
|
297
313
|
Publish apps.
|
|
298
314
|
```
|
|
@@ -320,35 +336,6 @@ DESCRIPTION
|
|
|
320
336
|
Show config file.
|
|
321
337
|
```
|
|
322
338
|
|
|
323
|
-
## `dx debug echo-test-data [KEY]`
|
|
324
|
-
|
|
325
|
-
Pollutes selected space with test data.
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
USAGE
|
|
329
|
-
$ dx debug echo-test-data [KEY] [--json] [--dry-run] [-v] [--config <value> --profile <value>] [--no-agent] [--timeout
|
|
330
|
-
<value>] [--mutations <value>] [--epochEach <value>]
|
|
331
|
-
|
|
332
|
-
ARGUMENTS
|
|
333
|
-
KEY Space key head in hex.
|
|
334
|
-
|
|
335
|
-
FLAGS
|
|
336
|
-
-v, --verbose Verbose output
|
|
337
|
-
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
338
|
-
--dry-run Dry run.
|
|
339
|
-
--epochEach=<value> [default: 100] Epoch each N mutations.
|
|
340
|
-
--mutations=<value> [default: 10000] Number of mutations.
|
|
341
|
-
--no-agent Auto-start agent.
|
|
342
|
-
--profile=<value> [default: default] User profile.
|
|
343
|
-
--timeout=<value> [default: 30] Timeout in seconds.
|
|
344
|
-
|
|
345
|
-
GLOBAL FLAGS
|
|
346
|
-
--json Format output as json.
|
|
347
|
-
|
|
348
|
-
DESCRIPTION
|
|
349
|
-
Pollutes selected space with test data.
|
|
350
|
-
```
|
|
351
|
-
|
|
352
339
|
## `dx debug stats`
|
|
353
340
|
|
|
354
341
|
Output debug stats.
|
|
@@ -362,15 +349,13 @@ FLAGS
|
|
|
362
349
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
363
350
|
--dry-run Dry run.
|
|
364
351
|
--humanize Humanized keys.
|
|
352
|
+
--json Output as JSON.
|
|
365
353
|
--no-agent Auto-start agent.
|
|
366
354
|
--profile=<value> [default: default] User profile.
|
|
367
355
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
368
356
|
--truncate Truncate keys.
|
|
369
357
|
--verbose Verbose output.
|
|
370
358
|
|
|
371
|
-
GLOBAL FLAGS
|
|
372
|
-
--json Format output as json.
|
|
373
|
-
|
|
374
359
|
DESCRIPTION
|
|
375
360
|
Output debug stats.
|
|
376
361
|
```
|
|
@@ -398,29 +383,6 @@ DESCRIPTION
|
|
|
398
383
|
Show device info.
|
|
399
384
|
```
|
|
400
385
|
|
|
401
|
-
## `dx device invite`
|
|
402
|
-
|
|
403
|
-
Create device invitation.
|
|
404
|
-
|
|
405
|
-
```
|
|
406
|
-
USAGE
|
|
407
|
-
$ dx device invite [--json] [--dry-run] [-v] [--config <value> --profile <value>] [--no-agent] [--timeout <value>]
|
|
408
|
-
|
|
409
|
-
FLAGS
|
|
410
|
-
-v, --verbose Verbose output
|
|
411
|
-
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
412
|
-
--dry-run Dry run.
|
|
413
|
-
--no-agent Auto-start agent.
|
|
414
|
-
--profile=<value> [default: default] User profile.
|
|
415
|
-
--timeout=<value> [default: 30] Timeout in seconds.
|
|
416
|
-
|
|
417
|
-
GLOBAL FLAGS
|
|
418
|
-
--json Format output as json.
|
|
419
|
-
|
|
420
|
-
DESCRIPTION
|
|
421
|
-
Create device invitation.
|
|
422
|
-
```
|
|
423
|
-
|
|
424
386
|
## `dx device list`
|
|
425
387
|
|
|
426
388
|
Show device info.
|
|
@@ -457,15 +419,13 @@ FLAGS
|
|
|
457
419
|
-v, --verbose Verbose output
|
|
458
420
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
459
421
|
--dry-run Dry run.
|
|
422
|
+
--json Output as JSON.
|
|
460
423
|
--manifest=<value> [default: functions.yml]
|
|
461
424
|
--no-agent Auto-start agent.
|
|
462
425
|
--profile=<value> [default: default] User profile.
|
|
463
|
-
--require=<value>...
|
|
426
|
+
--require=<value>... [default: ts-node/register]
|
|
464
427
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
465
428
|
|
|
466
|
-
GLOBAL FLAGS
|
|
467
|
-
--json Format output as json.
|
|
468
|
-
|
|
469
429
|
DESCRIPTION
|
|
470
430
|
Development server.
|
|
471
431
|
|
|
@@ -491,15 +451,13 @@ FLAGS
|
|
|
491
451
|
-v, --verbose Verbose output
|
|
492
452
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
493
453
|
--dry-run Dry run.
|
|
454
|
+
--json Output as JSON.
|
|
494
455
|
--manifest=<value> [default: functions.yml]
|
|
495
456
|
--no-agent Auto-start agent.
|
|
496
457
|
--profile=<value> [default: default] User profile.
|
|
497
|
-
--require=<value>...
|
|
458
|
+
--require=<value>... [default: ts-node/register]
|
|
498
459
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
499
460
|
|
|
500
|
-
GLOBAL FLAGS
|
|
501
|
-
--json Format output as json.
|
|
502
|
-
|
|
503
461
|
DESCRIPTION
|
|
504
462
|
Development server.
|
|
505
463
|
|
|
@@ -655,13 +613,11 @@ FLAGS
|
|
|
655
613
|
-v, --verbose Verbose output
|
|
656
614
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
657
615
|
--dry-run Dry run.
|
|
616
|
+
--json Output as JSON.
|
|
658
617
|
--no-agent Auto-start agent.
|
|
659
618
|
--profile=<value> [default: default] User profile.
|
|
660
619
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
661
620
|
|
|
662
|
-
GLOBAL FLAGS
|
|
663
|
-
--json Format output as json.
|
|
664
|
-
|
|
665
621
|
DESCRIPTION
|
|
666
622
|
Import credential into HALO.
|
|
667
623
|
```
|
|
@@ -679,14 +635,12 @@ FLAGS
|
|
|
679
635
|
-v, --verbose Verbose output
|
|
680
636
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
681
637
|
--dry-run Dry run.
|
|
638
|
+
--json Output as JSON.
|
|
682
639
|
--no-agent Auto-start agent.
|
|
683
640
|
--profile=<value> [default: default] User profile.
|
|
684
641
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
685
642
|
--type=<value> Type
|
|
686
643
|
|
|
687
|
-
GLOBAL FLAGS
|
|
688
|
-
--json Format output as json.
|
|
689
|
-
|
|
690
644
|
DESCRIPTION
|
|
691
645
|
List HALO credentials.
|
|
692
646
|
```
|
|
@@ -705,13 +659,11 @@ FLAGS
|
|
|
705
659
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
706
660
|
--dry-run Dry run.
|
|
707
661
|
--invitation=<value> Invitation code
|
|
662
|
+
--json Output as JSON.
|
|
708
663
|
--no-agent Auto-start agent.
|
|
709
664
|
--profile=<value> [default: default] User profile.
|
|
710
665
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
711
666
|
|
|
712
|
-
GLOBAL FLAGS
|
|
713
|
-
--json Format output as json.
|
|
714
|
-
|
|
715
667
|
DESCRIPTION
|
|
716
668
|
Join HALO (device) invitation.
|
|
717
669
|
```
|
|
@@ -759,7 +711,7 @@ DESCRIPTION
|
|
|
759
711
|
Display help for dx.
|
|
760
712
|
```
|
|
761
713
|
|
|
762
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.
|
|
714
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.14/src/commands/help.ts)_
|
|
763
715
|
|
|
764
716
|
## `dx kube auth`
|
|
765
717
|
|
|
@@ -800,14 +752,12 @@ FLAGS
|
|
|
800
752
|
--dev Deploy latest version from dev channel
|
|
801
753
|
--dry-run Dry run.
|
|
802
754
|
--hostname=<value> (required) Hostname
|
|
755
|
+
--json Output as JSON.
|
|
803
756
|
--no-agent Auto-start agent.
|
|
804
757
|
--profile=<value> [default: default] User profile.
|
|
805
758
|
--provider=<value> [default: digitalocean] Cloud Provider
|
|
806
759
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
807
760
|
|
|
808
|
-
GLOBAL FLAGS
|
|
809
|
-
--json Format output as json.
|
|
810
|
-
|
|
811
761
|
DESCRIPTION
|
|
812
762
|
Deploy KUBE.
|
|
813
763
|
```
|
|
@@ -818,11 +768,14 @@ List installed plugins.
|
|
|
818
768
|
|
|
819
769
|
```
|
|
820
770
|
USAGE
|
|
821
|
-
$ dx plugins [--core]
|
|
771
|
+
$ dx plugins [--json] [--core]
|
|
822
772
|
|
|
823
773
|
FLAGS
|
|
824
774
|
--core Show core plugins.
|
|
825
775
|
|
|
776
|
+
GLOBAL FLAGS
|
|
777
|
+
--json Format output as json.
|
|
778
|
+
|
|
826
779
|
DESCRIPTION
|
|
827
780
|
List installed plugins.
|
|
828
781
|
|
|
@@ -830,7 +783,7 @@ EXAMPLES
|
|
|
830
783
|
$ dx plugins
|
|
831
784
|
```
|
|
832
785
|
|
|
833
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
786
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.1.8/src/commands/plugins/index.ts)_
|
|
834
787
|
|
|
835
788
|
## `dx plugins:install PLUGIN...`
|
|
836
789
|
|
|
@@ -1059,13 +1012,11 @@ FLAGS
|
|
|
1059
1012
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1060
1013
|
--dry-run Dry run.
|
|
1061
1014
|
--force Force delete.
|
|
1015
|
+
--json Output as JSON.
|
|
1062
1016
|
--no-agent Auto-start agent.
|
|
1063
1017
|
--profile=<value> [default: default] User profile.
|
|
1064
1018
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1065
1019
|
|
|
1066
|
-
GLOBAL FLAGS
|
|
1067
|
-
--json Format output as json.
|
|
1068
|
-
|
|
1069
1020
|
DESCRIPTION
|
|
1070
1021
|
Reset user data.
|
|
1071
1022
|
```
|
|
@@ -1082,13 +1033,11 @@ FLAGS
|
|
|
1082
1033
|
-v, --verbose Verbose output
|
|
1083
1034
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1084
1035
|
--dry-run Dry run.
|
|
1036
|
+
--json Output as JSON.
|
|
1085
1037
|
--no-agent Auto-start agent.
|
|
1086
1038
|
--profile=<value> [default: default] User profile.
|
|
1087
1039
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1088
1040
|
|
|
1089
|
-
GLOBAL FLAGS
|
|
1090
|
-
--json Format output as json.
|
|
1091
|
-
|
|
1092
1041
|
DESCRIPTION
|
|
1093
1042
|
Interactive shell.
|
|
1094
1043
|
```
|
|
@@ -1105,13 +1054,11 @@ FLAGS
|
|
|
1105
1054
|
-v, --verbose Verbose output
|
|
1106
1055
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1107
1056
|
--dry-run Dry run.
|
|
1057
|
+
--json Output as JSON.
|
|
1108
1058
|
--no-agent Auto-start agent.
|
|
1109
1059
|
--profile=<value> [default: default] User profile.
|
|
1110
1060
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1111
1061
|
|
|
1112
|
-
GLOBAL FLAGS
|
|
1113
|
-
--json Format output as json.
|
|
1114
|
-
|
|
1115
1062
|
DESCRIPTION
|
|
1116
1063
|
List spaces.
|
|
1117
1064
|
```
|
|
@@ -1161,6 +1108,7 @@ FLAGS
|
|
|
1161
1108
|
--csv output is csv format [alias: --output=csv]
|
|
1162
1109
|
--dry-run Dry run.
|
|
1163
1110
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1111
|
+
--json Output as JSON.
|
|
1164
1112
|
--no-agent Auto-start agent.
|
|
1165
1113
|
--no-header hide table header from output
|
|
1166
1114
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1170,9 +1118,6 @@ FLAGS
|
|
|
1170
1118
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1171
1119
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1172
1120
|
|
|
1173
|
-
GLOBAL FLAGS
|
|
1174
|
-
--json Format output as json.
|
|
1175
|
-
|
|
1176
1121
|
DESCRIPTION
|
|
1177
1122
|
Create new epoch.
|
|
1178
1123
|
```
|
|
@@ -1190,13 +1135,11 @@ FLAGS
|
|
|
1190
1135
|
-v, --verbose Verbose output
|
|
1191
1136
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1192
1137
|
--dry-run Dry run.
|
|
1138
|
+
--json Output as JSON.
|
|
1193
1139
|
--no-agent Auto-start agent.
|
|
1194
1140
|
--profile=<value> [default: default] User profile.
|
|
1195
1141
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1196
1142
|
|
|
1197
|
-
GLOBAL FLAGS
|
|
1198
|
-
--json Format output as json.
|
|
1199
|
-
|
|
1200
1143
|
DESCRIPTION
|
|
1201
1144
|
Create space invitation.
|
|
1202
1145
|
```
|
|
@@ -1215,14 +1158,12 @@ FLAGS
|
|
|
1215
1158
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1216
1159
|
--dry-run Dry run.
|
|
1217
1160
|
--invitation=<value> Invitation code
|
|
1161
|
+
--json Output as JSON.
|
|
1218
1162
|
--no-agent Auto-start agent.
|
|
1219
1163
|
--profile=<value> [default: default] User profile.
|
|
1220
1164
|
--secret=<value> Invitation secret
|
|
1221
1165
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1222
1166
|
|
|
1223
|
-
GLOBAL FLAGS
|
|
1224
|
-
--json Format output as json.
|
|
1225
|
-
|
|
1226
1167
|
DESCRIPTION
|
|
1227
1168
|
Join space invitation
|
|
1228
1169
|
```
|
|
@@ -1245,6 +1186,7 @@ FLAGS
|
|
|
1245
1186
|
--csv output is csv format [alias: --output=csv]
|
|
1246
1187
|
--dry-run Dry run.
|
|
1247
1188
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1189
|
+
--json Output as JSON.
|
|
1248
1190
|
--no-agent Auto-start agent.
|
|
1249
1191
|
--no-header hide table header from output
|
|
1250
1192
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1254,9 +1196,6 @@ FLAGS
|
|
|
1254
1196
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1255
1197
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1256
1198
|
|
|
1257
|
-
GLOBAL FLAGS
|
|
1258
|
-
--json Format output as json.
|
|
1259
|
-
|
|
1260
1199
|
DESCRIPTION
|
|
1261
1200
|
List spaces.
|
|
1262
1201
|
```
|
|
@@ -1282,6 +1221,7 @@ FLAGS
|
|
|
1282
1221
|
--csv output is csv format [alias: --output=csv]
|
|
1283
1222
|
--dry-run Dry run.
|
|
1284
1223
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1224
|
+
--json Output as JSON.
|
|
1285
1225
|
--no-agent Auto-start agent.
|
|
1286
1226
|
--no-header hide table header from output
|
|
1287
1227
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1291,9 +1231,6 @@ FLAGS
|
|
|
1291
1231
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1292
1232
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1293
1233
|
|
|
1294
|
-
GLOBAL FLAGS
|
|
1295
|
-
--json Format output as json.
|
|
1296
|
-
|
|
1297
1234
|
DESCRIPTION
|
|
1298
1235
|
List space members.
|
|
1299
1236
|
```
|
|
@@ -1337,13 +1274,11 @@ FLAGS
|
|
|
1337
1274
|
--disabled Disable tunnel.
|
|
1338
1275
|
--dry-run Dry run.
|
|
1339
1276
|
--enabled Enable tunnel.
|
|
1277
|
+
--json Output as JSON.
|
|
1340
1278
|
--no-agent Auto-start agent.
|
|
1341
1279
|
--profile=<value> [default: default] User profile.
|
|
1342
1280
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1343
1281
|
|
|
1344
|
-
GLOBAL FLAGS
|
|
1345
|
-
--json Format output as json.
|
|
1346
|
-
|
|
1347
1282
|
DESCRIPTION
|
|
1348
1283
|
Enable or disable tunnel.
|
|
1349
1284
|
```
|
|
@@ -7,11 +7,12 @@ export type Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>;
|
|
|
7
7
|
/**
|
|
8
8
|
* Custom base command.
|
|
9
9
|
* https://oclif.io/docs/base_class#docsNav
|
|
10
|
-
*
|
|
10
|
+
* https://github.com/salesforcecli/sf-plugins-core/blob/main/src/sfCommand.ts
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class BaseCommand<T extends typeof Command = any> extends Command {
|
|
13
13
|
static enableJsonFlag: boolean;
|
|
14
14
|
static flags: {
|
|
15
|
+
json: Interfaces.BooleanFlag<boolean>;
|
|
15
16
|
'dry-run': Interfaces.BooleanFlag<boolean>;
|
|
16
17
|
verbose: Interfaces.BooleanFlag<boolean>;
|
|
17
18
|
profile: Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
@@ -55,6 +56,7 @@ export declare abstract class BaseCommand<T extends typeof Command = any> extend
|
|
|
55
56
|
* https://oclif.io/docs/error_handling
|
|
56
57
|
*/
|
|
57
58
|
error(err: string | Error, options?: any): never;
|
|
59
|
+
catch(err: Error, options?: any): Promise<void>;
|
|
58
60
|
/**
|
|
59
61
|
* Called after each command run.
|
|
60
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAS,UAAU,EAAE,MAAM,aAAa,CAAC;AAUhF,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"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"}
|
package/dist/src/base-command.js
CHANGED
|
@@ -42,12 +42,14 @@ const pkg_up_1 = __importDefault(require("pkg-up"));
|
|
|
42
42
|
const agent_1 = require("@dxos/agent");
|
|
43
43
|
const client_1 = require("@dxos/client");
|
|
44
44
|
const client_protocol_1 = require("@dxos/client-protocol");
|
|
45
|
+
const services_1 = require("@dxos/client/services");
|
|
45
46
|
const debug_1 = require("@dxos/debug");
|
|
46
47
|
const log_1 = require("@dxos/log");
|
|
47
48
|
const Sentry = __importStar(require("@dxos/sentry"));
|
|
48
49
|
const sentry_1 = require("@dxos/sentry");
|
|
49
50
|
const Telemetry = __importStar(require("@dxos/telemetry"));
|
|
50
51
|
const util_1 = require("./util");
|
|
52
|
+
const DEFAULT_CONFIG = 'config/config-default.yml';
|
|
51
53
|
// TODO(wittjosiah): Factor out.
|
|
52
54
|
const exists = async (...args) => {
|
|
53
55
|
try {
|
|
@@ -66,7 +68,7 @@ const exists = async (...args) => {
|
|
|
66
68
|
/**
|
|
67
69
|
* Custom base command.
|
|
68
70
|
* https://oclif.io/docs/base_class#docsNav
|
|
69
|
-
*
|
|
71
|
+
* https://github.com/salesforcecli/sf-plugins-core/blob/main/src/sfCommand.ts
|
|
70
72
|
*/
|
|
71
73
|
class BaseCommand extends core_1.Command {
|
|
72
74
|
constructor(argv, config) {
|
|
@@ -91,7 +93,7 @@ class BaseCommand extends core_1.Command {
|
|
|
91
93
|
return Date.now() - this._startTime.getTime();
|
|
92
94
|
}
|
|
93
95
|
done() {
|
|
94
|
-
(0, log_1.log)('ok', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
96
|
+
(0, log_1.log)('ok', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 159, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* Load the client config.
|
|
@@ -111,13 +113,13 @@ class BaseCommand extends core_1.Command {
|
|
|
111
113
|
await this._loadConfig();
|
|
112
114
|
}
|
|
113
115
|
async _initTelemetry() {
|
|
114
|
-
this._telemetryContext = await (0, util_1.getTelemetryContext)(
|
|
116
|
+
this._telemetryContext = await (0, util_1.getTelemetryContext)(client_protocol_1.DX_DATA);
|
|
115
117
|
const { mode, installationId, group, environment, release } = this._telemetryContext;
|
|
116
118
|
{
|
|
117
119
|
if (group === 'dxos') {
|
|
118
|
-
(0, log_1.log)((0, chalk_1.default) `✨ {bgMagenta Running as internal user} ✨\n`, {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
120
|
+
(0, log_1.log)((0, chalk_1.default) `✨ {bgMagenta Running as internal user} ✨\n`, {}, { file: "packages/devtools/cli/src/base-command.ts", line: 189, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
119
121
|
}
|
|
120
|
-
await (0, util_1.showTelemetryBanner)(
|
|
122
|
+
await (0, util_1.showTelemetryBanner)(client_protocol_1.DX_DATA);
|
|
121
123
|
}
|
|
122
124
|
if (util_1.SENTRY_DESTINATION && mode !== 'disabled') {
|
|
123
125
|
Sentry.init({
|
|
@@ -134,7 +136,7 @@ class BaseCommand extends core_1.Command {
|
|
|
134
136
|
});
|
|
135
137
|
}
|
|
136
138
|
if (util_1.TELEMETRY_API_KEY) {
|
|
137
|
-
mode === 'disabled' && (await (0, util_1.disableTelemetry)(
|
|
139
|
+
mode === 'disabled' && (await (0, util_1.disableTelemetry)(client_protocol_1.DX_DATA));
|
|
138
140
|
Telemetry.init({
|
|
139
141
|
apiKey: util_1.TELEMETRY_API_KEY,
|
|
140
142
|
batchSize: 20,
|
|
@@ -158,14 +160,14 @@ class BaseCommand extends core_1.Command {
|
|
|
158
160
|
const { config: configFile } = this.flags;
|
|
159
161
|
const configExists = await exists(configFile);
|
|
160
162
|
if (!configExists) {
|
|
161
|
-
const defaultConfigPath = (0, node_path_1.join)((0, node_path_1.dirname)((_a = pkg_up_1.default.sync({ cwd: __dirname })) !== null && _a !== void 0 ? _a : (0, debug_1.raise)(new Error('Could not find package.json'))),
|
|
163
|
+
const defaultConfigPath = (0, node_path_1.join)((0, node_path_1.dirname)((_a = pkg_up_1.default.sync({ cwd: __dirname })) !== null && _a !== void 0 ? _a : (0, debug_1.raise)(new Error('Could not find package.json'))), DEFAULT_CONFIG);
|
|
162
164
|
const yamlConfig = js_yaml_1.default.load(await (0, promises_1.readFile)(defaultConfigPath, 'utf-8'));
|
|
163
165
|
{
|
|
164
166
|
// Isolate DX_PROFILE storages.
|
|
165
167
|
(_b = yamlConfig.runtime) !== null && _b !== void 0 ? _b : (yamlConfig.runtime = {});
|
|
166
168
|
(_c = (_f = yamlConfig.runtime).client) !== null && _c !== void 0 ? _c : (_f.client = {});
|
|
167
169
|
(_d = (_g = yamlConfig.runtime.client).storage) !== null && _d !== void 0 ? _d : (_g.storage = {});
|
|
168
|
-
yamlConfig.runtime.client.storage.path = (0, node_path_1.join)((_e = yamlConfig.runtime.client.storage.path) !== null && _e !== void 0 ? _e :
|
|
170
|
+
yamlConfig.runtime.client.storage.path = (0, node_path_1.join)((_e = yamlConfig.runtime.client.storage.path) !== null && _e !== void 0 ? _e : client_protocol_1.DX_DATA, this.flags.profile);
|
|
169
171
|
}
|
|
170
172
|
await (0, promises_1.mkdir)((0, node_path_1.dirname)(configFile), { recursive: true });
|
|
171
173
|
await (0, promises_1.writeFile)(configFile, js_yaml_1.default.dump(yamlConfig), 'utf-8');
|
|
@@ -193,8 +195,12 @@ class BaseCommand extends core_1.Command {
|
|
|
193
195
|
}
|
|
194
196
|
error(err, options) {
|
|
195
197
|
super.error(err, options);
|
|
196
|
-
|
|
198
|
+
}
|
|
199
|
+
async catch(err, options) {
|
|
200
|
+
// Will only submit if API key exists (i.e., prod).
|
|
201
|
+
super.error(err, options);
|
|
197
202
|
this._failing = true;
|
|
203
|
+
throw err;
|
|
198
204
|
}
|
|
199
205
|
/**
|
|
200
206
|
* Called after each command run.
|
|
@@ -218,7 +224,7 @@ class BaseCommand extends core_1.Command {
|
|
|
218
224
|
const running = await daemon.isRunning(this.flags.profile);
|
|
219
225
|
if (!running) {
|
|
220
226
|
this.log(`Starting agent (${this.flags.profile})`);
|
|
221
|
-
await daemon.start(this.flags.profile);
|
|
227
|
+
await daemon.start(this.flags.profile, { config: this.flags.config });
|
|
222
228
|
}
|
|
223
229
|
});
|
|
224
230
|
}
|
|
@@ -229,16 +235,15 @@ class BaseCommand extends core_1.Command {
|
|
|
229
235
|
async getClient() {
|
|
230
236
|
(0, node_assert_1.default)(this._clientConfig);
|
|
231
237
|
if (!this._client) {
|
|
232
|
-
(0, node_assert_1.default)(this._clientConfig);
|
|
233
238
|
if (this.flags['no-agent']) {
|
|
234
239
|
this._client = new client_1.Client({ config: this._clientConfig });
|
|
235
240
|
}
|
|
236
241
|
else {
|
|
237
242
|
await this.maybeStartDaemon();
|
|
238
|
-
this._client = new client_1.Client({ config: this._clientConfig, services: (0,
|
|
243
|
+
this._client = new client_1.Client({ config: this._clientConfig, services: (0, services_1.fromAgent)({ profile: this.flags.profile }) });
|
|
239
244
|
}
|
|
240
245
|
await this._client.initialize();
|
|
241
|
-
(0, log_1.log)('Client initialized', { profile: this.flags.profile }, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
246
|
+
(0, log_1.log)('Client initialized', { profile: this.flags.profile }, { file: "packages/devtools/cli/src/base-command.ts", line: 341, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
242
247
|
}
|
|
243
248
|
return this._client;
|
|
244
249
|
}
|
|
@@ -259,7 +264,7 @@ class BaseCommand extends core_1.Command {
|
|
|
259
264
|
* Convenience function to wrap starting the agent.
|
|
260
265
|
*/
|
|
261
266
|
async execWithDaemon(callback) {
|
|
262
|
-
const daemon = new agent_1.ForeverDaemon(
|
|
267
|
+
const daemon = new agent_1.ForeverDaemon(client_protocol_1.DX_RUNTIME);
|
|
263
268
|
await daemon.connect();
|
|
264
269
|
const value = await callback(daemon);
|
|
265
270
|
await daemon.disconnect();
|
|
@@ -337,6 +342,11 @@ class BaseCommand extends core_1.Command {
|
|
|
337
342
|
}
|
|
338
343
|
BaseCommand.enableJsonFlag = true;
|
|
339
344
|
BaseCommand.flags = {
|
|
345
|
+
// Even though oclif should support this out of the box there seems to be a bug.
|
|
346
|
+
json: core_1.Flags.boolean({
|
|
347
|
+
description: 'Output as JSON.',
|
|
348
|
+
default: false,
|
|
349
|
+
}),
|
|
340
350
|
'dry-run': core_1.Flags.boolean({
|
|
341
351
|
description: 'Dry run.',
|
|
342
352
|
default: false,
|