@super-protocol/sp-cli 0.0.1-alpha.35 → 0.0.2
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 +260 -65
- 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 +3 -2
- package/dist/commands/auth/login.js +52 -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/config/config-file.schema.d.ts +6 -0
- package/dist/config/config-file.schema.js +5 -0
- package/dist/config/config.schema.d.ts +2 -0
- package/dist/config/config.schema.js +12 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +5 -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 +40 -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 +87 -0
- package/dist/middlewares/cookies-middleware.d.ts +8 -0
- package/dist/middlewares/cookies-middleware.js +80 -0
- package/dist/utils/helper.d.ts +1 -0
- package/dist/utils/helper.js +1 -0
- package/oclif.manifest.json +545 -7
- package/package.json +32 -14
- 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/oclif.manifest.json
CHANGED
|
@@ -1,21 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"base": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"flags": {
|
|
6
|
+
"flags": {
|
|
7
|
+
"json": {
|
|
8
|
+
"description": "Format output as json.",
|
|
9
|
+
"helpGroup": "GLOBAL",
|
|
10
|
+
"name": "json",
|
|
11
|
+
"allowNo": false,
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"config": {
|
|
15
|
+
"helpGroup": "GLOBAL",
|
|
16
|
+
"name": "config",
|
|
17
|
+
"required": false,
|
|
18
|
+
"summary": "Specify config file.",
|
|
19
|
+
"hasDynamicHelp": false,
|
|
20
|
+
"multiple": false,
|
|
21
|
+
"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
|
+
}
|
|
32
|
+
},
|
|
7
33
|
"hasDynamicHelp": false,
|
|
8
34
|
"hiddenAliases": [],
|
|
9
|
-
"id": "
|
|
35
|
+
"id": "base",
|
|
10
36
|
"pluginAlias": "@super-protocol/sp-cli",
|
|
11
37
|
"pluginName": "@super-protocol/sp-cli",
|
|
12
38
|
"pluginType": "core",
|
|
13
39
|
"strict": true,
|
|
40
|
+
"enableJsonFlag": true,
|
|
14
41
|
"isESM": true,
|
|
15
42
|
"relativePath": [
|
|
16
43
|
"dist",
|
|
17
44
|
"commands",
|
|
18
|
-
"
|
|
45
|
+
"base.js"
|
|
19
46
|
]
|
|
20
47
|
},
|
|
21
48
|
"auth:login": {
|
|
@@ -25,7 +52,33 @@
|
|
|
25
52
|
"examples": [
|
|
26
53
|
"<%= config.bin %> <%= command.id %>\n"
|
|
27
54
|
],
|
|
28
|
-
"flags": {
|
|
55
|
+
"flags": {
|
|
56
|
+
"json": {
|
|
57
|
+
"description": "Format output as json.",
|
|
58
|
+
"helpGroup": "GLOBAL",
|
|
59
|
+
"name": "json",
|
|
60
|
+
"allowNo": false,
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"config": {
|
|
64
|
+
"helpGroup": "GLOBAL",
|
|
65
|
+
"name": "config",
|
|
66
|
+
"required": false,
|
|
67
|
+
"summary": "Specify config file.",
|
|
68
|
+
"hasDynamicHelp": false,
|
|
69
|
+
"multiple": false,
|
|
70
|
+
"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
|
+
}
|
|
81
|
+
},
|
|
29
82
|
"hasDynamicHelp": false,
|
|
30
83
|
"hiddenAliases": [],
|
|
31
84
|
"id": "auth:login",
|
|
@@ -33,6 +86,7 @@
|
|
|
33
86
|
"pluginName": "@super-protocol/sp-cli",
|
|
34
87
|
"pluginType": "core",
|
|
35
88
|
"strict": true,
|
|
89
|
+
"enableJsonFlag": true,
|
|
36
90
|
"isESM": true,
|
|
37
91
|
"relativePath": [
|
|
38
92
|
"dist",
|
|
@@ -44,7 +98,33 @@
|
|
|
44
98
|
"auth:me": {
|
|
45
99
|
"aliases": [],
|
|
46
100
|
"args": {},
|
|
47
|
-
"flags": {
|
|
101
|
+
"flags": {
|
|
102
|
+
"json": {
|
|
103
|
+
"description": "Format output as json.",
|
|
104
|
+
"helpGroup": "GLOBAL",
|
|
105
|
+
"name": "json",
|
|
106
|
+
"allowNo": false,
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"config": {
|
|
110
|
+
"helpGroup": "GLOBAL",
|
|
111
|
+
"name": "config",
|
|
112
|
+
"required": false,
|
|
113
|
+
"summary": "Specify config file.",
|
|
114
|
+
"hasDynamicHelp": false,
|
|
115
|
+
"multiple": false,
|
|
116
|
+
"type": "option"
|
|
117
|
+
},
|
|
118
|
+
"url": {
|
|
119
|
+
"helpGroup": "GLOBAL",
|
|
120
|
+
"name": "url",
|
|
121
|
+
"required": false,
|
|
122
|
+
"summary": "Specify provider base URL.",
|
|
123
|
+
"hasDynamicHelp": false,
|
|
124
|
+
"multiple": false,
|
|
125
|
+
"type": "option"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
48
128
|
"hasDynamicHelp": false,
|
|
49
129
|
"hiddenAliases": [],
|
|
50
130
|
"id": "auth:me",
|
|
@@ -52,6 +132,7 @@
|
|
|
52
132
|
"pluginName": "@super-protocol/sp-cli",
|
|
53
133
|
"pluginType": "core",
|
|
54
134
|
"strict": true,
|
|
135
|
+
"enableJsonFlag": true,
|
|
55
136
|
"isESM": true,
|
|
56
137
|
"relativePath": [
|
|
57
138
|
"dist",
|
|
@@ -59,7 +140,464 @@
|
|
|
59
140
|
"auth",
|
|
60
141
|
"me.js"
|
|
61
142
|
]
|
|
143
|
+
},
|
|
144
|
+
"config:add": {
|
|
145
|
+
"aliases": [],
|
|
146
|
+
"args": {
|
|
147
|
+
"file": {
|
|
148
|
+
"description": "Configuration file path to import",
|
|
149
|
+
"name": "file",
|
|
150
|
+
"required": false
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"description": "Import a configuration from a file",
|
|
154
|
+
"examples": [
|
|
155
|
+
"<%= config.bin %> <%= command.id %> ./my-config.json",
|
|
156
|
+
"<%= config.bin %> <%= command.id %> ./my-config.json --name \"Imported\"",
|
|
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 }"
|
|
158
|
+
],
|
|
159
|
+
"flags": {
|
|
160
|
+
"json": {
|
|
161
|
+
"description": "Format output as json.",
|
|
162
|
+
"helpGroup": "GLOBAL",
|
|
163
|
+
"name": "json",
|
|
164
|
+
"allowNo": false,
|
|
165
|
+
"type": "boolean"
|
|
166
|
+
},
|
|
167
|
+
"config": {
|
|
168
|
+
"helpGroup": "GLOBAL",
|
|
169
|
+
"name": "config",
|
|
170
|
+
"required": false,
|
|
171
|
+
"summary": "Specify config file.",
|
|
172
|
+
"hasDynamicHelp": false,
|
|
173
|
+
"multiple": false,
|
|
174
|
+
"type": "option"
|
|
175
|
+
},
|
|
176
|
+
"url": {
|
|
177
|
+
"helpGroup": "GLOBAL",
|
|
178
|
+
"name": "url",
|
|
179
|
+
"required": false,
|
|
180
|
+
"summary": "Specify provider base URL.",
|
|
181
|
+
"hasDynamicHelp": false,
|
|
182
|
+
"multiple": false,
|
|
183
|
+
"type": "option"
|
|
184
|
+
},
|
|
185
|
+
"name": {
|
|
186
|
+
"char": "n",
|
|
187
|
+
"description": "Custom name for the imported configuration",
|
|
188
|
+
"name": "name",
|
|
189
|
+
"hasDynamicHelp": false,
|
|
190
|
+
"multiple": false,
|
|
191
|
+
"type": "option"
|
|
192
|
+
},
|
|
193
|
+
"yes": {
|
|
194
|
+
"char": "y",
|
|
195
|
+
"description": "Automatically switch to imported configuration",
|
|
196
|
+
"name": "yes",
|
|
197
|
+
"allowNo": false,
|
|
198
|
+
"type": "boolean"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"hasDynamicHelp": false,
|
|
202
|
+
"hiddenAliases": [],
|
|
203
|
+
"id": "config:add",
|
|
204
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
205
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
206
|
+
"pluginType": "core",
|
|
207
|
+
"strict": true,
|
|
208
|
+
"enableJsonFlag": true,
|
|
209
|
+
"isESM": true,
|
|
210
|
+
"relativePath": [
|
|
211
|
+
"dist",
|
|
212
|
+
"commands",
|
|
213
|
+
"config",
|
|
214
|
+
"add.js"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"config:base": {
|
|
218
|
+
"aliases": [],
|
|
219
|
+
"args": {},
|
|
220
|
+
"flags": {
|
|
221
|
+
"json": {
|
|
222
|
+
"description": "Format output as json.",
|
|
223
|
+
"helpGroup": "GLOBAL",
|
|
224
|
+
"name": "json",
|
|
225
|
+
"allowNo": false,
|
|
226
|
+
"type": "boolean"
|
|
227
|
+
},
|
|
228
|
+
"config": {
|
|
229
|
+
"helpGroup": "GLOBAL",
|
|
230
|
+
"name": "config",
|
|
231
|
+
"required": false,
|
|
232
|
+
"summary": "Specify config file.",
|
|
233
|
+
"hasDynamicHelp": false,
|
|
234
|
+
"multiple": false,
|
|
235
|
+
"type": "option"
|
|
236
|
+
},
|
|
237
|
+
"url": {
|
|
238
|
+
"helpGroup": "GLOBAL",
|
|
239
|
+
"name": "url",
|
|
240
|
+
"required": false,
|
|
241
|
+
"summary": "Specify provider base URL.",
|
|
242
|
+
"hasDynamicHelp": false,
|
|
243
|
+
"multiple": false,
|
|
244
|
+
"type": "option"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"hasDynamicHelp": false,
|
|
248
|
+
"hiddenAliases": [],
|
|
249
|
+
"id": "config:base",
|
|
250
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
251
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
252
|
+
"pluginType": "core",
|
|
253
|
+
"strict": true,
|
|
254
|
+
"enableJsonFlag": true,
|
|
255
|
+
"isESM": true,
|
|
256
|
+
"relativePath": [
|
|
257
|
+
"dist",
|
|
258
|
+
"commands",
|
|
259
|
+
"config",
|
|
260
|
+
"base.js"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"config:create": {
|
|
264
|
+
"aliases": [],
|
|
265
|
+
"args": {},
|
|
266
|
+
"description": "Create a new configuration",
|
|
267
|
+
"examples": [
|
|
268
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\"",
|
|
269
|
+
"<%= config.bin %> <%= command.id %> --name \"Production\" --url \"https://api.dp.superprotocol.com\""
|
|
270
|
+
],
|
|
271
|
+
"flags": {
|
|
272
|
+
"json": {
|
|
273
|
+
"description": "Format output as json.",
|
|
274
|
+
"helpGroup": "GLOBAL",
|
|
275
|
+
"name": "json",
|
|
276
|
+
"allowNo": false,
|
|
277
|
+
"type": "boolean"
|
|
278
|
+
},
|
|
279
|
+
"config": {
|
|
280
|
+
"helpGroup": "GLOBAL",
|
|
281
|
+
"name": "config",
|
|
282
|
+
"required": false,
|
|
283
|
+
"summary": "Specify config file.",
|
|
284
|
+
"hasDynamicHelp": false,
|
|
285
|
+
"multiple": false,
|
|
286
|
+
"type": "option"
|
|
287
|
+
},
|
|
288
|
+
"url": {
|
|
289
|
+
"char": "u",
|
|
290
|
+
"description": "Provider base URL",
|
|
291
|
+
"name": "url",
|
|
292
|
+
"hasDynamicHelp": false,
|
|
293
|
+
"multiple": false,
|
|
294
|
+
"type": "option"
|
|
295
|
+
},
|
|
296
|
+
"name": {
|
|
297
|
+
"char": "n",
|
|
298
|
+
"description": "Configuration name",
|
|
299
|
+
"name": "name",
|
|
300
|
+
"required": true,
|
|
301
|
+
"hasDynamicHelp": false,
|
|
302
|
+
"multiple": false,
|
|
303
|
+
"type": "option"
|
|
304
|
+
},
|
|
305
|
+
"yes": {
|
|
306
|
+
"char": "y",
|
|
307
|
+
"description": "Switch to new config",
|
|
308
|
+
"name": "yes",
|
|
309
|
+
"allowNo": false,
|
|
310
|
+
"type": "boolean"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"hasDynamicHelp": false,
|
|
314
|
+
"hiddenAliases": [],
|
|
315
|
+
"id": "config:create",
|
|
316
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
317
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
318
|
+
"pluginType": "core",
|
|
319
|
+
"strict": true,
|
|
320
|
+
"enableJsonFlag": true,
|
|
321
|
+
"isESM": true,
|
|
322
|
+
"relativePath": [
|
|
323
|
+
"dist",
|
|
324
|
+
"commands",
|
|
325
|
+
"config",
|
|
326
|
+
"create.js"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
"config:delete": {
|
|
330
|
+
"aliases": [],
|
|
331
|
+
"args": {},
|
|
332
|
+
"description": "Delete a configuration file",
|
|
333
|
+
"examples": [
|
|
334
|
+
"<%= config.bin %> <%= command.id %>",
|
|
335
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\"",
|
|
336
|
+
"<%= config.bin %> <%= command.id %> --name \"My Config\" --force"
|
|
337
|
+
],
|
|
338
|
+
"flags": {
|
|
339
|
+
"json": {
|
|
340
|
+
"description": "Format output as json.",
|
|
341
|
+
"helpGroup": "GLOBAL",
|
|
342
|
+
"name": "json",
|
|
343
|
+
"allowNo": false,
|
|
344
|
+
"type": "boolean"
|
|
345
|
+
},
|
|
346
|
+
"config": {
|
|
347
|
+
"helpGroup": "GLOBAL",
|
|
348
|
+
"name": "config",
|
|
349
|
+
"required": false,
|
|
350
|
+
"summary": "Specify config file.",
|
|
351
|
+
"hasDynamicHelp": false,
|
|
352
|
+
"multiple": false,
|
|
353
|
+
"type": "option"
|
|
354
|
+
},
|
|
355
|
+
"url": {
|
|
356
|
+
"helpGroup": "GLOBAL",
|
|
357
|
+
"name": "url",
|
|
358
|
+
"required": false,
|
|
359
|
+
"summary": "Specify provider base URL.",
|
|
360
|
+
"hasDynamicHelp": false,
|
|
361
|
+
"multiple": false,
|
|
362
|
+
"type": "option"
|
|
363
|
+
},
|
|
364
|
+
"force": {
|
|
365
|
+
"char": "f",
|
|
366
|
+
"description": "Force deletion without confirmation",
|
|
367
|
+
"name": "force",
|
|
368
|
+
"allowNo": false,
|
|
369
|
+
"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
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"hasDynamicHelp": false,
|
|
381
|
+
"hiddenAliases": [],
|
|
382
|
+
"id": "config:delete",
|
|
383
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
384
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
385
|
+
"pluginType": "core",
|
|
386
|
+
"strict": true,
|
|
387
|
+
"enableJsonFlag": true,
|
|
388
|
+
"isESM": true,
|
|
389
|
+
"relativePath": [
|
|
390
|
+
"dist",
|
|
391
|
+
"commands",
|
|
392
|
+
"config",
|
|
393
|
+
"delete.js"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
"config": {
|
|
397
|
+
"aliases": [],
|
|
398
|
+
"args": {},
|
|
399
|
+
"description": "Manage configuration configs",
|
|
400
|
+
"examples": [
|
|
401
|
+
"<%= config.bin %> <%= command.id %> show - Show current configuration details",
|
|
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"
|
|
407
|
+
],
|
|
408
|
+
"flags": {
|
|
409
|
+
"json": {
|
|
410
|
+
"description": "Format output as json.",
|
|
411
|
+
"helpGroup": "GLOBAL",
|
|
412
|
+
"name": "json",
|
|
413
|
+
"allowNo": false,
|
|
414
|
+
"type": "boolean"
|
|
415
|
+
},
|
|
416
|
+
"config": {
|
|
417
|
+
"helpGroup": "GLOBAL",
|
|
418
|
+
"name": "config",
|
|
419
|
+
"required": false,
|
|
420
|
+
"summary": "Specify config file.",
|
|
421
|
+
"hasDynamicHelp": false,
|
|
422
|
+
"multiple": false,
|
|
423
|
+
"type": "option"
|
|
424
|
+
},
|
|
425
|
+
"url": {
|
|
426
|
+
"helpGroup": "GLOBAL",
|
|
427
|
+
"name": "url",
|
|
428
|
+
"required": false,
|
|
429
|
+
"summary": "Specify provider base URL.",
|
|
430
|
+
"hasDynamicHelp": false,
|
|
431
|
+
"multiple": false,
|
|
432
|
+
"type": "option"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"hasDynamicHelp": false,
|
|
436
|
+
"hiddenAliases": [],
|
|
437
|
+
"id": "config",
|
|
438
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
439
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
440
|
+
"pluginType": "core",
|
|
441
|
+
"strict": true,
|
|
442
|
+
"enableJsonFlag": true,
|
|
443
|
+
"isESM": true,
|
|
444
|
+
"relativePath": [
|
|
445
|
+
"dist",
|
|
446
|
+
"commands",
|
|
447
|
+
"config",
|
|
448
|
+
"index.js"
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
"config:list": {
|
|
452
|
+
"aliases": [],
|
|
453
|
+
"args": {},
|
|
454
|
+
"description": "List all configurations",
|
|
455
|
+
"examples": [
|
|
456
|
+
"<%= config.bin %> <%= command.id %>"
|
|
457
|
+
],
|
|
458
|
+
"flags": {
|
|
459
|
+
"json": {
|
|
460
|
+
"description": "Format output as json.",
|
|
461
|
+
"helpGroup": "GLOBAL",
|
|
462
|
+
"name": "json",
|
|
463
|
+
"allowNo": false,
|
|
464
|
+
"type": "boolean"
|
|
465
|
+
},
|
|
466
|
+
"config": {
|
|
467
|
+
"helpGroup": "GLOBAL",
|
|
468
|
+
"name": "config",
|
|
469
|
+
"required": false,
|
|
470
|
+
"summary": "Specify config file.",
|
|
471
|
+
"hasDynamicHelp": false,
|
|
472
|
+
"multiple": false,
|
|
473
|
+
"type": "option"
|
|
474
|
+
},
|
|
475
|
+
"url": {
|
|
476
|
+
"helpGroup": "GLOBAL",
|
|
477
|
+
"name": "url",
|
|
478
|
+
"required": false,
|
|
479
|
+
"summary": "Specify provider base URL.",
|
|
480
|
+
"hasDynamicHelp": false,
|
|
481
|
+
"multiple": false,
|
|
482
|
+
"type": "option"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"hasDynamicHelp": false,
|
|
486
|
+
"hiddenAliases": [],
|
|
487
|
+
"id": "config:list",
|
|
488
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
489
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
490
|
+
"pluginType": "core",
|
|
491
|
+
"strict": true,
|
|
492
|
+
"enableJsonFlag": true,
|
|
493
|
+
"isESM": true,
|
|
494
|
+
"relativePath": [
|
|
495
|
+
"dist",
|
|
496
|
+
"commands",
|
|
497
|
+
"config",
|
|
498
|
+
"list.js"
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
"config:show": {
|
|
502
|
+
"aliases": [],
|
|
503
|
+
"args": {},
|
|
504
|
+
"description": "Show current configuration",
|
|
505
|
+
"examples": [
|
|
506
|
+
"<%= config.bin %> <%= command.id %>"
|
|
507
|
+
],
|
|
508
|
+
"flags": {
|
|
509
|
+
"json": {
|
|
510
|
+
"description": "Format output as json.",
|
|
511
|
+
"helpGroup": "GLOBAL",
|
|
512
|
+
"name": "json",
|
|
513
|
+
"allowNo": false,
|
|
514
|
+
"type": "boolean"
|
|
515
|
+
},
|
|
516
|
+
"config": {
|
|
517
|
+
"helpGroup": "GLOBAL",
|
|
518
|
+
"name": "config",
|
|
519
|
+
"required": false,
|
|
520
|
+
"summary": "Specify config file.",
|
|
521
|
+
"hasDynamicHelp": false,
|
|
522
|
+
"multiple": false,
|
|
523
|
+
"type": "option"
|
|
524
|
+
},
|
|
525
|
+
"url": {
|
|
526
|
+
"helpGroup": "GLOBAL",
|
|
527
|
+
"name": "url",
|
|
528
|
+
"required": false,
|
|
529
|
+
"summary": "Specify provider base URL.",
|
|
530
|
+
"hasDynamicHelp": false,
|
|
531
|
+
"multiple": false,
|
|
532
|
+
"type": "option"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"hasDynamicHelp": false,
|
|
536
|
+
"hiddenAliases": [],
|
|
537
|
+
"id": "config:show",
|
|
538
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
539
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
540
|
+
"pluginType": "core",
|
|
541
|
+
"strict": true,
|
|
542
|
+
"enableJsonFlag": true,
|
|
543
|
+
"isESM": true,
|
|
544
|
+
"relativePath": [
|
|
545
|
+
"dist",
|
|
546
|
+
"commands",
|
|
547
|
+
"config",
|
|
548
|
+
"show.js"
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
"config:use": {
|
|
552
|
+
"aliases": [],
|
|
553
|
+
"args": {},
|
|
554
|
+
"description": "Switch to a different configuration file",
|
|
555
|
+
"examples": [
|
|
556
|
+
"<%= config.bin %> <%= command.id %>"
|
|
557
|
+
],
|
|
558
|
+
"flags": {
|
|
559
|
+
"json": {
|
|
560
|
+
"description": "Format output as json.",
|
|
561
|
+
"helpGroup": "GLOBAL",
|
|
562
|
+
"name": "json",
|
|
563
|
+
"allowNo": false,
|
|
564
|
+
"type": "boolean"
|
|
565
|
+
},
|
|
566
|
+
"config": {
|
|
567
|
+
"helpGroup": "GLOBAL",
|
|
568
|
+
"name": "config",
|
|
569
|
+
"required": false,
|
|
570
|
+
"summary": "Specify config file.",
|
|
571
|
+
"hasDynamicHelp": false,
|
|
572
|
+
"multiple": false,
|
|
573
|
+
"type": "option"
|
|
574
|
+
},
|
|
575
|
+
"url": {
|
|
576
|
+
"helpGroup": "GLOBAL",
|
|
577
|
+
"name": "url",
|
|
578
|
+
"required": false,
|
|
579
|
+
"summary": "Specify provider base URL.",
|
|
580
|
+
"hasDynamicHelp": false,
|
|
581
|
+
"multiple": false,
|
|
582
|
+
"type": "option"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"hasDynamicHelp": false,
|
|
586
|
+
"hiddenAliases": [],
|
|
587
|
+
"id": "config:use",
|
|
588
|
+
"pluginAlias": "@super-protocol/sp-cli",
|
|
589
|
+
"pluginName": "@super-protocol/sp-cli",
|
|
590
|
+
"pluginType": "core",
|
|
591
|
+
"strict": true,
|
|
592
|
+
"enableJsonFlag": true,
|
|
593
|
+
"isESM": true,
|
|
594
|
+
"relativePath": [
|
|
595
|
+
"dist",
|
|
596
|
+
"commands",
|
|
597
|
+
"config",
|
|
598
|
+
"use.js"
|
|
599
|
+
]
|
|
62
600
|
}
|
|
63
601
|
},
|
|
64
|
-
"version": "0.0.
|
|
602
|
+
"version": "0.0.2"
|
|
65
603
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@super-protocol/sp-cli",
|
|
3
3
|
"description": "SuperProtocol Command line interface",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"author": "SuperProtocol",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
"bugs": "https://github.com/Super-Protocol/sp-cli/issues",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@inquirer/prompts": "^7.8.6",
|
|
16
|
-
"@oclif/core": "^4.
|
|
16
|
+
"@oclif/core": "^4.7.2",
|
|
17
17
|
"@oclif/plugin-help": "^6.2.33",
|
|
18
|
-
"@oclif/plugin-plugins": "^5.4.
|
|
19
|
-
"@oclif/plugin-update": "^
|
|
18
|
+
"@oclif/plugin-plugins": "^5.4.50",
|
|
19
|
+
"@oclif/plugin-warn-if-update-available": "^3.1.50",
|
|
20
20
|
"@sinclair/typebox": "^0.33.22",
|
|
21
|
-
"@super-protocol/provider-client": "^0.1.
|
|
21
|
+
"@super-protocol/provider-client": "^0.1.7",
|
|
22
22
|
"cookie": "^1.0.2",
|
|
23
23
|
"jsonwebtoken": "^9.0.2",
|
|
24
24
|
"pino": "^9.14.0",
|
|
25
25
|
"pino-pretty": "^13.1.2",
|
|
26
26
|
"tough-cookie": "^6.0.0",
|
|
27
27
|
"typescript-retry-decorator": "^2.4.2",
|
|
28
|
-
"viem": "^2.38.
|
|
28
|
+
"viem": "^2.38.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/compat": "^1.4.0",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"eslint-config-oclif": "^6.0.110",
|
|
41
41
|
"eslint-config-prettier": "^10.1.8",
|
|
42
42
|
"mocha": "^10.8.2",
|
|
43
|
-
"oclif": "^4.22.
|
|
43
|
+
"oclif": "^4.22.32",
|
|
44
44
|
"prettier": "^3.6.2",
|
|
45
45
|
"shx": "^0.3.3",
|
|
46
|
-
"
|
|
46
|
+
"tsx": "4.20.6",
|
|
47
47
|
"typescript": "^5.9.3"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
@@ -64,28 +64,46 @@
|
|
|
64
64
|
"oclif": {
|
|
65
65
|
"bin": "sp",
|
|
66
66
|
"dirname": "sp",
|
|
67
|
-
"commands":
|
|
68
|
-
|
|
67
|
+
"commands": {
|
|
68
|
+
"strategy": "pattern",
|
|
69
|
+
"target": "./dist/commands",
|
|
70
|
+
"globPatterns": [
|
|
71
|
+
"**/*.+(js|cjs|mjs|ts|tsx|mts|cts)",
|
|
72
|
+
"!**/*.+(d.*|test.*|spec.*|helpers.*)?(x)",
|
|
73
|
+
"!**/base.ts"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
69
76
|
"plugins": [
|
|
70
77
|
"@oclif/plugin-help",
|
|
71
78
|
"@oclif/plugin-plugins",
|
|
72
|
-
"@oclif/plugin-update"
|
|
79
|
+
"@oclif/plugin-warn-if-update-available"
|
|
73
80
|
],
|
|
81
|
+
"warn-if-update-available": {
|
|
82
|
+
"frequency": 1,
|
|
83
|
+
"frequencyUnit": "days"
|
|
84
|
+
},
|
|
74
85
|
"topicSeparator": " ",
|
|
75
86
|
"topics": {
|
|
76
87
|
"login": {
|
|
77
|
-
"description": "
|
|
88
|
+
"description": "Authentication and account management"
|
|
78
89
|
}
|
|
79
90
|
},
|
|
80
91
|
"macos": {
|
|
81
92
|
"identifier": "com.super-protocol.cli"
|
|
93
|
+
},
|
|
94
|
+
"hooks": {
|
|
95
|
+
"init": "./dist/hooks/init/init-container"
|
|
82
96
|
}
|
|
83
97
|
},
|
|
84
|
-
"repository": "git@github.com
|
|
98
|
+
"repository": "git+ssh://git@github.com/Super-Protocol/sp-cli.git",
|
|
85
99
|
"scripts": {
|
|
86
|
-
"
|
|
100
|
+
"cleanall": "shx rm -rf dist && shx rm -f tsconfig.tsbuildinfo",
|
|
101
|
+
"build": "npm run cleanall && tsc -b",
|
|
87
102
|
"start": "./bin/dev.js",
|
|
103
|
+
"prestart:prod": "npm run build",
|
|
104
|
+
"start:prod": "./bin/run.js",
|
|
88
105
|
"generate:command": "oclif generate command",
|
|
106
|
+
"generate:hook": "oclif generate hook",
|
|
89
107
|
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
90
108
|
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
91
109
|
"postpack": "shx rm -f oclif.manifest.json",
|