New command: spo file archive. Closes #7175#7192
Open
Saurabh7019 wants to merge 2 commits intopnp:mainfrom
Open
New command: spo file archive. Closes #7175#7192Saurabh7019 wants to merge 2 commits intopnp:mainfrom
Saurabh7019 wants to merge 2 commits intopnp:mainfrom
Conversation
Contributor
|
Awesome work @Saurabh7019! We'll try to check it ASAP. |
There was a problem hiding this comment.
Pull request overview
This PR adds a new SharePoint Online command (m365 spo file archive) to archive a file (by server-relative URL or UniqueId), including documentation, command constant wiring, Dev Proxy API spec updates, and a full unit test suite.
Changes:
- Added
spo file archivecommand implementation with Zod-based option parsing and confirmation prompt support. - Added Mocha tests covering validation, confirmation flow, success paths (by URL / by ID), and error handling.
- Updated docs navigation + new command reference page, and extended the Dev Proxy SharePoint API spec.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/m365/spo/commands/file/file-archive.ts |
Implements the new spo file archive command and SharePoint REST interactions to resolve list/item and call Archive. |
src/m365/spo/commands/file/file-archive.spec.ts |
Adds unit tests for option validation, prompting behavior, success cases, and error handling. |
src/m365/spo/commands.ts |
Registers the command name constant FILE_ARCHIVE. |
docs/src/config/sidebars.ts |
Adds the command doc to the SPO “file” commands sidebar. |
docs/docs/cmd/spo/file/file-archive.mdx |
Adds end-user documentation for the new command, including examples and sample output. |
.devproxy/api-specs/sharepoint.yaml |
Adds Dev Proxy spec entries for Archive and GetFileByServerRelativePath. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7175