Skip to content

Adds support for using relative URLs in spo commands. Closes #2313#2329

Merged
waldekmastykarz merged 1 commit intopnp:mainfrom
waldekmastykarz:spo-relative-urls
Apr 7, 2021
Merged

Adds support for using relative URLs in spo commands. Closes #2313#2329
waldekmastykarz merged 1 commit intopnp:mainfrom
waldekmastykarz:spo-relative-urls

Conversation

@waldekmastykarz
Copy link
Copy Markdown
Member

Adds support for using relative URLs in spo commands. Closes #2313

@waldekmastykarz
Copy link
Copy Markdown
Member Author

waldekmastykarz commented Apr 5, 2021

Hey @pnp/cli-for-microsoft-365-maintainers, here's a proposed implementation for simplifying working with SharePoint URLs in SPO commands. Few noteworthy choices:

  • the feature works based on a whitelist of options. If the particular option is not in the whitelist, the URL specified in its value won't be expanded
  • each command can exclude a specific option from the whitelist if it needs that option to keep the server-relative URL (check the PR for a few examples)
  • if SPO URL is not known to the CLI, and one of the option uses a server-relative URL, CLI will return an error prompting the user to either use an absolute URL or specify the SPO URL using the spo set command

I've also updated our test scripts to avoid repetition and allow running coverage tests without linting to speed up dev process.

Looking forward to hearing what you think

@waldekmastykarz waldekmastykarz self-assigned this Apr 7, 2021
@waldekmastykarz waldekmastykarz merged commit 46a6332 into pnp:main Apr 7, 2021
@waldekmastykarz waldekmastykarz deleted the spo-relative-urls branch April 7, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Simplify working with SharePoint URLs

1 participant