dowload package
This commit is contained in:
@@ -1067,7 +1067,13 @@ function getLocalPackageFilePath(filePath) {
|
||||
|
||||
function getDownloadFileName(packageVersion, localPath) {
|
||||
const storedName = path.basename(localPath || '');
|
||||
if (storedName) return storedName.replace(/"/g, '');
|
||||
if (storedName) {
|
||||
const uploadedName = storedName
|
||||
.replace(/"/g, '')
|
||||
.replace(/^\d+-[a-f0-9]{8}-/, '');
|
||||
|
||||
if (uploadedName) return uploadedName;
|
||||
}
|
||||
|
||||
const packageCode = String(packageVersion.packageCode || 'package').replace(/[^a-zA-Z0-9._+-]/g, '-');
|
||||
const version = String(packageVersion.version || 'latest').replace(/[^a-zA-Z0-9._:+~=-]/g, '-');
|
||||
|
||||
Reference in New Issue
Block a user