1- import { Command , Flags , CliUx } from '@oclif/core'
1+ import { CliUx , Command , Flags } from '@oclif/core'
22
33import { APIClient } from '../../api'
44
@@ -7,10 +7,10 @@ export default class Create extends Command {
77
88 static examples = [
99 `team-notes:create --teamPath=CLI-test --content='# A new note' --readPermission=owner --writePermission=owner --commentPermission=disabled
10- ID Title User Path Team Path
11- ────────────────────── ──────────────────────────────── ────────────────────── ────────
10+ ID Title User Path Team Path
11+ ────────────────────── ──────────────────────────────── ────────────────────── ────────
1212raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q null `
13- ]
13+ ]
1414
1515 static flags = {
1616 help : Flags . help ( { char : 'h' } ) ,
@@ -20,31 +20,31 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q n
2020 readPermission : Flags . string ( ) ,
2121 writePermission : Flags . string ( ) ,
2222 commentPermission : Flags . string ( ) ,
23- ...CliUx . ux . table . flags ( ) ,
23+ ...CliUx . ux . table . flags ( ) ,
2424 }
2525
2626 async run ( ) {
2727 const { flags} = await this . parse ( Create )
2828 const { teamPath, title, content, readPermission, writePermission, commentPermission} = flags
2929 const options = { title, content, readPermission, writePermission, commentPermission}
3030
31- if ( ! teamPath ) {
31+ if ( ! teamPath ) {
3232 this . error ( 'Flag teamPath could not be empty' )
3333 }
34-
34+
3535 try {
36- // TODO: create note options typing
36+ // TODO: create note options typing
3737 const note = await APIClient . createTeamNote ( teamPath , options as any )
3838
39- CliUx . ux . table ( [ note ] , {
39+ CliUx . ux . table ( [ note ] , {
4040 id : {
4141 header : 'ID' ,
4242 } ,
4343 title : { } ,
4444 userPath : {
4545 header : 'User path'
4646 } ,
47- teamPath :{
47+ teamPath : {
4848 header : 'Team path'
4949 }
5050 } , {
@@ -57,4 +57,3 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q n
5757 }
5858 }
5959}
60-
0 commit comments