Skip to content

Commit

Permalink
mark unmanaged domains as external
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Dec 8, 2023
1 parent 1553d7f commit 0cab53e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@aws-sdk/lib-dynamodb": "3.410.0",
"aws-sdk": "2.1457.0",
"cross-env": "~7.0.3",
"eslint": "~8.54.0",
"eslint": "~8.55.0",
"fs-extra": "11.2.0",
"nyc": "~15.1.0",
"pkg": "5.8.1",
Expand Down
7 changes: 4 additions & 3 deletions src/commands/domains/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ async function action (params) {
head: [ 'Domain', 'Status', 'Updated' ],
...tableStyle,
})
for (const { domain, domainID, status, appLink, r53LastStatus, updatedAt } of domains) {
for (const { domain, domainID, managed, status, appLink, r53LastStatus, updatedAt } of domains) {
if (status === states.PURCHASING) continue
/** @type {import('cli-table3').HorizontalTableRow} */
let row = []

if (verbose) row.push(`${c.bold(domain)} <${domainID}>`)
else row.push(c.bold(domain))
const firstCell = `${c.bold(domain)}${managed ? '' : ' (external)'}`
if (verbose) row.push(`${firstCell} <${domainID}>`)
else row.push(firstCell)

if (status === states.LINKED && appLink) {
let { appID, envID } = appLink
Expand Down
3 changes: 3 additions & 0 deletions src/commands/domains/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ async function action (params) {
let { config, domain } = params
let { access_token: token, stagingAPI: _staging } = config

if (!domain)
return Error('Please specify a domain name like: begin domains remove --domain example.com')

const domains = await client.domains.list({ _staging, token })
const theDomain = domains.find(d => d.domain === domain)

Expand Down

0 comments on commit 0cab53e

Please sign in to comment.