mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 18:06:46 +00:00
refactor(resources): share provider descriptor cleanup (#14425)
This commit is contained in:
1 parent
efeac85e0f
commit
adb4679449
30 files changed
+213
-326
No files matched your search
@@ -2,7 +2,7 @@ import {
|
||||
ArtifactReaderFailure,
|
||||
ArtifactResourceScope,
|
||||
artifactFilePrimaryFacts,
|
||||
projectArtifactCloseFailure,
|
||||
closeArtifactResources,
|
||||
projectStableArtifactFailure,
|
||||
readStableArtifact,
|
||||
translateArtifactFailure,
|
||||
@@ -42,16 +42,12 @@ export class MavenGradleMetadataProvider {
|
||||
readonly identity = MAVEN_GRADLE_METADATA_PROVIDER_IDENTITY;
|
||||
readonly #resources = new ArtifactResourceScope();
|
||||
|
||||
async close(): Promise<void> {
|
||||
try {
|
||||
await this.#resources.close();
|
||||
} catch (cause: unknown) {
|
||||
throw projectArtifactCloseFailure(
|
||||
cause,
|
||||
MAVEN_GRADLE_METADATA_PROVIDER_IDENTITY.id,
|
||||
OPERATION,
|
||||
);
|
||||
}
|
||||
close(): Promise<void> {
|
||||
return closeArtifactResources(
|
||||
() => this.#resources.close(),
|
||||
MAVEN_GRADLE_METADATA_PROVIDER_IDENTITY,
|
||||
OPERATION,
|
||||
);
|
||||
}
|
||||
|
||||
async inspect(
|
||||
|
||||
Reference in new issue
Block a user