Skip to main content

components_rs/discovery/
mod.rs

1//! Low-level discovery of npm packages and their Components.js metadata.
2//!
3//! This module handles the filesystem traversal that happens *before* any component or config
4//! parsing.  Its outputs feed directly into [`crate::module_state::ModuleState`].
5//!
6//! - [`node_modules`] — walks `node_modules/` trees (including scoped packages under `@scope/`)
7//!   following Node.js resolution order, collecting every directory that contains a
8//!   `package.json`.
9//! - [`package_json`] — parses `package.json` files, extracting the `lsd:*` fields that
10//!   Components.js uses: `lsd:module`, `lsd:components`, `lsd:contexts`, `lsd:importPaths`.
11//!   Also handles auto-expansion of `lsd:module: true` into a full IRI.
12
13pub mod node_modules;
14pub mod package_json;