Skip to main content

provenant/models/
datasource_id.rs

1//! Datasource identifiers for package parsers.
2//!
3//! Each variant uniquely identifies the type of package data source (file format)
4//! that was parsed. These IDs enable the assembly system to intelligently merge
5//! related package files.
6
7use serde::{Deserialize, Serialize};
8use std::fmt;
9use strum::{EnumCount, EnumIter};
10
11/// Unique identifier for the type of package data source (file format).
12///
13/// Datasource IDs distinguish between different file types within the same ecosystem
14/// (e.g., `NpmPackageJson` vs `NpmPackageLockJson`). The assembly system uses these
15/// IDs to match packages from related files for merging into a single logical package.
16///
17/// # Serialization
18///
19/// Variants serialize to snake_case strings matching the Python reference values.
20/// The JSON output is identical to the Python ScanCode Toolkit.
21///
22/// # Examples
23///
24/// ```ignore
25/// use provenant::models::DatasourceId;
26///
27/// let id = DatasourceId::NpmPackageJson;
28/// assert_eq!(id.as_ref(), "npm_package_json");
29/// assert_eq!(id.to_string(), "npm_package_json");
30/// ```
31#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, EnumCount, EnumIter)]
32#[serde(rename_all = "snake_case")]
33pub enum DatasourceId {
34    // ── About/README/OS ──
35    AboutFile,
36    Readme,
37    EtcOsRelease,
38
39    // ── Alpine ──
40    AlpineApkArchive,
41    AlpineApkbuild,
42    AlpineInstalledDb,
43
44    // ── Arch Linux ──
45    ArchAurinfo,
46    ArchPkginfo,
47    ArchSrcinfo,
48
49    // ── Android ──
50    AndroidAarLibrary,
51    AndroidApk,
52
53    // ── Apache Axis2 ──
54    Axis2Mar,
55    Axis2ModuleXml,
56
57    // ── Autotools ──
58    AutotoolsConfigure,
59
60    // ── Bazel ──
61    BazelBuild,
62    BazelModule,
63
64    // ── Bower ──
65    BowerJson,
66
67    // ── Buck ──
68    /// Matches Python reference value. More consistent name would be `buck_file`.
69    #[serde(rename = "buck_file")]
70    BuckFile,
71    /// Matches Python reference value. More consistent name would be `buck_metadata`.
72    #[serde(rename = "buck_metadata")]
73    BuckMetadata,
74
75    // ── Bun ──
76    BunLock,
77    BunLockb,
78
79    // ── Cargo/Rust ──
80    CargoLock,
81    CargoToml,
82    RustBinary,
83
84    // ── Chef ──
85    /// Matches Python reference value.
86    #[serde(rename = "chef_cookbook_metadata_json")]
87    ChefCookbookMetadataJson,
88    /// Matches Python reference value.
89    #[serde(rename = "chef_cookbook_metadata_rb")]
90    ChefCookbookMetadataRb,
91
92    // ── CocoaPods ──
93    CocoapodsPodfile,
94    CocoapodsPodfileLock,
95    CocoapodsPodspec,
96    CocoapodsPodspecJson,
97
98    // ── Conan ──
99    #[serde(rename = "conan_conandata_yml")]
100    ConanConanDataYml,
101    #[serde(rename = "conan_conanfile_py")]
102    ConanConanFilePy,
103    #[serde(rename = "conan_conanfile_txt")]
104    ConanConanFileTxt,
105    ConanLock,
106
107    // ── Conda ──
108    /// Matches Python reference value.
109    #[serde(rename = "conda_yaml")]
110    CondaYaml,
111    CondaMetaJson,
112    CondaMetaYaml,
113
114    // ── Clojure ──
115    ClojureDepsEdn,
116    ClojureProjectClj,
117
118    // ── CPAN/Perl ──
119    CpanDistIni,
120    /// Matches Python reference value.
121    #[serde(rename = "cpan_makefile")]
122    CpanMakefile,
123    CpanManifest,
124    CpanMetaJson,
125    CpanMetaYml,
126
127    // ── CRAN/R ──
128    CranDescription,
129
130    // ── Dart/Flutter ──
131    PubspecLock,
132    PubspecYaml,
133
134    // ── Debian ──
135    DebianControlExtractedDeb,
136    DebianControlInSource,
137    DebianCopyright,
138    DebianCopyrightInSource,
139    DebianCopyrightInPackage,
140    DebianCopyrightStandalone,
141    DebianDeb,
142    /// Matches Python reference value.
143    #[serde(rename = "debian_source_metadata_tarball")]
144    DebianSourceMetadataTarball,
145    DebianDistrolessInstalledDb,
146    /// Matches Python reference value.
147    #[serde(rename = "debian_installed_files_list")]
148    DebianInstalledFilesList,
149    #[serde(rename = "debian_installed_md5sums")]
150    DebianInstalledMd5Sums,
151    DebianInstalledStatusDb,
152    #[serde(rename = "debian_md5sums_in_extracted_deb")]
153    DebianMd5SumsInExtractedDeb,
154    /// Matches Python reference value.
155    #[serde(rename = "debian_original_source_tarball")]
156    DebianOriginalSourceTarball,
157    DebianSourceControlDsc,
158
159    // ── Deno ──
160    DenoJson,
161    DenoLock,
162
163    // ── Docker ──
164    Dockerfile,
165
166    // ── FreeBSD ──
167    FreebsdCompactManifest,
168
169    // ── Go ──
170    Godeps,
171    GoBinary,
172    GoMod,
173    GoModGraph,
174    GoSum,
175    GoWork,
176
177    // ── Haskell / Hackage ──
178    HackageCabal,
179    HackageCabalProject,
180    HackageStackYaml,
181
182    // ── Gradle ──
183    BuildGradle,
184    GradleLockfile,
185    GradleModule,
186
187    // ── Haxe ──
188    HaxelibJson,
189
190    // ── Helm ──
191    HelmChartLock,
192    HelmChartYaml,
193
194    // ── Hex/Elixir ──
195    HexMixLock,
196
197    // ── Java ──
198    AntIvyXml,
199    JavaEarApplicationXml,
200    JavaEarArchive,
201    JavaJar,
202    JavaJarManifest,
203    JavaOsgiManifest,
204    JavaWarArchive,
205    JavaWarWebXml,
206    JbossSar,
207    JbossServiceXml,
208
209    // ── Maven ──
210    MavenPom,
211    MavenPomProperties,
212    MesonBuild,
213
214    SbtBuildSbt,
215
216    // ── Microsoft ──
217    MicrosoftCabinet,
218    MicrosoftUpdateManifestMum,
219
220    // ── Mobile/Browser ──
221    AppleDmg,
222    ChromeCrx,
223    IosIpa,
224    MozillaXpi,
225
226    // ── Meteor ──
227    MeteorPackage,
228
229    NixDefaultNix,
230    NixFlakeLock,
231    NixFlakeNix,
232
233    // ── npm ──
234    NpmPackageJson,
235    NpmPackageLockJson,
236
237    // ── NuGet ──
238    NugetCsproj,
239    NugetDepsJson,
240    NugetDirectoryBuildProps,
241    NugetDirectoryPackagesProps,
242    NugetNupkg,
243    NugetProjectJson,
244    NugetProjectLockJson,
245    NugetPackagesConfig,
246    NugetPackagesLock,
247    /// Serializes to `"nuget_nupsec"` to match Python reference value (typo in original).
248    #[serde(rename = "nuget_nupsec")]
249    NugetNuspec,
250    NugetVbproj,
251    NugetFsproj,
252
253    // ── OCaml/opam ──
254    OpamFile,
255
256    // ── PHP/Composer ──
257    PhpComposerJson,
258    PhpComposerLock,
259
260    // ── pnpm ──
261    PnpmLockYaml,
262    PnpmWorkspaceYaml,
263
264    // ── Python/PyPI ──
265    Pipfile,
266    PipfileLock,
267    PipRequirements,
268    PixiLock,
269    PixiToml,
270    PypiPipOriginJson,
271    PypiEgg,
272    PypiEggPkginfo,
273    PypiEditableEggPkginfo,
274    PypiInspectDeplock,
275    PypiJson,
276    PypiPoetryLock,
277    PypiPoetryPyprojectToml,
278    PypiSdist,
279    PypiPylockToml,
280    PypiPyprojectToml,
281    PypiSdistPkginfo,
282    PypiSetupCfg,
283    PypiSetupPy,
284    PypiUvLock,
285    PypiWheel,
286    PypiWheelMetadata,
287
288    // ── RPM ──
289    RpmArchive,
290    RpmInstalledDatabaseBdb,
291    RpmInstalledDatabaseNdb,
292    RpmInstalledDatabaseSqlite,
293    RpmMarinerManifest,
294    RpmPackageLicenses,
295    /// Serializes to `"rpm_spefile"` to match Python reference value (typo in original).
296    #[serde(rename = "rpm_spefile")]
297    RpmSpecfile,
298    RpmYumdb,
299
300    // ── Ruby/RubyGems ──
301    Gemfile,
302    GemfileExtracted,
303    GemfileLock,
304    GemfileLockExtracted,
305    GemArchive,
306    /// Matches Python reference value.
307    #[serde(rename = "gem_archive_extracted")]
308    GemArchiveExtracted,
309    Gemspec,
310    GemspecExtracted,
311    GemGemspecInstalledSpecifications,
312
313    // ── Disk Images/Installers ──
314    InstallshieldInstaller,
315    IsoDiskImage,
316    NsisInstaller,
317    SharShellArchive,
318    SquashfsDiskImage,
319
320    // ── Swift ──
321    SwiftPackageManifestJson,
322    SwiftPackageResolved,
323    SwiftPackageShowDependencies,
324
325    // ── vcpkg ──
326    VcpkgJson,
327
328    // ── Yarn ──
329    YarnLock,
330    YarnLockV1,
331    YarnLockV2,
332
333    // ── Git ──
334    Gitmodules,
335}
336
337impl DatasourceId {
338    /// Returns the string representation of this datasource ID.
339    ///
340    /// This matches the serialized form used in JSON output.
341    pub fn as_str(&self) -> &'static str {
342        match self {
343            // About/README/OS
344            Self::AboutFile => "about_file",
345            Self::Readme => "readme",
346            Self::EtcOsRelease => "etc_os_release",
347
348            // Alpine
349            Self::AlpineApkArchive => "alpine_apk_archive",
350            Self::AlpineApkbuild => "alpine_apkbuild",
351            Self::AlpineInstalledDb => "alpine_installed_db",
352
353            // Arch Linux
354            Self::ArchAurinfo => "arch_aurinfo",
355            Self::ArchPkginfo => "arch_pkginfo",
356            Self::ArchSrcinfo => "arch_srcinfo",
357
358            // Android
359            Self::AndroidAarLibrary => "android_aar_library",
360            Self::AndroidApk => "android_apk",
361
362            // Apache Axis2
363            Self::Axis2Mar => "axis2_mar",
364            Self::Axis2ModuleXml => "axis2_module_xml",
365
366            // Autotools
367            Self::AutotoolsConfigure => "autotools_configure",
368
369            // Bazel
370            Self::BazelBuild => "bazel_build",
371
372            // Bower
373            Self::BowerJson => "bower_json",
374
375            // Buck
376            Self::BuckFile => "buck_file",
377            Self::BuckMetadata => "buck_metadata",
378
379            // Cargo/Rust
380            Self::CargoLock => "cargo_lock",
381            Self::CargoToml => "cargo_toml",
382            Self::RustBinary => "rust_binary",
383
384            // Chef
385            Self::ChefCookbookMetadataJson => "chef_cookbook_metadata_json",
386            Self::ChefCookbookMetadataRb => "chef_cookbook_metadata_rb",
387
388            // CocoaPods
389            Self::CocoapodsPodfile => "cocoapods_podfile",
390            Self::CocoapodsPodfileLock => "cocoapods_podfile_lock",
391            Self::CocoapodsPodspec => "cocoapods_podspec",
392            Self::CocoapodsPodspecJson => "cocoapods_podspec_json",
393
394            // Conan
395            Self::ConanConanDataYml => "conan_conandata_yml",
396            Self::ConanConanFilePy => "conan_conanfile_py",
397            Self::ConanConanFileTxt => "conan_conanfile_txt",
398            Self::ConanLock => "conan_lock",
399
400            // Conda
401            Self::CondaYaml => "conda_yaml",
402            Self::CondaMetaJson => "conda_meta_json",
403            Self::CondaMetaYaml => "conda_meta_yaml",
404
405            // Clojure
406            Self::ClojureDepsEdn => "clojure_deps_edn",
407            Self::ClojureProjectClj => "clojure_project_clj",
408
409            // CPAN/Perl
410            Self::CpanDistIni => "cpan_dist_ini",
411            Self::CpanMakefile => "cpan_makefile",
412            Self::CpanManifest => "cpan_manifest",
413            Self::CpanMetaJson => "cpan_meta_json",
414            Self::CpanMetaYml => "cpan_meta_yml",
415
416            // CRAN/R
417            Self::CranDescription => "cran_description",
418
419            // Dart/Flutter
420            Self::PubspecLock => "pubspec_lock",
421            Self::PubspecYaml => "pubspec_yaml",
422
423            // Debian
424            Self::DebianControlExtractedDeb => "debian_control_extracted_deb",
425            Self::DebianControlInSource => "debian_control_in_source",
426            Self::DebianCopyright => "debian_copyright",
427            Self::DebianCopyrightInSource => "debian_copyright_in_source",
428            Self::DebianCopyrightInPackage => "debian_copyright_in_package",
429            Self::DebianCopyrightStandalone => "debian_copyright_standalone",
430            Self::DebianDeb => "debian_deb",
431            Self::DebianSourceMetadataTarball => "debian_source_metadata_tarball",
432            Self::DebianDistrolessInstalledDb => "debian_distroless_installed_db",
433            Self::DebianInstalledFilesList => "debian_installed_files_list",
434            Self::DebianInstalledMd5Sums => "debian_installed_md5sums",
435            Self::DebianInstalledStatusDb => "debian_installed_status_db",
436            Self::DebianMd5SumsInExtractedDeb => "debian_md5sums_in_extracted_deb",
437            Self::DebianOriginalSourceTarball => "debian_original_source_tarball",
438            Self::DebianSourceControlDsc => "debian_source_control_dsc",
439            Self::DenoJson => "deno_json",
440            Self::DenoLock => "deno_lock",
441            Self::Dockerfile => "dockerfile",
442            Self::BazelModule => "bazel_module",
443
444            // FreeBSD
445            Self::FreebsdCompactManifest => "freebsd_compact_manifest",
446
447            // Go
448            Self::Godeps => "godeps",
449            Self::GoBinary => "go_binary",
450            Self::GoMod => "go_mod",
451            Self::GoModGraph => "go_mod_graph",
452            Self::GoSum => "go_sum",
453            Self::GoWork => "go_work",
454
455            // Haskell / Hackage
456            Self::HackageCabal => "hackage_cabal",
457            Self::HackageCabalProject => "hackage_cabal_project",
458            Self::HackageStackYaml => "hackage_stack_yaml",
459
460            // Gradle
461            Self::BuildGradle => "build_gradle",
462            Self::GradleLockfile => "gradle_lockfile",
463            Self::GradleModule => "gradle_module",
464
465            // Haxe
466            Self::HaxelibJson => "haxelib_json",
467
468            // Helm
469            Self::HelmChartLock => "helm_chart_lock",
470            Self::HelmChartYaml => "helm_chart_yaml",
471
472            // Hex/Elixir
473            Self::HexMixLock => "hex_mix_lock",
474
475            // Java
476            Self::AntIvyXml => "ant_ivy_xml",
477            Self::JavaEarApplicationXml => "java_ear_application_xml",
478            Self::JavaEarArchive => "java_ear_archive",
479            Self::JavaJar => "java_jar",
480            Self::JavaJarManifest => "java_jar_manifest",
481            Self::JavaOsgiManifest => "java_osgi_manifest",
482            Self::JavaWarArchive => "java_war_archive",
483            Self::JavaWarWebXml => "java_war_web_xml",
484            Self::JbossSar => "jboss_sar",
485            Self::JbossServiceXml => "jboss_service_xml",
486
487            // Maven
488            Self::MavenPom => "maven_pom",
489            Self::MavenPomProperties => "maven_pom_properties",
490            Self::MesonBuild => "meson_build",
491            Self::SbtBuildSbt => "sbt_build_sbt",
492
493            // Microsoft
494            Self::MicrosoftCabinet => "microsoft_cabinet",
495            Self::MicrosoftUpdateManifestMum => "microsoft_update_manifest_mum",
496
497            // Mobile/Browser
498            Self::AppleDmg => "apple_dmg",
499            Self::ChromeCrx => "chrome_crx",
500            Self::IosIpa => "ios_ipa",
501            Self::MozillaXpi => "mozilla_xpi",
502
503            // Meteor
504            Self::MeteorPackage => "meteor_package",
505
506            Self::NixDefaultNix => "nix_default_nix",
507            Self::NixFlakeLock => "nix_flake_lock",
508            Self::NixFlakeNix => "nix_flake_nix",
509
510            // npm
511            Self::BunLock => "bun_lock",
512            Self::BunLockb => "bun_lockb",
513            Self::NpmPackageJson => "npm_package_json",
514            Self::NpmPackageLockJson => "npm_package_lock_json",
515
516            // NuGet
517            Self::NugetCsproj => "nuget_csproj",
518            Self::NugetDepsJson => "nuget_deps_json",
519            Self::NugetDirectoryBuildProps => "nuget_directory_build_props",
520            Self::NugetDirectoryPackagesProps => "nuget_directory_packages_props",
521            Self::NugetNupkg => "nuget_nupkg",
522            Self::NugetProjectJson => "nuget_project_json",
523            Self::NugetProjectLockJson => "nuget_project_lock_json",
524            Self::NugetPackagesConfig => "nuget_packages_config",
525            Self::NugetPackagesLock => "nuget_packages_lock",
526            Self::NugetNuspec => "nuget_nupsec",
527            Self::NugetVbproj => "nuget_vbproj",
528            Self::NugetFsproj => "nuget_fsproj",
529
530            // OCaml/opam
531            Self::OpamFile => "opam_file",
532
533            // PHP/Composer
534            Self::PhpComposerJson => "php_composer_json",
535            Self::PhpComposerLock => "php_composer_lock",
536
537            // pnpm
538            Self::PnpmLockYaml => "pnpm_lock_yaml",
539            Self::PnpmWorkspaceYaml => "pnpm_workspace_yaml",
540
541            // Python/PyPI
542            Self::Pipfile => "pipfile",
543            Self::PipfileLock => "pipfile_lock",
544            Self::PipRequirements => "pip_requirements",
545            Self::PixiLock => "pixi_lock",
546            Self::PixiToml => "pixi_toml",
547            Self::PypiPipOriginJson => "pypi_pip_origin_json",
548            Self::PypiEgg => "pypi_egg",
549            Self::PypiEggPkginfo => "pypi_egg_pkginfo",
550            Self::PypiEditableEggPkginfo => "pypi_editable_egg_pkginfo",
551            Self::PypiInspectDeplock => "pypi_inspect_deplock",
552            Self::PypiJson => "pypi_json",
553            Self::PypiPoetryLock => "pypi_poetry_lock",
554            Self::PypiPoetryPyprojectToml => "pypi_poetry_pyproject_toml",
555            Self::PypiSdist => "pypi_sdist",
556            Self::PypiPylockToml => "pypi_pylock_toml",
557            Self::PypiPyprojectToml => "pypi_pyproject_toml",
558            Self::PypiSdistPkginfo => "pypi_sdist_pkginfo",
559            Self::PypiSetupCfg => "pypi_setup_cfg",
560            Self::PypiSetupPy => "pypi_setup_py",
561            Self::PypiUvLock => "pypi_uv_lock",
562            Self::PypiWheel => "pypi_wheel",
563            Self::PypiWheelMetadata => "pypi_wheel_metadata",
564
565            // RPM
566            Self::RpmArchive => "rpm_archive",
567            Self::RpmInstalledDatabaseBdb => "rpm_installed_database_bdb",
568            Self::RpmInstalledDatabaseNdb => "rpm_installed_database_ndb",
569            Self::RpmInstalledDatabaseSqlite => "rpm_installed_database_sqlite",
570            Self::RpmMarinerManifest => "rpm_mariner_manifest",
571            Self::RpmPackageLicenses => "rpm_package_licenses",
572            Self::RpmSpecfile => "rpm_spefile",
573            Self::RpmYumdb => "rpm_yumdb",
574
575            // Ruby/RubyGems
576            Self::Gemfile => "gemfile",
577            Self::GemfileExtracted => "gemfile_extracted",
578            Self::GemfileLock => "gemfile_lock",
579            Self::GemfileLockExtracted => "gemfile_lock_extracted",
580            Self::GemArchive => "gem_archive",
581            Self::GemArchiveExtracted => "gem_archive_extracted",
582            Self::Gemspec => "gemspec",
583            Self::GemspecExtracted => "gemspec_extracted",
584            Self::GemGemspecInstalledSpecifications => "gem_gemspec_installed_specifications",
585
586            // Disk Images/Installers
587            Self::InstallshieldInstaller => "installshield_installer",
588            Self::IsoDiskImage => "iso_disk_image",
589            Self::NsisInstaller => "nsis_installer",
590            Self::SharShellArchive => "shar_shell_archive",
591            Self::SquashfsDiskImage => "squashfs_disk_image",
592
593            // Swift
594            Self::SwiftPackageManifestJson => "swift_package_manifest_json",
595            Self::SwiftPackageResolved => "swift_package_resolved",
596            Self::SwiftPackageShowDependencies => "swift_package_show_dependencies",
597
598            // vcpkg
599            Self::VcpkgJson => "vcpkg_json",
600
601            // Yarn
602            Self::YarnLock => "yarn_lock",
603            Self::YarnLockV1 => "yarn_lock_v1",
604            Self::YarnLockV2 => "yarn_lock_v2",
605
606            // Git
607            Self::Gitmodules => "gitmodules",
608        }
609    }
610}
611
612impl AsRef<str> for DatasourceId {
613    fn as_ref(&self) -> &str {
614        self.as_str()
615    }
616}
617
618impl fmt::Display for DatasourceId {
619    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
620        f.write_str(self.as_str())
621    }
622}
623
624#[cfg(test)]
625mod tests {
626    use super::*;
627
628    #[test]
629    fn test_serialization() {
630        let id = DatasourceId::NpmPackageJson;
631        let json = serde_json::to_string(&id).unwrap();
632        assert_eq!(json, r#""npm_package_json""#);
633    }
634
635    #[test]
636    fn test_deserialization() {
637        let json = r#""npm_package_json""#;
638        let id: DatasourceId = serde_json::from_str(json).unwrap();
639        assert_eq!(id, DatasourceId::NpmPackageJson);
640    }
641
642    #[test]
643    fn test_as_str() {
644        assert_eq!(DatasourceId::NpmPackageJson.as_str(), "npm_package_json");
645        assert_eq!(DatasourceId::CargoLock.as_str(), "cargo_lock");
646        assert_eq!(
647            DatasourceId::PypiPyprojectToml.as_str(),
648            "pypi_pyproject_toml"
649        );
650        assert_eq!(DatasourceId::HackageCabal.as_str(), "hackage_cabal");
651    }
652
653    #[test]
654    fn test_display() {
655        assert_eq!(DatasourceId::NpmPackageJson.to_string(), "npm_package_json");
656    }
657
658    #[test]
659    fn test_as_ref() {
660        let id = DatasourceId::NpmPackageJson;
661        let s: &str = id.as_ref();
662        assert_eq!(s, "npm_package_json");
663    }
664
665    #[test]
666    fn test_python_rename_mappings() {
667        // Test the ~12 IDs that changed from our old values to match Python
668        assert_eq!(DatasourceId::BuckFile.as_str(), "buck_file");
669        assert_eq!(DatasourceId::BuckMetadata.as_str(), "buck_metadata");
670        assert_eq!(
671            DatasourceId::ChefCookbookMetadataJson.as_str(),
672            "chef_cookbook_metadata_json"
673        );
674        assert_eq!(
675            DatasourceId::ChefCookbookMetadataRb.as_str(),
676            "chef_cookbook_metadata_rb"
677        );
678        assert_eq!(DatasourceId::CondaYaml.as_str(), "conda_yaml");
679        assert_eq!(DatasourceId::CpanMakefile.as_str(), "cpan_makefile");
680        assert_eq!(
681            DatasourceId::DebianInstalledFilesList.as_str(),
682            "debian_installed_files_list"
683        );
684        assert_eq!(
685            DatasourceId::DebianOriginalSourceTarball.as_str(),
686            "debian_original_source_tarball"
687        );
688        assert_eq!(
689            DatasourceId::DebianSourceMetadataTarball.as_str(),
690            "debian_source_metadata_tarball"
691        );
692        assert_eq!(
693            DatasourceId::GemArchiveExtracted.as_str(),
694            "gem_archive_extracted"
695        );
696        assert_eq!(DatasourceId::NugetNuspec.as_str(), "nuget_nupsec");
697        assert_eq!(DatasourceId::RpmSpecfile.as_str(), "rpm_spefile");
698    }
699}