Adds spo tenant site get command. Closes #6654#7003
Draft
MathijsVerbeeck wants to merge 1 commit intopnp:mainfrom
Draft
Adds spo tenant site get command. Closes #6654#7003MathijsVerbeeck wants to merge 1 commit intopnp:mainfrom
spo tenant site get command. Closes #6654#7003MathijsVerbeeck wants to merge 1 commit intopnp:mainfrom
Conversation
spo site alert get command. Closes #6654spo tenant site get command. Closes #6654
6686856 to
4f4bf90
Compare
MartinM85
requested changes
Dec 7, 2025
Contributor
MartinM85
left a comment
There was a problem hiding this comment.
Great work @MathijsVerbeeck
I have a couple of small comments, nothing major.
|
|
||
| const optionsSchema = globalOptionsZod | ||
| .extend({ | ||
| id: zod.alias('i', z.string().refine(id => validation.isValidGuid(id), { message: 'Specify a valid GUID' }).optional()), |
Contributor
There was a problem hiding this comment.
Suggested change
| id: zod.alias('i', z.string().refine(id => validation.isValidGuid(id), { message: 'Specify a valid GUID' }).optional()), | |
| id: zod.alias('i', z.string().uuid().optional()), |
|
|
||
| export default new SpoTenantSiteGetCommand(); | ||
|
|
||
|
|
| }); | ||
|
|
||
| it('fails validation when specifying none of id, title, url', async () => { | ||
| const commandOptionsSchema = commandInfo.command.getSchemaToParse()!; |
Contributor
There was a problem hiding this comment.
Please define the commandOptionsSchema only once in the spec file.
let commandOptionsSchema: z.ZodTypeAny;
...
before(() => {
...
commandOptionsSchema = commandInfo.command.getSchemaToParse()!;
});
MartinM85
reviewed
Dec 7, 2025
|
|
||
| sinon.stub(spo, 'getSiteAdminPropertiesByUrl').resolves(siteResponse); | ||
|
|
||
| await command.action(logger, { options: { title: 'Marketing', verbose: true } }); |
Contributor
There was a problem hiding this comment.
Please parse the command options.
Suggested change
| await command.action(logger, { options: { title: 'Marketing', verbose: true } }); | |
| await command.action(logger, { options: commandOptionsSchema.parse({ title: 'Marketing', verbose: true }) }); |
Same for other tests.
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 #6654