@@ -17,7 +17,7 @@ import 'package:logging/logging.dart';
1717import 'package:meta/meta.dart' ;
1818import 'package:pool/pool.dart' ;
1919import 'package:pub_dev/package/api_export/export_api_to_bucket.dart' ;
20- import 'package:pub_dev/package/package_storage .dart' ;
20+ import 'package:pub_dev/package/tarball_storage .dart' ;
2121import 'package:pub_dev/service/async_queue/async_queue.dart' ;
2222import 'package:pub_dev/service/rate_limit/rate_limit.dart' ;
2323import 'package:pub_dev/shared/versions.dart' ;
@@ -81,8 +81,8 @@ class PackageBackend {
8181 /// - `tmp/$guid` (incoming package archive that was uploaded, but not yet processed)
8282 final Bucket _incomingBucket;
8383
84- /// The storage handling for the archive files.
85- final PackageStorage packageStorage ;
84+ /// The storage handling for the package archive files.
85+ final TarballStorage tarballStorage ;
8686
8787 @visibleForTesting
8888 int maxVersionsPerPackage = _defaultMaxVersionsPerPackage;
@@ -93,8 +93,8 @@ class PackageBackend {
9393 this ._incomingBucket,
9494 Bucket canonicalBucket,
9595 Bucket publicBucket,
96- ) : packageStorage =
97- PackageStorage (db, storage, canonicalBucket, publicBucket);
96+ ) : tarballStorage =
97+ TarballStorage (db, storage, canonicalBucket, publicBucket);
9898
9999 /// Whether the package exists and is not blocked or deleted.
100100 Future <bool > isPackageVisible (String package) async {
@@ -329,7 +329,7 @@ class PackageBackend {
329329 // NOTE: We should maybe check for existence first?
330330 // return storage.bucket(bucket).info(object)
331331 // .then((info) => info.downloadLink);
332- return packageStorage .getPublicDownloadUrl (package, cv! );
332+ return tarballStorage .getPublicDownloadUrl (package, cv! );
333333 }
334334
335335 /// Updates the stable, prerelease and preview versions of [package] .
@@ -943,7 +943,7 @@ class PackageBackend {
943943
944944 // Check canonical archive.
945945 final canonicalContentMatch =
946- await packageStorage .matchArchiveContentInCanonical (
946+ await tarballStorage .matchArchiveContentInCanonical (
947947 pubspec.name,
948948 versionString,
949949 fileBytes,
@@ -1184,14 +1184,14 @@ class PackageBackend {
11841184 );
11851185 if (! hasCanonicalArchiveObject) {
11861186 // Copy archive to canonical bucket.
1187- await packageStorage .copyFromTempToCanonicalBucket (
1187+ await tarballStorage .copyFromTempToCanonicalBucket (
11881188 sourceAbsoluteObjectName:
11891189 _incomingBucket.absoluteObjectName (tmpObjectName (guid)),
11901190 package: newVersion.package,
11911191 version: newVersion.version! ,
11921192 );
11931193 }
1194- await packageStorage .copyArchiveFromCanonicalToPublicBucket (
1194+ await tarballStorage .copyArchiveFromCanonicalToPublicBucket (
11951195 newVersion.package, newVersion.version! );
11961196
11971197 final inserts = < Model > [
@@ -1256,7 +1256,7 @@ class PackageBackend {
12561256 apiExporter!
12571257 .updatePackageVersion (newVersion.package, newVersion.version! ),
12581258 ]);
1259- await packageStorage .updateContentDispositionOnPublicBucket (
1259+ await tarballStorage .updateContentDispositionOnPublicBucket (
12601260 newVersion.package, newVersion.version! );
12611261 } catch (e, st) {
12621262 final v = newVersion.qualifiedVersionKey;
@@ -1634,12 +1634,12 @@ class PackageBackend {
16341634
16351635 /// Deletes the tarball of a [package] in the given [version] permanently.
16361636 Future <void > removePackageTarball (String package, String version) async {
1637- await packageStorage .deleteArchiveFromAllBuckets (package, version);
1637+ await tarballStorage .deleteArchiveFromAllBuckets (package, version);
16381638 }
16391639
16401640 /// Gets the file info of a [package] in the given [version] .
16411641 Future <ObjectInfo ?> packageTarballInfo (String package, String version) async {
1642- return await packageStorage .getPublicBucketArchiveInfo (package, version);
1642+ return await tarballStorage .getPublicBucketArchiveInfo (package, version);
16431643 }
16441644
16451645 void _updatePackageAutomatedPublishingLock (
0 commit comments