@super-protocol/sp-cli 0.0.2 → 0.0.3
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 +217 -263
- package/bin/dev.js +1 -1
- package/dist/commands/account/get-sppi.d.ts +8 -0
- package/dist/commands/account/get-sppi.js +23 -0
- package/dist/commands/account/info.d.ts +22 -0
- package/dist/commands/account/info.js +46 -0
- package/dist/commands/auth/login.d.ts +6 -11
- package/dist/commands/auth/login.js +28 -76
- package/dist/commands/base.d.ts +2 -4
- package/dist/commands/base.js +8 -10
- package/dist/commands/config/add.js +1 -12
- package/dist/commands/config/base.d.ts +5 -3
- package/dist/commands/config/base.js +30 -14
- package/dist/commands/config/create.js +1 -11
- package/dist/commands/config/list.js +20 -19
- package/dist/commands/config/use.js +5 -3
- package/dist/commands/files/download.d.ts +15 -0
- package/dist/commands/files/download.js +55 -0
- package/dist/commands/files/upload.d.ts +18 -0
- package/dist/commands/files/upload.js +79 -0
- package/dist/commands/storage/base.d.ts +13 -0
- package/dist/commands/storage/base.js +125 -0
- package/dist/commands/storage/create.d.ts +11 -0
- package/dist/commands/storage/create.js +53 -0
- package/dist/commands/storage/select.d.ts +9 -0
- package/dist/commands/storage/select.js +40 -0
- package/dist/commands/storage/show.d.ts +17 -0
- package/dist/commands/storage/show.js +36 -0
- package/dist/commands/storage/update.d.ts +14 -0
- package/dist/commands/storage/update.js +187 -0
- package/dist/commands/workflows/extend-lease.d.ts +17 -0
- package/dist/commands/workflows/extend-lease.js +94 -0
- package/dist/config/config-file.schema.d.ts +4 -4
- package/dist/config/config-file.schema.js +1 -1
- package/dist/config/config.schema.d.ts +25 -15
- package/dist/config/config.schema.js +7 -10
- package/dist/constants.d.ts +5 -0
- package/dist/constants.js +5 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +2 -0
- package/dist/hooks/finally/shutdown-blockchain.d.ts +3 -0
- package/dist/hooks/finally/shutdown-blockchain.js +8 -0
- package/dist/lib/container.d.ts +7 -7
- package/dist/lib/container.js +48 -26
- package/dist/managers/account-manager.d.ts +1 -0
- package/dist/managers/account-manager.js +27 -13
- package/dist/managers/config-file-manager.d.ts +2 -2
- package/dist/managers/config-file-manager.js +29 -12
- package/dist/middlewares/auth-middleware.js +5 -1
- package/dist/services/auth.service.d.ts +24 -0
- package/dist/services/auth.service.js +93 -0
- package/dist/services/storage.service.d.ts +73 -0
- package/dist/services/storage.service.js +351 -0
- package/dist/utils/helper.d.ts +6 -0
- package/dist/utils/helper.js +23 -0
- package/dist/utils/progress.d.ts +8 -0
- package/dist/utils/progress.js +35 -0
- package/oclif.manifest.json +455 -179
- package/package.json +18 -8
package/oclif.manifest.json
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
4
|
-
"aliases": [
|
|
3
|
+
"auth:login": {
|
|
4
|
+
"aliases": [
|
|
5
|
+
"login"
|
|
6
|
+
],
|
|
5
7
|
"args": {},
|
|
8
|
+
"description": "Login to SuperProtocol (sign up or sign in).",
|
|
9
|
+
"examples": [
|
|
10
|
+
"<%= config.bin %> <%= command.id %>\n"
|
|
11
|
+
],
|
|
6
12
|
"flags": {
|
|
7
13
|
"json": {
|
|
8
14
|
"description": "Format output as json.",
|
|
@@ -19,20 +25,11 @@
|
|
|
19
25
|
"hasDynamicHelp": false,
|
|
20
26
|
"multiple": false,
|
|
21
27
|
"type": "option"
|
|
22
|
-
},
|
|
23
|
-
"url": {
|
|
24
|
-
"helpGroup": "GLOBAL",
|
|
25
|
-
"name": "url",
|
|
26
|
-
"required": false,
|
|
27
|
-
"summary": "Specify provider base URL.",
|
|
28
|
-
"hasDynamicHelp": false,
|
|
29
|
-
"multiple": false,
|
|
30
|
-
"type": "option"
|
|
31
28
|
}
|
|
32
29
|
},
|
|
33
30
|
"hasDynamicHelp": false,
|
|
34
31
|
"hiddenAliases": [],
|
|
35
|
-
"id": "
|
|
32
|
+
"id": "auth:login",
|
|
36
33
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
37
34
|
"pluginName": "@super-protocol/sp-cli",
|
|
38
35
|
"pluginType": "core",
|
|
@@ -42,16 +39,13 @@
|
|
|
42
39
|
"relativePath": [
|
|
43
40
|
"dist",
|
|
44
41
|
"commands",
|
|
45
|
-
"
|
|
42
|
+
"auth",
|
|
43
|
+
"login.js"
|
|
46
44
|
]
|
|
47
45
|
},
|
|
48
|
-
"auth:
|
|
46
|
+
"auth:me": {
|
|
49
47
|
"aliases": [],
|
|
50
48
|
"args": {},
|
|
51
|
-
"description": "Authorization",
|
|
52
|
-
"examples": [
|
|
53
|
-
"<%= config.bin %> <%= command.id %>\n"
|
|
54
|
-
],
|
|
55
49
|
"flags": {
|
|
56
50
|
"json": {
|
|
57
51
|
"description": "Format output as json.",
|
|
@@ -68,20 +62,11 @@
|
|
|
68
62
|
"hasDynamicHelp": false,
|
|
69
63
|
"multiple": false,
|
|
70
64
|
"type": "option"
|
|
71
|
-
},
|
|
72
|
-
"url": {
|
|
73
|
-
"helpGroup": "GLOBAL",
|
|
74
|
-
"name": "url",
|
|
75
|
-
"required": false,
|
|
76
|
-
"summary": "Specify provider base URL.",
|
|
77
|
-
"hasDynamicHelp": false,
|
|
78
|
-
"multiple": false,
|
|
79
|
-
"type": "option"
|
|
80
65
|
}
|
|
81
66
|
},
|
|
82
67
|
"hasDynamicHelp": false,
|
|
83
68
|
"hiddenAliases": [],
|
|
84
|
-
"id": "auth:
|
|
69
|
+
"id": "auth:me",
|
|
85
70
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
86
71
|
"pluginName": "@super-protocol/sp-cli",
|
|
87
72
|
"pluginType": "core",
|
|
@@ -92,12 +77,24 @@
|
|
|
92
77
|
"dist",
|
|
93
78
|
"commands",
|
|
94
79
|
"auth",
|
|
95
|
-
"
|
|
80
|
+
"me.js"
|
|
96
81
|
]
|
|
97
82
|
},
|
|
98
|
-
"
|
|
83
|
+
"config:add": {
|
|
99
84
|
"aliases": [],
|
|
100
|
-
"args": {
|
|
85
|
+
"args": {
|
|
86
|
+
"file": {
|
|
87
|
+
"description": "Configuration file path to import",
|
|
88
|
+
"name": "file",
|
|
89
|
+
"required": false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"description": "Import a configuration from a file",
|
|
93
|
+
"examples": [
|
|
94
|
+
"<%= config.bin %> <%= command.id %> ./my-config.json",
|
|
95
|
+
"<%= config.bin %> <%= command.id %> ./my-config.json --name \"Imported\"",
|
|
96
|
+
"Configuration files must follow this schema:\n\n {\n \"providerUrl\": \"https://api.dp.superprotocol.com\",\n \"name\": \"Some name\",\n \"account\": {\n \"address\": \"0x111222333444555....\",\n \"privateKey\": \"0x000011122233344555...\"\n }\n }"
|
|
97
|
+
],
|
|
101
98
|
"flags": {
|
|
102
99
|
"json": {
|
|
103
100
|
"description": "Format output as json.",
|
|
@@ -106,28 +103,25 @@
|
|
|
106
103
|
"allowNo": false,
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
},
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"summary": "Specify config file.",
|
|
106
|
+
"name": {
|
|
107
|
+
"char": "n",
|
|
108
|
+
"description": "Custom name for the imported configuration",
|
|
109
|
+
"name": "name",
|
|
114
110
|
"hasDynamicHelp": false,
|
|
115
111
|
"multiple": false,
|
|
116
112
|
"type": "option"
|
|
117
113
|
},
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"multiple": false,
|
|
125
|
-
"type": "option"
|
|
114
|
+
"yes": {
|
|
115
|
+
"char": "y",
|
|
116
|
+
"description": "Automatically switch to imported configuration",
|
|
117
|
+
"name": "yes",
|
|
118
|
+
"allowNo": false,
|
|
119
|
+
"type": "boolean"
|
|
126
120
|
}
|
|
127
121
|
},
|
|
128
122
|
"hasDynamicHelp": false,
|
|
129
123
|
"hiddenAliases": [],
|
|
130
|
-
"id": "
|
|
124
|
+
"id": "config:add",
|
|
131
125
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
132
126
|
"pluginName": "@super-protocol/sp-cli",
|
|
133
127
|
"pluginType": "core",
|
|
@@ -137,24 +131,17 @@
|
|
|
137
131
|
"relativePath": [
|
|
138
132
|
"dist",
|
|
139
133
|
"commands",
|
|
140
|
-
"
|
|
141
|
-
"
|
|
134
|
+
"config",
|
|
135
|
+
"add.js"
|
|
142
136
|
]
|
|
143
137
|
},
|
|
144
|
-
"config:
|
|
138
|
+
"config:create": {
|
|
145
139
|
"aliases": [],
|
|
146
|
-
"args": {
|
|
147
|
-
|
|
148
|
-
"description": "Configuration file path to import",
|
|
149
|
-
"name": "file",
|
|
150
|
-
"required": false
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"description": "Import a configuration from a file",
|
|
140
|
+
"args": {},
|
|
141
|
+
"description": "Create a new configuration",
|
|
154
142
|
"examples": [
|
|
155
|
-
"<%= config.bin %> <%= command.id %>
|
|
156
|
-
"<%= config.bin %> <%= command.id %>
|
|
157
|
-
"Configuration files must follow this schema:\n\n {\n \"providerUrl\": \"https://api.dp.superprotocol.com\",\n \"name\": \"Some name\",\n \"account\": {\n \"address\": \"0x111222333444555....\",\n \"privateKey\": \"0x000011122233344555...\"\n }\n }"
|
|
143
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\"",
|
|
144
|
+
"<%= config.bin %> <%= command.id %> --name \"Production\" --url \"https://api.dp.superprotocol.com\""
|
|
158
145
|
],
|
|
159
146
|
"flags": {
|
|
160
147
|
"json": {
|
|
@@ -164,43 +151,120 @@
|
|
|
164
151
|
"allowNo": false,
|
|
165
152
|
"type": "boolean"
|
|
166
153
|
},
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
154
|
+
"name": {
|
|
155
|
+
"char": "n",
|
|
156
|
+
"description": "Configuration name",
|
|
157
|
+
"name": "name",
|
|
158
|
+
"required": true,
|
|
172
159
|
"hasDynamicHelp": false,
|
|
173
160
|
"multiple": false,
|
|
174
161
|
"type": "option"
|
|
175
162
|
},
|
|
176
163
|
"url": {
|
|
177
|
-
"
|
|
164
|
+
"char": "u",
|
|
165
|
+
"description": "Provider base URL",
|
|
178
166
|
"name": "url",
|
|
179
|
-
"required": false,
|
|
180
|
-
"summary": "Specify provider base URL.",
|
|
181
167
|
"hasDynamicHelp": false,
|
|
182
168
|
"multiple": false,
|
|
183
169
|
"type": "option"
|
|
184
170
|
},
|
|
171
|
+
"yes": {
|
|
172
|
+
"char": "y",
|
|
173
|
+
"description": "Switch to new config",
|
|
174
|
+
"name": "yes",
|
|
175
|
+
"allowNo": false,
|
|
176
|
+
"type": "boolean"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"hasDynamicHelp": false,
|
|
180
|
+
"hiddenAliases": [],
|
|
181
|
+
"id": "config:create",
|
|
182
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
183
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
184
|
+
"pluginType": "core",
|
|
185
|
+
"strict": true,
|
|
186
|
+
"enableJsonFlag": true,
|
|
187
|
+
"isESM": true,
|
|
188
|
+
"relativePath": [
|
|
189
|
+
"dist",
|
|
190
|
+
"commands",
|
|
191
|
+
"config",
|
|
192
|
+
"create.js"
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"config:delete": {
|
|
196
|
+
"aliases": [],
|
|
197
|
+
"args": {},
|
|
198
|
+
"description": "Delete a configuration file",
|
|
199
|
+
"examples": [
|
|
200
|
+
"<%= config.bin %> <%= command.id %>",
|
|
201
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\"",
|
|
202
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\" --force"
|
|
203
|
+
],
|
|
204
|
+
"flags": {
|
|
205
|
+
"json": {
|
|
206
|
+
"description": "Format output as json.",
|
|
207
|
+
"helpGroup": "GLOBAL",
|
|
208
|
+
"name": "json",
|
|
209
|
+
"allowNo": false,
|
|
210
|
+
"type": "boolean"
|
|
211
|
+
},
|
|
212
|
+
"force": {
|
|
213
|
+
"char": "f",
|
|
214
|
+
"description": "Force deletion without confirmation",
|
|
215
|
+
"name": "force",
|
|
216
|
+
"allowNo": false,
|
|
217
|
+
"type": "boolean"
|
|
218
|
+
},
|
|
185
219
|
"name": {
|
|
186
220
|
"char": "n",
|
|
187
|
-
"description": "
|
|
221
|
+
"description": "Configuration name to delete",
|
|
188
222
|
"name": "name",
|
|
189
223
|
"hasDynamicHelp": false,
|
|
190
224
|
"multiple": false,
|
|
191
225
|
"type": "option"
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"hasDynamicHelp": false,
|
|
229
|
+
"hiddenAliases": [],
|
|
230
|
+
"id": "config:delete",
|
|
231
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
232
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
233
|
+
"pluginType": "core",
|
|
234
|
+
"strict": true,
|
|
235
|
+
"enableJsonFlag": true,
|
|
236
|
+
"isESM": true,
|
|
237
|
+
"relativePath": [
|
|
238
|
+
"dist",
|
|
239
|
+
"commands",
|
|
240
|
+
"config",
|
|
241
|
+
"delete.js"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"config": {
|
|
245
|
+
"aliases": [],
|
|
246
|
+
"args": {},
|
|
247
|
+
"description": "Manage configuration configs",
|
|
248
|
+
"examples": [
|
|
249
|
+
"<%= config.bin %> <%= command.id %> show - Show current configuration details",
|
|
250
|
+
"<%= config.bin %> <%= command.id %> list - List all configurations",
|
|
251
|
+
"<%= config.bin %> <%= command.id %> use - Switch to a configuration",
|
|
252
|
+
"<%= config.bin %> <%= command.id %> create --name \"My Config\" - Create new configuration",
|
|
253
|
+
"<%= config.bin %> <%= command.id %> add ./config.json - Import configuration from file",
|
|
254
|
+
"<%= config.bin %> <%= command.id %> delete - Delete a configuration"
|
|
255
|
+
],
|
|
256
|
+
"flags": {
|
|
257
|
+
"json": {
|
|
258
|
+
"description": "Format output as json.",
|
|
259
|
+
"helpGroup": "GLOBAL",
|
|
260
|
+
"name": "json",
|
|
197
261
|
"allowNo": false,
|
|
198
262
|
"type": "boolean"
|
|
199
263
|
}
|
|
200
264
|
},
|
|
201
265
|
"hasDynamicHelp": false,
|
|
202
266
|
"hiddenAliases": [],
|
|
203
|
-
"id": "config
|
|
267
|
+
"id": "config",
|
|
204
268
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
205
269
|
"pluginName": "@super-protocol/sp-cli",
|
|
206
270
|
"pluginType": "core",
|
|
@@ -211,12 +275,123 @@
|
|
|
211
275
|
"dist",
|
|
212
276
|
"commands",
|
|
213
277
|
"config",
|
|
214
|
-
"
|
|
278
|
+
"index.js"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"config:list": {
|
|
282
|
+
"aliases": [],
|
|
283
|
+
"args": {},
|
|
284
|
+
"description": "List all configurations",
|
|
285
|
+
"examples": [
|
|
286
|
+
"<%= config.bin %> <%= command.id %>"
|
|
287
|
+
],
|
|
288
|
+
"flags": {
|
|
289
|
+
"json": {
|
|
290
|
+
"description": "Format output as json.",
|
|
291
|
+
"helpGroup": "GLOBAL",
|
|
292
|
+
"name": "json",
|
|
293
|
+
"allowNo": false,
|
|
294
|
+
"type": "boolean"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"hasDynamicHelp": false,
|
|
298
|
+
"hiddenAliases": [],
|
|
299
|
+
"id": "config:list",
|
|
300
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
301
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
302
|
+
"pluginType": "core",
|
|
303
|
+
"strict": true,
|
|
304
|
+
"enableJsonFlag": true,
|
|
305
|
+
"isESM": true,
|
|
306
|
+
"relativePath": [
|
|
307
|
+
"dist",
|
|
308
|
+
"commands",
|
|
309
|
+
"config",
|
|
310
|
+
"list.js"
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"config:show": {
|
|
314
|
+
"aliases": [],
|
|
315
|
+
"args": {},
|
|
316
|
+
"description": "Show current configuration",
|
|
317
|
+
"examples": [
|
|
318
|
+
"<%= config.bin %> <%= command.id %>"
|
|
319
|
+
],
|
|
320
|
+
"flags": {
|
|
321
|
+
"json": {
|
|
322
|
+
"description": "Format output as json.",
|
|
323
|
+
"helpGroup": "GLOBAL",
|
|
324
|
+
"name": "json",
|
|
325
|
+
"allowNo": false,
|
|
326
|
+
"type": "boolean"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"hasDynamicHelp": false,
|
|
330
|
+
"hiddenAliases": [],
|
|
331
|
+
"id": "config:show",
|
|
332
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
333
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
334
|
+
"pluginType": "core",
|
|
335
|
+
"strict": true,
|
|
336
|
+
"enableJsonFlag": true,
|
|
337
|
+
"isESM": true,
|
|
338
|
+
"relativePath": [
|
|
339
|
+
"dist",
|
|
340
|
+
"commands",
|
|
341
|
+
"config",
|
|
342
|
+
"show.js"
|
|
215
343
|
]
|
|
216
344
|
},
|
|
217
|
-
"config:
|
|
345
|
+
"config:use": {
|
|
218
346
|
"aliases": [],
|
|
219
347
|
"args": {},
|
|
348
|
+
"description": "Switch to a different configuration file",
|
|
349
|
+
"examples": [
|
|
350
|
+
"<%= config.bin %> <%= command.id %>"
|
|
351
|
+
],
|
|
352
|
+
"flags": {
|
|
353
|
+
"json": {
|
|
354
|
+
"description": "Format output as json.",
|
|
355
|
+
"helpGroup": "GLOBAL",
|
|
356
|
+
"name": "json",
|
|
357
|
+
"allowNo": false,
|
|
358
|
+
"type": "boolean"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"hasDynamicHelp": false,
|
|
362
|
+
"hiddenAliases": [],
|
|
363
|
+
"id": "config:use",
|
|
364
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
365
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
366
|
+
"pluginType": "core",
|
|
367
|
+
"strict": true,
|
|
368
|
+
"enableJsonFlag": true,
|
|
369
|
+
"isESM": true,
|
|
370
|
+
"relativePath": [
|
|
371
|
+
"dist",
|
|
372
|
+
"commands",
|
|
373
|
+
"config",
|
|
374
|
+
"use.js"
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"files:download": {
|
|
378
|
+
"aliases": [],
|
|
379
|
+
"args": {
|
|
380
|
+
"resourceFile": {
|
|
381
|
+
"description": "Path to a resource file",
|
|
382
|
+
"name": "resourceFile",
|
|
383
|
+
"required": true
|
|
384
|
+
},
|
|
385
|
+
"localDirectory": {
|
|
386
|
+
"description": "Path to save downloaded file",
|
|
387
|
+
"name": "localDirectory",
|
|
388
|
+
"required": true
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"description": "Download file or directory described in resource file",
|
|
392
|
+
"examples": [
|
|
393
|
+
"<%= config.bin %> <%= command.id %> ./resource.json ./pathToDownload "
|
|
394
|
+
],
|
|
220
395
|
"flags": {
|
|
221
396
|
"json": {
|
|
222
397
|
"description": "Format output as json.",
|
|
@@ -234,11 +409,10 @@
|
|
|
234
409
|
"multiple": false,
|
|
235
410
|
"type": "option"
|
|
236
411
|
},
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"name": "
|
|
240
|
-
"
|
|
241
|
-
"summary": "Specify provider base URL.",
|
|
412
|
+
"maximum-concurrent": {
|
|
413
|
+
"description": "Maximum concurrent pieces to download at once per transfer",
|
|
414
|
+
"name": "maximum-concurrent",
|
|
415
|
+
"default": 1,
|
|
242
416
|
"hasDynamicHelp": false,
|
|
243
417
|
"multiple": false,
|
|
244
418
|
"type": "option"
|
|
@@ -246,27 +420,33 @@
|
|
|
246
420
|
},
|
|
247
421
|
"hasDynamicHelp": false,
|
|
248
422
|
"hiddenAliases": [],
|
|
249
|
-
"id": "
|
|
423
|
+
"id": "files:download",
|
|
250
424
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
251
425
|
"pluginName": "@super-protocol/sp-cli",
|
|
252
426
|
"pluginType": "core",
|
|
253
427
|
"strict": true,
|
|
254
428
|
"enableJsonFlag": true,
|
|
429
|
+
"help": "Download and decrypt a file from the remote storage to <localPath> using resource file <resourcePath>",
|
|
255
430
|
"isESM": true,
|
|
256
431
|
"relativePath": [
|
|
257
432
|
"dist",
|
|
258
433
|
"commands",
|
|
259
|
-
"
|
|
260
|
-
"
|
|
434
|
+
"files",
|
|
435
|
+
"download.js"
|
|
261
436
|
]
|
|
262
437
|
},
|
|
263
|
-
"
|
|
438
|
+
"files:upload": {
|
|
264
439
|
"aliases": [],
|
|
265
|
-
"args": {
|
|
266
|
-
|
|
440
|
+
"args": {
|
|
441
|
+
"path": {
|
|
442
|
+
"description": "file or directory to upload",
|
|
443
|
+
"name": "path",
|
|
444
|
+
"required": true
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"description": "Upload file or directory to remote storage",
|
|
267
448
|
"examples": [
|
|
268
|
-
"<%= config.bin %> <%= command.id %>
|
|
269
|
-
"<%= config.bin %> <%= command.id %> --name \"Production\" --url \"https://api.dp.superprotocol.com\""
|
|
449
|
+
"<%= config.bin %> <%= command.id %> ./file.txt"
|
|
270
450
|
],
|
|
271
451
|
"flags": {
|
|
272
452
|
"json": {
|
|
@@ -285,34 +465,57 @@
|
|
|
285
465
|
"multiple": false,
|
|
286
466
|
"type": "option"
|
|
287
467
|
},
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
291
|
-
"
|
|
468
|
+
"filename": {
|
|
469
|
+
"description": "The name of the resulting file/directory in the storage",
|
|
470
|
+
"name": "filename",
|
|
471
|
+
"required": false,
|
|
292
472
|
"hasDynamicHelp": false,
|
|
293
473
|
"multiple": false,
|
|
294
474
|
"type": "option"
|
|
295
475
|
},
|
|
296
|
-
"
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
"
|
|
300
|
-
"required": true,
|
|
476
|
+
"maximum-concurrent": {
|
|
477
|
+
"description": "Maximum concurrent pieces to upload at once per transfer",
|
|
478
|
+
"name": "maximum-concurrent",
|
|
479
|
+
"default": 1,
|
|
301
480
|
"hasDynamicHelp": false,
|
|
302
481
|
"multiple": false,
|
|
303
482
|
"type": "option"
|
|
304
483
|
},
|
|
305
|
-
"
|
|
306
|
-
"
|
|
307
|
-
"
|
|
308
|
-
"
|
|
484
|
+
"metadata": {
|
|
485
|
+
"description": "Path to a metadata file for adding fields to the resource file",
|
|
486
|
+
"name": "metadata",
|
|
487
|
+
"required": false,
|
|
488
|
+
"hasDynamicHelp": false,
|
|
489
|
+
"multiple": false,
|
|
490
|
+
"type": "option"
|
|
491
|
+
},
|
|
492
|
+
"output": {
|
|
493
|
+
"description": "Path to save resource file that is used to access the uploaded file",
|
|
494
|
+
"name": "output",
|
|
495
|
+
"required": false,
|
|
496
|
+
"default": "resource.json",
|
|
497
|
+
"hasDynamicHelp": false,
|
|
498
|
+
"multiple": false,
|
|
499
|
+
"type": "option"
|
|
500
|
+
},
|
|
501
|
+
"skip-encryption": {
|
|
502
|
+
"description": "Skip file encryption before upload",
|
|
503
|
+
"name": "skip-encryption",
|
|
504
|
+
"required": false,
|
|
505
|
+
"allowNo": false,
|
|
506
|
+
"type": "boolean"
|
|
507
|
+
},
|
|
508
|
+
"sync": {
|
|
509
|
+
"description": "Sync mode: delete files in target that don't exist in source",
|
|
510
|
+
"name": "sync",
|
|
511
|
+
"required": false,
|
|
309
512
|
"allowNo": false,
|
|
310
513
|
"type": "boolean"
|
|
311
514
|
}
|
|
312
515
|
},
|
|
313
516
|
"hasDynamicHelp": false,
|
|
314
517
|
"hiddenAliases": [],
|
|
315
|
-
"id": "
|
|
518
|
+
"id": "files:upload",
|
|
316
519
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
317
520
|
"pluginName": "@super-protocol/sp-cli",
|
|
318
521
|
"pluginType": "core",
|
|
@@ -322,18 +525,18 @@
|
|
|
322
525
|
"relativePath": [
|
|
323
526
|
"dist",
|
|
324
527
|
"commands",
|
|
325
|
-
"
|
|
326
|
-
"
|
|
528
|
+
"files",
|
|
529
|
+
"upload.js"
|
|
327
530
|
]
|
|
328
531
|
},
|
|
329
|
-
"
|
|
532
|
+
"storage:create": {
|
|
330
533
|
"aliases": [],
|
|
331
534
|
"args": {},
|
|
332
|
-
"description": "
|
|
535
|
+
"description": "Create a new storage entry from file or interactive prompts.",
|
|
333
536
|
"examples": [
|
|
334
|
-
"<%= config.bin %>
|
|
335
|
-
"<%= config.bin %>
|
|
336
|
-
"<%= config.bin %>
|
|
537
|
+
"<%= config.bin %> storage create",
|
|
538
|
+
"<%= config.bin %> storage create --fromFile ./storage.json",
|
|
539
|
+
"<%= config.bin %> storage create --not-default"
|
|
337
540
|
],
|
|
338
541
|
"flags": {
|
|
339
542
|
"json": {
|
|
@@ -352,58 +555,45 @@
|
|
|
352
555
|
"multiple": false,
|
|
353
556
|
"type": "option"
|
|
354
557
|
},
|
|
355
|
-
"
|
|
356
|
-
"
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
"
|
|
558
|
+
"fromFile": {
|
|
559
|
+
"aliases": [
|
|
560
|
+
"fromFile"
|
|
561
|
+
],
|
|
562
|
+
"char": "f",
|
|
563
|
+
"description": "Path to a JSON file that contains AddStorageDto payload.",
|
|
564
|
+
"name": "fromFile",
|
|
360
565
|
"hasDynamicHelp": false,
|
|
361
566
|
"multiple": false,
|
|
362
567
|
"type": "option"
|
|
363
568
|
},
|
|
364
|
-
"
|
|
365
|
-
"
|
|
366
|
-
"
|
|
367
|
-
"name": "force",
|
|
569
|
+
"notDefault": {
|
|
570
|
+
"description": "Skip setting the created storage as default.",
|
|
571
|
+
"name": "notDefault",
|
|
368
572
|
"allowNo": false,
|
|
369
573
|
"type": "boolean"
|
|
370
|
-
},
|
|
371
|
-
"name": {
|
|
372
|
-
"char": "n",
|
|
373
|
-
"description": "Configuration name to delete",
|
|
374
|
-
"name": "name",
|
|
375
|
-
"hasDynamicHelp": false,
|
|
376
|
-
"multiple": false,
|
|
377
|
-
"type": "option"
|
|
378
574
|
}
|
|
379
575
|
},
|
|
380
576
|
"hasDynamicHelp": false,
|
|
381
577
|
"hiddenAliases": [],
|
|
382
|
-
"id": "
|
|
578
|
+
"id": "storage:create",
|
|
383
579
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
384
580
|
"pluginName": "@super-protocol/sp-cli",
|
|
385
581
|
"pluginType": "core",
|
|
386
582
|
"strict": true,
|
|
387
|
-
"enableJsonFlag": true,
|
|
388
583
|
"isESM": true,
|
|
389
584
|
"relativePath": [
|
|
390
585
|
"dist",
|
|
391
586
|
"commands",
|
|
392
|
-
"
|
|
393
|
-
"
|
|
587
|
+
"storage",
|
|
588
|
+
"create.js"
|
|
394
589
|
]
|
|
395
590
|
},
|
|
396
|
-
"
|
|
591
|
+
"storage:select": {
|
|
397
592
|
"aliases": [],
|
|
398
593
|
"args": {},
|
|
399
|
-
"description": "
|
|
594
|
+
"description": "Select a storage that will be used by subsequent commands.",
|
|
400
595
|
"examples": [
|
|
401
|
-
"<%= config.bin %>
|
|
402
|
-
"<%= config.bin %> <%= command.id %> list - List all configurations",
|
|
403
|
-
"<%= config.bin %> <%= command.id %> use - Switch to a configuration",
|
|
404
|
-
"<%= config.bin %> <%= command.id %> create --name \"My Config\" - Create new configuration",
|
|
405
|
-
"<%= config.bin %> <%= command.id %> add ./config.json - Import configuration from file",
|
|
406
|
-
"<%= config.bin %> <%= command.id %> delete - Delete a configuration"
|
|
596
|
+
"<%= config.bin %> storage select"
|
|
407
597
|
],
|
|
408
598
|
"flags": {
|
|
409
599
|
"json": {
|
|
@@ -421,12 +611,43 @@
|
|
|
421
611
|
"hasDynamicHelp": false,
|
|
422
612
|
"multiple": false,
|
|
423
613
|
"type": "option"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"hasDynamicHelp": false,
|
|
617
|
+
"hiddenAliases": [],
|
|
618
|
+
"id": "storage:select",
|
|
619
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
620
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
621
|
+
"pluginType": "core",
|
|
622
|
+
"strict": true,
|
|
623
|
+
"isESM": true,
|
|
624
|
+
"relativePath": [
|
|
625
|
+
"dist",
|
|
626
|
+
"commands",
|
|
627
|
+
"storage",
|
|
628
|
+
"select.js"
|
|
629
|
+
]
|
|
630
|
+
},
|
|
631
|
+
"storage:show": {
|
|
632
|
+
"aliases": [],
|
|
633
|
+
"args": {},
|
|
634
|
+
"description": "Show current selected storage",
|
|
635
|
+
"examples": [
|
|
636
|
+
"<%= config.bin %> <%= command.id %>"
|
|
637
|
+
],
|
|
638
|
+
"flags": {
|
|
639
|
+
"json": {
|
|
640
|
+
"description": "Format output as json.",
|
|
641
|
+
"helpGroup": "GLOBAL",
|
|
642
|
+
"name": "json",
|
|
643
|
+
"allowNo": false,
|
|
644
|
+
"type": "boolean"
|
|
424
645
|
},
|
|
425
|
-
"
|
|
646
|
+
"config": {
|
|
426
647
|
"helpGroup": "GLOBAL",
|
|
427
|
-
"name": "
|
|
648
|
+
"name": "config",
|
|
428
649
|
"required": false,
|
|
429
|
-
"summary": "Specify
|
|
650
|
+
"summary": "Specify config file.",
|
|
430
651
|
"hasDynamicHelp": false,
|
|
431
652
|
"multiple": false,
|
|
432
653
|
"type": "option"
|
|
@@ -434,26 +655,26 @@
|
|
|
434
655
|
},
|
|
435
656
|
"hasDynamicHelp": false,
|
|
436
657
|
"hiddenAliases": [],
|
|
437
|
-
"id": "
|
|
658
|
+
"id": "storage:show",
|
|
438
659
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
439
660
|
"pluginName": "@super-protocol/sp-cli",
|
|
440
661
|
"pluginType": "core",
|
|
441
662
|
"strict": true,
|
|
442
|
-
"enableJsonFlag": true,
|
|
443
663
|
"isESM": true,
|
|
444
664
|
"relativePath": [
|
|
445
665
|
"dist",
|
|
446
666
|
"commands",
|
|
447
|
-
"
|
|
448
|
-
"
|
|
667
|
+
"storage",
|
|
668
|
+
"show.js"
|
|
449
669
|
]
|
|
450
670
|
},
|
|
451
|
-
"
|
|
671
|
+
"storage:update": {
|
|
452
672
|
"aliases": [],
|
|
453
673
|
"args": {},
|
|
454
|
-
"description": "
|
|
674
|
+
"description": "Update the configuration of an existing storage.",
|
|
455
675
|
"examples": [
|
|
456
|
-
"<%= config.bin %>
|
|
676
|
+
"<%= config.bin %> storage update --id=2de3e3a4-0000-1111-2222-333344445555 --fromFile ./storage-update.json",
|
|
677
|
+
"<%= config.bin %> storage update --id=2de3e3a4-0000-1111-2222-333344445555"
|
|
457
678
|
],
|
|
458
679
|
"flags": {
|
|
459
680
|
"json": {
|
|
@@ -472,11 +693,18 @@
|
|
|
472
693
|
"multiple": false,
|
|
473
694
|
"type": "option"
|
|
474
695
|
},
|
|
475
|
-
"
|
|
476
|
-
"
|
|
477
|
-
"
|
|
478
|
-
"
|
|
479
|
-
"
|
|
696
|
+
"fromFile": {
|
|
697
|
+
"char": "f",
|
|
698
|
+
"description": "Path to a JSON file that contains UpdateStorageDto payload.",
|
|
699
|
+
"name": "fromFile",
|
|
700
|
+
"hasDynamicHelp": false,
|
|
701
|
+
"multiple": false,
|
|
702
|
+
"type": "option"
|
|
703
|
+
},
|
|
704
|
+
"id": {
|
|
705
|
+
"char": "i",
|
|
706
|
+
"description": "Storage ID to update",
|
|
707
|
+
"name": "id",
|
|
480
708
|
"hasDynamicHelp": false,
|
|
481
709
|
"multiple": false,
|
|
482
710
|
"type": "option"
|
|
@@ -484,26 +712,33 @@
|
|
|
484
712
|
},
|
|
485
713
|
"hasDynamicHelp": false,
|
|
486
714
|
"hiddenAliases": [],
|
|
487
|
-
"id": "
|
|
715
|
+
"id": "storage:update",
|
|
488
716
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
489
717
|
"pluginName": "@super-protocol/sp-cli",
|
|
490
718
|
"pluginType": "core",
|
|
491
719
|
"strict": true,
|
|
492
|
-
"enableJsonFlag": true,
|
|
493
720
|
"isESM": true,
|
|
494
721
|
"relativePath": [
|
|
495
722
|
"dist",
|
|
496
723
|
"commands",
|
|
497
|
-
"
|
|
498
|
-
"
|
|
724
|
+
"storage",
|
|
725
|
+
"update.js"
|
|
499
726
|
]
|
|
500
727
|
},
|
|
501
|
-
"
|
|
728
|
+
"workflows:extend-lease": {
|
|
502
729
|
"aliases": [],
|
|
503
|
-
"args": {
|
|
504
|
-
|
|
730
|
+
"args": {
|
|
731
|
+
"orderId": {
|
|
732
|
+
"description": "Order ID",
|
|
733
|
+
"name": "orderId",
|
|
734
|
+
"required": true
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
"description": "Replenish deposit for a workflow to extend its lease time",
|
|
505
738
|
"examples": [
|
|
506
|
-
"<%= config.bin %> <%= command.id %>"
|
|
739
|
+
"<%= config.bin %> <%= command.id %> <orderId> --sppi 1.5",
|
|
740
|
+
"<%= config.bin %> <%= command.id %> <orderId> --minutes 120",
|
|
741
|
+
"<%= config.bin %> <%= command.id %> <orderId> --sppi 2 --yes"
|
|
507
742
|
],
|
|
508
743
|
"flags": {
|
|
509
744
|
"json": {
|
|
@@ -522,19 +757,31 @@
|
|
|
522
757
|
"multiple": false,
|
|
523
758
|
"type": "option"
|
|
524
759
|
},
|
|
525
|
-
"
|
|
526
|
-
"
|
|
527
|
-
"name": "
|
|
528
|
-
"required": false,
|
|
529
|
-
"summary": "Specify provider base URL.",
|
|
760
|
+
"minutes": {
|
|
761
|
+
"description": "Time to extend order in minutes (automatically calculates tokens)",
|
|
762
|
+
"name": "minutes",
|
|
530
763
|
"hasDynamicHelp": false,
|
|
531
764
|
"multiple": false,
|
|
532
765
|
"type": "option"
|
|
766
|
+
},
|
|
767
|
+
"sppi": {
|
|
768
|
+
"description": "SPPI token amount to add to the order",
|
|
769
|
+
"name": "sppi",
|
|
770
|
+
"hasDynamicHelp": false,
|
|
771
|
+
"multiple": false,
|
|
772
|
+
"type": "option"
|
|
773
|
+
},
|
|
774
|
+
"yes": {
|
|
775
|
+
"char": "y",
|
|
776
|
+
"description": "Skip confirmation prompt",
|
|
777
|
+
"name": "yes",
|
|
778
|
+
"allowNo": false,
|
|
779
|
+
"type": "boolean"
|
|
533
780
|
}
|
|
534
781
|
},
|
|
535
782
|
"hasDynamicHelp": false,
|
|
536
783
|
"hiddenAliases": [],
|
|
537
|
-
"id": "
|
|
784
|
+
"id": "workflows:extend-lease",
|
|
538
785
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
539
786
|
"pluginName": "@super-protocol/sp-cli",
|
|
540
787
|
"pluginType": "core",
|
|
@@ -544,14 +791,14 @@
|
|
|
544
791
|
"relativePath": [
|
|
545
792
|
"dist",
|
|
546
793
|
"commands",
|
|
547
|
-
"
|
|
548
|
-
"
|
|
794
|
+
"workflows",
|
|
795
|
+
"extend-lease.js"
|
|
549
796
|
]
|
|
550
797
|
},
|
|
551
|
-
"
|
|
798
|
+
"account:get-sppi": {
|
|
552
799
|
"aliases": [],
|
|
553
800
|
"args": {},
|
|
554
|
-
"description": "
|
|
801
|
+
"description": "Get SPPI (Super Protocol incentive tokens) ",
|
|
555
802
|
"examples": [
|
|
556
803
|
"<%= config.bin %> <%= command.id %>"
|
|
557
804
|
],
|
|
@@ -571,12 +818,41 @@
|
|
|
571
818
|
"hasDynamicHelp": false,
|
|
572
819
|
"multiple": false,
|
|
573
820
|
"type": "option"
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
"hasDynamicHelp": false,
|
|
824
|
+
"hiddenAliases": [],
|
|
825
|
+
"id": "account:get-sppi",
|
|
826
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
827
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
828
|
+
"pluginType": "core",
|
|
829
|
+
"strict": true,
|
|
830
|
+
"enableJsonFlag": true,
|
|
831
|
+
"isESM": true,
|
|
832
|
+
"relativePath": [
|
|
833
|
+
"dist",
|
|
834
|
+
"commands",
|
|
835
|
+
"account",
|
|
836
|
+
"get-sppi.js"
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
|
+
"account:info": {
|
|
840
|
+
"aliases": [],
|
|
841
|
+
"args": {},
|
|
842
|
+
"description": "Information about current authorized user",
|
|
843
|
+
"flags": {
|
|
844
|
+
"json": {
|
|
845
|
+
"description": "Format output as json.",
|
|
846
|
+
"helpGroup": "GLOBAL",
|
|
847
|
+
"name": "json",
|
|
848
|
+
"allowNo": false,
|
|
849
|
+
"type": "boolean"
|
|
574
850
|
},
|
|
575
|
-
"
|
|
851
|
+
"config": {
|
|
576
852
|
"helpGroup": "GLOBAL",
|
|
577
|
-
"name": "
|
|
853
|
+
"name": "config",
|
|
578
854
|
"required": false,
|
|
579
|
-
"summary": "Specify
|
|
855
|
+
"summary": "Specify config file.",
|
|
580
856
|
"hasDynamicHelp": false,
|
|
581
857
|
"multiple": false,
|
|
582
858
|
"type": "option"
|
|
@@ -584,7 +860,7 @@
|
|
|
584
860
|
},
|
|
585
861
|
"hasDynamicHelp": false,
|
|
586
862
|
"hiddenAliases": [],
|
|
587
|
-
"id": "
|
|
863
|
+
"id": "account:info",
|
|
588
864
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
589
865
|
"pluginName": "@super-protocol/sp-cli",
|
|
590
866
|
"pluginType": "core",
|
|
@@ -594,10 +870,10 @@
|
|
|
594
870
|
"relativePath": [
|
|
595
871
|
"dist",
|
|
596
872
|
"commands",
|
|
597
|
-
"
|
|
598
|
-
"
|
|
873
|
+
"account",
|
|
874
|
+
"info.js"
|
|
599
875
|
]
|
|
600
876
|
}
|
|
601
877
|
},
|
|
602
|
-
"version": "0.0.
|
|
878
|
+
"version": "0.0.3"
|
|
603
879
|
}
|