Add alias organization list for orgs command

Change-type: minor
This commit is contained in:
myarmolinsky 2024-09-26 07:52:46 -04:00
parent 218e0a1b6b
commit 082cce332a
11 changed files with 29 additions and 20 deletions

View File

@ -58,7 +58,7 @@ const commandHeadings: { [key: string]: string } = {
env: 'Environment Variables', env: 'Environment Variables',
help: 'Help and Version', help: 'Help and Version',
'ssh-key': 'SSH Keys', 'ssh-key': 'SSH Keys',
orgs: 'Organizations', organization: 'Organizations',
os: 'OS', os: 'OS',
util: 'Utilities', util: 'Utilities',
ssh: 'Network', ssh: 'Network',

View File

@ -255,9 +255,9 @@ are encouraged to regularly update the balena CLI to the latest version.
- [notes](#notes) - [notes](#notes)
- Organization - Organizations
- [orgs](#orgs) - [organization list](#organization-list)
- OS - OS
@ -403,7 +403,7 @@ Create a new balena app.
You can specify the organization the app should belong to using You can specify the organization the app should belong to using
the `--organization` option. The organization's handle, not its name, the `--organization` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
`balena orgs` command. `balena organization list` command.
The app's default device type is specified with the `--type` option. The app's default device type is specified with the `--type` option.
The `balena devices supported` command can be used to list the available The `balena devices supported` command can be used to list the available
@ -533,7 +533,7 @@ Create a new balena block.
You can specify the organization the block should belong to using You can specify the organization the block should belong to using
the `--organization` option. The organization's handle, not its name, the `--organization` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
`balena orgs` command. `balena organization list` command.
The block's default device type is specified with the `--type` option. The block's default device type is specified with the `--type` option.
The `balena devices supported` command can be used to list the available The `balena devices supported` command can be used to list the available
@ -2205,7 +2205,7 @@ Create a new balena fleet.
You can specify the organization the fleet should belong to using You can specify the organization the fleet should belong to using
the `--organization` option. The organization's handle, not its name, the `--organization` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
`balena orgs` command. `balena organization list` command.
The fleet's default device type is specified with the `--type` option. The fleet's default device type is specified with the `--type` option.
The `balena devices supported` command can be used to list the available The `balena devices supported` command can be used to list the available
@ -2778,9 +2778,16 @@ device UUID
# Organization # Organizations
## orgs ## organization list
### Aliases
- `orgs`
To use one of the aliases, replace `organization list` with the alias.
### Description ### Description
@ -2788,7 +2795,7 @@ list all the organizations that you are a member of.
Examples: Examples:
$ balena orgs $ balena organization list
### Options ### Options

View File

@ -28,7 +28,7 @@ export default class AppCreateCmd extends Command {
You can specify the organization the app should belong to using You can specify the organization the app should belong to using
the \`--organization\` option. The organization's handle, not its name, the \`--organization\` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
\`balena orgs\` command. \`balena organization list\` command.
The app's default device type is specified with the \`--type\` option. The app's default device type is specified with the \`--type\` option.
The \`balena devices supported\` command can be used to list the available The \`balena devices supported\` command can be used to list the available

View File

@ -28,7 +28,7 @@ export default class BlockCreateCmd extends Command {
You can specify the organization the block should belong to using You can specify the organization the block should belong to using
the \`--organization\` option. The organization's handle, not its name, the \`--organization\` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
\`balena orgs\` command. \`balena organization list\` command.
The block's default device type is specified with the \`--type\` option. The block's default device type is specified with the \`--type\` option.
The \`balena devices supported\` command can be used to list the available The \`balena devices supported\` command can be used to list the available

View File

@ -28,7 +28,7 @@ export default class FleetCreateCmd extends Command {
You can specify the organization the fleet should belong to using You can specify the organization the fleet should belong to using
the \`--organization\` option. The organization's handle, not its name, the \`--organization\` option. The organization's handle, not its name,
should be provided. Organization handles can be listed with the should be provided. Organization handles can be listed with the
\`balena orgs\` command. \`balena organization list\` command.
The fleet's default device type is specified with the \`--type\` option. The fleet's default device type is specified with the \`--type\` option.
The \`balena devices supported\` command can be used to list the available The \`balena devices supported\` command can be used to list the available

View File

@ -19,13 +19,15 @@ import { Command } from '@oclif/core';
import * as cf from '../../utils/common-flags'; import * as cf from '../../utils/common-flags';
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy'; import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
export default class OrgsCmd extends Command { export default class OrganizationListCmd extends Command {
public static aliases = ['orgs'];
public static description = stripIndent` public static description = stripIndent`
List all organizations. List all organizations.
list all the organizations that you are a member of. list all the organizations that you are a member of.
`; `;
public static examples = ['$ balena orgs']; public static examples = ['$ balena organization list'];
public static flags = { public static flags = {
help: cf.help, help: cf.help,
@ -34,7 +36,7 @@ export default class OrgsCmd extends Command {
public static authenticated = true; public static authenticated = true;
public async run() { public async run() {
await this.parse(OrgsCmd); await this.parse(OrganizationListCmd);
const { getOwnOrganizations } = await import('../../utils/sdk'); const { getOwnOrganizations } = await import('../../utils/sdk');

View File

@ -195,7 +195,7 @@
%2: build/commands/notes/index.js %2: build/commands/notes/index.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/orgs/index.js %2: build/commands/organization/list.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/os/build-config.js %2: build/commands/os/build-config.js

View File

@ -195,7 +195,7 @@
%2: build/commands/notes/index.js %2: build/commands/notes/index.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/orgs/index.js %2: build/commands/organization/list.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/os/build-config.js %2: build/commands/os/build-config.js

View File

@ -195,7 +195,7 @@
%2: build/commands/notes/index.js %2: build/commands/notes/index.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/orgs/index.js %2: build/commands/organization/list.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/os/build-config.js %2: build/commands/os/build-config.js

View File

@ -195,7 +195,7 @@
%2: build/commands/notes/index.js %2: build/commands/notes/index.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/orgs/index.js %2: build/commands/organization/list.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules/@oclif/core/package.json %1: node_modules/@oclif/core/package.json
%2: build/commands/os/build-config.js %2: build/commands/os/build-config.js

View File

@ -195,7 +195,7 @@
%2: build\commands\notes\index.js %2: build\commands\notes\index.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules\@oclif\core\package.json %1: node_modules\@oclif\core\package.json
%2: build\commands\orgs\index.js %2: build\commands\organization\list.js
> Warning Entry 'main' not found in %1 > Warning Entry 'main' not found in %1
%1: node_modules\@oclif\core\package.json %1: node_modules\@oclif\core\package.json
%2: build\commands\os\build-config.js %2: build\commands\os\build-config.js