Skip to content

Commit

Permalink
Renamed 'spo cdn origin set' to 'spo cdn origin add' solving pnp#184
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz committed Dec 29, 2017
1 parent 8b4ede8 commit 02bfc07
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/manual/docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Initial release.
- [spo cdn get](../cmd/spo/cdn/cdn-get.md) - get Office 365 CDN status
- [spo cdn origin list](../cmd/spo/cdn/cdn-origin-list.md) - list Office 365 CDN origins
- [spo cdn origin remove](../cmd/spo/cdn/cdn-origin-remove.md) - remove Office 365 CDN origin
- [spo cdn origin set](../cmd/spo/cdn/cdn-origin-set.md) - set Office 365 CDN origin
- [spo cdn origin add](../cmd/spo/cdn/cdn-origin-add.md) - add Office 365 CDN origin
- [spo cdn policy list](../cmd/spo/cdn/cdn-policy-list.md) - list Office 365 CDN policies
- [spo cdn policy set](../cmd/spo/cdn/cdn-policy-set.md) - set Office 365 CDN policy
- [spo cdn set](../cmd/spo/cdn/cdn-set.md) - enable/disable Office 365 CDN
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# spo cdn origin set
# spo cdn origin add

Adds CDN origin to the current SharePoint Online tenant

## Usage

```sh
spo cdn origin set [options]
spo cdn origin add [options]
```

## Options
Expand Down Expand Up @@ -37,7 +37,7 @@ the Public (default) or Private CDN. If you don't use the option, the command wi
Add _*/CDN_ to the list of origins of the Public CDN

```sh
spo cdn origin set -t Public -r */CDN
spo cdn origin add -t Public -r */CDN
```

## More information
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pages:
- cdn:
- cdn get: 'cmd/spo/cdn/cdn-get.md'
- cdn set: 'cmd/spo/cdn/cdn-set.md'
- cdn origin add: 'cmd/spo/cdn/cdn-origin-add.md'
- cdn origin list: 'cmd/spo/cdn/cdn-origin-list.md'
- cdn origin remove: 'cmd/spo/cdn/cdn-origin-remove.md'
- cdn origin set: 'cmd/spo/cdn/cdn-origin-set.md'
- cdn policy list: 'cmd/spo/cdn/cdn-policy-list.md'
- cdn policy set: 'cmd/spo/cdn/cdn-policy-set.md'
- customaction:
Expand Down
2 changes: 1 addition & 1 deletion src/o365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export default {
APP_UNINSTALL: `${prefix} app uninstall`,
APP_UPGRADE: `${prefix} app upgrade`,
CDN_GET: `${prefix} cdn get`,
CDN_ORIGIN_ADD: `${prefix} cdn origin add`,
CDN_ORIGIN_LIST: `${prefix} cdn origin list`,
CDN_ORIGIN_SET: `${prefix} cdn origin set`,
CDN_ORIGIN_REMOVE: `${prefix} cdn origin remove`,
CDN_POLICY_LIST: `${prefix} cdn policy list`,
CDN_POLICY_SET: `${prefix} cdn policy set`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import Command, { CommandValidate, CommandOption, CommandError } from '../../../
import * as sinon from 'sinon';
import appInsights from '../../../../appInsights';
import auth, { Site } from '../../SpoAuth';
const command: Command = require('./cdn-origin-set');
const command: Command = require('./cdn-origin-add');
import * as assert from 'assert';
import * as request from 'request-promise-native';
import config from '../../../../config';
import Utils from '../../../../Utils';

describe(commands.CDN_ORIGIN_SET, () => {
describe(commands.CDN_ORIGIN_ADD, () => {
let vorpal: Vorpal;
let log: string[];
let cmdInstance: any;
Expand Down Expand Up @@ -85,7 +85,7 @@ describe(commands.CDN_ORIGIN_SET, () => {
});

it('has correct name', () => {
assert.equal(command.name.startsWith(commands.CDN_ORIGIN_SET), true);
assert.equal(command.name.startsWith(commands.CDN_ORIGIN_ADD), true);
});

it('has a description', () => {
Expand All @@ -109,7 +109,7 @@ describe(commands.CDN_ORIGIN_SET, () => {
cmdInstance.action = command.action();
cmdInstance.action({ options: {}, appCatalogUrl: 'https://contoso.sharepoint.com/sites/appcatalog' }, () => {
try {
assert.equal(telemetry.name, commands.CDN_ORIGIN_SET);
assert.equal(telemetry.name, commands.CDN_ORIGIN_ADD);
done();
}
catch (e) {
Expand Down Expand Up @@ -406,7 +406,7 @@ describe(commands.CDN_ORIGIN_SET, () => {
const find = sinon.stub(vorpal, 'find').callsFake(() => cmd);
cmd.help = command.help();
cmd.help({}, () => {});
assert(find.calledWith(commands.CDN_ORIGIN_SET));
assert(find.calledWith(commands.CDN_ORIGIN_ADD));
});

it('has help with examples', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Options extends GlobalOptions {

class SpoCdnOriginAddCommand extends SpoCommand {
public get name(): string {
return commands.CDN_ORIGIN_SET;
return commands.CDN_ORIGIN_ADD;
}

public get description(): string {
Expand Down Expand Up @@ -142,7 +142,7 @@ class SpoCdnOriginAddCommand extends SpoCommand {

public commandHelp(args: CommandArgs, log: (help: string) => void): void {
const chalk = vorpal.chalk;
log(vorpal.find(commands.CDN_ORIGIN_SET).helpInformation());
log(vorpal.find(commands.CDN_ORIGIN_ADD).helpInformation());
log(
` ${chalk.yellow('Important:')} before using this command, connect to a SharePoint Online tenant admin site,
using the ${chalk.blue(commands.CONNECT)} command.
Expand All @@ -160,7 +160,7 @@ class SpoCdnOriginAddCommand extends SpoCommand {
Examples:
Add ${chalk.grey('*/CDN')} to the list of origins of the Public CDN
${chalk.grey(config.delimiter)} ${commands.CDN_ORIGIN_SET} -t Public -o */CDN
${chalk.grey(config.delimiter)} ${commands.CDN_ORIGIN_ADD} -t Public -o */CDN
More information:
Expand Down

0 comments on commit 02bfc07

Please sign in to comment.