@dxos/cli 0.1.1
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/LICENSE +21 -0
- package/README.md +616 -0
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/dist/src/base-command.d.ts +34 -0
- package/dist/src/base-command.d.ts.map +1 -0
- package/dist/src/base-command.js +193 -0
- package/dist/src/base-command.js.map +1 -0
- package/dist/src/commands/app/create.d.ts +17 -0
- package/dist/src/commands/app/create.d.ts.map +1 -0
- package/dist/src/commands/app/create.js +78 -0
- package/dist/src/commands/app/create.js.map +1 -0
- package/dist/src/commands/app/list.d.ts +7 -0
- package/dist/src/commands/app/list.d.ts.map +1 -0
- package/dist/src/commands/app/list.js +31 -0
- package/dist/src/commands/app/list.js.map +1 -0
- package/dist/src/commands/app/publish.d.ts +14 -0
- package/dist/src/commands/app/publish.d.ts.map +1 -0
- package/dist/src/commands/app/publish.js +63 -0
- package/dist/src/commands/app/publish.js.map +1 -0
- package/dist/src/commands/config/index.d.ts +7 -0
- package/dist/src/commands/config/index.d.ts.map +1 -0
- package/dist/src/commands/config/index.js +18 -0
- package/dist/src/commands/config/index.js.map +1 -0
- package/dist/src/commands/config/index.test.d.ts +2 -0
- package/dist/src/commands/config/index.test.d.ts.map +1 -0
- package/dist/src/commands/config/index.test.js +52 -0
- package/dist/src/commands/config/index.test.js.map +1 -0
- package/dist/src/commands/halo/create.d.ts +10 -0
- package/dist/src/commands/halo/create.d.ts.map +1 -0
- package/dist/src/commands/halo/create.js +34 -0
- package/dist/src/commands/halo/create.js.map +1 -0
- package/dist/src/commands/halo/index.d.ts +7 -0
- package/dist/src/commands/halo/index.d.ts.map +1 -0
- package/dist/src/commands/halo/index.js +35 -0
- package/dist/src/commands/halo/index.js.map +1 -0
- package/dist/src/commands/halo/recover.d.ts +10 -0
- package/dist/src/commands/halo/recover.d.ts.map +1 -0
- package/dist/src/commands/halo/recover.js +35 -0
- package/dist/src/commands/halo/recover.js.map +1 -0
- package/dist/src/commands/reset/index.d.ts +6 -0
- package/dist/src/commands/reset/index.d.ts.map +1 -0
- package/dist/src/commands/reset/index.js +24 -0
- package/dist/src/commands/reset/index.js.map +1 -0
- package/dist/src/commands/shell/index.d.ts +7 -0
- package/dist/src/commands/shell/index.d.ts.map +1 -0
- package/dist/src/commands/shell/index.js +27 -0
- package/dist/src/commands/shell/index.js.map +1 -0
- package/dist/src/commands/space/create.d.ts +10 -0
- package/dist/src/commands/space/create.d.ts.map +1 -0
- package/dist/src/commands/space/create.js +39 -0
- package/dist/src/commands/space/create.js.map +1 -0
- package/dist/src/commands/space/index.d.ts +6 -0
- package/dist/src/commands/space/index.d.ts.map +1 -0
- package/dist/src/commands/space/index.js +18 -0
- package/dist/src/commands/space/index.js.map +1 -0
- package/dist/src/commands/space/invite.d.ts +9 -0
- package/dist/src/commands/space/invite.d.ts.map +1 -0
- package/dist/src/commands/space/invite.js +59 -0
- package/dist/src/commands/space/invite.js.map +1 -0
- package/dist/src/commands/space/join.d.ts +13 -0
- package/dist/src/commands/space/join.d.ts.map +1 -0
- package/dist/src/commands/space/join.js +55 -0
- package/dist/src/commands/space/join.js.map +1 -0
- package/dist/src/commands/space/list.d.ts +19 -0
- package/dist/src/commands/space/list.d.ts.map +1 -0
- package/dist/src/commands/space/list.js +28 -0
- package/dist/src/commands/space/list.js.map +1 -0
- package/dist/src/commands/space/members.d.ts +22 -0
- package/dist/src/commands/space/members.d.ts.map +1 -0
- package/dist/src/commands/space/members.js +43 -0
- package/dist/src/commands/space/members.js.map +1 -0
- package/dist/src/hooks/init/config.d.ts +4 -0
- package/dist/src/hooks/init/config.d.ts.map +1 -0
- package/dist/src/hooks/init/config.js +10 -0
- package/dist/src/hooks/init/config.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/util/index.d.ts +4 -0
- package/dist/src/util/index.d.ts.map +1 -0
- package/dist/src/util/index.js +23 -0
- package/dist/src/util/index.js.map +1 -0
- package/dist/src/util/publish/build.d.ts +11 -0
- package/dist/src/util/publish/build.d.ts.map +1 -0
- package/dist/src/util/publish/build.js +26 -0
- package/dist/src/util/publish/build.js.map +1 -0
- package/dist/src/util/publish/common.d.ts +10 -0
- package/dist/src/util/publish/common.d.ts.map +1 -0
- package/dist/src/util/publish/common.js +29 -0
- package/dist/src/util/publish/common.js.map +1 -0
- package/dist/src/util/publish/config.d.ts +3 -0
- package/dist/src/util/publish/config.d.ts.map +1 -0
- package/dist/src/util/publish/config.js +35 -0
- package/dist/src/util/publish/config.js.map +1 -0
- package/dist/src/util/publish/index.d.ts +7 -0
- package/dist/src/util/publish/index.d.ts.map +1 -0
- package/dist/src/util/publish/index.js +26 -0
- package/dist/src/util/publish/index.js.map +1 -0
- package/dist/src/util/publish/ipfs-upload.d.ts +10 -0
- package/dist/src/util/publish/ipfs-upload.d.ts.map +1 -0
- package/dist/src/util/publish/ipfs-upload.js +43 -0
- package/dist/src/util/publish/ipfs-upload.js.map +1 -0
- package/dist/src/util/publish/publish.d.ts +16 -0
- package/dist/src/util/publish/publish.d.ts.map +1 -0
- package/dist/src/util/publish/publish.js +47 -0
- package/dist/src/util/publish/publish.js.map +1 -0
- package/dist/src/util/publish/publisher-rpc-peer.d.ts +15 -0
- package/dist/src/util/publish/publisher-rpc-peer.d.ts.map +1 -0
- package/dist/src/util/publish/publisher-rpc-peer.js +88 -0
- package/dist/src/util/publish/publisher-rpc-peer.js.map +1 -0
- package/dist/src/util/telemetry.d.ts +12 -0
- package/dist/src/util/telemetry.d.ts.map +1 -0
- package/dist/src/util/telemetry.js +73 -0
- package/dist/src/util/telemetry.js.map +1 -0
- package/dist/src/util/telemetryrc.json +6 -0
- package/dist/src/util/util.d.ts +10 -0
- package/dist/src/util/util.d.ts.map +1 -0
- package/dist/src/util/util.js +74 -0
- package/dist/src/util/util.js.map +1 -0
- package/oclif.manifest.json +1 -0
- package/package.json +97 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 DXOS.org
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
# DX CLI
|
|
2
|
+
|
|
3
|
+
DXOS command line interface.
|
|
4
|
+
|
|
5
|
+
TODO(wittjosiah): Add oclif-specific linting rules.
|
|
6
|
+
|
|
7
|
+
# Development
|
|
8
|
+
|
|
9
|
+
Run the build script from the root directory.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
$ nx run kodama:build --watch=true
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run the CLI in the local directory.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
$ export DX_CONFIG=./config/config.yml
|
|
19
|
+
$ ./bin/run config --json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
# Usage
|
|
23
|
+
|
|
24
|
+
<!-- usage -->
|
|
25
|
+
```sh-session
|
|
26
|
+
$ npm install -g @dxos/cli
|
|
27
|
+
$ dx COMMAND
|
|
28
|
+
running command...
|
|
29
|
+
$ dx (--version)
|
|
30
|
+
@dxos/cli/0.1.1 linux-x64 node-v16.14.0
|
|
31
|
+
$ dx --help [COMMAND]
|
|
32
|
+
USAGE
|
|
33
|
+
$ dx COMMAND
|
|
34
|
+
...
|
|
35
|
+
```
|
|
36
|
+
<!-- usagestop -->
|
|
37
|
+
|
|
38
|
+
# Commands
|
|
39
|
+
|
|
40
|
+
<!-- commands -->
|
|
41
|
+
* [`dx app create NAME`](#dx-app-create-name)
|
|
42
|
+
* [`dx app list`](#dx-app-list)
|
|
43
|
+
* [`dx app publish`](#dx-app-publish)
|
|
44
|
+
* [`dx config`](#dx-config)
|
|
45
|
+
* [`dx halo`](#dx-halo)
|
|
46
|
+
* [`dx halo create [USERNAME]`](#dx-halo-create-username)
|
|
47
|
+
* [`dx halo recover [SEEDPHRASE]`](#dx-halo-recover-seedphrase)
|
|
48
|
+
* [`dx help [COMMAND]`](#dx-help-command)
|
|
49
|
+
* [`dx plugins`](#dx-plugins)
|
|
50
|
+
* [`dx plugins:install PLUGIN...`](#dx-pluginsinstall-plugin)
|
|
51
|
+
* [`dx plugins:inspect PLUGIN...`](#dx-pluginsinspect-plugin)
|
|
52
|
+
* [`dx plugins:install PLUGIN...`](#dx-pluginsinstall-plugin-1)
|
|
53
|
+
* [`dx plugins:link PLUGIN`](#dx-pluginslink-plugin)
|
|
54
|
+
* [`dx plugins:uninstall PLUGIN...`](#dx-pluginsuninstall-plugin)
|
|
55
|
+
* [`dx plugins:uninstall PLUGIN...`](#dx-pluginsuninstall-plugin-1)
|
|
56
|
+
* [`dx plugins:uninstall PLUGIN...`](#dx-pluginsuninstall-plugin-2)
|
|
57
|
+
* [`dx plugins update`](#dx-plugins-update)
|
|
58
|
+
* [`dx reset`](#dx-reset)
|
|
59
|
+
* [`dx shell`](#dx-shell)
|
|
60
|
+
* [`dx space`](#dx-space)
|
|
61
|
+
* [`dx space create [NAME]`](#dx-space-create-name)
|
|
62
|
+
* [`dx space invite [KEY]`](#dx-space-invite-key)
|
|
63
|
+
* [`dx space join`](#dx-space-join)
|
|
64
|
+
* [`dx space list`](#dx-space-list)
|
|
65
|
+
* [`dx space members [KEY]`](#dx-space-members-key)
|
|
66
|
+
|
|
67
|
+
## `dx app create NAME`
|
|
68
|
+
|
|
69
|
+
Create a DXOS project.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
USAGE
|
|
73
|
+
$ dx app create [NAME] [--config <value>] [--timeout <value>] [--tag <value>] [-t hello|bare]
|
|
74
|
+
|
|
75
|
+
ARGUMENTS
|
|
76
|
+
NAME Name of the project
|
|
77
|
+
|
|
78
|
+
FLAGS
|
|
79
|
+
-t, --template=<option> [default: hello] Template to use when creating the project.
|
|
80
|
+
<options: hello|bare>
|
|
81
|
+
--config=<value> Specify config file
|
|
82
|
+
--tag=<value> [default: production] Git tag or branch of the DXOS repo to checkout.
|
|
83
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
84
|
+
|
|
85
|
+
DESCRIPTION
|
|
86
|
+
Create a DXOS project.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## `dx app list`
|
|
90
|
+
|
|
91
|
+
List apps.
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
USAGE
|
|
95
|
+
$ dx app list [--config <value>] [--timeout <value>] [--json]
|
|
96
|
+
|
|
97
|
+
FLAGS
|
|
98
|
+
--config=<value> Specify config file
|
|
99
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
100
|
+
|
|
101
|
+
GLOBAL FLAGS
|
|
102
|
+
--json Format output as json.
|
|
103
|
+
|
|
104
|
+
DESCRIPTION
|
|
105
|
+
List apps.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## `dx app publish`
|
|
109
|
+
|
|
110
|
+
Publish apps.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
USAGE
|
|
114
|
+
$ dx app publish [--config <value>] [--timeout <value>] [--configPath <value>] [--skipExisting] [--verbose]
|
|
115
|
+
[--version <value>]
|
|
116
|
+
|
|
117
|
+
FLAGS
|
|
118
|
+
--config=<value> Specify config file
|
|
119
|
+
--configPath=<value> Path to dx.yml
|
|
120
|
+
--skipExisting Do not update content on KUBE if version already exists
|
|
121
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
122
|
+
--verbose Verbose output
|
|
123
|
+
--version=<value> Version of modules to publish
|
|
124
|
+
|
|
125
|
+
DESCRIPTION
|
|
126
|
+
Publish apps.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## `dx config`
|
|
130
|
+
|
|
131
|
+
Show config file.
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
USAGE
|
|
135
|
+
$ dx config [--config <value>] [--timeout <value>] [--json]
|
|
136
|
+
|
|
137
|
+
FLAGS
|
|
138
|
+
--config=<value> Specify config file
|
|
139
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
140
|
+
|
|
141
|
+
GLOBAL FLAGS
|
|
142
|
+
--json Format output as json.
|
|
143
|
+
|
|
144
|
+
DESCRIPTION
|
|
145
|
+
Show config file.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## `dx halo`
|
|
149
|
+
|
|
150
|
+
Show HALO profile.
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
USAGE
|
|
154
|
+
$ dx halo [--config <value>] [--timeout <value>] [--json]
|
|
155
|
+
|
|
156
|
+
FLAGS
|
|
157
|
+
--config=<value> Specify config file
|
|
158
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
159
|
+
|
|
160
|
+
GLOBAL FLAGS
|
|
161
|
+
--json Format output as json.
|
|
162
|
+
|
|
163
|
+
DESCRIPTION
|
|
164
|
+
Show HALO profile.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## `dx halo create [USERNAME]`
|
|
168
|
+
|
|
169
|
+
Create HALO.
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
USAGE
|
|
173
|
+
$ dx halo create [USERNAME] [--config <value>] [--timeout <value>] [--json]
|
|
174
|
+
|
|
175
|
+
FLAGS
|
|
176
|
+
--config=<value> Specify config file
|
|
177
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
178
|
+
|
|
179
|
+
GLOBAL FLAGS
|
|
180
|
+
--json Format output as json.
|
|
181
|
+
|
|
182
|
+
DESCRIPTION
|
|
183
|
+
Create HALO.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## `dx halo recover [SEEDPHRASE]`
|
|
187
|
+
|
|
188
|
+
Recover HALO.
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
USAGE
|
|
192
|
+
$ dx halo recover [SEEDPHRASE] [--config <value>] [--timeout <value>] [--json]
|
|
193
|
+
|
|
194
|
+
FLAGS
|
|
195
|
+
--config=<value> Specify config file
|
|
196
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
197
|
+
|
|
198
|
+
GLOBAL FLAGS
|
|
199
|
+
--json Format output as json.
|
|
200
|
+
|
|
201
|
+
DESCRIPTION
|
|
202
|
+
Recover HALO.
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## `dx help [COMMAND]`
|
|
206
|
+
|
|
207
|
+
Display help for dx.
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
USAGE
|
|
211
|
+
$ dx help [COMMAND] [-n]
|
|
212
|
+
|
|
213
|
+
ARGUMENTS
|
|
214
|
+
COMMAND Command to show help for.
|
|
215
|
+
|
|
216
|
+
FLAGS
|
|
217
|
+
-n, --nested-commands Include all nested commands in the output.
|
|
218
|
+
|
|
219
|
+
DESCRIPTION
|
|
220
|
+
Display help for dx.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.15/src/commands/help.ts)_
|
|
224
|
+
|
|
225
|
+
## `dx plugins`
|
|
226
|
+
|
|
227
|
+
List installed plugins.
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
USAGE
|
|
231
|
+
$ dx plugins [--core]
|
|
232
|
+
|
|
233
|
+
FLAGS
|
|
234
|
+
--core Show core plugins.
|
|
235
|
+
|
|
236
|
+
DESCRIPTION
|
|
237
|
+
List installed plugins.
|
|
238
|
+
|
|
239
|
+
EXAMPLES
|
|
240
|
+
$ dx plugins
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.4/src/commands/plugins/index.ts)_
|
|
244
|
+
|
|
245
|
+
## `dx plugins:install PLUGIN...`
|
|
246
|
+
|
|
247
|
+
Installs a plugin into the CLI.
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
USAGE
|
|
251
|
+
$ dx plugins:install PLUGIN...
|
|
252
|
+
|
|
253
|
+
ARGUMENTS
|
|
254
|
+
PLUGIN Plugin to install.
|
|
255
|
+
|
|
256
|
+
FLAGS
|
|
257
|
+
-f, --force Run yarn install with force flag.
|
|
258
|
+
-h, --help Show CLI help.
|
|
259
|
+
-v, --verbose
|
|
260
|
+
|
|
261
|
+
DESCRIPTION
|
|
262
|
+
Installs a plugin into the CLI.
|
|
263
|
+
Can be installed from npm or a git url.
|
|
264
|
+
|
|
265
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
266
|
+
|
|
267
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
|
268
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
|
269
|
+
the CLI without the need to patch and update the whole CLI.
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
ALIASES
|
|
273
|
+
$ dx plugins add
|
|
274
|
+
|
|
275
|
+
EXAMPLES
|
|
276
|
+
$ dx plugins:install myplugin
|
|
277
|
+
|
|
278
|
+
$ dx plugins:install https://github.com/someuser/someplugin
|
|
279
|
+
|
|
280
|
+
$ dx plugins:install someuser/someplugin
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## `dx plugins:inspect PLUGIN...`
|
|
284
|
+
|
|
285
|
+
Displays installation properties of a plugin.
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
USAGE
|
|
289
|
+
$ dx plugins:inspect PLUGIN...
|
|
290
|
+
|
|
291
|
+
ARGUMENTS
|
|
292
|
+
PLUGIN [default: .] Plugin to inspect.
|
|
293
|
+
|
|
294
|
+
FLAGS
|
|
295
|
+
-h, --help Show CLI help.
|
|
296
|
+
-v, --verbose
|
|
297
|
+
|
|
298
|
+
DESCRIPTION
|
|
299
|
+
Displays installation properties of a plugin.
|
|
300
|
+
|
|
301
|
+
EXAMPLES
|
|
302
|
+
$ dx plugins:inspect myplugin
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## `dx plugins:install PLUGIN...`
|
|
306
|
+
|
|
307
|
+
Installs a plugin into the CLI.
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
USAGE
|
|
311
|
+
$ dx plugins:install PLUGIN...
|
|
312
|
+
|
|
313
|
+
ARGUMENTS
|
|
314
|
+
PLUGIN Plugin to install.
|
|
315
|
+
|
|
316
|
+
FLAGS
|
|
317
|
+
-f, --force Run yarn install with force flag.
|
|
318
|
+
-h, --help Show CLI help.
|
|
319
|
+
-v, --verbose
|
|
320
|
+
|
|
321
|
+
DESCRIPTION
|
|
322
|
+
Installs a plugin into the CLI.
|
|
323
|
+
Can be installed from npm or a git url.
|
|
324
|
+
|
|
325
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
326
|
+
|
|
327
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
|
328
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
|
329
|
+
the CLI without the need to patch and update the whole CLI.
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
ALIASES
|
|
333
|
+
$ dx plugins add
|
|
334
|
+
|
|
335
|
+
EXAMPLES
|
|
336
|
+
$ dx plugins:install myplugin
|
|
337
|
+
|
|
338
|
+
$ dx plugins:install https://github.com/someuser/someplugin
|
|
339
|
+
|
|
340
|
+
$ dx plugins:install someuser/someplugin
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## `dx plugins:link PLUGIN`
|
|
344
|
+
|
|
345
|
+
Links a plugin into the CLI for development.
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
USAGE
|
|
349
|
+
$ dx plugins:link PLUGIN
|
|
350
|
+
|
|
351
|
+
ARGUMENTS
|
|
352
|
+
PATH [default: .] path to plugin
|
|
353
|
+
|
|
354
|
+
FLAGS
|
|
355
|
+
-h, --help Show CLI help.
|
|
356
|
+
-v, --verbose
|
|
357
|
+
|
|
358
|
+
DESCRIPTION
|
|
359
|
+
Links a plugin into the CLI for development.
|
|
360
|
+
Installation of a linked plugin will override a user-installed or core plugin.
|
|
361
|
+
|
|
362
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
363
|
+
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
EXAMPLES
|
|
367
|
+
$ dx plugins:link myplugin
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## `dx plugins:uninstall PLUGIN...`
|
|
371
|
+
|
|
372
|
+
Removes a plugin from the CLI.
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
USAGE
|
|
376
|
+
$ dx plugins:uninstall PLUGIN...
|
|
377
|
+
|
|
378
|
+
ARGUMENTS
|
|
379
|
+
PLUGIN plugin to uninstall
|
|
380
|
+
|
|
381
|
+
FLAGS
|
|
382
|
+
-h, --help Show CLI help.
|
|
383
|
+
-v, --verbose
|
|
384
|
+
|
|
385
|
+
DESCRIPTION
|
|
386
|
+
Removes a plugin from the CLI.
|
|
387
|
+
|
|
388
|
+
ALIASES
|
|
389
|
+
$ dx plugins unlink
|
|
390
|
+
$ dx plugins remove
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## `dx plugins:uninstall PLUGIN...`
|
|
394
|
+
|
|
395
|
+
Removes a plugin from the CLI.
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
USAGE
|
|
399
|
+
$ dx plugins:uninstall PLUGIN...
|
|
400
|
+
|
|
401
|
+
ARGUMENTS
|
|
402
|
+
PLUGIN plugin to uninstall
|
|
403
|
+
|
|
404
|
+
FLAGS
|
|
405
|
+
-h, --help Show CLI help.
|
|
406
|
+
-v, --verbose
|
|
407
|
+
|
|
408
|
+
DESCRIPTION
|
|
409
|
+
Removes a plugin from the CLI.
|
|
410
|
+
|
|
411
|
+
ALIASES
|
|
412
|
+
$ dx plugins unlink
|
|
413
|
+
$ dx plugins remove
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
## `dx plugins:uninstall PLUGIN...`
|
|
417
|
+
|
|
418
|
+
Removes a plugin from the CLI.
|
|
419
|
+
|
|
420
|
+
```
|
|
421
|
+
USAGE
|
|
422
|
+
$ dx plugins:uninstall PLUGIN...
|
|
423
|
+
|
|
424
|
+
ARGUMENTS
|
|
425
|
+
PLUGIN plugin to uninstall
|
|
426
|
+
|
|
427
|
+
FLAGS
|
|
428
|
+
-h, --help Show CLI help.
|
|
429
|
+
-v, --verbose
|
|
430
|
+
|
|
431
|
+
DESCRIPTION
|
|
432
|
+
Removes a plugin from the CLI.
|
|
433
|
+
|
|
434
|
+
ALIASES
|
|
435
|
+
$ dx plugins unlink
|
|
436
|
+
$ dx plugins remove
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## `dx plugins update`
|
|
440
|
+
|
|
441
|
+
Update installed plugins.
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
USAGE
|
|
445
|
+
$ dx plugins update [-h] [-v]
|
|
446
|
+
|
|
447
|
+
FLAGS
|
|
448
|
+
-h, --help Show CLI help.
|
|
449
|
+
-v, --verbose
|
|
450
|
+
|
|
451
|
+
DESCRIPTION
|
|
452
|
+
Update installed plugins.
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## `dx reset`
|
|
456
|
+
|
|
457
|
+
Reset all data.
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
USAGE
|
|
461
|
+
$ dx reset [--config <value>] [--timeout <value>]
|
|
462
|
+
|
|
463
|
+
FLAGS
|
|
464
|
+
--config=<value> Specify config file
|
|
465
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
466
|
+
|
|
467
|
+
DESCRIPTION
|
|
468
|
+
Reset all data.
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
## `dx shell`
|
|
472
|
+
|
|
473
|
+
Interactive shell.
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
USAGE
|
|
477
|
+
$ dx shell [--config <value>] [--timeout <value>]
|
|
478
|
+
|
|
479
|
+
FLAGS
|
|
480
|
+
--config=<value> Specify config file
|
|
481
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
482
|
+
|
|
483
|
+
DESCRIPTION
|
|
484
|
+
Interactive shell.
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
## `dx space`
|
|
488
|
+
|
|
489
|
+
List spaces.
|
|
490
|
+
|
|
491
|
+
```
|
|
492
|
+
USAGE
|
|
493
|
+
$ dx space [--config <value>] [--timeout <value>]
|
|
494
|
+
|
|
495
|
+
FLAGS
|
|
496
|
+
--config=<value> Specify config file
|
|
497
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
498
|
+
|
|
499
|
+
DESCRIPTION
|
|
500
|
+
List spaces.
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
## `dx space create [NAME]`
|
|
504
|
+
|
|
505
|
+
Create space.
|
|
506
|
+
|
|
507
|
+
```
|
|
508
|
+
USAGE
|
|
509
|
+
$ dx space create [NAME] [--config <value>] [--timeout <value>] [--json]
|
|
510
|
+
|
|
511
|
+
FLAGS
|
|
512
|
+
--config=<value> Specify config file
|
|
513
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
514
|
+
|
|
515
|
+
GLOBAL FLAGS
|
|
516
|
+
--json Format output as json.
|
|
517
|
+
|
|
518
|
+
DESCRIPTION
|
|
519
|
+
Create space.
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
## `dx space invite [KEY]`
|
|
523
|
+
|
|
524
|
+
Create space invitation.
|
|
525
|
+
|
|
526
|
+
```
|
|
527
|
+
USAGE
|
|
528
|
+
$ dx space invite [KEY] [--config <value>] [--timeout <value>]
|
|
529
|
+
|
|
530
|
+
FLAGS
|
|
531
|
+
--config=<value> Specify config file
|
|
532
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
533
|
+
|
|
534
|
+
DESCRIPTION
|
|
535
|
+
Create space invitation.
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
## `dx space join`
|
|
539
|
+
|
|
540
|
+
Join space invitation.
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
USAGE
|
|
544
|
+
$ dx space join [--config <value>] [--timeout <value>] [--json] [--invitation <value>] [--secret <value>]
|
|
545
|
+
|
|
546
|
+
FLAGS
|
|
547
|
+
--config=<value> Specify config file
|
|
548
|
+
--invitation=<value> Invitation code
|
|
549
|
+
--secret=<value> Invitation secret
|
|
550
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
551
|
+
|
|
552
|
+
GLOBAL FLAGS
|
|
553
|
+
--json Format output as json.
|
|
554
|
+
|
|
555
|
+
DESCRIPTION
|
|
556
|
+
Join space invitation.
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
## `dx space list`
|
|
560
|
+
|
|
561
|
+
List spaces.
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
USAGE
|
|
565
|
+
$ dx space list [--config <value>] [--timeout <value>] [--json] [--columns <value> | -x] [--sort <value>]
|
|
566
|
+
[--filter <value>] [--output csv|json|yaml | | [--csv | --no-truncate]] [--no-header | ]
|
|
567
|
+
|
|
568
|
+
FLAGS
|
|
569
|
+
-x, --extended show extra columns
|
|
570
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
571
|
+
--config=<value> Specify config file
|
|
572
|
+
--csv output is csv format [alias: --output=csv]
|
|
573
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
574
|
+
--no-header hide table header from output
|
|
575
|
+
--no-truncate do not truncate output to fit screen
|
|
576
|
+
--output=<option> output in a more machine friendly format
|
|
577
|
+
<options: csv|json|yaml>
|
|
578
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
579
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
580
|
+
|
|
581
|
+
GLOBAL FLAGS
|
|
582
|
+
--json Format output as json.
|
|
583
|
+
|
|
584
|
+
DESCRIPTION
|
|
585
|
+
List spaces.
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
## `dx space members [KEY]`
|
|
589
|
+
|
|
590
|
+
List space members.
|
|
591
|
+
|
|
592
|
+
```
|
|
593
|
+
USAGE
|
|
594
|
+
$ dx space members [KEY] [--config <value>] [--timeout <value>] [--json] [--columns <value> | -x] [--sort
|
|
595
|
+
<value>] [--filter <value>] [--output csv|json|yaml | | [--csv | --no-truncate]] [--no-header | ]
|
|
596
|
+
|
|
597
|
+
FLAGS
|
|
598
|
+
-x, --extended show extra columns
|
|
599
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
600
|
+
--config=<value> Specify config file
|
|
601
|
+
--csv output is csv format [alias: --output=csv]
|
|
602
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
603
|
+
--no-header hide table header from output
|
|
604
|
+
--no-truncate do not truncate output to fit screen
|
|
605
|
+
--output=<option> output in a more machine friendly format
|
|
606
|
+
<options: csv|json|yaml>
|
|
607
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
608
|
+
--timeout=<value> [default: 30] Timeout in seconds
|
|
609
|
+
|
|
610
|
+
GLOBAL FLAGS
|
|
611
|
+
--json Format output as json.
|
|
612
|
+
|
|
613
|
+
DESCRIPTION
|
|
614
|
+
List space members.
|
|
615
|
+
```
|
|
616
|
+
<!-- commandsstop -->
|
package/bin/dev
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const oclif = require('@oclif/core')
|
|
4
|
+
|
|
5
|
+
const path = require('path')
|
|
6
|
+
const project = path.join(__dirname, '..', 'tsconfig.json')
|
|
7
|
+
|
|
8
|
+
// In dev mode -> use ts-node and dev plugins
|
|
9
|
+
process.env.NODE_ENV = 'development'
|
|
10
|
+
|
|
11
|
+
require('ts-node').register({project})
|
|
12
|
+
|
|
13
|
+
// In dev mode, always show stack traces
|
|
14
|
+
oclif.settings.debug = true;
|
|
15
|
+
|
|
16
|
+
// Start the CLI
|
|
17
|
+
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
|
package/bin/dev.cmd
ADDED
package/bin/run
ADDED
package/bin/run.cmd
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { Client } from '@dxos/client';
|
|
3
|
+
import { ConfigProto } from '@dxos/config';
|
|
4
|
+
import { PublisherRpcPeer } from './util';
|
|
5
|
+
export declare abstract class BaseCommand extends Command {
|
|
6
|
+
private _clientConfig?;
|
|
7
|
+
private _client?;
|
|
8
|
+
static flags: {
|
|
9
|
+
config: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
10
|
+
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
11
|
+
};
|
|
12
|
+
flags: any;
|
|
13
|
+
get clientConfig(): ConfigProto | undefined;
|
|
14
|
+
ok(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Load the client config.
|
|
17
|
+
*/
|
|
18
|
+
init(): Promise<void>;
|
|
19
|
+
catch(err: Error): Promise<void>;
|
|
20
|
+
finally(): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Lazily create the client.
|
|
23
|
+
*/
|
|
24
|
+
getClient(): Promise<Client>;
|
|
25
|
+
/**
|
|
26
|
+
* Convenience function to wrap command passing in client object.
|
|
27
|
+
*/
|
|
28
|
+
execWithClient<T>(callback: (client: Client) => Promise<T | undefined>): Promise<T | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Convenience function to wrap command passing in kube publisher.
|
|
31
|
+
*/
|
|
32
|
+
execWithPublisher<T>(callback: (rpc: PublisherRpcPeer) => Promise<T | undefined>): Promise<T | undefined>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=base-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAQ7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAIL,gBAAgB,EAGjB,MAAM,QAAQ,CAAC;AAMhB,8BAAsB,WAAY,SAAQ,OAAO;IAC/C,OAAO,CAAC,aAAa,CAAC,CAAc;IACpC,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAgB,KAAK;;;MAanB;IAEF,KAAK,EAAE,GAAG,CAAC;IAEX,IAAI,YAAY,4BAEf;IAED,EAAE;IAIF;;OAEG;IACY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA6DrB,KAAK,CAAC,GAAG,EAAE,KAAK;IAMhB,OAAO;IAEtB;;OAEG;IACG,SAAS;IAYf;;OAEG;IACG,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAkBrG;;OAEG;IACG,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CAwBhH"}
|