File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,10 +63,22 @@ if (Test-Path $coreCacheDir) {
6363} else {
6464 Write-Host " WARNING: Autorest core cache directory not found at $coreCacheDir "
6565}
66+ $modelerfourCacheDir = Join-Path $autorestHome " @autorest\modelerfour"
67+ if (Test-Path $modelerfourCacheDir ) {
68+ Write-Host " Autorest modelerfour cache versions: $ ( Get-ChildItem $modelerfourCacheDir - Directory | Select-Object - ExpandProperty Name) "
69+ $modelerfourNodeModules = Join-Path $modelerfourCacheDir " 4.24.3\node_modules\@autorest\modelerfour"
70+ Write-Host " Cache modelerfour 4.24.3 node_modules present: $ ( Test-Path $modelerfourNodeModules ) "
71+ } else {
72+ Write-Host " WARNING: Autorest modelerfour cache directory not found at $modelerfourCacheDir "
73+ }
6674Write-Host " npm registry: $ ( npm config get registry 2>&1 ) "
75+ Write-Host " npm_config_registry env: $env: npm_config_registry "
6776Write-Host " NPM_CONFIG_USERCONFIG: $env: NPM_CONFIG_USERCONFIG "
6877$userNpmrc = Join-Path $env: USERPROFILE " .npmrc"
6978Write-Host " ~/.npmrc exists: $ ( Test-Path $userNpmrc ) "
79+ if (Test-Path $userNpmrc ) {
80+ Write-Host " ~/.npmrc registry line: $ ( Select-String - Path $userNpmrc - Pattern ' ^registry=' | Select-Object - First 1 - ExpandProperty Line) "
81+ }
7082Write-Host " --- End diagnostics ---"
7183
7284$RequiredGraphModules = @ ()
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ $ApiVersion | ForEach-Object {
6969 else {
7070 $FullModuleVersion = $ModuleMetadata.versions [$CurrentApiVersion ].version
7171 }
72+ # Route autorest's internal npm registry calls (fetchPackageMetadata for extension
73+ # resolution) through the private feed. The public npm registry is DNS-blocked by
74+ # 1ES supply-chain security enforcement on release pipelines.
75+ $env: npm_config_registry = " https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/PowerShell_V2_Build/npm/registry/"
7276 $autorestLog = [System.IO.Path ]::Combine([System.IO.Path ]::GetTempPath(), " autorest-$ ( $ModuleFullName -replace ' [^a-zA-Z0-9-]' , ' -' ) .log" )
7377 npx autorest -- verbose -- max- memory- size= $MaxMemorySize -- module- version:$FullModuleVersion -- module- name:$ModuleFullName -- service- name:$Module -- input- file:$OpenApiFile $AutoRestModuleConfig -- max- cpu= 2 -- network- calls= 2 2>&1 | Out-File - FilePath $autorestLog - Encoding utf8
7478 $autorestExitCode = $LASTEXITCODE
You can’t perform that action at this time.
0 commit comments