diff --git a/.gitignore b/.gitignore index 7d3bccc3b..f73bd5823 100644 --- a/.gitignore +++ b/.gitignore @@ -68,7 +68,6 @@ PowerShellEditorServices.sln.ide/storage.ide # Don't include PlatyPS generated MAML module/PowerShellEditorServices/Commands/en-US/*-help.xml -module/PowerShellEditorServices.VSCode/en-US/*-help.xml # Don't include Third Party Notices in module folder module/PowerShellEditorServices/Third\ Party\ Notices.txt diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index 7a2890306..f18e26ada 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -50,7 +50,7 @@ steps: targetType: inline pwsh: true script: | - $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll") + $assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll") if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) { Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!" exit 1 diff --git a/.vsts-ci/templates/release-general.yml b/.vsts-ci/templates/release-general.yml index ea7f3a908..bc4abdfa5 100644 --- a/.vsts-ci/templates/release-general.yml +++ b/.vsts-ci/templates/release-general.yml @@ -27,10 +27,6 @@ steps: PowerShellEditorServices/Commands/**/*.{ps1,psd1,psm1,ps1xml} # PowerShellEditorServices Binaries PowerShellEditorServices/**/Microsoft.PowerShell.EditorServices*.dll - # PowerShellEditorServices.VSCode Script - PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1 - # PowerShellEditorServices.VSCode Binary - PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll - template: EsrpSign.yml@ComplianceRepo parameters: diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index 6429728bc..b8acc4b24 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -59,7 +59,6 @@ $script:NetFramework = @{ $script:HostCoreOutput = "$PSScriptRoot/src/PowerShellEditorServices.Hosting/bin/$Configuration/$($script:NetFramework.PS72)/publish" $script:HostDeskOutput = "$PSScriptRoot/src/PowerShellEditorServices.Hosting/bin/$Configuration/$($script:NetFramework.PS51)/publish" $script:PsesOutput = "$PSScriptRoot/src/PowerShellEditorServices/bin/$Configuration/$($script:NetFramework.Standard)/publish" -$script:VSCodeOutput = "$PSScriptRoot/src/PowerShellEditorServices.VSCode/bin/$Configuration/$($script:NetFramework.Standard)/publish" if (Get-Command git -ErrorAction SilentlyContinue) { # ignore changes to this file @@ -79,7 +78,6 @@ Task FindDotNet { Task BinClean { Remove-BuildItem $PSScriptRoot\.tmp Remove-BuildItem $PSScriptRoot\module\PowerShellEditorServices\bin - Remove-BuildItem $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin } Task Clean FindDotNet, BinClean, { @@ -170,9 +168,6 @@ Task Build FindDotNet, CreateBuildInfo, { if (-not $script:IsNix) { Invoke-BuildExec { & dotnet publish $script:dotnetBuildArgs .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetFramework.PS51 } } - - # Build PowerShellEditorServices.VSCode module - Invoke-BuildExec { & dotnet publish $script:dotnetBuildArgs .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj -f $script:NetFramework.Standard } } # The concise set of tests (for pull requests) @@ -291,14 +286,13 @@ Task TestE2EPowerShellCLM -If (-not $script:IsNix) Build, SetupHelpForTests, { Task LayoutModule -After Build { $modulesDir = "$PSScriptRoot/module" - $psesVSCodeBinOutputPath = "$modulesDir/PowerShellEditorServices.VSCode/bin" $psesOutputPath = "$modulesDir/PowerShellEditorServices" $psesBinOutputPath = "$PSScriptRoot/module/PowerShellEditorServices/bin" $psesDepsPath = "$psesBinOutputPath/Common" $psesCoreHostPath = "$psesBinOutputPath/Core" $psesDeskHostPath = "$psesBinOutputPath/Desktop" - foreach ($dir in $psesDepsPath, $psesCoreHostPath, $psesDeskHostPath, $psesVSCodeBinOutputPath) { + foreach ($dir in $psesDepsPath, $psesCoreHostPath, $psesDeskHostPath) { New-Item -Force -Path $dir -ItemType Directory | Out-Null } @@ -338,13 +332,6 @@ Task LayoutModule -After Build { } } } - - # Assemble the PowerShellEditorServices.VSCode module - foreach ($vscodeComponent in Get-ChildItem $script:VSCodeOutput) { - if (-not $includedDlls.Contains($vscodeComponent.Name)) { - Copy-Item -Path $vscodeComponent.FullName -Destination $psesVSCodeBinOutputPath -Force - } - } } task RestorePsesModules -After Build { @@ -400,7 +387,6 @@ task RestorePsesModules -After Build { Task BuildCmdletHelp -After LayoutModule { New-ExternalHelp -Path $PSScriptRoot\module\docs -OutputPath $PSScriptRoot\module\PowerShellEditorServices\Commands\en-US -Force | Out-Null - New-ExternalHelp -Path $PSScriptRoot\module\PowerShellEditorServices.VSCode\docs -OutputPath $PSScriptRoot\module\PowerShellEditorServices.VSCode\en-US -Force | Out-Null } # The default task is to run the entire CI build diff --git a/PowerShellEditorServices.sln b/PowerShellEditorServices.sln index 0d63a292a..9a062e3e4 100644 --- a/PowerShellEditorServices.sln +++ b/PowerShellEditorServices.sln @@ -16,8 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{E231 scripts\AddCopyrightHeaders.ps1 = scripts\AddCopyrightHeaders.ps1 EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices.VSCode", "src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj", "{3B38E8DA-8BFF-4264-AF16-47929E6398A3}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices", "src\PowerShellEditorServices\PowerShellEditorServices.csproj", "{29EEDF03-0990-45F4-846E-2616970D1FA2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices.Test.E2E", "test\PowerShellEditorServices.Test.E2E\PowerShellEditorServices.Test.E2E.csproj", "{2561F253-8F72-436A-BCC3-AA63AB82EDC0}" diff --git a/module/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1 b/module/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1 deleted file mode 100644 index 331fee950..000000000 --- a/module/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1 +++ /dev/null @@ -1,126 +0,0 @@ -# -# Module manifest for module 'PowerShellEditorServices.VSCode' -# -# Generated by: daviwil -# -# Generated on: 6/16/2017 -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = "$PSScriptRoot/bin/Microsoft.PowerShell.EditorServices.VSCode.dll" - -# Version number of this module. -ModuleVersion = '0.2.0' - -# Supported PSEditions -# CompatiblePSEditions = @() - -# ID used to uniquely identify this module -GUID = '8794484f-cfc3-40f1-b88f-a934f403e679' - -# Author of this module -Author = 'Microsoft' - -# Company or vendor of this module -CompanyName = 'Microsoft' - -# Copyright statement for this module -Copyright = '(c) 2021 Microsoft Corporation.' - -# Description of the functionality provided by this module -Description = 'Provides added functionality to PowerShell Editor Services for the Visual Studio Code editor.' - -# Minimum version of the Windows PowerShell engine required by this module -# PowerShellVersion = '' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = @() - -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = @('New-VSCodeHtmlContentView', - 'Show-VSCodeHtmlContentView', - 'Close-VSCodeHtmlContentView', - 'Set-VSCodeHtmlContentView', - 'Write-VSCodeHtmlContentView') - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = @() - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - # Tags = @() - - # A URL to the license for this module. - LicenseUri = 'https://github.com/PowerShell/PowerShellEditorServices/blob/main/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/PowerShell/PowerShellEditorServices' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - } # End of PSData hashtable - -} # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} diff --git a/module/PowerShellEditorServices.VSCode/docs/Close-VSCodeHtmlContentView.md b/module/PowerShellEditorServices.VSCode/docs/Close-VSCodeHtmlContentView.md deleted file mode 100644 index 559d4b9d1..000000000 --- a/module/PowerShellEditorServices.VSCode/docs/Close-VSCodeHtmlContentView.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -external help file: Microsoft.PowerShell.EditorServices.VSCode.dll-Help.xml -Module Name: PowerShellEditorServices.VSCode -online version: -schema: 2.0.0 ---- - -# Close-VSCodeHtmlContentView - -## SYNOPSIS - -Closes an HtmlContentView. - -## SYNTAX - -``` -Close-VSCodeHtmlContentView [-HtmlContentView] [] -``` - -## DESCRIPTION - -Closes an HtmlContentView inside of Visual Studio Code if it is displayed. - -## EXAMPLES - -### Example 1 - -```powershell -Close-VSCodeHtmlContentView -HtmlContentView $view -``` - -## PARAMETERS - -### -HtmlContentView - -The HtmlContentView to be closed. - -```yaml -Type: IHtmlContentView -Parameter Sets: (All) -Aliases: View - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/module/PowerShellEditorServices.VSCode/docs/New-VSCodeHtmlContentView.md b/module/PowerShellEditorServices.VSCode/docs/New-VSCodeHtmlContentView.md deleted file mode 100644 index ec837ddce..000000000 --- a/module/PowerShellEditorServices.VSCode/docs/New-VSCodeHtmlContentView.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -external help file: Microsoft.PowerShell.EditorServices.VSCode.dll-Help.xml -Module Name: PowerShellEditorServices.VSCode -online version: -schema: 2.0.0 ---- - -# New-VSCodeHtmlContentView - -## SYNOPSIS - -Creates a custom view in Visual Studio Code which displays HTML content. - -## SYNTAX - -``` -New-VSCodeHtmlContentView [-Title] [[-ShowInColumn] ] [] -``` - -## DESCRIPTION - -Creates a custom view in Visual Studio Code which displays HTML content. - -## EXAMPLES - -### Example 1 - -```powershell -$htmlContentView = New-VSCodeHtmlContentView -Title "My Custom View" -``` - -Create a new view called "My Custom View". - -### Example 2 - -```powershell -$htmlContentView = New-VSCodeHtmlContentView -Title "My Custom View" -ShowInColumn Two -``` - -Create a new view and show it in the second view column. - -## PARAMETERS - -### -ShowInColumn - -If specified, causes the new view to be displayed in the specified column. -If unspecified, the Show-VSCodeHtmlContentView cmdlet will need to be used to display the view. - -```yaml -Type: ViewColumn -Parameter Sets: (All) -Aliases: -Accepted values: One, Two, Three - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Title - -The title of the view. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None - -## OUTPUTS - -### Microsoft.PowerShell.EditorServices.VSCode.CustomViews.IHtmlContentView - -## NOTES - -## RELATED LINKS diff --git a/module/PowerShellEditorServices.VSCode/docs/Set-VSCodeHtmlContentView.md b/module/PowerShellEditorServices.VSCode/docs/Set-VSCodeHtmlContentView.md deleted file mode 100644 index 830ff42ac..000000000 --- a/module/PowerShellEditorServices.VSCode/docs/Set-VSCodeHtmlContentView.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -external help file: Microsoft.PowerShell.EditorServices.VSCode.dll-Help.xml -Module Name: PowerShellEditorServices.VSCode -online version: -schema: 2.0.0 ---- - -# Set-VSCodeHtmlContentView - -## SYNOPSIS - -Sets the content of an HtmlContentView. - -## SYNTAX - -``` -Set-VSCodeHtmlContentView [-HtmlContentView] [-HtmlBodyContent] - [[-JavaScriptPaths] ] [[-StyleSheetPaths] ] [] -``` - -## DESCRIPTION - -Sets the content of an HtmlContentView. If an empty string is passed, it causes the view's content to be cleared. - -## EXAMPLES - -### Example 1 - -```powershell -Set-VSCodeHtmlContentView -HtmlContentView $htmlContentView -HtmlBodyContent "

