Skip to content

Commit

Permalink
Keep addons command hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Feb 21, 2019
1 parent 08ad2e0 commit 712458d
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 104 deletions.
73 changes: 46 additions & 27 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"cli-spinners": "^1.3.1",
"cli-ux": "^5.2.0",
"concordance": "^4.0.0",
"cli-ux": "^5.2.0",
"configstore": "^4.0.0",
"dot-prop": "^4.2.0",
"find-up": "^3.0.0",
Expand Down
8 changes: 5 additions & 3 deletions src/commands/addons/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AddonsAuthCommand extends Command {
console.log('No site id found, please run inside a site folder or `netlify link`')
return false
}

const site = await this.netlify.api.getSite({ siteId })
const addons = await getAddons(siteId, accessToken)

Expand All @@ -25,13 +25,13 @@ class AddonsAuthCommand extends Command {
}

// Filter down addons to current args.name
const currentAddon = addons.find((addon) => addon.service_path === `/.netlify/${addonName}`)
const currentAddon = addons.find(addon => addon.service_path === `/.netlify/${addonName}`)

if (!currentAddon || !currentAddon.id) {
console.log(`Addon ${addonName} doesn't exist for ${site.name}`)
return false
}

if (!currentAddon.auth_url) {
console.log(`No Admin URL found for the "${addonName} add-on"`)
return false
Expand All @@ -56,4 +56,6 @@ AddonsAuthCommand.args = [

AddonsAuthCommand.description = `Login to add-on provider`

AddonsAuthCommand.hidden = true

module.exports = AddonsAuthCommand
Loading

0 comments on commit 712458d

Please sign in to comment.