class PHPComposerPackage(models.Package): metafiles = ('composer.json') filetypes = ('.json', ) mimetypes = ('application/json') repo_types = (models.repo_phpcomposer, ) type = models.StringType(default='phpcomposer') primary_language = models.StringType(default='PHP') @classmethod def recognize(cls, location): return parse(location)
class NpmPackage(models.Package): metafiles = ('package.json', 'npm-shrinkwrap.json') filetypes = ('.tgz', ) mimetypes = ('application/x-tar', ) repo_types = (models.repo_npm, ) type = models.StringType(default='npm') primary_language = models.StringType(default='JavaScript') @classmethod def recognize(cls, location): return parse(location)
class MavenPomPackage(models.Package): metafiles = ( '.pom', 'pom.xml', ) extensions = ( '.pom', '.xml', ) repo_types = (models.repo_maven, ) type = models.StringType(default='Apache Maven POM') packaging = models.StringType(default=models.as_archive) primary_language = models.StringType(default='Java') @classmethod def recognize(cls, location): return parse(location)
class MavenJar(models.JavaJar): metafiles = ('META-INF/**/*.pom', 'pom.xml',) repo_types = (models.repo_maven,) type = models.StringType(default='Apache Maven') @classmethod def recognize(cls, location): return parse(location)
class RpmPackage(models.Package): metafiles = ('*.spec', ) extensions = ( '.rpm', '.srpm', '.mvl', '.vip', ) filetypes = ('rpm ', ) mimetypes = ('application/x-rpm', ) repo_types = (models.repo_yum, ) type = models.StringType(default='RPM') version = RPMVersionType() packaging = models.StringType(default=models.as_archive) related_packages = models.ListType(models.ModelType(RPMRelatedPackage)) @classmethod def recognize(location): return parse(location)
class NugetPackage(models.Package): metafiles = ( '[Content_Types].xml', '*.nuspec', ) filetypes = ( 'zip archive', 'microsoft ooxml', ) mimetypes = ( 'application/zip', 'application/octet-stream', ) extensions = ('.nupkg', ) repo_types = (models.repo_nuget, ) type = models.StringType(default='Nuget') packaging = models.StringType(default=models.as_archive) @classmethod def recognize(cls, location): return parse(location)
class RPMRelatedPackage(models.RelatedPackage): type = models.StringType(default='RPM') version = RPMVersionType() class Options: fields_order = 'type', 'name', 'version', 'payload_type'