Hello world!

" -``` - -Set the view content with an h1 header. - -### Example 2 - -```powershell -Set-VSCodeHtmlContentView -View $htmlContentView -Content "" -``` - -Clear the view. - -## PARAMETERS - -### -HtmlBodyContent - -The HTML content that will be placed inside the `` tag of the view. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: Content - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HtmlContentView - -The HtmlContentView where content will be set. - -```yaml -Type: IHtmlContentView -Parameter Sets: (All) -Aliases: View - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JavaScriptPaths - -An array of paths to JavaScript files that will be loaded into the view. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StyleSheetPaths - -An array of paths to stylesheet (CSS) files that will be loaded into the view. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/module/PowerShellEditorServices.VSCode/docs/Show-VSCodeHtmlContentView.md b/module/PowerShellEditorServices.VSCode/docs/Show-VSCodeHtmlContentView.md deleted file mode 100644 index 2659a3ead..000000000 --- a/module/PowerShellEditorServices.VSCode/docs/Show-VSCodeHtmlContentView.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -external help file: Microsoft.PowerShell.EditorServices.VSCode.dll-Help.xml -Module Name: PowerShellEditorServices.VSCode -online version: -schema: 2.0.0 ---- - -# Show-VSCodeHtmlContentView - -## SYNOPSIS - -Shows an HtmlContentView. - -## SYNTAX - -``` -Show-VSCodeHtmlContentView [-HtmlContentView] [[-ViewColumn] ] - [] -``` - -## DESCRIPTION - -Shows an HtmlContentView that has been created and not shown yet or has previously been closed. - -## EXAMPLES - -### Example 1 - -```powershell -Show-VSCodeHtmlContentView -HtmlContentView $htmlContentView -``` - -Shows the view in the first editor column. - -### Example 2 - -```powershell -Show-VSCodeHtmlContentView -View $htmlContentView -Column Three -``` - -Shows the view in the third editor column. - -## PARAMETERS - -### -HtmlContentView - -The HtmlContentView that will be shown. - -```yaml -Type: IHtmlContentView -Parameter Sets: (All) -Aliases: View - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ViewColumn - -If specified, causes the new view to be displayed in the specified column. - -```yaml -Type: ViewColumn -Parameter Sets: (All) -Aliases: Column -Accepted values: One, Two, Three - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### None - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/module/PowerShellEditorServices.VSCode/docs/Write-VSCodeHtmlContentView.md b/module/PowerShellEditorServices.VSCode/docs/Write-VSCodeHtmlContentView.md deleted file mode 100644 index 79c930da4..000000000 --- a/module/PowerShellEditorServices.VSCode/docs/Write-VSCodeHtmlContentView.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -external help file: Microsoft.PowerShell.EditorServices.VSCode.dll-Help.xml -Module Name: PowerShellEditorServices.VSCode -online version: -schema: 2.0.0 ---- - -# Write-VSCodeHtmlContentView - -## SYNOPSIS - -Writes an HTML fragment to an HtmlContentView. - -## SYNTAX - -``` -Write-VSCodeHtmlContentView [-HtmlContentView] [-AppendedHtmlBodyContent] - [] -``` - -## DESCRIPTION - -Writes an HTML fragment to an HtmlContentView. This new fragment is appended to the existing content, useful in cases where the output will be appended to an ongoing output stream. - -## EXAMPLES - -### Example 1 - -```powershell -Write-VSCodeHtmlContentView -HtmlContentView $htmlContentView -AppendedHtmlBodyContent "

