Skip to content

Commit 98ee21b

Browse files
committed
fix: 增加项目依赖验证
1 parent 324aa91 commit 98ee21b

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
mod validators;
44

5-
use std::{fs, error::Error, path::PathBuf, env};
5+
use std::{ fs, error::Error, path::PathBuf, env };
66

77
use validators::{ config::ConfigValidator, common::Validator };
88

9-
use crate::validators::message::{Message, self};
9+
use crate::validators::message::{ Message, self };
1010

1111
#[macro_use]
1212
extern crate napi_derive;
@@ -19,6 +19,11 @@ pub fn validate_config(config_str: String) {
1919
}
2020
}
2121

22+
#[napi]
23+
pub fn validate_package(package_path: String) {
24+
25+
}
26+
2227
fn validate_config_core(config_str: String) -> Result<(), Box<dyn Error>> {
2328
let tip = Message {
2429
kind: validators::message::MessageKind::Info,
@@ -52,3 +57,7 @@ fn validate_config_core(config_str: String) -> Result<(), Box<dyn Error>> {
5257
}
5358
Ok(())
5459
}
60+
61+
fn validate_package_core() -> Result<(), Box<dyn Error>> {
62+
63+
}

src/validators/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pub(crate) mod config;
22
pub(crate) mod message;
33
pub(crate) mod common;
4+
pub(crate) mod package;

src/validators/package.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use super::{ message::{ Message, MessageKind }, common::Validator };
2+
3+
struct PackageValidator {
4+
5+
}
6+
7+
impl PackageValidator {
8+
9+
}
10+
11+
impl Validator for PackageValidator {
12+
}

0 commit comments

Comments
 (0)