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
//! An NPM registry-compatible package interface. You can use it for
//! resolving, fetching metadata for, and downloading individual packages.

use futures::AsyncRead;
pub use oro_package_spec::{GitHost, GitInfo, PackageSpec, VersionSpec};

pub mod client;
pub mod entries;
#[cfg(not(target_arch = "wasm32"))]
mod error;
#[cfg(target_arch = "wasm32")]
pub mod error;
pub mod fetch;
pub mod package;
pub mod resolver;
pub mod tarball;
#[cfg(target_arch = "wasm32")]
mod wasm;

#[cfg(not(target_arch = "wasm32"))]
pub use client::*;
#[cfg(not(target_arch = "wasm32"))]
pub use entries::*;
#[cfg(not(target_arch = "wasm32"))]
pub use error::NassunError;
#[cfg(not(target_arch = "wasm32"))]
pub use package::*;
pub use resolver::*;
#[cfg(not(target_arch = "wasm32"))]
pub use tarball::*;
#[cfg(target_arch = "wasm32")]
pub use wasm::*;

#[cfg(not(target_arch = "wasm32"))]
pub(crate) type TarballStream = Box<dyn AsyncRead + Unpin + Send + Sync>;
#[cfg(target_arch = "wasm32")]
pub(crate) type TarballStream = Box<dyn AsyncRead + Unpin>;