diff --git a/changelog.md b/changelog.md index 85c3126..b2b4ebb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-11-21 - 1.4.0 - feat(registrystorage) +Add deleteMavenMetadata to RegistryStorage and update Maven DELETE test to expect 204 No Content + +- Add deleteMavenMetadata(groupId, artifactId) to RegistryStorage to remove maven-metadata.xml. +- Update Maven test to assert 204 No Content for DELETE responses (previously expected 200). + ## 2025-11-21 - 1.3.1 - fix(maven) Pass request path to Maven checksum handler so checksum files are resolved correctly diff --git a/test/test.maven.ts b/test/test.maven.ts index 2666d5a..89c464a 100644 --- a/test/test.maven.ts +++ b/test/test.maven.ts @@ -344,7 +344,7 @@ tap.test('Maven: should delete an artifact (DELETE)', async () => { query: {}, }); - expect(response.status).toEqual(200); + expect(response.status).toEqual(204); // 204 No Content is correct for DELETE // Verify artifact was deleted const getResponse = await registry.handleRequest({ diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index d7ede27..814bb50 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartregistry', - version: '1.3.1', + version: '1.4.0', description: 'a registry for npm modules and oci images' } diff --git a/ts/core/classes.registrystorage.ts b/ts/core/classes.registrystorage.ts index 4514e11..fb4f38a 100644 --- a/ts/core/classes.registrystorage.ts +++ b/ts/core/classes.registrystorage.ts @@ -348,6 +348,17 @@ export class RegistryStorage implements IStorageBackend { return this.putObject(path, data); } + /** + * Delete Maven metadata (maven-metadata.xml) + */ + public async deleteMavenMetadata( + groupId: string, + artifactId: string + ): Promise { + const path = this.getMavenMetadataPath(groupId, artifactId); + return this.deleteObject(path); + } + /** * List Maven versions for an artifact * Returns all version directories under the artifact path