Skip to content

Commit 8d31359

Browse files
authored
Merge pull request #187 from dataplat/issue-47
Removed Fab* aliases & updated docs
2 parents 48071c0 + 963c288 commit 8d31359

235 files changed

Lines changed: 1029 additions & 469 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.build/tasks/generateDocs.ps1

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
param
2+
(
3+
[Parameter()]
4+
[System.IO.DirectoryInfo]
5+
$ProjectPath = (property ProjectPath $BuildRoot),
6+
7+
[Parameter()]
8+
[System.String]
9+
$ProjectName = (property ProjectName ''),
10+
11+
[Parameter()]
12+
[System.String]
13+
$SourcePath = (property SourcePath ''),
14+
15+
[Parameter()]
16+
[System.String]
17+
$HelpSourceFolder = (property HelpSourceFolder 'docs'),
18+
19+
[Parameter()]
20+
[System.String]
21+
$OutputDirectory = (property OutputDirectory 'output'),
22+
23+
[Parameter()]
24+
[System.String]
25+
$BuiltModuleSubdirectory = (property BuiltModuleSubdirectory ''),
26+
27+
[Parameter()]
28+
[System.Management.Automation.SwitchParameter]
29+
$VersionedOutputDirectory = (property VersionedOutputDirectory $true),
30+
31+
[Parameter()]
32+
[System.String]
33+
$HelpOutputFolder = (property HelpOutputFolder 'help'),
34+
35+
[Parameter()]
36+
[cultureInfo]
37+
$HelpCultureInfo = 'en-US',
38+
39+
[Parameter()]
40+
[System.Management.Automation.SwitchParameter]
41+
$CopyHelpMamlToBuiltModuleBase = (property CopyHelpMamlToBuiltModuleBase $true),
42+
43+
# Build Configuration object
44+
[Parameter()]
45+
[System.Collections.Hashtable]
46+
$BuildInfo = (property BuildInfo @{ })
47+
)
48+
49+
function Get-GenerateHelpPSVariables
50+
{
51+
param ()
52+
53+
$script:PesterOutputFolder = Get-SamplerAbsolutePath -Path $PesterOutputFolder -RelativeTo $OutputDirectory
54+
55+
"`tPester Output Folder = '$PesterOutputFolder"
56+
57+
$script:HelpSourceFolder = Get-SamplerAbsolutePath -Path $HelpSourceFolder -RelativeTo $ProjectPath
58+
"`tHelp Source Folder = '$HelpSourceFolder'"
59+
60+
$script:HelpOutputFolder = Get-SamplerAbsolutePath -Path $HelpOutputFolder -RelativeTo $OutputDirectory
61+
"`tHelp output Folder = '$HelpOutputFolder'"
62+
63+
if ($ModuleVersion)
64+
{
65+
$script:HelpOutputVersionFolder = Get-SamplerAbsolutePath -Path $ModuleVersion -RelativeTo $HelpOutputFolder
66+
}
67+
68+
"`tHelp output Version Folder = '$HelpOutputVersionFolder'"
69+
70+
$script:HelpOutputCultureFolder = Get-SamplerAbsolutePath -Path $HelpCultureInfo -RelativeTo $HelpOutputVersionFolder
71+
"`tHelp output Culture path = '$HelpOutputCultureFolder'"
72+
73+
$script:DocOutputFolder = Get-SamplerAbsolutePath -Path 'docs' -RelativeTo $OutputDirectory
74+
"`tDocs output folder path = '$DocOutputFolder'"
75+
}
76+
77+
# Synopsis: Produces markdown help files from the built module.
78+
task generate_docs {
79+
. Set-SamplerTaskVariable
80+
81+
Get-GenerateHelpPSVariables
82+
83+
$env:PSModulePath = $Env:PSModulePath
84+
#$targetModule = Import-Module -Name '$ProjectName' -ErrorAction Stop -PassThru
85+
$targetModule = Import-Module '.\output\module\FabricTools\0.0.1\FabricTools.psd1' -ErrorAction Stop -PassThru
86+
87+
$helpDestination = Join-Path $HelpSourceFolder -ChildPath $HelpCultureInfo
88+
$currentCultureInfo = [System.Globalization.CultureInfo]::CurrentCulture.Name
89+
90+
if (!(Test-Path -Path $helpDestination)) {
91+
New-Item -Path $helpDestination -ItemType Directory -Force -ErrorAction Ignore | Out-Null
92+
}
93+
94+
$docOutputFolder = Join-Path $DocOutputFolder -ChildPath $ProjectName
95+
96+
$commandsArray = @()
97+
foreach ($publicFunction in $targetModule.ExportedFunctions.Keys) {
98+
$command = Get-Command -Name $publicFunction -Module $targetModule
99+
100+
$newMarkdownCommandHelpParams = @{
101+
CommandInfo = $command
102+
OutputFolder = $DocOutputFolder
103+
HelpVersion = $targetModule.Version
104+
Locale = $HelpCultureInfo
105+
Encoding = "utf8"
106+
Force = $true
107+
}
108+
$Output = New-MarkdownCommandHelp @newMarkdownCommandHelpParams
109+
110+
$helpCommand = Import-MarkdownCommandHelp -Path $Output -ErrorAction Ignore
111+
112+
# Add the command to the array
113+
$commandsArray += $helpCommand
114+
115+
$alias = Get-Alias -Definition $command.Name -ErrorAction Ignore
116+
117+
if ($alias) {
118+
$helpCommand.Aliases = @($alias.Name)
119+
} else {
120+
$helpCommand.Aliases = @()
121+
}
122+
123+
$helpCommand | Export-MarkdownCommandHelp -OutputFolder "$DocOutputFolder" -Force
124+
125+
# Due to issue https://github.com/PowerShell/platyPS/issues/763 we need to manually replace the locale in the generated markdown file
126+
$oldString = "Locale: $currentCultureInfo"
127+
$newString = "Locale: $HelpCultureInfo"
128+
(Get-Content -Path "$Output") -replace $oldString, $newString | Set-Content -Path "$Output" -Encoding utf8
129+
130+
Copy-Item -Path $Output -Destination $helpDestination -Force
131+
}
132+
133+
$newMarkdownModuleFileParams = @{
134+
CommandHelp = $commandsArray
135+
OutputFolder = "$DocOutputFolder"
136+
Force = $true
137+
}
138+
$markdownFile = New-MarkdownModuleFile @newMarkdownModuleFileParams
139+
140+
if ($markdownFile) {
141+
Copy-Item -Path $markdownFile -Destination $helpDestination -Force
142+
}
143+
144+
145+
146+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Fixed
1313

1414
- Added `Id` parameter alias to Workspace functions that take `WorkspaceId` to support compatibility with API field names and issue #158.
15+
- Removed all legacy FAB and PowerBI aliases from functions to clean up the module and remove references to old PowerBI-focused codebase (issue #47).
1516

1617
### Deprecated
1718

docs/en-US/Add-FabricDomainWorkspaceAssignmentByCapacity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricDomainWorkspaceAssignmentByCapacity
1010
---

docs/en-US/Add-FabricDomainWorkspaceAssignmentById.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricDomainWorkspaceAssignmentById
1010
---

docs/en-US/Add-FabricDomainWorkspaceAssignmentByPrincipal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricDomainWorkspaceAssignmentByPrincipal
1010
---

docs/en-US/Add-FabricDomainWorkspaceRoleAssignment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricDomainWorkspaceRoleAssignment
1010
---

docs/en-US/Add-FabricWorkspaceCapacityAssignment.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricWorkspaceCapacityAssignment
1010
---
@@ -73,7 +73,8 @@ The unique identifier of the workspace to be assigned.
7373
Type: System.Guid
7474
DefaultValue: ''
7575
SupportsWildcards: false
76-
Aliases: []
76+
Aliases:
77+
- Id
7778
ParameterSets:
7879
- Name: (All)
7980
Position: 0

docs/en-US/Add-FabricWorkspaceIdentity.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricWorkspaceIdentity
1010
---
@@ -49,7 +49,8 @@ The unique identifier of the workspace for which the identity will be provisione
4949
Type: System.Guid
5050
DefaultValue: ''
5151
SupportsWildcards: false
52-
Aliases: []
52+
Aliases:
53+
- Id
5354
ParameterSets:
5455
- Name: (All)
5556
Position: 0

docs/en-US/Add-FabricWorkspaceRoleAssignment.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricWorkspaceRoleAssignment
1010
---
@@ -93,7 +93,8 @@ The unique identifier of the workspace.
9393
Type: System.Guid
9494
DefaultValue: ''
9595
SupportsWildcards: false
96-
Aliases: []
96+
Aliases:
97+
- Id
9798
ParameterSets:
9899
- Name: (All)
99100
Position: 0

docs/en-US/Add-FabricWorkspaceToStage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ external help file: FabricTools-Help.xml
44
HelpUri: ''
55
Locale: en-US
66
Module Name: FabricTools
7-
ms.date: 07/18/2025
7+
ms.date: 03/31/2026
88
PlatyPS schema version: 2024-05-01
99
title: Add-FabricWorkspaceToStage
1010
---

0 commit comments

Comments
 (0)