Migrates 'spo applicationcustomizer' and 'spo apppage' commands to Zod. Closes #7320#7427
Open
MartinM85 wants to merge 3 commits into
Open
Migrates 'spo applicationcustomizer' and 'spo apppage' commands to Zod. Closes #7320#7427MartinM85 wants to merge 3 commits into
MartinM85 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates SharePoint Online (spo) applicationcustomizer and apppage commands from legacy option/validator/telemetry initialization to Zod schema-based parsing/validation, aligning these commands with the newer CLI validation pipeline and updating tests accordingly.
Changes:
- Added exported
optionsZod schemas (with aliases) andschemagetters for all migrated commands. - Replaced legacy validators/option sets with
getRefinedSchema()refinements (including option-set enforcement). - Updated unit tests to validate via
commandInfo.command.getSchemaToParse()usingsafeParse()/parse()and added unknown-option rejection tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/m365/spo/commands/apppage/apppage-set.ts | Migrates spo apppage set to Zod schema validation. |
| src/m365/spo/commands/apppage/apppage-set.spec.ts | Updates apppage-set tests to use refined schema parse/safeParse. |
| src/m365/spo/commands/apppage/apppage-add.ts | Migrates spo apppage add to Zod schema validation. |
| src/m365/spo/commands/apppage/apppage-add.spec.ts | Updates apppage-add tests to use refined schema parse/safeParse. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.ts | Migrates spo applicationcustomizer set to Zod with refinements for URL, GUIDs, option-set, and “at least one update” rules. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.spec.ts | Updates applicationcustomizer-set tests to schema-based validation. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.ts | Migrates spo applicationcustomizer remove to Zod with refinements for URL/GUIDs and option-set. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.spec.ts | Updates applicationcustomizer-remove tests to schema-based validation. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.ts | Migrates spo applicationcustomizer list to Zod with URL refinement and enum scope. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.spec.ts | Updates applicationcustomizer-list tests to schema-based validation. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.ts | Migrates spo applicationcustomizer get to Zod with URL/GUID and option-set refinements. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.spec.ts | Updates applicationcustomizer-get tests to schema-based validation. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.ts | Migrates spo applicationcustomizer add to Zod schema validation. |
| src/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.spec.ts | Updates applicationcustomizer-add tests to schema-based validation. |
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 #7320