Skip to content

Commit

Permalink
Update PackageVersionFileController.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
i18nsite authored Oct 17, 2024
1 parent efac8a9 commit d952d27
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/port/controller/PackageVersionFileController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ export class PackageVersionFileController extends AbstractController {
}
return await this.distRepository.getDistStream(file.dist);
}

@HTTPMethod({
path: `/:fullname@versionSpec/:path(.+)`,
method: HTTPMethodEnum.GET,
})
async rawNpm(@Context() ctx: EggContext,
@HTTPParam() fullname: string,
@HTTPParam() versionSpec: string,
@HTTPParam() path: string,
@HTTPQuery() meta: string) {
return await this.raw(ctx, fullname, versionSpec, filepath, meta);
}

/**
* compatibility with unpkg
Expand Down

0 comments on commit d952d27

Please sign in to comment.