From 78d1197b21b32405129af7d94f02349e168365ca Mon Sep 17 00:00:00 2001 From: Matt Blewitt <118200221+mble-sfdc@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:24:34 +0000 Subject: [PATCH] fix formatting drift --- packages/spaces/commands/drains/get.js | 6 +++--- packages/spaces/commands/drains/set.js | 2 +- packages/spaces/index.js | 7 +++---- packages/spaces/test/unit/commands/drains/get.unit.test.js | 2 +- packages/spaces/test/unit/commands/drains/set.unit.test.js | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/spaces/commands/drains/get.js b/packages/spaces/commands/drains/get.js index 8153a474fc..724b1d631d 100644 --- a/packages/spaces/commands/drains/get.js +++ b/packages/spaces/commands/drains/get.js @@ -18,13 +18,13 @@ const cmd = { needsApp: false, needsAuth: true, flags: [ - { name: 'space', char: 's', hasValue: true, description: 'space for which to get log drain', required: true }, - { name: 'json', description: 'output in json format' }, + {name: 'space', char: 's', hasValue: true, description: 'space for which to get log drain', required: true}, + {name: 'json', description: 'output in json format'}, ], run: cli.command(run), } module.exports = [ Object.assign({topic: 'spaces', command: 'drains:get', hidden: false}, cmd), - Object.assign({topic: 'drains', command: 'get', hidden: true}, cmd) + Object.assign({topic: 'drains', command: 'get', hidden: true}, cmd), ] diff --git a/packages/spaces/commands/drains/set.js b/packages/spaces/commands/drains/set.js index fe911ceba1..544ecc91cb 100644 --- a/packages/spaces/commands/drains/set.js +++ b/packages/spaces/commands/drains/set.js @@ -25,5 +25,5 @@ const cmd = { module.exports = [ Object.assign({topic: 'spaces', command: 'drains:set', hidden: false}, cmd), - Object.assign({topic: 'drains', command: 'set', hidden: true}, cmd) + Object.assign({topic: 'drains', command: 'set', hidden: true}, cmd), ] diff --git a/packages/spaces/index.js b/packages/spaces/index.js index 139e879edb..0a7112fe13 100644 --- a/packages/spaces/index.js +++ b/packages/spaces/index.js @@ -1,13 +1,12 @@ -'use strict' -const _ = require('lodash') +'use strict' exports.topics = [ {name: 'spaces', description: 'manage heroku private spaces'}, {name: 'trusted-ips', hidden: true}, ] -exports.commands = _.flatten([ +exports.commands = [ require('./commands'), require('./commands/create'), require('./commands/destroy'), @@ -37,4 +36,4 @@ exports.commands = _.flatten([ require('./commands/outbound-rules/add'), require('./commands/outbound-rules/remove'), require('./commands/hosts'), -]) +].flat() diff --git a/packages/spaces/test/unit/commands/drains/get.unit.test.js b/packages/spaces/test/unit/commands/drains/get.unit.test.js index c7445e2329..23f369111f 100644 --- a/packages/spaces/test/unit/commands/drains/get.unit.test.js +++ b/packages/spaces/test/unit/commands/drains/get.unit.test.js @@ -23,7 +23,7 @@ cmds.forEach(cmd => { }) return cmd.run({flags: {space: 'my-space'}}) .then(() => expect(cli.stdout).to.equal( - `https://example.com (d.a55ecbe1-5513-4d19-91e4-58a08b419d19)\n`, + 'https://example.com (d.a55ecbe1-5513-4d19-91e4-58a08b419d19)\n', )).then(() => api.done()) }) diff --git a/packages/spaces/test/unit/commands/drains/set.unit.test.js b/packages/spaces/test/unit/commands/drains/set.unit.test.js index 510baf6610..a8b5fde646 100644 --- a/packages/spaces/test/unit/commands/drains/set.unit.test.js +++ b/packages/spaces/test/unit/commands/drains/set.unit.test.js @@ -25,7 +25,7 @@ cmds.forEach(cmd => { }) return cmd.run({args: {url: 'https://example.com'}, flags: {space: 'my-space'}}) .then(() => expect(cli.stdout).to.equal( - `Successfully set drain https://example.com for my-space.\n`, + 'Successfully set drain https://example.com for my-space.\n', )).then(() => api.done()) }) })