Skip to content

Commit

Permalink
Renames 'spo tenant homesite list' command. Closes #6597
Browse files Browse the repository at this point in the history
  • Loading branch information
milanholemans committed Feb 8, 2025
1 parent 5adfc5b commit d8e04cc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spo tenant homesite list
# spo homesite list

Lists all home sites

## Usage

```sh
m365 spo homesite list [options]
```

## Alias

```sh
m365 spo tenant homesite list [options]
```
Expand All @@ -21,7 +27,7 @@ m365 spo tenant homesite list [options]
List all home sites

```sh
m365 spo tenant homesite list
m365 spo homesite list
```

## Response
Expand Down Expand Up @@ -72,7 +78,7 @@ m365 spo tenant homesite list
<TabItem value="Markdown">

```md
# spo tenant homesite list
# spo homesite list

Date: 11/18/2024

Expand Down
10 changes: 5 additions & 5 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,11 @@ const sidebars: SidebarsConfig = {
label: 'homesite get',
id: 'cmd/spo/homesite/homesite-get'
},
{
type: 'doc',
label: 'homesite list',
id: 'cmd/spo/homesite/homesite-list'
},
{
type: 'doc',
label: 'homesite remove',
Expand Down Expand Up @@ -3880,11 +3885,6 @@ const sidebars: SidebarsConfig = {
label: 'tenant commandset set',
id: 'cmd/spo/tenant/tenant-commandset-set'
},
{
type: 'doc',
label: 'tenant homesite list',
id: 'cmd/spo/tenant/tenant-homesite-list'
},
{
type: 'doc',
label: 'tenant recyclebinitem list',
Expand Down
2 changes: 1 addition & 1 deletion src/m365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default {
HIDEDEFAULTTHEMES_GET: `${prefix} hidedefaultthemes get`,
HIDEDEFAULTTHEMES_SET: `${prefix} hidedefaultthemes set`,
HOMESITE_GET: `${prefix} homesite get`,
HOMESITE_LIST: `${prefix} homesite list`,
HOMESITE_REMOVE: `${prefix} homesite remove`,
HOMESITE_SET: `${prefix} homesite set`,
HUBSITE_CONNECT: `${prefix} hubsite connect`,
Expand Down Expand Up @@ -322,7 +323,6 @@ export default {
TENANT_COMMANDSET_LIST: `${prefix} tenant commandset list`,
TENANT_COMMANDSET_REMOVE: `${prefix} tenant commandset remove`,
TENANT_COMMANDSET_SET: `${prefix} tenant commandset set`,
TENANT_HOMESITE_LIST: `${prefix} tenant homesite list`,
TENANT_RECYCLEBINITEM_LIST: `${prefix} tenant recyclebinitem list`,
TENANT_RECYCLEBINITEM_REMOVE: `${prefix} tenant recyclebinitem remove`,
TENANT_RECYCLEBINITEM_RESTORE: `${prefix} tenant recyclebinitem restore`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { pid } from '../../../../utils/pid.js';
import { session } from '../../../../utils/session.js';
import { sinonUtil } from '../../../../utils/sinonUtil.js';
import commands from '../../commands.js';
import command from './tenant-homesite-list.js';
import command from './homesite-list.js';

describe(commands.TENANT_HOMESITE_LIST, () => {
describe(commands.HOMESITE_LIST, () => {
let log: string[];
let logger: Logger;
let loggerLogSpy: sinon.SinonSpy;
Expand Down Expand Up @@ -91,13 +91,17 @@ describe(commands.TENANT_HOMESITE_LIST, () => {
});

it('has correct name', () => {
assert.strictEqual(command.name, commands.TENANT_HOMESITE_LIST);
assert.strictEqual(command.name, commands.HOMESITE_LIST);
});

it('has a description', () => {
assert.notStrictEqual(command.description, null);
});

it('has an alias', () => {
assert.notStrictEqual(command.alias(), 'spo tenant homesite list');
});

it('defines correct properties for the default output', () => {
assert.deepStrictEqual(command.defaultProperties(), ['Url', 'Title']);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ import SpoCommand from '../../../base/SpoCommand.js';
import commands from '../../commands.js';
import { CliRequestOptions } from "../../../../request.js";

class SpoTenantHomeSiteListCommand extends SpoCommand {
class SpoHomeSiteListCommand extends SpoCommand {
public get name(): string {
return commands.TENANT_HOMESITE_LIST;
return commands.HOMESITE_LIST;
}

public get description(): string {
return 'Lists all home sites';
}

public alias(): string[] | undefined {
return ['spo tenant homesite list'];
}

public defaultProperties(): string[] | undefined {
return ['Url', 'Title'];
}
Expand All @@ -40,4 +44,4 @@ class SpoTenantHomeSiteListCommand extends SpoCommand {
}
}

export default new SpoTenantHomeSiteListCommand();
export default new SpoHomeSiteListCommand();

0 comments on commit d8e04cc

Please sign in to comment.