feat(core,storage,oci,registry-config): add streaming response support and configurable registry URLs across protocols

This commit is contained in:
2026-03-24 22:59:37 +00:00
parent 1f0acf2825
commit 7da1a35efe
42 changed files with 4179 additions and 5396 deletions

View File

@@ -302,9 +302,9 @@ export class ComposerRegistry extends BaseRegistry {
token: IAuthToken | null
): Promise<IResponse> {
// Read operations are public, no authentication required
const zipData = await this.storage.getComposerPackageZip(vendorPackage, reference);
const streamResult = await this.storage.getComposerPackageZipStream(vendorPackage, reference);
if (!zipData) {
if (!streamResult) {
return {
status: 404,
headers: {},
@@ -316,10 +316,10 @@ export class ComposerRegistry extends BaseRegistry {
status: 200,
headers: {
'Content-Type': 'application/zip',
'Content-Length': zipData.length.toString(),
'Content-Length': streamResult.size.toString(),
'Content-Disposition': `attachment; filename="${reference}.zip"`,
},
body: zipData,
body: streamResult.stream,
};
}