-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 🎯 Aim The aim is to create a new minor release that adds more manage capabilities to the SPFx solutions view for every app catalog. It also includes a new `/manage` GitHub Copilot Chat command that allows to retrieve data from SharePoint Online. Improvements to the upgrade and validate actions which now allow to generate a code tour with guidance and added support for SPFx Fast Serve as an optional dependency. ## 📷 Result ![spfx-chat2](https://github.com/user-attachments/assets/ff86b85b-82eb-4b8c-87db-7b555a5bce41) ![sign-in-cache](https://github.com/user-attachments/assets/737d0b29-87a0-4821-a425-ae91f66fd9a6) ![spfx-fast-serve](https://github.com/user-attachments/assets/33e9373b-a304-4dbf-9b05-8b83aa4f5536) ![app-catalog-list](https://github.com/user-attachments/assets/46739b9f-da48-4905-8588-9c82a4a8d528) ## ✅ What was done - [x] Added remove confirmation prompt when removing SPFx solution from app catalog - [x] Added /manage GitHub Chat command - [x] Added generating code tour for upgrade and validate SPFx solution actions - [x] Added upgrade SPFx project action - [x] Added SPFx Fast Serve optional dependency to the scaffolding form - [x] Improved sign in experience with caching of Client ID and Tenant ID --------- Co-authored-by: Saurabh Tripathi <[email protected]> Co-authored-by: Nico De Cleyre <[email protected]>
- Loading branch information
1 parent
82393b2
commit beaf740
Showing
36 changed files
with
2,847 additions
and
170 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
param ([string[]]$workspacePath) | ||
|
||
$cliLocalProjectPath = "$workspacePath\cli-microsoft365" | ||
|
||
if (-not (Test-Path -Path $cliLocalProjectPath -PathType Container)) { | ||
return | ||
} | ||
|
||
[hashtable]$commandsData = @{} | ||
|
||
$allSpoCommands = Get-ChildItem -Path "$workspacePath\cli-microsoft365\docs\docs\cmd\spo\*.mdx" -Recurse -Force -Exclude "_global*" | ||
|
||
foreach ($command in $allSpoCommands) { | ||
$commandDocs = ConvertFrom-Markdown -Path $command | ||
$html = New-Object -Com 'HTMLFile' | ||
$html.write([ref]$commandDocs.Html) | ||
|
||
$title = $html.all.tags('h1')[0] | ||
$commandTitle = $title.innerText | ||
|
||
if (-not ($commandTitle -match "\b(list|get)$")) { | ||
continue | ||
} | ||
|
||
$titleIndex = @($html.all).IndexOf($title) | ||
|
||
$usage = $html.all.tags('h2') | Where-Object { $_.tagName -eq 'H2' } | Select-Object -First 1 | ||
$usageIndex = @($html.all).IndexOf($usage) | ||
|
||
$commandDescription = @($html.all)[($titleIndex + 1)..($usageIndex - 1)] | ||
$commandDescription = $commandDescription | ForEach-Object { $_.innerText } | ||
|
||
$subTitles = $html.all.tags('h2') | Where-Object { $_.tagName -eq 'H2' } | Select-Object -First 5 | ||
$optionsStartIndex = @($html.all).IndexOf($subTitles[1]) | ||
$optionsEndIndex = @($html.all).IndexOf($subTitles[2]) | ||
$commandOptions = @($html.all)[($optionsStartIndex + 1)..($optionsEndIndex - 1)] | ||
$commandOptions = $commandOptions | Where-Object { $_.nodeName -eq 'CODE' } | ForEach-Object { $_.innerText } | ||
$commandOptions = $commandOptions | ForEach-Object { $_.Replace("`r`n", '') } | ||
|
||
$examples = $subTitles[2].innerText | ||
$examplesStartIndex = @($html.all).IndexOf($subTitles[2]) | ||
$examplesEndIndex = @($html.all).IndexOf($subTitles[3]) | ||
if (-not ($examples -match "Example")) { | ||
$examples = $subTitles[3].innerText | ||
$examplesStartIndex = @($html.all).IndexOf($subTitles[3]) | ||
$examplesEndIndex = @($html.all).IndexOf($subTitles[4]) | ||
} | ||
$commandExamples = @($html.all)[($examplesStartIndex + 1)..($examplesEndIndex - 1)] | ||
$commandExamples = $commandExamples | Where-Object { $_.nodeName -match 'CODE|P' } | ForEach-Object { $_.innerText } | ||
$commandExamples = $commandExamples | Select-Object -Unique | ||
$commandExamples = $commandExamples -split '\r?\n' | ||
$commandExamplesObjects = @() | ||
for ($i = 0; $i -lt $commandExamples.Length; $i += 2) { | ||
$example = $commandExamples[$i] | ||
$description = $commandExamples[$i + 1] | ||
$commandExamplesObject = @{ | ||
Example = $example | ||
Description = $description | ||
} | ||
$commandExamplesObjects += $commandExamplesObject | ||
} | ||
|
||
$commandsData["m365 $commandTitle"] = @{ | ||
Description = $commandDescription | ||
Options = $commandOptions | ||
Examples = $commandExamplesObjects | ||
} | ||
} | ||
|
||
$dataArray = @() | ||
foreach ($key in $commandsData.Keys) { | ||
$orderedHashtable = [ordered]@{ | ||
Command = $key | ||
Description = $commandsData[$key].Description | ||
Options = $commandsData[$key].Options | ||
Examples = $commandsData[$key].Examples | ||
} | ||
$dataArray += $orderedHashtable | ||
} | ||
|
||
$dataArray | ConvertTo-Json -Depth 3 | Out-File "$workspacePath\vscode-viva\src\chat\CliForMicrosoft365SpoCommands.ts" |
Oops, something went wrong.