Skip to content

Commit aae7c41

Browse files
committed
Update ts generation for a consistent sdk layout
1 parent f5f09fd commit aae7c41

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/clean-typescript-ccs-files.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ Push-Location $targetDirectory
1010
$kiotaLockFileName = "kiota-lock.json"
1111
# Extract folder name from package name (the part after the slash)
1212
$folderToClean = $packageName.Split("/")[1]
13-
$folderToCleanPath = Join-Path $targetDirectory -ChildPath $folderToClean
13+
$folderToCleanPath = Join-Path $targetDirectory -ChildPath $folderToClean -AdditionalChildPath "generated"
1414

1515
# Check if the folder to clean exists
1616
if (Test-Path $folderToCleanPath) {
1717
Write-Host "Cleaning contents in: $folderToClean" -ForegroundColor Cyan
1818
Push-Location $folderToCleanPath
1919
# Clean directories
2020
Get-ChildItem -Directory | ForEach-Object { Remove-Item -r $_.FullName }
21-
# Clean TypeScript files except index.ts and *ServiceClient.ts
22-
Remove-Item *.ts -Exclude "index.ts", "*ServiceClient.ts"
21+
# Clean TypeScript files except index.ts
22+
Remove-Item *.ts -Exclude "index.ts"
2323
# Remove kiota lock file
2424
Remove-Item $kiotaLockFileName -ErrorAction SilentlyContinue -Verbose
2525
Pop-Location

scripts/copy-ccs-typescript-sdk-models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ param (
1111

1212
Write-Host "Path to repo models directory: $targetDirectory"
1313
$mainPackageDirectoryName = $packageName.Split("/")[1]
14-
$modelsPackagePath = Join-Path $targetDirectory -ChildPath $mainPackageDirectoryName
14+
$modelsPackagePath = Join-Path $targetDirectory -ChildPath $mainPackageDirectoryName -AdditionalChildPath "generated"
1515
Copy-Item $sourceDirectory -Destination $modelsPackagePath -Recurse -Force

0 commit comments

Comments
 (0)