include auth header in API call
All checks were successful
Distribution check / Generated files check (push) Successful in -2m1s
NPM Audit Check / Check NPM audit (push) Successful in -2m10s
Unit tests / Unit tests (latest) (push) Successful in -2m1s
Unit tests / Unit tests (lts/*) (push) Successful in -2m0s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -2m1s

This commit is contained in:
2025-11-07 00:28:53 -05:00
parent 6d8f1d007d
commit 65097b3b1f
3 changed files with 4 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ export async function main() {
if (mode === 'move') {
for (const pkg of parsedData.move) {
const filename = getFilename(pkg);
const files = await ky.get(`${context.serverUrl}/api/v1/packages/${context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`).json<PackageFile[]>();
const files = await ky.get(`${context.serverUrl}/api/v1/packages/${context.repo.owner}/arch/${pkg.package}/${pkg.version}/files`, { headers }).json<PackageFile[]>();
const match = files.filter(f => f.name === filename);
if (match.length !== 1) {
throw new Error(`Expected one matching package, found ${match.length}`);