morph_cli/core/detection/
mod.rs1#![allow(clippy::all)]
2pub mod frameworks;
3pub mod package_json;
4pub mod scanner;
5pub mod workspace;
6
7pub use frameworks::DetectedFramework;
8pub use package_json::PackageJson;
9
10#[allow(clippy::upper_case_acronyms, clippy::if_same_then_else)]
11#[derive(Debug, Clone)]
12pub struct DetectionResult {
13 pub frameworks: Vec<DetectedFramework>,
14 pub module_system: ModuleSystem,
15 pub migration_opportunities: Vec<MigrationOpportunity>,
16 pub risky_areas: Vec<RiskyArea>,
17}
18
19#[derive(Debug, Clone, PartialEq)]
20#[allow(clippy::upper_case_acronyms)]
21pub enum ModuleSystem {
22 CommonJS,
23 ESM,
24 Mixed,
25}
26
27#[derive(Debug, Clone)]
28#[allow(unused)]
29pub struct MigrationOpportunity {
30 pub name: String,
31 pub description: String,
32 pub recipes: Vec<String>,
33 pub priority: u8,
34}
35
36#[derive(Debug, Clone)]
37#[allow(unused)]
38pub struct RiskyArea {
39 pub path: String,
40 pub reason: String,
41 pub severity: u8,
42}