Migrates spo tenant commands to Zod. Closes #7343 by MartinM85 · Pull Request #7629 · pnp/cli-microsoft365 · GitHub
Skip to content

Migrates spo tenant commands to Zod. Closes #7343 - #7629

Open
MartinM85 wants to merge 3 commits into
pnp:mainfrom
MartinM85:feature/7343-migrate-spo-tenant-commands-to-zod
Open

MartinM85 wants to merge 3 commits into
pnp:mainfrom
MartinM85:feature/7343-migrate-spo-tenant-commands-to-zod

Conversation

@MartinM85

Copy link
Copy Markdown
Contributor

Closes #7343

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Required app-catalog inputs became optional, and five option sets no longer support interactive prompting.

6 open findings
What changed in this PR

Migrates 17 SharePoint tenant commands from legacy option validation to Zod schemas.

Changes:

  • Replaces legacy initialization, validation, telemetry, and option-set logic with Zod.
  • Updates tests to parse options through each command’s refined schema.
File Description
tenant-settings-set.ts Adds schema for tenant settings updates.
tenant-settings-set.spec.ts Migrates settings-set tests.
tenant-settings-list.ts Adds strict global-options schema.
tenant-settings-list.spec.ts Adds schema validation tests.
tenant-recyclebinitem-restore.ts Migrates restore options and URL validation.
tenant-recyclebinitem-restore.spec.ts Migrates restore tests.
tenant-recyclebinitem-remove.ts Migrates remove options and aliases.
tenant-recyclebinitem-remove.spec.ts Migrates remove tests.
tenant-recyclebinitem-list.ts Adds strict global-options schema.
tenant-recyclebinitem-list.spec.ts Adds schema validation tests.
tenant-commandset-set.ts Migrates update validation and enums.
tenant-commandset-set.spec.ts Migrates command-set update tests.
tenant-commandset-remove.ts Migrates selector option validation.
tenant-commandset-remove.spec.ts Migrates command-set removal tests.
tenant-commandset-list.ts Adds strict global-options schema.
tenant-commandset-list.spec.ts Adds schema validation tests.
tenant-commandset-get.ts Migrates selector option validation.
tenant-commandset-get.spec.ts Migrates command-set retrieval tests.
tenant-commandset-add.ts Migrates required options and enums.
tenant-commandset-add.spec.ts Migrates command-set creation tests.
tenant-applicationcustomizer-set.ts Migrates update and JSON validation.
tenant-applicationcustomizer-set.spec.ts Migrates customizer update tests.
tenant-applicationcustomizer-remove.ts Migrates selector option validation.
tenant-applicationcustomizer-remove.spec.ts Migrates customizer removal tests.
tenant-applicationcustomizer-list.ts Adds strict global-options schema.
tenant-applicationcustomizer-list.spec.ts Adds schema validation tests.
tenant-applicationcustomizer-get.ts Migrates selector option validation.
tenant-applicationcustomizer-get.spec.ts Migrates customizer retrieval tests.
tenant-applicationcustomizer-add.ts Migrates GUID and JSON validation.
tenant-applicationcustomizer-add.spec.ts Migrates customizer creation tests.
tenant-appcatalogurl-get.ts Adds strict global-options schema.
tenant-appcatalogurl-get.spec.ts Adds schema validation tests.
tenant-appcatalog-add.ts Migrates app-catalog creation options.
tenant-appcatalog-add.spec.ts Migrates app-catalog creation tests.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/m365/spo/commands/tenant/tenant-appcatalog-add.ts Outdated
Comment thread src/m365/spo/commands/tenant/tenant-applicationcustomizer-get.ts
Comment thread src/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.ts
Comment thread src/m365/spo/commands/tenant/tenant-applicationcustomizer-set.ts
Comment thread src/m365/spo/commands/tenant/tenant-commandset-get.ts
Comment thread src/m365/spo/commands/tenant/tenant-commandset-remove.ts
@MartinM85
MartinM85 force-pushed the feature/7343-migrate-spo-tenant-commands-to-zod branch from 3cd5c1c to 65506ae Compare October 10, 2026 15:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate spo tenant commands to Zod

2 participants