@heroku/skynet 1.7.0 → 1.8.0
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/index.js +0 -2
- package/lib/skynet.js +0 -21
- package/package.json +3 -3
- package/commands/categories/add.js +0 -21
- package/commands/categories/remove.js +0 -20
package/index.js
CHANGED
|
@@ -14,8 +14,6 @@ exports.commands = [
|
|
|
14
14
|
require('./commands/unsuspend/user.js'),
|
|
15
15
|
require('./commands/deprovision.js'),
|
|
16
16
|
require('./commands/categories.js'),
|
|
17
|
-
require('./commands/categories/add.js'),
|
|
18
|
-
require('./commands/categories/remove.js'),
|
|
19
17
|
require('./commands/whitelist/add.js'),
|
|
20
18
|
require('./commands/whitelist/remove.js'),
|
|
21
19
|
require('./commands/whitelists.js'),
|
package/lib/skynet.js
CHANGED
|
@@ -201,27 +201,6 @@ module.exports = class SkynetAPI {
|
|
|
201
201
|
})
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
addCategory (category, description) {
|
|
205
|
-
const body = {
|
|
206
|
-
category: category,
|
|
207
|
-
description: description
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
return this.request('/categories', {
|
|
211
|
-
method: 'POST',
|
|
212
|
-
body: body,
|
|
213
|
-
json: true
|
|
214
|
-
})
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
removeCategory (category) {
|
|
218
|
-
return this.request(`/categories/${category}`, {
|
|
219
|
-
method: 'DELETE',
|
|
220
|
-
body: {},
|
|
221
|
-
json: true
|
|
222
|
-
})
|
|
223
|
-
}
|
|
224
|
-
|
|
225
204
|
suspensions (account) {
|
|
226
205
|
return this.request(`/v2/suspensions/${account}`, {
|
|
227
206
|
method: 'GET'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku/skynet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "use Skynet from Heroku CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Bob Argenbright @byt3smith",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"split": "^1.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"acorn": "
|
|
25
|
+
"acorn": "^6.4.1",
|
|
26
26
|
"minimist": ">=1.2.2",
|
|
27
27
|
"mocha": "^5.2.0",
|
|
28
28
|
"mockdate": "^2.0.1",
|
|
29
29
|
"nock": "^12.0.3",
|
|
30
|
-
"np": "^6.
|
|
30
|
+
"np": "^6.5.0",
|
|
31
31
|
"standard": "^14.3.3",
|
|
32
32
|
"unexpected": "^10.29.0"
|
|
33
33
|
},
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const cli = require('heroku-cli-util')
|
|
2
|
-
const command = require('../../lib/command')
|
|
3
|
-
const SkynetAPI = require('../../lib/skynet')
|
|
4
|
-
|
|
5
|
-
async function run (context) {
|
|
6
|
-
const skynet = new SkynetAPI(context.auth.password)
|
|
7
|
-
await cli.action(`adding new category: ${cli.color.cyan(context.flags.category)}`, skynet.addCategory(context.flags.category, context.flags.description))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
topic: 'skynet',
|
|
12
|
-
command: 'categories:add',
|
|
13
|
-
description: 'adds a value to suspension categories',
|
|
14
|
-
help: `Examples:
|
|
15
|
-
$ heroku sudo skynet:categories:add -c new-category -d "this is a new category"`,
|
|
16
|
-
flags: [
|
|
17
|
-
{ name: 'category', char: 'c', description: 'new category value', hasValue: true, required: true },
|
|
18
|
-
{ name: 'description', char: 'd', description: 'new category description', hasValue: true, required: true }
|
|
19
|
-
],
|
|
20
|
-
run: command(run)
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const cli = require('heroku-cli-util')
|
|
2
|
-
const command = require('../../lib/command')
|
|
3
|
-
const SkynetAPI = require('../../lib/skynet')
|
|
4
|
-
|
|
5
|
-
async function run (context) {
|
|
6
|
-
const skynet = new SkynetAPI(context.auth.password)
|
|
7
|
-
await cli.action(`removing ${cli.color.cyan(context.flags.category)} from suspension categories`, skynet.removeCategory(context.flags.category))
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
topic: 'skynet',
|
|
12
|
-
command: 'categories:remove',
|
|
13
|
-
description: 'removes a value from suspension categories',
|
|
14
|
-
help: `Examples:
|
|
15
|
-
$ heroku sudo skynet:categories:remove -c test-category`,
|
|
16
|
-
flags: [
|
|
17
|
-
{ name: 'category', char: 'c', description: 'category to remove', hasValue: true, required: true }
|
|
18
|
-
],
|
|
19
|
-
run: command(run)
|
|
20
|
-
}
|