Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit da553eb

Browse files
authored
feat: create backend with org and move backend to org (#15)
feat: create backend with org and move backend to org & show the organization commands
1 parent 278eaaa commit da553eb

6 files changed

Lines changed: 6 additions & 8 deletions

src/commands/add-member-to-organization.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ mutation AddOrganizationMember($member: AddOrgMember!) {
1111
`
1212

1313
export default class AddMemberToOrganization extends BaseCommand {
14-
static hidden = true
15-
1614
static description = 'Add a Member to an Organization'
1715

1816
static examples = [

src/commands/create-organization.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ mutation CreateOrganization($name: String!) {
1111
`
1212

1313
export default class CreateOrganization extends BaseCommand {
14-
static hidden = true
15-
1614
static description = 'Create an Organization'
1715

1816
static examples = [

src/commands/deploy-backend.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default class DeployBackend extends BaseCommand {
1616
static flags = {
1717
...BaseCommand.commonFlags,
1818
region: flags.string({char: 'r', description: 'Region', default: 'us-west-2'}),
19+
organizationId: flags.string({char: 'o', description: 'Organization ID', default: ''}),
1920
subdomain: flags.string({char: 's', description: 'Subdomain'}),
2021
'deployment-mode': flags.string({char: 'm', description: 'Deployment Mode', default: 'graphql', options: ['readonly', 'graphql', 'flexible']}),
2122
}
@@ -43,6 +44,7 @@ export default class DeployBackend extends BaseCommand {
4344
zone: opts.flags.region,
4445
subdomain: opts.flags.subdomain,
4546
deploymentMode: opts.flags['deployment-mode'],
47+
organizationId: opts.flags.organizationId,
4648
}),
4749
})
4850
if (response.status !== 200) {

src/commands/list-organizations.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ query GetOrganizations {
2626
`
2727

2828
export default class ListOrganizations extends BaseCommand {
29-
static hidden = true
30-
3129
static description = 'List Organizations associated with the user'
3230

3331
static examples = [

src/commands/remove-member-from-organization.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ mutation DeleteOrganizationMember($member: DeleteOrgMember!) {
1212
`
1313

1414
export default class DeleteMemberFromOrganization extends BaseCommand {
15-
static hidden = true
16-
1715
static description = 'Remove a Member from Organization'
1816

1917
static examples = [

src/commands/update-backend.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default class UpdateBackend extends BaseCommand {
1414
static flags = {
1515
...BaseCommand.commonFlags,
1616
name: flags.string({char: 'n', description: 'Name'}),
17+
organizationId: flags.string({char: 'o', description: 'Organization UID', default: ''}),
1718
confirm: flags.boolean({char: 'y', description: 'Skip Confirmation', default: false}),
1819
'deployment-mode': flags.string({char: 'm', description: 'Deployment Mode', options: ['readonly', 'graphql', 'flexible']}),
1920
}
@@ -41,6 +42,9 @@ export default class UpdateBackend extends BaseCommand {
4142
if (opts.flags['deployment-mode']) {
4243
updates.deploymentMode = opts.flags['deployment-mode']
4344
}
45+
if (opts.flags.organizationId) {
46+
updates.organizationId = opts.flags.organizationId
47+
}
4448

4549
if (Object.keys(updates).length === 0) {
4650
this.error('Please pass in a property to update')

0 commit comments

Comments
 (0)