@super-protocol/sp-cli 0.0.1-alpha.42 → 0.0.2-beta.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/README.md +337 -39
- package/bin/dev.cmd +1 -1
- package/bin/dev.js +5 -3
- package/bin/run.js +3 -2
- package/dist/commands/auth/login.d.ts +4 -2
- package/dist/commands/auth/login.js +71 -24
- package/dist/commands/auth/me.d.ts +3 -2
- package/dist/commands/auth/me.js +9 -4
- package/dist/commands/base.d.ts +18 -0
- package/dist/commands/base.js +45 -0
- package/dist/commands/config/add.d.ts +13 -0
- package/dist/commands/config/add.js +84 -0
- package/dist/commands/config/base.d.ts +14 -0
- package/dist/commands/config/base.js +62 -0
- package/dist/commands/config/create.d.ts +11 -0
- package/dist/commands/config/create.js +51 -0
- package/dist/commands/config/delete.d.ts +10 -0
- package/dist/commands/config/delete.js +25 -0
- package/dist/commands/config/index.d.ts +6 -0
- package/dist/commands/config/index.js +22 -0
- package/dist/commands/config/list.d.ts +6 -0
- package/dist/commands/config/list.js +39 -0
- package/dist/commands/config/show.d.ts +6 -0
- package/dist/commands/config/show.js +10 -0
- package/dist/commands/config/use.d.ts +6 -0
- package/dist/commands/config/use.js +25 -0
- package/dist/commands/storage/base.d.ts +8 -0
- package/dist/commands/storage/base.js +12 -0
- package/dist/commands/storage/create.d.ts +15 -0
- package/dist/commands/storage/create.js +169 -0
- package/dist/commands/storage/select.d.ts +9 -0
- package/dist/commands/storage/select.js +44 -0
- package/dist/commands/storage/update.d.ts +16 -0
- package/dist/commands/storage/update.js +239 -0
- package/dist/config/config-file.schema.d.ts +6 -0
- package/dist/config/config-file.schema.js +5 -0
- package/dist/config/config.schema.d.ts +3 -0
- package/dist/config/config.schema.js +13 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +6 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +2 -0
- package/dist/hooks/init/init-container.d.ts +3 -0
- package/dist/hooks/init/init-container.js +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +23 -1
- package/dist/interfaces/index.d.ts +0 -1
- package/dist/interfaces/index.js +0 -1
- package/dist/interfaces/manager.interface.d.ts +1 -1
- package/dist/lib/container.d.ts +41 -0
- package/dist/lib/container.js +177 -0
- package/dist/logger.d.ts +6 -0
- package/dist/logger.js +62 -0
- package/dist/managers/account-manager.d.ts +2 -2
- package/dist/managers/account-manager.js +18 -9
- package/dist/managers/config-file-manager.d.ts +50 -0
- package/dist/managers/config-file-manager.js +278 -0
- package/dist/managers/config-manager.d.ts +12 -6
- package/dist/managers/config-manager.js +38 -14
- package/dist/managers/index.d.ts +1 -2
- package/dist/managers/index.js +1 -2
- package/dist/middlewares/auth-middleware.d.ts +9 -0
- package/dist/middlewares/auth-middleware.js +91 -0
- package/dist/middlewares/cookies-middleware.d.ts +8 -0
- package/dist/middlewares/cookies-middleware.js +80 -0
- package/dist/services/storage.service.d.ts +34 -0
- package/dist/services/storage.service.js +113 -0
- package/dist/utils/helper.d.ts +1 -0
- package/dist/utils/helper.js +1 -0
- package/oclif.manifest.json +786 -7
- package/package.json +38 -15
- package/dist/commands/refresh.d.ts +0 -4
- package/dist/commands/refresh.js +0 -7
- package/dist/config/constants.d.ts +0 -1
- package/dist/config/constants.js +0 -2
- package/dist/interfaces/abstract.command.d.ts +0 -16
- package/dist/interfaces/abstract.command.js +0 -59
- package/dist/managers/auth-manager.d.ts +0 -19
- package/dist/managers/auth-manager.js +0 -101
- package/dist/managers/cookies-manager.d.ts +0 -15
- package/dist/managers/cookies-manager.js +0 -92
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @super-protocol/sp-cli
|
|
|
21
21
|
$ sp COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ sp (--version)
|
|
24
|
-
@super-protocol/sp-cli/0.0.
|
|
24
|
+
@super-protocol/sp-cli/0.0.2-beta.1 linux-x64 node-v22.21.1
|
|
25
25
|
$ sp --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sp COMMAND
|
|
@@ -32,6 +32,15 @@ USAGE
|
|
|
32
32
|
<!-- commands -->
|
|
33
33
|
* [`sp auth login`](#sp-auth-login)
|
|
34
34
|
* [`sp auth me`](#sp-auth-me)
|
|
35
|
+
* [`sp base`](#sp-base)
|
|
36
|
+
* [`sp config`](#sp-config)
|
|
37
|
+
* [`sp config add [FILE]`](#sp-config-add-file)
|
|
38
|
+
* [`sp config base`](#sp-config-base)
|
|
39
|
+
* [`sp config create`](#sp-config-create)
|
|
40
|
+
* [`sp config delete`](#sp-config-delete)
|
|
41
|
+
* [`sp config list`](#sp-config-list)
|
|
42
|
+
* [`sp config show`](#sp-config-show)
|
|
43
|
+
* [`sp config use`](#sp-config-use)
|
|
35
44
|
* [`sp help [COMMAND]`](#sp-help-command)
|
|
36
45
|
* [`sp plugins`](#sp-plugins)
|
|
37
46
|
* [`sp plugins add PLUGIN`](#sp-plugins-add-plugin)
|
|
@@ -43,8 +52,10 @@ USAGE
|
|
|
43
52
|
* [`sp plugins uninstall [PLUGIN]`](#sp-plugins-uninstall-plugin)
|
|
44
53
|
* [`sp plugins unlink [PLUGIN]`](#sp-plugins-unlink-plugin)
|
|
45
54
|
* [`sp plugins update`](#sp-plugins-update)
|
|
46
|
-
* [`sp
|
|
47
|
-
* [`sp
|
|
55
|
+
* [`sp storage base`](#sp-storage-base)
|
|
56
|
+
* [`sp storage create`](#sp-storage-create)
|
|
57
|
+
* [`sp storage select`](#sp-storage-select)
|
|
58
|
+
* [`sp storage update`](#sp-storage-update)
|
|
48
59
|
|
|
49
60
|
## `sp auth login`
|
|
50
61
|
|
|
@@ -52,7 +63,12 @@ Authorization
|
|
|
52
63
|
|
|
53
64
|
```
|
|
54
65
|
USAGE
|
|
55
|
-
$ sp auth login
|
|
66
|
+
$ sp auth login [--json] [--config <value>] [--url <value>]
|
|
67
|
+
|
|
68
|
+
GLOBAL FLAGS
|
|
69
|
+
--config=<value> Specify config file.
|
|
70
|
+
--json Format output as json.
|
|
71
|
+
--url=<value> Specify provider base URL.
|
|
56
72
|
|
|
57
73
|
DESCRIPTION
|
|
58
74
|
Authorization
|
|
@@ -61,16 +77,246 @@ EXAMPLES
|
|
|
61
77
|
$ sp auth login
|
|
62
78
|
```
|
|
63
79
|
|
|
64
|
-
_See code: [src/commands/auth/login.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.
|
|
80
|
+
_See code: [src/commands/auth/login.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/auth/login.ts)_
|
|
65
81
|
|
|
66
82
|
## `sp auth me`
|
|
67
83
|
|
|
68
84
|
```
|
|
69
85
|
USAGE
|
|
70
|
-
$ sp auth me
|
|
86
|
+
$ sp auth me [--json] [--config <value>] [--url <value>]
|
|
87
|
+
|
|
88
|
+
GLOBAL FLAGS
|
|
89
|
+
--config=<value> Specify config file.
|
|
90
|
+
--json Format output as json.
|
|
91
|
+
--url=<value> Specify provider base URL.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
_See code: [src/commands/auth/me.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/auth/me.ts)_
|
|
95
|
+
|
|
96
|
+
## `sp base`
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
USAGE
|
|
100
|
+
$ sp base [--json] [--config <value>] [--url <value>]
|
|
101
|
+
|
|
102
|
+
GLOBAL FLAGS
|
|
103
|
+
--config=<value> Specify config file.
|
|
104
|
+
--json Format output as json.
|
|
105
|
+
--url=<value> Specify provider base URL.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
_See code: [src/commands/base.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/base.ts)_
|
|
109
|
+
|
|
110
|
+
## `sp config`
|
|
111
|
+
|
|
112
|
+
Manage configuration configs
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
USAGE
|
|
116
|
+
$ sp config [--json] [--config <value>] [--url <value>]
|
|
117
|
+
|
|
118
|
+
GLOBAL FLAGS
|
|
119
|
+
--config=<value> Specify config file.
|
|
120
|
+
--json Format output as json.
|
|
121
|
+
--url=<value> Specify provider base URL.
|
|
122
|
+
|
|
123
|
+
DESCRIPTION
|
|
124
|
+
Manage configuration configs
|
|
125
|
+
|
|
126
|
+
EXAMPLES
|
|
127
|
+
$ sp config show - Show current configuration details
|
|
128
|
+
|
|
129
|
+
$ sp config list - List all configurations
|
|
130
|
+
|
|
131
|
+
$ sp config use - Switch to a configuration
|
|
132
|
+
|
|
133
|
+
$ sp config create --name "My Config" - Create new configuration
|
|
134
|
+
|
|
135
|
+
$ sp config add ./config.json - Import configuration from file
|
|
136
|
+
|
|
137
|
+
$ sp config delete - Delete a configuration
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
_See code: [src/commands/config/index.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/index.ts)_
|
|
141
|
+
|
|
142
|
+
## `sp config add [FILE]`
|
|
143
|
+
|
|
144
|
+
Import a configuration from a file
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
USAGE
|
|
148
|
+
$ sp config add [FILE] [--json] [--config <value>] [--url <value>] [-n <value>] [-y]
|
|
149
|
+
|
|
150
|
+
ARGUMENTS
|
|
151
|
+
[FILE] Configuration file path to import
|
|
152
|
+
|
|
153
|
+
FLAGS
|
|
154
|
+
-n, --name=<value> Custom name for the imported configuration
|
|
155
|
+
-y, --yes Automatically switch to imported configuration
|
|
156
|
+
|
|
157
|
+
GLOBAL FLAGS
|
|
158
|
+
--config=<value> Specify config file.
|
|
159
|
+
--json Format output as json.
|
|
160
|
+
--url=<value> Specify provider base URL.
|
|
161
|
+
|
|
162
|
+
DESCRIPTION
|
|
163
|
+
Import a configuration from a file
|
|
164
|
+
|
|
165
|
+
EXAMPLES
|
|
166
|
+
$ sp config add ./my-config.json
|
|
167
|
+
|
|
168
|
+
$ sp config add ./my-config.json --name "Imported"
|
|
169
|
+
|
|
170
|
+
Configuration files must follow this schema:
|
|
171
|
+
{
|
|
172
|
+
"providerUrl": "https://api.dp.superprotocol.com",
|
|
173
|
+
"name": "Some name",
|
|
174
|
+
"account": {
|
|
175
|
+
"address": "0x111222333444555....",
|
|
176
|
+
"privateKey": "0x000011122233344555..."
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
_See code: [src/commands/config/add.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/add.ts)_
|
|
182
|
+
|
|
183
|
+
## `sp config base`
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
USAGE
|
|
187
|
+
$ sp config base [--json] [--config <value>] [--url <value>]
|
|
188
|
+
|
|
189
|
+
GLOBAL FLAGS
|
|
190
|
+
--config=<value> Specify config file.
|
|
191
|
+
--json Format output as json.
|
|
192
|
+
--url=<value> Specify provider base URL.
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
_See code: [src/commands/config/base.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/base.ts)_
|
|
196
|
+
|
|
197
|
+
## `sp config create`
|
|
198
|
+
|
|
199
|
+
Create a new configuration
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
USAGE
|
|
203
|
+
$ sp config create -n <value> [--json] [--config <value>] [-u <value>] [-y]
|
|
204
|
+
|
|
205
|
+
FLAGS
|
|
206
|
+
-n, --name=<value> (required) Configuration name
|
|
207
|
+
-u, --url=<value> Provider base URL
|
|
208
|
+
-y, --yes Switch to new config
|
|
209
|
+
|
|
210
|
+
GLOBAL FLAGS
|
|
211
|
+
--config=<value> Specify config file.
|
|
212
|
+
--json Format output as json.
|
|
213
|
+
|
|
214
|
+
DESCRIPTION
|
|
215
|
+
Create a new configuration
|
|
216
|
+
|
|
217
|
+
EXAMPLES
|
|
218
|
+
$ sp config create --name "My Config"
|
|
219
|
+
|
|
220
|
+
$ sp config create --name "Production" --url "https://api.dp.superprotocol.com"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
_See code: [src/commands/config/create.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/create.ts)_
|
|
224
|
+
|
|
225
|
+
## `sp config delete`
|
|
226
|
+
|
|
227
|
+
Delete a configuration file
|
|
228
|
+
|
|
71
229
|
```
|
|
230
|
+
USAGE
|
|
231
|
+
$ sp config delete [--json] [--config <value>] [--url <value>] [-f] [-n <value>]
|
|
72
232
|
|
|
73
|
-
|
|
233
|
+
FLAGS
|
|
234
|
+
-f, --force Force deletion without confirmation
|
|
235
|
+
-n, --name=<value> Configuration name to delete
|
|
236
|
+
|
|
237
|
+
GLOBAL FLAGS
|
|
238
|
+
--config=<value> Specify config file.
|
|
239
|
+
--json Format output as json.
|
|
240
|
+
--url=<value> Specify provider base URL.
|
|
241
|
+
|
|
242
|
+
DESCRIPTION
|
|
243
|
+
Delete a configuration file
|
|
244
|
+
|
|
245
|
+
EXAMPLES
|
|
246
|
+
$ sp config delete
|
|
247
|
+
|
|
248
|
+
$ sp config delete --name "My Config"
|
|
249
|
+
|
|
250
|
+
$ sp config delete --name "My Config" --force
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
_See code: [src/commands/config/delete.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/delete.ts)_
|
|
254
|
+
|
|
255
|
+
## `sp config list`
|
|
256
|
+
|
|
257
|
+
List all configurations
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
USAGE
|
|
261
|
+
$ sp config list [--json] [--config <value>] [--url <value>]
|
|
262
|
+
|
|
263
|
+
GLOBAL FLAGS
|
|
264
|
+
--config=<value> Specify config file.
|
|
265
|
+
--json Format output as json.
|
|
266
|
+
--url=<value> Specify provider base URL.
|
|
267
|
+
|
|
268
|
+
DESCRIPTION
|
|
269
|
+
List all configurations
|
|
270
|
+
|
|
271
|
+
EXAMPLES
|
|
272
|
+
$ sp config list
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
_See code: [src/commands/config/list.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/list.ts)_
|
|
276
|
+
|
|
277
|
+
## `sp config show`
|
|
278
|
+
|
|
279
|
+
Show current configuration
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
USAGE
|
|
283
|
+
$ sp config show [--json] [--config <value>] [--url <value>]
|
|
284
|
+
|
|
285
|
+
GLOBAL FLAGS
|
|
286
|
+
--config=<value> Specify config file.
|
|
287
|
+
--json Format output as json.
|
|
288
|
+
--url=<value> Specify provider base URL.
|
|
289
|
+
|
|
290
|
+
DESCRIPTION
|
|
291
|
+
Show current configuration
|
|
292
|
+
|
|
293
|
+
EXAMPLES
|
|
294
|
+
$ sp config show
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
_See code: [src/commands/config/show.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/show.ts)_
|
|
298
|
+
|
|
299
|
+
## `sp config use`
|
|
300
|
+
|
|
301
|
+
Switch to a different configuration file
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
USAGE
|
|
305
|
+
$ sp config use [--json] [--config <value>] [--url <value>]
|
|
306
|
+
|
|
307
|
+
GLOBAL FLAGS
|
|
308
|
+
--config=<value> Specify config file.
|
|
309
|
+
--json Format output as json.
|
|
310
|
+
--url=<value> Specify provider base URL.
|
|
311
|
+
|
|
312
|
+
DESCRIPTION
|
|
313
|
+
Switch to a different configuration file
|
|
314
|
+
|
|
315
|
+
EXAMPLES
|
|
316
|
+
$ sp config use
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
_See code: [src/commands/config/use.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/config/use.ts)_
|
|
74
320
|
|
|
75
321
|
## `sp help [COMMAND]`
|
|
76
322
|
|
|
@@ -81,7 +327,7 @@ USAGE
|
|
|
81
327
|
$ sp help [COMMAND...] [-n]
|
|
82
328
|
|
|
83
329
|
ARGUMENTS
|
|
84
|
-
COMMAND... Command to show help for.
|
|
330
|
+
[COMMAND...] Command to show help for.
|
|
85
331
|
|
|
86
332
|
FLAGS
|
|
87
333
|
-n, --nested-commands Include all nested commands in the output.
|
|
@@ -113,7 +359,7 @@ EXAMPLES
|
|
|
113
359
|
$ sp plugins
|
|
114
360
|
```
|
|
115
361
|
|
|
116
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
362
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/index.ts)_
|
|
117
363
|
|
|
118
364
|
## `sp plugins add PLUGIN`
|
|
119
365
|
|
|
@@ -187,7 +433,7 @@ EXAMPLES
|
|
|
187
433
|
$ sp plugins inspect myplugin
|
|
188
434
|
```
|
|
189
435
|
|
|
190
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
436
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/inspect.ts)_
|
|
191
437
|
|
|
192
438
|
## `sp plugins install PLUGIN`
|
|
193
439
|
|
|
@@ -236,7 +482,7 @@ EXAMPLES
|
|
|
236
482
|
$ sp plugins install someuser/someplugin
|
|
237
483
|
```
|
|
238
484
|
|
|
239
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
485
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/install.ts)_
|
|
240
486
|
|
|
241
487
|
## `sp plugins link PATH`
|
|
242
488
|
|
|
@@ -267,7 +513,7 @@ EXAMPLES
|
|
|
267
513
|
$ sp plugins link myplugin
|
|
268
514
|
```
|
|
269
515
|
|
|
270
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
516
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/link.ts)_
|
|
271
517
|
|
|
272
518
|
## `sp plugins remove [PLUGIN]`
|
|
273
519
|
|
|
@@ -278,7 +524,7 @@ USAGE
|
|
|
278
524
|
$ sp plugins remove [PLUGIN...] [-h] [-v]
|
|
279
525
|
|
|
280
526
|
ARGUMENTS
|
|
281
|
-
PLUGIN... plugin to uninstall
|
|
527
|
+
[PLUGIN...] plugin to uninstall
|
|
282
528
|
|
|
283
529
|
FLAGS
|
|
284
530
|
-h, --help Show CLI help.
|
|
@@ -308,7 +554,7 @@ FLAGS
|
|
|
308
554
|
--reinstall Reinstall all plugins after uninstalling.
|
|
309
555
|
```
|
|
310
556
|
|
|
311
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
557
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/reset.ts)_
|
|
312
558
|
|
|
313
559
|
## `sp plugins uninstall [PLUGIN]`
|
|
314
560
|
|
|
@@ -319,7 +565,7 @@ USAGE
|
|
|
319
565
|
$ sp plugins uninstall [PLUGIN...] [-h] [-v]
|
|
320
566
|
|
|
321
567
|
ARGUMENTS
|
|
322
|
-
PLUGIN... plugin to uninstall
|
|
568
|
+
[PLUGIN...] plugin to uninstall
|
|
323
569
|
|
|
324
570
|
FLAGS
|
|
325
571
|
-h, --help Show CLI help.
|
|
@@ -336,7 +582,7 @@ EXAMPLES
|
|
|
336
582
|
$ sp plugins uninstall myplugin
|
|
337
583
|
```
|
|
338
584
|
|
|
339
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
585
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/uninstall.ts)_
|
|
340
586
|
|
|
341
587
|
## `sp plugins unlink [PLUGIN]`
|
|
342
588
|
|
|
@@ -347,7 +593,7 @@ USAGE
|
|
|
347
593
|
$ sp plugins unlink [PLUGIN...] [-h] [-v]
|
|
348
594
|
|
|
349
595
|
ARGUMENTS
|
|
350
|
-
PLUGIN... plugin to uninstall
|
|
596
|
+
[PLUGIN...] plugin to uninstall
|
|
351
597
|
|
|
352
598
|
FLAGS
|
|
353
599
|
-h, --help Show CLI help.
|
|
@@ -380,52 +626,104 @@ DESCRIPTION
|
|
|
380
626
|
Update installed plugins.
|
|
381
627
|
```
|
|
382
628
|
|
|
383
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
629
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.50/src/commands/plugins/update.ts)_
|
|
384
630
|
|
|
385
|
-
## `sp
|
|
631
|
+
## `sp storage base`
|
|
386
632
|
|
|
387
633
|
```
|
|
388
634
|
USAGE
|
|
389
|
-
$ sp
|
|
635
|
+
$ sp storage base [--json] [--config <value>] [--url <value>]
|
|
636
|
+
|
|
637
|
+
GLOBAL FLAGS
|
|
638
|
+
--config=<value> Specify config file.
|
|
639
|
+
--json Format output as json.
|
|
640
|
+
--url=<value> Specify provider base URL.
|
|
390
641
|
```
|
|
391
642
|
|
|
392
|
-
_See code: [src/commands/
|
|
643
|
+
_See code: [src/commands/storage/base.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/storage/base.ts)_
|
|
393
644
|
|
|
394
|
-
## `sp
|
|
645
|
+
## `sp storage create`
|
|
395
646
|
|
|
396
|
-
|
|
647
|
+
Create a new storage entry from file or interactive prompts.
|
|
397
648
|
|
|
398
649
|
```
|
|
399
650
|
USAGE
|
|
400
|
-
$ sp
|
|
651
|
+
$ sp storage create [--json] [--config <value>] [--url <value>] [-f <value>] [--notDefault]
|
|
401
652
|
|
|
402
653
|
FLAGS
|
|
403
|
-
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
654
|
+
-f, --fromFile=<value> Path to a JSON file that contains AddStorageDto payload.
|
|
655
|
+
--notDefault Skip setting the created storage as default.
|
|
656
|
+
|
|
657
|
+
GLOBAL FLAGS
|
|
658
|
+
--config=<value> Specify config file.
|
|
659
|
+
--json Format output as json.
|
|
660
|
+
--url=<value> Specify provider base URL.
|
|
408
661
|
|
|
409
662
|
DESCRIPTION
|
|
410
|
-
|
|
663
|
+
Create a new storage entry from file or interactive prompts.
|
|
411
664
|
|
|
412
665
|
EXAMPLES
|
|
413
|
-
|
|
666
|
+
$ sp storage create
|
|
667
|
+
|
|
668
|
+
$ sp storage create --fromFile ./storage.json
|
|
669
|
+
|
|
670
|
+
$ sp storage create --not-default
|
|
671
|
+
```
|
|
414
672
|
|
|
415
|
-
|
|
673
|
+
_See code: [src/commands/storage/create.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/storage/create.ts)_
|
|
416
674
|
|
|
417
|
-
|
|
675
|
+
## `sp storage select`
|
|
418
676
|
|
|
419
|
-
|
|
677
|
+
Select a storage that will be used by subsequent commands.
|
|
420
678
|
|
|
421
|
-
|
|
679
|
+
```
|
|
680
|
+
USAGE
|
|
681
|
+
$ sp storage select [--json] [--config <value>] [--url <value>] [-i <value>]
|
|
422
682
|
|
|
423
|
-
|
|
683
|
+
FLAGS
|
|
684
|
+
-i, --id=<value> Storage ID to select
|
|
685
|
+
|
|
686
|
+
GLOBAL FLAGS
|
|
687
|
+
--config=<value> Specify config file.
|
|
688
|
+
--json Format output as json.
|
|
689
|
+
--url=<value> Specify provider base URL.
|
|
424
690
|
|
|
425
|
-
|
|
691
|
+
DESCRIPTION
|
|
692
|
+
Select a storage that will be used by subsequent commands.
|
|
693
|
+
|
|
694
|
+
EXAMPLES
|
|
695
|
+
$ sp storage select
|
|
696
|
+
|
|
697
|
+
$ sp storage select --id=2de3e3a4-0000-1111-2222-333344445555
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
_See code: [src/commands/storage/select.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/storage/select.ts)_
|
|
701
|
+
|
|
702
|
+
## `sp storage update`
|
|
703
|
+
|
|
704
|
+
Update the configuration of an existing storage.
|
|
705
|
+
|
|
706
|
+
```
|
|
707
|
+
USAGE
|
|
708
|
+
$ sp storage update [--json] [--config <value>] [--url <value>] [-f <value>] [-i <value>]
|
|
709
|
+
|
|
710
|
+
FLAGS
|
|
711
|
+
-f, --fromFile=<value> Path to a JSON file that contains UpdateStorageDto payload.
|
|
712
|
+
-i, --id=<value> Storage ID to update
|
|
713
|
+
|
|
714
|
+
GLOBAL FLAGS
|
|
715
|
+
--config=<value> Specify config file.
|
|
716
|
+
--json Format output as json.
|
|
717
|
+
--url=<value> Specify provider base URL.
|
|
718
|
+
|
|
719
|
+
DESCRIPTION
|
|
720
|
+
Update the configuration of an existing storage.
|
|
721
|
+
|
|
722
|
+
EXAMPLES
|
|
723
|
+
$ sp storage update --id=2de3e3a4-0000-1111-2222-333344445555 --fromFile ./storage-update.json
|
|
426
724
|
|
|
427
|
-
|
|
725
|
+
$ sp storage update --id=2de3e3a4-0000-1111-2222-333344445555
|
|
428
726
|
```
|
|
429
727
|
|
|
430
|
-
_See code: [
|
|
728
|
+
_See code: [src/commands/storage/update.ts](https://github.com/Super-Protocol/sp-cli/blob/v0.0.2-beta.1/src/commands/storage/update.ts)_
|
|
431
729
|
<!-- commandsstop -->
|
package/bin/dev.cmd
CHANGED
package/bin/dev.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --
|
|
2
|
-
|
|
1
|
+
#!/usr/bin/env -S node --import tsx
|
|
3
2
|
import { execute } from '@oclif/core';
|
|
4
3
|
|
|
5
|
-
await execute({
|
|
4
|
+
await execute({
|
|
5
|
+
development: true,
|
|
6
|
+
dir: import.meta.url,
|
|
7
|
+
});
|
package/bin/run.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class SpLogin extends
|
|
1
|
+
import { BaseCommand } from '../base.js';
|
|
2
|
+
export default class SpLogin extends BaseCommand<typeof SpLogin> {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
+
checkStorage(): Promise<void>;
|
|
5
6
|
getTokens(nonce: string): Promise<void>;
|
|
6
7
|
getUserNonce(address: string): Promise<{
|
|
7
8
|
error: {
|
|
@@ -12,5 +13,6 @@ export default class SpLogin extends SpCommand {
|
|
|
12
13
|
nonce?: string;
|
|
13
14
|
} | undefined;
|
|
14
15
|
}>;
|
|
16
|
+
init(): Promise<void>;
|
|
15
17
|
run(): Promise<void>;
|
|
16
18
|
}
|