Appended content

" -``` - -### Example 2 - -```powershell -Write-VSCodeHtmlContentView -View $htmlContentView -Content "

Appended content

" -``` - -## PARAMETERS - -### -AppendedHtmlBodyContent - -The HTML content that will be appended to the view's `` element content. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: Content - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -HtmlContentView - -The HtmlContentView where content will be appended. - -```yaml -Type: IHtmlContentView -Parameter Sets: (All) -Aliases: View - -Required: True -Position: 0 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/src/PowerShellEditorServices.VSCode/Cmdlets/VSCodeHtmlContentViewCommands.cs b/src/PowerShellEditorServices.VSCode/Cmdlets/VSCodeHtmlContentViewCommands.cs deleted file mode 100644 index 4e68c4ff7..000000000 --- a/src/PowerShellEditorServices.VSCode/Cmdlets/VSCodeHtmlContentViewCommands.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Management.Automation; -using Microsoft.PowerShell.EditorServices.Extensions; -using Microsoft.PowerShell.EditorServices.VSCode.CustomViews; - -namespace Microsoft.PowerShell.EditorServices.VSCode -{ - /// - [Cmdlet(VerbsCommon.New, "VSCodeHtmlContentView")] - [OutputType(typeof(IHtmlContentView))] - public class NewVSCodeHtmlContentViewCommand : PSCmdlet - { - private HtmlContentViewsFeature _htmlContentViewsFeature; - - private ViewColumn? _showInColumn; - - /// - [Parameter(Mandatory = true, Position = 0)] - [ValidateNotNullOrEmpty] - public string Title { get; set; } - - /// - [Parameter(Position = 1)] - public ViewColumn ShowInColumn - { - get => _showInColumn.GetValueOrDefault(); - set => _showInColumn = value; - } - - /// - protected override void BeginProcessing() - { - if (_htmlContentViewsFeature == null) - { - if (GetVariableValue("psEditor") is EditorObject psEditor) - { - _htmlContentViewsFeature = new HtmlContentViewsFeature( - psEditor.GetExtensionServiceProvider().LanguageServer); - } - else - { - ThrowTerminatingError( - new ErrorRecord( - new ItemNotFoundException("Cannot find the '$psEditor' variable."), - "PSEditorNotFound", - ErrorCategory.ObjectNotFound, - targetObject: null)); - return; - } - } - - IHtmlContentView view = _htmlContentViewsFeature.CreateHtmlContentViewAsync(Title) - .GetAwaiter() - .GetResult(); - - if (_showInColumn != null) - { - try - { - view.Show(_showInColumn.Value).GetAwaiter().GetResult(); - } - catch (Exception e) - { - WriteError( - new ErrorRecord( - e, - "HtmlContentViewCouldNotShow", - ErrorCategory.OpenError, - targetObject: null)); - - return; - } - } - - WriteObject(view); - } - } - - /// - [Cmdlet(VerbsCommon.Set, "VSCodeHtmlContentView")] - public class SetVSCodeHtmlContentViewCommand : PSCmdlet - { - /// - [Parameter(Mandatory = true, Position = 0)] - [Alias("View")] - [ValidateNotNull] - public IHtmlContentView HtmlContentView { get; set; } - - /// - [Parameter(Mandatory = true, Position = 1)] - [Alias("Content")] - [AllowEmptyString] - public string HtmlBodyContent { get; set; } - - /// - [Parameter(Position = 2)] - public string[] JavaScriptPaths { get; set; } - - /// - [Parameter(Position = 3)] - public string[] StyleSheetPaths { get; set; } - - /// - protected override void BeginProcessing() - { - HtmlContent htmlContent = new() - { - BodyContent = HtmlBodyContent, - JavaScriptPaths = JavaScriptPaths, - StyleSheetPaths = StyleSheetPaths - }; - try - { - HtmlContentView.SetContentAsync(htmlContent).GetAwaiter().GetResult(); - } - catch (Exception e) - { - WriteError( - new ErrorRecord( - e, - "HtmlContentViewCouldNotSet", - ErrorCategory.WriteError, - targetObject: null)); - } - } - } - - /// - [Cmdlet(VerbsCommon.Close, "VSCodeHtmlContentView")] - public class CloseVSCodeHtmlContentViewCommand : PSCmdlet - { - /// - [Parameter(Mandatory = true, Position = 0)] - [Alias("View")] - [ValidateNotNull] - public IHtmlContentView HtmlContentView { get; set; } - - /// - protected override void BeginProcessing() - { - try - { - HtmlContentView.Close().GetAwaiter().GetResult(); - } - catch (Exception e) - { - WriteError( - new ErrorRecord( - e, - "HtmlContentViewCouldNotClose", - ErrorCategory.CloseError, - targetObject: null)); - } - } - } - - /// - [Cmdlet(VerbsCommon.Show, "VSCodeHtmlContentView")] - public class ShowVSCodeHtmlContentViewCommand : PSCmdlet - { - /// - [Parameter(Mandatory = true, Position = 0)] - [Alias("View")] - [ValidateNotNull] - public IHtmlContentView HtmlContentView { get; set; } - - /// - [Parameter(Position = 1)] - [Alias("Column")] - [ValidateNotNull] - public ViewColumn ViewColumn { get; set; } = ViewColumn.One; - - /// - protected override void BeginProcessing() - { - try - { - HtmlContentView.Show(ViewColumn).GetAwaiter().GetResult(); - } - catch (Exception e) - { - WriteError( - new ErrorRecord( - e, - "HtmlContentViewCouldNotShow", - ErrorCategory.OpenError, - targetObject: null)); - } - } - } - - /// - [Cmdlet(VerbsCommunications.Write, "VSCodeHtmlContentView")] - public class WriteVSCodeHtmlContentViewCommand : PSCmdlet - { - /// - [Parameter(Mandatory = true, Position = 0)] - [Alias("View")] - [ValidateNotNull] - public IHtmlContentView HtmlContentView { get; set; } - - /// - [Parameter(Mandatory = true, ValueFromPipeline = true, Position = 1)] - [Alias("Content")] - [ValidateNotNull] - public string AppendedHtmlBodyContent { get; set; } - - /// - protected override void ProcessRecord() - { - try - { - HtmlContentView.AppendContentAsync(AppendedHtmlBodyContent).GetAwaiter().GetResult(); - } - catch (Exception e) - { - WriteError( - new ErrorRecord( - e, - "HtmlContentViewCouldNotWrite", - ErrorCategory.WriteError, - targetObject: null)); - } - } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewBase.cs b/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewBase.cs deleted file mode 100644 index f4bbb6372..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewBase.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Extensions.Services; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - internal abstract class CustomViewBase : ICustomView - { - protected ILanguageServerService languageServer; - - public Guid Id { get; private set; } - - public string Title { get; } - - protected CustomViewType ViewType { get; } - - public CustomViewBase( - string viewTitle, - CustomViewType viewType, - ILanguageServerService languageServer) - { - Id = Guid.NewGuid(); - Title = viewTitle; - ViewType = viewType; - this.languageServer = languageServer; - } - - internal Task CreateAsync() => - languageServer.SendRequestAsync( - NewCustomViewRequest.Method, - new NewCustomViewRequest - { - Id = Id, - Title = Title, - ViewType = ViewType, - }); - - public Task Show(ViewColumn viewColumn) => - languageServer.SendRequestAsync( - ShowCustomViewRequest.Method, - new ShowCustomViewRequest - { - Id = Id, - ViewColumn = viewColumn - }); - - public Task Close() => - languageServer.SendRequestAsync( - CloseCustomViewRequest.Method, - new CloseCustomViewRequest - { - Id = Id, - }); - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewFeature.cs b/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewFeature.cs deleted file mode 100644 index 3c7b07a3f..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewFeature.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.PowerShell.EditorServices.Extensions.Services; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - internal abstract class CustomViewFeatureBase - where TView : ICustomView - { - protected ILanguageServerService languageServer; - - private readonly Dictionary viewIndex; - - public CustomViewFeatureBase( - ILanguageServerService languageServer) - { - viewIndex = new Dictionary(); - this.languageServer = languageServer; - } - - protected void AddView(TView view) => viewIndex.Add(view.Id, view); - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewMessages.cs b/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewMessages.cs deleted file mode 100644 index 254959b0d..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewMessages.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines a message for creating a custom view in the editor. - /// - public class NewCustomViewRequest - { - /// - /// The Language Server Protocol 'method'. - /// - public static string Method => "powerShell/newCustomView"; - - /// - /// Gets or sets the Id of the view. - /// - public Guid Id { get; set; } - - /// - /// Gets or sets the title of the view. - /// - public string Title { get; set; } - - /// - /// Gets or sets the view's type. - /// - public CustomViewType ViewType { get; set; } - } - - /// - /// Defines a message for showing a custom view in the editor. - /// - public class ShowCustomViewRequest - { - /// - /// The Language Server Protocol 'method'. - /// - public static string Method => "powerShell/showCustomView"; - - /// - /// Gets or sets the Id of the view. - /// - public Guid Id { get; set; } - - /// - /// Gets or sets the column in which the view should be shown. - /// - public ViewColumn ViewColumn { get; set; } - } - - /// - /// Defines a message for closing a custom view in the editor. - /// - public class CloseCustomViewRequest - { - /// - /// The Language Server Protocol 'method'. - /// - public static string Method => "powerShell/closeCustomView"; - - /// - /// Gets or sets the Id of the view. - /// - public Guid Id { get; set; } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewType.cs b/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewType.cs deleted file mode 100644 index a1568baa5..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/CustomViewType.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Enumerates the available custom view types. - /// - public enum CustomViewType - { - /// - /// An IHtmlContentView. - /// - HtmlContent = 1 - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContent.cs b/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContent.cs deleted file mode 100644 index f45a108d3..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContent.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Contains details about the HTML content to be - /// displayed in an IHtmlContentView. - /// - public class HtmlContent - { - /// - /// Gets or sets the HTML body content. - /// - public string BodyContent { get; set; } - - /// - /// Gets or sets the array of JavaScript file paths - /// to be used in the HTML content. - /// - public string[] JavaScriptPaths { get; set; } - - /// - /// Gets or sets the array of stylesheet (CSS) file - /// paths to be used in the HTML content. - /// - public string[] StyleSheetPaths { get; set; } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentView.cs b/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentView.cs deleted file mode 100644 index 5e5401148..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentView.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Extensions.Services; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - internal class HtmlContentView : CustomViewBase, IHtmlContentView - { - public HtmlContentView( - string viewTitle, - ILanguageServerService languageServer) - : base( - viewTitle, - CustomViewType.HtmlContent, - languageServer) - { - } - - public Task SetContentAsync(string htmlBodyContent) => - languageServer.SendRequestAsync( - SetHtmlContentViewRequest.Method, - new SetHtmlContentViewRequest - { - Id = Id, - HtmlContent = new HtmlContent { BodyContent = htmlBodyContent } - } - ); - - public Task SetContentAsync(HtmlContent htmlContent) => - languageServer.SendRequestAsync( - SetHtmlContentViewRequest.Method, - new SetHtmlContentViewRequest - { - Id = Id, - HtmlContent = new HtmlContent() - { - BodyContent = htmlContent.BodyContent, - JavaScriptPaths = HtmlContentView.GetUriPaths(htmlContent.JavaScriptPaths), - StyleSheetPaths = HtmlContentView.GetUriPaths(htmlContent.StyleSheetPaths) - } - } - ); - - public Task AppendContentAsync(string appendedHtmlBodyContent) => - languageServer.SendRequestAsync( - AppendHtmlContentViewRequest.Method, - new AppendHtmlContentViewRequest - { - Id = Id, - AppendedHtmlBodyContent = appendedHtmlBodyContent - } - ); - - private static string[] GetUriPaths(string[] filePaths) - { - return - filePaths? - .Select(p => - { - return - new Uri( - Path.GetFullPath(p), - UriKind.Absolute).ToString(); - }) - .ToArray(); - } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewMessages.cs b/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewMessages.cs deleted file mode 100644 index 8b154e159..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewMessages.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines a message for setting the content of a HtmlContentView. - /// - public class SetHtmlContentViewRequest - { - /// - /// The Language Server Protocol 'method'. - /// - public static string Method => "powerShell/setHtmlViewContent"; - - /// - /// Gets or sets the Id of the view. - /// - public Guid Id { get; set; } - - /// - /// Gets or sets the HTML body content to set in the view. - /// - public HtmlContent HtmlContent { get; set; } - } - - /// - /// Defines a message for appending to the content of an IHtmlContentView. - /// - public class AppendHtmlContentViewRequest - { - /// - /// The Language Server Protocol 'method'. - /// - public static string Method => "powerShell/appendHtmlViewContent"; - - /// - /// Gets or sets the Id of the view. - /// - public Guid Id { get; set; } - - /// - /// Gets or sets the HTML body content to append to the view. - /// - public string AppendedHtmlBodyContent { get; set; } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewsFeature.cs b/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewsFeature.cs deleted file mode 100644 index b20a31025..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/HtmlContentViewsFeature.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Extensions.Services; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - internal class HtmlContentViewsFeature : CustomViewFeatureBase, IHtmlContentViews - { - public HtmlContentViewsFeature( - ILanguageServerService languageServer) - : base(languageServer) - { - } - - public async Task CreateHtmlContentViewAsync(string viewTitle) - { - HtmlContentView htmlView = - new( - viewTitle, - languageServer); - - await htmlView.CreateAsync().ConfigureAwait(false); - AddView(htmlView); - - return htmlView; - } - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/ICustomView.cs b/src/PowerShellEditorServices.VSCode/CustomViews/ICustomView.cs deleted file mode 100644 index f9be19168..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/ICustomView.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines the interface for an arbitrary custom view that - /// can be shown in Visual Studio Code. - /// - public interface ICustomView - { - /// - /// Gets the unique ID of the view. - /// - Guid Id { get; } - - /// - /// Gets the display title of the view. - /// - string Title { get; } - - /// - /// Shows the view in the specified column. - /// - /// The column in which the view will be shown. - /// A Task which can be awaited for completion. - Task Show(ViewColumn viewColumn); - - /// - /// Closes the view in the editor. - /// - /// A Task which can be awaited for completion. - Task Close(); - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentView.cs b/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentView.cs deleted file mode 100644 index c9c9a70bc..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentView.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Threading.Tasks; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines the interface for a custom view which displays - /// rendered HTML content in an editor tab. - /// - public interface IHtmlContentView : ICustomView - { - /// - /// Sets the HTML body content of the view. - /// - /// - /// The HTML content that is placed inside of the page's body tag. - /// - /// A Task which can be awaited for completion. - Task SetContentAsync(string htmlBodyContent); - - /// - /// Sets the HTML content of the view. - /// - /// - /// The HTML content that is placed inside of the page's body tag. - /// - /// A Task which can be awaited for completion. - Task SetContentAsync(HtmlContent htmlContent); - - /// - /// Appends HTML body content to the view. - /// - /// - /// The HTML fragment to be appended to the output stream. - /// - /// A Task which can be awaited for completion. - Task AppendContentAsync(string appendedHtmlBodyContent); - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentViews.cs b/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentViews.cs deleted file mode 100644 index a0be1b79e..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/IHtmlContentViews.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System.Threading.Tasks; - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines an interface for a component which can create - /// new IHtmlContentView implementation instances. - /// - public interface IHtmlContentViews - { - /// - /// Creates an instance of an IHtmlContentView implementation. - /// - /// The title of the view to create. - /// - /// A Task to await for completion, returns the IHtmlContentView instance. - /// - Task CreateHtmlContentViewAsync(string viewTitle); - } -} diff --git a/src/PowerShellEditorServices.VSCode/CustomViews/ViewColumn.cs b/src/PowerShellEditorServices.VSCode/CustomViews/ViewColumn.cs deleted file mode 100644 index 66fce06b6..000000000 --- a/src/PowerShellEditorServices.VSCode/CustomViews/ViewColumn.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -namespace Microsoft.PowerShell.EditorServices.VSCode.CustomViews -{ - /// - /// Defines the possible columns in which a custom view - /// can be displayed. - /// - public enum ViewColumn - { - /// - /// The first view column. - /// - One = 1, - - /// - /// The second view column. - /// - Two, - - /// - /// The third view column. - /// - Three - } -} diff --git a/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj b/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj deleted file mode 100644 index bea365c3b..000000000 --- a/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - PowerShell Editor Services, Visual Studio Code Extensions - Provides added functionality to PowerShell Editor Services for the Visual Studio Code editor. - netstandard2.0 - Microsoft.PowerShell.EditorServices.VSCode - Debug;Release - - - - - 1591,1573,1572 - bin\$(TargetFramework)\$(Configuration)\Microsoft.PowerShell.EditorServices.VSCode.xml - - - - - - All - - - - diff --git a/src/PowerShellEditorServices.VSCode/packages.lock.json b/src/PowerShellEditorServices.VSCode/packages.lock.json deleted file mode 100644 index 4518b68f9..000000000 --- a/src/PowerShellEditorServices.VSCode/packages.lock.json +++ /dev/null @@ -1,452 +0,0 @@ -{ - "version": 1, - "dependencies": { - ".NETStandard,Version=v2.0": { - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "PowerShellStandard.Library": { - "type": "Direct", - "requested": "[5.1.1, )", - "resolved": "5.1.1", - "contentHash": "e31xJjG+Kjbv6YF3Yq6D4Dl3or8v7LrNF41k3CXrWozW6hR1zcOe5KYuZJaGSiAgLnwP8wcW+I3+IWEzMPZKXQ==" - }, - "MediatR": { - "type": "Transitive", - "resolved": "8.1.0", - "contentHash": "KJFnA0MV83bNOhvYbjIX1iDykhwFXoQu0KV7E1SVbNA/CmO2I7SAm2Baly0eS7VJ2GwlmStLajBfeiNgTpvYzQ==" - }, - "Microsoft.Bcl.AsyncInterfaces": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw==", - "dependencies": { - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.CSharp": { - "type": "Transitive", - "resolved": "4.7.0", - "contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==" - }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "6.0.1", - "contentHash": "BUyFU9t+HzlSE7ri4B+AQN2BgTgHv/uM82s5ZkgU1BApyzWzIl48nDsG5wR1t0pniNuuyTBzG3qCW8152/NtSw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Configuration.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "qWzV9o+ZRWq+pGm+1dF+R7qTgTYoXvbyowRoBxQJGfqTpqDun2eteerjRQhq5PQ/14S+lqto3Ft4gYaRyl4rdQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "b3ErKzND8LIC7o08QAVlKfaEIYEvLJbtmVbFZVBRXeu9YkKfSSzLZfR1SUfQPBIy9mKLhEtJgGYImkcMNaKE0A==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "6.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.Extensions.FileSystemGlobbing": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "OK+670i7esqlQrPjdIKRbsyMCe9g5kSLpRRQGSr4Q58AOYEe/hCnfLZprh7viNisSUUQZmMrbbuDaIrP+V1ebQ==" - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "8.0.0", - "Microsoft.Extensions.DependencyInjection": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "System.Diagnostics.DiagnosticSource": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "System.Buffers": "4.5.1", - "System.Memory": "4.5.5" - } - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0", - "System.ComponentModel.Annotations": "5.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "bXWINbTn0vC0FYc9GaQTISbxhQLAMrvtbuvD9N6JelEaIS/Pr62wUCinrq5bf1WRBGczt1v4wDhxFtVFNcMdUQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "6.0.0", - "Microsoft.Extensions.Configuration.Binder": "6.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Options": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.VisualStudio.Threading": { - "type": "Transitive", - "resolved": "17.6.40", - "contentHash": "hLa/0xargG7p3bF7aeq2/lRYn/bVnfZXurUWVHx+MNqxxAUjIDMKi4OIOWbYQ/DTkbn9gv8TLvgso+6EtHVQQg==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "7.0.0", - "Microsoft.VisualStudio.Threading.Analyzers": "17.6.40", - "Microsoft.VisualStudio.Validation": "17.0.71", - "Microsoft.Win32.Registry": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.VisualStudio.Threading.Analyzers": { - "type": "Transitive", - "resolved": "17.6.40", - "contentHash": "uU8vYr/Nx3ldEWcsbiHiyAX1G7od3eFK1+Aga6ZvgCvU+nQkcXYVkIMcSEkIDWkFaldx1dkoVvX3KRNQD0R7dw==" - }, - "Microsoft.VisualStudio.Validation": { - "type": "Transitive", - "resolved": "17.6.11", - "contentHash": "J+9L/iac6c8cwcgVSCMuoIYOlD1Jw4mbZ8XMe1IZVj8p8+3dJ46LnnkIkTRMjK7xs9UtU9MoUp1JGhWoN6fAEw==" - }, - "Microsoft.Win32.Registry": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==", - "dependencies": { - "System.Buffers": "4.5.1", - "System.Memory": "4.5.4", - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "Nerdbank.Streams": { - "type": "Transitive", - "resolved": "2.10.69", - "contentHash": "YIudzeVyQRJAqytjpo1jdHkh2t+vqQqyusBqb2sFSOAOGEnyOXhcHx/rQqSuCIXUDr50a3XuZnamGRfQVBOf4g==", - "dependencies": { - "Microsoft.Bcl.AsyncInterfaces": "7.0.0", - "Microsoft.VisualStudio.Threading": "17.6.40", - "Microsoft.VisualStudio.Validation": "17.6.11", - "System.IO.Pipelines": "7.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.3", - "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" - }, - "OmniSharp.Extensions.DebugAdapter": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "Jy9RlVei7ay3LavvPH4F8BnIIMAo5th5EI8JnVe1RQlOxvu18H8hOyZ8fLFHtzbObs+oTONsJ9aynqeyMOErgA==", - "dependencies": { - "Microsoft.Extensions.Configuration": "6.0.1", - "OmniSharp.Extensions.JsonRpc": "0.19.9", - "OmniSharp.Extensions.JsonRpc.Generators": "0.19.9" - } - }, - "OmniSharp.Extensions.DebugAdapter.Server": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "XRJ6EW44DaODkzjAuN1XbpnPFkciJIM2sIx4KpsvV/2Rle1CdRJY4gA6vJn+2uNh5hRr1d0SqZSieqV9Ly0utw==", - "dependencies": { - "OmniSharp.Extensions.DebugAdapter.Shared": "0.19.9" - } - }, - "OmniSharp.Extensions.DebugAdapter.Shared": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "A4psuqk+slrs585cCkZkwUO08nW0I6SVH4u7B7d8wU9lH0LLRTvQBlo3QlxrVAMxjwljPFzXaaRHv7D7X1BXbw==", - "dependencies": { - "OmniSharp.Extensions.DebugAdapter": "0.19.9", - "OmniSharp.Extensions.JsonRpc": "0.19.9" - } - }, - "OmniSharp.Extensions.JsonRpc": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "utFvrx9OYXhCS5rnfWAVeedJCrucuDLAOrKXjohf/NOjG9FFVbcp+hLqj9Ng+AxoADRD+rSJYHfBOeqGl5zW0A==", - "dependencies": { - "MediatR": "8.1.0", - "Microsoft.Extensions.DependencyInjection": "6.0.1", - "Microsoft.Extensions.Logging": "6.0.0", - "Nerdbank.Streams": "2.10.69", - "Newtonsoft.Json": "13.0.3", - "OmniSharp.Extensions.JsonRpc.Generators": "0.19.9", - "System.Collections.Immutable": "5.0.0", - "System.Reactive": "6.0.0", - "System.Threading.Channels": "6.0.0" - } - }, - "OmniSharp.Extensions.JsonRpc.Generators": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "hiWC0yGcKM+K00fgiL7KBmlvULmkKNhm40ZSzxqT+jNV21r+YZgKzEREhQe40ufb4tjcIxdYkif++IzGl/3H/Q==" - }, - "OmniSharp.Extensions.LanguageProtocol": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "d0crY6w5SyunGlERP27YeUeJnJfUjvJoALFlPMU4CHu3jovG1Y8RxLpihCPX8fKdjzgy7Ii+VjFYtIpDEEQqYQ==", - "dependencies": { - "Microsoft.Extensions.Configuration": "6.0.1", - "Microsoft.Extensions.Configuration.Binder": "6.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0", - "OmniSharp.Extensions.JsonRpc": "0.19.9", - "OmniSharp.Extensions.JsonRpc.Generators": "0.19.9" - } - }, - "OmniSharp.Extensions.LanguageServer": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "g09wOOCQ/oFqtZ47Q5R9E78tz2a5ODEB+V+S65wAiiRskR7xwL78Tse4/8ToBc8G/ZgQgqLtAOPo/BSPmHNlbw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "6.0.1", - "OmniSharp.Extensions.JsonRpc": "0.19.9", - "OmniSharp.Extensions.LanguageProtocol": "0.19.9", - "OmniSharp.Extensions.LanguageServer.Shared": "0.19.9" - } - }, - "OmniSharp.Extensions.LanguageServer.Shared": { - "type": "Transitive", - "resolved": "0.19.9", - "contentHash": "+p+py79MrNG3QnqRrBp5J7Wc810HFFczMH8/WLIiUqih1bqmKPFY9l/uzBvq1Ko8+YO/8tzI7BDffHvaguISEw==", - "dependencies": { - "OmniSharp.Extensions.LanguageProtocol": "0.19.9" - } - }, - "Serilog": { - "type": "Transitive", - "resolved": "3.1.1", - "contentHash": "P6G4/4Kt9bT635bhuwdXlJ2SCqqn2nhh4gqFqQueCOr9bK/e7W9ll/IoX1Ter948cV2Z/5+5v8pAfJYUISY03A==", - "dependencies": { - "System.Diagnostics.DiagnosticSource": "7.0.2" - } - }, - "Serilog.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "YEAMWu1UnWgf1c1KP85l1SgXGfiVo0Rz6x08pCiPOIBt2Qe18tcZLvdBUuV5o1QHvrs8FAry9wTIhgBRtjIlEg==", - "dependencies": { - "Microsoft.Extensions.Logging": "8.0.0", - "Serilog": "3.1.1" - } - }, - "Serilog.Sinks.Async": { - "type": "Transitive", - "resolved": "1.5.0", - "contentHash": "csHYIqAwI4Gy9oAhXYRwxGrQEAtBg3Ep7WaCzsnA1cZuBZjVAU0n7hWaJhItjO7hbLHh/9gRVxALCUB4Dv+gZw==", - "dependencies": { - "Serilog": "2.9.0" - } - }, - "Serilog.Sinks.File": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==", - "dependencies": { - "Serilog": "2.10.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.5.1", - "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==", - "dependencies": { - "System.Memory": "4.5.4" - } - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "jRn6JYnNPW6xgQazROBLSfpdoczRw694vO5kKvMcNnpXuolEixUyw6IBuBs2Y2mlSX/LdLvyyWmfXhaI3ND1Yg==", - "dependencies": { - "System.Buffers": "4.5.1", - "System.Memory": "4.5.5", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "System.IO.Pipes.AccessControl": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "P0FIsXSFNL1AXlHO9zpJ9atRUzVyoPZCkcbkYGZfXXMx9xlGA2H3HOGBwIhpKhB+h0eL3hry/z0UcfJZ+yb2kQ==", - "dependencies": { - "System.Security.AccessControl": "5.0.0", - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Memory": { - "type": "Transitive", - "resolved": "4.5.5", - "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", - "dependencies": { - "System.Buffers": "4.5.1", - "System.Numerics.Vectors": "4.4.0", - "System.Runtime.CompilerServices.Unsafe": "4.5.3" - } - }, - "System.Numerics.Vectors": { - "type": "Transitive", - "resolved": "4.4.0", - "contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==" - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "31kfaW4ZupZzPsI5PVe77VhnvFF55qgma7KZr/E0iFTs6fmdhhG8j0mgEx620iLTey1EynOkEfnyTjtNEpJzGw==", - "dependencies": { - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Security.AccessControl": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==", - "dependencies": { - "System.Security.Principal.Windows": "5.0.0" - } - }, - "System.Security.Principal": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I1tkfQlAoMM2URscUtpcRo/hX0jinXx6a/KUtEQoz3owaYwl3qwsO8cbzYVVnjxrzxjHo3nJC+62uolgeGIS9A==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Security.Principal.Windows": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==", - "dependencies": { - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "4.5.3" - } - }, - "Microsoft.PowerShell.EditorServices": { - "type": "Project", - "dependencies": { - "Microsoft.CSharp": "[4.7.0, )", - "Microsoft.Extensions.FileSystemGlobbing": "[8.0.0, )", - "Microsoft.Extensions.Logging": "[8.0.0, )", - "OmniSharp.Extensions.DebugAdapter.Server": "[0.19.9, )", - "OmniSharp.Extensions.LanguageServer": "[0.19.9, )", - "PowerShellStandard.Library": "[5.1.1, )", - "Serilog": "[3.1.1, )", - "Serilog.Extensions.Logging": "[8.0.0, )", - "Serilog.Sinks.Async": "[1.5.0, )", - "Serilog.Sinks.File": "[5.0.0, )", - "System.IO.Pipes.AccessControl": "[5.0.0, )", - "System.Security.Principal": "[4.3.0, )", - "System.Security.Principal.Windows": "[5.0.0, )" - } - } - } - } -} \ No newline at end of file diff --git a/test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs b/test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs index 9c9954c88..0aa651205 100644 --- a/test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs +++ b/test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs @@ -34,7 +34,6 @@ public class PsesStdioProcess : StdioServerProcess private const string s_hostName = "TestHost"; private const string s_hostProfileId = "TestHost"; private const string s_hostVersion = "1.0.0"; - private static readonly string[] s_additionalModules = { "PowerShellEditorServices.VSCode" }; #endregion @@ -93,8 +92,6 @@ private static string[] GeneratePsesArguments(bool isDebugAdapter) s_hostProfileId, "-HostVersion", s_hostVersion, - "-AdditionalModules", - string.Join(',', s_additionalModules), "-BundledModulesPath", SingleQuoteEscape(s_bundledModulePath), "-Stdio"