Skip to content

Format client side component properties for SPFx commands in SharePoint #5975

@milanholemans

Description

@milanholemans

We currently have a few commands in spo that do stuff with SPFx solutions (spo applicationcustomizer, spo commandset, ...). These are great commands to do stuff with your deployed SPFx solutions.
For example: it's really easy to see which properties are set on the SPFx custom action. One annoying thing here is that the properties are string escaped, so the result looks like this:

{
   "ClientSideComponentProperties": "{\"sampleTextOne\":\"One item is selected in the list.\", \"sampleTextTwo\":\"This command is always visible.\"}",
}

It would improve the readability a lot if you could specify a flag so that only the client-side properties are printed as JSON:

{
  "sampleTextOne": "One item is selected in the list.",
  "sampleTextTwo": "This command is always visible."
}

So, I suggest that we add a new flag to a few SPO SPFx commands:

Option Description
-p, --clientSideComponentProperties Only output the client-side component properties.

Commands to update:

  • spo applicationcustomizer get
  • spo commandset get
  • spo tenant applicationcustomizer get
  • spo tenant commandset get

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions