|
|
@ -55,15 +55,18 @@ func createPackageMetadataVersion(registryURL string, pd *packages_model.Package |
|
|
|
metadata := pd.Metadata.(*npm_module.Metadata) |
|
|
|
metadata := pd.Metadata.(*npm_module.Metadata) |
|
|
|
|
|
|
|
|
|
|
|
return &npm_module.PackageMetadataVersion{ |
|
|
|
return &npm_module.PackageMetadataVersion{ |
|
|
|
ID: fmt.Sprintf("%s@%s", pd.Package.Name, pd.Version.Version), |
|
|
|
ID: fmt.Sprintf("%s@%s", pd.Package.Name, pd.Version.Version), |
|
|
|
Name: pd.Package.Name, |
|
|
|
Name: pd.Package.Name, |
|
|
|
Version: pd.Version.Version, |
|
|
|
Version: pd.Version.Version, |
|
|
|
Description: metadata.Description, |
|
|
|
Description: metadata.Description, |
|
|
|
Author: npm_module.User{Name: metadata.Author}, |
|
|
|
Author: npm_module.User{Name: metadata.Author}, |
|
|
|
Homepage: metadata.ProjectURL, |
|
|
|
Homepage: metadata.ProjectURL, |
|
|
|
License: metadata.License, |
|
|
|
License: metadata.License, |
|
|
|
Dependencies: metadata.Dependencies, |
|
|
|
Dependencies: metadata.Dependencies, |
|
|
|
Readme: metadata.Readme, |
|
|
|
DevDependencies: metadata.DevelopmentDependencies, |
|
|
|
|
|
|
|
PeerDependencies: metadata.PeerDependencies, |
|
|
|
|
|
|
|
OptionalDependencies: metadata.OptionalDependencies, |
|
|
|
|
|
|
|
Readme: metadata.Readme, |
|
|
|
Dist: npm_module.PackageDistribution{ |
|
|
|
Dist: npm_module.PackageDistribution{ |
|
|
|
Shasum: pd.Files[0].Blob.HashSHA1, |
|
|
|
Shasum: pd.Files[0].Blob.HashSHA1, |
|
|
|
Integrity: "sha512-" + base64.StdEncoding.EncodeToString(hashBytes), |
|
|
|
Integrity: "sha512-" + base64.StdEncoding.EncodeToString(hashBytes), |
|
|
|