@dxos/cli 0.1.53-main.4544117 → 0.1.53-main.499755c
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 +63 -99
- package/bin/dev +3 -0
- 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 +175 -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 +4 -2
- package/dist/src/commands/agent/list.js.map +1 -1
- package/dist/src/commands/agent/restart.js +1 -1
- 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 -9
- package/dist/src/commands/agent/start.js.map +1 -1
- package/dist/src/commands/agent/stop.d.ts +1 -0
- package/dist/src/commands/agent/stop.d.ts.map +1 -1
- package/dist/src/commands/agent/stop.js +1 -1
- 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/debug/stats.d.ts +2 -1
- package/dist/src/commands/debug/stats.d.ts.map +1 -1
- package/dist/src/commands/debug/stats.js +28 -1
- 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 +3 -2
- 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 +2 -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/epoch.js +1 -0
- package/dist/src/commands/space/epoch.js.map +1 -1
- package/dist/src/commands/space/invite.d.ts.map +1 -1
- package/dist/src/commands/space/invite.js +3 -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 +3 -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/list.js +1 -0
- package/dist/src/commands/space/list.js.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/space/members.js +1 -0
- package/dist/src/commands/space/members.js.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 +23 -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/dist/src/util/util.js +1 -0
- package/dist/src/util/util.js.map +1 -1
- package/oclif.manifest.json +24 -110
- package/package.json +31 -32
- 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:
|
|
10
15
|
|
|
11
16
|
```bash
|
|
12
|
-
|
|
17
|
+
nx run cli:build --watch=true
|
|
13
18
|
```
|
|
14
19
|
|
|
15
|
-
Run the CLI
|
|
20
|
+
Run the CLI from the local directory:
|
|
16
21
|
|
|
17
22
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
./bin/run config --json
|
|
24
|
+
```
|
|
25
|
+
|
|
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.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
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.499755c 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)
|
|
@@ -49,7 +74,6 @@ USAGE
|
|
|
49
74
|
* [`dx config`](#dx-config)
|
|
50
75
|
* [`dx debug stats`](#dx-debug-stats)
|
|
51
76
|
* [`dx device`](#dx-device)
|
|
52
|
-
* [`dx device invite`](#dx-device-invite)
|
|
53
77
|
* [`dx device list`](#dx-device-list)
|
|
54
78
|
* [`dx function dev`](#dx-function-dev)
|
|
55
79
|
* [`dx function dev-server`](#dx-function-dev-server)
|
|
@@ -147,15 +171,13 @@ FLAGS
|
|
|
147
171
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
148
172
|
--dry-run Dry run.
|
|
149
173
|
--echo=port Expose ECHO REST API.
|
|
174
|
+
--json Output as JSON.
|
|
150
175
|
--monitor Run epoch monitoring.
|
|
151
176
|
--no-agent Auto-start agent.
|
|
152
177
|
--profile=<value> [default: default] User profile.
|
|
153
178
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
154
179
|
--web-socket=port Expose web socket port.
|
|
155
180
|
|
|
156
|
-
GLOBAL FLAGS
|
|
157
|
-
--json Format output as json.
|
|
158
|
-
|
|
159
181
|
DESCRIPTION
|
|
160
182
|
Starts the agent.
|
|
161
183
|
```
|
|
@@ -174,13 +196,11 @@ FLAGS
|
|
|
174
196
|
-v, --verbose Verbose output
|
|
175
197
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
176
198
|
--dry-run Dry run.
|
|
199
|
+
--json Output as JSON.
|
|
177
200
|
--no-agent Auto-start agent.
|
|
178
201
|
--profile=<value> [default: default] User profile.
|
|
179
202
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
180
203
|
|
|
181
|
-
GLOBAL FLAGS
|
|
182
|
-
--json Format output as json.
|
|
183
|
-
|
|
184
204
|
DESCRIPTION
|
|
185
205
|
Stop agent daemon.
|
|
186
206
|
```
|
|
@@ -204,14 +224,12 @@ FLAGS
|
|
|
204
224
|
-v, --verbose Verbose output
|
|
205
225
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
206
226
|
--dry-run Dry run.
|
|
227
|
+
--json Output as JSON.
|
|
207
228
|
--no-agent Auto-start agent.
|
|
208
229
|
--profile=<value> [default: default] User profile.
|
|
209
230
|
--tag=<value> Git tag or branch of the DXOS repo to checkout.
|
|
210
231
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
211
232
|
|
|
212
|
-
GLOBAL FLAGS
|
|
213
|
-
--json Format output as json.
|
|
214
|
-
|
|
215
233
|
DESCRIPTION
|
|
216
234
|
Manage applications.
|
|
217
235
|
```
|
|
@@ -283,15 +301,13 @@ FLAGS
|
|
|
283
301
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
284
302
|
--configPath=<value> Path to dx.yml
|
|
285
303
|
--dry-run Dry run.
|
|
304
|
+
--json Output as JSON.
|
|
286
305
|
--no-agent Auto-start agent.
|
|
287
306
|
--profile=<value> [default: default] User profile.
|
|
288
307
|
--skipExisting Do not update content on KUBE if version already exists.
|
|
289
308
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
290
309
|
--version=<value> Version of modules to publish.
|
|
291
310
|
|
|
292
|
-
GLOBAL FLAGS
|
|
293
|
-
--json Format output as json.
|
|
294
|
-
|
|
295
311
|
DESCRIPTION
|
|
296
312
|
Publish apps.
|
|
297
313
|
```
|
|
@@ -325,21 +341,19 @@ Output debug stats.
|
|
|
325
341
|
|
|
326
342
|
```
|
|
327
343
|
USAGE
|
|
328
|
-
$ dx debug stats [--json] [--dry-run] [
|
|
344
|
+
$ dx debug stats [--json] [--dry-run] [--verbose] [--config <value> --profile <value>] [--no-agent] [--timeout
|
|
329
345
|
<value>] [--humanize] [--truncate]
|
|
330
346
|
|
|
331
347
|
FLAGS
|
|
332
|
-
-v, --verbose Verbose output
|
|
333
348
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
334
349
|
--dry-run Dry run.
|
|
335
350
|
--humanize Humanized keys.
|
|
351
|
+
--json Output as JSON.
|
|
336
352
|
--no-agent Auto-start agent.
|
|
337
353
|
--profile=<value> [default: default] User profile.
|
|
338
354
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
339
355
|
--truncate Truncate keys.
|
|
340
|
-
|
|
341
|
-
GLOBAL FLAGS
|
|
342
|
-
--json Format output as json.
|
|
356
|
+
--verbose Verbose output.
|
|
343
357
|
|
|
344
358
|
DESCRIPTION
|
|
345
359
|
Output debug stats.
|
|
@@ -368,29 +382,6 @@ DESCRIPTION
|
|
|
368
382
|
Show device info.
|
|
369
383
|
```
|
|
370
384
|
|
|
371
|
-
## `dx device invite`
|
|
372
|
-
|
|
373
|
-
Create device invitation.
|
|
374
|
-
|
|
375
|
-
```
|
|
376
|
-
USAGE
|
|
377
|
-
$ dx device invite [--json] [--dry-run] [-v] [--config <value> --profile <value>] [--no-agent] [--timeout <value>]
|
|
378
|
-
|
|
379
|
-
FLAGS
|
|
380
|
-
-v, --verbose Verbose output
|
|
381
|
-
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
382
|
-
--dry-run Dry run.
|
|
383
|
-
--no-agent Auto-start agent.
|
|
384
|
-
--profile=<value> [default: default] User profile.
|
|
385
|
-
--timeout=<value> [default: 30] Timeout in seconds.
|
|
386
|
-
|
|
387
|
-
GLOBAL FLAGS
|
|
388
|
-
--json Format output as json.
|
|
389
|
-
|
|
390
|
-
DESCRIPTION
|
|
391
|
-
Create device invitation.
|
|
392
|
-
```
|
|
393
|
-
|
|
394
385
|
## `dx device list`
|
|
395
386
|
|
|
396
387
|
Show device info.
|
|
@@ -427,15 +418,13 @@ FLAGS
|
|
|
427
418
|
-v, --verbose Verbose output
|
|
428
419
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
429
420
|
--dry-run Dry run.
|
|
421
|
+
--json Output as JSON.
|
|
430
422
|
--manifest=<value> [default: functions.yml]
|
|
431
423
|
--no-agent Auto-start agent.
|
|
432
424
|
--profile=<value> [default: default] User profile.
|
|
433
|
-
--require=<value>...
|
|
425
|
+
--require=<value>... [default: ts-node/register]
|
|
434
426
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
435
427
|
|
|
436
|
-
GLOBAL FLAGS
|
|
437
|
-
--json Format output as json.
|
|
438
|
-
|
|
439
428
|
DESCRIPTION
|
|
440
429
|
Development server.
|
|
441
430
|
|
|
@@ -461,15 +450,13 @@ FLAGS
|
|
|
461
450
|
-v, --verbose Verbose output
|
|
462
451
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
463
452
|
--dry-run Dry run.
|
|
453
|
+
--json Output as JSON.
|
|
464
454
|
--manifest=<value> [default: functions.yml]
|
|
465
455
|
--no-agent Auto-start agent.
|
|
466
456
|
--profile=<value> [default: default] User profile.
|
|
467
|
-
--require=<value>...
|
|
457
|
+
--require=<value>... [default: ts-node/register]
|
|
468
458
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
469
459
|
|
|
470
|
-
GLOBAL FLAGS
|
|
471
|
-
--json Format output as json.
|
|
472
|
-
|
|
473
460
|
DESCRIPTION
|
|
474
461
|
Development server.
|
|
475
462
|
|
|
@@ -625,13 +612,11 @@ FLAGS
|
|
|
625
612
|
-v, --verbose Verbose output
|
|
626
613
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
627
614
|
--dry-run Dry run.
|
|
615
|
+
--json Output as JSON.
|
|
628
616
|
--no-agent Auto-start agent.
|
|
629
617
|
--profile=<value> [default: default] User profile.
|
|
630
618
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
631
619
|
|
|
632
|
-
GLOBAL FLAGS
|
|
633
|
-
--json Format output as json.
|
|
634
|
-
|
|
635
620
|
DESCRIPTION
|
|
636
621
|
Import credential into HALO.
|
|
637
622
|
```
|
|
@@ -649,14 +634,12 @@ FLAGS
|
|
|
649
634
|
-v, --verbose Verbose output
|
|
650
635
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
651
636
|
--dry-run Dry run.
|
|
637
|
+
--json Output as JSON.
|
|
652
638
|
--no-agent Auto-start agent.
|
|
653
639
|
--profile=<value> [default: default] User profile.
|
|
654
640
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
655
641
|
--type=<value> Type
|
|
656
642
|
|
|
657
|
-
GLOBAL FLAGS
|
|
658
|
-
--json Format output as json.
|
|
659
|
-
|
|
660
643
|
DESCRIPTION
|
|
661
644
|
List HALO credentials.
|
|
662
645
|
```
|
|
@@ -675,13 +658,11 @@ FLAGS
|
|
|
675
658
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
676
659
|
--dry-run Dry run.
|
|
677
660
|
--invitation=<value> Invitation code
|
|
661
|
+
--json Output as JSON.
|
|
678
662
|
--no-agent Auto-start agent.
|
|
679
663
|
--profile=<value> [default: default] User profile.
|
|
680
664
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
681
665
|
|
|
682
|
-
GLOBAL FLAGS
|
|
683
|
-
--json Format output as json.
|
|
684
|
-
|
|
685
666
|
DESCRIPTION
|
|
686
667
|
Join HALO (device) invitation.
|
|
687
668
|
```
|
|
@@ -729,7 +710,7 @@ DESCRIPTION
|
|
|
729
710
|
Display help for dx.
|
|
730
711
|
```
|
|
731
712
|
|
|
732
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.
|
|
713
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.14/src/commands/help.ts)_
|
|
733
714
|
|
|
734
715
|
## `dx kube auth`
|
|
735
716
|
|
|
@@ -770,14 +751,12 @@ FLAGS
|
|
|
770
751
|
--dev Deploy latest version from dev channel
|
|
771
752
|
--dry-run Dry run.
|
|
772
753
|
--hostname=<value> (required) Hostname
|
|
754
|
+
--json Output as JSON.
|
|
773
755
|
--no-agent Auto-start agent.
|
|
774
756
|
--profile=<value> [default: default] User profile.
|
|
775
757
|
--provider=<value> [default: digitalocean] Cloud Provider
|
|
776
758
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
777
759
|
|
|
778
|
-
GLOBAL FLAGS
|
|
779
|
-
--json Format output as json.
|
|
780
|
-
|
|
781
760
|
DESCRIPTION
|
|
782
761
|
Deploy KUBE.
|
|
783
762
|
```
|
|
@@ -788,11 +767,14 @@ List installed plugins.
|
|
|
788
767
|
|
|
789
768
|
```
|
|
790
769
|
USAGE
|
|
791
|
-
$ dx plugins [--core]
|
|
770
|
+
$ dx plugins [--json] [--core]
|
|
792
771
|
|
|
793
772
|
FLAGS
|
|
794
773
|
--core Show core plugins.
|
|
795
774
|
|
|
775
|
+
GLOBAL FLAGS
|
|
776
|
+
--json Format output as json.
|
|
777
|
+
|
|
796
778
|
DESCRIPTION
|
|
797
779
|
List installed plugins.
|
|
798
780
|
|
|
@@ -800,7 +782,7 @@ EXAMPLES
|
|
|
800
782
|
$ dx plugins
|
|
801
783
|
```
|
|
802
784
|
|
|
803
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
785
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.1.8/src/commands/plugins/index.ts)_
|
|
804
786
|
|
|
805
787
|
## `dx plugins:install PLUGIN...`
|
|
806
788
|
|
|
@@ -1029,13 +1011,11 @@ FLAGS
|
|
|
1029
1011
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1030
1012
|
--dry-run Dry run.
|
|
1031
1013
|
--force Force delete.
|
|
1014
|
+
--json Output as JSON.
|
|
1032
1015
|
--no-agent Auto-start agent.
|
|
1033
1016
|
--profile=<value> [default: default] User profile.
|
|
1034
1017
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1035
1018
|
|
|
1036
|
-
GLOBAL FLAGS
|
|
1037
|
-
--json Format output as json.
|
|
1038
|
-
|
|
1039
1019
|
DESCRIPTION
|
|
1040
1020
|
Reset user data.
|
|
1041
1021
|
```
|
|
@@ -1052,13 +1032,11 @@ FLAGS
|
|
|
1052
1032
|
-v, --verbose Verbose output
|
|
1053
1033
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1054
1034
|
--dry-run Dry run.
|
|
1035
|
+
--json Output as JSON.
|
|
1055
1036
|
--no-agent Auto-start agent.
|
|
1056
1037
|
--profile=<value> [default: default] User profile.
|
|
1057
1038
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1058
1039
|
|
|
1059
|
-
GLOBAL FLAGS
|
|
1060
|
-
--json Format output as json.
|
|
1061
|
-
|
|
1062
1040
|
DESCRIPTION
|
|
1063
1041
|
Interactive shell.
|
|
1064
1042
|
```
|
|
@@ -1075,13 +1053,11 @@ FLAGS
|
|
|
1075
1053
|
-v, --verbose Verbose output
|
|
1076
1054
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1077
1055
|
--dry-run Dry run.
|
|
1056
|
+
--json Output as JSON.
|
|
1078
1057
|
--no-agent Auto-start agent.
|
|
1079
1058
|
--profile=<value> [default: default] User profile.
|
|
1080
1059
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1081
1060
|
|
|
1082
|
-
GLOBAL FLAGS
|
|
1083
|
-
--json Format output as json.
|
|
1084
|
-
|
|
1085
1061
|
DESCRIPTION
|
|
1086
1062
|
List spaces.
|
|
1087
1063
|
```
|
|
@@ -1131,6 +1107,7 @@ FLAGS
|
|
|
1131
1107
|
--csv output is csv format [alias: --output=csv]
|
|
1132
1108
|
--dry-run Dry run.
|
|
1133
1109
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1110
|
+
--json Output as JSON.
|
|
1134
1111
|
--no-agent Auto-start agent.
|
|
1135
1112
|
--no-header hide table header from output
|
|
1136
1113
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1140,9 +1117,6 @@ FLAGS
|
|
|
1140
1117
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1141
1118
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1142
1119
|
|
|
1143
|
-
GLOBAL FLAGS
|
|
1144
|
-
--json Format output as json.
|
|
1145
|
-
|
|
1146
1120
|
DESCRIPTION
|
|
1147
1121
|
Create new epoch.
|
|
1148
1122
|
```
|
|
@@ -1160,13 +1134,11 @@ FLAGS
|
|
|
1160
1134
|
-v, --verbose Verbose output
|
|
1161
1135
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1162
1136
|
--dry-run Dry run.
|
|
1137
|
+
--json Output as JSON.
|
|
1163
1138
|
--no-agent Auto-start agent.
|
|
1164
1139
|
--profile=<value> [default: default] User profile.
|
|
1165
1140
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1166
1141
|
|
|
1167
|
-
GLOBAL FLAGS
|
|
1168
|
-
--json Format output as json.
|
|
1169
|
-
|
|
1170
1142
|
DESCRIPTION
|
|
1171
1143
|
Create space invitation.
|
|
1172
1144
|
```
|
|
@@ -1185,14 +1157,12 @@ FLAGS
|
|
|
1185
1157
|
--config=path [default: /home/runner/.config/dx/profile/default.yml] Config file.
|
|
1186
1158
|
--dry-run Dry run.
|
|
1187
1159
|
--invitation=<value> Invitation code
|
|
1160
|
+
--json Output as JSON.
|
|
1188
1161
|
--no-agent Auto-start agent.
|
|
1189
1162
|
--profile=<value> [default: default] User profile.
|
|
1190
1163
|
--secret=<value> Invitation secret
|
|
1191
1164
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1192
1165
|
|
|
1193
|
-
GLOBAL FLAGS
|
|
1194
|
-
--json Format output as json.
|
|
1195
|
-
|
|
1196
1166
|
DESCRIPTION
|
|
1197
1167
|
Join space invitation
|
|
1198
1168
|
```
|
|
@@ -1215,6 +1185,7 @@ FLAGS
|
|
|
1215
1185
|
--csv output is csv format [alias: --output=csv]
|
|
1216
1186
|
--dry-run Dry run.
|
|
1217
1187
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1188
|
+
--json Output as JSON.
|
|
1218
1189
|
--no-agent Auto-start agent.
|
|
1219
1190
|
--no-header hide table header from output
|
|
1220
1191
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1224,9 +1195,6 @@ FLAGS
|
|
|
1224
1195
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1225
1196
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1226
1197
|
|
|
1227
|
-
GLOBAL FLAGS
|
|
1228
|
-
--json Format output as json.
|
|
1229
|
-
|
|
1230
1198
|
DESCRIPTION
|
|
1231
1199
|
List spaces.
|
|
1232
1200
|
```
|
|
@@ -1252,6 +1220,7 @@ FLAGS
|
|
|
1252
1220
|
--csv output is csv format [alias: --output=csv]
|
|
1253
1221
|
--dry-run Dry run.
|
|
1254
1222
|
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
1223
|
+
--json Output as JSON.
|
|
1255
1224
|
--no-agent Auto-start agent.
|
|
1256
1225
|
--no-header hide table header from output
|
|
1257
1226
|
--no-truncate do not truncate output to fit screen
|
|
@@ -1261,9 +1230,6 @@ FLAGS
|
|
|
1261
1230
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
1262
1231
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1263
1232
|
|
|
1264
|
-
GLOBAL FLAGS
|
|
1265
|
-
--json Format output as json.
|
|
1266
|
-
|
|
1267
1233
|
DESCRIPTION
|
|
1268
1234
|
List space members.
|
|
1269
1235
|
```
|
|
@@ -1307,13 +1273,11 @@ FLAGS
|
|
|
1307
1273
|
--disabled Disable tunnel.
|
|
1308
1274
|
--dry-run Dry run.
|
|
1309
1275
|
--enabled Enable tunnel.
|
|
1276
|
+
--json Output as JSON.
|
|
1310
1277
|
--no-agent Auto-start agent.
|
|
1311
1278
|
--profile=<value> [default: default] User profile.
|
|
1312
1279
|
--timeout=<value> [default: 30] Timeout in seconds.
|
|
1313
1280
|
|
|
1314
|
-
GLOBAL FLAGS
|
|
1315
|
-
--json Format output as json.
|
|
1316
|
-
|
|
1317
1281
|
DESCRIPTION
|
|
1318
1282
|
Enable or disable tunnel.
|
|
1319
1283
|
```
|
package/bin/dev
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --no-warnings
|
|
2
2
|
// NOTE: Specify --no-warnings in production script.
|
|
3
3
|
|
|
4
|
+
const chalk = require('chalk');
|
|
5
|
+
console.log(chalk`{yellow.bold Warning: Running CLI in dev mode (only for development purposes).}`)
|
|
6
|
+
|
|
4
7
|
const oclif = require('@oclif/core')
|
|
5
8
|
|
|
6
9
|
const path = require('path')
|
|
@@ -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,
|