@clazic/urban 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/setup-poppler.js +8 -4
package/package.json
CHANGED
package/scripts/setup-poppler.js
CHANGED
|
@@ -48,19 +48,23 @@ async function main() {
|
|
|
48
48
|
|
|
49
49
|
const psQ = (s) => String(s).replace(/'/g, "''");
|
|
50
50
|
|
|
51
|
-
// PowerShell: GitHub API
|
|
51
|
+
// PowerShell: GitHub API → WebClient 다운로드 → Expand-Archive
|
|
52
|
+
// Invoke-WebRequest 대신 WebClient 사용 — 이진 파일 다운로드가 빠르고 진행 표시줄 없음
|
|
52
53
|
const ps = `
|
|
53
54
|
$ErrorActionPreference = 'Stop'
|
|
55
|
+
$ProgressPreference = 'SilentlyContinue'
|
|
54
56
|
$api = Invoke-RestMethod -Uri 'https://api.github.com/repos/oschwartz10612/poppler-windows/releases/latest' -Headers @{'User-Agent'='urban-installer'}
|
|
55
57
|
$url = ($api.assets | Where-Object { $_.name -like '*.zip' })[0].browser_download_url
|
|
56
58
|
$zip = Join-Path $env:TEMP 'poppler-windows.zip'
|
|
57
59
|
$dest = '${psQ(POPPLER_DIR)}'
|
|
58
|
-
Write-Host "[urban]
|
|
59
|
-
|
|
60
|
+
Write-Host "[urban] poppler 다운로드 중: $url"
|
|
61
|
+
$wc = New-Object System.Net.WebClient
|
|
62
|
+
$wc.Headers.Add('User-Agent', 'urban-installer')
|
|
63
|
+
$wc.DownloadFile($url, $zip)
|
|
60
64
|
Write-Host "[urban] 압축 해제 중..."
|
|
61
65
|
Expand-Archive -Path $zip -DestinationPath $dest -Force
|
|
62
66
|
Remove-Item $zip -ErrorAction SilentlyContinue
|
|
63
|
-
Write-Host "[urban] 완료: $dest"
|
|
67
|
+
Write-Host "[urban] poppler 설치 완료: $dest"
|
|
64
68
|
`.trim();
|
|
65
69
|
|
|
66
70
|
const encoded = Buffer.from(ps, 'utf16le').toString('base64');
|