Skip to content

Commit 538a724

Browse files
add lumenworks and bogus
1 parent 5f2aaec commit 538a724

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

private/assembly-lists.ps1

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ $script:CoreAssemblies = @(
1111
'Azure.Core',
1212
'Azure.Identity',
1313

14+
# Third-party dependencies
15+
'Bogus',
16+
'LumenWorks.Framework.IO',
17+
1418
# SQL dependencies
1519
'Microsoft.Data.SqlClient',
1620
'Microsoft.SqlServer.Smo',
@@ -43,6 +47,10 @@ $script:AssemblyLoadOrder = @(
4347
'Azure.Core',
4448
'Azure.Identity',
4549

50+
# Third-party dependencies
51+
'Bogus',
52+
'LumenWorks.Framework.IO',
53+
4654
# Core SQL Client and basics next
4755
'Microsoft.Data.SqlClient',
4856
'Microsoft.SqlServer.Management.Sdk.Sfc',
@@ -86,21 +94,37 @@ $script:PlatformAssemblies = @{
8694
'Path' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
8795
'NativePath' = Join-Path $script:libraryroot "lib/core/runtimes/win-x64/native"
8896
'Dependencies' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
97+
'ThirdParty' = @{
98+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/core"
99+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/core"
100+
}
89101
}
90102
'x86' = @{
91103
'Path' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
92104
'NativePath' = Join-Path $script:libraryroot "lib/core/runtimes/win-x86/native"
93105
'Dependencies' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
106+
'ThirdParty' = @{
107+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/core"
108+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/core"
109+
}
94110
}
95111
'arm64' = @{
96112
'Path' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
97113
'NativePath' = Join-Path $script:libraryroot "lib/core/runtimes/win-arm64/native"
98114
'Dependencies' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
115+
'ThirdParty' = @{
116+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/core"
117+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/core"
118+
}
99119
}
100120
'arm' = @{
101121
'Path' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
102122
'NativePath' = Join-Path $script:libraryroot "lib/core/runtimes/win-arm/native"
103123
'Dependencies' = Join-Path $script:libraryroot "lib/core/runtimes/win/lib/net6.0"
124+
'ThirdParty' = @{
125+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/core"
126+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/core"
127+
}
104128
}
105129
'DAC' = Join-Path $script:libraryroot "lib/win-dac"
106130
}
@@ -146,11 +170,19 @@ if ($PSVersionTable.PSEdition -ne 'Core') {
146170
'Path' = Join-Path $script:libraryroot "lib/desktop"
147171
'NativePath' = Join-Path $script:libraryroot "lib/desktop"
148172
'Dependencies' = Join-Path $script:libraryroot "lib/desktop"
173+
'ThirdParty' = @{
174+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/desktop"
175+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/desktop"
176+
}
149177
}
150178
'x86' = @{
151179
'Path' = Join-Path $script:libraryroot "lib/desktop"
152180
'NativePath' = Join-Path $script:libraryroot "lib/desktop"
153181
'Dependencies' = Join-Path $script:libraryroot "lib/desktop"
182+
'ThirdParty' = @{
183+
'Bogus' = Join-Path $script:libraryroot "lib/third-party/bogus/desktop"
184+
'LumenWorks.Framework.IO' = Join-Path $script:libraryroot "lib/third-party/LumenWorks/desktop"
185+
}
154186
}
155187
'DAC' = $dacPath
156188
}

private/assembly-resolution.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function Get-DbatoolsAssemblyPath {
5757
# Check assembly type
5858
$isDac = $script:DacAssemblies -contains $AssemblyName
5959
$isSqlClient = $AssemblyName -eq 'Microsoft.Data.SqlClient'
60+
$isThirdParty = @('Bogus', 'LumenWorks.Framework.IO') -contains $AssemblyName
6061
$isDependency = @(
6162
# System dependencies
6263
'System.Memory',
@@ -134,6 +135,23 @@ function Get-DbatoolsAssemblyPath {
134135
$assemblyPath = Join-Path $basePath "$AssemblyName.dll"
135136
}
136137
}
138+
elseif ($isThirdParty) {
139+
# Third-party assemblies use platform-specific paths
140+
if ($Platform -eq 'Windows') {
141+
$platformInfo = $script:PlatformAssemblies[$Platform][$Architecture]
142+
if (-not $platformInfo) {
143+
throw "Platform configuration not found for Windows $Architecture"
144+
}
145+
if (-not $platformInfo.ThirdParty -or -not $platformInfo.ThirdParty[$AssemblyName]) {
146+
throw "Third-party path not found for $AssemblyName"
147+
}
148+
$basePath = $platformInfo.ThirdParty[$AssemblyName]
149+
$assemblyPath = Join-Path $basePath "$AssemblyName.dll"
150+
}
151+
else {
152+
throw "Third-party assemblies not supported on $Platform"
153+
}
154+
}
137155
else {
138156
# Common assemblies use runtime-specific paths
139157
$basePath = Join-Path $libraryBase "lib/$Runtime"

0 commit comments

Comments
 (0)