-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathmod.rs
More file actions
67 lines (65 loc) · 1.9 KB
/
Copy pathmod.rs
File metadata and controls
67 lines (65 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Unified service layer for dependency resolution.
//!
//! This module provides a unified API that works on both native (CLI) and
//! WASM (browser) environments.
//!
//! # Architecture
//!
//! ```text
//! +------------------+
//! | build_deps | <- High-level API (api.rs)
//! +------------------+
//! |
//! v
//! +------------------+
//! | UnifiedRegistry | <- Registry client (registry.rs)
//! +------------------+
//! | |
//! v v
//! +-------+ +--------+
//! | Cache | | HTTP |
//! +-------+ +--------+
//! |
//! v
//! +------------------+
//! | tokio-fs-ext | <- Platform abstraction
//! +------------------+
//! ```
//!
//! # Usage
//!
//! ```ignore
//! use utoo_ruborist::service::{build_deps, BuildDepsOptions};
//!
//! let package_lock = build_deps(BuildDepsOptions {
//! cwd: PathBuf::from("."),
//! registry_url: "https://registry.npmmirror.com".to_string(),
//! cache_dir: None,
//! concurrency: 20,
//! peer_deps: PeerDeps::Include,
//! glob: my_glob,
//! receiver: my_receiver,
//! }).await?;
//! ```
mod api;
mod cache;
pub(crate) mod dns;
pub(crate) mod fetch;
mod fs;
pub(crate) mod http;
pub(crate) mod manifest;
mod provider;
mod registry;
mod store;
pub use api::{BuildDepsOptions, BuildDepsOutput, build_deps};
pub use cache::{ProjectCacheData, ProjectPackageCache, Versions, VersionsInfo};
pub use fs::{Glob, NoopGlob, exists, read_to_string};
pub use http::client_builder;
pub use manifest::{
FetchManifestBytesResult, FetchManifestOptions, FetchManifestResult,
FetchVersionManifestOptions, MetadataFormat, fetch_full_manifest, fetch_full_manifest_bytes,
fetch_full_manifest_fresh, fetch_version_manifest, fetch_version_manifest_bytes,
};
pub use provider::{ManifestFullData, ManifestJob, ManifestJobDone, ManifestProvider};
pub use registry::UnifiedRegistry;
pub use store::{ManifestStore, NoopStore};