Skip to content

Joel/7 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
submodules: true
fetch-depth: 0

- name: earthly +build
if: github.ref != 'refs/heads/main'
run: earthly --strict +build

- name: earthly +test
if: github.ref != 'refs/heads/main'
run: earthly --strict +test
Expand All @@ -34,18 +38,18 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: ModuleBuilder
path: Modules/ModuleBuilder
name: ErrorView
path: Modules/ErrorView

- uses: actions/upload-artifact@v4
with:
name: TestResults
path: Modules/ModuleBuilder-TestResults
path: Modules/ErrorView-TestResults

- uses: actions/upload-artifact@v4
with:
name: Packages
path: Modules/ModuleBuilder-Packages
path: Modules/ErrorView-Packages

- name: Upload Tests
uses: actions/upload-artifact@v4
Expand All @@ -68,8 +72,8 @@ jobs:
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: ModuleBuilder
path: Modules/ModuleBuilder
name: ErrorView
path: Modules/ErrorView
- name: Download Pester Tests
uses: actions/download-artifact@v4
with:
Expand All @@ -83,15 +87,15 @@ jobs:
- uses: PoshCode/Actions/install-requiredmodules@v1
- uses: PoshCode/Actions/pester@v1
with:
codeCoveragePath: Modules/ModuleBuilder
moduleUnderTest: ModuleBuilder
codeCoveragePath: Modules/ErrorView
moduleUnderTest: ErrorView
additionalModulePaths: ${{github.workspace}}/Modules
- name: Publish Test Results
uses: zyborg/dotnet-tests-report@v1
with:
test_results_path: results.xml
- name: Upload Results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Pester Results
path: ${{github.workspace}}/*.xml
14 changes: 14 additions & 0 deletions ErrorView.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"folders": [
{
"name": "ErrorView",
"path": "."
},
{
"path": "../../Tasks"
}
],
"settings": {
"powershell.cwd": "."
}
}
206 changes: 206 additions & 0 deletions Reference/FileInfo.format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<ViewDefinitions>
<View>
<Name>children</Name>
<ViewSelectedBy>
<TypeName>System.IO.DirectoryInfo</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
</GroupBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Mode</Label>
<Width>7</Width>
<Alignment>Left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>LastWriteTime</Label>
<Width>26</Width>
<Alignment>Right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Length</Label>
<Width>14</Width>
<Alignment>Right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Name</Label>
<Alignment>Left</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap />
<TableColumnItems>
<TableColumnItem>
<PropertyName>ModeWithoutHardLink</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>LastWriteTimeString</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>LengthString</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>NameString</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>childrenWithHardlink</Name>
<ViewSelectedBy>
<TypeName>System.IO.DirectoryInfo</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
</GroupBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Mode</Label>
<Width>7</Width>
<Alignment>Left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>LastWriteTime</Label>
<Width>26</Width>
<Alignment>Right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Length</Label>
<Width>14</Width>
<Alignment>Right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Name</Label>
<Alignment>Left</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap />
<TableColumnItems>
<TableColumnItem>
<PropertyName>Mode</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>LastWriteTimeString</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>LengthString</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>NameString</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>children</Name>
<ViewSelectedBy>
<TypeName>System.IO.DirectoryInfo</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
</GroupBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<PropertyName>CreationTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LastWriteTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LastAccessTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Mode</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LinkType</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Target</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
<ListEntry>
<EntrySelectedBy>
<TypeName>System.IO.FileInfo</TypeName>
</EntrySelectedBy>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<Label>Length</Label>
<PropertyName>LengthString</PropertyName>
</ListItem>
<ListItem>
<PropertyName>CreationTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LastWriteTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LastAccessTime</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Mode</PropertyName>
</ListItem>
<ListItem>
<PropertyName>LinkType</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Target</PropertyName>
</ListItem>
<ListItem>
<PropertyName>VersionInfo</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>children</Name>
<ViewSelectedBy>
<TypeName>System.IO.DirectoryInfo</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
</GroupBy>
<WideControl>
<WideEntries>
<WideEntry>
<WideItem>
<PropertyName>Name</PropertyName>
</WideItem>
</WideEntry>
<WideEntry>
<EntrySelectedBy>
<TypeName>System.IO.DirectoryInfo</TypeName>
</EntrySelectedBy>
<WideItem>
<PropertyName>Name</PropertyName>
</WideItem>
</WideEntry>
</WideEntries>
</WideControl>
</View>
</ViewDefinitions>
</Configuration>
1 change: 1 addition & 0 deletions Reference/LegacyErrorView.format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><Configuration><ViewDefinitions /></Configuration>
56 changes: 56 additions & 0 deletions Reference/NativeCommandError.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$errorColor = ''
$commandPrefix = ''
if (@('NativeCommandErrorMessage','NativeCommandError') -notcontains $_.FullyQualifiedErrorId -and @('CategoryView','ConciseView','DetailedView') -notcontains $ErrorView)
{
$myinv = $_.InvocationInfo
if ($Host.UI.SupportsVirtualTerminal) {
$errorColor = $PSStyle.Formatting.Error
}

$commandPrefix = if ($myinv -and $myinv.MyCommand) {
switch -regex ( $myinv.MyCommand.CommandType )
{
([System.Management.Automation.CommandTypes]::ExternalScript)
{
if ($myinv.MyCommand.Path)
{
$myinv.MyCommand.Path + ' : '
}

break
}

([System.Management.Automation.CommandTypes]::Script)
{
if ($myinv.MyCommand.ScriptBlock)
{
$myinv.MyCommand.ScriptBlock.ToString() + ' : '
}

break
}
default
{
if ($myinv.InvocationName -match '^[&amp;\.]?$')
{
if ($myinv.MyCommand.Name)
{
$myinv.MyCommand.Name + ' : '
}
}
else
{
$myinv.InvocationName + ' : '
}

break
}
}
}
elseif ($myinv -and $myinv.InvocationName)
{
$myinv.InvocationName + ' : '
}
}

$errorColor + $commandPrefix
Loading
Loading