@heroku/skynet 1.6.14 → 1.6.15
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/commands/suspensions.js +24 -0
- package/index.js +2 -1
- package/lib/skynet.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const cli = require('heroku-cli-util')
|
|
2
|
+
const command = require('../lib/command')
|
|
3
|
+
const sudo = require('../lib/sudo')
|
|
4
|
+
const SkynetAPI = require('../lib/skynet')
|
|
5
|
+
|
|
6
|
+
async function run (context) {
|
|
7
|
+
sudo()
|
|
8
|
+
const skynet = new SkynetAPI(context.auth.password)
|
|
9
|
+
let response = await skynet.suspensions(context.flags.user)
|
|
10
|
+
response = JSON.parse(response)
|
|
11
|
+
cli.log(response)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = {
|
|
15
|
+
topic: 'skynet',
|
|
16
|
+
command: 'suspensions',
|
|
17
|
+
description: '(requires sudo) suspnesions history of the given user account',
|
|
18
|
+
help: `Examples:
|
|
19
|
+
$ heroku skynet:suspensions -u [user account]`,
|
|
20
|
+
flags: [
|
|
21
|
+
{ name: 'user', char: 'u', description: 'user account id or email', hasValue: true, required: true }
|
|
22
|
+
],
|
|
23
|
+
run: command(run)
|
|
24
|
+
}
|
package/index.js
CHANGED
|
@@ -17,5 +17,6 @@ exports.commands = [
|
|
|
17
17
|
require('./commands/categories/add.js'),
|
|
18
18
|
require('./commands/categories/remove.js'),
|
|
19
19
|
require('./commands/whitelist/add.js'),
|
|
20
|
-
require('./commands/whitelist/remove.js')
|
|
20
|
+
require('./commands/whitelist/remove.js'),
|
|
21
|
+
require('./commands/suspensions.js')
|
|
21
22
|
]
|
package/lib/skynet.js
CHANGED